about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/assembly-llvm/asm/loongarch-type.rs51
-rw-r--r--tests/assembly-llvm/targets/targets-elf.rs3
-rw-r--r--tests/assembly-llvm/x86_64-bigint-helpers.rs23
-rw-r--r--tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-generic-load.rs31
-rw-r--r--tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs14
-rw-r--r--tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs28
-rw-r--r--tests/codegen-llvm/addr-of-mutate.rs6
-rw-r--r--tests/codegen-llvm/atomicptr.rs6
-rw-r--r--tests/codegen-llvm/bigint-helpers.rs15
-rw-r--r--tests/codegen-llvm/bounds-check-elision-slice-min.rs19
-rw-r--r--tests/codegen-llvm/dead_on_return.rs31
-rw-r--r--tests/codegen-llvm/enum/enum-discriminant-eq.rs73
-rw-r--r--tests/codegen-llvm/enum/enum-match.rs24
-rw-r--r--tests/codegen-llvm/function-arguments.rs2
-rw-r--r--tests/codegen-llvm/issues/saturating-sub-index-139759.rs19
-rw-r--r--tests/codegen-llvm/loongarch-abi/loongarch64-lp64d-abi.rs2
-rw-r--r--tests/codegen-llvm/sanitizer/cfi/external_weak_symbols.rs2
-rw-r--r--tests/codegen-llvm/simd/extract-insert-dyn.rs27
-rw-r--r--tests/coverage/branch/no-mir-spans.cov-map63
-rw-r--r--tests/coverage/branch/no-mir-spans.coverage77
-rw-r--r--tests/coverage/branch/no-mir-spans.rs62
-rw-r--r--tests/coverage/mcdc/condition-limit.cov-map58
-rw-r--r--tests/coverage/mcdc/condition-limit.coverage55
-rw-r--r--tests/coverage/mcdc/condition-limit.rs17
-rw-r--r--tests/coverage/mcdc/if.cov-map223
-rw-r--r--tests/coverage/mcdc/if.coverage287
-rw-r--r--tests/coverage/mcdc/if.rs102
-rw-r--r--tests/coverage/mcdc/inlined_expressions.cov-map21
-rw-r--r--tests/coverage/mcdc/inlined_expressions.coverage40
-rw-r--r--tests/coverage/mcdc/inlined_expressions.rs16
-rw-r--r--tests/coverage/mcdc/nested_if.cov-map200
-rw-r--r--tests/coverage/mcdc/nested_if.coverage257
-rw-r--r--tests/coverage/mcdc/nested_if.rs69
-rw-r--r--tests/coverage/mcdc/non_control_flow.cov-map186
-rw-r--r--tests/coverage/mcdc/non_control_flow.coverage224
-rw-r--r--tests/coverage/mcdc/non_control_flow.rs71
-rw-r--r--tests/crashes/135528.rs20
-rw-r--r--tests/crashes/135646.rs7
-rw-r--r--tests/crashes/144293-indirect-ops-llvm.rs42
-rw-r--r--tests/debuginfo/associated-types.rs3
-rw-r--r--tests/debuginfo/auxiliary/cross_crate_spans.rs2
-rw-r--r--tests/debuginfo/basic-stepping.rs47
-rw-r--r--tests/debuginfo/basic-types-globals-metadata.rs3
-rw-r--r--tests/debuginfo/basic-types-globals.rs3
-rw-r--r--tests/debuginfo/basic-types-metadata.rs3
-rw-r--r--tests/debuginfo/basic-types-mut-globals.rs3
-rw-r--r--tests/debuginfo/basic-types.rs3
-rw-r--r--tests/debuginfo/borrowed-basic.rs3
-rw-r--r--tests/debuginfo/borrowed-c-style-enum.rs3
-rw-r--r--tests/debuginfo/borrowed-enum.rs3
-rw-r--r--tests/debuginfo/borrowed-struct.rs3
-rw-r--r--tests/debuginfo/borrowed-tuple.rs3
-rw-r--r--tests/debuginfo/borrowed-unique-basic.rs3
-rw-r--r--tests/debuginfo/box.rs3
-rw-r--r--tests/debuginfo/boxed-struct.rs3
-rw-r--r--tests/debuginfo/by-value-non-immediate-argument.rs4
-rw-r--r--tests/debuginfo/by-value-self-argument-in-trait-impl.rs4
-rw-r--r--tests/debuginfo/c-style-enum-in-composite.rs3
-rw-r--r--tests/debuginfo/c-style-enum.rs3
-rw-r--r--tests/debuginfo/closure-in-generic-function.rs4
-rw-r--r--tests/debuginfo/constant-debug-locs.rs3
-rw-r--r--tests/debuginfo/constant-in-match-pattern.rs3
-rw-r--r--tests/debuginfo/coroutine-locals.rs4
-rw-r--r--tests/debuginfo/coroutine-objects.rs4
-rw-r--r--tests/debuginfo/cross-crate-spans.rs8
-rw-r--r--tests/debuginfo/destructured-fn-argument.rs3
-rw-r--r--tests/debuginfo/destructured-for-loop-variable.rs3
-rw-r--r--tests/debuginfo/destructured-local.rs3
-rw-r--r--tests/debuginfo/enum-thinlto.rs3
-rw-r--r--tests/debuginfo/evec-in-struct.rs3
-rw-r--r--tests/debuginfo/extern-c-fn.rs4
-rw-r--r--tests/debuginfo/function-arg-initialization.rs3
-rw-r--r--tests/debuginfo/function-arguments.rs5
-rw-r--r--tests/debuginfo/function-names.rs3
-rw-r--r--tests/debuginfo/function-prologue-stepping-regular.rs3
-rw-r--r--tests/debuginfo/gdb-char.rs3
-rw-r--r--tests/debuginfo/generic-enum-with-different-disr-sizes.rs3
-rw-r--r--tests/debuginfo/generic-function.rs4
-rw-r--r--tests/debuginfo/generic-functions-nested.rs5
-rw-r--r--tests/debuginfo/generic-method-on-generic-struct.rs4
-rw-r--r--tests/debuginfo/generic-static-method-on-struct-and-enum.rs4
-rw-r--r--tests/debuginfo/generic-struct-style-enum.rs4
-rw-r--r--tests/debuginfo/generic-struct.rs4
-rw-r--r--tests/debuginfo/generic-tuple-style-enum.rs3
-rw-r--r--tests/debuginfo/include_string.rs3
-rw-r--r--tests/debuginfo/issue-12886.rs5
-rw-r--r--tests/debuginfo/issue-22656.rs3
-rw-r--r--tests/debuginfo/issue-57822.rs4
-rw-r--r--tests/debuginfo/lexical-scope-in-for-loop.rs4
-rw-r--r--tests/debuginfo/lexical-scope-in-if.rs4
-rw-r--r--tests/debuginfo/lexical-scope-in-match.rs4
-rw-r--r--tests/debuginfo/lexical-scope-in-stack-closure.rs4
-rw-r--r--tests/debuginfo/lexical-scope-in-unconditional-loop.rs4
-rw-r--r--tests/debuginfo/lexical-scope-in-unique-closure.rs4
-rw-r--r--tests/debuginfo/lexical-scope-in-while.rs4
-rw-r--r--tests/debuginfo/lexical-scope-with-macro.rs4
-rw-r--r--tests/debuginfo/lexical-scopes-in-block-expression.rs3
-rw-r--r--tests/debuginfo/limited-debuginfo.rs3
-rw-r--r--tests/debuginfo/method-on-enum.rs4
-rw-r--r--tests/debuginfo/method-on-generic-struct.rs4
-rw-r--r--tests/debuginfo/method-on-struct.rs4
-rw-r--r--tests/debuginfo/method-on-trait.rs4
-rw-r--r--tests/debuginfo/method-on-tuple-struct.rs4
-rw-r--r--tests/debuginfo/multi-cgu.rs4
-rw-r--r--tests/debuginfo/multiple-functions-equal-var-names.rs3
-rw-r--r--tests/debuginfo/multiple-functions.rs3
-rw-r--r--tests/debuginfo/name-shadowing-and-scope-nesting.rs4
-rw-r--r--tests/debuginfo/option-like-enum.rs4
-rw-r--r--tests/debuginfo/packed-struct-with-destructor.rs3
-rw-r--r--tests/debuginfo/packed-struct.rs3
-rw-r--r--tests/debuginfo/recursive-enum.rs3
-rw-r--r--tests/debuginfo/recursive-struct.rs3
-rw-r--r--tests/debuginfo/reference-debuginfo.rs3
-rw-r--r--tests/debuginfo/self-in-default-method.rs4
-rw-r--r--tests/debuginfo/self-in-generic-default-method.rs4
-rw-r--r--tests/debuginfo/shadowed-argument.rs4
-rw-r--r--tests/debuginfo/shadowed-variable.rs4
-rw-r--r--tests/debuginfo/simd.rs3
-rw-r--r--tests/debuginfo/simple-lexical-scope.rs4
-rw-r--r--tests/debuginfo/simple-struct.rs3
-rw-r--r--tests/debuginfo/simple-tuple.rs3
-rw-r--r--tests/debuginfo/static-method-on-struct-and-enum.rs4
-rw-r--r--tests/debuginfo/strings-and-strs.rs3
-rw-r--r--tests/debuginfo/struct-in-enum.rs3
-rw-r--r--tests/debuginfo/struct-in-struct.rs3
-rw-r--r--tests/debuginfo/struct-namespace.rs3
-rw-r--r--tests/debuginfo/struct-style-enum.rs3
-rw-r--r--tests/debuginfo/struct-with-destructor.rs3
-rw-r--r--tests/debuginfo/trait-pointers.rs3
-rw-r--r--tests/debuginfo/tuple-in-struct.rs3
-rw-r--r--tests/debuginfo/tuple-in-tuple.rs3
-rw-r--r--tests/debuginfo/tuple-struct.rs4
-rw-r--r--tests/debuginfo/tuple-style-enum.rs3
-rw-r--r--tests/debuginfo/type-names.rs3
-rw-r--r--tests/debuginfo/union-smoke.rs3
-rw-r--r--tests/debuginfo/unique-enum.rs3
-rw-r--r--tests/debuginfo/unreachable-locals.rs3
-rw-r--r--tests/debuginfo/unsized.rs4
-rw-r--r--tests/debuginfo/var-captured-in-nested-closure.rs3
-rw-r--r--tests/debuginfo/var-captured-in-sendable-closure.rs3
-rw-r--r--tests/debuginfo/var-captured-in-stack-closure.rs3
-rw-r--r--tests/debuginfo/vec-slices.rs3
-rw-r--r--tests/debuginfo/vec.rs3
-rw-r--r--tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir8
-rw-r--r--tests/mir-opt/building/custom/terminators.tail_call.built.after.mir2
-rw-r--r--tests/mir-opt/building/issue_101867.main.built.after.mir3
-rw-r--r--tests/mir-opt/building/user_type_annotations.let_else.built.after.mir11
-rw-r--r--tests/mir-opt/gvn.dereference_indexing.GVN.panic-abort.diff59
-rw-r--r--tests/mir-opt/gvn.dereference_indexing.GVN.panic-unwind.diff59
-rw-r--r--tests/mir-opt/gvn.rs22
-rw-r--r--tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff32
-rw-r--r--tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff32
-rw-r--r--tests/mir-opt/pre-codegen/derived_ord_debug.rs18
-rw-r--r--tests/mir-opt/pre-codegen/derived_ord_debug.{impl#0}-partial_cmp.PreCodegen.after.panic-abort.mir52
-rw-r--r--tests/mir-opt/pre-codegen/derived_ord_debug.{impl#0}-partial_cmp.PreCodegen.after.panic-unwind.mir52
-rw-r--r--tests/mir-opt/pre-codegen/derived_ord_debug.{impl#1}-cmp.PreCodegen.after.panic-abort.mir42
-rw-r--r--tests/mir-opt/pre-codegen/derived_ord_debug.{impl#1}-cmp.PreCodegen.after.panic-unwind.mir42
-rw-r--r--tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-abort.mir12
-rw-r--r--tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-unwind.mir12
-rw-r--r--tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-abort.mir12
-rw-r--r--tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-unwind.mir12
-rw-r--r--tests/mir-opt/pre-codegen/drop_boxed_slice.rs3
-rw-r--r--tests/mir-opt/pre-codegen/option_bubble_debug.option_direct.PreCodegen.after.panic-abort.mir37
-rw-r--r--tests/mir-opt/pre-codegen/option_bubble_debug.option_direct.PreCodegen.after.panic-unwind.mir37
-rw-r--r--tests/mir-opt/pre-codegen/option_bubble_debug.option_traits.PreCodegen.after.panic-abort.mir47
-rw-r--r--tests/mir-opt/pre-codegen/option_bubble_debug.option_traits.PreCodegen.after.panic-unwind.mir47
-rw-r--r--tests/mir-opt/pre-codegen/option_bubble_debug.rs29
-rw-r--r--tests/mir-opt/remove_unneeded_drop_in_place.rs17
-rw-r--r--tests/mir-opt/remove_unneeded_drop_in_place.slice_in_place.RemoveUnneededDrops.diff20
-rw-r--r--tests/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff15
-rw-r--r--tests/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.panic-abort.diff26
-rw-r--r--tests/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.panic-unwind.diff30
-rw-r--r--tests/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff15
-rw-r--r--tests/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.panic-abort.diff26
-rw-r--r--tests/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.panic-unwind.diff30
-rw-r--r--tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff15
-rw-r--r--tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.panic-abort.diff26
-rw-r--r--tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.panic-unwind.diff26
-rw-r--r--tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff15
-rw-r--r--tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.panic-abort.diff26
-rw-r--r--tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.panic-unwind.diff26
-rw-r--r--tests/mir-opt/remove_unneeded_drops.rs40
-rw-r--r--tests/mir-opt/tail_call_drops.f_with_arg.ElaborateDrops.panic-abort.diff2
-rw-r--r--tests/mir-opt/tail_call_drops.f_with_arg.ElaborateDrops.panic-unwind.diff2
-rw-r--r--tests/mir-opt/tail_call_drops.f_with_arg.built.after.panic-abort.mir2
-rw-r--r--tests/mir-opt/tail_call_drops.f_with_arg.built.after.panic-unwind.mir2
-rw-r--r--tests/run-make/atomic-lock-free/atomic_lock_free.rs39
-rw-r--r--tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr26
-rw-r--r--tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-enabled.stderr18
-rw-r--r--tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr28
-rw-r--r--tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-enabled.stderr20
-rw-r--r--tests/run-make/const-trait-stable-toolchain/const-super-trait.rs4
-rw-r--r--tests/run-make/libtest-json/output-default.json2
-rw-r--r--tests/run-make/libtest-json/output-stdout-success.json4
-rw-r--r--tests/run-make/libtest-json/rmake.rs1
-rw-r--r--tests/run-make/libtest-junit/output-default.xml2
-rw-r--r--tests/run-make/libtest-junit/output-stdout-success.xml2
-rw-r--r--tests/run-make/libtest-junit/rmake.rs1
-rw-r--r--tests/run-make/link-under-xcode/foo.rs1
-rw-r--r--tests/run-make/link-under-xcode/rmake.rs32
-rw-r--r--tests/run-make/msvc-wholearchive/rmake.rs6
-rw-r--r--tests/run-make/pgo-branch-weights/rmake.rs11
-rw-r--r--tests/run-make/pgo-indirect-call-promotion/rmake.rs13
-rw-r--r--tests/run-make/pgo-use/rmake.rs2
-rw-r--r--tests/run-make/raw-dylib-link-ordinal/exporter.def2
-rw-r--r--tests/run-make/raw-dylib-link-ordinal/rmake.rs3
-rw-r--r--tests/run-make/rustdoc-scrape-examples-paths/foo/Cargo.toml8
-rw-r--r--tests/run-make/rustdoc-scrape-examples-paths/foo/examples/complex.rs3
-rw-r--r--tests/run-make/rustdoc-scrape-examples-paths/foo/examples/tester.rs1
-rw-r--r--tests/run-make/rustdoc-scrape-examples-paths/foo/src/lib.rs7
-rw-r--r--tests/run-make/rustdoc-scrape-examples-paths/rmake.rs16
-rw-r--r--tests/run-make/wasm-panic-small/rmake.rs2
-rw-r--r--tests/run-make/x86_64-fortanix-unknown-sgx-lvi/rmake.rs43
-rw-r--r--tests/rustdoc-gui/notable-trait.goml4
-rw-r--r--tests/rustdoc-gui/src/test_docs/lib.rs14
-rw-r--r--tests/rustdoc-gui/tooltips.goml15
-rw-r--r--tests/rustdoc-js-std/core-transmute.js2
-rw-r--r--tests/rustdoc-js-std/transmute-fail.js2
-rw-r--r--tests/rustdoc-js-std/transmute.js2
-rw-r--r--tests/rustdoc-js/doc-alias-after-other-items.js38
-rw-r--r--tests/rustdoc-js/doc-alias-after-other-items.rs9
-rw-r--r--tests/rustdoc-js/sort-stability.js9
-rw-r--r--tests/rustdoc-js/sort-stability.rs16
-rw-r--r--tests/rustdoc-json/attrs/macro_export.rs40
-rw-r--r--tests/rustdoc-ui/disambiguator-endswith-named-suffix.rs30
-rw-r--r--tests/rustdoc-ui/disambiguator-endswith-named-suffix.stderr122
-rw-r--r--tests/rustdoc-ui/doctest/edition-2024-error-output.stdout2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-output.stdout2
-rw-r--r--tests/rustdoc-ui/doctest/stdout-and-stderr.stdout4
-rw-r--r--tests/rustdoc-ui/intra-doc/bad-intra-doc.rs15
-rw-r--r--tests/rustdoc-ui/intra-doc/bad-intra-doc.stderr31
-rw-r--r--tests/rustdoc-ui/intra-doc/github-flavored-admonitions.rs6
-rw-r--r--tests/rustdoc-ui/intra-doc/weird-syntax.rs2
-rw-r--r--tests/rustdoc-ui/intra-doc/weird-syntax.stderr10
-rw-r--r--tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs14
-rw-r--r--tests/rustdoc-ui/lints/redundant_explicit_links-utf8.stderr59
-rw-r--r--tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.stdout2
-rw-r--r--tests/rustdoc/attribute-rendering.rs6
-rw-r--r--tests/rustdoc/attributes-2021-edition.rs14
-rw-r--r--tests/rustdoc/attributes-re-export-2021-edition.rs13
-rw-r--r--tests/rustdoc/attributes-re-export.rs2
-rw-r--r--tests/rustdoc/attributes.rs13
-rw-r--r--tests/rustdoc/enum/enum-variant-value.rs22
-rw-r--r--tests/rustdoc/intra-doc/macro-caching-144965.rs35
-rw-r--r--tests/rustdoc/reexport/auxiliary/wrap-unnamable-type.rs12
-rw-r--r--tests/rustdoc/reexport/reexport-attrs.rs6
-rw-r--r--tests/rustdoc/reexport/wrapped-unnamble-type-143222.rs16
-rw-r--r--tests/ui-fulldeps/auxiliary/parser.rs3
-rw-r--r--tests/ui-fulldeps/pprust-expr-roundtrip.rs28
-rw-r--r--tests/ui/abi/extern-c-two-doubles-x86_64-5754.rs (renamed from tests/ui/issues/issue-5754.rs)2
-rw-r--r--tests/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr4
-rw-r--r--tests/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr4
-rw-r--r--tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr2
-rw-r--r--tests/ui/allocator/not-an-allocator.stderr8
-rw-r--r--tests/ui/allocator/two-allocators.stderr2
-rw-r--r--tests/ui/argument-suggestions/issue-100478.stderr16
-rw-r--r--tests/ui/array-slice-vec/fixed-size-arrays-zero-size-types-8898.rs (renamed from tests/ui/issues/issue-8898.rs)1
-rw-r--r--tests/ui/asm/loongarch/bad-reg.loongarch32_ilp32d.stderr38
-rw-r--r--tests/ui/asm/loongarch/bad-reg.loongarch32_ilp32s.stderr62
-rw-r--r--tests/ui/asm/loongarch/bad-reg.loongarch64_lp64d.stderr12
-rw-r--r--tests/ui/asm/loongarch/bad-reg.loongarch64_lp64s.stderr20
-rw-r--r--tests/ui/asm/loongarch/bad-reg.rs15
-rw-r--r--tests/ui/asm/s390x/bad-reg.rs2
-rw-r--r--tests/ui/associated-consts/constant-trait-item-reference-selection-26095.rs (renamed from tests/ui/issues/issue-26095.rs)2
-rw-r--r--tests/ui/associated-consts/trait-associated-const-usage-43483.rs (renamed from tests/ui/issues/issue-43483.rs)1
-rw-r--r--tests/ui/associated-types/recursive-associated-type-overflow-21946.rs (renamed from tests/ui/issues/issue-21946.rs)1
-rw-r--r--tests/ui/associated-types/recursive-associated-type-overflow-21946.stderr (renamed from tests/ui/issues/issue-21946.stderr)2
-rw-r--r--tests/ui/associated-types/unioned-keys-with-associated-type-23442.rs (renamed from tests/ui/issues/issue-23442.rs)1
-rw-r--r--tests/ui/async-await/async-closures/def-path.stderr4
-rw-r--r--tests/ui/async-await/drop-live-upvar-2.may_not_dangle.stderr18
-rw-r--r--tests/ui/async-await/drop-live-upvar-2.rs37
-rw-r--r--tests/ui/async-await/drop-live-upvar.rs23
-rw-r--r--tests/ui/async-await/drop-live-upvar.stderr22
-rw-r--r--tests/ui/async-await/higher-ranked-auto-trait-6.no_assumptions.stderr26
-rw-r--r--tests/ui/async-await/issue-70818.rs1
-rw-r--r--tests/ui/async-await/issue-70818.stderr23
-rw-r--r--tests/ui/async-await/issue-86507.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs2
-rw-r--r--tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs2
-rw-r--r--tests/ui/async-await/recursive-async-auto-trait-overflow.rs14
-rw-r--r--tests/ui/attributes/check-builtin-attr-ice.rs2
-rw-r--r--tests/ui/attributes/check-builtin-attr-ice.stderr24
-rw-r--r--tests/ui/attributes/cold-attribute-application-54044.rs (renamed from tests/ui/issues/issue-54044.rs)1
-rw-r--r--tests/ui/attributes/cold-attribute-application-54044.stderr (renamed from tests/ui/issues/issue-54044.stderr)6
-rw-r--r--tests/ui/attributes/crate-name-macro-call.stderr2
-rw-r--r--tests/ui/attributes/crate-type-delimited.stderr19
-rw-r--r--tests/ui/attributes/crate-type-empty.stderr15
-rw-r--r--tests/ui/attributes/crate-type-macro-call.stderr19
-rw-r--r--tests/ui/attributes/invalid-macro-use.rs4
-rw-r--r--tests/ui/attributes/invalid-macro-use.stderr26
-rw-r--r--tests/ui/attributes/invalid-reprs.stderr1
-rw-r--r--tests/ui/attributes/key-value-expansion-scope.rs12
-rw-r--r--tests/ui/attributes/key-value-expansion-scope.stderr88
-rw-r--r--tests/ui/attributes/lint_on_root.rs2
-rw-r--r--tests/ui/attributes/lint_on_root.stderr13
-rw-r--r--tests/ui/attributes/malformed-attrs.rs6
-rw-r--r--tests/ui/attributes/malformed-attrs.stderr448
-rw-r--r--tests/ui/attributes/malformed-reprs.stderr22
-rw-r--r--tests/ui/attributes/rustc_confusables_std_cases.stderr6
-rw-r--r--tests/ui/attributes/unsafe/proc-unsafe-attributes.stderr15
-rw-r--r--tests/ui/attributes/used_with_multi_args.stderr5
-rw-r--r--tests/ui/auto-traits/assoc-ty.current.stderr2
-rw-r--r--tests/ui/auto-traits/assoc-ty.next.stderr2
-rw-r--r--tests/ui/auto-traits/auto-trait-validation.fixed11
-rw-r--r--tests/ui/auto-traits/auto-trait-validation.rs15
-rw-r--r--tests/ui/auto-traits/auto-trait-validation.stderr65
-rw-r--r--tests/ui/auto-traits/bad-generics-on-dyn.stderr2
-rw-r--r--tests/ui/auto-traits/has-arguments.stderr2
-rw-r--r--tests/ui/auto-traits/issue-117789.stderr2
-rw-r--r--tests/ui/auto-traits/issue-23080-2.current.stderr2
-rw-r--r--tests/ui/auto-traits/issue-23080-2.next.stderr2
-rw-r--r--tests/ui/auto-traits/issue-23080.stderr11
-rw-r--r--tests/ui/auto-traits/issue-84075.stderr2
-rw-r--r--tests/ui/auto-traits/typeck-auto-trait-no-supertraits-2.stderr6
-rw-r--r--tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr4
-rw-r--r--tests/ui/autoref-autoderef/auto-deref-on-cow-regression-91489.rs (renamed from tests/ui/issues/issue-91489.rs)1
-rw-r--r--tests/ui/autoref-autoderef/autoderef-vec-box-fn-36786.rs (renamed from tests/ui/issues/issue-36786-resolve-call.rs)1
-rw-r--r--tests/ui/autoref-autoderef/deref-chain-method-calls-13264.rs (renamed from tests/ui/issues/issue-13264.rs)2
-rw-r--r--tests/ui/backtrace/synchronized-panic-handler.run.stderr4
-rw-r--r--tests/ui/binding/struct-destructuring-repeated-bindings-9725.rs (renamed from tests/ui/issues/issue-9725.rs)1
-rw-r--r--tests/ui/binding/struct-destructuring-repeated-bindings-9725.stderr (renamed from tests/ui/issues/issue-9725.stderr)4
-rw-r--r--tests/ui/block-result/blocks-without-results-11709.rs (renamed from tests/ui/issues/issue-11709.rs)2
-rw-r--r--tests/ui/borrowck/array-slice-coercion-mismatch-15783.rs (renamed from tests/ui/issues/issue-15783.rs)2
-rw-r--r--tests/ui/borrowck/array-slice-coercion-mismatch-15783.stderr (renamed from tests/ui/issues/issue-15783.stderr)4
-rw-r--r--tests/ui/borrowck/borrow-checker-lifetime-error-46471.rs (renamed from tests/ui/issues/issue-46471-1.rs)1
-rw-r--r--tests/ui/borrowck/borrow-checker-lifetime-error-46471.stderr (renamed from tests/ui/issues/issue-46471-1.stderr)2
-rw-r--r--tests/ui/borrowck/borrowck-in-static.stderr1
-rw-r--r--tests/ui/borrowck/borrowck-move-by-capture.stderr5
-rw-r--r--tests/ui/borrowck/issue-103624.stderr5
-rw-r--r--tests/ui/borrowck/issue-87456-point-to-closure.stderr5
-rw-r--r--tests/ui/borrowck/mismatched-pointer-type-in-self-7061.rs (renamed from tests/ui/issues/issue-7061.rs)1
-rw-r--r--tests/ui/borrowck/mismatched-pointer-type-in-self-7061.stderr (renamed from tests/ui/issues/issue-7061.stderr)2
-rw-r--r--tests/ui/borrowck/moved-value-in-thread-loop-12041.rs (renamed from tests/ui/issues/issue-12041.rs)2
-rw-r--r--tests/ui/borrowck/moved-value-in-thread-loop-12041.stderr (renamed from tests/ui/issues/issue-12041.stderr)2
-rw-r--r--tests/ui/borrowck/refcell-borrow-comparison-12033.rs (renamed from tests/ui/issues/issue-12033.rs)2
-rw-r--r--tests/ui/borrowck/region-checker-map-closure-13665.rs (renamed from tests/ui/issues/issue-13665.rs)1
-rw-r--r--tests/ui/borrowck/string-borrowing-pattern-matching-11869.rs (renamed from tests/ui/issues/issue-11869.rs)1
-rw-r--r--tests/ui/borrowck/string-literal-match-patterns-11869.rs18
-rw-r--r--tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr5
-rw-r--r--tests/ui/cast/array-field-ptr-cast-14845.rs (renamed from tests/ui/issues/issue-14845.rs)2
-rw-r--r--tests/ui/cast/array-field-ptr-cast-14845.stderr (renamed from tests/ui/issues/issue-14845.stderr)4
-rw-r--r--tests/ui/cast/constant-expression-cast-9942.rs (renamed from tests/ui/issues/issue-9942.rs)1
-rw-r--r--tests/ui/cast/trait-object-size-error-14366.rs (renamed from tests/ui/issues/issue-14366.rs)2
-rw-r--r--tests/ui/cast/trait-object-size-error-14366.stderr (renamed from tests/ui/issues/issue-14366.stderr)2
-rw-r--r--tests/ui/cast/u8-to-char-cast-9918.rs (renamed from tests/ui/issues/issue-9918.rs)1
-rw-r--r--tests/ui/cfg/both-true-false.stderr16
-rw-r--r--tests/ui/cfg/cfg-target-compact-errors.stderr8
-rw-r--r--tests/ui/cfg/cfg-version/syntax.stderr90
-rw-r--r--tests/ui/cfg/cmdline-false.stderr8
-rw-r--r--tests/ui/cfg/diagnostics-cross-crate.rs4
-rw-r--r--tests/ui/cfg/diagnostics-cross-crate.stderr34
-rw-r--r--tests/ui/cfg/diagnostics-reexport-2.stderr40
-rw-r--r--tests/ui/cfg/diagnostics-reexport.rs2
-rw-r--r--tests/ui/cfg/diagnostics-reexport.stderr28
-rw-r--r--tests/ui/cfg/diagnostics-same-crate.rs12
-rw-r--r--tests/ui/cfg/diagnostics-same-crate.stderr52
-rw-r--r--tests/ui/cfg/nested-cfg-attr-conditional-compilation.rs5
-rw-r--r--tests/ui/cfg/nested-cfg-attr-conditional-compilation.stderr8
-rw-r--r--tests/ui/check-cfg/cfg-crate-features.stderr2
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr2
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.feature.stderr2
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.full.stderr2
-rw-r--r--tests/ui/check-cfg/target_feature.stderr56
-rw-r--r--tests/ui/check-cfg/well-known-values.stderr8
-rw-r--r--tests/ui/closures/aliasability-violation-with-closure-21600.rs (renamed from tests/ui/issues/issue-21600.rs)1
-rw-r--r--tests/ui/closures/aliasability-violation-with-closure-21600.stderr (renamed from tests/ui/issues/issue-21600.stderr)4
-rw-r--r--tests/ui/closures/boxed-closure-lifetime-13808.rs (renamed from tests/ui/issues/issue-13808.rs)2
-rw-r--r--tests/ui/closures/closure-type-inference-in-context-9129.rs (renamed from tests/ui/issues/issue-9129.rs)1
-rw-r--r--tests/ui/closures/fnonce-moved-twice-12127.rs (renamed from tests/ui/issues/issue-12127.rs)2
-rw-r--r--tests/ui/closures/fnonce-moved-twice-12127.stderr (renamed from tests/ui/issues/issue-12127.stderr)6
-rw-r--r--tests/ui/closures/moved-upvar-mut-rebind-11958.rs (renamed from tests/ui/issues/issue-11958.rs)2
-rw-r--r--tests/ui/closures/moved-upvar-mut-rebind-11958.stderr (renamed from tests/ui/issues/issue-11958.stderr)4
-rw-r--r--tests/ui/closures/unused-closure-ice-16256.rs (renamed from tests/ui/issues/issue-16256.rs)2
-rw-r--r--tests/ui/closures/unused-closure-ice-16256.stderr (renamed from tests/ui/issues/issue-16256.stderr)2
-rw-r--r--tests/ui/codegen/llvm-miscompile-metadata-invalidation-36023.rs (renamed from tests/ui/issues/issue-36023.rs)1
-rw-r--r--tests/ui/codegen/nested-enum-match-optimization-15793.rs (renamed from tests/ui/issues/issue-15793.rs)2
-rw-r--r--tests/ui/codegen/overflow-during-mono.rs3
-rw-r--r--tests/ui/codegen/overflow-during-mono.stderr10
-rw-r--r--tests/ui/codegen/unsupported-static-initializer-in-const-array.rs18
-rw-r--r--tests/ui/coercion/any-trait-object-debug-12744.rs (renamed from tests/ui/issues/issue-12744.rs)2
-rw-r--r--tests/ui/coercion/method-return-trait-object-14399.rs (renamed from tests/ui/issues/issue-14399.rs)2
-rw-r--r--tests/ui/coercion/method-return-trait-object-14399.stderr (renamed from tests/ui/issues/issue-14399.stderr)2
-rw-r--r--tests/ui/coercion/trait-object-coercion-distribution-9951.rs (renamed from tests/ui/issues/issue-9951.rs)1
-rw-r--r--tests/ui/coercion/trait-object-coercion-distribution-9951.stderr (renamed from tests/ui/issues/issue-9951.stderr)2
-rw-r--r--tests/ui/coherence/coherence-tuple-conflict.stderr2
-rw-r--r--tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.rs (renamed from tests/ui/issues/issue-18058.rs)1
-rw-r--r--tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.stderr (renamed from tests/ui/issues/issue-18058.stderr)2
-rw-r--r--tests/ui/collections/hashset-connected-border-12860.rs (renamed from tests/ui/issues/issue-12860.rs)2
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-syntax-validation.rs5
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr28
-rw-r--r--tests/ui/conditional-compilation/test-cfg.rs4
-rw-r--r--tests/ui/conditional-compilation/test-cfg.stderr11
-rw-r--r--tests/ui/confuse-field-and-method/issue-18343.stderr2
-rw-r--r--tests/ui/confuse-field-and-method/issue-2392.stderr12
-rw-r--r--tests/ui/const-generics/defaults/default-on-impl.rs2
-rw-r--r--tests/ui/const-generics/defaults/default-on-impl.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-105257.rs6
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-105257.stderr4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-80742.rs2
-rw-r--r--tests/ui/const-generics/issues/issue-90318.rs1
-rw-r--r--tests/ui/const-generics/issues/issue-90318.stderr4
-rw-r--r--tests/ui/const-generics/min_const_generics/default_function_param.rs2
-rw-r--r--tests/ui/const-generics/min_const_generics/default_function_param.stderr2
-rw-r--r--tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.rs (renamed from tests/ui/issues/issue-77919.rs)1
-rw-r--r--tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.stderr (renamed from tests/ui/issues/issue-77919.stderr)6
-rw-r--r--tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs (renamed from tests/ui/issues/issue-98299.rs)1
-rw-r--r--tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr (renamed from tests/ui/issues/issue-98299.stderr)12
-rw-r--r--tests/ui/const-generics/vec-macro-in-static-array.rs (renamed from tests/ui/issues/issue-13446.rs)2
-rw-r--r--tests/ui/const-generics/vec-macro-in-static-array.stderr (renamed from tests/ui/issues/issue-13446.stderr)2
-rw-r--r--tests/ui/consts/const-eval/issue-85155.stderr2
-rw-r--r--tests/ui/consts/const-pattern-rewrite-error-32086.rs (renamed from tests/ui/issues/issue-32086.rs)1
-rw-r--r--tests/ui/consts/const-pattern-rewrite-error-32086.stderr (renamed from tests/ui/issues/issue-32086.stderr)4
-rw-r--r--tests/ui/consts/const-typeid-of-rpass.rs2
-rw-r--r--tests/ui/consts/const_cmp_type_id.rs2
-rw-r--r--tests/ui/consts/const_transmute_type_id.rs2
-rw-r--r--tests/ui/consts/const_transmute_type_id2.rs2
-rw-r--r--tests/ui/consts/const_transmute_type_id3.rs2
-rw-r--r--tests/ui/consts/const_transmute_type_id4.rs2
-rw-r--r--tests/ui/consts/const_transmute_type_id5.rs2
-rw-r--r--tests/ui/consts/issue-102117.rs2
-rw-r--r--tests/ui/consts/issue-102117.stderr4
-rw-r--r--tests/ui/consts/issue-19244-1.stderr2
-rw-r--r--tests/ui/consts/issue-73976-monomorphic.rs1
-rw-r--r--tests/ui/consts/issue-73976-polymorphic.rs1
-rw-r--r--tests/ui/consts/issue-73976-polymorphic.stderr4
-rw-r--r--tests/ui/consts/module-const-array-size-13763.rs (renamed from tests/ui/issues/issue-13763.rs)2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-drop.noopt.stderr2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-drop.opt.stderr2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.noopt.stderr2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.opt.stderr2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-move.noopt.stderr2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-move.opt.stderr2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-vtable.noopt.stderr2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-vtable.opt.stderr2
-rw-r--r--tests/ui/coroutine/clone-impl-async.rs6
-rw-r--r--tests/ui/coroutine/clone-impl-async.stderr132
-rw-r--r--tests/ui/coroutine/clone-impl-static.stderr12
-rw-r--r--tests/ui/coroutine/clone-impl.rs1
-rw-r--r--tests/ui/coroutine/clone-impl.stderr88
-rw-r--r--tests/ui/coroutine/print/coroutine-print-verbose-2.stderr4
-rw-r--r--tests/ui/coroutine/print/coroutine-print-verbose-3.stderr2
-rw-r--r--tests/ui/coroutine/ref-upvar-not-send.stderr14
-rw-r--r--tests/ui/cross-crate/auxiliary/aux-5521.rs (renamed from tests/ui/issues/auxiliary/issue-5521.rs)0
-rw-r--r--tests/ui/cross-crate/auxiliary/aux-9155.rs (renamed from tests/ui/issues/auxiliary/issue-9155.rs)0
-rw-r--r--tests/ui/cross-crate/auxiliary/aux-9906.rs (renamed from tests/ui/issues/auxiliary/issue-9906.rs)0
-rw-r--r--tests/ui/cross-crate/cross-crate-map-usage-5521.rs (renamed from tests/ui/issues/issue-5521.rs)7
-rw-r--r--tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs11
-rw-r--r--tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs10
-rw-r--r--tests/ui/custom_test_frameworks/mismatch.stderr2
-rw-r--r--tests/ui/delegation/correct_body_owner_parent_found_in_diagnostics.stderr2
-rw-r--r--tests/ui/deprecation/deprecation-sanity.stderr48
-rw-r--r--tests/ui/deref/dereferenceable-type-behavior-22992.rs (renamed from tests/ui/issues/issue-22992.rs)2
-rw-r--r--tests/ui/derives/derive-partial-ord-discriminant-64bit.rs (renamed from tests/ui/issues/issue-15523-big.rs)3
-rw-r--r--tests/ui/derives/derive-partial-ord-discriminant.rs (renamed from tests/ui/issues/issue-15523.rs)2
-rw-r--r--tests/ui/diagnostic-width/long-E0609.stderr1
-rw-r--r--tests/ui/did_you_mean/typo-suggestion-improvement-46332.rs (renamed from tests/ui/issues/issue-46332.rs)1
-rw-r--r--tests/ui/did_you_mean/typo-suggestion-improvement-46332.stderr (renamed from tests/ui/issues/issue-46332.stderr)2
-rw-r--r--tests/ui/dist/cranelift-x86_64-unknown-linux-gnu-dist.rs11
-rw-r--r--tests/ui/drop/destructor-run-for-expression-4734.rs (renamed from tests/ui/issues/issue-4734.rs)1
-rw-r--r--tests/ui/drop/destructor-run-for-let-ignore-6892.rs (renamed from tests/ui/issues/issue-6892.rs)1
-rw-r--r--tests/ui/drop/drop-count-assertion-16151.rs (renamed from tests/ui/issues/issue-16151.rs)1
-rw-r--r--tests/ui/drop/dropck-normalize-errors.nll.stderr (renamed from tests/ui/drop/dropck-normalize-errors.stderr)24
-rw-r--r--tests/ui/drop/dropck-normalize-errors.polonius.stderr64
-rw-r--r--tests/ui/drop/dropck-normalize-errors.rs6
-rw-r--r--tests/ui/drop/enum-drop-impl-15063.rs (renamed from tests/ui/issues/issue-15063.rs)2
-rw-r--r--tests/ui/drop/generic-drop-trait-bound-15858.rs (renamed from tests/ui/issues/issue-15858.rs)2
-rw-r--r--tests/ui/drop/generic-drop-trait-bound-15858.stderr (renamed from tests/ui/issues/issue-15858.stderr)2
-rw-r--r--tests/ui/drop/if-let-guards.rs88
-rw-r--r--tests/ui/drop/multiple-drop-safe-code-25549.rs (renamed from tests/ui/issues/issue-25549-multiple-drop.rs)1
-rw-r--r--tests/ui/drop/nested-return-drop-order.rs (renamed from tests/ui/issues/issue-15763.rs)2
-rw-r--r--tests/ui/drop/or-pattern-drop-order.rs53
-rw-r--r--tests/ui/drop/panic-during-drop-14875.rs (renamed from tests/ui/issues/issue-14875.rs)2
-rw-r--r--tests/ui/drop/same-alloca-reassigned-match-binding-16151.rs34
-rw-r--r--tests/ui/drop/static-variable-with-drop-trait-9243.rs (renamed from tests/ui/issues/issue-9243.rs)1
-rw-r--r--tests/ui/drop/struct-field-drop-order.rs (renamed from tests/ui/issues/issue-16492.rs)2
-rw-r--r--tests/ui/dropck/dropck_no_diverge_on_nonregular_1.rs1
-rw-r--r--tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr6
-rw-r--r--tests/ui/dropck/eager-by-ref-binding-for-guards.rs4
-rw-r--r--tests/ui/dropck/eager-by-ref-binding-for-guards.stderr16
-rw-r--r--tests/ui/dropck/let-else-more-permissive.rs7
-rw-r--r--tests/ui/dropck/let-else-more-permissive.stderr20
-rw-r--r--tests/ui/dyn-compatibility/dyn-compatible-trait-implementation-20939.rs (renamed from tests/ui/issues/issue-20939.rs)1
-rw-r--r--tests/ui/dyn-compatibility/dyn-compatible-trait-implementation-20939.stderr (renamed from tests/ui/issues/issue-20939.stderr)2
-rw-r--r--tests/ui/editions/edition-specific-identifier-shadowing-53333.rs (renamed from tests/ui/issues/issue-53333.rs)1
-rw-r--r--tests/ui/editions/never-type-fallback-breaking.e2024.stderr8
-rw-r--r--tests/ui/enum-discriminant/enum-discriminant-const-eval-truncation-9837.rs (renamed from tests/ui/issues/issue-9837.rs)1
-rw-r--r--tests/ui/enum/single-variant-enum-deref-error-9814.rs (renamed from tests/ui/issues/issue-9814.rs)1
-rw-r--r--tests/ui/enum/single-variant-enum-deref-error-9814.stderr (renamed from tests/ui/issues/issue-9814.stderr)2
-rw-r--r--tests/ui/enum/zero-variant-enum-pattern-matching-3037.rs (renamed from tests/ui/issues/issue-3037.rs)1
-rw-r--r--tests/ui/error-codes/E0197.stderr2
-rw-r--r--tests/ui/error-codes/E0275.rs1
-rw-r--r--tests/ui/error-codes/E0275.stderr8
-rw-r--r--tests/ui/error-codes/E0423.stderr2
-rw-r--r--tests/ui/error-codes/E0540.stderr7
-rw-r--r--tests/ui/error-codes/E0565-1.stderr8
-rw-r--r--tests/ui/error-codes/ex-E0612.stderr6
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_ref.fixed26
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_ref.rs26
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_ref.stderr38
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_weird.rs29
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_weird.stderr26
-rw-r--r--tests/ui/explicit-tail-calls/drop-order.rs2
-rw-r--r--tests/ui/explicit-tail-calls/higher-ranked-arg.rs13
-rw-r--r--tests/ui/explicit-tail-calls/indexer.rs22
-rw-r--r--tests/ui/explicit-tail-calls/infinite-recursion-in-ctfe.rs10
-rw-r--r--tests/ui/explicit-tail-calls/infinite-recursion-in-ctfe.stderr17
-rw-r--r--tests/ui/explicit-tail-calls/intrinsics.rs13
-rw-r--r--tests/ui/explicit-tail-calls/intrinsics.stderr14
-rw-r--r--tests/ui/explicit-tail-calls/ret-ty-borrowck-constraints.rs16
-rw-r--r--tests/ui/explicit-tail-calls/ret-ty-borrowck-constraints.stderr10
-rw-r--r--tests/ui/extern/empty-struct-extern-fn-16441.rs (renamed from tests/ui/issues/issue-16441.rs)2
-rw-r--r--tests/ui/extern/extern-types-field-offset.run.stderr2
-rw-r--r--tests/ui/extern/extern-types-size_of_val.align.run.stderr2
-rw-r--r--tests/ui/extern/extern-types-size_of_val.size.run.stderr2
-rw-r--r--tests/ui/extern/issue-47725.rs1
-rw-r--r--tests/ui/extern/issue-47725.stderr2
-rw-r--r--tests/ui/extern/issue-80074.rs2
-rw-r--r--tests/ui/extern/issue-80074.stderr17
-rw-r--r--tests/ui/extern/windows-tcb-trash-13259.rs49
-rw-r--r--tests/ui/feature-gates/feature-gate-macro-attr.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-macro-attr.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr12
-rw-r--r--tests/ui/feature-gates/feature-gate-optimize_attribute.stderr17
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr13
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs5
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr336
-rw-r--r--tests/ui/fn/anonymous-parameters-trait-13105.rs (renamed from tests/ui/issues/issue-13105.rs)2
-rw-r--r--tests/ui/fn/fn-arg-count-mismatch-diagnostics.rs12
-rw-r--r--tests/ui/fn/fn-arg-count-mismatch-diagnostics.stderr28
-rw-r--r--tests/ui/fn/fn-traits-call-once-signature-15094.rs (renamed from tests/ui/issues/issue-15094.rs)2
-rw-r--r--tests/ui/fn/fn-traits-call-once-signature-15094.stderr (renamed from tests/ui/issues/issue-15094.stderr)2
-rw-r--r--tests/ui/fn_traits/closure-trait-impl-14959.rs (renamed from tests/ui/issues/issue-14959.rs)2
-rw-r--r--tests/ui/generic-associated-types/type-param-defaults.rs6
-rw-r--r--tests/ui/generic-associated-types/type-param-defaults.stderr6
-rw-r--r--tests/ui/generic-const-items/parameter-defaults.rs16
-rw-r--r--tests/ui/generic-const-items/parameter-defaults.stderr31
-rw-r--r--tests/ui/generics/box-missing-generics-14092.rs (renamed from tests/ui/issues/issue-14092.rs)2
-rw-r--r--tests/ui/generics/box-missing-generics-14092.stderr (renamed from tests/ui/issues/issue-14092.stderr)2
-rw-r--r--tests/ui/generics/generic-extern.rs10
-rw-r--r--tests/ui/generics/generic-extern.stderr23
-rw-r--r--tests/ui/generics/invalid-type-param-default.rs22
-rw-r--r--tests/ui/generics/invalid-type-param-default.stderr70
-rw-r--r--tests/ui/generics/overlapping-errors-span-issue-123861.rs2
-rw-r--r--tests/ui/generics/overlapping-errors-span-issue-123861.stderr4
-rw-r--r--tests/ui/generics/unnecessary-path-disambiguator-36116.rs (renamed from tests/ui/issues/issue-36116.rs)1
-rw-r--r--tests/ui/generics/unused-type-parameter-regression-36075.rs (renamed from tests/ui/issues/issue-36075.rs)1
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.rs2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.stderr16
-rw-r--r--tests/ui/hygiene/panic-location.run.stderr2
-rw-r--r--tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak2.rs1
-rw-r--r--tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak2.stderr16
-rw-r--r--tests/ui/impl-trait/issues/issue-55872-2.rs1
-rw-r--r--tests/ui/impl-trait/issues/issue-55872-2.stderr10
-rw-r--r--tests/ui/impl-trait/issues/issue-55872-3.rs1
-rw-r--r--tests/ui/impl-trait/issues/issue-55872-3.stderr17
-rw-r--r--tests/ui/impl-trait/issues/type-error-post-normalization-test.rs24
-rw-r--r--tests/ui/impl-trait/issues/type-error-post-normalization-test.stderr14
-rw-r--r--tests/ui/impl-trait/member-constraints/apply_member_constraint-no-req-eq.rs24
-rw-r--r--tests/ui/impl-trait/member-constraints/incomplete-constraint.rs21
-rw-r--r--tests/ui/impl-trait/member-constraints/min-choice-reject-ambiguous.rs (renamed from tests/ui/nll/member-constraints/min-choice-reject-ambiguous.rs)0
-rw-r--r--tests/ui/impl-trait/member-constraints/min-choice-reject-ambiguous.stderr (renamed from tests/ui/nll/member-constraints/min-choice-reject-ambiguous.stderr)0
-rw-r--r--tests/ui/impl-trait/member-constraints/min-choice.rs (renamed from tests/ui/nll/member-constraints/min-choice.rs)0
-rw-r--r--tests/ui/impl-trait/member-constraints/nested-impl-trait-fail.rs (renamed from tests/ui/nll/member-constraints/nested-impl-trait-fail.rs)0
-rw-r--r--tests/ui/impl-trait/member-constraints/nested-impl-trait-fail.stderr (renamed from tests/ui/nll/member-constraints/nested-impl-trait-fail.stderr)0
-rw-r--r--tests/ui/impl-trait/member-constraints/nested-impl-trait-pass.rs (renamed from tests/ui/nll/member-constraints/nested-impl-trait-pass.rs)5
-rw-r--r--tests/ui/impl-trait/member-constraints/reject-choice-due-to-prev-constraint.rs34
-rw-r--r--tests/ui/impl-trait/no-anonymize-regions.rs18
-rw-r--r--tests/ui/impl-trait/where-allowed.rs12
-rw-r--r--tests/ui/impl-trait/where-allowed.stderr55
-rw-r--r--tests/ui/imports/auxiliary/aux-9968.rs (renamed from tests/ui/issues/auxiliary/issue-9968.rs)0
-rw-r--r--tests/ui/imports/enum-variant-import-path-15774.rs (renamed from tests/ui/issues/issue-15774.rs)2
-rw-r--r--tests/ui/imports/local-modularized-tricky-fail-2.stderr44
-rw-r--r--tests/ui/imports/pub-use-link-errors-9968.rs12
-rw-r--r--tests/ui/inference/collection-type-copy-behavior-12909.rs (renamed from tests/ui/issues/issue-12909.rs)1
-rw-r--r--tests/ui/inference/iterator-sum-array-15673.rs11
-rw-r--r--tests/ui/inference/matcher-lifetime-inference-14919.rs (renamed from tests/ui/issues/issue-14919.rs)2
-rw-r--r--tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.rs1
-rw-r--r--tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.stderr6
-rw-r--r--tests/ui/inference/return-block-type-inference-15965.rs (renamed from tests/ui/issues/issue-15965.rs)2
-rw-r--r--tests/ui/inference/return-block-type-inference-15965.stderr (renamed from tests/ui/issues/issue-15965.stderr)2
-rw-r--r--tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs3
-rw-r--r--tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr28
-rw-r--r--tests/ui/infinite/infinite-instantiation.rs1
-rw-r--r--tests/ui/infinite/infinite-instantiation.stderr9
-rw-r--r--tests/ui/infinite/issue-41731-infinite-macro-print.rs2
-rw-r--r--tests/ui/infinite/issue-41731-infinite-macro-print.stderr6
-rw-r--r--tests/ui/infinite/issue-41731-infinite-macro-println.rs2
-rw-r--r--tests/ui/infinite/issue-41731-infinite-macro-println.stderr6
-rw-r--r--tests/ui/instrument-coverage/coverage-options.bad.stderr2
-rw-r--r--tests/ui/instrument-coverage/coverage-options.rs5
-rw-r--r--tests/ui/instrument-coverage/mcdc-condition-limit.rs22
-rw-r--r--tests/ui/interior-mutability/interior-mutability.rs1
-rw-r--r--tests/ui/interior-mutability/interior-mutability.stderr4
-rw-r--r--tests/ui/intrinsics/bad-intrinsic-monomorphization.stderr16
-rw-r--r--tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr2
-rw-r--r--tests/ui/intrinsics/const-eval-select-backtrace.run.stderr2
-rw-r--r--tests/ui/intrinsics/intrinsic-atomics.rs12
-rw-r--r--tests/ui/intrinsics/non-integer-atomic.rs32
-rw-r--r--tests/ui/intrinsics/non-integer-atomic.stderr92
-rw-r--r--tests/ui/intrinsics/not-overridden.rs2
-rw-r--r--tests/ui/invalid-compile-flags/print-crate-name-request-malformed-crate-name.stderr2
-rw-r--r--tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name-1.stderr2
-rw-r--r--tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name-2.stderr2
-rw-r--r--tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name.stderr2
-rw-r--r--tests/ui/invalid/invalid-inline.stderr13
-rw-r--r--tests/ui/issues/auxiliary/issue-25185-2.rs3
-rw-r--r--tests/ui/issues/issue-13259-windows-tcb-trash.rs39
-rw-r--r--tests/ui/issues/issue-14091-2.rs17
-rw-r--r--tests/ui/issues/issue-14091-2.stderr17
-rw-r--r--tests/ui/issues/issue-14091.rs4
-rw-r--r--tests/ui/issues/issue-14091.stderr9
-rw-r--r--tests/ui/issues/issue-14330.rs6
-rw-r--r--tests/ui/issues/issue-25185.rs12
-rw-r--r--tests/ui/issues/issue-26812.rs6
-rw-r--r--tests/ui/issues/issue-26812.stderr30
-rw-r--r--tests/ui/issues/issue-32655.rs19
-rw-r--r--tests/ui/issues/issue-32655.stderr25
-rw-r--r--tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs1
-rw-r--r--tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr9
-rw-r--r--tests/ui/issues/issue-41880.stderr2
-rw-r--r--tests/ui/issues/issue-4335.stderr1
-rw-r--r--tests/ui/issues/issue-43988.stderr50
-rw-r--r--tests/ui/issues/issue-8727.rs1
-rw-r--r--tests/ui/issues/issue-8727.stderr11
-rw-r--r--tests/ui/issues/issue-87707.run.stderr4
-rw-r--r--tests/ui/issues/issue-9155.rs11
-rw-r--r--tests/ui/issues/issue-9188.rs11
-rw-r--r--tests/ui/issues/issue-9906.rs10
-rw-r--r--tests/ui/issues/issue-9968.rs12
-rw-r--r--tests/ui/iterators/bytes-iterator-clone-12677.rs (renamed from tests/ui/issues/issue-12677.rs)2
-rw-r--r--tests/ui/iterators/explicit-deref-non-deref-type-15756.rs (renamed from tests/ui/issues/issue-15756.rs)2
-rw-r--r--tests/ui/iterators/explicit-deref-non-deref-type-15756.stderr (renamed from tests/ui/issues/issue-15756.stderr)2
-rw-r--r--tests/ui/iterators/fold-iterator-error-23966.rs (renamed from tests/ui/issues/issue-23966.rs)1
-rw-r--r--tests/ui/iterators/fold-iterator-error-23966.stderr (renamed from tests/ui/issues/issue-23966.stderr)2
-rw-r--r--tests/ui/iterators/for-loop-over-mut-iterator-21655.rs (renamed from tests/ui/issues/issue-21655.rs)1
-rw-r--r--tests/ui/iterators/iterator-type-inference-sum-15673.rs (renamed from tests/ui/issues/issue-15673.rs)1
-rw-r--r--tests/ui/layout/valid_range_oob.rs2
-rw-r--r--tests/ui/lifetimes/explicit-lifetime-required-14285.rs (renamed from tests/ui/issues/issue-14285.rs)2
-rw-r--r--tests/ui/lifetimes/explicit-lifetime-required-14285.stderr (renamed from tests/ui/issues/issue-14285.stderr)2
-rw-r--r--tests/ui/lifetimes/iterator-trait-lifetime-error-13058.rs (renamed from tests/ui/issues/issue-13058.rs)2
-rw-r--r--tests/ui/lifetimes/iterator-trait-lifetime-error-13058.stderr (renamed from tests/ui/issues/issue-13058.stderr)2
-rw-r--r--tests/ui/lifetimes/lifetime-bound-whitespace-13703.rs (renamed from tests/ui/issues/issue-13703.rs)2
-rw-r--r--tests/ui/lifetimes/lifetime-inference-destructuring-arg.rs (renamed from tests/ui/issues/issue-13167.rs)2
-rw-r--r--tests/ui/lifetimes/lifetime-inference-miss-15735.rs (renamed from tests/ui/issues/issue-15735.rs)1
-rw-r--r--tests/ui/lifetimes/matcher-trait-equality-13323.rs (renamed from tests/ui/issues/issue-13323.rs)2
-rw-r--r--tests/ui/lifetimes/missing-lifetime-specifier-13497.rs (renamed from tests/ui/issues/issue-13497.rs)2
-rw-r--r--tests/ui/lifetimes/missing-lifetime-specifier-13497.stderr (renamed from tests/ui/issues/issue-13497.stderr)2
-rw-r--r--tests/ui/lifetimes/nondeterministic-lifetime-errors-15034.rs (renamed from tests/ui/issues/issue-15034.rs)2
-rw-r--r--tests/ui/lifetimes/nondeterministic-lifetime-errors-15034.stderr (renamed from tests/ui/issues/issue-15034.stderr)2
-rw-r--r--tests/ui/lifetimes/reader-wrapper-trait-14901.rs (renamed from tests/ui/issues/issue-14901.rs)2
-rw-r--r--tests/ui/lifetimes/ref-pattern-lifetime-annotation-13665.rs16
-rw-r--r--tests/ui/lifetimes/return-reference-local-variable-13497.rs (renamed from tests/ui/issues/issue-13497-2.rs)6
-rw-r--r--tests/ui/lifetimes/return-reference-local-variable-13497.stderr (renamed from tests/ui/issues/issue-13497-2.stderr)8
-rw-r--r--tests/ui/lifetimes/struct-lifetime-field-assignment-13405.rs (renamed from tests/ui/issues/issue-13405.rs)2
-rw-r--r--tests/ui/lifetimes/struct-lifetime-inference-15735.rs19
-rw-r--r--tests/ui/lifetimes/struct-with-lifetime-parameters-9259.rs (renamed from tests/ui/issues/issue-9259.rs)1
-rw-r--r--tests/ui/lifetimes/trait-object-constructor-14821.rs (renamed from tests/ui/issues/issue-14821.rs)2
-rw-r--r--tests/ui/lifetimes/unsafe-transmute-in-find-11740.rs (renamed from tests/ui/issues/issue-11740.rs)2
-rw-r--r--tests/ui/lifetimes/unusual-rib-combinations.rs2
-rw-r--r--tests/ui/lifetimes/unusual-rib-combinations.stderr4
-rw-r--r--tests/ui/limits/type-length-limit-enforcement.rs2
-rw-r--r--tests/ui/limits/type-length-limit-enforcement.stderr5
-rw-r--r--tests/ui/link-native-libs/link-attr-validation-early.rs4
-rw-r--r--tests/ui/link-native-libs/link-attr-validation-early.stderr30
-rw-r--r--tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs26
-rw-r--r--tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.stderr8
-rw-r--r--tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs26
-rw-r--r--tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr8
-rw-r--r--tests/ui/linkage-attr/propagate-generic-issue-18804/main.rs1
-rw-r--r--tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.stderr4
-rw-r--r--tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.rs2
-rw-r--r--tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.stderr6
-rw-r--r--tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.rs2
-rw-r--r--tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.stderr6
-rw-r--r--tests/ui/linking/auxiliary/aux-25185-1.rs (renamed from tests/ui/issues/auxiliary/issue-25185-1.rs)0
-rw-r--r--tests/ui/linking/auxiliary/aux-25185-2.rs3
-rw-r--r--tests/ui/linking/rlib-to-dylib-native-deps-inclusion-25185.rs13
-rw-r--r--tests/ui/lint/dangling-pointers-from-locals.rs188
-rw-r--r--tests/ui/lint/dangling-pointers-from-locals.stderr247
-rw-r--r--tests/ui/lint/dead-code/self-assign.rs17
-rw-r--r--tests/ui/lint/dead-code/self-assign.stderr44
-rw-r--r--tests/ui/lint/lint-malformed.stderr15
-rw-r--r--tests/ui/lint/lint-non-uppercase-usages.stderr2
-rw-r--r--tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs5
-rw-r--r--tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr18
-rw-r--r--tests/ui/lint/unused-results-lint-triggered-by-derive-debug-29710.rs (renamed from tests/ui/issues/issue-29710.rs)1
-rw-r--r--tests/ui/lint/unused/unused-attr-duplicate.stderr26
-rw-r--r--tests/ui/lint/unused/unused_attributes-must_use.fixed139
-rw-r--r--tests/ui/lint/unused/unused_attributes-must_use.rs3
-rw-r--r--tests/ui/lint/unused/unused_attributes-must_use.stderr64
-rw-r--r--tests/ui/loop-match/const-continue-to-block.rs21
-rw-r--r--tests/ui/loop-match/const-continue-to-block.stderr17
-rw-r--r--tests/ui/loop-match/invalid.rs19
-rw-r--r--tests/ui/loop-match/invalid.stderr22
-rw-r--r--tests/ui/loops/infinite-loop-simplify-cfg-75704.rs (renamed from tests/ui/issues/issue-75704.rs)1
-rw-r--r--tests/ui/loops/loop-with-label-9047.rs (renamed from tests/ui/issues/issue-9047.rs)1
-rw-r--r--tests/ui/macros/assert-long-condition.run.stderr2
-rw-r--r--tests/ui/macros/builtin-std-paths-fail.stderr4
-rw-r--r--tests/ui/macros/for-loop-macro-rules-hygiene.rs (renamed from tests/ui/issues/issue-15189.rs)2
-rw-r--r--tests/ui/macros/invalid-assignment-in-macro-26093.rs (renamed from tests/ui/issues/issue-26093.rs)1
-rw-r--r--tests/ui/macros/invalid-assignment-in-macro-26093.stderr (renamed from tests/ui/issues/issue-26093.stderr)4
-rw-r--r--tests/ui/macros/issue-111749.stderr11
-rw-r--r--tests/ui/macros/lint-trailing-macro-call.rs4
-rw-r--r--tests/ui/macros/lint-trailing-macro-call.stderr18
-rw-r--r--tests/ui/macros/macro-context.rs2
-rw-r--r--tests/ui/macros/macro-context.stderr14
-rw-r--r--tests/ui/macros/macro-expansion-module-structure-9110.rs (renamed from tests/ui/issues/issue-9110.rs)1
-rw-r--r--tests/ui/macros/macro-hygiene-scope-15167.rs (renamed from tests/ui/issues/issue-15167.rs)2
-rw-r--r--tests/ui/macros/macro-hygiene-scope-15167.stderr (renamed from tests/ui/issues/issue-15167.stderr)8
-rw-r--r--tests/ui/macros/macro-in-expression-context.fixed4
-rw-r--r--tests/ui/macros/macro-in-expression-context.rs4
-rw-r--r--tests/ui/macros/macro-in-expression-context.stderr14
-rw-r--r--tests/ui/macros/macro-inner-attributes.stderr7
-rw-r--r--tests/ui/macros/macro-invocation-with-variable-in-scope-9737.rs (renamed from tests/ui/issues/issue-9737.rs)1
-rw-r--r--tests/ui/macros/macro-outer-attributes.stderr7
-rw-r--r--tests/ui/macros/macro-rules-as-derive-or-attr-issue-132928.stderr2
-rw-r--r--tests/ui/macros/macro-rules-attr-error.rs15
-rw-r--r--tests/ui/macros/macro-rules-attr-error.stderr22
-rw-r--r--tests/ui/macros/macro-rules-attr-infinite-recursion.rs12
-rw-r--r--tests/ui/macros/macro-rules-attr-infinite-recursion.stderr14
-rw-r--r--tests/ui/macros/macro-rules-attr-nested.rs24
-rw-r--r--tests/ui/macros/macro-rules-attr-nested.run.stdout3
-rw-r--r--tests/ui/macros/macro-rules-attr.rs90
-rw-r--r--tests/ui/macros/macro-rules-attr.run.stdout15
-rw-r--r--tests/ui/macros/macro-rules-attr.stderr21
-rw-r--r--tests/ui/macros/macro-use-bad-args-1.stderr1
-rw-r--r--tests/ui/macros/macro-use-bad-args-2.stderr1
-rw-r--r--tests/ui/macros/private-struct-member-macro-access-25386.rs (renamed from tests/ui/issues/issue-25386.rs)1
-rw-r--r--tests/ui/macros/private-struct-member-macro-access-25386.stderr (renamed from tests/ui/issues/issue-25386.stderr)2
-rw-r--r--tests/ui/malformed/malformed-regressions.rs4
-rw-r--r--tests/ui/malformed/malformed-regressions.stderr69
-rw-r--r--tests/ui/match/guard-pattern-ordering-14865.rs (renamed from tests/ui/issues/issue-14865.rs)2
-rw-r--r--tests/ui/match/multiple-refutable-patterns-13867.rs (renamed from tests/ui/issues/issue-13867.rs)2
-rw-r--r--tests/ui/match/option-result-mismatch-11844.rs (renamed from tests/ui/issues/issue-11844.rs)2
-rw-r--r--tests/ui/match/option-result-mismatch-11844.stderr (renamed from tests/ui/issues/issue-11844.stderr)2
-rw-r--r--tests/ui/match/option-result-type-param-mismatch-13466.rs (renamed from tests/ui/issues/issue-13466.rs)2
-rw-r--r--tests/ui/match/option-result-type-param-mismatch-13466.stderr (renamed from tests/ui/issues/issue-13466.stderr)4
-rw-r--r--tests/ui/match/overeager-sub-match-pruning-13027.rs (renamed from tests/ui/issues/issue-13027.rs)2
-rw-r--r--tests/ui/match/slice-move-out-error-12567.rs (renamed from tests/ui/issues/issue-12567.rs)2
-rw-r--r--tests/ui/match/slice-move-out-error-12567.stderr (renamed from tests/ui/issues/issue-12567.stderr)4
-rw-r--r--tests/ui/match/struct-reference-patterns-12285.rs (renamed from tests/ui/issues/issue-12285.rs)2
-rw-r--r--tests/ui/match/tuple-usize-pattern-14393.rs (renamed from tests/ui/issues/issue-14393.rs)2
-rw-r--r--tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.fixed (renamed from tests/ui/issues/issue-19100.fixed)1
-rw-r--r--tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.rs (renamed from tests/ui/issues/issue-19100.rs)1
-rw-r--r--tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.stderr (renamed from tests/ui/issues/issue-19100.stderr)4
-rw-r--r--tests/ui/methods/call_method_unknown_referent.rs2
-rw-r--r--tests/ui/methods/call_method_unknown_referent.stderr2
-rw-r--r--tests/ui/methods/inherent-bound-in-probe.rs1
-rw-r--r--tests/ui/methods/inherent-bound-in-probe.stderr12
-rw-r--r--tests/ui/methods/issues/issue-105732.stderr2
-rw-r--r--tests/ui/methods/method-not-found-generic-arg-elision.stderr8
-rw-r--r--tests/ui/methods/probe-error-on-infinite-deref.rs1
-rw-r--r--tests/ui/methods/probe-error-on-infinite-deref.stderr8
-rw-r--r--tests/ui/methods/trait-method-resolution-over-inherent-22684.rs (renamed from tests/ui/issues/issue-22684.rs)1
-rw-r--r--tests/ui/methods/trait-method-resolution-over-inherent-22684.stderr (renamed from tests/ui/issues/issue-22684.stderr)2
-rw-r--r--tests/ui/methods/untrimmed-path-type.stderr2
-rw-r--r--tests/ui/mir/lint/storage-live.rs2
-rw-r--r--tests/ui/mismatched_types/float-integer-subtraction-error-24352.rs (renamed from tests/ui/issues/issue-24352.rs)1
-rw-r--r--tests/ui/mismatched_types/float-integer-subtraction-error-24352.stderr (renamed from tests/ui/issues/issue-24352.stderr)2
-rw-r--r--tests/ui/mismatched_types/for-loop-in-vec-type-mismatchrs-50585.rs (renamed from tests/ui/issues/issue-50585.rs)1
-rw-r--r--tests/ui/mismatched_types/for-loop-in-vec-type-mismatchrs-50585.stderr (renamed from tests/ui/issues/issue-50585.stderr)2
-rw-r--r--tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.fixed (renamed from tests/ui/issues/issue-92741.fixed)1
-rw-r--r--tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.rs (renamed from tests/ui/issues/issue-92741.rs)1
-rw-r--r--tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.stderr (renamed from tests/ui/issues/issue-92741.stderr)6
-rw-r--r--tests/ui/mismatched_types/starts-with-stringify-type-mismatch-48364.rs (renamed from tests/ui/issues/issue-48364.rs)1
-rw-r--r--tests/ui/mismatched_types/starts-with-stringify-type-mismatch-48364.stderr (renamed from tests/ui/issues/issue-48364.stderr)2
-rw-r--r--tests/ui/missing/missing-items/missing-type-parameter2.rs2
-rw-r--r--tests/ui/missing/missing-items/missing-type-parameter2.stderr2
-rw-r--r--tests/ui/modules/circular-module-imports-32797.rs (renamed from tests/ui/issues/issue-32797.rs)1
-rw-r--r--tests/ui/modules/path-invalid-form.stderr2
-rw-r--r--tests/ui/modules/path-macro.stderr2
-rw-r--r--tests/ui/moves/match-move-same-binding-15571.rs (renamed from tests/ui/issues/issue-15571.rs)2
-rw-r--r--tests/ui/moves/matching-partially-moved-value-17385.rs (renamed from tests/ui/issues/issue-17385.rs)1
-rw-r--r--tests/ui/moves/matching-partially-moved-value-17385.stderr (renamed from tests/ui/issues/issue-17385.stderr)8
-rw-r--r--tests/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr5
-rw-r--r--tests/ui/moves/use-correct-generic-args-in-borrow-suggest.rs13
-rw-r--r--tests/ui/moves/use-correct-generic-args-in-borrow-suggest.stderr18
-rw-r--r--tests/ui/never/never-type-method-call-15207.rs (renamed from tests/ui/issues/issue-15207.rs)2
-rw-r--r--tests/ui/never/never-type-method-call-15207.stderr (renamed from tests/ui/issues/issue-15207.stderr)2
-rw-r--r--tests/ui/never_type/defaulted-never-note.fallback.stderr2
-rw-r--r--tests/ui/never_type/defaulted-never-note.rs2
-rw-r--r--tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr2
-rw-r--r--tests/ui/never_type/field-access-never-type-13847.rs (renamed from tests/ui/issues/issue-13847.rs)2
-rw-r--r--tests/ui/never_type/field-access-never-type-13847.stderr (renamed from tests/ui/issues/issue-13847.stderr)2
-rw-r--r--tests/ui/nll/issue-46589.nll.stderr2
-rw-r--r--tests/ui/nll/issue-46589.polonius.stderr15
-rw-r--r--tests/ui/nll/issue-46589.rs12
-rw-r--r--tests/ui/nll/issue-51345-2.rs4
-rw-r--r--tests/ui/nll/issue-52663-span-decl-captured-variable.stderr5
-rw-r--r--tests/ui/nll/polonius/array-literal-index-oob-2024.rs12
-rw-r--r--tests/ui/nll/polonius/filtering-lending-iterator-issue-92985.nll.stderr14
-rw-r--r--tests/ui/nll/polonius/filtering-lending-iterator-issue-92985.rs56
-rw-r--r--tests/ui/nll/polonius/flow-sensitive-invariance.nll.stderr36
-rw-r--r--tests/ui/nll/polonius/flow-sensitive-invariance.polonius.stderr36
-rw-r--r--tests/ui/nll/polonius/flow-sensitive-invariance.rs34
-rw-r--r--tests/ui/nll/polonius/iterating-updating-cursor-issue-108704.nll.stderr12
-rw-r--r--tests/ui/nll/polonius/iterating-updating-cursor-issue-108704.polonius.stderr12
-rw-r--r--tests/ui/nll/polonius/iterating-updating-cursor-issue-108704.rs48
-rw-r--r--tests/ui/nll/polonius/iterating-updating-cursor-issue-57165.nll.stderr22
-rw-r--r--tests/ui/nll/polonius/iterating-updating-cursor-issue-57165.polonius.stderr22
-rw-r--r--tests/ui/nll/polonius/iterating-updating-cursor-issue-57165.rs45
-rw-r--r--tests/ui/nll/polonius/iterating-updating-cursor-issue-63908.nll.stderr18
-rw-r--r--tests/ui/nll/polonius/iterating-updating-cursor-issue-63908.polonius.stderr18
-rw-r--r--tests/ui/nll/polonius/iterating-updating-cursor-issue-63908.rs44
-rw-r--r--tests/ui/nll/polonius/iterating-updating-mutref.nll.stderr15
-rw-r--r--tests/ui/nll/polonius/iterating-updating-mutref.rs87
-rw-r--r--tests/ui/nll/polonius/lending-iterator-sanity-checks.legacy.stderr28
-rw-r--r--tests/ui/nll/polonius/lending-iterator-sanity-checks.nll.stderr28
-rw-r--r--tests/ui/nll/polonius/lending-iterator-sanity-checks.polonius.stderr26
-rw-r--r--tests/ui/nll/polonius/lending-iterator-sanity-checks.rs71
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-112087.nll.stderr17
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-112087.rs25
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-123839.nll.stderr16
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-123839.rs40
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-124070.nll.stderr17
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-124070.rs30
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-124254.nll.stderr34
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-124254.rs45
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-21906.nll.stderr96
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-21906.rs85
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-51526.nll.stderr18
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-51526.rs30
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-51545.nll.stderr15
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-51545.rs28
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-54663.nll.stderr16
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-54663.rs25
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-58787.nll.stderr112
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-58787.rs74
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-68934.nll.stderr17
-rw-r--r--tests/ui/nll/polonius/nll-problem-case-3-issue-68934.rs38
-rw-r--r--tests/ui/numbers-arithmetic/f32-literal-rounding-32805.rs (renamed from tests/ui/issues/issue-32805.rs)1
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-add.rs4
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-mul.rs4
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-pow-signed.rs4
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs4
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-sub.rs4
-rw-r--r--tests/ui/offset-of/offset-of-tuple-field.stderr36
-rw-r--r--tests/ui/operator-recovery/box-arithmetic-14915.rs (renamed from tests/ui/issues/issue-14915.rs)2
-rw-r--r--tests/ui/operator-recovery/box-arithmetic-14915.stderr (renamed from tests/ui/issues/issue-14915.stderr)2
-rw-r--r--tests/ui/packed/misaligned-reference-drop-field-99838.rs (renamed from tests/ui/issues/issue-99838.rs)1
-rw-r--r--tests/ui/panics/fmt-only-once.run.stderr2
-rw-r--r--tests/ui/panics/issue-47429-short-backtraces.run.stderr2
-rw-r--r--tests/ui/panics/location-detail-panic-no-column.run.stderr2
-rw-r--r--tests/ui/panics/location-detail-panic-no-file.run.stderr2
-rw-r--r--tests/ui/panics/location-detail-panic-no-line.run.stderr2
-rw-r--r--tests/ui/panics/location-detail-panic-no-location-info.run.stderr2
-rw-r--r--tests/ui/panics/location-detail-unwrap-no-file.run.stderr2
-rw-r--r--tests/ui/panics/main-panic.rs2
-rw-r--r--tests/ui/panics/panic-in-cleanup.run.stderr6
-rw-r--r--tests/ui/panics/panic-in-ffi.run.stderr4
-rw-r--r--tests/ui/panics/panic-set-unset-handler.rs4
-rw-r--r--tests/ui/panics/panic-short-backtrace-windows-x86_64.run.stderr2
-rw-r--r--tests/ui/panics/panic-take-handler-nop.rs4
-rw-r--r--tests/ui/panics/panic-task-name-none.rs10
-rw-r--r--tests/ui/panics/panic-task-name-owned.rs20
-rw-r--r--tests/ui/panics/runtime-switch.run.stderr2
-rw-r--r--tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr2
-rw-r--r--tests/ui/panics/short-ice-remove-middle-frames.run.stderr2
-rw-r--r--tests/ui/parser/attribute-on-empty.rs29
-rw-r--r--tests/ui/parser/attribute-on-empty.stderr52
-rw-r--r--tests/ui/parser/attribute-on-type.fixed58
-rw-r--r--tests/ui/parser/attribute-on-type.rs58
-rw-r--r--tests/ui/parser/attribute-on-type.stderr92
-rw-r--r--tests/ui/parser/bad-lit-suffixes.stderr1
-rw-r--r--tests/ui/parser/default-on-wrong-item-kind.rs8
-rw-r--r--tests/ui/parser/default-on-wrong-item-kind.stderr42
-rw-r--r--tests/ui/parser/encode-symbol-ice-12920.rs (renamed from tests/ui/issues/issue-12920.rs)2
-rw-r--r--tests/ui/parser/float-field.stderr6
-rw-r--r--tests/ui/parser/generics-rangle-eq-15043.rs (renamed from tests/ui/issues/issue-15043.rs)2
-rw-r--r--tests/ui/parser/issues/issue-103143.rs2
-rw-r--r--tests/ui/parser/issues/issue-103143.stderr11
-rw-r--r--tests/ui/parser/item-kw-case-mismatch.stderr6
-rw-r--r--tests/ui/parser/kw-in-trait-bounds.stderr8
-rw-r--r--tests/ui/parser/macro/macro-attr-bad.rs32
-rw-r--r--tests/ui/parser/macro/macro-attr-bad.stderr80
-rw-r--r--tests/ui/parser/macro/macro-attr-recovery.rs19
-rw-r--r--tests/ui/parser/macro/macro-attr-recovery.stderr31
-rw-r--r--tests/ui/parser/misspelled-keywords/hrdt.stderr2
-rw-r--r--tests/ui/parser/misspelled-keywords/impl-return.stderr2
-rw-r--r--tests/ui/parser/misspelled-keywords/static.stderr2
-rw-r--r--tests/ui/parser/misspelled-keywords/struct.stderr2
-rw-r--r--tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr4
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed4
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs4
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr10
-rw-r--r--tests/ui/parser/typod-const-in-const-param-def.stderr8
-rw-r--r--tests/ui/pattern/array-length-mismatch-13482.rs (renamed from tests/ui/issues/issue-13482.rs)2
-rw-r--r--tests/ui/pattern/array-length-mismatch-13482.stderr (renamed from tests/ui/issues/issue-13482.stderr)2
-rw-r--r--tests/ui/pattern/array-length-mismatch-verbose-13482.rs (renamed from tests/ui/issues/issue-13482-2.rs)0
-rw-r--r--tests/ui/pattern/array-length-mismatch-verbose-13482.stderr (renamed from tests/ui/issues/issue-13482-2.stderr)2
-rw-r--r--tests/ui/pattern/bindings-after-at/bind-by-copy-or-pat.rs7
-rw-r--r--tests/ui/pattern/bindings-after-at/bind-by-copy-or-pat.stderr31
-rw-r--r--tests/ui/pattern/deref-patterns/usefulness/non-exhaustive.rs2
-rw-r--r--tests/ui/pattern/deref-patterns/usefulness/non-exhaustive.stderr6
-rw-r--r--tests/ui/pattern/enum-struct-pattern-mismatch-15896.rs (renamed from tests/ui/issues/issue-15896.rs)2
-rw-r--r--tests/ui/pattern/enum-struct-pattern-mismatch-15896.stderr (renamed from tests/ui/issues/issue-15896.stderr)2
-rw-r--r--tests/ui/pattern/refutable-pattern-for-loop-15381.rs (renamed from tests/ui/issues/issue-15381.rs)2
-rw-r--r--tests/ui/pattern/refutable-pattern-for-loop-15381.stderr (renamed from tests/ui/issues/issue-15381.stderr)2
-rw-r--r--tests/ui/pattern/slice-pattern-recursion-15104.rs (renamed from tests/ui/issues/issue-15104.rs)2
-rw-r--r--tests/ui/pattern/static-binding-shadow-16149.rs (renamed from tests/ui/issues/issue-16149.rs)2
-rw-r--r--tests/ui/pattern/static-binding-shadow-16149.stderr (renamed from tests/ui/issues/issue-16149.stderr)2
-rw-r--r--tests/ui/pattern/struct-field-duplicate-binding-15260.rs (renamed from tests/ui/issues/issue-15260.rs)2
-rw-r--r--tests/ui/pattern/struct-field-duplicate-binding-15260.stderr (renamed from tests/ui/issues/issue-15260.stderr)8
-rw-r--r--tests/ui/pattern/struct-mismatch-destructure-14541.rs (renamed from tests/ui/issues/issue-14541.rs)2
-rw-r--r--tests/ui/pattern/struct-mismatch-destructure-14541.stderr (renamed from tests/ui/issues/issue-14541.stderr)2
-rw-r--r--tests/ui/pattern/struct-wildcard-pattern-14308.rs (renamed from tests/ui/issues/issue-14308.rs)2
-rw-r--r--tests/ui/pattern/tuple-enum-match-15129.rs (renamed from tests/ui/issues/issue-15129-rpass.rs)13
-rw-r--r--tests/ui/pattern/unit-pattern-matching-in-function-argument-7519.rs (renamed from tests/ui/issues/issue-7519-match-unit-in-arg.rs)1
-rw-r--r--tests/ui/pattern/unit-type-struct-pattern-mismatch-16401.rs (renamed from tests/ui/issues/issue-16401.rs)2
-rw-r--r--tests/ui/pattern/unit-type-struct-pattern-mismatch-16401.stderr (renamed from tests/ui/issues/issue-16401.stderr)2
-rw-r--r--tests/ui/pattern/unit-variant-pattern-matching-29383.rs (renamed from tests/ui/issues/issue-pr29383.rs)1
-rw-r--r--tests/ui/pattern/unit-variant-pattern-matching-29383.stderr (renamed from tests/ui/issues/issue-pr29383.stderr)4
-rw-r--r--tests/ui/pattern/usefulness/unions.rs2
-rw-r--r--tests/ui/pattern/usefulness/unions.stderr4
-rw-r--r--tests/ui/privacy/private-field-access-violation-3763.rs (renamed from tests/ui/issues/issue-3763.rs)1
-rw-r--r--tests/ui/privacy/private-field-access-violation-3763.stderr (renamed from tests/ui/issues/issue-3763.stderr)10
-rw-r--r--tests/ui/privacy/private-in-public-warn.stderr72
-rw-r--r--tests/ui/privacy/private-unit-struct-assignment.rs (renamed from tests/ui/issues/issue-13407.rs)2
-rw-r--r--tests/ui/privacy/private-unit-struct-assignment.stderr (renamed from tests/ui/issues/issue-13407.stderr)6
-rw-r--r--tests/ui/privacy/projections.stderr26
-rw-r--r--tests/ui/privacy/use-in-impl-scope-12729.rs (renamed from tests/ui/issues/issue-12729.rs)2
-rw-r--r--tests/ui/proc-macro/attribute.rs16
-rw-r--r--tests/ui/proc-macro/attribute.stderr268
-rw-r--r--tests/ui/proc-macro/auxiliary/match-expander.rs15
-rw-r--r--tests/ui/proc-macro/derive-helper-shadowing.rs2
-rw-r--r--tests/ui/proc-macro/derive-helper-shadowing.stderr20
-rw-r--r--tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs2
-rw-r--r--tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr20
-rw-r--r--tests/ui/proc-macro/issue-75930-derive-cfg.rs2
-rw-r--r--tests/ui/proc-macro/issue-75930-derive-cfg.stderr42
-rw-r--r--tests/ui/proc-macro/load-panic-backtrace.rs2
-rw-r--r--tests/ui/proc-macro/load-panic-backtrace.stderr2
-rw-r--r--tests/ui/proc-macro/match-expander.rs12
-rw-r--r--tests/ui/proc-macro/match-expander.stderr11
-rw-r--r--tests/ui/proc-macro/proc-macro-attributes.rs8
-rw-r--r--tests/ui/proc-macro/proc-macro-attributes.stderr68
-rw-r--r--tests/ui/proc-macro/quote/does-not-have-iter-interpolated-dup.stderr1
-rw-r--r--tests/ui/proc-macro/quote/does-not-have-iter-interpolated.stderr1
-rw-r--r--tests/ui/proc-macro/quote/does-not-have-iter-separated.stderr5
-rw-r--r--tests/ui/proc-macro/quote/does-not-have-iter.stderr5
-rw-r--r--tests/ui/proc-macro/span-from-proc-macro.stderr2
-rw-r--r--tests/ui/process/multi-panic.rs21
-rw-r--r--tests/ui/process/println-with-broken-pipe.run.stderr2
-rw-r--r--tests/ui/recursion/issue-23122-2.rs1
-rw-r--r--tests/ui/recursion/issue-23122-2.stderr8
-rw-r--r--tests/ui/recursion/issue-38591-non-regular-dropck-recursion.rs1
-rw-r--r--tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr6
-rw-r--r--tests/ui/recursion/issue-83150.rs2
-rw-r--r--tests/ui/recursion/issue-83150.stderr6
-rw-r--r--tests/ui/recursion/recursion.rs2
-rw-r--r--tests/ui/recursion/recursion.stderr5
-rw-r--r--tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.rs2
-rw-r--r--tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.stderr5
-rw-r--r--tests/ui/recursion_limit/invalid_digit_type.stderr2
-rw-r--r--tests/ui/recursion_limit/invalid_macro.stderr2
-rw-r--r--tests/ui/recursion_limit/no-value.stderr2
-rw-r--r--tests/ui/repr/invalid_repr_list_help.stderr5
-rw-r--r--tests/ui/repr/repr.stderr62
-rw-r--r--tests/ui/resolve/cannot-find-value-in-scope-22811.rs (renamed from tests/ui/issues/issue-2281-part1.rs)1
-rw-r--r--tests/ui/resolve/cannot-find-value-in-scope-22811.stderr (renamed from tests/ui/issues/issue-2281-part1.stderr)2
-rw-r--r--tests/ui/resolve/multiple_definitions_attribute_merging.rs2
-rw-r--r--tests/ui/resolve/path-attr-in-const-block.stderr2
-rw-r--r--tests/ui/resolve/pointer-type-impls-14254.rs (renamed from tests/ui/issues/issue-14254.rs)2
-rw-r--r--tests/ui/resolve/proc_macro_generated_packed.rs2
-rw-r--r--tests/ui/resolve/reference-clone-nonclone-11820.rs (renamed from tests/ui/issues/issue-11820.rs)2
-rw-r--r--tests/ui/resolve/unresolved-module-error-33293.rs (renamed from tests/ui/issues/issue-33293.rs)1
-rw-r--r--tests/ui/resolve/unresolved-module-error-33293.stderr (renamed from tests/ui/issues/issue-33293.stderr)2
-rw-r--r--tests/ui/resolve/use-shadowing-14082.rs (renamed from tests/ui/issues/issue-14082.rs)2
-rw-r--r--tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr2
-rw-r--r--tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.rs2
-rw-r--r--tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.stderr28
-rw-r--r--tests/ui/rustc_public-ir-print/async-closure.stdout4
-rw-r--r--tests/ui/rustdoc/cfg-rustdoc.rs7
-rw-r--r--tests/ui/rustdoc/cfg-rustdoc.stderr8
-rw-r--r--tests/ui/self/arbitrary_self_type_infinite_recursion.stderr2
-rw-r--r--tests/ui/self/arbitrary_self_types_not_allow_call_with_no_deref.stderr4
-rw-r--r--tests/ui/self/arbitrary_self_types_pin_needing_borrow.rs2
-rw-r--r--tests/ui/self/arbitrary_self_types_pin_needing_borrow.stderr2
-rw-r--r--tests/ui/simd/libm_no_std_cant_float.stderr12
-rw-r--r--tests/ui/span/E0539.stderr6
-rw-r--r--tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr1
-rw-r--r--tests/ui/specialization/defaultimpl/validation.rs2
-rw-r--r--tests/ui/specialization/defaultimpl/validation.stderr4
-rw-r--r--tests/ui/static/static-string-slice-9249.rs (renamed from tests/ui/issues/issue-9249.rs)1
-rw-r--r--tests/ui/statics/conditional-static-declaration-16010.rs (renamed from tests/ui/issues/issue-16452.rs)2
-rw-r--r--tests/ui/statics/enum-with-static-str-variant-13214.rs (renamed from tests/ui/issues/issue-13214.rs)2
-rw-r--r--tests/ui/stats/macro-stats.rs30
-rw-r--r--tests/ui/stats/macro-stats.stderr7
-rw-r--r--tests/ui/structs/default-field-values/auxiliary/struct_field_default.rs10
-rw-r--r--tests/ui/structs/default-field-values/non-exhaustive-ctor-2.rs29
-rw-r--r--tests/ui/structs/default-field-values/non-exhaustive-ctor-2.stderr105
-rw-r--r--tests/ui/structs/struct-field-access-errors-24365.rs (renamed from tests/ui/issues/issue-24365.rs)1
-rw-r--r--tests/ui/structs/struct-field-access-errors-24365.stderr (renamed from tests/ui/issues/issue-24365.stderr)6
-rw-r--r--tests/ui/structs/tuple-struct-field-naming-47073.rs (renamed from tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs)1
-rw-r--r--tests/ui/structs/tuple-struct-field-naming-47073.stderr (renamed from tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr)10
-rw-r--r--tests/ui/suggestions/assoc-ct-for-assoc-method.stderr2
-rw-r--r--tests/ui/suggestions/bool_typo_err_suggest.stderr2
-rw-r--r--tests/ui/suggestions/case-difference-suggestions.rs57
-rw-r--r--tests/ui/suggestions/case-difference-suggestions.stderr99
-rw-r--r--tests/ui/suggestions/dont-suggest-ref/move-into-closure.rs161
-rw-r--r--tests/ui/suggestions/dont-suggest-ref/move-into-closure.stderr671
-rw-r--r--tests/ui/suggestions/enum-method-probe.fixed12
-rw-r--r--tests/ui/suggestions/enum-method-probe.rs12
-rw-r--r--tests/ui/suggestions/enum-method-probe.stderr12
-rw-r--r--tests/ui/suggestions/field-has-method.rs2
-rw-r--r--tests/ui/suggestions/field-has-method.stderr2
-rw-r--r--tests/ui/suggestions/for-loop-missing-in.fixed7
-rw-r--r--tests/ui/suggestions/for-loop-missing-in.rs7
-rw-r--r--tests/ui/suggestions/for-loop-missing-in.stderr26
-rw-r--r--tests/ui/suggestions/incorrect-variant-literal.svg2
-rw-r--r--tests/ui/suggestions/inner_type.fixed10
-rw-r--r--tests/ui/suggestions/inner_type.rs10
-rw-r--r--tests/ui/suggestions/inner_type.stderr10
-rw-r--r--tests/ui/suggestions/inner_type2.rs4
-rw-r--r--tests/ui/suggestions/inner_type2.stderr4
-rw-r--r--tests/ui/suggestions/option-content-move2.stderr11
-rw-r--r--tests/ui/suggestions/option-content-move3.stderr12
-rw-r--r--tests/ui/symbol-names/auxiliary/aux-9188.rs (renamed from tests/ui/issues/auxiliary/issue-9188.rs)0
-rw-r--r--tests/ui/symbol-names/same-symbol-name-for-inner-statics-9188.rs11
-rw-r--r--tests/ui/target-feature/gate.rs1
-rw-r--r--tests/ui/target-feature/gate.stderr2
-rw-r--r--tests/ui/target-feature/implied-features-nvptx.rs28
-rw-r--r--tests/ui/test-attrs/issue-12997-2.stderr2
-rw-r--r--tests/ui/test-attrs/terse.run.stdout6
-rw-r--r--tests/ui/test-attrs/test-function-signature.stderr2
-rw-r--r--tests/ui/test-attrs/test-panic-abort-nocapture.run.stderr4
-rw-r--r--tests/ui/test-attrs/test-panic-abort.run.stdout2
-rw-r--r--tests/ui/test-attrs/test-should-panic-attr.rs17
-rw-r--r--tests/ui/test-attrs/test-should-panic-attr.stderr86
-rw-r--r--tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr8
-rw-r--r--tests/ui/test-attrs/test-thread-capture.run.stdout2
-rw-r--r--tests/ui/test-attrs/test-thread-nocapture.run.stderr2
-rw-r--r--tests/ui/thread-local/thread-local-with-attributes-30756.rs (renamed from tests/ui/issues/issue-30756.rs)1
-rw-r--r--tests/ui/threads-sendsync/tcp-stress.rs64
-rw-r--r--tests/ui/track-diagnostics/track.rs5
-rw-r--r--tests/ui/track-diagnostics/track.stderr2
-rw-r--r--tests/ui/trait-bounds/anonymous-parameters-13775.rs (renamed from tests/ui/issues/issue-13775.rs)2
-rw-r--r--tests/ui/trait-bounds/more_maybe_bounds.rs8
-rw-r--r--tests/ui/trait-bounds/more_maybe_bounds.stderr6
-rw-r--r--tests/ui/trait-bounds/trait-selection-overflow-prevention-72839.rs (renamed from tests/ui/issues/issue-72839-error-overflow.rs)1
-rw-r--r--tests/ui/trait-bounds/trait-selection-overflow-prevention-72839.stderr (renamed from tests/ui/issues/issue-72839-error-overflow.stderr)2
-rw-r--r--tests/ui/trait-objects/trait-object-lifetime-conversion-47638.rs (renamed from tests/ui/issues/issue-47638.rs)1
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-in-anon-const.rs28
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-in-anon-const.stderr32
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs21
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr30
-rw-r--r--tests/ui/traits/const-traits/const-and-non-const-impl.rs4
-rw-r--r--tests/ui/traits/const-traits/const-and-non-const-impl.stderr4
-rw-r--r--tests/ui/traits/const-traits/const-closure-issue-125866-error.rs24
-rw-r--r--tests/ui/traits/const-traits/const-closure-issue-125866-error.stderr11
-rw-r--r--tests/ui/traits/const-traits/const-closure-issue-125866-pass.rs25
-rw-r--r--tests/ui/traits/const-traits/const-fn-trait-bound-issue-104314.rs13
-rw-r--r--tests/ui/traits/const-traits/feature-gate.rs3
-rw-r--r--tests/ui/traits/const-traits/feature-gate.stock.stderr26
-rw-r--r--tests/ui/traits/const-traits/inherent-impl.rs4
-rw-r--r--tests/ui/traits/const-traits/inherent-impl.stderr8
-rw-r--r--tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr26
-rw-r--r--tests/ui/traits/const-traits/span-bug-issue-121418.rs2
-rw-r--r--tests/ui/traits/const-traits/span-bug-issue-121418.stderr4
-rw-r--r--tests/ui/traits/default-method-lifetime-params-13204.rs (renamed from tests/ui/issues/issue-13204.rs)2
-rw-r--r--tests/ui/traits/fn-type-trait-impl-15444.rs (renamed from tests/ui/issues/issue-15444.rs)2
-rw-r--r--tests/ui/traits/fnonce-repro-trait-impl-13434.rs (renamed from tests/ui/issues/issue-13434.rs)2
-rw-r--r--tests/ui/traits/impl-trait-chain-14229.rs (renamed from tests/ui/issues/issue-14229.rs)2
-rw-r--r--tests/ui/traits/index-trait-multiple-impls-15734.rs (renamed from tests/ui/issues/issue-15734.rs)2
-rw-r--r--tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr4
-rw-r--r--tests/ui/traits/issue-91949-hangs-on-recursion.rs2
-rw-r--r--tests/ui/traits/issue-91949-hangs-on-recursion.stderr4
-rw-r--r--tests/ui/traits/lifetime-mismatch-trait-impl-16048.rs (renamed from tests/ui/issues/issue-16048.rs)2
-rw-r--r--tests/ui/traits/lifetime-mismatch-trait-impl-16048.stderr (renamed from tests/ui/issues/issue-16048.stderr)4
-rw-r--r--tests/ui/traits/next-solver/cycles/rayon-hang-1.rs32
-rw-r--r--tests/ui/traits/next-solver/cycles/rayon-hang-2.rs49
-rw-r--r--tests/ui/traits/safety-inherent-impl.stderr2
-rw-r--r--tests/ui/traits/syntax-trait-polarity.stderr20
-rw-r--r--tests/ui/traits/trait-bound-mismatch-14853.rs (renamed from tests/ui/issues/issue-14853.rs)2
-rw-r--r--tests/ui/traits/trait-bound-mismatch-14853.stderr (renamed from tests/ui/issues/issue-14853.stderr)2
-rw-r--r--tests/ui/traits/trait-impl-overflow-with-where-clause-20413.rs (renamed from tests/ui/issues/issue-20413.rs)1
-rw-r--r--tests/ui/traits/trait-impl-overflow-with-where-clause-20413.stderr (renamed from tests/ui/issues/issue-20413.stderr)24
-rw-r--r--tests/ui/traits/well-formed-recursion-limit.stderr4
-rw-r--r--tests/ui/treat-err-as-bug/err.rs2
-rw-r--r--tests/ui/treat-err-as-bug/span_delayed_bug.rs2
-rw-r--r--tests/ui/try-trait/incompatible-types-with-question-mark-51632.rs (renamed from tests/ui/issues/issue-51632-try-desugar-incompatible-types.rs)1
-rw-r--r--tests/ui/try-trait/incompatible-types-with-question-mark-51632.stderr (renamed from tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr)2
-rw-r--r--tests/ui/tuple/index-invalid.stderr6
-rw-r--r--tests/ui/tuple/missing-field-access.rs16
-rw-r--r--tests/ui/tuple/missing-field-access.stderr28
-rw-r--r--tests/ui/tuple/tuple-index-out-of-bounds.stderr8
-rw-r--r--tests/ui/type-alias-impl-trait/hkl_forbidden.rs8
-rw-r--r--tests/ui/type-alias-impl-trait/hkl_forbidden.stderr30
-rw-r--r--tests/ui/type-alias-impl-trait/param_mismatch2.rs4
-rw-r--r--tests/ui/type-alias-impl-trait/param_mismatch2.stderr13
-rw-r--r--tests/ui/type-alias-impl-trait/param_mismatch3.rs4
-rw-r--r--tests/ui/type-alias-impl-trait/param_mismatch3.stderr13
-rw-r--r--tests/ui/type-alias/missing-associated-type-in-trait-object-22434.rs (renamed from tests/ui/issues/issue-22434.rs)1
-rw-r--r--tests/ui/type-alias/missing-associated-type-in-trait-object-22434.stderr (renamed from tests/ui/issues/issue-22434.stderr)2
-rw-r--r--tests/ui/type-inference/float-type-inference-unification-14382.rs4
-rw-r--r--tests/ui/type-inference/partial-type-hint-12909.rs21
-rw-r--r--tests/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.stderr2
-rw-r--r--tests/ui/type/default_type_parameter_in_fn_or_impl.rs12
-rw-r--r--tests/ui/type/default_type_parameter_in_fn_or_impl.stderr43
-rw-r--r--tests/ui/type/pattern_types/bad_const_generics_args_on_const_param.rs2
-rw-r--r--tests/ui/type/type-name-basic.rs81
-rw-r--r--tests/ui/typeck/function-in-pattern-error-12863.rs (renamed from tests/ui/issues/issue-12863.rs)2
-rw-r--r--tests/ui/typeck/function-in-pattern-error-12863.stderr (renamed from tests/ui/issues/issue-12863.stderr)2
-rw-r--r--tests/ui/typeck/incorrect-self-type-in-trait-impl-48276.rs (renamed from tests/ui/issues/issue-48276.rs)1
-rw-r--r--tests/ui/typeck/incorrect-self-type-in-trait-impl-48276.stderr (renamed from tests/ui/issues/issue-48276.stderr)6
-rw-r--r--tests/ui/typeck/isize-usize-mismatch-error.rs (renamed from tests/ui/issues/issue-13359.rs)2
-rw-r--r--tests/ui/typeck/isize-usize-mismatch-error.stderr (renamed from tests/ui/issues/issue-13359.stderr)8
-rw-r--r--tests/ui/typeck/parenthesized-type-parameters-error-32995.rs (renamed from tests/ui/issues/issue-32995-2.rs)1
-rw-r--r--tests/ui/typeck/parenthesized-type-parameters-error-32995.stderr (renamed from tests/ui/issues/issue-32995-2.stderr)6
-rw-r--r--tests/ui/typeck/str-no-field-desc-14721.rs (renamed from tests/ui/issues/issue-14721.rs)2
-rw-r--r--tests/ui/typeck/str-no-field-desc-14721.stderr (renamed from tests/ui/issues/issue-14721.stderr)2
-rw-r--r--tests/ui/typeck/unit-type-add-error-11771.rs (renamed from tests/ui/issues/issue-11771.rs)2
-rw-r--r--tests/ui/typeck/unit-type-add-error-11771.stderr (renamed from tests/ui/issues/issue-11771.stderr)4
-rw-r--r--tests/ui/typeck/unused-type-parameter-span-30236.rs (renamed from tests/ui/issues/issue-30236.rs)1
-rw-r--r--tests/ui/typeck/unused-type-parameter-span-30236.stderr (renamed from tests/ui/issues/issue-30236.stderr)2
-rw-r--r--tests/ui/typeck/unwrap-or-panic-input-13202.rs (renamed from tests/ui/issues/issue-13202.rs)2
-rw-r--r--tests/ui/unboxed-closures/self-param-space-conflict-in-unboxed-closure-18685.rs (renamed from tests/ui/issues/issue-18685.rs)2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-illegal-move.stderr22
-rw-r--r--tests/ui/uninhabited/uninhabited-type-layout-computation-88150.rs (renamed from tests/ui/issues/issue-88150.rs)1
-rw-r--r--tests/ui/unpretty/exhaustive.hir.stdout2
-rw-r--r--tests/ui/unsized/relaxed-bounds-invalid-places.rs4
-rw-r--r--tests/ui/unsized/relaxed-bounds-invalid-places.stderr18
-rw-r--r--tests/ui/unstable-feature-bound/unstable_feature_bound_on_trait.fail.stderr18
-rw-r--r--tests/ui/unstable-feature-bound/unstable_feature_bound_on_trait.rs33
-rw-r--r--tests/ui/unstable-feature-bound/unstable_inherent_method.rs4
-rw-r--r--tests/ui/unstable-feature-bound/unstable_inherent_method.stderr8
-rw-r--r--tests/ui/wf/hir-wf-check-erase-regions.nll.stderr (renamed from tests/ui/wf/hir-wf-check-erase-regions.stderr)8
-rw-r--r--tests/ui/wf/hir-wf-check-erase-regions.polonius.stderr39
-rw-r--r--tests/ui/wf/hir-wf-check-erase-regions.rs6
-rw-r--r--tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs2
-rw-r--r--tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr2
1133 files changed, 11474 insertions, 5371 deletions
diff --git a/tests/assembly-llvm/asm/loongarch-type.rs b/tests/assembly-llvm/asm/loongarch-type.rs
index c782be19f1d..95d811a6bd0 100644
--- a/tests/assembly-llvm/asm/loongarch-type.rs
+++ b/tests/assembly-llvm/asm/loongarch-type.rs
@@ -1,8 +1,15 @@
 //@ add-core-stubs
+//@ revisions: loongarch32 loongarch64
+
 //@ assembly-output: emit-asm
-//@ compile-flags: --target loongarch64-unknown-linux-gnu
+
+//@[loongarch32] compile-flags: --target loongarch32-unknown-none
+//@[loongarch32] needs-llvm-components: loongarch
+
+//@[loongarch64] compile-flags: --target loongarch64-unknown-none
+//@[loongarch64] needs-llvm-components: loongarch
+
 //@ compile-flags: -Zmerge-functions=disabled
-//@ needs-llvm-components: loongarch
 
 #![feature(no_core, f16)]
 #![crate_type = "rlib"]
@@ -22,7 +29,7 @@ extern "C" {
 // CHECK-LABEL: sym_fn:
 // CHECK: #APP
 // CHECK: pcalau12i $t0, %got_pc_hi20(extern_func)
-// CHECK: ld.d $t0, $t0, %got_pc_lo12(extern_func)
+// CHECK: ld.{{[wd]}} $t0, $t0, %got_pc_lo12(extern_func)
 // CHECK: #NO_APP
 #[no_mangle]
 pub unsafe fn sym_fn() {
@@ -32,7 +39,7 @@ pub unsafe fn sym_fn() {
 // CHECK-LABEL: sym_static:
 // CHECK: #APP
 // CHECK: pcalau12i $t0, %got_pc_hi20(extern_static)
-// CHECK: ld.d $t0, $t0, %got_pc_lo12(extern_static)
+// CHECK: ld.{{[wd]}} $t0, $t0, %got_pc_lo12(extern_static)
 // CHECK: #NO_APP
 #[no_mangle]
 pub unsafe fn sym_static() {
@@ -87,16 +94,18 @@ check!(reg_i32, i32, reg, "move");
 // CHECK: #NO_APP
 check!(reg_f32, f32, reg, "move");
 
-// CHECK-LABEL: reg_i64:
-// CHECK: #APP
-// CHECK: move ${{[a-z0-9]+}}, ${{[a-z0-9]+}}
-// CHECK: #NO_APP
+// loongarch64-LABEL: reg_i64:
+// loongarch64: #APP
+// loongarch64: move ${{[a-z0-9]+}}, ${{[a-z0-9]+}}
+// loongarch64: #NO_APP
+#[cfg(loongarch64)]
 check!(reg_i64, i64, reg, "move");
 
-// CHECK-LABEL: reg_f64:
-// CHECK: #APP
-// CHECK: move ${{[a-z0-9]+}}, ${{[a-z0-9]+}}
-// CHECK: #NO_APP
+// loongarch64-LABEL: reg_f64:
+// loongarch64: #APP
+// loongarch64: move ${{[a-z0-9]+}}, ${{[a-z0-9]+}}
+// loongarch64: #NO_APP
+#[cfg(loongarch64)]
 check!(reg_f64, f64, reg, "move");
 
 // CHECK-LABEL: reg_ptr:
@@ -153,16 +162,18 @@ check_reg!(r4_i32, i32, "$r4", "move");
 // CHECK: #NO_APP
 check_reg!(r4_f32, f32, "$r4", "move");
 
-// CHECK-LABEL: r4_i64:
-// CHECK: #APP
-// CHECK: move $a0, $a0
-// CHECK: #NO_APP
+// loongarch64-LABEL: r4_i64:
+// loongarch64: #APP
+// loongarch64: move $a0, $a0
+// loongarch64: #NO_APP
+#[cfg(loongarch64)]
 check_reg!(r4_i64, i64, "$r4", "move");
 
-// CHECK-LABEL: r4_f64:
-// CHECK: #APP
-// CHECK: move $a0, $a0
-// CHECK: #NO_APP
+// loongarch64-LABEL: r4_f64:
+// loongarch64: #APP
+// loongarch64: move $a0, $a0
+// loongarch64: #NO_APP
+#[cfg(loongarch64)]
 check_reg!(r4_f64, f64, "$r4", "move");
 
 // CHECK-LABEL: r4_ptr:
diff --git a/tests/assembly-llvm/targets/targets-elf.rs b/tests/assembly-llvm/targets/targets-elf.rs
index edf16548e7d..ee63dffe9ea 100644
--- a/tests/assembly-llvm/targets/targets-elf.rs
+++ b/tests/assembly-llvm/targets/targets-elf.rs
@@ -193,6 +193,9 @@
 //@ revisions: armv7a_nuttx_eabihf
 //@ [armv7a_nuttx_eabihf] compile-flags: --target armv7a-nuttx-eabihf
 //@ [armv7a_nuttx_eabihf] needs-llvm-components: arm
+//@ revisions: armv7a_vex_v5
+//@ [armv7a_vex_v5] compile-flags: --target armv7a-vex-v5
+//@ [armv7a_vex_v5] needs-llvm-components: arm
 //@ revisions: armv7r_none_eabi
 //@ [armv7r_none_eabi] compile-flags: --target armv7r-none-eabi
 //@ [armv7r_none_eabi] needs-llvm-components: arm
diff --git a/tests/assembly-llvm/x86_64-bigint-helpers.rs b/tests/assembly-llvm/x86_64-bigint-helpers.rs
index 58785932bc2..c5efda58fd6 100644
--- a/tests/assembly-llvm/x86_64-bigint-helpers.rs
+++ b/tests/assembly-llvm/x86_64-bigint-helpers.rs
@@ -2,9 +2,7 @@
 //@ assembly-output: emit-asm
 //@ compile-flags: --crate-type=lib -Copt-level=3 -C target-cpu=x86-64-v4
 //@ compile-flags: -C llvm-args=-x86-asm-syntax=intel
-//@ revisions: llvm-pre-20 llvm-20
-//@ [llvm-20] min-llvm-version: 20
-//@ [llvm-pre-20] max-llvm-major-version: 19
+//@ min-llvm-version: 20
 
 #![no_std]
 #![feature(bigint_helper_methods)]
@@ -23,16 +21,15 @@ pub unsafe extern "sysv64" fn bigint_chain_carrying_add(
     n: usize,
     mut carry: bool,
 ) -> bool {
-    // llvm-pre-20: mov [[TEMP:r..]], qword ptr [rsi + 8*[[IND:r..]] + 8]
-    // llvm-pre-20: adc [[TEMP]], qword ptr [rdx + 8*[[IND]] + 8]
-    // llvm-pre-20: mov qword ptr [rdi + 8*[[IND]] + 8], [[TEMP]]
-    // llvm-pre-20: mov [[TEMP]], qword ptr [rsi + 8*[[IND]] + 16]
-    // llvm-pre-20: adc [[TEMP]], qword ptr [rdx + 8*[[IND]] + 16]
-    // llvm-pre-20: mov qword ptr [rdi + 8*[[IND]] + 16], [[TEMP]]
-    // llvm-20: adc [[TEMP:r..]], qword ptr [rdx + 8*[[IND:r..]]]
-    // llvm-20: mov qword ptr [rdi + 8*[[IND]]], [[TEMP]]
-    // llvm-20: mov [[TEMP]], qword ptr [rsi + 8*[[IND]] + 8]
-    // llvm-20: adc [[TEMP]], qword ptr [rdx + 8*[[IND]] + 8]
+    // Even if we emit A+B, LLVM will sometimes reorder that to B+A, so this
+    // test doesn't actually check which register is mov vs which is adc.
+
+    // CHECK: mov [[TEMP1:.+]], qword ptr [{{rdx|rsi}} + 8*[[IND:.+]] + 8]
+    // CHECK: adc [[TEMP1]], qword ptr [{{rdx|rsi}} + 8*[[IND]] + 8]
+    // CHECK: mov qword ptr [rdi + 8*[[IND]] + 8], [[TEMP1]]
+    // CHECK: mov [[TEMP2:.+]], qword ptr [{{rdx|rsi}} + 8*[[IND]] + 16]
+    // CHECK: adc [[TEMP2]], qword ptr [{{rdx|rsi}} + 8*[[IND]] + 16]
+    // CHECK: mov qword ptr [rdi + 8*[[IND]] + 16], [[TEMP2]]
     for i in 0..n {
         (*dest.add(i), carry) = u64::carrying_add(*src1.add(i), *src2.add(i), carry);
     }
diff --git a/tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-generic-load.rs b/tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-generic-load.rs
index f5e2f18e68e..2892ff2882a 100644
--- a/tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-generic-load.rs
+++ b/tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-generic-load.rs
@@ -1,17 +1,24 @@
-// Test LVI load hardening on SGX enclave code
+// Test LVI load hardening on SGX enclave code, specifically that `ret` is rewritten.
 
+//@ add-core-stubs
 //@ assembly-output: emit-asm
-//@ compile-flags: --crate-type staticlib
-//@ only-x86_64-fortanix-unknown-sgx
+//@ compile-flags: --target x86_64-fortanix-unknown-sgx -Copt-level=0
+//@ needs-llvm-components: x86
+
+#![feature(no_core, lang_items, f16)]
+#![crate_type = "lib"]
+#![no_core]
+
+extern crate minicore;
+use minicore::*;
 
 #[no_mangle]
-pub extern "C" fn plus_one(r: &mut u64) {
-    *r = *r + 1;
+pub extern "C" fn dereference(a: &mut u64) -> u64 {
+    // CHECK-LABEL: dereference
+    // CHECK: lfence
+    // CHECK: mov
+    // CHECK: popq [[REGISTER:%[a-z]+]]
+    // CHECK-NEXT: lfence
+    // CHECK-NEXT: jmpq *[[REGISTER]]
+    *a
 }
-
-// CHECK: plus_one
-// CHECK: lfence
-// CHECK-NEXT: incq
-// CHECK: popq [[REGISTER:%[a-z]+]]
-// CHECK-NEXT: lfence
-// CHECK-NEXT: jmpq *[[REGISTER]]
diff --git a/tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs b/tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs
index f16d68fa255..a0cedc3bc2d 100644
--- a/tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs
+++ b/tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs
@@ -1,12 +1,20 @@
 // Test LVI ret hardening on generic rust code
 
+//@ add-core-stubs
 //@ assembly-output: emit-asm
-//@ compile-flags: --crate-type staticlib
-//@ only-x86_64-fortanix-unknown-sgx
+//@ compile-flags: --target x86_64-fortanix-unknown-sgx
+//@ needs-llvm-components: x86
+
+#![feature(no_core, lang_items, f16)]
+#![crate_type = "lib"]
+#![no_core]
+
+extern crate minicore;
+use minicore::*;
 
 #[no_mangle]
 pub extern "C" fn myret() {}
-// CHECK: myret:
+// CHECK-LABEL: myret:
 // CHECK: popq [[REGISTER:%[a-z]+]]
 // CHECK-NEXT: lfence
 // CHECK-NEXT: jmpq *[[REGISTER]]
diff --git a/tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs b/tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs
index a729df8e166..215fb4b804a 100644
--- a/tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs
+++ b/tests/assembly-llvm/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs
@@ -1,13 +1,22 @@
 // Test LVI load hardening on SGX inline assembly code
 
+//@ add-core-stubs
 //@ assembly-output: emit-asm
-//@ compile-flags: --crate-type staticlib
-//@ only-x86_64-fortanix-unknown-sgx
+//@ compile-flags: --target x86_64-fortanix-unknown-sgx
+//@ needs-llvm-components: x86
 
-use std::arch::asm;
+#![feature(no_core, lang_items, f16)]
+#![crate_type = "lib"]
+#![no_core]
+
+extern crate minicore;
+use minicore::*;
 
 #[no_mangle]
 pub extern "C" fn get(ptr: *const u64) -> u64 {
+    // CHECK-LABEL: get
+    // CHECK: movq
+    // CHECK-NEXT: lfence
     let value: u64;
     unsafe {
         asm!("mov {}, [{}]",
@@ -17,18 +26,13 @@ pub extern "C" fn get(ptr: *const u64) -> u64 {
     value
 }
 
-// CHECK: get
-// CHECK: movq
-// CHECK-NEXT: lfence
-
 #[no_mangle]
 pub extern "C" fn myret() {
+    // CHECK-LABEL: myret
+    // CHECK: shlq $0, (%rsp)
+    // CHECK-NEXT: lfence
+    // CHECK-NEXT: retq
     unsafe {
         asm!("ret");
     }
 }
-
-// CHECK: myret
-// CHECK: shlq $0, (%rsp)
-// CHECK-NEXT: lfence
-// CHECK-NEXT: retq
diff --git a/tests/codegen-llvm/addr-of-mutate.rs b/tests/codegen-llvm/addr-of-mutate.rs
index 14bc4b8ab28..71669065289 100644
--- a/tests/codegen-llvm/addr-of-mutate.rs
+++ b/tests/codegen-llvm/addr-of-mutate.rs
@@ -5,7 +5,7 @@
 // Test for the absence of `readonly` on the argument when it is mutated via `&raw const`.
 // See <https://github.com/rust-lang/rust/issues/111502>.
 
-// CHECK: i8 @foo(ptr noalias{{( nocapture)?}} noundef align 1{{( captures\(none\))?}} dereferenceable(128) %x)
+// CHECK: i8 @foo(ptr{{( dead_on_return)?}} noalias{{( nocapture)?}} noundef align 1{{( captures\(none\))?}} dereferenceable(128) %x)
 #[no_mangle]
 pub fn foo(x: [u8; 128]) -> u8 {
     let ptr = core::ptr::addr_of!(x).cast_mut();
@@ -15,7 +15,7 @@ pub fn foo(x: [u8; 128]) -> u8 {
     x[0]
 }
 
-// CHECK: i1 @second(ptr noalias{{( nocapture)?}} noundef align {{[0-9]+}}{{( captures\(none\))?}} dereferenceable({{[0-9]+}}) %a_ptr_and_b)
+// CHECK: i1 @second(ptr{{( dead_on_return)?}} noalias{{( nocapture)?}} noundef align {{[0-9]+}}{{( captures\(none\))?}} dereferenceable({{[0-9]+}}) %a_ptr_and_b)
 #[no_mangle]
 pub unsafe fn second(a_ptr_and_b: (*mut (i32, bool), (i64, bool))) -> bool {
     let b_bool_ptr = core::ptr::addr_of!(a_ptr_and_b.1.1).cast_mut();
@@ -24,7 +24,7 @@ pub unsafe fn second(a_ptr_and_b: (*mut (i32, bool), (i64, bool))) -> bool {
 }
 
 // If going through a deref (and there are no other mutating accesses), then `readonly` is fine.
-// CHECK: i1 @third(ptr noalias{{( nocapture)?}} noundef readonly align {{[0-9]+}}{{( captures\(none\))?}} dereferenceable({{[0-9]+}}) %a_ptr_and_b)
+// CHECK: i1 @third(ptr{{( dead_on_return)?}} noalias{{( nocapture)?}} noundef readonly align {{[0-9]+}}{{( captures\(none\))?}} dereferenceable({{[0-9]+}}) %a_ptr_and_b)
 #[no_mangle]
 pub unsafe fn third(a_ptr_and_b: (*mut (i32, bool), (i64, bool))) -> bool {
     let b_bool_ptr = core::ptr::addr_of!((*a_ptr_and_b.0).1).cast_mut();
diff --git a/tests/codegen-llvm/atomicptr.rs b/tests/codegen-llvm/atomicptr.rs
index 4819af40ca2..ce6c4aa0d2b 100644
--- a/tests/codegen-llvm/atomicptr.rs
+++ b/tests/codegen-llvm/atomicptr.rs
@@ -1,5 +1,5 @@
 // LLVM does not support some atomic RMW operations on pointers, so inside codegen we lower those
-// to integer atomics, surrounded by casts to and from integer type.
+// to integer atomics, followed by an inttoptr cast.
 // This test ensures that we do the round-trip correctly for AtomicPtr::fetch_byte_add, and also
 // ensures that we do not have such a round-trip for AtomicPtr::swap, because LLVM supports pointer
 // arguments to `atomicrmw xchg`.
@@ -20,8 +20,8 @@ pub fn helper(_: usize) {}
 // CHECK-LABEL: @atomicptr_fetch_byte_add
 #[no_mangle]
 pub fn atomicptr_fetch_byte_add(a: &AtomicPtr<u8>, v: usize) -> *mut u8 {
-    // CHECK: %[[INTPTR:.*]] = ptrtoint ptr %{{.*}} to [[USIZE]]
-    // CHECK-NEXT: %[[RET:.*]] = atomicrmw add ptr %{{.*}}, [[USIZE]] %[[INTPTR]]
+    // CHECK: llvm.lifetime.start
+    // CHECK-NEXT: %[[RET:.*]] = atomicrmw add ptr %{{.*}}, [[USIZE]] %v
     // CHECK-NEXT: inttoptr [[USIZE]] %[[RET]] to ptr
     a.fetch_byte_add(v, Relaxed)
 }
diff --git a/tests/codegen-llvm/bigint-helpers.rs b/tests/codegen-llvm/bigint-helpers.rs
index 355cccb8150..ec70a3eabed 100644
--- a/tests/codegen-llvm/bigint-helpers.rs
+++ b/tests/codegen-llvm/bigint-helpers.rs
@@ -3,11 +3,20 @@
 #![crate_type = "lib"]
 #![feature(bigint_helper_methods)]
 
+// Note that there's also an assembly test for this, which is what checks for
+// the `ADC` (Add with Carry) instruction on x86 now that the IR we emit uses
+// the preferred instruction phrasing instead of the intrinsic.
+
 // CHECK-LABEL: @u32_carrying_add
 #[no_mangle]
 pub fn u32_carrying_add(a: u32, b: u32, c: bool) -> (u32, bool) {
-    // CHECK: @llvm.uadd.with.overflow.i32
-    // CHECK: @llvm.uadd.with.overflow.i32
-    // CHECK: or disjoint i1
+    // CHECK: %[[AB:.+]] = add i32 {{%a, %b|%b, %a}}
+    // CHECK: %[[O1:.+]] = icmp ult i32 %[[AB]], %a
+    // CHECK: %[[CEXT:.+]] = zext i1 %c to i32
+    // CHECK: %[[ABC:.+]] = add i32 %[[AB]], %[[CEXT]]
+    // CHECK: %[[O2:.+]] = icmp ult i32 %[[ABC]], %[[AB]]
+    // CHECK: %[[O:.+]] = or disjoint i1 %[[O1]], %[[O2]]
+    // CHECK: insertvalue {{.+}}, i32 %[[ABC]], 0
+    // CHECK: insertvalue {{.+}}, i1 %[[O]], 1
     u32::carrying_add(a, b, c)
 }
diff --git a/tests/codegen-llvm/bounds-check-elision-slice-min.rs b/tests/codegen-llvm/bounds-check-elision-slice-min.rs
new file mode 100644
index 00000000000..e160e5da50f
--- /dev/null
+++ b/tests/codegen-llvm/bounds-check-elision-slice-min.rs
@@ -0,0 +1,19 @@
+//! Regression test for #<https://github.com/rust-lang/rust/issues/120433>:
+//! Multiple bounds checking elision failures
+//! (ensures bounds checks are properly elided,
+//! with no calls to panic_bounds_check in the LLVM IR).
+
+//@ compile-flags: -C opt-level=3
+
+#![crate_type = "lib"]
+
+// CHECK-LABEL: @foo
+// CHECK-NOT: panic_bounds_check
+#[no_mangle]
+pub fn foo(buf: &[u8], alloced_size: usize) -> &[u8] {
+    if alloced_size.checked_add(1).map(|total| buf.len() < total).unwrap_or(true) {
+        return &[];
+    }
+    let size = buf[0];
+    &buf[1..1 + usize::min(alloced_size, usize::from(size))]
+}
diff --git a/tests/codegen-llvm/dead_on_return.rs b/tests/codegen-llvm/dead_on_return.rs
new file mode 100644
index 00000000000..3c1940d6ba7
--- /dev/null
+++ b/tests/codegen-llvm/dead_on_return.rs
@@ -0,0 +1,31 @@
+//@ compile-flags: -C opt-level=3
+//@ min-llvm-version: 21
+
+#![crate_type = "lib"]
+#![allow(unused_assignments, unused_variables)]
+
+// Check that the old string is deallocated, but a new one is not initialized.
+#[unsafe(no_mangle)]
+pub fn test_str_new(mut s: String) {
+    // CHECK-LABEL: @test_str_new
+    // CHECK: __rust_dealloc
+    // CHECK-NOT: store
+    s = String::new();
+}
+
+#[unsafe(no_mangle)]
+pub fn test_str_take(mut x: String) -> String {
+    // CHECK-LABEL: @test_str_take
+    // CHECK-NEXT: {{.*}}:
+    // CHECK-NEXT: call void @llvm.memcpy
+    // CHECK-NEXT: ret
+    core::mem::take(&mut x)
+}
+
+#[unsafe(no_mangle)]
+pub fn test_array_store(mut x: [u32; 100]) {
+    // CHECK-LABEL: @test_array_store
+    // CHECK-NEXT: {{.*}}:
+    // CHECK-NEXT: ret
+    x[0] = 1;
+}
diff --git a/tests/codegen-llvm/enum/enum-discriminant-eq.rs b/tests/codegen-llvm/enum/enum-discriminant-eq.rs
index d599685c2e5..a1ab5e5c6e2 100644
--- a/tests/codegen-llvm/enum/enum-discriminant-eq.rs
+++ b/tests/codegen-llvm/enum/enum-discriminant-eq.rs
@@ -91,18 +91,23 @@ pub enum Mid<T> {
 pub fn mid_bool_eq_discr(a: Mid<bool>, b: Mid<bool>) -> bool {
     // CHECK-LABEL: @mid_bool_eq_discr(
 
-    // CHECK: %[[A_REL_DISCR:.+]] = add nsw i8 %a, -2
-    // CHECK: %[[A_IS_NICHE:.+]] = icmp samesign ugt i8 %a, 1
-    // CHECK: %[[A_NOT_HOLE:.+]] = icmp ne i8 %[[A_REL_DISCR]], 1
+    // CHECK: %[[A_NOT_HOLE:.+]] = icmp ne i8 %a, 3
     // CHECK: tail call void @llvm.assume(i1 %[[A_NOT_HOLE]])
-    // CHECK: %[[A_DISCR:.+]] = select i1 %[[A_IS_NICHE]], i8 %[[A_REL_DISCR]], i8 1
+    // LLVM20: %[[A_REL_DISCR:.+]] = add nsw i8 %a, -2
+    // CHECK: %[[A_IS_NICHE:.+]] = icmp samesign ugt i8 %a, 1
+    // LLVM20: %[[A_DISCR:.+]] = select i1 %[[A_IS_NICHE]], i8 %[[A_REL_DISCR]], i8 1
 
-    // CHECK: %[[B_REL_DISCR:.+]] = add nsw i8 %b, -2
-    // CHECK: %[[B_IS_NICHE:.+]] = icmp samesign ugt i8 %b, 1
-    // CHECK: %[[B_NOT_HOLE:.+]] = icmp ne i8 %[[B_REL_DISCR]], 1
+    // CHECK: %[[B_NOT_HOLE:.+]] = icmp ne i8 %b, 3
     // CHECK: tail call void @llvm.assume(i1 %[[B_NOT_HOLE]])
-    // CHECK: %[[B_DISCR:.+]] = select i1 %[[B_IS_NICHE]], i8 %[[B_REL_DISCR]], i8 1
+    // LLVM20: %[[B_REL_DISCR:.+]] = add nsw i8 %b, -2
+    // CHECK: %[[B_IS_NICHE:.+]] = icmp samesign ugt i8 %b, 1
+    // LLVM20: %[[B_DISCR:.+]] = select i1 %[[B_IS_NICHE]], i8 %[[B_REL_DISCR]], i8 1
+
+    // LLVM21: %[[A_MOD_DISCR:.+]] = select i1 %[[A_IS_NICHE]], i8 %a, i8 3
+    // LLVM21: %[[B_MOD_DISCR:.+]] = select i1 %[[B_IS_NICHE]], i8 %b, i8 3
 
+    // LLVM20: %[[R:.+]] = icmp eq i8 %[[A_DISCR]], %[[B_DISCR]]
+    // LLVM21: %[[R:.+]] = icmp eq i8 %[[A_MOD_DISCR]], %[[B_MOD_DISCR]]
     // CHECK: ret i1 %[[R]]
     discriminant_value(&a) == discriminant_value(&b)
 }
@@ -111,19 +116,23 @@ pub fn mid_bool_eq_discr(a: Mid<bool>, b: Mid<bool>) -> bool {
 pub fn mid_ord_eq_discr(a: Mid<Ordering>, b: Mid<Ordering>) -> bool {
     // CHECK-LABEL: @mid_ord_eq_discr(
 
-    // CHECK: %[[A_REL_DISCR:.+]] = add nsw i8 %a, -2
-    // CHECK: %[[A_IS_NICHE:.+]] = icmp sgt i8 %a, 1
-    // CHECK: %[[A_NOT_HOLE:.+]] = icmp ne i8 %[[A_REL_DISCR]], 1
+    // CHECK: %[[A_NOT_HOLE:.+]] = icmp ne i8 %a, 3
     // CHECK: tail call void @llvm.assume(i1 %[[A_NOT_HOLE]])
-    // CHECK: %[[A_DISCR:.+]] = select i1 %[[A_IS_NICHE]], i8 %[[A_REL_DISCR]], i8 1
+    // LLVM20: %[[A_REL_DISCR:.+]] = add nsw i8 %a, -2
+    // CHECK: %[[A_IS_NICHE:.+]] = icmp sgt i8 %a, 1
+    // LLVM20: %[[A_DISCR:.+]] = select i1 %[[A_IS_NICHE]], i8 %[[A_REL_DISCR]], i8 1
 
-    // CHECK: %[[B_REL_DISCR:.+]] = add nsw i8 %b, -2
-    // CHECK: %[[B_IS_NICHE:.+]] = icmp sgt i8 %b, 1
-    // CHECK: %[[B_NOT_HOLE:.+]] = icmp ne i8 %[[B_REL_DISCR]], 1
+    // CHECK: %[[B_NOT_HOLE:.+]] = icmp ne i8 %b, 3
     // CHECK: tail call void @llvm.assume(i1 %[[B_NOT_HOLE]])
-    // CHECK: %[[B_DISCR:.+]] = select i1 %[[B_IS_NICHE]], i8 %[[B_REL_DISCR]], i8 1
+    // LLVM20: %[[B_REL_DISCR:.+]] = add nsw i8 %b, -2
+    // CHECK: %[[B_IS_NICHE:.+]] = icmp sgt i8 %b, 1
+    // LLVM20: %[[B_DISCR:.+]] = select i1 %[[B_IS_NICHE]], i8 %[[B_REL_DISCR]], i8 1
 
-    // CHECK: %[[R:.+]] = icmp eq i8 %[[A_DISCR]], %[[B_DISCR]]
+    // LLVM21: %[[A_MOD_DISCR:.+]] = select i1 %[[A_IS_NICHE]], i8 %a, i8 3
+    // LLVM21: %[[B_MOD_DISCR:.+]] = select i1 %[[B_IS_NICHE]], i8 %b, i8 3
+
+    // LLVM20: %[[R:.+]] = icmp eq i8 %[[A_DISCR]], %[[B_DISCR]]
+    // LLVM21: %[[R:.+]] = icmp eq i8 %[[A_MOD_DISCR]], %[[B_MOD_DISCR]]
     // CHECK: ret i1 %[[R]]
     discriminant_value(&a) == discriminant_value(&b)
 }
@@ -140,16 +149,16 @@ pub fn mid_nz32_eq_discr(a: Mid<NonZero<u32>>, b: Mid<NonZero<u32>>) -> bool {
 pub fn mid_ac_eq_discr(a: Mid<AC>, b: Mid<AC>) -> bool {
     // CHECK-LABEL: @mid_ac_eq_discr(
 
-    // LLVM20: %[[A_REL_DISCR:.+]] = xor i8 %a, -128
-    // CHECK: %[[A_IS_NICHE:.+]] = icmp slt i8 %a, 0
     // CHECK: %[[A_NOT_HOLE:.+]] = icmp ne i8 %a, -127
     // CHECK: tail call void @llvm.assume(i1 %[[A_NOT_HOLE]])
+    // LLVM20: %[[A_REL_DISCR:.+]] = xor i8 %a, -128
+    // CHECK: %[[A_IS_NICHE:.+]] = icmp slt i8 %a, 0
     // LLVM20: %[[A_DISCR:.+]] = select i1 %[[A_IS_NICHE]], i8 %[[A_REL_DISCR]], i8 1
 
-    // LLVM20: %[[B_REL_DISCR:.+]] = xor i8 %b, -128
-    // CHECK: %[[B_IS_NICHE:.+]] = icmp slt i8 %b, 0
     // CHECK: %[[B_NOT_HOLE:.+]] = icmp ne i8 %b, -127
     // CHECK: tail call void @llvm.assume(i1 %[[B_NOT_HOLE]])
+    // LLVM20: %[[B_REL_DISCR:.+]] = xor i8 %b, -128
+    // CHECK: %[[B_IS_NICHE:.+]] = icmp slt i8 %b, 0
     // LLVM20: %[[B_DISCR:.+]] = select i1 %[[B_IS_NICHE]], i8 %[[B_REL_DISCR]], i8 1
 
     // LLVM21: %[[A_DISCR:.+]] = select i1 %[[A_IS_NICHE]], i8 %a, i8 -127
@@ -166,21 +175,25 @@ pub fn mid_ac_eq_discr(a: Mid<AC>, b: Mid<AC>) -> bool {
 pub fn mid_giant_eq_discr(a: Mid<Giant>, b: Mid<Giant>) -> bool {
     // CHECK-LABEL: @mid_giant_eq_discr(
 
+    // CHECK: %[[A_NOT_HOLE:.+]] = icmp ne i128 %a, 6
+    // CHECK: tail call void @llvm.assume(i1 %[[A_NOT_HOLE]])
     // CHECK: %[[A_TRUNC:.+]] = trunc nuw nsw i128 %a to i64
-    // CHECK: %[[A_REL_DISCR:.+]] = add nsw i64 %[[A_TRUNC]], -5
+    // LLVM20: %[[A_REL_DISCR:.+]] = add nsw i64 %[[A_TRUNC]], -5
     // CHECK: %[[A_IS_NICHE:.+]] = icmp samesign ugt i128 %a, 4
-    // CHECK: %[[A_NOT_HOLE:.+]] = icmp ne i64 %[[A_REL_DISCR]], 1
-    // CHECK: tail call void @llvm.assume(i1 %[[A_NOT_HOLE]])
-    // CHECK: %[[A_DISCR:.+]] = select i1 %[[A_IS_NICHE]], i64 %[[A_REL_DISCR]], i64 1
+    // LLVM20: %[[A_DISCR:.+]] = select i1 %[[A_IS_NICHE]], i64 %[[A_REL_DISCR]], i64 1
 
+    // CHECK: %[[B_NOT_HOLE:.+]] = icmp ne i128 %b, 6
+    // CHECK: tail call void @llvm.assume(i1 %[[B_NOT_HOLE]])
     // CHECK: %[[B_TRUNC:.+]] = trunc nuw nsw i128 %b to i64
-    // CHECK: %[[B_REL_DISCR:.+]] = add nsw i64 %[[B_TRUNC]], -5
+    // LLVM20: %[[B_REL_DISCR:.+]] = add nsw i64 %[[B_TRUNC]], -5
     // CHECK: %[[B_IS_NICHE:.+]] = icmp samesign ugt i128 %b, 4
-    // CHECK: %[[B_NOT_HOLE:.+]] = icmp ne i64 %[[B_REL_DISCR]], 1
-    // CHECK: tail call void @llvm.assume(i1 %[[B_NOT_HOLE]])
-    // CHECK: %[[B_DISCR:.+]] = select i1 %[[B_IS_NICHE]], i64 %[[B_REL_DISCR]], i64 1
+    // LLVM20: %[[B_DISCR:.+]] = select i1 %[[B_IS_NICHE]], i64 %[[B_REL_DISCR]], i64 1
+
+    // LLVM21: %[[A_MODIFIED_TAG:.+]] = select i1 %[[A_IS_NICHE]], i64 %[[A_TRUNC]], i64 6
+    // LLVM21: %[[B_MODIFIED_TAG:.+]] = select i1 %[[B_IS_NICHE]], i64 %[[B_TRUNC]], i64 6
+    // LLVM21: %[[R:.+]] = icmp eq i64 %[[A_MODIFIED_TAG]], %[[B_MODIFIED_TAG]]
 
-    // CHECK: %[[R:.+]] = icmp eq i64 %[[A_DISCR]], %[[B_DISCR]]
+    // LLVM20: %[[R:.+]] = icmp eq i64 %[[A_DISCR]], %[[B_DISCR]]
     // CHECK: ret i1 %[[R]]
     discriminant_value(&a) == discriminant_value(&b)
 }
diff --git a/tests/codegen-llvm/enum/enum-match.rs b/tests/codegen-llvm/enum/enum-match.rs
index 57db44ec74e..091c4e9adf4 100644
--- a/tests/codegen-llvm/enum/enum-match.rs
+++ b/tests/codegen-llvm/enum/enum-match.rs
@@ -138,18 +138,18 @@ pub fn match3(e: Option<&u8>) -> i16 {
 
 #[derive(PartialEq)]
 pub enum MiddleNiche {
-    A,
-    B,
-    C(bool),
-    D,
-    E,
+    A,       // tag 2
+    B,       // tag 3
+    C(bool), // untagged
+    D,       // tag 5
+    E,       // tag 6
 }
 
 // CHECK-LABEL: define{{( dso_local)?}} noundef{{( range\(i8 -?[0-9]+, -?[0-9]+\))?}} i8 @match4(i8{{.+}}%0)
 // CHECK-NEXT: start:
-// CHECK-NEXT: %[[REL_VAR:.+]] = add{{( nsw)?}} i8 %0, -2
-// CHECK-NEXT: %[[NOT_IMPOSSIBLE:.+]] = icmp ne i8 %[[REL_VAR]], 2
+// CHECK-NEXT: %[[NOT_IMPOSSIBLE:.+]] = icmp ne i8 %0, 4
 // CHECK-NEXT: call void @llvm.assume(i1 %[[NOT_IMPOSSIBLE]])
+// CHECK-NEXT: %[[REL_VAR:.+]] = add{{( nsw)?}} i8 %0, -2
 // CHECK-NEXT: %[[NOT_NICHE:.+]] = icmp{{( samesign)?}} ult i8 %0, 2
 // CHECK-NEXT: %[[DISCR:.+]] = select i1 %[[NOT_NICHE]], i8 2, i8 %[[REL_VAR]]
 // CHECK-NEXT: switch i8 %[[DISCR]]
@@ -443,19 +443,19 @@ pub enum HugeVariantIndex {
     V255(Never),
     V256(Never),
 
-    Possible257,
-    Bool258(bool),
-    Possible259,
+    Possible257,   // tag 2
+    Bool258(bool), // untagged
+    Possible259,   // tag 4
 }
 
 // CHECK-LABEL: define{{( dso_local)?}} noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @match5(i8{{.+}}%0)
 // CHECK-NEXT: start:
+// CHECK-NEXT: %[[NOT_IMPOSSIBLE:.+]] = icmp ne i8 %0, 3
+// CHECK-NEXT: call void @llvm.assume(i1 %[[NOT_IMPOSSIBLE]])
 // CHECK-NEXT: %[[REL_VAR:.+]] = add{{( nsw)?}} i8 %0, -2
 // CHECK-NEXT: %[[REL_VAR_WIDE:.+]] = zext i8 %[[REL_VAR]] to i64
 // CHECK-NEXT: %[[IS_NICHE:.+]] = icmp{{( samesign)?}} ugt i8 %0, 1
 // CHECK-NEXT: %[[NICHE_DISCR:.+]] = add nuw nsw i64 %[[REL_VAR_WIDE]], 257
-// CHECK-NEXT: %[[NOT_IMPOSSIBLE:.+]] = icmp ne i64 %[[NICHE_DISCR]], 258
-// CHECK-NEXT: call void @llvm.assume(i1 %[[NOT_IMPOSSIBLE]])
 // CHECK-NEXT: %[[DISCR:.+]] = select i1 %[[IS_NICHE]], i64 %[[NICHE_DISCR]], i64 258
 // CHECK-NEXT: switch i64 %[[DISCR]],
 // CHECK-NEXT:   i64 257,
diff --git a/tests/codegen-llvm/function-arguments.rs b/tests/codegen-llvm/function-arguments.rs
index c8cd8526ae5..a3fafbe6f82 100644
--- a/tests/codegen-llvm/function-arguments.rs
+++ b/tests/codegen-llvm/function-arguments.rs
@@ -134,7 +134,7 @@ pub fn mutable_notunpin_borrow(_: &mut NotUnpin) {}
 #[no_mangle]
 pub fn notunpin_borrow(_: &NotUnpin) {}
 
-// CHECK: @indirect_struct(ptr noalias{{( nocapture)?}} noundef readonly align 4{{( captures\(none\))?}} dereferenceable(32) %_1)
+// CHECK: @indirect_struct(ptr{{( dead_on_return)?}} noalias{{( nocapture)?}} noundef readonly align 4{{( captures\(none\))?}} dereferenceable(32) %_1)
 #[no_mangle]
 pub fn indirect_struct(_: S) {}
 
diff --git a/tests/codegen-llvm/issues/saturating-sub-index-139759.rs b/tests/codegen-llvm/issues/saturating-sub-index-139759.rs
new file mode 100644
index 00000000000..eac2f4d306b
--- /dev/null
+++ b/tests/codegen-llvm/issues/saturating-sub-index-139759.rs
@@ -0,0 +1,19 @@
+// Test that calculating an index with saturating subtraction from an in-bounds
+// index doesn't generate another bounds check.
+
+//@ compile-flags: -Copt-level=3
+//@ min-llvm-version: 21
+
+#![crate_type = "lib"]
+
+// CHECK-LABEL: @bounds_check_is_elided
+#[no_mangle]
+pub fn bounds_check_is_elided(s: &[i32], index: usize) -> i32 {
+    // CHECK-NOT: panic_bounds_check
+    if index < s.len() {
+        let lower_bound = index.saturating_sub(1);
+        s[lower_bound]
+    } else {
+        -1
+    }
+}
diff --git a/tests/codegen-llvm/loongarch-abi/loongarch64-lp64d-abi.rs b/tests/codegen-llvm/loongarch-abi/loongarch64-lp64d-abi.rs
index 93c8d60930b..4666342a16a 100644
--- a/tests/codegen-llvm/loongarch-abi/loongarch64-lp64d-abi.rs
+++ b/tests/codegen-llvm/loongarch-abi/loongarch64-lp64d-abi.rs
@@ -256,7 +256,7 @@ pub struct IntDoubleInt {
     c: i32,
 }
 
-// CHECK: define void @f_int_double_int_s_arg(ptr noalias{{( nocapture)?}} noundef align 8{{( captures\(none\))?}} dereferenceable(24) %a)
+// CHECK: define void @f_int_double_int_s_arg(ptr{{( dead_on_return)?}} noalias{{( nocapture)?}} noundef align 8{{( captures\(none\))?}} dereferenceable(24) %a)
 #[no_mangle]
 pub extern "C" fn f_int_double_int_s_arg(a: IntDoubleInt) {}
 
diff --git a/tests/codegen-llvm/sanitizer/cfi/external_weak_symbols.rs b/tests/codegen-llvm/sanitizer/cfi/external_weak_symbols.rs
index 00e9b5029af..b3cb6dfdd37 100644
--- a/tests/codegen-llvm/sanitizer/cfi/external_weak_symbols.rs
+++ b/tests/codegen-llvm/sanitizer/cfi/external_weak_symbols.rs
@@ -10,7 +10,7 @@ unsafe extern "C" {
     #[linkage = "extern_weak"]
     static FOO: Option<unsafe extern "C" fn(f64) -> ()>;
 }
-// CHECK: @_rust_extern_with_linkage_FOO = internal global ptr @FOO
+// CHECK: @_rust_extern_with_linkage_{{.*}}_FOO = internal global ptr @FOO
 
 fn main() {
     unsafe {
diff --git a/tests/codegen-llvm/simd/extract-insert-dyn.rs b/tests/codegen-llvm/simd/extract-insert-dyn.rs
index 729f0145314..9c17b82e553 100644
--- a/tests/codegen-llvm/simd/extract-insert-dyn.rs
+++ b/tests/codegen-llvm/simd/extract-insert-dyn.rs
@@ -5,7 +5,8 @@
     repr_simd,
     arm_target_feature,
     mips_target_feature,
-    s390x_target_feature
+    s390x_target_feature,
+    riscv_target_feature
 )]
 #![no_std]
 #![crate_type = "lib"]
@@ -25,97 +26,105 @@ pub struct u32x16([u32; 16]);
 pub struct i8x16([i8; 16]);
 
 // CHECK-LABEL: dyn_simd_extract
-// CHECK: extractelement <16 x i8> %x, i32 %idx
+// CHECK: extractelement <16 x i8> %[[TEMP:.+]], i32 %idx
 #[no_mangle]
 #[cfg_attr(target_family = "wasm", target_feature(enable = "simd128"))]
 #[cfg_attr(target_arch = "arm", target_feature(enable = "neon"))]
 #[cfg_attr(target_arch = "x86", target_feature(enable = "sse"))]
 #[cfg_attr(target_arch = "mips", target_feature(enable = "msa"))]
 #[cfg_attr(target_arch = "s390x", target_feature(enable = "vector"))]
+#[cfg_attr(target_arch = "riscv64", target_feature(enable = "v"))]
 unsafe extern "C" fn dyn_simd_extract(x: i8x16, idx: u32) -> i8 {
     simd_extract_dyn(x, idx)
 }
 
 // CHECK-LABEL: literal_dyn_simd_extract
-// CHECK: extractelement <16 x i8> %x, i32 7
+// CHECK: extractelement <16 x i8> %[[TEMP:.+]], i32 7
 #[no_mangle]
 #[cfg_attr(target_family = "wasm", target_feature(enable = "simd128"))]
 #[cfg_attr(target_arch = "arm", target_feature(enable = "neon"))]
 #[cfg_attr(target_arch = "x86", target_feature(enable = "sse"))]
 #[cfg_attr(target_arch = "mips", target_feature(enable = "msa"))]
 #[cfg_attr(target_arch = "s390x", target_feature(enable = "vector"))]
+#[cfg_attr(target_arch = "riscv64", target_feature(enable = "v"))]
 unsafe extern "C" fn literal_dyn_simd_extract(x: i8x16) -> i8 {
     simd_extract_dyn(x, 7)
 }
 
 // CHECK-LABEL: const_dyn_simd_extract
-// CHECK: extractelement <16 x i8> %x, i32 7
+// CHECK: extractelement <16 x i8> %[[TEMP:.+]], i32 7
 #[no_mangle]
 #[cfg_attr(target_family = "wasm", target_feature(enable = "simd128"))]
 #[cfg_attr(target_arch = "arm", target_feature(enable = "neon"))]
 #[cfg_attr(target_arch = "x86", target_feature(enable = "sse"))]
 #[cfg_attr(target_arch = "mips", target_feature(enable = "msa"))]
 #[cfg_attr(target_arch = "s390x", target_feature(enable = "vector"))]
+#[cfg_attr(target_arch = "riscv64", target_feature(enable = "v"))]
 unsafe extern "C" fn const_dyn_simd_extract(x: i8x16) -> i8 {
     simd_extract_dyn(x, const { 3 + 4 })
 }
 
 // CHECK-LABEL: const_simd_extract
-// CHECK: extractelement <16 x i8> %x, i32 7
+// CHECK: extractelement <16 x i8> %[[TEMP:.+]], i32 7
 #[no_mangle]
 #[cfg_attr(target_family = "wasm", target_feature(enable = "simd128"))]
 #[cfg_attr(target_arch = "arm", target_feature(enable = "neon"))]
 #[cfg_attr(target_arch = "x86", target_feature(enable = "sse"))]
 #[cfg_attr(target_arch = "mips", target_feature(enable = "msa"))]
 #[cfg_attr(target_arch = "s390x", target_feature(enable = "vector"))]
+#[cfg_attr(target_arch = "riscv64", target_feature(enable = "v"))]
 unsafe extern "C" fn const_simd_extract(x: i8x16) -> i8 {
     simd_extract(x, const { 3 + 4 })
 }
 
 // CHECK-LABEL: dyn_simd_insert
-// CHECK: insertelement <16 x i8> %x, i8 %e, i32 %idx
+// CHECK: insertelement <16 x i8> %[[TEMP:.+]], i8 %e, i32 %idx
 #[no_mangle]
 #[cfg_attr(target_family = "wasm", target_feature(enable = "simd128"))]
 #[cfg_attr(target_arch = "arm", target_feature(enable = "neon"))]
 #[cfg_attr(target_arch = "x86", target_feature(enable = "sse"))]
 #[cfg_attr(target_arch = "mips", target_feature(enable = "msa"))]
 #[cfg_attr(target_arch = "s390x", target_feature(enable = "vector"))]
+#[cfg_attr(target_arch = "riscv64", target_feature(enable = "v"))]
 unsafe extern "C" fn dyn_simd_insert(x: i8x16, e: i8, idx: u32) -> i8x16 {
     simd_insert_dyn(x, idx, e)
 }
 
 // CHECK-LABEL: literal_dyn_simd_insert
-// CHECK: insertelement <16 x i8> %x, i8 %e, i32 7
+// CHECK: insertelement <16 x i8> %[[TEMP:.+]], i8 %e, i32 7
 #[no_mangle]
 #[cfg_attr(target_family = "wasm", target_feature(enable = "simd128"))]
 #[cfg_attr(target_arch = "arm", target_feature(enable = "neon"))]
 #[cfg_attr(target_arch = "x86", target_feature(enable = "sse"))]
 #[cfg_attr(target_arch = "mips", target_feature(enable = "msa"))]
 #[cfg_attr(target_arch = "s390x", target_feature(enable = "vector"))]
+#[cfg_attr(target_arch = "riscv64", target_feature(enable = "v"))]
 unsafe extern "C" fn literal_dyn_simd_insert(x: i8x16, e: i8) -> i8x16 {
     simd_insert_dyn(x, 7, e)
 }
 
 // CHECK-LABEL: const_dyn_simd_insert
-// CHECK: insertelement <16 x i8> %x, i8 %e, i32 7
+// CHECK: insertelement <16 x i8> %[[TEMP:.+]], i8 %e, i32 7
 #[no_mangle]
 #[cfg_attr(target_family = "wasm", target_feature(enable = "simd128"))]
 #[cfg_attr(target_arch = "arm", target_feature(enable = "neon"))]
 #[cfg_attr(target_arch = "x86", target_feature(enable = "sse"))]
 #[cfg_attr(target_arch = "mips", target_feature(enable = "msa"))]
 #[cfg_attr(target_arch = "s390x", target_feature(enable = "vector"))]
+#[cfg_attr(target_arch = "riscv64", target_feature(enable = "v"))]
 unsafe extern "C" fn const_dyn_simd_insert(x: i8x16, e: i8) -> i8x16 {
     simd_insert_dyn(x, const { 3 + 4 }, e)
 }
 
 // CHECK-LABEL: const_simd_insert
-// CHECK: insertelement <16 x i8> %x, i8 %e, i32 7
+// CHECK: insertelement <16 x i8> %[[TEMP:.+]], i8 %e, i32 7
 #[no_mangle]
 #[cfg_attr(target_family = "wasm", target_feature(enable = "simd128"))]
 #[cfg_attr(target_arch = "arm", target_feature(enable = "neon"))]
 #[cfg_attr(target_arch = "x86", target_feature(enable = "sse"))]
 #[cfg_attr(target_arch = "mips", target_feature(enable = "msa"))]
 #[cfg_attr(target_arch = "s390x", target_feature(enable = "vector"))]
+#[cfg_attr(target_arch = "riscv64", target_feature(enable = "v"))]
 unsafe extern "C" fn const_simd_insert(x: i8x16, e: i8) -> i8x16 {
     simd_insert(x, const { 3 + 4 }, e)
 }
diff --git a/tests/coverage/branch/no-mir-spans.cov-map b/tests/coverage/branch/no-mir-spans.cov-map
deleted file mode 100644
index 4f893cba1f8..00000000000
--- a/tests/coverage/branch/no-mir-spans.cov-map
+++ /dev/null
@@ -1,63 +0,0 @@
-Function name: no_mir_spans::while_cond
-Raw bytes (18): 0x[01, 01, 01, 05, 01, 02, 01, 10, 01, 00, 10, 20, 02, 01, 04, 0b, 00, 10]
-Number of files: 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
-- Code(Counter(0)) at (prev + 16, 1) to (start + 0, 16)
-- Branch { true: Expression(0, Sub), false: Counter(0) } at (prev + 4, 11) to (start + 0, 16)
-    true  = (c1 - c0)
-    false = c0
-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, 14, 20, 02, 01, 04, 0b, 00, 14]
-Number of files: 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
-- Code(Counter(0)) at (prev + 25, 1) to (start + 0, 20)
-- Branch { true: Expression(0, Sub), false: Counter(0) } at (prev + 4, 11) to (start + 0, 20)
-    true  = (c1 - c0)
-    false = c0
-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, 12, 20, 05, 02, 05, 0b, 00, 10, 20, 06, 0a, 00, 14, 00, 19]
-Number of files: 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)
-- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(0), rhs = Counter(1)
-Number of file 0 mappings: 3
-- Code(Counter(0)) at (prev + 34, 1) to (start + 0, 18)
-- Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 5, 11) to (start + 0, 16)
-    true  = c1
-    false = (c2 - c1)
-- Branch { true: Expression(1, Sub), false: Expression(2, Sub) } at (prev + 0, 20) to (start + 0, 25)
-    true  = (c2 - c0)
-    false = ((c0 + c1) - c2)
-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, 11, 20, 05, 02, 05, 0b, 00, 10, 20, 06, 01, 00, 14, 00, 19]
-Number of files: 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)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
-Number of file 0 mappings: 3
-- Code(Counter(0)) at (prev + 45, 1) to (start + 0, 17)
-- Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 5, 11) to (start + 0, 16)
-    true  = c1
-    false = (c2 - c1)
-- Branch { true: Expression(1, Sub), false: Counter(0) } at (prev + 0, 20) to (start + 0, 25)
-    true  = (c2 - (c0 + c1))
-    false = c0
-Highest counter ID seen: c1
-
diff --git a/tests/coverage/branch/no-mir-spans.coverage b/tests/coverage/branch/no-mir-spans.coverage
deleted file mode 100644
index 2cae98ed3ff..00000000000
--- a/tests/coverage/branch/no-mir-spans.coverage
+++ /dev/null
@@ -1,77 +0,0 @@
-   LL|       |#![feature(coverage_attribute)]
-   LL|       |//@ edition: 2021
-   LL|       |//@ compile-flags: -Zcoverage-options=branch,no-mir-spans
-   LL|       |//@ llvm-cov-flags: --show-branches=count
-   LL|       |
-   LL|       |// Tests the behaviour of the `-Zcoverage-options=no-mir-spans` debugging flag.
-   LL|       |// The actual code below is just some non-trivial code copied from another test
-   LL|       |// (`while.rs`), and has no particular significance.
-   LL|       |
-   LL|       |macro_rules! no_merge {
-   LL|       |    () => {
-   LL|       |        for _ in 0..1 {}
-   LL|       |    };
-   LL|       |}
-   LL|       |
-   LL|      1|fn while_cond() {
-   LL|       |    no_merge!();
-   LL|       |
-   LL|       |    let mut a = 8;
-   LL|       |    while a > 0 {
-  ------------------
-  |  Branch (LL:11): [True: 8, False: 1]
-  ------------------
-   LL|       |        a -= 1;
-   LL|       |    }
-   LL|       |}
-   LL|       |
-   LL|      1|fn while_cond_not() {
-   LL|       |    no_merge!();
-   LL|       |
-   LL|       |    let mut a = 8;
-   LL|       |    while !(a == 0) {
-  ------------------
-  |  Branch (LL:11): [True: 8, False: 1]
-  ------------------
-   LL|       |        a -= 1;
-   LL|       |    }
-   LL|       |}
-   LL|       |
-   LL|      1|fn while_op_and() {
-   LL|       |    no_merge!();
-   LL|       |
-   LL|       |    let mut a = 8;
-   LL|       |    let mut b = 4;
-   LL|       |    while a > 0 && b > 0 {
-  ------------------
-  |  Branch (LL:11): [True: 5, False: 0]
-  |  Branch (LL:20): [True: 4, False: 1]
-  ------------------
-   LL|       |        a -= 1;
-   LL|       |        b -= 1;
-   LL|       |    }
-   LL|       |}
-   LL|       |
-   LL|      1|fn while_op_or() {
-   LL|       |    no_merge!();
-   LL|       |
-   LL|       |    let mut a = 4;
-   LL|       |    let mut b = 8;
-   LL|       |    while a > 0 || b > 0 {
-  ------------------
-  |  Branch (LL:11): [True: 4, False: 5]
-  |  Branch (LL:20): [True: 4, False: 1]
-  ------------------
-   LL|       |        a -= 1;
-   LL|       |        b -= 1;
-   LL|       |    }
-   LL|       |}
-   LL|       |
-   LL|       |#[coverage(off)]
-   LL|       |fn main() {
-   LL|       |    while_cond();
-   LL|       |    while_cond_not();
-   LL|       |    while_op_and();
-   LL|       |    while_op_or();
-   LL|       |}
-
diff --git a/tests/coverage/branch/no-mir-spans.rs b/tests/coverage/branch/no-mir-spans.rs
deleted file mode 100644
index acb268f2d45..00000000000
--- a/tests/coverage/branch/no-mir-spans.rs
+++ /dev/null
@@ -1,62 +0,0 @@
-#![feature(coverage_attribute)]
-//@ edition: 2021
-//@ compile-flags: -Zcoverage-options=branch,no-mir-spans
-//@ llvm-cov-flags: --show-branches=count
-
-// Tests the behaviour of the `-Zcoverage-options=no-mir-spans` debugging flag.
-// The actual code below is just some non-trivial code copied from another test
-// (`while.rs`), and has no particular significance.
-
-macro_rules! no_merge {
-    () => {
-        for _ in 0..1 {}
-    };
-}
-
-fn while_cond() {
-    no_merge!();
-
-    let mut a = 8;
-    while a > 0 {
-        a -= 1;
-    }
-}
-
-fn while_cond_not() {
-    no_merge!();
-
-    let mut a = 8;
-    while !(a == 0) {
-        a -= 1;
-    }
-}
-
-fn while_op_and() {
-    no_merge!();
-
-    let mut a = 8;
-    let mut b = 4;
-    while a > 0 && b > 0 {
-        a -= 1;
-        b -= 1;
-    }
-}
-
-fn while_op_or() {
-    no_merge!();
-
-    let mut a = 4;
-    let mut b = 8;
-    while a > 0 || b > 0 {
-        a -= 1;
-        b -= 1;
-    }
-}
-
-#[coverage(off)]
-fn main() {
-    while_cond();
-    while_cond_not();
-    while_op_and();
-    while_op_or();
-}
diff --git a/tests/coverage/mcdc/condition-limit.cov-map b/tests/coverage/mcdc/condition-limit.cov-map
deleted file mode 100644
index ffee97cfbc5..00000000000
--- a/tests/coverage/mcdc/condition-limit.cov-map
+++ /dev/null
@@ -1,58 +0,0 @@
-Function name: condition_limit::accept_7_conditions
-Raw bytes (192): 0x[01, 01, 08, 01, 05, 05, 09, 09, 0d, 0d, 11, 11, 15, 15, 19, 19, 1d, 01, 1d, 1b, 01, 06, 01, 00, 2c, 01, 01, 0a, 00, 0b, 01, 00, 0d, 00, 0e, 01, 00, 10, 00, 11, 01, 00, 13, 00, 14, 01, 00, 16, 00, 17, 01, 00, 19, 00, 1a, 01, 00, 1c, 00, 1d, 01, 00, 21, 00, 29, 01, 01, 08, 00, 09, 28, 08, 07, 00, 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 => $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)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 3 operands: lhs = Counter(3), rhs = Counter(4)
-- expression 4 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 5 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 6 operands: lhs = Counter(6), rhs = Counter(7)
-- expression 7 operands: lhs = Counter(0), rhs = Counter(7)
-Number of file 0 mappings: 27
-- Code(Counter(0)) at (prev + 6, 1) to (start + 0, 44)
-- Code(Counter(0)) at (prev + 1, 10) to (start + 0, 11)
-- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
-- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 17)
-- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 20)
-- Code(Counter(0)) at (prev + 0, 22) to (start + 0, 23)
-- Code(Counter(0)) at (prev + 0, 25) to (start + 0, 26)
-- Code(Counter(0)) at (prev + 0, 28) to (start + 0, 29)
-- Code(Counter(0)) at (prev + 0, 33) to (start + 0, 41)
-- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9)
-- MCDCDecision { bitmap_idx: 8, conditions_num: 7 } at (prev + 0, 8) to (start + 0, 39)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 7, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
-    true  = c1
-    false = (c0 - c1)
-- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 7, true_next_id: 6, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c2
-    false = (c1 - c2)
-- Code(Counter(2)) at (prev + 0, 18) to (start + 0, 19)
-- MCDCBranch { true: Counter(3), false: Expression(2, Sub), condition_id: 6, true_next_id: 5, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
-    true  = c3
-    false = (c2 - c3)
-- Code(Counter(3)) at (prev + 0, 23) to (start + 0, 24)
-- MCDCBranch { true: Counter(4), false: Expression(3, Sub), condition_id: 5, true_next_id: 4, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
-    true  = c4
-    false = (c3 - c4)
-- Code(Counter(4)) at (prev + 0, 28) to (start + 0, 29)
-- MCDCBranch { true: Counter(5), false: Expression(4, Sub), condition_id: 4, true_next_id: 3, false_next_id: 0 } at (prev + 0, 28) to (start + 0, 29)
-    true  = c5
-    false = (c4 - c5)
-- Code(Counter(5)) at (prev + 0, 33) to (start + 0, 34)
-- MCDCBranch { true: Counter(6), false: Expression(5, Sub), condition_id: 3, true_next_id: 2, false_next_id: 0 } at (prev + 0, 33) to (start + 0, 34)
-    true  = c6
-    false = (c5 - c6)
-- Code(Counter(6)) at (prev + 0, 38) to (start + 0, 39)
-- MCDCBranch { true: Counter(7), false: Expression(6, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 38) to (start + 0, 39)
-    true  = c7
-    false = (c6 - c7)
-- Code(Counter(7)) at (prev + 0, 40) to (start + 2, 6)
-- Code(Expression(7, Sub)) at (prev + 2, 5) to (start + 0, 6)
-    = (c0 - c7)
-- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
-Highest counter ID seen: c7
-
diff --git a/tests/coverage/mcdc/condition-limit.coverage b/tests/coverage/mcdc/condition-limit.coverage
deleted file mode 100644
index 04ccd6497c3..00000000000
--- a/tests/coverage/mcdc/condition-limit.coverage
+++ /dev/null
@@ -1,55 +0,0 @@
-   LL|       |#![feature(coverage_attribute)]
-   LL|       |//@ edition: 2021
-   LL|       |//@ compile-flags: -Zcoverage-options=mcdc
-   LL|       |//@ llvm-cov-flags: --show-branches=count --show-mcdc
-   LL|       |
-   LL|      2|fn accept_7_conditions(bool_arr: [bool; 7]) {
-   LL|      2|    let [a, b, c, d, e, f, g] = bool_arr;
-   LL|      2|    if a && b && c && d && e && f && g {
-                          ^1   ^1   ^1   ^1   ^1   ^1
-  ------------------
-  |  Branch (LL:8): [True: 1, False: 1]
-  |  Branch (LL:13): [True: 1, False: 0]
-  |  Branch (LL:18): [True: 1, False: 0]
-  |  Branch (LL:23): [True: 1, False: 0]
-  |  Branch (LL:28): [True: 1, False: 0]
-  |  Branch (LL:33): [True: 1, False: 0]
-  |  Branch (LL:38): [True: 1, False: 0]
-  ------------------
-  |---> MC/DC Decision Region (LL:8) to (LL:39)
-  |
-  |  Number of Conditions: 7
-  |     Condition C1 --> (LL:8)
-  |     Condition C2 --> (LL:13)
-  |     Condition C3 --> (LL:18)
-  |     Condition C4 --> (LL:23)
-  |     Condition C5 --> (LL:28)
-  |     Condition C6 --> (LL:33)
-  |     Condition C7 --> (LL:38)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2, C3, C4, C5, C6, C7    Result
-  |  1 { F,  -,  -,  -,  -,  -,  -  = F      }
-  |  2 { T,  T,  T,  T,  T,  T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,2)
-  |  C2-Pair: not covered
-  |  C3-Pair: not covered
-  |  C4-Pair: not covered
-  |  C5-Pair: not covered
-  |  C6-Pair: not covered
-  |  C7-Pair: not covered
-  |  MC/DC Coverage for Decision: 14.29%
-  |
-  ------------------
-   LL|      1|        core::hint::black_box("hello");
-   LL|      1|    }
-   LL|      2|}
-   LL|       |
-   LL|       |#[coverage(off)]
-   LL|       |fn main() {
-   LL|       |    accept_7_conditions([false; 7]);
-   LL|       |    accept_7_conditions([true; 7]);
-   LL|       |}
-
diff --git a/tests/coverage/mcdc/condition-limit.rs b/tests/coverage/mcdc/condition-limit.rs
deleted file mode 100644
index 867636cdaed..00000000000
--- a/tests/coverage/mcdc/condition-limit.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-#![feature(coverage_attribute)]
-//@ edition: 2021
-//@ compile-flags: -Zcoverage-options=mcdc
-//@ llvm-cov-flags: --show-branches=count --show-mcdc
-
-fn accept_7_conditions(bool_arr: [bool; 7]) {
-    let [a, b, c, d, e, f, g] = bool_arr;
-    if a && b && c && d && e && f && g {
-        core::hint::black_box("hello");
-    }
-}
-
-#[coverage(off)]
-fn main() {
-    accept_7_conditions([false; 7]);
-    accept_7_conditions([true; 7]);
-}
diff --git a/tests/coverage/mcdc/if.cov-map b/tests/coverage/mcdc/if.cov-map
deleted file mode 100644
index dac1eb4c94b..00000000000
--- a/tests/coverage/mcdc/if.cov-map
+++ /dev/null
@@ -1,223 +0,0 @@
-Function name: if::mcdc_check_a
-Raw bytes (67): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 09, 01, 0e, 01, 00, 22, 01, 01, 08, 00, 09, 28, 03, 02, 00, 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 => $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)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
-Number of file 0 mappings: 9
-- Code(Counter(0)) at (prev + 14, 1) to (start + 0, 34)
-- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 8) to (start + 0, 14)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
-    true  = c1
-    false = (c0 - c1)
-- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c2
-    false = (c1 - c2)
-- Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = (c0 - c2)
-- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
-Highest counter ID seen: c2
-
-Function name: if::mcdc_check_b
-Raw bytes (67): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 09, 01, 16, 01, 00, 22, 01, 01, 08, 00, 09, 28, 03, 02, 00, 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 => $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)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
-Number of file 0 mappings: 9
-- Code(Counter(0)) at (prev + 22, 1) to (start + 0, 34)
-- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 8) to (start + 0, 14)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
-    true  = c1
-    false = (c0 - c1)
-- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c2
-    false = (c1 - c2)
-- Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = (c0 - c2)
-- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
-Highest counter ID seen: c2
-
-Function name: if::mcdc_check_both
-Raw bytes (67): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 09, 01, 1e, 01, 00, 25, 01, 01, 08, 00, 09, 28, 03, 02, 00, 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 => $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)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
-Number of file 0 mappings: 9
-- Code(Counter(0)) at (prev + 30, 1) to (start + 0, 37)
-- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 8) to (start + 0, 14)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
-    true  = c1
-    false = (c0 - c1)
-- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c2
-    false = (c1 - c2)
-- Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = (c0 - c2)
-- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
-Highest counter ID seen: c2
-
-Function name: if::mcdc_check_neither
-Raw bytes (67): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 09, 01, 06, 01, 00, 28, 01, 01, 08, 00, 09, 28, 03, 02, 00, 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 => $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)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
-Number of file 0 mappings: 9
-- Code(Counter(0)) at (prev + 6, 1) to (start + 0, 40)
-- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 8) to (start + 0, 14)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
-    true  = c1
-    false = (c0 - c1)
-- Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c2
-    false = (c1 - c2)
-- Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = (c0 - c2)
-- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
-Highest counter ID seen: c2
-
-Function name: if::mcdc_check_not_tree_decision
-Raw bytes (90): 0x[01, 01, 07, 01, 05, 01, 17, 05, 09, 05, 09, 17, 0d, 05, 09, 01, 0d, 0b, 01, 30, 01, 00, 3b, 28, 05, 03, 03, 08, 00, 15, 01, 00, 09, 00, 0a, 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 => $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)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 6 operands: lhs = Counter(0), rhs = Counter(3)
-Number of file 0 mappings: 11
-- Code(Counter(0)) at (prev + 48, 1) to (start + 0, 59)
-- MCDCDecision { bitmap_idx: 5, conditions_num: 3 } at (prev + 3, 8) to (start + 0, 21)
-- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 10)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 3 } at (prev + 0, 9) to (start + 0, 10)
-    true  = c1
-    false = (c0 - c1)
-- Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 15)
-    = (c0 - c1)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 3, true_next_id: 2, false_next_id: 0 } at (prev + 0, 14) to (start + 0, 15)
-    true  = c2
-    false = (c0 - (c1 + c2))
-- Code(Expression(5, Add)) at (prev + 0, 20) to (start + 0, 21)
-    = (c1 + c2)
-- MCDCBranch { true: Counter(3), false: Expression(4, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 20) to (start + 0, 21)
-    true  = c3
-    false = ((c1 + c2) - c3)
-- Code(Counter(3)) at (prev + 0, 22) to (start + 2, 6)
-- Code(Expression(6, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = (c0 - c3)
-- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
-Highest counter ID seen: c3
-
-Function name: if::mcdc_check_tree_decision
-Raw bytes (92): 0x[01, 01, 08, 01, 05, 05, 09, 05, 09, 05, 1f, 09, 0d, 09, 0d, 01, 1f, 09, 0d, 0b, 01, 26, 01, 00, 37, 01, 03, 08, 00, 09, 28, 04, 03, 00, 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 => $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)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(1), rhs = Expression(7, Add)
-- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 6 operands: lhs = Counter(0), rhs = Expression(7, Add)
-- expression 7 operands: lhs = Counter(2), rhs = Counter(3)
-Number of file 0 mappings: 11
-- Code(Counter(0)) at (prev + 38, 1) to (start + 0, 55)
-- Code(Counter(0)) at (prev + 3, 8) to (start + 0, 9)
-- MCDCDecision { bitmap_idx: 4, conditions_num: 3 } at (prev + 0, 8) to (start + 0, 21)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
-    true  = c1
-    false = (c0 - c1)
-- Code(Counter(1)) at (prev + 0, 14) to (start + 0, 15)
-- MCDCBranch { true: Counter(2), false: Expression(2, Sub), condition_id: 2, true_next_id: 0, false_next_id: 3 } at (prev + 0, 14) to (start + 0, 15)
-    true  = c2
-    false = (c1 - c2)
-- Code(Expression(2, Sub)) at (prev + 0, 19) to (start + 0, 20)
-    = (c1 - c2)
-- MCDCBranch { true: Counter(3), false: Expression(3, Sub), condition_id: 3, true_next_id: 0, false_next_id: 0 } at (prev + 0, 19) to (start + 0, 20)
-    true  = c3
-    false = (c1 - (c2 + c3))
-- Code(Expression(7, Add)) at (prev + 0, 22) to (start + 2, 6)
-    = (c2 + c3)
-- Code(Expression(6, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = (c0 - (c2 + c3))
-- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
-Highest counter ID seen: c3
-
-Function name: if::mcdc_nested_if
-Raw bytes (139): 0x[01, 01, 0d, 01, 05, 01, 33, 05, 09, 05, 09, 05, 09, 05, 09, 33, 0d, 05, 09, 0d, 11, 33, 11, 05, 09, 01, 33, 05, 09, 11, 01, 3a, 01, 00, 2d, 01, 01, 08, 00, 09, 28, 03, 02, 00, 08, 00, 0e, 30, 05, 02, 01, 00, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 30, 09, 2e, 02, 00, 00, 00, 0d, 00, 0e, 33, 01, 09, 00, 0c, 33, 00, 0d, 00, 15, 33, 01, 0c, 00, 0d, 28, 06, 02, 00, 0c, 00, 12, 30, 0d, 1a, 01, 02, 00, 00, 0c, 00, 0d, 0d, 00, 11, 00, 12, 30, 11, 22, 02, 00, 00, 00, 11, 00, 12, 11, 00, 13, 02, 0a, 26, 02, 09, 00, 0a, 2e, 01, 0c, 02, 06, 01, 03, 01, 00, 02]
-Number of files: 1
-- file 0 => $DIR/if.rs
-Number of expressions: 13
-- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(0), rhs = Expression(12, Add)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 4 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 6 operands: lhs = Expression(12, Add), rhs = Counter(3)
-- expression 7 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 8 operands: lhs = Counter(3), rhs = Counter(4)
-- expression 9 operands: lhs = Expression(12, Add), rhs = Counter(4)
-- expression 10 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 11 operands: lhs = Counter(0), rhs = Expression(12, Add)
-- expression 12 operands: lhs = Counter(1), rhs = Counter(2)
-Number of file 0 mappings: 17
-- Code(Counter(0)) at (prev + 58, 1) to (start + 0, 45)
-- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 8) to (start + 0, 14)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 8) to (start + 0, 9)
-    true  = c1
-    false = (c0 - c1)
-- Code(Expression(0, Sub)) at (prev + 0, 13) to (start + 0, 14)
-    = (c0 - c1)
-- MCDCBranch { true: Counter(2), false: Expression(11, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c2
-    false = (c0 - (c1 + c2))
-- Code(Expression(12, Add)) at (prev + 1, 9) to (start + 0, 12)
-    = (c1 + c2)
-- Code(Expression(12, Add)) at (prev + 0, 13) to (start + 0, 21)
-    = (c1 + c2)
-- Code(Expression(12, Add)) at (prev + 1, 12) to (start + 0, 13)
-    = (c1 + c2)
-- MCDCDecision { bitmap_idx: 6, conditions_num: 2 } at (prev + 0, 12) to (start + 0, 18)
-- MCDCBranch { true: Counter(3), false: Expression(6, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 12) to (start + 0, 13)
-    true  = c3
-    false = ((c1 + c2) - c3)
-- Code(Counter(3)) at (prev + 0, 17) to (start + 0, 18)
-- MCDCBranch { true: Counter(4), false: Expression(8, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 17) to (start + 0, 18)
-    true  = c4
-    false = (c3 - c4)
-- Code(Counter(4)) at (prev + 0, 19) to (start + 2, 10)
-- Code(Expression(9, Sub)) at (prev + 2, 9) to (start + 0, 10)
-    = ((c1 + c2) - c4)
-- Code(Expression(11, Sub)) at (prev + 1, 12) to (start + 2, 6)
-    = (c0 - (c1 + c2))
-- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
-Highest counter ID seen: c4
-
diff --git a/tests/coverage/mcdc/if.coverage b/tests/coverage/mcdc/if.coverage
deleted file mode 100644
index fda5525c472..00000000000
--- a/tests/coverage/mcdc/if.coverage
+++ /dev/null
@@ -1,287 +0,0 @@
-   LL|       |#![feature(coverage_attribute)]
-   LL|       |//@ edition: 2021
-   LL|       |//@ compile-flags: -Zcoverage-options=mcdc
-   LL|       |//@ llvm-cov-flags: --show-branches=count --show-mcdc
-   LL|       |
-   LL|      2|fn mcdc_check_neither(a: bool, b: bool) {
-   LL|      2|    if a && b {
-                          ^0
-  ------------------
-  |  Branch (LL:8): [True: 0, False: 2]
-  |  Branch (LL:13): [True: 0, False: 0]
-  ------------------
-  |---> MC/DC Decision Region (LL:8) to (LL:14)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:8)
-  |     Condition C2 --> (LL:13)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |
-  |  C1-Pair: not covered
-  |  C2-Pair: not covered
-  |  MC/DC Coverage for Decision: 0.00%
-  |
-  ------------------
-   LL|      0|        say("a and b");
-   LL|      2|    } else {
-   LL|      2|        say("not both");
-   LL|      2|    }
-   LL|      2|}
-   LL|       |
-   LL|      2|fn mcdc_check_a(a: bool, b: bool) {
-   LL|      2|    if a && b {
-                          ^1
-  ------------------
-  |  Branch (LL:8): [True: 1, False: 1]
-  |  Branch (LL:13): [True: 1, False: 0]
-  ------------------
-  |---> MC/DC Decision Region (LL:8) to (LL:14)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:8)
-  |     Condition C2 --> (LL:13)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |  2 { T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,2)
-  |  C2-Pair: not covered
-  |  MC/DC Coverage for Decision: 50.00%
-  |
-  ------------------
-   LL|      1|        say("a and b");
-   LL|      1|    } else {
-   LL|      1|        say("not both");
-   LL|      1|    }
-   LL|      2|}
-   LL|       |
-   LL|      2|fn mcdc_check_b(a: bool, b: bool) {
-   LL|      2|    if a && b {
-  ------------------
-  |  Branch (LL:8): [True: 2, False: 0]
-  |  Branch (LL:13): [True: 1, False: 1]
-  ------------------
-  |---> MC/DC Decision Region (LL:8) to (LL:14)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:8)
-  |     Condition C2 --> (LL:13)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { T,  F  = F      }
-  |  2 { T,  T  = T      }
-  |
-  |  C1-Pair: not covered
-  |  C2-Pair: covered: (1,2)
-  |  MC/DC Coverage for Decision: 50.00%
-  |
-  ------------------
-   LL|      1|        say("a and b");
-   LL|      1|    } else {
-   LL|      1|        say("not both");
-   LL|      1|    }
-   LL|      2|}
-   LL|       |
-   LL|      3|fn mcdc_check_both(a: bool, b: bool) {
-   LL|      3|    if a && b {
-                          ^2
-  ------------------
-  |  Branch (LL:8): [True: 2, False: 1]
-  |  Branch (LL:13): [True: 1, False: 1]
-  ------------------
-  |---> MC/DC Decision Region (LL:8) to (LL:14)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:8)
-  |     Condition C2 --> (LL:13)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |  2 { T,  F  = F      }
-  |  3 { T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (2,3)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  ------------------
-   LL|      1|        say("a and b");
-   LL|      2|    } else {
-   LL|      2|        say("not both");
-   LL|      2|    }
-   LL|      3|}
-   LL|       |
-   LL|      4|fn mcdc_check_tree_decision(a: bool, b: bool, c: bool) {
-   LL|       |    // This expression is intentionally written in a way
-   LL|       |    // where 100% branch coverage indicates 100% mcdc coverage.
-   LL|      4|    if a && (b || c) {
-                           ^3   ^2
-  ------------------
-  |  Branch (LL:8): [True: 3, False: 1]
-  |  Branch (LL:14): [True: 1, False: 2]
-  |  Branch (LL:19): [True: 1, False: 1]
-  ------------------
-  |---> MC/DC Decision Region (LL:8) to (LL:21)
-  |
-  |  Number of Conditions: 3
-  |     Condition C1 --> (LL:8)
-  |     Condition C2 --> (LL:14)
-  |     Condition C3 --> (LL:19)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2, C3    Result
-  |  1 { F,  -,  -  = F      }
-  |  2 { T,  F,  F  = F      }
-  |  3 { T,  F,  T  = T      }
-  |  4 { T,  T,  -  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (2,4)
-  |  C3-Pair: covered: (2,3)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  ------------------
-   LL|      2|        say("pass");
-   LL|      2|    } else {
-   LL|      2|        say("reject");
-   LL|      2|    }
-   LL|      4|}
-   LL|       |
-   LL|      4|fn mcdc_check_not_tree_decision(a: bool, b: bool, c: bool) {
-   LL|       |    // Contradict to `mcdc_check_tree_decision`,
-   LL|       |    // 100% branch coverage of this expression does not indicate 100% mcdc coverage.
-   LL|      4|    if (a || b) && c {
-                           ^1
-  ------------------
-  |  Branch (LL:9): [True: 3, False: 1]
-  |  Branch (LL:14): [True: 1, False: 0]
-  |  Branch (LL:20): [True: 2, False: 2]
-  ------------------
-  |---> MC/DC Decision Region (LL:8) to (LL:21)
-  |
-  |  Number of Conditions: 3
-  |     Condition C1 --> (LL:9)
-  |     Condition C2 --> (LL:14)
-  |     Condition C3 --> (LL:20)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2, C3    Result
-  |  1 { T,  -,  F  = F      }
-  |  2 { F,  T,  T  = T      }
-  |  3 { T,  -,  T  = T      }
-  |
-  |  C1-Pair: not covered
-  |  C2-Pair: not covered
-  |  C3-Pair: covered: (1,3)
-  |  MC/DC Coverage for Decision: 33.33%
-  |
-  ------------------
-   LL|      2|        say("pass");
-   LL|      2|    } else {
-   LL|      2|        say("reject");
-   LL|      2|    }
-   LL|      4|}
-   LL|       |
-   LL|      3|fn mcdc_nested_if(a: bool, b: bool, c: bool) {
-   LL|      3|    if a || b {
-                          ^0
-  ------------------
-  |  Branch (LL:8): [True: 3, False: 0]
-  |  Branch (LL:13): [True: 0, False: 0]
-  ------------------
-  |---> MC/DC Decision Region (LL:8) to (LL:14)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:8)
-  |     Condition C2 --> (LL:13)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { T,  -  = T      }
-  |
-  |  C1-Pair: not covered
-  |  C2-Pair: not covered
-  |  MC/DC Coverage for Decision: 0.00%
-  |
-  ------------------
-   LL|      3|        say("a or b");
-   LL|      3|        if b && c {
-                              ^2
-  ------------------
-  |  Branch (LL:12): [True: 2, False: 1]
-  |  Branch (LL:17): [True: 1, False: 1]
-  ------------------
-  |---> MC/DC Decision Region (LL:12) to (LL:18)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:12)
-  |     Condition C2 --> (LL:17)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |  2 { T,  F  = F      }
-  |  3 { T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (2,3)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  ------------------
-   LL|      1|            say("b and c");
-   LL|      2|        }
-   LL|      0|    } else {
-   LL|      0|        say("neither a nor b");
-   LL|      0|    }
-   LL|      3|}
-   LL|       |
-   LL|       |#[coverage(off)]
-   LL|       |fn main() {
-   LL|       |    mcdc_check_neither(false, false);
-   LL|       |    mcdc_check_neither(false, true);
-   LL|       |
-   LL|       |    mcdc_check_a(true, true);
-   LL|       |    mcdc_check_a(false, true);
-   LL|       |
-   LL|       |    mcdc_check_b(true, true);
-   LL|       |    mcdc_check_b(true, false);
-   LL|       |
-   LL|       |    mcdc_check_both(false, true);
-   LL|       |    mcdc_check_both(true, true);
-   LL|       |    mcdc_check_both(true, false);
-   LL|       |
-   LL|       |    mcdc_check_tree_decision(false, true, true);
-   LL|       |    mcdc_check_tree_decision(true, true, false);
-   LL|       |    mcdc_check_tree_decision(true, false, false);
-   LL|       |    mcdc_check_tree_decision(true, false, true);
-   LL|       |
-   LL|       |    mcdc_check_not_tree_decision(false, true, true);
-   LL|       |    mcdc_check_not_tree_decision(true, true, false);
-   LL|       |    mcdc_check_not_tree_decision(true, false, false);
-   LL|       |    mcdc_check_not_tree_decision(true, false, true);
-   LL|       |
-   LL|       |    mcdc_nested_if(true, false, true);
-   LL|       |    mcdc_nested_if(true, true, true);
-   LL|       |    mcdc_nested_if(true, true, false);
-   LL|       |}
-   LL|       |
-   LL|       |#[coverage(off)]
-   LL|       |fn say(message: &str) {
-   LL|       |    core::hint::black_box(message);
-   LL|       |}
-
diff --git a/tests/coverage/mcdc/if.rs b/tests/coverage/mcdc/if.rs
deleted file mode 100644
index c4675f5d167..00000000000
--- a/tests/coverage/mcdc/if.rs
+++ /dev/null
@@ -1,102 +0,0 @@
-#![feature(coverage_attribute)]
-//@ edition: 2021
-//@ compile-flags: -Zcoverage-options=mcdc
-//@ llvm-cov-flags: --show-branches=count --show-mcdc
-
-fn mcdc_check_neither(a: bool, b: bool) {
-    if a && b {
-        say("a and b");
-    } else {
-        say("not both");
-    }
-}
-
-fn mcdc_check_a(a: bool, b: bool) {
-    if a && b {
-        say("a and b");
-    } else {
-        say("not both");
-    }
-}
-
-fn mcdc_check_b(a: bool, b: bool) {
-    if a && b {
-        say("a and b");
-    } else {
-        say("not both");
-    }
-}
-
-fn mcdc_check_both(a: bool, b: bool) {
-    if a && b {
-        say("a and b");
-    } else {
-        say("not both");
-    }
-}
-
-fn mcdc_check_tree_decision(a: bool, b: bool, c: bool) {
-    // This expression is intentionally written in a way
-    // where 100% branch coverage indicates 100% mcdc coverage.
-    if a && (b || c) {
-        say("pass");
-    } else {
-        say("reject");
-    }
-}
-
-fn mcdc_check_not_tree_decision(a: bool, b: bool, c: bool) {
-    // Contradict to `mcdc_check_tree_decision`,
-    // 100% branch coverage of this expression does not indicate 100% mcdc coverage.
-    if (a || b) && c {
-        say("pass");
-    } else {
-        say("reject");
-    }
-}
-
-fn mcdc_nested_if(a: bool, b: bool, c: bool) {
-    if a || b {
-        say("a or b");
-        if b && c {
-            say("b and c");
-        }
-    } else {
-        say("neither a nor b");
-    }
-}
-
-#[coverage(off)]
-fn main() {
-    mcdc_check_neither(false, false);
-    mcdc_check_neither(false, true);
-
-    mcdc_check_a(true, true);
-    mcdc_check_a(false, true);
-
-    mcdc_check_b(true, true);
-    mcdc_check_b(true, false);
-
-    mcdc_check_both(false, true);
-    mcdc_check_both(true, true);
-    mcdc_check_both(true, false);
-
-    mcdc_check_tree_decision(false, true, true);
-    mcdc_check_tree_decision(true, true, false);
-    mcdc_check_tree_decision(true, false, false);
-    mcdc_check_tree_decision(true, false, true);
-
-    mcdc_check_not_tree_decision(false, true, true);
-    mcdc_check_not_tree_decision(true, true, false);
-    mcdc_check_not_tree_decision(true, false, false);
-    mcdc_check_not_tree_decision(true, false, true);
-
-    mcdc_nested_if(true, false, true);
-    mcdc_nested_if(true, true, true);
-    mcdc_nested_if(true, true, false);
-}
-
-#[coverage(off)]
-fn say(message: &str) {
-    core::hint::black_box(message);
-}
diff --git a/tests/coverage/mcdc/inlined_expressions.cov-map b/tests/coverage/mcdc/inlined_expressions.cov-map
deleted file mode 100644
index d05ef368ba4..00000000000
--- a/tests/coverage/mcdc/inlined_expressions.cov-map
+++ /dev/null
@@ -1,21 +0,0 @@
-Function name: inlined_expressions::inlined_instance
-Raw bytes (55): 0x[01, 01, 02, 01, 05, 05, 09, 07, 01, 07, 01, 00, 2e, 01, 01, 05, 00, 06, 28, 03, 02, 00, 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 => $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)
-Number of file 0 mappings: 7
-- Code(Counter(0)) at (prev + 7, 1) to (start + 0, 46)
-- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 5) to (start + 0, 11)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 5) to (start + 0, 6)
-    true  = c1
-    false = (c0 - c1)
-- Code(Counter(1)) at (prev + 0, 10) to (start + 0, 11)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 10) to (start + 0, 11)
-    true  = c2
-    false = (c1 - c2)
-- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
-Highest counter ID seen: c2
-
diff --git a/tests/coverage/mcdc/inlined_expressions.coverage b/tests/coverage/mcdc/inlined_expressions.coverage
deleted file mode 100644
index cfe398995e4..00000000000
--- a/tests/coverage/mcdc/inlined_expressions.coverage
+++ /dev/null
@@ -1,40 +0,0 @@
-   LL|       |#![feature(coverage_attribute)]
-   LL|       |//@ edition: 2021
-   LL|       |//@ compile-flags: -Zcoverage-options=mcdc -Copt-level=z -Cllvm-args=--inline-threshold=0
-   LL|       |//@ llvm-cov-flags: --show-branches=count --show-mcdc
-   LL|       |
-   LL|       |#[inline(always)]
-   LL|      3|fn inlined_instance(a: bool, b: bool) -> bool {
-   LL|      3|    a && b
-                       ^2
-  ------------------
-  |  Branch (LL:5): [True: 2, False: 1]
-  |  Branch (LL:10): [True: 1, False: 1]
-  ------------------
-  |---> MC/DC Decision Region (LL:5) to (LL:11)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:5)
-  |     Condition C2 --> (LL:10)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |  2 { T,  F  = F      }
-  |  3 { T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (2,3)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  ------------------
-   LL|      3|}
-   LL|       |
-   LL|       |#[coverage(off)]
-   LL|       |fn main() {
-   LL|       |    let _ = inlined_instance(true, false);
-   LL|       |    let _ = inlined_instance(false, true);
-   LL|       |    let _ = inlined_instance(true, true);
-   LL|       |}
-
diff --git a/tests/coverage/mcdc/inlined_expressions.rs b/tests/coverage/mcdc/inlined_expressions.rs
deleted file mode 100644
index 15d4260f6e2..00000000000
--- a/tests/coverage/mcdc/inlined_expressions.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-#![feature(coverage_attribute)]
-//@ edition: 2021
-//@ compile-flags: -Zcoverage-options=mcdc -Copt-level=z -Cllvm-args=--inline-threshold=0
-//@ llvm-cov-flags: --show-branches=count --show-mcdc
-
-#[inline(always)]
-fn inlined_instance(a: bool, b: bool) -> bool {
-    a && b
-}
-
-#[coverage(off)]
-fn main() {
-    let _ = inlined_instance(true, false);
-    let _ = inlined_instance(false, true);
-    let _ = inlined_instance(true, true);
-}
diff --git a/tests/coverage/mcdc/nested_if.cov-map b/tests/coverage/mcdc/nested_if.cov-map
deleted file mode 100644
index 853cdf2c576..00000000000
--- a/tests/coverage/mcdc/nested_if.cov-map
+++ /dev/null
@@ -1,200 +0,0 @@
-Function name: nested_if::doubly_nested_if_in_condition
-Raw bytes (175): 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, 15, 01, 0e, 01, 00, 45, 01, 01, 08, 00, 09, 28, 09, 02, 00, 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 => $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)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(1), rhs = Expression(13, Add)
-- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 6 operands: lhs = Counter(1), rhs = Expression(7, Add)
-- expression 7 operands: lhs = Counter(2), rhs = Counter(5)
-- expression 8 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 9 operands: lhs = Counter(1), rhs = Expression(10, Add)
-- expression 10 operands: lhs = Counter(2), rhs = Counter(6)
-- expression 11 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 12 operands: lhs = Counter(1), rhs = Expression(13, Add)
-- expression 13 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 14 operands: lhs = Counter(0), rhs = Counter(4)
-Number of file 0 mappings: 21
-- Code(Counter(0)) at (prev + 14, 1) to (start + 0, 69)
-- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9)
-- MCDCDecision { bitmap_idx: 9, conditions_num: 2 } at (prev + 0, 8) to (start + 0, 78)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
-    true  = c1
-    false = (c0 - c1)
-- MCDCBranch { true: Counter(4), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 78)
-    true  = c4
-    false = (c1 - c4)
-- Code(Counter(1)) at (prev + 0, 16) to (start + 0, 17)
-- MCDCDecision { bitmap_idx: 6, conditions_num: 2 } at (prev + 0, 16) to (start + 0, 54)
-- MCDCBranch { true: Counter(2), false: Expression(5, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 16) to (start + 0, 17)
-    true  = c2
-    false = (c1 - c2)
-- MCDCBranch { true: Counter(3), false: Expression(12, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 21) to (start + 0, 54)
-    true  = c3
-    false = (c1 - (c2 + c3))
-- Code(Expression(5, Sub)) at (prev + 0, 24) to (start + 0, 25)
-    = (c1 - c2)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 24) to (start + 0, 30)
-- MCDCBranch { true: Counter(5), false: Expression(6, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 24) to (start + 0, 25)
-    true  = c5
-    false = (c1 - (c2 + c5))
-- Code(Counter(5)) at (prev + 0, 29) to (start + 0, 30)
-- MCDCBranch { true: Counter(6), false: Expression(8, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 29) to (start + 0, 30)
-    true  = c6
-    false = (c5 - c6)
-- Code(Counter(6)) at (prev + 0, 33) to (start + 0, 37)
-- Code(Expression(9, Sub)) at (prev + 0, 47) to (start + 0, 52)
-    = (c1 - (c2 + c6))
-- Code(Expression(13, Add)) at (prev + 0, 57) to (start + 0, 62)
-    = (c2 + c3)
-- Code(Expression(12, Sub)) at (prev + 0, 72) to (start + 0, 76)
-    = (c1 - (c2 + c3))
-- Code(Counter(4)) at (prev + 0, 79) to (start + 2, 6)
-- Code(Expression(14, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = (c0 - c4)
-- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
-Highest counter ID seen: c6
-
-Function name: nested_if::nested_if_in_condition
-Raw bytes (123): 0x[01, 01, 0a, 01, 05, 05, 11, 05, 09, 05, 09, 05, 23, 09, 0d, 09, 0d, 05, 23, 09, 0d, 01, 11, 0f, 01, 06, 01, 00, 35, 01, 01, 08, 00, 09, 28, 06, 02, 00, 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 => $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)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 4 operands: lhs = Counter(1), rhs = Expression(8, Add)
-- expression 5 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 6 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 7 operands: lhs = Counter(1), rhs = Expression(8, Add)
-- expression 8 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 9 operands: lhs = Counter(0), rhs = Counter(4)
-Number of file 0 mappings: 15
-- Code(Counter(0)) at (prev + 6, 1) to (start + 0, 53)
-- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9)
-- MCDCDecision { bitmap_idx: 6, conditions_num: 2 } at (prev + 0, 8) to (start + 0, 46)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
-    true  = c1
-    false = (c0 - c1)
-- MCDCBranch { true: Counter(4), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 46)
-    true  = c4
-    false = (c1 - c4)
-- Code(Counter(1)) at (prev + 0, 16) to (start + 0, 17)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 16) to (start + 0, 22)
-- MCDCBranch { true: Counter(2), false: Expression(3, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 16) to (start + 0, 17)
-    true  = c2
-    false = (c1 - c2)
-- Code(Expression(3, Sub)) at (prev + 0, 21) to (start + 0, 22)
-    = (c1 - c2)
-- MCDCBranch { true: Counter(3), false: Expression(7, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 21) to (start + 0, 22)
-    true  = c3
-    false = (c1 - (c2 + c3))
-- Code(Expression(8, Add)) at (prev + 0, 25) to (start + 0, 29)
-    = (c2 + c3)
-- Code(Expression(7, Sub)) at (prev + 0, 39) to (start + 0, 44)
-    = (c1 - (c2 + c3))
-- Code(Counter(4)) at (prev + 0, 47) to (start + 2, 6)
-- Code(Expression(9, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = (c0 - c4)
-- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
-Highest counter ID seen: c4
-
-Function name: nested_if::nested_in_then_block_in_condition
-Raw bytes (175): 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, 15, 01, 21, 01, 00, 52, 01, 01, 08, 00, 09, 28, 09, 02, 00, 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 => $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)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 4 operands: lhs = Counter(1), rhs = Expression(13, Add)
-- expression 5 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 6 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 7 operands: lhs = Expression(13, Add), rhs = Counter(4)
-- expression 8 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 9 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 10 operands: lhs = Expression(13, Add), rhs = Counter(5)
-- expression 11 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 12 operands: lhs = Counter(1), rhs = Expression(13, Add)
-- expression 13 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 14 operands: lhs = Counter(0), rhs = Counter(6)
-Number of file 0 mappings: 21
-- Code(Counter(0)) at (prev + 33, 1) to (start + 0, 82)
-- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 9)
-- MCDCDecision { bitmap_idx: 9, conditions_num: 2 } at (prev + 0, 8) to (start + 0, 75)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
-    true  = c1
-    false = (c0 - c1)
-- MCDCBranch { true: Counter(6), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 75)
-    true  = c6
-    false = (c1 - c6)
-- Code(Counter(1)) at (prev + 0, 16) to (start + 0, 17)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 16) to (start + 0, 22)
-- MCDCBranch { true: Counter(2), false: Expression(3, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 16) to (start + 0, 17)
-    true  = c2
-    false = (c1 - c2)
-- Code(Expression(3, Sub)) at (prev + 0, 21) to (start + 0, 22)
-    = (c1 - c2)
-- MCDCBranch { true: Counter(3), false: Expression(12, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 21) to (start + 0, 22)
-    true  = c3
-    false = (c1 - (c2 + c3))
-- Code(Expression(13, Add)) at (prev + 0, 28) to (start + 0, 29)
-    = (c2 + c3)
-- MCDCDecision { bitmap_idx: 6, conditions_num: 2 } at (prev + 0, 28) to (start + 0, 34)
-- MCDCBranch { true: Counter(4), false: Expression(7, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 28) to (start + 0, 29)
-    true  = c4
-    false = ((c2 + c3) - c4)
-- Code(Counter(4)) at (prev + 0, 33) to (start + 0, 34)
-- MCDCBranch { true: Counter(5), false: Expression(9, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 33) to (start + 0, 34)
-    true  = c5
-    false = (c4 - c5)
-- Code(Counter(5)) at (prev + 0, 37) to (start + 0, 41)
-- Code(Expression(10, Sub)) at (prev + 0, 51) to (start + 0, 56)
-    = ((c2 + c3) - c5)
-- Code(Expression(12, Sub)) at (prev + 0, 68) to (start + 0, 73)
-    = (c1 - (c2 + c3))
-- Code(Counter(6)) at (prev + 0, 76) to (start + 2, 6)
-- Code(Expression(14, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = (c0 - c6)
-- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
-Highest counter ID seen: c6
-
-Function name: nested_if::nested_single_condition_decision
-Raw bytes (88): 0x[01, 01, 05, 01, 05, 05, 0d, 05, 09, 05, 09, 01, 0d, 0c, 01, 16, 01, 00, 36, 01, 04, 08, 00, 09, 28, 03, 02, 00, 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 => $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)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 4 operands: lhs = Counter(0), rhs = Counter(3)
-Number of file 0 mappings: 12
-- Code(Counter(0)) at (prev + 22, 1) to (start + 0, 54)
-- Code(Counter(0)) at (prev + 4, 8) to (start + 0, 9)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 8) to (start + 0, 41)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
-    true  = c1
-    false = (c0 - c1)
-- MCDCBranch { true: Counter(3), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 41)
-    true  = c3
-    false = (c1 - c3)
-- Code(Counter(1)) at (prev + 0, 16) to (start + 0, 17)
-- Branch { true: Counter(2), false: Expression(3, Sub) } at (prev + 0, 16) to (start + 0, 17)
-    true  = c2
-    false = (c1 - c2)
-- Code(Counter(2)) at (prev + 0, 20) to (start + 0, 25)
-- Code(Expression(3, Sub)) at (prev + 0, 35) to (start + 0, 39)
-    = (c1 - c2)
-- Code(Counter(3)) at (prev + 0, 42) to (start + 2, 6)
-- Code(Expression(4, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = (c0 - c3)
-- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
-Highest counter ID seen: c3
-
diff --git a/tests/coverage/mcdc/nested_if.coverage b/tests/coverage/mcdc/nested_if.coverage
deleted file mode 100644
index 8b5179b34fe..00000000000
--- a/tests/coverage/mcdc/nested_if.coverage
+++ /dev/null
@@ -1,257 +0,0 @@
-   LL|       |#![feature(coverage_attribute)]
-   LL|       |//@ edition: 2021
-   LL|       |//@ compile-flags: -Zcoverage-options=mcdc
-   LL|       |//@ llvm-cov-flags: --show-branches=count --show-mcdc
-   LL|       |
-   LL|      4|fn nested_if_in_condition(a: bool, b: bool, c: bool) {
-   LL|      4|    if a && if b || c { true } else { false } {
-                             ^3   ^2  ^2            ^1
-  ------------------
-  |  Branch (LL:8): [True: 3, False: 1]
-  |  Branch (LL:13): [True: 2, False: 1]
-  |  Branch (LL:16): [True: 1, False: 2]
-  |  Branch (LL:21): [True: 1, False: 1]
-  ------------------
-  |---> MC/DC Decision Region (LL:8) to (LL:46)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:8)
-  |     Condition C2 --> (LL:13)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |  2 { T,  F  = F      }
-  |  3 { T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (2,3)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  |---> MC/DC Decision Region (LL:16) to (LL:22)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:16)
-  |     Condition C2 --> (LL:21)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  F  = F      }
-  |  2 { F,  T  = T      }
-  |  3 { T,  -  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (1,2)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  ------------------
-   LL|      2|        say("yes");
-   LL|      2|    } else {
-   LL|      2|        say("no");
-   LL|      2|    }
-   LL|      4|}
-   LL|       |
-   LL|      4|fn doubly_nested_if_in_condition(a: bool, b: bool, c: bool, d: bool) {
-   LL|      4|    if a && if b || if c && d { true } else { false } { false } else { true } {
-                             ^3      ^2   ^1  ^1            ^1        ^2             ^1
-  ------------------
-  |  Branch (LL:8): [True: 3, False: 1]
-  |  Branch (LL:13): [True: 1, False: 2]
-  |  Branch (LL:16): [True: 1, False: 2]
-  |  Branch (LL:21): [True: 1, False: 1]
-  |  Branch (LL:24): [True: 1, False: 1]
-  |  Branch (LL:29): [True: 1, False: 0]
-  ------------------
-  |---> MC/DC Decision Region (LL:8) to (LL:78)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:8)
-  |     Condition C2 --> (LL:13)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |  2 { T,  F  = F      }
-  |  3 { T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (2,3)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  |---> MC/DC Decision Region (LL:16) to (LL:54)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:16)
-  |     Condition C2 --> (LL:21)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  F  = F      }
-  |  2 { F,  T  = T      }
-  |  3 { T,  -  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (1,2)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  |---> MC/DC Decision Region (LL:24) to (LL:30)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:24)
-  |     Condition C2 --> (LL:29)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |  2 { T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,2)
-  |  C2-Pair: not covered
-  |  MC/DC Coverage for Decision: 50.00%
-  |
-  ------------------
-   LL|      1|        say("yes");
-   LL|      3|    } else {
-   LL|      3|        say("no");
-   LL|      3|    }
-   LL|      4|}
-   LL|       |
-   LL|      3|fn nested_single_condition_decision(a: bool, b: bool) {
-   LL|       |    // Decision with only 1 decision should not be instrumented by MCDC because
-   LL|       |    // branch-coverage is equivalent to MCDC coverage in this case, and we don't
-   LL|       |    // want to waste bitmap space for this.
-   LL|      3|    if a && if b { false } else { true } {
-                             ^2  ^1             ^1
-  ------------------
-  |  Branch (LL:8): [True: 2, False: 1]
-  |  Branch (LL:13): [True: 1, False: 1]
-  |  Branch (LL:16): [True: 1, False: 1]
-  ------------------
-  |---> MC/DC Decision Region (LL:8) to (LL:41)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:8)
-  |     Condition C2 --> (LL:13)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |  2 { T,  F  = F      }
-  |  3 { T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (2,3)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  ------------------
-   LL|      1|        say("yes");
-   LL|      2|    } else {
-   LL|      2|        say("no");
-   LL|      2|    }
-   LL|      3|}
-   LL|       |
-   LL|      7|fn nested_in_then_block_in_condition(a: bool, b: bool, c: bool, d: bool, e: bool) {
-   LL|      7|    if a && if b || c { if d && e { true } else { false } } else { false } {
-                             ^6   ^5     ^5   ^2  ^1            ^4               ^1
-  ------------------
-  |  Branch (LL:8): [True: 6, False: 1]
-  |  Branch (LL:13): [True: 1, False: 5]
-  |  Branch (LL:16): [True: 1, False: 5]
-  |  Branch (LL:21): [True: 4, False: 1]
-  |  Branch (LL:28): [True: 2, False: 3]
-  |  Branch (LL:33): [True: 1, False: 1]
-  ------------------
-  |---> MC/DC Decision Region (LL:8) to (LL:75)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:8)
-  |     Condition C2 --> (LL:13)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |  2 { T,  F  = F      }
-  |  3 { T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (2,3)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  |---> MC/DC Decision Region (LL:16) to (LL:22)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:16)
-  |     Condition C2 --> (LL:21)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  F  = F      }
-  |  2 { F,  T  = T      }
-  |  3 { T,  -  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (1,2)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  |---> MC/DC Decision Region (LL:28) to (LL:34)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:28)
-  |     Condition C2 --> (LL:33)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |  2 { T,  F  = F      }
-  |  3 { T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (2,3)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  ------------------
-   LL|      1|        say("yes");
-   LL|      6|    } else {
-   LL|      6|        say("no");
-   LL|      6|    }
-   LL|      7|}
-   LL|       |
-   LL|       |#[coverage(off)]
-   LL|       |fn main() {
-   LL|       |    nested_if_in_condition(true, false, false);
-   LL|       |    nested_if_in_condition(true, true, true);
-   LL|       |    nested_if_in_condition(true, false, true);
-   LL|       |    nested_if_in_condition(false, true, true);
-   LL|       |
-   LL|       |    doubly_nested_if_in_condition(true, false, false, true);
-   LL|       |    doubly_nested_if_in_condition(true, true, true, true);
-   LL|       |    doubly_nested_if_in_condition(true, false, true, true);
-   LL|       |    doubly_nested_if_in_condition(false, true, true, true);
-   LL|       |
-   LL|       |    nested_single_condition_decision(true, true);
-   LL|       |    nested_single_condition_decision(true, false);
-   LL|       |    nested_single_condition_decision(false, false);
-   LL|       |
-   LL|       |    nested_in_then_block_in_condition(false, false, false, false, false);
-   LL|       |    nested_in_then_block_in_condition(true, false, false, false, false);
-   LL|       |    nested_in_then_block_in_condition(true, true, false, false, false);
-   LL|       |    nested_in_then_block_in_condition(true, false, true, false, false);
-   LL|       |    nested_in_then_block_in_condition(true, false, true, true, false);
-   LL|       |    nested_in_then_block_in_condition(true, false, true, false, true);
-   LL|       |    nested_in_then_block_in_condition(true, false, true, true, true);
-   LL|       |}
-   LL|       |
-   LL|       |#[coverage(off)]
-   LL|       |fn say(message: &str) {
-   LL|       |    core::hint::black_box(message);
-   LL|       |}
-
diff --git a/tests/coverage/mcdc/nested_if.rs b/tests/coverage/mcdc/nested_if.rs
deleted file mode 100644
index db02aece33c..00000000000
--- a/tests/coverage/mcdc/nested_if.rs
+++ /dev/null
@@ -1,69 +0,0 @@
-#![feature(coverage_attribute)]
-//@ edition: 2021
-//@ compile-flags: -Zcoverage-options=mcdc
-//@ llvm-cov-flags: --show-branches=count --show-mcdc
-
-fn nested_if_in_condition(a: bool, b: bool, c: bool) {
-    if a && if b || c { true } else { false } {
-        say("yes");
-    } else {
-        say("no");
-    }
-}
-
-fn doubly_nested_if_in_condition(a: bool, b: bool, c: bool, d: bool) {
-    if a && if b || if c && d { true } else { false } { false } else { true } {
-        say("yes");
-    } else {
-        say("no");
-    }
-}
-
-fn nested_single_condition_decision(a: bool, b: bool) {
-    // Decision with only 1 decision should not be instrumented by MCDC because
-    // branch-coverage is equivalent to MCDC coverage in this case, and we don't
-    // want to waste bitmap space for this.
-    if a && if b { false } else { true } {
-        say("yes");
-    } else {
-        say("no");
-    }
-}
-
-fn nested_in_then_block_in_condition(a: bool, b: bool, c: bool, d: bool, e: bool) {
-    if a && if b || c { if d && e { true } else { false } } else { false } {
-        say("yes");
-    } else {
-        say("no");
-    }
-}
-
-#[coverage(off)]
-fn main() {
-    nested_if_in_condition(true, false, false);
-    nested_if_in_condition(true, true, true);
-    nested_if_in_condition(true, false, true);
-    nested_if_in_condition(false, true, true);
-
-    doubly_nested_if_in_condition(true, false, false, true);
-    doubly_nested_if_in_condition(true, true, true, true);
-    doubly_nested_if_in_condition(true, false, true, true);
-    doubly_nested_if_in_condition(false, true, true, true);
-
-    nested_single_condition_decision(true, true);
-    nested_single_condition_decision(true, false);
-    nested_single_condition_decision(false, false);
-
-    nested_in_then_block_in_condition(false, false, false, false, false);
-    nested_in_then_block_in_condition(true, false, false, false, false);
-    nested_in_then_block_in_condition(true, true, false, false, false);
-    nested_in_then_block_in_condition(true, false, true, false, false);
-    nested_in_then_block_in_condition(true, false, true, true, false);
-    nested_in_then_block_in_condition(true, false, true, false, true);
-    nested_in_then_block_in_condition(true, false, true, true, true);
-}
-
-#[coverage(off)]
-fn say(message: &str) {
-    core::hint::black_box(message);
-}
diff --git a/tests/coverage/mcdc/non_control_flow.cov-map b/tests/coverage/mcdc/non_control_flow.cov-map
deleted file mode 100644
index f06bc2ed816..00000000000
--- a/tests/coverage/mcdc/non_control_flow.cov-map
+++ /dev/null
@@ -1,186 +0,0 @@
-Function name: non_control_flow::assign_3
-Raw bytes (89): 0x[01, 01, 04, 01, 05, 01, 0b, 05, 09, 09, 0d, 0c, 01, 15, 01, 00, 27, 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, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02]
-Number of files: 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)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(2), rhs = Counter(3)
-Number of file 0 mappings: 12
-- Code(Counter(0)) at (prev + 21, 1) to (start + 0, 39)
-- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
-- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCDecision { bitmap_idx: 4, conditions_num: 3 } at (prev + 0, 13) to (start + 0, 24)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c1
-    false = (c0 - c1)
-- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 19)
-    = (c0 - c1)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 3, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
-    true  = c2
-    false = (c0 - (c1 + c2))
-- Code(Counter(2)) at (prev + 0, 23) to (start + 0, 24)
-- MCDCBranch { true: Counter(3), false: Expression(3, Sub), condition_id: 3, true_next_id: 0, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
-    true  = c3
-    false = (c2 - c3)
-- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14)
-- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16)
-- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
-Highest counter ID seen: c3
-
-Function name: non_control_flow::assign_3_bis
-Raw bytes (91): 0x[01, 01, 05, 01, 05, 05, 09, 01, 09, 01, 13, 09, 0d, 0c, 01, 1a, 01, 00, 2b, 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, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02]
-Number of files: 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)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(0), rhs = Expression(4, Add)
-- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
-Number of file 0 mappings: 12
-- Code(Counter(0)) at (prev + 26, 1) to (start + 0, 43)
-- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
-- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCDecision { bitmap_idx: 5, conditions_num: 3 } at (prev + 0, 13) to (start + 0, 24)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 3, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c1
-    false = (c0 - c1)
-- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 3, true_next_id: 0, false_next_id: 2 } at (prev + 0, 18) to (start + 0, 19)
-    true  = c2
-    false = (c1 - c2)
-- Code(Expression(2, Sub)) at (prev + 0, 23) to (start + 0, 24)
-    = (c0 - c2)
-- MCDCBranch { true: Counter(3), false: Expression(3, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
-    true  = c3
-    false = (c0 - (c2 + c3))
-- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14)
-- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16)
-- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
-Highest counter ID seen: c3
-
-Function name: non_control_flow::assign_and
-Raw bytes (70): 0x[01, 01, 02, 01, 05, 05, 09, 0a, 01, 0b, 01, 00, 20, 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, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02]
-Number of files: 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)
-Number of file 0 mappings: 10
-- Code(Counter(0)) at (prev + 11, 1) to (start + 0, 32)
-- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
-- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 13) to (start + 0, 19)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c1
-    false = (c0 - c1)
-- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
-    true  = c2
-    false = (c1 - c2)
-- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14)
-- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16)
-- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
-Highest counter ID seen: c2
-
-Function name: non_control_flow::assign_or
-Raw bytes (72): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 0a, 01, 10, 01, 00, 1f, 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, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02]
-Number of files: 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)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-Number of file 0 mappings: 10
-- Code(Counter(0)) at (prev + 16, 1) to (start + 0, 31)
-- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
-- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 13) to (start + 0, 19)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c1
-    false = (c0 - c1)
-- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 19)
-    = (c0 - c1)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
-    true  = c2
-    false = (c0 - (c1 + c2))
-- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14)
-- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16)
-- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
-Highest counter ID seen: c2
-
-Function name: non_control_flow::foo
-Raw bytes (24): 0x[01, 01, 00, 04, 01, 24, 01, 00, 18, 01, 01, 05, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02]
-Number of files: 1
-- file 0 => $DIR/non_control_flow.rs
-Number of expressions: 0
-Number of file 0 mappings: 4
-- Code(Counter(0)) at (prev + 36, 1) to (start + 0, 24)
-- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14)
-- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16)
-- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
-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, 1f, 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 => $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)
-Number of file 0 mappings: 8
-- Code(Counter(0)) at (prev + 40, 1) to (start + 0, 31)
-- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 8)
-- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 10)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 9) to (start + 0, 15)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 9) to (start + 0, 10)
-    true  = c1
-    false = (c0 - c1)
-- Code(Counter(1)) at (prev + 0, 14) to (start + 0, 15)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 14) to (start + 0, 15)
-    true  = c2
-    false = (c1 - c2)
-- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
-Highest counter ID seen: c2
-
-Function name: non_control_flow::right_comb_tree
-Raw bytes (121): 0x[01, 01, 05, 01, 05, 05, 09, 09, 0d, 0d, 11, 11, 15, 10, 01, 1f, 01, 00, 40, 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, 00, 0e, 01, 00, 0f, 00, 10, 01, 01, 01, 00, 02]
-Number of files: 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)
-- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 3 operands: lhs = Counter(3), rhs = Counter(4)
-- expression 4 operands: lhs = Counter(4), rhs = Counter(5)
-Number of file 0 mappings: 16
-- Code(Counter(0)) at (prev + 31, 1) to (start + 0, 64)
-- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
-- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCDecision { bitmap_idx: 6, conditions_num: 5 } at (prev + 0, 13) to (start + 0, 42)
-- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = c1
-    false = (c0 - c1)
-- Code(Counter(1)) at (prev + 0, 19) to (start + 0, 20)
-- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 3, false_next_id: 0 } at (prev + 0, 19) to (start + 0, 20)
-    true  = c2
-    false = (c1 - c2)
-- Code(Counter(2)) at (prev + 0, 25) to (start + 0, 26)
-- MCDCBranch { true: Counter(3), false: Expression(2, Sub), condition_id: 3, true_next_id: 4, false_next_id: 0 } at (prev + 0, 25) to (start + 0, 26)
-    true  = c3
-    false = (c2 - c3)
-- Code(Counter(3)) at (prev + 0, 31) to (start + 0, 32)
-- MCDCBranch { true: Counter(4), false: Expression(3, Sub), condition_id: 4, true_next_id: 5, false_next_id: 0 } at (prev + 0, 31) to (start + 0, 32)
-    true  = c4
-    false = (c3 - c4)
-- Code(Counter(4)) at (prev + 0, 36) to (start + 0, 39)
-- MCDCBranch { true: Counter(5), false: Expression(4, Sub), condition_id: 5, true_next_id: 0, false_next_id: 0 } at (prev + 0, 36) to (start + 0, 39)
-    true  = c5
-    false = (c4 - c5)
-- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 14)
-- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 16)
-- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
-Highest counter ID seen: c5
-
diff --git a/tests/coverage/mcdc/non_control_flow.coverage b/tests/coverage/mcdc/non_control_flow.coverage
deleted file mode 100644
index 419d40bb6f9..00000000000
--- a/tests/coverage/mcdc/non_control_flow.coverage
+++ /dev/null
@@ -1,224 +0,0 @@
-   LL|       |#![feature(coverage_attribute)]
-   LL|       |//@ edition: 2021
-   LL|       |//@ compile-flags: -Zcoverage-options=mcdc
-   LL|       |//@ llvm-cov-flags: --show-branches=count --show-mcdc
-   LL|       |
-   LL|       |// This test ensures that boolean expressions that are not inside control flow
-   LL|       |// decisions are correctly instrumented.
-   LL|       |
-   LL|       |use core::hint::black_box;
-   LL|       |
-   LL|      3|fn assign_and(a: bool, b: bool) {
-   LL|      3|    let x = a && b;
-                               ^2
-  ------------------
-  |  Branch (LL:13): [True: 2, False: 1]
-  |  Branch (LL:18): [True: 1, False: 1]
-  ------------------
-  |---> MC/DC Decision Region (LL:13) to (LL:19)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:13)
-  |     Condition C2 --> (LL:18)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |  2 { T,  F  = F      }
-  |  3 { T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (2,3)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  ------------------
-   LL|      3|    black_box(x);
-   LL|      3|}
-   LL|       |
-   LL|      3|fn assign_or(a: bool, b: bool) {
-   LL|      3|    let x = a || b;
-                               ^1
-  ------------------
-  |  Branch (LL:13): [True: 2, False: 1]
-  |  Branch (LL:18): [True: 0, False: 1]
-  ------------------
-  |---> MC/DC Decision Region (LL:13) to (LL:19)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:13)
-  |     Condition C2 --> (LL:18)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  F  = F      }
-  |  2 { T,  -  = T      }
-  |
-  |  C1-Pair: covered: (1,2)
-  |  C2-Pair: not covered
-  |  MC/DC Coverage for Decision: 50.00%
-  |
-  ------------------
-   LL|      3|    black_box(x);
-   LL|      3|}
-   LL|       |
-   LL|      4|fn assign_3(a: bool, b: bool, c: bool) {
-   LL|      4|    let x = a || b && c;
-                               ^2   ^1
-  ------------------
-  |  Branch (LL:13): [True: 2, False: 2]
-  |  Branch (LL:18): [True: 1, False: 1]
-  |  Branch (LL:23): [True: 1, False: 0]
-  ------------------
-  |---> MC/DC Decision Region (LL:13) to (LL:24)
-  |
-  |  Number of Conditions: 3
-  |     Condition C1 --> (LL:13)
-  |     Condition C2 --> (LL:18)
-  |     Condition C3 --> (LL:23)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2, C3    Result
-  |  1 { F,  F,  -  = F      }
-  |  2 { F,  T,  T  = T      }
-  |  3 { T,  -,  -  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (1,2)
-  |  C3-Pair: not covered
-  |  MC/DC Coverage for Decision: 66.67%
-  |
-  ------------------
-   LL|      4|    black_box(x);
-   LL|      4|}
-   LL|       |
-   LL|      4|fn assign_3_bis(a: bool, b: bool, c: bool) {
-   LL|      4|    let x = a && b || c;
-                               ^2   ^3
-  ------------------
-  |  Branch (LL:13): [True: 2, False: 2]
-  |  Branch (LL:18): [True: 1, False: 1]
-  |  Branch (LL:23): [True: 2, False: 1]
-  ------------------
-  |---> MC/DC Decision Region (LL:13) to (LL:24)
-  |
-  |  Number of Conditions: 3
-  |     Condition C1 --> (LL:13)
-  |     Condition C2 --> (LL:18)
-  |     Condition C3 --> (LL:23)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2, C3    Result
-  |  1 { T,  F,  F  = F      }
-  |  2 { F,  -,  T  = T      }
-  |  3 { T,  T,  -  = T      }
-  |
-  |  C1-Pair: not covered
-  |  C2-Pair: covered: (1,3)
-  |  C3-Pair: not covered
-  |  MC/DC Coverage for Decision: 33.33%
-  |
-  ------------------
-   LL|      4|    black_box(x);
-   LL|      4|}
-   LL|       |
-   LL|      3|fn right_comb_tree(a: bool, b: bool, c: bool, d: bool, e: bool) {
-   LL|      3|    let x = a && (b && (c && (d && (e))));
-                                ^2    ^1    ^1   ^1
-  ------------------
-  |  Branch (LL:13): [True: 2, False: 1]
-  |  Branch (LL:19): [True: 1, False: 1]
-  |  Branch (LL:25): [True: 1, False: 0]
-  |  Branch (LL:31): [True: 1, False: 0]
-  |  Branch (LL:36): [True: 1, False: 0]
-  ------------------
-  |---> MC/DC Decision Region (LL:13) to (LL:42)
-  |
-  |  Number of Conditions: 5
-  |     Condition C1 --> (LL:13)
-  |     Condition C2 --> (LL:19)
-  |     Condition C3 --> (LL:25)
-  |     Condition C4 --> (LL:31)
-  |     Condition C5 --> (LL:36)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2, C3, C4, C5    Result
-  |  1 { F,  -,  -,  -,  -  = F      }
-  |  2 { T,  F,  -,  -,  -  = F      }
-  |  3 { T,  T,  T,  T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (2,3)
-  |  C3-Pair: not covered
-  |  C4-Pair: not covered
-  |  C5-Pair: not covered
-  |  MC/DC Coverage for Decision: 40.00%
-  |
-  ------------------
-   LL|      3|    black_box(x);
-   LL|      3|}
-   LL|       |
-   LL|      3|fn foo(a: bool) -> bool {
-   LL|      3|    black_box(a)
-   LL|      3|}
-   LL|       |
-   LL|      3|fn func_call(a: bool, b: bool) {
-   LL|      3|    foo(a && b);
-                           ^2
-  ------------------
-  |  Branch (LL:9): [True: 2, False: 1]
-  |  Branch (LL:14): [True: 1, False: 1]
-  ------------------
-  |---> MC/DC Decision Region (LL:9) to (LL:15)
-  |
-  |  Number of Conditions: 2
-  |     Condition C1 --> (LL:9)
-  |     Condition C2 --> (LL:14)
-  |
-  |  Executed MC/DC Test Vectors:
-  |
-  |     C1, C2    Result
-  |  1 { F,  -  = F      }
-  |  2 { T,  F  = F      }
-  |  3 { T,  T  = T      }
-  |
-  |  C1-Pair: covered: (1,3)
-  |  C2-Pair: covered: (2,3)
-  |  MC/DC Coverage for Decision: 100.00%
-  |
-  ------------------
-   LL|      3|}
-   LL|       |
-   LL|       |#[coverage(off)]
-   LL|       |fn main() {
-   LL|       |    assign_and(true, false);
-   LL|       |    assign_and(true, true);
-   LL|       |    assign_and(false, false);
-   LL|       |
-   LL|       |    assign_or(true, false);
-   LL|       |    assign_or(true, true);
-   LL|       |    assign_or(false, false);
-   LL|       |
-   LL|       |    assign_3(true, false, false);
-   LL|       |    assign_3(true, true, false);
-   LL|       |    assign_3(false, false, true);
-   LL|       |    assign_3(false, true, true);
-   LL|       |
-   LL|       |    assign_3_bis(true, false, false);
-   LL|       |    assign_3_bis(true, true, false);
-   LL|       |    assign_3_bis(false, false, true);
-   LL|       |    assign_3_bis(false, true, true);
-   LL|       |
-   LL|       |    right_comb_tree(false, false, false, true, true);
-   LL|       |    right_comb_tree(true, false, false, true, true);
-   LL|       |    right_comb_tree(true, true, true, true, true);
-   LL|       |
-   LL|       |    func_call(true, false);
-   LL|       |    func_call(true, true);
-   LL|       |    func_call(false, false);
-   LL|       |}
-
diff --git a/tests/coverage/mcdc/non_control_flow.rs b/tests/coverage/mcdc/non_control_flow.rs
deleted file mode 100644
index 863bb8a5756..00000000000
--- a/tests/coverage/mcdc/non_control_flow.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-#![feature(coverage_attribute)]
-//@ edition: 2021
-//@ compile-flags: -Zcoverage-options=mcdc
-//@ llvm-cov-flags: --show-branches=count --show-mcdc
-
-// This test ensures that boolean expressions that are not inside control flow
-// decisions are correctly instrumented.
-
-use core::hint::black_box;
-
-fn assign_and(a: bool, b: bool) {
-    let x = a && b;
-    black_box(x);
-}
-
-fn assign_or(a: bool, b: bool) {
-    let x = a || b;
-    black_box(x);
-}
-
-fn assign_3(a: bool, b: bool, c: bool) {
-    let x = a || b && c;
-    black_box(x);
-}
-
-fn assign_3_bis(a: bool, b: bool, c: bool) {
-    let x = a && b || c;
-    black_box(x);
-}
-
-fn right_comb_tree(a: bool, b: bool, c: bool, d: bool, e: bool) {
-    let x = a && (b && (c && (d && (e))));
-    black_box(x);
-}
-
-fn foo(a: bool) -> bool {
-    black_box(a)
-}
-
-fn func_call(a: bool, b: bool) {
-    foo(a && b);
-}
-
-#[coverage(off)]
-fn main() {
-    assign_and(true, false);
-    assign_and(true, true);
-    assign_and(false, false);
-
-    assign_or(true, false);
-    assign_or(true, true);
-    assign_or(false, false);
-
-    assign_3(true, false, false);
-    assign_3(true, true, false);
-    assign_3(false, false, true);
-    assign_3(false, true, true);
-
-    assign_3_bis(true, false, false);
-    assign_3_bis(true, true, false);
-    assign_3_bis(false, false, true);
-    assign_3_bis(false, true, true);
-
-    right_comb_tree(false, false, false, true, true);
-    right_comb_tree(true, false, false, true, true);
-    right_comb_tree(true, true, true, true, true);
-
-    func_call(true, false);
-    func_call(true, true);
-    func_call(false, false);
-}
diff --git a/tests/crashes/135528.rs b/tests/crashes/135528.rs
deleted file mode 100644
index 171550e209e..00000000000
--- a/tests/crashes/135528.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-//@ known-bug: #135528
-//@ compile-flags: -Zvalidate-mir -Zinline-mir=yes
-#![feature(type_alias_impl_trait)]
-type Tait = impl Copy;
-
-fn set(x: &isize) -> isize {
-    *x
-}
-
-#[define_opaque(Tait)]
-fn d(x: Tait) {
-    set(x);
-}
-
-#[define_opaque(Tait)]
-fn other_define() -> Tait {
-    ()
-}
-
-fn main() {}
diff --git a/tests/crashes/135646.rs b/tests/crashes/135646.rs
deleted file mode 100644
index 841ea5b81b4..00000000000
--- a/tests/crashes/135646.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-//@ known-bug: #135646
-//@ compile-flags: -Zpolonius=next
-//@ edition: 2024
-
-fn main() {
-    &{ [1, 2, 3][4] };
-}
diff --git a/tests/crashes/144293-indirect-ops-llvm.rs b/tests/crashes/144293-indirect-ops-llvm.rs
new file mode 100644
index 00000000000..490a0116d7d
--- /dev/null
+++ b/tests/crashes/144293-indirect-ops-llvm.rs
@@ -0,0 +1,42 @@
+//@ known-bug: #144293
+// Same as recursion-etc but eggs LLVM emission into giving indirect arguments.
+#![expect(incomplete_features)]
+#![feature(explicit_tail_calls)]
+
+use std::hint::black_box;
+
+struct U64Wrapper {
+    pub x: u64,
+    pub arbitrary: String,
+}
+
+fn count(curr: U64Wrapper, top: U64Wrapper) -> U64Wrapper {
+    if black_box(curr.x) >= top.x {
+        curr
+    } else {
+        become count(
+            U64Wrapper {
+                x: curr.x + 1,
+                arbitrary: curr.arbitrary,
+            },
+            top,
+        )
+    }
+}
+
+fn main() {
+    println!(
+        "{}",
+        count(
+            U64Wrapper {
+                x: 0,
+                arbitrary: "hello!".into()
+            },
+            black_box(U64Wrapper {
+                x: 1000000,
+                arbitrary: "goodbye!".into()
+            })
+        )
+        .x
+    );
+}
diff --git a/tests/debuginfo/associated-types.rs b/tests/debuginfo/associated-types.rs
index b20bd520936..7c2a793c8cd 100644
--- a/tests/debuginfo/associated-types.rs
+++ b/tests/debuginfo/associated-types.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 // gdb-command:run
@@ -68,8 +69,6 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 trait TraitWithAssocType {
     type Type;
diff --git a/tests/debuginfo/auxiliary/cross_crate_spans.rs b/tests/debuginfo/auxiliary/cross_crate_spans.rs
index af853ee0b00..d0d32c2cbe3 100644
--- a/tests/debuginfo/auxiliary/cross_crate_spans.rs
+++ b/tests/debuginfo/auxiliary/cross_crate_spans.rs
@@ -1,8 +1,6 @@
 #![crate_type = "rlib"]
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 //@ no-prefer-dynamic
 //@ compile-flags:-g
diff --git a/tests/debuginfo/basic-stepping.rs b/tests/debuginfo/basic-stepping.rs
new file mode 100644
index 00000000000..6e1344d22a5
--- /dev/null
+++ b/tests/debuginfo/basic-stepping.rs
@@ -0,0 +1,47 @@
+//! Test that stepping through a simple program with a debugger one line at a
+//! time works intuitively, e.g. that `next` takes you to the next source line.
+//! Regression test for <https://github.com/rust-lang/rust/issues/33013>.
+
+//@ ignore-aarch64: Doesn't work yet.
+//@ compile-flags: -g
+
+// gdb-command: run
+// FIXME(#97083): Should we be able to break on initialization of zero-sized types?
+// FIXME(#97083): Right now the first breakable line is:
+// gdb-check:   let mut c = 27;
+// gdb-command: next
+// gdb-check:   let d = c = 99;
+// gdb-command: next
+// FIXME(#33013): gdb-check:   let e = "hi bob";
+// FIXME(#33013): gdb-command: next
+// FIXME(#33013): gdb-check:   let f = b"hi bob";
+// FIXME(#33013): gdb-command: next
+// FIXME(#33013): gdb-check:   let g = b'9';
+// FIXME(#33013): gdb-command: next
+// FIXME(#33013): gdb-check:   let h = ["whatever"; 8];
+// FIXME(#33013): gdb-command: next
+// gdb-check:   let i = [1,2,3,4];
+// gdb-command: next
+// gdb-check:   let j = (23, "hi");
+// gdb-command: next
+// gdb-check:   let k = 2..3;
+// gdb-command: next
+// gdb-check:   let l = &i[k];
+// gdb-command: next
+// gdb-check:   let m: *const() = &a;
+
+fn main () {
+    let a = (); // #break
+    let b : [i32; 0] = [];
+    let mut c = 27;
+    let d = c = 99;
+    let e = "hi bob";
+    let f = b"hi bob";
+    let g = b'9';
+    let h = ["whatever"; 8];
+    let i = [1,2,3,4];
+    let j = (23, "hi");
+    let k = 2..3;
+    let l = &i[k];
+    let m: *const() = &a;
+}
diff --git a/tests/debuginfo/basic-types-globals-metadata.rs b/tests/debuginfo/basic-types-globals-metadata.rs
index aec8ff183ad..fc8f6dc173f 100644
--- a/tests/debuginfo/basic-types-globals-metadata.rs
+++ b/tests/debuginfo/basic-types-globals-metadata.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // gdb-command:run
 // gdb-command:whatis basic_types_globals_metadata::B
@@ -35,8 +36,6 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 #![feature(f16)]
 
 // N.B. These are `mut` only so they don't constant fold away.
diff --git a/tests/debuginfo/basic-types-globals.rs b/tests/debuginfo/basic-types-globals.rs
index 15a0deb64c1..9d28820ce68 100644
--- a/tests/debuginfo/basic-types-globals.rs
+++ b/tests/debuginfo/basic-types-globals.rs
@@ -1,6 +1,7 @@
 //@ revisions: lto no-lto
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 //@ [lto] compile-flags:-C lto
 //@ [lto] no-prefer-dynamic
@@ -39,8 +40,6 @@
 // gdb-command:continue
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 #![feature(f16)]
 
 // N.B. These are `mut` only so they don't constant fold away.
diff --git a/tests/debuginfo/basic-types-metadata.rs b/tests/debuginfo/basic-types-metadata.rs
index 6b7cfbdebca..941db81a4de 100644
--- a/tests/debuginfo/basic-types-metadata.rs
+++ b/tests/debuginfo/basic-types-metadata.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // gdb-command:run
 // gdb-command:whatis unit
@@ -53,8 +54,6 @@
 // gdb-command:continue
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 #![feature(f16)]
 
 fn main() {
diff --git a/tests/debuginfo/basic-types-mut-globals.rs b/tests/debuginfo/basic-types-mut-globals.rs
index f6a2399d230..e979d82b55c 100644
--- a/tests/debuginfo/basic-types-mut-globals.rs
+++ b/tests/debuginfo/basic-types-mut-globals.rs
@@ -5,6 +5,7 @@
 // its numerical value.
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // gdb-command:run
 
@@ -74,8 +75,6 @@
 // gdb-check:$30 = 9.25
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 #![feature(f16)]
 
 static mut B: bool = false;
diff --git a/tests/debuginfo/basic-types.rs b/tests/debuginfo/basic-types.rs
index fea5262bc41..7862f45b3c4 100644
--- a/tests/debuginfo/basic-types.rs
+++ b/tests/debuginfo/basic-types.rs
@@ -5,6 +5,7 @@
 // its numerical value.
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -112,8 +113,6 @@
 // cdb-check:s                : [...] [Type: ref$<str$>]
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 #![feature(f16)]
 
 fn main() {
diff --git a/tests/debuginfo/borrowed-basic.rs b/tests/debuginfo/borrowed-basic.rs
index 91de691e78e..334eae38318 100644
--- a/tests/debuginfo/borrowed-basic.rs
+++ b/tests/debuginfo/borrowed-basic.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -96,8 +97,6 @@
 // lldb-check:[...] 3.5
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 #![feature(f16)]
 
 fn main() {
diff --git a/tests/debuginfo/borrowed-c-style-enum.rs b/tests/debuginfo/borrowed-c-style-enum.rs
index 6a91d4f9650..d382a389fe4 100644
--- a/tests/debuginfo/borrowed-c-style-enum.rs
+++ b/tests/debuginfo/borrowed-c-style-enum.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -28,8 +29,6 @@
 // lldb-check:[...] TheC
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 enum ABC { TheA, TheB, TheC }
 
diff --git a/tests/debuginfo/borrowed-enum.rs b/tests/debuginfo/borrowed-enum.rs
index c5a795fdede..517b439ff15 100644
--- a/tests/debuginfo/borrowed-enum.rs
+++ b/tests/debuginfo/borrowed-enum.rs
@@ -1,6 +1,7 @@
 //@ min-lldb-version: 1800
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -28,8 +29,6 @@
 // lldb-check:(borrowed_enum::Univariant) *univariant_ref = { value = { 0 = 4820353753753434 } }
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 // The first element is to ensure proper alignment, irrespective of the machines word size. Since
 // the size of the discriminant value is machine dependent, this has be taken into account when
diff --git a/tests/debuginfo/borrowed-struct.rs b/tests/debuginfo/borrowed-struct.rs
index 245af35f505..5d64ba3cbef 100644
--- a/tests/debuginfo/borrowed-struct.rs
+++ b/tests/debuginfo/borrowed-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -52,8 +53,6 @@
 // lldb-check:[...] 26.5
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct SomeStruct {
     x: isize,
diff --git a/tests/debuginfo/borrowed-tuple.rs b/tests/debuginfo/borrowed-tuple.rs
index 9e4ceec033e..fd4e22feb06 100644
--- a/tests/debuginfo/borrowed-tuple.rs
+++ b/tests/debuginfo/borrowed-tuple.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -29,8 +30,6 @@
 
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 fn main() {
     let stack_val: (i16, f32) = (-14, -19f32);
diff --git a/tests/debuginfo/borrowed-unique-basic.rs b/tests/debuginfo/borrowed-unique-basic.rs
index 7a9b4d1df82..54d7f27bb0c 100644
--- a/tests/debuginfo/borrowed-unique-basic.rs
+++ b/tests/debuginfo/borrowed-unique-basic.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -100,8 +101,6 @@
 // lldb-check:[...] 3.5
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 #![feature(f16)]
 
 fn main() {
diff --git a/tests/debuginfo/box.rs b/tests/debuginfo/box.rs
index d22566c0b17..d4612f98a5f 100644
--- a/tests/debuginfo/box.rs
+++ b/tests/debuginfo/box.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -19,8 +20,6 @@
 // lldb-check:[...] { 0 = 2 1 = 3.5 }
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 fn main() {
     let a = Box::new(1);
diff --git a/tests/debuginfo/boxed-struct.rs b/tests/debuginfo/boxed-struct.rs
index 158609fb2ed..ca072693cdc 100644
--- a/tests/debuginfo/boxed-struct.rs
+++ b/tests/debuginfo/boxed-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -22,8 +23,6 @@
 // lldb-check:[...] { x = 77 y = 777 z = 7777 w = 77777 }
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct StructWithSomePadding {
     x: i16,
diff --git a/tests/debuginfo/by-value-non-immediate-argument.rs b/tests/debuginfo/by-value-non-immediate-argument.rs
index deacea5f6cc..b5b0df73a68 100644
--- a/tests/debuginfo/by-value-non-immediate-argument.rs
+++ b/tests/debuginfo/by-value-non-immediate-argument.rs
@@ -1,6 +1,7 @@
 //@ min-lldb-version: 1800
 //@ min-gdb-version: 13.0
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 //@ ignore-windows-gnu: #128973
 //@ ignore-aarch64-unknown-linux-gnu (gdb tries to read from 0x0; FIXME: #128973)
 //@ ignore-powerpc64: #128973 on both -gnu and -musl
@@ -62,9 +63,6 @@
 // lldb-check:[...] Case1 { x: 0, y: 8970181431921507452 }
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 #[derive(Clone)]
 struct Struct {
     a: isize,
diff --git a/tests/debuginfo/by-value-self-argument-in-trait-impl.rs b/tests/debuginfo/by-value-self-argument-in-trait-impl.rs
index 6981fdfc9e1..a49a375569b 100644
--- a/tests/debuginfo/by-value-self-argument-in-trait-impl.rs
+++ b/tests/debuginfo/by-value-self-argument-in-trait-impl.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -33,9 +34,6 @@
 // lldb-check:[...] { 0 = 4444.5 1 = 5555 2 = 6666 3 = 7777.5 }
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 trait Trait {
     fn method(self) -> Self;
 }
diff --git a/tests/debuginfo/c-style-enum-in-composite.rs b/tests/debuginfo/c-style-enum-in-composite.rs
index 642879cf3b6..47b4b980f9c 100644
--- a/tests/debuginfo/c-style-enum-in-composite.rs
+++ b/tests/debuginfo/c-style-enum-in-composite.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -51,8 +52,6 @@
 // lldb-check:[...] { 0 = { a = OneHundred b = Vienna } 1 = 9 }
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 use self::AnEnum::{OneHundred, OneThousand, OneMillion};
 use self::AnotherEnum::{MountainView, Toronto, Vienna};
diff --git a/tests/debuginfo/c-style-enum.rs b/tests/debuginfo/c-style-enum.rs
index 08378f7af18..d5455be0cb5 100644
--- a/tests/debuginfo/c-style-enum.rs
+++ b/tests/debuginfo/c-style-enum.rs
@@ -1,6 +1,7 @@
 //@ ignore-aarch64
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -88,8 +89,6 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 use self::AutoDiscriminant::{One, Two, Three};
 use self::ManualDiscriminant::{OneHundred, OneThousand, OneMillion};
diff --git a/tests/debuginfo/closure-in-generic-function.rs b/tests/debuginfo/closure-in-generic-function.rs
index 0c6a6fdfca1..0bb72209cc8 100644
--- a/tests/debuginfo/closure-in-generic-function.rs
+++ b/tests/debuginfo/closure-in-generic-function.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -33,9 +34,6 @@
 // lldb-check:[...] 110
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn some_generic_fun<T1, T2>(a: T1, b: T2) -> (T2, T1) {
 
     let closure = |x, y| {
diff --git a/tests/debuginfo/constant-debug-locs.rs b/tests/debuginfo/constant-debug-locs.rs
index 81115fc3c38..d13b8648b18 100644
--- a/tests/debuginfo/constant-debug-locs.rs
+++ b/tests/debuginfo/constant-debug-locs.rs
@@ -1,8 +1,7 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 #![allow(dead_code, unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 // This test makes sure that the compiler doesn't crash when trying to assign
 // debug locations to const-expressions.
diff --git a/tests/debuginfo/constant-in-match-pattern.rs b/tests/debuginfo/constant-in-match-pattern.rs
index 952db216deb..922e0a5d8da 100644
--- a/tests/debuginfo/constant-in-match-pattern.rs
+++ b/tests/debuginfo/constant-in-match-pattern.rs
@@ -1,8 +1,7 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 #![allow(dead_code, unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 // This test makes sure that the compiler doesn't crash when trying to assign
 // debug locations to 'constant' patterns in match expressions.
diff --git a/tests/debuginfo/coroutine-locals.rs b/tests/debuginfo/coroutine-locals.rs
index f3593adc945..c2b8aef8a67 100644
--- a/tests/debuginfo/coroutine-locals.rs
+++ b/tests/debuginfo/coroutine-locals.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -44,8 +45,7 @@
 // lldb-command:v c
 // lldb-check:(int) c = 6
 
-#![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait, stmt_expr_attributes)]
-#![omit_gdb_pretty_printer_section]
+#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
 
 use std::ops::Coroutine;
 use std::pin::Pin;
diff --git a/tests/debuginfo/coroutine-objects.rs b/tests/debuginfo/coroutine-objects.rs
index 242c76c2989..7ead154cbdb 100644
--- a/tests/debuginfo/coroutine-objects.rs
+++ b/tests/debuginfo/coroutine-objects.rs
@@ -5,6 +5,7 @@
 // ensure that LLDB won't crash at least (like #57822).
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -53,8 +54,7 @@
 // cdb-check: b                : Returned [Type: enum2$<coroutine_objects::main::coroutine_env$0>]
 // cdb-check:    [+0x[...]] _ref__a          : 0x[...] : 6 [Type: int *]
 
-#![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait, stmt_expr_attributes)]
-#![omit_gdb_pretty_printer_section]
+#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
 
 use std::ops::Coroutine;
 use std::pin::Pin;
diff --git a/tests/debuginfo/cross-crate-spans.rs b/tests/debuginfo/cross-crate-spans.rs
index e337aaf5a6c..38176e46909 100644
--- a/tests/debuginfo/cross-crate-spans.rs
+++ b/tests/debuginfo/cross-crate-spans.rs
@@ -1,15 +1,13 @@
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 //@ aux-build:cross_crate_spans.rs
 extern crate cross_crate_spans;
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 
 // === GDB TESTS ===================================================================================
 
-// gdb-command:break cross_crate_spans.rs:14
+// gdb-command:break cross_crate_spans.rs:12
 // gdb-command:run
 
 // gdb-command:print result
@@ -32,7 +30,7 @@ extern crate cross_crate_spans;
 
 // === LLDB TESTS ==================================================================================
 
-// lldb-command:b cross_crate_spans.rs:14
+// lldb-command:b cross_crate_spans.rs:12
 // lldb-command:run
 
 // lldb-command:v result
diff --git a/tests/debuginfo/destructured-fn-argument.rs b/tests/debuginfo/destructured-fn-argument.rs
index 37a7bb2b778..fe8f91588e0 100644
--- a/tests/debuginfo/destructured-fn-argument.rs
+++ b/tests/debuginfo/destructured-fn-argument.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -299,8 +300,6 @@
 
 #![allow(unused_variables)]
 #![feature(box_patterns)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 use self::Univariant::Unit;
 
diff --git a/tests/debuginfo/destructured-for-loop-variable.rs b/tests/debuginfo/destructured-for-loop-variable.rs
index cc16be1268a..01c524083da 100644
--- a/tests/debuginfo/destructured-for-loop-variable.rs
+++ b/tests/debuginfo/destructured-for-loop-variable.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -141,8 +142,6 @@
 
 #![allow(unused_variables)]
 #![feature(box_patterns)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct Struct {
     x: i16,
diff --git a/tests/debuginfo/destructured-local.rs b/tests/debuginfo/destructured-local.rs
index fad96ca7d4b..ff24c924aad 100644
--- a/tests/debuginfo/destructured-local.rs
+++ b/tests/debuginfo/destructured-local.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -232,8 +233,6 @@
 
 #![allow(unused_variables)]
 #![feature(box_patterns)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 use self::Univariant::Unit;
 
diff --git a/tests/debuginfo/enum-thinlto.rs b/tests/debuginfo/enum-thinlto.rs
index af77145c312..6eb33b2ef46 100644
--- a/tests/debuginfo/enum-thinlto.rs
+++ b/tests/debuginfo/enum-thinlto.rs
@@ -1,5 +1,6 @@
 //@ min-lldb-version: 1800
 //@ compile-flags:-g -Z thinlto
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -16,8 +17,6 @@
 // lldb-check:(enum_thinlto::ABC) *abc = { value = { x = 0 y = 8970181431921507452 } $discr$ = 0 }
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 // The first element is to ensure proper alignment, irrespective of the machines word size. Since
 // the size of the discriminant value is machine dependent, this has be taken into account when
diff --git a/tests/debuginfo/evec-in-struct.rs b/tests/debuginfo/evec-in-struct.rs
index 303669cf06c..f08c436bbe3 100644
--- a/tests/debuginfo/evec-in-struct.rs
+++ b/tests/debuginfo/evec-in-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -38,8 +39,6 @@
 // lldb-check:[...] { x = { [0] = 22 [1] = 23 } y = { [0] = 24 [1] = 25 } }
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct NoPadding1 {
     x: [u32; 3],
diff --git a/tests/debuginfo/extern-c-fn.rs b/tests/debuginfo/extern-c-fn.rs
index 4642073faab..7130658f2d8 100644
--- a/tests/debuginfo/extern-c-fn.rs
+++ b/tests/debuginfo/extern-c-fn.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 // gdb-command:run
@@ -32,9 +33,6 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 
 #[no_mangle]
 pub unsafe extern "C" fn fn_with_c_abi(s: *const u8, len: i32) -> i32 {
diff --git a/tests/debuginfo/function-arg-initialization.rs b/tests/debuginfo/function-arg-initialization.rs
index ae54d56623c..03fb1e2d062 100644
--- a/tests/debuginfo/function-arg-initialization.rs
+++ b/tests/debuginfo/function-arg-initialization.rs
@@ -8,6 +8,7 @@
 //@ min-lldb-version: 1800
 //@ compile-flags:-g -Zmir-enable-passes=-SingleUseConsts
 // SingleUseConsts shouldn't need to be disabled, see #128945
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -214,8 +215,6 @@
 
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 fn immediate_args(a: isize, b: bool, c: f64) {
     zzz(); // #break
diff --git a/tests/debuginfo/function-arguments.rs b/tests/debuginfo/function-arguments.rs
index 21c0c7d859c..64d026a705b 100644
--- a/tests/debuginfo/function-arguments.rs
+++ b/tests/debuginfo/function-arguments.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -32,10 +33,6 @@
 // lldb-check:[...] 3000
 // lldb-command:continue
 
-
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn main() {
 
     fun(111102, true);
diff --git a/tests/debuginfo/function-names.rs b/tests/debuginfo/function-names.rs
index c51884451e5..b5aec5c595e 100644
--- a/tests/debuginfo/function-names.rs
+++ b/tests/debuginfo/function-names.rs
@@ -2,6 +2,7 @@
 //@ min-gdb-version: 10.1
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -78,8 +79,6 @@
 // cdb-check:[...] a!function_names::const_generic_fn_bool<false> (void)
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 #![feature(adt_const_params, coroutines, coroutine_trait, stmt_expr_attributes)]
 #![allow(incomplete_features)]
 
diff --git a/tests/debuginfo/function-prologue-stepping-regular.rs b/tests/debuginfo/function-prologue-stepping-regular.rs
index 07b9356fb50..f61128ca2df 100644
--- a/tests/debuginfo/function-prologue-stepping-regular.rs
+++ b/tests/debuginfo/function-prologue-stepping-regular.rs
@@ -4,6 +4,7 @@
 //@ min-lldb-version: 1800
 //@ ignore-gdb
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // lldb-command:breakpoint set --name immediate_args
 // lldb-command:breakpoint set --name non_immediate_args
@@ -116,8 +117,6 @@
 // lldb-command:continue
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 fn immediate_args(a: isize, b: bool, c: f64) {
     ()
diff --git a/tests/debuginfo/gdb-char.rs b/tests/debuginfo/gdb-char.rs
index 7d8608d4f51..d296e675fa3 100644
--- a/tests/debuginfo/gdb-char.rs
+++ b/tests/debuginfo/gdb-char.rs
@@ -3,6 +3,7 @@
 
 //@ min-gdb-version: 11.2
 //@ compile-flags: -g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -11,8 +12,6 @@
 // gdb-check:$1 = 97 'a'
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 fn main() {
     let ch: char = 'a';
diff --git a/tests/debuginfo/generic-enum-with-different-disr-sizes.rs b/tests/debuginfo/generic-enum-with-different-disr-sizes.rs
index e723543a37b..5c5f05d9c4b 100644
--- a/tests/debuginfo/generic-enum-with-different-disr-sizes.rs
+++ b/tests/debuginfo/generic-enum-with-different-disr-sizes.rs
@@ -1,6 +1,7 @@
 //@ ignore-lldb: FIXME(#27089)
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 // gdb-command:run
@@ -57,8 +58,6 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 // This test case makes sure that we get correct type descriptions for the enum
 // discriminant of different instantiations of the same generic enum type where,
diff --git a/tests/debuginfo/generic-function.rs b/tests/debuginfo/generic-function.rs
index 4be8d5ad45a..ab3cb6953ac 100644
--- a/tests/debuginfo/generic-function.rs
+++ b/tests/debuginfo/generic-function.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -44,9 +45,6 @@
 // lldb-check:[...] { a = 6 b = 7.5 }
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 #[derive(Clone)]
 struct Struct {
     a: isize,
diff --git a/tests/debuginfo/generic-functions-nested.rs b/tests/debuginfo/generic-functions-nested.rs
index 7e0c20f8903..8ac2b8b9d7a 100644
--- a/tests/debuginfo/generic-functions-nested.rs
+++ b/tests/debuginfo/generic-functions-nested.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -57,10 +58,6 @@
 // lldb-check:[...] 2.5
 // lldb-command:continue
 
-
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn outer<TA: Clone>(a: TA) {
     inner(a.clone(), 1);
     inner(a.clone(), 2.5f64);
diff --git a/tests/debuginfo/generic-method-on-generic-struct.rs b/tests/debuginfo/generic-method-on-generic-struct.rs
index 9c587ca2839..36a94f2999d 100644
--- a/tests/debuginfo/generic-method-on-generic-struct.rs
+++ b/tests/debuginfo/generic-method-on-generic-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -99,9 +100,6 @@
 // lldb-check:[...] -10.5
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 #[derive(Copy, Clone)]
 struct Struct<T> {
     x: T
diff --git a/tests/debuginfo/generic-static-method-on-struct-and-enum.rs b/tests/debuginfo/generic-static-method-on-struct-and-enum.rs
index 79fe2144cf4..09b515d69e4 100644
--- a/tests/debuginfo/generic-static-method-on-struct-and-enum.rs
+++ b/tests/debuginfo/generic-static-method-on-struct-and-enum.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // gdb-command:run
 
@@ -19,9 +20,6 @@
 // gdb-command:continue
 
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 struct Struct {
     x: isize
 }
diff --git a/tests/debuginfo/generic-struct-style-enum.rs b/tests/debuginfo/generic-struct-style-enum.rs
index a5529ab8027..4f580f8c515 100644
--- a/tests/debuginfo/generic-struct-style-enum.rs
+++ b/tests/debuginfo/generic-struct-style-enum.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // gdb-command:set print union on
 // gdb-command:run
@@ -16,9 +17,6 @@
 // gdb-check:$4 = generic_struct_style_enum::Univariant<i32>::TheOnlyCase{a: -1}
 
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 use self::Regular::{Case1, Case2, Case3};
 use self::Univariant::TheOnlyCase;
 
diff --git a/tests/debuginfo/generic-struct.rs b/tests/debuginfo/generic-struct.rs
index f26d823d4f2..0196ca43544 100644
--- a/tests/debuginfo/generic-struct.rs
+++ b/tests/debuginfo/generic-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -49,9 +50,6 @@
 // cdb-check:[...]value            [Type: generic_struct::AGenericStruct<i32,f64>]
 
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 struct AGenericStruct<TKey, TValue> {
     key: TKey,
     value: TValue
diff --git a/tests/debuginfo/generic-tuple-style-enum.rs b/tests/debuginfo/generic-tuple-style-enum.rs
index 4a5996645cb..719b5c6161f 100644
--- a/tests/debuginfo/generic-tuple-style-enum.rs
+++ b/tests/debuginfo/generic-tuple-style-enum.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -30,8 +31,6 @@
 
 // lldb-command:v univariant
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 use self::Regular::{Case1, Case2, Case3};
 use self::Univariant::TheOnlyCase;
diff --git a/tests/debuginfo/include_string.rs b/tests/debuginfo/include_string.rs
index 704b85e1ac2..4ec23b68262 100644
--- a/tests/debuginfo/include_string.rs
+++ b/tests/debuginfo/include_string.rs
@@ -2,6 +2,7 @@
 // ^ test temporarily disabled as it fails under gdb 15
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 // gdb-command:run
 // gdb-command:print string1.length
 // gdb-check:$1 = 48
@@ -26,8 +27,6 @@
 // lldb-command:continue
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 // This test case makes sure that debug info does not ICE when include_str is
 // used multiple times (see issue #11322).
diff --git a/tests/debuginfo/issue-12886.rs b/tests/debuginfo/issue-12886.rs
index 48250e88537..5574294cd57 100644
--- a/tests/debuginfo/issue-12886.rs
+++ b/tests/debuginfo/issue-12886.rs
@@ -2,14 +2,13 @@
 //@ ignore-aarch64
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // gdb-command:run
 // gdb-command:next
-// gdb-check:[...]23[...]let s = Some(5).unwrap(); // #break
+// gdb-check:[...]22[...]let s = Some(5).unwrap(); // #break
 // gdb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 // IF YOU MODIFY THIS FILE, BE CAREFUL TO ADAPT THE LINE NUMBERS IN THE DEBUGGER COMMANDS
 
diff --git a/tests/debuginfo/issue-22656.rs b/tests/debuginfo/issue-22656.rs
index eb0b38cfa4d..3407c0524eb 100644
--- a/tests/debuginfo/issue-22656.rs
+++ b/tests/debuginfo/issue-22656.rs
@@ -5,6 +5,7 @@
 //@ ignore-gdb
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === LLDB TESTS ==================================================================================
 // lldb-command:run
@@ -16,8 +17,6 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct ZeroSizedStruct;
 
diff --git a/tests/debuginfo/issue-57822.rs b/tests/debuginfo/issue-57822.rs
index 7abac1c14d3..ba4e01196a4 100644
--- a/tests/debuginfo/issue-57822.rs
+++ b/tests/debuginfo/issue-57822.rs
@@ -3,6 +3,7 @@
 
 //@ min-lldb-version: 1800
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -24,8 +25,7 @@
 // lldb-command:v b
 // lldb-check:(issue_57822::main::{coroutine_env#3}) b = { value = { a = { value = { y = 2 } $discr$ = '\x02' } } $discr$ = '\x02' }
 
-#![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait, stmt_expr_attributes)]
-#![omit_gdb_pretty_printer_section]
+#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
 
 use std::ops::Coroutine;
 use std::pin::Pin;
diff --git a/tests/debuginfo/lexical-scope-in-for-loop.rs b/tests/debuginfo/lexical-scope-in-for-loop.rs
index 08f244f89a0..f591f48ad59 100644
--- a/tests/debuginfo/lexical-scope-in-for-loop.rs
+++ b/tests/debuginfo/lexical-scope-in-for-loop.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -73,9 +74,6 @@
 // lldb-check:[...] 1000000
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn main() {
 
     let range = [1, 2, 3];
diff --git a/tests/debuginfo/lexical-scope-in-if.rs b/tests/debuginfo/lexical-scope-in-if.rs
index c0e1f2f3e05..2b3a4ee5fc4 100644
--- a/tests/debuginfo/lexical-scope-in-if.rs
+++ b/tests/debuginfo/lexical-scope-in-if.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -121,9 +122,6 @@
 // lldb-check:[...] -1
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn main() {
 
     let x = 999;
diff --git a/tests/debuginfo/lexical-scope-in-match.rs b/tests/debuginfo/lexical-scope-in-match.rs
index 9169c19c6a3..0e369c6ca16 100644
--- a/tests/debuginfo/lexical-scope-in-match.rs
+++ b/tests/debuginfo/lexical-scope-in-match.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -113,9 +114,6 @@
 // lldb-check:[...] 232
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 struct Struct {
     x: isize,
     y: isize
diff --git a/tests/debuginfo/lexical-scope-in-stack-closure.rs b/tests/debuginfo/lexical-scope-in-stack-closure.rs
index d01162c39d6..483d5dda86c 100644
--- a/tests/debuginfo/lexical-scope-in-stack-closure.rs
+++ b/tests/debuginfo/lexical-scope-in-stack-closure.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -57,9 +58,6 @@
 // lldb-check:[...] false
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn main() {
 
     let x = false;
diff --git a/tests/debuginfo/lexical-scope-in-unconditional-loop.rs b/tests/debuginfo/lexical-scope-in-unconditional-loop.rs
index dfec570218f..129d0b8c83d 100644
--- a/tests/debuginfo/lexical-scope-in-unconditional-loop.rs
+++ b/tests/debuginfo/lexical-scope-in-unconditional-loop.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -119,9 +120,6 @@
 // lldb-check:[...] 2
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn main() {
 
     let mut x = 0;
diff --git a/tests/debuginfo/lexical-scope-in-unique-closure.rs b/tests/debuginfo/lexical-scope-in-unique-closure.rs
index db84005121a..93bea18d7cd 100644
--- a/tests/debuginfo/lexical-scope-in-unique-closure.rs
+++ b/tests/debuginfo/lexical-scope-in-unique-closure.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -58,9 +59,6 @@
 // lldb-command:continue
 
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn main() {
 
     let x = false;
diff --git a/tests/debuginfo/lexical-scope-in-while.rs b/tests/debuginfo/lexical-scope-in-while.rs
index d6536d77545..5fe76851bd7 100644
--- a/tests/debuginfo/lexical-scope-in-while.rs
+++ b/tests/debuginfo/lexical-scope-in-while.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -119,9 +120,6 @@
 // lldb-check:[...] 2
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn main() {
 
     let mut x = 0;
diff --git a/tests/debuginfo/lexical-scope-with-macro.rs b/tests/debuginfo/lexical-scope-with-macro.rs
index 6e8fef201ea..efec9a3b1ce 100644
--- a/tests/debuginfo/lexical-scope-with-macro.rs
+++ b/tests/debuginfo/lexical-scope-with-macro.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -97,9 +98,6 @@
 // lldb-check:[...] 400
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 macro_rules! trivial {
     ($e1:expr) => ($e1)
 }
diff --git a/tests/debuginfo/lexical-scopes-in-block-expression.rs b/tests/debuginfo/lexical-scopes-in-block-expression.rs
index cd27c88db58..bec69ec87e8 100644
--- a/tests/debuginfo/lexical-scopes-in-block-expression.rs
+++ b/tests/debuginfo/lexical-scopes-in-block-expression.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -336,8 +337,6 @@
 
 #![allow(unused_variables)]
 #![allow(unused_assignments)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 static mut MUT_INT: isize = 0;
 
diff --git a/tests/debuginfo/limited-debuginfo.rs b/tests/debuginfo/limited-debuginfo.rs
index fb453d8078c..c3b516460aa 100644
--- a/tests/debuginfo/limited-debuginfo.rs
+++ b/tests/debuginfo/limited-debuginfo.rs
@@ -1,6 +1,7 @@
 //@ ignore-lldb
 
 //@ compile-flags:-C debuginfo=1
+//@ disable-gdb-pretty-printers
 
 // Make sure functions have proper names
 // gdb-command:info functions
@@ -18,8 +19,6 @@
 
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct Struct {
     a: i64,
diff --git a/tests/debuginfo/method-on-enum.rs b/tests/debuginfo/method-on-enum.rs
index 754b4a2dc26..f86cf8ccfdf 100644
--- a/tests/debuginfo/method-on-enum.rs
+++ b/tests/debuginfo/method-on-enum.rs
@@ -2,6 +2,7 @@
 //@ min-gdb-version: 13.0
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 //@ ignore-windows-gnu: #128973
 
@@ -104,9 +105,6 @@
 // lldb-check:[...] -10
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 #[derive(Copy, Clone)]
 enum Enum {
     Variant1 { x: u16, y: u16 },
diff --git a/tests/debuginfo/method-on-generic-struct.rs b/tests/debuginfo/method-on-generic-struct.rs
index 1e6c9d66178..5da952fa4e1 100644
--- a/tests/debuginfo/method-on-generic-struct.rs
+++ b/tests/debuginfo/method-on-generic-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -99,9 +100,6 @@
 // lldb-check:[...] -10
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 #[derive(Copy, Clone)]
 struct Struct<T> {
     x: T
diff --git a/tests/debuginfo/method-on-struct.rs b/tests/debuginfo/method-on-struct.rs
index 91f609365e9..83badd8dbf0 100644
--- a/tests/debuginfo/method-on-struct.rs
+++ b/tests/debuginfo/method-on-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -99,9 +100,6 @@
 // lldb-check:[...] -10
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 #[derive(Copy, Clone)]
 struct Struct {
     x: isize
diff --git a/tests/debuginfo/method-on-trait.rs b/tests/debuginfo/method-on-trait.rs
index 7b95e1f81c7..c91b255bd6a 100644
--- a/tests/debuginfo/method-on-trait.rs
+++ b/tests/debuginfo/method-on-trait.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -99,9 +100,6 @@
 // lldb-check:[...] -10
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 #[derive(Copy, Clone)]
 struct Struct {
     x: isize
diff --git a/tests/debuginfo/method-on-tuple-struct.rs b/tests/debuginfo/method-on-tuple-struct.rs
index 04c00d88302..7e6e724d42e 100644
--- a/tests/debuginfo/method-on-tuple-struct.rs
+++ b/tests/debuginfo/method-on-tuple-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -99,9 +100,6 @@
 // lldb-check:[...] -10
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 #[derive(Copy, Clone)]
 struct TupleStruct(isize, f64);
 
diff --git a/tests/debuginfo/multi-cgu.rs b/tests/debuginfo/multi-cgu.rs
index 3bb5269adea..ca4146da405 100644
--- a/tests/debuginfo/multi-cgu.rs
+++ b/tests/debuginfo/multi-cgu.rs
@@ -2,6 +2,7 @@
 // compiled with multiple codegen units. (see #39160)
 
 //@ compile-flags:-g -Ccodegen-units=2
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===============================================================
 
@@ -29,9 +30,6 @@
 // lldb-command:continue
 
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 mod a {
     pub fn foo(xxx: u32) {
         super::_zzz(); // #break
diff --git a/tests/debuginfo/multiple-functions-equal-var-names.rs b/tests/debuginfo/multiple-functions-equal-var-names.rs
index 6ae9225d55c..2bc40b87e6f 100644
--- a/tests/debuginfo/multiple-functions-equal-var-names.rs
+++ b/tests/debuginfo/multiple-functions-equal-var-names.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -32,8 +33,6 @@
 // lldb-check:[...] 30303
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 fn function_one() {
     let abc = 10101;
diff --git a/tests/debuginfo/multiple-functions.rs b/tests/debuginfo/multiple-functions.rs
index 3f7a0ded91b..5469408c78f 100644
--- a/tests/debuginfo/multiple-functions.rs
+++ b/tests/debuginfo/multiple-functions.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -32,8 +33,6 @@
 // lldb-check:[...] 30303
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 fn function_one() {
     let a = 10101;
diff --git a/tests/debuginfo/name-shadowing-and-scope-nesting.rs b/tests/debuginfo/name-shadowing-and-scope-nesting.rs
index d3829b60713..e8d85473d86 100644
--- a/tests/debuginfo/name-shadowing-and-scope-nesting.rs
+++ b/tests/debuginfo/name-shadowing-and-scope-nesting.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -81,9 +82,6 @@
 // lldb-check:[...] 20
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn main() {
     let x = false;
     let y = true;
diff --git a/tests/debuginfo/option-like-enum.rs b/tests/debuginfo/option-like-enum.rs
index 72a41986dce..5a55b143fbb 100644
--- a/tests/debuginfo/option-like-enum.rs
+++ b/tests/debuginfo/option-like-enum.rs
@@ -2,6 +2,7 @@
 //@ min-gdb-version: 13.0
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -69,9 +70,6 @@
 // lldb-check:[...] Nope
 
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 // If a struct has exactly two variants, one of them is empty, and the other one
 // contains a non-nullable pointer, then this value is used as the discriminator.
 // The test cases in this file make sure that something readable is generated for
diff --git a/tests/debuginfo/packed-struct-with-destructor.rs b/tests/debuginfo/packed-struct-with-destructor.rs
index f923d36953c..0c5725ca25c 100644
--- a/tests/debuginfo/packed-struct-with-destructor.rs
+++ b/tests/debuginfo/packed-struct-with-destructor.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -60,8 +61,6 @@
 
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 #[repr(packed)]
 struct Packed {
diff --git a/tests/debuginfo/packed-struct.rs b/tests/debuginfo/packed-struct.rs
index 2b3652fe861..3bc39adee83 100644
--- a/tests/debuginfo/packed-struct.rs
+++ b/tests/debuginfo/packed-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -46,8 +47,6 @@
 // lldb-check:[...] 40
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 #[repr(packed)]
 struct Packed {
diff --git a/tests/debuginfo/recursive-enum.rs b/tests/debuginfo/recursive-enum.rs
index b861e6d617c..5fb339f54f3 100644
--- a/tests/debuginfo/recursive-enum.rs
+++ b/tests/debuginfo/recursive-enum.rs
@@ -1,14 +1,13 @@
 //@ ignore-lldb
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 // gdb-command:run
 
 // Test whether compiling a recursive enum definition crashes debug info generation. The test case
 // is taken from issue #11083 and #135093.
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 pub struct Window<'a> {
     callbacks: WindowCallbacks<'a>
diff --git a/tests/debuginfo/recursive-struct.rs b/tests/debuginfo/recursive-struct.rs
index a97eb295eb4..5be90992848 100644
--- a/tests/debuginfo/recursive-struct.rs
+++ b/tests/debuginfo/recursive-struct.rs
@@ -1,6 +1,7 @@
 //@ ignore-lldb
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // gdb-command:run
 
@@ -58,8 +59,6 @@
 // gdb-command:continue
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 use self::Opt::{Empty, Val};
 use std::boxed::Box as B;
diff --git a/tests/debuginfo/reference-debuginfo.rs b/tests/debuginfo/reference-debuginfo.rs
index 773c3ae4bc3..242da1dd654 100644
--- a/tests/debuginfo/reference-debuginfo.rs
+++ b/tests/debuginfo/reference-debuginfo.rs
@@ -3,6 +3,7 @@
 // and leaves codegen to create a ladder of allocations so as `*a == b`.
 //
 //@ compile-flags:-g -Zmir-enable-passes=+ReferencePropagation,-ConstDebugInfo
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -106,8 +107,6 @@
 // lldb-check:[...] 3.5
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 #![feature(f16)]
 
 fn main() {
diff --git a/tests/debuginfo/self-in-default-method.rs b/tests/debuginfo/self-in-default-method.rs
index 02fc01d96eb..4297129e0cf 100644
--- a/tests/debuginfo/self-in-default-method.rs
+++ b/tests/debuginfo/self-in-default-method.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -99,9 +100,6 @@
 // lldb-check:[...] -10
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 #[derive(Copy, Clone)]
 struct Struct {
     x: isize
diff --git a/tests/debuginfo/self-in-generic-default-method.rs b/tests/debuginfo/self-in-generic-default-method.rs
index 65018e549ee..e7ffa05f418 100644
--- a/tests/debuginfo/self-in-generic-default-method.rs
+++ b/tests/debuginfo/self-in-generic-default-method.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -99,9 +100,6 @@
 // lldb-check:[...] -10.5
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 #[derive(Copy, Clone)]
 struct Struct {
     x: isize
diff --git a/tests/debuginfo/shadowed-argument.rs b/tests/debuginfo/shadowed-argument.rs
index 3a575b4addf..3a0f0ad17a8 100644
--- a/tests/debuginfo/shadowed-argument.rs
+++ b/tests/debuginfo/shadowed-argument.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -46,9 +47,6 @@
 // lldb-command:continue
 
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn a_function(x: bool, y: bool) {
     zzz(); // #break
     sentinel();
diff --git a/tests/debuginfo/shadowed-variable.rs b/tests/debuginfo/shadowed-variable.rs
index 752e4c233f1..6a658a7c494 100644
--- a/tests/debuginfo/shadowed-variable.rs
+++ b/tests/debuginfo/shadowed-variable.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -68,9 +69,6 @@
 // lldb-check:[...] 20
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn main() {
     let x = false;
     let y = true;
diff --git a/tests/debuginfo/simd.rs b/tests/debuginfo/simd.rs
index 12675a71a57..43cd7130b25 100644
--- a/tests/debuginfo/simd.rs
+++ b/tests/debuginfo/simd.rs
@@ -7,6 +7,7 @@
 //@ ignore-s390x
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 // gdb-command:run
 
 // gdb-command:print vi8x16
@@ -35,8 +36,6 @@
 // gdb-command:continue
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 #![feature(repr_simd)]
 
 #[repr(simd)]
diff --git a/tests/debuginfo/simple-lexical-scope.rs b/tests/debuginfo/simple-lexical-scope.rs
index 6008489bd65..64afcf8d61d 100644
--- a/tests/debuginfo/simple-lexical-scope.rs
+++ b/tests/debuginfo/simple-lexical-scope.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -66,9 +67,6 @@
 // lldb-command:continue
 
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 fn main() {
     let x = false;
 
diff --git a/tests/debuginfo/simple-struct.rs b/tests/debuginfo/simple-struct.rs
index bb6b2b79810..da09a8a3ce0 100644
--- a/tests/debuginfo/simple-struct.rs
+++ b/tests/debuginfo/simple-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags: -g -Zmir-enable-passes=-CheckAlignment
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -84,8 +85,6 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct NoPadding16 {
     x: u16,
diff --git a/tests/debuginfo/simple-tuple.rs b/tests/debuginfo/simple-tuple.rs
index 82467ef3bcf..f086472d725 100644
--- a/tests/debuginfo/simple-tuple.rs
+++ b/tests/debuginfo/simple-tuple.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -121,8 +122,6 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 static mut NO_PADDING_8: (i8, u8) = (-50, 50);
 static mut NO_PADDING_16: (i16, i16, u16) = (-1, 2, 3);
diff --git a/tests/debuginfo/static-method-on-struct-and-enum.rs b/tests/debuginfo/static-method-on-struct-and-enum.rs
index b487512a52f..2a3502712de 100644
--- a/tests/debuginfo/static-method-on-struct-and-enum.rs
+++ b/tests/debuginfo/static-method-on-struct-and-enum.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -41,9 +42,6 @@
 // lldb-check:[...] 5
 // lldb-command:continue
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 struct Struct {
     x: isize
 }
diff --git a/tests/debuginfo/strings-and-strs.rs b/tests/debuginfo/strings-and-strs.rs
index 7d550408bec..392cf697e11 100644
--- a/tests/debuginfo/strings-and-strs.rs
+++ b/tests/debuginfo/strings-and-strs.rs
@@ -2,6 +2,7 @@
 //@ min-lldb-version: 1800
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 // gdb-command:run
@@ -40,8 +41,6 @@
 
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 pub struct Foo<'a> {
     inner: &'a str,
diff --git a/tests/debuginfo/struct-in-enum.rs b/tests/debuginfo/struct-in-enum.rs
index bc2c59fe4aa..c5a7fb95e1e 100644
--- a/tests/debuginfo/struct-in-enum.rs
+++ b/tests/debuginfo/struct-in-enum.rs
@@ -1,6 +1,7 @@
 //@ min-lldb-version: 1800
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -30,8 +31,6 @@
 // lldb-check:[...] TheOnlyCase(Struct { x: 123, y: 456, z: 789 })
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 use self::Regular::{Case1, Case2};
 use self::Univariant::TheOnlyCase;
diff --git a/tests/debuginfo/struct-in-struct.rs b/tests/debuginfo/struct-in-struct.rs
index 3cf48470391..c818df31b4b 100644
--- a/tests/debuginfo/struct-in-struct.rs
+++ b/tests/debuginfo/struct-in-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -43,8 +44,6 @@
 // lldb-check:[...] { x = { x = 25 } y = { x = { x = 26 y = 27 } y = { x = 28 y = 29 } z = { x = 30 y = 31 } } z = { x = { x = { x = 32 } } } }
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct Simple {
     x: i32
diff --git a/tests/debuginfo/struct-namespace.rs b/tests/debuginfo/struct-namespace.rs
index 95788419100..d56c84c4f13 100644
--- a/tests/debuginfo/struct-namespace.rs
+++ b/tests/debuginfo/struct-namespace.rs
@@ -1,5 +1,6 @@
 //@ ignore-gdb
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // Check that structs get placed in the correct namespace
 
@@ -16,8 +17,6 @@
 
 #![allow(unused_variables)]
 #![allow(dead_code)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct Struct1 {
     a: u32,
diff --git a/tests/debuginfo/struct-style-enum.rs b/tests/debuginfo/struct-style-enum.rs
index cea9f3def8b..1f28fe4fea1 100644
--- a/tests/debuginfo/struct-style-enum.rs
+++ b/tests/debuginfo/struct-style-enum.rs
@@ -1,5 +1,6 @@
 //@ min-lldb-version: 1800
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -36,8 +37,6 @@
 // lldb-check:(struct_style_enum::Univariant) univariant = { value = { a = -1 } }
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 use self::Regular::{Case1, Case2, Case3};
 use self::Univariant::TheOnlyCase;
diff --git a/tests/debuginfo/struct-with-destructor.rs b/tests/debuginfo/struct-with-destructor.rs
index c159824980a..4d2ce8ff79d 100644
--- a/tests/debuginfo/struct-with-destructor.rs
+++ b/tests/debuginfo/struct-with-destructor.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -32,8 +33,6 @@
 // lldb-check:[...] { a = { a = { x = 7890 y = 9870 } } }
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct NoDestructor {
     x: i32,
diff --git a/tests/debuginfo/trait-pointers.rs b/tests/debuginfo/trait-pointers.rs
index 71da71b897a..5cdefe94e50 100644
--- a/tests/debuginfo/trait-pointers.rs
+++ b/tests/debuginfo/trait-pointers.rs
@@ -1,10 +1,9 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 // gdb-command:run
 // lldb-command:run
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 trait Trait {
     fn method(&self) -> isize { 0 }
diff --git a/tests/debuginfo/tuple-in-struct.rs b/tests/debuginfo/tuple-in-struct.rs
index a74d6203f5f..bef96fad50c 100644
--- a/tests/debuginfo/tuple-in-struct.rs
+++ b/tests/debuginfo/tuple-in-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // gdb-command:run
 
@@ -28,8 +29,6 @@
 // gdb-check:$10 = tuple_in_struct::MixedPadding {x: ((40, 41, 42), (43, 44)), y: (45, 46, 47, 48)}
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct NoPadding1 {
     x: (i32, i32),
diff --git a/tests/debuginfo/tuple-in-tuple.rs b/tests/debuginfo/tuple-in-tuple.rs
index d4388095ad7..7bf97764c5c 100644
--- a/tests/debuginfo/tuple-in-tuple.rs
+++ b/tests/debuginfo/tuple-in-tuple.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -111,8 +112,6 @@
 // cdb-check:[...][1]              : 22 [Type: [...]]
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 fn main() {
     let no_padding1: ((u32, u32), u32, u32) = ((0, 1), 2, 3);
diff --git a/tests/debuginfo/tuple-struct.rs b/tests/debuginfo/tuple-struct.rs
index 0110203a7c7..a1bdaf1f3bb 100644
--- a/tests/debuginfo/tuple-struct.rs
+++ b/tests/debuginfo/tuple-struct.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -50,9 +51,6 @@
 // structs.
 
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 struct NoPadding16(u16, i16);
 struct NoPadding32(i32, f32, u32);
 struct NoPadding64(f64, i64, u64);
diff --git a/tests/debuginfo/tuple-style-enum.rs b/tests/debuginfo/tuple-style-enum.rs
index a759ad61c05..6113ccc10a1 100644
--- a/tests/debuginfo/tuple-style-enum.rs
+++ b/tests/debuginfo/tuple-style-enum.rs
@@ -1,6 +1,7 @@
 //@ min-lldb-version: 1800
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -37,8 +38,6 @@
 // lldb-check:(tuple_style_enum::Univariant) univariant = { value = { 0 = -1 } }
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 use self::Regular::{Case1, Case2, Case3};
 use self::Univariant::TheOnlyCase;
diff --git a/tests/debuginfo/type-names.rs b/tests/debuginfo/type-names.rs
index ac61fef48fe..ecf7c597c0c 100644
--- a/tests/debuginfo/type-names.rs
+++ b/tests/debuginfo/type-names.rs
@@ -6,6 +6,7 @@
 //@ min-gdb-version: 9.2
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ==================================================================================
 
@@ -271,8 +272,6 @@
 // cdb-check:struct type_names::mod1::extern$0::ForeignType2 * foreign2 = [...]
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 #![feature(extern_types)]
 
 use std::marker::PhantomData;
diff --git a/tests/debuginfo/union-smoke.rs b/tests/debuginfo/union-smoke.rs
index 6043240069e..bd253794bd8 100644
--- a/tests/debuginfo/union-smoke.rs
+++ b/tests/debuginfo/union-smoke.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -18,8 +19,6 @@
 // lldb-check:[...] { a = { 0 = '\x01' 1 = '\x01' } b = 257 }
 
 #![allow(unused)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 union U {
     a: (u8, u8),
diff --git a/tests/debuginfo/unique-enum.rs b/tests/debuginfo/unique-enum.rs
index 230429278aa..e5a9c550135 100644
--- a/tests/debuginfo/unique-enum.rs
+++ b/tests/debuginfo/unique-enum.rs
@@ -1,6 +1,7 @@
 //@ min-lldb-version: 1800
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -30,8 +31,6 @@
 // lldb-check:(unique_enum::Univariant) *univariant = { value = { 0 = 123234 } }
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 // The first element is to ensure proper alignment, irrespective of the machines word size. Since
 // the size of the discriminant value is machine dependent, this has be taken into account when
diff --git a/tests/debuginfo/unreachable-locals.rs b/tests/debuginfo/unreachable-locals.rs
index d4416387e0b..4d3f01fe423 100644
--- a/tests/debuginfo/unreachable-locals.rs
+++ b/tests/debuginfo/unreachable-locals.rs
@@ -1,8 +1,7 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 // No need to actually run the debugger, just make sure that the compiler can
 // handle locals in unreachable code.
diff --git a/tests/debuginfo/unsized.rs b/tests/debuginfo/unsized.rs
index edd9f5af557..e34eaaaacb9 100644
--- a/tests/debuginfo/unsized.rs
+++ b/tests/debuginfo/unsized.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 //@ ignore-gdb-version: 13.1 - 99.0
 // ^ https://sourceware.org/bugzilla/show_bug.cgi?id=30330
 
@@ -41,9 +42,6 @@
 // cdb-check:[+0x000] pointer          : 0x[...] [Type: unsized::Foo<dyn$<core::fmt::Debug> > *]
 // cdb-check:[...] vtable           : 0x[...] [Type: unsigned [...]int[...] (*)[4]]
 
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
 struct Foo<T: ?Sized> {
     value: T,
 }
diff --git a/tests/debuginfo/var-captured-in-nested-closure.rs b/tests/debuginfo/var-captured-in-nested-closure.rs
index 4e8700015ba..1795a352802 100644
--- a/tests/debuginfo/var-captured-in-nested-closure.rs
+++ b/tests/debuginfo/var-captured-in-nested-closure.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -115,8 +116,6 @@
 // cdb-check:closure_local    : 8 [Type: [...]]
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct Struct {
     a: isize,
diff --git a/tests/debuginfo/var-captured-in-sendable-closure.rs b/tests/debuginfo/var-captured-in-sendable-closure.rs
index cbb09daeb5f..2b0d4bb430a 100644
--- a/tests/debuginfo/var-captured-in-sendable-closure.rs
+++ b/tests/debuginfo/var-captured-in-sendable-closure.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -28,8 +29,6 @@
 // lldb-check:[...] 5
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct Struct {
     a: isize,
diff --git a/tests/debuginfo/var-captured-in-stack-closure.rs b/tests/debuginfo/var-captured-in-stack-closure.rs
index 0f84ea57b00..7fda71c2297 100644
--- a/tests/debuginfo/var-captured-in-stack-closure.rs
+++ b/tests/debuginfo/var-captured-in-stack-closure.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -100,8 +101,6 @@
 // cdb-check:owned            : 0x[...] : 6 [Type: [...] *]
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct Struct {
     a: isize,
diff --git a/tests/debuginfo/vec-slices.rs b/tests/debuginfo/vec-slices.rs
index 2b4d624976a..2a4e413612f 100644
--- a/tests/debuginfo/vec-slices.rs
+++ b/tests/debuginfo/vec-slices.rs
@@ -2,6 +2,7 @@
 // ^ test temporarily disabled as it fails under gdb 15
 
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -71,8 +72,6 @@
 // lldb-check:[...] size=2 { [0] = { x = 10 y = 11 z = 12 } [1] = { x = 13 y = 14 z = 15 } }
 
 #![allow(dead_code, unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 struct AStruct {
     x: i16,
diff --git a/tests/debuginfo/vec.rs b/tests/debuginfo/vec.rs
index 1093e38d878..fd75e7005af 100644
--- a/tests/debuginfo/vec.rs
+++ b/tests/debuginfo/vec.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-g
+//@ disable-gdb-pretty-printers
 
 // === GDB TESTS ===================================================================================
 
@@ -16,8 +17,6 @@
 // lldb-check:[...] { [0] = 1 [1] = 2 [2] = 3 }
 
 #![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
 
 static mut VECT: [i32; 3] = [1, 2, 3];
 
diff --git a/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir b/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
index 109a41d1ef9..9bff257e063 100644
--- a/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
+++ b/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
@@ -9,10 +9,6 @@
                     std::future::ResumeTy,
                     (),
                     (),
-                    CoroutineWitness(
-                        DefId(0:5 ~ async_await[ccf8]::a::{closure#0}),
-                        [],
-                    ),
                     (),
                 ],
             ),
@@ -30,10 +26,6 @@
                     std::future::ResumeTy,
                     (),
                     (),
-                    CoroutineWitness(
-                        DefId(0:5 ~ async_await[ccf8]::a::{closure#0}),
-                        [],
-                    ),
                     (),
                 ],
             ),
diff --git a/tests/mir-opt/building/custom/terminators.tail_call.built.after.mir b/tests/mir-opt/building/custom/terminators.tail_call.built.after.mir
index ab3925dae1c..feec68d3b0d 100644
--- a/tests/mir-opt/building/custom/terminators.tail_call.built.after.mir
+++ b/tests/mir-opt/building/custom/terminators.tail_call.built.after.mir
@@ -6,6 +6,6 @@ fn tail_call(_1: i32) -> i32 {
 
     bb0: {
         _2 = Add(copy _1, const 42_i32);
-        tailcall ident::<i32>(Spanned { node: copy _2, span: $DIR/terminators.rs:32:28: 32:29 (#0) });
+        tailcall ident::<i32>(copy _2);
     }
 }
diff --git a/tests/mir-opt/building/issue_101867.main.built.after.mir b/tests/mir-opt/building/issue_101867.main.built.after.mir
index e59b23fdd20..8a36c901eed 100644
--- a/tests/mir-opt/building/issue_101867.main.built.after.mir
+++ b/tests/mir-opt/building/issue_101867.main.built.after.mir
@@ -24,7 +24,6 @@ fn main() -> () {
         _1 = Option::<u8>::Some(const 1_u8);
         FakeRead(ForLet(None), _1);
         AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] });
-        StorageLive(_5);
         PlaceMention(_1);
         _6 = discriminant(_1);
         switchInt(move _6) -> [1: bb4, otherwise: bb3];
@@ -55,6 +54,7 @@ fn main() -> () {
     }
 
     bb6: {
+        StorageLive(_5);
         _5 = copy ((_1 as Some).0: u8);
         _0 = const ();
         StorageDead(_5);
@@ -63,7 +63,6 @@ fn main() -> () {
     }
 
     bb7: {
-        StorageDead(_5);
         goto -> bb1;
     }
 
diff --git a/tests/mir-opt/building/user_type_annotations.let_else.built.after.mir b/tests/mir-opt/building/user_type_annotations.let_else.built.after.mir
index 6369dbec750..3d26fe24ac9 100644
--- a/tests/mir-opt/building/user_type_annotations.let_else.built.after.mir
+++ b/tests/mir-opt/building/user_type_annotations.let_else.built.after.mir
@@ -21,9 +21,6 @@ fn let_else() -> () {
     }
 
     bb0: {
-        StorageLive(_2);
-        StorageLive(_3);
-        StorageLive(_4);
         StorageLive(_5);
         StorageLive(_6);
         StorageLive(_7);
@@ -51,16 +48,19 @@ fn let_else() -> () {
 
     bb4: {
         AscribeUserType(_5, +, UserTypeProjection { base: UserType(1), projs: [] });
+        StorageLive(_2);
         _2 = copy (_5.0: u32);
+        StorageLive(_3);
         _3 = copy (_5.1: u64);
+        StorageLive(_4);
         _4 = copy (_5.2: &char);
         StorageDead(_7);
         StorageDead(_5);
         _0 = const ();
-        StorageDead(_8);
         StorageDead(_4);
         StorageDead(_3);
         StorageDead(_2);
+        StorageDead(_8);
         return;
     }
 
@@ -68,9 +68,6 @@ fn let_else() -> () {
         StorageDead(_7);
         StorageDead(_5);
         StorageDead(_8);
-        StorageDead(_4);
-        StorageDead(_3);
-        StorageDead(_2);
         goto -> bb1;
     }
 
diff --git a/tests/mir-opt/gvn.dereference_indexing.GVN.panic-abort.diff b/tests/mir-opt/gvn.dereference_indexing.GVN.panic-abort.diff
new file mode 100644
index 00000000000..9bdcc2f108a
--- /dev/null
+++ b/tests/mir-opt/gvn.dereference_indexing.GVN.panic-abort.diff
@@ -0,0 +1,59 @@
+- // MIR for `dereference_indexing` before GVN
++ // MIR for `dereference_indexing` after GVN
+  
+  fn dereference_indexing(_1: [u8; 2], _2: usize) -> () {
+      debug array => _1;
+      debug index => _2;
+      let mut _0: ();
+      let _3: &u8;
+      let _4: usize;
+      let mut _5: usize;
+      let _6: usize;
+      let mut _7: bool;
+      let _8: ();
+      let mut _9: u8;
+      scope 1 {
+          debug a => _3;
+      }
+      scope 2 {
+          debug i => _4;
+      }
+  
+      bb0: {
+          StorageLive(_3);
+-         StorageLive(_4);
++         nop;
+          StorageLive(_5);
+          _5 = copy _2;
+-         _4 = Add(move _5, const 1_usize);
++         _4 = Add(copy _2, const 1_usize);
+          StorageDead(_5);
+          StorageLive(_6);
+          _6 = copy _4;
+-         _7 = Lt(copy _6, const 2_usize);
+-         assert(move _7, "index out of bounds: the length is {} but the index is {}", const 2_usize, copy _6) -> [success: bb1, unwind unreachable];
++         _7 = Lt(copy _4, const 2_usize);
++         assert(move _7, "index out of bounds: the length is {} but the index is {}", const 2_usize, copy _4) -> [success: bb1, unwind unreachable];
+      }
+  
+      bb1: {
+-         _3 = &_1[_6];
+-         StorageDead(_4);
++         _3 = &_1[_4];
++         nop;
+          StorageLive(_8);
+          StorageLive(_9);
+          _9 = copy (*_3);
+          _8 = opaque::<u8>(move _9) -> [return: bb2, unwind unreachable];
+      }
+  
+      bb2: {
+          StorageDead(_9);
+          StorageDead(_8);
+          _0 = const ();
+          StorageDead(_6);
+          StorageDead(_3);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/gvn.dereference_indexing.GVN.panic-unwind.diff b/tests/mir-opt/gvn.dereference_indexing.GVN.panic-unwind.diff
new file mode 100644
index 00000000000..f38bc51adc4
--- /dev/null
+++ b/tests/mir-opt/gvn.dereference_indexing.GVN.panic-unwind.diff
@@ -0,0 +1,59 @@
+- // MIR for `dereference_indexing` before GVN
++ // MIR for `dereference_indexing` after GVN
+  
+  fn dereference_indexing(_1: [u8; 2], _2: usize) -> () {
+      debug array => _1;
+      debug index => _2;
+      let mut _0: ();
+      let _3: &u8;
+      let _4: usize;
+      let mut _5: usize;
+      let _6: usize;
+      let mut _7: bool;
+      let _8: ();
+      let mut _9: u8;
+      scope 1 {
+          debug a => _3;
+      }
+      scope 2 {
+          debug i => _4;
+      }
+  
+      bb0: {
+          StorageLive(_3);
+-         StorageLive(_4);
++         nop;
+          StorageLive(_5);
+          _5 = copy _2;
+-         _4 = Add(move _5, const 1_usize);
++         _4 = Add(copy _2, const 1_usize);
+          StorageDead(_5);
+          StorageLive(_6);
+          _6 = copy _4;
+-         _7 = Lt(copy _6, const 2_usize);
+-         assert(move _7, "index out of bounds: the length is {} but the index is {}", const 2_usize, copy _6) -> [success: bb1, unwind continue];
++         _7 = Lt(copy _4, const 2_usize);
++         assert(move _7, "index out of bounds: the length is {} but the index is {}", const 2_usize, copy _4) -> [success: bb1, unwind continue];
+      }
+  
+      bb1: {
+-         _3 = &_1[_6];
+-         StorageDead(_4);
++         _3 = &_1[_4];
++         nop;
+          StorageLive(_8);
+          StorageLive(_9);
+          _9 = copy (*_3);
+          _8 = opaque::<u8>(move _9) -> [return: bb2, unwind continue];
+      }
+  
+      bb2: {
+          StorageDead(_9);
+          StorageDead(_8);
+          _0 = const ();
+          StorageDead(_6);
+          StorageDead(_3);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/gvn.rs b/tests/mir-opt/gvn.rs
index 407980fd0fd..98f94fbf0b1 100644
--- a/tests/mir-opt/gvn.rs
+++ b/tests/mir-opt/gvn.rs
@@ -1052,6 +1052,26 @@ fn remove_casts_must_change_both_sides(mut_a: &*mut u8, mut_b: *mut u8) -> bool
     }
 }
 
+/// Verify that we do not references to non-existing locals when dereferencing projections.
+fn dereference_indexing(array: [u8; 2], index: usize) {
+    // CHECK-LABEL: fn dereference_indexing(
+    // CHECK: debug a => [[a:_.*]];
+    // CHECK: debug i => [[i:_.*]];
+
+    let a = {
+        // CHECK: [[i]] = Add(copy _2, const 1_usize);
+        let i = index + 1;
+        // CHECK: [[a]] = &_1[[[i]]];
+        &array[i]
+    };
+
+    // CHECK-NOT: [{{.*}}]
+    // CHECK: [[tmp:_.*]] = copy (*[[a]]);
+    // CHECK: opaque::<u8>(move [[tmp]])
+    opaque(*a);
+}
+
+// CHECK-LABEL: fn main(
 fn main() {
     subexpression_elimination(2, 4, 5);
     wrap_unwrap(5);
@@ -1079,6 +1099,7 @@ fn main() {
     slice_const_length(&[1]);
     meta_of_ref_to_slice(&42);
     slice_from_raw_parts_as_ptr(&123, 456);
+    dereference_indexing([129, 14], 5);
 }
 
 #[inline(never)]
@@ -1138,3 +1159,4 @@ enum Never {}
 // EMIT_MIR gvn.cast_pointer_then_transmute.GVN.diff
 // EMIT_MIR gvn.transmute_then_cast_pointer.GVN.diff
 // EMIT_MIR gvn.remove_casts_must_change_both_sides.GVN.diff
+// EMIT_MIR gvn.dereference_indexing.GVN.diff
diff --git a/tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff b/tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff
index b3eb3e1f8b9..484bc7dad12 100644
--- a/tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff
+++ b/tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff
@@ -85,11 +85,11 @@
           _8 = &(_2.2: std::string::String);
 -         _3 = &fake shallow (_2.0: bool);
 -         _4 = &fake shallow (_2.1: bool);
-          StorageLive(_12);
-          StorageLive(_13);
-          _13 = copy _1;
--         switchInt(move _13) -> [0: bb16, otherwise: bb15];
-+         switchInt(move _13) -> [0: bb13, otherwise: bb12];
+          StorageLive(_9);
+          StorageLive(_10);
+          _10 = copy _1;
+-         switchInt(move _10) -> [0: bb12, otherwise: bb11];
++         switchInt(move _10) -> [0: bb9, otherwise: bb8];
       }
   
 -     bb9: {
@@ -100,11 +100,11 @@
           _8 = &(_2.2: std::string::String);
 -         _3 = &fake shallow (_2.0: bool);
 -         _4 = &fake shallow (_2.1: bool);
-          StorageLive(_9);
-          StorageLive(_10);
-          _10 = copy _1;
--         switchInt(move _10) -> [0: bb12, otherwise: bb11];
-+         switchInt(move _10) -> [0: bb9, otherwise: bb8];
+          StorageLive(_12);
+          StorageLive(_13);
+          _13 = copy _1;
+-         switchInt(move _13) -> [0: bb16, otherwise: bb15];
++         switchInt(move _13) -> [0: bb13, otherwise: bb12];
       }
   
 -     bb10: {
@@ -139,7 +139,7 @@
 -         FakeRead(ForGuardBinding, _6);
 -         FakeRead(ForGuardBinding, _8);
           StorageLive(_5);
-          _5 = copy (_2.1: bool);
+          _5 = copy (_2.0: bool);
           StorageLive(_7);
           _7 = move (_2.2: std::string::String);
 -         goto -> bb10;
@@ -152,8 +152,8 @@
           StorageDead(_9);
           StorageDead(_8);
           StorageDead(_6);
--         falseEdge -> [real: bb1, imaginary: bb1];
-+         goto -> bb1;
+-         falseEdge -> [real: bb3, imaginary: bb3];
++         goto -> bb2;
       }
   
 -     bb15: {
@@ -181,7 +181,7 @@
 -         FakeRead(ForGuardBinding, _6);
 -         FakeRead(ForGuardBinding, _8);
           StorageLive(_5);
-          _5 = copy (_2.0: bool);
+          _5 = copy (_2.1: bool);
           StorageLive(_7);
           _7 = move (_2.2: std::string::String);
 -         goto -> bb10;
@@ -194,8 +194,8 @@
           StorageDead(_12);
           StorageDead(_8);
           StorageDead(_6);
--         falseEdge -> [real: bb3, imaginary: bb3];
-+         goto -> bb2;
+-         falseEdge -> [real: bb1, imaginary: bb1];
++         goto -> bb1;
       }
   
 -     bb19: {
diff --git a/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff b/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff
index b3eb3e1f8b9..484bc7dad12 100644
--- a/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff
+++ b/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff
@@ -85,11 +85,11 @@
           _8 = &(_2.2: std::string::String);
 -         _3 = &fake shallow (_2.0: bool);
 -         _4 = &fake shallow (_2.1: bool);
-          StorageLive(_12);
-          StorageLive(_13);
-          _13 = copy _1;
--         switchInt(move _13) -> [0: bb16, otherwise: bb15];
-+         switchInt(move _13) -> [0: bb13, otherwise: bb12];
+          StorageLive(_9);
+          StorageLive(_10);
+          _10 = copy _1;
+-         switchInt(move _10) -> [0: bb12, otherwise: bb11];
++         switchInt(move _10) -> [0: bb9, otherwise: bb8];
       }
   
 -     bb9: {
@@ -100,11 +100,11 @@
           _8 = &(_2.2: std::string::String);
 -         _3 = &fake shallow (_2.0: bool);
 -         _4 = &fake shallow (_2.1: bool);
-          StorageLive(_9);
-          StorageLive(_10);
-          _10 = copy _1;
--         switchInt(move _10) -> [0: bb12, otherwise: bb11];
-+         switchInt(move _10) -> [0: bb9, otherwise: bb8];
+          StorageLive(_12);
+          StorageLive(_13);
+          _13 = copy _1;
+-         switchInt(move _13) -> [0: bb16, otherwise: bb15];
++         switchInt(move _13) -> [0: bb13, otherwise: bb12];
       }
   
 -     bb10: {
@@ -139,7 +139,7 @@
 -         FakeRead(ForGuardBinding, _6);
 -         FakeRead(ForGuardBinding, _8);
           StorageLive(_5);
-          _5 = copy (_2.1: bool);
+          _5 = copy (_2.0: bool);
           StorageLive(_7);
           _7 = move (_2.2: std::string::String);
 -         goto -> bb10;
@@ -152,8 +152,8 @@
           StorageDead(_9);
           StorageDead(_8);
           StorageDead(_6);
--         falseEdge -> [real: bb1, imaginary: bb1];
-+         goto -> bb1;
+-         falseEdge -> [real: bb3, imaginary: bb3];
++         goto -> bb2;
       }
   
 -     bb15: {
@@ -181,7 +181,7 @@
 -         FakeRead(ForGuardBinding, _6);
 -         FakeRead(ForGuardBinding, _8);
           StorageLive(_5);
-          _5 = copy (_2.0: bool);
+          _5 = copy (_2.1: bool);
           StorageLive(_7);
           _7 = move (_2.2: std::string::String);
 -         goto -> bb10;
@@ -194,8 +194,8 @@
           StorageDead(_12);
           StorageDead(_8);
           StorageDead(_6);
--         falseEdge -> [real: bb3, imaginary: bb3];
-+         goto -> bb2;
+-         falseEdge -> [real: bb1, imaginary: bb1];
++         goto -> bb1;
       }
   
 -     bb19: {
diff --git a/tests/mir-opt/pre-codegen/derived_ord_debug.rs b/tests/mir-opt/pre-codegen/derived_ord_debug.rs
new file mode 100644
index 00000000000..1d6a884cee4
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/derived_ord_debug.rs
@@ -0,0 +1,18 @@
+//@ compile-flags: -Copt-level=0 -Zmir-opt-level=1 -Cdebuginfo=limited
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
+#![crate_type = "lib"]
+
+#[derive(PartialOrd, Ord, PartialEq, Eq)]
+pub struct MultiField(char, i16);
+
+// EMIT_MIR derived_ord_debug.{impl#0}-partial_cmp.PreCodegen.after.mir
+// EMIT_MIR derived_ord_debug.{impl#1}-cmp.PreCodegen.after.mir
+
+// CHECK-LABEL: partial_cmp(_1: &MultiField, _2: &MultiField) -> Option<std::cmp::Ordering>
+// CHECK: = <char as PartialOrd>::partial_cmp(
+// CHECK: = <i16 as PartialOrd>::partial_cmp(
+
+// CHECK-LABEL: cmp(_1: &MultiField, _2: &MultiField) -> std::cmp::Ordering
+// CHECK: = <char as Ord>::cmp(
+// CHECK: = <i16 as Ord>::cmp(
diff --git a/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#0}-partial_cmp.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#0}-partial_cmp.PreCodegen.after.panic-abort.mir
new file mode 100644
index 00000000000..9fc8da3a112
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#0}-partial_cmp.PreCodegen.after.panic-abort.mir
@@ -0,0 +1,52 @@
+// MIR for `<impl at $DIR/derived_ord_debug.rs:6:10: 6:20>::partial_cmp` after PreCodegen
+
+fn <impl at $DIR/derived_ord_debug.rs:6:10: 6:20>::partial_cmp(_1: &MultiField, _2: &MultiField) -> Option<std::cmp::Ordering> {
+    debug self => _1;
+    debug other => _2;
+    let mut _0: std::option::Option<std::cmp::Ordering>;
+    let _3: &char;
+    let _4: &char;
+    let mut _5: std::option::Option<std::cmp::Ordering>;
+    let mut _6: isize;
+    let mut _7: i8;
+    let _8: &i16;
+    let _9: &i16;
+    scope 1 {
+        debug cmp => _5;
+    }
+
+    bb0: {
+        _3 = &((*_1).0: char);
+        _4 = &((*_2).0: char);
+        _5 = <char as PartialOrd>::partial_cmp(copy _3, copy _4) -> [return: bb1, unwind unreachable];
+    }
+
+    bb1: {
+        _6 = discriminant(_5);
+        switchInt(move _6) -> [1: bb2, 0: bb4, otherwise: bb6];
+    }
+
+    bb2: {
+        _7 = discriminant(((_5 as Some).0: std::cmp::Ordering));
+        switchInt(move _7) -> [0: bb3, otherwise: bb4];
+    }
+
+    bb3: {
+        _8 = &((*_1).1: i16);
+        _9 = &((*_2).1: i16);
+        _0 = <i16 as PartialOrd>::partial_cmp(copy _8, copy _9) -> [return: bb5, unwind unreachable];
+    }
+
+    bb4: {
+        _0 = copy _5;
+        goto -> bb5;
+    }
+
+    bb5: {
+        return;
+    }
+
+    bb6: {
+        unreachable;
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#0}-partial_cmp.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#0}-partial_cmp.PreCodegen.after.panic-unwind.mir
new file mode 100644
index 00000000000..29cc5415076
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#0}-partial_cmp.PreCodegen.after.panic-unwind.mir
@@ -0,0 +1,52 @@
+// MIR for `<impl at $DIR/derived_ord_debug.rs:6:10: 6:20>::partial_cmp` after PreCodegen
+
+fn <impl at $DIR/derived_ord_debug.rs:6:10: 6:20>::partial_cmp(_1: &MultiField, _2: &MultiField) -> Option<std::cmp::Ordering> {
+    debug self => _1;
+    debug other => _2;
+    let mut _0: std::option::Option<std::cmp::Ordering>;
+    let _3: &char;
+    let _4: &char;
+    let mut _5: std::option::Option<std::cmp::Ordering>;
+    let mut _6: isize;
+    let mut _7: i8;
+    let _8: &i16;
+    let _9: &i16;
+    scope 1 {
+        debug cmp => _5;
+    }
+
+    bb0: {
+        _3 = &((*_1).0: char);
+        _4 = &((*_2).0: char);
+        _5 = <char as PartialOrd>::partial_cmp(copy _3, copy _4) -> [return: bb1, unwind continue];
+    }
+
+    bb1: {
+        _6 = discriminant(_5);
+        switchInt(move _6) -> [1: bb2, 0: bb4, otherwise: bb6];
+    }
+
+    bb2: {
+        _7 = discriminant(((_5 as Some).0: std::cmp::Ordering));
+        switchInt(move _7) -> [0: bb3, otherwise: bb4];
+    }
+
+    bb3: {
+        _8 = &((*_1).1: i16);
+        _9 = &((*_2).1: i16);
+        _0 = <i16 as PartialOrd>::partial_cmp(copy _8, copy _9) -> [return: bb5, unwind continue];
+    }
+
+    bb4: {
+        _0 = copy _5;
+        goto -> bb5;
+    }
+
+    bb5: {
+        return;
+    }
+
+    bb6: {
+        unreachable;
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#1}-cmp.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#1}-cmp.PreCodegen.after.panic-abort.mir
new file mode 100644
index 00000000000..66d96021aa9
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#1}-cmp.PreCodegen.after.panic-abort.mir
@@ -0,0 +1,42 @@
+// MIR for `<impl at $DIR/derived_ord_debug.rs:6:22: 6:25>::cmp` after PreCodegen
+
+fn <impl at $DIR/derived_ord_debug.rs:6:22: 6:25>::cmp(_1: &MultiField, _2: &MultiField) -> std::cmp::Ordering {
+    debug self => _1;
+    debug other => _2;
+    let mut _0: std::cmp::Ordering;
+    let _3: &char;
+    let _4: &char;
+    let mut _5: std::cmp::Ordering;
+    let mut _6: i8;
+    let _7: &i16;
+    let _8: &i16;
+    scope 1 {
+        debug cmp => _5;
+    }
+
+    bb0: {
+        _3 = &((*_1).0: char);
+        _4 = &((*_2).0: char);
+        _5 = <char as Ord>::cmp(copy _3, copy _4) -> [return: bb1, unwind unreachable];
+    }
+
+    bb1: {
+        _6 = discriminant(_5);
+        switchInt(move _6) -> [0: bb2, otherwise: bb3];
+    }
+
+    bb2: {
+        _7 = &((*_1).1: i16);
+        _8 = &((*_2).1: i16);
+        _0 = <i16 as Ord>::cmp(copy _7, copy _8) -> [return: bb4, unwind unreachable];
+    }
+
+    bb3: {
+        _0 = copy _5;
+        goto -> bb4;
+    }
+
+    bb4: {
+        return;
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#1}-cmp.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#1}-cmp.PreCodegen.after.panic-unwind.mir
new file mode 100644
index 00000000000..2dcba6195f7
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#1}-cmp.PreCodegen.after.panic-unwind.mir
@@ -0,0 +1,42 @@
+// MIR for `<impl at $DIR/derived_ord_debug.rs:6:22: 6:25>::cmp` after PreCodegen
+
+fn <impl at $DIR/derived_ord_debug.rs:6:22: 6:25>::cmp(_1: &MultiField, _2: &MultiField) -> std::cmp::Ordering {
+    debug self => _1;
+    debug other => _2;
+    let mut _0: std::cmp::Ordering;
+    let _3: &char;
+    let _4: &char;
+    let mut _5: std::cmp::Ordering;
+    let mut _6: i8;
+    let _7: &i16;
+    let _8: &i16;
+    scope 1 {
+        debug cmp => _5;
+    }
+
+    bb0: {
+        _3 = &((*_1).0: char);
+        _4 = &((*_2).0: char);
+        _5 = <char as Ord>::cmp(copy _3, copy _4) -> [return: bb1, unwind continue];
+    }
+
+    bb1: {
+        _6 = discriminant(_5);
+        switchInt(move _6) -> [0: bb2, otherwise: bb3];
+    }
+
+    bb2: {
+        _7 = &((*_1).1: i16);
+        _8 = &((*_2).1: i16);
+        _0 = <i16 as Ord>::cmp(copy _7, copy _8) -> [return: bb4, unwind continue];
+    }
+
+    bb3: {
+        _0 = copy _5;
+        goto -> bb4;
+    }
+
+    bb4: {
+        return;
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-abort.mir b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-abort.mir
index 2777bba893b..ba6ce0ee528 100644
--- a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-abort.mir
@@ -8,7 +8,7 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
             let _2: std::ptr::NonNull<[T]>;
             let mut _3: *mut [T];
             let mut _4: *const [T];
-            let _12: ();
+            let _11: ();
             scope 3 {
                 let _8: std::ptr::alignment::AlignmentEnum;
                 scope 4 {
@@ -31,12 +31,11 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
                         scope 20 (inlined NonNull::<u8>::as_ptr) {
                         }
                         scope 21 (inlined std::alloc::dealloc) {
-                            let mut _11: usize;
+                            let mut _10: usize;
                             scope 22 (inlined Layout::size) {
                             }
                             scope 23 (inlined Layout::align) {
                                 scope 24 (inlined std::ptr::Alignment::as_usize) {
-                                    let mut _10: u32;
                                 }
                             }
                         }
@@ -87,16 +86,13 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
     bb2: {
         StorageLive(_9);
         _9 = copy _3 as *mut u8 (PtrToPtr);
-        StorageLive(_11);
         StorageLive(_10);
         _10 = discriminant(_8);
-        _11 = move _10 as usize (IntToInt);
-        StorageDead(_10);
-        _12 = alloc::alloc::__rust_dealloc(move _9, move _5, move _11) -> [return: bb3, unwind unreachable];
+        _11 = alloc::alloc::__rust_dealloc(move _9, move _5, move _10) -> [return: bb3, unwind unreachable];
     }
 
     bb3: {
-        StorageDead(_11);
+        StorageDead(_10);
         StorageDead(_9);
         goto -> bb4;
     }
diff --git a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-unwind.mir b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-unwind.mir
index 2777bba893b..ba6ce0ee528 100644
--- a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.32bit.panic-unwind.mir
@@ -8,7 +8,7 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
             let _2: std::ptr::NonNull<[T]>;
             let mut _3: *mut [T];
             let mut _4: *const [T];
-            let _12: ();
+            let _11: ();
             scope 3 {
                 let _8: std::ptr::alignment::AlignmentEnum;
                 scope 4 {
@@ -31,12 +31,11 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
                         scope 20 (inlined NonNull::<u8>::as_ptr) {
                         }
                         scope 21 (inlined std::alloc::dealloc) {
-                            let mut _11: usize;
+                            let mut _10: usize;
                             scope 22 (inlined Layout::size) {
                             }
                             scope 23 (inlined Layout::align) {
                                 scope 24 (inlined std::ptr::Alignment::as_usize) {
-                                    let mut _10: u32;
                                 }
                             }
                         }
@@ -87,16 +86,13 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
     bb2: {
         StorageLive(_9);
         _9 = copy _3 as *mut u8 (PtrToPtr);
-        StorageLive(_11);
         StorageLive(_10);
         _10 = discriminant(_8);
-        _11 = move _10 as usize (IntToInt);
-        StorageDead(_10);
-        _12 = alloc::alloc::__rust_dealloc(move _9, move _5, move _11) -> [return: bb3, unwind unreachable];
+        _11 = alloc::alloc::__rust_dealloc(move _9, move _5, move _10) -> [return: bb3, unwind unreachable];
     }
 
     bb3: {
-        StorageDead(_11);
+        StorageDead(_10);
         StorageDead(_9);
         goto -> bb4;
     }
diff --git a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-abort.mir b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-abort.mir
index 2be0a478c85..ba6ce0ee528 100644
--- a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-abort.mir
@@ -8,7 +8,7 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
             let _2: std::ptr::NonNull<[T]>;
             let mut _3: *mut [T];
             let mut _4: *const [T];
-            let _12: ();
+            let _11: ();
             scope 3 {
                 let _8: std::ptr::alignment::AlignmentEnum;
                 scope 4 {
@@ -31,12 +31,11 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
                         scope 20 (inlined NonNull::<u8>::as_ptr) {
                         }
                         scope 21 (inlined std::alloc::dealloc) {
-                            let mut _11: usize;
+                            let mut _10: usize;
                             scope 22 (inlined Layout::size) {
                             }
                             scope 23 (inlined Layout::align) {
                                 scope 24 (inlined std::ptr::Alignment::as_usize) {
-                                    let mut _10: u64;
                                 }
                             }
                         }
@@ -87,16 +86,13 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
     bb2: {
         StorageLive(_9);
         _9 = copy _3 as *mut u8 (PtrToPtr);
-        StorageLive(_11);
         StorageLive(_10);
         _10 = discriminant(_8);
-        _11 = move _10 as usize (IntToInt);
-        StorageDead(_10);
-        _12 = alloc::alloc::__rust_dealloc(move _9, move _5, move _11) -> [return: bb3, unwind unreachable];
+        _11 = alloc::alloc::__rust_dealloc(move _9, move _5, move _10) -> [return: bb3, unwind unreachable];
     }
 
     bb3: {
-        StorageDead(_11);
+        StorageDead(_10);
         StorageDead(_9);
         goto -> bb4;
     }
diff --git a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-unwind.mir b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-unwind.mir
index 2be0a478c85..ba6ce0ee528 100644
--- a/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-unwind.mir
@@ -8,7 +8,7 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
             let _2: std::ptr::NonNull<[T]>;
             let mut _3: *mut [T];
             let mut _4: *const [T];
-            let _12: ();
+            let _11: ();
             scope 3 {
                 let _8: std::ptr::alignment::AlignmentEnum;
                 scope 4 {
@@ -31,12 +31,11 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
                         scope 20 (inlined NonNull::<u8>::as_ptr) {
                         }
                         scope 21 (inlined std::alloc::dealloc) {
-                            let mut _11: usize;
+                            let mut _10: usize;
                             scope 22 (inlined Layout::size) {
                             }
                             scope 23 (inlined Layout::align) {
                                 scope 24 (inlined std::ptr::Alignment::as_usize) {
-                                    let mut _10: u64;
                                 }
                             }
                         }
@@ -87,16 +86,13 @@ fn generic_in_place(_1: *mut Box<[T]>) -> () {
     bb2: {
         StorageLive(_9);
         _9 = copy _3 as *mut u8 (PtrToPtr);
-        StorageLive(_11);
         StorageLive(_10);
         _10 = discriminant(_8);
-        _11 = move _10 as usize (IntToInt);
-        StorageDead(_10);
-        _12 = alloc::alloc::__rust_dealloc(move _9, move _5, move _11) -> [return: bb3, unwind unreachable];
+        _11 = alloc::alloc::__rust_dealloc(move _9, move _5, move _10) -> [return: bb3, unwind unreachable];
     }
 
     bb3: {
-        StorageDead(_11);
+        StorageDead(_10);
         StorageDead(_9);
         goto -> bb4;
     }
diff --git a/tests/mir-opt/pre-codegen/drop_boxed_slice.rs b/tests/mir-opt/pre-codegen/drop_boxed_slice.rs
index 11fb7afef0f..9ceba9444b8 100644
--- a/tests/mir-opt/pre-codegen/drop_boxed_slice.rs
+++ b/tests/mir-opt/pre-codegen/drop_boxed_slice.rs
@@ -13,7 +13,6 @@ pub unsafe fn generic_in_place<T: Copy>(ptr: *mut Box<[T]>) {
     // CHECK: [[B:_.+]] = copy [[ALIGN]] as std::ptr::Alignment (Transmute);
     // CHECK: [[C:_.+]] = move ([[B]].0: std::ptr::alignment::AlignmentEnum);
     // CHECK: [[D:_.+]] = discriminant([[C]]);
-    // CHECK: [[E:_.+]] = move [[D]] as usize (IntToInt);
-    // CHECK: = alloc::alloc::__rust_dealloc({{.+}}, move [[SIZE]], move [[E]]) ->
+    // CHECK: = alloc::alloc::__rust_dealloc({{.+}}, move [[SIZE]], move [[D]]) ->
     std::ptr::drop_in_place(ptr)
 }
diff --git a/tests/mir-opt/pre-codegen/option_bubble_debug.option_direct.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/option_bubble_debug.option_direct.PreCodegen.after.panic-abort.mir
new file mode 100644
index 00000000000..b29662dfa61
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/option_bubble_debug.option_direct.PreCodegen.after.panic-abort.mir
@@ -0,0 +1,37 @@
+// MIR for `option_direct` after PreCodegen
+
+fn option_direct(_1: Option<u32>) -> Option<u32> {
+    debug x => _1;
+    let mut _0: std::option::Option<u32>;
+    let mut _2: isize;
+    let _3: u32;
+    let mut _4: u32;
+    scope 1 {
+        debug x => _3;
+    }
+
+    bb0: {
+        _2 = discriminant(_1);
+        switchInt(move _2) -> [0: bb1, 1: bb2, otherwise: bb4];
+    }
+
+    bb1: {
+        _0 = Option::<u32>::None;
+        goto -> bb3;
+    }
+
+    bb2: {
+        _3 = copy ((_1 as Some).0: u32);
+        _4 = Not(copy _3);
+        _0 = Option::<u32>::Some(move _4);
+        goto -> bb3;
+    }
+
+    bb3: {
+        return;
+    }
+
+    bb4: {
+        unreachable;
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/option_bubble_debug.option_direct.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/option_bubble_debug.option_direct.PreCodegen.after.panic-unwind.mir
new file mode 100644
index 00000000000..b29662dfa61
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/option_bubble_debug.option_direct.PreCodegen.after.panic-unwind.mir
@@ -0,0 +1,37 @@
+// MIR for `option_direct` after PreCodegen
+
+fn option_direct(_1: Option<u32>) -> Option<u32> {
+    debug x => _1;
+    let mut _0: std::option::Option<u32>;
+    let mut _2: isize;
+    let _3: u32;
+    let mut _4: u32;
+    scope 1 {
+        debug x => _3;
+    }
+
+    bb0: {
+        _2 = discriminant(_1);
+        switchInt(move _2) -> [0: bb1, 1: bb2, otherwise: bb4];
+    }
+
+    bb1: {
+        _0 = Option::<u32>::None;
+        goto -> bb3;
+    }
+
+    bb2: {
+        _3 = copy ((_1 as Some).0: u32);
+        _4 = Not(copy _3);
+        _0 = Option::<u32>::Some(move _4);
+        goto -> bb3;
+    }
+
+    bb3: {
+        return;
+    }
+
+    bb4: {
+        unreachable;
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/option_bubble_debug.option_traits.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/option_bubble_debug.option_traits.PreCodegen.after.panic-abort.mir
new file mode 100644
index 00000000000..5b401064dd0
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/option_bubble_debug.option_traits.PreCodegen.after.panic-abort.mir
@@ -0,0 +1,47 @@
+// MIR for `option_traits` after PreCodegen
+
+fn option_traits(_1: Option<u32>) -> Option<u32> {
+    debug x => _1;
+    let mut _0: std::option::Option<u32>;
+    let mut _2: std::ops::ControlFlow<std::option::Option<std::convert::Infallible>, u32>;
+    let mut _3: isize;
+    let _4: u32;
+    let mut _5: u32;
+    scope 1 {
+        debug residual => const Option::<Infallible>::None;
+        scope 2 {
+        }
+    }
+    scope 3 {
+        debug val => _4;
+        scope 4 {
+        }
+    }
+
+    bb0: {
+        _2 = <Option<u32> as Try>::branch(copy _1) -> [return: bb1, unwind unreachable];
+    }
+
+    bb1: {
+        _3 = discriminant(_2);
+        switchInt(move _3) -> [0: bb2, 1: bb3, otherwise: bb5];
+    }
+
+    bb2: {
+        _4 = copy ((_2 as Continue).0: u32);
+        _5 = Not(copy _4);
+        _0 = <Option<u32> as Try>::from_output(move _5) -> [return: bb4, unwind unreachable];
+    }
+
+    bb3: {
+        _0 = <Option<u32> as FromResidual<Option<Infallible>>>::from_residual(const Option::<Infallible>::None) -> [return: bb4, unwind unreachable];
+    }
+
+    bb4: {
+        return;
+    }
+
+    bb5: {
+        unreachable;
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/option_bubble_debug.option_traits.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/option_bubble_debug.option_traits.PreCodegen.after.panic-unwind.mir
new file mode 100644
index 00000000000..bda9e9d8e60
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/option_bubble_debug.option_traits.PreCodegen.after.panic-unwind.mir
@@ -0,0 +1,47 @@
+// MIR for `option_traits` after PreCodegen
+
+fn option_traits(_1: Option<u32>) -> Option<u32> {
+    debug x => _1;
+    let mut _0: std::option::Option<u32>;
+    let mut _2: std::ops::ControlFlow<std::option::Option<std::convert::Infallible>, u32>;
+    let mut _3: isize;
+    let _4: u32;
+    let mut _5: u32;
+    scope 1 {
+        debug residual => const Option::<Infallible>::None;
+        scope 2 {
+        }
+    }
+    scope 3 {
+        debug val => _4;
+        scope 4 {
+        }
+    }
+
+    bb0: {
+        _2 = <Option<u32> as Try>::branch(copy _1) -> [return: bb1, unwind continue];
+    }
+
+    bb1: {
+        _3 = discriminant(_2);
+        switchInt(move _3) -> [0: bb2, 1: bb3, otherwise: bb5];
+    }
+
+    bb2: {
+        _4 = copy ((_2 as Continue).0: u32);
+        _5 = Not(copy _4);
+        _0 = <Option<u32> as Try>::from_output(move _5) -> [return: bb4, unwind continue];
+    }
+
+    bb3: {
+        _0 = <Option<u32> as FromResidual<Option<Infallible>>>::from_residual(const Option::<Infallible>::None) -> [return: bb4, unwind continue];
+    }
+
+    bb4: {
+        return;
+    }
+
+    bb5: {
+        unreachable;
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/option_bubble_debug.rs b/tests/mir-opt/pre-codegen/option_bubble_debug.rs
new file mode 100644
index 00000000000..b9bf78a1d6e
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/option_bubble_debug.rs
@@ -0,0 +1,29 @@
+//@ compile-flags: -Copt-level=0 -Zmir-opt-level=1 -Cdebuginfo=limited
+//@ edition: 2024
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
+#![crate_type = "lib"]
+#![feature(try_blocks)]
+
+// EMIT_MIR option_bubble_debug.option_direct.PreCodegen.after.mir
+pub fn option_direct(x: Option<u32>) -> Option<u32> {
+    // CHECK-LABEL: fn option_direct(_1: Option<u32>) -> Option<u32>
+    // CHECK: = discriminant(_1);
+    // CHECK: [[TEMP:_.+]] = Not({{.+}});
+    // CHECK: _0 = Option::<u32>::Some(move [[TEMP]]);
+
+    match x {
+        Some(x) => Some(!x),
+        None => None,
+    }
+}
+
+// EMIT_MIR option_bubble_debug.option_traits.PreCodegen.after.mir
+pub fn option_traits(x: Option<u32>) -> Option<u32> {
+    // CHECK-LABEL: fn option_traits(_1: Option<u32>) -> Option<u32>
+    // CHECK: = <Option<u32> as Try>::branch(copy _1)
+    // CHECK: [[TEMP:_.+]] = Not({{.+}});
+    // CHECK: _0 = <Option<u32> as Try>::from_output(move [[TEMP]])
+
+    try { !(x?) }
+}
diff --git a/tests/mir-opt/remove_unneeded_drop_in_place.rs b/tests/mir-opt/remove_unneeded_drop_in_place.rs
new file mode 100644
index 00000000000..470c6499d16
--- /dev/null
+++ b/tests/mir-opt/remove_unneeded_drop_in_place.rs
@@ -0,0 +1,17 @@
+//@ test-mir-pass: RemoveUnneededDrops
+//@ needs-unwind
+//@ compile-flags: -Z mir-opt-level=1
+
+// EMIT_MIR remove_unneeded_drop_in_place.slice_in_place.RemoveUnneededDrops.diff
+unsafe fn slice_in_place(ptr: *mut [char]) {
+    // CHECK-LABEL: fn slice_in_place(_1: *mut [char])
+    // CHECK: bb0: {
+    // CHECK-NEXT: return;
+    // CHECK-NEXT: }
+    std::ptr::drop_in_place(ptr)
+}
+
+fn main() {
+    let mut a = ['o', 'k'];
+    unsafe { slice_in_place(&raw mut a) };
+}
diff --git a/tests/mir-opt/remove_unneeded_drop_in_place.slice_in_place.RemoveUnneededDrops.diff b/tests/mir-opt/remove_unneeded_drop_in_place.slice_in_place.RemoveUnneededDrops.diff
new file mode 100644
index 00000000000..4d70e7151c3
--- /dev/null
+++ b/tests/mir-opt/remove_unneeded_drop_in_place.slice_in_place.RemoveUnneededDrops.diff
@@ -0,0 +1,20 @@
+- // MIR for `slice_in_place` before RemoveUnneededDrops
++ // MIR for `slice_in_place` after RemoveUnneededDrops
+  
+  fn slice_in_place(_1: *mut [char]) -> () {
+      debug ptr => _1;
+      let mut _0: ();
+      let mut _2: *mut [char];
+  
+      bb0: {
+          StorageLive(_2);
+          _2 = copy _1;
+-         _0 = drop_in_place::<[char]>(move _2) -> [return: bb1, unwind continue];
+-     }
+- 
+-     bb1: {
+          StorageDead(_2);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff b/tests/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff
new file mode 100644
index 00000000000..52832e73905
--- /dev/null
+++ b/tests/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff
@@ -0,0 +1,15 @@
+- // MIR for `cannot_opt_generic` before RemoveUnneededDrops
++ // MIR for `cannot_opt_generic` after RemoveUnneededDrops
+  
+  fn cannot_opt_generic(_1: T) -> () {
+      let mut _0: ();
+  
+      bb0: {
+          drop(_1) -> [return: bb1, unwind unreachable];
+      }
+  
+      bb1: {
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.panic-abort.diff b/tests/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.panic-abort.diff
deleted file mode 100644
index 0c73602bec8..00000000000
--- a/tests/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.panic-abort.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-- // MIR for `cannot_opt_generic` before RemoveUnneededDrops
-+ // MIR for `cannot_opt_generic` after RemoveUnneededDrops
-  
-  fn cannot_opt_generic(_1: T) -> () {
-      debug x => _1;
-      let mut _0: ();
-      let _2: ();
-      let mut _3: T;
-      scope 1 (inlined std::mem::drop::<T>) {
-      }
-  
-      bb0: {
-          nop;
-          StorageLive(_3);
-          _3 = move _1;
-          drop(_3) -> [return: bb1, unwind unreachable];
-      }
-  
-      bb1: {
-          StorageDead(_3);
-          nop;
-          nop;
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.panic-unwind.diff b/tests/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.panic-unwind.diff
deleted file mode 100644
index 59cce9fbcdd..00000000000
--- a/tests/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.panic-unwind.diff
+++ /dev/null
@@ -1,30 +0,0 @@
-- // MIR for `cannot_opt_generic` before RemoveUnneededDrops
-+ // MIR for `cannot_opt_generic` after RemoveUnneededDrops
-  
-  fn cannot_opt_generic(_1: T) -> () {
-      debug x => _1;
-      let mut _0: ();
-      let _2: ();
-      let mut _3: T;
-      scope 1 (inlined std::mem::drop::<T>) {
-      }
-  
-      bb0: {
-          nop;
-          StorageLive(_3);
-          _3 = move _1;
-          drop(_3) -> [return: bb2, unwind: bb1];
-      }
-  
-      bb1 (cleanup): {
-          resume;
-      }
-  
-      bb2: {
-          StorageDead(_3);
-          nop;
-          nop;
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff b/tests/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff
new file mode 100644
index 00000000000..3d67cada5dd
--- /dev/null
+++ b/tests/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff
@@ -0,0 +1,15 @@
+- // MIR for `dont_opt` before RemoveUnneededDrops
++ // MIR for `dont_opt` after RemoveUnneededDrops
+  
+  fn dont_opt(_1: Vec<bool>) -> () {
+      let mut _0: ();
+  
+      bb0: {
+          drop(_1) -> [return: bb1, unwind unreachable];
+      }
+  
+      bb1: {
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.panic-abort.diff b/tests/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.panic-abort.diff
deleted file mode 100644
index 428b366b5a6..00000000000
--- a/tests/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.panic-abort.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-- // MIR for `dont_opt` before RemoveUnneededDrops
-+ // MIR for `dont_opt` after RemoveUnneededDrops
-  
-  fn dont_opt(_1: Vec<bool>) -> () {
-      debug x => _1;
-      let mut _0: ();
-      let _2: ();
-      let mut _3: std::vec::Vec<bool>;
-      scope 1 (inlined std::mem::drop::<Vec<bool>>) {
-      }
-  
-      bb0: {
-          nop;
-          StorageLive(_3);
-          _3 = move _1;
-          drop(_3) -> [return: bb1, unwind unreachable];
-      }
-  
-      bb1: {
-          StorageDead(_3);
-          nop;
-          nop;
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.panic-unwind.diff b/tests/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.panic-unwind.diff
deleted file mode 100644
index 445c1f82a96..00000000000
--- a/tests/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.panic-unwind.diff
+++ /dev/null
@@ -1,30 +0,0 @@
-- // MIR for `dont_opt` before RemoveUnneededDrops
-+ // MIR for `dont_opt` after RemoveUnneededDrops
-  
-  fn dont_opt(_1: Vec<bool>) -> () {
-      debug x => _1;
-      let mut _0: ();
-      let _2: ();
-      let mut _3: std::vec::Vec<bool>;
-      scope 1 (inlined std::mem::drop::<Vec<bool>>) {
-      }
-  
-      bb0: {
-          nop;
-          StorageLive(_3);
-          _3 = move _1;
-          drop(_3) -> [return: bb2, unwind: bb1];
-      }
-  
-      bb1 (cleanup): {
-          resume;
-      }
-  
-      bb2: {
-          StorageDead(_3);
-          nop;
-          nop;
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff b/tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff
new file mode 100644
index 00000000000..cb7e58ca1a1
--- /dev/null
+++ b/tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff
@@ -0,0 +1,15 @@
+- // MIR for `opt` before RemoveUnneededDrops
++ // MIR for `opt` after RemoveUnneededDrops
+  
+  fn opt(_1: bool) -> () {
+      let mut _0: ();
+  
+      bb0: {
+-         drop(_1) -> [return: bb1, unwind unreachable];
+-     }
+- 
+-     bb1: {
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.panic-abort.diff b/tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.panic-abort.diff
deleted file mode 100644
index 01eb6d4901f..00000000000
--- a/tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.panic-abort.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-- // MIR for `opt` before RemoveUnneededDrops
-+ // MIR for `opt` after RemoveUnneededDrops
-  
-  fn opt(_1: bool) -> () {
-      debug x => _1;
-      let mut _0: ();
-      let _2: ();
-      let mut _3: bool;
-      scope 1 (inlined std::mem::drop::<bool>) {
-      }
-  
-      bb0: {
--         nop;
-          StorageLive(_3);
-          _3 = copy _1;
--         drop(_3) -> [return: bb1, unwind unreachable];
--     }
-- 
--     bb1: {
-          StorageDead(_3);
--         nop;
--         nop;
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.panic-unwind.diff b/tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.panic-unwind.diff
deleted file mode 100644
index c2c3cb76e83..00000000000
--- a/tests/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.panic-unwind.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-- // MIR for `opt` before RemoveUnneededDrops
-+ // MIR for `opt` after RemoveUnneededDrops
-  
-  fn opt(_1: bool) -> () {
-      debug x => _1;
-      let mut _0: ();
-      let _2: ();
-      let mut _3: bool;
-      scope 1 (inlined std::mem::drop::<bool>) {
-      }
-  
-      bb0: {
--         nop;
-          StorageLive(_3);
-          _3 = copy _1;
--         drop(_3) -> [return: bb1, unwind continue];
--     }
-- 
--     bb1: {
-          StorageDead(_3);
--         nop;
--         nop;
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff b/tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff
new file mode 100644
index 00000000000..1e166eee9fb
--- /dev/null
+++ b/tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff
@@ -0,0 +1,15 @@
+- // MIR for `opt_generic_copy` before RemoveUnneededDrops
++ // MIR for `opt_generic_copy` after RemoveUnneededDrops
+  
+  fn opt_generic_copy(_1: T) -> () {
+      let mut _0: ();
+  
+      bb0: {
+-         drop(_1) -> [return: bb1, unwind unreachable];
+-     }
+- 
+-     bb1: {
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.panic-abort.diff b/tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.panic-abort.diff
deleted file mode 100644
index a82ede6196e..00000000000
--- a/tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.panic-abort.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-- // MIR for `opt_generic_copy` before RemoveUnneededDrops
-+ // MIR for `opt_generic_copy` after RemoveUnneededDrops
-  
-  fn opt_generic_copy(_1: T) -> () {
-      debug x => _1;
-      let mut _0: ();
-      let _2: ();
-      let mut _3: T;
-      scope 1 (inlined std::mem::drop::<T>) {
-      }
-  
-      bb0: {
--         nop;
-          StorageLive(_3);
-          _3 = copy _1;
--         drop(_3) -> [return: bb1, unwind unreachable];
--     }
-- 
--     bb1: {
-          StorageDead(_3);
--         nop;
--         nop;
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.panic-unwind.diff b/tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.panic-unwind.diff
deleted file mode 100644
index 6e7c9ead740..00000000000
--- a/tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.panic-unwind.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-- // MIR for `opt_generic_copy` before RemoveUnneededDrops
-+ // MIR for `opt_generic_copy` after RemoveUnneededDrops
-  
-  fn opt_generic_copy(_1: T) -> () {
-      debug x => _1;
-      let mut _0: ();
-      let _2: ();
-      let mut _3: T;
-      scope 1 (inlined std::mem::drop::<T>) {
-      }
-  
-      bb0: {
--         nop;
-          StorageLive(_3);
-          _3 = copy _1;
--         drop(_3) -> [return: bb1, unwind continue];
--     }
-- 
--     bb1: {
-          StorageDead(_3);
--         nop;
--         nop;
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/remove_unneeded_drops.rs b/tests/mir-opt/remove_unneeded_drops.rs
index cad79e0aa0c..49dc611838e 100644
--- a/tests/mir-opt/remove_unneeded_drops.rs
+++ b/tests/mir-opt/remove_unneeded_drops.rs
@@ -1,28 +1,56 @@
-// skip-filecheck
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+//@ test-mir-pass: RemoveUnneededDrops
+
+#![feature(custom_mir, core_intrinsics)]
+use std::intrinsics::mir::*;
+
 // EMIT_MIR remove_unneeded_drops.opt.RemoveUnneededDrops.diff
+#[custom_mir(dialect = "runtime")]
 fn opt(x: bool) {
-    drop(x);
+    // CHECK-LABEL: fn opt(
+    // CHECK-NOT: drop(
+    mir! {
+        { Drop(x, ReturnTo(bb1), UnwindUnreachable()) }
+        bb1 = { Return() }
+    }
 }
 
 // EMIT_MIR remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff
+#[custom_mir(dialect = "runtime")]
 fn dont_opt(x: Vec<bool>) {
-    drop(x);
+    // CHECK-LABEL: fn dont_opt(
+    // CHECK: drop(
+    mir! {
+        { Drop(x, ReturnTo(bb1), UnwindUnreachable()) }
+        bb1 = { Return() }
+    }
 }
 
 // EMIT_MIR remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff
+#[custom_mir(dialect = "runtime")]
 fn opt_generic_copy<T: Copy>(x: T) {
-    drop(x);
+    // CHECK-LABEL: fn opt_generic_copy(
+    // CHECK-NOT: drop(
+    mir! {
+        { Drop(x, ReturnTo(bb1), UnwindUnreachable()) }
+        bb1 = { Return() }
+    }
 }
 
 // EMIT_MIR remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff
 // since the pass is not running on monomorphisized code,
 // we can't (but probably should) optimize this
+#[custom_mir(dialect = "runtime")]
 fn cannot_opt_generic<T>(x: T) {
-    drop(x);
+    // CHECK-LABEL: fn cannot_opt_generic(
+    // CHECK: drop(
+    mir! {
+        { Drop(x, ReturnTo(bb1), UnwindUnreachable()) }
+        bb1 = { Return() }
+    }
 }
 
 fn main() {
+    // CHECK-LABEL: fn main(
     opt(true);
     opt_generic_copy(42);
     cannot_opt_generic(42);
diff --git a/tests/mir-opt/tail_call_drops.f_with_arg.ElaborateDrops.panic-abort.diff b/tests/mir-opt/tail_call_drops.f_with_arg.ElaborateDrops.panic-abort.diff
index a8c57d2cfe0..4fba0032729 100644
--- a/tests/mir-opt/tail_call_drops.f_with_arg.ElaborateDrops.panic-abort.diff
+++ b/tests/mir-opt/tail_call_drops.f_with_arg.ElaborateDrops.panic-abort.diff
@@ -93,7 +93,7 @@
       }
   
       bb11: {
-          tailcall g_with_arg(Spanned { node: move _10, span: $DIR/tail_call_drops.rs:36:23: 36:36 (#0) }, Spanned { node: move _11, span: $DIR/tail_call_drops.rs:36:38: 36:51 (#0) });
+          tailcall g_with_arg(move _10, move _11);
       }
   
       bb12 (cleanup): {
diff --git a/tests/mir-opt/tail_call_drops.f_with_arg.ElaborateDrops.panic-unwind.diff b/tests/mir-opt/tail_call_drops.f_with_arg.ElaborateDrops.panic-unwind.diff
index a8c57d2cfe0..4fba0032729 100644
--- a/tests/mir-opt/tail_call_drops.f_with_arg.ElaborateDrops.panic-unwind.diff
+++ b/tests/mir-opt/tail_call_drops.f_with_arg.ElaborateDrops.panic-unwind.diff
@@ -93,7 +93,7 @@
       }
   
       bb11: {
-          tailcall g_with_arg(Spanned { node: move _10, span: $DIR/tail_call_drops.rs:36:23: 36:36 (#0) }, Spanned { node: move _11, span: $DIR/tail_call_drops.rs:36:38: 36:51 (#0) });
+          tailcall g_with_arg(move _10, move _11);
       }
   
       bb12 (cleanup): {
diff --git a/tests/mir-opt/tail_call_drops.f_with_arg.built.after.panic-abort.mir b/tests/mir-opt/tail_call_drops.f_with_arg.built.after.panic-abort.mir
index f89b98a3205..9ec358ec189 100644
--- a/tests/mir-opt/tail_call_drops.f_with_arg.built.after.panic-abort.mir
+++ b/tests/mir-opt/tail_call_drops.f_with_arg.built.after.panic-abort.mir
@@ -90,7 +90,7 @@ fn f_with_arg(_1: String, _2: String) -> () {
     }
 
     bb11: {
-        tailcall g_with_arg(Spanned { node: move _10, span: $DIR/tail_call_drops.rs:36:23: 36:36 (#0) }, Spanned { node: move _11, span: $DIR/tail_call_drops.rs:36:38: 36:51 (#0) });
+        tailcall g_with_arg(move _10, move _11);
     }
 
     bb12: {
diff --git a/tests/mir-opt/tail_call_drops.f_with_arg.built.after.panic-unwind.mir b/tests/mir-opt/tail_call_drops.f_with_arg.built.after.panic-unwind.mir
index f89b98a3205..9ec358ec189 100644
--- a/tests/mir-opt/tail_call_drops.f_with_arg.built.after.panic-unwind.mir
+++ b/tests/mir-opt/tail_call_drops.f_with_arg.built.after.panic-unwind.mir
@@ -90,7 +90,7 @@ fn f_with_arg(_1: String, _2: String) -> () {
     }
 
     bb11: {
-        tailcall g_with_arg(Spanned { node: move _10, span: $DIR/tail_call_drops.rs:36:23: 36:36 (#0) }, Spanned { node: move _11, span: $DIR/tail_call_drops.rs:36:38: 36:51 (#0) });
+        tailcall g_with_arg(move _10, move _11);
     }
 
     bb12: {
diff --git a/tests/run-make/atomic-lock-free/atomic_lock_free.rs b/tests/run-make/atomic-lock-free/atomic_lock_free.rs
index f5c3b360ee8..92ffd111ce8 100644
--- a/tests/run-make/atomic-lock-free/atomic_lock_free.rs
+++ b/tests/run-make/atomic-lock-free/atomic_lock_free.rs
@@ -14,7 +14,7 @@ pub enum AtomicOrdering {
 }
 
 #[rustc_intrinsic]
-unsafe fn atomic_xadd<T, const ORD: AtomicOrdering>(dst: *mut T, src: T) -> T;
+unsafe fn atomic_xadd<T, U, const ORD: AtomicOrdering>(dst: *mut T, src: U) -> T;
 
 #[lang = "pointee_sized"]
 pub trait PointeeSized {}
@@ -35,51 +35,62 @@ impl<T: ?Sized> Copy for *mut T {}
 impl ConstParamTy for AtomicOrdering {}
 
 #[cfg(target_has_atomic = "8")]
+#[unsafe(no_mangle)] // let's make sure we actually generate a symbol to check
 pub unsafe fn atomic_u8(x: *mut u8) {
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
+    atomic_xadd::<_, _, { AtomicOrdering::SeqCst }>(x, 1u8);
 }
 #[cfg(target_has_atomic = "8")]
+#[unsafe(no_mangle)]
 pub unsafe fn atomic_i8(x: *mut i8) {
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
+    atomic_xadd::<_, _, { AtomicOrdering::SeqCst }>(x, 1i8);
 }
 #[cfg(target_has_atomic = "16")]
+#[unsafe(no_mangle)]
 pub unsafe fn atomic_u16(x: *mut u16) {
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
+    atomic_xadd::<_, _, { AtomicOrdering::SeqCst }>(x, 1u16);
 }
 #[cfg(target_has_atomic = "16")]
+#[unsafe(no_mangle)]
 pub unsafe fn atomic_i16(x: *mut i16) {
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
+    atomic_xadd::<_, _, { AtomicOrdering::SeqCst }>(x, 1i16);
 }
 #[cfg(target_has_atomic = "32")]
+#[unsafe(no_mangle)]
 pub unsafe fn atomic_u32(x: *mut u32) {
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
+    atomic_xadd::<_, _, { AtomicOrdering::SeqCst }>(x, 1u32);
 }
 #[cfg(target_has_atomic = "32")]
+#[unsafe(no_mangle)]
 pub unsafe fn atomic_i32(x: *mut i32) {
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
+    atomic_xadd::<_, _, { AtomicOrdering::SeqCst }>(x, 1i32);
 }
 #[cfg(target_has_atomic = "64")]
+#[unsafe(no_mangle)]
 pub unsafe fn atomic_u64(x: *mut u64) {
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
+    atomic_xadd::<_, _, { AtomicOrdering::SeqCst }>(x, 1u64);
 }
 #[cfg(target_has_atomic = "64")]
+#[unsafe(no_mangle)]
 pub unsafe fn atomic_i64(x: *mut i64) {
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
+    atomic_xadd::<_, _, { AtomicOrdering::SeqCst }>(x, 1i64);
 }
 #[cfg(target_has_atomic = "128")]
+#[unsafe(no_mangle)]
 pub unsafe fn atomic_u128(x: *mut u128) {
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
+    atomic_xadd::<_, _, { AtomicOrdering::SeqCst }>(x, 1u128);
 }
 #[cfg(target_has_atomic = "128")]
+#[unsafe(no_mangle)]
 pub unsafe fn atomic_i128(x: *mut i128) {
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
+    atomic_xadd::<_, _, { AtomicOrdering::SeqCst }>(x, 1i128);
 }
 #[cfg(target_has_atomic = "ptr")]
+#[unsafe(no_mangle)]
 pub unsafe fn atomic_usize(x: *mut usize) {
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
+    atomic_xadd::<_, _, { AtomicOrdering::SeqCst }>(x, 1usize);
 }
 #[cfg(target_has_atomic = "ptr")]
+#[unsafe(no_mangle)]
 pub unsafe fn atomic_isize(x: *mut isize) {
-    atomic_xadd::<_, { AtomicOrdering::SeqCst }>(x, 1);
+    atomic_xadd::<_, _, { AtomicOrdering::SeqCst }>(x, 1isize);
 }
diff --git a/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr b/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr
index 464208f989e..895558f3b0f 100644
--- a/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr
+++ b/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-disabled.stderr
@@ -1,20 +1,20 @@
 error: `[const]` is not allowed here
   --> const-super-trait.rs:7:12
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |            ^^^^^^^
    |
 note: this trait is not `const`, so it cannot have `[const]` trait bounds
   --> const-super-trait.rs:7:1
    |
-LL | trait Bar: ~const Foo {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | trait Bar: [const] Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0658]: const trait impls are experimental
   --> const-super-trait.rs:7:12
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |            ^^^^^^^
    |
    = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
@@ -23,8 +23,8 @@ LL | trait Bar: ~const Foo {}
 error[E0658]: const trait impls are experimental
   --> const-super-trait.rs:9:17
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |                 ^^^^^^^
    |
    = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
@@ -33,8 +33,8 @@ LL | const fn foo<T: ~const Bar>(x: &T) {
 error: `[const]` can only be applied to `const` traits
   --> const-super-trait.rs:7:12
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |            ^^^^^^^ can't be applied to `Foo`
    |
 help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `const` to allow it to have `const` implementations
    |
@@ -44,12 +44,12 @@ LL | #[const_trait] trait Foo {
 error: `[const]` can only be applied to `const` traits
   --> const-super-trait.rs:9:17
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^ can't be applied to `Bar`
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |                 ^^^^^^^ can't be applied to `Bar`
    |
 help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `const` to allow it to have `const` implementations
    |
-LL | #[const_trait] trait Bar: ~const Foo {}
+LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
 error[E0015]: cannot call non-const method `<T as Foo>::a` in constant functions
diff --git a/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-enabled.stderr b/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-enabled.stderr
index 569e559186f..821ab6fa57c 100644
--- a/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-enabled.stderr
+++ b/tests/run-make/const-trait-stable-toolchain/const-super-trait-nightly-enabled.stderr
@@ -1,20 +1,20 @@
 error: `[const]` is not allowed here
   --> const-super-trait.rs:7:12
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |            ^^^^^^^
    |
 note: this trait is not `const`, so it cannot have `[const]` trait bounds
   --> const-super-trait.rs:7:1
    |
-LL | trait Bar: ~const Foo {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | trait Bar: [const] Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` can only be applied to `const` traits
   --> const-super-trait.rs:7:12
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |            ^^^^^^^ can't be applied to `Foo`
    |
 help: mark `Foo` as `const` to allow it to have `const` implementations
    |
@@ -24,12 +24,12 @@ LL | #[const_trait] trait Foo {
 error: `[const]` can only be applied to `const` traits
   --> const-super-trait.rs:9:17
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^ can't be applied to `Bar`
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |                 ^^^^^^^ can't be applied to `Bar`
    |
 help: mark `Bar` as `const` to allow it to have `const` implementations
    |
-LL | #[const_trait] trait Bar: ~const Foo {}
+LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
 error[E0015]: cannot call non-const method `<T as Foo>::a` in constant functions
diff --git a/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr b/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr
index 694e06fb6ea..b39be78e438 100644
--- a/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr
+++ b/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr
@@ -1,36 +1,36 @@
 error: `[const]` is not allowed here
  --> const-super-trait.rs:7:12
   |
-7 | trait Bar: ~const Foo {}
-  |            ^^^^^^
+7 | trait Bar: [const] Foo {}
+  |            ^^^^^^^
   |
 note: this trait is not `const`, so it cannot have `[const]` trait bounds
  --> const-super-trait.rs:7:1
   |
-7 | trait Bar: ~const Foo {}
-  | ^^^^^^^^^^^^^^^^^^^^^^^^
+7 | trait Bar: [const] Foo {}
+  | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0658]: const trait impls are experimental
  --> const-super-trait.rs:7:12
   |
-7 | trait Bar: ~const Foo {}
-  |            ^^^^^^
+7 | trait Bar: [const] Foo {}
+  |            ^^^^^^^
   |
   = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
 
 error[E0658]: const trait impls are experimental
  --> const-super-trait.rs:9:17
   |
-9 | const fn foo<T: ~const Bar>(x: &T) {
-  |                 ^^^^^^
+9 | const fn foo<T: [const] Bar>(x: &T) {
+  |                 ^^^^^^^
   |
   = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
 
 error: `[const]` can only be applied to `const` traits
  --> const-super-trait.rs:7:12
   |
-7 | trait Bar: ~const Foo {}
-  |            ^^^^^^ can't be applied to `Foo`
+7 | trait Bar: [const] Foo {}
+  |            ^^^^^^^ can't be applied to `Foo`
   |
 note: `Foo` can't be used with `[const]` because it isn't `const`
  --> const-super-trait.rs:3:1
@@ -41,14 +41,14 @@ note: `Foo` can't be used with `[const]` because it isn't `const`
 error: `[const]` can only be applied to `const` traits
  --> const-super-trait.rs:9:17
   |
-9 | const fn foo<T: ~const Bar>(x: &T) {
-  |                 ^^^^^^ can't be applied to `Bar`
+9 | const fn foo<T: [const] Bar>(x: &T) {
+  |                 ^^^^^^^ can't be applied to `Bar`
   |
 note: `Bar` can't be used with `[const]` because it isn't `const`
  --> const-super-trait.rs:7:1
   |
-7 | trait Bar: ~const Foo {}
-  | ^^^^^^^^^^^^^^^^^^^^^
+7 | trait Bar: [const] Foo {}
+  | ^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0015]: cannot call non-const method `<T as Foo>::a` in constant functions
   --> const-super-trait.rs:10:7
diff --git a/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-enabled.stderr b/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-enabled.stderr
index 2109f0deb72..30ee5cf6f4b 100644
--- a/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-enabled.stderr
+++ b/tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-enabled.stderr
@@ -1,14 +1,14 @@
 error: `[const]` is not allowed here
  --> const-super-trait.rs:7:12
   |
-7 | trait Bar: ~const Foo {}
-  |            ^^^^^^
+7 | trait Bar: [const] Foo {}
+  |            ^^^^^^^
   |
 note: this trait is not `const`, so it cannot have `[const]` trait bounds
  --> const-super-trait.rs:7:1
   |
-7 | trait Bar: ~const Foo {}
-  | ^^^^^^^^^^^^^^^^^^^^^^^^
+7 | trait Bar: [const] Foo {}
+  | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0554]: `#![feature]` may not be used on the NIGHTLY release channel
  --> const-super-trait.rs:1:30
@@ -19,8 +19,8 @@ error[E0554]: `#![feature]` may not be used on the NIGHTLY release channel
 error: `[const]` can only be applied to `const` traits
  --> const-super-trait.rs:7:12
   |
-7 | trait Bar: ~const Foo {}
-  |            ^^^^^^ can't be applied to `Foo`
+7 | trait Bar: [const] Foo {}
+  |            ^^^^^^^ can't be applied to `Foo`
   |
 note: `Foo` can't be used with `[const]` because it isn't `const`
  --> const-super-trait.rs:3:1
@@ -31,14 +31,14 @@ note: `Foo` can't be used with `[const]` because it isn't `const`
 error: `[const]` can only be applied to `const` traits
  --> const-super-trait.rs:9:17
   |
-9 | const fn foo<T: ~const Bar>(x: &T) {
-  |                 ^^^^^^ can't be applied to `Bar`
+9 | const fn foo<T: [const] Bar>(x: &T) {
+  |                 ^^^^^^^ can't be applied to `Bar`
   |
 note: `Bar` can't be used with `[const]` because it isn't `const`
  --> const-super-trait.rs:7:1
   |
-7 | trait Bar: ~const Foo {}
-  | ^^^^^^^^^^^^^^^^^^^^^
+7 | trait Bar: [const] Foo {}
+  | ^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0015]: cannot call non-const method `<T as Foo>::a` in constant functions
   --> const-super-trait.rs:10:7
diff --git a/tests/run-make/const-trait-stable-toolchain/const-super-trait.rs b/tests/run-make/const-trait-stable-toolchain/const-super-trait.rs
index b2ee96d79f7..2371dfc0e6d 100644
--- a/tests/run-make/const-trait-stable-toolchain/const-super-trait.rs
+++ b/tests/run-make/const-trait-stable-toolchain/const-super-trait.rs
@@ -4,9 +4,9 @@ trait Foo {
     fn a(&self);
 }
 
-trait Bar: ~const Foo {}
+trait Bar: [const] Foo {}
 
-const fn foo<T: ~const Bar>(x: &T) {
+const fn foo<T: [const] Bar>(x: &T) {
     x.a();
 }
 
diff --git a/tests/run-make/libtest-json/output-default.json b/tests/run-make/libtest-json/output-default.json
index a6a8a9f3b47..5371715d17c 100644
--- a/tests/run-make/libtest-json/output-default.json
+++ b/tests/run-make/libtest-json/output-default.json
@@ -2,7 +2,7 @@
 { "type": "test", "event": "started", "name": "a" }
 { "type": "test", "name": "a", "event": "ok" }
 { "type": "test", "event": "started", "name": "b" }
-{ "type": "test", "name": "b", "event": "failed", "stdout": "\nthread 'b' panicked at f.rs:9:5:\nassertion failed: false\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
+{ "type": "test", "name": "b", "event": "failed", "stdout": "\nthread 'b' ($TID) panicked at f.rs:9:5:\nassertion failed: false\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
 { "type": "test", "event": "started", "name": "c" }
 { "type": "test", "name": "c", "event": "ok" }
 { "type": "test", "event": "started", "name": "d" }
diff --git a/tests/run-make/libtest-json/output-stdout-success.json b/tests/run-make/libtest-json/output-stdout-success.json
index a6c36e746b3..5caadcf56cf 100644
--- a/tests/run-make/libtest-json/output-stdout-success.json
+++ b/tests/run-make/libtest-json/output-stdout-success.json
@@ -2,9 +2,9 @@
 { "type": "test", "event": "started", "name": "a" }
 { "type": "test", "name": "a", "event": "ok", "stdout": "print from successful test\n" }
 { "type": "test", "event": "started", "name": "b" }
-{ "type": "test", "name": "b", "event": "failed", "stdout": "\nthread 'b' panicked at f.rs:9:5:\nassertion failed: false\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
+{ "type": "test", "name": "b", "event": "failed", "stdout": "\nthread 'b' ($TID) panicked at f.rs:9:5:\nassertion failed: false\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
 { "type": "test", "event": "started", "name": "c" }
-{ "type": "test", "name": "c", "event": "ok", "stdout": "\nthread 'c' panicked at f.rs:15:5:\nassertion failed: false\n" }
+{ "type": "test", "name": "c", "event": "ok", "stdout": "\nthread 'c' ($TID) panicked at f.rs:15:5:\nassertion failed: false\n" }
 { "type": "test", "event": "started", "name": "d" }
 { "type": "test", "name": "d", "event": "ignored", "message": "msg" }
 { "type": "suite", "event": "failed", "passed": 2, "failed": 1, "ignored": 1, "measured": 0, "filtered_out": 0, "exec_time": "$EXEC_TIME" }
diff --git a/tests/run-make/libtest-json/rmake.rs b/tests/run-make/libtest-json/rmake.rs
index c31f4a79b64..034ba6246f1 100644
--- a/tests/run-make/libtest-json/rmake.rs
+++ b/tests/run-make/libtest-json/rmake.rs
@@ -38,5 +38,6 @@ fn run_tests(extra_args: &[&str], expected_file: &str) {
         .expected_file(expected_file)
         .actual_text("stdout", test_stdout)
         .normalize(r#"(?<prefix>"exec_time": )[0-9.]+"#, r#"${prefix}"$$EXEC_TIME""#)
+        .normalize(r"thread '(?P<name>.*?)' \(\d+\) panicked", "thread '$name' ($$TID) panicked")
         .run();
 }
diff --git a/tests/run-make/libtest-junit/output-default.xml b/tests/run-make/libtest-junit/output-default.xml
index aa1b8c855aa..2467d8d940a 100644
--- a/tests/run-make/libtest-junit/output-default.xml
+++ b/tests/run-make/libtest-junit/output-default.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"/><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>&#xA;&#xA;<![CDATA[thread 'b' panicked at f.rs:10:5:]]>&#xA;<![CDATA[assertion failed: false]]>&#xA;<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"/><system-out/><system-err/></testsuite></testsuites>
+<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"/><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>&#xA;&#xA;<![CDATA[thread 'b' ($TID) panicked at f.rs:10:5:]]>&#xA;<![CDATA[assertion failed: false]]>&#xA;<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"/><system-out/><system-err/></testsuite></testsuites>
diff --git a/tests/run-make/libtest-junit/output-stdout-success.xml b/tests/run-make/libtest-junit/output-stdout-success.xml
index 2592ec7efb1..6bf1d7008a4 100644
--- a/tests/run-make/libtest-junit/output-stdout-success.xml
+++ b/tests/run-make/libtest-junit/output-stdout-success.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"><system-out><![CDATA[print from successful test]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>&#xA;&#xA;<![CDATA[thread 'b' panicked at f.rs:10:5:]]>&#xA;<![CDATA[assertion failed: false]]>&#xA;<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"><system-out><![CDATA[]]>&#xA;<![CDATA[thread 'c' panicked at f.rs:16:5:]]>&#xA;<![CDATA[assertion failed: false]]>&#xA;<![CDATA[]]></system-out></testcase><system-out/><system-err/></testsuite></testsuites>
+<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"><system-out><![CDATA[print from successful test]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>&#xA;&#xA;<![CDATA[thread 'b' ($TID) panicked at f.rs:10:5:]]>&#xA;<![CDATA[assertion failed: false]]>&#xA;<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"><system-out><![CDATA[]]>&#xA;<![CDATA[thread 'c' ($TID) panicked at f.rs:16:5:]]>&#xA;<![CDATA[assertion failed: false]]>&#xA;<![CDATA[]]></system-out></testcase><system-out/><system-err/></testsuite></testsuites>
diff --git a/tests/run-make/libtest-junit/rmake.rs b/tests/run-make/libtest-junit/rmake.rs
index 5917660b6c7..6961be21513 100644
--- a/tests/run-make/libtest-junit/rmake.rs
+++ b/tests/run-make/libtest-junit/rmake.rs
@@ -27,5 +27,6 @@ fn run_tests(extra_args: &[&str], expected_file: &str) {
         .expected_file(expected_file)
         .actual_text("stdout", test_stdout)
         .normalize(r#"\btime="[0-9.]+""#, r#"time="$$TIME""#)
+        .normalize(r"thread '(?P<name>.*?)' \(\d+\) panicked", "thread '$name' ($$TID) panicked")
         .run();
 }
diff --git a/tests/run-make/link-under-xcode/foo.rs b/tests/run-make/link-under-xcode/foo.rs
new file mode 100644
index 00000000000..f328e4d9d04
--- /dev/null
+++ b/tests/run-make/link-under-xcode/foo.rs
@@ -0,0 +1 @@
+fn main() {}
diff --git a/tests/run-make/link-under-xcode/rmake.rs b/tests/run-make/link-under-xcode/rmake.rs
new file mode 100644
index 00000000000..c9394feb000
--- /dev/null
+++ b/tests/run-make/link-under-xcode/rmake.rs
@@ -0,0 +1,32 @@
+//! Test that linking works under an environment similar to what Xcode sets up.
+//!
+//! Regression test for https://github.com/rust-lang/rust/issues/80817.
+
+//@ only-apple
+
+use run_make_support::{cmd, rustc, target};
+
+fn main() {
+    // Fetch toolchain `/usr/bin` directory. Usually:
+    // /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
+    let clang_bin = cmd("xcrun").arg("--find").arg("clang").run().stdout_utf8();
+    let toolchain_bin = clang_bin.trim().strip_suffix("/clang").unwrap();
+
+    // Put toolchain directory at the front of PATH.
+    let path = format!("{}:{}", toolchain_bin, std::env::var("PATH").unwrap());
+
+    // Check that compiling and linking still works.
+    //
+    // Removing `SDKROOT` is necessary for the test to excercise what we want, since bootstrap runs
+    // under `/usr/bin/python3`, which will set SDKROOT for us.
+    rustc().target(target()).env_remove("SDKROOT").env("PATH", &path).input("foo.rs").run();
+
+    // Also check linking directly with the system linker.
+    rustc()
+        .target(target())
+        .env_remove("SDKROOT")
+        .env("PATH", &path)
+        .input("foo.rs")
+        .arg("-Clinker-flavor=ld")
+        .run();
+}
diff --git a/tests/run-make/msvc-wholearchive/rmake.rs b/tests/run-make/msvc-wholearchive/rmake.rs
index 98586fd8cc8..aec9391a420 100644
--- a/tests/run-make/msvc-wholearchive/rmake.rs
+++ b/tests/run-make/msvc-wholearchive/rmake.rs
@@ -7,7 +7,7 @@
 
 use std::path::PathBuf;
 
-use run_make_support::{cc, cmd, env_var, extra_c_flags, rustc};
+use run_make_support::{cc, cmd, env_var, extra_linker_flags, rustc};
 
 fn main() {
     // Build the staticlib
@@ -31,7 +31,7 @@ fn main() {
     // Otherwise the actual test failure may be caused by something else.
     cmd(&linker)
         .args(["c.obj", "./static.lib", "-dll", "-def:dll.def", "-out:dll.dll"])
-        .args(extra_c_flags())
+        .args(extra_linker_flags())
         .run();
 
     // FIXME(@ChrisDenton): this doesn't currently work with llvm's lld-link for other reasons.
@@ -46,7 +46,7 @@ fn main() {
                 "-def:dll.def",
                 "-out:dll_whole_archive.dll",
             ])
-            .args(extra_c_flags())
+            .args(extra_linker_flags())
             .run();
     }
 }
diff --git a/tests/run-make/pgo-branch-weights/rmake.rs b/tests/run-make/pgo-branch-weights/rmake.rs
index 1893248e307..e74eabc1875 100644
--- a/tests/run-make/pgo-branch-weights/rmake.rs
+++ b/tests/run-make/pgo-branch-weights/rmake.rs
@@ -17,15 +17,21 @@ use run_make_support::{llvm_filecheck, llvm_profdata, rfs, run_with_args, rustc}
 fn main() {
     let path_prof_data_dir = Path::new("prof_data_dir");
     let path_merged_profdata = path_prof_data_dir.join("merged.profdata");
-    rustc().input("opaque.rs").run();
+    rustc().input("opaque.rs").codegen_source_order().run();
     rfs::create_dir_all(&path_prof_data_dir);
     rustc()
         .input("interesting.rs")
         .profile_generate(&path_prof_data_dir)
         .opt()
         .codegen_units(1)
+        .codegen_source_order()
+        .run();
+    rustc()
+        .input("main.rs")
+        .profile_generate(&path_prof_data_dir)
+        .opt()
+        .codegen_source_order()
         .run();
-    rustc().input("main.rs").profile_generate(&path_prof_data_dir).opt().run();
     run_with_args("main", &["aaaaaaaaaaaa2bbbbbbbbbbbb2bbbbbbbbbbbbbbbbcc"]);
     llvm_profdata().merge().output(&path_merged_profdata).input(path_prof_data_dir).run();
     rustc()
@@ -34,6 +40,7 @@ fn main() {
         .opt()
         .codegen_units(1)
         .emit("llvm-ir")
+        .codegen_source_order()
         .run();
     llvm_filecheck()
         .patterns("filecheck-patterns.txt")
diff --git a/tests/run-make/pgo-indirect-call-promotion/rmake.rs b/tests/run-make/pgo-indirect-call-promotion/rmake.rs
index ce9754f13b9..ee09141912b 100644
--- a/tests/run-make/pgo-indirect-call-promotion/rmake.rs
+++ b/tests/run-make/pgo-indirect-call-promotion/rmake.rs
@@ -14,11 +14,17 @@ use run_make_support::{llvm_filecheck, llvm_profdata, rfs, run, rustc};
 
 fn main() {
     // We don't compile `opaque` with either optimizations or instrumentation.
-    rustc().input("opaque.rs").run();
+    rustc().input("opaque.rs").codegen_source_order().run();
     // Compile the test program with instrumentation
     rfs::create_dir("prof_data_dir");
-    rustc().input("interesting.rs").profile_generate("prof_data_dir").opt().codegen_units(1).run();
-    rustc().input("main.rs").profile_generate("prof_data_dir").opt().run();
+    rustc()
+        .input("interesting.rs")
+        .profile_generate("prof_data_dir")
+        .opt()
+        .codegen_units(1)
+        .codegen_source_order()
+        .run();
+    rustc().input("main.rs").profile_generate("prof_data_dir").opt().codegen_source_order().run();
     // The argument below generates to the expected branch weights
     run("main");
     llvm_profdata().merge().output("prof_data_dir/merged.profdata").input("prof_data_dir").run();
@@ -28,6 +34,7 @@ fn main() {
         .opt()
         .codegen_units(1)
         .emit("llvm-ir")
+        .codegen_source_order()
         .run();
     llvm_filecheck()
         .patterns("filecheck-patterns.txt")
diff --git a/tests/run-make/pgo-use/rmake.rs b/tests/run-make/pgo-use/rmake.rs
index c09a82353b9..137b0b859a0 100644
--- a/tests/run-make/pgo-use/rmake.rs
+++ b/tests/run-make/pgo-use/rmake.rs
@@ -22,6 +22,7 @@ fn main() {
         .opt_level("2")
         .codegen_units(1)
         .arg("-Cllvm-args=-disable-preinline")
+        .codegen_source_order()
         .profile_generate(cwd())
         .input("main.rs")
         .run();
@@ -40,6 +41,7 @@ fn main() {
         .arg("-Cllvm-args=-disable-preinline")
         .profile_use("merged.profdata")
         .emit("llvm-ir")
+        .codegen_source_order()
         .input("main.rs")
         .run();
     // Check that the generate IR contains some things that we expect.
diff --git a/tests/run-make/raw-dylib-link-ordinal/exporter.def b/tests/run-make/raw-dylib-link-ordinal/exporter.def
index 5d87c580a54..0544e9f1803 100644
--- a/tests/run-make/raw-dylib-link-ordinal/exporter.def
+++ b/tests/run-make/raw-dylib-link-ordinal/exporter.def
@@ -1,5 +1,5 @@
 LIBRARY exporter
 EXPORTS
     exported_function @13 NONAME
-    exported_variable @5 NONAME
+    exported_variable @5 NONAME DATA
     print_exported_variable @9 NONAME
diff --git a/tests/run-make/raw-dylib-link-ordinal/rmake.rs b/tests/run-make/raw-dylib-link-ordinal/rmake.rs
index 43274b9765b..b9254b16753 100644
--- a/tests/run-make/raw-dylib-link-ordinal/rmake.rs
+++ b/tests/run-make/raw-dylib-link-ordinal/rmake.rs
@@ -11,7 +11,7 @@
 
 //@ only-windows
 
-use run_make_support::{cc, diff, is_windows_msvc, run, rustc};
+use run_make_support::{cc, diff, extra_c_flags, is_windows_msvc, run, rustc};
 
 // NOTE: build_native_dynamic lib is not used, as the special `def` files
 // must be passed to the CC compiler.
@@ -24,6 +24,7 @@ fn main() {
         cc().input("exporter.obj")
             .arg("exporter.def")
             .args(&["-link", "-dll", "-noimplib", "-out:exporter.dll"])
+            .args(extra_c_flags())
             .run();
     } else {
         cc().arg("-v").arg("-c").out_exe("exporter.obj").input("exporter.c").run();
diff --git a/tests/run-make/rustdoc-scrape-examples-paths/foo/Cargo.toml b/tests/run-make/rustdoc-scrape-examples-paths/foo/Cargo.toml
new file mode 100644
index 00000000000..6962028375b
--- /dev/null
+++ b/tests/run-make/rustdoc-scrape-examples-paths/foo/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "foo"
+version = "0.0.1"
+edition = "2024"
+
+[[example]]
+name = "complex"
+doc-scrape-examples = true
diff --git a/tests/run-make/rustdoc-scrape-examples-paths/foo/examples/complex.rs b/tests/run-make/rustdoc-scrape-examples-paths/foo/examples/complex.rs
new file mode 100644
index 00000000000..1cda7e098f4
--- /dev/null
+++ b/tests/run-make/rustdoc-scrape-examples-paths/foo/examples/complex.rs
@@ -0,0 +1,3 @@
+fn main() {
+    let mut x = foo::X::new();
+}
diff --git a/tests/run-make/rustdoc-scrape-examples-paths/foo/examples/tester.rs b/tests/run-make/rustdoc-scrape-examples-paths/foo/examples/tester.rs
new file mode 100644
index 00000000000..fbd1906ec09
--- /dev/null
+++ b/tests/run-make/rustdoc-scrape-examples-paths/foo/examples/tester.rs
@@ -0,0 +1 @@
+// This file MUST exist to trigger the original bug.
diff --git a/tests/run-make/rustdoc-scrape-examples-paths/foo/src/lib.rs b/tests/run-make/rustdoc-scrape-examples-paths/foo/src/lib.rs
new file mode 100644
index 00000000000..a9bb0272c78
--- /dev/null
+++ b/tests/run-make/rustdoc-scrape-examples-paths/foo/src/lib.rs
@@ -0,0 +1,7 @@
+pub struct X;
+
+impl X {
+    pub fn new() -> Self {
+        X
+    }
+}
diff --git a/tests/run-make/rustdoc-scrape-examples-paths/rmake.rs b/tests/run-make/rustdoc-scrape-examples-paths/rmake.rs
new file mode 100644
index 00000000000..03888f69eab
--- /dev/null
+++ b/tests/run-make/rustdoc-scrape-examples-paths/rmake.rs
@@ -0,0 +1,16 @@
+//! Test to ensure that the rustdoc `scrape-examples` feature is not panicking.
+//! Regression test for <https://github.com/rust-lang/rust/issues/144752>.
+
+use run_make_support::{cargo, path, rfs};
+
+fn main() {
+    // We copy the crate to be documented "outside" to prevent documenting
+    // the whole compiler.
+    let tmp = std::env::temp_dir();
+    let test_crate = tmp.join("foo");
+    rfs::copy_dir_all(path("foo"), &test_crate);
+
+    // The `scrape-examples` feature is also implemented in `cargo` so instead of reproducing
+    // what `cargo` does, better to just let `cargo` do it.
+    cargo().current_dir(&test_crate).args(["doc", "-p", "foo", "-Zrustdoc-scrape-examples"]).run();
+}
diff --git a/tests/run-make/wasm-panic-small/rmake.rs b/tests/run-make/wasm-panic-small/rmake.rs
index e69fbac9635..ea0b6faf037 100644
--- a/tests/run-make/wasm-panic-small/rmake.rs
+++ b/tests/run-make/wasm-panic-small/rmake.rs
@@ -24,5 +24,5 @@ fn test(cfg: &str) {
 
     let bytes = rfs::read("foo.wasm");
     println!("{}", bytes.len());
-    assert!(bytes.len() < 40_000);
+    assert!(bytes.len() < 40_000, "bytes len was: {}", bytes.len());
 }
diff --git a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/rmake.rs b/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/rmake.rs
index e58762aeb6d..89754cdaf90 100644
--- a/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/rmake.rs
+++ b/tests/run-make/x86_64-fortanix-unknown-sgx-lvi/rmake.rs
@@ -13,42 +13,56 @@
 
 //@ only-x86_64-fortanix-unknown-sgx
 
-use run_make_support::{cmd, cwd, llvm_filecheck, llvm_objdump, regex, set_current_dir, target};
+use run_make_support::{
+    cargo, cwd, llvm_filecheck, llvm_objdump, regex, run, set_current_dir, target,
+};
 
 fn main() {
-    let main_dir = cwd();
-    set_current_dir("enclave");
-    // HACK(eddyb) sets `RUSTC_BOOTSTRAP=1` so Cargo can accept nightly features.
-    // These come from the top-level Rust workspace, that this crate is not a
-    // member of, but Cargo tries to load the workspace `Cargo.toml` anyway.
-    cmd("cargo")
-        .env("RUSTC_BOOTSTRAP", "1")
+    cargo()
         .arg("-v")
-        .arg("run")
+        .arg("build")
         .arg("--target")
         .arg(target())
+        .current_dir("enclave")
+        .env("CC_x86_64_fortanix_unknown_sgx", "clang")
+        .env(
+            "CFLAGS_x86_64_fortanix_unknown_sgx",
+            "-D__ELF__ -isystem/usr/include/x86_64-linux-gnu -mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening",
+        )
+        .env("CXX_x86_64_fortanix_unknown_sgx", "clang++")
+        .env(
+            "CXXFLAGS_x86_64_fortanix_unknown_sgx",
+            "-D__ELF__ -isystem/usr/include/x86_64-linux-gnu -mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening",
+        )
         .run();
-    set_current_dir(&main_dir);
-    // Rust has various ways of adding code to a binary:
+
+    // Rust has several ways of including machine code into a binary:
+    //
     // - Rust code
     // - Inline assembly
     // - Global assembly
     // - C/C++ code compiled as part of Rust crates
-    // For those different kinds, we do have very small code examples that should be
-    // mitigated in some way. Mostly we check that ret instructions should no longer be present.
+    //
+    // For each of those, check that the mitigations are applied. Mostly we check
+    // that ret instructions are no longer present.
+
+    // Check that normal rust code has the right mitigations.
     check("unw_getcontext", "unw_getcontext.checks");
     check("__libunwind_Registers_x86_64_jumpto", "jumpto.checks");
 
     check("std::io::stdio::_print::[[:alnum:]]+", "print.with_frame_pointers.checks");
 
+    // Check that rust global assembly has the right mitigations.
     check("rust_plus_one_global_asm", "rust_plus_one_global_asm.checks");
 
+    // Check that C code compiled using the `cc` crate has the right mitigations.
     check("cc_plus_one_c", "cc_plus_one_c.checks");
     check("cc_plus_one_c_asm", "cc_plus_one_c_asm.checks");
     check("cc_plus_one_cxx", "cc_plus_one_cxx.checks");
     check("cc_plus_one_cxx_asm", "cc_plus_one_cxx_asm.checks");
     check("cc_plus_one_asm", "cc_plus_one_asm.checks");
 
+    // Check that C++ code compiled using the `cc` crate has the right mitigations.
     check("cmake_plus_one_c", "cmake_plus_one_c.checks");
     check("cmake_plus_one_c_asm", "cmake_plus_one_c_asm.checks");
     check("cmake_plus_one_c_global_asm", "cmake_plus_one_c_global_asm.checks");
@@ -71,8 +85,7 @@ fn check(func_re: &str, mut checks: &str) {
         .input("enclave/target/x86_64-fortanix-unknown-sgx/debug/enclave")
         .args(&["--demangle", &format!("--disassemble-symbols={func}")])
         .run()
-        .stdout_utf8();
-    let dump = dump.as_bytes();
+        .stdout();
 
     // Unique case, must succeed at one of two possible tests.
     // This is because frame pointers are optional, and them being enabled requires
diff --git a/tests/rustdoc-gui/notable-trait.goml b/tests/rustdoc-gui/notable-trait.goml
index 7fc70e0675d..423a273fde7 100644
--- a/tests/rustdoc-gui/notable-trait.goml
+++ b/tests/rustdoc-gui/notable-trait.goml
@@ -8,10 +8,10 @@ define-function: (
     [x, i_x],
     block {
         // Checking they have the same y position.
-        compare-elements-position: (
+        compare-elements-position-near: (
             "//*[@id='method.create_an_iterator_from_read']//a[normalize-space()='NotableStructWithLongName']",
             "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
-            ["y"],
+            {"y": 1},
         )
         // Checking they don't have the same x position.
         compare-elements-position-false: (
diff --git a/tests/rustdoc-gui/src/test_docs/lib.rs b/tests/rustdoc-gui/src/test_docs/lib.rs
index e8afe8b5687..623f5b33e9b 100644
--- a/tests/rustdoc-gui/src/test_docs/lib.rs
+++ b/tests/rustdoc-gui/src/test_docs/lib.rs
@@ -767,3 +767,17 @@ pub mod impls_indent {
         pub fn bar() {}
     }
 }
+
+pub mod tooltips {
+    pub struct X;
+
+    impl X {
+        pub fn bar() -> Vec<u8> {
+            Vec::new()
+        }
+    }
+
+    pub fn bar() -> Vec<u8> {
+        Vec::new()
+    }
+}
diff --git a/tests/rustdoc-gui/tooltips.goml b/tests/rustdoc-gui/tooltips.goml
new file mode 100644
index 00000000000..6e79196be27
--- /dev/null
+++ b/tests/rustdoc-gui/tooltips.goml
@@ -0,0 +1,15 @@
+// This test checks that the right font is applied to the `i` tooltip element.
+
+define-function: (
+    "check-font",
+    [path],
+    block {
+        go-to: "file://" + |DOC_PATH| + "/test_docs/" + |path|
+        assert-css: (
+            "a.tooltip", {"font-family": '"Source Serif 4", NanumBarunGothic, serif'}, ALL,
+        )
+    }
+)
+
+call-function: ("check-font", {"path": "tooltips/fn.bar.html"})
+call-function: ("check-font", {"path": "tooltips/struct.X.html"})
diff --git a/tests/rustdoc-js-std/core-transmute.js b/tests/rustdoc-js-std/core-transmute.js
index 8c9910a32d7..b15f398902c 100644
--- a/tests/rustdoc-js-std/core-transmute.js
+++ b/tests/rustdoc-js-std/core-transmute.js
@@ -3,9 +3,9 @@ const EXPECTED = [
     {
         'query': 'generic:T -> generic:U',
         'others': [
+            { 'path': 'core::mem', 'name': 'transmute' },
             { 'path': 'core::intrinsics::simd', 'name': 'simd_as' },
             { 'path': 'core::intrinsics::simd', 'name': 'simd_cast' },
-            { 'path': 'core::mem', 'name': 'transmute' },
         ],
     },
 ];
diff --git a/tests/rustdoc-js-std/transmute-fail.js b/tests/rustdoc-js-std/transmute-fail.js
index ddfb2761948..459e8dc3f00 100644
--- a/tests/rustdoc-js-std/transmute-fail.js
+++ b/tests/rustdoc-js-std/transmute-fail.js
@@ -6,9 +6,9 @@ const EXPECTED = [
         // should-fail tag and the search query below:
         'query': 'generic:T -> generic:T',
         'others': [
+            { 'path': 'std::mem', 'name': 'transmute' },
             { 'path': 'std::intrinsics::simd', 'name': 'simd_as' },
             { 'path': 'std::intrinsics::simd', 'name': 'simd_cast' },
-            { 'path': 'std::mem', 'name': 'transmute' },
         ],
     },
 ];
diff --git a/tests/rustdoc-js-std/transmute.js b/tests/rustdoc-js-std/transmute.js
index f52e0ab1436..a85b02e2994 100644
--- a/tests/rustdoc-js-std/transmute.js
+++ b/tests/rustdoc-js-std/transmute.js
@@ -5,9 +5,9 @@ const EXPECTED = [
         // should-fail tag and the search query below:
         'query': 'generic:T -> generic:U',
         'others': [
+            { 'path': 'std::mem', 'name': 'transmute' },
             { 'path': 'std::intrinsics::simd', 'name': 'simd_as' },
             { 'path': 'std::intrinsics::simd', 'name': 'simd_cast' },
-            { 'path': 'std::mem', 'name': 'transmute' },
         ],
     },
 ];
diff --git a/tests/rustdoc-js/doc-alias-after-other-items.js b/tests/rustdoc-js/doc-alias-after-other-items.js
new file mode 100644
index 00000000000..5b22ef67698
--- /dev/null
+++ b/tests/rustdoc-js/doc-alias-after-other-items.js
@@ -0,0 +1,38 @@
+// exact-check
+
+// Checking that doc aliases are always listed after items with equivalent matching.
+
+const EXPECTED = [
+    {
+        'query': 'coo',
+        'others': [
+            {
+                'path': 'doc_alias_after_other_items',
+                'name': 'Foo',
+                'href': '../doc_alias_after_other_items/struct.Foo.html',
+            },
+            {
+                'path': 'doc_alias_after_other_items',
+                'name': 'bar',
+                'alias': 'Boo',
+                'is_alias': true
+            },
+        ],
+    },
+    {
+        'query': '"confiture"',
+        'others': [
+            {
+                'path': 'doc_alias_after_other_items',
+                'name': 'Confiture',
+                'href': '../doc_alias_after_other_items/struct.Confiture.html',
+            },
+            {
+                'path': 'doc_alias_after_other_items',
+                'name': 'this_is_a_long_name',
+                'alias': 'Confiture',
+                'is_alias': true
+            },
+        ],
+    },
+];
diff --git a/tests/rustdoc-js/doc-alias-after-other-items.rs b/tests/rustdoc-js/doc-alias-after-other-items.rs
new file mode 100644
index 00000000000..2ed555c8e2f
--- /dev/null
+++ b/tests/rustdoc-js/doc-alias-after-other-items.rs
@@ -0,0 +1,9 @@
+pub struct Foo;
+
+#[doc(alias = "Boo")]
+pub fn bar() {}
+
+pub struct Confiture;
+
+#[doc(alias = "Confiture")]
+pub fn this_is_a_long_name() {}
diff --git a/tests/rustdoc-js/sort-stability.js b/tests/rustdoc-js/sort-stability.js
new file mode 100644
index 00000000000..8c095619a08
--- /dev/null
+++ b/tests/rustdoc-js/sort-stability.js
@@ -0,0 +1,9 @@
+const EXPECTED = [
+    {
+        'query': 'foo',
+        'others': [
+            {"path": "sort_stability::old", "name": "foo"},
+            {"path": "sort_stability::new", "name": "foo"},
+        ],
+    },
+];
diff --git a/tests/rustdoc-js/sort-stability.rs b/tests/rustdoc-js/sort-stability.rs
new file mode 100644
index 00000000000..68662bb3aab
--- /dev/null
+++ b/tests/rustdoc-js/sort-stability.rs
@@ -0,0 +1,16 @@
+#![feature(staged_api)]
+#![stable(feature = "foo_lib", since = "1.0.0")]
+
+#[stable(feature = "old_foo", since = "1.0.1")]
+pub mod old {
+    /// Old, stable foo
+    #[stable(feature = "old_foo", since = "1.0.1")]
+    pub fn foo() {}
+}
+
+#[unstable(feature = "new_foo", issue = "none")]
+pub mod new {
+    /// New, unstable foo
+    #[unstable(feature = "new_foo", issue = "none")]
+    pub fn foo() {}
+}
diff --git a/tests/rustdoc-json/attrs/macro_export.rs b/tests/rustdoc-json/attrs/macro_export.rs
new file mode 100644
index 00000000000..5d487cf6a56
--- /dev/null
+++ b/tests/rustdoc-json/attrs/macro_export.rs
@@ -0,0 +1,40 @@
+//@ compile-flags: --document-private-items
+
+//@ set exported_id = "$.index[?(@.name=='exported')].id"
+//@ is "$.index[?(@.name=='exported')].attrs" '["macro_export"]'
+//@ is "$.index[?(@.name=='exported')].visibility" '"public"'
+
+#[macro_export]
+macro_rules! exported {
+    () => {};
+}
+
+//@ set not_exported_id = "$.index[?(@.name=='not_exported')].id"
+//@ is "$.index[?(@.name=='not_exported')].attrs" []
+//@ is "$.index[?(@.name=='not_exported')].visibility" '"crate"'
+macro_rules! not_exported {
+    () => {};
+}
+
+//@ set module_id = "$.index[?(@.name=='module')].id"
+pub mod module {
+    //@ set exported_from_mod_id = "$.index[?(@.name=='exported_from_mod')].id"
+    //@ is "$.index[?(@.name=='exported_from_mod')].attrs" '["macro_export"]'
+    //@ is "$.index[?(@.name=='exported_from_mod')].visibility" '"public"'
+    #[macro_export]
+    macro_rules! exported_from_mod {
+        () => {};
+    }
+
+    //@ set not_exported_from_mod_id = "$.index[?(@.name=='not_exported_from_mod')].id"
+    //@ is "$.index[?(@.name=='not_exported_from_mod')].attrs" []
+    //@ is "$.index[?(@.name=='not_exported_from_mod')].visibility" '"crate"'
+    macro_rules! not_exported_from_mod {
+        () => {};
+    }
+}
+// The non-exported macro's are left in place, but the #[macro_export]'d ones
+// are moved to the crate root.
+
+//@ is "$.index[?(@.name=='module')].inner.module.items[*]" $not_exported_from_mod_id
+//@ ismany "$.index[?(@.name=='macro_export')].inner.module.items[*]" $exported_id $not_exported_id $module_id $exported_from_mod_id
diff --git a/tests/rustdoc-ui/disambiguator-endswith-named-suffix.rs b/tests/rustdoc-ui/disambiguator-endswith-named-suffix.rs
index 1174e16dd53..cb277d529ce 100644
--- a/tests/rustdoc-ui/disambiguator-endswith-named-suffix.rs
+++ b/tests/rustdoc-ui/disambiguator-endswith-named-suffix.rs
@@ -2,67 +2,67 @@
 //@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
 
 //! [struct@m!()]   //~ WARN: unmatched disambiguator `struct` and suffix `!()`
-//! [struct@m!{}]
+//! [struct@m!{}]   //~ WARN: unmatched disambiguator `struct` and suffix `!{}`
 //! [struct@m![]]
 //! [struct@f()]    //~ WARN: unmatched disambiguator `struct` and suffix `()`
 //! [struct@m!]     //~ WARN: unmatched disambiguator `struct` and suffix `!`
 //!
 //! [enum@m!()]     //~ WARN: unmatched disambiguator `enum` and suffix `!()`
-//! [enum@m!{}]
+//! [enum@m!{}]     //~ WARN: unmatched disambiguator `enum` and suffix `!{}`
 //! [enum@m![]]
 //! [enum@f()]      //~ WARN: unmatched disambiguator `enum` and suffix `()`
 //! [enum@m!]       //~ WARN: unmatched disambiguator `enum` and suffix `!`
 //!
 //! [trait@m!()]    //~ WARN: unmatched disambiguator `trait` and suffix `!()`
-//! [trait@m!{}]
+//! [trait@m!{}]    //~ WARN: unmatched disambiguator `trait` and suffix `!{}`
 //! [trait@m![]]
 //! [trait@f()]     //~ WARN: unmatched disambiguator `trait` and suffix `()`
 //! [trait@m!]      //~ WARN: unmatched disambiguator `trait` and suffix `!`
 //!
 //! [module@m!()]   //~ WARN: unmatched disambiguator `module` and suffix `!()`
-//! [module@m!{}]
+//! [module@m!{}]   //~ WARN: unmatched disambiguator `module` and suffix `!{}`
 //! [module@m![]]
 //! [module@f()]    //~ WARN: unmatched disambiguator `module` and suffix `()`
 //! [module@m!]     //~ WARN: unmatched disambiguator `module` and suffix `!`
 //!
 //! [mod@m!()]      //~ WARN: unmatched disambiguator `mod` and suffix `!()`
-//! [mod@m!{}]
+//! [mod@m!{}]      //~ WARN: unmatched disambiguator `mod` and suffix `!{}`
 //! [mod@m![]]
 //! [mod@f()]       //~ WARN: unmatched disambiguator `mod` and suffix `()`
 //! [mod@m!]        //~ WARN: unmatched disambiguator `mod` and suffix `!`
 //!
 //! [const@m!()]    //~ WARN: unmatched disambiguator `const` and suffix `!()`
-//! [const@m!{}]
+//! [const@m!{}]    //~ WARN: unmatched disambiguator `const` and suffix `!{}`
 //! [const@m![]]
 //! [const@f()]     //~ WARN: incompatible link kind for `f`
 //! [const@m!]      //~ WARN: unmatched disambiguator `const` and suffix `!`
 //!
 //! [constant@m!()]   //~ WARN: unmatched disambiguator `constant` and suffix `!()`
-//! [constant@m!{}]
+//! [constant@m!{}]   //~ WARN:  unmatched disambiguator `constant` and suffix `!{}`
 //! [constant@m![]]
 //! [constant@f()]    //~ WARN: incompatible link kind for `f`
 //! [constant@m!]     //~ WARN: unmatched disambiguator `constant` and suffix `!`
 //!
 //! [static@m!()]   //~ WARN: unmatched disambiguator `static` and suffix `!()`
-//! [static@m!{}]
+//! [static@m!{}]   //~ WARN: unmatched disambiguator `static` and suffix `!{}`
 //! [static@m![]]
 //! [static@f()]    //~ WARN: incompatible link kind for `f`
 //! [static@m!]     //~ WARN: unmatched disambiguator `static` and suffix `!`
 //!
 //! [function@m!()]   //~ WARN: unmatched disambiguator `function` and suffix `!()`
-//! [function@m!{}]
+//! [function@m!{}]   //~ WARN: unmatched disambiguator `function` and suffix `!{}`
 //! [function@m![]]
 //! [function@f()]
 //! [function@m!]     //~ WARN: unmatched disambiguator `function` and suffix `!`
 //!
 //! [fn@m!()]   //~ WARN: unmatched disambiguator `fn` and suffix `!()`
-//! [fn@m!{}]
+//! [fn@m!{}]   //~ WARN: unmatched disambiguator `fn` and suffix `!{}`
 //! [fn@m![]]
 //! [fn@f()]
 //! [fn@m!]     //~ WARN: unmatched disambiguator `fn` and suffix `!`
 //!
 //! [method@m!()]   //~ WARN: unmatched disambiguator `method` and suffix `!()`
-//! [method@m!{}]
+//! [method@m!{}]   //~ WARN: unmatched disambiguator `method` and suffix `!{}`
 //! [method@m![]]
 //! [method@f()]
 //! [method@m!]     //~ WARN: unmatched disambiguator `method` and suffix `!`
@@ -74,13 +74,13 @@
 //! [derive@m!]     //~ WARN: incompatible link kind for `m`
 //!
 //! [type@m!()]   //~ WARN: unmatched disambiguator `type` and suffix `!()`
-//! [type@m!{}]
+//! [type@m!{}]   //~ WARN: unmatched disambiguator `type` and suffix `!{}`
 //! [type@m![]]
 //! [type@f()]    //~ WARN: unmatched disambiguator `type` and suffix `()`
 //! [type@m!]     //~ WARN: unmatched disambiguator `type` and suffix `!`
 //!
 //! [value@m!()]   //~ WARN: unmatched disambiguator `value` and suffix `!()`
-//! [value@m!{}]
+//! [value@m!{}]   //~ WARN: unmatched disambiguator `value` and suffix `!{}`
 //! [value@m![]]
 //! [value@f()]
 //! [value@m!]     //~ WARN: unmatched disambiguator `value` and suffix `!`
@@ -92,13 +92,13 @@
 //! [macro@m!]
 //!
 //! [prim@m!()]   //~ WARN: unmatched disambiguator `prim` and suffix `!()`
-//! [prim@m!{}]
+//! [prim@m!{}]   //~ WARN: unmatched disambiguator `prim` and suffix `!{}`
 //! [prim@m![]]
 //! [prim@f()]    //~ WARN: unmatched disambiguator `prim` and suffix `()`
 //! [prim@m!]     //~ WARN: unmatched disambiguator `prim` and suffix `!`
 //!
 //! [primitive@m!()]   //~ WARN: unmatched disambiguator `primitive` and suffix `!()`
-//! [primitive@m!{}]
+//! [primitive@m!{}]   //~ WARN: unmatched disambiguator `primitive` and suffix `!{}`
 //! [primitive@m![]]
 //! [primitive@f()]    //~ WARN: unmatched disambiguator `primitive` and suffix `()`
 //! [primitive@m!]     //~ WARN: unmatched disambiguator `primitive` and suffix `!`
diff --git a/tests/rustdoc-ui/disambiguator-endswith-named-suffix.stderr b/tests/rustdoc-ui/disambiguator-endswith-named-suffix.stderr
index f4e40a48873..18403385968 100644
--- a/tests/rustdoc-ui/disambiguator-endswith-named-suffix.stderr
+++ b/tests/rustdoc-ui/disambiguator-endswith-named-suffix.stderr
@@ -7,6 +7,14 @@ LL | //! [struct@m!()]
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
    = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
 
+warning: unmatched disambiguator `struct` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:5:6
+   |
+LL | //! [struct@m!{}]
+   |      ^^^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: unmatched disambiguator `struct` and suffix `()`
   --> $DIR/disambiguator-endswith-named-suffix.rs:7:6
    |
@@ -31,6 +39,14 @@ LL | //! [enum@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `enum` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:11:6
+   |
+LL | //! [enum@m!{}]
+   |      ^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: unmatched disambiguator `enum` and suffix `()`
   --> $DIR/disambiguator-endswith-named-suffix.rs:13:6
    |
@@ -55,6 +71,14 @@ LL | //! [trait@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `trait` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:17:6
+   |
+LL | //! [trait@m!{}]
+   |      ^^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: unmatched disambiguator `trait` and suffix `()`
   --> $DIR/disambiguator-endswith-named-suffix.rs:19:6
    |
@@ -79,6 +103,14 @@ LL | //! [module@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `module` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:23:6
+   |
+LL | //! [module@m!{}]
+   |      ^^^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: unmatched disambiguator `module` and suffix `()`
   --> $DIR/disambiguator-endswith-named-suffix.rs:25:6
    |
@@ -103,6 +135,14 @@ LL | //! [mod@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `mod` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:29:6
+   |
+LL | //! [mod@m!{}]
+   |      ^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: unmatched disambiguator `mod` and suffix `()`
   --> $DIR/disambiguator-endswith-named-suffix.rs:31:6
    |
@@ -127,6 +167,14 @@ LL | //! [const@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `const` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:35:6
+   |
+LL | //! [const@m!{}]
+   |      ^^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: incompatible link kind for `f`
   --> $DIR/disambiguator-endswith-named-suffix.rs:37:6
    |
@@ -155,6 +203,14 @@ LL | //! [constant@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `constant` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:41:6
+   |
+LL | //! [constant@m!{}]
+   |      ^^^^^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: incompatible link kind for `f`
   --> $DIR/disambiguator-endswith-named-suffix.rs:43:6
    |
@@ -183,6 +239,14 @@ LL | //! [static@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `static` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:47:6
+   |
+LL | //! [static@m!{}]
+   |      ^^^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: incompatible link kind for `f`
   --> $DIR/disambiguator-endswith-named-suffix.rs:49:6
    |
@@ -211,6 +275,14 @@ LL | //! [function@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `function` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:53:6
+   |
+LL | //! [function@m!{}]
+   |      ^^^^^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: unmatched disambiguator `function` and suffix `!`
   --> $DIR/disambiguator-endswith-named-suffix.rs:56:6
    |
@@ -227,6 +299,14 @@ LL | //! [fn@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `fn` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:59:6
+   |
+LL | //! [fn@m!{}]
+   |      ^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: unmatched disambiguator `fn` and suffix `!`
   --> $DIR/disambiguator-endswith-named-suffix.rs:62:6
    |
@@ -243,6 +323,14 @@ LL | //! [method@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `method` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:65:6
+   |
+LL | //! [method@m!{}]
+   |      ^^^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: unmatched disambiguator `method` and suffix `!`
   --> $DIR/disambiguator-endswith-named-suffix.rs:68:6
    |
@@ -303,6 +391,14 @@ LL | //! [type@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `type` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:77:6
+   |
+LL | //! [type@m!{}]
+   |      ^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: unmatched disambiguator `type` and suffix `()`
   --> $DIR/disambiguator-endswith-named-suffix.rs:79:6
    |
@@ -327,6 +423,14 @@ LL | //! [value@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `value` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:83:6
+   |
+LL | //! [value@m!{}]
+   |      ^^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: unmatched disambiguator `value` and suffix `!`
   --> $DIR/disambiguator-endswith-named-suffix.rs:86:6
    |
@@ -351,6 +455,14 @@ LL | //! [prim@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `prim` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:95:6
+   |
+LL | //! [prim@m!{}]
+   |      ^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: unmatched disambiguator `prim` and suffix `()`
   --> $DIR/disambiguator-endswith-named-suffix.rs:97:6
    |
@@ -375,6 +487,14 @@ LL | //! [primitive@m!()]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
+warning: unmatched disambiguator `primitive` and suffix `!{}`
+  --> $DIR/disambiguator-endswith-named-suffix.rs:101:6
+   |
+LL | //! [primitive@m!{}]
+   |      ^^^^^^^^^
+   |
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+
 warning: unmatched disambiguator `primitive` and suffix `()`
   --> $DIR/disambiguator-endswith-named-suffix.rs:103:6
    |
@@ -391,5 +511,5 @@ LL | //! [primitive@m!]
    |
    = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
-warning: 46 warnings emitted
+warning: 61 warnings emitted
 
diff --git a/tests/rustdoc-ui/doctest/edition-2024-error-output.stdout b/tests/rustdoc-ui/doctest/edition-2024-error-output.stdout
index ab6aca239af..c8acbe4eda7 100644
--- a/tests/rustdoc-ui/doctest/edition-2024-error-output.stdout
+++ b/tests/rustdoc-ui/doctest/edition-2024-error-output.stdout
@@ -9,7 +9,7 @@ Test executable failed (exit status: 101).
 
 stderr:
 
-thread 'main' panicked at $TMP:6:1:
+thread 'main' ($TID) panicked at $TMP:6:1:
 assertion `left == right` failed
   left: 4
  right: 5
diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout
index 7aa965d543b..12a59d435fe 100644
--- a/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout
@@ -27,7 +27,7 @@ stderr:
 stderr 1
 stderr 2
 
-thread 'main' panicked at $DIR/failed-doctest-output-windows.rs:7:1:
+thread 'main' ($TID) panicked at $DIR/failed-doctest-output-windows.rs:7:1:
 oh no
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output.stdout b/tests/rustdoc-ui/doctest/failed-doctest-output.stdout
index a333f341ce5..3dbb2179b8f 100644
--- a/tests/rustdoc-ui/doctest/failed-doctest-output.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-output.stdout
@@ -27,7 +27,7 @@ stderr:
 stderr 1
 stderr 2
 
-thread 'main' panicked at $DIR/failed-doctest-output.rs:7:1:
+thread 'main' ($TID) panicked at $DIR/failed-doctest-output.rs:7:1:
 oh no
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
diff --git a/tests/rustdoc-ui/doctest/stdout-and-stderr.stdout b/tests/rustdoc-ui/doctest/stdout-and-stderr.stdout
index a35a4d7c3cb..dfdcd7759d5 100644
--- a/tests/rustdoc-ui/doctest/stdout-and-stderr.stdout
+++ b/tests/rustdoc-ui/doctest/stdout-and-stderr.stdout
@@ -14,7 +14,7 @@ stdout:
 
 stderr:
 
-thread 'main' panicked at $TMP:7:1:
+thread 'main' ($TID) panicked at $TMP:7:1:
 assertion `left == right` failed
   left: "doc"
  right: "test"
@@ -26,7 +26,7 @@ Test executable failed (exit status: 101).
 
 stderr:
 
-thread 'main' panicked at $TMP:15:1:
+thread 'main' ($TID) panicked at $TMP:15:1:
 assertion `left == right` failed
   left: "doc"
  right: "test"
diff --git a/tests/rustdoc-ui/intra-doc/bad-intra-doc.rs b/tests/rustdoc-ui/intra-doc/bad-intra-doc.rs
new file mode 100644
index 00000000000..c24a848d898
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/bad-intra-doc.rs
@@ -0,0 +1,15 @@
+#![no_std]
+#![deny(rustdoc::broken_intra_doc_links)]
+
+// regression test for https://github.com/rust-lang/rust/issues/54191
+
+/// this is not a link to [`example.com`] //~ERROR unresolved link
+///
+/// this link [`has spaces in it`].
+///
+/// attempted link to method: [`Foo.bar()`] //~ERROR unresolved link
+///
+/// classic broken intra-doc link: [`Bar`] //~ERROR unresolved link
+///
+/// no backticks, so we let this one slide: [Foo.bar()]
+pub struct Foo;
diff --git a/tests/rustdoc-ui/intra-doc/bad-intra-doc.stderr b/tests/rustdoc-ui/intra-doc/bad-intra-doc.stderr
new file mode 100644
index 00000000000..9533792b35b
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/bad-intra-doc.stderr
@@ -0,0 +1,31 @@
+error: unresolved link to `example.com`
+  --> $DIR/bad-intra-doc.rs:6:29
+   |
+LL | /// this is not a link to [`example.com`]
+   |                             ^^^^^^^^^^^ no item named `example.com` in scope
+   |
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+note: the lint level is defined here
+  --> $DIR/bad-intra-doc.rs:2:9
+   |
+LL | #![deny(rustdoc::broken_intra_doc_links)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: unresolved link to `Foo.bar`
+  --> $DIR/bad-intra-doc.rs:10:33
+   |
+LL | /// attempted link to method: [`Foo.bar()`]
+   |                                 ^^^^^^^^^ no item named `Foo.bar` in scope
+   |
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+
+error: unresolved link to `Bar`
+  --> $DIR/bad-intra-doc.rs:12:38
+   |
+LL | /// classic broken intra-doc link: [`Bar`]
+   |                                      ^^^ no item named `Bar` in scope
+   |
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/rustdoc-ui/intra-doc/github-flavored-admonitions.rs b/tests/rustdoc-ui/intra-doc/github-flavored-admonitions.rs
new file mode 100644
index 00000000000..d5fa72eb993
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/github-flavored-admonitions.rs
@@ -0,0 +1,6 @@
+// regression test for https://github.com/rust-lang/rust/issues/141866
+//@ check-pass
+#![deny(rustdoc::broken_intra_doc_links)]
+
+//! > [!NOTE]
+//! > This should not cause any warnings
diff --git a/tests/rustdoc-ui/intra-doc/weird-syntax.rs b/tests/rustdoc-ui/intra-doc/weird-syntax.rs
index d2a922b2b62..1c5977b1bc3 100644
--- a/tests/rustdoc-ui/intra-doc/weird-syntax.rs
+++ b/tests/rustdoc-ui/intra-doc/weird-syntax.rs
@@ -65,7 +65,7 @@ pub struct XLinkToCloneWithStartSpace;
 /// [x][struct@Clone ] //~ERROR link
 pub struct XLinkToCloneWithEndSpace;
 
-/// [x][Clone\(\)] not URL-shaped enough
+/// [x][Clone\(\)] //~ERROR link
 pub struct XLinkToCloneWithEscapedParens;
 
 /// [x][`Clone`] not URL-shaped enough
diff --git a/tests/rustdoc-ui/intra-doc/weird-syntax.stderr b/tests/rustdoc-ui/intra-doc/weird-syntax.stderr
index ad813f0f9b6..7f2fc1fe625 100644
--- a/tests/rustdoc-ui/intra-doc/weird-syntax.stderr
+++ b/tests/rustdoc-ui/intra-doc/weird-syntax.stderr
@@ -123,6 +123,14 @@ LL - /// [x][struct@Clone ]
 LL + /// [x][trait@Clone ]
    |
 
+error: unresolved link to `Clone\(\)`
+  --> $DIR/weird-syntax.rs:68:9
+   |
+LL | /// [x][Clone\(\)]
+   |         ^^^^^^^^^ no item named `Clone\(\)` in scope
+   |
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+
 error: unresolved link to `Clone`
   --> $DIR/weird-syntax.rs:74:9
    |
@@ -299,5 +307,5 @@ LL | /// - [`SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER`]: the
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
 
-error: aborting due to 27 previous errors
+error: aborting due to 28 previous errors
 
diff --git a/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs b/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs
index 4f4590d45fc..81cd6c73d1c 100644
--- a/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs
+++ b/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs
@@ -1,18 +1,24 @@
 //@ check-pass
 
-/// [`…foo`] [`…bar`] [`Err`]
+/// [`…foo`] //~ WARN: unresolved link
+/// [`…bar`] //~ WARN: unresolved link
+/// [`Err`]
 pub struct Broken {}
 
-/// [`…`] [`…`] [`Err`]
+/// [`…`] //~ WARN: unresolved link
+/// [`…`] //~ WARN: unresolved link
+/// [`Err`]
 pub struct Broken2 {}
 
-/// [`…`][…] [`…`][…] [`Err`]
+/// [`…`][…] //~ WARN: unresolved link
+/// [`…`][…] //~ WARN: unresolved link
+/// [`Err`]
 pub struct Broken3 {}
 
 /// […………………………][Broken3]
 pub struct Broken4 {}
 
-/// [Broken3][…………………………]
+/// [Broken3][…………………………] //~ WARN: unresolved link
 pub struct Broken5 {}
 
 pub struct Err;
diff --git a/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.stderr b/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.stderr
new file mode 100644
index 00000000000..0a5ff68b908
--- /dev/null
+++ b/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.stderr
@@ -0,0 +1,59 @@
+warning: unresolved link to `…foo`
+  --> $DIR/redundant_explicit_links-utf8.rs:3:7
+   |
+LL | /// [`…foo`]
+   |       ^^^^ no item named `…foo` in scope
+   |
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+   = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
+
+warning: unresolved link to `…bar`
+  --> $DIR/redundant_explicit_links-utf8.rs:4:7
+   |
+LL | /// [`…bar`]
+   |       ^^^^ no item named `…bar` in scope
+   |
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+
+warning: unresolved link to `…`
+  --> $DIR/redundant_explicit_links-utf8.rs:8:7
+   |
+LL | /// [`…`]
+   |       ^ no item named `…` in scope
+   |
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+
+warning: unresolved link to `…`
+  --> $DIR/redundant_explicit_links-utf8.rs:9:7
+   |
+LL | /// [`…`]
+   |       ^ no item named `…` in scope
+   |
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+
+warning: unresolved link to `…`
+  --> $DIR/redundant_explicit_links-utf8.rs:13:11
+   |
+LL | /// [`…`][…]
+   |           ^ no item named `…` in scope
+   |
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+
+warning: unresolved link to `…`
+  --> $DIR/redundant_explicit_links-utf8.rs:14:11
+   |
+LL | /// [`…`][…]
+   |           ^ no item named `…` in scope
+   |
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+
+warning: unresolved link to `…………………………`
+  --> $DIR/redundant_explicit_links-utf8.rs:21:15
+   |
+LL | /// [Broken3][…………………………]
+   |               ^^^^^^^^^^ no item named `…………………………` in scope
+   |
+   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+
+warning: 7 warnings emitted
+
diff --git a/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.stdout b/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.stdout
index 87d1e772b80..08f7a4ddd3a 100644
--- a/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.stdout
+++ b/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.stdout
@@ -9,7 +9,7 @@ Test executable failed (exit status: 101).
 
 stderr:
 
-thread 'main' panicked at remapped_path/remap-path-prefix-failed-doctest-output.rs:3:1:
+thread 'main' ($TID) panicked at remapped_path/remap-path-prefix-failed-doctest-output.rs:3:1:
 oh no
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
diff --git a/tests/rustdoc/attribute-rendering.rs b/tests/rustdoc/attribute-rendering.rs
index 841533814c3..bf9b81077f3 100644
--- a/tests/rustdoc/attribute-rendering.rs
+++ b/tests/rustdoc/attribute-rendering.rs
@@ -1,7 +1,7 @@
 #![crate_name = "foo"]
 
 //@ has 'foo/fn.f.html'
-//@ has - //*[@'class="rust item-decl"]' '#[export_name = "f"] pub fn f()'
-#[export_name = "\
-f"]
+//@ has - //*[@'class="rust item-decl"]' '#[unsafe(export_name = "f")] pub fn f()'
+#[unsafe(export_name = "\
+f")]
 pub fn f() {}
diff --git a/tests/rustdoc/attributes-2021-edition.rs b/tests/rustdoc/attributes-2021-edition.rs
new file mode 100644
index 00000000000..b5028d8c852
--- /dev/null
+++ b/tests/rustdoc/attributes-2021-edition.rs
@@ -0,0 +1,14 @@
+//@ edition: 2021
+#![crate_name = "foo"]
+
+//@ has foo/fn.f.html '//pre[@class="rust item-decl"]' '#[unsafe(no_mangle)]'
+#[no_mangle]
+pub extern "C" fn f() {}
+
+//@ has foo/fn.g.html '//pre[@class="rust item-decl"]' '#[unsafe(export_name = "bar")]'
+#[export_name = "bar"]
+pub extern "C" fn g() {}
+
+//@ has foo/fn.example.html '//pre[@class="rust item-decl"]' '#[unsafe(link_section = ".text")]'
+#[link_section = ".text"]
+pub extern "C" fn example() {}
diff --git a/tests/rustdoc/attributes-re-export-2021-edition.rs b/tests/rustdoc/attributes-re-export-2021-edition.rs
new file mode 100644
index 00000000000..04ee6c273dd
--- /dev/null
+++ b/tests/rustdoc/attributes-re-export-2021-edition.rs
@@ -0,0 +1,13 @@
+// Tests that attributes are correctly copied onto a re-exported item.
+//@ edition:2024
+#![crate_name = "re_export"]
+
+//@ has 're_export/fn.thingy2.html' '//pre[@class="rust item-decl"]' '#[unsafe(no_mangle)]'
+pub use thingymod::thingy as thingy2;
+
+mod thingymod {
+    #[unsafe(no_mangle)]
+    pub fn thingy() {
+
+    }
+}
diff --git a/tests/rustdoc/attributes-re-export.rs b/tests/rustdoc/attributes-re-export.rs
index 458826ea8a3..820276f83c0 100644
--- a/tests/rustdoc/attributes-re-export.rs
+++ b/tests/rustdoc/attributes-re-export.rs
@@ -2,7 +2,7 @@
 //@ edition:2021
 #![crate_name = "re_export"]
 
-//@ has 're_export/fn.thingy2.html' '//pre[@class="rust item-decl"]' '#[no_mangle]'
+//@ has 're_export/fn.thingy2.html' '//pre[@class="rust item-decl"]' '#[unsafe(no_mangle)]'
 pub use thingymod::thingy as thingy2;
 
 mod thingymod {
diff --git a/tests/rustdoc/attributes.rs b/tests/rustdoc/attributes.rs
index e34468a88b1..34487a89127 100644
--- a/tests/rustdoc/attributes.rs
+++ b/tests/rustdoc/attributes.rs
@@ -1,13 +1,18 @@
+//@ edition: 2024
 #![crate_name = "foo"]
 
-//@ has foo/fn.f.html '//pre[@class="rust item-decl"]' '#[no_mangle]'
-#[no_mangle]
+//@ has foo/fn.f.html '//pre[@class="rust item-decl"]' '#[unsafe(no_mangle)]'
+#[unsafe(no_mangle)]
 pub extern "C" fn f() {}
 
-//@ has foo/fn.g.html '//pre[@class="rust item-decl"]' '#[export_name = "bar"]'
-#[export_name = "bar"]
+//@ has foo/fn.g.html '//pre[@class="rust item-decl"]' '#[unsafe(export_name = "bar")]'
+#[unsafe(export_name = "bar")]
 pub extern "C" fn g() {}
 
+//@ has foo/fn.example.html '//pre[@class="rust item-decl"]' '#[unsafe(link_section = ".text")]'
+#[unsafe(link_section = ".text")]
+pub extern "C" fn example() {}
+
 //@ has foo/struct.Repr.html '//pre[@class="rust item-decl"]' '#[repr(C, align(8))]'
 #[repr(C, align(8))]
 pub struct Repr;
diff --git a/tests/rustdoc/enum/enum-variant-value.rs b/tests/rustdoc/enum/enum-variant-value.rs
index 1670de8a24f..9cc85dfe10d 100644
--- a/tests/rustdoc/enum/enum-variant-value.rs
+++ b/tests/rustdoc/enum/enum-variant-value.rs
@@ -189,3 +189,25 @@ pub use bar::P;
 //@ has - '//*[@id="variant.A"]/h3' 'A(u32)'
 //@ matches - '//*[@id="variant.B"]/h3' '^B$'
 pub use bar::Q;
+
+// Ensure signed implicit discriminants are rendered correctly after a negative explicit value.
+//@ has 'foo/enum.R.html'
+//@ has - '//*[@class="rust item-decl"]/code' 'A = -2,'
+//@ has - '//*[@class="rust item-decl"]/code' 'B = -1,'
+//@ matches - '//*[@id="variant.A"]/h3' '^A = -2$'
+//@ matches - '//*[@id="variant.B"]/h3' '^B = -1$'
+pub enum R {
+    A = -2,
+    B,
+}
+
+// Also check that incrementing -1 yields 0 for the next implicit variant.
+//@ has 'foo/enum.S.html'
+//@ has - '//*[@class="rust item-decl"]/code' 'A = -1,'
+//@ has - '//*[@class="rust item-decl"]/code' 'B = 0,'
+//@ matches - '//*[@id="variant.A"]/h3' '^A = -1$'
+//@ matches - '//*[@id="variant.B"]/h3' '^B = 0$'
+pub enum S {
+    A = -1,
+    B,
+}
diff --git a/tests/rustdoc/intra-doc/macro-caching-144965.rs b/tests/rustdoc/intra-doc/macro-caching-144965.rs
new file mode 100644
index 00000000000..e14b465aeea
--- /dev/null
+++ b/tests/rustdoc/intra-doc/macro-caching-144965.rs
@@ -0,0 +1,35 @@
+// regression test for https://github.com/rust-lang/rust/issues/144965
+
+#![crate_name = "foo"]
+#![no_std]
+
+#[doc(hidden)]
+pub struct MyStruct;
+
+macro_rules! my_macro {
+    () => {
+        pub fn my_function() {}
+
+        /// Incorrect: [`my_function()`].
+        #[doc(inline)]
+        pub use $crate::MyStruct;
+
+        /// Correct: [`my_function`].
+        pub struct AnotherStruct;
+    };
+}
+
+
+pub mod one {
+    //@ has 'foo/one/index.html'
+    //@ has - '//dl[@class="item-table"]/dd[1]/a[@href="fn.my_function.html"]/code' 'my_function'
+    //@ has - '//dl[@class="item-table"]/dd[2]/a[@href="fn.my_function.html"]/code' 'my_function()'
+    my_macro!();
+}
+
+pub mod two {
+    //@ has 'foo/two/index.html'
+    //@ has - '//dl[@class="item-table"]/dd[1]/a[@href="fn.my_function.html"]/code' 'my_function'
+    //@ has - '//dl[@class="item-table"]/dd[2]/a[@href="fn.my_function.html"]/code' 'my_function()'
+    my_macro!();
+}
diff --git a/tests/rustdoc/reexport/auxiliary/wrap-unnamable-type.rs b/tests/rustdoc/reexport/auxiliary/wrap-unnamable-type.rs
new file mode 100644
index 00000000000..7f8e346c8be
--- /dev/null
+++ b/tests/rustdoc/reexport/auxiliary/wrap-unnamable-type.rs
@@ -0,0 +1,12 @@
+pub trait Assoc {
+    type Ty;
+}
+
+pub struct Foo(<Foo as crate::Assoc>::Ty);
+
+const _X: () = {
+    impl crate::Assoc for Foo {
+        type Ty = Bar;
+    }
+    pub struct Bar;
+};
diff --git a/tests/rustdoc/reexport/reexport-attrs.rs b/tests/rustdoc/reexport/reexport-attrs.rs
index 0ec645841f0..aec0a11c0c6 100644
--- a/tests/rustdoc/reexport/reexport-attrs.rs
+++ b/tests/rustdoc/reexport/reexport-attrs.rs
@@ -4,13 +4,13 @@
 
 extern crate reexports_attrs;
 
-//@ has 'foo/fn.f0.html' '//pre[@class="rust item-decl"]' '#[no_mangle]'
+//@ has 'foo/fn.f0.html' '//pre[@class="rust item-decl"]' '#[unsafe(no_mangle)]'
 pub use reexports_attrs::f0;
 
-//@ has 'foo/fn.f1.html' '//pre[@class="rust item-decl"]' '#[link_section = ".here"]'
+//@ has 'foo/fn.f1.html' '//pre[@class="rust item-decl"]' '#[unsafe(link_section = ".here")]'
 pub use reexports_attrs::f1;
 
-//@ has 'foo/fn.f2.html' '//pre[@class="rust item-decl"]' '#[export_name = "f2export"]'
+//@ has 'foo/fn.f2.html' '//pre[@class="rust item-decl"]' '#[unsafe(export_name = "f2export")]'
 pub use reexports_attrs::f2;
 
 //@ has 'foo/enum.T0.html' '//pre[@class="rust item-decl"]' '#[repr(u8)]'
diff --git a/tests/rustdoc/reexport/wrapped-unnamble-type-143222.rs b/tests/rustdoc/reexport/wrapped-unnamble-type-143222.rs
new file mode 100644
index 00000000000..9a8893786f5
--- /dev/null
+++ b/tests/rustdoc/reexport/wrapped-unnamble-type-143222.rs
@@ -0,0 +1,16 @@
+//@ compile-flags: -Z normalize-docs --document-private-items -Zunstable-options --show-type-layout
+//@ aux-build:wrap-unnamable-type.rs
+//@ build-aux-docs
+
+// regression test for https://github.com/rust-lang/rust/issues/143222
+// makes sure normalizing docs does not cause us to link to unnamable types
+// in cross-crate reexports.
+
+#![crate_name = "foo"]
+
+extern crate wrap_unnamable_type as helper;
+
+//@ has 'foo/struct.Foo.html'
+//@ !hasraw - 'struct.Bar.html'
+#[doc(inline)]
+pub use helper::Foo;
diff --git a/tests/ui-fulldeps/auxiliary/parser.rs b/tests/ui-fulldeps/auxiliary/parser.rs
index 8a370512460..6726969350d 100644
--- a/tests/ui-fulldeps/auxiliary/parser.rs
+++ b/tests/ui-fulldeps/auxiliary/parser.rs
@@ -10,7 +10,6 @@ extern crate rustc_span;
 use rustc_ast::ast::{AttrKind, Attribute, DUMMY_NODE_ID, Expr};
 use rustc_ast::mut_visit::{self, MutVisitor};
 use rustc_ast::node_id::NodeId;
-use rustc_ast::ptr::P;
 use rustc_ast::token::{self, Token};
 use rustc_ast::tokenstream::{AttrTokenStream, AttrTokenTree, LazyAttrTokenStream};
 use rustc_errors::Diag;
@@ -19,7 +18,7 @@ use rustc_session::parse::ParseSess;
 use rustc_span::{AttrId, DUMMY_SP, FileName, Span};
 use std::sync::Arc;
 
-pub fn parse_expr(psess: &ParseSess, source_code: &str) -> Option<P<Expr>> {
+pub fn parse_expr(psess: &ParseSess, source_code: &str) -> Option<Box<Expr>> {
     let parser = rustc_parse::unwrap_or_emit_fatal(rustc_parse::new_parser_from_source_str(
         psess,
         FileName::anon_source_code(source_code),
diff --git a/tests/ui-fulldeps/pprust-expr-roundtrip.rs b/tests/ui-fulldeps/pprust-expr-roundtrip.rs
index 8bca20852ad..08ded2aee53 100644
--- a/tests/ui-fulldeps/pprust-expr-roundtrip.rs
+++ b/tests/ui-fulldeps/pprust-expr-roundtrip.rs
@@ -35,7 +35,6 @@ extern crate rustc_driver;
 
 use parser::parse_expr;
 use rustc_ast::mut_visit::MutVisitor;
-use rustc_ast::ptr::P;
 use rustc_ast::*;
 use rustc_ast_pretty::pprust;
 use rustc_session::parse::ParseSess;
@@ -45,11 +44,11 @@ use rustc_span::DUMMY_SP;
 use thin_vec::{thin_vec, ThinVec};
 
 // Helper functions for building exprs
-fn expr(kind: ExprKind) -> P<Expr> {
-    P(Expr { id: DUMMY_NODE_ID, kind, span: DUMMY_SP, attrs: AttrVec::new(), tokens: None })
+fn expr(kind: ExprKind) -> Box<Expr> {
+    Box::new(Expr { id: DUMMY_NODE_ID, kind, span: DUMMY_SP, attrs: AttrVec::new(), tokens: None })
 }
 
-fn make_x() -> P<Expr> {
+fn make_x() -> Box<Expr> {
     let seg = PathSegment::from_ident(Ident::from_str("x"));
     let path = Path { segments: thin_vec![seg], span: DUMMY_SP, tokens: None };
     expr(ExprKind::Path(None, path))
@@ -58,7 +57,7 @@ fn make_x() -> P<Expr> {
 /// Iterate over exprs of depth up to `depth`. The goal is to explore all "interesting"
 /// combinations of expression nesting. For example, we explore combinations using `if`, but not
 /// `while` or `match`, since those should print and parse in much the same way as `if`.
-fn iter_exprs(depth: usize, f: &mut dyn FnMut(P<Expr>)) {
+fn iter_exprs(depth: usize, f: &mut dyn FnMut(Box<Expr>)) {
     if depth == 0 {
         f(make_x());
         return;
@@ -108,7 +107,7 @@ fn iter_exprs(depth: usize, f: &mut dyn FnMut(P<Expr>)) {
                 iter_exprs(depth - 1, &mut |e| g(ExprKind::Unary(UnOp::Deref, e)));
             }
             9 => {
-                let block = P(Block {
+                let block = Box::new(Block {
                     stmts: ThinVec::new(),
                     id: DUMMY_NODE_ID,
                     rules: BlockCheckMode::Default,
@@ -118,7 +117,10 @@ fn iter_exprs(depth: usize, f: &mut dyn FnMut(P<Expr>)) {
                 iter_exprs(depth - 1, &mut |e| g(ExprKind::If(e, block.clone(), None)));
             }
             10 => {
-                let decl = P(FnDecl { inputs: thin_vec![], output: FnRetTy::Default(DUMMY_SP) });
+                let decl = Box::new(FnDecl {
+                    inputs: thin_vec![],
+                    output: FnRetTy::Default(DUMMY_SP),
+                });
                 iter_exprs(depth - 1, &mut |e| {
                     g(ExprKind::Closure(Box::new(Closure {
                         binder: ClosureBinder::NotPresent,
@@ -159,7 +161,7 @@ fn iter_exprs(depth: usize, f: &mut dyn FnMut(P<Expr>)) {
             }
             16 => {
                 let path = Path::from_ident(Ident::from_str("S"));
-                g(ExprKind::Struct(P(StructExpr {
+                g(ExprKind::Struct(Box::new(StructExpr {
                     qself: None,
                     path,
                     fields: thin_vec![],
@@ -170,8 +172,12 @@ fn iter_exprs(depth: usize, f: &mut dyn FnMut(P<Expr>)) {
                 iter_exprs(depth - 1, &mut |e| g(ExprKind::Try(e)));
             }
             18 => {
-                let pat =
-                    P(Pat { id: DUMMY_NODE_ID, kind: PatKind::Wild, span: DUMMY_SP, tokens: None });
+                let pat = Box::new(Pat {
+                    id: DUMMY_NODE_ID,
+                    kind: PatKind::Wild,
+                    span: DUMMY_SP,
+                    tokens: None,
+                });
                 iter_exprs(depth - 1, &mut |e| {
                     g(ExprKind::Let(pat.clone(), e, DUMMY_SP, Recovered::No))
                 })
@@ -204,7 +210,7 @@ impl MutVisitor for AddParens {
         mut_visit::walk_expr(self, e);
         let expr = std::mem::replace(e, Expr::dummy());
 
-        e.kind = ExprKind::Paren(P(expr));
+        e.kind = ExprKind::Paren(Box::new(expr));
     }
 }
 
diff --git a/tests/ui/issues/issue-5754.rs b/tests/ui/abi/extern-c-two-doubles-x86_64-5754.rs
index 0aa09882959..7f44ef9c685 100644
--- a/tests/ui/issues/issue-5754.rs
+++ b/tests/ui/abi/extern-c-two-doubles-x86_64-5754.rs
@@ -1,8 +1,8 @@
+// https://github.com/rust-lang/rust/issues/5754
 //@ build-pass
 #![allow(dead_code)]
 #![allow(improper_ctypes)]
 
-
 struct TwoDoubles {
     r: f64,
     i: f64
diff --git a/tests/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr b/tests/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr
index 15314fac37b..aad45c422e2 100644
--- a/tests/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr
+++ b/tests/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/alloc-error-handler-bad-signature-1.rs:10:1
    |
 LL |    #[alloc_error_handler]
-   |    ---------------------- in this procedural macro expansion
+   |    ---------------------- in this attribute macro expansion
 LL | // fn oom(
 LL | ||     info: &Layout,
 LL | || ) -> ()
@@ -23,7 +23,7 @@ error[E0308]: mismatched types
   --> $DIR/alloc-error-handler-bad-signature-1.rs:10:1
    |
 LL |    #[alloc_error_handler]
-   |    ---------------------- in this procedural macro expansion
+   |    ---------------------- in this attribute macro expansion
 LL | // fn oom(
 LL | ||     info: &Layout,
 LL | || ) -> ()
diff --git a/tests/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr b/tests/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr
index 2ab42638411..581d1947419 100644
--- a/tests/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr
+++ b/tests/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/alloc-error-handler-bad-signature-2.rs:10:1
    |
 LL |    #[alloc_error_handler]
-   |    ---------------------- in this procedural macro expansion
+   |    ---------------------- in this attribute macro expansion
 LL | // fn oom(
 LL | ||     info: Layout,
 LL | || ) {
@@ -31,7 +31,7 @@ error[E0308]: mismatched types
   --> $DIR/alloc-error-handler-bad-signature-2.rs:10:1
    |
 LL |    #[alloc_error_handler]
-   |    ---------------------- in this procedural macro expansion
+   |    ---------------------- in this attribute macro expansion
 LL | // fn oom(
 LL | ||     info: Layout,
 LL | || ) {
diff --git a/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr b/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
index 3a410174f54..91147df71eb 100644
--- a/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
+++ b/tests/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
@@ -2,7 +2,7 @@ error[E0061]: this function takes 0 arguments but 1 argument was supplied
   --> $DIR/alloc-error-handler-bad-signature-3.rs:10:1
    |
 LL |   #[alloc_error_handler]
-   |   ---------------------- in this procedural macro expansion
+   |   ---------------------- in this attribute macro expansion
 LL |   fn oom() -> ! {
    |  _-^^^^^^^^^^^^
 LL | |     loop {}
diff --git a/tests/ui/allocator/not-an-allocator.stderr b/tests/ui/allocator/not-an-allocator.stderr
index 079bf9334eb..f33a698ed78 100644
--- a/tests/ui/allocator/not-an-allocator.stderr
+++ b/tests/ui/allocator/not-an-allocator.stderr
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
   --> $DIR/not-an-allocator.rs:2:11
    |
 LL | #[global_allocator]
-   | ------------------- in this procedural macro expansion
+   | ------------------- in this attribute macro expansion
 LL | static A: usize = 0;
    |           ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
    |
@@ -12,7 +12,7 @@ error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
   --> $DIR/not-an-allocator.rs:2:11
    |
 LL | #[global_allocator]
-   | ------------------- in this procedural macro expansion
+   | ------------------- in this attribute macro expansion
 LL | static A: usize = 0;
    |           ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
    |
@@ -23,7 +23,7 @@ error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
   --> $DIR/not-an-allocator.rs:2:11
    |
 LL | #[global_allocator]
-   | ------------------- in this procedural macro expansion
+   | ------------------- in this attribute macro expansion
 LL | static A: usize = 0;
    |           ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
    |
@@ -34,7 +34,7 @@ error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
   --> $DIR/not-an-allocator.rs:2:11
    |
 LL | #[global_allocator]
-   | ------------------- in this procedural macro expansion
+   | ------------------- in this attribute macro expansion
 LL | static A: usize = 0;
    |           ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
    |
diff --git a/tests/ui/allocator/two-allocators.stderr b/tests/ui/allocator/two-allocators.stderr
index 5308232a20b..1a9a5910eec 100644
--- a/tests/ui/allocator/two-allocators.stderr
+++ b/tests/ui/allocator/two-allocators.stderr
@@ -4,7 +4,7 @@ error: cannot define multiple global allocators
 LL | static A: System = System;
    | -------------------------- previous global allocator defined here
 LL | #[global_allocator]
-   | ------------------- in this procedural macro expansion
+   | ------------------- in this attribute macro expansion
 LL | static B: System = System;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot define a new global allocator
 
diff --git a/tests/ui/argument-suggestions/issue-100478.stderr b/tests/ui/argument-suggestions/issue-100478.stderr
index 8889a0ab5df..81dbff2f000 100644
--- a/tests/ui/argument-suggestions/issue-100478.stderr
+++ b/tests/ui/argument-suggestions/issue-100478.stderr
@@ -75,12 +75,16 @@ LL | fn foo(p1: T1, p2: Arc<T2>, p3: T3, p4: Arc<T4>, p5: T5, p6: T6, p7: T7, p8
    |    ^^^         -----------
 help: provide the argument
    |
-LL -     foo(
-LL -
-LL -         p1, //p2,
-LL -         p3, p4, p5, p6, p7, p8,
-LL -     );
-LL +     foo(p1, /* Arc<T2> */, p3, p4, p5, p6, p7, p8);
+LL ~     foo(
+LL +         p1,
+LL +         /* Arc<T2> */,
+LL +         p3,
+LL +         p4,
+LL +         p5,
+LL +         p6,
+LL +         p7,
+LL +         p8,
+LL ~     );
    |
 
 error: aborting due to 4 previous errors
diff --git a/tests/ui/issues/issue-8898.rs b/tests/ui/array-slice-vec/fixed-size-arrays-zero-size-types-8898.rs
index 4447704f059..fe627b00f53 100644
--- a/tests/ui/issues/issue-8898.rs
+++ b/tests/ui/array-slice-vec/fixed-size-arrays-zero-size-types-8898.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/8898
 //@ run-pass
 
 fn assert_repr_eq<T: std::fmt::Debug>(obj : T, expected : String) {
diff --git a/tests/ui/asm/loongarch/bad-reg.loongarch32_ilp32d.stderr b/tests/ui/asm/loongarch/bad-reg.loongarch32_ilp32d.stderr
new file mode 100644
index 00000000000..8742d4bd82c
--- /dev/null
+++ b/tests/ui/asm/loongarch/bad-reg.loongarch32_ilp32d.stderr
@@ -0,0 +1,38 @@
+error: invalid register `$r0`: constant zero cannot be used as an operand for inline asm
+  --> $DIR/bad-reg.rs:27:18
+   |
+LL |         asm!("", out("$r0") _);
+   |                  ^^^^^^^^^^^^
+
+error: invalid register `$tp`: reserved for TLS
+  --> $DIR/bad-reg.rs:29:18
+   |
+LL |         asm!("", out("$tp") _);
+   |                  ^^^^^^^^^^^^
+
+error: invalid register `$sp`: the stack pointer cannot be used as an operand for inline asm
+  --> $DIR/bad-reg.rs:31:18
+   |
+LL |         asm!("", out("$sp") _);
+   |                  ^^^^^^^^^^^^
+
+error: invalid register `$r21`: reserved by the ABI
+  --> $DIR/bad-reg.rs:33:18
+   |
+LL |         asm!("", out("$r21") _);
+   |                  ^^^^^^^^^^^^^
+
+error: invalid register `$fp`: the frame pointer cannot be used as an operand for inline asm
+  --> $DIR/bad-reg.rs:35:18
+   |
+LL |         asm!("", out("$fp") _);
+   |                  ^^^^^^^^^^^^
+
+error: invalid register `$r31`: $r31 is used internally by LLVM and cannot be used as an operand for inline asm
+  --> $DIR/bad-reg.rs:37:18
+   |
+LL |         asm!("", out("$r31") _);
+   |                  ^^^^^^^^^^^^^
+
+error: aborting due to 6 previous errors
+
diff --git a/tests/ui/asm/loongarch/bad-reg.loongarch32_ilp32s.stderr b/tests/ui/asm/loongarch/bad-reg.loongarch32_ilp32s.stderr
new file mode 100644
index 00000000000..e6cb6e40c70
--- /dev/null
+++ b/tests/ui/asm/loongarch/bad-reg.loongarch32_ilp32s.stderr
@@ -0,0 +1,62 @@
+error: invalid register `$r0`: constant zero cannot be used as an operand for inline asm
+  --> $DIR/bad-reg.rs:27:18
+   |
+LL |         asm!("", out("$r0") _);
+   |                  ^^^^^^^^^^^^
+
+error: invalid register `$tp`: reserved for TLS
+  --> $DIR/bad-reg.rs:29:18
+   |
+LL |         asm!("", out("$tp") _);
+   |                  ^^^^^^^^^^^^
+
+error: invalid register `$sp`: the stack pointer cannot be used as an operand for inline asm
+  --> $DIR/bad-reg.rs:31:18
+   |
+LL |         asm!("", out("$sp") _);
+   |                  ^^^^^^^^^^^^
+
+error: invalid register `$r21`: reserved by the ABI
+  --> $DIR/bad-reg.rs:33:18
+   |
+LL |         asm!("", out("$r21") _);
+   |                  ^^^^^^^^^^^^^
+
+error: invalid register `$fp`: the frame pointer cannot be used as an operand for inline asm
+  --> $DIR/bad-reg.rs:35:18
+   |
+LL |         asm!("", out("$fp") _);
+   |                  ^^^^^^^^^^^^
+
+error: invalid register `$r31`: $r31 is used internally by LLVM and cannot be used as an operand for inline asm
+  --> $DIR/bad-reg.rs:37:18
+   |
+LL |         asm!("", out("$r31") _);
+   |                  ^^^^^^^^^^^^^
+
+error: register class `freg` requires at least one of the following target features: d, f
+  --> $DIR/bad-reg.rs:41:26
+   |
+LL |         asm!("/* {} */", in(freg) f);
+   |                          ^^^^^^^^^^
+
+error: register class `freg` requires at least one of the following target features: d, f
+  --> $DIR/bad-reg.rs:43:26
+   |
+LL |         asm!("/* {} */", out(freg) _);
+   |                          ^^^^^^^^^^^
+
+error: register class `freg` requires at least one of the following target features: d, f
+  --> $DIR/bad-reg.rs:45:26
+   |
+LL |         asm!("/* {} */", in(freg) d);
+   |                          ^^^^^^^^^^
+
+error: register class `freg` requires at least one of the following target features: d, f
+  --> $DIR/bad-reg.rs:47:26
+   |
+LL |         asm!("/* {} */", out(freg) d);
+   |                          ^^^^^^^^^^^
+
+error: aborting due to 10 previous errors
+
diff --git a/tests/ui/asm/loongarch/bad-reg.loongarch64_lp64d.stderr b/tests/ui/asm/loongarch/bad-reg.loongarch64_lp64d.stderr
index 0e544119650..8742d4bd82c 100644
--- a/tests/ui/asm/loongarch/bad-reg.loongarch64_lp64d.stderr
+++ b/tests/ui/asm/loongarch/bad-reg.loongarch64_lp64d.stderr
@@ -1,35 +1,35 @@
 error: invalid register `$r0`: constant zero cannot be used as an operand for inline asm
-  --> $DIR/bad-reg.rs:22:18
+  --> $DIR/bad-reg.rs:27:18
    |
 LL |         asm!("", out("$r0") _);
    |                  ^^^^^^^^^^^^
 
 error: invalid register `$tp`: reserved for TLS
-  --> $DIR/bad-reg.rs:24:18
+  --> $DIR/bad-reg.rs:29:18
    |
 LL |         asm!("", out("$tp") _);
    |                  ^^^^^^^^^^^^
 
 error: invalid register `$sp`: the stack pointer cannot be used as an operand for inline asm
-  --> $DIR/bad-reg.rs:26:18
+  --> $DIR/bad-reg.rs:31:18
    |
 LL |         asm!("", out("$sp") _);
    |                  ^^^^^^^^^^^^
 
 error: invalid register `$r21`: reserved by the ABI
-  --> $DIR/bad-reg.rs:28:18
+  --> $DIR/bad-reg.rs:33:18
    |
 LL |         asm!("", out("$r21") _);
    |                  ^^^^^^^^^^^^^
 
 error: invalid register `$fp`: the frame pointer cannot be used as an operand for inline asm
-  --> $DIR/bad-reg.rs:30:18
+  --> $DIR/bad-reg.rs:35:18
    |
 LL |         asm!("", out("$fp") _);
    |                  ^^^^^^^^^^^^
 
 error: invalid register `$r31`: $r31 is used internally by LLVM and cannot be used as an operand for inline asm
-  --> $DIR/bad-reg.rs:32:18
+  --> $DIR/bad-reg.rs:37:18
    |
 LL |         asm!("", out("$r31") _);
    |                  ^^^^^^^^^^^^^
diff --git a/tests/ui/asm/loongarch/bad-reg.loongarch64_lp64s.stderr b/tests/ui/asm/loongarch/bad-reg.loongarch64_lp64s.stderr
index 6d0410dc6a1..e6cb6e40c70 100644
--- a/tests/ui/asm/loongarch/bad-reg.loongarch64_lp64s.stderr
+++ b/tests/ui/asm/loongarch/bad-reg.loongarch64_lp64s.stderr
@@ -1,59 +1,59 @@
 error: invalid register `$r0`: constant zero cannot be used as an operand for inline asm
-  --> $DIR/bad-reg.rs:22:18
+  --> $DIR/bad-reg.rs:27:18
    |
 LL |         asm!("", out("$r0") _);
    |                  ^^^^^^^^^^^^
 
 error: invalid register `$tp`: reserved for TLS
-  --> $DIR/bad-reg.rs:24:18
+  --> $DIR/bad-reg.rs:29:18
    |
 LL |         asm!("", out("$tp") _);
    |                  ^^^^^^^^^^^^
 
 error: invalid register `$sp`: the stack pointer cannot be used as an operand for inline asm
-  --> $DIR/bad-reg.rs:26:18
+  --> $DIR/bad-reg.rs:31:18
    |
 LL |         asm!("", out("$sp") _);
    |                  ^^^^^^^^^^^^
 
 error: invalid register `$r21`: reserved by the ABI
-  --> $DIR/bad-reg.rs:28:18
+  --> $DIR/bad-reg.rs:33:18
    |
 LL |         asm!("", out("$r21") _);
    |                  ^^^^^^^^^^^^^
 
 error: invalid register `$fp`: the frame pointer cannot be used as an operand for inline asm
-  --> $DIR/bad-reg.rs:30:18
+  --> $DIR/bad-reg.rs:35:18
    |
 LL |         asm!("", out("$fp") _);
    |                  ^^^^^^^^^^^^
 
 error: invalid register `$r31`: $r31 is used internally by LLVM and cannot be used as an operand for inline asm
-  --> $DIR/bad-reg.rs:32:18
+  --> $DIR/bad-reg.rs:37:18
    |
 LL |         asm!("", out("$r31") _);
    |                  ^^^^^^^^^^^^^
 
 error: register class `freg` requires at least one of the following target features: d, f
-  --> $DIR/bad-reg.rs:36:26
+  --> $DIR/bad-reg.rs:41:26
    |
 LL |         asm!("/* {} */", in(freg) f);
    |                          ^^^^^^^^^^
 
 error: register class `freg` requires at least one of the following target features: d, f
-  --> $DIR/bad-reg.rs:38:26
+  --> $DIR/bad-reg.rs:43:26
    |
 LL |         asm!("/* {} */", out(freg) _);
    |                          ^^^^^^^^^^^
 
 error: register class `freg` requires at least one of the following target features: d, f
-  --> $DIR/bad-reg.rs:40:26
+  --> $DIR/bad-reg.rs:45:26
    |
 LL |         asm!("/* {} */", in(freg) d);
    |                          ^^^^^^^^^^
 
 error: register class `freg` requires at least one of the following target features: d, f
-  --> $DIR/bad-reg.rs:42:26
+  --> $DIR/bad-reg.rs:47:26
    |
 LL |         asm!("/* {} */", out(freg) d);
    |                          ^^^^^^^^^^^
diff --git a/tests/ui/asm/loongarch/bad-reg.rs b/tests/ui/asm/loongarch/bad-reg.rs
index 685b460bc92..0d3eba07f14 100644
--- a/tests/ui/asm/loongarch/bad-reg.rs
+++ b/tests/ui/asm/loongarch/bad-reg.rs
@@ -1,6 +1,11 @@
 //@ add-core-stubs
 //@ needs-asm-support
-//@ revisions: loongarch64_lp64d loongarch64_lp64s
+//@ revisions: loongarch32_ilp32d loongarch32_ilp32s loongarch64_lp64d loongarch64_lp64s
+//@ min-llvm-version: 20
+//@[loongarch32_ilp32d] compile-flags: --target loongarch32-unknown-none
+//@[loongarch32_ilp32d] needs-llvm-components: loongarch
+//@[loongarch32_ilp32s] compile-flags: --target loongarch32-unknown-none-softfloat
+//@[loongarch32_ilp32s] needs-llvm-components: loongarch
 //@[loongarch64_lp64d] compile-flags: --target loongarch64-unknown-linux-gnu
 //@[loongarch64_lp64d] needs-llvm-components: loongarch
 //@[loongarch64_lp64s] compile-flags: --target loongarch64-unknown-none-softfloat
@@ -34,12 +39,12 @@ fn f() {
 
         asm!("", out("$f0") _); // ok
         asm!("/* {} */", in(freg) f);
-        //[loongarch64_lp64s]~^ ERROR register class `freg` requires at least one of the following target features: d, f
+        //[loongarch32_ilp32s,loongarch64_lp64s]~^ ERROR register class `freg` requires at least one of the following target features: d, f
         asm!("/* {} */", out(freg) _);
-        //[loongarch64_lp64s]~^ ERROR register class `freg` requires at least one of the following target features: d, f
+        //[loongarch32_ilp32s,loongarch64_lp64s]~^ ERROR register class `freg` requires at least one of the following target features: d, f
         asm!("/* {} */", in(freg) d);
-        //[loongarch64_lp64s]~^ ERROR register class `freg` requires at least one of the following target features: d, f
+        //[loongarch32_ilp32s,loongarch64_lp64s]~^ ERROR register class `freg` requires at least one of the following target features: d, f
         asm!("/* {} */", out(freg) d);
-        //[loongarch64_lp64s]~^ ERROR register class `freg` requires at least one of the following target features: d, f
+        //[loongarch32_ilp32s,loongarch64_lp64s]~^ ERROR register class `freg` requires at least one of the following target features: d, f
     }
 }
diff --git a/tests/ui/asm/s390x/bad-reg.rs b/tests/ui/asm/s390x/bad-reg.rs
index 56b2d709372..eb9138755e7 100644
--- a/tests/ui/asm/s390x/bad-reg.rs
+++ b/tests/ui/asm/s390x/bad-reg.rs
@@ -1,7 +1,7 @@
 //@ add-core-stubs
 //@ needs-asm-support
 //@ revisions: s390x s390x_vector s390x_vector_stable
-//@[s390x] compile-flags: --target s390x-unknown-linux-gnu
+//@[s390x] compile-flags: --target s390x-unknown-linux-gnu -C target-feature=-vector
 //@[s390x] needs-llvm-components: systemz
 //@[s390x_vector] compile-flags: --target s390x-unknown-linux-gnu -C target-feature=+vector
 //@[s390x_vector] needs-llvm-components: systemz
diff --git a/tests/ui/issues/issue-26095.rs b/tests/ui/associated-consts/constant-trait-item-reference-selection-26095.rs
index 34c617dc495..f0fe2db432b 100644
--- a/tests/ui/issues/issue-26095.rs
+++ b/tests/ui/associated-consts/constant-trait-item-reference-selection-26095.rs
@@ -1,8 +1,8 @@
+// https://github.com/rust-lang/rust/issues/26095
 //@ check-pass
 #![allow(dead_code)]
 #![allow(non_upper_case_globals)]
 
-
 trait HasNumber<T> {
     const Number: usize;
 }
diff --git a/tests/ui/issues/issue-43483.rs b/tests/ui/associated-consts/trait-associated-const-usage-43483.rs
index 2c62671d0c7..c24157d45e7 100644
--- a/tests/ui/issues/issue-43483.rs
+++ b/tests/ui/associated-consts/trait-associated-const-usage-43483.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/43483
 //@ check-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
diff --git a/tests/ui/issues/issue-21946.rs b/tests/ui/associated-types/recursive-associated-type-overflow-21946.rs
index d0c052cb2fd..ba84ea11300 100644
--- a/tests/ui/issues/issue-21946.rs
+++ b/tests/ui/associated-types/recursive-associated-type-overflow-21946.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/21946
 trait Foo {
     type A;
 }
diff --git a/tests/ui/issues/issue-21946.stderr b/tests/ui/associated-types/recursive-associated-type-overflow-21946.stderr
index d1b4a808d2e..37fb0ed7eb8 100644
--- a/tests/ui/issues/issue-21946.stderr
+++ b/tests/ui/associated-types/recursive-associated-type-overflow-21946.stderr
@@ -1,5 +1,5 @@
 error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A == _`
-  --> $DIR/issue-21946.rs:8:14
+  --> $DIR/recursive-associated-type-overflow-21946.rs:9:14
    |
 LL |     type A = <FooStruct as Foo>::A;
    |              ^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/issues/issue-23442.rs b/tests/ui/associated-types/unioned-keys-with-associated-type-23442.rs
index 883c5bb511a..89a2d0177a3 100644
--- a/tests/ui/issues/issue-23442.rs
+++ b/tests/ui/associated-types/unioned-keys-with-associated-type-23442.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/23442
 //@ check-pass
 #![allow(dead_code)]
 use std::marker::PhantomData;
diff --git a/tests/ui/async-await/async-closures/def-path.stderr b/tests/ui/async-await/async-closures/def-path.stderr
index 58a5b0b79c4..a507fa69760 100644
--- a/tests/ui/async-await/async-closures/def-path.stderr
+++ b/tests/ui/async-await/async-closures/def-path.stderr
@@ -5,11 +5,11 @@ LL |     let x = async || {};
    |                      -- the expected `async` closure body
 LL |
 LL |     let () = x();
-   |         ^^   --- this expression has type `{static main::{closure#0}::{closure#0}<?16t> upvar_tys=?15t resume_ty=ResumeTy yield_ty=() return_ty=() witness={main::{closure#0}::{closure#0}}}`
+   |         ^^   --- this expression has type `{static main::{closure#0}::{closure#0}<?15t> upvar_tys=?14t resume_ty=ResumeTy yield_ty=() return_ty=()}`
    |         |
    |         expected `async` closure body, found `()`
    |
-   = note: expected `async` closure body `{static main::{closure#0}::{closure#0}<?16t> upvar_tys=?15t resume_ty=ResumeTy yield_ty=() return_ty=() witness={main::{closure#0}::{closure#0}}}`
+   = note: expected `async` closure body `{static main::{closure#0}::{closure#0}<?15t> upvar_tys=?14t resume_ty=ResumeTy yield_ty=() return_ty=()}`
                          found unit type `()`
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/drop-live-upvar-2.may_not_dangle.stderr b/tests/ui/async-await/drop-live-upvar-2.may_not_dangle.stderr
new file mode 100644
index 00000000000..34f6ba79246
--- /dev/null
+++ b/tests/ui/async-await/drop-live-upvar-2.may_not_dangle.stderr
@@ -0,0 +1,18 @@
+error[E0597]: `y` does not live long enough
+  --> $DIR/drop-live-upvar-2.rs:31:26
+   |
+LL |         let y = ();
+   |             - binding `y` declared here
+LL |         drop_me = Droppy(&y);
+   |                          ^^ borrowed value does not live long enough
+...
+LL |     }
+   |     - `y` dropped here while still borrowed
+LL | }
+   | - borrow might be used here, when `fut` is dropped and runs the destructor for coroutine
+   |
+   = note: values in a scope are dropped in the opposite order they are defined
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/async-await/drop-live-upvar-2.rs b/tests/ui/async-await/drop-live-upvar-2.rs
new file mode 100644
index 00000000000..605db4c8f76
--- /dev/null
+++ b/tests/ui/async-await/drop-live-upvar-2.rs
@@ -0,0 +1,37 @@
+//@ revisions: may_dangle may_not_dangle
+//@[may_dangle] check-pass
+//@ edition: 2018
+
+// Ensure that if a coroutine's interior has no drop types then we don't require the upvars to
+// be *use-live*, but instead require them to be *drop-live*. In this case, `Droppy<&'?0 ()>`
+// does not require that `'?0` is live for drops since the parameter is `#[may_dangle]` in
+// the may_dangle revision, but not in the may_not_dangle revision.
+
+#![feature(dropck_eyepatch)]
+
+struct Droppy<T>(T);
+
+#[cfg(may_dangle)]
+unsafe impl<#[may_dangle] T> Drop for Droppy<T> {
+    fn drop(&mut self) {
+        // This does not use `T` of course.
+    }
+}
+
+#[cfg(may_not_dangle)]
+impl<T> Drop for Droppy<T> {
+    fn drop(&mut self) {}
+}
+
+fn main() {
+    let drop_me;
+    let fut;
+    {
+        let y = ();
+        drop_me = Droppy(&y);
+        //[may_not_dangle]~^ ERROR `y` does not live long enough
+        fut = async {
+            std::mem::drop(drop_me);
+        };
+    }
+}
diff --git a/tests/ui/async-await/drop-live-upvar.rs b/tests/ui/async-await/drop-live-upvar.rs
new file mode 100644
index 00000000000..8e881f729b9
--- /dev/null
+++ b/tests/ui/async-await/drop-live-upvar.rs
@@ -0,0 +1,23 @@
+//@ edition: 2018
+// Regression test for <https://github.com/rust-lang/rust/issues/144155>.
+
+struct NeedsDrop<'a>(&'a Vec<i32>);
+
+async fn await_point() {}
+
+impl Drop for NeedsDrop<'_> {
+    fn drop(&mut self) {}
+}
+
+fn foo() {
+    let v = vec![1, 2, 3];
+    let x = NeedsDrop(&v);
+    let c = async {
+        std::future::ready(()).await;
+        drop(x);
+    };
+    drop(v);
+    //~^ ERROR cannot move out of `v` because it is borrowed
+}
+
+fn main() {}
diff --git a/tests/ui/async-await/drop-live-upvar.stderr b/tests/ui/async-await/drop-live-upvar.stderr
new file mode 100644
index 00000000000..f804484536b
--- /dev/null
+++ b/tests/ui/async-await/drop-live-upvar.stderr
@@ -0,0 +1,22 @@
+error[E0505]: cannot move out of `v` because it is borrowed
+  --> $DIR/drop-live-upvar.rs:19:10
+   |
+LL |     let v = vec![1, 2, 3];
+   |         - binding `v` declared here
+LL |     let x = NeedsDrop(&v);
+   |                       -- borrow of `v` occurs here
+...
+LL |     drop(v);
+   |          ^ move out of `v` occurs here
+LL |
+LL | }
+   | - borrow might be used here, when `c` is dropped and runs the destructor for coroutine
+   |
+help: consider cloning the value if the performance cost is acceptable
+   |
+LL |     let x = NeedsDrop(&v.clone());
+   |                         ++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/async-await/higher-ranked-auto-trait-6.no_assumptions.stderr b/tests/ui/async-await/higher-ranked-auto-trait-6.no_assumptions.stderr
index d1f2d9a0753..d1c88101618 100644
--- a/tests/ui/async-await/higher-ranked-auto-trait-6.no_assumptions.stderr
+++ b/tests/ui/async-await/higher-ranked-auto-trait-6.no_assumptions.stderr
@@ -21,30 +21,6 @@ LL |     Box::new(async { new(|| async { f().await }).await })
    = help: consider pinning your async block and casting it to a trait object
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0308]: mismatched types
-  --> $DIR/higher-ranked-auto-trait-6.rs:16:5
-   |
-LL |     Box::new(async { new(|| async { f().await }).await })
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
-   |
-   = note: expected `async` block `{async block@$DIR/higher-ranked-auto-trait-6.rs:16:29: 16:34}`
-              found `async` block `{async block@$DIR/higher-ranked-auto-trait-6.rs:16:29: 16:34}`
-   = note: no two async blocks, even if identical, have the same type
-   = help: consider pinning your async block and casting it to a trait object
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0308]: mismatched types
-  --> $DIR/higher-ranked-auto-trait-6.rs:16:5
-   |
-LL |     Box::new(async { new(|| async { f().await }).await })
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
-   |
-   = note: expected `async` block `{async block@$DIR/higher-ranked-auto-trait-6.rs:16:29: 16:34}`
-              found `async` block `{async block@$DIR/higher-ranked-auto-trait-6.rs:16:29: 16:34}`
-   = note: no two async blocks, even if identical, have the same type
-   = help: consider pinning your async block and casting it to a trait object
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: aborting due to 4 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/async-await/issue-70818.rs b/tests/ui/async-await/issue-70818.rs
index bc181de8d92..c11332fe7d8 100644
--- a/tests/ui/async-await/issue-70818.rs
+++ b/tests/ui/async-await/issue-70818.rs
@@ -4,6 +4,7 @@ use std::future::Future;
 fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
     //~^ ERROR future cannot be sent between threads safely
     async { (ty, ty1) }
+    //~^ ERROR future cannot be sent between threads safely
 }
 
 fn main() {}
diff --git a/tests/ui/async-await/issue-70818.stderr b/tests/ui/async-await/issue-70818.stderr
index 8de6a825042..07fd20cdd77 100644
--- a/tests/ui/async-await/issue-70818.stderr
+++ b/tests/ui/async-await/issue-70818.stderr
@@ -1,4 +1,25 @@
 error: future cannot be sent between threads safely
+  --> $DIR/issue-70818.rs:6:5
+   |
+LL |     async { (ty, ty1) }
+   |     ^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
+   |
+note: captured value is not `Send`
+  --> $DIR/issue-70818.rs:6:18
+   |
+LL |     async { (ty, ty1) }
+   |                  ^^^ has type `U` which is not `Send`
+note: required by a bound in an opaque type
+  --> $DIR/issue-70818.rs:4:69
+   |
+LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
+   |                                                                     ^^^^
+help: consider restricting type parameter `U` with trait `Send`
+   |
+LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
+   |                  +++++++++++++++++++
+
+error: future cannot be sent between threads safely
   --> $DIR/issue-70818.rs:4:38
    |
 LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
@@ -14,5 +35,5 @@ help: consider restricting type parameter `U` with trait `Send`
 LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
    |                  +++++++++++++++++++
 
-error: aborting due to 1 previous error
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/async-await/issue-86507.stderr b/tests/ui/async-await/issue-86507.stderr
index 6385a8c975e..c71801dcfc8 100644
--- a/tests/ui/async-await/issue-86507.stderr
+++ b/tests/ui/async-await/issue-86507.stderr
@@ -13,7 +13,7 @@ note: captured value is not `Send` because `&` references cannot be sent unless
    |
 LL |                     let x = x;
    |                             ^ has type `&T` which is not `Send`, because `T` is not `Sync`
-   = note: required for the cast from `Pin<Box<{async block@$DIR/issue-86507.rs:18:17: 18:27}>>` to `Pin<Box<(dyn Future<Output = ()> + Send + 'async_trait)>>`
+   = note: required for the cast from `Pin<Box<{async block@$DIR/issue-86507.rs:18:17: 18:27}>>` to `Pin<Box<dyn Future<Output = ()> + Send>>`
 help: consider further restricting type parameter `T` with trait `Sync`
    |
 LL |     fn bar<'me, 'async_trait, T: Send + std::marker::Sync>(x: &'me T)
diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs
index a8b05a4befa..ed99614914a 100644
--- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs
+++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs
@@ -2,7 +2,7 @@
 // be talking about `async fn`s instead.
 
 //@ run-fail
-//@ error-pattern: thread 'main' panicked
+//@ regex-error-pattern: thread 'main'.*panicked
 //@ error-pattern: `async fn` resumed after completion
 //@ edition:2018
 
diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs
index 94366e66263..881fafb010f 100644
--- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs
+++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs
@@ -3,7 +3,7 @@
 
 //@ run-fail
 //@ needs-unwind
-//@ error-pattern: thread 'main' panicked
+//@ regex-error-pattern: thread 'main'.*panicked
 //@ error-pattern: `async fn` resumed after panicking
 //@ edition:2018
 
diff --git a/tests/ui/async-await/recursive-async-auto-trait-overflow.rs b/tests/ui/async-await/recursive-async-auto-trait-overflow.rs
new file mode 100644
index 00000000000..716600ce472
--- /dev/null
+++ b/tests/ui/async-await/recursive-async-auto-trait-overflow.rs
@@ -0,0 +1,14 @@
+// Regression test for <https://github.com/rust-lang/rust/issues/145151>.
+
+//@ edition: 2024
+//@ check-pass
+
+async fn process<'a>() {
+    Box::pin(process()).await;
+}
+
+fn require_send(_: impl Send) {}
+
+fn main() {
+    require_send(process());
+}
diff --git a/tests/ui/attributes/check-builtin-attr-ice.rs b/tests/ui/attributes/check-builtin-attr-ice.rs
index 7745849acd0..811210e2cca 100644
--- a/tests/ui/attributes/check-builtin-attr-ice.rs
+++ b/tests/ui/attributes/check-builtin-attr-ice.rs
@@ -44,12 +44,10 @@
 struct Foo {
     #[should_panic::skip]
     //~^ ERROR failed to resolve
-    //~| ERROR `#[should_panic::skip]` only has an effect on functions
     pub field: u8,
 
     #[should_panic::a::b::c]
     //~^ ERROR failed to resolve
-    //~| ERROR `#[should_panic::a::b::c]` only has an effect on functions
     pub field2: u8,
 }
 
diff --git a/tests/ui/attributes/check-builtin-attr-ice.stderr b/tests/ui/attributes/check-builtin-attr-ice.stderr
index 4f26f71efb7..07bbe01898a 100644
--- a/tests/ui/attributes/check-builtin-attr-ice.stderr
+++ b/tests/ui/attributes/check-builtin-attr-ice.stderr
@@ -5,35 +5,17 @@ LL |     #[should_panic::skip]
    |       ^^^^^^^^^^^^ use of unresolved module or unlinked crate `should_panic`
 
 error[E0433]: failed to resolve: use of unresolved module or unlinked crate `should_panic`
-  --> $DIR/check-builtin-attr-ice.rs:50:7
+  --> $DIR/check-builtin-attr-ice.rs:49:7
    |
 LL |     #[should_panic::a::b::c]
    |       ^^^^^^^^^^^^ use of unresolved module or unlinked crate `should_panic`
 
 error[E0433]: failed to resolve: use of unresolved module or unlinked crate `deny`
-  --> $DIR/check-builtin-attr-ice.rs:59:7
+  --> $DIR/check-builtin-attr-ice.rs:57:7
    |
 LL |     #[deny::skip]
    |       ^^^^ use of unresolved module or unlinked crate `deny`
 
-error: `#[should_panic::skip]` only has an effect on functions
-  --> $DIR/check-builtin-attr-ice.rs:45:5
-   |
-LL |     #[should_panic::skip]
-   |     ^^^^^^^^^^^^^^^^^^^^^
-   |
-note: the lint level is defined here
-  --> $DIR/check-builtin-attr-ice.rs:42:9
-   |
-LL | #![deny(unused_attributes)]
-   |         ^^^^^^^^^^^^^^^^^
-
-error: `#[should_panic::a::b::c]` only has an effect on functions
-  --> $DIR/check-builtin-attr-ice.rs:50:5
-   |
-LL |     #[should_panic::a::b::c]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 5 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/issues/issue-54044.rs b/tests/ui/attributes/cold-attribute-application-54044.rs
index 809ea7a87db..2e644b91c07 100644
--- a/tests/ui/issues/issue-54044.rs
+++ b/tests/ui/attributes/cold-attribute-application-54044.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/54044
 #![deny(unused_attributes)] //~ NOTE lint level is defined here
 
 #[cold]
diff --git a/tests/ui/issues/issue-54044.stderr b/tests/ui/attributes/cold-attribute-application-54044.stderr
index 8bd94a041d0..efdf5e0de52 100644
--- a/tests/ui/issues/issue-54044.stderr
+++ b/tests/ui/attributes/cold-attribute-application-54044.stderr
@@ -1,5 +1,5 @@
 error: attribute should be applied to a function definition
-  --> $DIR/issue-54044.rs:3:1
+  --> $DIR/cold-attribute-application-54044.rs:4:1
    |
 LL | #[cold]
    | ^^^^^^^
@@ -9,13 +9,13 @@ LL | struct Foo;
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 note: the lint level is defined here
-  --> $DIR/issue-54044.rs:1:9
+  --> $DIR/cold-attribute-application-54044.rs:2:9
    |
 LL | #![deny(unused_attributes)]
    |         ^^^^^^^^^^^^^^^^^
 
 error: attribute should be applied to a function definition
-  --> $DIR/issue-54044.rs:9:5
+  --> $DIR/cold-attribute-application-54044.rs:10:5
    |
 LL |     #[cold]
    |     ^^^^^^^
diff --git a/tests/ui/attributes/crate-name-macro-call.stderr b/tests/ui/attributes/crate-name-macro-call.stderr
index ab562b41a31..56827aa11a4 100644
--- a/tests/ui/attributes/crate-name-macro-call.stderr
+++ b/tests/ui/attributes/crate-name-macro-call.stderr
@@ -3,6 +3,8 @@ error: malformed `crate_name` attribute input
    |
 LL | #![crate_name = concat!("my", "crate")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_name = "name"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/crates-and-source-files.html#the-crate_name-attribute>
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/attributes/crate-type-delimited.stderr b/tests/ui/attributes/crate-type-delimited.stderr
index 0bbbe07b198..7f080f74838 100644
--- a/tests/ui/attributes/crate-type-delimited.stderr
+++ b/tests/ui/attributes/crate-type-delimited.stderr
@@ -2,7 +2,24 @@ error: malformed `crate_type` attribute input
   --> $DIR/crate-type-delimited.rs:2:1
    |
 LL | #![crate_type(lib)]
-   | ^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_type = "bin|lib|..."]`
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/linkage.html>
+help: the following are the possible correct uses
+   |
+LL - #![crate_type(lib)]
+LL + #![crate_type = "bin"]
+   |
+LL - #![crate_type(lib)]
+LL + #![crate_type = "cdylib"]
+   |
+LL - #![crate_type(lib)]
+LL + #![crate_type = "dylib"]
+   |
+LL - #![crate_type(lib)]
+LL + #![crate_type = "lib"]
+   |
+   = and 4 other candidates
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/attributes/crate-type-empty.stderr b/tests/ui/attributes/crate-type-empty.stderr
index b9279d961ee..f50bb33d6bb 100644
--- a/tests/ui/attributes/crate-type-empty.stderr
+++ b/tests/ui/attributes/crate-type-empty.stderr
@@ -2,7 +2,20 @@ error: malformed `crate_type` attribute input
   --> $DIR/crate-type-empty.rs:2:1
    |
 LL | #![crate_type]
-   | ^^^^^^^^^^^^^^ help: must be of the form: `#![crate_type = "bin|lib|..."]`
+   | ^^^^^^^^^^^^^^
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/linkage.html>
+help: the following are the possible correct uses
+   |
+LL | #![crate_type = "bin"]
+   |               +++++++
+LL | #![crate_type = "cdylib"]
+   |               ++++++++++
+LL | #![crate_type = "dylib"]
+   |               +++++++++
+LL | #![crate_type = "lib"]
+   |               +++++++
+   = and 4 other candidates
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/attributes/crate-type-macro-call.stderr b/tests/ui/attributes/crate-type-macro-call.stderr
index 6ccc3edf885..97938f7af24 100644
--- a/tests/ui/attributes/crate-type-macro-call.stderr
+++ b/tests/ui/attributes/crate-type-macro-call.stderr
@@ -2,7 +2,24 @@ error: malformed `crate_type` attribute input
   --> $DIR/crate-type-macro-call.rs:1:1
    |
 LL | #![crate_type = foo!()]
-   | ^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_type = "bin|lib|..."]`
+   | ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/linkage.html>
+help: the following are the possible correct uses
+   |
+LL - #![crate_type = foo!()]
+LL + #![crate_type = "bin"]
+   |
+LL - #![crate_type = foo!()]
+LL + #![crate_type = "cdylib"]
+   |
+LL - #![crate_type = foo!()]
+LL + #![crate_type = "dylib"]
+   |
+LL - #![crate_type = foo!()]
+LL + #![crate_type = "lib"]
+   |
+   = and 4 other candidates
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/attributes/invalid-macro-use.rs b/tests/ui/attributes/invalid-macro-use.rs
index cfb13fd183c..52e4608303f 100644
--- a/tests/ui/attributes/invalid-macro-use.rs
+++ b/tests/ui/attributes/invalid-macro-use.rs
@@ -8,21 +8,25 @@ extern crate std as s1;
 #[macro_use(5)]
 //~^ ERROR malformed `macro_use` attribute input
 //~| NOTE expected a valid identifier here
+//~| NOTE for more information, visit
 extern crate std as s2;
 
 #[macro_use(a = "b")]
 //~^ ERROR malformed `macro_use` attribute input
 //~| NOTE didn't expect any arguments here
+//~| NOTE for more information, visit
 extern crate std as s3;
 
 #[macro_use(a(b))]
 //~^ ERROR malformed `macro_use` attribute input
 //~| NOTE didn't expect any arguments here
+//~| NOTE for more information, visit
 extern crate std as s4;
 
 #[macro_use(a::b)]
 //~^ ERROR malformed `macro_use` attribute input
 //~| NOTE expected a valid identifier here
+//~| NOTE for more information, visit
 extern crate std as s5;
 
 #[macro_use(a)]
diff --git a/tests/ui/attributes/invalid-macro-use.stderr b/tests/ui/attributes/invalid-macro-use.stderr
index 4f5db5c558a..ff3ed6196d3 100644
--- a/tests/ui/attributes/invalid-macro-use.stderr
+++ b/tests/ui/attributes/invalid-macro-use.stderr
@@ -1,11 +1,11 @@
 error[E0469]: imported macro not found
-  --> $DIR/invalid-macro-use.rs:47:13
+  --> $DIR/invalid-macro-use.rs:51:13
    |
 LL | #[macro_use(a)]
    |             ^
 
 error[E0469]: imported macro not found
-  --> $DIR/invalid-macro-use.rs:49:13
+  --> $DIR/invalid-macro-use.rs:53:13
    |
 LL | #[macro_use(b)]
    |             ^
@@ -24,6 +24,7 @@ LL | #[macro_use(5)]
    |             |
    |             expected a valid identifier here
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/macros-by-example.html#the-macro_use-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[macro_use(5)]
@@ -34,13 +35,14 @@ LL + #[macro_use]
    |
 
 error[E0565]: malformed `macro_use` attribute input
-  --> $DIR/invalid-macro-use.rs:13:1
+  --> $DIR/invalid-macro-use.rs:14:1
    |
 LL | #[macro_use(a = "b")]
    | ^^^^^^^^^^^^^^-----^^
    |               |
    |               didn't expect any arguments here
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/macros-by-example.html#the-macro_use-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[macro_use(a = "b")]
@@ -51,13 +53,14 @@ LL + #[macro_use]
    |
 
 error[E0565]: malformed `macro_use` attribute input
-  --> $DIR/invalid-macro-use.rs:18:1
+  --> $DIR/invalid-macro-use.rs:20:1
    |
 LL | #[macro_use(a(b))]
    | ^^^^^^^^^^^^^---^^
    |              |
    |              didn't expect any arguments here
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/macros-by-example.html#the-macro_use-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[macro_use(a(b))]
@@ -68,13 +71,14 @@ LL + #[macro_use]
    |
 
 error[E0539]: malformed `macro_use` attribute input
-  --> $DIR/invalid-macro-use.rs:23:1
+  --> $DIR/invalid-macro-use.rs:26:1
    |
 LL | #[macro_use(a::b)]
    | ^^^^^^^^^^^^----^^
    |             |
    |             expected a valid identifier here
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/macros-by-example.html#the-macro_use-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[macro_use(a::b)]
@@ -85,13 +89,13 @@ LL + #[macro_use]
    |
 
 error: unused attribute
-  --> $DIR/invalid-macro-use.rs:28:1
+  --> $DIR/invalid-macro-use.rs:32:1
    |
 LL | #[macro_use(a)]
    | ^^^^^^^^^^^^^^^ help: remove this attribute
    |
 note: attribute also specified here
-  --> $DIR/invalid-macro-use.rs:30:1
+  --> $DIR/invalid-macro-use.rs:34:1
    |
 LL | #[macro_use]
    | ^^^^^^^^^^^^
@@ -102,25 +106,25 @@ LL | #![deny(unused_attributes)]
    |         ^^^^^^^^^^^^^^^^^
 
 error: unused attribute
-  --> $DIR/invalid-macro-use.rs:36:1
+  --> $DIR/invalid-macro-use.rs:40:1
    |
 LL | #[macro_use(a)]
    | ^^^^^^^^^^^^^^^ help: remove this attribute
    |
 note: attribute also specified here
-  --> $DIR/invalid-macro-use.rs:34:1
+  --> $DIR/invalid-macro-use.rs:38:1
    |
 LL | #[macro_use]
    | ^^^^^^^^^^^^
 
 error: unused attribute
-  --> $DIR/invalid-macro-use.rs:42:1
+  --> $DIR/invalid-macro-use.rs:46:1
    |
 LL | #[macro_use]
    | ^^^^^^^^^^^^ help: remove this attribute
    |
 note: attribute also specified here
-  --> $DIR/invalid-macro-use.rs:40:1
+  --> $DIR/invalid-macro-use.rs:44:1
    |
 LL | #[macro_use]
    | ^^^^^^^^^^^^
diff --git a/tests/ui/attributes/invalid-reprs.stderr b/tests/ui/attributes/invalid-reprs.stderr
index 415b969b244..72aaff92bd0 100644
--- a/tests/ui/attributes/invalid-reprs.stderr
+++ b/tests/ui/attributes/invalid-reprs.stderr
@@ -26,6 +26,7 @@ LL |     let y = #[repr(uwu(4))]
    |                    ^^^^^^
    |
    = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/attributes/key-value-expansion-scope.rs b/tests/ui/attributes/key-value-expansion-scope.rs
index 49a59502377..6688d698f9e 100644
--- a/tests/ui/attributes/key-value-expansion-scope.rs
+++ b/tests/ui/attributes/key-value-expansion-scope.rs
@@ -1,7 +1,7 @@
-#![doc = in_root!()] //~ WARN cannot find macro `in_root`
+#![doc = in_root!()] //~ ERROR cannot find macro `in_root`
                      //~| WARN this was previously accepted by the compiler
 #![doc = in_mod!()] //~ ERROR cannot find macro `in_mod` in this scope
-#![doc = in_mod_escape!()] //~ WARN cannot find macro `in_mod_escape`
+#![doc = in_mod_escape!()] //~ ERROR cannot find macro `in_mod_escape`
                            //~| WARN this was previously accepted by the compiler
 #![doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope
 
@@ -18,10 +18,10 @@ fn before() {
 
 macro_rules! in_root { () => { "" } }
 
-#[doc = in_mod!()] //~ WARN cannot find macro `in_mod`
+#[doc = in_mod!()] //~ ERROR cannot find macro `in_mod`
                    //~| WARN this was previously accepted by the compiler
 mod macros_stay {
-    #![doc = in_mod!()] //~ WARN cannot find macro `in_mod`
+    #![doc = in_mod!()] //~ ERROR cannot find macro `in_mod`
                         //~| WARN this was previously accepted by the compiler
 
     macro_rules! in_mod { () => { "" } }
@@ -33,10 +33,10 @@ mod macros_stay {
 }
 
 #[macro_use]
-#[doc = in_mod_escape!()] //~ WARN cannot find macro `in_mod_escape`
+#[doc = in_mod_escape!()] //~ ERROR cannot find macro `in_mod_escape`
                           //~| WARN this was previously accepted by the compiler
 mod macros_escape {
-    #![doc = in_mod_escape!()] //~ WARN cannot find macro `in_mod_escape`
+    #![doc = in_mod_escape!()] //~ ERROR cannot find macro `in_mod_escape`
                                //~| WARN this was previously accepted by the compiler
 
     macro_rules! in_mod_escape { () => { "" } }
diff --git a/tests/ui/attributes/key-value-expansion-scope.stderr b/tests/ui/attributes/key-value-expansion-scope.stderr
index 91a602e57d9..29b48ca4ce6 100644
--- a/tests/ui/attributes/key-value-expansion-scope.stderr
+++ b/tests/ui/attributes/key-value-expansion-scope.stderr
@@ -126,7 +126,7 @@ LL |     #![doc = in_block!()]
    |
    = help: have you added the `#[macro_use]` on the module/import?
 
-warning: cannot find macro `in_root` in the current scope when looking from the crate root
+error: cannot find macro `in_root` in the current scope when looking from the crate root
   --> $DIR/key-value-expansion-scope.rs:1:10
    |
 LL | #![doc = in_root!()]
@@ -135,9 +135,9 @@ LL | #![doc = in_root!()]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
    = help: import `macro_rules` with `use` to make it callable above its definition
-   = note: `#[warn(out_of_scope_macro_calls)]` on by default
+   = note: `#[deny(out_of_scope_macro_calls)]` on by default
 
-warning: cannot find macro `in_mod_escape` in the current scope when looking from the crate root
+error: cannot find macro `in_mod_escape` in the current scope when looking from the crate root
   --> $DIR/key-value-expansion-scope.rs:4:10
    |
 LL | #![doc = in_mod_escape!()]
@@ -147,7 +147,7 @@ LL | #![doc = in_mod_escape!()]
    = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
    = help: import `macro_rules` with `use` to make it callable above its definition
 
-warning: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
+error: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
   --> $DIR/key-value-expansion-scope.rs:21:9
    |
 LL | #[doc = in_mod!()]
@@ -157,7 +157,7 @@ LL | #[doc = in_mod!()]
    = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
    = help: import `macro_rules` with `use` to make it callable above its definition
 
-warning: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
+error: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
   --> $DIR/key-value-expansion-scope.rs:24:14
    |
 LL |     #![doc = in_mod!()]
@@ -167,7 +167,7 @@ LL |     #![doc = in_mod!()]
    = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
    = help: import `macro_rules` with `use` to make it callable above its definition
 
-warning: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
+error: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
   --> $DIR/key-value-expansion-scope.rs:36:9
    |
 LL | #[doc = in_mod_escape!()]
@@ -177,7 +177,7 @@ LL | #[doc = in_mod_escape!()]
    = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
    = help: import `macro_rules` with `use` to make it callable above its definition
 
-warning: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
+error: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
   --> $DIR/key-value-expansion-scope.rs:39:14
    |
 LL |     #![doc = in_mod_escape!()]
@@ -187,5 +187,77 @@ LL |     #![doc = in_mod_escape!()]
    = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
    = help: import `macro_rules` with `use` to make it callable above its definition
 
-error: aborting due to 16 previous errors; 6 warnings emitted
+error: aborting due to 22 previous errors
+
+Future incompatibility report: Future breakage diagnostic:
+error: cannot find macro `in_root` in the current scope when looking from the crate root
+  --> $DIR/key-value-expansion-scope.rs:1:10
+   |
+LL | #![doc = in_root!()]
+   |          ^^^^^^^ not found from the crate root
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
+   = help: import `macro_rules` with `use` to make it callable above its definition
+   = note: `#[deny(out_of_scope_macro_calls)]` on by default
+
+Future breakage diagnostic:
+error: cannot find macro `in_mod_escape` in the current scope when looking from the crate root
+  --> $DIR/key-value-expansion-scope.rs:4:10
+   |
+LL | #![doc = in_mod_escape!()]
+   |          ^^^^^^^^^^^^^ not found from the crate root
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
+   = help: import `macro_rules` with `use` to make it callable above its definition
+   = note: `#[deny(out_of_scope_macro_calls)]` on by default
+
+Future breakage diagnostic:
+error: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
+  --> $DIR/key-value-expansion-scope.rs:21:9
+   |
+LL | #[doc = in_mod!()]
+   |         ^^^^^^ not found from module `macros_stay`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
+   = help: import `macro_rules` with `use` to make it callable above its definition
+   = note: `#[deny(out_of_scope_macro_calls)]` on by default
+
+Future breakage diagnostic:
+error: cannot find macro `in_mod` in the current scope when looking from module `macros_stay`
+  --> $DIR/key-value-expansion-scope.rs:24:14
+   |
+LL |     #![doc = in_mod!()]
+   |              ^^^^^^ not found from module `macros_stay`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
+   = help: import `macro_rules` with `use` to make it callable above its definition
+   = note: `#[deny(out_of_scope_macro_calls)]` on by default
+
+Future breakage diagnostic:
+error: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
+  --> $DIR/key-value-expansion-scope.rs:36:9
+   |
+LL | #[doc = in_mod_escape!()]
+   |         ^^^^^^^^^^^^^ not found from module `macros_escape`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
+   = help: import `macro_rules` with `use` to make it callable above its definition
+   = note: `#[deny(out_of_scope_macro_calls)]` on by default
+
+Future breakage diagnostic:
+error: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape`
+  --> $DIR/key-value-expansion-scope.rs:39:14
+   |
+LL |     #![doc = in_mod_escape!()]
+   |              ^^^^^^^^^^^^^ not found from module `macros_escape`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #124535 <https://github.com/rust-lang/rust/issues/124535>
+   = help: import `macro_rules` with `use` to make it callable above its definition
+   = note: `#[deny(out_of_scope_macro_calls)]` on by default
 
diff --git a/tests/ui/attributes/lint_on_root.rs b/tests/ui/attributes/lint_on_root.rs
index 93d47bf0d71..9029da7dc97 100644
--- a/tests/ui/attributes/lint_on_root.rs
+++ b/tests/ui/attributes/lint_on_root.rs
@@ -1,7 +1,7 @@
 // NOTE: this used to panic in debug builds (by a sanity assertion)
 // and not emit any lint on release builds. See https://github.com/rust-lang/rust/issues/142891.
 #![inline = ""]
-//~^ ERROR valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
+//~^ ERROR: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]` [ill_formed_attribute_input]
 //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 fn main() {}
diff --git a/tests/ui/attributes/lint_on_root.stderr b/tests/ui/attributes/lint_on_root.stderr
index aaa46e6f54b..91b72730530 100644
--- a/tests/ui/attributes/lint_on_root.stderr
+++ b/tests/ui/attributes/lint_on_root.stderr
@@ -1,4 +1,4 @@
-error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
+error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
   --> $DIR/lint_on_root.rs:3:1
    |
 LL | #![inline = ""]
@@ -10,3 +10,14 @@ LL | #![inline = ""]
 
 error: aborting due to 1 previous error
 
+Future incompatibility report: Future breakage diagnostic:
+error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
+  --> $DIR/lint_on_root.rs:3:1
+   |
+LL | #![inline = ""]
+   | ^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
diff --git a/tests/ui/attributes/malformed-attrs.rs b/tests/ui/attributes/malformed-attrs.rs
index 2a8b7b41e58..3261b29fe7e 100644
--- a/tests/ui/attributes/malformed-attrs.rs
+++ b/tests/ui/attributes/malformed-attrs.rs
@@ -20,13 +20,9 @@
 #![feature(linkage)]
 #![feature(cfi_encoding, extern_types)]
 #![feature(patchable_function_entry)]
-#![feature(omit_gdb_pretty_printer_section)]
 #![feature(fundamental)]
 
 
-#![omit_gdb_pretty_printer_section = 1]
-//~^ ERROR malformed `omit_gdb_pretty_printer_section` attribute input
-
 #![windows_subsystem]
 //~^ ERROR malformed
 
@@ -82,7 +78,7 @@
 #[export_stable = 1]
 //~^ ERROR malformed
 #[link]
-//~^ ERROR attribute must be of the form
+//~^ ERROR valid forms for the attribute are
 //~| WARN this was previously accepted by the compiler
 #[link_name]
 //~^ ERROR malformed
diff --git a/tests/ui/attributes/malformed-attrs.stderr b/tests/ui/attributes/malformed-attrs.stderr
index 814a1e5f691..705050e9a7d 100644
--- a/tests/ui/attributes/malformed-attrs.stderr
+++ b/tests/ui/attributes/malformed-attrs.stderr
@@ -1,14 +1,16 @@
 error[E0539]: malformed `cfg` attribute input
-  --> $DIR/malformed-attrs.rs:103:1
+  --> $DIR/malformed-attrs.rs:99:1
    |
 LL | #[cfg]
    | ^^^^^^
    | |
    | expected this to be a list
    | help: must be of the form: `#[cfg(predicate)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
 
 error: malformed `cfg_attr` attribute input
-  --> $DIR/malformed-attrs.rs:105:1
+  --> $DIR/malformed-attrs.rs:101:1
    |
 LL | #[cfg_attr]
    | ^^^^^^^^^^^
@@ -20,49 +22,55 @@ LL | #[cfg_attr(condition, attribute, other_attribute, ...)]
    |           ++++++++++++++++++++++++++++++++++++++++++++
 
 error[E0463]: can't find crate for `wloop`
-  --> $DIR/malformed-attrs.rs:212:1
+  --> $DIR/malformed-attrs.rs:208:1
    |
 LL | extern crate wloop;
    | ^^^^^^^^^^^^^^^^^^^ can't find crate
 
 error: malformed `windows_subsystem` attribute input
-  --> $DIR/malformed-attrs.rs:30:1
+  --> $DIR/malformed-attrs.rs:26:1
    |
 LL | #![windows_subsystem]
-   | ^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![windows_subsystem = "windows|console"]`
+   | ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/runtime.html#the-windows_subsystem-attribute>
+help: the following are the possible correct uses
+   |
+LL | #![windows_subsystem = "console"]
+   |                      +++++++++++
+LL | #![windows_subsystem = "windows"]
+   |                      +++++++++++
 
 error: malformed `crate_name` attribute input
-  --> $DIR/malformed-attrs.rs:75:1
+  --> $DIR/malformed-attrs.rs:71:1
    |
 LL | #[crate_name]
    | ^^^^^^^^^^^^^ help: must be of the form: `#[crate_name = "name"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/crates-and-source-files.html#the-crate_name-attribute>
 
 error: malformed `no_sanitize` attribute input
-  --> $DIR/malformed-attrs.rs:93:1
+  --> $DIR/malformed-attrs.rs:89:1
    |
 LL | #[no_sanitize]
    | ^^^^^^^^^^^^^^ help: must be of the form: `#[no_sanitize(address, kcfi, memory, thread)]`
 
 error: malformed `instruction_set` attribute input
-  --> $DIR/malformed-attrs.rs:107:1
+  --> $DIR/malformed-attrs.rs:103:1
    |
 LL | #[instruction_set]
    | ^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[instruction_set(set)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/codegen.html#the-instruction_set-attribute>
 
 error: malformed `patchable_function_entry` attribute input
-  --> $DIR/malformed-attrs.rs:109:1
+  --> $DIR/malformed-attrs.rs:105:1
    |
 LL | #[patchable_function_entry]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[patchable_function_entry(prefix_nops = m, entry_nops = n)]`
 
-error: malformed `coroutine` attribute input
-  --> $DIR/malformed-attrs.rs:112:5
-   |
-LL |     #[coroutine = 63] || {}
-   |     ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[coroutine]`
-
 error: malformed `must_not_suspend` attribute input
-  --> $DIR/malformed-attrs.rs:133:1
+  --> $DIR/malformed-attrs.rs:129:1
    |
 LL | #[must_not_suspend()]
    | ^^^^^^^^^^^^^^^^^^^^^
@@ -77,71 +85,139 @@ LL + #[must_not_suspend]
    |
 
 error: malformed `cfi_encoding` attribute input
-  --> $DIR/malformed-attrs.rs:135:1
+  --> $DIR/malformed-attrs.rs:131:1
    |
 LL | #[cfi_encoding]
    | ^^^^^^^^^^^^^^^ help: must be of the form: `#[cfi_encoding = "encoding"]`
 
 error: malformed `linkage` attribute input
-  --> $DIR/malformed-attrs.rs:174:5
+  --> $DIR/malformed-attrs.rs:170:5
    |
 LL |     #[linkage]
-   |     ^^^^^^^^^^ help: must be of the form: `#[linkage = "external|internal|..."]`
+   |     ^^^^^^^^^^
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/linkage.html>
+help: the following are the possible correct uses
+   |
+LL |     #[linkage = "available_externally"]
+   |               ++++++++++++++++++++++++
+LL |     #[linkage = "common"]
+   |               ++++++++++
+LL |     #[linkage = "extern_weak"]
+   |               +++++++++++++++
+LL |     #[linkage = "external"]
+   |               ++++++++++++
+   = and 5 other candidates
 
 error: malformed `allow` attribute input
-  --> $DIR/malformed-attrs.rs:179:1
+  --> $DIR/malformed-attrs.rs:175:1
    |
 LL | #[allow]
-   | ^^^^^^^^ help: must be of the form: `#[allow(lint1, lint2, ..., /*opt*/ reason = "...")]`
+   | ^^^^^^^^
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/diagnostics.html#lint-check-attributes>
+help: the following are the possible correct uses
+   |
+LL | #[allow(lint1)]
+   |        +++++++
+LL | #[allow(lint1, lint2, ...)]
+   |        +++++++++++++++++++
+LL | #[allow(lint1, lint2, lint3, reason = "...")]
+   |        +++++++++++++++++++++++++++++++++++++
 
 error: malformed `expect` attribute input
-  --> $DIR/malformed-attrs.rs:181:1
+  --> $DIR/malformed-attrs.rs:177:1
    |
 LL | #[expect]
-   | ^^^^^^^^^ help: must be of the form: `#[expect(lint1, lint2, ..., /*opt*/ reason = "...")]`
+   | ^^^^^^^^^
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/diagnostics.html#lint-check-attributes>
+help: the following are the possible correct uses
+   |
+LL | #[expect(lint1)]
+   |         +++++++
+LL | #[expect(lint1, lint2, ...)]
+   |         +++++++++++++++++++
+LL | #[expect(lint1, lint2, lint3, reason = "...")]
+   |         +++++++++++++++++++++++++++++++++++++
 
 error: malformed `warn` attribute input
-  --> $DIR/malformed-attrs.rs:183:1
+  --> $DIR/malformed-attrs.rs:179:1
    |
 LL | #[warn]
-   | ^^^^^^^ help: must be of the form: `#[warn(lint1, lint2, ..., /*opt*/ reason = "...")]`
+   | ^^^^^^^
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/diagnostics.html#lint-check-attributes>
+help: the following are the possible correct uses
+   |
+LL | #[warn(lint1)]
+   |       +++++++
+LL | #[warn(lint1, lint2, ...)]
+   |       +++++++++++++++++++
+LL | #[warn(lint1, lint2, lint3, reason = "...")]
+   |       +++++++++++++++++++++++++++++++++++++
 
 error: malformed `deny` attribute input
-  --> $DIR/malformed-attrs.rs:185:1
+  --> $DIR/malformed-attrs.rs:181:1
    |
 LL | #[deny]
-   | ^^^^^^^ help: must be of the form: `#[deny(lint1, lint2, ..., /*opt*/ reason = "...")]`
+   | ^^^^^^^
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/diagnostics.html#lint-check-attributes>
+help: the following are the possible correct uses
+   |
+LL | #[deny(lint1)]
+   |       +++++++
+LL | #[deny(lint1, lint2, ...)]
+   |       +++++++++++++++++++
+LL | #[deny(lint1, lint2, lint3, reason = "...")]
+   |       +++++++++++++++++++++++++++++++++++++
 
 error: malformed `forbid` attribute input
-  --> $DIR/malformed-attrs.rs:187:1
+  --> $DIR/malformed-attrs.rs:183:1
    |
 LL | #[forbid]
-   | ^^^^^^^^^ help: must be of the form: `#[forbid(lint1, lint2, ..., /*opt*/ reason = "...")]`
+   | ^^^^^^^^^
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/diagnostics.html#lint-check-attributes>
+help: the following are the possible correct uses
+   |
+LL | #[forbid(lint1)]
+   |         +++++++
+LL | #[forbid(lint1, lint2, ...)]
+   |         +++++++++++++++++++
+LL | #[forbid(lint1, lint2, lint3, reason = "...")]
+   |         +++++++++++++++++++++++++++++++++++++
 
 error: malformed `debugger_visualizer` attribute input
-  --> $DIR/malformed-attrs.rs:189:1
+  --> $DIR/malformed-attrs.rs:185:1
    |
 LL | #[debugger_visualizer]
    | ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[debugger_visualizer(natvis_file = "...", gdb_script_file = "...")]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/debugger.html#the-debugger_visualizer-attribute>
 
 error: malformed `thread_local` attribute input
-  --> $DIR/malformed-attrs.rs:204:1
+  --> $DIR/malformed-attrs.rs:200:1
    |
 LL | #[thread_local()]
    | ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[thread_local]`
 
 error: malformed `no_link` attribute input
-  --> $DIR/malformed-attrs.rs:208:1
+  --> $DIR/malformed-attrs.rs:204:1
    |
 LL | #[no_link()]
    | ^^^^^^^^^^^^ help: must be of the form: `#[no_link]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/extern-crates.html#the-no_link-attribute>
 
 error: malformed `macro_export` attribute input
-  --> $DIR/malformed-attrs.rs:215:1
+  --> $DIR/malformed-attrs.rs:211:1
    |
 LL | #[macro_export = 18]
    | ^^^^^^^^^^^^^^^^^^^^
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/macros-by-example.html#path-based-scope>
 help: the following are the possible correct uses
    |
 LL - #[macro_export = 18]
@@ -151,32 +227,26 @@ LL - #[macro_export = 18]
 LL + #[macro_export]
    |
 
-error: malformed `allow_internal_unsafe` attribute input
-  --> $DIR/malformed-attrs.rs:217:1
-   |
-LL | #[allow_internal_unsafe = 1]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[allow_internal_unsafe]`
-
 error: the `#[proc_macro]` attribute is only usable with crates of the `proc-macro` crate type
-  --> $DIR/malformed-attrs.rs:100:1
+  --> $DIR/malformed-attrs.rs:96:1
    |
 LL | #[proc_macro = 18]
    | ^^^^^^^^^^^^^^^^^^
 
 error: the `#[proc_macro_attribute]` attribute is only usable with crates of the `proc-macro` crate type
-  --> $DIR/malformed-attrs.rs:117:1
+  --> $DIR/malformed-attrs.rs:113:1
    |
 LL | #[proc_macro_attribute = 19]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
-  --> $DIR/malformed-attrs.rs:124:1
+  --> $DIR/malformed-attrs.rs:120:1
    |
 LL | #[proc_macro_derive]
    | ^^^^^^^^^^^^^^^^^^^^
 
 error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint
-  --> $DIR/malformed-attrs.rs:217:1
+  --> $DIR/malformed-attrs.rs:213:1
    |
 LL | #[allow_internal_unsafe = 1]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -184,36 +254,39 @@ LL | #[allow_internal_unsafe = 1]
    = help: add `#![feature(allow_internal_unsafe)]` 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: valid forms for the attribute are `#[doc(hidden|inline|...)]` and `#[doc = "string"]`
-  --> $DIR/malformed-attrs.rs:44:1
+error: valid forms for the attribute are `#[doc(hidden)]`, `#[doc(inline)]`, and `#[doc = "string"]`
+  --> $DIR/malformed-attrs.rs:40:1
    |
 LL | #[doc]
    | ^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html>
    = note: `#[deny(ill_formed_attribute_input)]` on by default
 
-error: valid forms for the attribute are `#[doc(hidden|inline|...)]` and `#[doc = "string"]`
-  --> $DIR/malformed-attrs.rs:77:1
+error: valid forms for the attribute are `#[doc(hidden)]`, `#[doc(inline)]`, and `#[doc = "string"]`
+  --> $DIR/malformed-attrs.rs:73:1
    |
 LL | #[doc]
    | ^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html>
 
-error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
-  --> $DIR/malformed-attrs.rs:84:1
+error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]`
+  --> $DIR/malformed-attrs.rs:80:1
    |
 LL | #[link]
    | ^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
 
 error: invalid argument
-  --> $DIR/malformed-attrs.rs:189:1
+  --> $DIR/malformed-attrs.rs:185:1
    |
 LL | #[debugger_visualizer]
    | ^^^^^^^^^^^^^^^^^^^^^^
@@ -222,35 +295,26 @@ LL | #[debugger_visualizer]
    = note: OR
    = note: expected: `gdb_script_file = "..."`
 
-error[E0565]: malformed `omit_gdb_pretty_printer_section` attribute input
-  --> $DIR/malformed-attrs.rs:27:1
-   |
-LL | #![omit_gdb_pretty_printer_section = 1]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^
-   | |                                  |
-   | |                                  didn't expect any arguments here
-   | help: must be of the form: `#[omit_gdb_pretty_printer_section]`
-
 error[E0539]: malformed `export_name` attribute input
-  --> $DIR/malformed-attrs.rs:33:1
+  --> $DIR/malformed-attrs.rs:29:1
    |
 LL | #[unsafe(export_name)]
    | ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[export_name = "name"]`
 
 error: `rustc_allow_const_fn_unstable` expects a list of feature names
-  --> $DIR/malformed-attrs.rs:35:1
+  --> $DIR/malformed-attrs.rs:31:1
    |
 LL | #[rustc_allow_const_fn_unstable]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `allow_internal_unstable` expects a list of feature names
-  --> $DIR/malformed-attrs.rs:38:1
+  --> $DIR/malformed-attrs.rs:34:1
    |
 LL | #[allow_internal_unstable]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0539]: malformed `rustc_confusables` attribute input
-  --> $DIR/malformed-attrs.rs:40:1
+  --> $DIR/malformed-attrs.rs:36:1
    |
 LL | #[rustc_confusables]
    | ^^^^^^^^^^^^^^^^^^^^
@@ -259,7 +323,7 @@ LL | #[rustc_confusables]
    | help: must be of the form: `#[rustc_confusables("name1", "name2", ...)]`
 
 error[E0539]: malformed `deprecated` attribute input
-  --> $DIR/malformed-attrs.rs:42:1
+  --> $DIR/malformed-attrs.rs:38:1
    |
 LL | #[deprecated = 5]
    | ^^^^^^^^^^^^^^^-^
@@ -272,29 +336,52 @@ LL - #[deprecated = 5]
 LL + #[deprecated = "reason"]
    |
 LL - #[deprecated = 5]
-LL + #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
+LL + #[deprecated(note = "reason")]
    |
 LL - #[deprecated = 5]
-LL + #[deprecated]
+LL + #[deprecated(since = "version")]
    |
+LL - #[deprecated = 5]
+LL + #[deprecated(since = "version", note = "reason")]
+   |
+   = and 1 other candidate
 
 error[E0539]: malformed `rustc_macro_transparency` attribute input
-  --> $DIR/malformed-attrs.rs:47:1
+  --> $DIR/malformed-attrs.rs:43:1
    |
 LL | #[rustc_macro_transparency]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_macro_transparency = "transparent|semitransparent|opaque"]`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL | #[rustc_macro_transparency = "opaque"]
+   |                            ++++++++++
+LL | #[rustc_macro_transparency = "semitransparent"]
+   |                            +++++++++++++++++++
+LL | #[rustc_macro_transparency = "transparent"]
+   |                            +++++++++++++++
 
 error[E0539]: malformed `repr` attribute input
-  --> $DIR/malformed-attrs.rs:49:1
+  --> $DIR/malformed-attrs.rs:45:1
    |
 LL | #[repr]
-   | ^^^^^^^
-   | |
-   | expected this to be a list
-   | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
+   | ^^^^^^^ expected this to be a list
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html#representations>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL | #[repr(<integer type>)]
+   |       ++++++++++++++++
+LL | #[repr(C)]
+   |       +++
+LL | #[repr(Rust)]
+   |       ++++++
+LL | #[repr(align(...))]
+   |       ++++++++++++
+   = and 2 other candidates
 
 error[E0565]: malformed `rustc_as_ptr` attribute input
-  --> $DIR/malformed-attrs.rs:52:1
+  --> $DIR/malformed-attrs.rs:48:1
    |
 LL | #[rustc_as_ptr = 5]
    | ^^^^^^^^^^^^^^^---^
@@ -303,7 +390,7 @@ LL | #[rustc_as_ptr = 5]
    | help: must be of the form: `#[rustc_as_ptr]`
 
 error[E0539]: malformed `rustc_align` attribute input
-  --> $DIR/malformed-attrs.rs:57:1
+  --> $DIR/malformed-attrs.rs:53:1
    |
 LL | #[rustc_align]
    | ^^^^^^^^^^^^^^
@@ -312,16 +399,22 @@ LL | #[rustc_align]
    | help: must be of the form: `#[rustc_align(<alignment in bytes>)]`
 
 error[E0539]: malformed `optimize` attribute input
-  --> $DIR/malformed-attrs.rs:59:1
+  --> $DIR/malformed-attrs.rs:55:1
    |
 LL | #[optimize]
-   | ^^^^^^^^^^^
-   | |
-   | expected this to be a list
-   | help: must be of the form: `#[optimize(size|speed|none)]`
+   | ^^^^^^^^^^^ expected this to be a list
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL | #[optimize(none)]
+   |           ++++++
+LL | #[optimize(size)]
+   |           ++++++
+LL | #[optimize(speed)]
+   |           +++++++
 
 error[E0565]: malformed `cold` attribute input
-  --> $DIR/malformed-attrs.rs:61:1
+  --> $DIR/malformed-attrs.rs:57:1
    |
 LL | #[cold = 1]
    | ^^^^^^^---^
@@ -330,13 +423,13 @@ LL | #[cold = 1]
    | help: must be of the form: `#[cold]`
 
 error: valid forms for the attribute are `#[must_use = "reason"]` and `#[must_use]`
-  --> $DIR/malformed-attrs.rs:63:1
+  --> $DIR/malformed-attrs.rs:59:1
    |
 LL | #[must_use()]
    | ^^^^^^^^^^^^^
 
 error[E0565]: malformed `no_mangle` attribute input
-  --> $DIR/malformed-attrs.rs:65:1
+  --> $DIR/malformed-attrs.rs:61:1
    |
 LL | #[no_mangle = 1]
    | ^^^^^^^^^^^^---^
@@ -345,7 +438,7 @@ LL | #[no_mangle = 1]
    | help: must be of the form: `#[no_mangle]`
 
 error[E0565]: malformed `naked` attribute input
-  --> $DIR/malformed-attrs.rs:67:1
+  --> $DIR/malformed-attrs.rs:63:1
    |
 LL | #[unsafe(naked())]
    | ^^^^^^^^^^^^^^--^^
@@ -354,7 +447,7 @@ LL | #[unsafe(naked())]
    | help: must be of the form: `#[naked]`
 
 error[E0565]: malformed `track_caller` attribute input
-  --> $DIR/malformed-attrs.rs:69:1
+  --> $DIR/malformed-attrs.rs:65:1
    |
 LL | #[track_caller()]
    | ^^^^^^^^^^^^^^--^
@@ -363,13 +456,13 @@ LL | #[track_caller()]
    | help: must be of the form: `#[track_caller]`
 
 error[E0539]: malformed `export_name` attribute input
-  --> $DIR/malformed-attrs.rs:71:1
+  --> $DIR/malformed-attrs.rs:67:1
    |
 LL | #[export_name()]
    | ^^^^^^^^^^^^^^^^ help: must be of the form: `#[export_name = "name"]`
 
 error[E0805]: malformed `used` attribute input
-  --> $DIR/malformed-attrs.rs:73:1
+  --> $DIR/malformed-attrs.rs:69:1
    |
 LL | #[used()]
    | ^^^^^^--^
@@ -378,14 +471,16 @@ LL | #[used()]
    |
 help: try changing it to one of the following valid forms of the attribute
    |
-LL | #[used(compiler|linker)]
-   |        +++++++++++++++
+LL | #[used(compiler)]
+   |        ++++++++
+LL | #[used(linker)]
+   |        ++++++
 LL - #[used()]
 LL + #[used]
    |
 
 error[E0539]: malformed `target_feature` attribute input
-  --> $DIR/malformed-attrs.rs:80:1
+  --> $DIR/malformed-attrs.rs:76:1
    |
 LL | #[target_feature]
    | ^^^^^^^^^^^^^^^^^
@@ -394,7 +489,7 @@ LL | #[target_feature]
    | help: must be of the form: `#[target_feature(enable = "feat1, feat2")]`
 
 error[E0565]: malformed `export_stable` attribute input
-  --> $DIR/malformed-attrs.rs:82:1
+  --> $DIR/malformed-attrs.rs:78:1
    |
 LL | #[export_stable = 1]
    | ^^^^^^^^^^^^^^^^---^
@@ -403,19 +498,23 @@ LL | #[export_stable = 1]
    | help: must be of the form: `#[export_stable]`
 
 error[E0539]: malformed `link_name` attribute input
-  --> $DIR/malformed-attrs.rs:87:1
+  --> $DIR/malformed-attrs.rs:83:1
    |
 LL | #[link_name]
    | ^^^^^^^^^^^^ help: must be of the form: `#[link_name = "name"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_name-attribute>
 
 error[E0539]: malformed `link_section` attribute input
-  --> $DIR/malformed-attrs.rs:89:1
+  --> $DIR/malformed-attrs.rs:85:1
    |
 LL | #[link_section]
    | ^^^^^^^^^^^^^^^ help: must be of the form: `#[link_section = "name"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/abi.html#the-link_section-attribute>
 
 error[E0539]: malformed `coverage` attribute input
-  --> $DIR/malformed-attrs.rs:91:1
+  --> $DIR/malformed-attrs.rs:87:1
    |
 LL | #[coverage]
    | ^^^^^^^^^^^ this attribute is only valid with either `on` or `off` as an argument
@@ -428,7 +527,7 @@ LL | #[coverage(on)]
    |           ++++
 
 error[E0565]: malformed `no_implicit_prelude` attribute input
-  --> $DIR/malformed-attrs.rs:98:1
+  --> $DIR/malformed-attrs.rs:94:1
    |
 LL | #[no_implicit_prelude = 23]
    | ^^^^^^^^^^^^^^^^^^^^^^----^
@@ -437,7 +536,7 @@ LL | #[no_implicit_prelude = 23]
    | help: must be of the form: `#[no_implicit_prelude]`
 
 error[E0565]: malformed `proc_macro` attribute input
-  --> $DIR/malformed-attrs.rs:100:1
+  --> $DIR/malformed-attrs.rs:96:1
    |
 LL | #[proc_macro = 18]
    | ^^^^^^^^^^^^^----^
@@ -445,8 +544,17 @@ LL | #[proc_macro = 18]
    | |            didn't expect any arguments here
    | help: must be of the form: `#[proc_macro]`
 
+error[E0565]: malformed `coroutine` attribute input
+  --> $DIR/malformed-attrs.rs:108:5
+   |
+LL |     #[coroutine = 63] || {}
+   |     ^^^^^^^^^^^^----^
+   |     |           |
+   |     |           didn't expect any arguments here
+   |     help: must be of the form: `#[coroutine]`
+
 error[E0565]: malformed `proc_macro_attribute` attribute input
-  --> $DIR/malformed-attrs.rs:117:1
+  --> $DIR/malformed-attrs.rs:113:1
    |
 LL | #[proc_macro_attribute = 19]
    | ^^^^^^^^^^^^^^^^^^^^^^^----^
@@ -455,13 +563,14 @@ LL | #[proc_macro_attribute = 19]
    | help: must be of the form: `#[proc_macro_attribute]`
 
 error[E0539]: malformed `must_use` attribute input
-  --> $DIR/malformed-attrs.rs:120:1
+  --> $DIR/malformed-attrs.rs:116:1
    |
 LL | #[must_use = 1]
    | ^^^^^^^^^^^^^-^
    |              |
    |              expected a string literal here
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[must_use = 1]
@@ -472,16 +581,21 @@ LL + #[must_use]
    |
 
 error[E0539]: malformed `proc_macro_derive` attribute input
-  --> $DIR/malformed-attrs.rs:124:1
+  --> $DIR/malformed-attrs.rs:120:1
    |
 LL | #[proc_macro_derive]
-   | ^^^^^^^^^^^^^^^^^^^^
-   | |
-   | expected this to be a list
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   | ^^^^^^^^^^^^^^^^^^^^ expected this to be a list
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL | #[proc_macro_derive(TraitName)]
+   |                    +++++++++++
+LL | #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |                    ++++++++++++++++++++++++++++++++++++++++++
 
 error[E0539]: malformed `rustc_layout_scalar_valid_range_start` attribute input
-  --> $DIR/malformed-attrs.rs:129:1
+  --> $DIR/malformed-attrs.rs:125:1
    |
 LL | #[rustc_layout_scalar_valid_range_start]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -490,7 +604,7 @@ LL | #[rustc_layout_scalar_valid_range_start]
    | help: must be of the form: `#[rustc_layout_scalar_valid_range_start(start)]`
 
 error[E0539]: malformed `rustc_layout_scalar_valid_range_end` attribute input
-  --> $DIR/malformed-attrs.rs:131:1
+  --> $DIR/malformed-attrs.rs:127:1
    |
 LL | #[rustc_layout_scalar_valid_range_end]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -499,7 +613,7 @@ LL | #[rustc_layout_scalar_valid_range_end]
    | help: must be of the form: `#[rustc_layout_scalar_valid_range_end(end)]`
 
 error[E0565]: malformed `marker` attribute input
-  --> $DIR/malformed-attrs.rs:156:1
+  --> $DIR/malformed-attrs.rs:152:1
    |
 LL | #[marker = 3]
    | ^^^^^^^^^---^
@@ -508,7 +622,7 @@ LL | #[marker = 3]
    | help: must be of the form: `#[marker]`
 
 error[E0565]: malformed `fundamental` attribute input
-  --> $DIR/malformed-attrs.rs:158:1
+  --> $DIR/malformed-attrs.rs:154:1
    |
 LL | #[fundamental()]
    | ^^^^^^^^^^^^^--^
@@ -517,7 +631,7 @@ LL | #[fundamental()]
    | help: must be of the form: `#[fundamental]`
 
 error[E0565]: malformed `ffi_pure` attribute input
-  --> $DIR/malformed-attrs.rs:166:5
+  --> $DIR/malformed-attrs.rs:162:5
    |
 LL |     #[unsafe(ffi_pure = 1)]
    |     ^^^^^^^^^^^^^^^^^^---^^
@@ -526,16 +640,18 @@ LL |     #[unsafe(ffi_pure = 1)]
    |     help: must be of the form: `#[ffi_pure]`
 
 error[E0539]: malformed `link_ordinal` attribute input
-  --> $DIR/malformed-attrs.rs:168:5
+  --> $DIR/malformed-attrs.rs:164:5
    |
 LL |     #[link_ordinal]
    |     ^^^^^^^^^^^^^^^
    |     |
    |     expected this to be a list
    |     help: must be of the form: `#[link_ordinal(ordinal)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_ordinal-attribute>
 
 error[E0565]: malformed `ffi_const` attribute input
-  --> $DIR/malformed-attrs.rs:172:5
+  --> $DIR/malformed-attrs.rs:168:5
    |
 LL |     #[unsafe(ffi_const = 1)]
    |     ^^^^^^^^^^^^^^^^^^^---^^
@@ -544,7 +660,7 @@ LL |     #[unsafe(ffi_const = 1)]
    |     help: must be of the form: `#[ffi_const]`
 
 error[E0565]: malformed `automatically_derived` attribute input
-  --> $DIR/malformed-attrs.rs:192:1
+  --> $DIR/malformed-attrs.rs:188:1
    |
 LL | #[automatically_derived = 18]
    | ^^^^^^^^^^^^^^^^^^^^^^^^----^
@@ -553,7 +669,7 @@ LL | #[automatically_derived = 18]
    | help: must be of the form: `#[automatically_derived]`
 
 error[E0565]: malformed `non_exhaustive` attribute input
-  --> $DIR/malformed-attrs.rs:198:1
+  --> $DIR/malformed-attrs.rs:194:1
    |
 LL | #[non_exhaustive = 1]
    | ^^^^^^^^^^^^^^^^^---^
@@ -562,13 +678,22 @@ LL | #[non_exhaustive = 1]
    | help: must be of the form: `#[non_exhaustive]`
 
 error: valid forms for the attribute are `#[macro_use(name1, name2, ...)]` and `#[macro_use]`
-  --> $DIR/malformed-attrs.rs:210:1
+  --> $DIR/malformed-attrs.rs:206:1
    |
 LL | #[macro_use = 1]
    | ^^^^^^^^^^^^^^^^
 
+error[E0565]: malformed `allow_internal_unsafe` attribute input
+  --> $DIR/malformed-attrs.rs:213:1
+   |
+LL | #[allow_internal_unsafe = 1]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^---^
+   | |                       |
+   | |                       didn't expect any arguments here
+   | help: must be of the form: `#[allow_internal_unsafe]`
+
 error[E0565]: malformed `type_const` attribute input
-  --> $DIR/malformed-attrs.rs:144:5
+  --> $DIR/malformed-attrs.rs:140:5
    |
 LL |     #[type_const = 1]
    |     ^^^^^^^^^^^^^---^
@@ -577,7 +702,7 @@ LL |     #[type_const = 1]
    |     help: must be of the form: `#[type_const]`
 
 error: attribute should be applied to `const fn`
-  --> $DIR/malformed-attrs.rs:35:1
+  --> $DIR/malformed-attrs.rs:31:1
    |
 LL |   #[rustc_allow_const_fn_unstable]
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -589,19 +714,19 @@ LL | | }
    | |_- not a `const fn`
 
 error: `#[repr(align(...))]` is not supported on function items
-  --> $DIR/malformed-attrs.rs:49:1
+  --> $DIR/malformed-attrs.rs:45:1
    |
 LL | #[repr]
    | ^^^^^^^
    |
 help: use `#[rustc_align(...)]` instead
-  --> $DIR/malformed-attrs.rs:49:1
+  --> $DIR/malformed-attrs.rs:45:1
    |
 LL | #[repr]
    | ^^^^^^^
 
 warning: `#[diagnostic::do_not_recommend]` does not expect any arguments
-  --> $DIR/malformed-attrs.rs:150:1
+  --> $DIR/malformed-attrs.rs:146:1
    |
 LL | #[diagnostic::do_not_recommend()]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -609,7 +734,7 @@ LL | #[diagnostic::do_not_recommend()]
    = note: `#[warn(malformed_diagnostic_attributes)]` on by default
 
 warning: missing options for `on_unimplemented` attribute
-  --> $DIR/malformed-attrs.rs:139:1
+  --> $DIR/malformed-attrs.rs:135:1
    |
 LL | #[diagnostic::on_unimplemented]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -617,15 +742,15 @@ LL | #[diagnostic::on_unimplemented]
    = help: at least one of the `message`, `note` and `label` options are expected
 
 warning: malformed `on_unimplemented` attribute
-  --> $DIR/malformed-attrs.rs:141:1
+  --> $DIR/malformed-attrs.rs:137:1
    |
 LL | #[diagnostic::on_unimplemented = 1]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
    |
    = help: only `message`, `note` and `label` are allowed as options
 
-error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
-  --> $DIR/malformed-attrs.rs:54:1
+error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
+  --> $DIR/malformed-attrs.rs:50:1
    |
 LL | #[inline = 5]
    | ^^^^^^^^^^^^^
@@ -634,7 +759,7 @@ LL | #[inline = 5]
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
 
 error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
-  --> $DIR/malformed-attrs.rs:95:1
+  --> $DIR/malformed-attrs.rs:91:1
    |
 LL | #[ignore()]
    | ^^^^^^^^^^^
@@ -643,7 +768,7 @@ LL | #[ignore()]
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
 
 error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
-  --> $DIR/malformed-attrs.rs:224:1
+  --> $DIR/malformed-attrs.rs:220:1
    |
 LL | #[ignore = 1]
    | ^^^^^^^^^^^^^
@@ -652,7 +777,7 @@ LL | #[ignore = 1]
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
 
 error[E0308]: mismatched types
-  --> $DIR/malformed-attrs.rs:112:23
+  --> $DIR/malformed-attrs.rs:108:23
    |
 LL | fn test() {
    |          - help: a return type might be missing here: `-> _`
@@ -660,9 +785,78 @@ LL |     #[coroutine = 63] || {}
    |                       ^^^^^ expected `()`, found coroutine
    |
    = note: expected unit type `()`
-              found coroutine `{coroutine@$DIR/malformed-attrs.rs:112:23: 112:25}`
+              found coroutine `{coroutine@$DIR/malformed-attrs.rs:108:23: 108:25}`
 
-error: aborting due to 75 previous errors; 3 warnings emitted
+error: aborting due to 74 previous errors; 3 warnings emitted
 
 Some errors have detailed explanations: E0308, E0463, E0539, E0565, E0658, E0805.
 For more information about an error, try `rustc --explain E0308`.
+Future incompatibility report: Future breakage diagnostic:
+error: valid forms for the attribute are `#[doc(hidden)]`, `#[doc(inline)]`, and `#[doc = "string"]`
+  --> $DIR/malformed-attrs.rs:40:1
+   |
+LL | #[doc]
+   | ^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
+Future breakage diagnostic:
+error: valid forms for the attribute are `#[doc(hidden)]`, `#[doc(inline)]`, and `#[doc = "string"]`
+  --> $DIR/malformed-attrs.rs:73:1
+   |
+LL | #[doc]
+   | ^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
+Future breakage diagnostic:
+error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]`
+  --> $DIR/malformed-attrs.rs:80:1
+   |
+LL | #[link]
+   | ^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
+Future breakage diagnostic:
+error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
+  --> $DIR/malformed-attrs.rs:50:1
+   |
+LL | #[inline = 5]
+   | ^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
+Future breakage diagnostic:
+error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
+  --> $DIR/malformed-attrs.rs:91:1
+   |
+LL | #[ignore()]
+   | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
+Future breakage diagnostic:
+error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
+  --> $DIR/malformed-attrs.rs:220:1
+   |
+LL | #[ignore = 1]
+   | ^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
diff --git a/tests/ui/attributes/malformed-reprs.stderr b/tests/ui/attributes/malformed-reprs.stderr
index c39c98dde31..43085b9c341 100644
--- a/tests/ui/attributes/malformed-reprs.stderr
+++ b/tests/ui/attributes/malformed-reprs.stderr
@@ -2,10 +2,24 @@ error[E0539]: malformed `repr` attribute input
   --> $DIR/malformed-reprs.rs:4:1
    |
 LL | #![repr]
-   | ^^^^^^^^
-   | |
-   | expected this to be a list
-   | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
+   | ^^^^^^^^ expected this to be a list
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html#representations>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #![repr]
+LL + #[repr(<integer type>)]
+   |
+LL - #![repr]
+LL + #[repr(C)]
+   |
+LL - #![repr]
+LL + #[repr(Rust)]
+   |
+LL - #![repr]
+LL + #[repr(align(...))]
+   |
+   = and 2 other candidates
 
 error[E0589]: invalid `repr(align)` attribute: not a power of two
   --> $DIR/malformed-reprs.rs:9:14
diff --git a/tests/ui/attributes/rustc_confusables_std_cases.stderr b/tests/ui/attributes/rustc_confusables_std_cases.stderr
index f2d9ebe2c0e..771c0c6dfe9 100644
--- a/tests/ui/attributes/rustc_confusables_std_cases.stderr
+++ b/tests/ui/attributes/rustc_confusables_std_cases.stderr
@@ -1,4 +1,4 @@
-error[E0599]: no method named `push` found for struct `BTreeSet` in the current scope
+error[E0599]: no method named `push` found for struct `BTreeSet<T, A>` in the current scope
   --> $DIR/rustc_confusables_std_cases.rs:6:7
    |
 LL |     x.push(1);
@@ -22,7 +22,7 @@ LL -     x.push_back(1);
 LL +     x.push(1);
    |
 
-error[E0599]: no method named `push` found for struct `VecDeque` in the current scope
+error[E0599]: no method named `push` found for struct `VecDeque<T, A>` in the current scope
   --> $DIR/rustc_confusables_std_cases.rs:12:7
    |
 LL |     x.push(1);
@@ -35,7 +35,7 @@ LL |     let mut x = Vec::new();
    |         ^^^^^ `x` of type `Vec<_>` that has method `push` defined earlier here
 ...
 LL |     let mut x = VecDeque::new();
-   |         ----- earlier `x` shadowed here with type `VecDeque`
+   |         ----- earlier `x` shadowed here with type `VecDeque<_>`
 help: you might have meant to use `push_back`
    |
 LL |     x.push_back(1);
diff --git a/tests/ui/attributes/unsafe/proc-unsafe-attributes.stderr b/tests/ui/attributes/unsafe/proc-unsafe-attributes.stderr
index 884e7663c85..107e053ae0c 100644
--- a/tests/ui/attributes/unsafe/proc-unsafe-attributes.stderr
+++ b/tests/ui/attributes/unsafe/proc-unsafe-attributes.stderr
@@ -119,9 +119,18 @@ error[E0565]: malformed `proc_macro_derive` attribute input
    |
 LL | #[proc_macro_derive(unsafe(Foo))]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^-----^^
-   | |                         |
-   | |                         didn't expect any arguments here
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                           |
+   |                           didn't expect any arguments here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(unsafe(Foo))]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(unsafe(Foo))]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0452]: malformed lint attribute input
   --> $DIR/proc-unsafe-attributes.rs:27:16
diff --git a/tests/ui/attributes/used_with_multi_args.stderr b/tests/ui/attributes/used_with_multi_args.stderr
index e48209cf204..308f0519b8c 100644
--- a/tests/ui/attributes/used_with_multi_args.stderr
+++ b/tests/ui/attributes/used_with_multi_args.stderr
@@ -9,7 +9,10 @@ LL | #[used(compiler, linker)]
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[used(compiler, linker)]
-LL + #[used(compiler|linker)]
+LL + #[used(compiler)]
+   |
+LL - #[used(compiler, linker)]
+LL + #[used(linker)]
    |
 LL - #[used(compiler, linker)]
 LL + #[used]
diff --git a/tests/ui/auto-traits/assoc-ty.current.stderr b/tests/ui/auto-traits/assoc-ty.current.stderr
index 77a1c8fb654..d793ae66526 100644
--- a/tests/ui/auto-traits/assoc-ty.current.stderr
+++ b/tests/ui/auto-traits/assoc-ty.current.stderr
@@ -5,7 +5,7 @@ LL | auto trait Trait {
    |            ----- auto traits cannot have associated items
 LL |
 LL |     type Output;
-   |     -----^^^^^^- help: remove these associated items
+   |          ^^^^^^
 
 error[E0658]: auto traits are experimental and possibly buggy
   --> $DIR/assoc-ty.rs:8:1
diff --git a/tests/ui/auto-traits/assoc-ty.next.stderr b/tests/ui/auto-traits/assoc-ty.next.stderr
index 4ce00d17475..a41f7d99278 100644
--- a/tests/ui/auto-traits/assoc-ty.next.stderr
+++ b/tests/ui/auto-traits/assoc-ty.next.stderr
@@ -5,7 +5,7 @@ LL | auto trait Trait {
    |            ----- auto traits cannot have associated items
 LL |
 LL |     type Output;
-   |     -----^^^^^^- help: remove these associated items
+   |          ^^^^^^
 
 error[E0658]: auto traits are experimental and possibly buggy
   --> $DIR/assoc-ty.rs:8:1
diff --git a/tests/ui/auto-traits/auto-trait-validation.fixed b/tests/ui/auto-traits/auto-trait-validation.fixed
index 8a445448c85..b24dc1cb2c3 100644
--- a/tests/ui/auto-traits/auto-trait-validation.fixed
+++ b/tests/ui/auto-traits/auto-trait-validation.fixed
@@ -11,4 +11,15 @@ auto trait LifetimeBound {}
 //~^ ERROR auto traits cannot have super traits or lifetime bounds [E0568]
 auto trait MyTrait {  }
 //~^ ERROR auto traits cannot have associated items [E0380]
+auto trait AssocTy {  }
+//~^ ERROR auto traits cannot have associated items [E0380]
+auto trait All {
+    //~^ ERROR auto traits cannot have generic parameters [E0567]
+    
+}
+// We can't test both generic params and super-traits because the suggestion span overlaps.
+auto trait All2 {
+    //~^ ERROR auto traits cannot have super traits or lifetime bounds [E0568]
+    
+}
 fn main() {}
diff --git a/tests/ui/auto-traits/auto-trait-validation.rs b/tests/ui/auto-traits/auto-trait-validation.rs
index b5e7505d86a..9665e5bc393 100644
--- a/tests/ui/auto-traits/auto-trait-validation.rs
+++ b/tests/ui/auto-traits/auto-trait-validation.rs
@@ -11,4 +11,19 @@ auto trait LifetimeBound : 'static {}
 //~^ ERROR auto traits cannot have super traits or lifetime bounds [E0568]
 auto trait MyTrait { fn foo() {} }
 //~^ ERROR auto traits cannot have associated items [E0380]
+auto trait AssocTy { type Bar; }
+//~^ ERROR auto traits cannot have associated items [E0380]
+auto trait All<'a, T> {
+    //~^ ERROR auto traits cannot have generic parameters [E0567]
+    type Bar;
+    //~^ ERROR auto traits cannot have associated items [E0380]
+    fn foo() {}
+}
+// We can't test both generic params and super-traits because the suggestion span overlaps.
+auto trait All2: Copy + 'static {
+    //~^ ERROR auto traits cannot have super traits or lifetime bounds [E0568]
+    type Bar;
+    //~^ ERROR auto traits cannot have associated items [E0380]
+    fn foo() {}
+}
 fn main() {}
diff --git a/tests/ui/auto-traits/auto-trait-validation.stderr b/tests/ui/auto-traits/auto-trait-validation.stderr
index a6e5ac54869..60757db6d1e 100644
--- a/tests/ui/auto-traits/auto-trait-validation.stderr
+++ b/tests/ui/auto-traits/auto-trait-validation.stderr
@@ -2,23 +2,23 @@ error[E0567]: auto traits cannot have generic parameters
   --> $DIR/auto-trait-validation.rs:6:19
    |
 LL | auto trait Generic<T> {}
-   |            -------^^^ help: remove the parameters
+   |            -------^^^
    |            |
    |            auto trait cannot have generic parameters
 
 error[E0568]: auto traits cannot have super traits or lifetime bounds
-  --> $DIR/auto-trait-validation.rs:8:17
+  --> $DIR/auto-trait-validation.rs:8:20
    |
 LL | auto trait Bound : Copy {}
-   |            -----^^^^^^^ help: remove the super traits or lifetime bounds
+   |            -----   ^^^^
    |            |
    |            auto traits cannot have super traits or lifetime bounds
 
 error[E0568]: auto traits cannot have super traits or lifetime bounds
-  --> $DIR/auto-trait-validation.rs:10:25
+  --> $DIR/auto-trait-validation.rs:10:28
    |
 LL | auto trait LifetimeBound : 'static {}
-   |            -------------^^^^^^^^^^ help: remove the super traits or lifetime bounds
+   |            -------------   ^^^^^^^
    |            |
    |            auto traits cannot have super traits or lifetime bounds
 
@@ -26,12 +26,59 @@ error[E0380]: auto traits cannot have associated items
   --> $DIR/auto-trait-validation.rs:12:25
    |
 LL | auto trait MyTrait { fn foo() {} }
-   |            -------   ---^^^-----
-   |            |         |
-   |            |         help: remove these associated items
+   |            -------      ^^^
+   |            |
+   |            auto traits cannot have associated items
+
+error[E0380]: auto traits cannot have associated items
+  --> $DIR/auto-trait-validation.rs:14:27
+   |
+LL | auto trait AssocTy { type Bar; }
+   |            -------        ^^^
+   |            |
    |            auto traits cannot have associated items
 
-error: aborting due to 4 previous errors
+error[E0567]: auto traits cannot have generic parameters
+  --> $DIR/auto-trait-validation.rs:16:15
+   |
+LL | auto trait All<'a, T> {
+   |            ---^^^^^^^
+   |            |
+   |            auto trait cannot have generic parameters
+
+error[E0380]: auto traits cannot have associated items
+  --> $DIR/auto-trait-validation.rs:18:10
+   |
+LL | auto trait All<'a, T> {
+   |            --- auto traits cannot have associated items
+LL |
+LL |     type Bar;
+   |          ^^^
+LL |
+LL |     fn foo() {}
+   |        ^^^
+
+error[E0568]: auto traits cannot have super traits or lifetime bounds
+  --> $DIR/auto-trait-validation.rs:23:18
+   |
+LL | auto trait All2: Copy + 'static {
+   |            ----  ^^^^   ^^^^^^^
+   |            |
+   |            auto traits cannot have super traits or lifetime bounds
+
+error[E0380]: auto traits cannot have associated items
+  --> $DIR/auto-trait-validation.rs:25:10
+   |
+LL | auto trait All2: Copy + 'static {
+   |            ---- auto traits cannot have associated items
+LL |
+LL |     type Bar;
+   |          ^^^
+LL |
+LL |     fn foo() {}
+   |        ^^^
+
+error: aborting due to 9 previous errors
 
 Some errors have detailed explanations: E0380, E0567, E0568.
 For more information about an error, try `rustc --explain E0380`.
diff --git a/tests/ui/auto-traits/bad-generics-on-dyn.stderr b/tests/ui/auto-traits/bad-generics-on-dyn.stderr
index 06c7cbcd76d..a6977c2037e 100644
--- a/tests/ui/auto-traits/bad-generics-on-dyn.stderr
+++ b/tests/ui/auto-traits/bad-generics-on-dyn.stderr
@@ -2,7 +2,7 @@ error[E0567]: auto traits cannot have generic parameters
   --> $DIR/bad-generics-on-dyn.rs:3:18
    |
 LL | auto trait Trait1<'a> {}
-   |            ------^^^^ help: remove the parameters
+   |            ------^^^^
    |            |
    |            auto trait cannot have generic parameters
 
diff --git a/tests/ui/auto-traits/has-arguments.stderr b/tests/ui/auto-traits/has-arguments.stderr
index b8a680e6a5c..5228b6d2d1a 100644
--- a/tests/ui/auto-traits/has-arguments.stderr
+++ b/tests/ui/auto-traits/has-arguments.stderr
@@ -2,7 +2,7 @@ error[E0567]: auto traits cannot have generic parameters
   --> $DIR/has-arguments.rs:3:18
    |
 LL | auto trait Trait1<'outer> {}
-   |            ------^^^^^^^^ help: remove the parameters
+   |            ------^^^^^^^^
    |            |
    |            auto trait cannot have generic parameters
 
diff --git a/tests/ui/auto-traits/issue-117789.stderr b/tests/ui/auto-traits/issue-117789.stderr
index 99efb213417..1e047c7d2e0 100644
--- a/tests/ui/auto-traits/issue-117789.stderr
+++ b/tests/ui/auto-traits/issue-117789.stderr
@@ -2,7 +2,7 @@ error[E0567]: auto traits cannot have generic parameters
   --> $DIR/issue-117789.rs:1:17
    |
 LL | auto trait Trait<P> {}
-   |            -----^^^ help: remove the parameters
+   |            -----^^^
    |            |
    |            auto trait cannot have generic parameters
 
diff --git a/tests/ui/auto-traits/issue-23080-2.current.stderr b/tests/ui/auto-traits/issue-23080-2.current.stderr
index 62c7b37041f..3af97f57d48 100644
--- a/tests/ui/auto-traits/issue-23080-2.current.stderr
+++ b/tests/ui/auto-traits/issue-23080-2.current.stderr
@@ -4,7 +4,7 @@ error[E0380]: auto traits cannot have associated items
 LL | unsafe auto trait Trait {
    |                   ----- auto traits cannot have associated items
 LL |     type Output;
-   |     -----^^^^^^- help: remove these associated items
+   |          ^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/auto-traits/issue-23080-2.next.stderr b/tests/ui/auto-traits/issue-23080-2.next.stderr
index 62c7b37041f..3af97f57d48 100644
--- a/tests/ui/auto-traits/issue-23080-2.next.stderr
+++ b/tests/ui/auto-traits/issue-23080-2.next.stderr
@@ -4,7 +4,7 @@ error[E0380]: auto traits cannot have associated items
 LL | unsafe auto trait Trait {
    |                   ----- auto traits cannot have associated items
 LL |     type Output;
-   |     -----^^^^^^- help: remove these associated items
+   |          ^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/auto-traits/issue-23080.stderr b/tests/ui/auto-traits/issue-23080.stderr
index 5cea45060c8..02a75519102 100644
--- a/tests/ui/auto-traits/issue-23080.stderr
+++ b/tests/ui/auto-traits/issue-23080.stderr
@@ -1,13 +1,10 @@
 error[E0380]: auto traits cannot have associated items
   --> $DIR/issue-23080.rs:5:8
    |
-LL |   unsafe auto trait Trait {
-   |                     ----- auto traits cannot have associated items
-LL |       fn method(&self) {
-   |  _____-  ^^^^^^
-LL | |         println!("Hello");
-LL | |     }
-   | |_____- help: remove these associated items
+LL | unsafe auto trait Trait {
+   |                   ----- auto traits cannot have associated items
+LL |     fn method(&self) {
+   |        ^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/auto-traits/issue-84075.stderr b/tests/ui/auto-traits/issue-84075.stderr
index 943d521ce9e..4edf2ecdf06 100644
--- a/tests/ui/auto-traits/issue-84075.stderr
+++ b/tests/ui/auto-traits/issue-84075.stderr
@@ -2,7 +2,7 @@ error[E0568]: auto traits cannot have super traits or lifetime bounds
   --> $DIR/issue-84075.rs:5:18
    |
 LL | auto trait Magic where Self: Copy {}
-   |            ----- ^^^^^^^^^^^^^^^^ help: remove the super traits or lifetime bounds
+   |            ----- ^^^^^^^^^^^^^^^^
    |            |
    |            auto traits cannot have super traits or lifetime bounds
 
diff --git a/tests/ui/auto-traits/typeck-auto-trait-no-supertraits-2.stderr b/tests/ui/auto-traits/typeck-auto-trait-no-supertraits-2.stderr
index 27e38ce06a4..bc17fefc944 100644
--- a/tests/ui/auto-traits/typeck-auto-trait-no-supertraits-2.stderr
+++ b/tests/ui/auto-traits/typeck-auto-trait-no-supertraits-2.stderr
@@ -1,8 +1,8 @@
 error[E0568]: auto traits cannot have super traits or lifetime bounds
-  --> $DIR/typeck-auto-trait-no-supertraits-2.rs:4:17
+  --> $DIR/typeck-auto-trait-no-supertraits-2.rs:4:20
    |
 LL | auto trait Magic : Sized where Option<Self> : Magic {}
-   |            -----^^^^^^^^ help: remove the super traits or lifetime bounds
+   |            -----   ^^^^^
    |            |
    |            auto traits cannot have super traits or lifetime bounds
 
@@ -10,7 +10,7 @@ error[E0568]: auto traits cannot have super traits or lifetime bounds
   --> $DIR/typeck-auto-trait-no-supertraits-2.rs:4:26
    |
 LL | auto trait Magic : Sized where Option<Self> : Magic {}
-   |            -----         ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the super traits or lifetime bounds
+   |            -----         ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |            |
    |            auto traits cannot have super traits or lifetime bounds
 
diff --git a/tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr b/tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr
index 23aae13639c..bc9791a5799 100644
--- a/tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr
+++ b/tests/ui/auto-traits/typeck-auto-trait-no-supertraits.stderr
@@ -1,8 +1,8 @@
 error[E0568]: auto traits cannot have super traits or lifetime bounds
-  --> $DIR/typeck-auto-trait-no-supertraits.rs:28:17
+  --> $DIR/typeck-auto-trait-no-supertraits.rs:28:19
    |
 LL | auto trait Magic: Copy {}
-   |            -----^^^^^^ help: remove the super traits or lifetime bounds
+   |            -----  ^^^^
    |            |
    |            auto traits cannot have super traits or lifetime bounds
 
diff --git a/tests/ui/issues/issue-91489.rs b/tests/ui/autoref-autoderef/auto-deref-on-cow-regression-91489.rs
index 0566302c481..929e98ad719 100644
--- a/tests/ui/issues/issue-91489.rs
+++ b/tests/ui/autoref-autoderef/auto-deref-on-cow-regression-91489.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/91489
 //@ check-pass
 
 // regression test for #91489
diff --git a/tests/ui/issues/issue-36786-resolve-call.rs b/tests/ui/autoref-autoderef/autoderef-vec-box-fn-36786.rs
index de7b0e18d52..e16929bf48a 100644
--- a/tests/ui/issues/issue-36786-resolve-call.rs
+++ b/tests/ui/autoref-autoderef/autoderef-vec-box-fn-36786.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/36786
 //@ run-pass
 // Ensure that types that rely on obligations are autoderefed
 // correctly
diff --git a/tests/ui/issues/issue-13264.rs b/tests/ui/autoref-autoderef/deref-chain-method-calls-13264.rs
index bf4ec388c4f..f471c1c7eef 100644
--- a/tests/ui/issues/issue-13264.rs
+++ b/tests/ui/autoref-autoderef/deref-chain-method-calls-13264.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13264
+
 //@ run-pass
 #![allow(non_camel_case_types)]
 #![allow(non_snake_case)]
diff --git a/tests/ui/backtrace/synchronized-panic-handler.run.stderr b/tests/ui/backtrace/synchronized-panic-handler.run.stderr
index 7a60ef2da60..c604d49c193 100644
--- a/tests/ui/backtrace/synchronized-panic-handler.run.stderr
+++ b/tests/ui/backtrace/synchronized-panic-handler.run.stderr
@@ -1,7 +1,7 @@
 
-thread '<unnamed>' panicked at $DIR/synchronized-panic-handler.rs:11:5:
+thread '<unnamed>' ($TID) panicked at $DIR/synchronized-panic-handler.rs:11:5:
 oops oh no woe is me
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
-thread '<unnamed>' panicked at $DIR/synchronized-panic-handler.rs:11:5:
+thread '<unnamed>' ($TID) panicked at $DIR/synchronized-panic-handler.rs:11:5:
 oops oh no woe is me
diff --git a/tests/ui/issues/issue-9725.rs b/tests/ui/binding/struct-destructuring-repeated-bindings-9725.rs
index 360effbd119..6b0b8e37b8c 100644
--- a/tests/ui/issues/issue-9725.rs
+++ b/tests/ui/binding/struct-destructuring-repeated-bindings-9725.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9725
 struct A { foo: isize }
 
 fn main() {
diff --git a/tests/ui/issues/issue-9725.stderr b/tests/ui/binding/struct-destructuring-repeated-bindings-9725.stderr
index 687e0cc0f3e..f4d19bed419 100644
--- a/tests/ui/issues/issue-9725.stderr
+++ b/tests/ui/binding/struct-destructuring-repeated-bindings-9725.stderr
@@ -1,11 +1,11 @@
 error[E0416]: identifier `foo` is bound more than once in the same pattern
-  --> $DIR/issue-9725.rs:4:18
+  --> $DIR/struct-destructuring-repeated-bindings-9725.rs:5:18
    |
 LL |     let A { foo, foo } = A { foo: 3 };
    |                  ^^^ used in a pattern more than once
 
 error[E0025]: field `foo` bound multiple times in the pattern
-  --> $DIR/issue-9725.rs:4:18
+  --> $DIR/struct-destructuring-repeated-bindings-9725.rs:5:18
    |
 LL |     let A { foo, foo } = A { foo: 3 };
    |             ---  ^^^ multiple uses of `foo` in pattern
diff --git a/tests/ui/issues/issue-11709.rs b/tests/ui/block-result/blocks-without-results-11709.rs
index 8a11074eca8..97ea6f9e19e 100644
--- a/tests/ui/issues/issue-11709.rs
+++ b/tests/ui/block-result/blocks-without-results-11709.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/11709
+
 //@ run-pass
 #![allow(dead_code)]
 
diff --git a/tests/ui/issues/issue-15783.rs b/tests/ui/borrowck/array-slice-coercion-mismatch-15783.rs
index ef948a1a88c..3322ed71c60 100644
--- a/tests/ui/issues/issue-15783.rs
+++ b/tests/ui/borrowck/array-slice-coercion-mismatch-15783.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15783
+
 //@ dont-require-annotations: NOTE
 
 pub fn foo(params: Option<&[&str]>) -> usize {
diff --git a/tests/ui/issues/issue-15783.stderr b/tests/ui/borrowck/array-slice-coercion-mismatch-15783.stderr
index c9c9a723a86..050eb4baa41 100644
--- a/tests/ui/issues/issue-15783.stderr
+++ b/tests/ui/borrowck/array-slice-coercion-mismatch-15783.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-15783.rs:10:19
+  --> $DIR/array-slice-coercion-mismatch-15783.rs:12:19
    |
 LL |     let msg = foo(x);
    |               --- ^ expected `Option<&[&str]>`, found `Option<&[&str; 1]>`
@@ -9,7 +9,7 @@ LL |     let msg = foo(x);
    = note: expected enum `Option<&[&str]>`
               found enum `Option<&[&str; 1]>`
 note: function defined here
-  --> $DIR/issue-15783.rs:3:8
+  --> $DIR/array-slice-coercion-mismatch-15783.rs:5:8
    |
 LL | pub fn foo(params: Option<&[&str]>) -> usize {
    |        ^^^ -----------------------
diff --git a/tests/ui/issues/issue-46471-1.rs b/tests/ui/borrowck/borrow-checker-lifetime-error-46471.rs
index aa161d40f70..020b02aa34d 100644
--- a/tests/ui/issues/issue-46471-1.rs
+++ b/tests/ui/borrowck/borrow-checker-lifetime-error-46471.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/46471
 fn main() {
     let y = {
         let mut z = 0;
diff --git a/tests/ui/issues/issue-46471-1.stderr b/tests/ui/borrowck/borrow-checker-lifetime-error-46471.stderr
index d4517223982..c90da551620 100644
--- a/tests/ui/issues/issue-46471-1.stderr
+++ b/tests/ui/borrowck/borrow-checker-lifetime-error-46471.stderr
@@ -1,5 +1,5 @@
 error[E0597]: `z` does not live long enough
-  --> $DIR/issue-46471-1.rs:4:9
+  --> $DIR/borrow-checker-lifetime-error-46471.rs:5:9
    |
 LL |         let mut z = 0;
    |             ----- binding `z` declared here
diff --git a/tests/ui/borrowck/borrowck-in-static.stderr b/tests/ui/borrowck/borrowck-in-static.stderr
index 9bcf64dd62e..d85f6f5fdd5 100644
--- a/tests/ui/borrowck/borrowck-in-static.stderr
+++ b/tests/ui/borrowck/borrowck-in-static.stderr
@@ -10,6 +10,7 @@ LL |     Box::new(|| x)
    |              |
    |              captured by this `Fn` closure
    |
+   = help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
 help: consider cloning the value if the performance cost is acceptable
    |
 LL |     Box::new(|| x.clone())
diff --git a/tests/ui/borrowck/borrowck-move-by-capture.stderr b/tests/ui/borrowck/borrowck-move-by-capture.stderr
index 732af1593d6..e9e05440766 100644
--- a/tests/ui/borrowck/borrowck-move-by-capture.stderr
+++ b/tests/ui/borrowck/borrowck-move-by-capture.stderr
@@ -12,6 +12,11 @@ LL |         let _h = to_fn_once(move || -> isize { *bar });
    |                             |
    |                             `bar` is moved here
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/borrowck-move-by-capture.rs:3:37
+   |
+LL | fn to_fn_mut<A:std::marker::Tuple,F:FnMut<A>>(f: F) -> F { f }
+   |                                     ^^^^^^^^
 help: consider cloning the value before moving it into the closure
    |
 LL ~         let value = bar.clone();
diff --git a/tests/ui/borrowck/issue-103624.stderr b/tests/ui/borrowck/issue-103624.stderr
index af65deb16dc..ef022808886 100644
--- a/tests/ui/borrowck/issue-103624.stderr
+++ b/tests/ui/borrowck/issue-103624.stderr
@@ -13,6 +13,11 @@ LL |
 LL |             self.b;
    |             ^^^^^^ `self.b` is moved here
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/issue-103624.rs:7:36
+   |
+LL | async fn spawn_blocking<T>(f: impl (Fn() -> T) + Send + Sync + 'static) -> T {
+   |                                    ^^^^^^^^^^^
 note: if `StructB` implemented `Clone`, you could clone the value
   --> $DIR/issue-103624.rs:23:1
    |
diff --git a/tests/ui/borrowck/issue-87456-point-to-closure.stderr b/tests/ui/borrowck/issue-87456-point-to-closure.stderr
index a0c7cac2add..043e336cd86 100644
--- a/tests/ui/borrowck/issue-87456-point-to-closure.stderr
+++ b/tests/ui/borrowck/issue-87456-point-to-closure.stderr
@@ -10,6 +10,11 @@ LL |
 LL |         let _foo: String = val;
    |                            ^^^ move occurs because `val` has type `String`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/issue-87456-point-to-closure.rs:3:24
+   |
+LL | fn take_mut(_val: impl FnMut()) {}
+   |                        ^^^^^^^
 help: consider borrowing here
    |
 LL |         let _foo: String = &val;
diff --git a/tests/ui/issues/issue-7061.rs b/tests/ui/borrowck/mismatched-pointer-type-in-self-7061.rs
index c5d5a9d9498..521a5ee9c37 100644
--- a/tests/ui/issues/issue-7061.rs
+++ b/tests/ui/borrowck/mismatched-pointer-type-in-self-7061.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/7061
 //@ dont-require-annotations: NOTE
 
 struct BarStruct;
diff --git a/tests/ui/issues/issue-7061.stderr b/tests/ui/borrowck/mismatched-pointer-type-in-self-7061.stderr
index b4c0ebfbdd5..39b9072dc30 100644
--- a/tests/ui/issues/issue-7061.stderr
+++ b/tests/ui/borrowck/mismatched-pointer-type-in-self-7061.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-7061.rs:6:46
+  --> $DIR/mismatched-pointer-type-in-self-7061.rs:7:46
    |
 LL |     fn foo(&'a mut self) -> Box<BarStruct> { self }
    |                             --------------   ^^^^ expected `Box<BarStruct>`, found `&mut BarStruct`
diff --git a/tests/ui/issues/issue-12041.rs b/tests/ui/borrowck/moved-value-in-thread-loop-12041.rs
index 091e8fe8b2a..98f9cdbdef7 100644
--- a/tests/ui/issues/issue-12041.rs
+++ b/tests/ui/borrowck/moved-value-in-thread-loop-12041.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/12041
+
 use std::sync::mpsc::channel;
 use std::thread;
 
diff --git a/tests/ui/issues/issue-12041.stderr b/tests/ui/borrowck/moved-value-in-thread-loop-12041.stderr
index f2c10b83383..627dd193dad 100644
--- a/tests/ui/issues/issue-12041.stderr
+++ b/tests/ui/borrowck/moved-value-in-thread-loop-12041.stderr
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `tx`
-  --> $DIR/issue-12041.rs:8:22
+  --> $DIR/moved-value-in-thread-loop-12041.rs:10:22
    |
 LL |             let tx = tx;
    |                      ^^ value moved here, in previous iteration of loop
diff --git a/tests/ui/issues/issue-12033.rs b/tests/ui/borrowck/refcell-borrow-comparison-12033.rs
index 0bf6490bafe..de22cedd5b9 100644
--- a/tests/ui/issues/issue-12033.rs
+++ b/tests/ui/borrowck/refcell-borrow-comparison-12033.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/12033
+
 //@ run-pass
 use std::cell::RefCell;
 
diff --git a/tests/ui/issues/issue-13665.rs b/tests/ui/borrowck/region-checker-map-closure-13665.rs
index e1d8be16f45..72efa42fe38 100644
--- a/tests/ui/issues/issue-13665.rs
+++ b/tests/ui/borrowck/region-checker-map-closure-13665.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/13665
 //@ run-pass
 
 fn foo<'r>() {
diff --git a/tests/ui/issues/issue-11869.rs b/tests/ui/borrowck/string-borrowing-pattern-matching-11869.rs
index dd752227bbe..fe3d1bf6e8a 100644
--- a/tests/ui/issues/issue-11869.rs
+++ b/tests/ui/borrowck/string-borrowing-pattern-matching-11869.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/11869
 //@ check-pass
 #![allow(dead_code)]
 
diff --git a/tests/ui/borrowck/string-literal-match-patterns-11869.rs b/tests/ui/borrowck/string-literal-match-patterns-11869.rs
new file mode 100644
index 00000000000..4c159e457cf
--- /dev/null
+++ b/tests/ui/borrowck/string-literal-match-patterns-11869.rs
@@ -0,0 +1,18 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/11869
+
+//@ check-pass
+#![allow(dead_code)]
+
+struct A {
+    a: String
+}
+
+fn borrow<'a>(binding: &'a A) -> &'a str {
+    match &*binding.a {
+        "in" => "in_",
+        "ref" => "ref_",
+        ident => ident
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr
index 177e9c8d248..d3333041310 100644
--- a/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr
+++ b/tests/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr
@@ -10,6 +10,11 @@ LL |         y.into_iter();
    |         |
    |         move occurs because `y` has type `Vec<String>`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/unboxed-closures-move-upvar-from-non-once-ref-closure.rs:5:28
+   |
+LL | fn call<F>(f: F) where F : Fn() {
+   |                            ^^^^
 note: `into_iter` takes ownership of the receiver `self`, which moves `y`
   --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
 help: you can `clone` the value and consume it, but this might not be your desired behavior
diff --git a/tests/ui/issues/issue-14845.rs b/tests/ui/cast/array-field-ptr-cast-14845.rs
index d9b20e1f688..9d2da0c8932 100644
--- a/tests/ui/issues/issue-14845.rs
+++ b/tests/ui/cast/array-field-ptr-cast-14845.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14845
+
 struct X {
     a: [u8; 1]
 }
diff --git a/tests/ui/issues/issue-14845.stderr b/tests/ui/cast/array-field-ptr-cast-14845.stderr
index 2fa9fbaa887..4edde443fc3 100644
--- a/tests/ui/issues/issue-14845.stderr
+++ b/tests/ui/cast/array-field-ptr-cast-14845.stderr
@@ -1,11 +1,11 @@
 error[E0606]: casting `&[u8; 1]` as `*mut u8` is invalid
-  --> $DIR/issue-14845.rs:7:14
+  --> $DIR/array-field-ptr-cast-14845.rs:9:14
    |
 LL |     let _f = &x.a as *mut u8;
    |              ^^^^^^^^^^^^^^^
 
 error[E0606]: casting `&[u8; 1]` as `*mut u8` is invalid
-  --> $DIR/issue-14845.rs:10:14
+  --> $DIR/array-field-ptr-cast-14845.rs:12:14
    |
 LL |     let _v = &local as *mut u8;
    |              ^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/issues/issue-9942.rs b/tests/ui/cast/constant-expression-cast-9942.rs
index 6332d9b3e08..d0a6f27b7e3 100644
--- a/tests/ui/issues/issue-9942.rs
+++ b/tests/ui/cast/constant-expression-cast-9942.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9942
 //@ run-pass
 
 pub fn main() {
diff --git a/tests/ui/issues/issue-14366.rs b/tests/ui/cast/trait-object-size-error-14366.rs
index bb338860d8b..2b66df04600 100644
--- a/tests/ui/issues/issue-14366.rs
+++ b/tests/ui/cast/trait-object-size-error-14366.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14366
+
 fn main() {
     let _x = "test" as &dyn (::std::any::Any);
     //~^ ERROR the size for values of type
diff --git a/tests/ui/issues/issue-14366.stderr b/tests/ui/cast/trait-object-size-error-14366.stderr
index e7bf555c1b7..2451584e951 100644
--- a/tests/ui/issues/issue-14366.stderr
+++ b/tests/ui/cast/trait-object-size-error-14366.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/issue-14366.rs:2:14
+  --> $DIR/trait-object-size-error-14366.rs:4:14
    |
 LL |     let _x = "test" as &dyn (::std::any::Any);
    |              ^^^^^^ doesn't have a size known at compile-time
diff --git a/tests/ui/issues/issue-9918.rs b/tests/ui/cast/u8-to-char-cast-9918.rs
index 017e833aefb..2b8be1f0fc9 100644
--- a/tests/ui/issues/issue-9918.rs
+++ b/tests/ui/cast/u8-to-char-cast-9918.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9918
 //@ run-pass
 
 pub fn main() {
diff --git a/tests/ui/cfg/both-true-false.stderr b/tests/ui/cfg/both-true-false.stderr
index 1526cc2b707..1a7c509aec0 100644
--- a/tests/ui/cfg/both-true-false.stderr
+++ b/tests/ui/cfg/both-true-false.stderr
@@ -3,6 +3,22 @@ error[E0425]: cannot find function `foo` in this scope
    |
 LL |     foo();
    |     ^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/both-true-false.rs:6:4
+   |
+LL | #[cfg(false)]
+   |       ----- the item is gated here
+LL | #[cfg(true)]
+LL | fn foo() {}
+   |    ^^^
+note: found an item that was configured out
+  --> $DIR/both-true-false.rs:10:4
+   |
+LL | #[cfg(false)]
+   |       ----- the item is gated here
+LL | fn foo() {}
+   |    ^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/cfg/cfg-target-compact-errors.stderr b/tests/ui/cfg/cfg-target-compact-errors.stderr
index 7df6729e881..cf61f94278a 100644
--- a/tests/ui/cfg/cfg-target-compact-errors.stderr
+++ b/tests/ui/cfg/cfg-target-compact-errors.stderr
@@ -6,6 +6,8 @@ LL | #[cfg(target(o::o))]
    | |            |
    | |            expected this to be of the form `... = "..."`
    | help: must be of the form: `#[cfg(predicate)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
 
 error[E0539]: malformed `cfg` attribute input
   --> $DIR/cfg-target-compact-errors.rs:9:1
@@ -15,6 +17,8 @@ LL | #[cfg(target(os = 8))]
    | |                 |
    | |                 expected a string literal here
    | help: must be of the form: `#[cfg(predicate)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
 
 error[E0539]: malformed `cfg` attribute input
   --> $DIR/cfg-target-compact-errors.rs:13:1
@@ -24,6 +28,8 @@ LL | #[cfg(target(os = "linux", pointer(width = "64")))]
    | |                          |
    | |                          expected this to be of the form `... = "..."`
    | help: must be of the form: `#[cfg(predicate)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
 
 error[E0539]: malformed `cfg` attribute input
   --> $DIR/cfg-target-compact-errors.rs:17:1
@@ -33,6 +39,8 @@ LL | #[cfg(target(true))]
    | |            |
    | |            expected this to be of the form `... = "..."`
    | help: must be of the form: `#[cfg(predicate)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
 
 error: `cfg` predicate key must be an identifier
   --> $DIR/cfg-target-compact-errors.rs:21:14
diff --git a/tests/ui/cfg/cfg-version/syntax.stderr b/tests/ui/cfg/cfg-version/syntax.stderr
index 188f6d7aa5d..34ddfff3e8e 100644
--- a/tests/ui/cfg/cfg-version/syntax.stderr
+++ b/tests/ui/cfg/cfg-version/syntax.stderr
@@ -128,60 +128,150 @@ error[E0425]: cannot find function `key_value_form` in this scope
    |
 LL |     key_value_form();
    |     ^^^^^^^^^^^^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/syntax.rs:32:4
+   |
+LL | #[cfg(version = "1.43")]
+   |       ---------------- the item is gated behind the `1.43` feature
+LL |
+LL | fn key_value_form() {}
+   |    ^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `not_numbers_or_periods` in this scope
   --> $DIR/syntax.rs:143:5
    |
 LL |     not_numbers_or_periods();
    |     ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/syntax.rs:53:4
+   |
+LL | #[cfg(version("foo"))]
+   |              ------- the item is gated here
+LL |
+LL | fn not_numbers_or_periods() {}
+   |    ^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `complex_semver_with_metadata` in this scope
   --> $DIR/syntax.rs:144:5
    |
 LL |     complex_semver_with_metadata();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/syntax.rs:57:4
+   |
+LL | #[cfg(version("1.20.0-stable"))]
+   |              ----------------- the item is gated here
+LL |
+LL | fn complex_semver_with_metadata() {}
+   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `invalid_major_only` in this scope
   --> $DIR/syntax.rs:145:5
    |
 LL |     invalid_major_only();
    |     ^^^^^^^^^^^^^^^^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/syntax.rs:80:4
+   |
+LL | #[cfg(version("1"))]
+   |              ----- the item is gated here
+LL |
+LL | fn invalid_major_only() {}
+   |    ^^^^^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `invalid_major_only_zero` in this scope
   --> $DIR/syntax.rs:146:5
    |
 LL |     invalid_major_only_zero();
    |     ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/syntax.rs:84:4
+   |
+LL | #[cfg(version("0"))]
+   |              ----- the item is gated here
+LL |
+LL | fn invalid_major_only_zero() {}
+   |    ^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `invalid_major_only_negative` in this scope
   --> $DIR/syntax.rs:147:5
    |
 LL |     invalid_major_only_negative();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/syntax.rs:97:4
+   |
+LL | #[cfg(version("-1"))]
+   |              ------ the item is gated here
+LL |
+LL | fn invalid_major_only_negative() {}
+   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `exceed_u16_major` in this scope
   --> $DIR/syntax.rs:148:5
    |
 LL |     exceed_u16_major();
    |     ^^^^^^^^^^^^^^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/syntax.rs:103:4
+   |
+LL | #[cfg(version("65536"))]
+   |              --------- the item is gated here
+LL |
+LL | fn exceed_u16_major() {}
+   |    ^^^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `exceed_u16_minor` in this scope
   --> $DIR/syntax.rs:149:5
    |
 LL |     exceed_u16_minor();
    |     ^^^^^^^^^^^^^^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/syntax.rs:107:4
+   |
+LL | #[cfg(version("1.65536.0"))]
+   |              ------------- the item is gated here
+LL |
+LL | fn exceed_u16_minor() {}
+   |    ^^^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `exceed_u16_patch` in this scope
   --> $DIR/syntax.rs:150:5
    |
 LL |     exceed_u16_patch();
    |     ^^^^^^^^^^^^^^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/syntax.rs:111:4
+   |
+LL | #[cfg(version("1.0.65536"))]
+   |              ------------- the item is gated here
+LL |
+LL | fn exceed_u16_patch() {}
+   |    ^^^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `exceed_u16_mixed` in this scope
   --> $DIR/syntax.rs:151:5
    |
 LL |     exceed_u16_mixed();
    |     ^^^^^^^^^^^^^^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/syntax.rs:115:4
+   |
+LL | #[cfg(version("65536.0.65536"))]
+   |              ----------------- the item is gated here
+LL |
+LL | fn exceed_u16_mixed() {}
+   |    ^^^^^^^^^^^^^^^^
 
 error: aborting due to 14 previous errors; 14 warnings emitted
 
diff --git a/tests/ui/cfg/cmdline-false.stderr b/tests/ui/cfg/cmdline-false.stderr
index 5f57c754c40..3d486803821 100644
--- a/tests/ui/cfg/cmdline-false.stderr
+++ b/tests/ui/cfg/cmdline-false.stderr
@@ -3,6 +3,14 @@ error[E0425]: cannot find function `foo` in this scope
    |
 LL |     foo();
    |     ^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/cmdline-false.rs:5:4
+   |
+LL | #[cfg(false)]
+   |       ----- the item is gated here
+LL | fn foo() {}
+   |    ^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/cfg/diagnostics-cross-crate.rs b/tests/ui/cfg/diagnostics-cross-crate.rs
index 00ac7e2fd08..f959332c817 100644
--- a/tests/ui/cfg/diagnostics-cross-crate.rs
+++ b/tests/ui/cfg/diagnostics-cross-crate.rs
@@ -11,24 +11,20 @@ fn main() {
     cfged_out::inner::uwu(); //~ ERROR cannot find function
     //~^ NOTE found an item that was configured out
     //~| NOTE not found in `cfged_out::inner`
-    //~| NOTE the item is gated here
 
     // The module isn't found - we would like to get a diagnostic, but currently don't due to
     // the awkward way the resolver diagnostics are currently implemented.
     cfged_out::inner::doesnt_exist::hello(); //~ ERROR failed to resolve
     //~^ NOTE could not find `doesnt_exist` in `inner`
     //~| NOTE found an item that was configured out
-    //~| NOTE the item is gated here
 
     // It should find the one in the right module, not the wrong one.
     cfged_out::inner::right::meow(); //~ ERROR cannot find function
     //~^ NOTE found an item that was configured out
     //~| NOTE not found in `cfged_out::inner::right
-    //~| NOTE the item is gated behind the `what-a-cool-feature` feature
 
     // Exists in the crate root - diagnostic.
     cfged_out::vanished(); //~ ERROR cannot find function
     //~^ NOTE found an item that was configured out
     //~| NOTE not found in `cfged_out`
-    //~| NOTE the item is gated here
 }
diff --git a/tests/ui/cfg/diagnostics-cross-crate.stderr b/tests/ui/cfg/diagnostics-cross-crate.stderr
index 155b3db2f42..658e5a442bd 100644
--- a/tests/ui/cfg/diagnostics-cross-crate.stderr
+++ b/tests/ui/cfg/diagnostics-cross-crate.stderr
@@ -1,5 +1,5 @@
 error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner`
-  --> $DIR/diagnostics-cross-crate.rs:18:23
+  --> $DIR/diagnostics-cross-crate.rs:17:23
    |
 LL |     cfged_out::inner::doesnt_exist::hello();
    |                       ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner`
@@ -7,13 +7,10 @@ LL |     cfged_out::inner::doesnt_exist::hello();
 note: found an item that was configured out
   --> $DIR/auxiliary/cfged_out.rs:6:13
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
 LL |     pub mod doesnt_exist {
    |             ^^^^^^^^^^^^
-note: the item is gated here
-  --> $DIR/auxiliary/cfged_out.rs:5:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error[E0425]: cannot find function `uwu` in crate `cfged_out`
   --> $DIR/diagnostics-cross-crate.rs:7:16
@@ -30,16 +27,13 @@ LL |     cfged_out::inner::uwu();
 note: found an item that was configured out
   --> $DIR/auxiliary/cfged_out.rs:3:12
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
 LL |     pub fn uwu() {}
    |            ^^^
-note: the item is gated here
-  --> $DIR/auxiliary/cfged_out.rs:2:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error[E0425]: cannot find function `meow` in module `cfged_out::inner::right`
-  --> $DIR/diagnostics-cross-crate.rs:24:30
+  --> $DIR/diagnostics-cross-crate.rs:22:30
    |
 LL |     cfged_out::inner::right::meow();
    |                              ^^^^ not found in `cfged_out::inner::right`
@@ -47,16 +41,13 @@ LL |     cfged_out::inner::right::meow();
 note: found an item that was configured out
   --> $DIR/auxiliary/cfged_out.rs:17:16
    |
+LL |         #[cfg(feature = "what-a-cool-feature")]
+   |               ------------------------------- the item is gated behind the `what-a-cool-feature` feature
 LL |         pub fn meow() {}
    |                ^^^^
-note: the item is gated behind the `what-a-cool-feature` feature
-  --> $DIR/auxiliary/cfged_out.rs:16:15
-   |
-LL |         #[cfg(feature = "what-a-cool-feature")]
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `vanished` in crate `cfged_out`
-  --> $DIR/diagnostics-cross-crate.rs:30:16
+  --> $DIR/diagnostics-cross-crate.rs:27:16
    |
 LL |     cfged_out::vanished();
    |                ^^^^^^^^ not found in `cfged_out`
@@ -64,13 +55,10 @@ LL |     cfged_out::vanished();
 note: found an item that was configured out
   --> $DIR/auxiliary/cfged_out.rs:22:8
    |
+LL | #[cfg(i_dont_exist_and_you_can_do_nothing_about_it)]
+   |       -------------------------------------------- the item is gated here
 LL | pub fn vanished() {}
    |        ^^^^^^^^
-note: the item is gated here
-  --> $DIR/auxiliary/cfged_out.rs:21:7
-   |
-LL | #[cfg(i_dont_exist_and_you_can_do_nothing_about_it)]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/cfg/diagnostics-reexport-2.stderr b/tests/ui/cfg/diagnostics-reexport-2.stderr
index e1f91fcc5d1..713cffce65b 100644
--- a/tests/ui/cfg/diagnostics-reexport-2.stderr
+++ b/tests/ui/cfg/diagnostics-reexport-2.stderr
@@ -7,13 +7,11 @@ LL |     reexport::gated::foo();
 note: found an item that was configured out
   --> $DIR/diagnostics-reexport-2.rs:10:13
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
+...
 LL |     pub mod gated {
    |             ^^^^^
-note: the item is gated here
-  --> $DIR/diagnostics-reexport-2.rs:4:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error[E0433]: failed to resolve: could not find `gated` in `reexport2`
   --> $DIR/diagnostics-reexport-2.rs:46:16
@@ -24,13 +22,11 @@ LL |     reexport2::gated::foo();
 note: found an item that was configured out
   --> $DIR/diagnostics-reexport-2.rs:10:13
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
+...
 LL |     pub mod gated {
    |             ^^^^^
-note: the item is gated here
-  --> $DIR/diagnostics-reexport-2.rs:4:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error[E0433]: failed to resolve: could not find `gated` in `reexport30`
   --> $DIR/diagnostics-reexport-2.rs:50:17
@@ -41,13 +37,11 @@ LL |     reexport30::gated::foo();
 note: found an item that was configured out
   --> $DIR/diagnostics-reexport-2.rs:10:13
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
+...
 LL |     pub mod gated {
    |             ^^^^^
-note: the item is gated here
-  --> $DIR/diagnostics-reexport-2.rs:4:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error[E0433]: failed to resolve: could not find `gated` in `reexport31`
   --> $DIR/diagnostics-reexport-2.rs:54:17
@@ -58,13 +52,11 @@ LL |     reexport31::gated::foo();
 note: found an item that was configured out
   --> $DIR/diagnostics-reexport-2.rs:10:13
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
+...
 LL |     pub mod gated {
    |             ^^^^^
-note: the item is gated here
-  --> $DIR/diagnostics-reexport-2.rs:4:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error[E0433]: failed to resolve: could not find `gated` in `reexport32`
   --> $DIR/diagnostics-reexport-2.rs:58:17
@@ -75,13 +67,11 @@ LL |     reexport32::gated::foo();
 note: found an item that was configured out
   --> $DIR/diagnostics-reexport-2.rs:10:13
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
+...
 LL |     pub mod gated {
    |             ^^^^^
-note: the item is gated here
-  --> $DIR/diagnostics-reexport-2.rs:4:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/cfg/diagnostics-reexport.rs b/tests/ui/cfg/diagnostics-reexport.rs
index 56fac562238..c6a714fca71 100644
--- a/tests/ui/cfg/diagnostics-reexport.rs
+++ b/tests/ui/cfg/diagnostics-reexport.rs
@@ -34,7 +34,7 @@ mod b {
 }
 
 fn main() {
-    // There is no uwu at this path - no diagnostic.
+    // There is no uwu at this path, but there's one in a cgfd out sub-module, so we mention it.
     inner::uwu(); //~ ERROR cannot find function
     //~^ NOTE not found in `inner`
 }
diff --git a/tests/ui/cfg/diagnostics-reexport.stderr b/tests/ui/cfg/diagnostics-reexport.stderr
index bf1bbcba7e4..a3a6e13f475 100644
--- a/tests/ui/cfg/diagnostics-reexport.stderr
+++ b/tests/ui/cfg/diagnostics-reexport.stderr
@@ -7,13 +7,10 @@ LL | pub use a::x;
 note: found an item that was configured out
   --> $DIR/diagnostics-reexport.rs:18:12
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
 LL |     pub fn x() {}
    |            ^
-note: the item is gated here
-  --> $DIR/diagnostics-reexport.rs:17:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error[E0432]: unresolved imports `b::x`, `b::y`
   --> $DIR/diagnostics-reexport.rs:22:13
@@ -26,23 +23,17 @@ LL | pub use b::{x, y};
 note: found an item that was configured out
   --> $DIR/diagnostics-reexport.rs:29:12
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
 LL |     pub fn x() {}
    |            ^
-note: the item is gated here
-  --> $DIR/diagnostics-reexport.rs:28:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 note: found an item that was configured out
   --> $DIR/diagnostics-reexport.rs:32:12
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
 LL |     pub fn y() {}
    |            ^
-note: the item is gated here
-  --> $DIR/diagnostics-reexport.rs:31:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error[E0425]: cannot find function `uwu` in module `inner`
   --> $DIR/diagnostics-reexport.rs:38:12
@@ -53,13 +44,10 @@ LL |     inner::uwu();
 note: found an item that was configured out
   --> $DIR/diagnostics-reexport.rs:8:20
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
 LL |     pub use super::uwu;
    |                    ^^^
-note: the item is gated here
-  --> $DIR/diagnostics-reexport.rs:7:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/cfg/diagnostics-same-crate.rs b/tests/ui/cfg/diagnostics-same-crate.rs
index 9153f20b296..29209d5f3ea 100644
--- a/tests/ui/cfg/diagnostics-same-crate.rs
+++ b/tests/ui/cfg/diagnostics-same-crate.rs
@@ -37,8 +37,8 @@ mod placeholder {
     //~| NOTE could not find `doesnt_exist` in `inner`
 }
 
-#[cfg(i_dont_exist_and_you_can_do_nothing_about_it)]
-pub fn vanished() {}
+#[cfg(i_dont_exist_and_you_can_do_nothing_about_it)] //~ NOTE the item is gated here
+pub fn vanished() {} //~ NOTE found an item that was configured out
 
 fn main() {
     // There is no uwu at this path - no diagnostic.
@@ -49,8 +49,7 @@ fn main() {
     inner::uwu(); //~ ERROR cannot find function
     //~| NOTE not found in `inner`
 
-    // The module isn't found - we would like to get a diagnostic, but currently don't due to
-    // the awkward way the resolver diagnostics are currently implemented.
+    // The module isn't found - we get a diagnostic.
     inner::doesnt_exist::hello(); //~ ERROR failed to resolve
     //~| NOTE could not find `doesnt_exist` in `inner`
 
@@ -58,9 +57,8 @@ fn main() {
     inner::right::meow(); //~ ERROR cannot find function
     //~| NOTE not found in `inner::right
 
-    // Exists in the crate root - we would generally want a diagnostic,
-    // but currently don't have one.
-    // Not that it matters much though, this is highly unlikely to confuse anyone.
+    // Exists in the crate root - we show a diagnostic because we treat "no module DefId" as "crate
+    // root DefId".
     vanished(); //~ ERROR cannot find function
     //~^ NOTE not found in this scope
 }
diff --git a/tests/ui/cfg/diagnostics-same-crate.stderr b/tests/ui/cfg/diagnostics-same-crate.stderr
index 121f25ca090..a8d789e61d1 100644
--- a/tests/ui/cfg/diagnostics-same-crate.stderr
+++ b/tests/ui/cfg/diagnostics-same-crate.stderr
@@ -7,13 +7,11 @@ LL |     use super::inner::doesnt_exist;
 note: found an item that was configured out
   --> $DIR/diagnostics-same-crate.rs:11:13
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
+...
 LL |     pub mod doesnt_exist {
    |             ^^^^^^^^^^^^
-note: the item is gated here
-  --> $DIR/diagnostics-same-crate.rs:8:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error[E0432]: unresolved import `super::inner::doesnt_exist`
   --> $DIR/diagnostics-same-crate.rs:35:23
@@ -24,16 +22,14 @@ LL |     use super::inner::doesnt_exist::hi;
 note: found an item that was configured out
   --> $DIR/diagnostics-same-crate.rs:11:13
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
+...
 LL |     pub mod doesnt_exist {
    |             ^^^^^^^^^^^^
-note: the item is gated here
-  --> $DIR/diagnostics-same-crate.rs:8:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner`
-  --> $DIR/diagnostics-same-crate.rs:54:12
+  --> $DIR/diagnostics-same-crate.rs:53:12
    |
 LL |     inner::doesnt_exist::hello();
    |            ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner`
@@ -41,13 +37,11 @@ LL |     inner::doesnt_exist::hello();
 note: found an item that was configured out
   --> $DIR/diagnostics-same-crate.rs:11:13
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
+...
 LL |     pub mod doesnt_exist {
    |             ^^^^^^^^^^^^
-note: the item is gated here
-  --> $DIR/diagnostics-same-crate.rs:8:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error[E0425]: cannot find function `uwu` in module `inner`
   --> $DIR/diagnostics-same-crate.rs:49:12
@@ -58,16 +52,13 @@ LL |     inner::uwu();
 note: found an item that was configured out
   --> $DIR/diagnostics-same-crate.rs:5:12
    |
+LL |     #[cfg(false)]
+   |           ----- the item is gated here
 LL |     pub fn uwu() {}
    |            ^^^
-note: the item is gated here
-  --> $DIR/diagnostics-same-crate.rs:4:11
-   |
-LL |     #[cfg(false)]
-   |           ^^^^^
 
 error[E0425]: cannot find function `meow` in module `inner::right`
-  --> $DIR/diagnostics-same-crate.rs:58:19
+  --> $DIR/diagnostics-same-crate.rs:57:19
    |
 LL |     inner::right::meow();
    |                   ^^^^ not found in `inner::right`
@@ -75,13 +66,10 @@ LL |     inner::right::meow();
 note: found an item that was configured out
   --> $DIR/diagnostics-same-crate.rs:26:16
    |
+LL |         #[cfg(feature = "what-a-cool-feature")]
+   |               ------------------------------- the item is gated behind the `what-a-cool-feature` feature
 LL |         pub fn meow() {}
    |                ^^^^
-note: the item is gated behind the `what-a-cool-feature` feature
-  --> $DIR/diagnostics-same-crate.rs:25:15
-   |
-LL |         #[cfg(feature = "what-a-cool-feature")]
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `uwu` in this scope
   --> $DIR/diagnostics-same-crate.rs:45:5
@@ -90,10 +78,18 @@ LL |     uwu();
    |     ^^^ not found in this scope
 
 error[E0425]: cannot find function `vanished` in this scope
-  --> $DIR/diagnostics-same-crate.rs:64:5
+  --> $DIR/diagnostics-same-crate.rs:62:5
    |
 LL |     vanished();
    |     ^^^^^^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/diagnostics-same-crate.rs:41:8
+   |
+LL | #[cfg(i_dont_exist_and_you_can_do_nothing_about_it)]
+   |       -------------------------------------------- the item is gated here
+LL | pub fn vanished() {}
+   |        ^^^^^^^^
 
 error: aborting due to 7 previous errors
 
diff --git a/tests/ui/cfg/nested-cfg-attr-conditional-compilation.rs b/tests/ui/cfg/nested-cfg-attr-conditional-compilation.rs
index 7618e83a642..c5d86a27d52 100644
--- a/tests/ui/cfg/nested-cfg-attr-conditional-compilation.rs
+++ b/tests/ui/cfg/nested-cfg-attr-conditional-compilation.rs
@@ -10,9 +10,10 @@
 //!
 //! Added in <https://github.com/rust-lang/rust/pull/34216>.
 
-#[cfg_attr(all(), cfg_attr(all(), cfg(false)))]
-fn f() {}
+#[cfg_attr(all(), cfg_attr(all(), cfg(false)))] //~ NOTE the item is gated here
+fn f() {} //~ NOTE found an item that was configured out
 
 fn main() {
     f() //~ ERROR cannot find function `f` in this scope
+    //~^ NOTE not found in this scope
 }
diff --git a/tests/ui/cfg/nested-cfg-attr-conditional-compilation.stderr b/tests/ui/cfg/nested-cfg-attr-conditional-compilation.stderr
index ddb8ea1e13a..3f833bd558b 100644
--- a/tests/ui/cfg/nested-cfg-attr-conditional-compilation.stderr
+++ b/tests/ui/cfg/nested-cfg-attr-conditional-compilation.stderr
@@ -3,6 +3,14 @@ error[E0425]: cannot find function `f` in this scope
    |
 LL |     f()
    |     ^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/nested-cfg-attr-conditional-compilation.rs:14:4
+   |
+LL | #[cfg_attr(all(), cfg_attr(all(), cfg(false)))]
+   |                                       ----- the item is gated here
+LL | fn f() {}
+   |    ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/check-cfg/cfg-crate-features.stderr b/tests/ui/check-cfg/cfg-crate-features.stderr
index 60a5404c073..d69a24f3f64 100644
--- a/tests/ui/check-cfg/cfg-crate-features.stderr
+++ b/tests/ui/check-cfg/cfg-crate-features.stderr
@@ -24,7 +24,7 @@ warning: unexpected `cfg` condition value: `does_not_exist`
 LL | #![cfg(not(target(os = "does_not_exist")))]
    |                   ^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `lynxos178`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, and `uefi` and 9 more
+   = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `lynxos178`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, and `uefi` and 10 more
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
diff --git a/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr b/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr
index b07d630e5f5..229390ab460 100644
--- a/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr
+++ b/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr
@@ -14,7 +14,7 @@ warning: unexpected `cfg` condition value: `value`
 LL | #[cfg(target_vendor = "value")]
    |       ^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `target_vendor` are: `amd`, `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `mti`, `nintendo`, `nvidia`, `openwrt`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, and `wrs`
+   = note: expected values for `target_vendor` are: `amd`, `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `mti`, `nintendo`, `nvidia`, `openwrt`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `vex`, `win7`, and `wrs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `feature`
diff --git a/tests/ui/check-cfg/exhaustive-names-values.feature.stderr b/tests/ui/check-cfg/exhaustive-names-values.feature.stderr
index 80f8f36c23f..9281392b59e 100644
--- a/tests/ui/check-cfg/exhaustive-names-values.feature.stderr
+++ b/tests/ui/check-cfg/exhaustive-names-values.feature.stderr
@@ -15,7 +15,7 @@ warning: unexpected `cfg` condition value: `value`
 LL | #[cfg(target_vendor = "value")]
    |       ^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `target_vendor` are: `amd`, `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `mti`, `nintendo`, `nvidia`, `openwrt`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, and `wrs`
+   = note: expected values for `target_vendor` are: `amd`, `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `mti`, `nintendo`, `nvidia`, `openwrt`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `vex`, `win7`, and `wrs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `unk`
diff --git a/tests/ui/check-cfg/exhaustive-names-values.full.stderr b/tests/ui/check-cfg/exhaustive-names-values.full.stderr
index 80f8f36c23f..9281392b59e 100644
--- a/tests/ui/check-cfg/exhaustive-names-values.full.stderr
+++ b/tests/ui/check-cfg/exhaustive-names-values.full.stderr
@@ -15,7 +15,7 @@ warning: unexpected `cfg` condition value: `value`
 LL | #[cfg(target_vendor = "value")]
    |       ^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `target_vendor` are: `amd`, `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `mti`, `nintendo`, `nvidia`, `openwrt`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, and `wrs`
+   = note: expected values for `target_vendor` are: `amd`, `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `mti`, `nintendo`, `nvidia`, `openwrt`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `vex`, `win7`, and `wrs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `unk`
diff --git a/tests/ui/check-cfg/target_feature.stderr b/tests/ui/check-cfg/target_feature.stderr
index e730492fd9b..5dd81f486c8 100644
--- a/tests/ui/check-cfg/target_feature.stderr
+++ b/tests/ui/check-cfg/target_feature.stderr
@@ -199,6 +199,35 @@ LL |     cfg!(target_feature = "_UNEXPECTED_VALUE");
 `power9-altivec`
 `power9-vector`
 `prfchw`
+`ptx32`
+`ptx40`
+`ptx41`
+`ptx42`
+`ptx43`
+`ptx50`
+`ptx60`
+`ptx61`
+`ptx62`
+`ptx63`
+`ptx64`
+`ptx65`
+`ptx70`
+`ptx71`
+`ptx72`
+`ptx73`
+`ptx74`
+`ptx75`
+`ptx76`
+`ptx77`
+`ptx78`
+`ptx80`
+`ptx81`
+`ptx82`
+`ptx83`
+`ptx84`
+`ptx85`
+`ptx86`
+`ptx87`
 `quadword-atomics`
 `rand`
 `ras`
@@ -223,6 +252,33 @@ LL |     cfg!(target_feature = "_UNEXPECTED_VALUE");
 `simd128`
 `sm3`
 `sm4`
+`sm_100`
+`sm_100a`
+`sm_101`
+`sm_101a`
+`sm_120`
+`sm_120a`
+`sm_20`
+`sm_21`
+`sm_30`
+`sm_32`
+`sm_35`
+`sm_37`
+`sm_50`
+`sm_52`
+`sm_53`
+`sm_60`
+`sm_61`
+`sm_62`
+`sm_70`
+`sm_72`
+`sm_75`
+`sm_80`
+`sm_86`
+`sm_87`
+`sm_89`
+`sm_90`
+`sm_90a`
 `sme`
 `sme-b16b16`
 `sme-f16f16`
diff --git a/tests/ui/check-cfg/well-known-values.stderr b/tests/ui/check-cfg/well-known-values.stderr
index 2484974cdc2..18e038a442e 100644
--- a/tests/ui/check-cfg/well-known-values.stderr
+++ b/tests/ui/check-cfg/well-known-values.stderr
@@ -156,7 +156,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
 LL |     target_env = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `target_env` are: ``, `gnu`, `msvc`, `musl`, `newlib`, `nto70`, `nto71`, `nto71_iosock`, `nto80`, `ohos`, `p1`, `p2`, `relibc`, `sgx`, and `uclibc`
+   = note: expected values for `target_env` are: ``, `gnu`, `macabi`, `msvc`, `musl`, `newlib`, `nto70`, `nto71`, `nto71_iosock`, `nto80`, `ohos`, `p1`, `p2`, `relibc`, `sgx`, `sim`, `uclibc`, and `v5`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
@@ -201,7 +201,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
 LL |     target_os = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `lynxos178`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, and `zkvm`
+   = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `lynxos178`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, `uefi`, `unknown`, `vexos`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, and `zkvm`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
@@ -230,7 +230,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
 LL |     target_vendor = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `target_vendor` are: `amd`, `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `mti`, `nintendo`, `nvidia`, `openwrt`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, and `wrs`
+   = note: expected values for `target_vendor` are: `amd`, `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `mti`, `nintendo`, `nvidia`, `openwrt`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `vex`, `win7`, and `wrs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
@@ -274,7 +274,7 @@ LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux`
    |                   |
    |                   help: there is a expected value with a similar name: `"linux"`
    |
-   = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `lynxos178`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, and `zkvm`
+   = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `lynxos178`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, `uefi`, `unknown`, `vexos`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, and `zkvm`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 
 warning: 28 warnings emitted
diff --git a/tests/ui/issues/issue-21600.rs b/tests/ui/closures/aliasability-violation-with-closure-21600.rs
index 2e22e5e6fa2..d4c658319ab 100644
--- a/tests/ui/issues/issue-21600.rs
+++ b/tests/ui/closures/aliasability-violation-with-closure-21600.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/21600
 fn call_it<F>(f: F) where F: Fn() { f(); }
 
 struct A;
diff --git a/tests/ui/issues/issue-21600.stderr b/tests/ui/closures/aliasability-violation-with-closure-21600.stderr
index f7905934424..2d2397a2141 100644
--- a/tests/ui/issues/issue-21600.stderr
+++ b/tests/ui/closures/aliasability-violation-with-closure-21600.stderr
@@ -1,5 +1,5 @@
 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
-  --> $DIR/issue-21600.rs:14:20
+  --> $DIR/aliasability-violation-with-closure-21600.rs:15:20
    |
 LL | fn call_it<F>(f: F) where F: Fn() { f(); }
    |                  - change this to accept `FnMut` instead of `Fn`
@@ -11,7 +11,7 @@ LL |         call_it(|| x.gen_mut());
    |         expects `Fn` instead of `FnMut`
 
 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
-  --> $DIR/issue-21600.rs:14:17
+  --> $DIR/aliasability-violation-with-closure-21600.rs:15:17
    |
 LL | fn call_it<F>(f: F) where F: Fn() { f(); }
    |                  - change this to accept `FnMut` instead of `Fn`
diff --git a/tests/ui/issues/issue-13808.rs b/tests/ui/closures/boxed-closure-lifetime-13808.rs
index d2961b35f2e..e8324796b5f 100644
--- a/tests/ui/issues/issue-13808.rs
+++ b/tests/ui/closures/boxed-closure-lifetime-13808.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13808
+
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
diff --git a/tests/ui/issues/issue-9129.rs b/tests/ui/closures/closure-type-inference-in-context-9129.rs
index 3856cd133e8..53ee8faab85 100644
--- a/tests/ui/issues/issue-9129.rs
+++ b/tests/ui/closures/closure-type-inference-in-context-9129.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9129
 //@ run-pass
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
diff --git a/tests/ui/issues/issue-12127.rs b/tests/ui/closures/fnonce-moved-twice-12127.rs
index 199d542e816..369ddcafaab 100644
--- a/tests/ui/issues/issue-12127.rs
+++ b/tests/ui/closures/fnonce-moved-twice-12127.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/12127
+
 #![feature(unboxed_closures, tuple_trait)]
 
 fn to_fn_once<A:std::marker::Tuple,F:FnOnce<A>>(f: F) -> F { f }
diff --git a/tests/ui/issues/issue-12127.stderr b/tests/ui/closures/fnonce-moved-twice-12127.stderr
index 2a6233547ee..c2e12827527 100644
--- a/tests/ui/issues/issue-12127.stderr
+++ b/tests/ui/closures/fnonce-moved-twice-12127.stderr
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `f`
-  --> $DIR/issue-12127.rs:11:9
+  --> $DIR/fnonce-moved-twice-12127.rs:13:9
    |
 LL |         f();
    |         --- `f` moved due to this call
@@ -7,11 +7,11 @@ LL |         f();
    |         ^ value used here after move
    |
 note: this value implements `FnOnce`, which causes it to be moved when called
-  --> $DIR/issue-12127.rs:10:9
+  --> $DIR/fnonce-moved-twice-12127.rs:12:9
    |
 LL |         f();
    |         ^
-   = note: move occurs because `f` has type `{closure@$DIR/issue-12127.rs:8:24: 8:30}`, which does not implement the `Copy` trait
+   = note: move occurs because `f` has type `{closure@$DIR/fnonce-moved-twice-12127.rs:10:24: 10:30}`, which does not implement the `Copy` trait
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-11958.rs b/tests/ui/closures/moved-upvar-mut-rebind-11958.rs
index 9185c5158af..701dc1a2cef 100644
--- a/tests/ui/issues/issue-11958.rs
+++ b/tests/ui/closures/moved-upvar-mut-rebind-11958.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/11958
+
 //@ run-pass
 
 // We shouldn't need to rebind a moved upvar as mut if it's already
diff --git a/tests/ui/issues/issue-11958.stderr b/tests/ui/closures/moved-upvar-mut-rebind-11958.stderr
index 5dca4c2f01d..b12bbcad925 100644
--- a/tests/ui/issues/issue-11958.stderr
+++ b/tests/ui/closures/moved-upvar-mut-rebind-11958.stderr
@@ -1,5 +1,5 @@
 warning: value assigned to `x` is never read
-  --> $DIR/issue-11958.rs:8:36
+  --> $DIR/moved-upvar-mut-rebind-11958.rs:10:36
    |
 LL |     let _thunk = Box::new(move|| { x = 2; });
    |                                    ^
@@ -8,7 +8,7 @@ LL |     let _thunk = Box::new(move|| { x = 2; });
    = note: `#[warn(unused_assignments)]` on by default
 
 warning: unused variable: `x`
-  --> $DIR/issue-11958.rs:8:36
+  --> $DIR/moved-upvar-mut-rebind-11958.rs:10:36
    |
 LL |     let _thunk = Box::new(move|| { x = 2; });
    |                                    ^
diff --git a/tests/ui/issues/issue-16256.rs b/tests/ui/closures/unused-closure-ice-16256.rs
index 1024e4511d6..fd569dd8a0a 100644
--- a/tests/ui/issues/issue-16256.rs
+++ b/tests/ui/closures/unused-closure-ice-16256.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/16256
+
 //@ run-pass
 
 fn main() {
diff --git a/tests/ui/issues/issue-16256.stderr b/tests/ui/closures/unused-closure-ice-16256.stderr
index 75c3ec1bd1c..9df433add5d 100644
--- a/tests/ui/issues/issue-16256.stderr
+++ b/tests/ui/closures/unused-closure-ice-16256.stderr
@@ -1,5 +1,5 @@
 warning: unused closure that must be used
-  --> $DIR/issue-16256.rs:5:5
+  --> $DIR/unused-closure-ice-16256.rs:7:5
    |
 LL |     |c: u8| buf.push(c);
    |     ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/issues/issue-36023.rs b/tests/ui/codegen/llvm-miscompile-metadata-invalidation-36023.rs
index 32e8af65c7d..efa31a51881 100644
--- a/tests/ui/issues/issue-36023.rs
+++ b/tests/ui/codegen/llvm-miscompile-metadata-invalidation-36023.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/36023
 //@ run-pass
 #![allow(unused_variables)]
 use std::ops::Deref;
diff --git a/tests/ui/issues/issue-15793.rs b/tests/ui/codegen/nested-enum-match-optimization-15793.rs
index af92e9dfa4c..420e3ad82b2 100644
--- a/tests/ui/issues/issue-15793.rs
+++ b/tests/ui/codegen/nested-enum-match-optimization-15793.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15793
+
 //@ run-pass
 #![allow(dead_code)]
 
diff --git a/tests/ui/codegen/overflow-during-mono.rs b/tests/ui/codegen/overflow-during-mono.rs
index a9045840173..3aafe05ba05 100644
--- a/tests/ui/codegen/overflow-during-mono.rs
+++ b/tests/ui/codegen/overflow-during-mono.rs
@@ -1,5 +1,6 @@
-//~ ERROR overflow evaluating the requirement `for<'a> {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}: FnMut(&'a _)`
+//~ ERROR overflow evaluating the requirement `for<'a> {closure@$DIR/overflow-during-mono.rs:14:41: 14:44}: FnMut(&'a _)`
 //@ build-fail
+//@ compile-flags: -Zwrite-long-types-to-disk=yes
 
 #![recursion_limit = "32"]
 
diff --git a/tests/ui/codegen/overflow-during-mono.stderr b/tests/ui/codegen/overflow-during-mono.stderr
index 74d98fde285..1559de757e7 100644
--- a/tests/ui/codegen/overflow-during-mono.stderr
+++ b/tests/ui/codegen/overflow-during-mono.stderr
@@ -1,10 +1,12 @@
-error[E0275]: overflow evaluating the requirement `for<'a> {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}: FnMut(&'a _)`
+error[E0275]: overflow evaluating the requirement `for<'a> {closure@$DIR/overflow-during-mono.rs:14:41: 14:44}: FnMut(&'a _)`
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "64"]` attribute to your crate (`overflow_during_mono`)
-   = note: required for `Filter<std::array::IntoIter<i32, 11>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>` to implement `Iterator`
+   = note: required for `Filter<IntoIter<i32, 11>, {closure@overflow-during-mono.rs:14:41}>` to implement `Iterator`
    = note: 31 redundant requirements hidden
-   = note: required for `Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<std::array::IntoIter<i32, 11>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>` to implement `Iterator`
-   = note: required for `Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<Filter<std::array::IntoIter<i32, 11>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>, {closure@$DIR/overflow-during-mono.rs:13:41: 13:44}>` to implement `IntoIterator`
+   = note: required for `Filter<Filter<Filter<Filter<Filter<..., ...>, ...>, ...>, ...>, ...>` to implement `Iterator`
+   = note: required for `Filter<Filter<Filter<Filter<Filter<..., ...>, ...>, ...>, ...>, ...>` to implement `IntoIterator`
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/overflow-during-mono.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/codegen/unsupported-static-initializer-in-const-array.rs b/tests/ui/codegen/unsupported-static-initializer-in-const-array.rs
new file mode 100644
index 00000000000..bc94130ee19
--- /dev/null
+++ b/tests/ui/codegen/unsupported-static-initializer-in-const-array.rs
@@ -0,0 +1,18 @@
+//! LLVM error with unsupported expression in static
+//! initializer for const pointer in array on macOS.
+//!
+//! Regression test for <https://github.com/rust-lang/rust/issues/89225>.
+
+//@ build-pass
+//@ compile-flags: -C opt-level=3
+
+const fn make() -> (i32, i32, *const i32) {
+    const V: i32 = 123;
+    &V as *const i32;
+    (0, 0, &V)
+}
+
+fn main() {
+    let arr = [make(); 32];
+    println!("{}", arr[0].0);
+}
diff --git a/tests/ui/issues/issue-12744.rs b/tests/ui/coercion/any-trait-object-debug-12744.rs
index eaf92d413d5..4d981c077ee 100644
--- a/tests/ui/issues/issue-12744.rs
+++ b/tests/ui/coercion/any-trait-object-debug-12744.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/12744
+
 //@ run-pass
 fn main() {
     fn test() -> Box<dyn std::any::Any + 'static> { Box::new(1) }
diff --git a/tests/ui/issues/issue-14399.rs b/tests/ui/coercion/method-return-trait-object-14399.rs
index a539e270fb0..49eee152d88 100644
--- a/tests/ui/issues/issue-14399.rs
+++ b/tests/ui/coercion/method-return-trait-object-14399.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14399
+
 //@ run-pass
 // #14399
 // We'd previously ICE if we had a method call whose return
diff --git a/tests/ui/issues/issue-14399.stderr b/tests/ui/coercion/method-return-trait-object-14399.stderr
index 5821c3cc389..1aa87f53ff8 100644
--- a/tests/ui/issues/issue-14399.stderr
+++ b/tests/ui/coercion/method-return-trait-object-14399.stderr
@@ -1,5 +1,5 @@
 warning: method `foo` is never used
-  --> $DIR/issue-14399.rs:11:14
+  --> $DIR/method-return-trait-object-14399.rs:13:14
    |
 LL | trait A { fn foo(&self) {} }
    |       -      ^^^
diff --git a/tests/ui/issues/issue-9951.rs b/tests/ui/coercion/trait-object-coercion-distribution-9951.rs
index 2cd7cd4f430..526d6561510 100644
--- a/tests/ui/issues/issue-9951.rs
+++ b/tests/ui/coercion/trait-object-coercion-distribution-9951.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9951
 //@ run-pass
 
 #![allow(unused_variables)]
diff --git a/tests/ui/issues/issue-9951.stderr b/tests/ui/coercion/trait-object-coercion-distribution-9951.stderr
index 62ed9f3e0cc..0c672aa9b33 100644
--- a/tests/ui/issues/issue-9951.stderr
+++ b/tests/ui/coercion/trait-object-coercion-distribution-9951.stderr
@@ -1,5 +1,5 @@
 warning: method `noop` is never used
-  --> $DIR/issue-9951.rs:6:6
+  --> $DIR/trait-object-coercion-distribution-9951.rs:7:6
    |
 LL | trait Bar {
    |       --- method in this trait
diff --git a/tests/ui/coherence/coherence-tuple-conflict.stderr b/tests/ui/coherence/coherence-tuple-conflict.stderr
index 95f9a1a8841..8ce65f79aca 100644
--- a/tests/ui/coherence/coherence-tuple-conflict.stderr
+++ b/tests/ui/coherence/coherence-tuple-conflict.stderr
@@ -12,6 +12,8 @@ error[E0609]: no field `dummy` on type `&(A, B)`
    |
 LL |     fn get(&self) -> usize { self.dummy }
    |                                   ^^^^^ unknown field
+   |
+   = note: available fields are: `0`, `1`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/issues/issue-18058.rs b/tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.rs
index cced66717e1..52baf9871c3 100644
--- a/tests/ui/issues/issue-18058.rs
+++ b/tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/18058
 impl Undefined {}
 //~^ ERROR cannot find type `Undefined` in this scope
 
diff --git a/tests/ui/issues/issue-18058.stderr b/tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.stderr
index c880bb00291..07dce0b04fd 100644
--- a/tests/ui/issues/issue-18058.stderr
+++ b/tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.stderr
@@ -1,5 +1,5 @@
 error[E0412]: cannot find type `Undefined` in this scope
-  --> $DIR/issue-18058.rs:1:6
+  --> $DIR/impl-coherence-error-for-undefined-type-18058.rs:2:6
    |
 LL | impl Undefined {}
    |      ^^^^^^^^^ not found in this scope
diff --git a/tests/ui/issues/issue-12860.rs b/tests/ui/collections/hashset-connected-border-12860.rs
index 255f6670793..40185bef7c8 100644
--- a/tests/ui/issues/issue-12860.rs
+++ b/tests/ui/collections/hashset-connected-border-12860.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/12860
+
 //@ run-pass
 use std::collections::HashSet;
 
diff --git a/tests/ui/conditional-compilation/cfg-attr-syntax-validation.rs b/tests/ui/conditional-compilation/cfg-attr-syntax-validation.rs
index df87a3d846e..126a534dc6f 100644
--- a/tests/ui/conditional-compilation/cfg-attr-syntax-validation.rs
+++ b/tests/ui/conditional-compilation/cfg-attr-syntax-validation.rs
@@ -1,21 +1,25 @@
 #[cfg]
 //~^ ERROR malformed `cfg` attribute
 //~| NOTE expected this to be a list
+//~| NOTE for more information, visit
 struct S1;
 
 #[cfg = 10]
 //~^ ERROR malformed `cfg` attribute
 //~| NOTE expected this to be a list
+//~| NOTE for more information, visit
 struct S2;
 
 #[cfg()]
 //~^ ERROR malformed `cfg` attribute
 //~| NOTE expected a single argument here
+//~| NOTE for more information, visit
 struct S3;
 
 #[cfg(a, b)]
 //~^ ERROR malformed `cfg` attribute
 //~| NOTE expected a single argument here
+//~| NOTE for more information, visit
 struct S4;
 
 #[cfg("str")] //~ ERROR `cfg` predicate key must be an identifier
@@ -29,6 +33,7 @@ struct S7;
 
 #[cfg(a = 10)] //~ ERROR malformed `cfg` attribute input
 //~^ NOTE expected a string literal here
+//~| NOTE for more information, visit
 struct S8;
 
 #[cfg(a = b"hi")]  //~ ERROR malformed `cfg` attribute input
diff --git a/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr b/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr
index 75e9b9209c0..6acde758ea5 100644
--- a/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr
+++ b/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr
@@ -6,63 +6,73 @@ LL | #[cfg]
    | |
    | expected this to be a list
    | help: must be of the form: `#[cfg(predicate)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
 
 error[E0539]: malformed `cfg` attribute input
-  --> $DIR/cfg-attr-syntax-validation.rs:6:1
+  --> $DIR/cfg-attr-syntax-validation.rs:7:1
    |
 LL | #[cfg = 10]
    | ^^^^^^^^^^^
    | |
    | expected this to be a list
    | help: must be of the form: `#[cfg(predicate)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
 
 error[E0805]: malformed `cfg` attribute input
-  --> $DIR/cfg-attr-syntax-validation.rs:11:1
+  --> $DIR/cfg-attr-syntax-validation.rs:13:1
    |
 LL | #[cfg()]
    | ^^^^^--^
    | |    |
    | |    expected a single argument here
    | help: must be of the form: `#[cfg(predicate)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
 
 error[E0805]: malformed `cfg` attribute input
-  --> $DIR/cfg-attr-syntax-validation.rs:16:1
+  --> $DIR/cfg-attr-syntax-validation.rs:19:1
    |
 LL | #[cfg(a, b)]
    | ^^^^^------^
    | |    |
    | |    expected a single argument here
    | help: must be of the form: `#[cfg(predicate)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
 
 error: `cfg` predicate key must be an identifier
-  --> $DIR/cfg-attr-syntax-validation.rs:21:7
+  --> $DIR/cfg-attr-syntax-validation.rs:25:7
    |
 LL | #[cfg("str")]
    |       ^^^^^
 
 error: `cfg` predicate key must be an identifier
-  --> $DIR/cfg-attr-syntax-validation.rs:24:7
+  --> $DIR/cfg-attr-syntax-validation.rs:28:7
    |
 LL | #[cfg(a::b)]
    |       ^^^^
 
 error[E0537]: invalid predicate `a`
-  --> $DIR/cfg-attr-syntax-validation.rs:27:7
+  --> $DIR/cfg-attr-syntax-validation.rs:31:7
    |
 LL | #[cfg(a())]
    |       ^^^
 
 error[E0539]: malformed `cfg` attribute input
-  --> $DIR/cfg-attr-syntax-validation.rs:30:1
+  --> $DIR/cfg-attr-syntax-validation.rs:34:1
    |
 LL | #[cfg(a = 10)]
    | ^^^^^^^^^^--^^
    | |         |
    | |         expected a string literal here
    | help: must be of the form: `#[cfg(predicate)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
 
 error[E0539]: malformed `cfg` attribute input
-  --> $DIR/cfg-attr-syntax-validation.rs:34:1
+  --> $DIR/cfg-attr-syntax-validation.rs:39:1
    |
 LL | #[cfg(a = b"hi")]
    | ^^^^^^^^^^-^^^^^^
@@ -72,7 +82,7 @@ LL | #[cfg(a = b"hi")]
    = note: expected a normal string literal, not a byte string literal
 
 error: expected unsuffixed literal, found `expr` metavariable
-  --> $DIR/cfg-attr-syntax-validation.rs:40:25
+  --> $DIR/cfg-attr-syntax-validation.rs:45:25
    |
 LL |         #[cfg(feature = $expr)]
    |                         ^^^^^
diff --git a/tests/ui/conditional-compilation/test-cfg.rs b/tests/ui/conditional-compilation/test-cfg.rs
index adbbc309be4..b3fff26a8fd 100644
--- a/tests/ui/conditional-compilation/test-cfg.rs
+++ b/tests/ui/conditional-compilation/test-cfg.rs
@@ -1,8 +1,10 @@
 //@ compile-flags: --cfg foo --check-cfg=cfg(foo,bar)
 
 #[cfg(all(foo, bar))] // foo AND bar
-fn foo() {}
+//~^ NOTE the item is gated here
+fn foo() {} //~ NOTE found an item that was configured out
 
 fn main() {
     foo(); //~ ERROR cannot find function `foo` in this scope
+    //~^ NOTE not found in this scope
 }
diff --git a/tests/ui/conditional-compilation/test-cfg.stderr b/tests/ui/conditional-compilation/test-cfg.stderr
index 9715f16acc2..379456f74b1 100644
--- a/tests/ui/conditional-compilation/test-cfg.stderr
+++ b/tests/ui/conditional-compilation/test-cfg.stderr
@@ -1,8 +1,17 @@
 error[E0425]: cannot find function `foo` in this scope
-  --> $DIR/test-cfg.rs:7:5
+  --> $DIR/test-cfg.rs:8:5
    |
 LL |     foo();
    |     ^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/test-cfg.rs:5:4
+   |
+LL | #[cfg(all(foo, bar))] // foo AND bar
+   |                --- the item is gated here
+LL |
+LL | fn foo() {}
+   |    ^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/confuse-field-and-method/issue-18343.stderr b/tests/ui/confuse-field-and-method/issue-18343.stderr
index e50c971d837..9517617fe34 100644
--- a/tests/ui/confuse-field-and-method/issue-18343.stderr
+++ b/tests/ui/confuse-field-and-method/issue-18343.stderr
@@ -1,4 +1,4 @@
-error[E0599]: no method named `closure` found for struct `Obj` in the current scope
+error[E0599]: no method named `closure` found for struct `Obj<F>` in the current scope
   --> $DIR/issue-18343.rs:7:7
    |
 LL | struct Obj<F> where F: FnMut() -> u32 {
diff --git a/tests/ui/confuse-field-and-method/issue-2392.stderr b/tests/ui/confuse-field-and-method/issue-2392.stderr
index 77930de44a7..e1ad24df80f 100644
--- a/tests/ui/confuse-field-and-method/issue-2392.stderr
+++ b/tests/ui/confuse-field-and-method/issue-2392.stderr
@@ -1,4 +1,4 @@
-error[E0599]: no method named `closure` found for struct `Obj` in the current scope
+error[E0599]: no method named `closure` found for struct `Obj<F>` in the current scope
   --> $DIR/issue-2392.rs:36:15
    |
 LL | struct Obj<F> where F: FnOnce() -> u32 {
@@ -12,7 +12,7 @@ help: to call the closure stored in `closure`, surround the field access with pa
 LL |     (o_closure.closure)();
    |     +                 +
 
-error[E0599]: no method named `not_closure` found for struct `Obj` in the current scope
+error[E0599]: no method named `not_closure` found for struct `Obj<F>` in the current scope
   --> $DIR/issue-2392.rs:38:15
    |
 LL | struct Obj<F> where F: FnOnce() -> u32 {
@@ -23,7 +23,7 @@ LL |     o_closure.not_closure();
    |               |
    |               field, not a method
 
-error[E0599]: no method named `closure` found for struct `Obj` in the current scope
+error[E0599]: no method named `closure` found for struct `Obj<F>` in the current scope
   --> $DIR/issue-2392.rs:42:12
    |
 LL | struct Obj<F> where F: FnOnce() -> u32 {
@@ -65,7 +65,7 @@ help: to call the trait object stored in `boxed_closure`, surround the field acc
 LL |     (boxed_closure.boxed_closure)();
    |     +                           +
 
-error[E0599]: no method named `closure` found for struct `Obj` in the current scope
+error[E0599]: no method named `closure` found for struct `Obj<F>` in the current scope
   --> $DIR/issue-2392.rs:53:12
    |
 LL | struct Obj<F> where F: FnOnce() -> u32 {
@@ -79,7 +79,7 @@ help: to call the function stored in `closure`, surround the field access with p
 LL |     (w.wrap.closure)();
    |     +              +
 
-error[E0599]: no method named `not_closure` found for struct `Obj` in the current scope
+error[E0599]: no method named `not_closure` found for struct `Obj<F>` in the current scope
   --> $DIR/issue-2392.rs:55:12
    |
 LL | struct Obj<F> where F: FnOnce() -> u32 {
@@ -90,7 +90,7 @@ LL |     w.wrap.not_closure();
    |            |
    |            field, not a method
 
-error[E0599]: no method named `closure` found for struct `Obj` in the current scope
+error[E0599]: no method named `closure` found for struct `Obj<F>` in the current scope
   --> $DIR/issue-2392.rs:58:24
    |
 LL | struct Obj<F> where F: FnOnce() -> u32 {
diff --git a/tests/ui/const-generics/defaults/default-on-impl.rs b/tests/ui/const-generics/defaults/default-on-impl.rs
index 9ce46aa09de..85d0c583965 100644
--- a/tests/ui/const-generics/defaults/default-on-impl.rs
+++ b/tests/ui/const-generics/defaults/default-on-impl.rs
@@ -1,6 +1,6 @@
 struct Foo<const N: usize>;
 
 impl<const N: usize = 1> Foo<N> {}
-//~^ ERROR defaults for const parameters are only allowed
+//~^ ERROR defaults for generic parameters are not allowed here
 
 fn main() {}
diff --git a/tests/ui/const-generics/defaults/default-on-impl.stderr b/tests/ui/const-generics/defaults/default-on-impl.stderr
index 691e0354edd..eb5d57e14bf 100644
--- a/tests/ui/const-generics/defaults/default-on-impl.stderr
+++ b/tests/ui/const-generics/defaults/default-on-impl.stderr
@@ -1,4 +1,4 @@
-error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/default-on-impl.rs:3:6
    |
 LL | impl<const N: usize = 1> Foo<N> {}
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-105257.rs b/tests/ui/const-generics/generic_const_exprs/issue-105257.rs
index a107556fd79..85a28f2b330 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-105257.rs
+++ b/tests/ui/const-generics/generic_const_exprs/issue-105257.rs
@@ -1,10 +1,10 @@
 #![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
+#![expect(incomplete_features)]
 
 trait Trait<T> {
-    fn fnc<const N: usize = "">(&self) {} //~ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+    fn fnc<const N: usize = "">(&self) {} //~ERROR defaults for generic parameters are not allowed here
     //~^ ERROR: mismatched types
-    fn foo<const N: usize = { std::mem::size_of::<T>() }>(&self) {} //~ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+    fn foo<const N: usize = { std::mem::size_of::<T>() }>(&self) {} //~ERROR defaults for generic parameters are not allowed here
 }
 
 fn main() {}
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-105257.stderr b/tests/ui/const-generics/generic_const_exprs/issue-105257.stderr
index d7ded0f1f74..1d0ab56519c 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-105257.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-105257.stderr
@@ -1,10 +1,10 @@
-error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/issue-105257.rs:5:12
    |
 LL |     fn fnc<const N: usize = "">(&self) {}
    |            ^^^^^^^^^^^^^^^^^^^
 
-error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/issue-105257.rs:7:12
    |
 LL |     fn foo<const N: usize = { std::mem::size_of::<T>() }>(&self) {}
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs
index 73357d208c0..ac4d9fc0f4f 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs
+++ b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs
@@ -2,7 +2,7 @@
 //@ known-bug: #97477
 //@ failure-status: 101
 //@ normalize-stderr: "note: .*\n\n" -> ""
-//@ normalize-stderr: "thread 'rustc' panicked.*\n" -> ""
+//@ normalize-stderr: "thread 'rustc'.*panicked.*\n" -> ""
 //@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
 //@ rustc-env:RUST_BACKTRACE=0
 
diff --git a/tests/ui/const-generics/issues/issue-90318.rs b/tests/ui/const-generics/issues/issue-90318.rs
index 239171217eb..35b0dd216a1 100644
--- a/tests/ui/const-generics/issues/issue-90318.rs
+++ b/tests/ui/const-generics/issues/issue-90318.rs
@@ -1,4 +1,3 @@
-#![feature(const_type_id)]
 #![feature(generic_const_exprs)]
 #![feature(const_trait_impl, const_cmp)]
 #![feature(core_intrinsics)]
diff --git a/tests/ui/const-generics/issues/issue-90318.stderr b/tests/ui/const-generics/issues/issue-90318.stderr
index 7031230db91..f13fd795d7a 100644
--- a/tests/ui/const-generics/issues/issue-90318.stderr
+++ b/tests/ui/const-generics/issues/issue-90318.stderr
@@ -1,5 +1,5 @@
 error: overly complex generic constant
-  --> $DIR/issue-90318.rs:15:8
+  --> $DIR/issue-90318.rs:14:8
    |
 LL |     If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
    |        ^^-----------------^^^^^^^^^^^^^^^^^^^^^^^^
@@ -10,7 +10,7 @@ LL |     If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
    = note: this operation may be supported in the future
 
 error: overly complex generic constant
-  --> $DIR/issue-90318.rs:22:8
+  --> $DIR/issue-90318.rs:21:8
    |
 LL |     If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
    |        ^^-----------------^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/const-generics/min_const_generics/default_function_param.rs b/tests/ui/const-generics/min_const_generics/default_function_param.rs
index 92d495ef665..153cd94849e 100644
--- a/tests/ui/const-generics/min_const_generics/default_function_param.rs
+++ b/tests/ui/const-generics/min_const_generics/default_function_param.rs
@@ -1,4 +1,4 @@
 #![crate_type = "lib"]
 
 fn foo<const SIZE: usize = 5usize>() {}
-//~^ ERROR defaults for const parameters are
+//~^ ERROR defaults for generic parameters are not allowed here
diff --git a/tests/ui/const-generics/min_const_generics/default_function_param.stderr b/tests/ui/const-generics/min_const_generics/default_function_param.stderr
index 247eea3d989..261298a1c63 100644
--- a/tests/ui/const-generics/min_const_generics/default_function_param.stderr
+++ b/tests/ui/const-generics/min_const_generics/default_function_param.stderr
@@ -1,4 +1,4 @@
-error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/default_function_param.rs:3:8
    |
 LL | fn foo<const SIZE: usize = 5usize>() {}
diff --git a/tests/ui/issues/issue-77919.rs b/tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.rs
index bf603314977..5ab443422df 100644
--- a/tests/ui/issues/issue-77919.rs
+++ b/tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/77919
 fn main() {
     [1; <Multiply<Five, Five>>::VAL];
 }
diff --git a/tests/ui/issues/issue-77919.stderr b/tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.stderr
index dbbe70ff069..bac8abf46dc 100644
--- a/tests/ui/issues/issue-77919.stderr
+++ b/tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.stderr
@@ -1,5 +1,5 @@
 error[E0412]: cannot find type `PhantomData` in this scope
-  --> $DIR/issue-77919.rs:9:9
+  --> $DIR/trait-resolution-error-with-const-generics-77919.rs:10:9
    |
 LL |     _n: PhantomData,
    |         ^^^^^^^^^^^ not found in this scope
@@ -10,7 +10,7 @@ LL + use std::marker::PhantomData;
    |
 
 error[E0412]: cannot find type `VAL` in this scope
-  --> $DIR/issue-77919.rs:11:63
+  --> $DIR/trait-resolution-error-with-const-generics-77919.rs:12:63
    |
 LL | impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {}
    |                                                               ^^^ not found in this scope
@@ -21,7 +21,7 @@ LL | impl<N, M, VAL> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {}
    |          +++++
 
 error[E0046]: not all trait items implemented, missing: `VAL`
-  --> $DIR/issue-77919.rs:11:1
+  --> $DIR/trait-resolution-error-with-const-generics-77919.rs:12:1
    |
 LL |     const VAL: T;
    |     ------------ `VAL` from trait
diff --git a/tests/ui/issues/issue-98299.rs b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs
index ba63d963475..49c88856bc9 100644
--- a/tests/ui/issues/issue-98299.rs
+++ b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/98299
 use std::convert::TryFrom;
 
 pub fn test_usage(p: ()) {
diff --git a/tests/ui/issues/issue-98299.stderr b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr
index b645267e3b9..1557b83b00e 100644
--- a/tests/ui/issues/issue-98299.stderr
+++ b/tests/ui/const-generics/try-from-with-const-genericsrs-98299.stderr
@@ -1,5 +1,5 @@
 error[E0284]: type annotations needed for `SmallCString<_>`
-  --> $DIR/issue-98299.rs:4:36
+  --> $DIR/try-from-with-const-genericsrs-98299.rs:5:36
    |
 LL |     SmallCString::try_from(p).map(|cstr| cstr);
    |     ------------                   ^^^^
@@ -7,7 +7,7 @@ LL |     SmallCString::try_from(p).map(|cstr| cstr);
    |     type must be known at this point
    |
 note: required by a const generic parameter in `SmallCString`
-  --> $DIR/issue-98299.rs:10:25
+  --> $DIR/try-from-with-const-genericsrs-98299.rs:11:25
    |
 LL | pub struct SmallCString<const N: usize> {}
    |                         ^^^^^^^^^^^^^^ required by this const generic parameter in `SmallCString`
@@ -17,7 +17,7 @@ LL |     SmallCString::try_from(p).map(|cstr: SmallCString<N>| cstr);
    |                                        +++++++++++++++++
 
 error[E0284]: type annotations needed for `SmallCString<_>`
-  --> $DIR/issue-98299.rs:4:36
+  --> $DIR/try-from-with-const-genericsrs-98299.rs:5:36
    |
 LL |     SmallCString::try_from(p).map(|cstr| cstr);
    |     ------------                   ^^^^
@@ -25,7 +25,7 @@ LL |     SmallCString::try_from(p).map(|cstr| cstr);
    |     type must be known at this point
    |
 note: required for `SmallCString<_>` to implement `TryFrom<()>`
-  --> $DIR/issue-98299.rs:12:22
+  --> $DIR/try-from-with-const-genericsrs-98299.rs:13:22
    |
 LL | impl<const N: usize> TryFrom<()> for SmallCString<N> {
    |      --------------  ^^^^^^^^^^^     ^^^^^^^^^^^^^^^
@@ -37,7 +37,7 @@ LL |     SmallCString::try_from(p).map(|cstr: SmallCString<N>| cstr);
    |                                        +++++++++++++++++
 
 error[E0284]: type annotations needed for `SmallCString<_>`
-  --> $DIR/issue-98299.rs:4:36
+  --> $DIR/try-from-with-const-genericsrs-98299.rs:5:36
    |
 LL |     SmallCString::try_from(p).map(|cstr| cstr);
    |     -------------------------      ^^^^
@@ -45,7 +45,7 @@ LL |     SmallCString::try_from(p).map(|cstr| cstr);
    |     type must be known at this point
    |
 note: required for `SmallCString<_>` to implement `TryFrom<()>`
-  --> $DIR/issue-98299.rs:12:22
+  --> $DIR/try-from-with-const-genericsrs-98299.rs:13:22
    |
 LL | impl<const N: usize> TryFrom<()> for SmallCString<N> {
    |      --------------  ^^^^^^^^^^^     ^^^^^^^^^^^^^^^
diff --git a/tests/ui/issues/issue-13446.rs b/tests/ui/const-generics/vec-macro-in-static-array.rs
index 9f1fc42774f..7a81836e255 100644
--- a/tests/ui/issues/issue-13446.rs
+++ b/tests/ui/const-generics/vec-macro-in-static-array.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13446
+
 // Used to cause ICE
 
 static VEC: [u32; 256] = vec![];
diff --git a/tests/ui/issues/issue-13446.stderr b/tests/ui/const-generics/vec-macro-in-static-array.stderr
index 28c459e6e62..de21f2274f3 100644
--- a/tests/ui/issues/issue-13446.stderr
+++ b/tests/ui/const-generics/vec-macro-in-static-array.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-13446.rs:3:26
+  --> $DIR/vec-macro-in-static-array.rs:5:26
    |
 LL | static VEC: [u32; 256] = vec![];
    |                          ^^^^^^ expected `[u32; 256]`, found `Vec<_>`
diff --git a/tests/ui/consts/const-eval/issue-85155.stderr b/tests/ui/consts/const-eval/issue-85155.stderr
index f7777bfac02..486d2adaf8c 100644
--- a/tests/ui/consts/const-eval/issue-85155.stderr
+++ b/tests/ui/consts/const-eval/issue-85155.stderr
@@ -12,7 +12,7 @@ LL |     static_assert_imm1!(IMM1);
    |
    = note: this note originates in the macro `static_assert_imm1` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-note: the above error was encountered while instantiating `fn post_monomorphization_error::stdarch_intrinsic::<2>`
+note: the above error was encountered while instantiating `fn stdarch_intrinsic::<2>`
   --> $DIR/issue-85155.rs:19:5
    |
 LL |     post_monomorphization_error::stdarch_intrinsic::<2>();
diff --git a/tests/ui/issues/issue-32086.rs b/tests/ui/consts/const-pattern-rewrite-error-32086.rs
index d595d1dd7e6..d35dfe57687 100644
--- a/tests/ui/issues/issue-32086.rs
+++ b/tests/ui/consts/const-pattern-rewrite-error-32086.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/32086
 struct S(u8);
 const C: S = S(10);
 
diff --git a/tests/ui/issues/issue-32086.stderr b/tests/ui/consts/const-pattern-rewrite-error-32086.stderr
index e566dea8908..47616b06632 100644
--- a/tests/ui/issues/issue-32086.stderr
+++ b/tests/ui/consts/const-pattern-rewrite-error-32086.stderr
@@ -1,5 +1,5 @@
 error[E0532]: expected tuple struct or tuple variant, found constant `C`
-  --> $DIR/issue-32086.rs:5:9
+  --> $DIR/const-pattern-rewrite-error-32086.rs:6:9
    |
 LL | struct S(u8);
    | ------------- similarly named tuple struct `S` defined here
@@ -8,7 +8,7 @@ LL |     let C(a) = S(11);
    |         ^ help: a tuple struct with a similar name exists: `S`
 
 error[E0532]: expected tuple struct or tuple variant, found constant `C`
-  --> $DIR/issue-32086.rs:6:9
+  --> $DIR/const-pattern-rewrite-error-32086.rs:7:9
    |
 LL | struct S(u8);
    | ------------- similarly named tuple struct `S` defined here
diff --git a/tests/ui/consts/const-typeid-of-rpass.rs b/tests/ui/consts/const-typeid-of-rpass.rs
index 15ffdd1e83a..30f41070893 100644
--- a/tests/ui/consts/const-typeid-of-rpass.rs
+++ b/tests/ui/consts/const-typeid-of-rpass.rs
@@ -1,6 +1,4 @@
 //@ run-pass
-#![feature(const_type_id)]
-#![feature(core_intrinsics)]
 
 use std::any::TypeId;
 
diff --git a/tests/ui/consts/const_cmp_type_id.rs b/tests/ui/consts/const_cmp_type_id.rs
index 8c21f7b1a5a..ff44876c5c4 100644
--- a/tests/ui/consts/const_cmp_type_id.rs
+++ b/tests/ui/consts/const_cmp_type_id.rs
@@ -1,6 +1,6 @@
 //@ ignore-backends: gcc
 //@ compile-flags: -Znext-solver
-#![feature(const_type_id, const_trait_impl, const_cmp)]
+#![feature(const_trait_impl, const_cmp)]
 
 use std::any::TypeId;
 
diff --git a/tests/ui/consts/const_transmute_type_id.rs b/tests/ui/consts/const_transmute_type_id.rs
index a2d4cf37830..98783ad5b81 100644
--- a/tests/ui/consts/const_transmute_type_id.rs
+++ b/tests/ui/consts/const_transmute_type_id.rs
@@ -1,4 +1,4 @@
-#![feature(const_type_id, const_trait_impl, const_cmp)]
+#![feature(const_trait_impl, const_cmp)]
 
 use std::any::TypeId;
 
diff --git a/tests/ui/consts/const_transmute_type_id2.rs b/tests/ui/consts/const_transmute_type_id2.rs
index 3ceb2b942b0..7e09947b768 100644
--- a/tests/ui/consts/const_transmute_type_id2.rs
+++ b/tests/ui/consts/const_transmute_type_id2.rs
@@ -1,6 +1,6 @@
 //@ normalize-stderr: "0x(ff)+" -> "<u128::MAX>"
 
-#![feature(const_type_id, const_trait_impl, const_cmp)]
+#![feature( const_trait_impl, const_cmp)]
 
 use std::any::TypeId;
 
diff --git a/tests/ui/consts/const_transmute_type_id3.rs b/tests/ui/consts/const_transmute_type_id3.rs
index f1bb8cddf77..77c469d42f5 100644
--- a/tests/ui/consts/const_transmute_type_id3.rs
+++ b/tests/ui/consts/const_transmute_type_id3.rs
@@ -1,7 +1,7 @@
 //! Test that all bytes of a TypeId must have the
 //! TypeId marker provenance.
 
-#![feature(const_type_id, const_trait_impl, const_cmp)]
+#![feature( const_trait_impl, const_cmp)]
 
 use std::any::TypeId;
 
diff --git a/tests/ui/consts/const_transmute_type_id4.rs b/tests/ui/consts/const_transmute_type_id4.rs
index 0ea75f2a2f4..bedd6084a16 100644
--- a/tests/ui/consts/const_transmute_type_id4.rs
+++ b/tests/ui/consts/const_transmute_type_id4.rs
@@ -1,4 +1,4 @@
-#![feature(const_type_id, const_trait_impl, const_cmp)]
+#![feature(const_trait_impl, const_cmp)]
 
 use std::any::TypeId;
 
diff --git a/tests/ui/consts/const_transmute_type_id5.rs b/tests/ui/consts/const_transmute_type_id5.rs
index ae0429f8dbb..7f9a34104a3 100644
--- a/tests/ui/consts/const_transmute_type_id5.rs
+++ b/tests/ui/consts/const_transmute_type_id5.rs
@@ -1,7 +1,7 @@
 //! Test that we require an equal TypeId to have an integer part that properly
 //! reflects the type id hash.
 
-#![feature(const_type_id, const_trait_impl, const_cmp)]
+#![feature(const_trait_impl, const_cmp)]
 
 use std::any::TypeId;
 
diff --git a/tests/ui/consts/issue-102117.rs b/tests/ui/consts/issue-102117.rs
index 6cb9832bcd8..b7955283a8d 100644
--- a/tests/ui/consts/issue-102117.rs
+++ b/tests/ui/consts/issue-102117.rs
@@ -1,5 +1,3 @@
-#![feature(const_type_id)]
-
 use std::alloc::Layout;
 use std::any::TypeId;
 use std::mem::transmute;
diff --git a/tests/ui/consts/issue-102117.stderr b/tests/ui/consts/issue-102117.stderr
index da92db87f18..cea355d01d7 100644
--- a/tests/ui/consts/issue-102117.stderr
+++ b/tests/ui/consts/issue-102117.stderr
@@ -1,5 +1,5 @@
 error[E0310]: the parameter type `T` may not live long enough
-  --> $DIR/issue-102117.rs:19:26
+  --> $DIR/issue-102117.rs:17:26
    |
 LL |                 type_id: TypeId::of::<T>(),
    |                          ^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL |     pub fn new<T: 'static>() -> &'static Self {
    |                 +++++++++
 
 error[E0310]: the parameter type `T` may not live long enough
-  --> $DIR/issue-102117.rs:19:26
+  --> $DIR/issue-102117.rs:17:26
    |
 LL |                 type_id: TypeId::of::<T>(),
    |                          ^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/consts/issue-19244-1.stderr b/tests/ui/consts/issue-19244-1.stderr
index 9c1336402e6..98a33817b4c 100644
--- a/tests/ui/consts/issue-19244-1.stderr
+++ b/tests/ui/consts/issue-19244-1.stderr
@@ -3,6 +3,8 @@ error[E0609]: no field `1` on type `(usize,)`
    |
 LL |     let a: [isize; TUP.1];
    |                        ^ unknown field
+   |
+   = note: available field is: `0`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/issue-73976-monomorphic.rs b/tests/ui/consts/issue-73976-monomorphic.rs
index f43823fa155..6459150a660 100644
--- a/tests/ui/consts/issue-73976-monomorphic.rs
+++ b/tests/ui/consts/issue-73976-monomorphic.rs
@@ -6,7 +6,6 @@
 // will be properly rejected. This test will ensure that monomorphic use of these
 // would not be wrongly rejected in patterns.
 
-#![feature(const_type_id)]
 #![feature(const_type_name)]
 #![feature(const_trait_impl)]
 #![feature(const_cmp)]
diff --git a/tests/ui/consts/issue-73976-polymorphic.rs b/tests/ui/consts/issue-73976-polymorphic.rs
index 98b4005792d..db06706a970 100644
--- a/tests/ui/consts/issue-73976-polymorphic.rs
+++ b/tests/ui/consts/issue-73976-polymorphic.rs
@@ -5,7 +5,6 @@
 // This test case should either run-pass or be rejected at compile time.
 // Currently we just disallow this usage and require pattern is monomorphic.
 
-#![feature(const_type_id)]
 #![feature(const_type_name)]
 
 use std::any::{self, TypeId};
diff --git a/tests/ui/consts/issue-73976-polymorphic.stderr b/tests/ui/consts/issue-73976-polymorphic.stderr
index ec9512a2616..41a5e804c67 100644
--- a/tests/ui/consts/issue-73976-polymorphic.stderr
+++ b/tests/ui/consts/issue-73976-polymorphic.stderr
@@ -1,5 +1,5 @@
 error[E0158]: constant pattern cannot depend on generic parameters
-  --> $DIR/issue-73976-polymorphic.rs:20:37
+  --> $DIR/issue-73976-polymorphic.rs:19:37
    |
 LL | impl<T: 'static> GetTypeId<T> {
    | -----------------------------
@@ -12,7 +12,7 @@ LL |     matches!(GetTypeId::<T>::VALUE, GetTypeId::<T>::VALUE)
    |                                     ^^^^^^^^^^^^^^^^^^^^^ `const` depends on a generic parameter
 
 error[E0158]: constant pattern cannot depend on generic parameters
-  --> $DIR/issue-73976-polymorphic.rs:31:42
+  --> $DIR/issue-73976-polymorphic.rs:30:42
    |
 LL | impl<T: 'static> GetTypeNameLen<T> {
    | ----------------------------------
diff --git a/tests/ui/issues/issue-13763.rs b/tests/ui/consts/module-const-array-size-13763.rs
index 67b9bdc5f03..b1c6879ffd2 100644
--- a/tests/ui/issues/issue-13763.rs
+++ b/tests/ui/consts/module-const-array-size-13763.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13763
+
 //@ run-pass
 #![allow(dead_code)]
 
diff --git a/tests/ui/consts/required-consts/collect-in-dead-drop.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-drop.noopt.stderr
index 7c6219ccf93..38e169c9701 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-drop.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-drop.noopt.stderr
@@ -10,7 +10,7 @@ note: erroneous constant encountered
 LL |         let _ = Fail::<T>::C;
    |                 ^^^^^^^^^^^^
 
-note: the above error was encountered while instantiating `fn <Fail<i32> as std::ops::Drop>::drop`
+note: the above error was encountered while instantiating `fn <Fail<i32> as Drop>::drop`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/consts/required-consts/collect-in-dead-drop.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-drop.opt.stderr
index 7c6219ccf93..38e169c9701 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-drop.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-drop.opt.stderr
@@ -10,7 +10,7 @@ note: erroneous constant encountered
 LL |         let _ = Fail::<T>::C;
    |                 ^^^^^^^^^^^^
 
-note: the above error was encountered while instantiating `fn <Fail<i32> as std::ops::Drop>::drop`
+note: the above error was encountered while instantiating `fn <Fail<i32> as Drop>::drop`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.noopt.stderr
index a480a8c5a39..42a4ca2fd9d 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.noopt.stderr
@@ -10,7 +10,7 @@ note: erroneous constant encountered
 LL |             let _ = Fail::<T>::C;
    |                     ^^^^^^^^^^^^
 
-note: the above error was encountered while instantiating `fn m::not_called::<i32>`
+note: the above error was encountered while instantiating `fn not_called::<i32>`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.opt.stderr
index a480a8c5a39..42a4ca2fd9d 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.opt.stderr
@@ -10,7 +10,7 @@ note: erroneous constant encountered
 LL |             let _ = Fail::<T>::C;
    |                     ^^^^^^^^^^^^
 
-note: the above error was encountered while instantiating `fn m::not_called::<i32>`
+note: the above error was encountered while instantiating `fn not_called::<i32>`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/consts/required-consts/collect-in-dead-move.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-move.noopt.stderr
index 6c8edc00260..9f652e26f24 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-move.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-move.noopt.stderr
@@ -10,7 +10,7 @@ note: erroneous constant encountered
 LL |         let _ = Fail::<T>::C;
    |                 ^^^^^^^^^^^^
 
-note: the above error was encountered while instantiating `fn <Fail<i32> as std::ops::Drop>::drop`
+note: the above error was encountered while instantiating `fn <Fail<i32> as Drop>::drop`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/consts/required-consts/collect-in-dead-move.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-move.opt.stderr
index 6c8edc00260..9f652e26f24 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-move.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-move.opt.stderr
@@ -10,7 +10,7 @@ note: erroneous constant encountered
 LL |         let _ = Fail::<T>::C;
    |                 ^^^^^^^^^^^^
 
-note: the above error was encountered while instantiating `fn <Fail<i32> as std::ops::Drop>::drop`
+note: the above error was encountered while instantiating `fn <Fail<i32> as Drop>::drop`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/consts/required-consts/collect-in-dead-vtable.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-vtable.noopt.stderr
index 4e35beadbf4..0c12c0de197 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-vtable.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-vtable.noopt.stderr
@@ -10,7 +10,7 @@ note: erroneous constant encountered
 LL |             let _ = Fail::<T>::C;
    |                     ^^^^^^^^^^^^
 
-note: the above error was encountered while instantiating `fn <std::vec::Vec<i32> as MyTrait>::not_called`
+note: the above error was encountered while instantiating `fn <Vec<i32> as MyTrait>::not_called`
   --> $DIR/collect-in-dead-vtable.rs:31:40
    |
 LL |         let gen_vtable: &dyn MyTrait = &v; // vtable is "mentioned" here
diff --git a/tests/ui/consts/required-consts/collect-in-dead-vtable.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-vtable.opt.stderr
index 4e35beadbf4..0c12c0de197 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-vtable.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-vtable.opt.stderr
@@ -10,7 +10,7 @@ note: erroneous constant encountered
 LL |             let _ = Fail::<T>::C;
    |                     ^^^^^^^^^^^^
 
-note: the above error was encountered while instantiating `fn <std::vec::Vec<i32> as MyTrait>::not_called`
+note: the above error was encountered while instantiating `fn <Vec<i32> as MyTrait>::not_called`
   --> $DIR/collect-in-dead-vtable.rs:31:40
    |
 LL |         let gen_vtable: &dyn MyTrait = &v; // vtable is "mentioned" here
diff --git a/tests/ui/coroutine/clone-impl-async.rs b/tests/ui/coroutine/clone-impl-async.rs
index 2794b167aa2..4e2b26d0295 100644
--- a/tests/ui/coroutine/clone-impl-async.rs
+++ b/tests/ui/coroutine/clone-impl-async.rs
@@ -9,7 +9,7 @@ use std::future::ready;
 
 struct NonClone;
 
-fn main() {
+fn local() {
     let inner_non_clone = async {
         let non_clone = NonClone;
         let () = ready(()).await;
@@ -34,7 +34,9 @@ fn main() {
     //~^ ERROR : Copy` is not satisfied
     check_clone(&maybe_copy_clone);
     //~^ ERROR : Clone` is not satisfied
+}
 
+fn non_local() {
     let inner_non_clone_fn = the_inner_non_clone_fn();
     check_copy(&inner_non_clone_fn);
     //~^ ERROR : Copy` is not satisfied
@@ -69,3 +71,5 @@ async fn the_maybe_copy_clone_fn() {}
 
 fn check_copy<T: Copy>(_x: &T) {}
 fn check_clone<T: Clone>(_x: &T) {}
+
+fn main() {}
diff --git a/tests/ui/coroutine/clone-impl-async.stderr b/tests/ui/coroutine/clone-impl-async.stderr
index 62bcce2fbcb..319a5ed3d8d 100644
--- a/tests/ui/coroutine/clone-impl-async.stderr
+++ b/tests/ui/coroutine/clone-impl-async.stderr
@@ -1,167 +1,155 @@
-error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:13:27: 13:32}: Copy` is not satisfied
-  --> $DIR/clone-impl-async.rs:18:16
+error[E0277]: the trait bound `impl Future<Output = ()>: Copy` is not satisfied
+  --> $DIR/clone-impl-async.rs:41:16
    |
-LL |     check_copy(&inner_non_clone);
-   |     ---------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:13:27: 13:32}`
+LL |     check_copy(&inner_non_clone_fn);
+   |     ---------- ^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = ()>`
    |     |
    |     required by a bound introduced by this call
    |
 note: required by a bound in `check_copy`
-  --> $DIR/clone-impl-async.rs:70:18
+  --> $DIR/clone-impl-async.rs:72:18
    |
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:13:27: 13:32}: Clone` is not satisfied
-  --> $DIR/clone-impl-async.rs:20:17
+error[E0277]: the trait bound `impl Future<Output = ()>: Clone` is not satisfied
+  --> $DIR/clone-impl-async.rs:43:17
    |
-LL |     check_clone(&inner_non_clone);
-   |     ----------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:13:27: 13:32}`
+LL |     check_clone(&inner_non_clone_fn);
+   |     ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = ()>`
    |     |
    |     required by a bound introduced by this call
    |
 note: required by a bound in `check_clone`
-  --> $DIR/clone-impl-async.rs:71:19
+  --> $DIR/clone-impl-async.rs:73:19
    |
 LL | fn check_clone<T: Clone>(_x: &T) {}
    |                   ^^^^^ required by this bound in `check_clone`
 
-error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:24:27: 24:37}: Copy` is not satisfied
-  --> $DIR/clone-impl-async.rs:27:16
+error[E0277]: the trait bound `impl Future<Output = ()>: Copy` is not satisfied
+  --> $DIR/clone-impl-async.rs:47:16
    |
-LL |     check_copy(&outer_non_clone);
-   |     ---------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:24:27: 24:37}`
+LL |     check_copy(&outer_non_clone_fn);
+   |     ---------- ^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = ()>`
    |     |
    |     required by a bound introduced by this call
    |
 note: required by a bound in `check_copy`
-  --> $DIR/clone-impl-async.rs:70:18
+  --> $DIR/clone-impl-async.rs:72:18
    |
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:24:27: 24:37}: Clone` is not satisfied
-  --> $DIR/clone-impl-async.rs:29:17
+error[E0277]: the trait bound `impl Future<Output = ()>: Clone` is not satisfied
+  --> $DIR/clone-impl-async.rs:49:17
    |
-LL |     check_clone(&outer_non_clone);
-   |     ----------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:24:27: 24:37}`
+LL |     check_clone(&outer_non_clone_fn);
+   |     ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = ()>`
    |     |
    |     required by a bound introduced by this call
    |
 note: required by a bound in `check_clone`
-  --> $DIR/clone-impl-async.rs:71:19
+  --> $DIR/clone-impl-async.rs:73:19
    |
 LL | fn check_clone<T: Clone>(_x: &T) {}
    |                   ^^^^^ required by this bound in `check_clone`
 
-error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:32:28: 32:38}: Copy` is not satisfied
-  --> $DIR/clone-impl-async.rs:33:16
+error[E0277]: the trait bound `impl Future<Output = ()>: Copy` is not satisfied
+  --> $DIR/clone-impl-async.rs:53:16
    |
-LL |     check_copy(&maybe_copy_clone);
-   |     ---------- ^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:32:28: 32:38}`
+LL |     check_copy(&maybe_copy_clone_fn);
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = ()>`
    |     |
    |     required by a bound introduced by this call
    |
 note: required by a bound in `check_copy`
-  --> $DIR/clone-impl-async.rs:70:18
+  --> $DIR/clone-impl-async.rs:72:18
    |
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:32:28: 32:38}: Clone` is not satisfied
-  --> $DIR/clone-impl-async.rs:35:17
+error[E0277]: the trait bound `impl Future<Output = ()>: Clone` is not satisfied
+  --> $DIR/clone-impl-async.rs:55:17
    |
-LL |     check_clone(&maybe_copy_clone);
-   |     ----------- ^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:32:28: 32:38}`
+LL |     check_clone(&maybe_copy_clone_fn);
+   |     ----------- ^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = ()>`
    |     |
    |     required by a bound introduced by this call
    |
 note: required by a bound in `check_clone`
-  --> $DIR/clone-impl-async.rs:71:19
+  --> $DIR/clone-impl-async.rs:73:19
    |
 LL | fn check_clone<T: Clone>(_x: &T) {}
    |                   ^^^^^ required by this bound in `check_clone`
 
-error[E0277]: the trait bound `impl Future<Output = ()>: Copy` is not satisfied
-  --> $DIR/clone-impl-async.rs:39:16
+error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:13:27: 13:32}: Copy` is not satisfied
+  --> $DIR/clone-impl-async.rs:18:5
    |
-LL |     check_copy(&inner_non_clone_fn);
-   |     ---------- ^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = ()>`
-   |     |
-   |     required by a bound introduced by this call
+LL |     check_copy(&inner_non_clone);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:13:27: 13:32}`
    |
 note: required by a bound in `check_copy`
-  --> $DIR/clone-impl-async.rs:70:18
+  --> $DIR/clone-impl-async.rs:72:18
    |
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `impl Future<Output = ()>: Clone` is not satisfied
-  --> $DIR/clone-impl-async.rs:41:17
+error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:13:27: 13:32}: Clone` is not satisfied
+  --> $DIR/clone-impl-async.rs:20:5
    |
-LL |     check_clone(&inner_non_clone_fn);
-   |     ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = ()>`
-   |     |
-   |     required by a bound introduced by this call
+LL |     check_clone(&inner_non_clone);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:13:27: 13:32}`
    |
 note: required by a bound in `check_clone`
-  --> $DIR/clone-impl-async.rs:71:19
+  --> $DIR/clone-impl-async.rs:73:19
    |
 LL | fn check_clone<T: Clone>(_x: &T) {}
    |                   ^^^^^ required by this bound in `check_clone`
 
-error[E0277]: the trait bound `impl Future<Output = ()>: Copy` is not satisfied
-  --> $DIR/clone-impl-async.rs:45:16
+error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:24:27: 24:37}: Copy` is not satisfied
+  --> $DIR/clone-impl-async.rs:27:5
    |
-LL |     check_copy(&outer_non_clone_fn);
-   |     ---------- ^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = ()>`
-   |     |
-   |     required by a bound introduced by this call
+LL |     check_copy(&outer_non_clone);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:24:27: 24:37}`
    |
 note: required by a bound in `check_copy`
-  --> $DIR/clone-impl-async.rs:70:18
+  --> $DIR/clone-impl-async.rs:72:18
    |
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `impl Future<Output = ()>: Clone` is not satisfied
-  --> $DIR/clone-impl-async.rs:47:17
+error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:24:27: 24:37}: Clone` is not satisfied
+  --> $DIR/clone-impl-async.rs:29:5
    |
-LL |     check_clone(&outer_non_clone_fn);
-   |     ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = ()>`
-   |     |
-   |     required by a bound introduced by this call
+LL |     check_clone(&outer_non_clone);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:24:27: 24:37}`
    |
 note: required by a bound in `check_clone`
-  --> $DIR/clone-impl-async.rs:71:19
+  --> $DIR/clone-impl-async.rs:73:19
    |
 LL | fn check_clone<T: Clone>(_x: &T) {}
    |                   ^^^^^ required by this bound in `check_clone`
 
-error[E0277]: the trait bound `impl Future<Output = ()>: Copy` is not satisfied
-  --> $DIR/clone-impl-async.rs:51:16
+error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:32:28: 32:38}: Copy` is not satisfied
+  --> $DIR/clone-impl-async.rs:33:5
    |
-LL |     check_copy(&maybe_copy_clone_fn);
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = ()>`
-   |     |
-   |     required by a bound introduced by this call
+LL |     check_copy(&maybe_copy_clone);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:32:28: 32:38}`
    |
 note: required by a bound in `check_copy`
-  --> $DIR/clone-impl-async.rs:70:18
+  --> $DIR/clone-impl-async.rs:72:18
    |
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `impl Future<Output = ()>: Clone` is not satisfied
-  --> $DIR/clone-impl-async.rs:53:17
+error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:32:28: 32:38}: Clone` is not satisfied
+  --> $DIR/clone-impl-async.rs:35:5
    |
-LL |     check_clone(&maybe_copy_clone_fn);
-   |     ----------- ^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = ()>`
-   |     |
-   |     required by a bound introduced by this call
+LL |     check_clone(&maybe_copy_clone);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:32:28: 32:38}`
    |
 note: required by a bound in `check_clone`
-  --> $DIR/clone-impl-async.rs:71:19
+  --> $DIR/clone-impl-async.rs:73:19
    |
 LL | fn check_clone<T: Clone>(_x: &T) {}
    |                   ^^^^^ required by this bound in `check_clone`
diff --git a/tests/ui/coroutine/clone-impl-static.stderr b/tests/ui/coroutine/clone-impl-static.stderr
index 9fb71fd5fd0..4df6b9759c3 100644
--- a/tests/ui/coroutine/clone-impl-static.stderr
+++ b/tests/ui/coroutine/clone-impl-static.stderr
@@ -1,10 +1,8 @@
 error[E0277]: the trait bound `{static coroutine@$DIR/clone-impl-static.rs:11:5: 11:19}: Copy` is not satisfied
-  --> $DIR/clone-impl-static.rs:14:16
+  --> $DIR/clone-impl-static.rs:14:5
    |
 LL |     check_copy(&generator);
-   |     ---------- ^^^^^^^^^^ the trait `Copy` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:11:5: 11:19}`
-   |     |
-   |     required by a bound introduced by this call
+   |     ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:11:5: 11:19}`
    |
 note: required by a bound in `check_copy`
   --> $DIR/clone-impl-static.rs:20:18
@@ -13,12 +11,10 @@ LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
 error[E0277]: the trait bound `{static coroutine@$DIR/clone-impl-static.rs:11:5: 11:19}: Clone` is not satisfied
-  --> $DIR/clone-impl-static.rs:16:17
+  --> $DIR/clone-impl-static.rs:16:5
    |
 LL |     check_clone(&generator);
-   |     ----------- ^^^^^^^^^^ the trait `Clone` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:11:5: 11:19}`
-   |     |
-   |     required by a bound introduced by this call
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:11:5: 11:19}`
    |
 note: required by a bound in `check_clone`
   --> $DIR/clone-impl-static.rs:21:19
diff --git a/tests/ui/coroutine/clone-impl.rs b/tests/ui/coroutine/clone-impl.rs
index e528f031d52..9e04e256fc1 100644
--- a/tests/ui/coroutine/clone-impl.rs
+++ b/tests/ui/coroutine/clone-impl.rs
@@ -42,6 +42,7 @@ fn test3_upvars() {
     let clonable_0: Vec<u32> = Vec::new();
     let gen_clone_0 = #[coroutine]
     move || {
+        yield;
         drop(clonable_0);
     };
     check_copy(&gen_clone_0);
diff --git a/tests/ui/coroutine/clone-impl.stderr b/tests/ui/coroutine/clone-impl.stderr
index 714e5aa3d9e..f316902a42d 100644
--- a/tests/ui/coroutine/clone-impl.stderr
+++ b/tests/ui/coroutine/clone-impl.stderr
@@ -1,59 +1,81 @@
 error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`
-  --> $DIR/clone-impl.rs:47:16
+  --> $DIR/clone-impl.rs:48:5
    |
 LL |     move || {
    |     ------- within this `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`
 ...
 LL |     check_copy(&gen_clone_0);
-   |                ^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`, the trait `Copy` is not implemented for `Vec<u32>`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`, the trait `Copy` is not implemented for `Vec<u32>`
    |
 note: captured value does not implement `Copy`
-  --> $DIR/clone-impl.rs:45:14
+  --> $DIR/clone-impl.rs:46:14
    |
 LL |         drop(clonable_0);
    |              ^^^^^^^^^^ has type `Vec<u32>` which does not implement `Copy`
 note: required by a bound in `check_copy`
-  --> $DIR/clone-impl.rs:91:18
+  --> $DIR/clone-impl.rs:92:18
    |
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:67:5: 67:12}`
-  --> $DIR/clone-impl.rs:73:16
+error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:55:5: 55:12}`
+  --> $DIR/clone-impl.rs:60:5
    |
 LL |     move || {
-   |     ------- within this `{coroutine@$DIR/clone-impl.rs:67:5: 67:12}`
+   |     ------- within this `{coroutine@$DIR/clone-impl.rs:55:5: 55:12}`
 ...
 LL |     check_copy(&gen_clone_1);
-   |                ^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:67:5: 67:12}`, the trait `Copy` is not implemented for `Vec<u32>`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:55:5: 55:12}`, the trait `Copy` is not implemented for `Vec<char>`
+   |
+note: coroutine does not implement `Copy` as this value is used across a yield
+  --> $DIR/clone-impl.rs:57:9
+   |
+LL |         let v = vec!['a'];
+   |             - has type `Vec<char>` which does not implement `Copy`
+LL |         yield;
+   |         ^^^^^ yield occurs here, with `v` maybe used later
+note: required by a bound in `check_copy`
+  --> $DIR/clone-impl.rs:92:18
+   |
+LL | fn check_copy<T: Copy>(_x: &T) {}
+   |                  ^^^^ required by this bound in `check_copy`
+
+error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:68:5: 68:12}`
+  --> $DIR/clone-impl.rs:74:5
+   |
+LL |     move || {
+   |     ------- within this `{coroutine@$DIR/clone-impl.rs:68:5: 68:12}`
+...
+LL |     check_copy(&gen_clone_1);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:68:5: 68:12}`, the trait `Copy` is not implemented for `Vec<u32>`
    |
 note: captured value does not implement `Copy`
-  --> $DIR/clone-impl.rs:71:14
+  --> $DIR/clone-impl.rs:72:14
    |
 LL |         drop(clonable_1);
    |              ^^^^^^^^^^ has type `Vec<u32>` which does not implement `Copy`
 note: required by a bound in `check_copy`
-  --> $DIR/clone-impl.rs:91:18
+  --> $DIR/clone-impl.rs:92:18
    |
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:81:5: 81:12}`
-  --> $DIR/clone-impl.rs:85:16
+error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:82:5: 82:12}`
+  --> $DIR/clone-impl.rs:86:5
    |
 LL |     move || {
-   |     ------- within this `{coroutine@$DIR/clone-impl.rs:81:5: 81:12}`
+   |     ------- within this `{coroutine@$DIR/clone-impl.rs:82:5: 82:12}`
 ...
 LL |     check_copy(&gen_non_clone);
-   |                ^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:81:5: 81:12}`, the trait `Copy` is not implemented for `NonClone`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:82:5: 82:12}`, the trait `Copy` is not implemented for `NonClone`
    |
 note: captured value does not implement `Copy`
-  --> $DIR/clone-impl.rs:83:14
+  --> $DIR/clone-impl.rs:84:14
    |
 LL |         drop(non_clonable);
    |              ^^^^^^^^^^^^ has type `NonClone` which does not implement `Copy`
 note: required by a bound in `check_copy`
-  --> $DIR/clone-impl.rs:91:18
+  --> $DIR/clone-impl.rs:92:18
    |
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
@@ -63,22 +85,22 @@ LL + #[derive(Copy)]
 LL | struct NonClone;
    |
 
-error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{coroutine@$DIR/clone-impl.rs:81:5: 81:12}`
-  --> $DIR/clone-impl.rs:87:17
+error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{coroutine@$DIR/clone-impl.rs:82:5: 82:12}`
+  --> $DIR/clone-impl.rs:88:5
    |
 LL |     move || {
-   |     ------- within this `{coroutine@$DIR/clone-impl.rs:81:5: 81:12}`
+   |     ------- within this `{coroutine@$DIR/clone-impl.rs:82:5: 82:12}`
 ...
 LL |     check_clone(&gen_non_clone);
-   |                 ^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:81:5: 81:12}`, the trait `Clone` is not implemented for `NonClone`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:82:5: 82:12}`, the trait `Clone` is not implemented for `NonClone`
    |
 note: captured value does not implement `Clone`
-  --> $DIR/clone-impl.rs:83:14
+  --> $DIR/clone-impl.rs:84:14
    |
 LL |         drop(non_clonable);
    |              ^^^^^^^^^^^^ has type `NonClone` which does not implement `Clone`
 note: required by a bound in `check_clone`
-  --> $DIR/clone-impl.rs:92:19
+  --> $DIR/clone-impl.rs:93:19
    |
 LL | fn check_clone<T: Clone>(_x: &T) {}
    |                   ^^^^^ required by this bound in `check_clone`
@@ -88,28 +110,6 @@ LL + #[derive(Clone)]
 LL | struct NonClone;
    |
 
-error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:54:5: 54:12}`
-  --> $DIR/clone-impl.rs:59:5
-   |
-LL |     move || {
-   |     ------- within this `{coroutine@$DIR/clone-impl.rs:54:5: 54:12}`
-...
-LL |     check_copy(&gen_clone_1);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:54:5: 54:12}`, the trait `Copy` is not implemented for `Vec<char>`
-   |
-note: coroutine does not implement `Copy` as this value is used across a yield
-  --> $DIR/clone-impl.rs:56:9
-   |
-LL |         let v = vec!['a'];
-   |             - has type `Vec<char>` which does not implement `Copy`
-LL |         yield;
-   |         ^^^^^ yield occurs here, with `v` maybe used later
-note: required by a bound in `check_copy`
-  --> $DIR/clone-impl.rs:91:18
-   |
-LL | fn check_copy<T: Copy>(_x: &T) {}
-   |                  ^^^^ required by this bound in `check_copy`
-
 error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-2.stderr b/tests/ui/coroutine/print/coroutine-print-verbose-2.stderr
index 8877d45ddda..11b78e3bcf8 100644
--- a/tests/ui/coroutine/print/coroutine-print-verbose-2.stderr
+++ b/tests/ui/coroutine/print/coroutine-print-verbose-2.stderr
@@ -9,7 +9,7 @@ LL | |         drop(a);
 LL | |     });
    | |______^ coroutine is not `Sync`
    |
-   = help: within `{main::{closure#0} upvar_tys=() resume_ty=() yield_ty=() return_ty=() witness={main::{closure#0}}}`, the trait `Sync` is not implemented for `NotSync`
+   = help: within `{main::{closure#0} upvar_tys=() resume_ty=() yield_ty=() return_ty=()}`, the trait `Sync` is not implemented for `NotSync`
 note: coroutine is not `Sync` as this value is used across a yield
   --> $DIR/coroutine-print-verbose-2.rs:20:9
    |
@@ -34,7 +34,7 @@ LL | |         drop(a);
 LL | |     });
    | |______^ coroutine is not `Send`
    |
-   = help: within `{main::{closure#1} upvar_tys=() resume_ty=() yield_ty=() return_ty=() witness={main::{closure#1}}}`, the trait `Send` is not implemented for `NotSend`
+   = help: within `{main::{closure#1} upvar_tys=() resume_ty=() yield_ty=() return_ty=()}`, the trait `Send` is not implemented for `NotSend`
 note: coroutine is not `Send` as this value is used across a yield
   --> $DIR/coroutine-print-verbose-2.rs:27:9
    |
diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-3.stderr b/tests/ui/coroutine/print/coroutine-print-verbose-3.stderr
index 4a1e5b078a8..135e8175793 100644
--- a/tests/ui/coroutine/print/coroutine-print-verbose-3.stderr
+++ b/tests/ui/coroutine/print/coroutine-print-verbose-3.stderr
@@ -11,7 +11,7 @@ LL | |     };
    | |_____^ expected `()`, found coroutine
    |
    = note: expected unit type `()`
-              found coroutine `{main::{closure#0} upvar_tys=?4t resume_ty=() yield_ty=i32 return_ty=&'?1 str witness={main::{closure#0}}}`
+              found coroutine `{main::{closure#0} upvar_tys=?4t resume_ty=() yield_ty=i32 return_ty=&'?1 str}`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/coroutine/ref-upvar-not-send.stderr b/tests/ui/coroutine/ref-upvar-not-send.stderr
index 892b5d261c2..3a5e8ec4dab 100644
--- a/tests/ui/coroutine/ref-upvar-not-send.stderr
+++ b/tests/ui/coroutine/ref-upvar-not-send.stderr
@@ -1,14 +1,13 @@
 error: coroutine cannot be sent between threads safely
-  --> $DIR/ref-upvar-not-send.rs:15:30
+  --> $DIR/ref-upvar-not-send.rs:15:5
    |
-LL |       assert_send(#[coroutine] move || {
-   |  ______________________________^
+LL | /     assert_send(#[coroutine] move || {
 LL | |
 LL | |
 LL | |         yield;
 LL | |         let _x = x;
 LL | |     });
-   | |_____^ coroutine is not `Send`
+   | |______^ coroutine is not `Send`
    |
    = help: the trait `Sync` is not implemented for `*mut ()`
 note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
@@ -23,16 +22,15 @@ LL | fn assert_send<T: Send>(_: T) {}
    |                   ^^^^ required by this bound in `assert_send`
 
 error: coroutine cannot be sent between threads safely
-  --> $DIR/ref-upvar-not-send.rs:23:30
+  --> $DIR/ref-upvar-not-send.rs:23:5
    |
-LL |       assert_send(#[coroutine] move || {
-   |  ______________________________^
+LL | /     assert_send(#[coroutine] move || {
 LL | |
 LL | |
 LL | |         yield;
 LL | |         let _y = y;
 LL | |     });
-   | |_____^ coroutine is not `Send`
+   | |______^ coroutine is not `Send`
    |
    = help: within `{coroutine@$DIR/ref-upvar-not-send.rs:23:30: 23:37}`, the trait `Send` is not implemented for `*mut ()`
 note: captured value is not `Send` because `&mut` references cannot be sent unless their referent is `Send`
diff --git a/tests/ui/issues/auxiliary/issue-5521.rs b/tests/ui/cross-crate/auxiliary/aux-5521.rs
index c2f81779b35..c2f81779b35 100644
--- a/tests/ui/issues/auxiliary/issue-5521.rs
+++ b/tests/ui/cross-crate/auxiliary/aux-5521.rs
diff --git a/tests/ui/issues/auxiliary/issue-9155.rs b/tests/ui/cross-crate/auxiliary/aux-9155.rs
index 049a96a655a..049a96a655a 100644
--- a/tests/ui/issues/auxiliary/issue-9155.rs
+++ b/tests/ui/cross-crate/auxiliary/aux-9155.rs
diff --git a/tests/ui/issues/auxiliary/issue-9906.rs b/tests/ui/cross-crate/auxiliary/aux-9906.rs
index 8a3eea790a2..8a3eea790a2 100644
--- a/tests/ui/issues/auxiliary/issue-9906.rs
+++ b/tests/ui/cross-crate/auxiliary/aux-9906.rs
diff --git a/tests/ui/issues/issue-5521.rs b/tests/ui/cross-crate/cross-crate-map-usage-5521.rs
index 45896ae8128..ffce846be2c 100644
--- a/tests/ui/issues/issue-5521.rs
+++ b/tests/ui/cross-crate/cross-crate-map-usage-5521.rs
@@ -1,10 +1,9 @@
+// https://github.com/rust-lang/rust/issues/5521
 //@ run-pass
 #![allow(dead_code)]
-//@ aux-build:issue-5521.rs
+//@ aux-build:aux-5521.rs
 
-
-
-extern crate issue_5521 as foo;
+extern crate aux_5521 as foo;
 
 fn bar(a: foo::map) {
     if false {
diff --git a/tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs b/tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs
new file mode 100644
index 00000000000..35286615980
--- /dev/null
+++ b/tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs
@@ -0,0 +1,11 @@
+// https://github.com/rust-lang/rust/issues/9155
+//@ run-pass
+//@ aux-build:aux-9155.rs
+
+extern crate aux_9155;
+
+struct Baz;
+
+pub fn main() {
+    aux_9155::Foo::new(Baz);
+}
diff --git a/tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs b/tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs
new file mode 100644
index 00000000000..b49951bd1f9
--- /dev/null
+++ b/tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs
@@ -0,0 +1,10 @@
+// https://github.com/rust-lang/rust/issues/9906
+//@ run-pass
+//@ aux-build:aux-9906.rs
+
+extern crate aux_9906 as testmod;
+
+pub fn main() {
+    testmod::foo();
+    testmod::FooBar::new(1);
+}
diff --git a/tests/ui/custom_test_frameworks/mismatch.stderr b/tests/ui/custom_test_frameworks/mismatch.stderr
index c7798635fbf..7cdfaa9e804 100644
--- a/tests/ui/custom_test_frameworks/mismatch.stderr
+++ b/tests/ui/custom_test_frameworks/mismatch.stderr
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `TestDescAndFn: Testable` is not satisfied
   --> $DIR/mismatch.rs:9:1
    |
 LL | #[test]
-   | ------- in this procedural macro expansion
+   | ------- in this attribute macro expansion
 LL | fn wrong_kind(){}
    | ^^^^^^^^^^^^^^^^^ the trait `Testable` is not implemented for `TestDescAndFn`
    |
diff --git a/tests/ui/delegation/correct_body_owner_parent_found_in_diagnostics.stderr b/tests/ui/delegation/correct_body_owner_parent_found_in_diagnostics.stderr
index 61e2a8f64dd..b0bfc720658 100644
--- a/tests/ui/delegation/correct_body_owner_parent_found_in_diagnostics.stderr
+++ b/tests/ui/delegation/correct_body_owner_parent_found_in_diagnostics.stderr
@@ -43,7 +43,7 @@ help: consider introducing lifetime `'a` here
 LL | impl<'a> Trait for Z {
    |     ++++
 
-error[E0599]: no function or associated item named `new` found for struct `InvariantRef` in the current scope
+error[E0599]: no function or associated item named `new` found for struct `InvariantRef<'a, T>` in the current scope
   --> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:9:41
    |
 LL | pub struct InvariantRef<'a, T: ?Sized>(&'a T, PhantomData<&'a mut &'a T>);
diff --git a/tests/ui/deprecation/deprecation-sanity.stderr b/tests/ui/deprecation/deprecation-sanity.stderr
index f1b4697485c..856f51a4b24 100644
--- a/tests/ui/deprecation/deprecation-sanity.stderr
+++ b/tests/ui/deprecation/deprecation-sanity.stderr
@@ -18,11 +18,15 @@ LL -     #[deprecated(since = "a", note)]
 LL +     #[deprecated = "reason"]
    |
 LL -     #[deprecated(since = "a", note)]
-LL +     #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
+LL +     #[deprecated(note = "reason")]
    |
 LL -     #[deprecated(since = "a", note)]
-LL +     #[deprecated]
+LL +     #[deprecated(since = "version")]
    |
+LL -     #[deprecated(since = "a", note)]
+LL +     #[deprecated(since = "version", note = "reason")]
+   |
+   = and 1 other candidate
 
 error[E0539]: malformed `deprecated` attribute input
   --> $DIR/deprecation-sanity.rs:10:5
@@ -38,11 +42,15 @@ LL -     #[deprecated(since, note = "a")]
 LL +     #[deprecated = "reason"]
    |
 LL -     #[deprecated(since, note = "a")]
-LL +     #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
+LL +     #[deprecated(note = "reason")]
+   |
+LL -     #[deprecated(since, note = "a")]
+LL +     #[deprecated(since = "version")]
    |
 LL -     #[deprecated(since, note = "a")]
-LL +     #[deprecated]
+LL +     #[deprecated(since = "version", note = "reason")]
    |
+   = and 1 other candidate
 
 error[E0539]: malformed `deprecated` attribute input
   --> $DIR/deprecation-sanity.rs:13:5
@@ -58,11 +66,15 @@ LL -     #[deprecated(since = "a", note(b))]
 LL +     #[deprecated = "reason"]
    |
 LL -     #[deprecated(since = "a", note(b))]
-LL +     #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
+LL +     #[deprecated(note = "reason")]
+   |
+LL -     #[deprecated(since = "a", note(b))]
+LL +     #[deprecated(since = "version")]
    |
 LL -     #[deprecated(since = "a", note(b))]
-LL +     #[deprecated]
+LL +     #[deprecated(since = "version", note = "reason")]
    |
+   = and 1 other candidate
 
 error[E0539]: malformed `deprecated` attribute input
   --> $DIR/deprecation-sanity.rs:16:5
@@ -78,11 +90,15 @@ LL -     #[deprecated(since(b), note = "a")]
 LL +     #[deprecated = "reason"]
    |
 LL -     #[deprecated(since(b), note = "a")]
-LL +     #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
+LL +     #[deprecated(note = "reason")]
    |
 LL -     #[deprecated(since(b), note = "a")]
-LL +     #[deprecated]
+LL +     #[deprecated(since = "version")]
    |
+LL -     #[deprecated(since(b), note = "a")]
+LL +     #[deprecated(since = "version", note = "reason")]
+   |
+   = and 1 other candidate
 
 error[E0539]: malformed `deprecated` attribute input
   --> $DIR/deprecation-sanity.rs:19:5
@@ -108,11 +124,15 @@ LL -     #[deprecated("test")]
 LL +     #[deprecated = "reason"]
    |
 LL -     #[deprecated("test")]
-LL +     #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
+LL +     #[deprecated(note = "reason")]
+   |
+LL -     #[deprecated("test")]
+LL +     #[deprecated(since = "version")]
    |
 LL -     #[deprecated("test")]
-LL +     #[deprecated]
+LL +     #[deprecated(since = "version", note = "reason")]
    |
+   = and 1 other candidate
 
 error: multiple `deprecated` attributes
   --> $DIR/deprecation-sanity.rs:27:1
@@ -140,11 +160,15 @@ LL - #[deprecated(since = "a", since = "b", note = "c")]
 LL + #[deprecated = "reason"]
    |
 LL - #[deprecated(since = "a", since = "b", note = "c")]
-LL + #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
+LL + #[deprecated(note = "reason")]
+   |
+LL - #[deprecated(since = "a", since = "b", note = "c")]
+LL + #[deprecated(since = "version")]
    |
 LL - #[deprecated(since = "a", since = "b", note = "c")]
-LL + #[deprecated]
+LL + #[deprecated(since = "version", note = "reason")]
    |
+   = and 1 other candidate
 
 error: this `#[deprecated]` annotation has no effect
   --> $DIR/deprecation-sanity.rs:35:1
diff --git a/tests/ui/issues/issue-22992.rs b/tests/ui/deref/dereferenceable-type-behavior-22992.rs
index 3bc15cc948a..19fc2e7eb0b 100644
--- a/tests/ui/issues/issue-22992.rs
+++ b/tests/ui/deref/dereferenceable-type-behavior-22992.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/22992
 //@ run-pass
 
 struct X { val: i32 }
@@ -6,7 +7,6 @@ impl std::ops::Deref for X {
     fn deref(&self) -> &i32 { &self.val }
 }
 
-
 trait            M                   { fn m(self); }
 impl             M for i32           { fn m(self) { println!("i32::m()"); } }
 impl             M for X             { fn m(self) { println!("X::m()"); } }
diff --git a/tests/ui/issues/issue-15523-big.rs b/tests/ui/derives/derive-partial-ord-discriminant-64bit.rs
index 7214a4fb1d5..5b6bf6fbf1f 100644
--- a/tests/ui/issues/issue-15523-big.rs
+++ b/tests/ui/derives/derive-partial-ord-discriminant-64bit.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15523
+
 //@ run-pass
 // Issue 15523: derive(PartialOrd) should use the provided
 // discriminant values for the derived ordering.
@@ -28,7 +30,6 @@ fn main() {
     assert!(Eu64::Pos2 < Eu64::PosMax);
     assert!(Eu64::Pos1 < Eu64::PosMax);
 
-
     assert!(Ei64::Pos2 > Ei64::Pos1);
     assert!(Ei64::Pos2 > Ei64::Neg1);
     assert!(Ei64::Pos1 > Ei64::Neg1);
diff --git a/tests/ui/issues/issue-15523.rs b/tests/ui/derives/derive-partial-ord-discriminant.rs
index 9fc2e51c6ab..28f325ec966 100644
--- a/tests/ui/issues/issue-15523.rs
+++ b/tests/ui/derives/derive-partial-ord-discriminant.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15523
+
 //@ run-pass
 // Issue 15523: derive(PartialOrd) should use the provided
 // discriminant values for the derived ordering.
diff --git a/tests/ui/diagnostic-width/long-E0609.stderr b/tests/ui/diagnostic-width/long-E0609.stderr
index 36ef8545746..70092ea34bc 100644
--- a/tests/ui/diagnostic-width/long-E0609.stderr
+++ b/tests/ui/diagnostic-width/long-E0609.stderr
@@ -4,6 +4,7 @@ error[E0609]: no field `field` on type `(..., ..., ..., ...)`
 LL |     x.field;
    |       ^^^^^ unknown field
    |
+   = note: available fields are: `0`, `1`, `2`, `3`
    = note: the full name for the type has been written to '$TEST_BUILD_DIR/long-E0609.long-type-$LONG_TYPE_HASH.txt'
    = note: consider using `--verbose` to print the full type name to the console
 
diff --git a/tests/ui/issues/issue-46332.rs b/tests/ui/did_you_mean/typo-suggestion-improvement-46332.rs
index bed74e3138a..3dd686a66b0 100644
--- a/tests/ui/issues/issue-46332.rs
+++ b/tests/ui/did_you_mean/typo-suggestion-improvement-46332.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/46332
 // Original Levenshtein distance for both of this is 1. We improved accuracy with
 // additional case insensitive comparison.
 
diff --git a/tests/ui/issues/issue-46332.stderr b/tests/ui/did_you_mean/typo-suggestion-improvement-46332.stderr
index 8c0c1dfa6ee..502f8151878 100644
--- a/tests/ui/issues/issue-46332.stderr
+++ b/tests/ui/did_you_mean/typo-suggestion-improvement-46332.stderr
@@ -1,5 +1,5 @@
 error[E0422]: cannot find struct, variant or union type `TyUInt` in this scope
-  --> $DIR/issue-46332.rs:9:5
+  --> $DIR/typo-suggestion-improvement-46332.rs:10:5
    |
 LL | struct TyUint {}
    | ------------- similarly named struct `TyUint` defined here
diff --git a/tests/ui/dist/cranelift-x86_64-unknown-linux-gnu-dist.rs b/tests/ui/dist/cranelift-x86_64-unknown-linux-gnu-dist.rs
new file mode 100644
index 00000000000..198f8d1bc10
--- /dev/null
+++ b/tests/ui/dist/cranelift-x86_64-unknown-linux-gnu-dist.rs
@@ -0,0 +1,11 @@
+// Ensure that Cranelift can be used to compile a simple program with `x86_64-unknown-linux-gnu`
+// dist artifacts.
+
+//@ only-dist
+//@ only-x86_64-unknown-linux-gnu
+//@ compile-flags: -Z codegen-backend=cranelift
+//@ run-pass
+
+fn main() {
+    println!("Hello world!");
+}
diff --git a/tests/ui/issues/issue-4734.rs b/tests/ui/drop/destructor-run-for-expression-4734.rs
index 58aa0179693..57971ee5ef7 100644
--- a/tests/ui/issues/issue-4734.rs
+++ b/tests/ui/drop/destructor-run-for-expression-4734.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/4734
 //@ run-pass
 #![allow(dead_code)]
 // Ensures that destructors are run for expressions of the form "e;" where
diff --git a/tests/ui/issues/issue-6892.rs b/tests/ui/drop/destructor-run-for-let-ignore-6892.rs
index 7d99aef4ac5..0fcf133c2b1 100644
--- a/tests/ui/issues/issue-6892.rs
+++ b/tests/ui/drop/destructor-run-for-let-ignore-6892.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/6892
 //@ run-pass
 #![allow(dead_code)]
 // Ensures that destructors are run for expressions of the form "let _ = e;"
diff --git a/tests/ui/issues/issue-16151.rs b/tests/ui/drop/drop-count-assertion-16151.rs
index b18108e0a8a..ede6bc23e73 100644
--- a/tests/ui/issues/issue-16151.rs
+++ b/tests/ui/drop/drop-count-assertion-16151.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/16151
 //@ run-pass
 
 // FIXME(static_mut_refs): Do not allow `static_mut_refs` lint
diff --git a/tests/ui/drop/dropck-normalize-errors.stderr b/tests/ui/drop/dropck-normalize-errors.nll.stderr
index 2bb5909c6b2..b008daa51a3 100644
--- a/tests/ui/drop/dropck-normalize-errors.stderr
+++ b/tests/ui/drop/dropck-normalize-errors.nll.stderr
@@ -1,44 +1,44 @@
 error[E0277]: the trait bound `NonImplementedStruct: NonImplementedTrait` is not satisfied in `ADecoder<'a>`
-  --> $DIR/dropck-normalize-errors.rs:15:28
+  --> $DIR/dropck-normalize-errors.rs:19:28
    |
 LL | fn make_a_decoder<'a>() -> ADecoder<'a> {
    |                            ^^^^^^^^^^^^ within `ADecoder<'a>`, the trait `NonImplementedTrait` is not implemented for `NonImplementedStruct`
    |
 help: this trait has no implementations, consider adding one
-  --> $DIR/dropck-normalize-errors.rs:7:1
+  --> $DIR/dropck-normalize-errors.rs:11:1
    |
 LL | trait NonImplementedTrait {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 note: required because it appears within the type `BDecoder`
-  --> $DIR/dropck-normalize-errors.rs:26:12
+  --> $DIR/dropck-normalize-errors.rs:30:12
    |
 LL | pub struct BDecoder {
    |            ^^^^^^^^
 note: required because it appears within the type `ADecoder<'a>`
-  --> $DIR/dropck-normalize-errors.rs:12:12
+  --> $DIR/dropck-normalize-errors.rs:16:12
    |
 LL | pub struct ADecoder<'a> {
    |            ^^^^^^^^
    = note: the return type of a function must have a statically known size
 
 error[E0277]: the trait bound `NonImplementedStruct: NonImplementedTrait` is not satisfied in `BDecoder`
-  --> $DIR/dropck-normalize-errors.rs:23:20
+  --> $DIR/dropck-normalize-errors.rs:27:20
    |
 LL |     type Decoder = BDecoder;
    |                    ^^^^^^^^ within `BDecoder`, the trait `NonImplementedTrait` is not implemented for `NonImplementedStruct`
    |
 help: this trait has no implementations, consider adding one
-  --> $DIR/dropck-normalize-errors.rs:7:1
+  --> $DIR/dropck-normalize-errors.rs:11:1
    |
 LL | trait NonImplementedTrait {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 note: required because it appears within the type `BDecoder`
-  --> $DIR/dropck-normalize-errors.rs:26:12
+  --> $DIR/dropck-normalize-errors.rs:30:12
    |
 LL | pub struct BDecoder {
    |            ^^^^^^^^
 note: required by a bound in `Decode::Decoder`
-  --> $DIR/dropck-normalize-errors.rs:4:5
+  --> $DIR/dropck-normalize-errors.rs:8:5
    |
 LL |     type Decoder;
    |     ^^^^^^^^^^^^^ required by this bound in `Decode::Decoder`
@@ -48,25 +48,25 @@ LL |     type Decoder: ?Sized;
    |                 ++++++++
 
 error[E0277]: the trait bound `NonImplementedStruct: NonImplementedTrait` is not satisfied
-  --> $DIR/dropck-normalize-errors.rs:27:22
+  --> $DIR/dropck-normalize-errors.rs:31:22
    |
 LL |     non_implemented: <NonImplementedStruct as NonImplementedTrait>::Assoc,
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NonImplementedTrait` is not implemented for `NonImplementedStruct`
    |
 help: this trait has no implementations, consider adding one
-  --> $DIR/dropck-normalize-errors.rs:7:1
+  --> $DIR/dropck-normalize-errors.rs:11:1
    |
 LL | trait NonImplementedTrait {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `NonImplementedStruct: NonImplementedTrait` is not satisfied
-  --> $DIR/dropck-normalize-errors.rs:15:28
+  --> $DIR/dropck-normalize-errors.rs:19:28
    |
 LL | fn make_a_decoder<'a>() -> ADecoder<'a> {
    |                            ^^^^^^^^^^^^ the trait `NonImplementedTrait` is not implemented for `NonImplementedStruct`
    |
 help: this trait has no implementations, consider adding one
-  --> $DIR/dropck-normalize-errors.rs:7:1
+  --> $DIR/dropck-normalize-errors.rs:11:1
    |
 LL | trait NonImplementedTrait {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/drop/dropck-normalize-errors.polonius.stderr b/tests/ui/drop/dropck-normalize-errors.polonius.stderr
new file mode 100644
index 00000000000..f8674b8e34a
--- /dev/null
+++ b/tests/ui/drop/dropck-normalize-errors.polonius.stderr
@@ -0,0 +1,64 @@
+error[E0277]: the trait bound `NonImplementedStruct: NonImplementedTrait` is not satisfied in `ADecoder<'a>`
+  --> $DIR/dropck-normalize-errors.rs:19:28
+   |
+LL | fn make_a_decoder<'a>() -> ADecoder<'a> {
+   |                            ^^^^^^^^^^^^ within `ADecoder<'a>`, the trait `NonImplementedTrait` is not implemented for `NonImplementedStruct`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/dropck-normalize-errors.rs:11:1
+   |
+LL | trait NonImplementedTrait {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+note: required because it appears within the type `BDecoder`
+  --> $DIR/dropck-normalize-errors.rs:30:12
+   |
+LL | pub struct BDecoder {
+   |            ^^^^^^^^
+note: required because it appears within the type `ADecoder<'a>`
+  --> $DIR/dropck-normalize-errors.rs:16:12
+   |
+LL | pub struct ADecoder<'a> {
+   |            ^^^^^^^^
+   = note: the return type of a function must have a statically known size
+
+error[E0277]: the trait bound `NonImplementedStruct: NonImplementedTrait` is not satisfied in `BDecoder`
+  --> $DIR/dropck-normalize-errors.rs:27:20
+   |
+LL |     type Decoder = BDecoder;
+   |                    ^^^^^^^^ within `BDecoder`, the trait `NonImplementedTrait` is not implemented for `NonImplementedStruct`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/dropck-normalize-errors.rs:11:1
+   |
+LL | trait NonImplementedTrait {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+note: required because it appears within the type `BDecoder`
+  --> $DIR/dropck-normalize-errors.rs:30:12
+   |
+LL | pub struct BDecoder {
+   |            ^^^^^^^^
+note: required by a bound in `Decode::Decoder`
+  --> $DIR/dropck-normalize-errors.rs:8:5
+   |
+LL |     type Decoder;
+   |     ^^^^^^^^^^^^^ required by this bound in `Decode::Decoder`
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL |     type Decoder: ?Sized;
+   |                 ++++++++
+
+error[E0277]: the trait bound `NonImplementedStruct: NonImplementedTrait` is not satisfied
+  --> $DIR/dropck-normalize-errors.rs:31:22
+   |
+LL |     non_implemented: <NonImplementedStruct as NonImplementedTrait>::Assoc,
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NonImplementedTrait` is not implemented for `NonImplementedStruct`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/dropck-normalize-errors.rs:11:1
+   |
+LL | trait NonImplementedTrait {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/drop/dropck-normalize-errors.rs b/tests/ui/drop/dropck-normalize-errors.rs
index 793122bd33d..2ade63f27c5 100644
--- a/tests/ui/drop/dropck-normalize-errors.rs
+++ b/tests/ui/drop/dropck-normalize-errors.rs
@@ -1,5 +1,9 @@
 // Test that we don't ICE when computing the drop types for
 
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius
+//@ [polonius] compile-flags: -Zpolonius=next
+
 trait Decode<'a> {
     type Decoder;
 }
@@ -14,7 +18,7 @@ pub struct ADecoder<'a> {
 }
 fn make_a_decoder<'a>() -> ADecoder<'a> {
     //~^ ERROR the trait bound
-    //~| ERROR the trait bound
+    //[nll]~| ERROR the trait bound
     panic!()
 }
 
diff --git a/tests/ui/issues/issue-15063.rs b/tests/ui/drop/enum-drop-impl-15063.rs
index 969dbe5fad2..a8198abafa0 100644
--- a/tests/ui/issues/issue-15063.rs
+++ b/tests/ui/drop/enum-drop-impl-15063.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15063
+
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
diff --git a/tests/ui/issues/issue-15858.rs b/tests/ui/drop/generic-drop-trait-bound-15858.rs
index 27887d49e3e..682604d17d8 100644
--- a/tests/ui/issues/issue-15858.rs
+++ b/tests/ui/drop/generic-drop-trait-bound-15858.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15858
+
 //@ run-pass
 // FIXME(static_mut_refs): this could use an atomic
 #![allow(static_mut_refs)]
diff --git a/tests/ui/issues/issue-15858.stderr b/tests/ui/drop/generic-drop-trait-bound-15858.stderr
index 0c082cc0862..86cd6cb6026 100644
--- a/tests/ui/issues/issue-15858.stderr
+++ b/tests/ui/drop/generic-drop-trait-bound-15858.stderr
@@ -1,5 +1,5 @@
 warning: method `do_something` is never used
-  --> $DIR/issue-15858.rs:7:8
+  --> $DIR/generic-drop-trait-bound-15858.rs:9:8
    |
 LL | trait Bar {
    |       --- method in this trait
diff --git a/tests/ui/drop/if-let-guards.rs b/tests/ui/drop/if-let-guards.rs
new file mode 100644
index 00000000000..bd353112c09
--- /dev/null
+++ b/tests/ui/drop/if-let-guards.rs
@@ -0,0 +1,88 @@
+//! Tests drop order for `if let` guard bindings and temporaries. This is for behavior specific to
+//! `match` expressions, whereas `tests/ui/drop/drop-order-comparisons.rs` compares `let` chains in
+//! guards to `let` chains in `if` expressions. Drop order for `let` chains in guards shouldn't
+//! differ between Editions, so we test on both 2021 and 2024, expecting the same results.
+//@ revisions: e2021 e2024
+//@ [e2021] edition: 2021
+//@ [e2024] edition: 2024
+//@ run-pass
+
+#![feature(if_let_guard)]
+#![deny(rust_2024_compatibility)]
+
+use core::{cell::RefCell, ops::Drop};
+
+fn main() {
+    // Test that `let` guard bindings and temps are dropped before the arm's pattern's bindings.
+    assert_drop_order(1..=6, |o| {
+        // We move out of the scrutinee, so the drop order of the array's elements are based on
+        // binding declaration order, and they're dropped in the arm's scope.
+        match [o.log(6), o.log(5)] {
+            // Partially move from the guard temporary to test drops both for temps and the binding.
+            [_x, _y] if let [_, _z, _] = [o.log(4), o.log(2), o.log(3)]
+                && true => { let _a = o.log(1); }
+            _ => unreachable!(),
+        }
+    });
+
+    // Sanity check: we don't move out of the match scrutinee when the guard fails.
+    assert_drop_order(1..=4, |o| {
+        // The scrutinee uses the drop order for arrays since its elements aren't moved.
+        match [o.log(3), o.log(4)] {
+            [_x, _y] if let _z = o.log(1)
+                && false => unreachable!(),
+            _ => { let _a = o.log(2); }
+        }
+    });
+
+    // Test `let` guards' temporaries are dropped immediately when a guard fails, even if the guard
+    // is lowered and run multiple times on the same arm due to or-patterns.
+    assert_drop_order(1..=8, |o| {
+        let mut _x = 1;
+        // The match's scrutinee isn't bound by-move, so it outlives the match.
+        match o.log(8) {
+            // Failing a guard breaks out of the arm's scope, dropping the `let` guard's scrutinee.
+            _ | _ | _ if let _ = o.log(_x)
+                && { _x += 1; false } => unreachable!(),
+            // The temporaries from a failed guard are dropped before testing the next guard.
+            _ if let _ = o.log(5)
+                && { o.push(4); false } => unreachable!(),
+            // If the guard succeeds, we stay in the arm's scope to execute its body.
+            _ if let _ = o.log(7)
+                && true => { o.log(6); }
+            _ => unreachable!(),
+        }
+    });
+}
+
+// # Test scaffolding...
+
+struct DropOrder(RefCell<Vec<u64>>);
+struct LogDrop<'o>(&'o DropOrder, u64);
+
+impl DropOrder {
+    fn log(&self, n: u64) -> LogDrop<'_> {
+        LogDrop(self, n)
+    }
+    fn push(&self, n: u64) {
+        self.0.borrow_mut().push(n);
+    }
+}
+
+impl<'o> Drop for LogDrop<'o> {
+    fn drop(&mut self) {
+        self.0.push(self.1);
+    }
+}
+
+#[track_caller]
+fn assert_drop_order(
+    ex: impl IntoIterator<Item = u64>,
+    f: impl Fn(&DropOrder),
+) {
+    let order = DropOrder(RefCell::new(Vec::new()));
+    f(&order);
+    let order = order.0.into_inner();
+    let expected: Vec<u64> = ex.into_iter().collect();
+    assert_eq!(order, expected);
+}
diff --git a/tests/ui/issues/issue-25549-multiple-drop.rs b/tests/ui/drop/multiple-drop-safe-code-25549.rs
index 1eec15a4aa2..dcf7a3fc79c 100644
--- a/tests/ui/issues/issue-25549-multiple-drop.rs
+++ b/tests/ui/drop/multiple-drop-safe-code-25549.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/25549
 //@ run-pass
 #![allow(unused_variables)]
 struct Foo<'r>(&'r mut i32);
diff --git a/tests/ui/issues/issue-15763.rs b/tests/ui/drop/nested-return-drop-order.rs
index 0ebadd80541..67ab52e6250 100644
--- a/tests/ui/issues/issue-15763.rs
+++ b/tests/ui/drop/nested-return-drop-order.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15763
+
 //@ run-pass
 #![allow(unreachable_code)]
 
diff --git a/tests/ui/drop/or-pattern-drop-order.rs b/tests/ui/drop/or-pattern-drop-order.rs
index fdc28225c35..cca81673ac3 100644
--- a/tests/ui/drop/or-pattern-drop-order.rs
+++ b/tests/ui/drop/or-pattern-drop-order.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //! Test drop order for different ways of declaring pattern bindings involving or-patterns.
-//! Currently, it's inconsistent between language constructs (#142163).
+//! In particular, are ordered based on the order in which the first occurrence of each binding
+//! appears (i.e. the "primary" bindings). Regression test for #142163.
 
 use std::cell::RefCell;
 use std::ops::Drop;
@@ -43,11 +44,10 @@ fn main() {
         y = LogDrop(o, 1);
     });
 
-    // When bindings are declared with `let pat = expr;`, bindings within or-patterns are seen last,
-    // thus they're dropped first.
+    // `let pat = expr;` should have the same drop order.
     assert_drop_order(1..=3, |o| {
-        // Drops are right-to-left, treating `y` as rightmost: `y`, `z`, `x`.
-        let (x, Ok(y) | Err(y), z) = (LogDrop(o, 3), Ok(LogDrop(o, 1)), LogDrop(o, 2));
+        // Drops are right-to-left: `z`, `y`, `x`.
+        let (x, Ok(y) | Err(y), z) = (LogDrop(o, 3), Ok(LogDrop(o, 2)), LogDrop(o, 1));
     });
     assert_drop_order(1..=2, |o| {
         // The first or-pattern alternative determines the bindings' drop order: `y`, `x`.
@@ -58,30 +58,29 @@ fn main() {
         let ((true, x, y) | (false, y, x)) = (false, LogDrop(o, 1), LogDrop(o, 2));
     });
 
-    // `match` treats or-patterns as last like `let pat = expr;`, but also determines drop order
-    // using the order of the bindings in the *last* or-pattern alternative.
+    // `match` should have the same drop order.
     assert_drop_order(1..=3, |o| {
-        // Drops are right-to-left, treating `y` as rightmost: `y`, `z`, `x`.
-        match (LogDrop(o, 3), Ok(LogDrop(o, 1)), LogDrop(o, 2)) { (x, Ok(y) | Err(y), z) => {} }
+        // Drops are right-to-left: `z`, `y` `x`.
+        match (LogDrop(o, 3), Ok(LogDrop(o, 2)), LogDrop(o, 1)) { (x, Ok(y) | Err(y), z) => {} }
     });
     assert_drop_order(1..=2, |o| {
-        // The last or-pattern alternative determines the bindings' drop order: `x`, `y`.
-        match (true, LogDrop(o, 1), LogDrop(o, 2)) { (true, x, y) | (false, y, x) => {} }
+        // The first or-pattern alternative determines the bindings' drop order: `y`, `x`.
+        match (true, LogDrop(o, 2), LogDrop(o, 1)) { (true, x, y) | (false, y, x) => {} }
     });
     assert_drop_order(1..=2, |o| {
-        // That drop order is used regardless of which or-pattern alternative matches: `x`, `y`.
-        match (false, LogDrop(o, 2), LogDrop(o, 1)) { (true, x, y) | (false, y, x) => {} }
+        // That drop order is used regardless of which or-pattern alternative matches: `y`, `x`.
+        match (false, LogDrop(o, 1), LogDrop(o, 2)) { (true, x, y) | (false, y, x) => {} }
     });
 
     // Function params are visited one-by-one, and the order of bindings within a param's pattern is
-    // the same as `let pat = expr`;
+    // the same as `let pat = expr;`
     assert_drop_order(1..=3, |o| {
         // Among separate params, the drop order is right-to-left: `z`, `y`, `x`.
         (|x, (Ok(y) | Err(y)), z| {})(LogDrop(o, 3), Ok(LogDrop(o, 2)), LogDrop(o, 1));
     });
     assert_drop_order(1..=3, |o| {
-        // Within a param's pattern, or-patterns are treated as rightmost: `y`, `z`, `x`.
-        (|(x, Ok(y) | Err(y), z)| {})((LogDrop(o, 3), Ok(LogDrop(o, 1)), LogDrop(o, 2)));
+        // Within a param's pattern, likewise: `z`, `y`, `x`.
+        (|(x, Ok(y) | Err(y), z)| {})((LogDrop(o, 3), Ok(LogDrop(o, 2)), LogDrop(o, 1)));
     });
     assert_drop_order(1..=2, |o| {
         // The first or-pattern alternative determines the bindings' drop order: `y`, `x`.
@@ -89,12 +88,11 @@ fn main() {
     });
 
     // `if let` and `let`-`else` see bindings in the same order as `let pat = expr;`.
-    // Vars in or-patterns are seen last (dropped first), and the first alternative's order is used.
     assert_drop_order(1..=3, |o| {
-        if let (x, Ok(y) | Err(y), z) = (LogDrop(o, 3), Ok(LogDrop(o, 1)), LogDrop(o, 2)) {}
+        if let (x, Ok(y) | Err(y), z) = (LogDrop(o, 3), Ok(LogDrop(o, 2)), LogDrop(o, 1)) {}
     });
     assert_drop_order(1..=3, |o| {
-        let (x, Ok(y) | Err(y), z) = (LogDrop(o, 3), Ok(LogDrop(o, 1)), LogDrop(o, 2)) else {
+        let (x, Ok(y) | Err(y), z) = (LogDrop(o, 3), Ok(LogDrop(o, 2)), LogDrop(o, 1)) else {
             unreachable!();
         };
     });
@@ -106,4 +104,21 @@ fn main() {
             unreachable!();
         };
     });
+
+    // Test nested and adjacent or-patterns, including or-patterns without bindings under a guard.
+    assert_drop_order(1..=6, |o| {
+        // The `LogDrop`s that aren't moved into bindings are dropped last.
+        match [
+            [LogDrop(o, 6), LogDrop(o, 4)],
+            [LogDrop(o, 3), LogDrop(o, 2)],
+            [LogDrop(o, 1), LogDrop(o, 5)],
+        ] {
+            [
+                [_ | _, w | w] | [w | w, _ | _],
+                [x | x, y | y] | [y | y, x | x],
+                [z | z, _ | _] | [_ | _, z | z],
+            ] if true => {}
+            _ => unreachable!(),
+        }
+    });
 }
diff --git a/tests/ui/issues/issue-14875.rs b/tests/ui/drop/panic-during-drop-14875.rs
index e330c64a335..5a6f8f42775 100644
--- a/tests/ui/issues/issue-14875.rs
+++ b/tests/ui/drop/panic-during-drop-14875.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14875
+
 //@ run-pass
 //@ needs-unwind
 //@ ignore-backends: gcc
diff --git a/tests/ui/drop/same-alloca-reassigned-match-binding-16151.rs b/tests/ui/drop/same-alloca-reassigned-match-binding-16151.rs
new file mode 100644
index 00000000000..ecc862ec7be
--- /dev/null
+++ b/tests/ui/drop/same-alloca-reassigned-match-binding-16151.rs
@@ -0,0 +1,34 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/16151
+
+//@ run-pass
+
+// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint
+#![allow(static_mut_refs)]
+
+use std::mem;
+
+static mut DROP_COUNT: usize = 0;
+
+struct Fragment;
+
+impl Drop for Fragment {
+    fn drop(&mut self) {
+        unsafe {
+            DROP_COUNT += 1;
+        }
+    }
+}
+
+fn main() {
+    {
+        let mut fragments = vec![Fragment, Fragment, Fragment];
+        let _new_fragments: Vec<Fragment> = mem::replace(&mut fragments, vec![])
+            .into_iter()
+            .skip_while(|_fragment| {
+                true
+            }).collect();
+    }
+    unsafe {
+        assert_eq!(DROP_COUNT, 3);
+    }
+}
diff --git a/tests/ui/issues/issue-9243.rs b/tests/ui/drop/static-variable-with-drop-trait-9243.rs
index 34ae944d1d8..0ae32c983e9 100644
--- a/tests/ui/issues/issue-9243.rs
+++ b/tests/ui/drop/static-variable-with-drop-trait-9243.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9243
 //@ build-pass
 #![allow(dead_code)]
 // Regression test for issue 9243
diff --git a/tests/ui/issues/issue-16492.rs b/tests/ui/drop/struct-field-drop-order.rs
index cfdba5fda35..80e3ea616a5 100644
--- a/tests/ui/issues/issue-16492.rs
+++ b/tests/ui/drop/struct-field-drop-order.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/16492
+
 //@ run-pass
 #![allow(non_snake_case)]
 
diff --git a/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.rs b/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.rs
index 17b76b6c832..2bb82a2ebf2 100644
--- a/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.rs
+++ b/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.rs
@@ -1,5 +1,6 @@
 // Issue 22443: Reject code using non-regular types that would
 // otherwise cause dropck to loop infinitely.
+//@ compile-flags: -Zwrite-long-types-to-disk=yes
 
 use std::marker::PhantomData;
 
diff --git a/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr b/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr
index 9360f4a98e9..330a40d925b 100644
--- a/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr
+++ b/tests/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr
@@ -1,10 +1,12 @@
 error[E0320]: overflow while adding drop-check rules for `FingerTree<i32>`
-  --> $DIR/dropck_no_diverge_on_nonregular_1.rs:24:9
+  --> $DIR/dropck_no_diverge_on_nonregular_1.rs:25:9
    |
 LL |     let ft =
    |         ^^
    |
-   = note: overflowed on `FingerTree<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<Node<i32>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
+   = note: overflowed on `FingerTree<Node<Node<Node<Node<Node<Node<Node<Node<Node<...>>>>>>>>>>`
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/dropck_no_diverge_on_nonregular_1.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/dropck/eager-by-ref-binding-for-guards.rs b/tests/ui/dropck/eager-by-ref-binding-for-guards.rs
index 3f475839171..90ff9a747ae 100644
--- a/tests/ui/dropck/eager-by-ref-binding-for-guards.rs
+++ b/tests/ui/dropck/eager-by-ref-binding-for-guards.rs
@@ -17,15 +17,15 @@ fn main() {
         (mut long2, ref short2) if true => long2.0 = &short2,
         _ => unreachable!(),
     }
-    // This depends on the binding modes of the final or-pattern alternatives (see #142163):
+    // This depends on the binding modes of the first or-pattern alternatives:
     let res: &Result<u8, &u8> = &Ok(1);
     match (Struct(&&0), res) {
         (mut long3, Ok(short3) | &Err(short3)) if true => long3.0 = &short3,
-        //~^ ERROR `short3` does not live long enough
         _ => unreachable!(),
     }
     match (Struct(&&0), res) {
         (mut long4, &Err(short4) | Ok(short4)) if true => long4.0 = &short4,
+        //~^ ERROR `short4` does not live long enough
         _ => unreachable!(),
     }
 }
diff --git a/tests/ui/dropck/eager-by-ref-binding-for-guards.stderr b/tests/ui/dropck/eager-by-ref-binding-for-guards.stderr
index cb1a04cd444..2648ce6f99c 100644
--- a/tests/ui/dropck/eager-by-ref-binding-for-guards.stderr
+++ b/tests/ui/dropck/eager-by-ref-binding-for-guards.stderr
@@ -11,15 +11,15 @@ LL |         (mut long1, ref short1) => long1.0 = &short1,
    |
    = note: values in a scope are dropped in the opposite order they are defined
 
-error[E0597]: `short3` does not live long enough
-  --> $DIR/eager-by-ref-binding-for-guards.rs:23:69
+error[E0597]: `short4` does not live long enough
+  --> $DIR/eager-by-ref-binding-for-guards.rs:27:69
    |
-LL |         (mut long3, Ok(short3) | &Err(short3)) if true => long3.0 = &short3,
-   |                        ------                                       ^^^^^^-
-   |                        |                                            |     |
-   |                        |                                            |     `short3` dropped here while still borrowed
-   |                        |                                            |     borrow might be used here, when `long3` is dropped and runs the `Drop` code for type `Struct`
-   |                        binding `short3` declared here               borrowed value does not live long enough
+LL |         (mut long4, &Err(short4) | Ok(short4)) if true => long4.0 = &short4,
+   |                          ------                                     ^^^^^^-
+   |                          |                                          |     |
+   |                          |                                          |     `short4` dropped here while still borrowed
+   |                          |                                          |     borrow might be used here, when `long4` is dropped and runs the `Drop` code for type `Struct`
+   |                          binding `short4` declared here             borrowed value does not live long enough
    |
    = note: values in a scope are dropped in the opposite order they are defined
 
diff --git a/tests/ui/dropck/let-else-more-permissive.rs b/tests/ui/dropck/let-else-more-permissive.rs
index 0020814aa81..6247b0eb5e2 100644
--- a/tests/ui/dropck/let-else-more-permissive.rs
+++ b/tests/ui/dropck/let-else-more-permissive.rs
@@ -1,5 +1,5 @@
-//! The drop check is currently more permissive when `let` statements have an `else` block, due to
-//! scheduling drops for bindings' storage before pattern-matching (#142056).
+//! Regression test for #142056. The drop check used to be more permissive for `let` statements with
+//! `else` blocks, due to scheduling drops for bindings' storage before pattern-matching.
 
 struct Struct<T>(T);
 impl<T> Drop for Struct<T> {
@@ -14,10 +14,11 @@ fn main() {
         //~^ ERROR `short1` does not live long enough
     }
     {
-        // This is OK: `short2`'s storage is live until after `long2`'s drop runs.
+        // This was OK: `short2`'s storage was live until after `long2`'s drop ran.
         #[expect(irrefutable_let_patterns)]
         let (mut long2, short2) = (Struct(&0), 1) else { unreachable!() };
         long2.0 = &short2;
+        //~^ ERROR `short2` does not live long enough
     }
     {
         // Sanity check: `short3`'s drop is significant; it's dropped before `long3`:
diff --git a/tests/ui/dropck/let-else-more-permissive.stderr b/tests/ui/dropck/let-else-more-permissive.stderr
index 7c37e170afa..4f0c193a78d 100644
--- a/tests/ui/dropck/let-else-more-permissive.stderr
+++ b/tests/ui/dropck/let-else-more-permissive.stderr
@@ -14,8 +14,24 @@ LL |     }
    |
    = note: values in a scope are dropped in the opposite order they are defined
 
+error[E0597]: `short2` does not live long enough
+  --> $DIR/let-else-more-permissive.rs:20:19
+   |
+LL |         let (mut long2, short2) = (Struct(&0), 1) else { unreachable!() };
+   |                         ------ binding `short2` declared here
+LL |         long2.0 = &short2;
+   |                   ^^^^^^^ borrowed value does not live long enough
+LL |
+LL |     }
+   |     -
+   |     |
+   |     `short2` dropped here while still borrowed
+   |     borrow might be used here, when `long2` is dropped and runs the `Drop` code for type `Struct`
+   |
+   = note: values in a scope are dropped in the opposite order they are defined
+
 error[E0597]: `short3` does not live long enough
-  --> $DIR/let-else-more-permissive.rs:27:19
+  --> $DIR/let-else-more-permissive.rs:28:19
    |
 LL |         let (mut long3, short3) = (Struct(&tmp), Box::new(1)) else { unreachable!() };
    |                         ------ binding `short3` declared here
@@ -30,6 +46,6 @@ LL |     }
    |
    = note: values in a scope are dropped in the opposite order they are defined
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/issues/issue-20939.rs b/tests/ui/dyn-compatibility/dyn-compatible-trait-implementation-20939.rs
index c0c22297897..c7938b275e9 100644
--- a/tests/ui/issues/issue-20939.rs
+++ b/tests/ui/dyn-compatibility/dyn-compatible-trait-implementation-20939.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/20939
 trait Foo {}
 
 impl<'a> Foo for dyn Foo + 'a {}
diff --git a/tests/ui/issues/issue-20939.stderr b/tests/ui/dyn-compatibility/dyn-compatible-trait-implementation-20939.stderr
index 00357155c8a..196d8b6a880 100644
--- a/tests/ui/issues/issue-20939.stderr
+++ b/tests/ui/dyn-compatibility/dyn-compatible-trait-implementation-20939.stderr
@@ -1,5 +1,5 @@
 error[E0371]: the object type `(dyn Foo + 'a)` automatically implements the trait `Foo`
-  --> $DIR/issue-20939.rs:3:1
+  --> $DIR/dyn-compatible-trait-implementation-20939.rs:4:1
    |
 LL | impl<'a> Foo for dyn Foo + 'a {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Foo + 'a)` automatically implements trait `Foo`
diff --git a/tests/ui/issues/issue-53333.rs b/tests/ui/editions/edition-specific-identifier-shadowing-53333.rs
index 468b7d8075f..dd973bb8439 100644
--- a/tests/ui/issues/issue-53333.rs
+++ b/tests/ui/editions/edition-specific-identifier-shadowing-53333.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/53333
 //@ run-pass
 #![allow(unused_imports)]
 //@ edition:2018
diff --git a/tests/ui/editions/never-type-fallback-breaking.e2024.stderr b/tests/ui/editions/never-type-fallback-breaking.e2024.stderr
index 2daf00f7804..f0d4de364fb 100644
--- a/tests/ui/editions/never-type-fallback-breaking.e2024.stderr
+++ b/tests/ui/editions/never-type-fallback-breaking.e2024.stderr
@@ -5,7 +5,7 @@ LL |         true => Default::default(),
    |                 ^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `!`
    |
    = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
-   = help: did you intend to use the type `()` here instead?
+   = help: you might have intended to use the type `()` here instead
 
 error[E0277]: the trait bound `!: Default` is not satisfied
   --> $DIR/never-type-fallback-breaking.rs:37:5
@@ -14,7 +14,7 @@ LL |     deserialize()?;
    |     ^^^^^^^^^^^^^ the trait `Default` is not implemented for `!`
    |
    = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
-   = help: did you intend to use the type `()` here instead?
+   = help: you might have intended to use the type `()` here instead
 note: required by a bound in `deserialize`
   --> $DIR/never-type-fallback-breaking.rs:33:23
    |
@@ -51,7 +51,7 @@ LL |     takes_apit(|| Default::default())?;
    |                   ^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `!`
    |
    = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
-   = help: did you intend to use the type `()` here instead?
+   = help: you might have intended to use the type `()` here instead
 
 error[E0277]: the trait bound `!: Default` is not satisfied
   --> $DIR/never-type-fallback-breaking.rs:76:17
@@ -62,7 +62,7 @@ LL |     takes_apit2(mk()?);
    |     required by a bound introduced by this call
    |
    = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
-   = help: did you intend to use the type `()` here instead?
+   = help: you might have intended to use the type `()` here instead
 note: required by a bound in `takes_apit2`
   --> $DIR/never-type-fallback-breaking.rs:71:25
    |
diff --git a/tests/ui/issues/issue-9837.rs b/tests/ui/enum-discriminant/enum-discriminant-const-eval-truncation-9837.rs
index 33152a5d077..8768d81b93f 100644
--- a/tests/ui/issues/issue-9837.rs
+++ b/tests/ui/enum-discriminant/enum-discriminant-const-eval-truncation-9837.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9837
 //@ run-pass
 const C1: i32 = 0x12345678;
 const C2: isize = C1 as i16 as isize;
diff --git a/tests/ui/issues/issue-9814.rs b/tests/ui/enum/single-variant-enum-deref-error-9814.rs
index a87478e221b..f10d665299c 100644
--- a/tests/ui/issues/issue-9814.rs
+++ b/tests/ui/enum/single-variant-enum-deref-error-9814.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9814
 // Verify that single-variant enums can't be de-referenced
 // Regression test for issue #9814
 
diff --git a/tests/ui/issues/issue-9814.stderr b/tests/ui/enum/single-variant-enum-deref-error-9814.stderr
index fa23fb7c176..5e069f4c21d 100644
--- a/tests/ui/issues/issue-9814.stderr
+++ b/tests/ui/enum/single-variant-enum-deref-error-9814.stderr
@@ -1,5 +1,5 @@
 error[E0614]: type `Foo` cannot be dereferenced
-  --> $DIR/issue-9814.rs:7:13
+  --> $DIR/single-variant-enum-deref-error-9814.rs:8:13
    |
 LL |     let _ = *Foo::Bar(2);
    |             ^^^^^^^^^^^^ can't be dereferenced
diff --git a/tests/ui/issues/issue-3037.rs b/tests/ui/enum/zero-variant-enum-pattern-matching-3037.rs
index 933b450ac8e..7a7abb1c67c 100644
--- a/tests/ui/issues/issue-3037.rs
+++ b/tests/ui/enum/zero-variant-enum-pattern-matching-3037.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/3037
 //@ run-pass
 #![allow(dead_code)]
 #![allow(non_camel_case_types)]
diff --git a/tests/ui/error-codes/E0197.stderr b/tests/ui/error-codes/E0197.stderr
index c06777396e8..04c6174b9f1 100644
--- a/tests/ui/error-codes/E0197.stderr
+++ b/tests/ui/error-codes/E0197.stderr
@@ -5,6 +5,8 @@ LL | unsafe impl Foo { }
    | ------      ^^^ inherent impl for this type
    | |
    | unsafe because of this
+   |
+   = note: only trait implementations may be annotated with `unsafe`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/error-codes/E0275.rs b/tests/ui/error-codes/E0275.rs
index 28a9676f03e..98d4a3c01b9 100644
--- a/tests/ui/error-codes/E0275.rs
+++ b/tests/ui/error-codes/E0275.rs
@@ -1,3 +1,4 @@
+//@ compile-flags: -Zwrite-long-types-to-disk=yes
 trait Foo {}
 
 struct Bar<T>(T);
diff --git a/tests/ui/error-codes/E0275.stderr b/tests/ui/error-codes/E0275.stderr
index 3b31c87320a..755404c1e16 100644
--- a/tests/ui/error-codes/E0275.stderr
+++ b/tests/ui/error-codes/E0275.stderr
@@ -1,17 +1,19 @@
 error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<...>>>>>>>: Foo`
-  --> $DIR/E0275.rs:5:33
+  --> $DIR/E0275.rs:6:33
    |
 LL | impl<T> Foo for T where Bar<T>: Foo {}
    |                                 ^^^
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`E0275`)
-note: required for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Foo`
-  --> $DIR/E0275.rs:5:9
+note: required for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<...>>>>>>>>>>>>>` to implement `Foo`
+  --> $DIR/E0275.rs:6:9
    |
 LL | impl<T> Foo for T where Bar<T>: Foo {}
    |         ^^^     ^               --- unsatisfied trait bound introduced here
    = note: 126 redundant requirements hidden
    = note: required for `Bar<T>` to implement `Foo`
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/E0275.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/error-codes/E0423.stderr b/tests/ui/error-codes/E0423.stderr
index e50b8bd820c..b699e53fb48 100644
--- a/tests/ui/error-codes/E0423.stderr
+++ b/tests/ui/error-codes/E0423.stderr
@@ -54,7 +54,7 @@ help: use struct literal syntax instead
 LL -     let f = Foo();
 LL +     let f = Foo { a: val };
    |
-help: a function with a similar name exists (notice the capitalization difference)
+help: a function with a similar name exists (notice the capitalization)
    |
 LL -     let f = Foo();
 LL +     let f = foo();
diff --git a/tests/ui/error-codes/E0540.stderr b/tests/ui/error-codes/E0540.stderr
index 3e5f408feb5..ae23dce5c50 100644
--- a/tests/ui/error-codes/E0540.stderr
+++ b/tests/ui/error-codes/E0540.stderr
@@ -6,10 +6,13 @@ LL | #[inline()]
    |         |
    |         expected a single argument here
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/codegen.html#the-inline-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
-LL | #[inline(always|never)]
-   |          ++++++++++++
+LL | #[inline(always)]
+   |          ++++++
+LL | #[inline(never)]
+   |          +++++
 LL - #[inline()]
 LL + #[inline]
    |
diff --git a/tests/ui/error-codes/E0565-1.stderr b/tests/ui/error-codes/E0565-1.stderr
index 6277e6400d7..52daf2a62fc 100644
--- a/tests/ui/error-codes/E0565-1.stderr
+++ b/tests/ui/error-codes/E0565-1.stderr
@@ -12,11 +12,15 @@ LL - #[deprecated("since")]
 LL + #[deprecated = "reason"]
    |
 LL - #[deprecated("since")]
-LL + #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
+LL + #[deprecated(note = "reason")]
    |
 LL - #[deprecated("since")]
-LL + #[deprecated]
+LL + #[deprecated(since = "version")]
    |
+LL - #[deprecated("since")]
+LL + #[deprecated(since = "version", note = "reason")]
+   |
+   = and 1 other candidate
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/error-codes/ex-E0612.stderr b/tests/ui/error-codes/ex-E0612.stderr
index 54451d3d452..e6062f6061d 100644
--- a/tests/ui/error-codes/ex-E0612.stderr
+++ b/tests/ui/error-codes/ex-E0612.stderr
@@ -4,11 +4,7 @@ error[E0609]: no field `1` on type `Foo`
 LL |    y.1;
    |      ^ unknown field
    |
-help: a field with a similar name exists
-   |
-LL -    y.1;
-LL +    y.0;
-   |
+   = note: available field is: `0`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/explicit-tail-calls/callee_is_ref.fixed b/tests/ui/explicit-tail-calls/callee_is_ref.fixed
new file mode 100644
index 00000000000..7525e5c5df8
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/callee_is_ref.fixed
@@ -0,0 +1,26 @@
+//@ run-rustfix
+#![feature(explicit_tail_calls)]
+#![expect(incomplete_features)]
+
+fn f() {}
+
+fn g() {
+    become (*(&f))() //~ error: tail calls can only be performed with function definitions or pointers
+}
+
+fn h() {
+    let table = [f as fn()];
+    if let Some(fun) = table.get(0) {
+        become (*fun)(); //~ error: tail calls can only be performed with function definitions or pointers
+    }
+}
+
+fn i() {
+    become (***Box::new(&mut &f))(); //~ error: tail calls can only be performed with function definitions or pointers
+}
+
+fn main() {
+    g();
+    h();
+    i();
+}
diff --git a/tests/ui/explicit-tail-calls/callee_is_ref.rs b/tests/ui/explicit-tail-calls/callee_is_ref.rs
new file mode 100644
index 00000000000..36bf9efb952
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/callee_is_ref.rs
@@ -0,0 +1,26 @@
+//@ run-rustfix
+#![feature(explicit_tail_calls)]
+#![expect(incomplete_features)]
+
+fn f() {}
+
+fn g() {
+    become (&f)() //~ error: tail calls can only be performed with function definitions or pointers
+}
+
+fn h() {
+    let table = [f as fn()];
+    if let Some(fun) = table.get(0) {
+        become fun(); //~ error: tail calls can only be performed with function definitions or pointers
+    }
+}
+
+fn i() {
+    become Box::new(&mut &f)(); //~ error: tail calls can only be performed with function definitions or pointers
+}
+
+fn main() {
+    g();
+    h();
+    i();
+}
diff --git a/tests/ui/explicit-tail-calls/callee_is_ref.stderr b/tests/ui/explicit-tail-calls/callee_is_ref.stderr
new file mode 100644
index 00000000000..4a2ff465e68
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/callee_is_ref.stderr
@@ -0,0 +1,38 @@
+error: tail calls can only be performed with function definitions or pointers
+  --> $DIR/callee_is_ref.rs:8:12
+   |
+LL |     become (&f)()
+   |            ^^^^^^
+   |
+   = note: callee has type `&fn() {f}`
+help: consider dereferencing the expression to get a function definition
+   |
+LL |     become (*(&f))()
+   |            ++    +
+
+error: tail calls can only be performed with function definitions or pointers
+  --> $DIR/callee_is_ref.rs:14:16
+   |
+LL |         become fun();
+   |                ^^^^^
+   |
+   = note: callee has type `&fn()`
+help: consider dereferencing the expression to get a function pointer
+   |
+LL |         become (*fun)();
+   |                ++   +
+
+error: tail calls can only be performed with function definitions or pointers
+  --> $DIR/callee_is_ref.rs:19:12
+   |
+LL |     become Box::new(&mut &f)();
+   |            ^^^^^^^^^^^^^^^^^^^
+   |
+   = note: callee has type `Box<&mut &fn() {f}>`
+help: consider dereferencing the expression to get a function definition
+   |
+LL |     become (***Box::new(&mut &f))();
+   |            ++++                 +
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/explicit-tail-calls/callee_is_weird.rs b/tests/ui/explicit-tail-calls/callee_is_weird.rs
new file mode 100644
index 00000000000..b3ca878c232
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/callee_is_weird.rs
@@ -0,0 +1,29 @@
+#![feature(explicit_tail_calls, exclusive_wrapper, fn_traits, unboxed_closures)]
+#![expect(incomplete_features)]
+
+fn f() {}
+
+fn g() {
+    become std::sync::Exclusive::new(f)() //~ error: tail calls can only be performed with function definitions or pointers
+}
+
+fn h() {
+    become (&mut &std::sync::Exclusive::new(f))() //~ error: tail calls can only be performed with function definitions or pointers
+}
+
+fn i() {
+    struct J;
+
+    impl FnOnce<()> for J {
+        type Output = ();
+        extern "rust-call" fn call_once(self, (): ()) -> Self::Output {}
+    }
+
+    become J(); //~ error: tail calls can only be performed with function definitions or pointers
+}
+
+fn main() {
+    g();
+    h();
+    i();
+}
diff --git a/tests/ui/explicit-tail-calls/callee_is_weird.stderr b/tests/ui/explicit-tail-calls/callee_is_weird.stderr
new file mode 100644
index 00000000000..a4e5a38ce33
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/callee_is_weird.stderr
@@ -0,0 +1,26 @@
+error: tail calls can only be performed with function definitions or pointers
+  --> $DIR/callee_is_weird.rs:7:12
+   |
+LL |     become std::sync::Exclusive::new(f)()
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: callee has type `Exclusive<fn() {f}>`
+
+error: tail calls can only be performed with function definitions or pointers
+  --> $DIR/callee_is_weird.rs:11:12
+   |
+LL |     become (&mut &std::sync::Exclusive::new(f))()
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: callee has type `Exclusive<fn() {f}>`
+
+error: tail calls can only be performed with function definitions or pointers
+  --> $DIR/callee_is_weird.rs:22:12
+   |
+LL |     become J();
+   |            ^^^
+   |
+   = note: callee has type `J`
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/explicit-tail-calls/drop-order.rs b/tests/ui/explicit-tail-calls/drop-order.rs
index 242336be484..58e1afbdf0c 100644
--- a/tests/ui/explicit-tail-calls/drop-order.rs
+++ b/tests/ui/explicit-tail-calls/drop-order.rs
@@ -1,5 +1,3 @@
-// FIXME(explicit_tail_calls): enable this test once rustc_codegen_ssa supports tail calls
-//@ ignore-test: tail calls are not implemented in rustc_codegen_ssa yet, so this causes 🧊
 //@ run-pass
 #![expect(incomplete_features)]
 #![feature(explicit_tail_calls)]
diff --git a/tests/ui/explicit-tail-calls/higher-ranked-arg.rs b/tests/ui/explicit-tail-calls/higher-ranked-arg.rs
new file mode 100644
index 00000000000..e60686ab511
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/higher-ranked-arg.rs
@@ -0,0 +1,13 @@
+// Regression test for <https://github.com/rust-lang/rust/issues/144826>.
+//@ check-pass
+
+#![feature(explicit_tail_calls)]
+#![expect(incomplete_features)]
+
+fn foo(x: fn(&i32)) {
+    become bar(x);
+}
+
+fn bar(_: fn(&i32)) {}
+
+fn main() {}
diff --git a/tests/ui/explicit-tail-calls/indexer.rs b/tests/ui/explicit-tail-calls/indexer.rs
new file mode 100644
index 00000000000..5644506b2f5
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/indexer.rs
@@ -0,0 +1,22 @@
+//@ run-pass
+// Indexing taken from
+// https://github.com/phi-go/rfcs/blob/guaranteed-tco/text%2F0000-explicit-tail-calls.md#tail-call-elimination
+// no other test has utilized the "function table"
+// described in the RFC aside from this one at this point.
+#![expect(incomplete_features)]
+#![feature(explicit_tail_calls)]
+
+fn f0(_: usize) {}
+fn f1(_: usize) {}
+fn f2(_: usize) {}
+
+fn indexer(idx: usize) {
+    let v: [fn(usize); 3] = [f0, f1, f2];
+    become v[idx](idx)
+}
+
+fn main() {
+    for idx in 0..3 {
+        indexer(idx);
+    }
+}
diff --git a/tests/ui/explicit-tail-calls/infinite-recursion-in-ctfe.rs b/tests/ui/explicit-tail-calls/infinite-recursion-in-ctfe.rs
new file mode 100644
index 00000000000..0c55f13c16c
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/infinite-recursion-in-ctfe.rs
@@ -0,0 +1,10 @@
+#![feature(explicit_tail_calls)]
+#![expect(incomplete_features)]
+
+const _: () = f();
+
+const fn f() {
+    become f(); //~ error: constant evaluation is taking a long time
+}
+
+fn main() {}
diff --git a/tests/ui/explicit-tail-calls/infinite-recursion-in-ctfe.stderr b/tests/ui/explicit-tail-calls/infinite-recursion-in-ctfe.stderr
new file mode 100644
index 00000000000..b5a96114a58
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/infinite-recursion-in-ctfe.stderr
@@ -0,0 +1,17 @@
+error: constant evaluation is taking a long time
+  --> $DIR/infinite-recursion-in-ctfe.rs:7:5
+   |
+LL |     become f();
+   |     ^^^^^^^^^^
+   |
+   = note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
+           If your compilation actually takes a long time, you can safely allow the lint.
+help: the constant being evaluated
+  --> $DIR/infinite-recursion-in-ctfe.rs:4:1
+   |
+LL | const _: () = f();
+   | ^^^^^^^^^^^
+   = note: `#[deny(long_running_const_eval)]` on by default
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/explicit-tail-calls/intrinsics.rs b/tests/ui/explicit-tail-calls/intrinsics.rs
new file mode 100644
index 00000000000..6fc521fa27d
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/intrinsics.rs
@@ -0,0 +1,13 @@
+#![feature(explicit_tail_calls, core_intrinsics)]
+#![expect(incomplete_features, internal_features)]
+
+fn trans((): ()) {
+    unsafe { become std::mem::transmute(()) } //~ error: tail calling intrinsics is not allowed
+
+}
+
+fn cats(x: u64) -> u32 {
+    become std::intrinsics::ctlz(x) //~ error: tail calling intrinsics is not allowed
+}
+
+fn main() {}
diff --git a/tests/ui/explicit-tail-calls/intrinsics.stderr b/tests/ui/explicit-tail-calls/intrinsics.stderr
new file mode 100644
index 00000000000..b012e3629dd
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/intrinsics.stderr
@@ -0,0 +1,14 @@
+error: tail calling intrinsics is not allowed
+  --> $DIR/intrinsics.rs:5:14
+   |
+LL |     unsafe { become std::mem::transmute(()) }
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: tail calling intrinsics is not allowed
+  --> $DIR/intrinsics.rs:10:5
+   |
+LL |     become std::intrinsics::ctlz(x)
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/explicit-tail-calls/ret-ty-borrowck-constraints.rs b/tests/ui/explicit-tail-calls/ret-ty-borrowck-constraints.rs
new file mode 100644
index 00000000000..111ae849c0f
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/ret-ty-borrowck-constraints.rs
@@ -0,0 +1,16 @@
+#![feature(explicit_tail_calls)]
+#![expect(incomplete_features)]
+
+fn link(x: &str) -> &'static str {
+    become passthrough(x);
+    //~^ ERROR lifetime may not live long enough
+}
+
+fn passthrough<T>(t: T) -> T { t }
+
+fn main() {
+    let x = String::from("hello, world");
+    let s = link(&x);
+    drop(x);
+    println!("{s}");
+}
diff --git a/tests/ui/explicit-tail-calls/ret-ty-borrowck-constraints.stderr b/tests/ui/explicit-tail-calls/ret-ty-borrowck-constraints.stderr
new file mode 100644
index 00000000000..26a8e1f0122
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/ret-ty-borrowck-constraints.stderr
@@ -0,0 +1,10 @@
+error: lifetime may not live long enough
+  --> $DIR/ret-ty-borrowck-constraints.rs:5:5
+   |
+LL | fn link(x: &str) -> &'static str {
+   |            - let's call the lifetime of this reference `'1`
+LL |     become passthrough(x);
+   |     ^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'static`
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/issues/issue-16441.rs b/tests/ui/extern/empty-struct-extern-fn-16441.rs
index 58cfb389297..82f2eee611d 100644
--- a/tests/ui/issues/issue-16441.rs
+++ b/tests/ui/extern/empty-struct-extern-fn-16441.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/16441
+
 //@ run-pass
 #![allow(dead_code)]
 
diff --git a/tests/ui/extern/extern-types-field-offset.run.stderr b/tests/ui/extern/extern-types-field-offset.run.stderr
index 07bd4fcb13f..b096e8044a7 100644
--- a/tests/ui/extern/extern-types-field-offset.run.stderr
+++ b/tests/ui/extern/extern-types-field-offset.run.stderr
@@ -1,5 +1,5 @@
 
-thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+thread 'main' ($TID) panicked at library/core/src/panicking.rs:$LINE:$COL:
 attempted to compute the size or alignment of extern type `Opaque`
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 thread caused non-unwinding panic. aborting.
diff --git a/tests/ui/extern/extern-types-size_of_val.align.run.stderr b/tests/ui/extern/extern-types-size_of_val.align.run.stderr
index 5ba372d60fa..66206f37501 100644
--- a/tests/ui/extern/extern-types-size_of_val.align.run.stderr
+++ b/tests/ui/extern/extern-types-size_of_val.align.run.stderr
@@ -1,5 +1,5 @@
 
-thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+thread 'main' ($TID) panicked at library/core/src/panicking.rs:$LINE:$COL:
 attempted to compute the size or alignment of extern type `A`
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 thread caused non-unwinding panic. aborting.
diff --git a/tests/ui/extern/extern-types-size_of_val.size.run.stderr b/tests/ui/extern/extern-types-size_of_val.size.run.stderr
index 5ba372d60fa..66206f37501 100644
--- a/tests/ui/extern/extern-types-size_of_val.size.run.stderr
+++ b/tests/ui/extern/extern-types-size_of_val.size.run.stderr
@@ -1,5 +1,5 @@
 
-thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+thread 'main' ($TID) panicked at library/core/src/panicking.rs:$LINE:$COL:
 attempted to compute the size or alignment of extern type `A`
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 thread caused non-unwinding panic. aborting.
diff --git a/tests/ui/extern/issue-47725.rs b/tests/ui/extern/issue-47725.rs
index 60d0cd62347..8ac866dc7d9 100644
--- a/tests/ui/extern/issue-47725.rs
+++ b/tests/ui/extern/issue-47725.rs
@@ -17,6 +17,7 @@ extern "C" {
 #[link_name]
 //~^ ERROR malformed `link_name` attribute input
 //~| HELP must be of the form
+//~| NOTE for more information, visit
 extern "C" {
     fn bar() -> u32;
 }
diff --git a/tests/ui/extern/issue-47725.stderr b/tests/ui/extern/issue-47725.stderr
index 4fd02a1778b..c5af54b8029 100644
--- a/tests/ui/extern/issue-47725.stderr
+++ b/tests/ui/extern/issue-47725.stderr
@@ -3,6 +3,8 @@ error[E0539]: malformed `link_name` attribute input
    |
 LL | #[link_name]
    | ^^^^^^^^^^^^ help: must be of the form: `#[link_name = "name"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_name-attribute>
 
 warning: attribute should be applied to a foreign function or static
   --> $DIR/issue-47725.rs:3:1
diff --git a/tests/ui/extern/issue-80074.rs b/tests/ui/extern/issue-80074.rs
index ba7b55a450f..942b78916d6 100644
--- a/tests/ui/extern/issue-80074.rs
+++ b/tests/ui/extern/issue-80074.rs
@@ -11,7 +11,7 @@ extern crate issue_80074_2;
 
 fn main() {
     foo!();
-    //~^ WARN: macro `foo` is private
+    //~^ ERROR: macro `foo` is private
     //~| WARN: it will become a hard error in a future release!
     bar!();
     //~^ ERROR: cannot find macro `bar` in this scope
diff --git a/tests/ui/extern/issue-80074.stderr b/tests/ui/extern/issue-80074.stderr
index b30b761593e..510ca1be0a1 100644
--- a/tests/ui/extern/issue-80074.stderr
+++ b/tests/ui/extern/issue-80074.stderr
@@ -16,7 +16,7 @@ error: cannot find macro `m` in this scope
 LL |     m!();
    |     ^
 
-warning: macro `foo` is private
+error: macro `foo` is private
   --> $DIR/issue-80074.rs:13:5
    |
 LL |     foo!();
@@ -24,8 +24,19 @@ LL |     foo!();
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #120192 <https://github.com/rust-lang/rust/issues/120192>
-   = note: `#[warn(private_macro_use)]` on by default
+   = note: `#[deny(private_macro_use)]` on by default
 
-error: aborting due to 3 previous errors; 1 warning emitted
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0469`.
+Future incompatibility report: Future breakage diagnostic:
+error: macro `foo` is private
+  --> $DIR/issue-80074.rs:13:5
+   |
+LL |     foo!();
+   |     ^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #120192 <https://github.com/rust-lang/rust/issues/120192>
+   = note: `#[deny(private_macro_use)]` on by default
+
diff --git a/tests/ui/extern/windows-tcb-trash-13259.rs b/tests/ui/extern/windows-tcb-trash-13259.rs
new file mode 100644
index 00000000000..0852e31251a
--- /dev/null
+++ b/tests/ui/extern/windows-tcb-trash-13259.rs
@@ -0,0 +1,49 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13259
+
+//@ run-pass
+
+#[cfg(windows)]
+mod imp {
+    type LPVOID = *mut u8;
+    type DWORD = u32;
+    type LPWSTR = *mut u16;
+
+    extern "system" {
+        fn FormatMessageW(
+            flags: DWORD,
+            lpSrc: LPVOID,
+            msgId: DWORD,
+            langId: DWORD,
+            buf: LPWSTR,
+            nsize: DWORD,
+            args: *const u8,
+        ) -> DWORD;
+    }
+
+    pub fn test() {
+        let mut buf: [u16; 50] = [0; 50];
+        let ret = unsafe {
+            FormatMessageW(
+                0x1000,
+                core::ptr::null_mut(),
+                1,
+                0x400,
+                buf.as_mut_ptr(),
+                buf.len() as u32,
+                core::ptr::null(),
+            )
+        };
+        // On some 32-bit Windowses (Win7-8 at least) this will panic with segmented
+        // stacks taking control of pvArbitrary
+        assert!(ret != 0);
+    }
+}
+
+#[cfg(not(windows))]
+mod imp {
+    pub fn test() {}
+}
+
+fn main() {
+    imp::test()
+}
diff --git a/tests/ui/feature-gates/feature-gate-macro-attr.rs b/tests/ui/feature-gates/feature-gate-macro-attr.rs
new file mode 100644
index 00000000000..8419d851147
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-macro-attr.rs
@@ -0,0 +1,4 @@
+#![crate_type = "lib"]
+
+macro_rules! myattr { attr() {} => {} }
+//~^ ERROR `macro_rules!` attributes are unstable
diff --git a/tests/ui/feature-gates/feature-gate-macro-attr.stderr b/tests/ui/feature-gates/feature-gate-macro-attr.stderr
new file mode 100644
index 00000000000..b58418527c5
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-macro-attr.stderr
@@ -0,0 +1,13 @@
+error[E0658]: `macro_rules!` attributes are unstable
+  --> $DIR/feature-gate-macro-attr.rs:3:1
+   |
+LL | macro_rules! myattr { attr() {} => {} }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
+   = help: add `#![feature(macro_attr)]` 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/feature-gates/feature-gate-omit-gdb-pretty-printer-section.rs b/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.rs
deleted file mode 100644
index 66bf7973832..00000000000
--- a/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-#[omit_gdb_pretty_printer_section] //~ ERROR the `#[omit_gdb_pretty_printer_section]` attribute is
-fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr b/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr
deleted file mode 100644
index 2e1d27fb776..00000000000
--- a/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: the `#[omit_gdb_pretty_printer_section]` attribute is just used for the Rust test suite
-  --> $DIR/feature-gate-omit-gdb-pretty-printer-section.rs:1:1
-   |
-LL | #[omit_gdb_pretty_printer_section]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = help: add `#![feature(omit_gdb_pretty_printer_section)]` 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/feature-gates/feature-gate-optimize_attribute.stderr b/tests/ui/feature-gates/feature-gate-optimize_attribute.stderr
index e7e62b4f989..646abf8e4a1 100644
--- a/tests/ui/feature-gates/feature-gate-optimize_attribute.stderr
+++ b/tests/ui/feature-gates/feature-gate-optimize_attribute.stderr
@@ -43,9 +43,20 @@ error[E0539]: malformed `optimize` attribute input
    |
 LL | #[optimize(banana)]
    | ^^^^^^^^^^^------^^
-   | |          |
-   | |          valid arguments are `size`, `speed` or `none`
-   | help: must be of the form: `#[optimize(size|speed|none)]`
+   |            |
+   |            valid arguments are `size`, `speed` or `none`
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[optimize(banana)]
+LL + #[optimize(none)]
+   |
+LL - #[optimize(banana)]
+LL + #[optimize(size)]
+   |
+LL - #[optimize(banana)]
+LL + #[optimize(speed)]
+   |
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr
index 4cba54bf67c..7550e26f4a7 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr
+++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr
@@ -304,7 +304,7 @@ error[E0517]: attribute should be applied to a struct, enum, or union
 LL |     #[repr(Rust)] impl S { }
    |            ^^^^   ---------- not a struct, enum, or union
 
-error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
+error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
   --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5
    |
 LL |     #[inline = "2100"] fn f() { }
@@ -318,3 +318,14 @@ error: aborting due to 38 previous errors
 
 Some errors have detailed explanations: E0517, E0518, E0658.
 For more information about an error, try `rustc --explain E0517`.
+Future incompatibility report: Future breakage diagnostic:
+error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5
+   |
+LL |     #[inline = "2100"] fn f() { }
+   |     ^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs
index b93cb2ea006..c91fd600068 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs
+++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs
@@ -71,6 +71,7 @@
 //~^^ WARN this was previously accepted by the compiler
 #![must_use]
 //~^ WARN `#[must_use]` has no effect
+//~| HELP remove the attribute
 // see issue-43106-gating-of-stable.rs
 // see issue-43106-gating-of-unstable.rs
 // see issue-43106-gating-of-deprecated.rs
@@ -599,16 +600,20 @@ mod deprecated {
 }
 
 #[must_use] //~ WARN `#[must_use]` has no effect
+//~^ HELP remove the attribute
 mod must_use {
     mod inner { #![must_use] } //~ WARN `#[must_use]` has no effect
+    //~^ HELP remove the attribute
 
     #[must_use] fn f() { }
 
     #[must_use] struct S;
 
     #[must_use] type T = S; //~ WARN `#[must_use]` has no effect
+    //~^ HELP remove the attribute
 
     #[must_use] impl S { } //~ WARN `#[must_use]` has no effect
+    //~^ HELP remove the attribute
 }
 
 #[windows_subsystem = "windows"]
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
index 8bac1f6155e..e0ea5382faa 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
+++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
@@ -1,5 +1,5 @@
 warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:397:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:398:17
    |
 LL |     mod inner { #![macro_escape] }
    |                 ^^^^^^^^^^^^^^^^
@@ -7,7 +7,7 @@ LL |     mod inner { #![macro_escape] }
    = help: try an outer attribute: `#[macro_use]`
 
 warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:394:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:395:1
    |
 LL | #[macro_escape]
    | ^^^^^^^^^^^^^^^
@@ -43,151 +43,151 @@ LL | #![deny(x5100)]
    |         ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:96:8
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:97:8
    |
 LL | #[warn(x5400)]
    |        ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:99:25
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:100:25
    |
 LL |     mod inner { #![warn(x5400)] }
    |                         ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:102:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:103:12
    |
 LL |     #[warn(x5400)] fn f() { }
    |            ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:105:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:106:12
    |
 LL |     #[warn(x5400)] struct S;
    |            ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:108:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:109:12
    |
 LL |     #[warn(x5400)] type T = S;
    |            ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:111:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:112:12
    |
 LL |     #[warn(x5400)] impl S { }
    |            ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:115:9
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:116:9
    |
 LL | #[allow(x5300)]
    |         ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:118:26
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:119:26
    |
 LL |     mod inner { #![allow(x5300)] }
    |                          ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:121:13
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:122:13
    |
 LL |     #[allow(x5300)] fn f() { }
    |             ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:124:13
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:125:13
    |
 LL |     #[allow(x5300)] struct S;
    |             ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:127:13
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:128:13
    |
 LL |     #[allow(x5300)] type T = S;
    |             ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:130:13
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:131:13
    |
 LL |     #[allow(x5300)] impl S { }
    |             ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:134:10
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:135:10
    |
 LL | #[forbid(x5200)]
    |          ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:137:27
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:138:27
    |
 LL |     mod inner { #![forbid(x5200)] }
    |                           ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:140:14
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:141:14
    |
 LL |     #[forbid(x5200)] fn f() { }
    |              ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:143:14
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:144:14
    |
 LL |     #[forbid(x5200)] struct S;
    |              ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:146:14
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:147:14
    |
 LL |     #[forbid(x5200)] type T = S;
    |              ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:149:14
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:150:14
    |
 LL |     #[forbid(x5200)] impl S { }
    |              ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:153:8
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:154:8
    |
 LL | #[deny(x5100)]
    |        ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:156:25
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:157:25
    |
 LL |     mod inner { #![deny(x5100)] }
    |                         ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:159:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:160:12
    |
 LL |     #[deny(x5100)] fn f() { }
    |            ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:162:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:163:12
    |
 LL |     #[deny(x5100)] struct S;
    |            ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:165:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:166:12
    |
 LL |     #[deny(x5100)] type T = S;
    |            ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:168:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:169:12
    |
 LL |     #[deny(x5100)] impl S { }
    |            ^^^^^
 
 warning: `#[macro_export]` only has an effect on macro definitions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:189:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:190:1
    |
 LL | #[macro_export]
    | ^^^^^^^^^^^^^^^
@@ -199,13 +199,13 @@ LL | #![warn(unused_attributes, unknown_lints)]
    |         ^^^^^^^^^^^^^^^^^
 
 warning: `#[automatically_derived]` only has an effect on trait implementation blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:257:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:258:1
    |
 LL | #[automatically_derived]
    | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:281:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:282:1
    |
 LL |   #[no_mangle]
    |   ^^^^^^^^^^^^
@@ -220,31 +220,31 @@ LL | | }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: `#[should_panic]` only has an effect on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:321:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:322:1
    |
 LL | #[should_panic]
    | ^^^^^^^^^^^^^^^
 
 warning: `#[ignore]` only has an effect on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:339:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:340:1
    |
 LL | #[ignore]
    | ^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:374:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:375:1
    |
 LL | #[reexport_test_harness_main = "2900"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:414:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:415:1
    |
 LL | #[no_std]
    | ^^^^^^^^^
 
 warning: attribute should be applied to a function definition
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:450:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:451:1
    |
 LL |   #[cold]
    |   ^^^^^^^
@@ -260,7 +260,7 @@ LL | | }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:479:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:480:1
    |
 LL |   #[link_name = "1900"]
    |   ^^^^^^^^^^^^^^^^^^^^^
@@ -276,7 +276,7 @@ LL | | }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:518:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:519:1
    |
 LL |   #[link_section = "1800"]
    |   ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -292,7 +292,7 @@ LL | | }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:550:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:551:1
    |
 LL |   #[link()]
    |   ^^^^^^^^^
@@ -308,65 +308,59 @@ LL | | }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: `#[must_use]` has no effect when applied to a module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:601:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:602:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:614:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:619:1
    |
 LL | #[windows_subsystem = "windows"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:635:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:640:1
    |
 LL | #[crate_name = "0900"]
    | ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:654:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:659:1
    |
 LL | #[crate_type = "0800"]
    | ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:673:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:678:1
    |
 LL | #[feature(x0600)]
    | ^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:693:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:698:1
    |
 LL | #[no_main]
    | ^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:712:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:717:1
    |
 LL | #[no_builtins]
    | ^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:731:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:736:1
    |
 LL | #[recursion_limit="0200"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:755:1
    |
 LL | #[type_length_limit="0100"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: `#[should_panic]` only has an effect on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:53:1
-   |
-LL | #![should_panic]
-   | ^^^^^^^^^^^^^^^^
-
 warning: attribute should be applied to an `extern` block with non-Rust ABI
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:64:1
    |
@@ -409,6 +403,12 @@ warning: `#[proc_macro_derive]` only has an effect on functions
 LL | #![proc_macro_derive(Test)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+warning: `#[should_panic]` only has an effect on functions
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:53:1
+   |
+LL | #![should_panic]
+   | ^^^^^^^^^^^^^^^^
+
 warning: attribute should be applied to a function definition
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:62:1
    |
@@ -418,7 +418,7 @@ LL | #![cold]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: the feature `rust1` has been stable since 1.0.0 and no longer requires an attribute to enable
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:85:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:86:12
    |
 LL | #![feature(rust1)]
    |            ^^^^^
@@ -426,121 +426,121 @@ LL | #![feature(rust1)]
    = note: `#[warn(stable_features)]` on by default
 
 warning: `#[macro_use]` only has an effect on `extern crate` and modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:176:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:177:5
    |
 LL |     #[macro_use] fn f() { }
    |     ^^^^^^^^^^^^
 
 warning: `#[macro_use]` only has an effect on `extern crate` and modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:179:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:180:5
    |
 LL |     #[macro_use] struct S;
    |     ^^^^^^^^^^^^
 
 warning: `#[macro_use]` only has an effect on `extern crate` and modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:182:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:183:5
    |
 LL |     #[macro_use] type T = S;
    |     ^^^^^^^^^^^^
 
 warning: `#[macro_use]` only has an effect on `extern crate` and modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:185:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:186:5
    |
 LL |     #[macro_use] impl S { }
    |     ^^^^^^^^^^^^
 
 warning: `#[macro_export]` only has an effect on macro definitions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:192:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:193:17
    |
 LL |     mod inner { #![macro_export] }
    |                 ^^^^^^^^^^^^^^^^
 
 warning: `#[macro_export]` only has an effect on macro definitions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:195:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:196:5
    |
 LL |     #[macro_export] fn f() { }
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[macro_export]` only has an effect on macro definitions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:198:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:199:5
    |
 LL |     #[macro_export] struct S;
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[macro_export]` only has an effect on macro definitions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:201:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:202:5
    |
 LL |     #[macro_export] type T = S;
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[macro_export]` only has an effect on macro definitions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:204:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:205:5
    |
 LL |     #[macro_export] impl S { }
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[path]` only has an effect on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:244:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:245:5
    |
 LL |     #[path = "3800"] fn f() { }
    |     ^^^^^^^^^^^^^^^^
 
 warning: `#[path]` only has an effect on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:247:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:248:5
    |
 LL |     #[path = "3800"]  struct S;
    |     ^^^^^^^^^^^^^^^^
 
 warning: `#[path]` only has an effect on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:250:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:251:5
    |
 LL |     #[path = "3800"] type T = S;
    |     ^^^^^^^^^^^^^^^^
 
 warning: `#[path]` only has an effect on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:253:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:254:5
    |
 LL |     #[path = "3800"] impl S { }
    |     ^^^^^^^^^^^^^^^^
 
 warning: `#[automatically_derived]` only has an effect on trait implementation blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:260:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:261:17
    |
 LL |     mod inner { #![automatically_derived] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: `#[automatically_derived]` only has an effect on trait implementation blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:263:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:264:5
    |
 LL |     #[automatically_derived] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: `#[automatically_derived]` only has an effect on trait implementation blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:266:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:267:5
    |
 LL |     #[automatically_derived] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: `#[automatically_derived]` only has an effect on trait implementation blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:269:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:270:5
    |
 LL |     #[automatically_derived] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: `#[automatically_derived]` only has an effect on trait implementation blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:272:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:273:5
    |
 LL |     #[automatically_derived] trait W { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: `#[automatically_derived]` only has an effect on trait implementation blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:275:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:276:5
    |
 LL |     #[automatically_derived] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:286:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:287:17
    |
 LL |     mod inner { #![no_mangle] }
    |     ------------^^^^^^^^^^^^^-- not a free function, impl method or static
@@ -548,7 +548,7 @@ LL |     mod inner { #![no_mangle] }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:293:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:294:5
    |
 LL |     #[no_mangle] struct S;
    |     ^^^^^^^^^^^^ --------- not a free function, impl method or static
@@ -556,7 +556,7 @@ LL |     #[no_mangle] struct S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:298:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:299:5
    |
 LL |     #[no_mangle] type T = S;
    |     ^^^^^^^^^^^^ ----------- not a free function, impl method or static
@@ -564,7 +564,7 @@ LL |     #[no_mangle] type T = S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:303:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:304:5
    |
 LL |     #[no_mangle] impl S { }
    |     ^^^^^^^^^^^^ ---------- not a free function, impl method or static
@@ -572,7 +572,7 @@ LL |     #[no_mangle] impl S { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:309:9
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:310:9
    |
 LL |         #[no_mangle] fn foo();
    |         ^^^^^^^^^^^^ --------- not a free function, impl method or static
@@ -580,7 +580,7 @@ LL |         #[no_mangle] fn foo();
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:314:9
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:315:9
    |
 LL |         #[no_mangle] fn bar() {}
    |         ^^^^^^^^^^^^ ----------- not a free function, impl method or static
@@ -588,163 +588,163 @@ LL |         #[no_mangle] fn bar() {}
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: `#[should_panic]` only has an effect on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:324:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:325:17
    |
 LL |     mod inner { #![should_panic] }
    |                 ^^^^^^^^^^^^^^^^
 
 warning: `#[should_panic]` only has an effect on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:329:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:330:5
    |
 LL |     #[should_panic] struct S;
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[should_panic]` only has an effect on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:332:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:333:5
    |
 LL |     #[should_panic] type T = S;
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[should_panic]` only has an effect on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:335:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:336:5
    |
 LL |     #[should_panic] impl S { }
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[ignore]` only has an effect on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:342:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:343:17
    |
 LL |     mod inner { #![ignore] }
    |                 ^^^^^^^^^^
 
 warning: `#[ignore]` only has an effect on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:347:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:348:5
    |
 LL |     #[ignore] struct S;
    |     ^^^^^^^^^
 
 warning: `#[ignore]` only has an effect on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:350:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:351:5
    |
 LL |     #[ignore] type T = S;
    |     ^^^^^^^^^
 
 warning: `#[ignore]` only has an effect on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:353:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:354:5
    |
 LL |     #[ignore] impl S { }
    |     ^^^^^^^^^
 
 warning: `#[no_implicit_prelude]` only has an effect on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:361:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:362:5
    |
 LL |     #[no_implicit_prelude] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: `#[no_implicit_prelude]` only has an effect on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:364:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:365:5
    |
 LL |     #[no_implicit_prelude] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: `#[no_implicit_prelude]` only has an effect on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:367:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:368:5
    |
 LL |     #[no_implicit_prelude] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: `#[no_implicit_prelude]` only has an effect on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:370:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:371:5
    |
 LL |     #[no_implicit_prelude] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:377:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:378:17
    |
 LL |     mod inner { #![reexport_test_harness_main="2900"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:380:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:381:5
    |
 LL |     #[reexport_test_harness_main = "2900"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:383:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:384:5
    |
 LL |     #[reexport_test_harness_main = "2900"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:386:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:387:5
    |
 LL |     #[reexport_test_harness_main = "2900"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:389:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:390:5
    |
 LL |     #[reexport_test_harness_main = "2900"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: `#[macro_escape]` only has an effect on `extern crate` and modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:401:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:402:5
    |
 LL |     #[macro_escape] fn f() { }
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[macro_escape]` only has an effect on `extern crate` and modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:404:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:405:5
    |
 LL |     #[macro_escape] struct S;
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[macro_escape]` only has an effect on `extern crate` and modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:407:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:408:5
    |
 LL |     #[macro_escape] type T = S;
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[macro_escape]` only has an effect on `extern crate` and modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:410:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:411:5
    |
 LL |     #[macro_escape] impl S { }
    |     ^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:417:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:418:17
    |
 LL |     mod inner { #![no_std] }
    |                 ^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:420:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:421:5
    |
 LL |     #[no_std] fn f() { }
    |     ^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:423:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:424:5
    |
 LL |     #[no_std] struct S;
    |     ^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:427:5
    |
 LL |     #[no_std] type T = S;
    |     ^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:429:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:430:5
    |
 LL |     #[no_std] impl S { }
    |     ^^^^^^^^^
 
 warning: attribute should be applied to a function definition
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:456:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:457:17
    |
 LL |     mod inner { #![cold] }
    |     ------------^^^^^^^^-- not a function definition
@@ -752,7 +752,7 @@ LL |     mod inner { #![cold] }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function definition
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:463:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:5
    |
 LL |     #[cold] struct S;
    |     ^^^^^^^ --------- not a function definition
@@ -760,7 +760,7 @@ LL |     #[cold] struct S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function definition
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:468:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:469:5
    |
 LL |     #[cold] type T = S;
    |     ^^^^^^^ ----------- not a function definition
@@ -768,7 +768,7 @@ LL |     #[cold] type T = S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function definition
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:473:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:474:5
    |
 LL |     #[cold] impl S { }
    |     ^^^^^^^ ---------- not a function definition
@@ -776,7 +776,7 @@ LL |     #[cold] impl S { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:485:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:486:5
    |
 LL |     #[link_name = "1900"]
    |     ^^^^^^^^^^^^^^^^^^^^^
@@ -786,13 +786,13 @@ LL |     extern "C" { }
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 help: try `#[link(name = "1900")]` instead
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:485:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:486:5
    |
 LL |     #[link_name = "1900"]
    |     ^^^^^^^^^^^^^^^^^^^^^
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:492:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:493:17
    |
 LL |     mod inner { #![link_name="1900"] }
    |     ------------^^^^^^^^^^^^^^^^^^^^-- not a foreign function or static
@@ -800,7 +800,7 @@ LL |     mod inner { #![link_name="1900"] }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:497:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:498:5
    |
 LL |     #[link_name = "1900"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^ ---------- not a foreign function or static
@@ -808,7 +808,7 @@ LL |     #[link_name = "1900"] fn f() { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:502:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:503:5
    |
 LL |     #[link_name = "1900"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^ --------- not a foreign function or static
@@ -816,7 +816,7 @@ LL |     #[link_name = "1900"] struct S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:507:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:508:5
    |
 LL |     #[link_name = "1900"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^ ----------- not a foreign function or static
@@ -824,7 +824,7 @@ LL |     #[link_name = "1900"] type T = S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a foreign function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:512:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:513:5
    |
 LL |     #[link_name = "1900"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^ ---------- not a foreign function or static
@@ -832,7 +832,7 @@ LL |     #[link_name = "1900"] impl S { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:524:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:525:17
    |
 LL |     mod inner { #![link_section="1800"] }
    |     ------------^^^^^^^^^^^^^^^^^^^^^^^-- not a function or static
@@ -840,7 +840,7 @@ LL |     mod inner { #![link_section="1800"] }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:531:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:5
    |
 LL |     #[link_section = "1800"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ --------- not a function or static
@@ -848,7 +848,7 @@ LL |     #[link_section = "1800"] struct S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:536:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:537:5
    |
 LL |     #[link_section = "1800"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a function or static
@@ -856,7 +856,7 @@ LL |     #[link_section = "1800"] type T = S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to a function or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:541:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:542:5
    |
 LL |     #[link_section = "1800"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ ---------- not a function or static
@@ -864,7 +864,7 @@ LL |     #[link_section = "1800"] impl S { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:556:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:557:17
    |
 LL |     mod inner { #![link()] }
    |     ------------^^^^^^^^^^-- not an `extern` block
@@ -872,7 +872,7 @@ LL |     mod inner { #![link()] }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:561:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:562:5
    |
 LL |     #[link()] fn f() { }
    |     ^^^^^^^^^ ---------- not an `extern` block
@@ -880,7 +880,7 @@ LL |     #[link()] fn f() { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:566:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:567:5
    |
 LL |     #[link()] struct S;
    |     ^^^^^^^^^ --------- not an `extern` block
@@ -888,7 +888,7 @@ LL |     #[link()] struct S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:571:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:572:5
    |
 LL |     #[link()] type T = S;
    |     ^^^^^^^^^ ----------- not an `extern` block
@@ -896,7 +896,7 @@ LL |     #[link()] type T = S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:576:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:577:5
    |
 LL |     #[link()] impl S { }
    |     ^^^^^^^^^ ---------- not an `extern` block
@@ -904,7 +904,7 @@ LL |     #[link()] impl S { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:581:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:582:5
    |
 LL |     #[link()] extern "Rust" {}
    |     ^^^^^^^^^
@@ -912,259 +912,259 @@ LL |     #[link()] extern "Rust" {}
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: `#[must_use]` has no effect when applied to a module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:603:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:605:17
    |
 LL |     mod inner { #![must_use] }
    |                 ^^^^^^^^^^^^
 
 warning: `#[must_use]` has no effect when applied to a type alias
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:609:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:612:5
    |
 LL |     #[must_use] type T = S;
    |     ^^^^^^^^^^^
 
 warning: `#[must_use]` has no effect when applied to an inherent implementation block
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:611:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:615:5
    |
 LL |     #[must_use] impl S { }
    |     ^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:617:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:622:17
    |
 LL |     mod inner { #![windows_subsystem="windows"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:620:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:625:5
    |
 LL |     #[windows_subsystem = "windows"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:623:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:628:5
    |
 LL |     #[windows_subsystem = "windows"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:626:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:631:5
    |
 LL |     #[windows_subsystem = "windows"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:629:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:634:5
    |
 LL |     #[windows_subsystem = "windows"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:638:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:643:17
    |
 LL |     mod inner { #![crate_name="0900"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:641:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:646:5
    |
 LL |     #[crate_name = "0900"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:644:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:649:5
    |
 LL |     #[crate_name = "0900"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:647:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:652:5
    |
 LL |     #[crate_name = "0900"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:650:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:655:5
    |
 LL |     #[crate_name = "0900"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:657:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:662:17
    |
 LL |     mod inner { #![crate_type="0800"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:660:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:665:5
    |
 LL |     #[crate_type = "0800"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:663:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:668:5
    |
 LL |     #[crate_type = "0800"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:666:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:671:5
    |
 LL |     #[crate_type = "0800"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:669:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:674:5
    |
 LL |     #[crate_type = "0800"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:676:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:681:17
    |
 LL |     mod inner { #![feature(x0600)] }
    |                 ^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:679:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:684:5
    |
 LL |     #[feature(x0600)] fn f() { }
    |     ^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:682:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:687:5
    |
 LL |     #[feature(x0600)] struct S;
    |     ^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:685:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:690:5
    |
 LL |     #[feature(x0600)] type T = S;
    |     ^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:693:5
    |
 LL |     #[feature(x0600)] impl S { }
    |     ^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:701:17
    |
 LL |     mod inner { #![no_main] }
    |                 ^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:699:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:704:5
    |
 LL |     #[no_main] fn f() { }
    |     ^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:702:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:707:5
    |
 LL |     #[no_main] struct S;
    |     ^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:705:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:710:5
    |
 LL |     #[no_main] type T = S;
    |     ^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:708:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:713:5
    |
 LL |     #[no_main] impl S { }
    |     ^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:715:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:720:17
    |
 LL |     mod inner { #![no_builtins] }
    |                 ^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:718:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:723:5
    |
 LL |     #[no_builtins] fn f() { }
    |     ^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:726:5
    |
 LL |     #[no_builtins] struct S;
    |     ^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:724:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:729:5
    |
 LL |     #[no_builtins] type T = S;
    |     ^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:727:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:732:5
    |
 LL |     #[no_builtins] impl S { }
    |     ^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:734:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:739:17
    |
 LL |     mod inner { #![recursion_limit="0200"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:737:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:742:5
    |
 LL |     #[recursion_limit="0200"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:740:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:745:5
    |
 LL |     #[recursion_limit="0200"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:743:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:748:5
    |
 LL |     #[recursion_limit="0200"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:746:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:751:5
    |
 LL |     #[recursion_limit="0200"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:753:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:758:17
    |
 LL |     mod inner { #![type_length_limit="0100"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:756:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:761:5
    |
 LL |     #[type_length_limit="0100"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:759:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:5
    |
 LL |     #[type_length_limit="0100"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:762:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:767:5
    |
 LL |     #[type_length_limit="0100"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:765:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:770:5
    |
 LL |     #[type_length_limit="0100"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/issues/issue-13105.rs b/tests/ui/fn/anonymous-parameters-trait-13105.rs
index d119aa9c788..171dab15fe7 100644
--- a/tests/ui/issues/issue-13105.rs
+++ b/tests/ui/fn/anonymous-parameters-trait-13105.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13105
+
 //@ edition: 2015
 //@ check-pass
 
diff --git a/tests/ui/fn/fn-arg-count-mismatch-diagnostics.rs b/tests/ui/fn/fn-arg-count-mismatch-diagnostics.rs
index b2f80ba1bf6..3b12ea1a736 100644
--- a/tests/ui/fn/fn-arg-count-mismatch-diagnostics.rs
+++ b/tests/ui/fn/fn-arg-count-mismatch-diagnostics.rs
@@ -46,9 +46,21 @@ impl Bar {
     }
 }
 
+fn function_with_lots_of_arguments(a: i32, b: char, c: i32, d: i32, e: i32, f: i32) {}
+
 fn main() {
     foo(1, 2, 3);
     //~^ ERROR function takes 4 arguments but 3
     bar(1, 2, 3);
     //~^ ERROR function takes 6 arguments but 3
+
+    let variable_name = 42;
+    function_with_lots_of_arguments(
+        variable_name,
+        variable_name,
+        variable_name,
+        variable_name,
+        variable_name,
+    );
+    //~^^^^^^^ ERROR this function takes 6 arguments but 5 arguments were supplied [E0061]
 }
diff --git a/tests/ui/fn/fn-arg-count-mismatch-diagnostics.stderr b/tests/ui/fn/fn-arg-count-mismatch-diagnostics.stderr
index 6af7671af03..dda9b398a83 100644
--- a/tests/ui/fn/fn-arg-count-mismatch-diagnostics.stderr
+++ b/tests/ui/fn/fn-arg-count-mismatch-diagnostics.stderr
@@ -52,7 +52,7 @@ LL |         <$from>::$method(8, /* u8 */)
    |                           ++++++++++
 
 error[E0061]: this function takes 4 arguments but 3 arguments were supplied
-  --> $DIR/fn-arg-count-mismatch-diagnostics.rs:50:5
+  --> $DIR/fn-arg-count-mismatch-diagnostics.rs:52:5
    |
 LL |     foo(1, 2, 3);
    |     ^^^--------- argument #4 of type `isize` is missing
@@ -68,7 +68,7 @@ LL |     foo(1, 2, 3, /* isize */);
    |                +++++++++++++
 
 error[E0061]: this function takes 6 arguments but 3 arguments were supplied
-  --> $DIR/fn-arg-count-mismatch-diagnostics.rs:52:5
+  --> $DIR/fn-arg-count-mismatch-diagnostics.rs:54:5
    |
 LL |     bar(1, 2, 3);
    |     ^^^--------- three arguments of type `i32`, `i32`, and `i32` are missing
@@ -83,6 +83,28 @@ help: provide the arguments
 LL |     bar(1, 2, 3, /* i32 */, /* i32 */, /* i32 */);
    |                +++++++++++++++++++++++++++++++++
 
-error: aborting due to 5 previous errors
+error[E0061]: this function takes 6 arguments but 5 arguments were supplied
+  --> $DIR/fn-arg-count-mismatch-diagnostics.rs:58:5
+   |
+LL |     function_with_lots_of_arguments(
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         variable_name,
+LL |         variable_name,
+   |         ------------- argument #2 of type `char` is missing
+   |
+note: function defined here
+  --> $DIR/fn-arg-count-mismatch-diagnostics.rs:49:4
+   |
+LL | fn function_with_lots_of_arguments(a: i32, b: char, c: i32, d: i32, e: i32, f: i32) {}
+   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^         -------
+help: provide the argument
+   |
+LL |     function_with_lots_of_arguments(
+LL |         variable_name,
+LL ~         /* char */,
+LL ~         variable_name,
+   |
+
+error: aborting due to 6 previous errors
 
 For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/issues/issue-15094.rs b/tests/ui/fn/fn-traits-call-once-signature-15094.rs
index 408ab82eb8c..f550bafe43d 100644
--- a/tests/ui/issues/issue-15094.rs
+++ b/tests/ui/fn/fn-traits-call-once-signature-15094.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15094
+
 #![feature(fn_traits, unboxed_closures)]
 
 use std::{fmt, ops};
diff --git a/tests/ui/issues/issue-15094.stderr b/tests/ui/fn/fn-traits-call-once-signature-15094.stderr
index 8e0fc8f1770..bb1d336e848 100644
--- a/tests/ui/issues/issue-15094.stderr
+++ b/tests/ui/fn/fn-traits-call-once-signature-15094.stderr
@@ -1,5 +1,5 @@
 error[E0053]: method `call_once` has an incompatible type for trait
-  --> $DIR/issue-15094.rs:11:5
+  --> $DIR/fn-traits-call-once-signature-15094.rs:13:5
    |
 LL |     fn call_once(self, _args: ()) {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected "rust-call" fn, found "Rust" fn
diff --git a/tests/ui/issues/issue-14959.rs b/tests/ui/fn_traits/closure-trait-impl-14959.rs
index 57af1207ff9..94d43055e64 100644
--- a/tests/ui/issues/issue-14959.rs
+++ b/tests/ui/fn_traits/closure-trait-impl-14959.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14959
+
 //@ check-pass
 
 #![feature(fn_traits, unboxed_closures)]
diff --git a/tests/ui/generic-associated-types/type-param-defaults.rs b/tests/ui/generic-associated-types/type-param-defaults.rs
index eea54c46073..6e9a62b96c4 100644
--- a/tests/ui/generic-associated-types/type-param-defaults.rs
+++ b/tests/ui/generic-associated-types/type-param-defaults.rs
@@ -4,17 +4,17 @@
 
 trait Trait {
     type Assoc<T = u32>;
-    //~^ ERROR defaults for type parameters are only allowed
+    //~^ ERROR defaults for generic parameters are not allowed here
 }
 
 impl Trait for () {
     type Assoc<T = u32> = u64;
-    //~^ ERROR defaults for type parameters are only allowed
+    //~^ ERROR defaults for generic parameters are not allowed here
 }
 
 impl Trait for u32 {
     type Assoc<T = u32> = T;
-    //~^ ERROR defaults for type parameters are only allowed
+    //~^ ERROR defaults for generic parameters are not allowed here
 }
 
 trait Other {}
diff --git a/tests/ui/generic-associated-types/type-param-defaults.stderr b/tests/ui/generic-associated-types/type-param-defaults.stderr
index 3c094d45fff..d9872dadbdb 100644
--- a/tests/ui/generic-associated-types/type-param-defaults.stderr
+++ b/tests/ui/generic-associated-types/type-param-defaults.stderr
@@ -1,16 +1,16 @@
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/type-param-defaults.rs:6:16
    |
 LL |     type Assoc<T = u32>;
    |                ^^^^^^^
 
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/type-param-defaults.rs:11:16
    |
 LL |     type Assoc<T = u32> = u64;
    |                ^^^^^^^
 
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/type-param-defaults.rs:16:16
    |
 LL |     type Assoc<T = u32> = T;
diff --git a/tests/ui/generic-const-items/parameter-defaults.rs b/tests/ui/generic-const-items/parameter-defaults.rs
index c933db17fa2..b52cb0fd002 100644
--- a/tests/ui/generic-const-items/parameter-defaults.rs
+++ b/tests/ui/generic-const-items/parameter-defaults.rs
@@ -7,9 +7,17 @@
 
 // FIXME(default_type_parameter_fallback): Consider reallowing them once they work properly.
 
-const NONE<T = ()>: Option<T> = None::<T>; //~ ERROR defaults for type parameters are only allowed
+const NONE<T = ()>: Option<T> = None::<T>;
+//~^ ERROR defaults for generic parameters are not allowed here
 
-fn main() {
-    let _ = NONE;
-    //~^ ERROR type annotations needed
+impl Host {
+    const NADA<T = ()>: Option<T> = None::<T>;
+    //~^ ERROR defaults for generic parameters are not allowed here
 }
+
+enum Host {}
+
+fn body0() { let _ = NONE; } //~ ERROR type annotations needed
+fn body1() { let _ = Host::NADA; } //~ ERROR type annotations needed
+
+fn main() {}
diff --git a/tests/ui/generic-const-items/parameter-defaults.stderr b/tests/ui/generic-const-items/parameter-defaults.stderr
index 13562c98f6d..9bf1f6412f5 100644
--- a/tests/ui/generic-const-items/parameter-defaults.stderr
+++ b/tests/ui/generic-const-items/parameter-defaults.stderr
@@ -1,20 +1,37 @@
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/parameter-defaults.rs:10:12
    |
 LL | const NONE<T = ()>: Option<T> = None::<T>;
    |            ^^^^^^
 
+error: defaults for generic parameters are not allowed here
+  --> $DIR/parameter-defaults.rs:14:16
+   |
+LL |     const NADA<T = ()>: Option<T> = None::<T>;
+   |                ^^^^^^
+
+error[E0282]: type annotations needed for `Option<_>`
+  --> $DIR/parameter-defaults.rs:20:18
+   |
+LL | fn body0() { let _ = NONE; }
+   |                  ^   ---- type must be known at this point
+   |
+help: consider giving this pattern a type, where the type for type parameter `T` is specified
+   |
+LL | fn body0() { let _: Option<T> = NONE; }
+   |                   +++++++++++
+
 error[E0282]: type annotations needed for `Option<_>`
-  --> $DIR/parameter-defaults.rs:13:9
+  --> $DIR/parameter-defaults.rs:21:18
    |
-LL |     let _ = NONE;
-   |         ^   ---- type must be known at this point
+LL | fn body1() { let _ = Host::NADA; }
+   |                  ^   ---------- type must be known at this point
    |
 help: consider giving this pattern a type, where the type for type parameter `T` is specified
    |
-LL |     let _: Option<T> = NONE;
-   |          +++++++++++
+LL | fn body1() { let _: Option<T> = Host::NADA; }
+   |                   +++++++++++
 
-error: aborting due to 2 previous errors
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/issues/issue-14092.rs b/tests/ui/generics/box-missing-generics-14092.rs
index 67c2a42eafb..3570d5f675f 100644
--- a/tests/ui/issues/issue-14092.rs
+++ b/tests/ui/generics/box-missing-generics-14092.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14092
+
 fn fn1(0: Box) {}
 //~^ ERROR missing generics for struct `Box`
 
diff --git a/tests/ui/issues/issue-14092.stderr b/tests/ui/generics/box-missing-generics-14092.stderr
index 0de7b902fe0..0822d781ac7 100644
--- a/tests/ui/issues/issue-14092.stderr
+++ b/tests/ui/generics/box-missing-generics-14092.stderr
@@ -1,5 +1,5 @@
 error[E0107]: missing generics for struct `Box`
-  --> $DIR/issue-14092.rs:1:11
+  --> $DIR/box-missing-generics-14092.rs:3:11
    |
 LL | fn fn1(0: Box) {}
    |           ^^^ expected at least 1 generic argument
diff --git a/tests/ui/generics/generic-extern.rs b/tests/ui/generics/generic-extern.rs
index 36fa5eaafd6..b4f00fc1187 100644
--- a/tests/ui/generics/generic-extern.rs
+++ b/tests/ui/generics/generic-extern.rs
@@ -1,7 +1,15 @@
+// Ensure that we reject generic parameters on foreign items.
+
 extern "C" {
     fn foo<T>(); //~ ERROR foreign items may not have type parameters
+
+    // Furthermore, check that type parameter defaults lead to a *hard* error,
+    // not just a lint error, for maximum forward compatibility.
+    #[allow(invalid_type_param_default)] // Should have no effect here.
+    fn bar<T = ()>(); //~ ERROR foreign items may not have type parameters
+    //~^ ERROR defaults for generic parameters are not allowed here
 }
 
 fn main() {
-    foo::<i32>(); //~ ERROR requires unsafe
+    unsafe { foo::<i32>() };
 }
diff --git a/tests/ui/generics/generic-extern.stderr b/tests/ui/generics/generic-extern.stderr
index a3f28825316..6e837156812 100644
--- a/tests/ui/generics/generic-extern.stderr
+++ b/tests/ui/generics/generic-extern.stderr
@@ -1,20 +1,25 @@
 error[E0044]: foreign items may not have type parameters
-  --> $DIR/generic-extern.rs:2:5
+  --> $DIR/generic-extern.rs:4:5
    |
 LL |     fn foo<T>();
    |     ^^^^^^^^^^^^ can't have type parameters
    |
    = help: replace the type parameters with concrete types like `u32`
 
-error[E0133]: call to unsafe function `foo` is unsafe and requires unsafe function or block
-  --> $DIR/generic-extern.rs:6:5
+error: defaults for generic parameters are not allowed here
+  --> $DIR/generic-extern.rs:9:12
    |
-LL |     foo::<i32>();
-   |     ^^^^^^^^^^^^ call to unsafe function
+LL |     fn bar<T = ()>();
+   |            ^^^^^^
+
+error[E0044]: foreign items may not have type parameters
+  --> $DIR/generic-extern.rs:9:5
    |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
+LL |     fn bar<T = ()>();
+   |     ^^^^^^^^^^^^^^^^^ can't have type parameters
+   |
+   = help: replace the type parameters with concrete types like `u32`
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0044, E0133.
-For more information about an error, try `rustc --explain E0044`.
+For more information about this error, try `rustc --explain E0044`.
diff --git a/tests/ui/generics/invalid-type-param-default.rs b/tests/ui/generics/invalid-type-param-default.rs
new file mode 100644
index 00000000000..b47e142605c
--- /dev/null
+++ b/tests/ui/generics/invalid-type-param-default.rs
@@ -0,0 +1,22 @@
+// Ensure that we emit the deny-by-default lint `invalid_type_param_default` in locations where
+// type parameter defaults were accidentally allowed but don't have any effect whatsoever.
+//
+// Tracked in <https://github.com/rust-lang/rust/issues/36887>.
+// FIXME(default_type_parameter_fallback): Consider reallowing them once they work properly.
+
+fn avg<T = i32>(_: T) {}
+//~^ ERROR defaults for generic parameters are not allowed here [invalid_type_param_default]
+//~| WARN this was previously accepted
+
+// issue: <https://github.com/rust-lang/rust/issues/26812>
+fn mdn<T = T::Item>(_: T) {}
+//~^ ERROR generic parameter defaults cannot reference parameters before they are declared
+//~| ERROR defaults for generic parameters are not allowed here [invalid_type_param_default]
+//~| WARN this was previously accepted
+
+struct S<T>(T);
+impl<T = i32> S<T> {}
+//~^ ERROR defaults for generic parameters are not allowed here [invalid_type_param_default]
+//~| WARN this was previously accepted
+
+fn main() {}
diff --git a/tests/ui/generics/invalid-type-param-default.stderr b/tests/ui/generics/invalid-type-param-default.stderr
new file mode 100644
index 00000000000..1c8fdd8ab5c
--- /dev/null
+++ b/tests/ui/generics/invalid-type-param-default.stderr
@@ -0,0 +1,70 @@
+error[E0128]: generic parameter defaults cannot reference parameters before they are declared
+  --> $DIR/invalid-type-param-default.rs:12:12
+   |
+LL | fn mdn<T = T::Item>(_: T) {}
+   |            ^^^^^^^ cannot reference `T` before it is declared
+
+error: defaults for generic parameters are not allowed here
+  --> $DIR/invalid-type-param-default.rs:7:8
+   |
+LL | fn avg<T = i32>(_: T) {}
+   |        ^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
+   = note: `#[deny(invalid_type_param_default)]` on by default
+
+error: defaults for generic parameters are not allowed here
+  --> $DIR/invalid-type-param-default.rs:12:8
+   |
+LL | fn mdn<T = T::Item>(_: T) {}
+   |        ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
+
+error: defaults for generic parameters are not allowed here
+  --> $DIR/invalid-type-param-default.rs:18:6
+   |
+LL | impl<T = i32> S<T> {}
+   |      ^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0128`.
+Future incompatibility report: Future breakage diagnostic:
+error: defaults for generic parameters are not allowed here
+  --> $DIR/invalid-type-param-default.rs:7:8
+   |
+LL | fn avg<T = i32>(_: T) {}
+   |        ^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
+   = note: `#[deny(invalid_type_param_default)]` on by default
+
+Future breakage diagnostic:
+error: defaults for generic parameters are not allowed here
+  --> $DIR/invalid-type-param-default.rs:12:8
+   |
+LL | fn mdn<T = T::Item>(_: T) {}
+   |        ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
+   = note: `#[deny(invalid_type_param_default)]` on by default
+
+Future breakage diagnostic:
+error: defaults for generic parameters are not allowed here
+  --> $DIR/invalid-type-param-default.rs:18:6
+   |
+LL | impl<T = i32> S<T> {}
+   |      ^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
+   = note: `#[deny(invalid_type_param_default)]` on by default
+
diff --git a/tests/ui/generics/overlapping-errors-span-issue-123861.rs b/tests/ui/generics/overlapping-errors-span-issue-123861.rs
index e0a27f68748..2549f4b3714 100644
--- a/tests/ui/generics/overlapping-errors-span-issue-123861.rs
+++ b/tests/ui/generics/overlapping-errors-span-issue-123861.rs
@@ -1,7 +1,7 @@
 fn mainIterator<_ = _> {}
 //~^ ERROR expected identifier, found reserved identifier `_`
 //~| ERROR   missing parameters for function definition
-//~| ERROR   defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions [invalid_type_param_default]
+//~| ERROR   defaults for generic parameters are not allowed here [invalid_type_param_default]
 //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 //~| ERROR   the placeholder `_` is not allowed within types on item signatures for functions [E0121]
 
diff --git a/tests/ui/generics/overlapping-errors-span-issue-123861.stderr b/tests/ui/generics/overlapping-errors-span-issue-123861.stderr
index 7d08d8fed9f..44e8b4a01e7 100644
--- a/tests/ui/generics/overlapping-errors-span-issue-123861.stderr
+++ b/tests/ui/generics/overlapping-errors-span-issue-123861.stderr
@@ -15,7 +15,7 @@ help: add a parameter list
 LL | fn mainIterator<_ = _>() {}
    |                       ++
 
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/overlapping-errors-span-issue-123861.rs:1:17
    |
 LL | fn mainIterator<_ = _> {}
@@ -35,7 +35,7 @@ error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0121`.
 Future incompatibility report: Future breakage diagnostic:
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/overlapping-errors-span-issue-123861.rs:1:17
    |
 LL | fn mainIterator<_ = _> {}
diff --git a/tests/ui/issues/issue-36116.rs b/tests/ui/generics/unnecessary-path-disambiguator-36116.rs
index 2313e189aff..c2dab605f59 100644
--- a/tests/ui/issues/issue-36116.rs
+++ b/tests/ui/generics/unnecessary-path-disambiguator-36116.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/36116
 // Unnecessary path disambiguator is ok
 
 //@ check-pass
diff --git a/tests/ui/issues/issue-36075.rs b/tests/ui/generics/unused-type-parameter-regression-36075.rs
index a563332ad78..4d6eb617b59 100644
--- a/tests/ui/issues/issue-36075.rs
+++ b/tests/ui/generics/unused-type-parameter-regression-36075.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/36075
 //@ check-pass
 #![allow(dead_code)]
 trait DeclarationParser {
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.rs
index d8a1f3fa69e..d2793afdd06 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.rs
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.rs
@@ -6,6 +6,8 @@
 // This tests double-checks that we do not allow such behavior to leak
 // through again.
 
+//@ compile-flags: -Zwrite-long-types-to-disk=yes
+
 pub trait Stream {
     type Item;
     fn next(self) -> Option<Self::Item>;
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.stderr
index 23b979e2ef0..91e65b2b073 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.stderr
@@ -1,5 +1,5 @@
-error[E0599]: the method `countx` exists for struct `Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, {closure@$DIR/hrtb-doesnt-borrow-self-2.rs:109:30: 109:37}>`, but its trait bounds were not satisfied
-  --> $DIR/hrtb-doesnt-borrow-self-2.rs:110:24
+error[E0599]: the method `countx` exists for struct `Filter<Map<Repeat, fn(&u64) -> &u64 {identity::<u64>}>, {closure@...}>`, but its trait bounds were not satisfied
+  --> $DIR/hrtb-doesnt-borrow-self-2.rs:112:24
    |
 LL | pub struct Filter<S, F> {
    | ----------------------- method `countx` not found for this struct because it doesn't satisfy `_: StreamExt`
@@ -8,19 +8,21 @@ LL |     let count = filter.countx();
    |                        ^^^^^^ method cannot be called due to unsatisfied trait bounds
    |
 note: the following trait bounds were not satisfied:
-      `&'a mut &Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, {closure@$DIR/hrtb-doesnt-borrow-self-2.rs:109:30: 109:37}>: Stream`
-      `&'a mut &mut Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, {closure@$DIR/hrtb-doesnt-borrow-self-2.rs:109:30: 109:37}>: Stream`
-      `&'a mut Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, {closure@$DIR/hrtb-doesnt-borrow-self-2.rs:109:30: 109:37}>: Stream`
-  --> $DIR/hrtb-doesnt-borrow-self-2.rs:96:50
+      `&'a mut &Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, {closure@$DIR/hrtb-doesnt-borrow-self-2.rs:111:30: 111:37}>: Stream`
+      `&'a mut &mut Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, {closure@$DIR/hrtb-doesnt-borrow-self-2.rs:111:30: 111:37}>: Stream`
+      `&'a mut Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, {closure@$DIR/hrtb-doesnt-borrow-self-2.rs:111:30: 111:37}>: Stream`
+  --> $DIR/hrtb-doesnt-borrow-self-2.rs:98:50
    |
 LL | impl<T> StreamExt for T where for<'a> &'a mut T: Stream {}
    |         ---------     -                          ^^^^^^ unsatisfied trait bound introduced here
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `StreamExt` defines an item `countx`, perhaps you need to implement it
-  --> $DIR/hrtb-doesnt-borrow-self-2.rs:64:1
+  --> $DIR/hrtb-doesnt-borrow-self-2.rs:66:1
    |
 LL | pub trait StreamExt
    | ^^^^^^^^^^^^^^^^^^^
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/hrtb-doesnt-borrow-self-2.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/hygiene/panic-location.run.stderr b/tests/ui/hygiene/panic-location.run.stderr
index 5cd07dcda4c..d28ab864183 100644
--- a/tests/ui/hygiene/panic-location.run.stderr
+++ b/tests/ui/hygiene/panic-location.run.stderr
@@ -1,4 +1,4 @@
 
-thread 'main' panicked at $DIR/panic-location.rs:LL:CC:
+thread 'main' ($TID) panicked at $DIR/panic-location.rs:LL:CC:
 capacity overflow
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak2.rs b/tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak2.rs
index 09450089ada..ead81bf3374 100644
--- a/tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak2.rs
+++ b/tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak2.rs
@@ -1,3 +1,4 @@
+//@ compile-flags: -Zwrite-long-types-to-disk=yes
 use std::cell::Cell;
 use std::rc::Rc;
 
diff --git a/tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak2.stderr b/tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak2.stderr
index 52fa28145d6..ba76d9ba2b8 100644
--- a/tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak2.stderr
+++ b/tests/ui/impl-trait/auto-trait-leakage/auto-trait-leak2.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `Rc<Cell<i32>>` cannot be sent between threads safely
-  --> $DIR/auto-trait-leak2.rs:20:10
+  --> $DIR/auto-trait-leak2.rs:21:10
    |
 LL | fn before() -> impl Fn(i32) {
    |                ------------ within this `impl Fn(i32)`
@@ -11,23 +11,23 @@ LL |     send(before());
    |
    = help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
 note: required because it's used within this closure
-  --> $DIR/auto-trait-leak2.rs:10:5
+  --> $DIR/auto-trait-leak2.rs:11:5
    |
 LL |     move |x| p.set(x)
    |     ^^^^^^^^
 note: required because it appears within the type `impl Fn(i32)`
-  --> $DIR/auto-trait-leak2.rs:5:16
+  --> $DIR/auto-trait-leak2.rs:6:16
    |
 LL | fn before() -> impl Fn(i32) {
    |                ^^^^^^^^^^^^
 note: required by a bound in `send`
-  --> $DIR/auto-trait-leak2.rs:13:12
+  --> $DIR/auto-trait-leak2.rs:14:12
    |
 LL | fn send<T: Send>(_: T) {}
    |            ^^^^ required by this bound in `send`
 
 error[E0277]: `Rc<Cell<i32>>` cannot be sent between threads safely
-  --> $DIR/auto-trait-leak2.rs:25:10
+  --> $DIR/auto-trait-leak2.rs:26:10
    |
 LL |     send(after());
    |     ---- ^^^^^^^ `Rc<Cell<i32>>` cannot be sent between threads safely
@@ -39,17 +39,17 @@ LL | fn after() -> impl Fn(i32) {
    |
    = help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
 note: required because it's used within this closure
-  --> $DIR/auto-trait-leak2.rs:38:5
+  --> $DIR/auto-trait-leak2.rs:39:5
    |
 LL |     move |x| p.set(x)
    |     ^^^^^^^^
 note: required because it appears within the type `impl Fn(i32)`
-  --> $DIR/auto-trait-leak2.rs:33:15
+  --> $DIR/auto-trait-leak2.rs:34:15
    |
 LL | fn after() -> impl Fn(i32) {
    |               ^^^^^^^^^^^^
 note: required by a bound in `send`
-  --> $DIR/auto-trait-leak2.rs:13:12
+  --> $DIR/auto-trait-leak2.rs:14:12
    |
 LL | fn send<T: Send>(_: T) {}
    |            ^^^^ required by this bound in `send`
diff --git a/tests/ui/impl-trait/issues/issue-55872-2.rs b/tests/ui/impl-trait/issues/issue-55872-2.rs
index a3b2225126a..aea00dd9e3d 100644
--- a/tests/ui/impl-trait/issues/issue-55872-2.rs
+++ b/tests/ui/impl-trait/issues/issue-55872-2.rs
@@ -12,7 +12,6 @@ impl<S> Bar for S {
     type E = impl std::marker::Send;
     fn foo<T>() -> Self::E {
         //~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
-        //~| ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
         async {}
     }
 }
diff --git a/tests/ui/impl-trait/issues/issue-55872-2.stderr b/tests/ui/impl-trait/issues/issue-55872-2.stderr
index 51a7dd00ade..91c2ecdc8a4 100644
--- a/tests/ui/impl-trait/issues/issue-55872-2.stderr
+++ b/tests/ui/impl-trait/issues/issue-55872-2.stderr
@@ -4,13 +4,5 @@ error: type parameter `T` is part of concrete type but not used in parameter lis
 LL |     fn foo<T>() -> Self::E {
    |                    ^^^^^^^
 
-error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
-  --> $DIR/issue-55872-2.rs:13:20
-   |
-LL |     fn foo<T>() -> Self::E {
-   |                    ^^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/issues/issue-55872-3.rs b/tests/ui/impl-trait/issues/issue-55872-3.rs
index 763b4b9fd32..698e7f36234 100644
--- a/tests/ui/impl-trait/issues/issue-55872-3.rs
+++ b/tests/ui/impl-trait/issues/issue-55872-3.rs
@@ -14,7 +14,6 @@ impl<S> Bar for S {
     fn foo<T>() -> Self::E {
         //~^ ERROR : Copy` is not satisfied [E0277]
         //~| ERROR type parameter `T` is part of concrete type
-        //~| ERROR type parameter `T` is part of concrete type
         async {}
     }
 }
diff --git a/tests/ui/impl-trait/issues/issue-55872-3.stderr b/tests/ui/impl-trait/issues/issue-55872-3.stderr
index ce2dd7f02b4..5124c46baeb 100644
--- a/tests/ui/impl-trait/issues/issue-55872-3.stderr
+++ b/tests/ui/impl-trait/issues/issue-55872-3.stderr
@@ -1,26 +1,15 @@
-error[E0277]: the trait bound `{async block@$DIR/issue-55872-3.rs:18:9: 18:14}: Copy` is not satisfied
-  --> $DIR/issue-55872-3.rs:14:20
-   |
-LL |     fn foo<T>() -> Self::E {
-   |                    ^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/issue-55872-3.rs:18:9: 18:14}`
-...
-LL |         async {}
-   |         -------- return type was inferred to be `{async block@$DIR/issue-55872-3.rs:18:9: 18:14}` here
-
 error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> $DIR/issue-55872-3.rs:14:20
    |
 LL |     fn foo<T>() -> Self::E {
    |                    ^^^^^^^
 
-error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
+error[E0277]: the trait bound `{async block@$DIR/issue-55872-3.rs:17:9: 17:14}: Copy` is not satisfied
   --> $DIR/issue-55872-3.rs:14:20
    |
 LL |     fn foo<T>() -> Self::E {
-   |                    ^^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+   |                    ^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/issue-55872-3.rs:17:9: 17:14}`
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/issues/type-error-post-normalization-test.rs b/tests/ui/impl-trait/issues/type-error-post-normalization-test.rs
new file mode 100644
index 00000000000..0108bb23611
--- /dev/null
+++ b/tests/ui/impl-trait/issues/type-error-post-normalization-test.rs
@@ -0,0 +1,24 @@
+//@ compile-flags: -Zvalidate-mir -Zinline-mir=yes
+
+// This previously introduced a `{type_error}`` in the MIR body
+// during the `PostAnalysisNormalize` pass. While the underlying issue
+// #135528 did not get fixed, this reproducer no longer ICEs.
+
+#![feature(type_alias_impl_trait)]
+type Tait = impl Copy;
+
+fn set(x: &isize) -> isize {
+    *x
+}
+
+#[define_opaque(Tait)]
+fn d(x: Tait) {
+    set(x);
+}
+
+#[define_opaque(Tait)]
+fn other_define() -> Tait {
+    () //~^ ERROR concrete type differs from previous defining opaque type use
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/issues/type-error-post-normalization-test.stderr b/tests/ui/impl-trait/issues/type-error-post-normalization-test.stderr
new file mode 100644
index 00000000000..7d63c1cfbd6
--- /dev/null
+++ b/tests/ui/impl-trait/issues/type-error-post-normalization-test.stderr
@@ -0,0 +1,14 @@
+error: concrete type differs from previous defining opaque type use
+  --> $DIR/type-error-post-normalization-test.rs:20:22
+   |
+LL | fn other_define() -> Tait {
+   |                      ^^^^ expected `&isize`, got `()`
+   |
+note: previous use here
+  --> $DIR/type-error-post-normalization-test.rs:16:9
+   |
+LL |     set(x);
+   |         ^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/impl-trait/member-constraints/apply_member_constraint-no-req-eq.rs b/tests/ui/impl-trait/member-constraints/apply_member_constraint-no-req-eq.rs
new file mode 100644
index 00000000000..3aa52fe2644
--- /dev/null
+++ b/tests/ui/impl-trait/member-constraints/apply_member_constraint-no-req-eq.rs
@@ -0,0 +1,24 @@
+//@ check-pass
+// FIXME(-Znext-solver): enable this test
+
+trait Id {
+    type This;
+}
+impl<T> Id for T {
+    type This = T;
+}
+
+// We have two member constraints here:
+//
+// - 'unconstrained member ['a, 'static]
+// - 'unconstrained member ['static]
+//
+// Applying the first constraint results in `'unconstrained: 'a`
+// while the second then adds `'unconstrained: 'static`. If applying
+// member constraints were to require the member region equal to the
+// choice region, applying the first constraint first and then the
+// second would result in a `'a: 'static` requirement.
+fn test<'a>() -> impl Id<This = impl Sized + use<>> + use<'a> {
+    &()
+}
+fn main() {}
diff --git a/tests/ui/impl-trait/member-constraints/incomplete-constraint.rs b/tests/ui/impl-trait/member-constraints/incomplete-constraint.rs
new file mode 100644
index 00000000000..4c085cc1eed
--- /dev/null
+++ b/tests/ui/impl-trait/member-constraints/incomplete-constraint.rs
@@ -0,0 +1,21 @@
+//@ check-pass
+// FIXME(-Znext-solver): enable this test
+
+// These functions currently do not normalize the opaque type but will do
+// so in the future. At this point we've got a new use of the opaque with fully
+// universal arguments but for which lifetimes in the hidden type are unconstrained.
+//
+// Applying the member constraints would then incompletely infer `'unconstrained` to `'static`.
+fn new_defining_use<F: FnOnce(T) -> R, T, R>(_: F) {}
+
+fn rpit1<'a,  'b: 'b>(x: &'b ()) -> impl Sized + use<'a, 'b> {
+    new_defining_use(rpit1::<'a, 'b>);
+    x
+}
+
+struct Inv<'a, 'b>(*mut (&'a (), &'b ()));
+fn rpit2<'a>(_: ()) -> impl Sized + use<'a> {
+    new_defining_use(rpit2::<'a>);
+    Inv::<'a, 'static>(std::ptr::null_mut())
+}
+fn main() {}
diff --git a/tests/ui/nll/member-constraints/min-choice-reject-ambiguous.rs b/tests/ui/impl-trait/member-constraints/min-choice-reject-ambiguous.rs
index 09138095523..09138095523 100644
--- a/tests/ui/nll/member-constraints/min-choice-reject-ambiguous.rs
+++ b/tests/ui/impl-trait/member-constraints/min-choice-reject-ambiguous.rs
diff --git a/tests/ui/nll/member-constraints/min-choice-reject-ambiguous.stderr b/tests/ui/impl-trait/member-constraints/min-choice-reject-ambiguous.stderr
index 911ddd3dc80..911ddd3dc80 100644
--- a/tests/ui/nll/member-constraints/min-choice-reject-ambiguous.stderr
+++ b/tests/ui/impl-trait/member-constraints/min-choice-reject-ambiguous.stderr
diff --git a/tests/ui/nll/member-constraints/min-choice.rs b/tests/ui/impl-trait/member-constraints/min-choice.rs
index 4fbffeb4b2a..4fbffeb4b2a 100644
--- a/tests/ui/nll/member-constraints/min-choice.rs
+++ b/tests/ui/impl-trait/member-constraints/min-choice.rs
diff --git a/tests/ui/nll/member-constraints/nested-impl-trait-fail.rs b/tests/ui/impl-trait/member-constraints/nested-impl-trait-fail.rs
index 0bf32a2624f..0bf32a2624f 100644
--- a/tests/ui/nll/member-constraints/nested-impl-trait-fail.rs
+++ b/tests/ui/impl-trait/member-constraints/nested-impl-trait-fail.rs
diff --git a/tests/ui/nll/member-constraints/nested-impl-trait-fail.stderr b/tests/ui/impl-trait/member-constraints/nested-impl-trait-fail.stderr
index 1a0611e715e..1a0611e715e 100644
--- a/tests/ui/nll/member-constraints/nested-impl-trait-fail.stderr
+++ b/tests/ui/impl-trait/member-constraints/nested-impl-trait-fail.stderr
diff --git a/tests/ui/nll/member-constraints/nested-impl-trait-pass.rs b/tests/ui/impl-trait/member-constraints/nested-impl-trait-pass.rs
index 4633ad68230..6860fc5e6a5 100644
--- a/tests/ui/nll/member-constraints/nested-impl-trait-pass.rs
+++ b/tests/ui/impl-trait/member-constraints/nested-impl-trait-pass.rs
@@ -1,6 +1,7 @@
 // Nested impl-traits can impose different member constraints on the same region variable.
 
 //@ check-pass
+// FIXME(-Znext-solver): enable this test
 
 trait Cap<'a> {}
 impl<T> Cap<'_> for T {}
@@ -8,7 +9,9 @@ impl<T> Cap<'_> for T {}
 // Assuming the hidden type is `[&'?15 u8; 1]`, we have two distinct member constraints:
 // - '?15 member ['static, 'a, 'b] // from outer impl-trait
 // - '?15 member ['static, 'a]     // from inner impl-trait
-// To satisfy both we can only choose 'a.
+// To satisfy both we can only choose 'a. Concretely, first member constraint requires ?15
+// to outlive at least 'b while the second requires ?15 to outlive 'a. As 'a outlives 'b we
+// end up with 'a as the final member region.
 fn pass_early_bound<'s, 'a, 'b>(a: &'s u8) -> impl IntoIterator<Item = impl Cap<'a>> + Cap<'b>
 where
     's: 'a,
diff --git a/tests/ui/impl-trait/member-constraints/reject-choice-due-to-prev-constraint.rs b/tests/ui/impl-trait/member-constraints/reject-choice-due-to-prev-constraint.rs
new file mode 100644
index 00000000000..33f2d277fe5
--- /dev/null
+++ b/tests/ui/impl-trait/member-constraints/reject-choice-due-to-prev-constraint.rs
@@ -0,0 +1,34 @@
+//@ revisions: current next
+//@[next] compile-flags: -Znext-solver
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@ check-pass
+
+// We've got `'0 member ['a, 'b, 'static]` and `'1 member ['a, 'b, 'static]`.
+//
+// As '0 gets outlived by 'a - its "upper bound" -  the only applicable choice
+// region is 'a.
+//
+// '1 has to outlive 'b so the only applicable choice regions are 'b and 'static.
+// Considering this member constraint by itself would choose 'b as it is the
+// smaller of the two regions.
+//
+// However, this is only the case when ignoring the member constraint on '0.
+// After applying this constraint and requiring '0 to outlive 'a. As '1 outlives
+// '0, the region 'b is no longer an applicable choice region for '1 as 'b does
+// does not outlive 'a. We would therefore choose 'static.
+//
+// This means applying member constraints is order dependent. We handle this by
+// first applying member constraints for regions 'x and then consider the resulting
+// constraints when applying member constraints for regions 'y with 'y: 'x.
+fn with_constraints<'r0, 'r1, 'a, 'b>() -> *mut (&'r0 (), &'r1 ())
+where
+    'r1: 'r0,
+    'a: 'r0,
+    'r1: 'b,
+{
+    loop {}
+}
+fn foo<'a, 'b>() -> impl Sized + use<'a, 'b> {
+    with_constraints::<'_, '_, 'a, 'b>()
+}
+fn main() {}
diff --git a/tests/ui/impl-trait/no-anonymize-regions.rs b/tests/ui/impl-trait/no-anonymize-regions.rs
new file mode 100644
index 00000000000..4f7f7c0641c
--- /dev/null
+++ b/tests/ui/impl-trait/no-anonymize-regions.rs
@@ -0,0 +1,18 @@
+//@ check-pass
+// FIXME(-Znext-solver): enable this test
+
+// A regression test for an error in `redis` while working on #139587.
+//
+// We check for structural equality when adding defining uses of opaques.
+// In this test one defining use had anonymized regions while the other
+// one did not, causing an error.
+struct W<T>(T);
+fn constrain<F: FnOnce(T) -> R, T, R>(f: F) -> R {
+    loop {}
+}
+fn foo<'a>(x: for<'b> fn(&'b ())) -> impl Sized + use<'a> {
+    let mut r = constrain(foo::<'_>);
+    r = W(x);
+    r
+}
+fn main() {}
diff --git a/tests/ui/impl-trait/where-allowed.rs b/tests/ui/impl-trait/where-allowed.rs
index 1c3c66c537f..04a95f7f6f0 100644
--- a/tests/ui/impl-trait/where-allowed.rs
+++ b/tests/ui/impl-trait/where-allowed.rs
@@ -236,17 +236,15 @@ type InTypeAliasGenericParamDefault<T = impl Debug> = T;
 //~^ ERROR `impl Trait` is not allowed in generic parameter defaults
 
 // Disallowed
-impl <T = impl Debug> T {}
-//~^ ERROR defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-//~| WARNING this was previously accepted by the compiler but is being phased out
-//~| ERROR `impl Trait` is not allowed in generic parameter defaults
+#[expect(invalid_type_param_default)]
+impl<T = impl Debug> T {}
+//~^ ERROR `impl Trait` is not allowed in generic parameter defaults
 //~| ERROR no nominal type found
 
 // Disallowed
+#[expect(invalid_type_param_default)]
 fn in_method_generic_param_default<T = impl Debug>(_: T) {}
-//~^ ERROR defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-//~| WARNING this was previously accepted by the compiler but is being phased out
-//~| ERROR `impl Trait` is not allowed in generic parameter defaults
+//~^ ERROR `impl Trait` is not allowed in generic parameter defaults
 
 fn main() {
     let _in_local_variable: impl Fn() = || {};
diff --git a/tests/ui/impl-trait/where-allowed.stderr b/tests/ui/impl-trait/where-allowed.stderr
index 052ae5a9931..08caff326c4 100644
--- a/tests/ui/impl-trait/where-allowed.stderr
+++ b/tests/ui/impl-trait/where-allowed.stderr
@@ -311,10 +311,10 @@ LL | type InTypeAliasGenericParamDefault<T = impl Debug> = T;
    = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error[E0562]: `impl Trait` is not allowed in generic parameter defaults
-  --> $DIR/where-allowed.rs:239:11
+  --> $DIR/where-allowed.rs:240:10
    |
-LL | impl <T = impl Debug> T {}
-   |           ^^^^^^^^^^
+LL | impl<T = impl Debug> T {}
+   |          ^^^^^^^^^^
    |
    = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
@@ -327,7 +327,7 @@ LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
    = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error[E0562]: `impl Trait` is not allowed in the type of variable bindings
-  --> $DIR/where-allowed.rs:252:29
+  --> $DIR/where-allowed.rs:250:29
    |
 LL |     let _in_local_variable: impl Fn() = || {};
    |                             ^^^^^^^^^
@@ -338,7 +338,7 @@ LL |     let _in_local_variable: impl Fn() = || {};
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0562]: `impl Trait` is not allowed in closure return types
-  --> $DIR/where-allowed.rs:254:46
+  --> $DIR/where-allowed.rs:252:46
    |
 LL |     let _in_return_in_local_variable = || -> impl Fn() { || {} };
    |                                              ^^^^^^^^^
@@ -368,25 +368,6 @@ LL -     fn in_trait_impl_return() -> impl Debug { () }
 LL +     fn in_trait_impl_return() -> <() as DummyTrait>::Out { () }
    |
 
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/where-allowed.rs:246:36
-   |
-LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
-   |                                    ^^^^^^^^^^^^^^
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
-   = note: `#[deny(invalid_type_param_default)]` on by default
-
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/where-allowed.rs:239:7
-   |
-LL | impl <T = impl Debug> T {}
-   |       ^^^^^^^^^^^^^^
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
-
 error[E0283]: type annotations needed
   --> $DIR/where-allowed.rs:46:57
    |
@@ -408,10 +389,10 @@ LL | fn in_impl_Fn_return_in_return() -> &'static impl Fn() -> impl Debug { pani
              where Args: Tuple, F: Fn<Args>, A: Allocator, F: ?Sized;
 
 error[E0118]: no nominal type found for inherent implementation
-  --> $DIR/where-allowed.rs:239:1
+  --> $DIR/where-allowed.rs:240:1
    |
-LL | impl <T = impl Debug> T {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^ impl requires a nominal type
+LL | impl<T = impl Debug> T {}
+   | ^^^^^^^^^^^^^^^^^^^^^^ impl requires a nominal type
    |
    = note: either implement a trait on it or create a newtype to wrap it instead
 
@@ -431,29 +412,21 @@ LL | type InTypeAlias<R> = impl Debug;
    |
    = note: `InTypeAlias` must be used in combination with a concrete type within the same crate
 
-error: aborting due to 50 previous errors
+error: aborting due to 48 previous errors
 
 Some errors have detailed explanations: E0053, E0118, E0283, E0562, E0658, E0666.
 For more information about an error, try `rustc --explain E0053`.
 Future incompatibility report: Future breakage diagnostic:
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+warning: defaults for generic parameters are not allowed here
   --> $DIR/where-allowed.rs:246:36
    |
 LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
    |                                    ^^^^^^^^^^^^^^
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
-   = note: `#[deny(invalid_type_param_default)]` on by default
 
 Future breakage diagnostic:
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/where-allowed.rs:239:7
-   |
-LL | impl <T = impl Debug> T {}
-   |       ^^^^^^^^^^^^^^
+warning: defaults for generic parameters are not allowed here
+  --> $DIR/where-allowed.rs:240:6
    |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
-   = note: `#[deny(invalid_type_param_default)]` on by default
+LL | impl<T = impl Debug> T {}
+   |      ^^^^^^^^^^^^^^
 
diff --git a/tests/ui/issues/auxiliary/issue-9968.rs b/tests/ui/imports/auxiliary/aux-9968.rs
index 8d795b59ea8..8d795b59ea8 100644
--- a/tests/ui/issues/auxiliary/issue-9968.rs
+++ b/tests/ui/imports/auxiliary/aux-9968.rs
diff --git a/tests/ui/issues/issue-15774.rs b/tests/ui/imports/enum-variant-import-path-15774.rs
index dadd59cc077..583fe4da179 100644
--- a/tests/ui/issues/issue-15774.rs
+++ b/tests/ui/imports/enum-variant-import-path-15774.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15774
+
 //@ edition: 2015
 //@ run-pass
 
diff --git a/tests/ui/imports/local-modularized-tricky-fail-2.stderr b/tests/ui/imports/local-modularized-tricky-fail-2.stderr
index 49f5c72947f..ea4056b3d75 100644
--- a/tests/ui/imports/local-modularized-tricky-fail-2.stderr
+++ b/tests/ui/imports/local-modularized-tricky-fail-2.stderr
@@ -41,3 +41,47 @@ LL |   define_exported!();
 
 error: aborting due to 2 previous errors
 
+Future incompatibility report: Future breakage diagnostic:
+error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths
+  --> $DIR/local-modularized-tricky-fail-2.rs:13:9
+   |
+LL |     use crate::exported;
+   |         ^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #52234 <https://github.com/rust-lang/rust/issues/52234>
+note: the macro is defined here
+  --> $DIR/local-modularized-tricky-fail-2.rs:5:5
+   |
+LL | /     macro_rules! exported {
+LL | |         () => ()
+LL | |     }
+   | |_____^
+...
+LL |   define_exported!();
+   |   ------------------ in this macro invocation
+   = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` on by default
+   = note: this error originates in the macro `define_exported` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+Future breakage diagnostic:
+error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths
+  --> $DIR/local-modularized-tricky-fail-2.rs:19:5
+   |
+LL |     crate::exported!();
+   |     ^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #52234 <https://github.com/rust-lang/rust/issues/52234>
+note: the macro is defined here
+  --> $DIR/local-modularized-tricky-fail-2.rs:5:5
+   |
+LL | /     macro_rules! exported {
+LL | |         () => ()
+LL | |     }
+   | |_____^
+...
+LL |   define_exported!();
+   |   ------------------ in this macro invocation
+   = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` on by default
+   = note: this error originates in the macro `define_exported` (in Nightly builds, run with -Z macro-backtrace for more info)
+
diff --git a/tests/ui/imports/pub-use-link-errors-9968.rs b/tests/ui/imports/pub-use-link-errors-9968.rs
new file mode 100644
index 00000000000..517a0049ce0
--- /dev/null
+++ b/tests/ui/imports/pub-use-link-errors-9968.rs
@@ -0,0 +1,12 @@
+// https://github.com/rust-lang/rust/issues/9968
+//@ run-pass
+//@ aux-build:aux-9968.rs
+
+extern crate aux_9968 as lib;
+
+use lib::{Trait, Struct};
+
+pub fn main()
+{
+    Struct::init().test();
+}
diff --git a/tests/ui/issues/issue-12909.rs b/tests/ui/inference/collection-type-copy-behavior-12909.rs
index f2c33806aae..83536e8875c 100644
--- a/tests/ui/issues/issue-12909.rs
+++ b/tests/ui/inference/collection-type-copy-behavior-12909.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/12909
 //@ run-pass
 #![allow(unused_variables)]
 
diff --git a/tests/ui/inference/iterator-sum-array-15673.rs b/tests/ui/inference/iterator-sum-array-15673.rs
new file mode 100644
index 00000000000..c3d94415aff
--- /dev/null
+++ b/tests/ui/inference/iterator-sum-array-15673.rs
@@ -0,0 +1,11 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15673
+
+//@ run-pass
+#![allow(stable_features)]
+
+#![feature(iter_arith)]
+
+fn main() {
+    let x: [u64; 3] = [1, 2, 3];
+    assert_eq!(6, (0..3).map(|i| x[i]).sum::<u64>());
+}
diff --git a/tests/ui/issues/issue-14919.rs b/tests/ui/inference/matcher-lifetime-inference-14919.rs
index 3a834b13d07..742d43f3efe 100644
--- a/tests/ui/issues/issue-14919.rs
+++ b/tests/ui/inference/matcher-lifetime-inference-14919.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14919
+
 //@ run-pass
 #![allow(unused_must_use)]
 #![allow(dead_code)]
diff --git a/tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.rs b/tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.rs
index 4fd15eea9e0..f1353f1805d 100644
--- a/tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.rs
+++ b/tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.rs
@@ -1,3 +1,4 @@
+//@ compile-flags: -Zwrite-long-types-to-disk=yes
 type A = (i32, i32, i32, i32);
 type B = (A, A, A, A);
 type C = (B, B, B, B);
diff --git a/tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.stderr b/tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.stderr
index 65fe2ffcb7f..5c4a1a75829 100644
--- a/tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.stderr
+++ b/tests/ui/inference/really-long-type-in-let-binding-without-sufficient-type-info.stderr
@@ -1,9 +1,11 @@
-error[E0282]: type annotations needed for `Result<_, ((((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32)), ((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32)), ((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32)), ((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32))), (((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32)), ((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32)), ((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32)), ((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32))), (((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32)), ((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32)), ((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32)), ((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32))), (((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32)), ((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32)), ((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32)), ((i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32), (i32, i32, i32, i32))))>`
-  --> $DIR/really-long-type-in-let-binding-without-sufficient-type-info.rs:7:9
+error[E0282]: type annotations needed for `Result<_, (((..., ..., ..., ...), ..., ..., ...), ..., ..., ...)>`
+  --> $DIR/really-long-type-in-let-binding-without-sufficient-type-info.rs:8:9
    |
 LL |     let y = Err(x);
    |         ^   ------ type must be known at this point
    |
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/really-long-type-in-let-binding-without-sufficient-type-info.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 help: consider giving `y` an explicit type, where the type for type parameter `T` is specified
    |
 LL |     let y: Result<T, _> = Err(x);
diff --git a/tests/ui/issues/issue-15965.rs b/tests/ui/inference/return-block-type-inference-15965.rs
index eef4900d432..50753e309e8 100644
--- a/tests/ui/issues/issue-15965.rs
+++ b/tests/ui/inference/return-block-type-inference-15965.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15965
+
 fn main() {
     return
         { return () }
diff --git a/tests/ui/issues/issue-15965.stderr b/tests/ui/inference/return-block-type-inference-15965.stderr
index 14727e74334..fc4f2defe7f 100644
--- a/tests/ui/issues/issue-15965.stderr
+++ b/tests/ui/inference/return-block-type-inference-15965.stderr
@@ -1,5 +1,5 @@
 error[E0282]: type annotations needed
-  --> $DIR/issue-15965.rs:3:9
+  --> $DIR/return-block-type-inference-15965.rs:5:9
    |
 LL | /         { return () }
 LL | |
diff --git a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs
index f50c4a5207a..f7117368ece 100644
--- a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs
+++ b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs
@@ -1,5 +1,6 @@
-//~ ERROR reached the recursion limit while instantiating `<VirtualWrapper<VirtualWrapper<VirtualWrapper
+//~ ERROR reached the recursion limit while instantiating `<VirtualWrapper<
 //@ build-fail
+//@ compile-flags: --diagnostic-width=100 -Zwrite-long-types-to-disk=yes
 
 // Regression test for #114484: This used to ICE during monomorphization, because we treated
 // `<VirtualWrapper<...> as Pointee>::Metadata` as a rigid projection after reaching the recursion
diff --git a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr
index 59addc5cc4a..faf9cbe2318 100644
--- a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr
+++ b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr
@@ -17,11 +17,14 @@ error: reached the recursion limit finding the struct tail for `[u8; 256]`
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]`
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
-  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:24:18
+note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<..., 1>>`
+  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:25:18
    |
 LL |         unsafe { virtualize_my_trait(L, self) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/infinite-instantiation-struct-tail-ice-114484.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: reached the recursion limit finding the struct tail for `SomeData<256>`
    |
@@ -42,11 +45,14 @@ error: reached the recursion limit finding the struct tail for `SomeData<256>`
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]`
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
-  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:24:18
+note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<..., 1>>`
+  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:25:18
    |
 LL |         unsafe { virtualize_my_trait(L, self) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/infinite-instantiation-struct-tail-ice-114484.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
    |
@@ -67,20 +73,24 @@ error: reached the recursion limit finding the struct tail for `VirtualWrapper<S
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]`
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
-  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:24:18
+note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<..., 1>>`
+  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:25:18
    |
 LL |         unsafe { virtualize_my_trait(L, self) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/infinite-instantiation-struct-tail-ice-114484.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
-error: reached the recursion limit while instantiating `<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<..., 1>, 1>, 1>, 1>, 1> as MyTrait>::virtualize`
+error: reached the recursion limit while instantiating `<VirtualWrapper<..., 1> as MyTrait>::virtualize`
    |
 note: `<VirtualWrapper<T, L> as MyTrait>::virtualize` defined here
-  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:23:5
+  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:24:5
    |
 LL |     fn virtualize(&self) -> &dyn MyTrait {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: the full type name has been written to '$TEST_BUILD_DIR/infinite-instantiation-struct-tail-ice-114484.long-type.txt'
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/infinite-instantiation-struct-tail-ice-114484.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 13 previous errors
 
diff --git a/tests/ui/infinite/infinite-instantiation.rs b/tests/ui/infinite/infinite-instantiation.rs
index 7898cc1ffc1..4f86f70ad14 100644
--- a/tests/ui/infinite/infinite-instantiation.rs
+++ b/tests/ui/infinite/infinite-instantiation.rs
@@ -1,4 +1,5 @@
 //@ build-fail
+//@ compile-flags: --diagnostic-width=100 -Zwrite-long-types-to-disk=yes
 
 trait ToOpt: Sized {
     fn to_option(&self) -> Option<Self>;
diff --git a/tests/ui/infinite/infinite-instantiation.stderr b/tests/ui/infinite/infinite-instantiation.stderr
index d7a4a49961a..32185844412 100644
--- a/tests/ui/infinite/infinite-instantiation.stderr
+++ b/tests/ui/infinite/infinite-instantiation.stderr
@@ -1,15 +1,16 @@
-error: reached the recursion limit while instantiating `function::<Option<Option<Option<Option<Option<...>>>>>>`
-  --> $DIR/infinite-instantiation.rs:21:9
+error: reached the recursion limit while instantiating `function::<Option<Option<Option<Option<...>>>>>`
+  --> $DIR/infinite-instantiation.rs:22:9
    |
 LL |         function(counter - 1, t.to_option());
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: `function` defined here
-  --> $DIR/infinite-instantiation.rs:19:1
+  --> $DIR/infinite-instantiation.rs:20:1
    |
 LL | fn function<T:ToOpt + Clone>(counter: usize, t: T) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: the full type name has been written to '$TEST_BUILD_DIR/infinite-instantiation.long-type.txt'
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/infinite-instantiation.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/infinite/issue-41731-infinite-macro-print.rs b/tests/ui/infinite/issue-41731-infinite-macro-print.rs
index 7cd3ff3d629..aa5555b117a 100644
--- a/tests/ui/infinite/issue-41731-infinite-macro-print.rs
+++ b/tests/ui/infinite/issue-41731-infinite-macro-print.rs
@@ -5,7 +5,7 @@
 fn main() {
     macro_rules! stack {
         ($overflow:expr) => {
-            print!(stack!($overflow));
+            print!(stack!($overflow))
             //~^ ERROR recursion limit reached while expanding
             //~| ERROR format argument must be a string literal
         };
diff --git a/tests/ui/infinite/issue-41731-infinite-macro-print.stderr b/tests/ui/infinite/issue-41731-infinite-macro-print.stderr
index 71510816d0b..84436de9aa3 100644
--- a/tests/ui/infinite/issue-41731-infinite-macro-print.stderr
+++ b/tests/ui/infinite/issue-41731-infinite-macro-print.stderr
@@ -14,11 +14,11 @@ LL |     stack!("overflow");
    |     ^^^^^^^^^^^^^^^^^^
    |
    = note: expanding `stack! { "overflow" }`
-   = note: to `print! (stack! ("overflow"));`
+   = note: to `print! (stack! ("overflow"))`
    = note: expanding `print! { stack! ("overflow") }`
    = note: to `{ $crate :: io :: _print($crate :: format_args! (stack! ("overflow"))); }`
    = note: expanding `stack! { "overflow" }`
-   = note: to `print! (stack! ("overflow"));`
+   = note: to `print! (stack! ("overflow"))`
    = note: expanding `print! { stack! ("overflow") }`
    = note: to `{ $crate :: io :: _print($crate :: format_args! (stack! ("overflow"))); }`
 
@@ -31,7 +31,7 @@ LL |     stack!("overflow");
    = note: this error originates in the macro `print` which comes from the expansion of the macro `stack` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: you might be missing a string literal to format with
    |
-LL |             print!("{}", stack!($overflow));
+LL |             print!("{}", stack!($overflow))
    |                    +++++
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/infinite/issue-41731-infinite-macro-println.rs b/tests/ui/infinite/issue-41731-infinite-macro-println.rs
index 491f18dc4c6..cf59afb0194 100644
--- a/tests/ui/infinite/issue-41731-infinite-macro-println.rs
+++ b/tests/ui/infinite/issue-41731-infinite-macro-println.rs
@@ -5,7 +5,7 @@
 fn main() {
     macro_rules! stack {
         ($overflow:expr) => {
-            println!(stack!($overflow));
+            println!(stack!($overflow))
             //~^ ERROR recursion limit reached while expanding
             //~| ERROR format argument must be a string literal
         };
diff --git a/tests/ui/infinite/issue-41731-infinite-macro-println.stderr b/tests/ui/infinite/issue-41731-infinite-macro-println.stderr
index 645176d45cb..6d0432abe4c 100644
--- a/tests/ui/infinite/issue-41731-infinite-macro-println.stderr
+++ b/tests/ui/infinite/issue-41731-infinite-macro-println.stderr
@@ -14,11 +14,11 @@ LL |     stack!("overflow");
    |     ^^^^^^^^^^^^^^^^^^
    |
    = note: expanding `stack! { "overflow" }`
-   = note: to `println! (stack! ("overflow"));`
+   = note: to `println! (stack! ("overflow"))`
    = note: expanding `println! { stack! ("overflow") }`
    = note: to `{ $crate :: io :: _print($crate :: format_args_nl! (stack! ("overflow"))); }`
    = note: expanding `stack! { "overflow" }`
-   = note: to `println! (stack! ("overflow"));`
+   = note: to `println! (stack! ("overflow"))`
    = note: expanding `println! { stack! ("overflow") }`
    = note: to `{ $crate :: io :: _print($crate :: format_args_nl! (stack! ("overflow"))); }`
 
@@ -31,7 +31,7 @@ LL |     stack!("overflow");
    = note: this error originates in the macro `println` which comes from the expansion of the macro `stack` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: you might be missing a string literal to format with
    |
-LL |             println!("{}", stack!($overflow));
+LL |             println!("{}", stack!($overflow))
    |                      +++++
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/instrument-coverage/coverage-options.bad.stderr b/tests/ui/instrument-coverage/coverage-options.bad.stderr
index 1a6b30dc832..a7ea721659b 100644
--- a/tests/ui/instrument-coverage/coverage-options.bad.stderr
+++ b/tests/ui/instrument-coverage/coverage-options.bad.stderr
@@ -1,2 +1,2 @@
-error: incorrect value `bad` for unstable option `coverage-options` - `block` | `branch` | `condition` | `mcdc` | `no-mir-spans` was expected
+error: incorrect value `bad` for unstable option `coverage-options` - `block` | `branch` | `condition` was expected
 
diff --git a/tests/ui/instrument-coverage/coverage-options.rs b/tests/ui/instrument-coverage/coverage-options.rs
index c3eae9625da..ead2e3221d8 100644
--- a/tests/ui/instrument-coverage/coverage-options.rs
+++ b/tests/ui/instrument-coverage/coverage-options.rs
@@ -1,4 +1,4 @@
-//@ revisions: block branch condition mcdc bad
+//@ revisions: block branch condition bad
 //@ compile-flags -Cinstrument-coverage -Zno-profiler-runtime
 
 //@ [block] check-pass
@@ -10,9 +10,6 @@
 //@ [condition] check-pass
 //@ [condition] compile-flags: -Zcoverage-options=condition
 
-//@ [mcdc] check-pass
-//@ [mcdc] compile-flags: -Zcoverage-options=mcdc
-
 //@ [bad] check-fail
 //@ [bad] compile-flags: -Zcoverage-options=bad
 
diff --git a/tests/ui/instrument-coverage/mcdc-condition-limit.rs b/tests/ui/instrument-coverage/mcdc-condition-limit.rs
deleted file mode 100644
index 74707ba2e67..00000000000
--- a/tests/ui/instrument-coverage/mcdc-condition-limit.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-//@ edition: 2021
-//@ revisions: good
-//@ check-pass
-//@ compile-flags: -Cinstrument-coverage -Zcoverage-options=mcdc -Zno-profiler-runtime
-
-// Check that we emit some kind of diagnostic when MC/DC instrumentation sees
-// code that exceeds the limit of 6 conditions per decision, and falls back
-// to only instrumenting that code for branch coverage.
-//
-// See also `tests/coverage/mcdc/condition-limit.rs`, which tests the actual
-// effect on instrumentation.
-//
-// (The limit is enforced in `compiler/rustc_mir_build/src/build/coverageinfo/mcdc.rs`.)
-
-#[cfg(good)]
-fn main() {
-    // 7 conditions is allowed, so no diagnostic.
-    let [a, b, c, d, e, f, g] = <[bool; 7]>::default();
-    if a && b && c && d && e && f && g {
-        core::hint::black_box("hello");
-    }
-}
diff --git a/tests/ui/interior-mutability/interior-mutability.rs b/tests/ui/interior-mutability/interior-mutability.rs
index c704acc22af..7e4fe76852d 100644
--- a/tests/ui/interior-mutability/interior-mutability.rs
+++ b/tests/ui/interior-mutability/interior-mutability.rs
@@ -1,3 +1,4 @@
+//@ compile-flags: -Zwrite-long-types-to-disk=yes
 use std::cell::Cell;
 use std::panic::catch_unwind;
 fn main() {
diff --git a/tests/ui/interior-mutability/interior-mutability.stderr b/tests/ui/interior-mutability/interior-mutability.stderr
index cfc64445bf3..5a959d14c8a 100644
--- a/tests/ui/interior-mutability/interior-mutability.stderr
+++ b/tests/ui/interior-mutability/interior-mutability.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the type `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
-  --> $DIR/interior-mutability.rs:5:18
+  --> $DIR/interior-mutability.rs:6:18
    |
 LL |     catch_unwind(|| { x.set(23); });
    |     ------------ ^^^^^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
@@ -11,7 +11,7 @@ note: required because it appears within the type `Cell<i32>`
   --> $SRC_DIR/core/src/cell.rs:LL:COL
    = note: required for `&Cell<i32>` to implement `UnwindSafe`
 note: required because it's used within this closure
-  --> $DIR/interior-mutability.rs:5:18
+  --> $DIR/interior-mutability.rs:6:18
    |
 LL |     catch_unwind(|| { x.set(23); });
    |                  ^^
diff --git a/tests/ui/intrinsics/bad-intrinsic-monomorphization.stderr b/tests/ui/intrinsics/bad-intrinsic-monomorphization.stderr
index f49d95e9cfc..51ef71c9e29 100644
--- a/tests/ui/intrinsics/bad-intrinsic-monomorphization.stderr
+++ b/tests/ui/intrinsics/bad-intrinsic-monomorphization.stderr
@@ -1,8 +1,8 @@
-error[E0511]: invalid monomorphization of `cttz` intrinsic: expected basic integer type, found `Foo`
-  --> $DIR/bad-intrinsic-monomorphization.rs:16:5
+error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `Foo`
+  --> $DIR/bad-intrinsic-monomorphization.rs:26:5
    |
-LL |     intrinsics::cttz(v)
-   |     ^^^^^^^^^^^^^^^^^^^
+LL |     intrinsics::simd::simd_add(a, b)
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `fadd_fast` intrinsic: expected basic float type, found `Foo`
   --> $DIR/bad-intrinsic-monomorphization.rs:21:5
@@ -10,11 +10,11 @@ error[E0511]: invalid monomorphization of `fadd_fast` intrinsic: expected basic
 LL |     intrinsics::fadd_fast(a, b)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `Foo`
-  --> $DIR/bad-intrinsic-monomorphization.rs:26:5
+error[E0511]: invalid monomorphization of `cttz` intrinsic: expected basic integer type, found `Foo`
+  --> $DIR/bad-intrinsic-monomorphization.rs:16:5
    |
-LL |     intrinsics::simd::simd_add(a, b)
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     intrinsics::cttz(v)
+   |     ^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr b/tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr
index 71d792b7f77..397eeaf600a 100644
--- a/tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr
+++ b/tests/ui/intrinsics/const-eval-select-backtrace-std.run.stderr
@@ -1,4 +1,4 @@
 
-thread 'main' panicked at $DIR/const-eval-select-backtrace-std.rs:6:8:
+thread 'main' ($TID) panicked at $DIR/const-eval-select-backtrace-std.rs:6:8:
 byte index 1 is out of bounds of ``
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/intrinsics/const-eval-select-backtrace.run.stderr b/tests/ui/intrinsics/const-eval-select-backtrace.run.stderr
index 4f11f5966ed..649174017e9 100644
--- a/tests/ui/intrinsics/const-eval-select-backtrace.run.stderr
+++ b/tests/ui/intrinsics/const-eval-select-backtrace.run.stderr
@@ -1,4 +1,4 @@
 
-thread 'main' panicked at $DIR/const-eval-select-backtrace.rs:15:5:
+thread 'main' ($TID) panicked at $DIR/const-eval-select-backtrace.rs:15:5:
 Aaah!
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/intrinsics/intrinsic-atomics.rs b/tests/ui/intrinsics/intrinsic-atomics.rs
index 2275aafff83..c19948137db 100644
--- a/tests/ui/intrinsics/intrinsic-atomics.rs
+++ b/tests/ui/intrinsics/intrinsic-atomics.rs
@@ -33,14 +33,14 @@ pub fn main() {
         assert_eq!(rusti::atomic_xchg::<_, { Release }>(&mut *x, 0), 1);
         assert_eq!(*x, 0);
 
-        assert_eq!(rusti::atomic_xadd::<_, { SeqCst }>(&mut *x, 1), 0);
-        assert_eq!(rusti::atomic_xadd::<_, { Acquire }>(&mut *x, 1), 1);
-        assert_eq!(rusti::atomic_xadd::<_, { Release }>(&mut *x, 1), 2);
+        assert_eq!(rusti::atomic_xadd::<_, _, { SeqCst }>(&mut *x, 1), 0);
+        assert_eq!(rusti::atomic_xadd::<_, _, { Acquire }>(&mut *x, 1), 1);
+        assert_eq!(rusti::atomic_xadd::<_, _, { Release }>(&mut *x, 1), 2);
         assert_eq!(*x, 3);
 
-        assert_eq!(rusti::atomic_xsub::<_, { SeqCst }>(&mut *x, 1), 3);
-        assert_eq!(rusti::atomic_xsub::<_, { Acquire }>(&mut *x, 1), 2);
-        assert_eq!(rusti::atomic_xsub::<_, { Release }>(&mut *x, 1), 1);
+        assert_eq!(rusti::atomic_xsub::<_, _, { SeqCst }>(&mut *x, 1), 3);
+        assert_eq!(rusti::atomic_xsub::<_, _, { Acquire }>(&mut *x, 1), 2);
+        assert_eq!(rusti::atomic_xsub::<_, _, { Release }>(&mut *x, 1), 1);
         assert_eq!(*x, 0);
 
         loop {
diff --git a/tests/ui/intrinsics/non-integer-atomic.rs b/tests/ui/intrinsics/non-integer-atomic.rs
index 853c163710f..30f713f1241 100644
--- a/tests/ui/intrinsics/non-integer-atomic.rs
+++ b/tests/ui/intrinsics/non-integer-atomic.rs
@@ -13,80 +13,80 @@ pub type Quux = [u8; 100];
 
 pub unsafe fn test_bool_load(p: &mut bool, v: bool) {
     intrinsics::atomic_load::<_, { SeqCst }>(p);
-    //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `bool`
+    //~^ ERROR `atomic_load` intrinsic: expected basic integer or pointer type, found `bool`
 }
 
 pub unsafe fn test_bool_store(p: &mut bool, v: bool) {
     intrinsics::atomic_store::<_, { SeqCst }>(p, v);
-    //~^ ERROR `atomic_store` intrinsic: expected basic integer type, found `bool`
+    //~^ ERROR `atomic_store` intrinsic: expected basic integer or pointer type, found `bool`
 }
 
 pub unsafe fn test_bool_xchg(p: &mut bool, v: bool) {
     intrinsics::atomic_xchg::<_, { SeqCst }>(p, v);
-    //~^ ERROR `atomic_xchg` intrinsic: expected basic integer type, found `bool`
+    //~^ ERROR `atomic_xchg` intrinsic: expected basic integer or pointer type, found `bool`
 }
 
 pub unsafe fn test_bool_cxchg(p: &mut bool, v: bool) {
     intrinsics::atomic_cxchg::<_, { SeqCst }, { SeqCst }>(p, v, v);
-    //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer type, found `bool`
+    //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer or pointer type, found `bool`
 }
 
 pub unsafe fn test_Foo_load(p: &mut Foo, v: Foo) {
     intrinsics::atomic_load::<_, { SeqCst }>(p);
-    //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `Foo`
+    //~^ ERROR `atomic_load` intrinsic: expected basic integer or pointer type, found `Foo`
 }
 
 pub unsafe fn test_Foo_store(p: &mut Foo, v: Foo) {
     intrinsics::atomic_store::<_, { SeqCst }>(p, v);
-    //~^ ERROR `atomic_store` intrinsic: expected basic integer type, found `Foo`
+    //~^ ERROR `atomic_store` intrinsic: expected basic integer or pointer type, found `Foo`
 }
 
 pub unsafe fn test_Foo_xchg(p: &mut Foo, v: Foo) {
     intrinsics::atomic_xchg::<_, { SeqCst }>(p, v);
-    //~^ ERROR `atomic_xchg` intrinsic: expected basic integer type, found `Foo`
+    //~^ ERROR `atomic_xchg` intrinsic: expected basic integer or pointer type, found `Foo`
 }
 
 pub unsafe fn test_Foo_cxchg(p: &mut Foo, v: Foo) {
     intrinsics::atomic_cxchg::<_, { SeqCst }, { SeqCst }>(p, v, v);
-    //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer type, found `Foo`
+    //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer or pointer type, found `Foo`
 }
 
 pub unsafe fn test_Bar_load(p: &mut Bar, v: Bar) {
     intrinsics::atomic_load::<_, { SeqCst }>(p);
-    //~^ ERROR expected basic integer type, found `&dyn Fn()`
+    //~^ ERROR expected basic integer or pointer type, found `&dyn Fn()`
 }
 
 pub unsafe fn test_Bar_store(p: &mut Bar, v: Bar) {
     intrinsics::atomic_store::<_, { SeqCst }>(p, v);
-    //~^ ERROR expected basic integer type, found `&dyn Fn()`
+    //~^ ERROR expected basic integer or pointer type, found `&dyn Fn()`
 }
 
 pub unsafe fn test_Bar_xchg(p: &mut Bar, v: Bar) {
     intrinsics::atomic_xchg::<_, { SeqCst }>(p, v);
-    //~^ ERROR expected basic integer type, found `&dyn Fn()`
+    //~^ ERROR expected basic integer or pointer type, found `&dyn Fn()`
 }
 
 pub unsafe fn test_Bar_cxchg(p: &mut Bar, v: Bar) {
     intrinsics::atomic_cxchg::<_, { SeqCst }, { SeqCst }>(p, v, v);
-    //~^ ERROR expected basic integer type, found `&dyn Fn()`
+    //~^ ERROR expected basic integer or pointer type, found `&dyn Fn()`
 }
 
 pub unsafe fn test_Quux_load(p: &mut Quux, v: Quux) {
     intrinsics::atomic_load::<_, { SeqCst }>(p);
-    //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `[u8; 100]`
+    //~^ ERROR `atomic_load` intrinsic: expected basic integer or pointer type, found `[u8; 100]`
 }
 
 pub unsafe fn test_Quux_store(p: &mut Quux, v: Quux) {
     intrinsics::atomic_store::<_, { SeqCst }>(p, v);
-    //~^ ERROR `atomic_store` intrinsic: expected basic integer type, found `[u8; 100]`
+    //~^ ERROR `atomic_store` intrinsic: expected basic integer or pointer type, found `[u8; 100]`
 }
 
 pub unsafe fn test_Quux_xchg(p: &mut Quux, v: Quux) {
     intrinsics::atomic_xchg::<_, { SeqCst }>(p, v);
-    //~^ ERROR `atomic_xchg` intrinsic: expected basic integer type, found `[u8; 100]`
+    //~^ ERROR `atomic_xchg` intrinsic: expected basic integer or pointer type, found `[u8; 100]`
 }
 
 pub unsafe fn test_Quux_cxchg(p: &mut Quux, v: Quux) {
     intrinsics::atomic_cxchg::<_, { SeqCst }, { SeqCst }>(p, v, v);
-    //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer type, found `[u8; 100]`
+    //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer or pointer type, found `[u8; 100]`
 }
diff --git a/tests/ui/intrinsics/non-integer-atomic.stderr b/tests/ui/intrinsics/non-integer-atomic.stderr
index e539d99b8ae..330d313639d 100644
--- a/tests/ui/intrinsics/non-integer-atomic.stderr
+++ b/tests/ui/intrinsics/non-integer-atomic.stderr
@@ -1,98 +1,98 @@
-error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `bool`
-  --> $DIR/non-integer-atomic.rs:15:5
+error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer or pointer type, found `&dyn Fn()`
+  --> $DIR/non-integer-atomic.rs:55:5
    |
 LL |     intrinsics::atomic_load::<_, { SeqCst }>(p);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer type, found `bool`
-  --> $DIR/non-integer-atomic.rs:20:5
+error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer or pointer type, found `Foo`
+  --> $DIR/non-integer-atomic.rs:35:5
+   |
+LL |     intrinsics::atomic_load::<_, { SeqCst }>(p);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer or pointer type, found `&dyn Fn()`
+  --> $DIR/non-integer-atomic.rs:60:5
    |
 LL |     intrinsics::atomic_store::<_, { SeqCst }>(p, v);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer type, found `bool`
-  --> $DIR/non-integer-atomic.rs:25:5
+error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer or pointer type, found `[u8; 100]`
+  --> $DIR/non-integer-atomic.rs:85:5
    |
 LL |     intrinsics::atomic_xchg::<_, { SeqCst }>(p, v);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer type, found `bool`
-  --> $DIR/non-integer-atomic.rs:30:5
+error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer or pointer type, found `&dyn Fn()`
+  --> $DIR/non-integer-atomic.rs:70:5
    |
 LL |     intrinsics::atomic_cxchg::<_, { SeqCst }, { SeqCst }>(p, v, v);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `Foo`
-  --> $DIR/non-integer-atomic.rs:35:5
-   |
-LL |     intrinsics::atomic_load::<_, { SeqCst }>(p);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer type, found `Foo`
+error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer or pointer type, found `Foo`
   --> $DIR/non-integer-atomic.rs:40:5
    |
 LL |     intrinsics::atomic_store::<_, { SeqCst }>(p, v);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer type, found `Foo`
-  --> $DIR/non-integer-atomic.rs:45:5
-   |
-LL |     intrinsics::atomic_xchg::<_, { SeqCst }>(p, v);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer type, found `Foo`
-  --> $DIR/non-integer-atomic.rs:50:5
+error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer or pointer type, found `[u8; 100]`
+  --> $DIR/non-integer-atomic.rs:90:5
    |
 LL |     intrinsics::atomic_cxchg::<_, { SeqCst }, { SeqCst }>(p, v, v);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `&dyn Fn()`
-  --> $DIR/non-integer-atomic.rs:55:5
+error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer or pointer type, found `[u8; 100]`
+  --> $DIR/non-integer-atomic.rs:80:5
    |
-LL |     intrinsics::atomic_load::<_, { SeqCst }>(p);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     intrinsics::atomic_store::<_, { SeqCst }>(p, v);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer type, found `&dyn Fn()`
-  --> $DIR/non-integer-atomic.rs:60:5
+error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer or pointer type, found `bool`
+  --> $DIR/non-integer-atomic.rs:20:5
    |
 LL |     intrinsics::atomic_store::<_, { SeqCst }>(p, v);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer type, found `&dyn Fn()`
+error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer or pointer type, found `&dyn Fn()`
   --> $DIR/non-integer-atomic.rs:65:5
    |
 LL |     intrinsics::atomic_xchg::<_, { SeqCst }>(p, v);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer type, found `&dyn Fn()`
-  --> $DIR/non-integer-atomic.rs:70:5
+error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer or pointer type, found `[u8; 100]`
+  --> $DIR/non-integer-atomic.rs:75:5
    |
-LL |     intrinsics::atomic_cxchg::<_, { SeqCst }, { SeqCst }>(p, v, v);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     intrinsics::atomic_load::<_, { SeqCst }>(p);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `[u8; 100]`
-  --> $DIR/non-integer-atomic.rs:75:5
+error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer or pointer type, found `bool`
+  --> $DIR/non-integer-atomic.rs:15:5
    |
 LL |     intrinsics::atomic_load::<_, { SeqCst }>(p);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer type, found `[u8; 100]`
-  --> $DIR/non-integer-atomic.rs:80:5
+error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer or pointer type, found `bool`
+  --> $DIR/non-integer-atomic.rs:30:5
    |
-LL |     intrinsics::atomic_store::<_, { SeqCst }>(p, v);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     intrinsics::atomic_cxchg::<_, { SeqCst }, { SeqCst }>(p, v, v);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer type, found `[u8; 100]`
-  --> $DIR/non-integer-atomic.rs:85:5
+error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer or pointer type, found `Foo`
+  --> $DIR/non-integer-atomic.rs:50:5
+   |
+LL |     intrinsics::atomic_cxchg::<_, { SeqCst }, { SeqCst }>(p, v, v);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer or pointer type, found `Foo`
+  --> $DIR/non-integer-atomic.rs:45:5
    |
 LL |     intrinsics::atomic_xchg::<_, { SeqCst }>(p, v);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer type, found `[u8; 100]`
-  --> $DIR/non-integer-atomic.rs:90:5
+error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer or pointer type, found `bool`
+  --> $DIR/non-integer-atomic.rs:25:5
    |
-LL |     intrinsics::atomic_cxchg::<_, { SeqCst }, { SeqCst }>(p, v, v);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     intrinsics::atomic_xchg::<_, { SeqCst }>(p, v);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 16 previous errors
 
diff --git a/tests/ui/intrinsics/not-overridden.rs b/tests/ui/intrinsics/not-overridden.rs
index 2359eee8b26..ce855483527 100644
--- a/tests/ui/intrinsics/not-overridden.rs
+++ b/tests/ui/intrinsics/not-overridden.rs
@@ -4,7 +4,7 @@
 //@ build-fail
 //@ failure-status:101
 //@ normalize-stderr: ".*note: .*\n\n" -> ""
-//@ normalize-stderr: "thread 'rustc' panicked.*:\n.*\n" -> ""
+//@ normalize-stderr: "thread 'rustc'.*panicked.*:\n.*\n" -> ""
 //@ normalize-stderr: "internal compiler error:.*: intrinsic const_deallocate " -> ""
 //@ rustc-env:RUST_BACKTRACE=0
 
diff --git a/tests/ui/invalid-compile-flags/print-crate-name-request-malformed-crate-name.stderr b/tests/ui/invalid-compile-flags/print-crate-name-request-malformed-crate-name.stderr
index 6bf09a2b131..b773f7c97aa 100644
--- a/tests/ui/invalid-compile-flags/print-crate-name-request-malformed-crate-name.stderr
+++ b/tests/ui/invalid-compile-flags/print-crate-name-request-malformed-crate-name.stderr
@@ -3,6 +3,8 @@ error: malformed `crate_name` attribute input
    |
 LL | #![crate_name = concat!("wrapped")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_name = "name"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/crates-and-source-files.html#the-crate_name-attribute>
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name-1.stderr b/tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name-1.stderr
index de62aed79fc..64e38ed8533 100644
--- a/tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name-1.stderr
+++ b/tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name-1.stderr
@@ -3,6 +3,8 @@ error: malformed `crate_name` attribute input
    |
 LL | #![crate_name]
    | ^^^^^^^^^^^^^^ help: must be of the form: `#![crate_name = "name"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/crates-and-source-files.html#the-crate_name-attribute>
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name-2.stderr b/tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name-2.stderr
index 42c33de1221..e9a5b58e4f9 100644
--- a/tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name-2.stderr
+++ b/tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name-2.stderr
@@ -3,6 +3,8 @@ error: malformed `crate_name` attribute input
    |
 LL | #![crate_name = concat!("this_one_is_not")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_name = "name"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/crates-and-source-files.html#the-crate_name-attribute>
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name.stderr b/tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name.stderr
index cb5ffaab9ca..e63525c6a5d 100644
--- a/tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name.stderr
+++ b/tests/ui/invalid-compile-flags/print-file-names-request-malformed-crate-name.stderr
@@ -3,6 +3,8 @@ error: malformed `crate_name` attribute input
    |
 LL | #![crate_name = concat!("wrapped")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_name = "name"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/crates-and-source-files.html#the-crate_name-attribute>
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/invalid/invalid-inline.stderr b/tests/ui/invalid/invalid-inline.stderr
index 54e6b2b5408..78ffe3270a7 100644
--- a/tests/ui/invalid/invalid-inline.stderr
+++ b/tests/ui/invalid/invalid-inline.stderr
@@ -6,10 +6,14 @@ LL | #[inline(please,no)]
    |         |
    |         expected a single argument here
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/codegen.html#the-inline-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[inline(please,no)]
-LL + #[inline(always|never)]
+LL + #[inline(always)]
+   |
+LL - #[inline(please,no)]
+LL + #[inline(never)]
    |
 LL - #[inline(please,no)]
 LL + #[inline]
@@ -23,10 +27,13 @@ LL | #[inline()]
    |         |
    |         expected a single argument here
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/codegen.html#the-inline-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
-LL | #[inline(always|never)]
-   |          ++++++++++++
+LL | #[inline(always)]
+   |          ++++++
+LL | #[inline(never)]
+   |          +++++
 LL - #[inline()]
 LL + #[inline]
    |
diff --git a/tests/ui/issues/auxiliary/issue-25185-2.rs b/tests/ui/issues/auxiliary/issue-25185-2.rs
deleted file mode 100644
index 7ce3df255a3..00000000000
--- a/tests/ui/issues/auxiliary/issue-25185-2.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-extern crate issue_25185_1;
-
-pub use issue_25185_1::rust_dbg_extern_identity_u32;
diff --git a/tests/ui/issues/issue-13259-windows-tcb-trash.rs b/tests/ui/issues/issue-13259-windows-tcb-trash.rs
deleted file mode 100644
index 381e3f15259..00000000000
--- a/tests/ui/issues/issue-13259-windows-tcb-trash.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-//@ run-pass
-
-#[cfg(windows)]
-mod imp {
-    type LPVOID = *mut u8;
-    type DWORD = u32;
-    type LPWSTR = *mut u16;
-
-    extern "system" {
-        fn FormatMessageW(flags: DWORD,
-                          lpSrc: LPVOID,
-                          msgId: DWORD,
-                          langId: DWORD,
-                          buf: LPWSTR,
-                          nsize: DWORD,
-                          args: *const u8)
-                          -> DWORD;
-    }
-
-    pub fn test() {
-        let mut buf: [u16; 50] = [0; 50];
-        let ret = unsafe {
-            FormatMessageW(0x1000, core::ptr::null_mut(), 1, 0x400,
-                           buf.as_mut_ptr(), buf.len() as u32, core::ptr::null())
-        };
-        // On some 32-bit Windowses (Win7-8 at least) this will panic with segmented
-        // stacks taking control of pvArbitrary
-        assert!(ret != 0);
-    }
-}
-
-#[cfg(not(windows))]
-mod imp {
-    pub fn test() { }
-}
-
-fn main() {
-    imp::test()
-}
diff --git a/tests/ui/issues/issue-14091-2.rs b/tests/ui/issues/issue-14091-2.rs
deleted file mode 100644
index e2f6b183372..00000000000
--- a/tests/ui/issues/issue-14091-2.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-
-// Very
-
-// sensitive
-pub struct BytePos(pub u32);
-
-// to particular
-
-// line numberings / offsets
-
-fn main() {
-    let x = BytePos(1);
-
-    assert!(x, x);
-    //~^ ERROR cannot apply unary operator `!` to type `BytePos`
-}
diff --git a/tests/ui/issues/issue-14091-2.stderr b/tests/ui/issues/issue-14091-2.stderr
deleted file mode 100644
index d573a0917be..00000000000
--- a/tests/ui/issues/issue-14091-2.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0600]: cannot apply unary operator `!` to type `BytePos`
-  --> $DIR/issue-14091-2.rs:15:5
-   |
-LL |     assert!(x, x);
-   |     ^^^^^^^^^^^^^ cannot apply unary operator `!`
-   |
-note: an implementation of `Not` might be missing for `BytePos`
-  --> $DIR/issue-14091-2.rs:6:1
-   |
-LL | pub struct BytePos(pub u32);
-   | ^^^^^^^^^^^^^^^^^^ must implement `Not`
-note: the trait `Not` must be implemented
-  --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0600`.
diff --git a/tests/ui/issues/issue-14091.rs b/tests/ui/issues/issue-14091.rs
deleted file mode 100644
index 0ee20de9053..00000000000
--- a/tests/ui/issues/issue-14091.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn main(){
-    assert!(1,1);
-    //~^ ERROR mismatched types
-}
diff --git a/tests/ui/issues/issue-14091.stderr b/tests/ui/issues/issue-14091.stderr
deleted file mode 100644
index 83879583b1f..00000000000
--- a/tests/ui/issues/issue-14091.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0308]: mismatched types
-  --> $DIR/issue-14091.rs:2:5
-   |
-LL |     assert!(1,1);
-   |     ^^^^^^^^^^^^ expected `bool`, found integer
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-14330.rs b/tests/ui/issues/issue-14330.rs
deleted file mode 100644
index 11199db5901..00000000000
--- a/tests/ui/issues/issue-14330.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-//@ check-pass
-#![allow(unused_imports)]
-
-#[macro_use] extern crate std as std2;
-
-fn main() {}
diff --git a/tests/ui/issues/issue-25185.rs b/tests/ui/issues/issue-25185.rs
deleted file mode 100644
index 7dc06ad96df..00000000000
--- a/tests/ui/issues/issue-25185.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-//@ run-pass
-//@ aux-build:issue-25185-1.rs
-//@ aux-build:issue-25185-2.rs
-
-extern crate issue_25185_2;
-
-fn main() {
-    let x = unsafe {
-        issue_25185_2::rust_dbg_extern_identity_u32(1)
-    };
-    assert_eq!(x, 1);
-}
diff --git a/tests/ui/issues/issue-26812.rs b/tests/ui/issues/issue-26812.rs
deleted file mode 100644
index 8eb030a8ec9..00000000000
--- a/tests/ui/issues/issue-26812.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-fn avg<T=T::Item>(_: T) {}
-//~^ ERROR generic parameter defaults cannot reference parameters before they are declared
-//~| ERROR defaults for type parameters
-//~| WARN previously accepted
-
-fn main() {}
diff --git a/tests/ui/issues/issue-26812.stderr b/tests/ui/issues/issue-26812.stderr
deleted file mode 100644
index bb60d67e287..00000000000
--- a/tests/ui/issues/issue-26812.stderr
+++ /dev/null
@@ -1,30 +0,0 @@
-error[E0128]: generic parameter defaults cannot reference parameters before they are declared
-  --> $DIR/issue-26812.rs:1:10
-   |
-LL | fn avg<T=T::Item>(_: T) {}
-   |          ^^^^^^^ cannot reference `T` before it is declared
-
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/issue-26812.rs:1:8
-   |
-LL | fn avg<T=T::Item>(_: T) {}
-   |        ^^^^^^^^^
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
-   = note: `#[deny(invalid_type_param_default)]` on by default
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0128`.
-Future incompatibility report: Future breakage diagnostic:
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/issue-26812.rs:1:8
-   |
-LL | fn avg<T=T::Item>(_: T) {}
-   |        ^^^^^^^^^
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
-   = note: `#[deny(invalid_type_param_default)]` on by default
-
diff --git a/tests/ui/issues/issue-32655.rs b/tests/ui/issues/issue-32655.rs
deleted file mode 100644
index f52e0923129..00000000000
--- a/tests/ui/issues/issue-32655.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-macro_rules! foo (
-    () => (
-        #[derive_Clone] //~ ERROR cannot find attribute `derive_Clone` in this scope
-        struct T;
-    );
-);
-
-macro_rules! bar (
-    ($e:item) => ($e)
-);
-
-foo!();
-
-bar!(
-    #[derive_Clone] //~ ERROR cannot find attribute `derive_Clone` in this scope
-    struct S;
-);
-
-fn main() {}
diff --git a/tests/ui/issues/issue-32655.stderr b/tests/ui/issues/issue-32655.stderr
deleted file mode 100644
index b8362499b2d..00000000000
--- a/tests/ui/issues/issue-32655.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-error: cannot find attribute `derive_Clone` in this scope
-  --> $DIR/issue-32655.rs:3:11
-   |
-LL |         #[derive_Clone]
-   |           ^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `derive_const`
-...
-LL | foo!();
-   | ------ in this macro invocation
-  --> $SRC_DIR/core/src/macros/mod.rs:LL:COL
-   |
-   = note: similarly named attribute macro `derive_const` defined here
-   |
-   = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: cannot find attribute `derive_Clone` in this scope
-  --> $DIR/issue-32655.rs:15:7
-   |
-LL |     #[derive_Clone]
-   |       ^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `derive_const`
-  --> $SRC_DIR/core/src/macros/mod.rs:LL:COL
-   |
-   = note: similarly named attribute macro `derive_const` defined here
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs
index 05adde45204..b978e6eb519 100644
--- a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs
+++ b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs
@@ -1,4 +1,5 @@
 //@ build-fail
+//@ compile-flags: --diagnostic-width=100 -Zwrite-long-types-to-disk=yes
 
 trait Mirror {
     type Image;
diff --git a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr
index 945fa605e14..835f1c6442a 100644
--- a/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr
+++ b/tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr
@@ -1,15 +1,16 @@
-error: reached the recursion limit while instantiating `<(&(&(..., ...), ...), ...) as Foo>::recurse`
-  --> $DIR/issue-37311.rs:16:9
+error: reached the recursion limit while instantiating `<(&(&(&..., ...), ...), ...) as Foo>::recurse`
+  --> $DIR/issue-37311.rs:17:9
    |
 LL |         (self, self).recurse();
    |         ^^^^^^^^^^^^^^^^^^^^^^
    |
 note: `<T as Foo>::recurse` defined here
-  --> $DIR/issue-37311.rs:15:5
+  --> $DIR/issue-37311.rs:16:5
    |
 LL |     fn recurse(&self) {
    |     ^^^^^^^^^^^^^^^^^
-   = note: the full type name has been written to '$TEST_BUILD_DIR/issue-37311.long-type.txt'
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-37311.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-41880.stderr b/tests/ui/issues/issue-41880.stderr
index 1936c0aebd4..2f1ebee7ca5 100644
--- a/tests/ui/issues/issue-41880.stderr
+++ b/tests/ui/issues/issue-41880.stderr
@@ -1,4 +1,4 @@
-error[E0599]: no method named `iter` found for struct `Iterate` in the current scope
+error[E0599]: no method named `iter` found for struct `Iterate<T, F>` in the current scope
   --> $DIR/issue-41880.rs:27:24
    |
 LL | pub struct Iterate<T, F> {
diff --git a/tests/ui/issues/issue-4335.stderr b/tests/ui/issues/issue-4335.stderr
index 42ac6322564..b6d8f086163 100644
--- a/tests/ui/issues/issue-4335.stderr
+++ b/tests/ui/issues/issue-4335.stderr
@@ -10,6 +10,7 @@ LL |     id(Box::new(|| *v))
    |                 |
    |                 captured by this `FnMut` closure
    |
+   = help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
 help: if `T` implemented `Clone`, you could clone the value
   --> $DIR/issue-4335.rs:5:10
    |
diff --git a/tests/ui/issues/issue-43988.stderr b/tests/ui/issues/issue-43988.stderr
index fe61e136a51..b50d691e685 100644
--- a/tests/ui/issues/issue-43988.stderr
+++ b/tests/ui/issues/issue-43988.stderr
@@ -6,10 +6,14 @@ LL |     #[inline(XYZ)]
    |              |
    |              valid arguments are `always` or `never`
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/codegen.html#the-inline-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
 LL -     #[inline(XYZ)]
-LL +     #[inline(always|never)]
+LL +     #[inline(always)]
+   |
+LL -     #[inline(XYZ)]
+LL +     #[inline(never)]
    |
 LL -     #[inline(XYZ)]
 LL +     #[inline]
@@ -22,6 +26,7 @@ LL |     #[repr(nothing)]
    |            ^^^^^^^
    |
    = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
 
 error[E0552]: unrecognized representation hint
   --> $DIR/issue-43988.rs:18:12
@@ -30,15 +35,26 @@ LL |     #[repr(something_not_real)]
    |            ^^^^^^^^^^^^^^^^^^
    |
    = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
 
 error[E0539]: malformed `repr` attribute input
   --> $DIR/issue-43988.rs:24:5
    |
 LL |     #[repr]
-   |     ^^^^^^^
-   |     |
-   |     expected this to be a list
-   |     help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
+   |     ^^^^^^^ expected this to be a list
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html#representations>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL |     #[repr(<integer type>)]
+   |           ++++++++++++++++
+LL |     #[repr(C)]
+   |           +++
+LL |     #[repr(Rust)]
+   |           ++++++
+LL |     #[repr(align(...))]
+   |           ++++++++++++
+   = and 2 other candidates
 
 error[E0539]: malformed `inline` attribute input
   --> $DIR/issue-43988.rs:30:5
@@ -48,10 +64,14 @@ LL |     #[inline(ABC)]
    |              |
    |              valid arguments are `always` or `never`
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/codegen.html#the-inline-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
 LL -     #[inline(ABC)]
-LL +     #[inline(always|never)]
+LL +     #[inline(always)]
+   |
+LL -     #[inline(ABC)]
+LL +     #[inline(never)]
    |
 LL -     #[inline(ABC)]
 LL +     #[inline]
@@ -61,10 +81,20 @@ error[E0539]: malformed `repr` attribute input
   --> $DIR/issue-43988.rs:34:14
    |
 LL |     let _z = #[repr] 1;
-   |              ^^^^^^^
-   |              |
-   |              expected this to be a list
-   |              help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
+   |              ^^^^^^^ expected this to be a list
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html#representations>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL |     let _z = #[repr(<integer type>)] 1;
+   |                    ++++++++++++++++
+LL |     let _z = #[repr(C)] 1;
+   |                    +++
+LL |     let _z = #[repr(Rust)] 1;
+   |                    ++++++
+LL |     let _z = #[repr(align(...))] 1;
+   |                    ++++++++++++
+   = and 2 other candidates
 
 error[E0518]: attribute should be applied to function or closure
   --> $DIR/issue-43988.rs:5:5
diff --git a/tests/ui/issues/issue-8727.rs b/tests/ui/issues/issue-8727.rs
index 1883287f140..c1b60e8e085 100644
--- a/tests/ui/issues/issue-8727.rs
+++ b/tests/ui/issues/issue-8727.rs
@@ -2,6 +2,7 @@
 // recursions.
 
 //@ build-fail
+//@ compile-flags: --diagnostic-width=100 -Zwrite-long-types-to-disk=yes
 
 fn generic<T>() { //~ WARN function cannot return without recursing
     generic::<Option<T>>();
diff --git a/tests/ui/issues/issue-8727.stderr b/tests/ui/issues/issue-8727.stderr
index 04158962a01..9fb09a7d4f4 100644
--- a/tests/ui/issues/issue-8727.stderr
+++ b/tests/ui/issues/issue-8727.stderr
@@ -1,5 +1,5 @@
 warning: function cannot return without recursing
-  --> $DIR/issue-8727.rs:6:1
+  --> $DIR/issue-8727.rs:7:1
    |
 LL | fn generic<T>() {
    | ^^^^^^^^^^^^^^^ cannot return without recursing
@@ -9,18 +9,19 @@ LL |     generic::<Option<T>>();
    = help: a `loop` may express intention better if this is on purpose
    = note: `#[warn(unconditional_recursion)]` on by default
 
-error: reached the recursion limit while instantiating `generic::<Option<Option<Option<Option<Option<...>>>>>>`
-  --> $DIR/issue-8727.rs:7:5
+error: reached the recursion limit while instantiating `generic::<Option<Option<Option<Option<...>>>>>`
+  --> $DIR/issue-8727.rs:8:5
    |
 LL |     generic::<Option<T>>();
    |     ^^^^^^^^^^^^^^^^^^^^^^
    |
 note: `generic` defined here
-  --> $DIR/issue-8727.rs:6:1
+  --> $DIR/issue-8727.rs:7:1
    |
 LL | fn generic<T>() {
    | ^^^^^^^^^^^^^^^
-   = note: the full type name has been written to '$TEST_BUILD_DIR/issue-8727.long-type.txt'
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-8727.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error; 1 warning emitted
 
diff --git a/tests/ui/issues/issue-87707.run.stderr b/tests/ui/issues/issue-87707.run.stderr
index eb1d65a081f..8485c0578b8 100644
--- a/tests/ui/issues/issue-87707.run.stderr
+++ b/tests/ui/issues/issue-87707.run.stderr
@@ -1,7 +1,7 @@
 
-thread 'main' panicked at $DIR/issue-87707.rs:14:24:
+thread 'main' ($TID) panicked at $DIR/issue-87707.rs:14:24:
 Here Once instance is poisoned.
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
-thread 'main' panicked at $DIR/issue-87707.rs:16:7:
+thread 'main' ($TID) panicked at $DIR/issue-87707.rs:16:7:
 Once instance has previously been poisoned
diff --git a/tests/ui/issues/issue-9155.rs b/tests/ui/issues/issue-9155.rs
deleted file mode 100644
index dfd9dea2009..00000000000
--- a/tests/ui/issues/issue-9155.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-//@ run-pass
-//@ aux-build:issue-9155.rs
-
-
-extern crate issue_9155;
-
-struct Baz;
-
-pub fn main() {
-    issue_9155::Foo::new(Baz);
-}
diff --git a/tests/ui/issues/issue-9188.rs b/tests/ui/issues/issue-9188.rs
deleted file mode 100644
index df2f90a0f16..00000000000
--- a/tests/ui/issues/issue-9188.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-//@ run-pass
-//@ aux-build:issue-9188.rs
-
-
-extern crate issue_9188;
-
-pub fn main() {
-    let a = issue_9188::bar();
-    let b = issue_9188::foo::<isize>();
-    assert_eq!(*a, *b);
-}
diff --git a/tests/ui/issues/issue-9906.rs b/tests/ui/issues/issue-9906.rs
deleted file mode 100644
index 50417d3e456..00000000000
--- a/tests/ui/issues/issue-9906.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-//@ run-pass
-//@ aux-build:issue-9906.rs
-
-
-extern crate issue_9906 as testmod;
-
-pub fn main() {
-    testmod::foo();
-    testmod::FooBar::new(1);
-}
diff --git a/tests/ui/issues/issue-9968.rs b/tests/ui/issues/issue-9968.rs
deleted file mode 100644
index 89e60ba5ac7..00000000000
--- a/tests/ui/issues/issue-9968.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-//@ run-pass
-//@ aux-build:issue-9968.rs
-
-
-extern crate issue_9968 as lib;
-
-use lib::{Trait, Struct};
-
-pub fn main()
-{
-    Struct::init().test();
-}
diff --git a/tests/ui/issues/issue-12677.rs b/tests/ui/iterators/bytes-iterator-clone-12677.rs
index dbc2dbc8527..cfbb85a3ecb 100644
--- a/tests/ui/issues/issue-12677.rs
+++ b/tests/ui/iterators/bytes-iterator-clone-12677.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/12677
+
 //@ run-pass
 
 fn main() {
diff --git a/tests/ui/issues/issue-15756.rs b/tests/ui/iterators/explicit-deref-non-deref-type-15756.rs
index e0861dee61e..6d4a3bffcf7 100644
--- a/tests/ui/issues/issue-15756.rs
+++ b/tests/ui/iterators/explicit-deref-non-deref-type-15756.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15756
+
 use std::slice::Chunks;
 use std::slice::ChunksMut;
 
diff --git a/tests/ui/issues/issue-15756.stderr b/tests/ui/iterators/explicit-deref-non-deref-type-15756.stderr
index a487d360bef..b4f9aab8496 100644
--- a/tests/ui/issues/issue-15756.stderr
+++ b/tests/ui/iterators/explicit-deref-non-deref-type-15756.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the size for values of type `[T]` cannot be known at compilation time
-  --> $DIR/issue-15756.rs:7:10
+  --> $DIR/explicit-deref-non-deref-type-15756.rs:9:10
    |
 LL |     &mut something
    |          ^^^^^^^^^ doesn't have a size known at compile-time
diff --git a/tests/ui/issues/issue-23966.rs b/tests/ui/iterators/fold-iterator-error-23966.rs
index 5fdec28ac2c..970c943da0b 100644
--- a/tests/ui/issues/issue-23966.rs
+++ b/tests/ui/iterators/fold-iterator-error-23966.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/23966
 fn main() {
     "".chars().fold(|_, _| (), ());
     //~^ ERROR E0277
diff --git a/tests/ui/issues/issue-23966.stderr b/tests/ui/iterators/fold-iterator-error-23966.stderr
index 3f7a4fa312f..15249a93597 100644
--- a/tests/ui/issues/issue-23966.stderr
+++ b/tests/ui/iterators/fold-iterator-error-23966.stderr
@@ -1,5 +1,5 @@
 error[E0277]: expected a `FnMut(_, char)` closure, found `()`
-  --> $DIR/issue-23966.rs:2:32
+  --> $DIR/fold-iterator-error-23966.rs:3:32
    |
 LL |     "".chars().fold(|_, _| (), ());
    |                ----            ^^ expected an `FnMut(_, char)` closure, found `()`
diff --git a/tests/ui/issues/issue-21655.rs b/tests/ui/iterators/for-loop-over-mut-iterator-21655.rs
index 1068b28b338..b5c9826bd45 100644
--- a/tests/ui/issues/issue-21655.rs
+++ b/tests/ui/iterators/for-loop-over-mut-iterator-21655.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/21655
 //@ run-pass
 
 fn test(it: &mut dyn Iterator<Item=i32>) {
diff --git a/tests/ui/issues/issue-15673.rs b/tests/ui/iterators/iterator-type-inference-sum-15673.rs
index bb61c246276..aee027927f2 100644
--- a/tests/ui/issues/issue-15673.rs
+++ b/tests/ui/iterators/iterator-type-inference-sum-15673.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/15673
 //@ run-pass
 #![allow(stable_features)]
 
diff --git a/tests/ui/layout/valid_range_oob.rs b/tests/ui/layout/valid_range_oob.rs
index df816e74066..8ae9f6e9726 100644
--- a/tests/ui/layout/valid_range_oob.rs
+++ b/tests/ui/layout/valid_range_oob.rs
@@ -1,6 +1,6 @@
 //@ failure-status: 101
 //@ normalize-stderr: "note: .*\n\n" -> ""
-//@ normalize-stderr: "thread 'rustc' panicked.*\n" -> ""
+//@ normalize-stderr: "thread 'rustc'.*panicked.*\n" -> ""
 //@ rustc-env:RUST_BACKTRACE=0
 
 #![feature(rustc_attrs)]
diff --git a/tests/ui/issues/issue-14285.rs b/tests/ui/lifetimes/explicit-lifetime-required-14285.rs
index 2ba9ff71773..3f43dcf8366 100644
--- a/tests/ui/issues/issue-14285.rs
+++ b/tests/ui/lifetimes/explicit-lifetime-required-14285.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14285
+
 trait Foo {
     fn dummy(&self) { }
 }
diff --git a/tests/ui/issues/issue-14285.stderr b/tests/ui/lifetimes/explicit-lifetime-required-14285.stderr
index edd139eecba..576de45f94f 100644
--- a/tests/ui/issues/issue-14285.stderr
+++ b/tests/ui/lifetimes/explicit-lifetime-required-14285.stderr
@@ -1,5 +1,5 @@
 error[E0621]: explicit lifetime required in the type of `a`
-  --> $DIR/issue-14285.rs:12:5
+  --> $DIR/explicit-lifetime-required-14285.rs:14:5
    |
 LL |     B(a)
    |     ^^^^ lifetime `'a` required
diff --git a/tests/ui/issues/issue-13058.rs b/tests/ui/lifetimes/iterator-trait-lifetime-error-13058.rs
index a5806feb720..6cfe440b43d 100644
--- a/tests/ui/issues/issue-13058.rs
+++ b/tests/ui/lifetimes/iterator-trait-lifetime-error-13058.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13058
+
 use std::ops::Range;
 
 trait Itble<'r, T, I: Iterator<Item=T>> { fn iter(&'r self) -> I; }
diff --git a/tests/ui/issues/issue-13058.stderr b/tests/ui/lifetimes/iterator-trait-lifetime-error-13058.stderr
index 4f4108fa182..e6564e36b21 100644
--- a/tests/ui/issues/issue-13058.stderr
+++ b/tests/ui/lifetimes/iterator-trait-lifetime-error-13058.stderr
@@ -1,5 +1,5 @@
 error[E0621]: explicit lifetime required in the type of `cont`
-  --> $DIR/issue-13058.rs:14:21
+  --> $DIR/iterator-trait-lifetime-error-13058.rs:16:21
    |
 LL |     let cont_iter = cont.iter();
    |                     ^^^^^^^^^^^ lifetime `'r` required
diff --git a/tests/ui/issues/issue-13703.rs b/tests/ui/lifetimes/lifetime-bound-whitespace-13703.rs
index b385e6b9d2e..79b85e4c132 100644
--- a/tests/ui/issues/issue-13703.rs
+++ b/tests/ui/lifetimes/lifetime-bound-whitespace-13703.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13703
+
 //@ check-pass
 
 pub struct Foo<'a, 'b: 'a> { foo: &'a &'b isize }
diff --git a/tests/ui/issues/issue-13167.rs b/tests/ui/lifetimes/lifetime-inference-destructuring-arg.rs
index 5f733e85948..7a019a71d75 100644
--- a/tests/ui/issues/issue-13167.rs
+++ b/tests/ui/lifetimes/lifetime-inference-destructuring-arg.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13167
+
 //@ check-pass
 //@ revisions: current next
 //@ ignore-compare-mode-next-solver (explicit revisions)
diff --git a/tests/ui/issues/issue-15735.rs b/tests/ui/lifetimes/lifetime-inference-miss-15735.rs
index f5b3803f155..c75d59a2f4b 100644
--- a/tests/ui/issues/issue-15735.rs
+++ b/tests/ui/lifetimes/lifetime-inference-miss-15735.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/15735
 //@ check-pass
 #![allow(dead_code)]
 struct A<'a> {
diff --git a/tests/ui/issues/issue-13323.rs b/tests/ui/lifetimes/matcher-trait-equality-13323.rs
index 8f334404f9a..efd56294b39 100644
--- a/tests/ui/issues/issue-13323.rs
+++ b/tests/ui/lifetimes/matcher-trait-equality-13323.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13323
+
 //@ run-pass
 
 struct StrWrap {
diff --git a/tests/ui/issues/issue-13497.rs b/tests/ui/lifetimes/missing-lifetime-specifier-13497.rs
index 4b2795aa841..6f4ef0b5620 100644
--- a/tests/ui/issues/issue-13497.rs
+++ b/tests/ui/lifetimes/missing-lifetime-specifier-13497.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13497
+
 fn read_lines_borrowed1() -> Vec<
     &str //~ ERROR missing lifetime specifier
 > {
diff --git a/tests/ui/issues/issue-13497.stderr b/tests/ui/lifetimes/missing-lifetime-specifier-13497.stderr
index ee111f1d262..99f4fa04f12 100644
--- a/tests/ui/issues/issue-13497.stderr
+++ b/tests/ui/lifetimes/missing-lifetime-specifier-13497.stderr
@@ -1,5 +1,5 @@
 error[E0106]: missing lifetime specifier
-  --> $DIR/issue-13497.rs:2:5
+  --> $DIR/missing-lifetime-specifier-13497.rs:4:5
    |
 LL |     &str
    |     ^ expected named lifetime parameter
diff --git a/tests/ui/issues/issue-15034.rs b/tests/ui/lifetimes/nondeterministic-lifetime-errors-15034.rs
index 9ea6ed89ca2..e7f9a94231f 100644
--- a/tests/ui/issues/issue-15034.rs
+++ b/tests/ui/lifetimes/nondeterministic-lifetime-errors-15034.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15034
+
 pub struct Lexer<'a> {
     input: &'a str,
 }
diff --git a/tests/ui/issues/issue-15034.stderr b/tests/ui/lifetimes/nondeterministic-lifetime-errors-15034.stderr
index 7db8ade2e48..0762714d259 100644
--- a/tests/ui/issues/issue-15034.stderr
+++ b/tests/ui/lifetimes/nondeterministic-lifetime-errors-15034.stderr
@@ -1,5 +1,5 @@
 error[E0621]: explicit lifetime required in the type of `lexer`
-  --> $DIR/issue-15034.rs:17:9
+  --> $DIR/nondeterministic-lifetime-errors-15034.rs:19:9
    |
 LL |         Parser { lexer: lexer }
    |         ^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'a` required
diff --git a/tests/ui/issues/issue-14901.rs b/tests/ui/lifetimes/reader-wrapper-trait-14901.rs
index ddc12b9ef3c..672872af03a 100644
--- a/tests/ui/issues/issue-14901.rs
+++ b/tests/ui/lifetimes/reader-wrapper-trait-14901.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14901
+
 //@ check-pass
 pub trait Reader {}
 
diff --git a/tests/ui/lifetimes/ref-pattern-lifetime-annotation-13665.rs b/tests/ui/lifetimes/ref-pattern-lifetime-annotation-13665.rs
new file mode 100644
index 00000000000..bae2f73baa3
--- /dev/null
+++ b/tests/ui/lifetimes/ref-pattern-lifetime-annotation-13665.rs
@@ -0,0 +1,16 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13665
+
+//@ run-pass
+
+fn foo<'r>() {
+  let maybe_value_ref: Option<&'r u8> = None;
+
+  let _ = maybe_value_ref.map(|& ref v| v);
+  let _ = maybe_value_ref.map(|& ref v| -> &'r u8 {v});
+  let _ = maybe_value_ref.map(|& ref v: &'r u8| -> &'r u8 {v});
+  let _ = maybe_value_ref.map(|& ref v: &'r u8| {v});
+}
+
+fn main() {
+  foo();
+}
diff --git a/tests/ui/issues/issue-13497-2.rs b/tests/ui/lifetimes/return-reference-local-variable-13497.rs
index c82da0f0096..1ca8074164b 100644
--- a/tests/ui/issues/issue-13497-2.rs
+++ b/tests/ui/lifetimes/return-reference-local-variable-13497.rs
@@ -1,7 +1,11 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13497
+
 fn read_lines_borrowed<'a>() -> Vec<&'a str> {
     let rawLines: Vec<String> = vec!["foo  ".to_string(), "  bar".to_string()];
     rawLines //~ ERROR cannot return value referencing local variable `rawLines`
-        .iter().map(|l| l.trim()).collect()
+        .iter()
+        .map(|l| l.trim())
+        .collect()
 }
 
 fn main() {}
diff --git a/tests/ui/issues/issue-13497-2.stderr b/tests/ui/lifetimes/return-reference-local-variable-13497.stderr
index e2ba1150d07..f5419f114ca 100644
--- a/tests/ui/issues/issue-13497-2.stderr
+++ b/tests/ui/lifetimes/return-reference-local-variable-13497.stderr
@@ -1,13 +1,15 @@
 error[E0515]: cannot return value referencing local variable `rawLines`
-  --> $DIR/issue-13497-2.rs:3:5
+  --> $DIR/return-reference-local-variable-13497.rs:5:5
    |
 LL |       rawLines
    |       ^-------
    |       |
    |  _____`rawLines` is borrowed here
    | |
-LL | |         .iter().map(|l| l.trim()).collect()
-   | |___________________________________________^ returns a value referencing data owned by the current function
+LL | |         .iter()
+LL | |         .map(|l| l.trim())
+LL | |         .collect()
+   | |__________________^ returns a value referencing data owned by the current function
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-13405.rs b/tests/ui/lifetimes/struct-lifetime-field-assignment-13405.rs
index 80b298d2f37..9482d89681b 100644
--- a/tests/ui/issues/issue-13405.rs
+++ b/tests/ui/lifetimes/struct-lifetime-field-assignment-13405.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13405
+
 //@ check-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
diff --git a/tests/ui/lifetimes/struct-lifetime-inference-15735.rs b/tests/ui/lifetimes/struct-lifetime-inference-15735.rs
new file mode 100644
index 00000000000..39e619648eb
--- /dev/null
+++ b/tests/ui/lifetimes/struct-lifetime-inference-15735.rs
@@ -0,0 +1,19 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15735
+
+//@ check-pass
+#![allow(dead_code)]
+struct A<'a> {
+    a: &'a i32,
+    b: &'a i32,
+}
+
+impl <'a> A<'a> {
+    fn foo<'b>(&'b self) {
+        A {
+            a: self.a,
+            b: self.b,
+        };
+    }
+}
+
+fn main() { }
diff --git a/tests/ui/issues/issue-9259.rs b/tests/ui/lifetimes/struct-with-lifetime-parameters-9259.rs
index c45288f7d65..7e39fdc3f10 100644
--- a/tests/ui/issues/issue-9259.rs
+++ b/tests/ui/lifetimes/struct-with-lifetime-parameters-9259.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9259
 //@ run-pass
 #![allow(dead_code)]
 
diff --git a/tests/ui/issues/issue-14821.rs b/tests/ui/lifetimes/trait-object-constructor-14821.rs
index b11a885b3a0..76f0c7514bc 100644
--- a/tests/ui/issues/issue-14821.rs
+++ b/tests/ui/lifetimes/trait-object-constructor-14821.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14821
+
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
diff --git a/tests/ui/issues/issue-11740.rs b/tests/ui/lifetimes/unsafe-transmute-in-find-11740.rs
index c6099c2a0c0..eeecd2e9e40 100644
--- a/tests/ui/issues/issue-11740.rs
+++ b/tests/ui/lifetimes/unsafe-transmute-in-find-11740.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/11740
+
 //@ check-pass
 
 struct Attr {
diff --git a/tests/ui/lifetimes/unusual-rib-combinations.rs b/tests/ui/lifetimes/unusual-rib-combinations.rs
index 0e92b41ae1e..b3e9642332b 100644
--- a/tests/ui/lifetimes/unusual-rib-combinations.rs
+++ b/tests/ui/lifetimes/unusual-rib-combinations.rs
@@ -14,7 +14,7 @@ fn b<const C: u8()>() {}
 // Paren generic args in AnonymousReportError
 fn c<T = u8()>() {}
 //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
-//~| ERROR defaults for type parameters are only allowed in
+//~| ERROR defaults for generic parameters are not allowed here
 //~| WARN this was previously accepted
 
 // Elided lifetime in path in ConstGeneric
diff --git a/tests/ui/lifetimes/unusual-rib-combinations.stderr b/tests/ui/lifetimes/unusual-rib-combinations.stderr
index 7373ca8cf84..bd68479c58c 100644
--- a/tests/ui/lifetimes/unusual-rib-combinations.stderr
+++ b/tests/ui/lifetimes/unusual-rib-combinations.stderr
@@ -22,7 +22,7 @@ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
 LL | fn c<T = u8()>() {}
    |          ^^^^ only `Fn` traits may use parentheses
 
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/unusual-rib-combinations.rs:15:6
    |
 LL | fn c<T = u8()>() {}
@@ -43,7 +43,7 @@ error: aborting due to 6 previous errors
 Some errors have detailed explanations: E0106, E0214, E0308, E0770.
 For more information about an error, try `rustc --explain E0106`.
 Future incompatibility report: Future breakage diagnostic:
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/unusual-rib-combinations.rs:15:6
    |
 LL | fn c<T = u8()>() {}
diff --git a/tests/ui/limits/type-length-limit-enforcement.rs b/tests/ui/limits/type-length-limit-enforcement.rs
index 3b34d6eb5c8..604435dc326 100644
--- a/tests/ui/limits/type-length-limit-enforcement.rs
+++ b/tests/ui/limits/type-length-limit-enforcement.rs
@@ -3,7 +3,7 @@
 //! Checks the enforcement of the type-length limit
 //! and its configurability via `#![type_length_limit]`.
 
-//@ compile-flags: -Copt-level=0 -Zenforce-type-length-limit
+//@ compile-flags: -Copt-level=0 -Zenforce-type-length-limit --diagnostic-width=100 -Zwrite-long-types-to-disk=yes
 
 //@ build-fail
 
diff --git a/tests/ui/limits/type-length-limit-enforcement.stderr b/tests/ui/limits/type-length-limit-enforcement.stderr
index 516230ae832..bfea0b5a448 100644
--- a/tests/ui/limits/type-length-limit-enforcement.stderr
+++ b/tests/ui/limits/type-length-limit-enforcement.stderr
@@ -1,11 +1,12 @@
-error: reached the type-length limit while instantiating `std::mem::drop::<Option<((((..., ..., ...), ..., ...), ..., ...), ..., ...)>>`
+error: reached the type-length limit while instantiating `drop::<Option<((..., ..., ...), ..., ...)>>`
   --> $DIR/type-length-limit-enforcement.rs:34:5
    |
 LL |     drop::<Option<A>>(None);
    |     ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider adding a `#![type_length_limit="4010"]` attribute to your crate
-   = note: the full type name has been written to '$TEST_BUILD_DIR/type-length-limit-enforcement.long-type.txt'
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/type-length-limit-enforcement.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: reached the type-length limit while instantiating `<{closure@rt::lang_start<()>::{closure#0}} as FnMut<()>>::call_mut`
    |
diff --git a/tests/ui/link-native-libs/link-attr-validation-early.rs b/tests/ui/link-native-libs/link-attr-validation-early.rs
index b9a835fb5e9..a7dd80f8920 100644
--- a/tests/ui/link-native-libs/link-attr-validation-early.rs
+++ b/tests/ui/link-native-libs/link-attr-validation-early.rs
@@ -1,7 +1,7 @@
 // Top-level ill-formed
-#[link] //~ ERROR attribute must be of the form
+#[link] //~ ERROR valid forms for the attribute are
         //~| WARN this was previously accepted
-#[link = "foo"] //~ ERROR attribute must be of the form
+#[link = "foo"] //~ ERROR valid forms for the attribute are
                 //~| WARN this was previously accepted
 extern "C" {}
 
diff --git a/tests/ui/link-native-libs/link-attr-validation-early.stderr b/tests/ui/link-native-libs/link-attr-validation-early.stderr
index 24ad9d825f8..36cca6f27ef 100644
--- a/tests/ui/link-native-libs/link-attr-validation-early.stderr
+++ b/tests/ui/link-native-libs/link-attr-validation-early.stderr
@@ -1,4 +1,4 @@
-error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
+error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]`
   --> $DIR/link-attr-validation-early.rs:2:1
    |
 LL | #[link]
@@ -6,9 +6,10 @@ LL | #[link]
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
    = note: `#[deny(ill_formed_attribute_input)]` on by default
 
-error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
+error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]`
   --> $DIR/link-attr-validation-early.rs:4:1
    |
 LL | #[link = "foo"]
@@ -16,6 +17,31 @@ LL | #[link = "foo"]
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
 
 error: aborting due to 2 previous errors
 
+Future incompatibility report: Future breakage diagnostic:
+error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]`
+  --> $DIR/link-attr-validation-early.rs:2:1
+   |
+LL | #[link]
+   | ^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
+Future breakage diagnostic:
+error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]`
+  --> $DIR/link-attr-validation-early.rs:4:1
+   |
+LL | #[link = "foo"]
+   | ^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
diff --git a/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs b/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs
deleted file mode 100644
index 23848056ee1..00000000000
--- a/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// rust-lang/rust#61232: We used to ICE when trying to detect a
-// collision on the symbol generated for the external linkage item in
-// an extern crate.
-
-//@ build-fail
-//@ aux-build:def_colliding_external.rs
-// FIXME(#83838) codegen-units=1 triggers llvm asserts
-//@ compile-flags: -Ccodegen-units=16
-
-extern crate def_colliding_external as dep1;
-
-#[no_mangle]
-pub static _rust_extern_with_linkage_collision: i32 = 0;
-
-mod dep2 {
-    #[no_mangle]
-    pub static collision: usize = 0;
-}
-
-fn main() {
-    unsafe {
-       println!("{:p}", &dep1::collision);
-    }
-}
-
-//~? ERROR symbol `collision` is already defined
diff --git a/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.stderr b/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.stderr
deleted file mode 100644
index 2448c160c5c..00000000000
--- a/tests/ui/linkage-attr/linkage-detect-extern-generated-name-collision.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: symbol `collision` is already defined
-  --> $DIR/auxiliary/def_colliding_external.rs:6:5
-   |
-LL |     pub static collision: *const i32;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs b/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs
deleted file mode 100644
index df952504eef..00000000000
--- a/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-//@ build-fail
-// FIXME(#83838) codegen-units=1 triggers llvm asserts
-//@ compile-flags: -Ccodegen-units=16
-#![feature(linkage)]
-
-mod dep1 {
-    extern "C" {
-        #[linkage = "external"]
-        #[no_mangle]
-        pub static collision: *const i32; //~ ERROR symbol `collision` is already defined
-    }
-}
-
-#[no_mangle]
-pub static _rust_extern_with_linkage_collision: i32 = 0;
-
-mod dep2 {
-    #[no_mangle]
-    pub static collision: usize = 0;
-}
-
-fn main() {
-    unsafe {
-        println!("{:p}", &dep1::collision);
-    }
-}
diff --git a/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr b/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr
deleted file mode 100644
index fcaaa39b674..00000000000
--- a/tests/ui/linkage-attr/linkage-detect-local-generated-name-collision.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: symbol `collision` is already defined
-  --> $DIR/linkage-detect-local-generated-name-collision.rs:10:9
-   |
-LL |         pub static collision: *const i32;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/linkage-attr/propagate-generic-issue-18804/main.rs b/tests/ui/linkage-attr/propagate-generic-issue-18804/main.rs
index 8c194ec50df..ad7b0674478 100644
--- a/tests/ui/linkage-attr/propagate-generic-issue-18804/main.rs
+++ b/tests/ui/linkage-attr/propagate-generic-issue-18804/main.rs
@@ -4,6 +4,7 @@
 
 //@ ignore-emscripten no weak symbol support
 //@ ignore-apple no extern_weak linkage
+//@ ignore-aix no extern_weak linkage
 
 //@ aux-build:lib.rs
 
diff --git a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.stderr b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.stderr
index ffae30aabcc..6bf1eab311a 100644
--- a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.stderr
+++ b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-invalid-format.stderr
@@ -6,6 +6,8 @@ LL |     #[link_ordinal("JustMonika")]
    |     |              |
    |     |              expected an integer literal here
    |     help: must be of the form: `#[link_ordinal(ordinal)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_ordinal-attribute>
 
 error[E0539]: malformed `link_ordinal` attribute input
   --> $DIR/link-ordinal-invalid-format.rs:6:5
@@ -15,6 +17,8 @@ LL |     #[link_ordinal("JustMonika")]
    |     |              |
    |     |              expected an integer literal here
    |     help: must be of the form: `#[link_ordinal(ordinal)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_ordinal-attribute>
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.rs b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.rs
index 2a8b9ebacf7..58f19085540 100644
--- a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.rs
+++ b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.rs
@@ -3,10 +3,12 @@ extern "C" {
     #[link_ordinal()]
     //~^ ERROR malformed `link_ordinal` attribute input
     //~| NOTE  expected a single argument
+    //~| NOTE for more information, visit
     fn foo();
     #[link_ordinal()]
     //~^ ERROR malformed `link_ordinal` attribute input
     //~| NOTE  expected a single argument
+    //~| NOTE for more information, visit
     static mut imported_variable: i32;
 }
 
diff --git a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.stderr b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.stderr
index c6b8a18d03a..d575b0961af 100644
--- a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.stderr
+++ b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-missing-argument.stderr
@@ -6,15 +6,19 @@ LL |     #[link_ordinal()]
    |     |             |
    |     |             expected a single argument here
    |     help: must be of the form: `#[link_ordinal(ordinal)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_ordinal-attribute>
 
 error[E0805]: malformed `link_ordinal` attribute input
-  --> $DIR/link-ordinal-missing-argument.rs:7:5
+  --> $DIR/link-ordinal-missing-argument.rs:8:5
    |
 LL |     #[link_ordinal()]
    |     ^^^^^^^^^^^^^^--^
    |     |             |
    |     |             expected a single argument here
    |     help: must be of the form: `#[link_ordinal(ordinal)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_ordinal-attribute>
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.rs b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.rs
index ddf9583352f..55b18ae0d96 100644
--- a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.rs
+++ b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.rs
@@ -3,10 +3,12 @@ extern "C" {
     #[link_ordinal(3, 4)]
     //~^ ERROR malformed `link_ordinal` attribute input
     //~| NOTE  expected a single argument
+    //~| NOTE for more information, visit
     fn foo();
     #[link_ordinal(3, 4)]
     //~^ ERROR malformed `link_ordinal` attribute input
     //~| NOTE  expected a single argument
+    //~| NOTE for more information, visit
     static mut imported_variable: i32;
 }
 
diff --git a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.stderr b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.stderr
index 7d63304f598..a84fef9f9e4 100644
--- a/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.stderr
+++ b/tests/ui/linkage-attr/raw-dylib/windows/link-ordinal-too-many-arguments.stderr
@@ -6,15 +6,19 @@ LL |     #[link_ordinal(3, 4)]
    |     |             |
    |     |             expected a single argument here
    |     help: must be of the form: `#[link_ordinal(ordinal)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_ordinal-attribute>
 
 error[E0805]: malformed `link_ordinal` attribute input
-  --> $DIR/link-ordinal-too-many-arguments.rs:7:5
+  --> $DIR/link-ordinal-too-many-arguments.rs:8:5
    |
 LL |     #[link_ordinal(3, 4)]
    |     ^^^^^^^^^^^^^^------^
    |     |             |
    |     |             expected a single argument here
    |     help: must be of the form: `#[link_ordinal(ordinal)]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_ordinal-attribute>
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/issues/auxiliary/issue-25185-1.rs b/tests/ui/linking/auxiliary/aux-25185-1.rs
index 032d7d5de34..032d7d5de34 100644
--- a/tests/ui/issues/auxiliary/issue-25185-1.rs
+++ b/tests/ui/linking/auxiliary/aux-25185-1.rs
diff --git a/tests/ui/linking/auxiliary/aux-25185-2.rs b/tests/ui/linking/auxiliary/aux-25185-2.rs
new file mode 100644
index 00000000000..96c73f623e4
--- /dev/null
+++ b/tests/ui/linking/auxiliary/aux-25185-2.rs
@@ -0,0 +1,3 @@
+extern crate aux_25185_1;
+
+pub use aux_25185_1::rust_dbg_extern_identity_u32;
diff --git a/tests/ui/linking/rlib-to-dylib-native-deps-inclusion-25185.rs b/tests/ui/linking/rlib-to-dylib-native-deps-inclusion-25185.rs
new file mode 100644
index 00000000000..bbcfcb75106
--- /dev/null
+++ b/tests/ui/linking/rlib-to-dylib-native-deps-inclusion-25185.rs
@@ -0,0 +1,13 @@
+// https://github.com/rust-lang/rust/issues/25185
+//@ run-pass
+//@ aux-build:aux-25185-1.rs
+//@ aux-build:aux-25185-2.rs
+
+extern crate aux_25185_2;
+
+fn main() {
+    let x = unsafe {
+        aux_25185_2::rust_dbg_extern_identity_u32(1)
+    };
+    assert_eq!(x, 1);
+}
diff --git a/tests/ui/lint/dangling-pointers-from-locals.rs b/tests/ui/lint/dangling-pointers-from-locals.rs
new file mode 100644
index 00000000000..e321df2f427
--- /dev/null
+++ b/tests/ui/lint/dangling-pointers-from-locals.rs
@@ -0,0 +1,188 @@
+//@ check-pass
+
+struct Zst((), ());
+struct Adt(u8);
+
+const X: u8 = 5;
+
+fn simple() -> *const u8 {
+    let x = 0;
+    &x
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn bindings() -> *const u8 {
+    let x = 0;
+    let x = &x;
+    x
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn bindings_with_return() -> *const u8 {
+    let x = 42;
+    let y = &x;
+    return y;
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn with_simple_cast() -> *const u8 {
+    let x = 0u8;
+    &x as *const u8
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn bindings_and_casts() -> *const u8 {
+    let x = 0u8;
+    let x = &x as *const u8;
+    x as *const u8
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn return_with_complex_cast() -> *mut u8 {
+    let mut x = 0u8;
+    return &mut x as *mut u8 as *const u8 as *mut u8;
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn with_block() -> *const u8 {
+    let x = 0;
+    &{ x }
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn with_many_blocks() -> *const u8 {
+    let x = 0;
+    {
+        {
+            &{
+                //~^ WARN a dangling pointer will be produced
+                { x }
+            }
+        }
+    }
+}
+
+fn simple_return() -> *const u8 {
+    let x = 0;
+    return &x;
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn return_mut() -> *mut u8 {
+    let mut x = 0;
+    return &mut x;
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn const_and_flow() -> *const u8 {
+    if false {
+        let x = 8;
+        return &x;
+        //~^ WARN a dangling pointer will be produced
+    }
+    &X // not dangling
+}
+
+fn vector<T: Default>() -> *const Vec<T> {
+    let x = vec![T::default()];
+    &x
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn local_adt() -> *const Adt {
+    let x = Adt(5);
+    return &x;
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn closure() -> *const u8 {
+    let _x = || -> *const u8 {
+        let x = 8;
+        return &x;
+        //~^ WARN a dangling pointer will be produced
+    };
+    &X // not dangling
+}
+
+fn fn_ptr() -> *const fn() -> u8 {
+    fn ret_u8() -> u8 {
+        0
+    }
+
+    let x = ret_u8 as fn() -> u8;
+    &x
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn as_arg(a: Adt) -> *const Adt {
+    &a
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn fn_ptr_as_arg(a: fn() -> u8) -> *const fn() -> u8 {
+    &a
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn ptr_as_arg(a: *const Adt) -> *const *const Adt {
+    &a
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn adt_as_arg(a: &Adt) -> *const &Adt {
+    &a
+    //~^ WARN a dangling pointer will be produced
+}
+
+fn unit() -> *const () {
+    let x = ();
+    &x // not dangling
+}
+
+fn zst() -> *const Zst {
+    let x = Zst((), ());
+    &x // not dangling
+}
+
+fn ref_implicit(a: &Adt) -> *const Adt {
+    a // not dangling
+}
+
+fn ref_explicit(a: &Adt) -> *const Adt {
+    &*a // not dangling
+}
+
+fn identity(a: *const Adt) -> *const Adt {
+    a // not dangling
+}
+
+fn from_ref(a: &Adt) -> *const Adt {
+    std::ptr::from_ref(a) // not dangling
+}
+
+fn inner_static() -> *const u8 {
+    static U: u8 = 5;
+    if false {
+        return &U as *const u8; // not dangling
+    }
+    &U // not dangling
+}
+
+fn return_in_closure() {
+    let x = 0;
+    let c = || -> *const u8 {
+        &x // not dangling by it-self
+    };
+}
+
+fn option<T: Default>() -> *const Option<T> {
+    let x = Some(T::default());
+    &x // can't compute layout of `Option<T>`, so cnat' be sure it won't be a ZST
+}
+
+fn generic<T: Default>() -> *const T {
+    let x = T::default();
+    &x // can't compute layout of `T`, so can't be sure it won't be a ZST
+}
+
+fn main() {}
diff --git a/tests/ui/lint/dangling-pointers-from-locals.stderr b/tests/ui/lint/dangling-pointers-from-locals.stderr
new file mode 100644
index 00000000000..e1d28bf22a0
--- /dev/null
+++ b/tests/ui/lint/dangling-pointers-from-locals.stderr
@@ -0,0 +1,247 @@
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:10:5
+   |
+LL | fn simple() -> *const u8 {
+   |                --------- return type of the function is `*const u8`
+LL |     let x = 0;
+   |         - `x` is part the function and will be dropped at the end of the function
+LL |     &x
+   |     ^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+   = note: `#[warn(dangling_pointers_from_locals)]` on by default
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:17:5
+   |
+LL | fn bindings() -> *const u8 {
+   |                  --------- return type of the function is `*const u8`
+LL |     let x = 0;
+   |         - `x` is part the function and will be dropped at the end of the function
+LL |     let x = &x;
+   |             -- dangling pointer created here
+LL |     x
+   |     ^
+   |
+   = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:24:12
+   |
+LL | fn bindings_with_return() -> *const u8 {
+   |                              --------- return type of the function is `*const u8`
+LL |     let x = 42;
+   |         - `x` is part the function and will be dropped at the end of the function
+LL |     let y = &x;
+   |             -- dangling pointer created here
+LL |     return y;
+   |            ^
+   |
+   = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:30:5
+   |
+LL | fn with_simple_cast() -> *const u8 {
+   |                          --------- return type of the function is `*const u8`
+LL |     let x = 0u8;
+   |         - `x` is part the function and will be dropped at the end of the function
+LL |     &x as *const u8
+   |     --^^^^^^^^^^^^^
+   |     |
+   |     dangling pointer created here
+   |
+   = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:37:5
+   |
+LL | fn bindings_and_casts() -> *const u8 {
+   |                            --------- return type of the function is `*const u8`
+LL |     let x = 0u8;
+   |         - `x` is part the function and will be dropped at the end of the function
+LL |     let x = &x as *const u8;
+   |             -- dangling pointer created here
+LL |     x as *const u8
+   |     ^^^^^^^^^^^^^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:43:12
+   |
+LL | fn return_with_complex_cast() -> *mut u8 {
+   |                                  ------- return type of the function is `*mut u8`
+LL |     let mut x = 0u8;
+   |         ----- `x` is part the function and will be dropped at the end of the function
+LL |     return &mut x as *mut u8 as *const u8 as *mut u8;
+   |            ------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |            |
+   |            dangling pointer created here
+   |
+   = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:49:5
+   |
+LL | fn with_block() -> *const u8 {
+   |                    --------- return type of the function is `*const u8`
+LL |     let x = 0;
+   |         - `x` is part the function and will be dropped at the end of the function
+LL |     &{ x }
+   |     ^^^^^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:57:13
+   |
+LL |   fn with_many_blocks() -> *const u8 {
+   |                            --------- return type of the function is `*const u8`
+LL |       let x = 0;
+   |           - `x` is part the function and will be dropped at the end of the function
+...
+LL | /             &{
+LL | |
+LL | |                 { x }
+LL | |             }
+   | |_____________^
+   |
+   = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:67:12
+   |
+LL | fn simple_return() -> *const u8 {
+   |                       --------- return type of the function is `*const u8`
+LL |     let x = 0;
+   |         - `x` is part the function and will be dropped at the end of the function
+LL |     return &x;
+   |            ^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:73:12
+   |
+LL | fn return_mut() -> *mut u8 {
+   |                    ------- return type of the function is `*mut u8`
+LL |     let mut x = 0;
+   |         ----- `x` is part the function and will be dropped at the end of the function
+LL |     return &mut x;
+   |            ^^^^^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:80:16
+   |
+LL | fn const_and_flow() -> *const u8 {
+   |                        --------- return type of the function is `*const u8`
+LL |     if false {
+LL |         let x = 8;
+   |             - `x` is part the function and will be dropped at the end of the function
+LL |         return &x;
+   |                ^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:88:5
+   |
+LL | fn vector<T: Default>() -> *const Vec<T> {
+   |                            ------------- return type of the function is `*const Vec<T>`
+LL |     let x = vec![T::default()];
+   |         - `x` is part the function and will be dropped at the end of the function
+LL |     &x
+   |     ^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `Vec<T>` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:94:12
+   |
+LL | fn local_adt() -> *const Adt {
+   |                   ---------- return type of the function is `*const Adt`
+LL |     let x = Adt(5);
+   |         - `x` is part the function and will be dropped at the end of the function
+LL |     return &x;
+   |            ^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `Adt` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:101:16
+   |
+LL |     let _x = || -> *const u8 {
+   |                    --------- return type of the closure is `*const u8`
+LL |         let x = 8;
+   |             - `x` is part the closure and will be dropped at the end of the closure
+LL |         return &x;
+   |                ^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the closure because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `x` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:113:5
+   |
+LL | fn fn_ptr() -> *const fn() -> u8 {
+   |                ----------------- return type of the function is `*const fn() -> u8`
+...
+LL |     let x = ret_u8 as fn() -> u8;
+   |         - `x` is part the function and will be dropped at the end of the function
+LL |     &x
+   |     ^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `fn() -> u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `a` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:118:5
+   |
+LL | fn as_arg(a: Adt) -> *const Adt {
+   |           -          ---------- return type of the function is `*const Adt`
+   |           |
+   |           `a` is part the function and will be dropped at the end of the function
+LL |     &a
+   |     ^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `Adt` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `a` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:123:5
+   |
+LL | fn fn_ptr_as_arg(a: fn() -> u8) -> *const fn() -> u8 {
+   |                  -                 ----------------- return type of the function is `*const fn() -> u8`
+   |                  |
+   |                  `a` is part the function and will be dropped at the end of the function
+LL |     &a
+   |     ^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `fn() -> u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `a` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:128:5
+   |
+LL | fn ptr_as_arg(a: *const Adt) -> *const *const Adt {
+   |               -                 ----------------- return type of the function is `*const *const Adt`
+   |               |
+   |               `a` is part the function and will be dropped at the end of the function
+LL |     &a
+   |     ^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `*const Adt` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: a dangling pointer will be produced because the local variable `a` will be dropped
+  --> $DIR/dangling-pointers-from-locals.rs:133:5
+   |
+LL | fn adt_as_arg(a: &Adt) -> *const &Adt {
+   |               -           ----------- return type of the function is `*const &Adt`
+   |               |
+   |               `a` is part the function and will be dropped at the end of the function
+LL |     &a
+   |     ^^
+   |
+   = note: pointers do not have a lifetime; after returning, the `&Adt` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
+
+warning: 19 warnings emitted
+
diff --git a/tests/ui/lint/dead-code/self-assign.rs b/tests/ui/lint/dead-code/self-assign.rs
index 357846baf22..ce91f53cbf1 100644
--- a/tests/ui/lint/dead-code/self-assign.rs
+++ b/tests/ui/lint/dead-code/self-assign.rs
@@ -7,23 +7,20 @@
 //! - `dead_code` lint expansion for self-assignments was implemented in #87129.
 //! - Unfortunately implementation components of #87129 had to be disabled as part of reverts
 //!   #86212, #83171 (to revert #81473) to address regressions #81626 and #81658.
-//! - Consequently, none of the following warnings are emitted.
+//! - Re-enabled in current version to properly detect self-assignments.
 
 //@ check-pass
 
-// Implementation of self-assignment `dead_code` lint expansions disabled due to reverts.
-//@ known-bug: #75356
-
 #![allow(unused_assignments)]
 #![warn(dead_code)]
 
 fn main() {
     let mut x = 0;
     x = x;
-    // FIXME ~^ WARNING: useless assignment of variable of type `i32` to itself
+    //~^ WARNING: useless assignment of variable of type `i32` to itself
 
     x = (x);
-    // FIXME ~^ WARNING: useless assignment of variable of type `i32` to itself
+    //~^ WARNING: useless assignment of variable of type `i32` to itself
 
     x = {x};
     // block expressions don't count as self-assignments
@@ -32,10 +29,10 @@ fn main() {
     struct S<'a> { f: &'a str }
     let mut s = S { f: "abc" };
     s = s;
-    // FIXME ~^ WARNING: useless assignment of variable of type `S` to itself
+    //~^ WARNING: useless assignment of variable of type `S<'_>` to itself
 
     s.f = s.f;
-    // FIXME ~^ WARNING: useless assignment of field of type `&str` to itself
+    //~^ WARNING: useless assignment of field of type `&str` to itself
 
 
     struct N0 { x: Box<i32> }
@@ -44,11 +41,11 @@ fn main() {
     struct N3 { n: N2 };
     let mut n3 = N3 { n: N2(N1 { n: N0 { x: Box::new(42) } }) };
     n3.n.0.n.x = n3.n.0.n.x;
-    // FIXME ~^ WARNING: useless assignment of field of type `Box<i32>` to itself
+    //~^ WARNING: useless assignment of field of type `Box<i32>` to itself
 
     let mut t = (1, ((2, 3, (4, 5)),));
     t.1.0.2.1 = t.1.0.2.1;
-    // FIXME ~^ WARNING: useless assignment of field of type `i32` to itself
+    //~^ WARNING: useless assignment of field of type `i32` to itself
 
 
     let mut y = 0;
diff --git a/tests/ui/lint/dead-code/self-assign.stderr b/tests/ui/lint/dead-code/self-assign.stderr
new file mode 100644
index 00000000000..408ebdb658b
--- /dev/null
+++ b/tests/ui/lint/dead-code/self-assign.stderr
@@ -0,0 +1,44 @@
+warning: useless assignment of variable of type `i32` to itself
+  --> $DIR/self-assign.rs:19:5
+   |
+LL |     x = x;
+   |     ^^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/self-assign.rs:15:9
+   |
+LL | #![warn(dead_code)]
+   |         ^^^^^^^^^
+
+warning: useless assignment of variable of type `i32` to itself
+  --> $DIR/self-assign.rs:22:5
+   |
+LL |     x = (x);
+   |     ^^^^^^^
+
+warning: useless assignment of variable of type `S<'_>` to itself
+  --> $DIR/self-assign.rs:31:5
+   |
+LL |     s = s;
+   |     ^^^^^
+
+warning: useless assignment of field of type `&str` to itself
+  --> $DIR/self-assign.rs:34:5
+   |
+LL |     s.f = s.f;
+   |     ^^^^^^^^^
+
+warning: useless assignment of field of type `Box<i32>` to itself
+  --> $DIR/self-assign.rs:43:5
+   |
+LL |     n3.n.0.n.x = n3.n.0.n.x;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: useless assignment of field of type `i32` to itself
+  --> $DIR/self-assign.rs:47:5
+   |
+LL |     t.1.0.2.1 = t.1.0.2.1;
+   |     ^^^^^^^^^^^^^^^^^^^^^
+
+warning: 6 warnings emitted
+
diff --git a/tests/ui/lint/lint-malformed.stderr b/tests/ui/lint/lint-malformed.stderr
index 0bdcc293b65..25a4298bd75 100644
--- a/tests/ui/lint/lint-malformed.stderr
+++ b/tests/ui/lint/lint-malformed.stderr
@@ -16,7 +16,20 @@ error: malformed `deny` attribute input
   --> $DIR/lint-malformed.rs:1:1
    |
 LL | #![deny = "foo"]
-   | ^^^^^^^^^^^^^^^^ help: must be of the form: `#![deny(lint1, lint2, ..., /*opt*/ reason = "...")]`
+   | ^^^^^^^^^^^^^^^^
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/diagnostics.html#lint-check-attributes>
+help: the following are the possible correct uses
+   |
+LL - #![deny = "foo"]
+LL + #![deny(lint1)]
+   |
+LL - #![deny = "foo"]
+LL + #![deny(lint1, lint2, ...)]
+   |
+LL - #![deny = "foo"]
+LL + #![deny(lint1, lint2, lint3, reason = "...")]
+   |
 
 error[E0452]: malformed lint attribute input
   --> $DIR/lint-malformed.rs:2:10
diff --git a/tests/ui/lint/lint-non-uppercase-usages.stderr b/tests/ui/lint/lint-non-uppercase-usages.stderr
index 7c7e573a88e..b34be31216d 100644
--- a/tests/ui/lint/lint-non-uppercase-usages.stderr
+++ b/tests/ui/lint/lint-non-uppercase-usages.stderr
@@ -29,7 +29,7 @@ warning: const parameter `foo` should have an upper case name
 LL | fn foo<const foo: u32>() {
    |              ^^^
    |
-help: convert the identifier to upper case (notice the capitalization difference)
+help: convert the identifier to upper case (notice the capitalization)
    |
 LL - fn foo<const foo: u32>() {
 LL + fn foo<const FOO: u32>() {
diff --git a/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs b/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs
index 05fbfec2ae5..8ec70a17864 100644
--- a/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs
+++ b/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.rs
@@ -1,9 +1,8 @@
-//@ check-pass
-// Ensure that trailing semicolons cause warnings by default
+// Ensure that trailing semicolons cause errors by default
 
 macro_rules! foo {
     () => {
-        true; //~  WARN trailing semicolon in macro
+        true; //~  ERROR trailing semicolon in macro
               //~| WARN this was previously
     }
 }
diff --git a/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr b/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr
index 0fec4996f1a..99cdcafab39 100644
--- a/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr
+++ b/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr
@@ -1,5 +1,5 @@
-warning: trailing semicolon in macro used in expression position
-  --> $DIR/warn-semicolon-in-expressions-from-macros.rs:6:13
+error: trailing semicolon in macro used in expression position
+  --> $DIR/warn-semicolon-in-expressions-from-macros.rs:5:13
    |
 LL |         true;
    |             ^
@@ -9,14 +9,14 @@ LL |         _ => foo!()
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
-   = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
-   = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
+   = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-warning: 1 warning emitted
+error: aborting due to 1 previous error
 
 Future incompatibility report: Future breakage diagnostic:
-warning: trailing semicolon in macro used in expression position
-  --> $DIR/warn-semicolon-in-expressions-from-macros.rs:6:13
+error: trailing semicolon in macro used in expression position
+  --> $DIR/warn-semicolon-in-expressions-from-macros.rs:5:13
    |
 LL |         true;
    |             ^
@@ -26,6 +26,6 @@ LL |         _ => foo!()
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
-   = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
-   = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
+   = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/issues/issue-29710.rs b/tests/ui/lint/unused-results-lint-triggered-by-derive-debug-29710.rs
index 906ffe9e77b..51702f69c20 100644
--- a/tests/ui/issues/issue-29710.rs
+++ b/tests/ui/lint/unused-results-lint-triggered-by-derive-debug-29710.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/29710
 //@ check-pass
 #![deny(unused_results)]
 #![allow(dead_code)]
diff --git a/tests/ui/lint/unused/unused-attr-duplicate.stderr b/tests/ui/lint/unused/unused-attr-duplicate.stderr
index e277f5203c6..6c44e884ba5 100644
--- a/tests/ui/lint/unused/unused-attr-duplicate.stderr
+++ b/tests/ui/lint/unused/unused-attr-duplicate.stderr
@@ -16,19 +16,6 @@ LL | #![deny(unused_attributes)]
    |         ^^^^^^^^^^^^^^^^^
 
 error: unused attribute
-  --> $DIR/unused-attr-duplicate.rs:55:1
-   |
-LL | #[should_panic(expected = "values don't match")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
-   |
-note: attribute also specified here
-  --> $DIR/unused-attr-duplicate.rs:54:1
-   |
-LL | #[should_panic]
-   | ^^^^^^^^^^^^^^^
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-
-error: unused attribute
   --> $DIR/unused-attr-duplicate.rs:14:1
    |
 LL | #![crate_name = "unused_attr_duplicate2"]
@@ -154,6 +141,19 @@ LL | #[ignore]
    | ^^^^^^^^^
 
 error: unused attribute
+  --> $DIR/unused-attr-duplicate.rs:55:1
+   |
+LL | #[should_panic(expected = "values don't match")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/unused-attr-duplicate.rs:54:1
+   |
+LL | #[should_panic]
+   | ^^^^^^^^^^^^^^^
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+
+error: unused attribute
   --> $DIR/unused-attr-duplicate.rs:60:1
    |
 LL | #[must_use = "some message"]
diff --git a/tests/ui/lint/unused/unused_attributes-must_use.fixed b/tests/ui/lint/unused/unused_attributes-must_use.fixed
new file mode 100644
index 00000000000..80d488296ea
--- /dev/null
+++ b/tests/ui/lint/unused/unused_attributes-must_use.fixed
@@ -0,0 +1,139 @@
+//@ run-rustfix
+
+#![allow(dead_code, path_statements)]
+#![deny(unused_attributes, unused_must_use)]
+#![feature(asm_experimental_arch, stmt_expr_attributes, trait_alias)]
+
+ //~ ERROR `#[must_use]` has no effect
+extern crate std as std2;
+
+ //~ ERROR `#[must_use]` has no effect
+mod test_mod {}
+
+ //~ ERROR `#[must_use]` has no effect
+use std::arch::global_asm;
+
+ //~ ERROR `#[must_use]` has no effect
+const CONST: usize = 4;
+ //~ ERROR `#[must_use]` has no effect
+#[no_mangle]
+static STATIC: usize = 4;
+
+#[must_use]
+struct X;
+
+#[must_use]
+enum Y {
+    Z,
+}
+
+#[must_use]
+union U {
+    unit: (),
+}
+
+ //~ ERROR `#[must_use]` has no effect
+impl U {
+    #[must_use]
+    fn method() -> i32 {
+        4
+    }
+}
+
+#[must_use]
+#[no_mangle]
+fn foo() -> i64 {
+    4
+}
+
+ //~ ERROR `#[must_use]` has no effect
+extern "Rust" {
+    #[link_name = "STATIC"]
+     //~ ERROR `#[must_use]` has no effect
+    static FOREIGN_STATIC: usize;
+
+    #[link_name = "foo"]
+    #[must_use]
+    fn foreign_foo() -> i64;
+}
+
+ //~ ERROR unused attribute
+global_asm!("");
+
+ //~ ERROR `#[must_use]` has no effect
+type UseMe = ();
+
+fn qux< T>(_: T) {} //~ ERROR `#[must_use]` has no effect
+
+#[must_use]
+trait Use {
+     //~ ERROR `#[must_use]` has no effect
+    const ASSOC_CONST: usize = 4;
+     //~ ERROR `#[must_use]` has no effect
+    type AssocTy;
+
+    #[must_use]
+    fn get_four(&self) -> usize {
+        4
+    }
+}
+
+ //~ ERROR `#[must_use]` has no effect
+impl Use for () {
+    type AssocTy = ();
+
+     //~ ERROR `#[must_use]` has no effect
+    fn get_four(&self) -> usize {
+        4
+    }
+}
+
+ //~ ERROR `#[must_use]` has no effect
+trait Alias = Use;
+
+ //~ ERROR `#[must_use]` has no effect
+macro_rules! cool_macro {
+    () => {
+        4
+    };
+}
+
+fn main() {
+     //~ ERROR `#[must_use]` has no effect
+    let x = || {};
+    x();
+
+    let x =  //~ ERROR `#[must_use]` has no effect
+    || {};
+    x();
+
+    let _ = X; //~ ERROR that must be used
+    let _ = Y::Z; //~ ERROR that must be used
+    let _ = U { unit: () }; //~ ERROR that must be used
+    let _ = U::method(); //~ ERROR that must be used
+    let _ = foo(); //~ ERROR that must be used
+
+    unsafe {
+        let _ = foreign_foo(); //~ ERROR that must be used
+    };
+
+    CONST;
+    STATIC;
+    unsafe { FOREIGN_STATIC };
+    cool_macro!();
+    qux(4);
+    let _ = ().get_four(); //~ ERROR that must be used
+
+    match Some(4) {
+         //~ ERROR `#[must_use]` has no effect
+        Some(res) => res,
+        None => 0,
+    };
+
+    struct PatternField {
+        foo: i32,
+    }
+    let s = PatternField {   foo: 123 }; //~ ERROR `#[must_use]` has no effect
+    let PatternField {  foo } = s; //~ ERROR `#[must_use]` has no effect
+    let _ = foo;
+}
diff --git a/tests/ui/lint/unused/unused_attributes-must_use.rs b/tests/ui/lint/unused/unused_attributes-must_use.rs
index 860fc5046d1..edefe8ed65e 100644
--- a/tests/ui/lint/unused/unused_attributes-must_use.rs
+++ b/tests/ui/lint/unused/unused_attributes-must_use.rs
@@ -1,3 +1,5 @@
+//@ run-rustfix
+
 #![allow(dead_code, path_statements)]
 #![deny(unused_attributes, unused_must_use)]
 #![feature(asm_experimental_arch, stmt_expr_attributes, trait_alias)]
@@ -133,4 +135,5 @@ fn main() {
     }
     let s = PatternField { #[must_use]  foo: 123 }; //~ ERROR `#[must_use]` has no effect
     let PatternField { #[must_use] foo } = s; //~ ERROR `#[must_use]` has no effect
+    let _ = foo;
 }
diff --git a/tests/ui/lint/unused/unused_attributes-must_use.stderr b/tests/ui/lint/unused/unused_attributes-must_use.stderr
index 862ffa42d80..27927cf37e9 100644
--- a/tests/ui/lint/unused/unused_attributes-must_use.stderr
+++ b/tests/ui/lint/unused/unused_attributes-must_use.stderr
@@ -1,154 +1,154 @@
 error: unused attribute `must_use`
-  --> $DIR/unused_attributes-must_use.rs:58:1
+  --> $DIR/unused_attributes-must_use.rs:60:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
    |
 note: the built-in attribute `must_use` will be ignored, since it's applied to the macro invocation `global_asm`
-  --> $DIR/unused_attributes-must_use.rs:59:1
+  --> $DIR/unused_attributes-must_use.rs:61:1
    |
 LL | global_asm!("");
    | ^^^^^^^^^^
 note: the lint level is defined here
-  --> $DIR/unused_attributes-must_use.rs:2:9
+  --> $DIR/unused_attributes-must_use.rs:4:9
    |
 LL | #![deny(unused_attributes, unused_must_use)]
    |         ^^^^^^^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to an extern crate
-  --> $DIR/unused_attributes-must_use.rs:5:1
+  --> $DIR/unused_attributes-must_use.rs:7:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a module
-  --> $DIR/unused_attributes-must_use.rs:8:1
+  --> $DIR/unused_attributes-must_use.rs:10:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a use
-  --> $DIR/unused_attributes-must_use.rs:11:1
+  --> $DIR/unused_attributes-must_use.rs:13:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a constant item
-  --> $DIR/unused_attributes-must_use.rs:14:1
+  --> $DIR/unused_attributes-must_use.rs:16:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a static item
-  --> $DIR/unused_attributes-must_use.rs:16:1
+  --> $DIR/unused_attributes-must_use.rs:18:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to an inherent implementation block
-  --> $DIR/unused_attributes-must_use.rs:33:1
+  --> $DIR/unused_attributes-must_use.rs:35:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a foreign module
-  --> $DIR/unused_attributes-must_use.rs:47:1
+  --> $DIR/unused_attributes-must_use.rs:49:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a type alias
-  --> $DIR/unused_attributes-must_use.rs:61:1
+  --> $DIR/unused_attributes-must_use.rs:63:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a type parameter
-  --> $DIR/unused_attributes-must_use.rs:64:8
+  --> $DIR/unused_attributes-must_use.rs:66:8
    |
 LL | fn qux<#[must_use] T>(_: T) {}
    |        ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to an trait implementation block
-  --> $DIR/unused_attributes-must_use.rs:79:1
+  --> $DIR/unused_attributes-must_use.rs:81:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a trait alias
-  --> $DIR/unused_attributes-must_use.rs:89:1
+  --> $DIR/unused_attributes-must_use.rs:91:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a macro def
-  --> $DIR/unused_attributes-must_use.rs:92:1
+  --> $DIR/unused_attributes-must_use.rs:94:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a statement
-  --> $DIR/unused_attributes-must_use.rs:100:5
+  --> $DIR/unused_attributes-must_use.rs:102:5
    |
 LL |     #[must_use]
    |     ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a closure
-  --> $DIR/unused_attributes-must_use.rs:104:13
+  --> $DIR/unused_attributes-must_use.rs:106:13
    |
 LL |     let x = #[must_use]
    |             ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to an match arm
-  --> $DIR/unused_attributes-must_use.rs:126:9
+  --> $DIR/unused_attributes-must_use.rs:128:9
    |
 LL |         #[must_use]
    |         ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a struct field
-  --> $DIR/unused_attributes-must_use.rs:134:28
+  --> $DIR/unused_attributes-must_use.rs:136:28
    |
 LL |     let s = PatternField { #[must_use]  foo: 123 };
    |                            ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a pattern field
-  --> $DIR/unused_attributes-must_use.rs:135:24
+  --> $DIR/unused_attributes-must_use.rs:137:24
    |
 LL |     let PatternField { #[must_use] foo } = s;
    |                        ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to an associated const
-  --> $DIR/unused_attributes-must_use.rs:68:5
+  --> $DIR/unused_attributes-must_use.rs:70:5
    |
 LL |     #[must_use]
    |     ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to an associated type
-  --> $DIR/unused_attributes-must_use.rs:70:5
+  --> $DIR/unused_attributes-must_use.rs:72:5
    |
 LL |     #[must_use]
    |     ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a provided trait method
-  --> $DIR/unused_attributes-must_use.rs:83:5
+  --> $DIR/unused_attributes-must_use.rs:85:5
    |
 LL |     #[must_use]
    |     ^^^^^^^^^^^
 
 error: `#[must_use]` has no effect when applied to a foreign static item
-  --> $DIR/unused_attributes-must_use.rs:50:5
+  --> $DIR/unused_attributes-must_use.rs:52:5
    |
 LL |     #[must_use]
    |     ^^^^^^^^^^^
 
 error: unused `X` that must be used
-  --> $DIR/unused_attributes-must_use.rs:108:5
+  --> $DIR/unused_attributes-must_use.rs:110:5
    |
 LL |     X;
    |     ^
    |
 note: the lint level is defined here
-  --> $DIR/unused_attributes-must_use.rs:2:28
+  --> $DIR/unused_attributes-must_use.rs:4:28
    |
 LL | #![deny(unused_attributes, unused_must_use)]
    |                            ^^^^^^^^^^^^^^^
@@ -158,7 +158,7 @@ LL |     let _ = X;
    |     +++++++
 
 error: unused `Y` that must be used
-  --> $DIR/unused_attributes-must_use.rs:109:5
+  --> $DIR/unused_attributes-must_use.rs:111:5
    |
 LL |     Y::Z;
    |     ^^^^
@@ -169,7 +169,7 @@ LL |     let _ = Y::Z;
    |     +++++++
 
 error: unused `U` that must be used
-  --> $DIR/unused_attributes-must_use.rs:110:5
+  --> $DIR/unused_attributes-must_use.rs:112:5
    |
 LL |     U { unit: () };
    |     ^^^^^^^^^^^^^^
@@ -180,7 +180,7 @@ LL |     let _ = U { unit: () };
    |     +++++++
 
 error: unused return value of `U::method` that must be used
-  --> $DIR/unused_attributes-must_use.rs:111:5
+  --> $DIR/unused_attributes-must_use.rs:113:5
    |
 LL |     U::method();
    |     ^^^^^^^^^^^
@@ -191,7 +191,7 @@ LL |     let _ = U::method();
    |     +++++++
 
 error: unused return value of `foo` that must be used
-  --> $DIR/unused_attributes-must_use.rs:112:5
+  --> $DIR/unused_attributes-must_use.rs:114:5
    |
 LL |     foo();
    |     ^^^^^
@@ -202,7 +202,7 @@ LL |     let _ = foo();
    |     +++++++
 
 error: unused return value of `foreign_foo` that must be used
-  --> $DIR/unused_attributes-must_use.rs:115:9
+  --> $DIR/unused_attributes-must_use.rs:117:9
    |
 LL |         foreign_foo();
    |         ^^^^^^^^^^^^^
@@ -213,7 +213,7 @@ LL |         let _ = foreign_foo();
    |         +++++++
 
 error: unused return value of `Use::get_four` that must be used
-  --> $DIR/unused_attributes-must_use.rs:123:5
+  --> $DIR/unused_attributes-must_use.rs:125:5
    |
 LL |     ().get_four();
    |     ^^^^^^^^^^^^^
diff --git a/tests/ui/loop-match/const-continue-to-block.rs b/tests/ui/loop-match/const-continue-to-block.rs
index fd7ebeefeb6..a0f60aaec33 100644
--- a/tests/ui/loop-match/const-continue-to-block.rs
+++ b/tests/ui/loop-match/const-continue-to-block.rs
@@ -24,3 +24,24 @@ fn const_continue_to_block() -> u8 {
         }
     }
 }
+
+fn const_continue_to_shadowed_block() -> u8 {
+    let state = 0;
+    #[loop_match]
+    loop {
+        state = 'blk: {
+            match state {
+                0 => {
+                    #[const_continue]
+                    break 'blk 1;
+                }
+                _ => 'blk: {
+                    //~^ WARN label name `'blk` shadows a label name that is already in scope
+                    #[const_continue]
+                    break 'blk 2;
+                    //~^ ERROR `#[const_continue]` must break to a labeled block that participates in a `#[loop_match]`
+                }
+            }
+        }
+    }
+}
diff --git a/tests/ui/loop-match/const-continue-to-block.stderr b/tests/ui/loop-match/const-continue-to-block.stderr
index 3a5339a0394..f4e223bcff1 100644
--- a/tests/ui/loop-match/const-continue-to-block.stderr
+++ b/tests/ui/loop-match/const-continue-to-block.stderr
@@ -1,8 +1,23 @@
+warning: label name `'blk` shadows a label name that is already in scope
+  --> $DIR/const-continue-to-block.rs:38:22
+   |
+LL |         state = 'blk: {
+   |                 ---- first declared here
+...
+LL |                 _ => 'blk: {
+   |                      ^^^^ label `'blk` already in scope
+
 error: `#[const_continue]` must break to a labeled block that participates in a `#[loop_match]`
   --> $DIR/const-continue-to-block.rs:20:27
    |
 LL |                     break 'b 2;
    |                           ^^
 
-error: aborting due to 1 previous error
+error: `#[const_continue]` must break to a labeled block that participates in a `#[loop_match]`
+  --> $DIR/const-continue-to-block.rs:41:27
+   |
+LL |                     break 'blk 2;
+   |                           ^^^^
+
+error: aborting due to 2 previous errors; 1 warning emitted
 
diff --git a/tests/ui/loop-match/invalid.rs b/tests/ui/loop-match/invalid.rs
index 0c47b1e0057..08eaf832f56 100644
--- a/tests/ui/loop-match/invalid.rs
+++ b/tests/ui/loop-match/invalid.rs
@@ -142,6 +142,25 @@ fn break_without_value_unit() {
     }
 }
 
+fn break_without_label() {
+    let mut state = State::A;
+    let _ = {
+        #[loop_match]
+        loop {
+            state = 'blk: {
+                match state {
+                    _ => {
+                        #[const_continue]
+                        break State::A;
+                        //~^ ERROR unlabeled `break` inside of a labeled block
+                        //~| ERROR a `#[const_continue]` must break to a label with a value
+                    }
+                }
+            }
+        }
+    };
+}
+
 fn arm_has_guard(cond: bool) {
     let mut state = State::A;
     #[loop_match]
diff --git a/tests/ui/loop-match/invalid.stderr b/tests/ui/loop-match/invalid.stderr
index 70f246caa9c..9e9796a2ea7 100644
--- a/tests/ui/loop-match/invalid.stderr
+++ b/tests/ui/loop-match/invalid.stderr
@@ -9,6 +9,12 @@ help: give the `break` a value of the expected type
 LL |                     break 'blk /* value */;
    |                                +++++++++++
 
+error[E0695]: unlabeled `break` inside of a labeled block
+  --> $DIR/invalid.rs:154:25
+   |
+LL |                         break State::A;
+   |                         ^^^^^^^^^^^^^^ `break` statements that would diverge to or through a labeled block need to bear a label
+
 error: invalid update of the `#[loop_match]` state
   --> $DIR/invalid.rs:18:9
    |
@@ -80,14 +86,20 @@ error: a `#[const_continue]` must break to a label with a value
 LL |                     break 'blk;
    |                     ^^^^^^^^^^
 
+error: a `#[const_continue]` must break to a label with a value
+  --> $DIR/invalid.rs:154:25
+   |
+LL |                         break State::A;
+   |                         ^^^^^^^^^^^^^^
+
 error: match arms that are part of a `#[loop_match]` cannot have guards
-  --> $DIR/invalid.rs:155:29
+  --> $DIR/invalid.rs:174:29
    |
 LL |                 State::B if cond => break 'a,
    |                             ^^^^
 
 error[E0004]: non-exhaustive patterns: `State::B` and `State::C` not covered
-  --> $DIR/invalid.rs:168:19
+  --> $DIR/invalid.rs:187:19
    |
 LL |             match state {
    |                   ^^^^^ patterns `State::B` and `State::C` not covered
@@ -110,12 +122,12 @@ LL ~                 State::B | State::C => todo!(),
    |
 
 error[E0579]: lower range bound must be less than upper
-  --> $DIR/invalid.rs:185:17
+  --> $DIR/invalid.rs:204:17
    |
 LL |                 4.0..3.0 => {
    |                 ^^^^^^^^
 
-error: aborting due to 14 previous errors
+error: aborting due to 16 previous errors
 
-Some errors have detailed explanations: E0004, E0308, E0579.
+Some errors have detailed explanations: E0004, E0308, E0579, E0695.
 For more information about an error, try `rustc --explain E0004`.
diff --git a/tests/ui/issues/issue-75704.rs b/tests/ui/loops/infinite-loop-simplify-cfg-75704.rs
index 1672bf0b4c3..8bc5fba7a68 100644
--- a/tests/ui/issues/issue-75704.rs
+++ b/tests/ui/loops/infinite-loop-simplify-cfg-75704.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/75704
 // Caused an infinite loop during SimlifyCfg MIR transform previously.
 //
 //@ build-pass
diff --git a/tests/ui/issues/issue-9047.rs b/tests/ui/loops/loop-with-label-9047.rs
index 97733588d51..29e6dba0b9e 100644
--- a/tests/ui/issues/issue-9047.rs
+++ b/tests/ui/loops/loop-with-label-9047.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9047
 //@ run-pass
 #![allow(unused_mut)]
 #![allow(unused_variables)]
diff --git a/tests/ui/macros/assert-long-condition.run.stderr b/tests/ui/macros/assert-long-condition.run.stderr
index c2c5fe5d7d5..a9fac037143 100644
--- a/tests/ui/macros/assert-long-condition.run.stderr
+++ b/tests/ui/macros/assert-long-condition.run.stderr
@@ -1,5 +1,5 @@
 
-thread 'main' panicked at $DIR/assert-long-condition.rs:7:5:
+thread 'main' ($TID) panicked at $DIR/assert-long-condition.rs:7:5:
 assertion failed: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18
                                 + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/macros/builtin-std-paths-fail.stderr b/tests/ui/macros/builtin-std-paths-fail.stderr
index 49034c3987b..85d2bd2132f 100644
--- a/tests/ui/macros/builtin-std-paths-fail.stderr
+++ b/tests/ui/macros/builtin-std-paths-fail.stderr
@@ -104,8 +104,8 @@ LL | #[std::test]
    |
 note: found an item that was configured out
   --> $SRC_DIR/std/src/lib.rs:LL:COL
-note: the item is gated here
-  --> $SRC_DIR/std/src/lib.rs:LL:COL
+   |
+   = note: the item is gated here
 
 error: aborting due to 16 previous errors
 
diff --git a/tests/ui/issues/issue-15189.rs b/tests/ui/macros/for-loop-macro-rules-hygiene.rs
index 4dbe2179dd9..fcebda1b9da 100644
--- a/tests/ui/issues/issue-15189.rs
+++ b/tests/ui/macros/for-loop-macro-rules-hygiene.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15189
+
 //@ run-pass
 macro_rules! third {
     ($e:expr) => ({let x = 2; $e[x]})
diff --git a/tests/ui/issues/issue-26093.rs b/tests/ui/macros/invalid-assignment-in-macro-26093.rs
index c838515caf9..686a13a3eec 100644
--- a/tests/ui/issues/issue-26093.rs
+++ b/tests/ui/macros/invalid-assignment-in-macro-26093.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/26093
 macro_rules! not_a_place {
     ($thing:expr) => {
         $thing = 42;
diff --git a/tests/ui/issues/issue-26093.stderr b/tests/ui/macros/invalid-assignment-in-macro-26093.stderr
index 1a08d0fef41..99f188c7183 100644
--- a/tests/ui/issues/issue-26093.stderr
+++ b/tests/ui/macros/invalid-assignment-in-macro-26093.stderr
@@ -1,5 +1,5 @@
 error[E0070]: invalid left-hand side of assignment
-  --> $DIR/issue-26093.rs:3:16
+  --> $DIR/invalid-assignment-in-macro-26093.rs:4:16
    |
 LL |         $thing = 42;
    |                ^
@@ -13,7 +13,7 @@ LL |     not_a_place!(99);
    = note: this error originates in the macro `not_a_place` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0067]: invalid left-hand side of assignment
-  --> $DIR/issue-26093.rs:5:16
+  --> $DIR/invalid-assignment-in-macro-26093.rs:6:16
    |
 LL |         $thing += 42;
    |                ^^
diff --git a/tests/ui/macros/issue-111749.stderr b/tests/ui/macros/issue-111749.stderr
index 7db2b8e6ad1..884537ef531 100644
--- a/tests/ui/macros/issue-111749.stderr
+++ b/tests/ui/macros/issue-111749.stderr
@@ -16,3 +16,14 @@ LL |     cbor_map! { #[test(test)] 4};
 
 error: aborting due to 2 previous errors
 
+Future incompatibility report: Future breakage diagnostic:
+error: attribute must be of the form `#[test]`
+  --> $DIR/issue-111749.rs:8:17
+   |
+LL |     cbor_map! { #[test(test)] 4};
+   |                 ^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
diff --git a/tests/ui/macros/lint-trailing-macro-call.rs b/tests/ui/macros/lint-trailing-macro-call.rs
index 78b861f1df1..25fa91062c4 100644
--- a/tests/ui/macros/lint-trailing-macro-call.rs
+++ b/tests/ui/macros/lint-trailing-macro-call.rs
@@ -1,12 +1,10 @@
-//@ check-pass
-//
 // Ensures that we properly lint
 // a removed 'expression' resulting from a macro
 // in trailing expression position
 
 macro_rules! expand_it {
     () => {
-        #[cfg(false)] 25; //~  WARN trailing semicolon in macro
+        #[cfg(false)] 25; //~  ERROR trailing semicolon in macro
                           //~| WARN this was previously
     }
 }
diff --git a/tests/ui/macros/lint-trailing-macro-call.stderr b/tests/ui/macros/lint-trailing-macro-call.stderr
index 223b85e112e..3fd1ea81345 100644
--- a/tests/ui/macros/lint-trailing-macro-call.stderr
+++ b/tests/ui/macros/lint-trailing-macro-call.stderr
@@ -1,5 +1,5 @@
-warning: trailing semicolon in macro used in expression position
-  --> $DIR/lint-trailing-macro-call.rs:9:25
+error: trailing semicolon in macro used in expression position
+  --> $DIR/lint-trailing-macro-call.rs:7:25
    |
 LL |         #[cfg(false)] 25;
    |                         ^
@@ -11,14 +11,14 @@ LL |     expand_it!()
    = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
    = note: macro invocations at the end of a block are treated as expressions
    = note: to ignore the value produced by the macro, add a semicolon after the invocation of `expand_it`
-   = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
-   = note: this warning originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
+   = note: this error originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-warning: 1 warning emitted
+error: aborting due to 1 previous error
 
 Future incompatibility report: Future breakage diagnostic:
-warning: trailing semicolon in macro used in expression position
-  --> $DIR/lint-trailing-macro-call.rs:9:25
+error: trailing semicolon in macro used in expression position
+  --> $DIR/lint-trailing-macro-call.rs:7:25
    |
 LL |         #[cfg(false)] 25;
    |                         ^
@@ -30,6 +30,6 @@ LL |     expand_it!()
    = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
    = note: macro invocations at the end of a block are treated as expressions
    = note: to ignore the value produced by the macro, add a semicolon after the invocation of `expand_it`
-   = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
-   = note: this warning originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
+   = note: this error originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/macros/macro-context.rs b/tests/ui/macros/macro-context.rs
index a31470263a0..e1c24ba8b57 100644
--- a/tests/ui/macros/macro-context.rs
+++ b/tests/ui/macros/macro-context.rs
@@ -6,7 +6,7 @@ macro_rules! m {
                             //~| ERROR macro expansion ignores `;`
                             //~| ERROR cannot find type `i` in this scope
                             //~| ERROR cannot find value `i` in this scope
-                            //~| WARN trailing semicolon in macro
+                            //~| ERROR trailing semicolon in macro
                             //~| WARN this was previously
 }
 
diff --git a/tests/ui/macros/macro-context.stderr b/tests/ui/macros/macro-context.stderr
index 4820a43f00c..6b49c05f360 100644
--- a/tests/ui/macros/macro-context.stderr
+++ b/tests/ui/macros/macro-context.stderr
@@ -64,7 +64,7 @@ LL |     let i = m!();
    |
    = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-warning: trailing semicolon in macro used in expression position
+error: trailing semicolon in macro used in expression position
   --> $DIR/macro-context.rs:3:15
    |
 LL |     () => ( i ; typeof );
@@ -75,15 +75,15 @@ LL |     let i = m!();
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
-   = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
-   = note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
+   = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 6 previous errors; 1 warning emitted
+error: aborting due to 7 previous errors
 
 Some errors have detailed explanations: E0412, E0425.
 For more information about an error, try `rustc --explain E0412`.
 Future incompatibility report: Future breakage diagnostic:
-warning: trailing semicolon in macro used in expression position
+error: trailing semicolon in macro used in expression position
   --> $DIR/macro-context.rs:3:15
    |
 LL |     () => ( i ; typeof );
@@ -94,6 +94,6 @@ LL |     let i = m!();
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
-   = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
-   = note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
+   = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/issues/issue-9110.rs b/tests/ui/macros/macro-expansion-module-structure-9110.rs
index 47533dc43b5..b6241a7c18e 100644
--- a/tests/ui/issues/issue-9110.rs
+++ b/tests/ui/macros/macro-expansion-module-structure-9110.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9110
 //@ check-pass
 #![allow(dead_code)]
 #![allow(non_snake_case)]
diff --git a/tests/ui/issues/issue-15167.rs b/tests/ui/macros/macro-hygiene-scope-15167.rs
index a2653c10ea4..6578f898a5f 100644
--- a/tests/ui/issues/issue-15167.rs
+++ b/tests/ui/macros/macro-hygiene-scope-15167.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15167
+
 // macro f should not be able to inject a reference to 'n'.
 
 macro_rules! f { () => (n) }
diff --git a/tests/ui/issues/issue-15167.stderr b/tests/ui/macros/macro-hygiene-scope-15167.stderr
index 53082ea0ec6..58112c52df1 100644
--- a/tests/ui/issues/issue-15167.stderr
+++ b/tests/ui/macros/macro-hygiene-scope-15167.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `n` in this scope
-  --> $DIR/issue-15167.rs:3:25
+  --> $DIR/macro-hygiene-scope-15167.rs:5:25
    |
 LL | macro_rules! f { () => (n) }
    |                         ^ not found in this scope
@@ -10,7 +10,7 @@ LL |         println!("{}", f!());
    = note: this error originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `n` in this scope
-  --> $DIR/issue-15167.rs:3:25
+  --> $DIR/macro-hygiene-scope-15167.rs:5:25
    |
 LL | macro_rules! f { () => (n) }
    |                         ^ not found in this scope
@@ -21,7 +21,7 @@ LL |         println!("{}", f!());
    = note: this error originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `n` in this scope
-  --> $DIR/issue-15167.rs:3:25
+  --> $DIR/macro-hygiene-scope-15167.rs:5:25
    |
 LL | macro_rules! f { () => (n) }
    |                         ^ not found in this scope
@@ -32,7 +32,7 @@ LL |         println!("{}", f!());
    = note: this error originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `n` in this scope
-  --> $DIR/issue-15167.rs:3:25
+  --> $DIR/macro-hygiene-scope-15167.rs:5:25
    |
 LL | macro_rules! f { () => (n) }
    |                         ^ not found in this scope
diff --git a/tests/ui/macros/macro-in-expression-context.fixed b/tests/ui/macros/macro-in-expression-context.fixed
index 7c830707ffd..52e1b429e48 100644
--- a/tests/ui/macros/macro-in-expression-context.fixed
+++ b/tests/ui/macros/macro-in-expression-context.fixed
@@ -3,12 +3,12 @@
 macro_rules! foo {
     () => {
         assert_eq!("A", "A");
-        //~^ WARN trailing semicolon in macro
+        //~^ ERROR trailing semicolon in macro
         //~| WARN this was previously
         //~| NOTE macro invocations at the end of a block
         //~| NOTE to ignore the value produced by the macro
         //~| NOTE for more information
-        //~| NOTE `#[warn(semicolon_in_expressions_from_macros)]` on by default
+        //~| NOTE `#[deny(semicolon_in_expressions_from_macros)]` on by default
         assert_eq!("B", "B");
     }
     //~^^ ERROR macro expansion ignores `assert_eq` and any tokens following
diff --git a/tests/ui/macros/macro-in-expression-context.rs b/tests/ui/macros/macro-in-expression-context.rs
index da95017aa5f..5c560e78dad 100644
--- a/tests/ui/macros/macro-in-expression-context.rs
+++ b/tests/ui/macros/macro-in-expression-context.rs
@@ -3,12 +3,12 @@
 macro_rules! foo {
     () => {
         assert_eq!("A", "A");
-        //~^ WARN trailing semicolon in macro
+        //~^ ERROR trailing semicolon in macro
         //~| WARN this was previously
         //~| NOTE macro invocations at the end of a block
         //~| NOTE to ignore the value produced by the macro
         //~| NOTE for more information
-        //~| NOTE `#[warn(semicolon_in_expressions_from_macros)]` on by default
+        //~| NOTE `#[deny(semicolon_in_expressions_from_macros)]` on by default
         assert_eq!("B", "B");
     }
     //~^^ ERROR macro expansion ignores `assert_eq` and any tokens following
diff --git a/tests/ui/macros/macro-in-expression-context.stderr b/tests/ui/macros/macro-in-expression-context.stderr
index 43419f2678c..b04348d7010 100644
--- a/tests/ui/macros/macro-in-expression-context.stderr
+++ b/tests/ui/macros/macro-in-expression-context.stderr
@@ -13,7 +13,7 @@ help: you might be missing a semicolon here
 LL |     foo!();
    |           +
 
-warning: trailing semicolon in macro used in expression position
+error: trailing semicolon in macro used in expression position
   --> $DIR/macro-in-expression-context.rs:5:29
    |
 LL |         assert_eq!("A", "A");
@@ -26,13 +26,13 @@ LL |     foo!()
    = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
    = note: macro invocations at the end of a block are treated as expressions
    = note: to ignore the value produced by the macro, add a semicolon after the invocation of `foo`
-   = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
-   = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
+   = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 2 previous errors
 
 Future incompatibility report: Future breakage diagnostic:
-warning: trailing semicolon in macro used in expression position
+error: trailing semicolon in macro used in expression position
   --> $DIR/macro-in-expression-context.rs:5:29
    |
 LL |         assert_eq!("A", "A");
@@ -45,6 +45,6 @@ LL |     foo!()
    = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
    = note: macro invocations at the end of a block are treated as expressions
    = note: to ignore the value produced by the macro, add a semicolon after the invocation of `foo`
-   = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
-   = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
+   = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/macros/macro-inner-attributes.stderr b/tests/ui/macros/macro-inner-attributes.stderr
index d74b64db5ac..3c043c38abb 100644
--- a/tests/ui/macros/macro-inner-attributes.stderr
+++ b/tests/ui/macros/macro-inner-attributes.stderr
@@ -4,6 +4,13 @@ error[E0433]: failed to resolve: use of unresolved module or unlinked crate `a`
 LL |     a::bar();
    |     ^ use of unresolved module or unlinked crate `a`
    |
+note: found an item that was configured out
+  --> $DIR/macro-inner-attributes.rs:7:7
+   |
+LL | test!(a,
+   |       ^
+LL |       #[cfg(false)],
+   |             ----- the item is gated here
 help: there is a crate or module with a similar name
    |
 LL -     a::bar();
diff --git a/tests/ui/issues/issue-9737.rs b/tests/ui/macros/macro-invocation-with-variable-in-scope-9737.rs
index a8a17e58dd6..957c2e3f103 100644
--- a/tests/ui/issues/issue-9737.rs
+++ b/tests/ui/macros/macro-invocation-with-variable-in-scope-9737.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9737
 //@ run-pass
 #![allow(unused_variables)]
 macro_rules! f {
diff --git a/tests/ui/macros/macro-outer-attributes.stderr b/tests/ui/macros/macro-outer-attributes.stderr
index 9215754d4bb..4696bb774e3 100644
--- a/tests/ui/macros/macro-outer-attributes.stderr
+++ b/tests/ui/macros/macro-outer-attributes.stderr
@@ -7,13 +7,10 @@ LL |     a::bar();
 note: found an item that was configured out
   --> $DIR/macro-outer-attributes.rs:9:14
    |
+LL |       #[cfg(false)],
+   |             ----- the item is gated here
 LL |       pub fn bar() { });
    |              ^^^
-note: the item is gated here
-  --> $DIR/macro-outer-attributes.rs:8:13
-   |
-LL |       #[cfg(false)],
-   |             ^^^^^
 help: consider importing this function
    |
 LL + use b::bar;
diff --git a/tests/ui/macros/macro-rules-as-derive-or-attr-issue-132928.stderr b/tests/ui/macros/macro-rules-as-derive-or-attr-issue-132928.stderr
index e5b913b208d..77f8bef83a4 100644
--- a/tests/ui/macros/macro-rules-as-derive-or-attr-issue-132928.stderr
+++ b/tests/ui/macros/macro-rules-as-derive-or-attr-issue-132928.stderr
@@ -11,7 +11,7 @@ error: cannot find attribute `sample` in this scope
   --> $DIR/macro-rules-as-derive-or-attr-issue-132928.rs:5:3
    |
 LL | macro_rules! sample { () => {} }
-   |              ------ `sample` exists, but a declarative macro cannot be used as an attribute macro
+   |              ------ `sample` exists, but has no `attr` rules
 LL |
 LL | #[sample]
    |   ^^^^^^
diff --git a/tests/ui/macros/macro-rules-attr-error.rs b/tests/ui/macros/macro-rules-attr-error.rs
new file mode 100644
index 00000000000..1c8bb251e20
--- /dev/null
+++ b/tests/ui/macros/macro-rules-attr-error.rs
@@ -0,0 +1,15 @@
+#![feature(macro_attr)]
+
+macro_rules! local_attr {
+    attr() { $($body:tt)* } => {
+        compile_error!(concat!("local_attr: ", stringify!($($body)*)));
+    };
+    //~^^ ERROR: local_attr
+}
+
+fn main() {
+    #[local_attr]
+    struct S;
+
+    local_attr!(arg); //~ ERROR: macro has no rules for function-like invocation
+}
diff --git a/tests/ui/macros/macro-rules-attr-error.stderr b/tests/ui/macros/macro-rules-attr-error.stderr
new file mode 100644
index 00000000000..177b7009384
--- /dev/null
+++ b/tests/ui/macros/macro-rules-attr-error.stderr
@@ -0,0 +1,22 @@
+error: local_attr: struct S;
+  --> $DIR/macro-rules-attr-error.rs:5:9
+   |
+LL |         compile_error!(concat!("local_attr: ", stringify!($($body)*)));
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     #[local_attr]
+   |     ------------- in this attribute macro expansion
+   |
+   = note: this error originates in the attribute macro `local_attr` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: macro has no rules for function-like invocation `local_attr!`
+  --> $DIR/macro-rules-attr-error.rs:14:5
+   |
+LL | macro_rules! local_attr {
+   | ----------------------- this macro has no rules for function-like invocation
+...
+LL |     local_attr!(arg);
+   |     ^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/macros/macro-rules-attr-infinite-recursion.rs b/tests/ui/macros/macro-rules-attr-infinite-recursion.rs
new file mode 100644
index 00000000000..dc54c32cad3
--- /dev/null
+++ b/tests/ui/macros/macro-rules-attr-infinite-recursion.rs
@@ -0,0 +1,12 @@
+#![crate_type = "lib"]
+#![feature(macro_attr)]
+
+macro_rules! attr {
+    attr() { $($body:tt)* } => {
+        #[attr] $($body)*
+    };
+    //~^^ ERROR: recursion limit reached
+}
+
+#[attr]
+struct S;
diff --git a/tests/ui/macros/macro-rules-attr-infinite-recursion.stderr b/tests/ui/macros/macro-rules-attr-infinite-recursion.stderr
new file mode 100644
index 00000000000..7d9a94338f5
--- /dev/null
+++ b/tests/ui/macros/macro-rules-attr-infinite-recursion.stderr
@@ -0,0 +1,14 @@
+error: recursion limit reached while expanding `#[attr]`
+  --> $DIR/macro-rules-attr-infinite-recursion.rs:6:9
+   |
+LL |         #[attr] $($body)*
+   |         ^^^^^^^
+...
+LL | #[attr]
+   | ------- in this attribute macro expansion
+   |
+   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`macro_rules_attr_infinite_recursion`)
+   = note: this error originates in the attribute macro `attr` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/macros/macro-rules-attr-nested.rs b/tests/ui/macros/macro-rules-attr-nested.rs
new file mode 100644
index 00000000000..af5c30f00dd
--- /dev/null
+++ b/tests/ui/macros/macro-rules-attr-nested.rs
@@ -0,0 +1,24 @@
+//@ run-pass
+//@ check-run-results
+#![feature(macro_attr)]
+
+macro_rules! nest {
+    attr() { struct $name:ident; } => {
+        println!("nest");
+        #[nest(1)]
+        struct $name;
+    };
+    attr(1) { struct $name:ident; } => {
+        println!("nest(1)");
+        #[nest(2)]
+        struct $name;
+    };
+    attr(2) { struct $name:ident; } => {
+        println!("nest(2)");
+    };
+}
+
+fn main() {
+    #[nest]
+    struct S;
+}
diff --git a/tests/ui/macros/macro-rules-attr-nested.run.stdout b/tests/ui/macros/macro-rules-attr-nested.run.stdout
new file mode 100644
index 00000000000..46017f9ae08
--- /dev/null
+++ b/tests/ui/macros/macro-rules-attr-nested.run.stdout
@@ -0,0 +1,3 @@
+nest
+nest(1)
+nest(2)
diff --git a/tests/ui/macros/macro-rules-attr.rs b/tests/ui/macros/macro-rules-attr.rs
new file mode 100644
index 00000000000..1d6f09b53e1
--- /dev/null
+++ b/tests/ui/macros/macro-rules-attr.rs
@@ -0,0 +1,90 @@
+//@ run-pass
+//@ check-run-results
+#![feature(macro_attr)]
+#![warn(unused)]
+
+#[macro_export]
+macro_rules! exported_attr {
+    attr($($args:tt)*) { $($body:tt)* } => {
+        println!(
+            "exported_attr: args={:?}, body={:?}",
+            stringify!($($args)*),
+            stringify!($($body)*),
+        );
+    };
+    { $($args:tt)* } => {
+        println!("exported_attr!({:?})", stringify!($($args)*));
+    };
+    attr() {} => {
+        unused_rule();
+    };
+    attr() {} => {
+        compile_error!();
+    };
+    {} => {
+        unused_rule();
+    };
+    {} => {
+        compile_error!();
+    };
+}
+
+macro_rules! local_attr {
+    attr($($args:tt)*) { $($body:tt)* } => {
+        println!(
+            "local_attr: args={:?}, body={:?}",
+            stringify!($($args)*),
+            stringify!($($body)*),
+        );
+    };
+    { $($args:tt)* } => {
+        println!("local_attr!({:?})", stringify!($($args)*));
+    };
+    attr() {} => { //~ WARN: never used
+        unused_rule();
+    };
+    attr() {} => {
+        compile_error!();
+    };
+    {} => { //~ WARN: never used
+        unused_rule();
+    };
+    {} => {
+        compile_error!();
+    };
+}
+
+fn main() {
+    #[crate::exported_attr]
+    struct S;
+    #[::exported_attr(arguments, key = "value")]
+    fn func(_arg: u32) {}
+    #[self::exported_attr(1)]
+    #[self::exported_attr(2)]
+    struct Twice;
+
+    crate::exported_attr!();
+    crate::exported_attr!(invoked, arguments);
+
+    #[exported_attr]
+    struct S;
+    #[exported_attr(arguments, key = "value")]
+    fn func(_arg: u32) {}
+    #[exported_attr(1)]
+    #[exported_attr(2)]
+    struct Twice;
+
+    exported_attr!();
+    exported_attr!(invoked, arguments);
+
+    #[local_attr]
+    struct S;
+    #[local_attr(arguments, key = "value")]
+    fn func(_arg: u32) {}
+    #[local_attr(1)]
+    #[local_attr(2)]
+    struct Twice;
+
+    local_attr!();
+    local_attr!(invoked, arguments);
+}
diff --git a/tests/ui/macros/macro-rules-attr.run.stdout b/tests/ui/macros/macro-rules-attr.run.stdout
new file mode 100644
index 00000000000..77aa94d54f8
--- /dev/null
+++ b/tests/ui/macros/macro-rules-attr.run.stdout
@@ -0,0 +1,15 @@
+exported_attr: args="", body="struct S;"
+exported_attr: args="arguments, key = \"value\"", body="fn func(_arg: u32) {}"
+exported_attr: args="1", body="#[self::exported_attr(2)] struct Twice;"
+exported_attr!("")
+exported_attr!("invoked, arguments")
+exported_attr: args="", body="struct S;"
+exported_attr: args="arguments, key = \"value\"", body="fn func(_arg: u32) {}"
+exported_attr: args="1", body="#[exported_attr(2)] struct Twice;"
+exported_attr!("")
+exported_attr!("invoked, arguments")
+local_attr: args="", body="struct S;"
+local_attr: args="arguments, key = \"value\"", body="fn func(_arg: u32) {}"
+local_attr: args="1", body="#[local_attr(2)] struct Twice;"
+local_attr!("")
+local_attr!("invoked, arguments")
diff --git a/tests/ui/macros/macro-rules-attr.stderr b/tests/ui/macros/macro-rules-attr.stderr
new file mode 100644
index 00000000000..567664cd73d
--- /dev/null
+++ b/tests/ui/macros/macro-rules-attr.stderr
@@ -0,0 +1,21 @@
+warning: rule #3 of macro `local_attr` is never used
+  --> $DIR/macro-rules-attr.rs:43:9
+   |
+LL |     attr() {} => {
+   |         ^^ ^^
+   |
+note: the lint level is defined here
+  --> $DIR/macro-rules-attr.rs:4:9
+   |
+LL | #![warn(unused)]
+   |         ^^^^^^
+   = note: `#[warn(unused_macro_rules)]` implied by `#[warn(unused)]`
+
+warning: rule #5 of macro `local_attr` is never used
+  --> $DIR/macro-rules-attr.rs:49:5
+   |
+LL |     {} => {
+   |     ^^
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/macros/macro-use-bad-args-1.stderr b/tests/ui/macros/macro-use-bad-args-1.stderr
index 2f43d0997df..542b4ae2b7a 100644
--- a/tests/ui/macros/macro-use-bad-args-1.stderr
+++ b/tests/ui/macros/macro-use-bad-args-1.stderr
@@ -6,6 +6,7 @@ LL | #[macro_use(foo(bar))]
    |                |
    |                didn't expect any arguments here
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/macros-by-example.html#the-macro_use-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[macro_use(foo(bar))]
diff --git a/tests/ui/macros/macro-use-bad-args-2.stderr b/tests/ui/macros/macro-use-bad-args-2.stderr
index d7b03c93588..2db9ffe50b0 100644
--- a/tests/ui/macros/macro-use-bad-args-2.stderr
+++ b/tests/ui/macros/macro-use-bad-args-2.stderr
@@ -6,6 +6,7 @@ LL | #[macro_use(foo="bar")]
    |                |
    |                didn't expect any arguments here
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/macros-by-example.html#the-macro_use-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[macro_use(foo="bar")]
diff --git a/tests/ui/issues/issue-25386.rs b/tests/ui/macros/private-struct-member-macro-access-25386.rs
index b26cc77680d..88e5a22a699 100644
--- a/tests/ui/issues/issue-25386.rs
+++ b/tests/ui/macros/private-struct-member-macro-access-25386.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/25386
 mod stuff {
     pub struct Item {
         c_object: Box<CObj>,
diff --git a/tests/ui/issues/issue-25386.stderr b/tests/ui/macros/private-struct-member-macro-access-25386.stderr
index 720b77866a5..d02a41848f4 100644
--- a/tests/ui/issues/issue-25386.stderr
+++ b/tests/ui/macros/private-struct-member-macro-access-25386.stderr
@@ -1,5 +1,5 @@
 error[E0616]: field `c_object` of struct `Item` is private
-  --> $DIR/issue-25386.rs:19:16
+  --> $DIR/private-struct-member-macro-access-25386.rs:20:16
    |
 LL |         (*$var.c_object).$member.is_some()
    |                ^^^^^^^^ private field
diff --git a/tests/ui/malformed/malformed-regressions.rs b/tests/ui/malformed/malformed-regressions.rs
index f0a7aac59c1..99f0fc904a9 100644
--- a/tests/ui/malformed/malformed-regressions.rs
+++ b/tests/ui/malformed/malformed-regressions.rs
@@ -4,9 +4,9 @@
 //~^ WARN this was previously accepted
 #[inline = ""] //~ ERROR valid forms for the attribute are
 //~^ WARN this was previously accepted
-#[link] //~ ERROR attribute must be of the form
+#[link] //~ ERROR valid forms for the attribute are
 //~^ WARN this was previously accepted
-#[link = ""] //~ ERROR attribute must be of the form
+#[link = ""] //~ ERROR valid forms for the attribute are
 //~^ WARN this was previously accepted
 
 fn main() {}
diff --git a/tests/ui/malformed/malformed-regressions.stderr b/tests/ui/malformed/malformed-regressions.stderr
index 8c22919a1c2..4a00c9b4a7d 100644
--- a/tests/ui/malformed/malformed-regressions.stderr
+++ b/tests/ui/malformed/malformed-regressions.stderr
@@ -1,4 +1,4 @@
-error: valid forms for the attribute are `#[doc(hidden|inline|...)]` and `#[doc = "string"]`
+error: valid forms for the attribute are `#[doc(hidden)]`, `#[doc(inline)]`, and `#[doc = "string"]`
   --> $DIR/malformed-regressions.rs:1:1
    |
 LL | #[doc]
@@ -6,9 +6,10 @@ LL | #[doc]
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html>
    = note: `#[deny(ill_formed_attribute_input)]` on by default
 
-error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
+error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]`
   --> $DIR/malformed-regressions.rs:7:1
    |
 LL | #[link]
@@ -16,8 +17,9 @@ LL | #[link]
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
 
-error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
+error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]`
   --> $DIR/malformed-regressions.rs:9:1
    |
 LL | #[link = ""]
@@ -25,6 +27,7 @@ LL | #[link = ""]
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
 
 error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
   --> $DIR/malformed-regressions.rs:3:1
@@ -35,7 +38,7 @@ LL | #[ignore()]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
 
-error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
+error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
   --> $DIR/malformed-regressions.rs:5:1
    |
 LL | #[inline = ""]
@@ -46,3 +49,61 @@ LL | #[inline = ""]
 
 error: aborting due to 5 previous errors
 
+Future incompatibility report: Future breakage diagnostic:
+error: valid forms for the attribute are `#[doc(hidden)]`, `#[doc(inline)]`, and `#[doc = "string"]`
+  --> $DIR/malformed-regressions.rs:1:1
+   |
+LL | #[doc]
+   | ^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
+Future breakage diagnostic:
+error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]`
+  --> $DIR/malformed-regressions.rs:7:1
+   |
+LL | #[link]
+   | ^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
+Future breakage diagnostic:
+error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]`
+  --> $DIR/malformed-regressions.rs:9:1
+   |
+LL | #[link = ""]
+   | ^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
+Future breakage diagnostic:
+error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
+  --> $DIR/malformed-regressions.rs:3:1
+   |
+LL | #[ignore()]
+   | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
+Future breakage diagnostic:
+error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
+  --> $DIR/malformed-regressions.rs:5:1
+   |
+LL | #[inline = ""]
+   | ^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
diff --git a/tests/ui/issues/issue-14865.rs b/tests/ui/match/guard-pattern-ordering-14865.rs
index e0f8bfe9428..a789599c566 100644
--- a/tests/ui/issues/issue-14865.rs
+++ b/tests/ui/match/guard-pattern-ordering-14865.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14865
+
 //@ run-pass
 #![allow(dead_code)]
 
diff --git a/tests/ui/issues/issue-13867.rs b/tests/ui/match/multiple-refutable-patterns-13867.rs
index ad7d6d66393..a308219a9b2 100644
--- a/tests/ui/issues/issue-13867.rs
+++ b/tests/ui/match/multiple-refutable-patterns-13867.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13867
+
 //@ run-pass
 // Test that codegen works correctly when there are multiple refutable
 // patterns in match expression.
diff --git a/tests/ui/issues/issue-11844.rs b/tests/ui/match/option-result-mismatch-11844.rs
index f974a470296..24a2004134d 100644
--- a/tests/ui/issues/issue-11844.rs
+++ b/tests/ui/match/option-result-mismatch-11844.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/11844
+
 fn main() {
     let a = Some(Box::new(1));
     match a {
diff --git a/tests/ui/issues/issue-11844.stderr b/tests/ui/match/option-result-mismatch-11844.stderr
index 9ff66eaef49..8a84b7b8a48 100644
--- a/tests/ui/issues/issue-11844.stderr
+++ b/tests/ui/match/option-result-mismatch-11844.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-11844.rs:4:9
+  --> $DIR/option-result-mismatch-11844.rs:6:9
    |
 LL |     match a {
    |           - this expression has type `Option<Box<{integer}>>`
diff --git a/tests/ui/issues/issue-13466.rs b/tests/ui/match/option-result-type-param-mismatch-13466.rs
index 78ce4c1d2f6..05dbdfdee0e 100644
--- a/tests/ui/issues/issue-13466.rs
+++ b/tests/ui/match/option-result-type-param-mismatch-13466.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13466
+
 // Regression test for #13466
 
 //@ dont-require-annotations: NOTE
diff --git a/tests/ui/issues/issue-13466.stderr b/tests/ui/match/option-result-type-param-mismatch-13466.stderr
index 68a555a1626..b0cf1591f5e 100644
--- a/tests/ui/issues/issue-13466.stderr
+++ b/tests/ui/match/option-result-type-param-mismatch-13466.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-13466.rs:10:9
+  --> $DIR/option-result-type-param-mismatch-13466.rs:12:9
    |
 LL |     let _x: usize = match Some(1) {
    |                           ------- this expression has type `Option<{integer}>`
@@ -10,7 +10,7 @@ LL |         Ok(u) => u,
               found enum `Result<_, _>`
 
 error[E0308]: mismatched types
-  --> $DIR/issue-13466.rs:16:9
+  --> $DIR/option-result-type-param-mismatch-13466.rs:18:9
    |
 LL |     let _x: usize = match Some(1) {
    |                           ------- this expression has type `Option<{integer}>`
diff --git a/tests/ui/issues/issue-13027.rs b/tests/ui/match/overeager-sub-match-pruning-13027.rs
index fbd1d75067b..c4feb697f7d 100644
--- a/tests/ui/issues/issue-13027.rs
+++ b/tests/ui/match/overeager-sub-match-pruning-13027.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13027
+
 //@ run-pass
 
 // Tests that match expression handles overlapped literal and range
diff --git a/tests/ui/issues/issue-12567.rs b/tests/ui/match/slice-move-out-error-12567.rs
index 1b2a37de475..3f9bf9c76cf 100644
--- a/tests/ui/issues/issue-12567.rs
+++ b/tests/ui/match/slice-move-out-error-12567.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/12567
+
 fn match_vecs<'a, T>(l1: &'a [T], l2: &'a [T]) {
     match (l1, l2) {
     //~^ ERROR: cannot move out of type `[T]`, a non-copy slice
diff --git a/tests/ui/issues/issue-12567.stderr b/tests/ui/match/slice-move-out-error-12567.stderr
index 0b19299ece3..ab5377d4701 100644
--- a/tests/ui/issues/issue-12567.stderr
+++ b/tests/ui/match/slice-move-out-error-12567.stderr
@@ -1,5 +1,5 @@
 error[E0508]: cannot move out of type `[T]`, a non-copy slice
-  --> $DIR/issue-12567.rs:2:11
+  --> $DIR/slice-move-out-error-12567.rs:4:11
    |
 LL |     match (l1, l2) {
    |           ^^^^^^^^ cannot move out of here
@@ -23,7 +23,7 @@ LL +         (&[hd1, ..], [hd2, ..])
    |
 
 error[E0508]: cannot move out of type `[T]`, a non-copy slice
-  --> $DIR/issue-12567.rs:2:11
+  --> $DIR/slice-move-out-error-12567.rs:4:11
    |
 LL |     match (l1, l2) {
    |           ^^^^^^^^ cannot move out of here
diff --git a/tests/ui/issues/issue-12285.rs b/tests/ui/match/struct-reference-patterns-12285.rs
index fe199147128..246e230b0de 100644
--- a/tests/ui/issues/issue-12285.rs
+++ b/tests/ui/match/struct-reference-patterns-12285.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/12285
+
 //@ run-pass
 
 struct S;
diff --git a/tests/ui/issues/issue-14393.rs b/tests/ui/match/tuple-usize-pattern-14393.rs
index 69c3fc15d31..12d58d4c059 100644
--- a/tests/ui/issues/issue-14393.rs
+++ b/tests/ui/match/tuple-usize-pattern-14393.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14393
+
 //@ run-pass
 
 fn main() {
diff --git a/tests/ui/issues/issue-19100.fixed b/tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.fixed
index 1162490048c..40c92322519 100644
--- a/tests/ui/issues/issue-19100.fixed
+++ b/tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.fixed
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/19100
 //@ run-rustfix
 
 #![allow(non_snake_case)]
diff --git a/tests/ui/issues/issue-19100.rs b/tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.rs
index fefed0daa72..9ef6fd77b50 100644
--- a/tests/ui/issues/issue-19100.rs
+++ b/tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/19100
 //@ run-rustfix
 
 #![allow(non_snake_case)]
diff --git a/tests/ui/issues/issue-19100.stderr b/tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.stderr
index ebbf083b7de..7356a4a003b 100644
--- a/tests/ui/issues/issue-19100.stderr
+++ b/tests/ui/match/unreachable-pattern-if-variant-not-imported-19100.stderr
@@ -1,5 +1,5 @@
 error[E0170]: pattern binding `Bar` is named the same as one of the variants of the type `Foo`
-  --> $DIR/issue-19100.rs:17:1
+  --> $DIR/unreachable-pattern-if-variant-not-imported-19100.rs:18:1
    |
 LL | Bar if true
    | ^^^ help: to match on the variant, qualify the path: `Foo::Bar`
@@ -7,7 +7,7 @@ LL | Bar if true
    = note: `#[deny(bindings_with_variant_name)]` on by default
 
 error[E0170]: pattern binding `Baz` is named the same as one of the variants of the type `Foo`
-  --> $DIR/issue-19100.rs:21:1
+  --> $DIR/unreachable-pattern-if-variant-not-imported-19100.rs:22:1
    |
 LL | Baz if false
    | ^^^ help: to match on the variant, qualify the path: `Foo::Baz`
diff --git a/tests/ui/methods/call_method_unknown_referent.rs b/tests/ui/methods/call_method_unknown_referent.rs
index b01e2d80f7f..b26ecc74175 100644
--- a/tests/ui/methods/call_method_unknown_referent.rs
+++ b/tests/ui/methods/call_method_unknown_referent.rs
@@ -44,5 +44,5 @@ fn main() {
     // our resolution logic needs to be able to call methods such as foo()
     // on the outer type even if the inner type is ambiguous.
     let _c = (ptr as SmartPtr<_>).read();
-    //~^ ERROR no method named `read` found for struct `SmartPtr`
+    //~^ ERROR no method named `read` found for struct `SmartPtr<T>`
 }
diff --git a/tests/ui/methods/call_method_unknown_referent.stderr b/tests/ui/methods/call_method_unknown_referent.stderr
index 748b02b52b5..5d6974a00c6 100644
--- a/tests/ui/methods/call_method_unknown_referent.stderr
+++ b/tests/ui/methods/call_method_unknown_referent.stderr
@@ -10,7 +10,7 @@ error[E0282]: type annotations needed
 LL |     let _b = (rc as std::rc::Rc<_>).read();
    |                                     ^^^^ cannot infer type
 
-error[E0599]: no method named `read` found for struct `SmartPtr` in the current scope
+error[E0599]: no method named `read` found for struct `SmartPtr<T>` in the current scope
   --> $DIR/call_method_unknown_referent.rs:46:35
    |
 LL | struct SmartPtr<T>(T);
diff --git a/tests/ui/methods/inherent-bound-in-probe.rs b/tests/ui/methods/inherent-bound-in-probe.rs
index 4add93e808d..39b4ba983e4 100644
--- a/tests/ui/methods/inherent-bound-in-probe.rs
+++ b/tests/ui/methods/inherent-bound-in-probe.rs
@@ -1,3 +1,4 @@
+//@ compile-flags: -Zwrite-long-types-to-disk=yes
 // Fixes #110131
 //
 // The issue is that we were constructing an `ImplDerived` cause code for the
diff --git a/tests/ui/methods/inherent-bound-in-probe.stderr b/tests/ui/methods/inherent-bound-in-probe.stderr
index 77aed390c9a..b7751ca4714 100644
--- a/tests/ui/methods/inherent-bound-in-probe.stderr
+++ b/tests/ui/methods/inherent-bound-in-probe.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `Helper<'a, T>` is not an iterator
-  --> $DIR/inherent-bound-in-probe.rs:38:21
+  --> $DIR/inherent-bound-in-probe.rs:39:21
    |
 LL |     type IntoIter = Helper<'a, T>;
    |                     ^^^^^^^^^^^^^ `Helper<'a, T>` is not an iterator
@@ -9,14 +9,14 @@ note: required by a bound in `std::iter::IntoIterator::IntoIter`
   --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
 
 error[E0275]: overflow evaluating the requirement `&_: IntoIterator`
-  --> $DIR/inherent-bound-in-probe.rs:42:9
+  --> $DIR/inherent-bound-in-probe.rs:43:9
    |
 LL |         Helper::new(&self.0)
    |         ^^^^^^
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`inherent_bound_in_probe`)
 note: required for `&BitReaderWrapper<_>` to implement `IntoIterator`
-  --> $DIR/inherent-bound-in-probe.rs:32:13
+  --> $DIR/inherent-bound-in-probe.rs:33:13
    |
 LL | impl<'a, T> IntoIterator for &'a BitReaderWrapper<T>
    |             ^^^^^^^^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^
@@ -24,15 +24,17 @@ LL | where
 LL |     &'a T: IntoIterator<Item = &'a u8>,
    |                         ------------- unsatisfied trait bound introduced here
    = note: 126 redundant requirements hidden
-   = note: required for `&BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<_>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `IntoIterator`
+   = note: required for `&BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<...>>>` to implement `IntoIterator`
 note: required by a bound in `Helper`
-  --> $DIR/inherent-bound-in-probe.rs:16:12
+  --> $DIR/inherent-bound-in-probe.rs:17:12
    |
 LL | struct Helper<'a, T>
    |        ------ required by a bound in this struct
 LL | where
 LL |     &'a T: IntoIterator<Item = &'a u8>,
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Helper`
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/inherent-bound-in-probe.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/methods/issues/issue-105732.stderr b/tests/ui/methods/issues/issue-105732.stderr
index 6244f983550..93ce695f27b 100644
--- a/tests/ui/methods/issues/issue-105732.stderr
+++ b/tests/ui/methods/issues/issue-105732.stderr
@@ -4,7 +4,7 @@ error[E0380]: auto traits cannot have associated items
 LL | auto trait Foo {
    |            --- auto traits cannot have associated items
 LL |     fn g(&self);
-   |     ---^-------- help: remove these associated items
+   |        ^
 
 error[E0599]: no method named `g` found for reference `&Self` in the current scope
   --> $DIR/issue-105732.rs:10:14
diff --git a/tests/ui/methods/method-not-found-generic-arg-elision.stderr b/tests/ui/methods/method-not-found-generic-arg-elision.stderr
index 8429c3aebac..75fabc27b0f 100644
--- a/tests/ui/methods/method-not-found-generic-arg-elision.stderr
+++ b/tests/ui/methods/method-not-found-generic-arg-elision.stderr
@@ -10,7 +10,7 @@ LL |     let d = point_i32.distance();
    = note: the method was found for
            - `Point<f64>`
 
-error[E0599]: no method named `other` found for struct `Point` in the current scope
+error[E0599]: no method named `other` found for struct `Point<T>` in the current scope
   --> $DIR/method-not-found-generic-arg-elision.rs:84:23
    |
 LL | struct Point<T> {
@@ -19,7 +19,7 @@ LL | struct Point<T> {
 LL |     let d = point_i32.other();
    |                       ^^^^^ method not found in `Point<i32>`
 
-error[E0599]: no method named `extend` found for struct `Map` in the current scope
+error[E0599]: no method named `extend` found for struct `Map<I, F>` in the current scope
   --> $DIR/method-not-found-generic-arg-elision.rs:87:67
    |
 LL |     v.iter().map(Box::new(|x| x * x) as Box<dyn Fn(&i32) -> i32>).extend(std::iter::once(100));
@@ -41,7 +41,7 @@ LL |     wrapper.method();
            - `Wrapper<i8>`
            and 2 more types
 
-error[E0599]: no method named `other` found for struct `Wrapper` in the current scope
+error[E0599]: no method named `other` found for struct `Wrapper<T>` in the current scope
   --> $DIR/method-not-found-generic-arg-elision.rs:92:13
    |
 LL | struct Wrapper<T>(T);
@@ -64,7 +64,7 @@ LL |     wrapper.method();
            - `Wrapper2<'a, i32, C>`
            - `Wrapper2<'a, i8, C>`
 
-error[E0599]: no method named `other` found for struct `Wrapper2` in the current scope
+error[E0599]: no method named `other` found for struct `Wrapper2<'a, T, C>` in the current scope
   --> $DIR/method-not-found-generic-arg-elision.rs:98:13
    |
 LL | struct Wrapper2<'a, T, const C: usize> {
diff --git a/tests/ui/methods/probe-error-on-infinite-deref.rs b/tests/ui/methods/probe-error-on-infinite-deref.rs
index 85c1c0c09c1..196d026438b 100644
--- a/tests/ui/methods/probe-error-on-infinite-deref.rs
+++ b/tests/ui/methods/probe-error-on-infinite-deref.rs
@@ -1,3 +1,4 @@
+//@ compile-flags: -Zwrite-long-types-to-disk=yes
 use std::ops::Deref;
 
 // Make sure that method probe error reporting doesn't get too tangled up
diff --git a/tests/ui/methods/probe-error-on-infinite-deref.stderr b/tests/ui/methods/probe-error-on-infinite-deref.stderr
index 57a9ca2eaa8..6148b001163 100644
--- a/tests/ui/methods/probe-error-on-infinite-deref.stderr
+++ b/tests/ui/methods/probe-error-on-infinite-deref.stderr
@@ -1,13 +1,15 @@
-error[E0055]: reached the recursion limit while auto-dereferencing `Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<{integer}>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
-  --> $DIR/probe-error-on-infinite-deref.rs:13:13
+error[E0055]: reached the recursion limit while auto-dereferencing `Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<Wrap<...>>>>>>>>>>>`
+  --> $DIR/probe-error-on-infinite-deref.rs:14:13
    |
 LL |     Wrap(1).lmao();
    |             ^^^^ deref recursion limit reached
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`probe_error_on_infinite_deref`)
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/probe-error-on-infinite-deref.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error[E0599]: no method named `lmao` found for struct `Wrap<{integer}>` in the current scope
-  --> $DIR/probe-error-on-infinite-deref.rs:13:13
+  --> $DIR/probe-error-on-infinite-deref.rs:14:13
    |
 LL | struct Wrap<T>(T);
    | -------------- method `lmao` not found for this struct
diff --git a/tests/ui/issues/issue-22684.rs b/tests/ui/methods/trait-method-resolution-over-inherent-22684.rs
index a5b042706ed..9f317b576e6 100644
--- a/tests/ui/issues/issue-22684.rs
+++ b/tests/ui/methods/trait-method-resolution-over-inherent-22684.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/22684
 mod foo {
     pub struct Foo;
     impl Foo {
diff --git a/tests/ui/issues/issue-22684.stderr b/tests/ui/methods/trait-method-resolution-over-inherent-22684.stderr
index e2ca54caeac..0ab7701fa9e 100644
--- a/tests/ui/issues/issue-22684.stderr
+++ b/tests/ui/methods/trait-method-resolution-over-inherent-22684.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-22684.rs:17:17
+  --> $DIR/trait-method-resolution-over-inherent-22684.rs:18:17
    |
 LL |     let _: () = foo::Foo.bar();
    |            --   ^^^^^^^^^^^^^^ expected `()`, found `bool`
diff --git a/tests/ui/methods/untrimmed-path-type.stderr b/tests/ui/methods/untrimmed-path-type.stderr
index 1f3101ff4e7..ee07e2daa1e 100644
--- a/tests/ui/methods/untrimmed-path-type.stderr
+++ b/tests/ui/methods/untrimmed-path-type.stderr
@@ -1,4 +1,4 @@
-error[E0599]: no method named `unknown` found for enum `Result` in the current scope
+error[E0599]: no method named `unknown` found for enum `Result<T, E>` in the current scope
   --> $DIR/untrimmed-path-type.rs:5:11
    |
 LL |    meow().unknown();
diff --git a/tests/ui/mir/lint/storage-live.rs b/tests/ui/mir/lint/storage-live.rs
index 252e3b8456c..32bd32754dd 100644
--- a/tests/ui/mir/lint/storage-live.rs
+++ b/tests/ui/mir/lint/storage-live.rs
@@ -1,7 +1,7 @@
 //@ compile-flags: -Zlint-mir -Ztreat-err-as-bug
 //@ failure-status: 101
 //@ normalize-stderr: "note: .*\n\n" -> ""
-//@ normalize-stderr: "thread 'rustc' panicked.*\n" -> ""
+//@ normalize-stderr: "thread 'rustc'.*panicked.*\n" -> ""
 //@ normalize-stderr: "storage_live\[....\]" -> "storage_live[HASH]"
 //@ normalize-stderr: "(delayed at [^:]+):\d+:\d+ - " -> "$1:LL:CC - "
 //@ rustc-env:RUST_BACKTRACE=0
diff --git a/tests/ui/issues/issue-24352.rs b/tests/ui/mismatched_types/float-integer-subtraction-error-24352.rs
index 5c8246d179f..eb632398c62 100644
--- a/tests/ui/issues/issue-24352.rs
+++ b/tests/ui/mismatched_types/float-integer-subtraction-error-24352.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/24352
 fn main() {
     1.0f64 - 1.0;
     1.0f64 - 1 //~ ERROR E0277
diff --git a/tests/ui/issues/issue-24352.stderr b/tests/ui/mismatched_types/float-integer-subtraction-error-24352.stderr
index 3e0f812b5c7..7dc1fa777fc 100644
--- a/tests/ui/issues/issue-24352.stderr
+++ b/tests/ui/mismatched_types/float-integer-subtraction-error-24352.stderr
@@ -1,5 +1,5 @@
 error[E0277]: cannot subtract `{integer}` from `f64`
-  --> $DIR/issue-24352.rs:3:12
+  --> $DIR/float-integer-subtraction-error-24352.rs:4:12
    |
 LL |     1.0f64 - 1
    |            ^ no implementation for `f64 - {integer}`
diff --git a/tests/ui/issues/issue-50585.rs b/tests/ui/mismatched_types/for-loop-in-vec-type-mismatchrs-50585.rs
index ca2ece8d53b..4abef0bee81 100644
--- a/tests/ui/issues/issue-50585.rs
+++ b/tests/ui/mismatched_types/for-loop-in-vec-type-mismatchrs-50585.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/50585
 fn main() {
     |y: Vec<[(); for x in 0..2 {}]>| {};
     //~^ ERROR mismatched types
diff --git a/tests/ui/issues/issue-50585.stderr b/tests/ui/mismatched_types/for-loop-in-vec-type-mismatchrs-50585.stderr
index 7e83ea35fbb..d60d97a02ab 100644
--- a/tests/ui/issues/issue-50585.stderr
+++ b/tests/ui/mismatched_types/for-loop-in-vec-type-mismatchrs-50585.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-50585.rs:2:18
+  --> $DIR/for-loop-in-vec-type-mismatchrs-50585.rs:3:18
    |
 LL |     |y: Vec<[(); for x in 0..2 {}]>| {};
    |                  ^^^^^^^^^^^^^^^^ expected `usize`, found `()`
diff --git a/tests/ui/issues/issue-92741.fixed b/tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.fixed
index cb37d25273f..c165779e402 100644
--- a/tests/ui/issues/issue-92741.fixed
+++ b/tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.fixed
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/92741
 //@ run-rustfix
 fn main() {}
 fn _foo() -> bool {
diff --git a/tests/ui/issues/issue-92741.rs b/tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.rs
index 1c5d5810a57..b3fa5f77308 100644
--- a/tests/ui/issues/issue-92741.rs
+++ b/tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/92741
 //@ run-rustfix
 fn main() {}
 fn _foo() -> bool {
diff --git a/tests/ui/issues/issue-92741.stderr b/tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.stderr
index 49315e7a8bf..60917d9a63e 100644
--- a/tests/ui/issues/issue-92741.stderr
+++ b/tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-92741.rs:4:5
+  --> $DIR/newlines-in-diagnostic-fix-suggestions-92741.rs:5:5
    |
 LL |   fn _foo() -> bool {
    |                ---- expected `bool` because of return type
@@ -15,7 +15,7 @@ LL -     mut
    |
 
 error[E0308]: mismatched types
-  --> $DIR/issue-92741.rs:10:5
+  --> $DIR/newlines-in-diagnostic-fix-suggestions-92741.rs:11:5
    |
 LL |   fn _bar() -> bool {
    |                ---- expected `bool` because of return type
@@ -31,7 +31,7 @@ LL +     if true { true } else { false }
    |
 
 error[E0308]: mismatched types
-  --> $DIR/issue-92741.rs:15:5
+  --> $DIR/newlines-in-diagnostic-fix-suggestions-92741.rs:16:5
    |
 LL |   fn _baz() -> bool {
    |                ---- expected `bool` because of return type
diff --git a/tests/ui/issues/issue-48364.rs b/tests/ui/mismatched_types/starts-with-stringify-type-mismatch-48364.rs
index 14ee75e7c9c..13ba8b1e59c 100644
--- a/tests/ui/issues/issue-48364.rs
+++ b/tests/ui/mismatched_types/starts-with-stringify-type-mismatch-48364.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/48364
 fn foo() -> bool {
     b"".starts_with(stringify!(foo))
     //~^ ERROR mismatched types
diff --git a/tests/ui/issues/issue-48364.stderr b/tests/ui/mismatched_types/starts-with-stringify-type-mismatch-48364.stderr
index 74bfa1e0693..bb767d50bb0 100644
--- a/tests/ui/issues/issue-48364.stderr
+++ b/tests/ui/mismatched_types/starts-with-stringify-type-mismatch-48364.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-48364.rs:2:21
+  --> $DIR/starts-with-stringify-type-mismatch-48364.rs:3:21
    |
 LL |     b"".starts_with(stringify!(foo))
    |         ----------- ^^^^^^^^^^^^^^^ expected `&[u8]`, found `&str`
diff --git a/tests/ui/missing/missing-items/missing-type-parameter2.rs b/tests/ui/missing/missing-items/missing-type-parameter2.rs
index e9b32fb7198..772e60b1376 100644
--- a/tests/ui/missing/missing-items/missing-type-parameter2.rs
+++ b/tests/ui/missing/missing-items/missing-type-parameter2.rs
@@ -5,7 +5,7 @@ impl X<N> {}
 //~| ERROR unresolved item provided when a constant was expected
 impl<T, const A: u8 = 2> X<N> {}
 //~^ ERROR cannot find type `N` in this scope
-//~| ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+//~| ERROR defaults for generic parameters are not allowed here
 //~| ERROR unresolved item provided when a constant was expected
 
 fn foo(_: T) where T: Send {}
diff --git a/tests/ui/missing/missing-items/missing-type-parameter2.stderr b/tests/ui/missing/missing-items/missing-type-parameter2.stderr
index f6418de20b6..3c132e769ea 100644
--- a/tests/ui/missing/missing-items/missing-type-parameter2.stderr
+++ b/tests/ui/missing/missing-items/missing-type-parameter2.stderr
@@ -103,7 +103,7 @@ help: if this generic argument was intended as a const parameter, surround it wi
 LL | impl X<{ N }> {}
    |        +   +
 
-error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/missing-type-parameter2.rs:6:9
    |
 LL | impl<T, const A: u8 = 2> X<N> {}
diff --git a/tests/ui/issues/issue-32797.rs b/tests/ui/modules/circular-module-imports-32797.rs
index 470d661cb28..5a2f2990795 100644
--- a/tests/ui/issues/issue-32797.rs
+++ b/tests/ui/modules/circular-module-imports-32797.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/32797
 //@ check-pass
 
 pub use bar::*;
diff --git a/tests/ui/modules/path-invalid-form.stderr b/tests/ui/modules/path-invalid-form.stderr
index e8ded1343f7..4e9a62fa7a9 100644
--- a/tests/ui/modules/path-invalid-form.stderr
+++ b/tests/ui/modules/path-invalid-form.stderr
@@ -3,6 +3,8 @@ error: malformed `path` attribute input
    |
 LL | #[path = 123]
    | ^^^^^^^^^^^^^ help: must be of the form: `#[path = "file"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/modules.html#the-path-attribute>
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/modules/path-macro.stderr b/tests/ui/modules/path-macro.stderr
index eb02c721edd..fd93871f3a6 100644
--- a/tests/ui/modules/path-macro.stderr
+++ b/tests/ui/modules/path-macro.stderr
@@ -3,6 +3,8 @@ error: malformed `path` attribute input
    |
 LL | #[path = foo!()]
    | ^^^^^^^^^^^^^^^^ help: must be of the form: `#[path = "file"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/modules.html#the-path-attribute>
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-15571.rs b/tests/ui/moves/match-move-same-binding-15571.rs
index cf17113a282..f6d79c6d76c 100644
--- a/tests/ui/issues/issue-15571.rs
+++ b/tests/ui/moves/match-move-same-binding-15571.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15571
+
 //@ run-pass
 
 fn match_on_local() {
diff --git a/tests/ui/issues/issue-17385.rs b/tests/ui/moves/matching-partially-moved-value-17385.rs
index 7400aadb059..c50fe048bfb 100644
--- a/tests/ui/issues/issue-17385.rs
+++ b/tests/ui/moves/matching-partially-moved-value-17385.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/17385
 struct X(isize);
 
 enum Enum {
diff --git a/tests/ui/issues/issue-17385.stderr b/tests/ui/moves/matching-partially-moved-value-17385.stderr
index 3c451a859e9..906f7868bcc 100644
--- a/tests/ui/issues/issue-17385.stderr
+++ b/tests/ui/moves/matching-partially-moved-value-17385.stderr
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `foo`
-  --> $DIR/issue-17385.rs:18:5
+  --> $DIR/matching-partially-moved-value-17385.rs:19:5
    |
 LL |     let foo = X(1);
    |         --- move occurs because `foo` has type `X`, which does not implement the `Copy` trait
@@ -9,7 +9,7 @@ LL |     match foo {
    |     ^^^^^^^^^ value used here after move
    |
 note: if `X` implemented `Clone`, you could clone the value
-  --> $DIR/issue-17385.rs:1:1
+  --> $DIR/matching-partially-moved-value-17385.rs:2:1
    |
 LL | struct X(isize);
    | ^^^^^^^^ consider implementing `Clone` for this type
@@ -18,7 +18,7 @@ LL |     drop(foo);
    |          --- you could clone this value
 
 error[E0382]: use of moved value: `e`
-  --> $DIR/issue-17385.rs:25:11
+  --> $DIR/matching-partially-moved-value-17385.rs:26:11
    |
 LL |     let e = Enum::Variant2;
    |         - move occurs because `e` has type `Enum`, which does not implement the `Copy` trait
@@ -28,7 +28,7 @@ LL |     match e {
    |           ^ value used here after move
    |
 note: if `Enum` implemented `Clone`, you could clone the value
-  --> $DIR/issue-17385.rs:3:1
+  --> $DIR/matching-partially-moved-value-17385.rs:4:1
    |
 LL | enum Enum {
    | ^^^^^^^^^ consider implementing `Clone` for this type
diff --git a/tests/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr b/tests/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr
index 51d0f85c031..dfc983bf487 100644
--- a/tests/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr
+++ b/tests/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr
@@ -10,6 +10,11 @@ LL |     let _f = to_fn(|| test(i));
    |                    |
    |                    captured by this `Fn` closure
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/moves-based-on-type-move-out-of-closure-env-issue-1965.rs:3:33
+   |
+LL | fn to_fn<A:std::marker::Tuple,F:Fn<A>>(f: F) -> F { f }
+   |                                 ^^^^^
 help: consider cloning the value if the performance cost is acceptable
    |
 LL |     let _f = to_fn(|| test(i.clone()));
diff --git a/tests/ui/moves/use-correct-generic-args-in-borrow-suggest.rs b/tests/ui/moves/use-correct-generic-args-in-borrow-suggest.rs
new file mode 100644
index 00000000000..0fb0cee2013
--- /dev/null
+++ b/tests/ui/moves/use-correct-generic-args-in-borrow-suggest.rs
@@ -0,0 +1,13 @@
+//! Regression test for #145164: For normal calls, make sure the suggestion to borrow generic inputs
+//! uses the generic args from the callee's type rather than those attached to the callee's HIR
+//! node. In cases where the callee isn't an identifier expression, its HIR node won't have its
+//! generic arguments attached, which could lead to ICE when it had other generic args. In this
+//! case, the callee expression is `run.clone()`, to which `clone`'s generic arguments are attached.
+
+fn main() {
+    let value = String::new();
+    run.clone()(value, ());
+    run(value, ());
+    //~^ ERROR use of moved value: `value`
+}
+fn run<F, T: Clone>(value: T, f: F) {}
diff --git a/tests/ui/moves/use-correct-generic-args-in-borrow-suggest.stderr b/tests/ui/moves/use-correct-generic-args-in-borrow-suggest.stderr
new file mode 100644
index 00000000000..8c29bfbd290
--- /dev/null
+++ b/tests/ui/moves/use-correct-generic-args-in-borrow-suggest.stderr
@@ -0,0 +1,18 @@
+error[E0382]: use of moved value: `value`
+  --> $DIR/use-correct-generic-args-in-borrow-suggest.rs:10:9
+   |
+LL |     let value = String::new();
+   |         ----- move occurs because `value` has type `String`, which does not implement the `Copy` trait
+LL |     run.clone()(value, ());
+   |                 ----- value moved here
+LL |     run(value, ());
+   |         ^^^^^ value used here after move
+   |
+help: consider borrowing `value`
+   |
+LL |     run.clone()(&value, ());
+   |                 +
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/issues/issue-15207.rs b/tests/ui/never/never-type-method-call-15207.rs
index 356e55ac912..69cdeeabb7c 100644
--- a/tests/ui/issues/issue-15207.rs
+++ b/tests/ui/never/never-type-method-call-15207.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15207
+
 fn main() {
     loop {
         break.push(1) //~ ERROR no method named `push` found for type `!`
diff --git a/tests/ui/issues/issue-15207.stderr b/tests/ui/never/never-type-method-call-15207.stderr
index a1047e27ba2..265e7c8611d 100644
--- a/tests/ui/issues/issue-15207.stderr
+++ b/tests/ui/never/never-type-method-call-15207.stderr
@@ -1,5 +1,5 @@
 error[E0599]: no method named `push` found for type `!` in the current scope
-  --> $DIR/issue-15207.rs:3:15
+  --> $DIR/never-type-method-call-15207.rs:5:15
    |
 LL |         break.push(1)
    |               ^^^^ method not found in `!`
diff --git a/tests/ui/never_type/defaulted-never-note.fallback.stderr b/tests/ui/never_type/defaulted-never-note.fallback.stderr
index fe9a924f64a..7526a399bf1 100644
--- a/tests/ui/never_type/defaulted-never-note.fallback.stderr
+++ b/tests/ui/never_type/defaulted-never-note.fallback.stderr
@@ -8,7 +8,7 @@ LL |     foo(_x);
    |
    = help: the trait `ImplementedForUnitButNotNever` is implemented for `()`
    = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
-   = help: did you intend to use the type `()` here instead?
+   = help: you might have intended to use the type `()` here instead
 note: required by a bound in `foo`
   --> $DIR/defaulted-never-note.rs:25:11
    |
diff --git a/tests/ui/never_type/defaulted-never-note.rs b/tests/ui/never_type/defaulted-never-note.rs
index badb5d4c51d..71f0d9fa5bb 100644
--- a/tests/ui/never_type/defaulted-never-note.rs
+++ b/tests/ui/never_type/defaulted-never-note.rs
@@ -35,7 +35,7 @@ fn smeg() {
     //[fallback]~| HELP trait `ImplementedForUnitButNotNever` is implemented for `()`
     //[fallback]~| NOTE this error might have been caused
     //[fallback]~| NOTE required by a bound introduced by this call
-    //[fallback]~| HELP did you intend
+    //[fallback]~| HELP you might have intended to use the type `()`
 }
 
 fn main() {
diff --git a/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr b/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr
index c5463814475..610c687194b 100644
--- a/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr
+++ b/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr
@@ -10,7 +10,7 @@ LL |     unconstrained_arg(return);
              ()
              i32
    = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
-   = help: did you intend to use the type `()` here instead?
+   = help: you might have intended to use the type `()` here instead
 note: required by a bound in `unconstrained_arg`
   --> $DIR/diverging-fallback-no-leak.rs:12:25
    |
diff --git a/tests/ui/issues/issue-13847.rs b/tests/ui/never_type/field-access-never-type-13847.rs
index 06a0304ae49..ff2a1c67b8c 100644
--- a/tests/ui/issues/issue-13847.rs
+++ b/tests/ui/never_type/field-access-never-type-13847.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13847
+
 fn main() {
     return.is_failure //~ ERROR no field `is_failure` on type `!`
 }
diff --git a/tests/ui/issues/issue-13847.stderr b/tests/ui/never_type/field-access-never-type-13847.stderr
index 1c1855ce94d..1db6b310f0a 100644
--- a/tests/ui/issues/issue-13847.stderr
+++ b/tests/ui/never_type/field-access-never-type-13847.stderr
@@ -1,5 +1,5 @@
 error[E0609]: no field `is_failure` on type `!`
-  --> $DIR/issue-13847.rs:2:12
+  --> $DIR/field-access-never-type-13847.rs:4:12
    |
 LL |     return.is_failure
    |            ^^^^^^^^^^ unknown field
diff --git a/tests/ui/nll/issue-46589.nll.stderr b/tests/ui/nll/issue-46589.nll.stderr
index dc80c1d08de..f2d08d1f4c8 100644
--- a/tests/ui/nll/issue-46589.nll.stderr
+++ b/tests/ui/nll/issue-46589.nll.stderr
@@ -1,5 +1,5 @@
 error[E0499]: cannot borrow `**other` as mutable more than once at a time
-  --> $DIR/issue-46589.rs:24:21
+  --> $DIR/issue-46589.rs:25:21
    |
 LL |         *other = match (*other).get_self() {
    |                        -------- first mutable borrow occurs here
diff --git a/tests/ui/nll/issue-46589.polonius.stderr b/tests/ui/nll/issue-46589.polonius.stderr
new file mode 100644
index 00000000000..f2d08d1f4c8
--- /dev/null
+++ b/tests/ui/nll/issue-46589.polonius.stderr
@@ -0,0 +1,15 @@
+error[E0499]: cannot borrow `**other` as mutable more than once at a time
+  --> $DIR/issue-46589.rs:25:21
+   |
+LL |         *other = match (*other).get_self() {
+   |                        -------- first mutable borrow occurs here
+LL |             Some(s) => s,
+LL |             None => (*other).new_self()
+   |                     ^^^^^^^^
+   |                     |
+   |                     second mutable borrow occurs here
+   |                     first borrow later used here
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/issue-46589.rs b/tests/ui/nll/issue-46589.rs
index 10aff0d7b4e..9a23f61b8cb 100644
--- a/tests/ui/nll/issue-46589.rs
+++ b/tests/ui/nll/issue-46589.rs
@@ -1,9 +1,10 @@
 //@ ignore-compare-mode-polonius (explicit revisions)
-//@ revisions: nll polonius_next polonius
-//@ [polonius_next] check-pass
-//@ [polonius_next] compile-flags: -Zpolonius=next
-//@ [polonius] check-pass
-//@ [polonius] compile-flags: -Zpolonius
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #46589
+//@ [polonius] known-bug: #46589
+//@ [polonius] compile-flags: -Zpolonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Zpolonius=legacy
 
 struct Foo;
 
@@ -22,7 +23,6 @@ impl Foo {
         *other = match (*other).get_self() {
             Some(s) => s,
             None => (*other).new_self()
-            //[nll]~^ ERROR cannot borrow `**other` as mutable more than once at a time [E0499]
         };
 
         let c = other;
diff --git a/tests/ui/nll/issue-51345-2.rs b/tests/ui/nll/issue-51345-2.rs
index 39871d56a9a..6c424d436f1 100644
--- a/tests/ui/nll/issue-51345-2.rs
+++ b/tests/ui/nll/issue-51345-2.rs
@@ -1,6 +1,6 @@
 //@ run-fail
-//@ error-pattern:thread 'main' panicked
-//@ error-pattern:explicit panic
+//@ regex-error-pattern: thread 'main'.*panicked
+//@ error-pattern: explicit panic
 //@ needs-subprocess
 
 fn main() {
diff --git a/tests/ui/nll/issue-52663-span-decl-captured-variable.stderr b/tests/ui/nll/issue-52663-span-decl-captured-variable.stderr
index 57546037006..7f9a8e50dae 100644
--- a/tests/ui/nll/issue-52663-span-decl-captured-variable.stderr
+++ b/tests/ui/nll/issue-52663-span-decl-captured-variable.stderr
@@ -10,6 +10,11 @@ LL |        expect_fn(|| drop(x.0));
    |                  |
    |                  captured by this `Fn` closure
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/issue-52663-span-decl-captured-variable.rs:1:33
+   |
+LL | fn expect_fn<F>(f: F) where F : Fn() {
+   |                                 ^^^^
 help: consider cloning the value if the performance cost is acceptable
    |
 LL |        expect_fn(|| drop(x.0.clone()));
diff --git a/tests/ui/nll/polonius/array-literal-index-oob-2024.rs b/tests/ui/nll/polonius/array-literal-index-oob-2024.rs
new file mode 100644
index 00000000000..2054a32e535
--- /dev/null
+++ b/tests/ui/nll/polonius/array-literal-index-oob-2024.rs
@@ -0,0 +1,12 @@
+// This test used to ICE under `-Zpolonius=next` when computing loan liveness
+// and taking kills into account during reachability traversal of the localized
+// constraint graph. Originally from another test but on edition 2024, as
+// seen in issue #135646.
+
+//@ compile-flags: -Zpolonius=next
+//@ edition: 2024
+//@ check-pass
+
+fn main() {
+    &{ [1, 2, 3][4] };
+}
diff --git a/tests/ui/nll/polonius/filtering-lending-iterator-issue-92985.nll.stderr b/tests/ui/nll/polonius/filtering-lending-iterator-issue-92985.nll.stderr
new file mode 100644
index 00000000000..d5c85a2af23
--- /dev/null
+++ b/tests/ui/nll/polonius/filtering-lending-iterator-issue-92985.nll.stderr
@@ -0,0 +1,14 @@
+error[E0499]: cannot borrow `self.iter` as mutable more than once at a time
+  --> $DIR/filtering-lending-iterator-issue-92985.rs:49:32
+   |
+LL |     fn next(&mut self) -> Option<I::Item<'_>> {
+   |             - let's call the lifetime of this reference `'1`
+LL |         while let Some(item) = self.iter.next() {
+   |                                ^^^^^^^^^ `self.iter` was mutably borrowed here in the previous iteration of the loop
+LL |             if (self.predicate)(&item) {
+LL |                 return Some(item);
+   |                        ---------- returning this value requires that `self.iter` is borrowed for `'1`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/filtering-lending-iterator-issue-92985.rs b/tests/ui/nll/polonius/filtering-lending-iterator-issue-92985.rs
new file mode 100644
index 00000000000..27da62ef00b
--- /dev/null
+++ b/tests/ui/nll/polonius/filtering-lending-iterator-issue-92985.rs
@@ -0,0 +1,56 @@
+#![crate_type = "lib"]
+
+// This test is an example of a filtering lending iterator with GATs from #92985 (that is similar to
+// NLL problem case #3) to ensure it "works" with the polonius alpha analysis as with the datalog
+// implementation.
+//
+// The polonius analysis only changes how the `Filter::next` function is borrowcked, not the bounds
+// on the predicate from using the GAT. So even if the #92985 limitation is removed, the unrelated
+// 'static limitation on the predicate argument is still there, and the pattern is still impractical
+// to use in the real world.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #92985
+//@ [polonius] check-pass
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+trait LendingIterator {
+    type Item<'a>
+    where
+        Self: 'a;
+    fn next(&mut self) -> Option<Self::Item<'_>>;
+
+    fn filter<P>(self, predicate: P) -> Filter<Self, P>
+    where
+        Self: Sized,
+        P: FnMut(&Self::Item<'_>) -> bool,
+    {
+        Filter { iter: self, predicate }
+    }
+}
+
+pub struct Filter<I, P> {
+    iter: I,
+    predicate: P,
+}
+impl<I: LendingIterator, P> LendingIterator for Filter<I, P>
+where
+    P: FnMut(&I::Item<'_>) -> bool,
+{
+    type Item<'a>
+        = I::Item<'a>
+    where
+        Self: 'a;
+
+    fn next(&mut self) -> Option<I::Item<'_>> {
+        while let Some(item) = self.iter.next() {
+            if (self.predicate)(&item) {
+                return Some(item);
+            }
+        }
+        return None;
+    }
+}
diff --git a/tests/ui/nll/polonius/flow-sensitive-invariance.nll.stderr b/tests/ui/nll/polonius/flow-sensitive-invariance.nll.stderr
new file mode 100644
index 00000000000..5756148f4eb
--- /dev/null
+++ b/tests/ui/nll/polonius/flow-sensitive-invariance.nll.stderr
@@ -0,0 +1,36 @@
+error: lifetime may not live long enough
+  --> $DIR/flow-sensitive-invariance.rs:20:17
+   |
+LL | fn use_it<'a, 'b>(choice: bool) -> Result<Invariant<'a>, Invariant<'b>> {
+   |           --  -- lifetime `'b` defined here
+   |           |
+   |           lifetime `'a` defined here
+LL |     let returned_value = create_invariant();
+LL |     if choice { Ok(returned_value) } else { Err(returned_value) }
+   |                 ^^^^^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
+   |
+   = help: consider adding the following bound: `'b: 'a`
+   = note: requirement occurs because of the type `Invariant<'_>`, which makes the generic argument `'_` invariant
+   = note: the struct `Invariant<'l>` is invariant over the parameter `'l`
+   = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
+
+error: lifetime may not live long enough
+  --> $DIR/flow-sensitive-invariance.rs:20:45
+   |
+LL | fn use_it<'a, 'b>(choice: bool) -> Result<Invariant<'a>, Invariant<'b>> {
+   |           --  -- lifetime `'b` defined here
+   |           |
+   |           lifetime `'a` defined here
+LL |     let returned_value = create_invariant();
+LL |     if choice { Ok(returned_value) } else { Err(returned_value) }
+   |                                             ^^^^^^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
+   |
+   = help: consider adding the following bound: `'a: 'b`
+   = note: requirement occurs because of the type `Invariant<'_>`, which makes the generic argument `'_` invariant
+   = note: the struct `Invariant<'l>` is invariant over the parameter `'l`
+   = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
+
+help: `'a` and `'b` must be the same: replace one with the other
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/nll/polonius/flow-sensitive-invariance.polonius.stderr b/tests/ui/nll/polonius/flow-sensitive-invariance.polonius.stderr
new file mode 100644
index 00000000000..5756148f4eb
--- /dev/null
+++ b/tests/ui/nll/polonius/flow-sensitive-invariance.polonius.stderr
@@ -0,0 +1,36 @@
+error: lifetime may not live long enough
+  --> $DIR/flow-sensitive-invariance.rs:20:17
+   |
+LL | fn use_it<'a, 'b>(choice: bool) -> Result<Invariant<'a>, Invariant<'b>> {
+   |           --  -- lifetime `'b` defined here
+   |           |
+   |           lifetime `'a` defined here
+LL |     let returned_value = create_invariant();
+LL |     if choice { Ok(returned_value) } else { Err(returned_value) }
+   |                 ^^^^^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
+   |
+   = help: consider adding the following bound: `'b: 'a`
+   = note: requirement occurs because of the type `Invariant<'_>`, which makes the generic argument `'_` invariant
+   = note: the struct `Invariant<'l>` is invariant over the parameter `'l`
+   = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
+
+error: lifetime may not live long enough
+  --> $DIR/flow-sensitive-invariance.rs:20:45
+   |
+LL | fn use_it<'a, 'b>(choice: bool) -> Result<Invariant<'a>, Invariant<'b>> {
+   |           --  -- lifetime `'b` defined here
+   |           |
+   |           lifetime `'a` defined here
+LL |     let returned_value = create_invariant();
+LL |     if choice { Ok(returned_value) } else { Err(returned_value) }
+   |                                             ^^^^^^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
+   |
+   = help: consider adding the following bound: `'a: 'b`
+   = note: requirement occurs because of the type `Invariant<'_>`, which makes the generic argument `'_` invariant
+   = note: the struct `Invariant<'l>` is invariant over the parameter `'l`
+   = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
+
+help: `'a` and `'b` must be the same: replace one with the other
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/nll/polonius/flow-sensitive-invariance.rs b/tests/ui/nll/polonius/flow-sensitive-invariance.rs
new file mode 100644
index 00000000000..c5571f131da
--- /dev/null
+++ b/tests/ui/nll/polonius/flow-sensitive-invariance.rs
@@ -0,0 +1,34 @@
+// An example (from @steffahn) of reachability as an approximation of liveness where the polonius
+// alpha analysis shows the same imprecision as NLLs, unlike the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+use std::cell::Cell;
+
+struct Invariant<'l>(Cell<&'l ()>);
+
+fn create_invariant<'l>() -> Invariant<'l> {
+    Invariant(Cell::new(&()))
+}
+
+fn use_it<'a, 'b>(choice: bool) -> Result<Invariant<'a>, Invariant<'b>> {
+    let returned_value = create_invariant();
+    if choice { Ok(returned_value) } else { Err(returned_value) }
+    //[nll]~^ ERROR lifetime may not live long enough
+    //[nll]~| ERROR lifetime may not live long enough
+    //[polonius]~^^^ ERROR lifetime may not live long enough
+    //[polonius]~| ERROR lifetime may not live long enough
+}
+
+fn use_it_but_its_the_same_region<'a: 'b, 'b: 'a>(
+    choice: bool,
+) -> Result<Invariant<'a>, Invariant<'b>> {
+    let returned_value = create_invariant();
+    if choice { Ok(returned_value) } else { Err(returned_value) }
+}
+
+fn main() {}
diff --git a/tests/ui/nll/polonius/iterating-updating-cursor-issue-108704.nll.stderr b/tests/ui/nll/polonius/iterating-updating-cursor-issue-108704.nll.stderr
new file mode 100644
index 00000000000..b768f60590c
--- /dev/null
+++ b/tests/ui/nll/polonius/iterating-updating-cursor-issue-108704.nll.stderr
@@ -0,0 +1,12 @@
+error[E0499]: cannot borrow `*elements` as mutable more than once at a time
+  --> $DIR/iterating-updating-cursor-issue-108704.rs:41:26
+   |
+LL |         for (idx, el) in elements.iter_mut().enumerate() {
+   |                          ^^^^^^^^
+   |                          |
+   |                          `*elements` was mutably borrowed here in the previous iteration of the loop
+   |                          first borrow used here, in later iteration of loop
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/iterating-updating-cursor-issue-108704.polonius.stderr b/tests/ui/nll/polonius/iterating-updating-cursor-issue-108704.polonius.stderr
new file mode 100644
index 00000000000..b768f60590c
--- /dev/null
+++ b/tests/ui/nll/polonius/iterating-updating-cursor-issue-108704.polonius.stderr
@@ -0,0 +1,12 @@
+error[E0499]: cannot borrow `*elements` as mutable more than once at a time
+  --> $DIR/iterating-updating-cursor-issue-108704.rs:41:26
+   |
+LL |         for (idx, el) in elements.iter_mut().enumerate() {
+   |                          ^^^^^^^^
+   |                          |
+   |                          `*elements` was mutably borrowed here in the previous iteration of the loop
+   |                          first borrow used here, in later iteration of loop
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/iterating-updating-cursor-issue-108704.rs b/tests/ui/nll/polonius/iterating-updating-cursor-issue-108704.rs
new file mode 100644
index 00000000000..673efa8f225
--- /dev/null
+++ b/tests/ui/nll/polonius/iterating-updating-cursor-issue-108704.rs
@@ -0,0 +1,48 @@
+#![crate_type = "lib"]
+
+// An example from #108704 of the linked-list cursor-like pattern of #46859/#48001, where the
+// polonius alpha analysis shows the same imprecision as NLLs, unlike the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #108704
+//@ [polonius] known-bug: #108704
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+struct Root {
+    children: Vec<Node>,
+}
+
+struct Node {
+    name: String,
+    children: Vec<Node>,
+}
+
+fn merge_tree_ok(root: &mut Root, path: Vec<String>) {
+    let mut elements = &mut root.children;
+
+    for p in path.iter() {
+        for (idx, el) in elements.iter_mut().enumerate() {
+            if el.name == *p {
+                elements = &mut elements[idx].children;
+                break;
+            }
+        }
+    }
+}
+
+// NLLs and polonius alpha fail here
+fn merge_tree_ko(root: &mut Root, path: Vec<String>) {
+    let mut elements = &mut root.children;
+
+    for p in path.iter() {
+        for (idx, el) in elements.iter_mut().enumerate() {
+            if el.name == *p {
+                elements = &mut el.children;
+                break;
+            }
+        }
+    }
+}
diff --git a/tests/ui/nll/polonius/iterating-updating-cursor-issue-57165.nll.stderr b/tests/ui/nll/polonius/iterating-updating-cursor-issue-57165.nll.stderr
new file mode 100644
index 00000000000..34b04e707db
--- /dev/null
+++ b/tests/ui/nll/polonius/iterating-updating-cursor-issue-57165.nll.stderr
@@ -0,0 +1,22 @@
+error[E0499]: cannot borrow `p.0` as mutable more than once at a time
+  --> $DIR/iterating-updating-cursor-issue-57165.rs:30:20
+   |
+LL |     while let Some(now) = p {
+   |                    ^^^    - first borrow used here, in later iteration of loop
+   |                    |
+   |                    `p.0` was mutably borrowed here in the previous iteration of the loop
+
+error[E0503]: cannot use `*p` because it was mutably borrowed
+  --> $DIR/iterating-updating-cursor-issue-57165.rs:30:27
+   |
+LL |     while let Some(now) = p {
+   |                    ---    ^
+   |                    |      |
+   |                    |      use of borrowed `p.0`
+   |                    |      borrow later used here
+   |                    `p.0` is borrowed here
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0499, E0503.
+For more information about an error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/iterating-updating-cursor-issue-57165.polonius.stderr b/tests/ui/nll/polonius/iterating-updating-cursor-issue-57165.polonius.stderr
new file mode 100644
index 00000000000..34b04e707db
--- /dev/null
+++ b/tests/ui/nll/polonius/iterating-updating-cursor-issue-57165.polonius.stderr
@@ -0,0 +1,22 @@
+error[E0499]: cannot borrow `p.0` as mutable more than once at a time
+  --> $DIR/iterating-updating-cursor-issue-57165.rs:30:20
+   |
+LL |     while let Some(now) = p {
+   |                    ^^^    - first borrow used here, in later iteration of loop
+   |                    |
+   |                    `p.0` was mutably borrowed here in the previous iteration of the loop
+
+error[E0503]: cannot use `*p` because it was mutably borrowed
+  --> $DIR/iterating-updating-cursor-issue-57165.rs:30:27
+   |
+LL |     while let Some(now) = p {
+   |                    ---    ^
+   |                    |      |
+   |                    |      use of borrowed `p.0`
+   |                    |      borrow later used here
+   |                    `p.0` is borrowed here
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0499, E0503.
+For more information about an error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/iterating-updating-cursor-issue-57165.rs b/tests/ui/nll/polonius/iterating-updating-cursor-issue-57165.rs
new file mode 100644
index 00000000000..9670fc77e6f
--- /dev/null
+++ b/tests/ui/nll/polonius/iterating-updating-cursor-issue-57165.rs
@@ -0,0 +1,45 @@
+#![crate_type = "lib"]
+
+// An example from #57165 of the linked-list cursor-like pattern of #46859/#48001, where the
+// polonius alpha analysis shows the same imprecision as NLLs, unlike the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #57165
+//@ [polonius] known-bug: #57165
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+struct X {
+    next: Option<Box<X>>,
+}
+
+fn no_control_flow() {
+    let mut b = Some(Box::new(X { next: None }));
+    let mut p = &mut b;
+    while let Some(now) = p {
+        p = &mut now.next;
+    }
+}
+
+// NLLs and polonius alpha fail here
+fn conditional() {
+    let mut b = Some(Box::new(X { next: None }));
+    let mut p = &mut b;
+    while let Some(now) = p {
+        if true {
+            p = &mut now.next;
+        }
+    }
+}
+
+fn conditional_with_indirection() {
+    let mut b = Some(Box::new(X { next: None }));
+    let mut p = &mut b;
+    while let Some(now) = p {
+        if true {
+            p = &mut p.as_mut().unwrap().next;
+        }
+    }
+}
diff --git a/tests/ui/nll/polonius/iterating-updating-cursor-issue-63908.nll.stderr b/tests/ui/nll/polonius/iterating-updating-cursor-issue-63908.nll.stderr
new file mode 100644
index 00000000000..b76e4ff6398
--- /dev/null
+++ b/tests/ui/nll/polonius/iterating-updating-cursor-issue-63908.nll.stderr
@@ -0,0 +1,18 @@
+error[E0506]: cannot assign to `*node_ref` because it is borrowed
+  --> $DIR/iterating-updating-cursor-issue-63908.rs:43:5
+   |
+LL | fn remove_last_node_iterative<T>(mut node_ref: &mut List<T>) {
+   |                                                - let's call the lifetime of this reference `'1`
+LL |     loop {
+LL |         let next_ref = &mut node_ref.as_mut().unwrap().next;
+   |                             -------- `*node_ref` is borrowed here
+...
+LL |             node_ref = next_ref;
+   |             ------------------- assignment requires that `*node_ref` is borrowed for `'1`
+...
+LL |     *node_ref = None;
+   |     ^^^^^^^^^ `*node_ref` is assigned to here but it was already borrowed
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/nll/polonius/iterating-updating-cursor-issue-63908.polonius.stderr b/tests/ui/nll/polonius/iterating-updating-cursor-issue-63908.polonius.stderr
new file mode 100644
index 00000000000..b76e4ff6398
--- /dev/null
+++ b/tests/ui/nll/polonius/iterating-updating-cursor-issue-63908.polonius.stderr
@@ -0,0 +1,18 @@
+error[E0506]: cannot assign to `*node_ref` because it is borrowed
+  --> $DIR/iterating-updating-cursor-issue-63908.rs:43:5
+   |
+LL | fn remove_last_node_iterative<T>(mut node_ref: &mut List<T>) {
+   |                                                - let's call the lifetime of this reference `'1`
+LL |     loop {
+LL |         let next_ref = &mut node_ref.as_mut().unwrap().next;
+   |                             -------- `*node_ref` is borrowed here
+...
+LL |             node_ref = next_ref;
+   |             ------------------- assignment requires that `*node_ref` is borrowed for `'1`
+...
+LL |     *node_ref = None;
+   |     ^^^^^^^^^ `*node_ref` is assigned to here but it was already borrowed
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/nll/polonius/iterating-updating-cursor-issue-63908.rs b/tests/ui/nll/polonius/iterating-updating-cursor-issue-63908.rs
new file mode 100644
index 00000000000..6682926c523
--- /dev/null
+++ b/tests/ui/nll/polonius/iterating-updating-cursor-issue-63908.rs
@@ -0,0 +1,44 @@
+#![crate_type = "lib"]
+
+// An example from #63908 of the linked-list cursor-like pattern of #46859/#48001, where the
+// polonius alpha analysis shows the same imprecision as NLLs, unlike the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #63908
+//@ [polonius] known-bug: #63908
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+struct Node<T> {
+    value: T,
+    next: Option<Box<Self>>,
+}
+
+type List<T> = Option<Box<Node<T>>>;
+
+fn remove_last_node_recursive<T>(node_ref: &mut List<T>) {
+    let next_ref = &mut node_ref.as_mut().unwrap().next;
+
+    if next_ref.is_some() {
+        remove_last_node_recursive(next_ref);
+    } else {
+        *node_ref = None;
+    }
+}
+
+// NLLs and polonius alpha fail here
+fn remove_last_node_iterative<T>(mut node_ref: &mut List<T>) {
+    loop {
+        let next_ref = &mut node_ref.as_mut().unwrap().next;
+
+        if next_ref.is_some() {
+            node_ref = next_ref;
+        } else {
+            break;
+        }
+    }
+
+    *node_ref = None;
+}
diff --git a/tests/ui/nll/polonius/iterating-updating-mutref.nll.stderr b/tests/ui/nll/polonius/iterating-updating-mutref.nll.stderr
new file mode 100644
index 00000000000..941c736d8d2
--- /dev/null
+++ b/tests/ui/nll/polonius/iterating-updating-mutref.nll.stderr
@@ -0,0 +1,15 @@
+error[E0499]: cannot borrow `self.buf_read` as mutable more than once at a time
+  --> $DIR/iterating-updating-mutref.rs:61:23
+   |
+LL |     pub fn next<'a>(&'a mut self) -> &'a str {
+   |                 -- lifetime `'a` defined here
+LL |         loop {
+LL |             let buf = self.buf_read.fill_buf();
+   |                       ^^^^^^^^^^^^^ `self.buf_read` was mutably borrowed here in the previous iteration of the loop
+LL |             if let Some(s) = decode(buf) {
+LL |                 return s;
+   |                        - returning this value requires that `self.buf_read` is borrowed for `'a`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/iterating-updating-mutref.rs b/tests/ui/nll/polonius/iterating-updating-mutref.rs
new file mode 100644
index 00000000000..a315bf66279
--- /dev/null
+++ b/tests/ui/nll/polonius/iterating-updating-mutref.rs
@@ -0,0 +1,87 @@
+// These are some examples of iterating through and updating a mutable ref, similar in spirit to the
+// linked-list-like pattern of #46859/#48001 where the polonius alpha analysis shows imprecision,
+// unlike the datalog implementation.
+//
+// They differ in that after the loans prior to the loop are either not live after the loop, or with
+// control flow and outlives relationships that are simple enough for the reachability
+// approximation. They're thus accepted by the alpha analysis, like NLLs did for the simplest cases
+// of flow-sensitivity.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #46859
+//@ [polonius] check-pass
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+// The #46859 OP
+struct List<T> {
+    value: T,
+    next: Option<Box<List<T>>>,
+}
+
+fn to_refs<T>(mut list: &mut List<T>) -> Vec<&mut T> {
+    let mut result = vec![];
+    loop {
+        result.push(&mut list.value);
+        if let Some(n) = list.next.as_mut() {
+            list = n;
+        } else {
+            return result;
+        }
+    }
+}
+
+// A similar construction, where paths in the constraint graph are also clearly terminating, so it's
+// fine even for NLLs.
+fn to_refs2<T>(mut list: &mut List<T>) -> Vec<&mut T> {
+    let mut result = vec![];
+    loop {
+        result.push(&mut list.value);
+        if let Some(n) = list.next.as_mut() {
+            list = n;
+        } else {
+            break;
+        }
+    }
+
+    result
+}
+
+// Another MCVE from the same issue, but was rejected by NLLs.
+pub struct Decoder {
+    buf_read: BufRead,
+}
+
+impl Decoder {
+    // NLLs fail here
+    pub fn next<'a>(&'a mut self) -> &'a str {
+        loop {
+            let buf = self.buf_read.fill_buf();
+            if let Some(s) = decode(buf) {
+                return s;
+            }
+            // loop to get more input data
+
+            // At this point `buf` is not used anymore.
+            // With NLL I would expect the borrow to end here,
+            // such that `self.buf_read` is not borrowed anymore
+            // by the time we start the next loop iteration.
+        }
+    }
+}
+
+struct BufRead;
+
+impl BufRead {
+    fn fill_buf(&mut self) -> &[u8] {
+        unimplemented!()
+    }
+}
+
+fn decode(_: &[u8]) -> Option<&str> {
+    unimplemented!()
+}
+
+fn main() {}
diff --git a/tests/ui/nll/polonius/lending-iterator-sanity-checks.legacy.stderr b/tests/ui/nll/polonius/lending-iterator-sanity-checks.legacy.stderr
new file mode 100644
index 00000000000..fa201b89048
--- /dev/null
+++ b/tests/ui/nll/polonius/lending-iterator-sanity-checks.legacy.stderr
@@ -0,0 +1,28 @@
+error[E0499]: cannot borrow `*t` as mutable more than once at a time
+  --> $DIR/lending-iterator-sanity-checks.rs:19:19
+   |
+LL | fn use_live<T: LendingIterator>(t: &mut T) -> Option<(T::Item<'_>, T::Item<'_>)> {
+   |                                    - let's call the lifetime of this reference `'1`
+LL |     let Some(i) = t.next() else { return None };
+   |                   - first mutable borrow occurs here
+LL |     let Some(j) = t.next() else { return None };
+   |                   ^ second mutable borrow occurs here
+...
+LL |     Some((i, j))
+   |     ------------ returning this value requires that `*t` is borrowed for `'1`
+
+error[E0499]: cannot borrow `*t` as mutable more than once at a time
+  --> $DIR/lending-iterator-sanity-checks.rs:31:13
+   |
+LL |     let i = t.next();
+   |             - first mutable borrow occurs here
+...
+LL |     let j = t.next();
+   |             ^ second mutable borrow occurs here
+LL |
+LL | }
+   | - first borrow might be used here, when `i` is dropped and runs the destructor for type `Option<<T as LendingIterator>::Item<'_>>`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/lending-iterator-sanity-checks.nll.stderr b/tests/ui/nll/polonius/lending-iterator-sanity-checks.nll.stderr
new file mode 100644
index 00000000000..fa201b89048
--- /dev/null
+++ b/tests/ui/nll/polonius/lending-iterator-sanity-checks.nll.stderr
@@ -0,0 +1,28 @@
+error[E0499]: cannot borrow `*t` as mutable more than once at a time
+  --> $DIR/lending-iterator-sanity-checks.rs:19:19
+   |
+LL | fn use_live<T: LendingIterator>(t: &mut T) -> Option<(T::Item<'_>, T::Item<'_>)> {
+   |                                    - let's call the lifetime of this reference `'1`
+LL |     let Some(i) = t.next() else { return None };
+   |                   - first mutable borrow occurs here
+LL |     let Some(j) = t.next() else { return None };
+   |                   ^ second mutable borrow occurs here
+...
+LL |     Some((i, j))
+   |     ------------ returning this value requires that `*t` is borrowed for `'1`
+
+error[E0499]: cannot borrow `*t` as mutable more than once at a time
+  --> $DIR/lending-iterator-sanity-checks.rs:31:13
+   |
+LL |     let i = t.next();
+   |             - first mutable borrow occurs here
+...
+LL |     let j = t.next();
+   |             ^ second mutable borrow occurs here
+LL |
+LL | }
+   | - first borrow might be used here, when `i` is dropped and runs the destructor for type `Option<<T as LendingIterator>::Item<'_>>`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/lending-iterator-sanity-checks.polonius.stderr b/tests/ui/nll/polonius/lending-iterator-sanity-checks.polonius.stderr
new file mode 100644
index 00000000000..bf8546b63bf
--- /dev/null
+++ b/tests/ui/nll/polonius/lending-iterator-sanity-checks.polonius.stderr
@@ -0,0 +1,26 @@
+error[E0499]: cannot borrow `*t` as mutable more than once at a time
+  --> $DIR/lending-iterator-sanity-checks.rs:19:19
+   |
+LL |     let Some(i) = t.next() else { return None };
+   |                   - first mutable borrow occurs here
+LL |     let Some(j) = t.next() else { return None };
+   |                   ^ second mutable borrow occurs here
+...
+LL | }
+   | - first borrow might be used here, when `i` is dropped and runs the destructor for type `<T as LendingIterator>::Item<'_>`
+
+error[E0499]: cannot borrow `*t` as mutable more than once at a time
+  --> $DIR/lending-iterator-sanity-checks.rs:31:13
+   |
+LL |     let i = t.next();
+   |             - first mutable borrow occurs here
+...
+LL |     let j = t.next();
+   |             ^ second mutable borrow occurs here
+LL |
+LL | }
+   | - first borrow might be used here, when `i` is dropped and runs the destructor for type `Option<<T as LendingIterator>::Item<'_>>`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/lending-iterator-sanity-checks.rs b/tests/ui/nll/polonius/lending-iterator-sanity-checks.rs
new file mode 100644
index 00000000000..ae8cc78957f
--- /dev/null
+++ b/tests/ui/nll/polonius/lending-iterator-sanity-checks.rs
@@ -0,0 +1,71 @@
+// Some sanity checks for lending iterators with GATs. This is just some non-regression tests
+// ensuring the polonius alpha analysis, the datalog implementation, and NLLs agree in these common
+// cases of overlapping yielded items.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+trait LendingIterator {
+    type Item<'a>
+    where
+        Self: 'a;
+    fn next(&mut self) -> Option<Self::Item<'_>>;
+}
+
+fn use_live<T: LendingIterator>(t: &mut T) -> Option<(T::Item<'_>, T::Item<'_>)> {
+    let Some(i) = t.next() else { return None };
+    let Some(j) = t.next() else { return None };
+    //~^ ERROR cannot borrow `*t` as mutable more than once at a time
+
+    // `i` is obviously still (use-)live here, but we called `next` again to get `j`.
+    Some((i, j))
+}
+
+fn drop_live<T: LendingIterator>(t: &mut T) {
+    let i = t.next();
+
+    // Now `i` is use-dead here, but we don't know if the iterator items have a `Drop` impl, so it's
+    // still drop-live.
+    let j = t.next();
+    //~^ ERROR cannot borrow `*t` as mutable more than once at a time
+}
+
+// But we can still manually serialize the lifetimes with scopes (or preventing the destructor from
+// being called), so they're not overlapping.
+fn manually_non_overlapping<T: LendingIterator>(t: &mut T) {
+    {
+        let i = t.next();
+    }
+
+    let j = t.next(); // i is dead
+
+    drop(j);
+    let k = t.next(); // j is dead
+
+    let k = std::mem::ManuallyDrop::new(k);
+    let l = t.next(); // we told the compiler that k is not drop-live
+}
+
+// The cfg below is because there's a diagnostic ICE trying to explain the source of the error when
+// using the datalog implementation. We're not fixing *that*, outside of removing the implementation
+// in the future.
+#[cfg(not(legacy))] // FIXME: remove this cfg when removing the datalog implementation
+fn items_have_no_borrows<T: LendingIterator>(t: &mut T)
+where
+    for<'a> T::Item<'a>: 'static,
+{
+    let i = t.next();
+    let j = t.next();
+}
+
+fn items_are_copy<T: LendingIterator>(t: &mut T)
+where
+    for<'a> T::Item<'a>: Copy,
+{
+    let i = t.next();
+    let j = t.next();
+}
+
+fn main() {}
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-112087.nll.stderr b/tests/ui/nll/polonius/nll-problem-case-3-issue-112087.nll.stderr
new file mode 100644
index 00000000000..16b5d8f7148
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-112087.nll.stderr
@@ -0,0 +1,17 @@
+error[E0506]: cannot assign to `*opt` because it is borrowed
+  --> $DIR/nll-problem-case-3-issue-112087.rs:23:5
+   |
+LL | fn issue_112087<'a>(opt: &'a mut Option<i32>, b: bool) -> Result<&'a mut Option<i32>, &'a mut i32> {
+   |                 -- lifetime `'a` defined here
+LL |     if let Some(v) = opt {
+   |                 - `*opt` is borrowed here
+LL |         if b {
+LL |             return Err(v);
+   |                    ------ returning this value requires that `opt.0` is borrowed for `'a`
+...
+LL |     *opt = None;
+   |     ^^^^^^^^^^^ `*opt` is assigned to here but it was already borrowed
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-112087.rs b/tests/ui/nll/polonius/nll-problem-case-3-issue-112087.rs
new file mode 100644
index 00000000000..d7270f6bfa7
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-112087.rs
@@ -0,0 +1,25 @@
+#![crate_type = "lib"]
+
+// This is part of a collection of regression tests related to the NLL problem case 3 that was
+// deferred from the implementation of the NLL RFC, and left to be implemented by polonius. They are
+// from open issues, e.g. tagged fixed-by-polonius, to ensure that the polonius alpha analysis does
+// handle them, as does the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #112087
+//@ [polonius] check-pass
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+fn issue_112087<'a>(opt: &'a mut Option<i32>, b: bool) -> Result<&'a mut Option<i32>, &'a mut i32> {
+    if let Some(v) = opt {
+        if b {
+            return Err(v);
+        }
+    }
+
+    *opt = None;
+    return Ok(opt);
+}
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-123839.nll.stderr b/tests/ui/nll/polonius/nll-problem-case-3-issue-123839.nll.stderr
new file mode 100644
index 00000000000..541789b7f17
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-123839.nll.stderr
@@ -0,0 +1,16 @@
+error[E0506]: cannot assign to `self.status` because it is borrowed
+  --> $DIR/nll-problem-case-3-issue-123839.rs:37:9
+   |
+LL |     fn foo(self: &mut Self) -> Result<(), &str> {
+   |                  - let's call the lifetime of this reference `'1`
+LL |         self.bar()?; // rust reports this line conflicts with the next line
+   |         -----------
+   |         |
+   |         `self.status` is borrowed here
+   |         returning this value requires that `*self` is borrowed for `'1`
+LL |         self.status = 1; // and this line is the victim
+   |         ^^^^^^^^^^^^^^^ `self.status` is assigned to here but it was already borrowed
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0506`.
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-123839.rs b/tests/ui/nll/polonius/nll-problem-case-3-issue-123839.rs
new file mode 100644
index 00000000000..a738dace73d
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-123839.rs
@@ -0,0 +1,40 @@
+#![crate_type = "lib"]
+
+// This is part of a collection of regression tests related to the NLL problem case 3 that was
+// deferred from the implementation of the NLL RFC, and left to be implemented by polonius. They are
+// from open issues, e.g. tagged fixed-by-polonius, to ensure that the polonius alpha analysis does
+// handle them, as does the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #123839
+//@ [polonius] check-pass
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+struct Foo {
+    val: i32,
+    status: i32,
+    err_str: String,
+}
+
+impl Foo {
+    fn bar(self: &mut Self) -> Result<(), &str> {
+        if self.val == 0 {
+            self.status = -1;
+            Err("val is zero")
+        } else if self.val < 0 {
+            self.status = -2;
+            self.err_str = format!("unexpected negative val {}", self.val);
+            Err(&self.err_str)
+        } else {
+            Ok(())
+        }
+    }
+    fn foo(self: &mut Self) -> Result<(), &str> {
+        self.bar()?; // rust reports this line conflicts with the next line
+        self.status = 1; // and this line is the victim
+        Ok(())
+    }
+}
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-124070.nll.stderr b/tests/ui/nll/polonius/nll-problem-case-3-issue-124070.nll.stderr
new file mode 100644
index 00000000000..7c2a383e89c
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-124070.nll.stderr
@@ -0,0 +1,17 @@
+error[E0502]: cannot borrow `self.field` as immutable because it is also borrowed as mutable
+  --> $DIR/nll-problem-case-3-issue-124070.rs:28:16
+   |
+LL |     fn f(&mut self) -> &str {
+   |          - let's call the lifetime of this reference `'1`
+LL |         let a = &mut self.field;
+   |                 --------------- mutable borrow occurs here
+...
+LL |             return a;
+   |                    - returning this value requires that `self.field` is borrowed for `'1`
+...
+LL |         return &self.field;
+   |                ^^^^^^^^^^^ immutable borrow occurs here
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-124070.rs b/tests/ui/nll/polonius/nll-problem-case-3-issue-124070.rs
new file mode 100644
index 00000000000..ddf331db8bb
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-124070.rs
@@ -0,0 +1,30 @@
+#![crate_type = "lib"]
+
+// This is part of a collection of regression tests related to the NLL problem case 3 that was
+// deferred from the implementation of the NLL RFC, and left to be implemented by polonius. They are
+// from open issues, e.g. tagged fixed-by-polonius, to ensure that the polonius alpha analysis does
+// handle them, as does the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #124070
+//@ [polonius] check-pass
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+struct S {
+    field: String,
+}
+
+impl S {
+    fn f(&mut self) -> &str {
+        let a = &mut self.field;
+
+        if false {
+            return a;
+        }
+
+        return &self.field;
+    }
+}
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-124254.nll.stderr b/tests/ui/nll/polonius/nll-problem-case-3-issue-124254.nll.stderr
new file mode 100644
index 00000000000..bd5f1203f31
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-124254.nll.stderr
@@ -0,0 +1,34 @@
+error[E0499]: cannot borrow `list[_]` as mutable more than once at a time
+  --> $DIR/nll-problem-case-3-issue-124254.rs:30:5
+   |
+LL | fn find_lowest_or_first_empty_pos(list: &mut [Option<u8>]) -> &mut Option<u8> {
+   |                                         - let's call the lifetime of this reference `'1`
+LL |     let mut low_pos_val: Option<(usize, u8)> = None;
+LL |     for (idx, i) in list.iter_mut().enumerate() {
+   |                     ---- first mutable borrow occurs here
+LL |         let Some(s) = i else {
+LL |             return i;
+   |                    - returning this value requires that `*list` is borrowed for `'1`
+...
+LL |     &mut list[lowest_idx]
+   |     ^^^^^^^^^^^^^^^^^^^^^ second mutable borrow occurs here
+
+error[E0503]: cannot use `*list` because it was mutably borrowed
+  --> $DIR/nll-problem-case-3-issue-124254.rs:30:10
+   |
+LL | fn find_lowest_or_first_empty_pos(list: &mut [Option<u8>]) -> &mut Option<u8> {
+   |                                         - let's call the lifetime of this reference `'1`
+LL |     let mut low_pos_val: Option<(usize, u8)> = None;
+LL |     for (idx, i) in list.iter_mut().enumerate() {
+   |                     ---- `*list` is borrowed here
+LL |         let Some(s) = i else {
+LL |             return i;
+   |                    - returning this value requires that `*list` is borrowed for `'1`
+...
+LL |     &mut list[lowest_idx]
+   |          ^^^^^^^^^^^^^^^^ use of borrowed `*list`
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0499, E0503.
+For more information about an error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-124254.rs b/tests/ui/nll/polonius/nll-problem-case-3-issue-124254.rs
new file mode 100644
index 00000000000..e3bc2c2febc
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-124254.rs
@@ -0,0 +1,45 @@
+// This is part of a collection of regression tests related to the NLL problem case 3 that was
+// deferred from the implementation of the NLL RFC, and left to be implemented by polonius. They are
+// from open issues, e.g. tagged fixed-by-polonius, to ensure that the polonius alpha analysis does
+// handle them, as does the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #124254
+//@ [polonius] check-pass
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+fn find_lowest_or_first_empty_pos(list: &mut [Option<u8>]) -> &mut Option<u8> {
+    let mut low_pos_val: Option<(usize, u8)> = None;
+    for (idx, i) in list.iter_mut().enumerate() {
+        let Some(s) = i else {
+            return i;
+        };
+
+        low_pos_val = match low_pos_val {
+            Some((_oidx, oval)) if oval > *s => Some((idx, *s)),
+            Some(old) => Some(old),
+            None => Some((idx, *s)),
+        };
+    }
+    let Some((lowest_idx, _)) = low_pos_val else {
+        unreachable!("Can't have zero length list!");
+    };
+    &mut list[lowest_idx]
+}
+
+fn main() {
+    let mut list = [Some(1), Some(2), None, Some(3)];
+    let v = find_lowest_or_first_empty_pos(&mut list);
+    assert!(v.is_none());
+    assert_eq!(v as *mut _ as usize, list.as_ptr().wrapping_add(2) as usize);
+
+    let mut list = [Some(1), Some(2), Some(3), Some(0)];
+    let v = find_lowest_or_first_empty_pos(&mut list);
+    assert_eq!(v, &mut Some(0));
+    assert_eq!(v as *mut _ as usize, list.as_ptr().wrapping_add(3) as usize);
+
+    println!("pass");
+}
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-21906.nll.stderr b/tests/ui/nll/polonius/nll-problem-case-3-issue-21906.nll.stderr
new file mode 100644
index 00000000000..dc38b8c127e
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-21906.nll.stderr
@@ -0,0 +1,96 @@
+error[E0499]: cannot borrow `*map` as mutable more than once at a time
+  --> $DIR/nll-problem-case-3-issue-21906.rs:26:13
+   |
+LL |   fn from_the_rfc<'r, K: Hash + Eq + Copy, V: Default>(
+   |                   -- lifetime `'r` defined here
+...
+LL |       match map.get_mut(&key) {
+   |       -     --- first mutable borrow occurs here
+   |  _____|
+   | |
+LL | |         Some(value) => value,
+LL | |         None => {
+LL | |             map.insert(key, V::default());
+   | |             ^^^ second mutable borrow occurs here
+...  |
+LL | |     }
+   | |_____- returning this value requires that `*map` is borrowed for `'r`
+
+error[E0499]: cannot borrow `*map` as mutable more than once at a time
+  --> $DIR/nll-problem-case-3-issue-21906.rs:27:13
+   |
+LL |   fn from_the_rfc<'r, K: Hash + Eq + Copy, V: Default>(
+   |                   -- lifetime `'r` defined here
+...
+LL |       match map.get_mut(&key) {
+   |       -     --- first mutable borrow occurs here
+   |  _____|
+   | |
+LL | |         Some(value) => value,
+LL | |         None => {
+LL | |             map.insert(key, V::default());
+LL | |             map.get_mut(&key).unwrap()
+   | |             ^^^ second mutable borrow occurs here
+LL | |         }
+LL | |     }
+   | |_____- returning this value requires that `*map` is borrowed for `'r`
+
+error[E0499]: cannot borrow `*self` as mutable more than once at a time
+  --> $DIR/nll-problem-case-3-issue-21906.rs:44:21
+   |
+LL |     fn two(&mut self) -> &i32 {
+   |            - let's call the lifetime of this reference `'1`
+LL |         loop {
+LL |             let k = self.one();
+   |                     ^^^^ `*self` was mutably borrowed here in the previous iteration of the loop
+LL |             if *k > 10i32 {
+LL |                 return k;
+   |                        - returning this value requires that `*self` is borrowed for `'1`
+
+error[E0502]: cannot borrow `x.data` as immutable because it is also borrowed as mutable
+  --> $DIR/nll-problem-case-3-issue-21906.rs:62:22
+   |
+LL | fn foo(x: &mut Foo) -> Option<&mut i32> {
+   |           - let's call the lifetime of this reference `'1`
+LL |     if let Some(y) = x.data.as_mut() {
+   |                      ------ mutable borrow occurs here
+LL |         return Some(y);
+   |                ------- returning this value requires that `x.data` is borrowed for `'1`
+...
+LL |     println!("{:?}", x.data);
+   |                      ^^^^^^ immutable borrow occurs here
+   |
+   = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0499]: cannot borrow `*vec` as mutable more than once at a time
+  --> $DIR/nll-problem-case-3-issue-21906.rs:77:9
+   |
+LL | fn f(vec: &mut Vec<u8>) -> &u8 {
+   |           - let's call the lifetime of this reference `'1`
+LL |     if let Some(n) = vec.iter_mut().find(|n| **n == 1) {
+   |                      --- first mutable borrow occurs here
+LL |         *n = 10;
+LL |         n
+   |         - returning this value requires that `*vec` is borrowed for `'1`
+LL |     } else {
+LL |         vec.push(10);
+   |         ^^^ second mutable borrow occurs here
+
+error[E0502]: cannot borrow `*vec` as immutable because it is also borrowed as mutable
+  --> $DIR/nll-problem-case-3-issue-21906.rs:78:9
+   |
+LL | fn f(vec: &mut Vec<u8>) -> &u8 {
+   |           - let's call the lifetime of this reference `'1`
+LL |     if let Some(n) = vec.iter_mut().find(|n| **n == 1) {
+   |                      --- mutable borrow occurs here
+LL |         *n = 10;
+LL |         n
+   |         - returning this value requires that `*vec` is borrowed for `'1`
+...
+LL |         vec.last().unwrap()
+   |         ^^^ immutable borrow occurs here
+
+error: aborting due to 6 previous errors
+
+Some errors have detailed explanations: E0499, E0502.
+For more information about an error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-21906.rs b/tests/ui/nll/polonius/nll-problem-case-3-issue-21906.rs
new file mode 100644
index 00000000000..b025ea78f8b
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-21906.rs
@@ -0,0 +1,85 @@
+#![crate_type = "lib"]
+
+// This is part of a collection of regression tests related to the NLL problem case 3 that was
+// deferred from the implementation of the NLL RFC, and left to be implemented by polonius. They are
+// from open issues, e.g. tagged fixed-by-polonius, to ensure that the polonius alpha analysis does
+// handle them, as does the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #21906
+//@ [polonius] check-pass
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+use std::collections::HashMap;
+use std::hash::Hash;
+
+fn from_the_rfc<'r, K: Hash + Eq + Copy, V: Default>(
+    map: &'r mut HashMap<K, V>,
+    key: K,
+) -> &'r mut V {
+    match map.get_mut(&key) {
+        Some(value) => value,
+        None => {
+            map.insert(key, V::default());
+            map.get_mut(&key).unwrap()
+        }
+    }
+}
+
+// MCVE 1 from issue #21906
+struct A {
+    a: i32,
+}
+
+impl A {
+    fn one(&mut self) -> &i32 {
+        self.a = 10;
+        &self.a
+    }
+    fn two(&mut self) -> &i32 {
+        loop {
+            let k = self.one();
+            if *k > 10i32 {
+                return k;
+            }
+        }
+    }
+}
+
+// MCVE 2
+struct Foo {
+    data: Option<i32>,
+}
+
+fn foo(x: &mut Foo) -> Option<&mut i32> {
+    if let Some(y) = x.data.as_mut() {
+        return Some(y);
+    }
+
+    println!("{:?}", x.data);
+    None
+}
+
+fn mcve2() {
+    let mut x = Foo { data: Some(1) };
+    foo(&mut x);
+}
+
+// MCVE 3
+fn f(vec: &mut Vec<u8>) -> &u8 {
+    if let Some(n) = vec.iter_mut().find(|n| **n == 1) {
+        *n = 10;
+        n
+    } else {
+        vec.push(10);
+        vec.last().unwrap()
+    }
+}
+
+fn mcve3() {
+    let mut vec = vec![1, 2, 3];
+    f(&mut vec);
+}
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-51526.nll.stderr b/tests/ui/nll/polonius/nll-problem-case-3-issue-51526.nll.stderr
new file mode 100644
index 00000000000..9a740a0edc7
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-51526.nll.stderr
@@ -0,0 +1,18 @@
+error[E0502]: cannot borrow `*queue` as mutable because it is also borrowed as immutable
+  --> $DIR/nll-problem-case-3-issue-51526.rs:26:9
+   |
+LL | fn next(queue: &mut VecDeque<u32>, above: u32) -> Option<&u32> {
+   |                - let's call the lifetime of this reference `'1`
+...
+LL |             let next = queue.front()?;
+   |                        ----- immutable borrow occurs here
+...
+LL |         queue.pop_front();
+   |         ^^^^^^^^^^^^^^^^^ mutable borrow occurs here
+...
+LL |     Some(result)
+   |     ------------ returning this value requires that `*queue` is borrowed for `'1`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0502`.
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-51526.rs b/tests/ui/nll/polonius/nll-problem-case-3-issue-51526.rs
new file mode 100644
index 00000000000..3cf211586b2
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-51526.rs
@@ -0,0 +1,30 @@
+#![crate_type = "lib"]
+
+// This is part of a collection of regression tests related to the NLL problem case 3 that was
+// deferred from the implementation of the NLL RFC, and left to be implemented by polonius. They are
+// from open issues, e.g. tagged fixed-by-polonius, to ensure that the polonius alpha analysis does
+// handle them, as does the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #51526
+//@ [polonius] check-pass
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+use std::collections::VecDeque;
+
+fn next(queue: &mut VecDeque<u32>, above: u32) -> Option<&u32> {
+    let result = loop {
+        {
+            let next = queue.front()?;
+            if *next > above {
+                break next;
+            }
+        }
+        queue.pop_front();
+    };
+
+    Some(result)
+}
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-51545.nll.stderr b/tests/ui/nll/polonius/nll-problem-case-3-issue-51545.nll.stderr
new file mode 100644
index 00000000000..c6a0e1b282f
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-51545.nll.stderr
@@ -0,0 +1,15 @@
+error[E0499]: cannot borrow `*o` as mutable more than once at a time
+  --> $DIR/nll-problem-case-3-issue-51545.rs:17:17
+   |
+LL | fn borrow(o: &mut Option<i32>) -> Option<&mut i32> {
+   |              - let's call the lifetime of this reference `'1`
+LL |     match o.as_mut() {
+   |           - first mutable borrow occurs here
+LL |         Some(i) => Some(i),
+   |                    ------- returning this value requires that `*o` is borrowed for `'1`
+LL |         None => o.as_mut(),
+   |                 ^ second mutable borrow occurs here
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-51545.rs b/tests/ui/nll/polonius/nll-problem-case-3-issue-51545.rs
new file mode 100644
index 00000000000..786a8b564b9
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-51545.rs
@@ -0,0 +1,28 @@
+// This is part of a collection of regression tests related to the NLL problem case 3 that was
+// deferred from the implementation of the NLL RFC, and left to be implemented by polonius. They are
+// from open issues, e.g. tagged fixed-by-polonius, to ensure that the polonius alpha analysis does
+// handle them, as does the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #51545
+//@ [polonius] check-pass
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+fn borrow(o: &mut Option<i32>) -> Option<&mut i32> {
+    match o.as_mut() {
+        Some(i) => Some(i),
+        None => o.as_mut(),
+    }
+}
+
+fn main() {
+    let mut o: Option<i32> = Some(1i32);
+
+    let x = match o.as_mut() {
+        Some(i) => Some(i),
+        None => o.as_mut(),
+    };
+}
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-54663.nll.stderr b/tests/ui/nll/polonius/nll-problem-case-3-issue-54663.nll.stderr
new file mode 100644
index 00000000000..fd6fa7632d5
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-54663.nll.stderr
@@ -0,0 +1,16 @@
+error[E0499]: cannot borrow `*x` as mutable more than once at a time
+  --> $DIR/nll-problem-case-3-issue-54663.rs:20:9
+   |
+LL | fn foo(x: &mut u8) -> Option<&u8> {
+   |           - let's call the lifetime of this reference `'1`
+LL |     if let Some(y) = bar(x) {
+   |                          - first mutable borrow occurs here
+LL |         return Some(y);
+   |                ------- returning this value requires that `*x` is borrowed for `'1`
+LL |     }
+LL |     bar(x)
+   |         ^ second mutable borrow occurs here
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-54663.rs b/tests/ui/nll/polonius/nll-problem-case-3-issue-54663.rs
new file mode 100644
index 00000000000..b4d571fb9c7
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-54663.rs
@@ -0,0 +1,25 @@
+#![crate_type = "lib"]
+
+// This is part of a collection of regression tests related to the NLL problem case 3 that was
+// deferred from the implementation of the NLL RFC, and left to be implemented by polonius. They are
+// from open issues, e.g. tagged fixed-by-polonius, to ensure that the polonius alpha analysis does
+// handle them, as does the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #54663
+//@ [polonius] check-pass
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+fn foo(x: &mut u8) -> Option<&u8> {
+    if let Some(y) = bar(x) {
+        return Some(y);
+    }
+    bar(x)
+}
+
+fn bar(x: &mut u8) -> Option<&u8> {
+    Some(x)
+}
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-58787.nll.stderr b/tests/ui/nll/polonius/nll-problem-case-3-issue-58787.nll.stderr
new file mode 100644
index 00000000000..53002892df1
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-58787.nll.stderr
@@ -0,0 +1,112 @@
+error[E0503]: cannot use `list.0` because it was mutably borrowed
+  --> $DIR/nll-problem-case-3-issue-58787.rs:34:11
+   |
+LL |         Some(ref mut d) => {
+   |              --------- `list.0.0` is borrowed here
+...
+LL |     match list.0 {
+   |           ^^^^^^
+   |           |
+   |           use of borrowed `list.0.0`
+   |           borrow later used here
+
+error[E0499]: cannot borrow `list.0.0` as mutable more than once at a time
+  --> $DIR/nll-problem-case-3-issue-58787.rs:35:14
+   |
+LL |         Some(ref mut d) => {
+   |              --------- first mutable borrow occurs here
+...
+LL |         Some(ref mut d) => {
+   |              ^^^^^^^^^
+   |              |
+   |              second mutable borrow occurs here
+   |              first borrow later used here
+
+error[E0503]: cannot use `list.0` because it was mutably borrowed
+  --> $DIR/nll-problem-case-3-issue-58787.rs:41:11
+   |
+LL |         Some(ref mut d) => {
+   |              --------- `list.0.0` is borrowed here
+...
+LL |     match list {
+   |           ^^^^
+   |           |
+   |           use of borrowed `list.0.0`
+   |           borrow later used here
+
+error[E0499]: cannot borrow `list.0.0` as mutable more than once at a time
+  --> $DIR/nll-problem-case-3-issue-58787.rs:42:19
+   |
+LL |         Some(ref mut d) => {
+   |              --------- first mutable borrow occurs here
+...
+LL |         List(Some(d)) => {
+   |                   ^
+   |                   |
+   |                   second mutable borrow occurs here
+   |                   first borrow later used here
+
+error[E0503]: cannot use `list.0` because it was mutably borrowed
+  --> $DIR/nll-problem-case-3-issue-58787.rs:50:11
+   |
+LL |         List(Some(d)) => {
+   |                   - `list.0.0` is borrowed here
+...
+LL |     match list {
+   |           ^^^^
+   |           |
+   |           use of borrowed `list.0.0`
+   |           borrow later used here
+
+error[E0499]: cannot borrow `list.0.0` as mutable more than once at a time
+  --> $DIR/nll-problem-case-3-issue-58787.rs:51:19
+   |
+LL |         List(Some(d)) => {
+   |                   - first mutable borrow occurs here
+...
+LL |         List(Some(d)) => {
+   |                   ^
+   |                   |
+   |                   second mutable borrow occurs here
+   |                   first borrow later used here
+
+error[E0499]: cannot borrow `list.0` as mutable more than once at a time
+  --> $DIR/nll-problem-case-3-issue-58787.rs:57:11
+   |
+LL |         List(Some(d)) => {
+   |                   - first mutable borrow occurs here
+...
+LL |     match &mut list.0 {
+   |           ^^^^^^^^^^^
+   |           |
+   |           second mutable borrow occurs here
+   |           first borrow later used here
+
+error[E0499]: cannot borrow `list.0` as mutable more than once at a time
+  --> $DIR/nll-problem-case-3-issue-58787.rs:66:11
+   |
+LL |     match &mut list.0 {
+   |           ----------- first mutable borrow occurs here
+...
+LL |     match &mut list.0 {
+   |           ^^^^^^^^^^^
+   |           |
+   |           second mutable borrow occurs here
+   |           first borrow later used here
+
+error[E0506]: cannot assign to `list.0` because it is borrowed
+  --> $DIR/nll-problem-case-3-issue-58787.rs:73:5
+   |
+LL |     match &mut list.0 {
+   |           ----------- `list.0` is borrowed here
+...
+LL |     list.0 = None;
+   |     ^^^^^^
+   |     |
+   |     `list.0` is assigned to here but it was already borrowed
+   |     borrow later used here
+
+error: aborting due to 9 previous errors
+
+Some errors have detailed explanations: E0499, E0503, E0506.
+For more information about an error, try `rustc --explain E0499`.
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-58787.rs b/tests/ui/nll/polonius/nll-problem-case-3-issue-58787.rs
new file mode 100644
index 00000000000..75552e24219
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-58787.rs
@@ -0,0 +1,74 @@
+#![crate_type = "lib"]
+
+// This is part of a collection of regression tests related to the NLL problem case 3 that was
+// deferred from the implementation of the NLL RFC, and left to be implemented by polonius. They are
+// from open issues, e.g. tagged fixed-by-polonius, to ensure that the polonius alpha analysis does
+// handle them, as does the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #58787
+//@ [polonius] check-pass
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+struct Node {
+    rest: List,
+}
+
+struct List(Option<Box<Node>>);
+
+fn issue_58787(arg: &mut List) {
+    let mut list = arg;
+
+    match list.0 {
+        Some(ref mut d) => {
+            if true {
+                list = &mut d.rest;
+            }
+        }
+        None => (),
+    }
+
+    match list.0 {
+        Some(ref mut d) => {
+            list = &mut d.rest;
+        }
+        None => (),
+    }
+
+    match list {
+        List(Some(d)) => {
+            if true {
+                list = &mut d.rest;
+            }
+        }
+        List(None) => (),
+    }
+
+    match list {
+        List(Some(d)) => {
+            list = &mut d.rest;
+        }
+        List(None) => (),
+    }
+
+    match &mut list.0 {
+        Some(d) => {
+            if true {
+                list = &mut d.rest;
+            }
+        }
+        None => (),
+    }
+
+    match &mut list.0 {
+        Some(d) => {
+            list = &mut d.rest;
+        }
+        None => (),
+    }
+
+    list.0 = None;
+}
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-68934.nll.stderr b/tests/ui/nll/polonius/nll-problem-case-3-issue-68934.nll.stderr
new file mode 100644
index 00000000000..212355790bf
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-68934.nll.stderr
@@ -0,0 +1,17 @@
+error[E0505]: cannot move out of value because it is borrowed
+  --> $DIR/nll-problem-case-3-issue-68934.rs:35:14
+   |
+LL |     fn deep_fetch(&mut self, value: Either<A, B>) -> Result<&mut Self, (&mut Self, Either<A, B>)> {
+   |                   - let's call the lifetime of this reference `'1`
+LL |         match (self, value) {
+LL |             (Tree::ABranch(ref mut a, ref v), Either::Left(vv)) if v > &vv => {
+   |                            --------- borrow of value occurs here
+LL |                 a.deep_fetch(Either::Left(vv))
+   |                 ------------------------------ returning this value requires that borrow lasts for `'1`
+...
+LL |             (this, _v) => Err((this, _v)),
+   |              ^^^^ move out of value occurs here
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0505`.
diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-68934.rs b/tests/ui/nll/polonius/nll-problem-case-3-issue-68934.rs
new file mode 100644
index 00000000000..ba941510116
--- /dev/null
+++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-68934.rs
@@ -0,0 +1,38 @@
+#![crate_type = "lib"]
+
+// This is part of a collection of regression tests related to the NLL problem case 3 that was
+// deferred from the implementation of the NLL RFC, and left to be implemented by polonius. They are
+// from open issues, e.g. tagged fixed-by-polonius, to ensure that the polonius alpha analysis does
+// handle them, as does the datalog implementation.
+
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius legacy
+//@ [nll] known-bug: #68934
+//@ [polonius] check-pass
+//@ [polonius] compile-flags: -Z polonius=next
+//@ [legacy] check-pass
+//@ [legacy] compile-flags: -Z polonius=legacy
+
+enum Either<A, B> {
+    Left(A),
+    Right(B),
+}
+
+enum Tree<'a, A, B> {
+    ALeaf(A),
+    BLeaf(B),
+    ABranch(&'a mut Tree<'a, A, B>, A),
+    BBranch(&'a mut Tree<'a, A, B>, B),
+}
+
+impl<'a, A: PartialOrd, B> Tree<'a, A, B> {
+    fn deep_fetch(&mut self, value: Either<A, B>) -> Result<&mut Self, (&mut Self, Either<A, B>)> {
+        match (self, value) {
+            (Tree::ABranch(ref mut a, ref v), Either::Left(vv)) if v > &vv => {
+                a.deep_fetch(Either::Left(vv))
+            }
+
+            (this, _v) => Err((this, _v)),
+        }
+    }
+}
diff --git a/tests/ui/issues/issue-32805.rs b/tests/ui/numbers-arithmetic/f32-literal-rounding-32805.rs
index 717c00a248a..59efdb9a1aa 100644
--- a/tests/ui/issues/issue-32805.rs
+++ b/tests/ui/numbers-arithmetic/f32-literal-rounding-32805.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/32805
 //@ run-pass
 fn const_mir() -> f32 { 9007199791611905.0 }
 
diff --git a/tests/ui/numbers-arithmetic/overflowing-add.rs b/tests/ui/numbers-arithmetic/overflowing-add.rs
index c1f498c802b..a63fc3bccf1 100644
--- a/tests/ui/numbers-arithmetic/overflowing-add.rs
+++ b/tests/ui/numbers-arithmetic/overflowing-add.rs
@@ -1,6 +1,6 @@
 //@ run-fail
-//@ error-pattern:thread 'main' panicked
-//@ error-pattern:attempt to add with overflow
+//@ regex-error-pattern: thread 'main'.*panicked
+//@ error-pattern: attempt to add with overflow
 //@ compile-flags: -C debug-assertions
 //@ needs-subprocess
 
diff --git a/tests/ui/numbers-arithmetic/overflowing-mul.rs b/tests/ui/numbers-arithmetic/overflowing-mul.rs
index 0eece536929..2645a32d5ad 100644
--- a/tests/ui/numbers-arithmetic/overflowing-mul.rs
+++ b/tests/ui/numbers-arithmetic/overflowing-mul.rs
@@ -1,6 +1,6 @@
 //@ run-fail
-//@ error-pattern:thread 'main' panicked
-//@ error-pattern:attempt to multiply with overflow
+//@ regex-error-pattern: thread 'main'.*panicked
+//@ error-pattern: attempt to multiply with overflow
 //@ needs-subprocess
 //@ compile-flags: -C debug-assertions
 
diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs b/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs
index 28deb7cf6ba..6db6682e16f 100644
--- a/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs
+++ b/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs
@@ -1,6 +1,6 @@
 //@ run-fail
-//@ error-pattern:thread 'main' panicked
-//@ error-pattern:attempt to multiply with overflow
+//@ regex-error-pattern: thread 'main'.*panicked
+//@ error-pattern: attempt to multiply with overflow
 //@ needs-subprocess
 //@ compile-flags: -C debug-assertions
 
diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs
index dea9a4d5428..bde0de6f6f5 100644
--- a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs
+++ b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs
@@ -1,6 +1,6 @@
 //@ run-fail
-//@ error-pattern:thread 'main' panicked
-//@ error-pattern:attempt to multiply with overflow
+//@ regex-error-pattern: thread 'main'.*panicked
+//@ error-pattern: attempt to multiply with overflow
 //@ needs-subprocess
 //@ compile-flags: -C debug-assertions
 
diff --git a/tests/ui/numbers-arithmetic/overflowing-sub.rs b/tests/ui/numbers-arithmetic/overflowing-sub.rs
index 88b1b693f63..1718fccad7a 100644
--- a/tests/ui/numbers-arithmetic/overflowing-sub.rs
+++ b/tests/ui/numbers-arithmetic/overflowing-sub.rs
@@ -1,6 +1,6 @@
 //@ run-fail
-//@ error-pattern:thread 'main' panicked
-//@ error-pattern:attempt to subtract with overflow
+//@ regex-error-pattern: thread 'main'.*panicked
+//@ error-pattern: attempt to subtract with overflow
 //@ needs-subprocess
 //@ compile-flags: -C debug-assertions
 
diff --git a/tests/ui/offset-of/offset-of-tuple-field.stderr b/tests/ui/offset-of/offset-of-tuple-field.stderr
index 4da0d851650..01622c5fa2d 100644
--- a/tests/ui/offset-of/offset-of-tuple-field.stderr
+++ b/tests/ui/offset-of/offset-of-tuple-field.stderr
@@ -15,60 +15,96 @@ error[E0609]: no field `_0` on type `(u8, u8)`
    |
 LL |     offset_of!((u8, u8), _0);
    |                          ^^
+   |
+help: a field with a similar name exists
+   |
+LL -     offset_of!((u8, u8), _0);
+LL +     offset_of!((u8, u8), 0);
+   |
 
 error[E0609]: no field `01` on type `(u8, u8)`
   --> $DIR/offset-of-tuple-field.rs:7:26
    |
 LL |     offset_of!((u8, u8), 01);
    |                          ^^
+   |
+   = note: available fields are: `0`, `1`
 
 error[E0609]: no field `1e2` on type `(u8, u8)`
   --> $DIR/offset-of-tuple-field.rs:8:26
    |
 LL |     offset_of!((u8, u8), 1e2);
    |                          ^^^
+   |
+   = note: available fields are: `0`, `1`
 
 error[E0609]: no field `1_` on type `(u8, u8)`
   --> $DIR/offset-of-tuple-field.rs:9:26
    |
 LL |     offset_of!((u8, u8), 1_u8);
    |                          ^^^^
+   |
+help: a field with a similar name exists
+   |
+LL -     offset_of!((u8, u8), 1_u8);
+LL +     offset_of!((u8, u8), 1);
+   |
 
 error[E0609]: no field `1e2` on type `(u8, u8)`
   --> $DIR/offset-of-tuple-field.rs:12:35
    |
 LL |     builtin # offset_of((u8, u8), 1e2);
    |                                   ^^^
+   |
+   = note: available fields are: `0`, `1`
 
 error[E0609]: no field `_0` on type `(u8, u8)`
   --> $DIR/offset-of-tuple-field.rs:13:35
    |
 LL |     builtin # offset_of((u8, u8), _0);
    |                                   ^^
+   |
+help: a field with a similar name exists
+   |
+LL -     builtin # offset_of((u8, u8), _0);
+LL +     builtin # offset_of((u8, u8), 0);
+   |
 
 error[E0609]: no field `01` on type `(u8, u8)`
   --> $DIR/offset-of-tuple-field.rs:14:35
    |
 LL |     builtin # offset_of((u8, u8), 01);
    |                                   ^^
+   |
+   = note: available fields are: `0`, `1`
 
 error[E0609]: no field `1_` on type `(u8, u8)`
   --> $DIR/offset-of-tuple-field.rs:15:35
    |
 LL |     builtin # offset_of((u8, u8), 1_u8);
    |                                   ^^^^
+   |
+help: a field with a similar name exists
+   |
+LL -     builtin # offset_of((u8, u8), 1_u8);
+LL +     builtin # offset_of((u8, u8), 1);
+   |
 
 error[E0609]: no field `2` on type `(u8, u16)`
   --> $DIR/offset-of-tuple-field.rs:18:47
    |
 LL |     offset_of!(((u8, u16), (u32, u16, u8)), 0.2);
    |                                               ^
+   |
+   = note: available fields are: `0`, `1`
 
 error[E0609]: no field `1e2` on type `(u8, u16)`
   --> $DIR/offset-of-tuple-field.rs:19:47
    |
 LL |     offset_of!(((u8, u16), (u32, u16, u8)), 0.1e2);
    |                                               ^^^
+   |
+   = note: available fields are: `0`, `1`
 
 error[E0609]: no field `0` on type `u8`
   --> $DIR/offset-of-tuple-field.rs:21:49
diff --git a/tests/ui/issues/issue-14915.rs b/tests/ui/operator-recovery/box-arithmetic-14915.rs
index 127b909dd63..0e6f0762998 100644
--- a/tests/ui/issues/issue-14915.rs
+++ b/tests/ui/operator-recovery/box-arithmetic-14915.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14915
+
 fn main() {
     let x: Box<isize> = Box::new(0);
 
diff --git a/tests/ui/issues/issue-14915.stderr b/tests/ui/operator-recovery/box-arithmetic-14915.stderr
index 3558bd651c6..1dd80472bb8 100644
--- a/tests/ui/issues/issue-14915.stderr
+++ b/tests/ui/operator-recovery/box-arithmetic-14915.stderr
@@ -1,5 +1,5 @@
 error[E0369]: cannot add `{integer}` to `Box<isize>`
-  --> $DIR/issue-14915.rs:4:22
+  --> $DIR/box-arithmetic-14915.rs:6:22
    |
 LL |     println!("{}", x + 1);
    |                    - ^ - {integer}
diff --git a/tests/ui/issues/issue-99838.rs b/tests/ui/packed/misaligned-reference-drop-field-99838.rs
index 687b47fbe71..58e168162cb 100644
--- a/tests/ui/issues/issue-99838.rs
+++ b/tests/ui/packed/misaligned-reference-drop-field-99838.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/99838
 //@ run-pass
 
 use std::hint;
diff --git a/tests/ui/panics/fmt-only-once.run.stderr b/tests/ui/panics/fmt-only-once.run.stderr
index faa3cc91151..f0124e4cb77 100644
--- a/tests/ui/panics/fmt-only-once.run.stderr
+++ b/tests/ui/panics/fmt-only-once.run.stderr
@@ -1,5 +1,5 @@
 fmt
 
-thread 'main' panicked at $DIR/fmt-only-once.rs:20:5:
+thread 'main' ($TID) panicked at $DIR/fmt-only-once.rs:20:5:
 PrintOnFmt
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/panics/issue-47429-short-backtraces.run.stderr b/tests/ui/panics/issue-47429-short-backtraces.run.stderr
index 32dc6592271..13b59a7c7af 100644
--- a/tests/ui/panics/issue-47429-short-backtraces.run.stderr
+++ b/tests/ui/panics/issue-47429-short-backtraces.run.stderr
@@ -1,5 +1,5 @@
 
-thread 'main' panicked at $DIR/issue-47429-short-backtraces.rs:24:5:
+thread 'main' ($TID) panicked at $DIR/issue-47429-short-backtraces.rs:24:5:
 explicit panic
 stack backtrace:
    0: std::panicking::begin_panic
diff --git a/tests/ui/panics/location-detail-panic-no-column.run.stderr b/tests/ui/panics/location-detail-panic-no-column.run.stderr
index f63c09652b8..8f43936a0af 100644
--- a/tests/ui/panics/location-detail-panic-no-column.run.stderr
+++ b/tests/ui/panics/location-detail-panic-no-column.run.stderr
@@ -1,4 +1,4 @@
 
-thread 'main' panicked at $DIR/location-detail-panic-no-column.rs:7:0:
+thread 'main' ($TID) panicked at $DIR/location-detail-panic-no-column.rs:7:0:
 column-redacted
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/panics/location-detail-panic-no-file.run.stderr b/tests/ui/panics/location-detail-panic-no-file.run.stderr
index 3d1c6defa31..8d0ee148006 100644
--- a/tests/ui/panics/location-detail-panic-no-file.run.stderr
+++ b/tests/ui/panics/location-detail-panic-no-file.run.stderr
@@ -1,4 +1,4 @@
 
-thread 'main' panicked at <redacted>:7:5:
+thread 'main' ($TID) panicked at <redacted>:7:5:
 file-redacted
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/panics/location-detail-panic-no-line.run.stderr b/tests/ui/panics/location-detail-panic-no-line.run.stderr
index 9809ab5e2b4..79f5c012b8a 100644
--- a/tests/ui/panics/location-detail-panic-no-line.run.stderr
+++ b/tests/ui/panics/location-detail-panic-no-line.run.stderr
@@ -1,4 +1,4 @@
 
-thread 'main' panicked at $DIR/location-detail-panic-no-line.rs:0:5:
+thread 'main' ($TID) panicked at $DIR/location-detail-panic-no-line.rs:0:5:
 line-redacted
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/panics/location-detail-panic-no-location-info.run.stderr b/tests/ui/panics/location-detail-panic-no-location-info.run.stderr
index f68a0d663c0..12b3e1b53e3 100644
--- a/tests/ui/panics/location-detail-panic-no-location-info.run.stderr
+++ b/tests/ui/panics/location-detail-panic-no-location-info.run.stderr
@@ -1,4 +1,4 @@
 
-thread 'main' panicked at <redacted>:0:0:
+thread 'main' ($TID) panicked at <redacted>:0:0:
 no location info
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/panics/location-detail-unwrap-no-file.run.stderr b/tests/ui/panics/location-detail-unwrap-no-file.run.stderr
index af4a4997fae..a4a87423cdc 100644
--- a/tests/ui/panics/location-detail-unwrap-no-file.run.stderr
+++ b/tests/ui/panics/location-detail-unwrap-no-file.run.stderr
@@ -1,4 +1,4 @@
 
-thread 'main' panicked at <redacted>:8:9:
+thread 'main' ($TID) panicked at <redacted>:8:9:
 called `Option::unwrap()` on a `None` value
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/panics/main-panic.rs b/tests/ui/panics/main-panic.rs
index 0b3d5c3aaec..9f2a92da90f 100644
--- a/tests/ui/panics/main-panic.rs
+++ b/tests/ui/panics/main-panic.rs
@@ -1,5 +1,5 @@
 //@ run-fail
-//@ error-pattern:thread 'main' panicked at
+//@ regex-error-pattern: thread 'main' \(\d+\) panicked at
 //@ needs-subprocess
 
 fn main() {
diff --git a/tests/ui/panics/panic-in-cleanup.run.stderr b/tests/ui/panics/panic-in-cleanup.run.stderr
index 34383562c36..bfe3dc8c9d7 100644
--- a/tests/ui/panics/panic-in-cleanup.run.stderr
+++ b/tests/ui/panics/panic-in-cleanup.run.stderr
@@ -1,12 +1,12 @@
 
-thread 'main' panicked at $DIR/panic-in-cleanup.rs:22:5:
+thread 'main' ($TID) panicked at $DIR/panic-in-cleanup.rs:22:5:
 explicit panic
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
-thread 'main' panicked at $DIR/panic-in-cleanup.rs:16:9:
+thread 'main' ($TID) panicked at $DIR/panic-in-cleanup.rs:16:9:
 BOOM
 stack backtrace:
 
-thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+thread 'main' ($TID) panicked at library/core/src/panicking.rs:$LINE:$COL:
 panic in a destructor during cleanup
 thread caused non-unwinding panic. aborting.
diff --git a/tests/ui/panics/panic-in-ffi.run.stderr b/tests/ui/panics/panic-in-ffi.run.stderr
index a6f3ebe5657..ce907d64358 100644
--- a/tests/ui/panics/panic-in-ffi.run.stderr
+++ b/tests/ui/panics/panic-in-ffi.run.stderr
@@ -1,10 +1,10 @@
 
-thread 'main' panicked at $DIR/panic-in-ffi.rs:21:5:
+thread 'main' ($TID) panicked at $DIR/panic-in-ffi.rs:21:5:
 Test
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 Noisy Drop
 
-thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+thread 'main' ($TID) panicked at library/core/src/panicking.rs:$LINE:$COL:
 panic in a function that cannot unwind
 stack backtrace:
 thread caused non-unwinding panic. aborting.
diff --git a/tests/ui/panics/panic-set-unset-handler.rs b/tests/ui/panics/panic-set-unset-handler.rs
index 66d5003d0f1..4f646020037 100644
--- a/tests/ui/panics/panic-set-unset-handler.rs
+++ b/tests/ui/panics/panic-set-unset-handler.rs
@@ -1,6 +1,6 @@
 //@ run-fail
-//@ error-pattern:thread 'main' panicked
-//@ error-pattern:foobar
+//@ regex-error-pattern: thread 'main' \(\d+\) panicked
+//@ error-pattern: foobar
 //@ needs-subprocess
 
 use std::panic;
diff --git a/tests/ui/panics/panic-short-backtrace-windows-x86_64.run.stderr b/tests/ui/panics/panic-short-backtrace-windows-x86_64.run.stderr
index 799a8b30e99..c3c1ce16a4b 100644
--- a/tests/ui/panics/panic-short-backtrace-windows-x86_64.run.stderr
+++ b/tests/ui/panics/panic-short-backtrace-windows-x86_64.run.stderr
@@ -1,4 +1,4 @@
-thread 'main' panicked at 'd was called', $DIR/panic-short-backtrace-windows-x86_64.rs:48:5
+thread 'main' ($TID) panicked at 'd was called', $DIR/panic-short-backtrace-windows-x86_64.rs:48:5
 stack backtrace:
    0: std::panicking::begin_panic
    1: d
diff --git a/tests/ui/panics/panic-take-handler-nop.rs b/tests/ui/panics/panic-take-handler-nop.rs
index f10582872df..ebea3ef0685 100644
--- a/tests/ui/panics/panic-take-handler-nop.rs
+++ b/tests/ui/panics/panic-take-handler-nop.rs
@@ -1,6 +1,6 @@
 //@ run-fail
-//@ error-pattern:thread 'main' panicked
-//@ error-pattern:foobar
+//@ regex-error-pattern: thread 'main' \(\d+\) panicked
+//@ error-pattern: foobar
 //@ needs-subprocess
 
 use std::panic;
diff --git a/tests/ui/panics/panic-task-name-none.rs b/tests/ui/panics/panic-task-name-none.rs
index 8695771ff5e..4471cd6795c 100644
--- a/tests/ui/panics/panic-task-name-none.rs
+++ b/tests/ui/panics/panic-task-name-none.rs
@@ -1,14 +1,14 @@
 //@ run-fail
-//@ error-pattern:thread '<unnamed>' panicked
-//@ error-pattern:test
+//@ regex-error-pattern: thread '<unnamed>' \(\d+\) panicked
+//@ error-pattern: test
 //@ needs-threads
 
 use std::thread;
 
 fn main() {
     let r: Result<(), _> = thread::spawn(move || {
-                               panic!("test");
-                           })
-                               .join();
+        panic!("test");
+    })
+    .join();
     assert!(r.is_ok());
 }
diff --git a/tests/ui/panics/panic-task-name-owned.rs b/tests/ui/panics/panic-task-name-owned.rs
index 42ae33b5d35..084ac90512a 100644
--- a/tests/ui/panics/panic-task-name-owned.rs
+++ b/tests/ui/panics/panic-task-name-owned.rs
@@ -1,19 +1,19 @@
 //@ run-fail
-//@ error-pattern:thread 'owned name' panicked
-//@ error-pattern:test
+//@ regex-error-pattern: thread 'owned name' \(\d+\) panicked
+//@ error-pattern: test
 //@ needs-threads
 
 use std::thread::Builder;
 
 fn main() {
     let r: () = Builder::new()
-                    .name("owned name".to_string())
-                    .spawn(move || {
-                        panic!("test");
-                        ()
-                    })
-                    .unwrap()
-                    .join()
-                    .unwrap();
+        .name("owned name".to_string())
+        .spawn(move || {
+            panic!("test");
+            ()
+        })
+        .unwrap()
+        .join()
+        .unwrap();
     panic!();
 }
diff --git a/tests/ui/panics/runtime-switch.run.stderr b/tests/ui/panics/runtime-switch.run.stderr
index 70ed127af86..f3f60445952 100644
--- a/tests/ui/panics/runtime-switch.run.stderr
+++ b/tests/ui/panics/runtime-switch.run.stderr
@@ -1,5 +1,5 @@
 
-thread 'main' panicked at $DIR/runtime-switch.rs:28:5:
+thread 'main' ($TID) panicked at $DIR/runtime-switch.rs:28:5:
 explicit panic
 stack backtrace:
    0: std::panicking::begin_panic
diff --git a/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr b/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr
index 664d51e185d..584b477f3a7 100644
--- a/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr
+++ b/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr
@@ -1,5 +1,5 @@
 
-thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:62:5:
+thread 'main' ($TID) panicked at $DIR/short-ice-remove-middle-frames-2.rs:62:5:
 debug!!!
 stack backtrace:
    0: std::panicking::begin_panic
diff --git a/tests/ui/panics/short-ice-remove-middle-frames.run.stderr b/tests/ui/panics/short-ice-remove-middle-frames.run.stderr
index e966462331f..1efcb7d5304 100644
--- a/tests/ui/panics/short-ice-remove-middle-frames.run.stderr
+++ b/tests/ui/panics/short-ice-remove-middle-frames.run.stderr
@@ -1,5 +1,5 @@
 
-thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:58:5:
+thread 'main' ($TID) panicked at $DIR/short-ice-remove-middle-frames.rs:58:5:
 debug!!!
 stack backtrace:
    0: std::panicking::begin_panic
diff --git a/tests/ui/parser/attribute-on-empty.rs b/tests/ui/parser/attribute-on-empty.rs
new file mode 100644
index 00000000000..5932377f73e
--- /dev/null
+++ b/tests/ui/parser/attribute-on-empty.rs
@@ -0,0 +1,29 @@
+//! Regression test for: <https://github.com/rust-lang/rust/issues/144132>
+//!                      <https://github.com/rust-lang/rust/issues/135017>
+
+struct Baz<const N: usize>(i32);
+
+fn main() {
+    let _: Baz<#[cfg(any())]> = todo!();
+    //~^ ERROR attributes cannot be applied here
+}
+
+fn f(_param: #[attr]) {}
+//~^ ERROR attributes cannot be applied to a function parameter's type
+//~| ERROR expected type, found `)`
+
+fn g() -> #[attr] { 0 }
+//~^ ERROR attributes cannot be applied here
+
+struct S {
+    field: #[attr],
+    //~^ ERROR attributes cannot be applied here
+    field1: (#[attr], i32),
+    //~^ ERROR attributes cannot be applied here
+}
+
+type Tuple = (#[attr], String);
+//~^ ERROR attributes cannot be applied here
+
+impl #[attr] {}
+//~^ ERROR attributes cannot be applied here
diff --git a/tests/ui/parser/attribute-on-empty.stderr b/tests/ui/parser/attribute-on-empty.stderr
new file mode 100644
index 00000000000..7c4806c8704
--- /dev/null
+++ b/tests/ui/parser/attribute-on-empty.stderr
@@ -0,0 +1,52 @@
+error: attributes cannot be applied here
+  --> $DIR/attribute-on-empty.rs:7:16
+   |
+LL |     let _: Baz<#[cfg(any())]> = todo!();
+   |          -     ^^^^^^^^^^^^^ attributes are not allowed here
+   |          |
+   |          while parsing the type for `_`
+
+error: attributes cannot be applied to a function parameter's type
+  --> $DIR/attribute-on-empty.rs:11:14
+   |
+LL | fn f(_param: #[attr]) {}
+   |              ^^^^^^^ attributes are not allowed here
+
+error: expected type, found `)`
+  --> $DIR/attribute-on-empty.rs:11:21
+   |
+LL | fn f(_param: #[attr]) {}
+   |                     ^ expected type
+
+error: attributes cannot be applied here
+  --> $DIR/attribute-on-empty.rs:15:11
+   |
+LL | fn g() -> #[attr] { 0 }
+   |           ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied here
+  --> $DIR/attribute-on-empty.rs:19:12
+   |
+LL |     field: #[attr],
+   |            ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied here
+  --> $DIR/attribute-on-empty.rs:21:14
+   |
+LL |     field1: (#[attr], i32),
+   |              ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied here
+  --> $DIR/attribute-on-empty.rs:25:15
+   |
+LL | type Tuple = (#[attr], String);
+   |               ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied here
+  --> $DIR/attribute-on-empty.rs:28:6
+   |
+LL | impl #[attr] {}
+   |      ^^^^^^^ attributes are not allowed here
+
+error: aborting due to 8 previous errors
+
diff --git a/tests/ui/parser/attribute-on-type.fixed b/tests/ui/parser/attribute-on-type.fixed
new file mode 100644
index 00000000000..5024bfdc2bc
--- /dev/null
+++ b/tests/ui/parser/attribute-on-type.fixed
@@ -0,0 +1,58 @@
+//! Regression test for: <https://github.com/rust-lang/rust/issues/144132>
+//!                      <https://github.com/rust-lang/rust/issues/135017>
+
+//@ run-rustfix
+
+#![allow(dead_code, unused_variables)]
+
+struct Foo<T>(T);
+struct Bar<'a>(&'a i32);
+struct Baz<const N: usize>(i32);
+
+fn main() {
+    let foo: Foo<i32> = Foo(2i32);
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _: &'static str = "123";
+    //~^ ERROR attributes cannot be applied to types
+
+    let _: Bar<'static> = Bar(&123);
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _: Baz<42> = Baz(42);
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _: Foo<String> = Foo(String::new());
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _: Bar<'static> = Bar(&456);
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _generic: Box<i32> = Box::new(1);
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _assignment: i32 = *Box::new(1);
+    //~^ ERROR attributes cannot be applied to types
+
+    let _complex: Vec<String> = vec![];
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _nested: Box<Vec<u64>> = Box::new(vec![]);
+    //~^ ERROR attributes cannot be applied to generic arguments
+}
+
+fn g() -> i32 { 0 }
+//~^ ERROR attributes cannot be applied to types
+
+struct S {
+    field: i32,
+    //~^ ERROR attributes cannot be applied to types
+    field1: (i32, i32),
+    //~^ ERROR attributes cannot be applied to types
+}
+
+type Tuple = (i32, String);
+//~^ ERROR attributes cannot be applied to types
+
+impl S {}
+//~^ ERROR attributes cannot be applied to types
diff --git a/tests/ui/parser/attribute-on-type.rs b/tests/ui/parser/attribute-on-type.rs
new file mode 100644
index 00000000000..196d322bdf8
--- /dev/null
+++ b/tests/ui/parser/attribute-on-type.rs
@@ -0,0 +1,58 @@
+//! Regression test for: <https://github.com/rust-lang/rust/issues/144132>
+//!                      <https://github.com/rust-lang/rust/issues/135017>
+
+//@ run-rustfix
+
+#![allow(dead_code, unused_variables)]
+
+struct Foo<T>(T);
+struct Bar<'a>(&'a i32);
+struct Baz<const N: usize>(i32);
+
+fn main() {
+    let foo: Foo<#[cfg(not(wrong))] i32> = Foo(2i32);
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _: #[attr] &'static str = "123";
+    //~^ ERROR attributes cannot be applied to types
+
+    let _: Bar<#[cfg(any())] 'static> = Bar(&123);
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _: Baz<#[cfg(any())] 42> = Baz(42);
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _: Foo<#[cfg(not(wrong))]String> = Foo(String::new());
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _: Bar<#[cfg(any())]       'static> = Bar(&456);
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _generic: Box<#[attr] i32> = Box::new(1);
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _assignment: #[attr] i32 = *Box::new(1);
+    //~^ ERROR attributes cannot be applied to types
+
+    let _complex: Vec<#[derive(Debug)] String> = vec![];
+    //~^ ERROR attributes cannot be applied to generic arguments
+
+    let _nested: Box<Vec<#[cfg(feature = "test")] u64>> = Box::new(vec![]);
+    //~^ ERROR attributes cannot be applied to generic arguments
+}
+
+fn g() -> #[attr] i32 { 0 }
+//~^ ERROR attributes cannot be applied to types
+
+struct S {
+    field: #[attr] i32,
+    //~^ ERROR attributes cannot be applied to types
+    field1: (#[attr] i32, i32),
+    //~^ ERROR attributes cannot be applied to types
+}
+
+type Tuple = (#[attr] i32, String);
+//~^ ERROR attributes cannot be applied to types
+
+impl #[attr] S {}
+//~^ ERROR attributes cannot be applied to types
diff --git a/tests/ui/parser/attribute-on-type.stderr b/tests/ui/parser/attribute-on-type.stderr
new file mode 100644
index 00000000000..603c7e2be51
--- /dev/null
+++ b/tests/ui/parser/attribute-on-type.stderr
@@ -0,0 +1,92 @@
+error: attributes cannot be applied to generic arguments
+  --> $DIR/attribute-on-type.rs:13:18
+   |
+LL |     let foo: Foo<#[cfg(not(wrong))] i32> = Foo(2i32);
+   |                  ^^^^^^^^^^^^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to types
+  --> $DIR/attribute-on-type.rs:16:12
+   |
+LL |     let _: #[attr] &'static str = "123";
+   |            ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to generic arguments
+  --> $DIR/attribute-on-type.rs:19:16
+   |
+LL |     let _: Bar<#[cfg(any())] 'static> = Bar(&123);
+   |                ^^^^^^^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to generic arguments
+  --> $DIR/attribute-on-type.rs:22:16
+   |
+LL |     let _: Baz<#[cfg(any())] 42> = Baz(42);
+   |                ^^^^^^^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to generic arguments
+  --> $DIR/attribute-on-type.rs:25:16
+   |
+LL |     let _: Foo<#[cfg(not(wrong))]String> = Foo(String::new());
+   |                ^^^^^^^^^^^^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to generic arguments
+  --> $DIR/attribute-on-type.rs:28:16
+   |
+LL |     let _: Bar<#[cfg(any())]       'static> = Bar(&456);
+   |                ^^^^^^^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to generic arguments
+  --> $DIR/attribute-on-type.rs:31:23
+   |
+LL |     let _generic: Box<#[attr] i32> = Box::new(1);
+   |                       ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to types
+  --> $DIR/attribute-on-type.rs:34:22
+   |
+LL |     let _assignment: #[attr] i32 = *Box::new(1);
+   |                      ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to generic arguments
+  --> $DIR/attribute-on-type.rs:37:23
+   |
+LL |     let _complex: Vec<#[derive(Debug)] String> = vec![];
+   |                       ^^^^^^^^^^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to generic arguments
+  --> $DIR/attribute-on-type.rs:40:26
+   |
+LL |     let _nested: Box<Vec<#[cfg(feature = "test")] u64>> = Box::new(vec![]);
+   |                          ^^^^^^^^^^^^^^^^^^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to types
+  --> $DIR/attribute-on-type.rs:44:11
+   |
+LL | fn g() -> #[attr] i32 { 0 }
+   |           ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to types
+  --> $DIR/attribute-on-type.rs:48:12
+   |
+LL |     field: #[attr] i32,
+   |            ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to types
+  --> $DIR/attribute-on-type.rs:50:14
+   |
+LL |     field1: (#[attr] i32, i32),
+   |              ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to types
+  --> $DIR/attribute-on-type.rs:54:15
+   |
+LL | type Tuple = (#[attr] i32, String);
+   |               ^^^^^^^ attributes are not allowed here
+
+error: attributes cannot be applied to types
+  --> $DIR/attribute-on-type.rs:57:6
+   |
+LL | impl #[attr] S {}
+   |      ^^^^^^^ attributes are not allowed here
+
+error: aborting due to 15 previous errors
+
diff --git a/tests/ui/parser/bad-lit-suffixes.stderr b/tests/ui/parser/bad-lit-suffixes.stderr
index 7876d75c5a4..9a51cf70960 100644
--- a/tests/ui/parser/bad-lit-suffixes.stderr
+++ b/tests/ui/parser/bad-lit-suffixes.stderr
@@ -158,6 +158,7 @@ LL | #[must_use = "string"suffix]
    |              |
    |              expected a string literal here
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[must_use = "string"suffix]
diff --git a/tests/ui/parser/default-on-wrong-item-kind.rs b/tests/ui/parser/default-on-wrong-item-kind.rs
index da990a4b421..9de85640565 100644
--- a/tests/ui/parser/default-on-wrong-item-kind.rs
+++ b/tests/ui/parser/default-on-wrong-item-kind.rs
@@ -19,7 +19,7 @@ mod free_items {
     default union foo {} //~ ERROR a union cannot be `default`
     default trait foo {} //~ ERROR a trait cannot be `default`
     default trait foo = Ord; //~ ERROR a trait alias cannot be `default`
-    default impl foo {}
+    default impl foo {} //~ ERROR inherent impls cannot be default
     default!();
     default::foo::bar!();
     default default!(); //~ ERROR an item macro invocation cannot be `default`
@@ -53,7 +53,7 @@ extern "C" {
     //~^ ERROR trait is not supported in `extern` blocks
     default trait foo = Ord; //~ ERROR a trait alias cannot be `default`
     //~^ ERROR trait alias is not supported in `extern` blocks
-    default impl foo {}
+    default impl foo {} //~ ERROR inherent impls cannot be default
     //~^ ERROR implementation is not supported in `extern` blocks
     default!();
     default::foo::bar!();
@@ -90,7 +90,7 @@ impl S {
     //~^ ERROR trait is not supported in `trait`s or `impl`s
     default trait foo = Ord; //~ ERROR a trait alias cannot be `default`
     //~^ ERROR trait alias is not supported in `trait`s or `impl`s
-    default impl foo {}
+    default impl foo {} //~ ERROR inherent impls cannot be default
     //~^ ERROR implementation is not supported in `trait`s or `impl`s
     default!();
     default::foo::bar!();
@@ -127,7 +127,7 @@ trait T {
     //~^ ERROR trait is not supported in `trait`s or `impl`s
     default trait foo = Ord; //~ ERROR a trait alias cannot be `default`
     //~^ ERROR trait alias is not supported in `trait`s or `impl`s
-    default impl foo {}
+    default impl foo {} //~ ERROR inherent impls cannot be default
     //~^ ERROR implementation is not supported in `trait`s or `impl`s
     default!();
     default::foo::bar!();
diff --git a/tests/ui/parser/default-on-wrong-item-kind.stderr b/tests/ui/parser/default-on-wrong-item-kind.stderr
index 56641565b16..0380fcdf775 100644
--- a/tests/ui/parser/default-on-wrong-item-kind.stderr
+++ b/tests/ui/parser/default-on-wrong-item-kind.stderr
@@ -78,6 +78,16 @@ LL |     default trait foo = Ord;
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
+error: inherent impls cannot be default
+  --> $DIR/default-on-wrong-item-kind.rs:22:18
+   |
+LL |     default impl foo {}
+   |     -------      ^^^ inherent impl for this type
+   |     |
+   |     default because of this
+   |
+   = note: only trait implementations may be annotated with `default`
+
 error: an item macro invocation cannot be `default`
   --> $DIR/default-on-wrong-item-kind.rs:25:5
    |
@@ -275,6 +285,16 @@ LL |     default trait foo = Ord;
    |
    = help: consider moving the trait alias out to a nearby module scope
 
+error: inherent impls cannot be default
+  --> $DIR/default-on-wrong-item-kind.rs:56:18
+   |
+LL |     default impl foo {}
+   |     -------      ^^^ inherent impl for this type
+   |     |
+   |     default because of this
+   |
+   = note: only trait implementations may be annotated with `default`
+
 error: implementation is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:56:5
    |
@@ -489,6 +509,16 @@ LL |     default trait foo = Ord;
    |
    = help: consider moving the trait alias out to a nearby module scope
 
+error: inherent impls cannot be default
+  --> $DIR/default-on-wrong-item-kind.rs:93:18
+   |
+LL |     default impl foo {}
+   |     -------      ^^^ inherent impl for this type
+   |     |
+   |     default because of this
+   |
+   = note: only trait implementations may be annotated with `default`
+
 error: implementation is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:93:5
    |
@@ -703,6 +733,16 @@ LL |     default trait foo = Ord;
    |
    = help: consider moving the trait alias out to a nearby module scope
 
+error: inherent impls cannot be default
+  --> $DIR/default-on-wrong-item-kind.rs:130:18
+   |
+LL |     default impl foo {}
+   |     -------      ^^^ inherent impl for this type
+   |     |
+   |     default because of this
+   |
+   = note: only trait implementations may be annotated with `default`
+
 error: implementation is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:130:5
    |
@@ -759,5 +799,5 @@ LL |     default macro_rules! foo {}
    |
    = help: consider moving the macro definition out to a nearby module scope
 
-error: aborting due to 95 previous errors
+error: aborting due to 99 previous errors
 
diff --git a/tests/ui/issues/issue-12920.rs b/tests/ui/parser/encode-symbol-ice-12920.rs
index f3b1b643c45..87389c0ffb4 100644
--- a/tests/ui/issues/issue-12920.rs
+++ b/tests/ui/parser/encode-symbol-ice-12920.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/12920
+
 //@ run-fail
 //@ error-pattern:explicit panic
 //@ needs-subprocess
diff --git a/tests/ui/parser/float-field.stderr b/tests/ui/parser/float-field.stderr
index 0cc1b0767dc..078d16a4117 100644
--- a/tests/ui/parser/float-field.stderr
+++ b/tests/ui/parser/float-field.stderr
@@ -305,6 +305,8 @@ error[E0609]: no field `1e1` on type `(u8, u8)`
    |
 LL |     { s.1.1e1; }
    |           ^^^ unknown field
+   |
+   = note: available fields are: `0`, `1`
 
 error[E0609]: no field `0x1e1` on type `S`
   --> $DIR/float-field.rs:34:9
@@ -343,12 +345,16 @@ error[E0609]: no field `f32` on type `(u8, u8)`
    |
 LL |     { s.1.f32; }
    |           ^^^ unknown field
+   |
+   = note: available fields are: `0`, `1`
 
 error[E0609]: no field `1e1` on type `(u8, u8)`
   --> $DIR/float-field.rs:71:9
    |
 LL |     { s.1.1e1f32; }
    |         ^^^^^^^^ unknown field
+   |
+   = note: available fields are: `0`, `1`
 
 error: aborting due to 57 previous errors
 
diff --git a/tests/ui/issues/issue-15043.rs b/tests/ui/parser/generics-rangle-eq-15043.rs
index a9bb46b649b..1afc334dfd8 100644
--- a/tests/ui/issues/issue-15043.rs
+++ b/tests/ui/parser/generics-rangle-eq-15043.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15043
+
 //@ run-pass
 
 #![allow(warnings)]
diff --git a/tests/ui/parser/issues/issue-103143.rs b/tests/ui/parser/issues/issue-103143.rs
index a584274c405..90f10fc1a08 100644
--- a/tests/ui/parser/issues/issue-103143.rs
+++ b/tests/ui/parser/issues/issue-103143.rs
@@ -1,5 +1,5 @@
 fn main() {
     x::<#[a]y::<z>>
-    //~^ ERROR invalid const generic expression
+    //~^ ERROR attributes cannot be applied to generic arguments
     //~| ERROR cannot find value `x` in this scope
 }
diff --git a/tests/ui/parser/issues/issue-103143.stderr b/tests/ui/parser/issues/issue-103143.stderr
index 4035c69afa7..168a2077396 100644
--- a/tests/ui/parser/issues/issue-103143.stderr
+++ b/tests/ui/parser/issues/issue-103143.stderr
@@ -1,13 +1,8 @@
-error: invalid const generic expression
-  --> $DIR/issue-103143.rs:2:13
+error: attributes cannot be applied to generic arguments
+  --> $DIR/issue-103143.rs:2:9
    |
 LL |     x::<#[a]y::<z>>
-   |             ^^^^^^
-   |
-help: expressions must be enclosed in braces to be used as const generic arguments
-   |
-LL |     x::<#[a]{ y::<z> }>
-   |             +        +
+   |         ^^^^ attributes are not allowed here
 
 error[E0425]: cannot find value `x` in this scope
   --> $DIR/issue-103143.rs:2:5
diff --git a/tests/ui/parser/item-kw-case-mismatch.stderr b/tests/ui/parser/item-kw-case-mismatch.stderr
index df39eb10fdb..d2a1eb7f2f5 100644
--- a/tests/ui/parser/item-kw-case-mismatch.stderr
+++ b/tests/ui/parser/item-kw-case-mismatch.stderr
@@ -4,7 +4,7 @@ error: keyword `use` is written in the wrong case
 LL | Use std::ptr::read;
    | ^^^
    |
-help: write it in the correct case (notice the capitalization difference)
+help: write it in the correct case (notice the capitalization)
    |
 LL - Use std::ptr::read;
 LL + use std::ptr::read;
@@ -28,7 +28,7 @@ error: keyword `fn` is written in the wrong case
 LL | async Fn _a() {}
    |       ^^
    |
-help: write it in the correct case (notice the capitalization difference)
+help: write it in the correct case (notice the capitalization)
    |
 LL - async Fn _a() {}
 LL + async fn _a() {}
@@ -40,7 +40,7 @@ error: keyword `fn` is written in the wrong case
 LL | Fn _b() {}
    | ^^
    |
-help: write it in the correct case (notice the capitalization difference)
+help: write it in the correct case (notice the capitalization)
    |
 LL - Fn _b() {}
 LL + fn _b() {}
diff --git a/tests/ui/parser/kw-in-trait-bounds.stderr b/tests/ui/parser/kw-in-trait-bounds.stderr
index 1892d0b6226..5a4adf3e37b 100644
--- a/tests/ui/parser/kw-in-trait-bounds.stderr
+++ b/tests/ui/parser/kw-in-trait-bounds.stderr
@@ -4,7 +4,7 @@ error: expected identifier, found keyword `fn`
 LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
    |          ^^
    |
-help: use `Fn` to refer to the trait (notice the capitalization difference)
+help: use `Fn` to refer to the trait (notice the capitalization)
    |
 LL - fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
 LL + fn _f<F: Fn(), G>(_: impl fn(), _: &dyn fn())
@@ -16,7 +16,7 @@ error: expected identifier, found keyword `fn`
 LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
    |                           ^^
    |
-help: use `Fn` to refer to the trait (notice the capitalization difference)
+help: use `Fn` to refer to the trait (notice the capitalization)
    |
 LL - fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
 LL + fn _f<F: fn(), G>(_: impl Fn(), _: &dyn fn())
@@ -28,7 +28,7 @@ error: expected identifier, found keyword `fn`
 LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
    |                                         ^^
    |
-help: use `Fn` to refer to the trait (notice the capitalization difference)
+help: use `Fn` to refer to the trait (notice the capitalization)
    |
 LL - fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
 LL + fn _f<F: fn(), G>(_: impl fn(), _: &dyn Fn())
@@ -40,7 +40,7 @@ error: expected identifier, found keyword `fn`
 LL | G: fn(),
    |    ^^
    |
-help: use `Fn` to refer to the trait (notice the capitalization difference)
+help: use `Fn` to refer to the trait (notice the capitalization)
    |
 LL - G: fn(),
 LL + G: Fn(),
diff --git a/tests/ui/parser/macro/macro-attr-bad.rs b/tests/ui/parser/macro/macro-attr-bad.rs
new file mode 100644
index 00000000000..4313a4d04ab
--- /dev/null
+++ b/tests/ui/parser/macro/macro-attr-bad.rs
@@ -0,0 +1,32 @@
+#![crate_type = "lib"]
+#![feature(macro_attr)]
+
+macro_rules! attr_incomplete_1 { attr }
+//~^ ERROR macro definition ended unexpectedly
+
+macro_rules! attr_incomplete_2 { attr() }
+//~^ ERROR macro definition ended unexpectedly
+
+macro_rules! attr_incomplete_3 { attr() {} }
+//~^ ERROR expected `=>`
+
+macro_rules! attr_incomplete_4 { attr() {} => }
+//~^ ERROR macro definition ended unexpectedly
+
+macro_rules! attr_noparens_1 { attr{} {} => {} }
+//~^ ERROR macro attribute argument matchers require parentheses
+
+macro_rules! attr_noparens_2 { attr[] {} => {} }
+//~^ ERROR macro attribute argument matchers require parentheses
+
+macro_rules! attr_noparens_3 { attr _ {} => {} }
+//~^ ERROR invalid macro matcher
+
+macro_rules! attr_dup_matcher_1 { attr() {$x:ident $x:ident} => {} }
+//~^ ERROR duplicate matcher binding
+
+macro_rules! attr_dup_matcher_2 { attr($x:ident $x:ident) {} => {} }
+//~^ ERROR duplicate matcher binding
+
+macro_rules! attr_dup_matcher_3 { attr($x:ident) {$x:ident} => {} }
+//~^ ERROR duplicate matcher binding
diff --git a/tests/ui/parser/macro/macro-attr-bad.stderr b/tests/ui/parser/macro/macro-attr-bad.stderr
new file mode 100644
index 00000000000..4d286b66649
--- /dev/null
+++ b/tests/ui/parser/macro/macro-attr-bad.stderr
@@ -0,0 +1,80 @@
+error: macro definition ended unexpectedly
+  --> $DIR/macro-attr-bad.rs:4:38
+   |
+LL | macro_rules! attr_incomplete_1 { attr }
+   |                                      ^ expected macro attr args
+
+error: macro definition ended unexpectedly
+  --> $DIR/macro-attr-bad.rs:7:40
+   |
+LL | macro_rules! attr_incomplete_2 { attr() }
+   |                                        ^ expected macro attr body
+
+error: expected `=>`, found end of macro arguments
+  --> $DIR/macro-attr-bad.rs:10:43
+   |
+LL | macro_rules! attr_incomplete_3 { attr() {} }
+   |                                           ^ expected `=>`
+
+error: macro definition ended unexpectedly
+  --> $DIR/macro-attr-bad.rs:13:46
+   |
+LL | macro_rules! attr_incomplete_4 { attr() {} => }
+   |                                              ^ expected right-hand side of macro rule
+
+error: macro attribute argument matchers require parentheses
+  --> $DIR/macro-attr-bad.rs:16:36
+   |
+LL | macro_rules! attr_noparens_1 { attr{} {} => {} }
+   |                                    ^^
+   |
+help: the delimiters should be `(` and `)`
+   |
+LL - macro_rules! attr_noparens_1 { attr{} {} => {} }
+LL + macro_rules! attr_noparens_1 { attr() {} => {} }
+   |
+
+error: macro attribute argument matchers require parentheses
+  --> $DIR/macro-attr-bad.rs:19:36
+   |
+LL | macro_rules! attr_noparens_2 { attr[] {} => {} }
+   |                                    ^^
+   |
+help: the delimiters should be `(` and `)`
+   |
+LL - macro_rules! attr_noparens_2 { attr[] {} => {} }
+LL + macro_rules! attr_noparens_2 { attr() {} => {} }
+   |
+
+error: invalid macro matcher; matchers must be contained in balanced delimiters
+  --> $DIR/macro-attr-bad.rs:22:37
+   |
+LL | macro_rules! attr_noparens_3 { attr _ {} => {} }
+   |                                     ^
+
+error: duplicate matcher binding
+  --> $DIR/macro-attr-bad.rs:25:52
+   |
+LL | macro_rules! attr_dup_matcher_1 { attr() {$x:ident $x:ident} => {} }
+   |                                           -------- ^^^^^^^^ duplicate binding
+   |                                           |
+   |                                           previous binding
+
+error: duplicate matcher binding
+  --> $DIR/macro-attr-bad.rs:28:49
+   |
+LL | macro_rules! attr_dup_matcher_2 { attr($x:ident $x:ident) {} => {} }
+   |                                        -------- ^^^^^^^^ duplicate binding
+   |                                        |
+   |                                        previous binding
+
+error: duplicate matcher binding
+  --> $DIR/macro-attr-bad.rs:31:51
+   |
+LL | macro_rules! attr_dup_matcher_3 { attr($x:ident) {$x:ident} => {} }
+   |                                        --------   ^^^^^^^^ duplicate binding
+   |                                        |
+   |                                        previous binding
+
+error: aborting due to 10 previous errors
+
diff --git a/tests/ui/parser/macro/macro-attr-recovery.rs b/tests/ui/parser/macro/macro-attr-recovery.rs
new file mode 100644
index 00000000000..dbb795f57aa
--- /dev/null
+++ b/tests/ui/parser/macro/macro-attr-recovery.rs
@@ -0,0 +1,19 @@
+#![crate_type = "lib"]
+#![feature(macro_attr)]
+
+macro_rules! attr {
+    attr[$($args:tt)*] { $($body:tt)* } => {
+        //~^ ERROR: macro attribute argument matchers require parentheses
+        //~v ERROR: attr:
+        compile_error!(concat!(
+            "attr: args=\"",
+            stringify!($($args)*),
+            "\" body=\"",
+            stringify!($($body)*),
+            "\"",
+        ));
+    };
+}
+
+#[attr]
+struct S;
diff --git a/tests/ui/parser/macro/macro-attr-recovery.stderr b/tests/ui/parser/macro/macro-attr-recovery.stderr
new file mode 100644
index 00000000000..ab3a0b7c607
--- /dev/null
+++ b/tests/ui/parser/macro/macro-attr-recovery.stderr
@@ -0,0 +1,31 @@
+error: macro attribute argument matchers require parentheses
+  --> $DIR/macro-attr-recovery.rs:5:9
+   |
+LL |     attr[$($args:tt)*] { $($body:tt)* } => {
+   |         ^^^^^^^^^^^^^^
+   |
+help: the delimiters should be `(` and `)`
+   |
+LL -     attr[$($args:tt)*] { $($body:tt)* } => {
+LL +     attr($($args:tt)*) { $($body:tt)* } => {
+   |
+
+error: attr: args="" body="struct S;"
+  --> $DIR/macro-attr-recovery.rs:8:9
+   |
+LL | /         compile_error!(concat!(
+LL | |             "attr: args=\"",
+LL | |             stringify!($($args)*),
+LL | |             "\" body=\"",
+LL | |             stringify!($($body)*),
+LL | |             "\"",
+LL | |         ));
+   | |__________^
+...
+LL |   #[attr]
+   |   ------- in this attribute macro expansion
+   |
+   = note: this error originates in the attribute macro `attr` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/parser/misspelled-keywords/hrdt.stderr b/tests/ui/parser/misspelled-keywords/hrdt.stderr
index e5fc1a50382..497bd613bf4 100644
--- a/tests/ui/parser/misspelled-keywords/hrdt.stderr
+++ b/tests/ui/parser/misspelled-keywords/hrdt.stderr
@@ -4,7 +4,7 @@ error: expected one of `!`, `(`, `+`, `::`, `<`, `where`, or `{`, found keyword
 LL |     Where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8,
    |           ^^^ expected one of 7 possible tokens
    |
-help: write keyword `where` in lowercase (notice the capitalization difference)
+help: write keyword `where` in lowercase (notice the capitalization)
    |
 LL -     Where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8,
 LL +     where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8,
diff --git a/tests/ui/parser/misspelled-keywords/impl-return.stderr b/tests/ui/parser/misspelled-keywords/impl-return.stderr
index ff5391461a9..d49d962d7e9 100644
--- a/tests/ui/parser/misspelled-keywords/impl-return.stderr
+++ b/tests/ui/parser/misspelled-keywords/impl-return.stderr
@@ -4,7 +4,7 @@ error: expected one of `!`, `(`, `+`, `::`, `<`, `where`, or `{`, found `Display
 LL | fn code() -> Impl Display {}
    |                   ^^^^^^^ expected one of 7 possible tokens
    |
-help: write keyword `impl` in lowercase (notice the capitalization difference)
+help: write keyword `impl` in lowercase (notice the capitalization)
    |
 LL - fn code() -> Impl Display {}
 LL + fn code() -> impl Display {}
diff --git a/tests/ui/parser/misspelled-keywords/static.stderr b/tests/ui/parser/misspelled-keywords/static.stderr
index e559f2be109..0df40bcdc33 100644
--- a/tests/ui/parser/misspelled-keywords/static.stderr
+++ b/tests/ui/parser/misspelled-keywords/static.stderr
@@ -4,7 +4,7 @@ error: expected one of `!` or `::`, found `a`
 LL | Static a = 0;
    |        ^ expected one of `!` or `::`
    |
-help: write keyword `static` in lowercase (notice the capitalization difference)
+help: write keyword `static` in lowercase (notice the capitalization)
    |
 LL - Static a = 0;
 LL + static a = 0;
diff --git a/tests/ui/parser/misspelled-keywords/struct.stderr b/tests/ui/parser/misspelled-keywords/struct.stderr
index edbec3b9456..af8614ef14b 100644
--- a/tests/ui/parser/misspelled-keywords/struct.stderr
+++ b/tests/ui/parser/misspelled-keywords/struct.stderr
@@ -4,7 +4,7 @@ error: expected one of `!` or `::`, found `Foor`
 LL | Struct Foor {
    |        ^^^^ expected one of `!` or `::`
    |
-help: write keyword `struct` in lowercase (notice the capitalization difference)
+help: write keyword `struct` in lowercase (notice the capitalization)
    |
 LL - Struct Foor {
 LL + struct Foor {
diff --git a/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr b/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr
index 4e1fcaf4936..bd809e77a8f 100644
--- a/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr
+++ b/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr
@@ -4,7 +4,7 @@ error: expected identifier, found keyword `fn`
 LL | fn foo(_: impl fn() -> i32) {}
    |                ^^
    |
-help: use `Fn` to refer to the trait (notice the capitalization difference)
+help: use `Fn` to refer to the trait (notice the capitalization)
    |
 LL - fn foo(_: impl fn() -> i32) {}
 LL + fn foo(_: impl Fn() -> i32) {}
@@ -16,7 +16,7 @@ error: expected identifier, found keyword `fn`
 LL | fn foo2<T: fn(i32)>(_: T) {}
    |            ^^
    |
-help: use `Fn` to refer to the trait (notice the capitalization difference)
+help: use `Fn` to refer to the trait (notice the capitalization)
    |
 LL - fn foo2<T: fn(i32)>(_: T) {}
 LL + fn foo2<T: Fn(i32)>(_: T) {}
diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed
index a851300a982..40028307a8c 100644
--- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed
@@ -1,7 +1,9 @@
 // Regression test for issues #100790 and #106439.
 //@ run-rustfix
 
-pub struct Example(#[allow(dead_code)] usize)
+#![allow(dead_code)]
+
+pub struct Example(usize)
 where
     (): Sized;
 //~^^^ ERROR where clauses are not allowed before tuple struct bodies
diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs
index 10f435859f1..d8dbb4238d2 100644
--- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs
@@ -1,10 +1,12 @@
 // Regression test for issues #100790 and #106439.
 //@ run-rustfix
 
+#![allow(dead_code)]
+
 pub struct Example
 where
     (): Sized,
-(#[allow(dead_code)] usize);
+(usize);
 //~^^^ ERROR where clauses are not allowed before tuple struct bodies
 
 struct _Demo
diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr
index ddbf237e866..66dadd9fd4c 100644
--- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr
@@ -1,23 +1,23 @@
 error: where clauses are not allowed before tuple struct bodies
-  --> $DIR/recover-where-clause-before-tuple-struct-body-0.rs:5:1
+  --> $DIR/recover-where-clause-before-tuple-struct-body-0.rs:7:1
    |
 LL |   pub struct Example
    |              ------- while parsing this tuple struct
 LL | / where
 LL | |     (): Sized,
    | |______________^ unexpected where clause
-LL |   (#[allow(dead_code)] usize);
-   |   --------------------------- the struct body
+LL |   (usize);
+   |   ------- the struct body
    |
 help: move the body before the where clause
    |
-LL ~ pub struct Example(#[allow(dead_code)] usize)
+LL ~ pub struct Example(usize)
 LL | where
 LL ~     (): Sized;
    |
 
 error: where clauses are not allowed before tuple struct bodies
-  --> $DIR/recover-where-clause-before-tuple-struct-body-0.rs:11:1
+  --> $DIR/recover-where-clause-before-tuple-struct-body-0.rs:13:1
    |
 LL |   struct _Demo
    |          ----- while parsing this tuple struct
diff --git a/tests/ui/parser/typod-const-in-const-param-def.stderr b/tests/ui/parser/typod-const-in-const-param-def.stderr
index bf7168a0157..cc1600fe5cb 100644
--- a/tests/ui/parser/typod-const-in-const-param-def.stderr
+++ b/tests/ui/parser/typod-const-in-const-param-def.stderr
@@ -4,7 +4,7 @@ error: `const` keyword was mistyped as `Const`
 LL | pub fn foo<Const N: u8>() {}
    |            ^^^^^
    |
-help: use the `const` keyword (notice the capitalization difference)
+help: use the `const` keyword (notice the capitalization)
    |
 LL - pub fn foo<Const N: u8>() {}
 LL + pub fn foo<const N: u8>() {}
@@ -16,7 +16,7 @@ error: `const` keyword was mistyped as `Const`
 LL | pub fn baz<Const N: u8, T>() {}
    |            ^^^^^
    |
-help: use the `const` keyword (notice the capitalization difference)
+help: use the `const` keyword (notice the capitalization)
    |
 LL - pub fn baz<Const N: u8, T>() {}
 LL + pub fn baz<const N: u8, T>() {}
@@ -28,7 +28,7 @@ error: `const` keyword was mistyped as `Const`
 LL | pub fn qux<T, Const N: u8>() {}
    |               ^^^^^
    |
-help: use the `const` keyword (notice the capitalization difference)
+help: use the `const` keyword (notice the capitalization)
    |
 LL - pub fn qux<T, Const N: u8>() {}
 LL + pub fn qux<T, const N: u8>() {}
@@ -40,7 +40,7 @@ error: `const` keyword was mistyped as `Const`
 LL | pub fn quux<T, Const N: u8, U>() {}
    |                ^^^^^
    |
-help: use the `const` keyword (notice the capitalization difference)
+help: use the `const` keyword (notice the capitalization)
    |
 LL - pub fn quux<T, Const N: u8, U>() {}
 LL + pub fn quux<T, const N: u8, U>() {}
diff --git a/tests/ui/issues/issue-13482.rs b/tests/ui/pattern/array-length-mismatch-13482.rs
index 244b3237e02..78d024e5227 100644
--- a/tests/ui/issues/issue-13482.rs
+++ b/tests/ui/pattern/array-length-mismatch-13482.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13482
+
 fn main() {
   let x = [1,2];
   let y = match x {
diff --git a/tests/ui/issues/issue-13482.stderr b/tests/ui/pattern/array-length-mismatch-13482.stderr
index 6226c580811..d366e010927 100644
--- a/tests/ui/issues/issue-13482.stderr
+++ b/tests/ui/pattern/array-length-mismatch-13482.stderr
@@ -1,5 +1,5 @@
 error[E0527]: pattern requires 0 elements but array has 2
-  --> $DIR/issue-13482.rs:4:5
+  --> $DIR/array-length-mismatch-13482.rs:6:5
    |
 LL |     [] => None,
    |     ^^ expected 2 elements
diff --git a/tests/ui/issues/issue-13482-2.rs b/tests/ui/pattern/array-length-mismatch-verbose-13482.rs
index 619e9d748ef..619e9d748ef 100644
--- a/tests/ui/issues/issue-13482-2.rs
+++ b/tests/ui/pattern/array-length-mismatch-verbose-13482.rs
diff --git a/tests/ui/issues/issue-13482-2.stderr b/tests/ui/pattern/array-length-mismatch-verbose-13482.stderr
index 87a6782a5e6..5b533b30afa 100644
--- a/tests/ui/issues/issue-13482-2.stderr
+++ b/tests/ui/pattern/array-length-mismatch-verbose-13482.stderr
@@ -1,5 +1,5 @@
 error[E0527]: pattern requires 0 elements but array has 2
-  --> $DIR/issue-13482-2.rs:6:9
+  --> $DIR/array-length-mismatch-verbose-13482.rs:6:9
    |
 LL |         [] => None,
    |         ^^ expected 2 elements
diff --git a/tests/ui/pattern/bindings-after-at/bind-by-copy-or-pat.rs b/tests/ui/pattern/bindings-after-at/bind-by-copy-or-pat.rs
index 1555da2fd1f..dd23acfa235 100644
--- a/tests/ui/pattern/bindings-after-at/bind-by-copy-or-pat.rs
+++ b/tests/ui/pattern/bindings-after-at/bind-by-copy-or-pat.rs
@@ -1,16 +1,15 @@
-//@ known-bug: unknown
+//@ run-pass
 #![allow(unused)]
 
 struct A(u32);
 
 pub fn main() {
-    // The or-pattern bindings are lowered after `x`, which triggers the error.
+    // Bindings are lowered in the order they appear syntactically, so this works.
     let x @ (A(a) | A(a)) = A(10);
-    // ERROR: use of moved value
     assert!(x.0 == 10);
     assert!(a == 10);
 
-    // This works.
+    // This also works.
     let (x @ A(a) | x @ A(a)) = A(10);
     assert!(x.0 == 10);
     assert!(a == 10);
diff --git a/tests/ui/pattern/bindings-after-at/bind-by-copy-or-pat.stderr b/tests/ui/pattern/bindings-after-at/bind-by-copy-or-pat.stderr
deleted file mode 100644
index 79808186358..00000000000
--- a/tests/ui/pattern/bindings-after-at/bind-by-copy-or-pat.stderr
+++ /dev/null
@@ -1,31 +0,0 @@
-error[E0382]: use of moved value
-  --> $DIR/bind-by-copy-or-pat.rs:8:16
-   |
-LL |     let x @ (A(a) | A(a)) = A(10);
-   |         -      ^            ----- move occurs because value has type `A`, which does not implement the `Copy` trait
-   |         |      |
-   |         |      value used here after move
-   |         value moved here
-   |
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |     let ref x @ (A(a) | A(a)) = A(10);
-   |         +++
-
-error[E0382]: use of moved value
-  --> $DIR/bind-by-copy-or-pat.rs:8:23
-   |
-LL |     let x @ (A(a) | A(a)) = A(10);
-   |         -             ^     ----- move occurs because value has type `A`, which does not implement the `Copy` trait
-   |         |             |
-   |         |             value used here after move
-   |         value moved here
-   |
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |     let ref x @ (A(a) | A(a)) = A(10);
-   |         +++
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/pattern/deref-patterns/usefulness/non-exhaustive.rs b/tests/ui/pattern/deref-patterns/usefulness/non-exhaustive.rs
index 704cae8bdbc..bab6308223e 100644
--- a/tests/ui/pattern/deref-patterns/usefulness/non-exhaustive.rs
+++ b/tests/ui/pattern/deref-patterns/usefulness/non-exhaustive.rs
@@ -15,7 +15,7 @@ fn main() {
     }
 
     match Box::new((true, Box::new(false))) {
-        //~^ ERROR non-exhaustive patterns: `deref!((false, deref!(false)))` and `deref!((true, deref!(true)))` not covered
+        //~^ ERROR non-exhaustive patterns: `deref!((true, deref!(true)))` and `deref!((false, deref!(false)))` not covered
         (true, false) => {}
         (false, true) => {}
     }
diff --git a/tests/ui/pattern/deref-patterns/usefulness/non-exhaustive.stderr b/tests/ui/pattern/deref-patterns/usefulness/non-exhaustive.stderr
index 55fa84bafde..a1abd5f0e3f 100644
--- a/tests/ui/pattern/deref-patterns/usefulness/non-exhaustive.stderr
+++ b/tests/ui/pattern/deref-patterns/usefulness/non-exhaustive.stderr
@@ -28,11 +28,11 @@ LL ~         true => {},
 LL +         deref!(deref!(false)) => todo!()
    |
 
-error[E0004]: non-exhaustive patterns: `deref!((false, deref!(false)))` and `deref!((true, deref!(true)))` not covered
+error[E0004]: non-exhaustive patterns: `deref!((true, deref!(true)))` and `deref!((false, deref!(false)))` not covered
   --> $DIR/non-exhaustive.rs:17:11
    |
 LL |     match Box::new((true, Box::new(false))) {
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ patterns `deref!((false, deref!(false)))` and `deref!((true, deref!(true)))` not covered
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ patterns `deref!((true, deref!(true)))` and `deref!((false, deref!(false)))` not covered
    |
 note: `Box<(bool, Box<bool>)>` defined here
   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
@@ -40,7 +40,7 @@ note: `Box<(bool, Box<bool>)>` defined here
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         (false, true) => {},
-LL +         deref!((false, deref!(false))) | deref!((true, deref!(true))) => todo!()
+LL +         deref!((true, deref!(true))) | deref!((false, deref!(false))) => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `deref!((deref!(T::C), _))` not covered
diff --git a/tests/ui/issues/issue-15896.rs b/tests/ui/pattern/enum-struct-pattern-mismatch-15896.rs
index d3153b516e6..9f7c5084c0e 100644
--- a/tests/ui/issues/issue-15896.rs
+++ b/tests/ui/pattern/enum-struct-pattern-mismatch-15896.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15896
+
 // Regression test for #15896. It used to ICE rustc.
 
 fn main() {
diff --git a/tests/ui/issues/issue-15896.stderr b/tests/ui/pattern/enum-struct-pattern-mismatch-15896.stderr
index 381f6dc2276..8dee4c37e2f 100644
--- a/tests/ui/issues/issue-15896.stderr
+++ b/tests/ui/pattern/enum-struct-pattern-mismatch-15896.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-15896.rs:11:11
+  --> $DIR/enum-struct-pattern-mismatch-15896.rs:13:11
    |
 LL |     let u = match e {
    |                   - this expression has type `E`
diff --git a/tests/ui/issues/issue-15381.rs b/tests/ui/pattern/refutable-pattern-for-loop-15381.rs
index bd5f62ddc67..3c19612c9cc 100644
--- a/tests/ui/issues/issue-15381.rs
+++ b/tests/ui/pattern/refutable-pattern-for-loop-15381.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15381
+
 fn main() {
     let values: Vec<u8> = vec![1,2,3,4,5,6,7,8];
 
diff --git a/tests/ui/issues/issue-15381.stderr b/tests/ui/pattern/refutable-pattern-for-loop-15381.stderr
index 03a0100f1bd..3c1d5fb454c 100644
--- a/tests/ui/issues/issue-15381.stderr
+++ b/tests/ui/pattern/refutable-pattern-for-loop-15381.stderr
@@ -1,5 +1,5 @@
 error[E0005]: refutable pattern in `for` loop binding
-  --> $DIR/issue-15381.rs:4:9
+  --> $DIR/refutable-pattern-for-loop-15381.rs:6:9
    |
 LL |     for &[x,y,z] in values.chunks(3).filter(|&xs| xs.len() == 3) {
    |         ^^^^^^^^ patterns `&[]`, `&[_]`, `&[_, _]` and 1 more not covered
diff --git a/tests/ui/issues/issue-15104.rs b/tests/ui/pattern/slice-pattern-recursion-15104.rs
index e68c94c370e..24e3fe78de0 100644
--- a/tests/ui/issues/issue-15104.rs
+++ b/tests/ui/pattern/slice-pattern-recursion-15104.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15104
+
 //@ run-pass
 
 fn main() {
diff --git a/tests/ui/issues/issue-16149.rs b/tests/ui/pattern/static-binding-shadow-16149.rs
index 51b60725c5a..a46f78214c7 100644
--- a/tests/ui/issues/issue-16149.rs
+++ b/tests/ui/pattern/static-binding-shadow-16149.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/16149
+
 extern "C" {
     static externalValue: isize;
 }
diff --git a/tests/ui/issues/issue-16149.stderr b/tests/ui/pattern/static-binding-shadow-16149.stderr
index 9ffd0e7e645..6d8c7634acd 100644
--- a/tests/ui/issues/issue-16149.stderr
+++ b/tests/ui/pattern/static-binding-shadow-16149.stderr
@@ -1,5 +1,5 @@
 error[E0530]: match bindings cannot shadow statics
-  --> $DIR/issue-16149.rs:7:9
+  --> $DIR/static-binding-shadow-16149.rs:9:9
    |
 LL |     static externalValue: isize;
    |     ---------------------------- the static `externalValue` is defined here
diff --git a/tests/ui/issues/issue-15260.rs b/tests/ui/pattern/struct-field-duplicate-binding-15260.rs
index 64fc3df3d23..a3617798cdf 100644
--- a/tests/ui/issues/issue-15260.rs
+++ b/tests/ui/pattern/struct-field-duplicate-binding-15260.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15260
+
 struct Foo {
     a: usize,
 }
diff --git a/tests/ui/issues/issue-15260.stderr b/tests/ui/pattern/struct-field-duplicate-binding-15260.stderr
index 4a3041122b2..536904fbcb3 100644
--- a/tests/ui/issues/issue-15260.stderr
+++ b/tests/ui/pattern/struct-field-duplicate-binding-15260.stderr
@@ -1,5 +1,5 @@
 error[E0025]: field `a` bound multiple times in the pattern
-  --> $DIR/issue-15260.rs:8:9
+  --> $DIR/struct-field-duplicate-binding-15260.rs:10:9
    |
 LL |         a: _,
    |         ---- first use of `a`
@@ -7,7 +7,7 @@ LL |         a: _
    |         ^^^^ multiple uses of `a` in pattern
 
 error[E0025]: field `a` bound multiple times in the pattern
-  --> $DIR/issue-15260.rs:14:9
+  --> $DIR/struct-field-duplicate-binding-15260.rs:16:9
    |
 LL |         a,
    |         - first use of `a`
@@ -15,7 +15,7 @@ LL |         a: _
    |         ^^^^ multiple uses of `a` in pattern
 
 error[E0025]: field `a` bound multiple times in the pattern
-  --> $DIR/issue-15260.rs:20:9
+  --> $DIR/struct-field-duplicate-binding-15260.rs:22:9
    |
 LL |         a,
    |         - first use of `a`
@@ -23,7 +23,7 @@ LL |         a: _,
    |         ^^^^ multiple uses of `a` in pattern
 
 error[E0025]: field `a` bound multiple times in the pattern
-  --> $DIR/issue-15260.rs:22:9
+  --> $DIR/struct-field-duplicate-binding-15260.rs:24:9
    |
 LL |         a,
    |         - first use of `a`
diff --git a/tests/ui/issues/issue-14541.rs b/tests/ui/pattern/struct-mismatch-destructure-14541.rs
index 358d29419f9..04e85237cab 100644
--- a/tests/ui/issues/issue-14541.rs
+++ b/tests/ui/pattern/struct-mismatch-destructure-14541.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14541
+
 struct Vec2 { y: f32 }
 struct Vec3 { y: f32, z: f32 }
 
diff --git a/tests/ui/issues/issue-14541.stderr b/tests/ui/pattern/struct-mismatch-destructure-14541.stderr
index 370e6477901..024d77df2cb 100644
--- a/tests/ui/issues/issue-14541.stderr
+++ b/tests/ui/pattern/struct-mismatch-destructure-14541.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-14541.rs:5:9
+  --> $DIR/struct-mismatch-destructure-14541.rs:7:9
    |
 LL |     let Vec3 { y: _, z: _ } = v;
    |         ^^^^^^^^^^^^^^^^^^^   - this expression has type `Vec2`
diff --git a/tests/ui/issues/issue-14308.rs b/tests/ui/pattern/struct-wildcard-pattern-14308.rs
index 724be160d06..c1fdf424b8c 100644
--- a/tests/ui/issues/issue-14308.rs
+++ b/tests/ui/pattern/struct-wildcard-pattern-14308.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14308
+
 //@ run-pass
 
 struct A(isize);
diff --git a/tests/ui/issues/issue-15129-rpass.rs b/tests/ui/pattern/tuple-enum-match-15129.rs
index e2ddb989072..1d6192c4cb3 100644
--- a/tests/ui/issues/issue-15129-rpass.rs
+++ b/tests/ui/pattern/tuple-enum-match-15129.rs
@@ -1,24 +1,25 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15129
+
 //@ run-pass
 
 pub enum T {
     T1(()),
-    T2(())
+    T2(()),
 }
 
 pub enum V {
     V1(isize),
-    V2(bool)
+    V2(bool),
 }
 
 fn foo(x: (T, V)) -> String {
     match x {
-        (T::T1(()), V::V1(i))  => format!("T1(()), V1({})", i),
-        (T::T2(()), V::V2(b))  => format!("T2(()), V2({})", b),
-        _ => String::new()
+        (T::T1(()), V::V1(i)) => format!("T1(()), V1({})", i),
+        (T::T2(()), V::V2(b)) => format!("T2(()), V2({})", b),
+        _ => String::new(),
     }
 }
 
-
 fn main() {
     assert_eq!(foo((T::T1(()), V::V1(99))), "T1(()), V1(99)".to_string());
     assert_eq!(foo((T::T2(()), V::V2(true))), "T2(()), V2(true)".to_string());
diff --git a/tests/ui/issues/issue-7519-match-unit-in-arg.rs b/tests/ui/pattern/unit-pattern-matching-in-function-argument-7519.rs
index a7cea577b22..7bfa9ee6625 100644
--- a/tests/ui/issues/issue-7519-match-unit-in-arg.rs
+++ b/tests/ui/pattern/unit-pattern-matching-in-function-argument-7519.rs
@@ -2,6 +2,7 @@
 
 /*
 #7519 ICE pattern matching unit in function argument
+https://github.com/rust-lang/rust/issues/7519
 */
 
 fn foo(():()) { }
diff --git a/tests/ui/issues/issue-16401.rs b/tests/ui/pattern/unit-type-struct-pattern-mismatch-16401.rs
index 0985a6806d2..2eba33e177e 100644
--- a/tests/ui/issues/issue-16401.rs
+++ b/tests/ui/pattern/unit-type-struct-pattern-mismatch-16401.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/16401
+
 struct Slice<T> {
     data: *const T,
     len: usize,
diff --git a/tests/ui/issues/issue-16401.stderr b/tests/ui/pattern/unit-type-struct-pattern-mismatch-16401.stderr
index 6af920ca439..22c04e439c4 100644
--- a/tests/ui/issues/issue-16401.stderr
+++ b/tests/ui/pattern/unit-type-struct-pattern-mismatch-16401.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-16401.rs:8:9
+  --> $DIR/unit-type-struct-pattern-mismatch-16401.rs:10:9
    |
 LL |     match () {
    |           -- this expression has type `()`
diff --git a/tests/ui/issues/issue-pr29383.rs b/tests/ui/pattern/unit-variant-pattern-matching-29383.rs
index 2bcc0aa2782..e339dc01f46 100644
--- a/tests/ui/issues/issue-pr29383.rs
+++ b/tests/ui/pattern/unit-variant-pattern-matching-29383.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/29383
 enum E {
     A,
     B,
diff --git a/tests/ui/issues/issue-pr29383.stderr b/tests/ui/pattern/unit-variant-pattern-matching-29383.stderr
index 57783d75ba1..e30837568a5 100644
--- a/tests/ui/issues/issue-pr29383.stderr
+++ b/tests/ui/pattern/unit-variant-pattern-matching-29383.stderr
@@ -1,5 +1,5 @@
 error[E0532]: expected tuple struct or tuple variant, found unit variant `E::A`
-  --> $DIR/issue-pr29383.rs:9:14
+  --> $DIR/unit-variant-pattern-matching-29383.rs:10:14
    |
 LL |     A,
    |     - `E::A` defined here
@@ -8,7 +8,7 @@ LL |         Some(E::A(..)) => {}
    |              ^^^^^^^^ help: use this syntax instead: `E::A`
 
 error[E0532]: expected tuple struct or tuple variant, found unit variant `E::B`
-  --> $DIR/issue-pr29383.rs:11:14
+  --> $DIR/unit-variant-pattern-matching-29383.rs:12:14
    |
 LL |     B,
    |     - `E::B` defined here
diff --git a/tests/ui/pattern/usefulness/unions.rs b/tests/ui/pattern/usefulness/unions.rs
index 80a7f36a09a..3de79c6f849 100644
--- a/tests/ui/pattern/usefulness/unions.rs
+++ b/tests/ui/pattern/usefulness/unions.rs
@@ -26,7 +26,7 @@ fn main() {
         }
         // Our approach can report duplicate witnesses sometimes.
         match (x, true) {
-            //~^ ERROR non-exhaustive patterns: `(U8AsBool { n: 0_u8 }, false)`, `(U8AsBool { b: false }, false)`, `(U8AsBool { n: 0_u8 }, false)` and 1 more not covered
+            //~^ ERROR non-exhaustive patterns: `(U8AsBool { n: 0_u8 }, false)`, `(U8AsBool { b: true }, false)`, `(U8AsBool { n: 0_u8 }, false)` and 1 more not covered
             (U8AsBool { b: true }, true) => {}
             (U8AsBool { b: false }, true) => {}
             (U8AsBool { n: 1.. }, true) => {}
diff --git a/tests/ui/pattern/usefulness/unions.stderr b/tests/ui/pattern/usefulness/unions.stderr
index 4b397dc25db..98fb6a33ae4 100644
--- a/tests/ui/pattern/usefulness/unions.stderr
+++ b/tests/ui/pattern/usefulness/unions.stderr
@@ -16,11 +16,11 @@ LL ~             U8AsBool { n: 1.. } => {},
 LL +             U8AsBool { n: 0_u8 } | U8AsBool { b: false } => todo!()
    |
 
-error[E0004]: non-exhaustive patterns: `(U8AsBool { n: 0_u8 }, false)`, `(U8AsBool { b: false }, false)`, `(U8AsBool { n: 0_u8 }, false)` and 1 more not covered
+error[E0004]: non-exhaustive patterns: `(U8AsBool { n: 0_u8 }, false)`, `(U8AsBool { b: true }, false)`, `(U8AsBool { n: 0_u8 }, false)` and 1 more not covered
   --> $DIR/unions.rs:28:15
    |
 LL |         match (x, true) {
-   |               ^^^^^^^^^ patterns `(U8AsBool { n: 0_u8 }, false)`, `(U8AsBool { b: false }, false)`, `(U8AsBool { n: 0_u8 }, false)` and 1 more not covered
+   |               ^^^^^^^^^ patterns `(U8AsBool { n: 0_u8 }, false)`, `(U8AsBool { b: true }, false)`, `(U8AsBool { n: 0_u8 }, false)` and 1 more not covered
    |
    = note: the matched value is of type `(U8AsBool, bool)`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
diff --git a/tests/ui/issues/issue-3763.rs b/tests/ui/privacy/private-field-access-violation-3763.rs
index 893009a2cd9..3fc2337086d 100644
--- a/tests/ui/issues/issue-3763.rs
+++ b/tests/ui/privacy/private-field-access-violation-3763.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/3763
 // Regression test for #3763
 
 mod my_mod {
diff --git a/tests/ui/issues/issue-3763.stderr b/tests/ui/privacy/private-field-access-violation-3763.stderr
index d101e4c33ad..6ba83dc4d78 100644
--- a/tests/ui/issues/issue-3763.stderr
+++ b/tests/ui/privacy/private-field-access-violation-3763.stderr
@@ -1,17 +1,17 @@
 error[E0616]: field `priv_field` of struct `MyStruct` is private
-  --> $DIR/issue-3763.rs:17:32
+  --> $DIR/private-field-access-violation-3763.rs:18:32
    |
 LL |     let _woohoo = (&my_struct).priv_field;
    |                                ^^^^^^^^^^ private field
 
 error[E0616]: field `priv_field` of struct `MyStruct` is private
-  --> $DIR/issue-3763.rs:20:41
+  --> $DIR/private-field-access-violation-3763.rs:21:41
    |
 LL |     let _woohoo = (Box::new(my_struct)).priv_field;
    |                                         ^^^^^^^^^^ private field
 
 error[E0624]: method `happyfun` is private
-  --> $DIR/issue-3763.rs:23:18
+  --> $DIR/private-field-access-violation-3763.rs:24:18
    |
 LL |         fn happyfun(&self) {}
    |         ------------------ private method defined here
@@ -20,7 +20,7 @@ LL |     (&my_struct).happyfun();
    |                  ^^^^^^^^ private method
 
 error[E0624]: method `happyfun` is private
-  --> $DIR/issue-3763.rs:25:27
+  --> $DIR/private-field-access-violation-3763.rs:26:27
    |
 LL |         fn happyfun(&self) {}
    |         ------------------ private method defined here
@@ -29,7 +29,7 @@ LL |     (Box::new(my_struct)).happyfun();
    |                           ^^^^^^^^ private method
 
 error[E0616]: field `priv_field` of struct `MyStruct` is private
-  --> $DIR/issue-3763.rs:26:26
+  --> $DIR/private-field-access-violation-3763.rs:27:26
    |
 LL |     let nope = my_struct.priv_field;
    |                          ^^^^^^^^^^ private field
diff --git a/tests/ui/privacy/private-in-public-warn.stderr b/tests/ui/privacy/private-in-public-warn.stderr
index 86f6be85a07..edcffaf6b70 100644
--- a/tests/ui/privacy/private-in-public-warn.stderr
+++ b/tests/ui/privacy/private-in-public-warn.stderr
@@ -93,6 +93,42 @@ LL |     struct Priv;
 LL |         type Alias = Priv;
    |         ^^^^^^^^^^ can't leak private type
 
+error: type `types::Priv` is more private than the item `types::ES`
+  --> $DIR/private-in-public-warn.rs:27:9
+   |
+LL |         pub static ES: Priv;
+   |         ^^^^^^^^^^^^^^^^^^^ static `types::ES` is reachable at visibility `pub(crate)`
+   |
+note: but type `types::Priv` is only usable at visibility `pub(self)`
+  --> $DIR/private-in-public-warn.rs:9:5
+   |
+LL |     struct Priv;
+   |     ^^^^^^^^^^^
+
+error: type `types::Priv` is more private than the item `types::ef1`
+  --> $DIR/private-in-public-warn.rs:28:9
+   |
+LL |         pub fn ef1(arg: Priv);
+   |         ^^^^^^^^^^^^^^^^^^^^^^ function `types::ef1` is reachable at visibility `pub(crate)`
+   |
+note: but type `types::Priv` is only usable at visibility `pub(self)`
+  --> $DIR/private-in-public-warn.rs:9:5
+   |
+LL |     struct Priv;
+   |     ^^^^^^^^^^^
+
+error: type `types::Priv` is more private than the item `types::ef2`
+  --> $DIR/private-in-public-warn.rs:29:9
+   |
+LL |         pub fn ef2() -> Priv;
+   |         ^^^^^^^^^^^^^^^^^^^^^ function `types::ef2` is reachable at visibility `pub(crate)`
+   |
+note: but type `types::Priv` is only usable at visibility `pub(self)`
+  --> $DIR/private-in-public-warn.rs:9:5
+   |
+LL |     struct Priv;
+   |     ^^^^^^^^^^^
+
 error: trait `traits::PrivTr` is more private than the item `traits::Alias`
   --> $DIR/private-in-public-warn.rs:42:5
    |
@@ -359,42 +395,6 @@ note: but type `Priv2` is only usable at visibility `pub(self)`
 LL |     struct Priv2;
    |     ^^^^^^^^^^^^
 
-error: type `types::Priv` is more private than the item `types::ES`
-  --> $DIR/private-in-public-warn.rs:27:9
-   |
-LL |         pub static ES: Priv;
-   |         ^^^^^^^^^^^^^^^^^^^ static `types::ES` is reachable at visibility `pub(crate)`
-   |
-note: but type `types::Priv` is only usable at visibility `pub(self)`
-  --> $DIR/private-in-public-warn.rs:9:5
-   |
-LL |     struct Priv;
-   |     ^^^^^^^^^^^
-
-error: type `types::Priv` is more private than the item `types::ef1`
-  --> $DIR/private-in-public-warn.rs:28:9
-   |
-LL |         pub fn ef1(arg: Priv);
-   |         ^^^^^^^^^^^^^^^^^^^^^^ function `types::ef1` is reachable at visibility `pub(crate)`
-   |
-note: but type `types::Priv` is only usable at visibility `pub(self)`
-  --> $DIR/private-in-public-warn.rs:9:5
-   |
-LL |     struct Priv;
-   |     ^^^^^^^^^^^
-
-error: type `types::Priv` is more private than the item `types::ef2`
-  --> $DIR/private-in-public-warn.rs:29:9
-   |
-LL |         pub fn ef2() -> Priv;
-   |         ^^^^^^^^^^^^^^^^^^^^^ function `types::ef2` is reachable at visibility `pub(crate)`
-   |
-note: but type `types::Priv` is only usable at visibility `pub(self)`
-  --> $DIR/private-in-public-warn.rs:9:5
-   |
-LL |     struct Priv;
-   |     ^^^^^^^^^^^
-
 warning: bounds on generic parameters in type aliases are not enforced
   --> $DIR/private-in-public-warn.rs:42:23
    |
diff --git a/tests/ui/issues/issue-13407.rs b/tests/ui/privacy/private-unit-struct-assignment.rs
index 7794be37b85..b8e1c4ecb18 100644
--- a/tests/ui/issues/issue-13407.rs
+++ b/tests/ui/privacy/private-unit-struct-assignment.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13407
+
 mod A {
     struct C;
 }
diff --git a/tests/ui/issues/issue-13407.stderr b/tests/ui/privacy/private-unit-struct-assignment.stderr
index ac2eb6581fe..8c36a08846d 100644
--- a/tests/ui/issues/issue-13407.stderr
+++ b/tests/ui/privacy/private-unit-struct-assignment.stderr
@@ -1,17 +1,17 @@
 error[E0603]: unit struct `C` is private
-  --> $DIR/issue-13407.rs:6:8
+  --> $DIR/private-unit-struct-assignment.rs:8:8
    |
 LL |     A::C = 1;
    |        ^ private unit struct
    |
 note: the unit struct `C` is defined here
-  --> $DIR/issue-13407.rs:2:5
+  --> $DIR/private-unit-struct-assignment.rs:4:5
    |
 LL |     struct C;
    |     ^^^^^^^^^
 
 error[E0308]: mismatched types
-  --> $DIR/issue-13407.rs:6:5
+  --> $DIR/private-unit-struct-assignment.rs:8:5
    |
 LL |     struct C;
    |     -------- unit struct defined here
diff --git a/tests/ui/privacy/projections.stderr b/tests/ui/privacy/projections.stderr
index 010d77998e3..addb6a075a2 100644
--- a/tests/ui/privacy/projections.stderr
+++ b/tests/ui/privacy/projections.stderr
@@ -1,16 +1,3 @@
-warning: type `Priv` is more private than the item `Leak`
-  --> $DIR/projections.rs:3:5
-   |
-LL |     pub type Leak = Priv;
-   |     ^^^^^^^^^^^^^ type alias `Leak` is reachable at visibility `pub(crate)`
-   |
-note: but type `Priv` is only usable at visibility `pub(self)`
-  --> $DIR/projections.rs:2:5
-   |
-LL |     struct Priv;
-   |     ^^^^^^^^^^^
-   = note: `#[warn(private_interfaces)]` on by default
-
 error[E0446]: private type `Priv` in public interface
   --> $DIR/projections.rs:24:5
    |
@@ -29,6 +16,19 @@ LL |     struct Priv;
 LL |     type A<T: Trait> = T::A<m::Leak>;
    |     ^^^^^^^^^^^^^^^^ can't leak private type
 
+warning: type `Priv` is more private than the item `Leak`
+  --> $DIR/projections.rs:3:5
+   |
+LL |     pub type Leak = Priv;
+   |     ^^^^^^^^^^^^^ type alias `Leak` is reachable at visibility `pub(crate)`
+   |
+note: but type `Priv` is only usable at visibility `pub(self)`
+  --> $DIR/projections.rs:2:5
+   |
+LL |     struct Priv;
+   |     ^^^^^^^^^^^
+   = note: `#[warn(private_interfaces)]` on by default
+
 error: type `Priv` is private
   --> $DIR/projections.rs:14:15
    |
diff --git a/tests/ui/issues/issue-12729.rs b/tests/ui/privacy/use-in-impl-scope-12729.rs
index 4d45846bc60..58fe042beec 100644
--- a/tests/ui/issues/issue-12729.rs
+++ b/tests/ui/privacy/use-in-impl-scope-12729.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/12729
+
 //@ edition: 2015
 //@ check-pass
 #![allow(dead_code)]
diff --git a/tests/ui/proc-macro/attribute.rs b/tests/ui/proc-macro/attribute.rs
index 988cdcd0403..dfb26738377 100644
--- a/tests/ui/proc-macro/attribute.rs
+++ b/tests/ui/proc-macro/attribute.rs
@@ -9,46 +9,55 @@ use proc_macro::*;
 #[proc_macro_derive]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE expected this to be a list
+//~| NOTE for more information, visit
 pub fn foo1(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive = ""]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE expected this to be a list
+//~| NOTE for more information, visit
 pub fn foo2(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(d3, a, b)]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE the only valid argument here is `attributes`
+//~| NOTE for more information, visit
 pub fn foo3(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(d4, attributes(a), b)]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE didn't expect any arguments here
+//~| NOTE for more information, visit
 pub fn foo4(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive("a")]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE didn't expect a literal here
+//~| NOTE for more information, visit
 pub fn foo5(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(d6 = "")]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE didn't expect any arguments here
+//~| NOTE for more information, visit
 pub fn foo6(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(m::d7)]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE expected a valid identifier here
+//~| NOTE for more information, visit
 pub fn foo7(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(d8(a))]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE didn't expect any arguments here
+//~| NOTE for more information, visit
 pub fn foo8(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(self)]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE expected a valid identifier here
+//~| NOTE for more information, visit
 pub fn foo9(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(PartialEq)] // OK
@@ -57,34 +66,41 @@ pub fn foo10(input: TokenStream) -> TokenStream { input }
 #[proc_macro_derive(d11, a)]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE the only valid argument here is `attributes`
+//~| NOTE for more information, visit
 pub fn foo11(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(d12, attributes)]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE expected this to be a list
+//~| NOTE for more information, visit
 pub fn foo12(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(d13, attributes("a"))]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE expected a valid identifier here
+//~| NOTE for more information, visit
 pub fn foo13(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(d14, attributes(a = ""))]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE didn't expect any arguments here
+//~| NOTE for more information, visit
 pub fn foo14(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(d15, attributes(m::a))]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE expected a valid identifier here
+//~| NOTE for more information, visit
 pub fn foo15(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(d16, attributes(a(b)))]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE didn't expect any arguments here
+//~| NOTE for more information, visit
 pub fn foo16(input: TokenStream) -> TokenStream { input }
 
 #[proc_macro_derive(d17, attributes(self))]
 //~^ ERROR malformed `proc_macro_derive` attribute
 //~| NOTE expected a valid identifier here
+//~| NOTE for more information, visit
 pub fn foo17(input: TokenStream) -> TokenStream { input }
diff --git a/tests/ui/proc-macro/attribute.stderr b/tests/ui/proc-macro/attribute.stderr
index db59a1fdfb3..e7127c8ef1d 100644
--- a/tests/ui/proc-macro/attribute.stderr
+++ b/tests/ui/proc-macro/attribute.stderr
@@ -2,145 +2,283 @@ error[E0539]: malformed `proc_macro_derive` attribute input
   --> $DIR/attribute.rs:9:1
    |
 LL | #[proc_macro_derive]
-   | ^^^^^^^^^^^^^^^^^^^^
-   | |
-   | expected this to be a list
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   | ^^^^^^^^^^^^^^^^^^^^ expected this to be a list
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL | #[proc_macro_derive(TraitName)]
+   |                    +++++++++++
+LL | #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |                    ++++++++++++++++++++++++++++++++++++++++++
 
 error[E0539]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:14:1
+  --> $DIR/attribute.rs:15:1
    |
 LL | #[proc_macro_derive = ""]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
-   | |
-   | expected this to be a list
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected this to be a list
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive = ""]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive = ""]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0539]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:19:1
+  --> $DIR/attribute.rs:21:1
    |
 LL | #[proc_macro_derive(d3, a, b)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^-^^^^^
-   | |                       |
-   | |                       the only valid argument here is `attributes`
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                         |
+   |                         the only valid argument here is `attributes`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(d3, a, b)]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(d3, a, b)]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0565]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:24:1
+  --> $DIR/attribute.rs:27:1
    |
 LL | #[proc_macro_derive(d4, attributes(a), b)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^^
-   | |                                      |
-   | |                                      didn't expect any arguments here
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                                        |
+   |                                        didn't expect any arguments here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(d4, attributes(a), b)]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(d4, attributes(a), b)]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0565]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:29:1
+  --> $DIR/attribute.rs:33:1
    |
 LL | #[proc_macro_derive("a")]
    | ^^^^^^^^^^^^^^^^^^^^---^^
-   | |                   |
-   | |                   didn't expect a literal here
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                     |
+   |                     didn't expect a literal here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive("a")]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive("a")]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0565]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:34:1
+  --> $DIR/attribute.rs:39:1
    |
 LL | #[proc_macro_derive(d6 = "")]
    | ^^^^^^^^^^^^^^^^^^^^^^^----^^
-   | |                      |
-   | |                      didn't expect any arguments here
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                        |
+   |                        didn't expect any arguments here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(d6 = "")]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(d6 = "")]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0539]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:39:1
+  --> $DIR/attribute.rs:45:1
    |
 LL | #[proc_macro_derive(m::d7)]
    | ^^^^^^^^^^^^^^^^^^^^-----^^
-   | |                   |
-   | |                   expected a valid identifier here
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                     |
+   |                     expected a valid identifier here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(m::d7)]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(m::d7)]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0565]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:44:1
+  --> $DIR/attribute.rs:51:1
    |
 LL | #[proc_macro_derive(d8(a))]
    | ^^^^^^^^^^^^^^^^^^^^^^---^^
-   | |                     |
-   | |                     didn't expect any arguments here
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                       |
+   |                       didn't expect any arguments here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(d8(a))]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(d8(a))]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0539]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:49:1
+  --> $DIR/attribute.rs:57:1
    |
 LL | #[proc_macro_derive(self)]
    | ^^^^^^^^^^^^^^^^^^^^----^^
-   | |                   |
-   | |                   expected a valid identifier here
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                     |
+   |                     expected a valid identifier here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(self)]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(self)]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0539]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:57:1
+  --> $DIR/attribute.rs:66:1
    |
 LL | #[proc_macro_derive(d11, a)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^-^^
-   | |                        |
-   | |                        the only valid argument here is `attributes`
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                          |
+   |                          the only valid argument here is `attributes`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(d11, a)]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(d11, a)]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0539]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:62:1
+  --> $DIR/attribute.rs:72:1
    |
 LL | #[proc_macro_derive(d12, attributes)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^----------^^
-   | |                        |
-   | |                        expected this to be a list
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                          |
+   |                          expected this to be a list
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(d12, attributes)]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(d12, attributes)]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0539]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:67:1
+  --> $DIR/attribute.rs:78:1
    |
 LL | #[proc_macro_derive(d13, attributes("a"))]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^^^
-   | |                                   |
-   | |                                   expected a valid identifier here
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                                     |
+   |                                     expected a valid identifier here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(d13, attributes("a"))]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(d13, attributes("a"))]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0565]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:72:1
+  --> $DIR/attribute.rs:84:1
    |
 LL | #[proc_macro_derive(d14, attributes(a = ""))]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----^^^
-   | |                                     |
-   | |                                     didn't expect any arguments here
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                                       |
+   |                                       didn't expect any arguments here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(d14, attributes(a = ""))]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(d14, attributes(a = ""))]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0539]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:77:1
+  --> $DIR/attribute.rs:90:1
    |
 LL | #[proc_macro_derive(d15, attributes(m::a))]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----^^^
-   | |                                   |
-   | |                                   expected a valid identifier here
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                                     |
+   |                                     expected a valid identifier here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(d15, attributes(m::a))]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(d15, attributes(m::a))]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0565]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:82:1
+  --> $DIR/attribute.rs:96:1
    |
 LL | #[proc_macro_derive(d16, attributes(a(b)))]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^^^
-   | |                                    |
-   | |                                    didn't expect any arguments here
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                                      |
+   |                                      didn't expect any arguments here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(d16, attributes(a(b)))]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(d16, attributes(a(b)))]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error[E0539]: malformed `proc_macro_derive` attribute input
-  --> $DIR/attribute.rs:87:1
+  --> $DIR/attribute.rs:102:1
    |
 LL | #[proc_macro_derive(d17, attributes(self))]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----^^^
-   | |                                   |
-   | |                                   expected a valid identifier here
-   | help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
+   |                                     |
+   |                                     expected a valid identifier here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[proc_macro_derive(d17, attributes(self))]
+LL + #[proc_macro_derive(TraitName)]
+   |
+LL - #[proc_macro_derive(d17, attributes(self))]
+LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
+   |
 
 error: aborting due to 16 previous errors
 
diff --git a/tests/ui/proc-macro/auxiliary/match-expander.rs b/tests/ui/proc-macro/auxiliary/match-expander.rs
new file mode 100644
index 00000000000..bf78df2addf
--- /dev/null
+++ b/tests/ui/proc-macro/auxiliary/match-expander.rs
@@ -0,0 +1,15 @@
+extern crate proc_macro;
+
+use proc_macro::TokenStream;
+
+#[proc_macro]
+pub fn matcher(input: TokenStream) -> TokenStream {
+"
+struct S(());
+let s = S(());
+match s {
+    true => {}
+    _ => {}
+}
+".parse().unwrap()
+}
diff --git a/tests/ui/proc-macro/derive-helper-shadowing.rs b/tests/ui/proc-macro/derive-helper-shadowing.rs
index e774e464053..ee883be3352 100644
--- a/tests/ui/proc-macro/derive-helper-shadowing.rs
+++ b/tests/ui/proc-macro/derive-helper-shadowing.rs
@@ -17,7 +17,7 @@ macro_rules! gen_helper_use {
 }
 
 #[empty_helper] //~ ERROR `empty_helper` is ambiguous
-                //~| WARN derive helper attribute is used before it is introduced
+                //~| ERROR derive helper attribute is used before it is introduced
                 //~| WARN this was previously accepted
 #[derive(Empty)]
 struct S {
diff --git a/tests/ui/proc-macro/derive-helper-shadowing.stderr b/tests/ui/proc-macro/derive-helper-shadowing.stderr
index 1206778bb23..65989375ab5 100644
--- a/tests/ui/proc-macro/derive-helper-shadowing.stderr
+++ b/tests/ui/proc-macro/derive-helper-shadowing.stderr
@@ -58,7 +58,7 @@ LL | use test_macros::empty_attr as empty_helper;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: use `crate::empty_helper` to refer to this attribute macro unambiguously
 
-warning: derive helper attribute is used before it is introduced
+error: derive helper attribute is used before it is introduced
   --> $DIR/derive-helper-shadowing.rs:19:3
    |
 LL | #[empty_helper]
@@ -69,8 +69,22 @@ LL | #[derive(Empty)]
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
-   = note: `#[warn(legacy_derive_helpers)]` on by default
+   = note: `#[deny(legacy_derive_helpers)]` on by default
 
-error: aborting due to 4 previous errors; 1 warning emitted
+error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0659`.
+Future incompatibility report: Future breakage diagnostic:
+error: derive helper attribute is used before it is introduced
+  --> $DIR/derive-helper-shadowing.rs:19:3
+   |
+LL | #[empty_helper]
+   |   ^^^^^^^^^^^^
+...
+LL | #[derive(Empty)]
+   |          ----- the attribute is introduced here
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
+   = note: `#[deny(legacy_derive_helpers)]` on by default
+
diff --git a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs
index 1197dd7f3bf..97c81e9945d 100644
--- a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs
+++ b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs
@@ -5,7 +5,7 @@ extern crate test_macros;
 use test_macros::empty_attr as empty_helper;
 
 #[empty_helper] //~ ERROR `empty_helper` is ambiguous
-                //~| WARN derive helper attribute is used before it is introduced
+                //~| ERROR derive helper attribute is used before it is introduced
                 //~| WARN this was previously accepted
 #[derive(Empty)]
 struct S;
diff --git a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr
index 1c12a2804c6..df7951464fb 100644
--- a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr
+++ b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr
@@ -17,7 +17,7 @@ LL | use test_macros::empty_attr as empty_helper;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: use `crate::empty_helper` to refer to this attribute macro unambiguously
 
-warning: derive helper attribute is used before it is introduced
+error: derive helper attribute is used before it is introduced
   --> $DIR/helper-attr-blocked-by-import-ambig.rs:7:3
    |
 LL | #[empty_helper]
@@ -28,8 +28,22 @@ LL | #[derive(Empty)]
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
-   = note: `#[warn(legacy_derive_helpers)]` on by default
+   = note: `#[deny(legacy_derive_helpers)]` on by default
 
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0659`.
+Future incompatibility report: Future breakage diagnostic:
+error: derive helper attribute is used before it is introduced
+  --> $DIR/helper-attr-blocked-by-import-ambig.rs:7:3
+   |
+LL | #[empty_helper]
+   |   ^^^^^^^^^^^^
+...
+LL | #[derive(Empty)]
+   |          ----- the attribute is introduced here
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
+   = note: `#[deny(legacy_derive_helpers)]` on by default
+
diff --git a/tests/ui/proc-macro/issue-75930-derive-cfg.rs b/tests/ui/proc-macro/issue-75930-derive-cfg.rs
index f0851b31e9c..e8df1a66dd9 100644
--- a/tests/ui/proc-macro/issue-75930-derive-cfg.rs
+++ b/tests/ui/proc-macro/issue-75930-derive-cfg.rs
@@ -6,7 +6,7 @@
 // Tests that we cfg-strip all targets before invoking
 // a derive macro
 // FIXME: We currently lose spans here (see issue #43081)
-
+#![warn(legacy_derive_helpers)]
 #![no_std] // Don't load unnecessary hygiene information from std
 extern crate std;
 
diff --git a/tests/ui/proc-macro/issue-75930-derive-cfg.stderr b/tests/ui/proc-macro/issue-75930-derive-cfg.stderr
index df1e36d7390..906e9c6bf69 100644
--- a/tests/ui/proc-macro/issue-75930-derive-cfg.stderr
+++ b/tests/ui/proc-macro/issue-75930-derive-cfg.stderr
@@ -9,7 +9,11 @@ LL | #[derive(Print)]
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
-   = note: `#[warn(legacy_derive_helpers)]` on by default
+note: the lint level is defined here
+  --> $DIR/issue-75930-derive-cfg.rs:9:9
+   |
+LL | #![warn(legacy_derive_helpers)]
+   |         ^^^^^^^^^^^^^^^^^^^^^
 
 warning: derive helper attribute is used before it is introduced
   --> $DIR/issue-75930-derive-cfg.rs:46:3
@@ -26,3 +30,39 @@ LL | #[derive(Print)]
 
 warning: 2 warnings emitted
 
+Future incompatibility report: Future breakage diagnostic:
+warning: derive helper attribute is used before it is introduced
+  --> $DIR/issue-75930-derive-cfg.rs:46:3
+   |
+LL | #[print_helper(a)]
+   |   ^^^^^^^^^^^^
+...
+LL | #[derive(Print)]
+   |          ----- the attribute is introduced here
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
+note: the lint level is defined here
+  --> $DIR/issue-75930-derive-cfg.rs:9:9
+   |
+LL | #![warn(legacy_derive_helpers)]
+   |         ^^^^^^^^^^^^^^^^^^^^^
+
+Future breakage diagnostic:
+warning: derive helper attribute is used before it is introduced
+  --> $DIR/issue-75930-derive-cfg.rs:46:3
+   |
+LL | #[print_helper(a)]
+   |   ^^^^^^^^^^^^
+...
+LL | #[derive(Print)]
+   |          ----- the attribute is introduced here
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
+note: the lint level is defined here
+  --> $DIR/issue-75930-derive-cfg.rs:9:9
+   |
+LL | #![warn(legacy_derive_helpers)]
+   |         ^^^^^^^^^^^^^^^^^^^^^
+
diff --git a/tests/ui/proc-macro/load-panic-backtrace.rs b/tests/ui/proc-macro/load-panic-backtrace.rs
index 848bdaf9f37..82645eb4e9f 100644
--- a/tests/ui/proc-macro/load-panic-backtrace.rs
+++ b/tests/ui/proc-macro/load-panic-backtrace.rs
@@ -1,7 +1,7 @@
 //@ proc-macro: test-macros.rs
 //@ compile-flags: -Z proc-macro-backtrace
 //@ rustc-env:RUST_BACKTRACE=0
-//@ normalize-stderr: "thread '.*' panicked " -> ""
+//@ normalize-stderr: "thread '.*' \(0x[[:xdigit:]]+\) panicked " -> ""
 //@ normalize-stderr: "note:.*RUST_BACKTRACE=1.*\n" -> ""
 //@ needs-unwind proc macro panics to report errors
 
diff --git a/tests/ui/proc-macro/load-panic-backtrace.stderr b/tests/ui/proc-macro/load-panic-backtrace.stderr
index a1049f5a324..b8872eb12b7 100644
--- a/tests/ui/proc-macro/load-panic-backtrace.stderr
+++ b/tests/ui/proc-macro/load-panic-backtrace.stderr
@@ -1,5 +1,5 @@
 
-at $DIR/auxiliary/test-macros.rs:38:5:
+thread '<unnamed>' ($TID) panicked at $DIR/auxiliary/test-macros.rs:38:5:
 panic-derive
 error: proc-macro derive panicked
   --> $DIR/load-panic-backtrace.rs:11:10
diff --git a/tests/ui/proc-macro/match-expander.rs b/tests/ui/proc-macro/match-expander.rs
new file mode 100644
index 00000000000..23e5746c540
--- /dev/null
+++ b/tests/ui/proc-macro/match-expander.rs
@@ -0,0 +1,12 @@
+//@ proc-macro: match-expander.rs
+// Ensure that we don't point at macro invocation when providing inference contexts.
+
+#[macro_use]
+extern crate match_expander;
+
+fn main() {
+    match_expander::matcher!();
+    //~^ ERROR: mismatched types
+    //~| NOTE: expected `S`, found `bool`
+    //~| NOTE: in this expansion of match_expander::matcher!
+}
diff --git a/tests/ui/proc-macro/match-expander.stderr b/tests/ui/proc-macro/match-expander.stderr
new file mode 100644
index 00000000000..b77468ec60a
--- /dev/null
+++ b/tests/ui/proc-macro/match-expander.stderr
@@ -0,0 +1,11 @@
+error[E0308]: mismatched types
+  --> $DIR/match-expander.rs:8:5
+   |
+LL |     match_expander::matcher!();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `S`, found `bool`
+   |
+   = note: this error originates in the macro `match_expander::matcher` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/proc-macro/proc-macro-attributes.rs b/tests/ui/proc-macro/proc-macro-attributes.rs
index 455fcc56e58..f1270b896aa 100644
--- a/tests/ui/proc-macro/proc-macro-attributes.rs
+++ b/tests/ui/proc-macro/proc-macro-attributes.rs
@@ -4,17 +4,17 @@
 extern crate derive_b;
 
 #[B] //~ ERROR `B` is ambiguous
-     //~| WARN derive helper attribute is used before it is introduced
+     //~| ERROR derive helper attribute is used before it is introduced
      //~| WARN this was previously accepted
 #[C] //~ ERROR cannot find attribute `C` in this scope
 #[B(D)] //~ ERROR `B` is ambiguous
-        //~| WARN derive helper attribute is used before it is introduced
+        //~| ERROR derive helper attribute is used before it is introduced
         //~| WARN this was previously accepted
 #[B(E = "foo")] //~ ERROR `B` is ambiguous
-                //~| WARN derive helper attribute is used before it is introduced
+                //~| ERROR derive helper attribute is used before it is introduced
                 //~| WARN this was previously accepted
 #[B(arbitrary tokens)] //~ ERROR `B` is ambiguous
-                       //~| WARN derive helper attribute is used before it is introduced
+                       //~| ERROR derive helper attribute is used before it is introduced
                        //~| WARN this was previously accepted
 #[derive(B)]
 struct B;
diff --git a/tests/ui/proc-macro/proc-macro-attributes.stderr b/tests/ui/proc-macro/proc-macro-attributes.stderr
index 140d8790690..2cc57383eb3 100644
--- a/tests/ui/proc-macro/proc-macro-attributes.stderr
+++ b/tests/ui/proc-macro/proc-macro-attributes.stderr
@@ -76,7 +76,7 @@ note: `B` could also refer to the derive macro imported here
 LL | #[macro_use]
    | ^^^^^^^^^^^^
 
-warning: derive helper attribute is used before it is introduced
+error: derive helper attribute is used before it is introduced
   --> $DIR/proc-macro-attributes.rs:6:3
    |
 LL | #[B]
@@ -87,9 +87,9 @@ LL | #[derive(B)]
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
-   = note: `#[warn(legacy_derive_helpers)]` on by default
+   = note: `#[deny(legacy_derive_helpers)]` on by default
 
-warning: derive helper attribute is used before it is introduced
+error: derive helper attribute is used before it is introduced
   --> $DIR/proc-macro-attributes.rs:10:3
    |
 LL | #[B(D)]
@@ -101,7 +101,7 @@ LL | #[derive(B)]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
 
-warning: derive helper attribute is used before it is introduced
+error: derive helper attribute is used before it is introduced
   --> $DIR/proc-macro-attributes.rs:13:3
    |
 LL | #[B(E = "foo")]
@@ -113,7 +113,7 @@ LL | #[derive(B)]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
 
-warning: derive helper attribute is used before it is introduced
+error: derive helper attribute is used before it is introduced
   --> $DIR/proc-macro-attributes.rs:16:3
    |
 LL | #[B(arbitrary tokens)]
@@ -125,6 +125,62 @@ LL | #[derive(B)]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
 
-error: aborting due to 5 previous errors; 4 warnings emitted
+error: aborting due to 9 previous errors
 
 For more information about this error, try `rustc --explain E0659`.
+Future incompatibility report: Future breakage diagnostic:
+error: derive helper attribute is used before it is introduced
+  --> $DIR/proc-macro-attributes.rs:6:3
+   |
+LL | #[B]
+   |   ^
+...
+LL | #[derive(B)]
+   |          - the attribute is introduced here
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
+   = note: `#[deny(legacy_derive_helpers)]` on by default
+
+Future breakage diagnostic:
+error: derive helper attribute is used before it is introduced
+  --> $DIR/proc-macro-attributes.rs:10:3
+   |
+LL | #[B(D)]
+   |   ^
+...
+LL | #[derive(B)]
+   |          - the attribute is introduced here
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
+   = note: `#[deny(legacy_derive_helpers)]` on by default
+
+Future breakage diagnostic:
+error: derive helper attribute is used before it is introduced
+  --> $DIR/proc-macro-attributes.rs:13:3
+   |
+LL | #[B(E = "foo")]
+   |   ^
+...
+LL | #[derive(B)]
+   |          - the attribute is introduced here
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
+   = note: `#[deny(legacy_derive_helpers)]` on by default
+
+Future breakage diagnostic:
+error: derive helper attribute is used before it is introduced
+  --> $DIR/proc-macro-attributes.rs:16:3
+   |
+LL | #[B(arbitrary tokens)]
+   |   ^
+...
+LL | #[derive(B)]
+   |          - the attribute is introduced here
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
+   = note: `#[deny(legacy_derive_helpers)]` on by default
+
diff --git a/tests/ui/proc-macro/quote/does-not-have-iter-interpolated-dup.stderr b/tests/ui/proc-macro/quote/does-not-have-iter-interpolated-dup.stderr
index ecb12c1df3b..0bcea9b85f4 100644
--- a/tests/ui/proc-macro/quote/does-not-have-iter-interpolated-dup.stderr
+++ b/tests/ui/proc-macro/quote/does-not-have-iter-interpolated-dup.stderr
@@ -5,7 +5,6 @@ LL |     quote!($($nonrep $nonrep)*);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |     |
    |     expected `HasIterator`, found `ThereIsNoIteratorInRepetition`
-   |     expected due to this
    |     here the type of `has_iter` is inferred to be `ThereIsNoIteratorInRepetition`
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/quote/does-not-have-iter-interpolated.stderr b/tests/ui/proc-macro/quote/does-not-have-iter-interpolated.stderr
index 093e2ebc098..d945ab41a12 100644
--- a/tests/ui/proc-macro/quote/does-not-have-iter-interpolated.stderr
+++ b/tests/ui/proc-macro/quote/does-not-have-iter-interpolated.stderr
@@ -5,7 +5,6 @@ LL |     quote!($($nonrep)*);
    |     ^^^^^^^^^^^^^^^^^^^
    |     |
    |     expected `HasIterator`, found `ThereIsNoIteratorInRepetition`
-   |     expected due to this
    |     here the type of `has_iter` is inferred to be `ThereIsNoIteratorInRepetition`
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/proc-macro/quote/does-not-have-iter-separated.stderr b/tests/ui/proc-macro/quote/does-not-have-iter-separated.stderr
index 937209e675e..2d715f293d4 100644
--- a/tests/ui/proc-macro/quote/does-not-have-iter-separated.stderr
+++ b/tests/ui/proc-macro/quote/does-not-have-iter-separated.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/does-not-have-iter-separated.rs:8:5
    |
 LL |     quote!($(a b),*);
-   |     ^^^^^^^^^^^^^^^^
-   |     |
-   |     expected `HasIterator`, found `ThereIsNoIteratorInRepetition`
-   |     expected due to this
+   |     ^^^^^^^^^^^^^^^^ expected `HasIterator`, found `ThereIsNoIteratorInRepetition`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/proc-macro/quote/does-not-have-iter.stderr b/tests/ui/proc-macro/quote/does-not-have-iter.stderr
index e74ea334899..ac8e725038a 100644
--- a/tests/ui/proc-macro/quote/does-not-have-iter.stderr
+++ b/tests/ui/proc-macro/quote/does-not-have-iter.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/does-not-have-iter.rs:8:5
    |
 LL |     quote!($(a b)*);
-   |     ^^^^^^^^^^^^^^^
-   |     |
-   |     expected `HasIterator`, found `ThereIsNoIteratorInRepetition`
-   |     expected due to this
+   |     ^^^^^^^^^^^^^^^ expected `HasIterator`, found `ThereIsNoIteratorInRepetition`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/proc-macro/span-from-proc-macro.stderr b/tests/ui/proc-macro/span-from-proc-macro.stderr
index 452c04df877..c79ab04eadf 100644
--- a/tests/ui/proc-macro/span-from-proc-macro.stderr
+++ b/tests/ui/proc-macro/span-from-proc-macro.stderr
@@ -10,7 +10,7 @@ LL |             field: MissingType
   ::: $DIR/span-from-proc-macro.rs:8:1
    |
 LL | #[error_from_attribute]
-   | ----------------------- in this procedural macro expansion
+   | ----------------------- in this attribute macro expansion
 
 error[E0412]: cannot find type `OtherMissingType` in this scope
   --> $DIR/auxiliary/span-from-proc-macro.rs:42:21
diff --git a/tests/ui/process/multi-panic.rs b/tests/ui/process/multi-panic.rs
index 481fe75c731..1fddffeb770 100644
--- a/tests/ui/process/multi-panic.rs
+++ b/tests/ui/process/multi-panic.rs
@@ -7,18 +7,27 @@ fn check_for_no_backtrace(test: std::process::Output) {
     let err = String::from_utf8_lossy(&test.stderr);
     let mut it = err.lines().filter(|l| !l.is_empty());
 
-    assert_eq!(it.next().map(|l| l.starts_with("thread '<unnamed>' panicked")), Some(true));
-    assert_eq!(it.next().is_some(), true);
+    assert_eq!(
+        it.next().map(|l| l.starts_with("thread '<unnamed>' (") && l.contains("panicked")),
+        Some(true),
+        "out: ```{err}```",
+    );
+    assert_eq!(it.next().is_some(), true, "out: ```{err}```");
     assert_eq!(
         it.next(),
         Some(
             "note: run with `RUST_BACKTRACE=1` \
                                 environment variable to display a backtrace"
-        )
+        ),
+        "out: ```{err}```",
+    );
+    assert_eq!(
+        it.next().map(|l| l.starts_with("thread 'main' (") && l.contains("panicked at")),
+        Some(true),
+        "out: ```{err}```",
     );
-    assert_eq!(it.next().map(|l| l.starts_with("thread 'main' panicked at")), Some(true));
-    assert_eq!(it.next().is_some(), true);
-    assert_eq!(it.next(), None);
+    assert_eq!(it.next().is_some(), true, "out: ```{err}```");
+    assert_eq!(it.next(), None, "out: ```{err}```");
 }
 
 fn main() {
diff --git a/tests/ui/process/println-with-broken-pipe.run.stderr b/tests/ui/process/println-with-broken-pipe.run.stderr
index ab414994b56..c56793de525 100644
--- a/tests/ui/process/println-with-broken-pipe.run.stderr
+++ b/tests/ui/process/println-with-broken-pipe.run.stderr
@@ -1,4 +1,4 @@
 
-thread 'main' panicked at library/std/src/io/stdio.rs:LL:CC:
+thread 'main' ($TID) panicked at library/std/src/io/stdio.rs:LL:CC:
 failed printing to stdout: Broken pipe (os error 32)
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/recursion/issue-23122-2.rs b/tests/ui/recursion/issue-23122-2.rs
index 95e1f60d8b0..d4f13e9fa55 100644
--- a/tests/ui/recursion/issue-23122-2.rs
+++ b/tests/ui/recursion/issue-23122-2.rs
@@ -1,3 +1,4 @@
+//@ compile-flags: -Zwrite-long-types-to-disk=yes
 trait Next {
     type Next: Next;
 }
diff --git a/tests/ui/recursion/issue-23122-2.stderr b/tests/ui/recursion/issue-23122-2.stderr
index c5774cc1888..de402d65e6d 100644
--- a/tests/ui/recursion/issue-23122-2.stderr
+++ b/tests/ui/recursion/issue-23122-2.stderr
@@ -1,17 +1,19 @@
 error[E0275]: overflow evaluating the requirement `<<<<<<<... as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized`
-  --> $DIR/issue-23122-2.rs:10:17
+  --> $DIR/issue-23122-2.rs:11:17
    |
 LL |     type Next = <GetNext<T::Next> as Next>::Next;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_23122_2`)
-note: required for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>` to implement `Next`
-  --> $DIR/issue-23122-2.rs:9:15
+note: required for `GetNext<<<<... as Next>::Next as Next>::Next as Next>::Next>` to implement `Next`
+  --> $DIR/issue-23122-2.rs:10:15
    |
 LL | impl<T: Next> Next for GetNext<T> {
    |      -        ^^^^     ^^^^^^^^^^
    |      |
    |      unsatisfied trait bound introduced here
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-23122-2.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.rs b/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.rs
index 7b7b1a9580b..c219a920bb4 100644
--- a/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.rs
+++ b/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.rs
@@ -1,3 +1,4 @@
+//@ compile-flags: -Zwrite-long-types-to-disk=yes
 // `S` is infinitely recursing so it's not possible to generate a finite
 // drop impl.
 //
diff --git a/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr b/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr
index 409f63b91b6..cf3bc4578a7 100644
--- a/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr
+++ b/tests/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr
@@ -1,10 +1,12 @@
 error[E0320]: overflow while adding drop-check rules for `S<u32>`
-  --> $DIR/issue-38591-non-regular-dropck-recursion.rs:11:6
+  --> $DIR/issue-38591-non-regular-dropck-recursion.rs:12:6
    |
 LL | fn f(x: S<u32>) {}
    |      ^
    |
-   = note: overflowed on `S<fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(u32)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))>`
+   = note: overflowed on `S<fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(fn(...))))))))))))))))>`
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-38591-non-regular-dropck-recursion.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/recursion/issue-83150.rs b/tests/ui/recursion/issue-83150.rs
index b720c168187..9194ce1ab17 100644
--- a/tests/ui/recursion/issue-83150.rs
+++ b/tests/ui/recursion/issue-83150.rs
@@ -1,6 +1,6 @@
 //~ ERROR overflow evaluating the requirement `Map<&mut std::ops::Range<u8>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>: Iterator`
 //@ build-fail
-//@ compile-flags: -Copt-level=0
+//@ compile-flags: -Copt-level=0 -Zwrite-long-types-to-disk=yes
 
 fn main() {
     let mut iter = 0u8..1;
diff --git a/tests/ui/recursion/issue-83150.stderr b/tests/ui/recursion/issue-83150.stderr
index 600922f1e57..a245b001bad 100644
--- a/tests/ui/recursion/issue-83150.stderr
+++ b/tests/ui/recursion/issue-83150.stderr
@@ -13,9 +13,11 @@ LL |     func(&mut iter.map(|x| x + 1))
 error[E0275]: overflow evaluating the requirement `Map<&mut std::ops::Range<u8>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>: Iterator`
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_83150`)
-   = note: required for `&mut Map<&mut std::ops::Range<u8>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>` to implement `Iterator`
+   = note: required for `&mut Map<&mut Range<u8>, {closure@issue-83150.rs:12:24}>` to implement `Iterator`
    = note: 65 redundant requirements hidden
-   = note: required for `&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut std::ops::Range<u8>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>, {closure@$DIR/issue-83150.rs:12:24: 12:27}>` to implement `Iterator`
+   = note: required for `&mut Map<&mut Map<&mut Map<&mut Map<&mut ..., ...>, ...>, ...>, ...>` to implement `Iterator`
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-83150.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error; 1 warning emitted
 
diff --git a/tests/ui/recursion/recursion.rs b/tests/ui/recursion/recursion.rs
index 5cd4012a9d2..ae927b1b4c6 100644
--- a/tests/ui/recursion/recursion.rs
+++ b/tests/ui/recursion/recursion.rs
@@ -1,5 +1,5 @@
 //@ build-fail
-//@ compile-flags:-C overflow-checks=off
+//@ compile-flags:-C overflow-checks=off --diagnostic-width=100 -Zwrite-long-types-to-disk=yes
 
 enum Nil {NilValue}
 struct Cons<T> {head:isize, tail:T}
diff --git a/tests/ui/recursion/recursion.stderr b/tests/ui/recursion/recursion.stderr
index f959805defc..974f18ed103 100644
--- a/tests/ui/recursion/recursion.stderr
+++ b/tests/ui/recursion/recursion.stderr
@@ -1,4 +1,4 @@
-error: reached the recursion limit while instantiating `test::<Cons<Cons<Cons<Cons<Cons<...>>>>>>`
+error: reached the recursion limit while instantiating `test::<Cons<Cons<Cons<Cons<Cons<Cons<...>>>>>>>`
   --> $DIR/recursion.rs:17:11
    |
 LL |     _ => {test (n-1, i+1, Cons {head:2*i+1, tail:first}, Cons{head:i*i, tail:second})}
@@ -9,7 +9,8 @@ note: `test` defined here
    |
 LL | fn test<T:Dot> (n:isize, i:isize, first:T, second:T) ->isize {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: the full type name has been written to '$TEST_BUILD_DIR/recursion.long-type.txt'
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/recursion.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.rs b/tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.rs
index 0875d385ddc..4abca916423 100644
--- a/tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.rs
+++ b/tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.rs
@@ -1,5 +1,5 @@
 //@ build-fail
-//@ compile-flags: -Copt-level=0
+//@ compile-flags: -Copt-level=0 --diagnostic-width=100 -Zwrite-long-types-to-disk=yes
 
 fn main() {
     rec(Empty);
diff --git a/tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.stderr b/tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.stderr
index fe005984fab..8d6d44dcbe2 100644
--- a/tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.stderr
+++ b/tests/ui/recursion/recursive-impl-trait-iterator-by-ref-67552.stderr
@@ -1,4 +1,4 @@
-error: reached the recursion limit while instantiating `rec::<&mut &mut &mut &mut &mut ...>`
+error: reached the recursion limit while instantiating `rec::<&mut &mut &mut &mut &mut &mut &mut &mut ...>`
   --> $DIR/recursive-impl-trait-iterator-by-ref-67552.rs:28:9
    |
 LL |         rec(identity(&mut it))
@@ -11,7 +11,8 @@ LL | / fn rec<T>(mut it: T)
 LL | | where
 LL | |     T: Iterator,
    | |________________^
-   = note: the full type name has been written to '$TEST_BUILD_DIR/recursive-impl-trait-iterator-by-ref-67552.long-type.txt'
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/recursive-impl-trait-iterator-by-ref-67552.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/recursion_limit/invalid_digit_type.stderr b/tests/ui/recursion_limit/invalid_digit_type.stderr
index 94442b5747f..a122262f1df 100644
--- a/tests/ui/recursion_limit/invalid_digit_type.stderr
+++ b/tests/ui/recursion_limit/invalid_digit_type.stderr
@@ -3,6 +3,8 @@ error: malformed `recursion_limit` attribute input
    |
 LL | #![recursion_limit = 123]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![recursion_limit = "N"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/limits.html#the-recursion_limit-attribute>
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/recursion_limit/invalid_macro.stderr b/tests/ui/recursion_limit/invalid_macro.stderr
index aa4894ec4d8..b4dbc9fcb13 100644
--- a/tests/ui/recursion_limit/invalid_macro.stderr
+++ b/tests/ui/recursion_limit/invalid_macro.stderr
@@ -3,6 +3,8 @@ error: malformed `recursion_limit` attribute input
    |
 LL | #![recursion_limit = foo!()]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![recursion_limit = "N"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/limits.html#the-recursion_limit-attribute>
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/recursion_limit/no-value.stderr b/tests/ui/recursion_limit/no-value.stderr
index b2e8c46c372..4a0ad04f271 100644
--- a/tests/ui/recursion_limit/no-value.stderr
+++ b/tests/ui/recursion_limit/no-value.stderr
@@ -3,6 +3,8 @@ error: malformed `recursion_limit` attribute input
    |
 LL | #![recursion_limit]
    | ^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![recursion_limit = "N"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/limits.html#the-recursion_limit-attribute>
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/repr/invalid_repr_list_help.stderr b/tests/ui/repr/invalid_repr_list_help.stderr
index 763ad9c2795..f9d1593275e 100644
--- a/tests/ui/repr/invalid_repr_list_help.stderr
+++ b/tests/ui/repr/invalid_repr_list_help.stderr
@@ -5,6 +5,7 @@ LL | #[repr(uwu)]
    |        ^^^
    |
    = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
 
 error[E0552]: unrecognized representation hint
   --> $DIR/invalid_repr_list_help.rs:6:8
@@ -13,6 +14,7 @@ LL | #[repr(uwu = "a")]
    |        ^^^^^^^^^
    |
    = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
 
 error[E0552]: unrecognized representation hint
   --> $DIR/invalid_repr_list_help.rs:9:8
@@ -21,6 +23,7 @@ LL | #[repr(uwu(4))]
    |        ^^^^^^
    |
    = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
 
 error[E0552]: unrecognized representation hint
   --> $DIR/invalid_repr_list_help.rs:14:8
@@ -29,6 +32,7 @@ LL | #[repr(uwu, u8)]
    |        ^^^
    |
    = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
 
 error[E0552]: unrecognized representation hint
   --> $DIR/invalid_repr_list_help.rs:19:8
@@ -37,6 +41,7 @@ LL | #[repr(uwu)]
    |        ^^^
    |
    = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
 
 error: unknown `doc` attribute `owo`
   --> $DIR/invalid_repr_list_help.rs:20:7
diff --git a/tests/ui/repr/repr.stderr b/tests/ui/repr/repr.stderr
index 9e581332278..d4faea12517 100644
--- a/tests/ui/repr/repr.stderr
+++ b/tests/ui/repr/repr.stderr
@@ -2,28 +2,66 @@ error[E0539]: malformed `repr` attribute input
   --> $DIR/repr.rs:1:1
    |
 LL | #[repr]
-   | ^^^^^^^
-   | |
-   | expected this to be a list
-   | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
+   | ^^^^^^^ expected this to be a list
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html#representations>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL | #[repr(<integer type>)]
+   |       ++++++++++++++++
+LL | #[repr(C)]
+   |       +++
+LL | #[repr(Rust)]
+   |       ++++++
+LL | #[repr(align(...))]
+   |       ++++++++++++
+   = and 2 other candidates
 
 error[E0539]: malformed `repr` attribute input
   --> $DIR/repr.rs:4:1
    |
 LL | #[repr = "B"]
-   | ^^^^^^^^^^^^^
-   | |
-   | expected this to be a list
-   | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
+   | ^^^^^^^^^^^^^ expected this to be a list
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html#representations>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[repr = "B"]
+LL + #[repr(<integer type>)]
+   |
+LL - #[repr = "B"]
+LL + #[repr(C)]
+   |
+LL - #[repr = "B"]
+LL + #[repr(Rust)]
+   |
+LL - #[repr = "B"]
+LL + #[repr(align(...))]
+   |
+   = and 2 other candidates
 
 error[E0539]: malformed `repr` attribute input
   --> $DIR/repr.rs:7:1
    |
 LL | #[repr = "C"]
-   | ^^^^^^^^^^^^^
-   | |
-   | expected this to be a list
-   | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
+   | ^^^^^^^^^^^^^ expected this to be a list
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html#representations>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[repr = "C"]
+LL + #[repr(<integer type>)]
+   |
+LL - #[repr = "C"]
+LL + #[repr(C)]
+   |
+LL - #[repr = "C"]
+LL + #[repr(Rust)]
+   |
+LL - #[repr = "C"]
+LL + #[repr(align(...))]
+   |
+   = and 2 other candidates
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/issues/issue-2281-part1.rs b/tests/ui/resolve/cannot-find-value-in-scope-22811.rs
index 8340ade2239..fc07ae5e60e 100644
--- a/tests/ui/issues/issue-2281-part1.rs
+++ b/tests/ui/resolve/cannot-find-value-in-scope-22811.rs
@@ -1 +1,2 @@
+// https://github.com/rust-lang/rust/issues/22811
 fn main() { println!("{}", foobar); } //~ ERROR cannot find value `foobar` in this scope
diff --git a/tests/ui/issues/issue-2281-part1.stderr b/tests/ui/resolve/cannot-find-value-in-scope-22811.stderr
index 47a1ef8cc02..529fd7e8f49 100644
--- a/tests/ui/issues/issue-2281-part1.stderr
+++ b/tests/ui/resolve/cannot-find-value-in-scope-22811.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `foobar` in this scope
-  --> $DIR/issue-2281-part1.rs:1:28
+  --> $DIR/cannot-find-value-in-scope-22811.rs:2:28
    |
 LL | fn main() { println!("{}", foobar); }
    |                            ^^^^^^ not found in this scope
diff --git a/tests/ui/resolve/multiple_definitions_attribute_merging.rs b/tests/ui/resolve/multiple_definitions_attribute_merging.rs
index 155abafdd9d..519b989fbe8 100644
--- a/tests/ui/resolve/multiple_definitions_attribute_merging.rs
+++ b/tests/ui/resolve/multiple_definitions_attribute_merging.rs
@@ -5,7 +5,7 @@
 //@known-bug: #120873
 //@ failure-status: 101
 //@ normalize-stderr: "note: .*\n\n" -> ""
-//@ normalize-stderr: "thread 'rustc' panicked.*\n" -> ""
+//@ normalize-stderr: "thread 'rustc'.*panicked.*\n" -> ""
 //@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
 //@ rustc-env:RUST_BACKTRACE=0
 
diff --git a/tests/ui/resolve/path-attr-in-const-block.stderr b/tests/ui/resolve/path-attr-in-const-block.stderr
index 0b5942a287d..f3ae5b60c4f 100644
--- a/tests/ui/resolve/path-attr-in-const-block.stderr
+++ b/tests/ui/resolve/path-attr-in-const-block.stderr
@@ -12,6 +12,8 @@ LL |         #![path = foo!()]
    |         |         |
    |         |         expected a string literal here
    |         help: must be of the form: `#[path = "file"]`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/items/modules.html#the-path-attribute>
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/issues/issue-14254.rs b/tests/ui/resolve/pointer-type-impls-14254.rs
index 90ad375c262..ea8fb6aa167 100644
--- a/tests/ui/issues/issue-14254.rs
+++ b/tests/ui/resolve/pointer-type-impls-14254.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14254
+
 //@ check-pass
 
 trait Foo: Sized {
diff --git a/tests/ui/resolve/proc_macro_generated_packed.rs b/tests/ui/resolve/proc_macro_generated_packed.rs
index 0cba3c1616d..41236c732bb 100644
--- a/tests/ui/resolve/proc_macro_generated_packed.rs
+++ b/tests/ui/resolve/proc_macro_generated_packed.rs
@@ -5,7 +5,7 @@
 //@known-bug: #120873
 //@ failure-status: 101
 //@ normalize-stderr: "note: .*\n\n" -> ""
-//@ normalize-stderr: "thread 'rustc' panicked.*\n" -> ""
+//@ normalize-stderr: "thread 'rustc'.*panicked.*\n" -> ""
 //@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
 //@ rustc-env:RUST_BACKTRACE=0
 
diff --git a/tests/ui/issues/issue-11820.rs b/tests/ui/resolve/reference-clone-nonclone-11820.rs
index ada844f8ee1..74dad96da94 100644
--- a/tests/ui/issues/issue-11820.rs
+++ b/tests/ui/resolve/reference-clone-nonclone-11820.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/11820
+
 //@ run-pass
 
 #![allow(noop_method_call)]
diff --git a/tests/ui/issues/issue-33293.rs b/tests/ui/resolve/unresolved-module-error-33293.rs
index 115ae3aad20..354f9914d44 100644
--- a/tests/ui/issues/issue-33293.rs
+++ b/tests/ui/resolve/unresolved-module-error-33293.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/33293
 fn main() {
     match 0 {
         aaa::bbb(_) => ()
diff --git a/tests/ui/issues/issue-33293.stderr b/tests/ui/resolve/unresolved-module-error-33293.stderr
index a82813194d7..28528148387 100644
--- a/tests/ui/issues/issue-33293.stderr
+++ b/tests/ui/resolve/unresolved-module-error-33293.stderr
@@ -1,5 +1,5 @@
 error[E0433]: failed to resolve: use of unresolved module or unlinked crate `aaa`
-  --> $DIR/issue-33293.rs:3:9
+  --> $DIR/unresolved-module-error-33293.rs:4:9
    |
 LL |         aaa::bbb(_) => ()
    |         ^^^ use of unresolved module or unlinked crate `aaa`
diff --git a/tests/ui/issues/issue-14082.rs b/tests/ui/resolve/use-shadowing-14082.rs
index 16556e1d260..9d7df5ed1c6 100644
--- a/tests/ui/issues/issue-14082.rs
+++ b/tests/ui/resolve/use-shadowing-14082.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14082
+
 //@ check-pass
 
 #![allow(unused_imports, dead_code)]
diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr
index b89c5e8dda8..020c2e6f241 100644
--- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr
+++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `f32: Termination` is not satisfied
   --> $DIR/termination-trait-test-wrong-type.rs:6:31
    |
 LL | #[test]
-   | ------- in this procedural macro expansion
+   | ------- in this attribute macro expansion
 LL | fn can_parse_zero_as_f32() -> Result<f32, ParseFloatError> {
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Termination` is not implemented for `f32`
    |
diff --git a/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.rs b/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.rs
index 4cf2d1ac4a6..80a4ab35527 100644
--- a/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.rs
+++ b/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.rs
@@ -41,6 +41,7 @@ mod capture_tait_complex_pass {
     #[define_opaque(Opq2)]
     fn test() -> Opq2 {}
     //~^ ERROR: expected generic lifetime parameter, found `'a`
+    //~| ERROR: expected generic lifetime parameter, found `'b`
 }
 
 // Same as the above, but make sure that different placeholder regions are not equal.
@@ -80,6 +81,7 @@ mod constrain_pass {
     #[define_opaque(Opq2)]
     fn test() -> Opq2 {}
     //~^ ERROR: expected generic lifetime parameter, found `'a`
+    //~| ERROR: expected generic lifetime parameter, found `'a`
 }
 
 fn main() {}
diff --git a/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.stderr b/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.stderr
index 3614fc8f45c..665b9a91696 100644
--- a/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.stderr
+++ b/tests/ui/rfcs/type-alias-impl-trait/higher-ranked-regions-basic.stderr
@@ -36,8 +36,17 @@ LL |     type Opq1<'a> = impl for<'b> Trait<'b, Ty = Opq0<'b>>; // <- Note 'b
 LL |     fn test() -> Opq2 {}
    |                       ^^
 
+error[E0792]: expected generic lifetime parameter, found `'b`
+  --> $DIR/higher-ranked-regions-basic.rs:42:23
+   |
+LL |     type Opq0<'a> = impl Sized;
+   |               -- this generic parameter must be used with a generic lifetime parameter
+...
+LL |     fn test() -> Opq2 {}
+   |                       ^^
+
 error[E0700]: hidden type for `capture_tait_complex_fail::Opq0<'a>` captures lifetime that does not appear in bounds
-  --> $DIR/higher-ranked-regions-basic.rs:53:23
+  --> $DIR/higher-ranked-regions-basic.rs:54:23
    |
 LL |     type Opq0<'a> = impl Sized;
    |                     ---------- opaque type defined here
@@ -48,7 +57,7 @@ LL |     fn test() -> Opq2 {}
    |                       ^^
 
 error[E0792]: expected generic lifetime parameter, found `'a`
-  --> $DIR/higher-ranked-regions-basic.rs:62:65
+  --> $DIR/higher-ranked-regions-basic.rs:63:65
    |
 LL |     type Opq0<'a, 'b> = impl Sized;
    |               -- this generic parameter must be used with a generic lifetime parameter
@@ -57,7 +66,7 @@ LL |     fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'static>> {}
    |                                                                 ^^
 
 error[E0792]: expected generic lifetime parameter, found `'a`
-  --> $DIR/higher-ranked-regions-basic.rs:71:60
+  --> $DIR/higher-ranked-regions-basic.rs:72:60
    |
 LL |     type Opq0<'a, 'b> = impl Sized;
    |               -- this generic parameter must be used with a generic lifetime parameter
@@ -66,7 +75,7 @@ LL |     fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'a>> {}
    |                                                            ^^
 
 error[E0792]: expected generic lifetime parameter, found `'a`
-  --> $DIR/higher-ranked-regions-basic.rs:81:23
+  --> $DIR/higher-ranked-regions-basic.rs:82:23
    |
 LL |     type Opq1<'a> = impl for<'b> Trait<'b, Ty = Opq0<'a, 'b>>;
    |               -- this generic parameter must be used with a generic lifetime parameter
@@ -74,7 +83,16 @@ LL |     type Opq1<'a> = impl for<'b> Trait<'b, Ty = Opq0<'a, 'b>>;
 LL |     fn test() -> Opq2 {}
    |                       ^^
 
-error: aborting due to 8 previous errors
+error[E0792]: expected generic lifetime parameter, found `'a`
+  --> $DIR/higher-ranked-regions-basic.rs:82:23
+   |
+LL |     type Opq0<'a, 'b> = impl Sized;
+   |               -- this generic parameter must be used with a generic lifetime parameter
+...
+LL |     fn test() -> Opq2 {}
+   |                       ^^
+
+error: aborting due to 10 previous errors
 
 Some errors have detailed explanations: E0700, E0792.
 For more information about an error, try `rustc --explain E0700`.
diff --git a/tests/ui/rustc_public-ir-print/async-closure.stdout b/tests/ui/rustc_public-ir-print/async-closure.stdout
index 4afb15af7a9..73e9b8fc097 100644
--- a/tests/ui/rustc_public-ir-print/async-closure.stdout
+++ b/tests/ui/rustc_public-ir-print/async-closure.stdout
@@ -63,7 +63,7 @@ fn foo::{closure#0}::{closure#0}(_1: Pin<&mut {async closure body@$DIR/async-clo
         StorageDead(_3);
         _0 = std::task::Poll::Ready(move _5);
         _10 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
-        discriminant((*_10) = 1;
+        discriminant((*_10)) = 1;
         return;
     }
     bb2: {
@@ -101,7 +101,7 @@ fn foo::{closure#0}::{synthetic#0}(_1: Pin<&mut {async closure body@$DIR/async-c
         StorageDead(_3);
         _0 = std::task::Poll::Ready(move _5);
         _10 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
-        discriminant((*_10) = 1;
+        discriminant((*_10)) = 1;
         return;
     }
     bb2: {
diff --git a/tests/ui/rustdoc/cfg-rustdoc.rs b/tests/ui/rustdoc/cfg-rustdoc.rs
index dd8e1ed97c4..11c48d07552 100644
--- a/tests/ui/rustdoc/cfg-rustdoc.rs
+++ b/tests/ui/rustdoc/cfg-rustdoc.rs
@@ -1,6 +1,7 @@
-#[cfg(doc)]
-pub struct Foo;
+#[cfg(doc)] //~ NOTE the item is gated here
+pub struct Foo; //~ NOTE found an item that was configured out
 
 fn main() {
-    let f = Foo; //~ ERROR
+    let f = Foo; //~ ERROR cannot find value `Foo` in this scope
+    //~^ NOTE not found in this scope
 }
diff --git a/tests/ui/rustdoc/cfg-rustdoc.stderr b/tests/ui/rustdoc/cfg-rustdoc.stderr
index 340a8e22482..0e8a5dfea61 100644
--- a/tests/ui/rustdoc/cfg-rustdoc.stderr
+++ b/tests/ui/rustdoc/cfg-rustdoc.stderr
@@ -3,6 +3,14 @@ error[E0425]: cannot find value `Foo` in this scope
    |
 LL |     let f = Foo;
    |             ^^^ not found in this scope
+   |
+note: found an item that was configured out
+  --> $DIR/cfg-rustdoc.rs:2:12
+   |
+LL | #[cfg(doc)]
+   |       --- the item is gated here
+LL | pub struct Foo;
+   |            ^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/self/arbitrary_self_type_infinite_recursion.stderr b/tests/ui/self/arbitrary_self_type_infinite_recursion.stderr
index 5e652efb364..2dadc5c2d33 100644
--- a/tests/ui/self/arbitrary_self_type_infinite_recursion.stderr
+++ b/tests/ui/self/arbitrary_self_type_infinite_recursion.stderr
@@ -32,7 +32,7 @@ LL |   p.method();
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`arbitrary_self_type_infinite_recursion`)
 
-error[E0599]: no method named `method` found for struct `MySmartPtr` in the current scope
+error[E0599]: no method named `method` found for struct `MySmartPtr<T>` in the current scope
   --> $DIR/arbitrary_self_type_infinite_recursion.rs:21:5
    |
 LL | struct MySmartPtr<T>(T);
diff --git a/tests/ui/self/arbitrary_self_types_not_allow_call_with_no_deref.stderr b/tests/ui/self/arbitrary_self_types_not_allow_call_with_no_deref.stderr
index a30cf605829..5d7f6142093 100644
--- a/tests/ui/self/arbitrary_self_types_not_allow_call_with_no_deref.stderr
+++ b/tests/ui/self/arbitrary_self_types_not_allow_call_with_no_deref.stderr
@@ -1,4 +1,4 @@
-error[E0599]: no method named `frobnicate_ref` found for struct `CppRef` in the current scope
+error[E0599]: no method named `frobnicate_ref` found for struct `CppRef<T>` in the current scope
   --> $DIR/arbitrary_self_types_not_allow_call_with_no_deref.rs:29:17
    |
 LL | struct CppRef<T>(T);
@@ -16,7 +16,7 @@ help: there is a method `frobnicate_cpp_ref` with a similar name
 LL |     foo_cpp_ref.frobnicate_cpp_ref();
    |                            ++++
 
-error[E0599]: no method named `frobnicate_self` found for struct `CppRef` in the current scope
+error[E0599]: no method named `frobnicate_self` found for struct `CppRef<T>` in the current scope
   --> $DIR/arbitrary_self_types_not_allow_call_with_no_deref.rs:32:17
    |
 LL | struct CppRef<T>(T);
diff --git a/tests/ui/self/arbitrary_self_types_pin_needing_borrow.rs b/tests/ui/self/arbitrary_self_types_pin_needing_borrow.rs
index d877dbe6075..28845890278 100644
--- a/tests/ui/self/arbitrary_self_types_pin_needing_borrow.rs
+++ b/tests/ui/self/arbitrary_self_types_pin_needing_borrow.rs
@@ -9,5 +9,5 @@ impl S {
 fn main() {
     Pin::new(S).x();
     //~^ ERROR the trait bound `S: Deref` is not satisfied
-    //~| ERROR no method named `x` found for struct `Pin` in the current scope
+    //~| ERROR no method named `x` found for struct `Pin<Ptr>` in the current scope
 }
diff --git a/tests/ui/self/arbitrary_self_types_pin_needing_borrow.stderr b/tests/ui/self/arbitrary_self_types_pin_needing_borrow.stderr
index 1811cd6753f..df226a9366a 100644
--- a/tests/ui/self/arbitrary_self_types_pin_needing_borrow.stderr
+++ b/tests/ui/self/arbitrary_self_types_pin_needing_borrow.stderr
@@ -15,7 +15,7 @@ LL |     Pin::new(&S).x();
 LL |     Pin::new(&mut S).x();
    |              ++++
 
-error[E0599]: no method named `x` found for struct `Pin` in the current scope
+error[E0599]: no method named `x` found for struct `Pin<Ptr>` in the current scope
   --> $DIR/arbitrary_self_types_pin_needing_borrow.rs:10:17
    |
 LL |     Pin::new(S).x();
diff --git a/tests/ui/simd/libm_no_std_cant_float.stderr b/tests/ui/simd/libm_no_std_cant_float.stderr
index 97e0b7efe2a..cc9aefaad5e 100644
--- a/tests/ui/simd/libm_no_std_cant_float.stderr
+++ b/tests/ui/simd/libm_no_std_cant_float.stderr
@@ -1,34 +1,34 @@
-error[E0599]: no method named `ceil` found for struct `Simd` in the current scope
+error[E0599]: no method named `ceil` found for struct `Simd<T, N>` in the current scope
   --> $DIR/libm_no_std_cant_float.rs:15:17
    |
 LL |     let _xc = x.ceil();
    |                 ^^^^ method not found in `Simd<f32, 4>`
 
-error[E0599]: no method named `floor` found for struct `Simd` in the current scope
+error[E0599]: no method named `floor` found for struct `Simd<T, N>` in the current scope
   --> $DIR/libm_no_std_cant_float.rs:16:17
    |
 LL |     let _xf = x.floor();
    |                 ^^^^^ method not found in `Simd<f32, 4>`
 
-error[E0599]: no method named `round` found for struct `Simd` in the current scope
+error[E0599]: no method named `round` found for struct `Simd<T, N>` in the current scope
   --> $DIR/libm_no_std_cant_float.rs:17:17
    |
 LL |     let _xr = x.round();
    |                 ^^^^^ method not found in `Simd<f32, 4>`
 
-error[E0599]: no method named `trunc` found for struct `Simd` in the current scope
+error[E0599]: no method named `trunc` found for struct `Simd<T, N>` in the current scope
   --> $DIR/libm_no_std_cant_float.rs:18:17
    |
 LL |     let _xt = x.trunc();
    |                 ^^^^^ method not found in `Simd<f32, 4>`
 
-error[E0599]: no method named `mul_add` found for struct `Simd` in the current scope
+error[E0599]: no method named `mul_add` found for struct `Simd<T, N>` in the current scope
   --> $DIR/libm_no_std_cant_float.rs:19:19
    |
 LL |     let _xfma = x.mul_add(x, x);
    |                   ^^^^^^^ method not found in `Simd<f32, 4>`
 
-error[E0599]: no method named `sqrt` found for struct `Simd` in the current scope
+error[E0599]: no method named `sqrt` found for struct `Simd<T, N>` in the current scope
   --> $DIR/libm_no_std_cant_float.rs:20:20
    |
 LL |     let _xsqrt = x.sqrt();
diff --git a/tests/ui/span/E0539.stderr b/tests/ui/span/E0539.stderr
index 01f091a2676..34d81b73cb5 100644
--- a/tests/ui/span/E0539.stderr
+++ b/tests/ui/span/E0539.stderr
@@ -6,10 +6,14 @@ LL | #[inline(unknown)]
    |          |
    |          valid arguments are `always` or `never`
    |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/codegen.html#the-inline-attribute>
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[inline(unknown)]
-LL + #[inline(always|never)]
+LL + #[inline(always)]
+   |
+LL - #[inline(unknown)]
+LL + #[inline(never)]
    |
 LL - #[inline(unknown)]
 LL + #[inline]
diff --git a/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr b/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr
index f37dc320fa3..8081f7b3a8b 100644
--- a/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr
+++ b/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr
@@ -44,6 +44,7 @@ LL |
 LL |         foo(f);
    |             ^ move occurs because `f` has type `{closure@$DIR/borrowck-call-is-borrow-issue-12224.rs:52:17: 52:58}`, which does not implement the `Copy` trait
    |
+   = help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
 help: consider cloning the value if the performance cost is acceptable
    |
 LL |         foo(f.clone());
diff --git a/tests/ui/specialization/defaultimpl/validation.rs b/tests/ui/specialization/defaultimpl/validation.rs
index 14771be8982..78f6099c3dd 100644
--- a/tests/ui/specialization/defaultimpl/validation.rs
+++ b/tests/ui/specialization/defaultimpl/validation.rs
@@ -4,7 +4,7 @@
 struct S;
 struct Z;
 
-default impl S {} //~ ERROR inherent impls cannot be `default`
+default impl S {} //~ ERROR inherent impls cannot be default
 
 default unsafe impl Send for S {}
 //~^ ERROR impls of auto traits cannot be default
diff --git a/tests/ui/specialization/defaultimpl/validation.stderr b/tests/ui/specialization/defaultimpl/validation.stderr
index 82a33bf9cdc..a8dfef2dcfb 100644
--- a/tests/ui/specialization/defaultimpl/validation.stderr
+++ b/tests/ui/specialization/defaultimpl/validation.stderr
@@ -1,10 +1,10 @@
-error: inherent impls cannot be `default`
+error: inherent impls cannot be default
   --> $DIR/validation.rs:7:14
    |
 LL | default impl S {}
    | -------      ^ inherent impl for this type
    | |
-   | `default` because of this
+   | default because of this
    |
    = note: only trait implementations may be annotated with `default`
 
diff --git a/tests/ui/issues/issue-9249.rs b/tests/ui/static/static-string-slice-9249.rs
index b98ba050521..da099117bd4 100644
--- a/tests/ui/issues/issue-9249.rs
+++ b/tests/ui/static/static-string-slice-9249.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/9249
 //@ check-pass
 #![allow(dead_code)]
 
diff --git a/tests/ui/issues/issue-16452.rs b/tests/ui/statics/conditional-static-declaration-16010.rs
index 4ab74f09059..0bc5b0ee86f 100644
--- a/tests/ui/issues/issue-16452.rs
+++ b/tests/ui/statics/conditional-static-declaration-16010.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/16010
+
 //@ run-pass
 #![allow(dead_code)]
 
diff --git a/tests/ui/issues/issue-13214.rs b/tests/ui/statics/enum-with-static-str-variant-13214.rs
index 8140ec943a0..1db37da632d 100644
--- a/tests/ui/issues/issue-13214.rs
+++ b/tests/ui/statics/enum-with-static-str-variant-13214.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13214
+
 //@ build-pass
 #![allow(dead_code)]
 // defining static with struct that contains enum
diff --git a/tests/ui/stats/macro-stats.rs b/tests/ui/stats/macro-stats.rs
index d986904ddd6..1b7d58bf058 100644
--- a/tests/ui/stats/macro-stats.rs
+++ b/tests/ui/stats/macro-stats.rs
@@ -49,10 +49,32 @@ fn opt(x: Option<u32>) {
     }
 }
 
-macro_rules! long_name_that_fits_on_a_single_line {
-    () => {}
-}
-long_name_that_fits_on_a_single_line!();
+macro_rules! long_name_that_fits_on_one_line { () => {} }
+long_name_that_fits_on_one_line!();
+long_name_that_fits_on_one_line!();
+long_name_that_fits_on_one_line!();
+long_name_that_fits_on_one_line!();
+long_name_that_fits_on_one_line!();
+long_name_that_fits_on_one_line!();
+long_name_that_fits_on_one_line!();
+long_name_that_fits_on_one_line!();
+long_name_that_fits_on_one_line!();
+long_name_that_fits_on_one_line!();
+
+macro_rules! long_name_that_fits_on_one_line_ { () => {} }
+long_name_that_fits_on_one_line_!();
+
+macro_rules! long_name_that_fits_on_one_line__ { () => {} }
+long_name_that_fits_on_one_line__!();
+
+macro_rules! long_name_that_fits_on_one_line___ { () => {} }
+long_name_that_fits_on_one_line___!();
+
+macro_rules! long_name_that_fits_on_one_line____ { () => {} }
+long_name_that_fits_on_one_line____!();
+
+macro_rules! long_name_that_fits_on_one_line_____ { () => {} }
+long_name_that_fits_on_one_line_____!();
 
 macro_rules! long_name_that_doesnt_fit_on_one_line {
     ($t:ty) => {
diff --git a/tests/ui/stats/macro-stats.stderr b/tests/ui/stats/macro-stats.stderr
index 8d0fdb8958a..75b90df6466 100644
--- a/tests/ui/stats/macro-stats.stderr
+++ b/tests/ui/stats/macro-stats.stderr
@@ -22,6 +22,11 @@ macro-stats trait_tys!                            1          2        2.0
 macro-stats n99!                                  2          2        1.0          4        2.0
 macro-stats none!                                 1          1        1.0          4        4.0
 macro-stats u32!                                  1          1        1.0          3        3.0
-macro-stats long_name_that_fits_on_a_single_line! 1          1        1.0          0        0.0
+macro-stats long_name_that_fits_on_one_line!     10         10        1.0          0        0.0
+macro-stats long_name_that_fits_on_one_line_____! 1          1        1.0          0        0.0
+macro-stats long_name_that_fits_on_one_line____!  1          1        1.0          0        0.0
+macro-stats long_name_that_fits_on_one_line___!   1          1        1.0          0        0.0
+macro-stats long_name_that_fits_on_one_line__!    1          1        1.0          0        0.0
+macro-stats long_name_that_fits_on_one_line_!     1          1        1.0          0        0.0
 macro-stats #[test]                               1          1        1.0          0        0.0
 macro-stats ===================================================================================
diff --git a/tests/ui/structs/default-field-values/auxiliary/struct_field_default.rs b/tests/ui/structs/default-field-values/auxiliary/struct_field_default.rs
index b315df5dba2..a1c9645a1ae 100644
--- a/tests/ui/structs/default-field-values/auxiliary/struct_field_default.rs
+++ b/tests/ui/structs/default-field-values/auxiliary/struct_field_default.rs
@@ -3,3 +3,13 @@
 pub struct A {
     pub a: isize = 42,
 }
+
+struct Priv;
+
+pub struct B {
+    pub a: Priv = Priv,
+}
+
+pub struct C {
+    pub a: Priv,
+}
diff --git a/tests/ui/structs/default-field-values/non-exhaustive-ctor-2.rs b/tests/ui/structs/default-field-values/non-exhaustive-ctor-2.rs
new file mode 100644
index 00000000000..047505c3f1c
--- /dev/null
+++ b/tests/ui/structs/default-field-values/non-exhaustive-ctor-2.rs
@@ -0,0 +1,29 @@
+//@ aux-build:struct_field_default.rs
+#![feature(default_field_values)]
+
+extern crate struct_field_default as xc;
+
+use m::S;
+
+mod m {
+   pub struct S {
+       pub field: () = (),
+       pub field1: Priv1 = Priv1 {},
+       pub field2: Priv2 = Priv2,
+   }
+   struct Priv1 {}
+   struct Priv2;
+}
+
+fn main() {
+    let _ = S { field: (), field1: m::Priv1 {} };
+    //~^ ERROR missing field `field2`
+    //~| ERROR struct `Priv1` is private
+    let _ = S { field: (), field1: m::Priv1 {}, field2: m::Priv2 };
+    //~^ ERROR struct `Priv1` is private
+    //~| ERROR unit struct `Priv2` is private
+    let _ = xc::B { a: xc::Priv };
+    //~^ ERROR unit struct `Priv` is private
+    let _ = xc::C { a: xc::Priv };
+    //~^ ERROR unit struct `Priv` is private
+}
diff --git a/tests/ui/structs/default-field-values/non-exhaustive-ctor-2.stderr b/tests/ui/structs/default-field-values/non-exhaustive-ctor-2.stderr
new file mode 100644
index 00000000000..66de73561db
--- /dev/null
+++ b/tests/ui/structs/default-field-values/non-exhaustive-ctor-2.stderr
@@ -0,0 +1,105 @@
+error[E0603]: struct `Priv1` is private
+  --> $DIR/non-exhaustive-ctor-2.rs:19:39
+   |
+LL |     let _ = S { field: (), field1: m::Priv1 {} };
+   |                            ------     ^^^^^ private struct
+   |                            |
+   |                            while setting this field
+   |
+note: the struct `Priv1` is defined here
+  --> $DIR/non-exhaustive-ctor-2.rs:14:4
+   |
+LL |    struct Priv1 {}
+   |    ^^^^^^^^^^^^
+help: the type `Priv1` of field `field1` is private, but you can construct the default value defined for it in `S` using `..` in the struct initializer expression
+   |
+LL -     let _ = S { field: (), field1: m::Priv1 {} };
+LL +     let _ = S { field: (), .. };
+   |
+
+error[E0603]: struct `Priv1` is private
+  --> $DIR/non-exhaustive-ctor-2.rs:22:39
+   |
+LL |     let _ = S { field: (), field1: m::Priv1 {}, field2: m::Priv2 };
+   |                            ------     ^^^^^ private struct
+   |                            |
+   |                            while setting this field
+   |
+note: the struct `Priv1` is defined here
+  --> $DIR/non-exhaustive-ctor-2.rs:14:4
+   |
+LL |    struct Priv1 {}
+   |    ^^^^^^^^^^^^
+help: the type `Priv1` of field `field1` is private, but you can construct the default value defined for it in `S` using `..` in the struct initializer expression
+   |
+LL -     let _ = S { field: (), field1: m::Priv1 {}, field2: m::Priv2 };
+LL +     let _ = S { field: (), field2: m::Priv2, .. };
+   |
+
+error[E0603]: unit struct `Priv2` is private
+  --> $DIR/non-exhaustive-ctor-2.rs:22:60
+   |
+LL |     let _ = S { field: (), field1: m::Priv1 {}, field2: m::Priv2 };
+   |                                                 ------     ^^^^^ private unit struct
+   |                                                 |
+   |                                                 while setting this field
+   |
+note: the unit struct `Priv2` is defined here
+  --> $DIR/non-exhaustive-ctor-2.rs:15:4
+   |
+LL |    struct Priv2;
+   |    ^^^^^^^^^^^^^
+help: the type `Priv2` of field `field2` is private, but you can construct the default value defined for it in `S` using `..` in the struct initializer expression
+   |
+LL -     let _ = S { field: (), field1: m::Priv1 {}, field2: m::Priv2 };
+LL +     let _ = S { field: (), field1: m::Priv1 {}, .. };
+   |
+
+error[E0603]: unit struct `Priv` is private
+  --> $DIR/non-exhaustive-ctor-2.rs:25:28
+   |
+LL |     let _ = xc::B { a: xc::Priv };
+   |                     -      ^^^^ private unit struct
+   |                     |
+   |                     while setting this field
+   |
+note: the unit struct `Priv` is defined here
+  --> $DIR/auxiliary/struct_field_default.rs:7:1
+   |
+LL | struct Priv;
+   | ^^^^^^^^^^^
+help: the type `Priv` of field `a` is private, but you can construct the default value defined for it in `B` using `..` in the struct initializer expression
+   |
+LL -     let _ = xc::B { a: xc::Priv };
+LL +     let _ = xc::B { .. };
+   |
+
+error[E0603]: unit struct `Priv` is private
+  --> $DIR/non-exhaustive-ctor-2.rs:27:28
+   |
+LL |     let _ = xc::C { a: xc::Priv };
+   |                     -      ^^^^ private unit struct
+   |                     |
+   |                     while setting this field
+   |
+note: the unit struct `Priv` is defined here
+  --> $DIR/auxiliary/struct_field_default.rs:7:1
+   |
+LL | struct Priv;
+   | ^^^^^^^^^^^
+
+error[E0063]: missing field `field2` in initializer of `S`
+  --> $DIR/non-exhaustive-ctor-2.rs:19:13
+   |
+LL |     let _ = S { field: (), field1: m::Priv1 {} };
+   |             ^ missing `field2`
+   |
+help: all remaining fields have default values, you can use those values with `..`
+   |
+LL |     let _ = S { field: (), field1: m::Priv1 {}, .. };
+   |                                               ++++
+
+error: aborting due to 6 previous errors
+
+Some errors have detailed explanations: E0063, E0603.
+For more information about an error, try `rustc --explain E0063`.
diff --git a/tests/ui/issues/issue-24365.rs b/tests/ui/structs/struct-field-access-errors-24365.rs
index da195116047..13a95cd1cca 100644
--- a/tests/ui/issues/issue-24365.rs
+++ b/tests/ui/structs/struct-field-access-errors-24365.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/24365
 pub enum Attribute {
     Code {attr_name_idx: u16},
 }
diff --git a/tests/ui/issues/issue-24365.stderr b/tests/ui/structs/struct-field-access-errors-24365.stderr
index 3f6ed0231d8..65275af4701 100644
--- a/tests/ui/issues/issue-24365.stderr
+++ b/tests/ui/structs/struct-field-access-errors-24365.stderr
@@ -1,17 +1,17 @@
 error[E0609]: no field `b` on type `Foo`
-  --> $DIR/issue-24365.rs:10:22
+  --> $DIR/struct-field-access-errors-24365.rs:11:22
    |
 LL |     println!("{}", a.b);
    |                      ^ unknown field
 
 error[E0609]: no field `attr_name_idx` on type `&Attribute`
-  --> $DIR/issue-24365.rs:17:18
+  --> $DIR/struct-field-access-errors-24365.rs:18:18
    |
 LL |     let z = (&x).attr_name_idx;
    |                  ^^^^^^^^^^^^^ unknown field
 
 error[E0609]: no field `attr_name_idx` on type `Attribute`
-  --> $DIR/issue-24365.rs:18:15
+  --> $DIR/struct-field-access-errors-24365.rs:19:15
    |
 LL |     let y = x.attr_name_idx;
    |               ^^^^^^^^^^^^^ unknown field
diff --git a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs b/tests/ui/structs/tuple-struct-field-naming-47073.rs
index 6cd1f144359..6cf27e55c4b 100644
--- a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.rs
+++ b/tests/ui/structs/tuple-struct-field-naming-47073.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/47073
 type Guilty = bool;
 type FineDollars = u32;
 
diff --git a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr b/tests/ui/structs/tuple-struct-field-naming-47073.stderr
index 0a6fe24d5e3..09ba2fb406a 100644
--- a/tests/ui/issues/issue-47073-zero-padded-tuple-struct-indices.stderr
+++ b/tests/ui/structs/tuple-struct-field-naming-47073.stderr
@@ -1,17 +1,13 @@
 error[E0609]: no field `00` on type `Verdict`
-  --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:8:30
+  --> $DIR/tuple-struct-field-naming-47073.rs:9:30
    |
 LL |     let _condemned = justice.00;
    |                              ^^ unknown field
    |
-help: a field with a similar name exists
-   |
-LL -     let _condemned = justice.00;
-LL +     let _condemned = justice.0;
-   |
+   = note: available fields are: `0`, `1`
 
 error[E0609]: no field `001` on type `Verdict`
-  --> $DIR/issue-47073-zero-padded-tuple-struct-indices.rs:10:31
+  --> $DIR/tuple-struct-field-naming-47073.rs:11:31
    |
 LL |     let _punishment = justice.001;
    |                               ^^^ unknown field
diff --git a/tests/ui/suggestions/assoc-ct-for-assoc-method.stderr b/tests/ui/suggestions/assoc-ct-for-assoc-method.stderr
index 6d6fd983038..47efe69cfc2 100644
--- a/tests/ui/suggestions/assoc-ct-for-assoc-method.stderr
+++ b/tests/ui/suggestions/assoc-ct-for-assoc-method.stderr
@@ -8,7 +8,7 @@ LL |     let x: i32 = MyS::foo;
    |
    = note: expected type `i32`
            found fn item `fn() -> MyS {MyS::foo}`
-help: try referring to the associated const `FOO` instead (notice the capitalization difference)
+help: try referring to the associated const `FOO` instead (notice the capitalization)
    |
 LL -     let x: i32 = MyS::foo;
 LL +     let x: i32 = MyS::FOO;
diff --git a/tests/ui/suggestions/bool_typo_err_suggest.stderr b/tests/ui/suggestions/bool_typo_err_suggest.stderr
index faf799d0fda..d46ce1ad8a9 100644
--- a/tests/ui/suggestions/bool_typo_err_suggest.stderr
+++ b/tests/ui/suggestions/bool_typo_err_suggest.stderr
@@ -16,7 +16,7 @@ error[E0425]: cannot find value `False` in this scope
 LL |     let y = False;
    |             ^^^^^ not found in this scope
    |
-help: you may want to use a bool value instead (notice the capitalization difference)
+help: you may want to use a bool value instead (notice the capitalization)
    |
 LL -     let y = False;
 LL +     let y = false;
diff --git a/tests/ui/suggestions/case-difference-suggestions.rs b/tests/ui/suggestions/case-difference-suggestions.rs
new file mode 100644
index 00000000000..d554b6e9367
--- /dev/null
+++ b/tests/ui/suggestions/case-difference-suggestions.rs
@@ -0,0 +1,57 @@
+fn main() {
+
+    // Simple case difference, no hit
+    let hello = "hello";
+    println!("{}", Hello); //~ ERROR cannot find value `Hello` in this scope
+
+    // Multiple case differences, hit
+    let myVariable = 10;
+    println!("{}", myvariable); //~ ERROR cannot find value `myvariable` in this scope
+
+    // Case difference with special characters, hit
+    let user_name = "john";
+    println!("{}", User_Name); //~ ERROR cannot find value `User_Name` in this scope
+
+    // All uppercase vs all lowercase, hit
+    let FOO = 42;
+    println!("{}", foo); //~ ERROR cannot find value `foo` in this scope
+
+
+    // 0 vs O
+    let FFO0 = 100;
+    println!("{}", FFOO); //~ ERROR cannot find value `FFOO` in this scope
+
+    let l1st = vec![1, 2, 3];
+    println!("{}", list); //~ ERROR cannot find value `list` in this scope
+
+    let S5 = "test";
+    println!("{}", SS); //~ ERROR cannot find value `SS` in this scope
+
+    let aS5 = "test";
+    println!("{}", a55); //~ ERROR cannot find value `a55` in this scope
+
+    let B8 = 8;
+    println!("{}", BB); //~ ERROR cannot find value `BB` in this scope
+
+    let g9 = 9;
+    println!("{}", gg); //~ ERROR cannot find value `gg` in this scope
+
+    let o1d = "old";
+    println!("{}", old); //~ ERROR cannot find value `old` in this scope
+
+    let new1 = "new";
+    println!("{}", newl); //~ ERROR cannot find value `newl` in this scope
+
+    let apple = "apple";
+    println!("{}", app1e); //~ ERROR cannot find value `app1e` in this scope
+
+    let a = 1;
+    println!("{}", A); //~ ERROR cannot find value `A` in this scope
+
+    let worldlu = "world";
+    println!("{}", world1U); //~ ERROR cannot find value `world1U` in this scope
+
+    let myV4rlable = 42;
+    println!("{}", myv4r1able); //~ ERROR cannot find value `myv4r1able` in this scope
+
+}
diff --git a/tests/ui/suggestions/case-difference-suggestions.stderr b/tests/ui/suggestions/case-difference-suggestions.stderr
new file mode 100644
index 00000000000..c3d2410a6eb
--- /dev/null
+++ b/tests/ui/suggestions/case-difference-suggestions.stderr
@@ -0,0 +1,99 @@
+error[E0425]: cannot find value `Hello` in this scope
+  --> $DIR/case-difference-suggestions.rs:5:20
+   |
+LL |     println!("{}", Hello);
+   |                    ^^^^^ help: a local variable with a similar name exists: `hello`
+
+error[E0425]: cannot find value `myvariable` in this scope
+  --> $DIR/case-difference-suggestions.rs:9:20
+   |
+LL |     println!("{}", myvariable);
+   |                    ^^^^^^^^^^ help: a local variable with a similar name exists (notice the capitalization): `myVariable`
+
+error[E0425]: cannot find value `User_Name` in this scope
+  --> $DIR/case-difference-suggestions.rs:13:20
+   |
+LL |     println!("{}", User_Name);
+   |                    ^^^^^^^^^ help: a local variable with a similar name exists: `user_name`
+
+error[E0425]: cannot find value `foo` in this scope
+  --> $DIR/case-difference-suggestions.rs:17:20
+   |
+LL |     println!("{}", foo);
+   |                    ^^^ help: a local variable with a similar name exists (notice the capitalization): `FOO`
+
+error[E0425]: cannot find value `FFOO` in this scope
+  --> $DIR/case-difference-suggestions.rs:22:20
+   |
+LL |     println!("{}", FFOO);
+   |                    ^^^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `FFO0`
+
+error[E0425]: cannot find value `list` in this scope
+  --> $DIR/case-difference-suggestions.rs:25:20
+   |
+LL |     println!("{}", list);
+   |                    ^^^^ help: a local variable with a similar name exists: `l1st`
+
+error[E0425]: cannot find value `SS` in this scope
+  --> $DIR/case-difference-suggestions.rs:28:20
+   |
+LL |     println!("{}", SS);
+   |                    ^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `S5`
+
+error[E0425]: cannot find value `a55` in this scope
+  --> $DIR/case-difference-suggestions.rs:31:20
+   |
+LL |     println!("{}", a55);
+   |                    ^^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `aS5`
+
+error[E0425]: cannot find value `BB` in this scope
+  --> $DIR/case-difference-suggestions.rs:34:20
+   |
+LL |     println!("{}", BB);
+   |                    ^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `B8`
+
+error[E0425]: cannot find value `gg` in this scope
+  --> $DIR/case-difference-suggestions.rs:37:20
+   |
+LL |     println!("{}", gg);
+   |                    ^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `g9`
+
+error[E0425]: cannot find value `old` in this scope
+  --> $DIR/case-difference-suggestions.rs:40:20
+   |
+LL |     println!("{}", old);
+   |                    ^^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `o1d`
+
+error[E0425]: cannot find value `newl` in this scope
+  --> $DIR/case-difference-suggestions.rs:43:20
+   |
+LL |     println!("{}", newl);
+   |                    ^^^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `new1`
+
+error[E0425]: cannot find value `app1e` in this scope
+  --> $DIR/case-difference-suggestions.rs:46:20
+   |
+LL |     println!("{}", app1e);
+   |                    ^^^^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `apple`
+
+error[E0425]: cannot find value `A` in this scope
+  --> $DIR/case-difference-suggestions.rs:49:20
+   |
+LL |     println!("{}", A);
+   |                    ^ help: a local variable with a similar name exists: `a`
+
+error[E0425]: cannot find value `world1U` in this scope
+  --> $DIR/case-difference-suggestions.rs:52:20
+   |
+LL |     println!("{}", world1U);
+   |                    ^^^^^^^ help: a local variable with a similar name exists (notice the capitalization and digit/letter confusion): `worldlu`
+
+error[E0425]: cannot find value `myv4r1able` in this scope
+  --> $DIR/case-difference-suggestions.rs:55:20
+   |
+LL |     println!("{}", myv4r1able);
+   |                    ^^^^^^^^^^ help: a local variable with a similar name exists (notice the capitalization and digit/letter confusion): `myV4rlable`
+
+error: aborting due to 16 previous errors
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/suggestions/dont-suggest-ref/move-into-closure.rs b/tests/ui/suggestions/dont-suggest-ref/move-into-closure.rs
index 44eac3691a3..34088f219b2 100644
--- a/tests/ui/suggestions/dont-suggest-ref/move-into-closure.rs
+++ b/tests/ui/suggestions/dont-suggest-ref/move-into-closure.rs
@@ -11,8 +11,55 @@ struct X(Y);
 struct Y;
 
 fn consume_fn<F: Fn()>(_f: F) { }
+//~^ HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
 
 fn consume_fnmut<F: FnMut()>(_f: F) { }
+//~^ HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+//~| HELP `Fn` and `FnMut` closures
+
+trait T {
+    fn consume_fn<F: Fn()>(_f: F) { }
+    //~^ HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    fn method_consume_fn<F: Fn()>(&self, _f: F) { }
+    //~^ HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+    //~| HELP `Fn` and `FnMut` closures
+}
+impl T for () {}
 
 pub fn main() { }
 
@@ -73,6 +120,120 @@ fn move_into_fn() {
     });
 }
 
+fn move_into_assoc_fn() {
+    let e = Either::One(X(Y));
+    let mut em = Either::One(X(Y));
+
+    let x = X(Y);
+
+    // move into Fn
+
+    <() as T>::consume_fn(|| {
+        let X(_t) = x;
+        //~^ ERROR cannot move
+        //~| HELP consider borrowing here
+        if let Either::One(_t) = e { }
+        //~^ ERROR cannot move
+        //~| HELP consider borrowing here
+        while let Either::One(_t) = e { }
+        //~^ ERROR cannot move
+        //~| HELP consider borrowing here
+        match e {
+            //~^ ERROR cannot move
+            //~| HELP consider borrowing here
+            Either::One(_t)
+            | Either::Two(_t) => (),
+        }
+        match e {
+            //~^ ERROR cannot move
+            //~| HELP consider borrowing here
+            Either::One(_t) => (),
+            Either::Two(ref _t) => (),
+            // FIXME: should suggest removing `ref` too
+        }
+
+        let X(mut _t) = x;
+        //~^ ERROR cannot move
+        //~| HELP consider borrowing here
+        if let Either::One(mut _t) = em { }
+        //~^ ERROR cannot move
+        //~| HELP consider borrowing here
+        while let Either::One(mut _t) = em { }
+        //~^ ERROR cannot move
+        //~| HELP consider borrowing here
+        match em {
+            //~^ ERROR cannot move
+            //~| HELP consider borrowing here
+            Either::One(mut _t)
+            | Either::Two(mut _t) => (),
+        }
+        match em {
+            //~^ ERROR cannot move
+            //~| HELP consider borrowing here
+            Either::One(mut _t) => (),
+            Either::Two(ref _t) => (),
+            // FIXME: should suggest removing `ref` too
+        }
+    });
+}
+
+fn move_into_method() {
+    let e = Either::One(X(Y));
+    let mut em = Either::One(X(Y));
+
+    let x = X(Y);
+
+    // move into Fn
+
+    ().method_consume_fn(|| {
+        let X(_t) = x;
+        //~^ ERROR cannot move
+        //~| HELP consider borrowing here
+        if let Either::One(_t) = e { }
+        //~^ ERROR cannot move
+        //~| HELP consider borrowing here
+        while let Either::One(_t) = e { }
+        //~^ ERROR cannot move
+        //~| HELP consider borrowing here
+        match e {
+            //~^ ERROR cannot move
+            //~| HELP consider borrowing here
+            Either::One(_t)
+            | Either::Two(_t) => (),
+        }
+        match e {
+            //~^ ERROR cannot move
+            //~| HELP consider borrowing here
+            Either::One(_t) => (),
+            Either::Two(ref _t) => (),
+            // FIXME: should suggest removing `ref` too
+        }
+
+        let X(mut _t) = x;
+        //~^ ERROR cannot move
+        //~| HELP consider borrowing here
+        if let Either::One(mut _t) = em { }
+        //~^ ERROR cannot move
+        //~| HELP consider borrowing here
+        while let Either::One(mut _t) = em { }
+        //~^ ERROR cannot move
+        //~| HELP consider borrowing here
+        match em {
+            //~^ ERROR cannot move
+            //~| HELP consider borrowing here
+            Either::One(mut _t)
+            | Either::Two(mut _t) => (),
+        }
+        match em {
+            //~^ ERROR cannot move
+            //~| HELP consider borrowing here
+            Either::One(mut _t) => (),
+            Either::Two(ref _t) => (),
+            // FIXME: should suggest removing `ref` too
+        }
+    });
+}
+
 fn move_into_fnmut() {
     let e = Either::One(X(Y));
     let mut em = Either::One(X(Y));
diff --git a/tests/ui/suggestions/dont-suggest-ref/move-into-closure.stderr b/tests/ui/suggestions/dont-suggest-ref/move-into-closure.stderr
index edda2cbc735..132a31c8f7c 100644
--- a/tests/ui/suggestions/dont-suggest-ref/move-into-closure.stderr
+++ b/tests/ui/suggestions/dont-suggest-ref/move-into-closure.stderr
@@ -1,5 +1,5 @@
 error[E0507]: cannot move out of `x.0`, as `x` is a captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:28:21
+  --> $DIR/move-into-closure.rs:75:21
    |
 LL |     let x = X(Y);
    |         - captured outer variable
@@ -12,13 +12,18 @@ LL |         let X(_t) = x;
    |               data moved here
    |               move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:13:18
+   |
+LL | fn consume_fn<F: Fn()>(_f: F) { }
+   |                  ^^^^
 help: consider borrowing here
    |
 LL |         let X(_t) = &x;
    |                     +
 
 error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:31:34
+  --> $DIR/move-into-closure.rs:78:34
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -32,13 +37,18 @@ LL |         if let Either::One(_t) = e { }
    |                            data moved here
    |                            move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:13:18
+   |
+LL | fn consume_fn<F: Fn()>(_f: F) { }
+   |                  ^^^^
 help: consider borrowing here
    |
 LL |         if let Either::One(_t) = &e { }
    |                                  +
 
 error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:34:37
+  --> $DIR/move-into-closure.rs:81:37
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -52,13 +62,18 @@ LL |         while let Either::One(_t) = e { }
    |                               data moved here
    |                               move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:13:18
+   |
+LL | fn consume_fn<F: Fn()>(_f: F) { }
+   |                  ^^^^
 help: consider borrowing here
    |
 LL |         while let Either::One(_t) = &e { }
    |                                     +
 
 error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:37:15
+  --> $DIR/move-into-closure.rs:84:15
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -75,13 +90,18 @@ LL |             Either::One(_t)
    |                         data moved here
    |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:13:18
+   |
+LL | fn consume_fn<F: Fn()>(_f: F) { }
+   |                  ^^^^
 help: consider borrowing here
    |
 LL |         match &e {
    |               +
 
 error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:43:15
+  --> $DIR/move-into-closure.rs:90:15
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -98,13 +118,18 @@ LL |             Either::One(_t) => (),
    |                         data moved here
    |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:13:18
+   |
+LL | fn consume_fn<F: Fn()>(_f: F) { }
+   |                  ^^^^
 help: consider borrowing here
    |
 LL |         match &e {
    |               +
 
 error[E0507]: cannot move out of `x.0`, as `x` is a captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:51:25
+  --> $DIR/move-into-closure.rs:98:25
    |
 LL |     let x = X(Y);
    |         - captured outer variable
@@ -118,13 +143,18 @@ LL |         let X(mut _t) = x;
    |               data moved here
    |               move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:13:18
+   |
+LL | fn consume_fn<F: Fn()>(_f: F) { }
+   |                  ^^^^
 help: consider borrowing here
    |
 LL |         let X(mut _t) = &x;
    |                         +
 
 error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:54:38
+  --> $DIR/move-into-closure.rs:101:38
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -138,13 +168,18 @@ LL |         if let Either::One(mut _t) = em { }
    |                            data moved here
    |                            move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:13:18
+   |
+LL | fn consume_fn<F: Fn()>(_f: F) { }
+   |                  ^^^^
 help: consider borrowing here
    |
 LL |         if let Either::One(mut _t) = &em { }
    |                                      +
 
 error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:57:41
+  --> $DIR/move-into-closure.rs:104:41
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -158,13 +193,18 @@ LL |         while let Either::One(mut _t) = em { }
    |                               data moved here
    |                               move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:13:18
+   |
+LL | fn consume_fn<F: Fn()>(_f: F) { }
+   |                  ^^^^
 help: consider borrowing here
    |
 LL |         while let Either::One(mut _t) = &em { }
    |                                         +
 
 error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:60:15
+  --> $DIR/move-into-closure.rs:107:15
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -181,13 +221,18 @@ LL |             Either::One(mut _t)
    |                         data moved here
    |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:13:18
+   |
+LL | fn consume_fn<F: Fn()>(_f: F) { }
+   |                  ^^^^
 help: consider borrowing here
    |
 LL |         match &em {
    |               +
 
 error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:66:15
+  --> $DIR/move-into-closure.rs:113:15
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -204,13 +249,540 @@ LL |             Either::One(mut _t) => (),
    |                         data moved here
    |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:13:18
+   |
+LL | fn consume_fn<F: Fn()>(_f: F) { }
+   |                  ^^^^
+help: consider borrowing here
+   |
+LL |         match &em {
+   |               +
+
+error[E0507]: cannot move out of `x.0`, as `x` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:132:21
+   |
+LL |     let x = X(Y);
+   |         - captured outer variable
+...
+LL |     <() as T>::consume_fn(|| {
+   |                           -- captured by this `Fn` closure
+LL |         let X(_t) = x;
+   |               --    ^
+   |               |
+   |               data moved here
+   |               move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:39:22
+   |
+LL |     fn consume_fn<F: Fn()>(_f: F) { }
+   |                      ^^^^
+help: consider borrowing here
+   |
+LL |         let X(_t) = &x;
+   |                     +
+
+error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:135:34
+   |
+LL |     let e = Either::One(X(Y));
+   |         - captured outer variable
+...
+LL |     <() as T>::consume_fn(|| {
+   |                           -- captured by this `Fn` closure
+...
+LL |         if let Either::One(_t) = e { }
+   |                            --    ^
+   |                            |
+   |                            data moved here
+   |                            move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:39:22
+   |
+LL |     fn consume_fn<F: Fn()>(_f: F) { }
+   |                      ^^^^
+help: consider borrowing here
+   |
+LL |         if let Either::One(_t) = &e { }
+   |                                  +
+
+error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:138:37
+   |
+LL |     let e = Either::One(X(Y));
+   |         - captured outer variable
+...
+LL |     <() as T>::consume_fn(|| {
+   |                           -- captured by this `Fn` closure
+...
+LL |         while let Either::One(_t) = e { }
+   |                               --    ^
+   |                               |
+   |                               data moved here
+   |                               move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:39:22
+   |
+LL |     fn consume_fn<F: Fn()>(_f: F) { }
+   |                      ^^^^
+help: consider borrowing here
+   |
+LL |         while let Either::One(_t) = &e { }
+   |                                     +
+
+error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:141:15
+   |
+LL |     let e = Either::One(X(Y));
+   |         - captured outer variable
+...
+LL |     <() as T>::consume_fn(|| {
+   |                           -- captured by this `Fn` closure
+...
+LL |         match e {
+   |               ^
+...
+LL |             Either::One(_t)
+   |                         --
+   |                         |
+   |                         data moved here
+   |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:39:22
+   |
+LL |     fn consume_fn<F: Fn()>(_f: F) { }
+   |                      ^^^^
+help: consider borrowing here
+   |
+LL |         match &e {
+   |               +
+
+error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:147:15
+   |
+LL |     let e = Either::One(X(Y));
+   |         - captured outer variable
+...
+LL |     <() as T>::consume_fn(|| {
+   |                           -- captured by this `Fn` closure
+...
+LL |         match e {
+   |               ^
+...
+LL |             Either::One(_t) => (),
+   |                         --
+   |                         |
+   |                         data moved here
+   |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:39:22
+   |
+LL |     fn consume_fn<F: Fn()>(_f: F) { }
+   |                      ^^^^
+help: consider borrowing here
+   |
+LL |         match &e {
+   |               +
+
+error[E0507]: cannot move out of `x.0`, as `x` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:155:25
+   |
+LL |     let x = X(Y);
+   |         - captured outer variable
+...
+LL |     <() as T>::consume_fn(|| {
+   |                           -- captured by this `Fn` closure
+...
+LL |         let X(mut _t) = x;
+   |               ------    ^
+   |               |
+   |               data moved here
+   |               move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:39:22
+   |
+LL |     fn consume_fn<F: Fn()>(_f: F) { }
+   |                      ^^^^
+help: consider borrowing here
+   |
+LL |         let X(mut _t) = &x;
+   |                         +
+
+error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:158:38
+   |
+LL |     let mut em = Either::One(X(Y));
+   |         ------ captured outer variable
+...
+LL |     <() as T>::consume_fn(|| {
+   |                           -- captured by this `Fn` closure
+...
+LL |         if let Either::One(mut _t) = em { }
+   |                            ------    ^^
+   |                            |
+   |                            data moved here
+   |                            move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:39:22
+   |
+LL |     fn consume_fn<F: Fn()>(_f: F) { }
+   |                      ^^^^
+help: consider borrowing here
+   |
+LL |         if let Either::One(mut _t) = &em { }
+   |                                      +
+
+error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:161:41
+   |
+LL |     let mut em = Either::One(X(Y));
+   |         ------ captured outer variable
+...
+LL |     <() as T>::consume_fn(|| {
+   |                           -- captured by this `Fn` closure
+...
+LL |         while let Either::One(mut _t) = em { }
+   |                               ------    ^^
+   |                               |
+   |                               data moved here
+   |                               move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:39:22
+   |
+LL |     fn consume_fn<F: Fn()>(_f: F) { }
+   |                      ^^^^
+help: consider borrowing here
+   |
+LL |         while let Either::One(mut _t) = &em { }
+   |                                         +
+
+error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:164:15
+   |
+LL |     let mut em = Either::One(X(Y));
+   |         ------ captured outer variable
+...
+LL |     <() as T>::consume_fn(|| {
+   |                           -- captured by this `Fn` closure
+...
+LL |         match em {
+   |               ^^
+...
+LL |             Either::One(mut _t)
+   |                         ------
+   |                         |
+   |                         data moved here
+   |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:39:22
+   |
+LL |     fn consume_fn<F: Fn()>(_f: F) { }
+   |                      ^^^^
+help: consider borrowing here
+   |
+LL |         match &em {
+   |               +
+
+error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:170:15
+   |
+LL |     let mut em = Either::One(X(Y));
+   |         ------ captured outer variable
+...
+LL |     <() as T>::consume_fn(|| {
+   |                           -- captured by this `Fn` closure
+...
+LL |         match em {
+   |               ^^
+...
+LL |             Either::One(mut _t) => (),
+   |                         ------
+   |                         |
+   |                         data moved here
+   |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:39:22
+   |
+LL |     fn consume_fn<F: Fn()>(_f: F) { }
+   |                      ^^^^
+help: consider borrowing here
+   |
+LL |         match &em {
+   |               +
+
+error[E0507]: cannot move out of `x.0`, as `x` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:189:21
+   |
+LL |     let x = X(Y);
+   |         - captured outer variable
+...
+LL |     ().method_consume_fn(|| {
+   |                          -- captured by this `Fn` closure
+LL |         let X(_t) = x;
+   |               --    ^
+   |               |
+   |               data moved here
+   |               move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:50:29
+   |
+LL |     fn method_consume_fn<F: Fn()>(&self, _f: F) { }
+   |                             ^^^^
+help: consider borrowing here
+   |
+LL |         let X(_t) = &x;
+   |                     +
+
+error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:192:34
+   |
+LL |     let e = Either::One(X(Y));
+   |         - captured outer variable
+...
+LL |     ().method_consume_fn(|| {
+   |                          -- captured by this `Fn` closure
+...
+LL |         if let Either::One(_t) = e { }
+   |                            --    ^
+   |                            |
+   |                            data moved here
+   |                            move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:50:29
+   |
+LL |     fn method_consume_fn<F: Fn()>(&self, _f: F) { }
+   |                             ^^^^
+help: consider borrowing here
+   |
+LL |         if let Either::One(_t) = &e { }
+   |                                  +
+
+error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:195:37
+   |
+LL |     let e = Either::One(X(Y));
+   |         - captured outer variable
+...
+LL |     ().method_consume_fn(|| {
+   |                          -- captured by this `Fn` closure
+...
+LL |         while let Either::One(_t) = e { }
+   |                               --    ^
+   |                               |
+   |                               data moved here
+   |                               move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:50:29
+   |
+LL |     fn method_consume_fn<F: Fn()>(&self, _f: F) { }
+   |                             ^^^^
+help: consider borrowing here
+   |
+LL |         while let Either::One(_t) = &e { }
+   |                                     +
+
+error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:198:15
+   |
+LL |     let e = Either::One(X(Y));
+   |         - captured outer variable
+...
+LL |     ().method_consume_fn(|| {
+   |                          -- captured by this `Fn` closure
+...
+LL |         match e {
+   |               ^
+...
+LL |             Either::One(_t)
+   |                         --
+   |                         |
+   |                         data moved here
+   |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:50:29
+   |
+LL |     fn method_consume_fn<F: Fn()>(&self, _f: F) { }
+   |                             ^^^^
+help: consider borrowing here
+   |
+LL |         match &e {
+   |               +
+
+error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:204:15
+   |
+LL |     let e = Either::One(X(Y));
+   |         - captured outer variable
+...
+LL |     ().method_consume_fn(|| {
+   |                          -- captured by this `Fn` closure
+...
+LL |         match e {
+   |               ^
+...
+LL |             Either::One(_t) => (),
+   |                         --
+   |                         |
+   |                         data moved here
+   |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:50:29
+   |
+LL |     fn method_consume_fn<F: Fn()>(&self, _f: F) { }
+   |                             ^^^^
+help: consider borrowing here
+   |
+LL |         match &e {
+   |               +
+
+error[E0507]: cannot move out of `x.0`, as `x` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:212:25
+   |
+LL |     let x = X(Y);
+   |         - captured outer variable
+...
+LL |     ().method_consume_fn(|| {
+   |                          -- captured by this `Fn` closure
+...
+LL |         let X(mut _t) = x;
+   |               ------    ^
+   |               |
+   |               data moved here
+   |               move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:50:29
+   |
+LL |     fn method_consume_fn<F: Fn()>(&self, _f: F) { }
+   |                             ^^^^
+help: consider borrowing here
+   |
+LL |         let X(mut _t) = &x;
+   |                         +
+
+error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:215:38
+   |
+LL |     let mut em = Either::One(X(Y));
+   |         ------ captured outer variable
+...
+LL |     ().method_consume_fn(|| {
+   |                          -- captured by this `Fn` closure
+...
+LL |         if let Either::One(mut _t) = em { }
+   |                            ------    ^^
+   |                            |
+   |                            data moved here
+   |                            move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:50:29
+   |
+LL |     fn method_consume_fn<F: Fn()>(&self, _f: F) { }
+   |                             ^^^^
+help: consider borrowing here
+   |
+LL |         if let Either::One(mut _t) = &em { }
+   |                                      +
+
+error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:218:41
+   |
+LL |     let mut em = Either::One(X(Y));
+   |         ------ captured outer variable
+...
+LL |     ().method_consume_fn(|| {
+   |                          -- captured by this `Fn` closure
+...
+LL |         while let Either::One(mut _t) = em { }
+   |                               ------    ^^
+   |                               |
+   |                               data moved here
+   |                               move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:50:29
+   |
+LL |     fn method_consume_fn<F: Fn()>(&self, _f: F) { }
+   |                             ^^^^
+help: consider borrowing here
+   |
+LL |         while let Either::One(mut _t) = &em { }
+   |                                         +
+
+error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:221:15
+   |
+LL |     let mut em = Either::One(X(Y));
+   |         ------ captured outer variable
+...
+LL |     ().method_consume_fn(|| {
+   |                          -- captured by this `Fn` closure
+...
+LL |         match em {
+   |               ^^
+...
+LL |             Either::One(mut _t)
+   |                         ------
+   |                         |
+   |                         data moved here
+   |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:50:29
+   |
+LL |     fn method_consume_fn<F: Fn()>(&self, _f: F) { }
+   |                             ^^^^
+help: consider borrowing here
+   |
+LL |         match &em {
+   |               +
+
+error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `Fn` closure
+  --> $DIR/move-into-closure.rs:227:15
+   |
+LL |     let mut em = Either::One(X(Y));
+   |         ------ captured outer variable
+...
+LL |     ().method_consume_fn(|| {
+   |                          -- captured by this `Fn` closure
+...
+LL |         match em {
+   |               ^^
+...
+LL |             Either::One(mut _t) => (),
+   |                         ------
+   |                         |
+   |                         data moved here
+   |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:50:29
+   |
+LL |     fn method_consume_fn<F: Fn()>(&self, _f: F) { }
+   |                             ^^^^
 help: consider borrowing here
    |
 LL |         match &em {
    |               +
 
 error[E0507]: cannot move out of `x.0`, as `x` is a captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:85:21
+  --> $DIR/move-into-closure.rs:246:21
    |
 LL |     let x = X(Y);
    |         - captured outer variable
@@ -223,13 +795,18 @@ LL |         let X(_t) = x;
    |               data moved here
    |               move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:25:21
+   |
+LL | fn consume_fnmut<F: FnMut()>(_f: F) { }
+   |                     ^^^^^^^
 help: consider borrowing here
    |
 LL |         let X(_t) = &x;
    |                     +
 
 error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:88:34
+  --> $DIR/move-into-closure.rs:249:34
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -243,13 +820,18 @@ LL |         if let Either::One(_t) = e { }
    |                            data moved here
    |                            move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:25:21
+   |
+LL | fn consume_fnmut<F: FnMut()>(_f: F) { }
+   |                     ^^^^^^^
 help: consider borrowing here
    |
 LL |         if let Either::One(_t) = &e { }
    |                                  +
 
 error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:91:37
+  --> $DIR/move-into-closure.rs:252:37
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -263,13 +845,18 @@ LL |         while let Either::One(_t) = e { }
    |                               data moved here
    |                               move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:25:21
+   |
+LL | fn consume_fnmut<F: FnMut()>(_f: F) { }
+   |                     ^^^^^^^
 help: consider borrowing here
    |
 LL |         while let Either::One(_t) = &e { }
    |                                     +
 
 error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:94:15
+  --> $DIR/move-into-closure.rs:255:15
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -286,13 +873,18 @@ LL |             Either::One(_t)
    |                         data moved here
    |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:25:21
+   |
+LL | fn consume_fnmut<F: FnMut()>(_f: F) { }
+   |                     ^^^^^^^
 help: consider borrowing here
    |
 LL |         match &e {
    |               +
 
 error[E0507]: cannot move out of `e.0`, as `e` is a captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:100:15
+  --> $DIR/move-into-closure.rs:261:15
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -309,13 +901,18 @@ LL |             Either::One(_t) => (),
    |                         data moved here
    |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:25:21
+   |
+LL | fn consume_fnmut<F: FnMut()>(_f: F) { }
+   |                     ^^^^^^^
 help: consider borrowing here
    |
 LL |         match &e {
    |               +
 
 error[E0507]: cannot move out of `x.0`, as `x` is a captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:108:25
+  --> $DIR/move-into-closure.rs:269:25
    |
 LL |     let x = X(Y);
    |         - captured outer variable
@@ -329,13 +926,18 @@ LL |         let X(mut _t) = x;
    |               data moved here
    |               move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:25:21
+   |
+LL | fn consume_fnmut<F: FnMut()>(_f: F) { }
+   |                     ^^^^^^^
 help: consider borrowing here
    |
 LL |         let X(mut _t) = &x;
    |                         +
 
 error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:111:38
+  --> $DIR/move-into-closure.rs:272:38
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -349,13 +951,18 @@ LL |         if let Either::One(mut _t) = em { }
    |                            data moved here
    |                            move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:25:21
+   |
+LL | fn consume_fnmut<F: FnMut()>(_f: F) { }
+   |                     ^^^^^^^
 help: consider borrowing here
    |
 LL |         if let Either::One(mut _t) = &em { }
    |                                      +
 
 error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:114:41
+  --> $DIR/move-into-closure.rs:275:41
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -369,13 +976,18 @@ LL |         while let Either::One(mut _t) = em { }
    |                               data moved here
    |                               move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:25:21
+   |
+LL | fn consume_fnmut<F: FnMut()>(_f: F) { }
+   |                     ^^^^^^^
 help: consider borrowing here
    |
 LL |         while let Either::One(mut _t) = &em { }
    |                                         +
 
 error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:117:15
+  --> $DIR/move-into-closure.rs:278:15
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -392,13 +1004,18 @@ LL |             Either::One(mut _t)
    |                         data moved here
    |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:25:21
+   |
+LL | fn consume_fnmut<F: FnMut()>(_f: F) { }
+   |                     ^^^^^^^
 help: consider borrowing here
    |
 LL |         match &em {
    |               +
 
 error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:123:15
+  --> $DIR/move-into-closure.rs:284:15
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -415,13 +1032,18 @@ LL |             Either::One(mut _t) => (),
    |                         data moved here
    |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:25:21
+   |
+LL | fn consume_fnmut<F: FnMut()>(_f: F) { }
+   |                     ^^^^^^^
 help: consider borrowing here
    |
 LL |         match &em {
    |               +
 
 error[E0507]: cannot move out of `em.0`, as `em` is a captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:130:15
+  --> $DIR/move-into-closure.rs:291:15
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -438,11 +1060,16 @@ LL |             Either::One(mut _t) => (),
    |                         data moved here
    |                         move occurs because `_t` has type `X`, which does not implement the `Copy` trait
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/move-into-closure.rs:25:21
+   |
+LL | fn consume_fnmut<F: FnMut()>(_f: F) { }
+   |                     ^^^^^^^
 help: consider borrowing here
    |
 LL |         match &em {
    |               +
 
-error: aborting due to 21 previous errors
+error: aborting due to 41 previous errors
 
 For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/suggestions/enum-method-probe.fixed b/tests/ui/suggestions/enum-method-probe.fixed
index b7fd6f112d5..1ce6a943c5b 100644
--- a/tests/ui/suggestions/enum-method-probe.fixed
+++ b/tests/ui/suggestions/enum-method-probe.fixed
@@ -14,7 +14,7 @@ impl Foo {
 fn test_result_in_result() -> Result<(), ()> {
     let res: Result<_, ()> = Ok(Foo);
     res?.get();
-    //~^ ERROR no method named `get` found for enum `Result` in the current scope
+    //~^ ERROR no method named `get` found for enum `Result<T, E>` in the current scope
     //~| HELP use the `?` operator
     Ok(())
 }
@@ -22,7 +22,7 @@ fn test_result_in_result() -> Result<(), ()> {
 async fn async_test_result_in_result() -> Result<(), ()> {
     let res: Result<_, ()> = Ok(Foo);
     res?.get();
-    //~^ ERROR no method named `get` found for enum `Result` in the current scope
+    //~^ ERROR no method named `get` found for enum `Result<T, E>` in the current scope
     //~| HELP use the `?` operator
     Ok(())
 }
@@ -30,21 +30,21 @@ async fn async_test_result_in_result() -> Result<(), ()> {
 fn test_result_in_unit_return() {
     let res: Result<_, ()> = Ok(Foo);
     res.expect("REASON").get();
-    //~^ ERROR no method named `get` found for enum `Result` in the current scope
+    //~^ ERROR no method named `get` found for enum `Result<T, E>` in the current scope
     //~| HELP consider using `Result::expect` to unwrap the `Foo` value, panicking if the value is a `Result::Err`
 }
 
 async fn async_test_result_in_unit_return() {
     let res: Result<_, ()> = Ok(Foo);
     res.expect("REASON").get();
-    //~^ ERROR no method named `get` found for enum `Result` in the current scope
+    //~^ ERROR no method named `get` found for enum `Result<T, E>` in the current scope
     //~| HELP consider using `Result::expect` to unwrap the `Foo` value, panicking if the value is a `Result::Err`
 }
 
 fn test_option_in_option() -> Option<()> {
     let res: Option<_> = Some(Foo);
     res?.get();
-    //~^ ERROR no method named `get` found for enum `Option` in the current scope
+    //~^ ERROR no method named `get` found for enum `Option<T>` in the current scope
     //~| HELP use the `?` operator
     Some(())
 }
@@ -52,7 +52,7 @@ fn test_option_in_option() -> Option<()> {
 fn test_option_in_unit_return() {
     let res: Option<_> = Some(Foo);
     res.expect("REASON").get();
-    //~^ ERROR no method named `get` found for enum `Option` in the current scope
+    //~^ ERROR no method named `get` found for enum `Option<T>` in the current scope
     //~| HELP consider using `Option::expect` to unwrap the `Foo` value, panicking if the value is an `Option::None`
 }
 
diff --git a/tests/ui/suggestions/enum-method-probe.rs b/tests/ui/suggestions/enum-method-probe.rs
index cbb819b7c8c..dd3addbd0a3 100644
--- a/tests/ui/suggestions/enum-method-probe.rs
+++ b/tests/ui/suggestions/enum-method-probe.rs
@@ -14,7 +14,7 @@ impl Foo {
 fn test_result_in_result() -> Result<(), ()> {
     let res: Result<_, ()> = Ok(Foo);
     res.get();
-    //~^ ERROR no method named `get` found for enum `Result` in the current scope
+    //~^ ERROR no method named `get` found for enum `Result<T, E>` in the current scope
     //~| HELP use the `?` operator
     Ok(())
 }
@@ -22,7 +22,7 @@ fn test_result_in_result() -> Result<(), ()> {
 async fn async_test_result_in_result() -> Result<(), ()> {
     let res: Result<_, ()> = Ok(Foo);
     res.get();
-    //~^ ERROR no method named `get` found for enum `Result` in the current scope
+    //~^ ERROR no method named `get` found for enum `Result<T, E>` in the current scope
     //~| HELP use the `?` operator
     Ok(())
 }
@@ -30,21 +30,21 @@ async fn async_test_result_in_result() -> Result<(), ()> {
 fn test_result_in_unit_return() {
     let res: Result<_, ()> = Ok(Foo);
     res.get();
-    //~^ ERROR no method named `get` found for enum `Result` in the current scope
+    //~^ ERROR no method named `get` found for enum `Result<T, E>` in the current scope
     //~| HELP consider using `Result::expect` to unwrap the `Foo` value, panicking if the value is a `Result::Err`
 }
 
 async fn async_test_result_in_unit_return() {
     let res: Result<_, ()> = Ok(Foo);
     res.get();
-    //~^ ERROR no method named `get` found for enum `Result` in the current scope
+    //~^ ERROR no method named `get` found for enum `Result<T, E>` in the current scope
     //~| HELP consider using `Result::expect` to unwrap the `Foo` value, panicking if the value is a `Result::Err`
 }
 
 fn test_option_in_option() -> Option<()> {
     let res: Option<_> = Some(Foo);
     res.get();
-    //~^ ERROR no method named `get` found for enum `Option` in the current scope
+    //~^ ERROR no method named `get` found for enum `Option<T>` in the current scope
     //~| HELP use the `?` operator
     Some(())
 }
@@ -52,7 +52,7 @@ fn test_option_in_option() -> Option<()> {
 fn test_option_in_unit_return() {
     let res: Option<_> = Some(Foo);
     res.get();
-    //~^ ERROR no method named `get` found for enum `Option` in the current scope
+    //~^ ERROR no method named `get` found for enum `Option<T>` in the current scope
     //~| HELP consider using `Option::expect` to unwrap the `Foo` value, panicking if the value is an `Option::None`
 }
 
diff --git a/tests/ui/suggestions/enum-method-probe.stderr b/tests/ui/suggestions/enum-method-probe.stderr
index e66973d9d95..5aa0fc44c7b 100644
--- a/tests/ui/suggestions/enum-method-probe.stderr
+++ b/tests/ui/suggestions/enum-method-probe.stderr
@@ -1,4 +1,4 @@
-error[E0599]: no method named `get` found for enum `Result` in the current scope
+error[E0599]: no method named `get` found for enum `Result<T, E>` in the current scope
   --> $DIR/enum-method-probe.rs:24:9
    |
 LL |     res.get();
@@ -14,7 +14,7 @@ help: use the `?` operator to extract the `Foo` value, propagating a `Result::Er
 LL |     res?.get();
    |        +
 
-error[E0599]: no method named `get` found for enum `Result` in the current scope
+error[E0599]: no method named `get` found for enum `Result<T, E>` in the current scope
   --> $DIR/enum-method-probe.rs:39:9
    |
 LL |     res.get();
@@ -30,7 +30,7 @@ help: consider using `Result::expect` to unwrap the `Foo` value, panicking if th
 LL |     res.expect("REASON").get();
    |        +++++++++++++++++
 
-error[E0599]: no method named `get` found for enum `Result` in the current scope
+error[E0599]: no method named `get` found for enum `Result<T, E>` in the current scope
   --> $DIR/enum-method-probe.rs:16:9
    |
 LL |     res.get();
@@ -46,7 +46,7 @@ help: use the `?` operator to extract the `Foo` value, propagating a `Result::Er
 LL |     res?.get();
    |        +
 
-error[E0599]: no method named `get` found for enum `Result` in the current scope
+error[E0599]: no method named `get` found for enum `Result<T, E>` in the current scope
   --> $DIR/enum-method-probe.rs:32:9
    |
 LL |     res.get();
@@ -62,7 +62,7 @@ help: consider using `Result::expect` to unwrap the `Foo` value, panicking if th
 LL |     res.expect("REASON").get();
    |        +++++++++++++++++
 
-error[E0599]: no method named `get` found for enum `Option` in the current scope
+error[E0599]: no method named `get` found for enum `Option<T>` in the current scope
   --> $DIR/enum-method-probe.rs:46:9
    |
 LL |     res.get();
@@ -78,7 +78,7 @@ help: use the `?` operator to extract the `Foo` value, propagating an `Option::N
 LL |     res?.get();
    |        +
 
-error[E0599]: no method named `get` found for enum `Option` in the current scope
+error[E0599]: no method named `get` found for enum `Option<T>` in the current scope
   --> $DIR/enum-method-probe.rs:54:9
    |
 LL |     res.get();
diff --git a/tests/ui/suggestions/field-has-method.rs b/tests/ui/suggestions/field-has-method.rs
index d28b6ba546c..6e584d78338 100644
--- a/tests/ui/suggestions/field-has-method.rs
+++ b/tests/ui/suggestions/field-has-method.rs
@@ -17,7 +17,7 @@ struct InferOk<T> {
 
 fn foo(i: InferOk<Ty>) {
     let k = i.kind();
-    //~^ ERROR no method named `kind` found for struct `InferOk` in the current scope
+    //~^ ERROR no method named `kind` found for struct `InferOk<T>` in the current scope
 }
 
 fn main() {}
diff --git a/tests/ui/suggestions/field-has-method.stderr b/tests/ui/suggestions/field-has-method.stderr
index daff2db6418..adcb723e4f1 100644
--- a/tests/ui/suggestions/field-has-method.stderr
+++ b/tests/ui/suggestions/field-has-method.stderr
@@ -1,4 +1,4 @@
-error[E0599]: no method named `kind` found for struct `InferOk` in the current scope
+error[E0599]: no method named `kind` found for struct `InferOk<T>` in the current scope
   --> $DIR/field-has-method.rs:19:15
    |
 LL | struct InferOk<T> {
diff --git a/tests/ui/suggestions/for-loop-missing-in.fixed b/tests/ui/suggestions/for-loop-missing-in.fixed
index ff376b5a52c..396c3ff87ff 100644
--- a/tests/ui/suggestions/for-loop-missing-in.fixed
+++ b/tests/ui/suggestions/for-loop-missing-in.fixed
@@ -1,8 +1,7 @@
 //@ run-rustfix
 
 fn main() {
-    for _i in 0..2 { //~ ERROR missing `in`
-    }
-    for _i in 0..2 { //~ ERROR missing `in`
-    }
+    for _i in 0..2 {} //~ ERROR missing `in`
+    for _i in 0..2 {} //~ ERROR missing `in`
+    for _i in 0..2 {} //~ ERROR missing `in`
 }
diff --git a/tests/ui/suggestions/for-loop-missing-in.rs b/tests/ui/suggestions/for-loop-missing-in.rs
index 28c12aec665..6c2092106cb 100644
--- a/tests/ui/suggestions/for-loop-missing-in.rs
+++ b/tests/ui/suggestions/for-loop-missing-in.rs
@@ -1,8 +1,7 @@
 //@ run-rustfix
 
 fn main() {
-    for _i 0..2 { //~ ERROR missing `in`
-    }
-    for _i of 0..2 { //~ ERROR missing `in`
-    }
+    for _i 0..2 {} //~ ERROR missing `in`
+    for _i of 0..2 {} //~ ERROR missing `in`
+    for _i = 0..2 {} //~ ERROR missing `in`
 }
diff --git a/tests/ui/suggestions/for-loop-missing-in.stderr b/tests/ui/suggestions/for-loop-missing-in.stderr
index 4e0cb229d50..b9c8c393406 100644
--- a/tests/ui/suggestions/for-loop-missing-in.stderr
+++ b/tests/ui/suggestions/for-loop-missing-in.stderr
@@ -1,25 +1,37 @@
 error: missing `in` in `for` loop
   --> $DIR/for-loop-missing-in.rs:4:11
    |
-LL |     for _i 0..2 {
+LL |     for _i 0..2 {}
    |           ^
    |
 help: try adding `in` here
    |
-LL |     for _i in 0..2 {
+LL |     for _i in 0..2 {}
    |            ++
 
 error: missing `in` in `for` loop
-  --> $DIR/for-loop-missing-in.rs:6:12
+  --> $DIR/for-loop-missing-in.rs:5:12
    |
-LL |     for _i of 0..2 {
+LL |     for _i of 0..2 {}
    |            ^^
    |
 help: try using `in` here instead
    |
-LL -     for _i of 0..2 {
-LL +     for _i in 0..2 {
+LL -     for _i of 0..2 {}
+LL +     for _i in 0..2 {}
+   |
+
+error: missing `in` in `for` loop
+  --> $DIR/for-loop-missing-in.rs:6:12
+   |
+LL |     for _i = 0..2 {}
+   |            ^
+   |
+help: try using `in` here instead
+   |
+LL -     for _i = 0..2 {}
+LL +     for _i in 0..2 {}
    |
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/suggestions/incorrect-variant-literal.svg b/tests/ui/suggestions/incorrect-variant-literal.svg
index 279fd30f216..2cab1f4b60f 100644
--- a/tests/ui/suggestions/incorrect-variant-literal.svg
+++ b/tests/ui/suggestions/incorrect-variant-literal.svg
@@ -455,7 +455,7 @@
 </tspan>
     <tspan x="10px" y="3916px"><tspan>   </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
 </tspan>
-    <tspan x="10px" y="3934px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: there is a variant with a similar name (notice the capitalization difference)</tspan>
+    <tspan x="10px" y="3934px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: there is a variant with a similar name (notice the capitalization)</tspan>
 </tspan>
     <tspan x="10px" y="3952px"><tspan>   </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
 </tspan>
diff --git a/tests/ui/suggestions/inner_type.fixed b/tests/ui/suggestions/inner_type.fixed
index 175a2a02acd..8174f8e204e 100644
--- a/tests/ui/suggestions/inner_type.fixed
+++ b/tests/ui/suggestions/inner_type.fixed
@@ -15,26 +15,26 @@ fn main() {
     let other_item = std::cell::RefCell::new(Struct { p: 42_u32 });
 
     other_item.borrow().method();
-    //~^ ERROR no method named `method` found for struct `RefCell` in the current scope [E0599]
+    //~^ ERROR no method named `method` found for struct `RefCell<T>` in the current scope [E0599]
     //~| HELP use `.borrow()` to borrow the `Struct<u32>`, panicking if a mutable borrow exists
 
     other_item.borrow_mut().some_mutable_method();
-    //~^ ERROR no method named `some_mutable_method` found for struct `RefCell` in the current scope [E0599]
+    //~^ ERROR no method named `some_mutable_method` found for struct `RefCell<T>` in the current scope [E0599]
     //~| HELP .borrow_mut()` to mutably borrow the `Struct<u32>`, panicking if any borrows exist
 
     let another_item = std::sync::Mutex::new(Struct { p: 42_u32 });
 
     another_item.lock().unwrap().method();
-    //~^ ERROR no method named `method` found for struct `std::sync::Mutex` in the current scope [E0599]
+    //~^ ERROR no method named `method` found for struct `std::sync::Mutex<T>` in the current scope [E0599]
     //~| HELP use `.lock().unwrap()` to borrow the `Struct<u32>`, blocking the current thread until it can be acquired
 
     let another_item = std::sync::RwLock::new(Struct { p: 42_u32 });
 
     another_item.read().unwrap().method();
-    //~^ ERROR no method named `method` found for struct `RwLock` in the current scope [E0599]
+    //~^ ERROR no method named `method` found for struct `RwLock<T>` in the current scope [E0599]
     //~| HELP  use `.read().unwrap()` to borrow the `Struct<u32>`, blocking the current thread until it can be acquired
 
     another_item.write().unwrap().some_mutable_method();
-    //~^ ERROR no method named `some_mutable_method` found for struct `RwLock` in the current scope [E0599]
+    //~^ ERROR no method named `some_mutable_method` found for struct `RwLock<T>` in the current scope [E0599]
     //~| HELP use `.write().unwrap()` to mutably borrow the `Struct<u32>`, blocking the current thread until it can be acquired
 }
diff --git a/tests/ui/suggestions/inner_type.rs b/tests/ui/suggestions/inner_type.rs
index ab021414f56..e4eaf07ca8b 100644
--- a/tests/ui/suggestions/inner_type.rs
+++ b/tests/ui/suggestions/inner_type.rs
@@ -15,26 +15,26 @@ fn main() {
     let other_item = std::cell::RefCell::new(Struct { p: 42_u32 });
 
     other_item.method();
-    //~^ ERROR no method named `method` found for struct `RefCell` in the current scope [E0599]
+    //~^ ERROR no method named `method` found for struct `RefCell<T>` in the current scope [E0599]
     //~| HELP use `.borrow()` to borrow the `Struct<u32>`, panicking if a mutable borrow exists
 
     other_item.some_mutable_method();
-    //~^ ERROR no method named `some_mutable_method` found for struct `RefCell` in the current scope [E0599]
+    //~^ ERROR no method named `some_mutable_method` found for struct `RefCell<T>` in the current scope [E0599]
     //~| HELP .borrow_mut()` to mutably borrow the `Struct<u32>`, panicking if any borrows exist
 
     let another_item = std::sync::Mutex::new(Struct { p: 42_u32 });
 
     another_item.method();
-    //~^ ERROR no method named `method` found for struct `std::sync::Mutex` in the current scope [E0599]
+    //~^ ERROR no method named `method` found for struct `std::sync::Mutex<T>` in the current scope [E0599]
     //~| HELP use `.lock().unwrap()` to borrow the `Struct<u32>`, blocking the current thread until it can be acquired
 
     let another_item = std::sync::RwLock::new(Struct { p: 42_u32 });
 
     another_item.method();
-    //~^ ERROR no method named `method` found for struct `RwLock` in the current scope [E0599]
+    //~^ ERROR no method named `method` found for struct `RwLock<T>` in the current scope [E0599]
     //~| HELP  use `.read().unwrap()` to borrow the `Struct<u32>`, blocking the current thread until it can be acquired
 
     another_item.some_mutable_method();
-    //~^ ERROR no method named `some_mutable_method` found for struct `RwLock` in the current scope [E0599]
+    //~^ ERROR no method named `some_mutable_method` found for struct `RwLock<T>` in the current scope [E0599]
     //~| HELP use `.write().unwrap()` to mutably borrow the `Struct<u32>`, blocking the current thread until it can be acquired
 }
diff --git a/tests/ui/suggestions/inner_type.stderr b/tests/ui/suggestions/inner_type.stderr
index 67ebb5789b7..017ddb5ad6d 100644
--- a/tests/ui/suggestions/inner_type.stderr
+++ b/tests/ui/suggestions/inner_type.stderr
@@ -1,4 +1,4 @@
-error[E0599]: no method named `method` found for struct `RefCell` in the current scope
+error[E0599]: no method named `method` found for struct `RefCell<T>` in the current scope
   --> $DIR/inner_type.rs:17:16
    |
 LL |     other_item.method();
@@ -14,7 +14,7 @@ help: use `.borrow()` to borrow the `Struct<u32>`, panicking if a mutable borrow
 LL |     other_item.borrow().method();
    |               +++++++++
 
-error[E0599]: no method named `some_mutable_method` found for struct `RefCell` in the current scope
+error[E0599]: no method named `some_mutable_method` found for struct `RefCell<T>` in the current scope
   --> $DIR/inner_type.rs:21:16
    |
 LL |     other_item.some_mutable_method();
@@ -30,7 +30,7 @@ help: use `.borrow_mut()` to mutably borrow the `Struct<u32>`, panicking if any
 LL |     other_item.borrow_mut().some_mutable_method();
    |               +++++++++++++
 
-error[E0599]: no method named `method` found for struct `std::sync::Mutex` in the current scope
+error[E0599]: no method named `method` found for struct `std::sync::Mutex<T>` in the current scope
   --> $DIR/inner_type.rs:27:18
    |
 LL |     another_item.method();
@@ -46,7 +46,7 @@ help: use `.lock().unwrap()` to borrow the `Struct<u32>`, blocking the current t
 LL |     another_item.lock().unwrap().method();
    |                 ++++++++++++++++
 
-error[E0599]: no method named `method` found for struct `RwLock` in the current scope
+error[E0599]: no method named `method` found for struct `RwLock<T>` in the current scope
   --> $DIR/inner_type.rs:33:18
    |
 LL |     another_item.method();
@@ -62,7 +62,7 @@ help: use `.read().unwrap()` to borrow the `Struct<u32>`, blocking the current t
 LL |     another_item.read().unwrap().method();
    |                 ++++++++++++++++
 
-error[E0599]: no method named `some_mutable_method` found for struct `RwLock` in the current scope
+error[E0599]: no method named `some_mutable_method` found for struct `RwLock<T>` in the current scope
   --> $DIR/inner_type.rs:37:18
    |
 LL |     another_item.some_mutable_method();
diff --git a/tests/ui/suggestions/inner_type2.rs b/tests/ui/suggestions/inner_type2.rs
index fac68c053eb..7082862f409 100644
--- a/tests/ui/suggestions/inner_type2.rs
+++ b/tests/ui/suggestions/inner_type2.rs
@@ -16,11 +16,11 @@ thread_local! {
 
 fn main() {
     STRUCT.method();
-    //~^ ERROR no method named `method` found for struct `LocalKey` in the current scope [E0599]
+    //~^ ERROR no method named `method` found for struct `LocalKey<T>` in the current scope [E0599]
     //~| HELP use `with` or `try_with` to access thread local storage
 
     let item = std::mem::MaybeUninit::new(Struct { p: 42_u32 });
     item.method();
-    //~^ ERROR no method named `method` found for union `MaybeUninit` in the current scope [E0599]
+    //~^ ERROR no method named `method` found for union `MaybeUninit<T>` in the current scope [E0599]
     //~| HELP if this `MaybeUninit<Struct<u32>>` has been initialized, use one of the `assume_init` methods to access the inner value
 }
diff --git a/tests/ui/suggestions/inner_type2.stderr b/tests/ui/suggestions/inner_type2.stderr
index 984366123c8..e6cb2048522 100644
--- a/tests/ui/suggestions/inner_type2.stderr
+++ b/tests/ui/suggestions/inner_type2.stderr
@@ -1,4 +1,4 @@
-error[E0599]: no method named `method` found for struct `LocalKey` in the current scope
+error[E0599]: no method named `method` found for struct `LocalKey<T>` in the current scope
   --> $DIR/inner_type2.rs:18:12
    |
 LL |     STRUCT.method();
@@ -11,7 +11,7 @@ note: the method `method` exists on the type `Struct<u32>`
 LL |     pub fn method(&self) {}
    |     ^^^^^^^^^^^^^^^^^^^^
 
-error[E0599]: no method named `method` found for union `MaybeUninit` in the current scope
+error[E0599]: no method named `method` found for union `MaybeUninit<T>` in the current scope
   --> $DIR/inner_type2.rs:23:10
    |
 LL |     item.method();
diff --git a/tests/ui/suggestions/option-content-move2.stderr b/tests/ui/suggestions/option-content-move2.stderr
index c73e874b403..c8aa6667b58 100644
--- a/tests/ui/suggestions/option-content-move2.stderr
+++ b/tests/ui/suggestions/option-content-move2.stderr
@@ -14,6 +14,11 @@ LL |
 LL |             var = Some(NotCopyable);
    |             --- variable moved due to use in closure
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/option-content-move2.rs:5:12
+   |
+LL | fn func<F: FnMut() -> H, H: FnMut()>(_: F) {}
+   |            ^^^^^^^^^^^^
 note: if `NotCopyable` implemented `Clone`, you could clone the value
   --> $DIR/option-content-move2.rs:1:1
    |
@@ -38,6 +43,12 @@ LL |         move || {
 LL |
 LL |             var = Some(NotCopyableButCloneable);
    |             --- variable moved due to use in closure
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/option-content-move2.rs:5:12
+   |
+LL | fn func<F: FnMut() -> H, H: FnMut()>(_: F) {}
+   |            ^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/suggestions/option-content-move3.stderr b/tests/ui/suggestions/option-content-move3.stderr
index 68c52352a65..2c9a86c036b 100644
--- a/tests/ui/suggestions/option-content-move3.stderr
+++ b/tests/ui/suggestions/option-content-move3.stderr
@@ -9,6 +9,7 @@ LL |         move || {
 LL |             let x = var;
    |                     ^^^ move occurs because `var` has type `NotCopyable`, which does not implement the `Copy` trait
    |
+   = help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
 note: if `NotCopyable` implemented `Clone`, you could clone the value
   --> $DIR/option-content-move3.rs:2:1
    |
@@ -37,6 +38,11 @@ LL |         move || {
 LL |             let x = var;
    |                     --- variable moved due to use in closure
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/option-content-move3.rs:6:12
+   |
+LL | fn func<F: FnMut() -> H, H: FnMut()>(_: F) {}
+   |            ^^^^^^^^^^^^
 note: if `NotCopyable` implemented `Clone`, you could clone the value
   --> $DIR/option-content-move3.rs:2:1
    |
@@ -57,6 +63,7 @@ LL |         move || {
 LL |             let x = var;
    |                     ^^^ move occurs because `var` has type `NotCopyableButCloneable`, which does not implement the `Copy` trait
    |
+   = help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
 help: consider borrowing here
    |
 LL |             let x = &var;
@@ -77,6 +84,11 @@ LL |         move || {
 LL |             let x = var;
    |                     --- variable moved due to use in closure
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/option-content-move3.rs:6:12
+   |
+LL | fn func<F: FnMut() -> H, H: FnMut()>(_: F) {}
+   |            ^^^^^^^^^^^^
 help: consider cloning the value before moving it into the closure
    |
 LL ~         {
diff --git a/tests/ui/issues/auxiliary/issue-9188.rs b/tests/ui/symbol-names/auxiliary/aux-9188.rs
index 3bc5697a1a6..3bc5697a1a6 100644
--- a/tests/ui/issues/auxiliary/issue-9188.rs
+++ b/tests/ui/symbol-names/auxiliary/aux-9188.rs
diff --git a/tests/ui/symbol-names/same-symbol-name-for-inner-statics-9188.rs b/tests/ui/symbol-names/same-symbol-name-for-inner-statics-9188.rs
new file mode 100644
index 00000000000..a1014bb813f
--- /dev/null
+++ b/tests/ui/symbol-names/same-symbol-name-for-inner-statics-9188.rs
@@ -0,0 +1,11 @@
+// https://github.com/rust-lang/rust/issues/9188
+//@ run-pass
+//@ aux-build:aux-9188.rs
+
+extern crate aux_9188 as lib;
+
+pub fn main() {
+    let a = lib::bar();
+    let b = lib::foo::<isize>();
+    assert_eq!(*a, *b);
+}
diff --git a/tests/ui/target-feature/gate.rs b/tests/ui/target-feature/gate.rs
index 9244a98d82f..81ed8b3de76 100644
--- a/tests/ui/target-feature/gate.rs
+++ b/tests/ui/target-feature/gate.rs
@@ -6,6 +6,7 @@
 // gate-test-arm_target_feature
 // gate-test-hexagon_target_feature
 // gate-test-mips_target_feature
+// gate-test-nvptx_target_feature
 // gate-test-wasm_target_feature
 // gate-test-adx_target_feature
 // gate-test-cmpxchg16b_target_feature
diff --git a/tests/ui/target-feature/gate.stderr b/tests/ui/target-feature/gate.stderr
index 32d60ce4382..3e9374be73d 100644
--- a/tests/ui/target-feature/gate.stderr
+++ b/tests/ui/target-feature/gate.stderr
@@ -1,5 +1,5 @@
 error[E0658]: the target feature `x87` is currently unstable
-  --> $DIR/gate.rs:29:18
+  --> $DIR/gate.rs:30:18
    |
 LL | #[target_feature(enable = "x87")]
    |                  ^^^^^^^^^^^^^^
diff --git a/tests/ui/target-feature/implied-features-nvptx.rs b/tests/ui/target-feature/implied-features-nvptx.rs
new file mode 100644
index 00000000000..1550c99f67a
--- /dev/null
+++ b/tests/ui/target-feature/implied-features-nvptx.rs
@@ -0,0 +1,28 @@
+//@ assembly-output: ptx-linker
+//@ compile-flags: --crate-type cdylib -C target-cpu=sm_80 -Z unstable-options -Clinker-flavor=llbc
+//@ only-nvptx64
+//@ build-pass
+#![no_std]
+#![allow(dead_code)]
+
+#[panic_handler]
+pub fn panic(_info: &core::panic::PanicInfo) -> ! {
+    loop {}
+}
+
+// -Ctarget-cpu=sm_80 directly enables sm_80 and ptx70
+#[cfg(not(all(target_feature = "sm_80", target_feature = "ptx70")))]
+compile_error!("direct target features not enabled");
+
+// -Ctarget-cpu=sm_80 implies all earlier sm_* and ptx* features.
+#[cfg(not(all(
+    target_feature = "sm_60",
+    target_feature = "sm_70",
+    target_feature = "ptx50",
+    target_feature = "ptx60",
+)))]
+compile_error!("implied target features not enabled");
+
+// -Ctarget-cpu=sm_80 implies all earlier sm_* and ptx* features.
+#[cfg(target_feature = "ptx71")]
+compile_error!("sm_80 requires only ptx70, but ptx71 enabled");
diff --git a/tests/ui/test-attrs/issue-12997-2.stderr b/tests/ui/test-attrs/issue-12997-2.stderr
index 1123630a4a1..41d0074ad1a 100644
--- a/tests/ui/test-attrs/issue-12997-2.stderr
+++ b/tests/ui/test-attrs/issue-12997-2.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-12997-2.rs:8:1
    |
 LL | #[bench]
-   | -------- in this procedural macro expansion
+   | -------- in this attribute macro expansion
 LL | fn bar(x: isize) { }
    | ^^^^^^^^^^^^^^^^^^^^
    | |
diff --git a/tests/ui/test-attrs/terse.run.stdout b/tests/ui/test-attrs/terse.run.stdout
index ac1ac28c98d..381d3cbe675 100644
--- a/tests/ui/test-attrs/terse.run.stdout
+++ b/tests/ui/test-attrs/terse.run.stdout
@@ -10,18 +10,18 @@ failures:
 
 ---- abc stdout ----
 
-thread 'abc' panicked at $DIR/terse.rs:12:5:
+thread 'abc' ($TID) panicked at $DIR/terse.rs:12:5:
 explicit panic
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
 ---- foo stdout ----
 
-thread 'foo' panicked at $DIR/terse.rs:17:5:
+thread 'foo' ($TID) panicked at $DIR/terse.rs:17:5:
 explicit panic
 
 ---- foo2 stdout ----
 
-thread 'foo2' panicked at $DIR/terse.rs:22:5:
+thread 'foo2' ($TID) panicked at $DIR/terse.rs:22:5:
 explicit panic
 
 
diff --git a/tests/ui/test-attrs/test-function-signature.stderr b/tests/ui/test-attrs/test-function-signature.stderr
index c025163c0bd..55d09970b32 100644
--- a/tests/ui/test-attrs/test-function-signature.stderr
+++ b/tests/ui/test-attrs/test-function-signature.stderr
@@ -26,7 +26,7 @@ error[E0277]: the trait bound `i32: Termination` is not satisfied
   --> $DIR/test-function-signature.rs:9:13
    |
 LL | #[test]
-   | ------- in this procedural macro expansion
+   | ------- in this attribute macro expansion
 LL | fn bar() -> i32 {
    |             ^^^ the trait `Termination` is not implemented for `i32`
    |
diff --git a/tests/ui/test-attrs/test-panic-abort-nocapture.run.stderr b/tests/ui/test-attrs/test-panic-abort-nocapture.run.stderr
index b9f267838b1..8d7c62f8ec7 100644
--- a/tests/ui/test-attrs/test-panic-abort-nocapture.run.stderr
+++ b/tests/ui/test-attrs/test-panic-abort-nocapture.run.stderr
@@ -1,11 +1,11 @@
 
-thread 'main' panicked at $DIR/test-panic-abort-nocapture.rs:32:5:
+thread 'main' ($TID) panicked at $DIR/test-panic-abort-nocapture.rs:32:5:
 assertion `left == right` failed
   left: 2
  right: 4
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
-thread 'main' panicked at $DIR/test-panic-abort-nocapture.rs:26:5:
+thread 'main' ($TID) panicked at $DIR/test-panic-abort-nocapture.rs:26:5:
 assertion `left == right` failed
   left: 2
  right: 4
diff --git a/tests/ui/test-attrs/test-panic-abort.run.stdout b/tests/ui/test-attrs/test-panic-abort.run.stdout
index 0faa7f0dfce..4d65c05b944 100644
--- a/tests/ui/test-attrs/test-panic-abort.run.stdout
+++ b/tests/ui/test-attrs/test-panic-abort.run.stdout
@@ -18,7 +18,7 @@ testing123
 ---- it_fails stderr ----
 testing321
 
-thread 'main' panicked at $DIR/test-panic-abort.rs:37:5:
+thread 'main' ($TID) panicked at $DIR/test-panic-abort.rs:37:5:
 assertion `left == right` failed
   left: 2
  right: 5
diff --git a/tests/ui/test-attrs/test-should-panic-attr.rs b/tests/ui/test-attrs/test-should-panic-attr.rs
index df2893b63ed..e6de07d0094 100644
--- a/tests/ui/test-attrs/test-should-panic-attr.rs
+++ b/tests/ui/test-attrs/test-should-panic-attr.rs
@@ -1,4 +1,3 @@
-//@ check-pass
 //@ compile-flags: --test
 
 #[test]
@@ -9,28 +8,36 @@ fn test1() {
 
 #[test]
 #[should_panic(expected)]
-//~^ WARN: argument must be of the form:
+//~^ ERROR malformed `should_panic` attribute input
+//~| NOTE expected this to be of the form `expected = "..."`
+//~| NOTE for more information, visit
 fn test2() {
     panic!();
 }
 
 #[test]
 #[should_panic(expect)]
-//~^ WARN: argument must be of the form:
+//~^ ERROR malformed `should_panic` attribute input
+//~| NOTE the only valid argument here is "expected"
+//~| NOTE for more information, visit
 fn test3() {
     panic!();
 }
 
 #[test]
 #[should_panic(expected(foo, bar))]
-//~^ WARN: argument must be of the form:
+//~^ ERROR malformed `should_panic` attribute input
+//~| NOTE expected this to be of the form `expected = "..."`
+//~| NOTE for more information, visit
 fn test4() {
     panic!();
 }
 
 #[test]
 #[should_panic(expected = "foo", bar)]
-//~^ WARN: argument must be of the form:
+//~^ ERROR malformed `should_panic` attribute input
+//~| NOTE expected a single argument here
+//~| NOTE for more information, visit
 fn test5() {
     panic!();
 }
diff --git a/tests/ui/test-attrs/test-should-panic-attr.stderr b/tests/ui/test-attrs/test-should-panic-attr.stderr
index 492d1d5e03a..475a55ad0cb 100644
--- a/tests/ui/test-attrs/test-should-panic-attr.stderr
+++ b/tests/ui/test-attrs/test-should-panic-attr.stderr
@@ -1,34 +1,86 @@
-warning: argument must be of the form: `expected = "error message"`
-  --> $DIR/test-should-panic-attr.rs:11:1
+error[E0539]: malformed `should_panic` attribute input
+  --> $DIR/test-should-panic-attr.rs:10:1
    |
 LL | #[should_panic(expected)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^--------^^
+   |                |
+   |                expected this to be of the form `expected = "..."`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/testing.html#the-should_panic-attribute>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[should_panic(expected)]
+LL + #[should_panic = "reason"]
+   |
+LL | #[should_panic(expected = "reason")]
+   |                         ++++++++++
+LL - #[should_panic(expected)]
+LL + #[should_panic]
    |
-   = note: errors in this attribute were erroneously allowed and will become a hard error in a future release
 
-warning: argument must be of the form: `expected = "error message"`
-  --> $DIR/test-should-panic-attr.rs:18:1
+error[E0539]: malformed `should_panic` attribute input
+  --> $DIR/test-should-panic-attr.rs:19:1
    |
 LL | #[should_panic(expect)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^--------^
+   |               |
+   |               the only valid argument here is "expected"
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/testing.html#the-should_panic-attribute>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[should_panic(expect)]
+LL + #[should_panic = "reason"]
+   |
+LL | #[should_panic(expected = "reason")]
+   |                      +++++++++++++
+LL - #[should_panic(expect)]
+LL + #[should_panic]
    |
-   = note: errors in this attribute were erroneously allowed and will become a hard error in a future release
 
-warning: argument must be of the form: `expected = "error message"`
-  --> $DIR/test-should-panic-attr.rs:25:1
+error[E0539]: malformed `should_panic` attribute input
+  --> $DIR/test-should-panic-attr.rs:28:1
    |
 LL | #[should_panic(expected(foo, bar))]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^------------------^^
+   |                |
+   |                expected this to be of the form `expected = "..."`
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/testing.html#the-should_panic-attribute>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[should_panic(expected(foo, bar))]
+LL + #[should_panic = "reason"]
+   |
+LL - #[should_panic(expected(foo, bar))]
+LL + #[should_panic(expected = "reason")]
+   |
+LL - #[should_panic(expected(foo, bar))]
+LL + #[should_panic]
    |
-   = note: errors in this attribute were erroneously allowed and will become a hard error in a future release
 
-warning: argument must be of the form: `expected = "error message"`
-  --> $DIR/test-should-panic-attr.rs:32:1
+error[E0805]: malformed `should_panic` attribute input
+  --> $DIR/test-should-panic-attr.rs:37:1
    |
 LL | #[should_panic(expected = "foo", bar)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^-----------------------^
+   |               |
+   |               expected a single argument here
+   |
+   = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/testing.html#the-should_panic-attribute>
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[should_panic(expected = "foo", bar)]
+LL + #[should_panic = "reason"]
+   |
+LL - #[should_panic(expected = "foo", bar)]
+LL + #[should_panic(expected = "reason")]
+   |
+LL - #[should_panic(expected = "foo", bar)]
+LL + #[should_panic]
    |
-   = note: errors in this attribute were erroneously allowed and will become a hard error in a future release
 
-warning: 4 warnings emitted
+error: aborting due to 4 previous errors
 
+Some errors have detailed explanations: E0539, E0805.
+For more information about an error, try `rustc --explain E0539`.
diff --git a/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr b/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr
index db379a16b52..63bc10ef5ea 100644
--- a/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr
+++ b/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr
@@ -1,13 +1,13 @@
 
-thread 'should_panic_with_any_message' panicked at $DIR/test-should-panic-failed-show-span.rs:14:5:
+thread 'should_panic_with_any_message' ($TID) panicked at $DIR/test-should-panic-failed-show-span.rs:14:5:
 Panic!
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
-thread 'should_panic_with_message' panicked at $DIR/test-should-panic-failed-show-span.rs:20:5:
+thread 'should_panic_with_message' ($TID) panicked at $DIR/test-should-panic-failed-show-span.rs:20:5:
 message
 
-thread 'should_panic_with_substring_panics_with_incorrect_string' panicked at $DIR/test-should-panic-failed-show-span.rs:38:5:
+thread 'should_panic_with_substring_panics_with_incorrect_string' ($TID) panicked at $DIR/test-should-panic-failed-show-span.rs:38:5:
 ZOMGWTFBBQ
 
-thread 'should_panic_with_substring_panics_with_non_string_value' panicked at $DIR/test-should-panic-failed-show-span.rs:45:5:
+thread 'should_panic_with_substring_panics_with_non_string_value' ($TID) panicked at $DIR/test-should-panic-failed-show-span.rs:45:5:
 Box<dyn Any>
diff --git a/tests/ui/test-attrs/test-thread-capture.run.stdout b/tests/ui/test-attrs/test-thread-capture.run.stdout
index f9b9757f861..bea3dcb1041 100644
--- a/tests/ui/test-attrs/test-thread-capture.run.stdout
+++ b/tests/ui/test-attrs/test-thread-capture.run.stdout
@@ -11,7 +11,7 @@ fie
 foe
 fum
 
-thread 'thready_fail' panicked at $DIR/test-thread-capture.rs:32:5:
+thread 'thready_fail' ($TID) panicked at $DIR/test-thread-capture.rs:32:5:
 explicit panic
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
diff --git a/tests/ui/test-attrs/test-thread-nocapture.run.stderr b/tests/ui/test-attrs/test-thread-nocapture.run.stderr
index 59560015fca..b9905b0c2f9 100644
--- a/tests/ui/test-attrs/test-thread-nocapture.run.stderr
+++ b/tests/ui/test-attrs/test-thread-nocapture.run.stderr
@@ -1,4 +1,4 @@
 
-thread 'thready_fail' panicked at $DIR/test-thread-nocapture.rs:32:5:
+thread 'thready_fail' ($TID) panicked at $DIR/test-thread-nocapture.rs:32:5:
 explicit panic
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/issues/issue-30756.rs b/tests/ui/thread-local/thread-local-with-attributes-30756.rs
index d103776406c..fcf7bb813c8 100644
--- a/tests/ui/issues/issue-30756.rs
+++ b/tests/ui/thread-local/thread-local-with-attributes-30756.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/30756
 //@ run-pass
 #![forbid(unsafe_code)]
 
diff --git a/tests/ui/threads-sendsync/tcp-stress.rs b/tests/ui/threads-sendsync/tcp-stress.rs
deleted file mode 100644
index b2f76a55fb9..00000000000
--- a/tests/ui/threads-sendsync/tcp-stress.rs
+++ /dev/null
@@ -1,64 +0,0 @@
-//@ run-pass
-//@ ignore-android needs extra network permissions
-//@ needs-threads
-//@ ignore-netbsd system ulimit (Too many open files)
-//@ ignore-openbsd system ulimit (Too many open files)
-
-use std::io::prelude::*;
-use std::net::{TcpListener, TcpStream};
-use std::process;
-use std::sync::mpsc::channel;
-use std::thread::{self, Builder};
-use std::time::Duration;
-
-const TARGET_CNT: usize = 200;
-
-fn main() {
-    // This test has a chance to time out, try to not let it time out
-    thread::spawn(move || -> () {
-        thread::sleep(Duration::from_secs(30));
-        process::exit(1);
-    });
-
-    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
-    let addr = listener.local_addr().unwrap();
-    thread::spawn(move || -> () {
-        loop {
-            let mut stream = match listener.accept() {
-                Ok(stream) => stream.0,
-                Err(_) => continue,
-            };
-            let _ = stream.read(&mut [0]);
-            let _ = stream.write(&[2]);
-        }
-    });
-
-    let (tx, rx) = channel();
-
-    let mut spawned_cnt = 0;
-    for _ in 0..TARGET_CNT {
-        let tx = tx.clone();
-        let res = Builder::new().stack_size(64 * 1024).spawn(move || {
-            match TcpStream::connect(addr) {
-                Ok(mut stream) => {
-                    let _ = stream.write(&[1]);
-                    let _ = stream.read(&mut [0]);
-                }
-                Err(..) => {}
-            }
-            tx.send(()).unwrap();
-        });
-        if let Ok(_) = res {
-            spawned_cnt += 1;
-        };
-    }
-
-    // Wait for all clients to exit, but don't wait for the server to exit. The
-    // server just runs infinitely.
-    drop(tx);
-    for _ in 0..spawned_cnt {
-        rx.recv().unwrap();
-    }
-    assert_eq!(spawned_cnt, TARGET_CNT);
-    process::exit(0);
-}
diff --git a/tests/ui/track-diagnostics/track.rs b/tests/ui/track-diagnostics/track.rs
index 1b2558c724b..9ce0a4a555a 100644
--- a/tests/ui/track-diagnostics/track.rs
+++ b/tests/ui/track-diagnostics/track.rs
@@ -13,6 +13,11 @@
 // top of this file are present, then assume all args are present.
 //@ normalize-stderr: "note: compiler flags: .*-Z ui-testing.*-Z track-diagnostics" -> "note: compiler flags: ... -Z ui-testing ... -Z track-diagnostics"
 
+// FIXME: this tests a crash in rustc. For stage1, rustc is built with the downloaded standard
+// library which doesn't yet print the thread ID. Normalization can be removed at the stage bump.
+// For the grep: cfg(bootstrap)
+//@normalize-stderr: "thread 'rustc' panicked" -> "thread 'rustc' ($$TID) panicked"
+
 fn main() {
     break rust
     //~^ ERROR cannot find value `rust` in this scope
diff --git a/tests/ui/track-diagnostics/track.stderr b/tests/ui/track-diagnostics/track.stderr
index f82764958d4..bc04ded379d 100644
--- a/tests/ui/track-diagnostics/track.stderr
+++ b/tests/ui/track-diagnostics/track.stderr
@@ -27,7 +27,7 @@ LL |     break rust
    = note: compiler flags: ... -Z ui-testing ... -Z track-diagnostics
 
 
-thread 'rustc' panicked at compiler/rustc_hir_typeck/src/lib.rs:LL:CC:
+thread 'rustc' ($TID) panicked at compiler/rustc_hir_typeck/src/lib.rs:LL:CC:
 Box<dyn Any>
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
diff --git a/tests/ui/issues/issue-13775.rs b/tests/ui/trait-bounds/anonymous-parameters-13775.rs
index 1477dab9e21..297d4b59587 100644
--- a/tests/ui/issues/issue-13775.rs
+++ b/tests/ui/trait-bounds/anonymous-parameters-13775.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13775
+
 //@ edition: 2015
 //@ check-pass
 
diff --git a/tests/ui/trait-bounds/more_maybe_bounds.rs b/tests/ui/trait-bounds/more_maybe_bounds.rs
index 47348b0a0dd..d367dd5b299 100644
--- a/tests/ui/trait-bounds/more_maybe_bounds.rs
+++ b/tests/ui/trait-bounds/more_maybe_bounds.rs
@@ -1,7 +1,7 @@
 // FIXME(more_maybe_bounds): Even under `more_maybe_bounds` / `-Zexperimental-default-bounds`,
 // trying to relax non-default bounds should still be an error in all contexts! As you can see
-// there are places like supertrait bounds and trait object types where we currently don't perform
-// this check.
+// there are places like supertrait bounds, trait object types or associated type bounds (ATB)
+// where we currently don't perform this check.
 #![feature(auto_traits, more_maybe_bounds, negative_impls)]
 
 trait Trait1 {}
@@ -13,11 +13,15 @@ trait Trait4 where Self: Trait1 {}
 
 // FIXME: `?Trait2` should be rejected, `Trait2` isn't marked `#[lang = "default_traitN"]`.
 fn foo(_: Box<(dyn Trait3 + ?Trait2)>) {}
+
 fn bar<T: ?Sized + ?Trait2 + ?Trait1 + ?Trait4>(_: &T) {}
 //~^ ERROR bound modifier `?` can only be applied to default traits like `Sized`
 //~| ERROR bound modifier `?` can only be applied to default traits like `Sized`
 //~| ERROR bound modifier `?` can only be applied to default traits like `Sized`
 
+// FIXME: `?Trait1` should be rejected, `Trait1` isn't marked `#[lang = "default_traitN"]`.
+fn baz<T>() where T: Iterator<Item: ?Trait1> {}
+
 struct S;
 impl !Trait2 for S {}
 impl Trait1 for S {}
diff --git a/tests/ui/trait-bounds/more_maybe_bounds.stderr b/tests/ui/trait-bounds/more_maybe_bounds.stderr
index 09c9fc31165..8dd83fc7728 100644
--- a/tests/ui/trait-bounds/more_maybe_bounds.stderr
+++ b/tests/ui/trait-bounds/more_maybe_bounds.stderr
@@ -1,17 +1,17 @@
 error: bound modifier `?` can only be applied to default traits like `Sized`
-  --> $DIR/more_maybe_bounds.rs:16:20
+  --> $DIR/more_maybe_bounds.rs:17:20
    |
 LL | fn bar<T: ?Sized + ?Trait2 + ?Trait1 + ?Trait4>(_: &T) {}
    |                    ^^^^^^^
 
 error: bound modifier `?` can only be applied to default traits like `Sized`
-  --> $DIR/more_maybe_bounds.rs:16:30
+  --> $DIR/more_maybe_bounds.rs:17:30
    |
 LL | fn bar<T: ?Sized + ?Trait2 + ?Trait1 + ?Trait4>(_: &T) {}
    |                              ^^^^^^^
 
 error: bound modifier `?` can only be applied to default traits like `Sized`
-  --> $DIR/more_maybe_bounds.rs:16:40
+  --> $DIR/more_maybe_bounds.rs:17:40
    |
 LL | fn bar<T: ?Sized + ?Trait2 + ?Trait1 + ?Trait4>(_: &T) {}
    |                                        ^^^^^^^
diff --git a/tests/ui/issues/issue-72839-error-overflow.rs b/tests/ui/trait-bounds/trait-selection-overflow-prevention-72839.rs
index 6562d228409..436657e3de5 100644
--- a/tests/ui/issues/issue-72839-error-overflow.rs
+++ b/tests/ui/trait-bounds/trait-selection-overflow-prevention-72839.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/72839
 // Regression test for issue #72839
 // Tests that we do not overflow during trait selection after
 // a type error occurs
diff --git a/tests/ui/issues/issue-72839-error-overflow.stderr b/tests/ui/trait-bounds/trait-selection-overflow-prevention-72839.stderr
index 35be632f579..da7500f77e1 100644
--- a/tests/ui/issues/issue-72839-error-overflow.stderr
+++ b/tests/ui/trait-bounds/trait-selection-overflow-prevention-72839.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `missing_var` in this scope
-  --> $DIR/issue-72839-error-overflow.rs:18:8
+  --> $DIR/trait-selection-overflow-prevention-72839.rs:19:8
    |
 LL |     if missing_var % 8 == 0 {}
    |        ^^^^^^^^^^^ not found in this scope
diff --git a/tests/ui/issues/issue-47638.rs b/tests/ui/trait-objects/trait-object-lifetime-conversion-47638.rs
index e5a51ce0c06..c70dc74f3e5 100644
--- a/tests/ui/issues/issue-47638.rs
+++ b/tests/ui/trait-objects/trait-object-lifetime-conversion-47638.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/47638
 //@ run-pass
 #![allow(unused_variables)]
 fn id<'c, 'b>(f: &'c &'b dyn Fn(&i32)) -> &'c &'b dyn Fn(&'static i32) {
diff --git a/tests/ui/traits/const-traits/conditionally-const-in-anon-const.rs b/tests/ui/traits/const-traits/conditionally-const-in-anon-const.rs
new file mode 100644
index 00000000000..5aebcceb7c7
--- /dev/null
+++ b/tests/ui/traits/const-traits/conditionally-const-in-anon-const.rs
@@ -0,0 +1,28 @@
+#![feature(const_trait_impl, impl_trait_in_bindings)]
+
+struct S;
+#[const_trait]
+trait Trait<const N: u32> {}
+
+impl const Trait<0> for () {}
+
+const fn f<
+    T: Trait<
+        {
+            const fn g<U: [const] Trait<0>>() {}
+
+            struct I<U: [const] Trait<0>>(U);
+            //~^ ERROR `[const]` is not allowed here
+
+            let x: &impl [const] Trait<0> = &();
+            //~^ ERROR `[const]` is not allowed here
+
+            0
+        },
+    >,
+>(x: &T) {
+    // Should be allowed here
+    let y: &impl [const] Trait<0> = x;
+}
+
+pub fn main() {}
diff --git a/tests/ui/traits/const-traits/conditionally-const-in-anon-const.stderr b/tests/ui/traits/const-traits/conditionally-const-in-anon-const.stderr
new file mode 100644
index 00000000000..c6be249b95a
--- /dev/null
+++ b/tests/ui/traits/const-traits/conditionally-const-in-anon-const.stderr
@@ -0,0 +1,32 @@
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-in-anon-const.rs:14:25
+   |
+LL |             struct I<U: [const] Trait<0>>(U);
+   |                         ^^^^^^^
+   |
+note: structs cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-in-anon-const.rs:14:13
+   |
+LL |             struct I<U: [const] Trait<0>>(U);
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-in-anon-const.rs:17:26
+   |
+LL |             let x: &impl [const] Trait<0> = &();
+   |                          ^^^^^^^
+   |
+note: anonymous constants cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-in-anon-const.rs:11:9
+   |
+LL | /         {
+LL | |             const fn g<U: [const] Trait<0>>() {}
+LL | |
+LL | |             struct I<U: [const] Trait<0>>(U);
+...  |
+LL | |             0
+LL | |         },
+   | |_________^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs b/tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs
deleted file mode 100644
index 0c644694585..00000000000
--- a/tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-//@ compile-flags: -Znext-solver
-//@ known-bug: #132067
-//@ check-pass
-
-#![feature(const_trait_impl)]
-
-struct S;
-#[const_trait]
-trait Trait<const N: u32> {}
-
-const fn f<
-    T: Trait<
-        {
-            struct I<U: [const] Trait<0>>(U);
-            0
-        },
-    >,
->() {
-}
-
-pub fn main() {}
diff --git a/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr b/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr
index 010b1584643..5c3bb236967 100644
--- a/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr
+++ b/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr
@@ -16,7 +16,11 @@ error: `[const]` is not allowed here
 LL | struct Struct<T: [const] Trait> { field: T }
    |                  ^^^^^^^
    |
-   = note: this item cannot have `[const]` trait bounds
+note: structs cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:9:1
+   |
+LL | struct Struct<T: [const] Trait> { field: T }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
   --> $DIR/conditionally-const-invalid-places.rs:10:23
@@ -24,7 +28,11 @@ error: `[const]` is not allowed here
 LL | struct TupleStruct<T: [const] Trait>(T);
    |                       ^^^^^^^
    |
-   = note: this item cannot have `[const]` trait bounds
+note: structs cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:10:1
+   |
+LL | struct TupleStruct<T: [const] Trait>(T);
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
   --> $DIR/conditionally-const-invalid-places.rs:11:22
@@ -32,7 +40,11 @@ error: `[const]` is not allowed here
 LL | struct UnitStruct<T: [const] Trait>;
    |                      ^^^^^^^
    |
-   = note: this item cannot have `[const]` trait bounds
+note: structs cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:11:1
+   |
+LL | struct UnitStruct<T: [const] Trait>;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
   --> $DIR/conditionally-const-invalid-places.rs:14:14
@@ -40,7 +52,11 @@ error: `[const]` is not allowed here
 LL | enum Enum<T: [const] Trait> { Variant(T) }
    |              ^^^^^^^
    |
-   = note: this item cannot have `[const]` trait bounds
+note: enums cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:14:1
+   |
+LL | enum Enum<T: [const] Trait> { Variant(T) }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
   --> $DIR/conditionally-const-invalid-places.rs:16:16
@@ -48,7 +64,11 @@ error: `[const]` is not allowed here
 LL | union Union<T: [const] Trait> { field: T }
    |                ^^^^^^^
    |
-   = note: this item cannot have `[const]` trait bounds
+note: unions cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:16:1
+   |
+LL | union Union<T: [const] Trait> { field: T }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
   --> $DIR/conditionally-const-invalid-places.rs:19:14
diff --git a/tests/ui/traits/const-traits/const-and-non-const-impl.rs b/tests/ui/traits/const-traits/const-and-non-const-impl.rs
index 85e2c5d3df6..560b740dc91 100644
--- a/tests/ui/traits/const-traits/const-and-non-const-impl.rs
+++ b/tests/ui/traits/const-traits/const-and-non-const-impl.rs
@@ -1,10 +1,9 @@
-//@ known-bug: #110395
-
 #![feature(const_trait_impl, const_ops)]
 
 pub struct Int(i32);
 
 impl const std::ops::Add for i32 {
+    //~^ ERROR only traits defined in the current crate can be implemented for primitive types
     type Output = Self;
 
     fn add(self, rhs: Self) -> Self {
@@ -21,6 +20,7 @@ impl std::ops::Add for Int {
 }
 
 impl const std::ops::Add for Int {
+    //~^ ERROR conflicting implementations of trait
     type Output = Self;
 
     fn add(self, rhs: Self) -> Self {
diff --git a/tests/ui/traits/const-traits/const-and-non-const-impl.stderr b/tests/ui/traits/const-traits/const-and-non-const-impl.stderr
index 4eb15177347..26ed7d05324 100644
--- a/tests/ui/traits/const-traits/const-and-non-const-impl.stderr
+++ b/tests/ui/traits/const-traits/const-and-non-const-impl.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `Add` for type `Int`
-  --> $DIR/const-and-non-const-impl.rs:23:1
+  --> $DIR/const-and-non-const-impl.rs:22:1
    |
 LL | impl std::ops::Add for Int {
    | -------------------------- first implementation here
@@ -8,7 +8,7 @@ LL | impl const std::ops::Add for Int {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Int`
 
 error[E0117]: only traits defined in the current crate can be implemented for primitive types
-  --> $DIR/const-and-non-const-impl.rs:7:1
+  --> $DIR/const-and-non-const-impl.rs:5:1
    |
 LL | impl const std::ops::Add for i32 {
    | ^^^^^^^^^^^-------------^^^^^---
diff --git a/tests/ui/traits/const-traits/const-closure-issue-125866-error.rs b/tests/ui/traits/const-traits/const-closure-issue-125866-error.rs
new file mode 100644
index 00000000000..7a44920bb72
--- /dev/null
+++ b/tests/ui/traits/const-traits/const-closure-issue-125866-error.rs
@@ -0,0 +1,24 @@
+#![allow(incomplete_features)]
+#![feature(const_closures, const_trait_impl)]
+
+const fn create_array<const N: usize>(mut f: impl FnMut(usize) -> u32 + Copy) -> [u32; N] {
+    let mut array = [0; N];
+    let mut i = 0;
+    loop {
+        array[i] = f(i);
+        //~^ ERROR the trait bound `impl FnMut(usize) -> u32 + Copy: [const] FnMut(usize)` is not satisfied [E0277]
+        i += 1;
+        if i == N {
+            break;
+        }
+    }
+    array
+}
+
+fn main() {
+    let x = create_array(const |i| 2 * i as u32);
+    assert_eq!(x, [0, 2, 4, 6, 8]);
+
+    let y = create_array(const |i| 2 * i as u32 + 1);
+    assert_eq!(y, [1, 3, 5, 7, 9]);
+}
diff --git a/tests/ui/traits/const-traits/const-closure-issue-125866-error.stderr b/tests/ui/traits/const-traits/const-closure-issue-125866-error.stderr
new file mode 100644
index 00000000000..1eadd1d8426
--- /dev/null
+++ b/tests/ui/traits/const-traits/const-closure-issue-125866-error.stderr
@@ -0,0 +1,11 @@
+error[E0277]: the trait bound `impl FnMut(usize) -> u32 + Copy: [const] FnMut(usize)` is not satisfied
+  --> $DIR/const-closure-issue-125866-error.rs:8:22
+   |
+LL |         array[i] = f(i);
+   |                    - ^
+   |                    |
+   |                    required by a bound introduced by this call
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/const-closure-issue-125866-pass.rs b/tests/ui/traits/const-traits/const-closure-issue-125866-pass.rs
new file mode 100644
index 00000000000..af7375172e6
--- /dev/null
+++ b/tests/ui/traits/const-traits/const-closure-issue-125866-pass.rs
@@ -0,0 +1,25 @@
+//@ check-pass
+
+#![allow(incomplete_features)]
+#![feature(const_closures, const_trait_impl)]
+
+const fn create_array<const N: usize>(mut f: impl [const] FnMut(usize) -> u32 + Copy) -> [u32; N] {
+    let mut array = [0; N];
+    let mut i = 0;
+    loop {
+        array[i] = f(i);
+        i += 1;
+        if i == N {
+            break;
+        }
+    }
+    array
+}
+
+fn main() {
+    let x = create_array(const |i| 2 * i as u32);
+    assert_eq!(x, [0, 2, 4, 6, 8]);
+
+    let y = create_array(const |i| 2 * i as u32 + 1);
+    assert_eq!(y, [1, 3, 5, 7, 9]);
+}
diff --git a/tests/ui/traits/const-traits/const-fn-trait-bound-issue-104314.rs b/tests/ui/traits/const-traits/const-fn-trait-bound-issue-104314.rs
new file mode 100644
index 00000000000..09c89c9cecd
--- /dev/null
+++ b/tests/ui/traits/const-traits/const-fn-trait-bound-issue-104314.rs
@@ -0,0 +1,13 @@
+//@ check-pass
+
+#![feature(const_trait_impl, const_destruct, const_clone)]
+
+use std::marker::Destruct;
+
+const fn f<T, F: [const] Fn(&T) -> T + [const] Destruct>(_: F) {}
+
+const fn g<T: [const] Clone>() {
+    f(<T as Clone>::clone);
+}
+
+fn main() {}
diff --git a/tests/ui/traits/const-traits/feature-gate.rs b/tests/ui/traits/const-traits/feature-gate.rs
index 5ad56ddcd33..c2918f0249b 100644
--- a/tests/ui/traits/const-traits/feature-gate.rs
+++ b/tests/ui/traits/const-traits/feature-gate.rs
@@ -13,6 +13,9 @@ impl const T for S {}
 const fn f<A: [const] T>() {} //[stock]~ ERROR const trait impls are experimental
 fn g<A: const T>() {} //[stock]~ ERROR const trait impls are experimental
 
+const trait Trait {} //[stock]~ ERROR const trait impls are experimental
+#[cfg(false)] const trait Trait {} //[stock]~ ERROR const trait impls are experimental
+
 macro_rules! discard { ($ty:ty) => {} }
 
 discard! { impl [const] T } //[stock]~ ERROR const trait impls are experimental
diff --git a/tests/ui/traits/const-traits/feature-gate.stock.stderr b/tests/ui/traits/const-traits/feature-gate.stock.stderr
index f3ba3039a23..551c7ced7c1 100644
--- a/tests/ui/traits/const-traits/feature-gate.stock.stderr
+++ b/tests/ui/traits/const-traits/feature-gate.stock.stderr
@@ -29,7 +29,27 @@ LL | fn g<A: const T>() {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: const trait impls are experimental
-  --> $DIR/feature-gate.rs:18:17
+  --> $DIR/feature-gate.rs:16:1
+   |
+LL | const trait Trait {}
+   | ^^^^^
+   |
+   = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
+   = help: add `#![feature(const_trait_impl)]` 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[E0658]: const trait impls are experimental
+  --> $DIR/feature-gate.rs:17:15
+   |
+LL | #[cfg(false)] const trait Trait {}
+   |               ^^^^^
+   |
+   = note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
+   = help: add `#![feature(const_trait_impl)]` 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[E0658]: const trait impls are experimental
+  --> $DIR/feature-gate.rs:21:17
    |
 LL | discard! { impl [const] T }
    |                 ^^^^^^^
@@ -39,7 +59,7 @@ LL | discard! { impl [const] T }
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: const trait impls are experimental
-  --> $DIR/feature-gate.rs:19:17
+  --> $DIR/feature-gate.rs:22:17
    |
 LL | discard! { impl const T }
    |                 ^^^^^
@@ -58,6 +78,6 @@ LL | #[const_trait]
    = help: add `#![feature(const_trait_impl)]` 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 6 previous errors
+error: aborting due to 8 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/traits/const-traits/inherent-impl.rs b/tests/ui/traits/const-traits/inherent-impl.rs
index 07b23adf9e1..5ca4c5d7863 100644
--- a/tests/ui/traits/const-traits/inherent-impl.rs
+++ b/tests/ui/traits/const-traits/inherent-impl.rs
@@ -5,9 +5,9 @@ struct S;
 trait T {}
 
 impl const S {}
-//~^ ERROR inherent impls cannot be `const`
+//~^ ERROR inherent impls cannot be const
 
 impl const dyn T {}
-//~^ ERROR inherent impls cannot be `const`
+//~^ ERROR inherent impls cannot be const
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/inherent-impl.stderr b/tests/ui/traits/const-traits/inherent-impl.stderr
index e4ec1e807b0..d828ecb6349 100644
--- a/tests/ui/traits/const-traits/inherent-impl.stderr
+++ b/tests/ui/traits/const-traits/inherent-impl.stderr
@@ -1,20 +1,20 @@
-error: inherent impls cannot be `const`
+error: inherent impls cannot be const
   --> $DIR/inherent-impl.rs:7:12
    |
 LL | impl const S {}
    |      ----- ^ inherent impl for this type
    |      |
-   |      `const` because of this
+   |      const because of this
    |
    = note: only trait implementations may be annotated with `const`
 
-error: inherent impls cannot be `const`
+error: inherent impls cannot be const
   --> $DIR/inherent-impl.rs:10:12
    |
 LL | impl const dyn T {}
    |      ----- ^^^^^ inherent impl for this type
    |      |
-   |      `const` because of this
+   |      const because of this
    |
    = note: only trait implementations may be annotated with `const`
 
diff --git a/tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr b/tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr
index af160a45f3e..9fad260f0be 100644
--- a/tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr
+++ b/tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr
@@ -1,15 +1,4 @@
-error: macro expansion ignores keyword `dyn` and any tokens following
-  --> $DIR/macro-const-trait-bound-theoretical-regression.rs:14:31
-   |
-LL |     (dyn $c:ident Trait) => { dyn $c Trait {} };
-   |                               ^^^
-...
-LL | demo! { dyn const Trait }
-   | ------------------------- caused by the macro expansion here
-   |
-   = note: the usage of `demo!` is likely invalid in item context
-
-error: inherent impls cannot be `const`
+error: inherent impls cannot be const
   --> $DIR/macro-const-trait-bound-theoretical-regression.rs:10:40
    |
 LL |     (impl $c:ident Trait) => { impl $c Trait {} };
@@ -18,12 +7,23 @@ LL |     (impl $c:ident Trait) => { impl $c Trait {} };
 LL | demo! { impl const Trait }
    | --------------------------
    | |            |
-   | |            `const` because of this
+   | |            const because of this
    | in this macro invocation
    |
    = note: only trait implementations may be annotated with `const`
    = note: this error originates in the macro `demo` (in Nightly builds, run with -Z macro-backtrace for more info)
 
+error: macro expansion ignores keyword `dyn` and any tokens following
+  --> $DIR/macro-const-trait-bound-theoretical-regression.rs:14:31
+   |
+LL |     (dyn $c:ident Trait) => { dyn $c Trait {} };
+   |                               ^^^
+...
+LL | demo! { dyn const Trait }
+   | ------------------------- caused by the macro expansion here
+   |
+   = note: the usage of `demo!` is likely invalid in item context
+
 error[E0658]: const trait impls are experimental
   --> $DIR/macro-const-trait-bound-theoretical-regression.rs:17:14
    |
diff --git a/tests/ui/traits/const-traits/span-bug-issue-121418.rs b/tests/ui/traits/const-traits/span-bug-issue-121418.rs
index 50a7e12f2a7..593180ac094 100644
--- a/tests/ui/traits/const-traits/span-bug-issue-121418.rs
+++ b/tests/ui/traits/const-traits/span-bug-issue-121418.rs
@@ -4,7 +4,7 @@ struct S;
 trait T {}
 
 impl const dyn T {
-    //~^ ERROR inherent impls cannot be `const`
+    //~^ ERROR inherent impls cannot be const
     pub const fn new() -> std::sync::Mutex<dyn T> {}
     //~^ ERROR mismatched types
     //~| ERROR cannot be known at compilation time
diff --git a/tests/ui/traits/const-traits/span-bug-issue-121418.stderr b/tests/ui/traits/const-traits/span-bug-issue-121418.stderr
index f31129d9cb7..0c8ca918a3e 100644
--- a/tests/ui/traits/const-traits/span-bug-issue-121418.stderr
+++ b/tests/ui/traits/const-traits/span-bug-issue-121418.stderr
@@ -1,10 +1,10 @@
-error: inherent impls cannot be `const`
+error: inherent impls cannot be const
   --> $DIR/span-bug-issue-121418.rs:6:12
    |
 LL | impl const dyn T {
    |      ----- ^^^^^ inherent impl for this type
    |      |
-   |      `const` because of this
+   |      const because of this
    |
    = note: only trait implementations may be annotated with `const`
 
diff --git a/tests/ui/issues/issue-13204.rs b/tests/ui/traits/default-method-lifetime-params-13204.rs
index 01362f6fe61..cdf34ab773c 100644
--- a/tests/ui/issues/issue-13204.rs
+++ b/tests/ui/traits/default-method-lifetime-params-13204.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13204
+
 //@ run-pass
 #![allow(unused_mut)]
 // Test that when instantiating trait default methods, typeck handles
diff --git a/tests/ui/issues/issue-15444.rs b/tests/ui/traits/fn-type-trait-impl-15444.rs
index 14708c7733c..ab91e88b9cd 100644
--- a/tests/ui/issues/issue-15444.rs
+++ b/tests/ui/traits/fn-type-trait-impl-15444.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15444
+
 //@ run-pass
 
 trait MyTrait {
diff --git a/tests/ui/issues/issue-13434.rs b/tests/ui/traits/fnonce-repro-trait-impl-13434.rs
index caf7b632393..61d5a1d74ae 100644
--- a/tests/ui/issues/issue-13434.rs
+++ b/tests/ui/traits/fnonce-repro-trait-impl-13434.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13434
+
 //@ run-pass
 #[derive(Debug)]
 struct MyStruct;
diff --git a/tests/ui/issues/issue-14229.rs b/tests/ui/traits/impl-trait-chain-14229.rs
index eb6324da3b6..4a234f3a681 100644
--- a/tests/ui/issues/issue-14229.rs
+++ b/tests/ui/traits/impl-trait-chain-14229.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14229
+
 //@ run-pass
 trait Foo: Sized {
     fn foo(self) {}
diff --git a/tests/ui/issues/issue-15734.rs b/tests/ui/traits/index-trait-multiple-impls-15734.rs
index 26fb7061664..a2d5d7c87fc 100644
--- a/tests/ui/issues/issue-15734.rs
+++ b/tests/ui/traits/index-trait-multiple-impls-15734.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/15734
+
 //@ run-pass
 //@ revisions: current next
 //@ ignore-compare-mode-next-solver (explicit revisions)
diff --git a/tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr b/tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr
index 3a3b99f6c5b..45602d676b3 100644
--- a/tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr
+++ b/tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr
@@ -1,8 +1,8 @@
 error[E0568]: auto traits cannot have super traits or lifetime bounds
-  --> $DIR/supertrait-auto-trait.rs:8:17
+  --> $DIR/supertrait-auto-trait.rs:8:19
    |
 LL | auto trait Magic: Copy {}
-   |            -----^^^^^^ help: remove the super traits or lifetime bounds
+   |            -----  ^^^^
    |            |
    |            auto traits cannot have super traits or lifetime bounds
 
diff --git a/tests/ui/traits/issue-91949-hangs-on-recursion.rs b/tests/ui/traits/issue-91949-hangs-on-recursion.rs
index 7c9ae09349a..434cf00fc4b 100644
--- a/tests/ui/traits/issue-91949-hangs-on-recursion.rs
+++ b/tests/ui/traits/issue-91949-hangs-on-recursion.rs
@@ -1,6 +1,6 @@
 //~ ERROR overflow evaluating the requirement `<std::iter::Empty<()> as Iterator>::Item == ()`
 //@ build-fail
-//@ compile-flags: -Zinline-mir=no
+//@ compile-flags: -Zinline-mir=no -Zwrite-long-types-to-disk=yes
 
 // Regression test for #91949.
 // This hanged *forever* on 1.56, fixed by #90423.
diff --git a/tests/ui/traits/issue-91949-hangs-on-recursion.stderr b/tests/ui/traits/issue-91949-hangs-on-recursion.stderr
index c2f09371cf7..a179107885a 100644
--- a/tests/ui/traits/issue-91949-hangs-on-recursion.stderr
+++ b/tests/ui/traits/issue-91949-hangs-on-recursion.stderr
@@ -24,7 +24,9 @@ LL | impl<T, I: Iterator<Item = T>> Iterator for IteratorOfWrapped<T, I> {
    |                     |
    |                     unsatisfied trait bound introduced here
    = note: 256 redundant requirements hidden
-   = note: required for `IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<IteratorOfWrapped<(), std::iter::Empty<()>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>, {closure@$DIR/issue-91949-hangs-on-recursion.rs:26:45: 26:48}>>` to implement `Iterator`
+   = note: required for `IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<..., ...>>, ...>>` to implement `Iterator`
+   = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-91949-hangs-on-recursion.long-type-$LONG_TYPE_HASH.txt'
+   = note: consider using `--verbose` to print the full type name to the console
 
 error: aborting due to 1 previous error; 1 warning emitted
 
diff --git a/tests/ui/issues/issue-16048.rs b/tests/ui/traits/lifetime-mismatch-trait-impl-16048.rs
index eaf6acff26b..9c36b231403 100644
--- a/tests/ui/issues/issue-16048.rs
+++ b/tests/ui/traits/lifetime-mismatch-trait-impl-16048.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/16048
+
 trait NoLifetime {
     fn get<'p, T : Test<'p>>(&self) -> T;
     //~^ NOTE lifetimes in impl do not match this method in trait
diff --git a/tests/ui/issues/issue-16048.stderr b/tests/ui/traits/lifetime-mismatch-trait-impl-16048.stderr
index f97f13152bc..08b69184b7f 100644
--- a/tests/ui/issues/issue-16048.stderr
+++ b/tests/ui/traits/lifetime-mismatch-trait-impl-16048.stderr
@@ -1,5 +1,5 @@
 error[E0195]: lifetime parameters or bounds on method `get` do not match the trait declaration
-  --> $DIR/issue-16048.rs:21:11
+  --> $DIR/lifetime-mismatch-trait-impl-16048.rs:23:11
    |
 LL |     fn get<'p, T : Test<'p>>(&self) -> T;
    |           ------------------ lifetimes in impl do not match this method in trait
@@ -8,7 +8,7 @@ LL |     fn get<'p, T: Test<'a> + From<Foo<'a>>>(&self) -> T {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait
 
 error[E0605]: non-primitive cast: `Foo<'a>` as `T`
-  --> $DIR/issue-16048.rs:24:16
+  --> $DIR/lifetime-mismatch-trait-impl-16048.rs:26:16
    |
 LL |         return *self as T;
    |                ^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
diff --git a/tests/ui/traits/next-solver/cycles/rayon-hang-1.rs b/tests/ui/traits/next-solver/cycles/rayon-hang-1.rs
new file mode 100644
index 00000000000..61e1f1b200f
--- /dev/null
+++ b/tests/ui/traits/next-solver/cycles/rayon-hang-1.rs
@@ -0,0 +1,32 @@
+//@ compile-flags: -Znext-solver
+//@ check-pass
+
+// A regression test for trait-system-refactor-initiative#109.
+
+trait ParallelIterator: Sized {
+    type Item;
+}
+trait IntoParallelIterator {
+    type Iter: ParallelIterator<Item = Self::Item>;
+    type Item;
+}
+impl<T: ParallelIterator> IntoParallelIterator for T {
+    type Iter = T;
+    type Item = T::Item;
+}
+
+macro_rules! multizip_impls {
+    ($($T:ident),+) => {
+       fn foo<$( $T, )+>() where
+        $(
+            $T: IntoParallelIterator,
+            $T::Iter: ParallelIterator,
+        )+
+            ($( $T, )+): IntoParallelIterator<Item = ($( $T::Item, )+)>,
+        {}
+    }
+}
+
+multizip_impls! { A, B, C, D, E, F, G, H, I, J, K, L }
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/cycles/rayon-hang-2.rs b/tests/ui/traits/next-solver/cycles/rayon-hang-2.rs
new file mode 100644
index 00000000000..bb5d8335dd6
--- /dev/null
+++ b/tests/ui/traits/next-solver/cycles/rayon-hang-2.rs
@@ -0,0 +1,49 @@
+//@ compile-flags: -Znext-solver
+//@ check-pass
+
+// A regression test for trait-system-refactor-initiative#109.
+// Unlike `rayon-hang-1.rs` the cycles in this test are not
+// unproductive, which causes the `AliasRelate` goal when trying
+// to apply where-clauses to only error in the second iteration.
+//
+// This makes the exponential blowup to be significantly harder
+// to avoid.
+
+trait ParallelIterator: Sized {
+    type Item;
+}
+
+trait IntoParallelIteratorIndir {
+    type Iter: ParallelIterator<Item = Self::Item>;
+    type Item;
+}
+impl<I> IntoParallelIteratorIndir for I
+where
+    Box<I>: IntoParallelIterator,
+{
+    type Iter = <Box<I> as IntoParallelIterator>::Iter;
+    type Item = <Box<I> as IntoParallelIterator>::Item;
+}
+trait IntoParallelIterator {
+    type Iter: ParallelIterator<Item = Self::Item>;
+    type Item;
+}
+impl<T: ParallelIterator> IntoParallelIterator for T {
+    type Iter = T;
+    type Item = T::Item;
+}
+
+macro_rules! multizip_impls {
+    ($($T:ident),+) => {
+       fn foo<'a, $( $T, )+>() where
+        $(
+            $T: IntoParallelIteratorIndir,
+            $T::Iter: ParallelIterator,
+        )+
+        {}
+    }
+}
+
+multizip_impls! { A, B, C, D, E, F, G, H, I, J, K, L }
+
+fn main() {}
diff --git a/tests/ui/traits/safety-inherent-impl.stderr b/tests/ui/traits/safety-inherent-impl.stderr
index 2513fef909e..45cdbe2b523 100644
--- a/tests/ui/traits/safety-inherent-impl.stderr
+++ b/tests/ui/traits/safety-inherent-impl.stderr
@@ -5,6 +5,8 @@ LL | unsafe impl SomeStruct {
    | ------      ^^^^^^^^^^ inherent impl for this type
    | |
    | unsafe because of this
+   |
+   = note: only trait implementations may be annotated with `unsafe`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/syntax-trait-polarity.stderr b/tests/ui/traits/syntax-trait-polarity.stderr
index 1fd40fb6657..8ffcdc7d8b5 100644
--- a/tests/ui/traits/syntax-trait-polarity.stderr
+++ b/tests/ui/traits/syntax-trait-polarity.stderr
@@ -5,15 +5,8 @@ LL | impl !TestType {}
    |      -^^^^^^^^ inherent impl for this type
    |      |
    |      negative because of this
-
-error[E0198]: negative impls cannot be unsafe
-  --> $DIR/syntax-trait-polarity.rs:12:13
    |
-LL | unsafe impl !Send for TestType {}
-   | ------      -^^^^
-   | |           |
-   | |           negative because of this
-   | unsafe because of this
+   = note: only trait implementations may be annotated with `!`
 
 error: inherent impls cannot be negative
   --> $DIR/syntax-trait-polarity.rs:18:10
@@ -22,6 +15,17 @@ LL | impl<T> !TestType2<T> {}
    |         -^^^^^^^^^^^^ inherent impl for this type
    |         |
    |         negative because of this
+   |
+   = note: only trait implementations may be annotated with `!`
+
+error[E0198]: negative impls cannot be unsafe
+  --> $DIR/syntax-trait-polarity.rs:12:13
+   |
+LL | unsafe impl !Send for TestType {}
+   | ------      -^^^^
+   | |           |
+   | |           negative because of this
+   | unsafe because of this
 
 error[E0198]: negative impls cannot be unsafe
   --> $DIR/syntax-trait-polarity.rs:21:16
diff --git a/tests/ui/issues/issue-14853.rs b/tests/ui/traits/trait-bound-mismatch-14853.rs
index 4ce6e3174d0..3f2a1408a13 100644
--- a/tests/ui/issues/issue-14853.rs
+++ b/tests/ui/traits/trait-bound-mismatch-14853.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14853
+
 use std::fmt::Debug;
 
 trait Str {}
diff --git a/tests/ui/issues/issue-14853.stderr b/tests/ui/traits/trait-bound-mismatch-14853.stderr
index 25dd1e3374d..8ee8f51a135 100644
--- a/tests/ui/issues/issue-14853.stderr
+++ b/tests/ui/traits/trait-bound-mismatch-14853.stderr
@@ -1,5 +1,5 @@
 error[E0276]: impl has stricter requirements than trait
-  --> $DIR/issue-14853.rs:12:15
+  --> $DIR/trait-bound-mismatch-14853.rs:14:15
    |
 LL |     fn yay<T: Debug>(_: Option<Self>, thing: &[T]);
    |     ----------------------------------------------- definition of `yay` from trait
diff --git a/tests/ui/issues/issue-20413.rs b/tests/ui/traits/trait-impl-overflow-with-where-clause-20413.rs
index 138a235e675..e8c27ff5cc8 100644
--- a/tests/ui/issues/issue-20413.rs
+++ b/tests/ui/traits/trait-impl-overflow-with-where-clause-20413.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/20413
 trait Foo {
     fn answer(self);
 }
diff --git a/tests/ui/issues/issue-20413.stderr b/tests/ui/traits/trait-impl-overflow-with-where-clause-20413.stderr
index 42f3cd2d062..72aff1b9ee8 100644
--- a/tests/ui/issues/issue-20413.stderr
+++ b/tests/ui/traits/trait-impl-overflow-with-where-clause-20413.stderr
@@ -1,5 +1,5 @@
 error[E0392]: type parameter `T` is never used
-  --> $DIR/issue-20413.rs:5:15
+  --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:6:15
    |
 LL | struct NoData<T>;
    |               ^ unused type parameter
@@ -8,14 +8,14 @@ LL | struct NoData<T>;
    = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead
 
 error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<NoData<NoData<NoData<...>>>>>>>: Foo`
-  --> $DIR/issue-20413.rs:8:36
+  --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:9:36
    |
 LL | impl<T> Foo for T where NoData<T>: Foo {
    |                                    ^^^
    |
-   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
+   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`trait_impl_overflow_with_where_clause_20413`)
 note: required for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Foo`
-  --> $DIR/issue-20413.rs:8:9
+  --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:9:9
    |
 LL | impl<T> Foo for T where NoData<T>: Foo {
    |         ^^^     ^                  --- unsatisfied trait bound introduced here
@@ -23,19 +23,19 @@ LL | impl<T> Foo for T where NoData<T>: Foo {
    = note: required for `NoData<T>` to implement `Foo`
 
 error[E0275]: overflow evaluating the requirement `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>: Bar`
-  --> $DIR/issue-20413.rs:27:42
+  --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:28:42
    |
 LL | impl<T> Bar for T where EvenLessData<T>: Baz {
    |                                          ^^^
    |
-   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
+   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`trait_impl_overflow_with_where_clause_20413`)
 note: required for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Baz`
-  --> $DIR/issue-20413.rs:34:9
+  --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:35:9
    |
 LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
    |         ^^^     ^                        --- unsatisfied trait bound introduced here
 note: required for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Bar`
-  --> $DIR/issue-20413.rs:27:9
+  --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:28:9
    |
 LL | impl<T> Bar for T where EvenLessData<T>: Baz {
    |         ^^^     ^                        --- unsatisfied trait bound introduced here
@@ -43,19 +43,19 @@ LL | impl<T> Bar for T where EvenLessData<T>: Baz {
    = note: required for `EvenLessData<T>` to implement `Baz`
 
 error[E0275]: overflow evaluating the requirement `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>: Baz`
-  --> $DIR/issue-20413.rs:34:42
+  --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:35:42
    |
 LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
    |                                          ^^^
    |
-   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
+   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`trait_impl_overflow_with_where_clause_20413`)
 note: required for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Bar`
-  --> $DIR/issue-20413.rs:27:9
+  --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:28:9
    |
 LL | impl<T> Bar for T where EvenLessData<T>: Baz {
    |         ^^^     ^                        --- unsatisfied trait bound introduced here
 note: required for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `Baz`
-  --> $DIR/issue-20413.rs:34:9
+  --> $DIR/trait-impl-overflow-with-where-clause-20413.rs:35:9
    |
 LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
    |         ^^^     ^                        --- unsatisfied trait bound introduced here
diff --git a/tests/ui/traits/well-formed-recursion-limit.stderr b/tests/ui/traits/well-formed-recursion-limit.stderr
index e0270ecabbd..a4c85c4fcbd 100644
--- a/tests/ui/traits/well-formed-recursion-limit.stderr
+++ b/tests/ui/traits/well-formed-recursion-limit.stderr
@@ -3,12 +3,16 @@ error[E0609]: no field `ab` on type `(Box<(dyn Fn(Option<A>) -> Option<B> + 'sta
    |
 LL |     let (ab, ba) = (i.ab, i.ba);
    |                       ^^ unknown field
+   |
+   = note: available fields are: `0`, `1`
 
 error[E0609]: no field `ba` on type `(Box<(dyn Fn(Option<A>) -> Option<B> + 'static)>, Box<(dyn Fn(Option<B>) -> Option<A> + 'static)>)`
   --> $DIR/well-formed-recursion-limit.rs:12:29
    |
 LL |     let (ab, ba) = (i.ab, i.ba);
    |                             ^^ unknown field
+   |
+   = note: available fields are: `0`, `1`
 
 error[E0275]: overflow assigning `_` to `Option<_>`
   --> $DIR/well-formed-recursion-limit.rs:15:33
diff --git a/tests/ui/treat-err-as-bug/err.rs b/tests/ui/treat-err-as-bug/err.rs
index 6f0e3c55fbb..f297a5773cb 100644
--- a/tests/ui/treat-err-as-bug/err.rs
+++ b/tests/ui/treat-err-as-bug/err.rs
@@ -1,7 +1,7 @@
 //@ compile-flags: -Ztreat-err-as-bug
 //@ failure-status: 101
 //@ normalize-stderr: "note: .*\n\n" -> ""
-//@ normalize-stderr: "thread 'rustc' panicked.*:\n.*\n" -> ""
+//@ normalize-stderr: "thread 'rustc'.*panicked.*:\n.*\n" -> ""
 //@ rustc-env:RUST_BACKTRACE=0
 
 #![crate_type = "rlib"]
diff --git a/tests/ui/treat-err-as-bug/span_delayed_bug.rs b/tests/ui/treat-err-as-bug/span_delayed_bug.rs
index 4681a8fc1ee..ff5a595899a 100644
--- a/tests/ui/treat-err-as-bug/span_delayed_bug.rs
+++ b/tests/ui/treat-err-as-bug/span_delayed_bug.rs
@@ -1,7 +1,7 @@
 //@ compile-flags: -Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs
 //@ failure-status: 101
 //@ normalize-stderr: "note: .*\n\n" -> ""
-//@ normalize-stderr: "thread 'rustc' panicked.*:\n.*\n" -> ""
+//@ normalize-stderr: "thread 'rustc'.*panicked.*:\n.*\n" -> ""
 //@ rustc-env:RUST_BACKTRACE=0
 
 #![feature(rustc_attrs)]
diff --git a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.rs b/tests/ui/try-trait/incompatible-types-with-question-mark-51632.rs
index 35402dff675..4b2081d14d0 100644
--- a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.rs
+++ b/tests/ui/try-trait/incompatible-types-with-question-mark-51632.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/51632
 #![allow(dead_code)]
 
 fn missing_discourses() -> Result<isize, ()> {
diff --git a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr b/tests/ui/try-trait/incompatible-types-with-question-mark-51632.stderr
index 99fce1eeea6..c624605d76a 100644
--- a/tests/ui/issues/issue-51632-try-desugar-incompatible-types.stderr
+++ b/tests/ui/try-trait/incompatible-types-with-question-mark-51632.stderr
@@ -1,5 +1,5 @@
 error[E0308]: `?` operator has incompatible types
-  --> $DIR/issue-51632-try-desugar-incompatible-types.rs:8:5
+  --> $DIR/incompatible-types-with-question-mark-51632.rs:9:5
    |
 LL | fn forbidden_narratives() -> Result<isize, ()> {
    |                              ----------------- expected `Result<isize, ()>` because of return type
diff --git a/tests/ui/tuple/index-invalid.stderr b/tests/ui/tuple/index-invalid.stderr
index ae2c275f52c..fee09b7947c 100644
--- a/tests/ui/tuple/index-invalid.stderr
+++ b/tests/ui/tuple/index-invalid.stderr
@@ -3,18 +3,24 @@ error[E0609]: no field `1` on type `(((),),)`
    |
 LL |     let _ = (((),),).1.0;
    |                      ^ unknown field
+   |
+   = note: available field is: `0`
 
 error[E0609]: no field `1` on type `((),)`
   --> $DIR/index-invalid.rs:4:24
    |
 LL |     let _ = (((),),).0.1;
    |                        ^ unknown field
+   |
+   = note: available field is: `0`
 
 error[E0609]: no field `000` on type `(((),),)`
   --> $DIR/index-invalid.rs:6:22
    |
 LL |     let _ = (((),),).000.000;
    |                      ^^^ unknown field
+   |
+   = note: available field is: `0`
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/tuple/missing-field-access.rs b/tests/ui/tuple/missing-field-access.rs
new file mode 100644
index 00000000000..b94b7cf977c
--- /dev/null
+++ b/tests/ui/tuple/missing-field-access.rs
@@ -0,0 +1,16 @@
+// Ensure that suggestions to search for missing intermediary field accesses are available for both
+// tuple structs *and* regular tuples.
+// Ensure that we do not suggest pinning the expression just because `Pin::get_ref` exists.
+// https://github.com/rust-lang/rust/issues/144602
+use std::{fs::File, io::BufReader};
+
+struct F(BufReader<File>);
+
+fn main() {
+    let f = F(BufReader::new(File::open("x").unwrap()));
+    let x = f.get_ref(); //~ ERROR E0599
+    //~^ HELP one of the expressions' fields has a method of the same name
+    let f = (BufReader::new(File::open("x").unwrap()), );
+    let x = f.get_ref(); //~ ERROR E0599
+    //~^ HELP one of the expressions' fields has a method of the same name
+}
diff --git a/tests/ui/tuple/missing-field-access.stderr b/tests/ui/tuple/missing-field-access.stderr
new file mode 100644
index 00000000000..fd9f01f8ff6
--- /dev/null
+++ b/tests/ui/tuple/missing-field-access.stderr
@@ -0,0 +1,28 @@
+error[E0599]: no method named `get_ref` found for struct `F` in the current scope
+  --> $DIR/missing-field-access.rs:11:15
+   |
+LL | struct F(BufReader<File>);
+   | -------- method `get_ref` not found for this struct
+...
+LL |     let x = f.get_ref();
+   |               ^^^^^^^ method not found in `F`
+   |
+help: one of the expressions' fields has a method of the same name
+   |
+LL |     let x = f.0.get_ref();
+   |               ++
+
+error[E0599]: no method named `get_ref` found for tuple `(BufReader<File>,)` in the current scope
+  --> $DIR/missing-field-access.rs:14:15
+   |
+LL |     let x = f.get_ref();
+   |               ^^^^^^^ method not found in `(BufReader<File>,)`
+   |
+help: one of the expressions' fields has a method of the same name
+   |
+LL |     let x = f.0.get_ref();
+   |               ++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/tuple/tuple-index-out-of-bounds.stderr b/tests/ui/tuple/tuple-index-out-of-bounds.stderr
index 8b3c835c3e3..2be9d5631f7 100644
--- a/tests/ui/tuple/tuple-index-out-of-bounds.stderr
+++ b/tests/ui/tuple/tuple-index-out-of-bounds.stderr
@@ -4,17 +4,15 @@ error[E0609]: no field `2` on type `Point`
 LL |     origin.2;
    |            ^ unknown field
    |
-help: a field with a similar name exists
-   |
-LL -     origin.2;
-LL +     origin.0;
-   |
+   = note: available fields are: `0`, `1`
 
 error[E0609]: no field `2` on type `({integer}, {integer})`
   --> $DIR/tuple-index-out-of-bounds.rs:12:11
    |
 LL |     tuple.2;
    |           ^ unknown field
+   |
+   = note: available fields are: `0`, `1`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/type-alias-impl-trait/hkl_forbidden.rs b/tests/ui/type-alias-impl-trait/hkl_forbidden.rs
index 994adc476e2..72da2af96b8 100644
--- a/tests/ui/type-alias-impl-trait/hkl_forbidden.rs
+++ b/tests/ui/type-alias-impl-trait/hkl_forbidden.rs
@@ -8,7 +8,9 @@ type Opaque<'a> = impl Sized + 'a;
 
 #[define_opaque(Opaque)]
 fn test(s: &str) -> (impl Fn(&str) -> Opaque<'_>, impl Fn(&str) -> Opaque<'_>) {
-    (id, id) //~ ERROR expected generic lifetime parameter, found `'_`
+    (id, id)
+    //~^ ERROR expected generic lifetime parameter, found `'_`
+    //~| ERROR expected generic lifetime parameter, found `'_`
 }
 
 fn id2<'a, 'b>(s: (&'a str, &'b str)) -> (&'a str, &'b str) {
@@ -19,7 +21,9 @@ type Opaque2<'a> = impl Sized + 'a;
 
 #[define_opaque(Opaque2)]
 fn test2() -> impl for<'a, 'b> Fn((&'a str, &'b str)) -> (Opaque2<'a>, Opaque2<'b>) {
-    id2 //~ ERROR expected generic lifetime parameter, found `'a`
+    id2
+    //~^ ERROR expected generic lifetime parameter, found `'a`
+    //~| ERROR expected generic lifetime parameter, found `'b`
 }
 
 type Opaque3<'a> = impl Sized + 'a;
diff --git a/tests/ui/type-alias-impl-trait/hkl_forbidden.stderr b/tests/ui/type-alias-impl-trait/hkl_forbidden.stderr
index d404d60f31e..315bdfb2272 100644
--- a/tests/ui/type-alias-impl-trait/hkl_forbidden.stderr
+++ b/tests/ui/type-alias-impl-trait/hkl_forbidden.stderr
@@ -7,8 +7,28 @@ LL | type Opaque<'a> = impl Sized + 'a;
 LL |     (id, id)
    |     ^^^^^^^^
 
+error[E0792]: expected generic lifetime parameter, found `'_`
+  --> $DIR/hkl_forbidden.rs:11:5
+   |
+LL | type Opaque<'a> = impl Sized + 'a;
+   |             -- this generic parameter must be used with a generic lifetime parameter
+...
+LL |     (id, id)
+   |     ^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
 error[E0792]: expected generic lifetime parameter, found `'a`
-  --> $DIR/hkl_forbidden.rs:22:5
+  --> $DIR/hkl_forbidden.rs:24:5
+   |
+LL | type Opaque2<'a> = impl Sized + 'a;
+   |              -- this generic parameter must be used with a generic lifetime parameter
+...
+LL |     id2
+   |     ^^^
+
+error[E0792]: expected generic lifetime parameter, found `'b`
+  --> $DIR/hkl_forbidden.rs:24:5
    |
 LL | type Opaque2<'a> = impl Sized + 'a;
    |              -- this generic parameter must be used with a generic lifetime parameter
@@ -17,7 +37,7 @@ LL |     id2
    |     ^^^
 
 error[E0792]: expected generic lifetime parameter, found `'_`
-  --> $DIR/hkl_forbidden.rs:29:5
+  --> $DIR/hkl_forbidden.rs:33:5
    |
 LL | type Opaque3<'a> = impl Sized + 'a;
    |              -- this generic parameter must be used with a generic lifetime parameter
@@ -26,7 +46,7 @@ LL |     (id, s)
    |     ^^^^^^^
 
 error[E0792]: expected generic lifetime parameter, found `'_`
-  --> $DIR/hkl_forbidden.rs:35:5
+  --> $DIR/hkl_forbidden.rs:39:5
    |
 LL | type Opaque4<'a> = impl Sized + 'a;
    |              -- this generic parameter must be used with a generic lifetime parameter
@@ -35,7 +55,7 @@ LL |     (s, id)
    |     ^^^^^^^
 
 error[E0792]: expected generic lifetime parameter, found `'a`
-  --> $DIR/hkl_forbidden.rs:41:5
+  --> $DIR/hkl_forbidden.rs:45:5
    |
 LL | type Inner<'a> = impl Sized;
    |            -- this generic parameter must be used with a generic lifetime parameter
@@ -43,6 +63,6 @@ LL | type Inner<'a> = impl Sized;
 LL |     |x| x
    |     ^^^^^
 
-error: aborting due to 5 previous errors
+error: aborting due to 7 previous errors
 
 For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/type-alias-impl-trait/param_mismatch2.rs b/tests/ui/type-alias-impl-trait/param_mismatch2.rs
index f6a99711411..94c495cb330 100644
--- a/tests/ui/type-alias-impl-trait/param_mismatch2.rs
+++ b/tests/ui/type-alias-impl-trait/param_mismatch2.rs
@@ -11,7 +11,9 @@ type Opaque<'a> = impl Sized + 'a;
 
 #[define_opaque(Opaque)]
 fn test(s: &str) -> (impl Fn(&str) -> Opaque<'_>, impl Fn(&str) -> Opaque<'_>) {
-    (id, id) //~ ERROR: expected generic lifetime parameter, found `'_`
+    (id, id)
+    //~^ ERROR: expected generic lifetime parameter, found `'_`
+    //~| ERROR: expected generic lifetime parameter, found `'_`
 }
 
 fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/param_mismatch2.stderr b/tests/ui/type-alias-impl-trait/param_mismatch2.stderr
index f5ecade2f02..5c8a8af6501 100644
--- a/tests/ui/type-alias-impl-trait/param_mismatch2.stderr
+++ b/tests/ui/type-alias-impl-trait/param_mismatch2.stderr
@@ -7,6 +7,17 @@ LL | type Opaque<'a> = impl Sized + 'a;
 LL |     (id, id)
    |     ^^^^^^^^
 
-error: aborting due to 1 previous error
+error[E0792]: expected generic lifetime parameter, found `'_`
+  --> $DIR/param_mismatch2.rs:14:5
+   |
+LL | type Opaque<'a> = impl Sized + 'a;
+   |             -- this generic parameter must be used with a generic lifetime parameter
+...
+LL |     (id, id)
+   |     ^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/type-alias-impl-trait/param_mismatch3.rs b/tests/ui/type-alias-impl-trait/param_mismatch3.rs
index 17b6f8bce2a..1514dd66db9 100644
--- a/tests/ui/type-alias-impl-trait/param_mismatch3.rs
+++ b/tests/ui/type-alias-impl-trait/param_mismatch3.rs
@@ -11,7 +11,9 @@ type Opaque<'a> = impl Sized + 'a;
 
 #[define_opaque(Opaque)]
 fn test() -> impl for<'a, 'b> Fn((&'a str, &'b str)) -> (Opaque<'a>, Opaque<'b>) {
-    id2 //~ ERROR expected generic lifetime parameter, found `'a`
+    id2
+    //~^ ERROR expected generic lifetime parameter, found `'a`
+    //~| ERROR expected generic lifetime parameter, found `'b`
 }
 
 fn id(s: &str) -> &str {
diff --git a/tests/ui/type-alias-impl-trait/param_mismatch3.stderr b/tests/ui/type-alias-impl-trait/param_mismatch3.stderr
index 7565bbfc6ff..76be07ce38f 100644
--- a/tests/ui/type-alias-impl-trait/param_mismatch3.stderr
+++ b/tests/ui/type-alias-impl-trait/param_mismatch3.stderr
@@ -7,8 +7,17 @@ LL | type Opaque<'a> = impl Sized + 'a;
 LL |     id2
    |     ^^^
 
+error[E0792]: expected generic lifetime parameter, found `'b`
+  --> $DIR/param_mismatch3.rs:14:5
+   |
+LL | type Opaque<'a> = impl Sized + 'a;
+   |             -- this generic parameter must be used with a generic lifetime parameter
+...
+LL |     id2
+   |     ^^^
+
 error[E0792]: expected generic lifetime parameter, found `'_`
-  --> $DIR/param_mismatch3.rs:25:5
+  --> $DIR/param_mismatch3.rs:27:5
    |
 LL | type Opaque2<'a> = impl Sized + 'a;
    |              -- this generic parameter must be used with a generic lifetime parameter
@@ -16,6 +25,6 @@ LL | type Opaque2<'a> = impl Sized + 'a;
 LL |     (id, s)
    |     ^^^^^^^
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/issues/issue-22434.rs b/tests/ui/type-alias/missing-associated-type-in-trait-object-22434.rs
index d9f7b987c64..35b30374c15 100644
--- a/tests/ui/issues/issue-22434.rs
+++ b/tests/ui/type-alias/missing-associated-type-in-trait-object-22434.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/22434
 pub trait Foo {
     type A;
 }
diff --git a/tests/ui/issues/issue-22434.stderr b/tests/ui/type-alias/missing-associated-type-in-trait-object-22434.stderr
index 172ae386c3e..73afefa5a1f 100644
--- a/tests/ui/issues/issue-22434.stderr
+++ b/tests/ui/type-alias/missing-associated-type-in-trait-object-22434.stderr
@@ -1,5 +1,5 @@
 error[E0191]: the value of the associated type `A` in `Foo` must be specified
-  --> $DIR/issue-22434.rs:5:23
+  --> $DIR/missing-associated-type-in-trait-object-22434.rs:6:23
    |
 LL |     type A;
    |     ------ `A` defined here
diff --git a/tests/ui/type-inference/float-type-inference-unification-14382.rs b/tests/ui/type-inference/float-type-inference-unification-14382.rs
index 5bf497d2eab..a78dbe9d09c 100644
--- a/tests/ui/type-inference/float-type-inference-unification-14382.rs
+++ b/tests/ui/type-inference/float-type-inference-unification-14382.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14382
+
 //@ run-pass
 #[derive(Debug)]
 struct Matrix4<S>(#[allow(dead_code)] S);
@@ -13,5 +15,3 @@ fn main() {
     let m : Matrix4<f32> = translate(x);
     println!("m: {:?}", m);
 }
-
-// https://github.com/rust-lang/rust/issues/14382
diff --git a/tests/ui/type-inference/partial-type-hint-12909.rs b/tests/ui/type-inference/partial-type-hint-12909.rs
new file mode 100644
index 00000000000..d7017f451e3
--- /dev/null
+++ b/tests/ui/type-inference/partial-type-hint-12909.rs
@@ -0,0 +1,21 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/12909
+
+//@ run-pass
+#![allow(unused_variables)]
+
+use std::collections::HashMap;
+
+fn copy<T: Copy>(&x: &T) -> T {
+    x
+}
+
+fn main() {
+    let arr = [(1, 1), (2, 2), (3, 3)];
+
+    let v1: Vec<&_> = arr.iter().collect();
+    let v2: Vec<_> = arr.iter().map(copy).collect();
+
+    let m1: HashMap<_, _> = arr.iter().map(copy).collect();
+    let m2: HashMap<isize, _> = arr.iter().map(copy).collect();
+    let m3: HashMap<_, usize> = arr.iter().map(copy).collect();
+}
diff --git a/tests/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.stderr b/tests/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.stderr
index bf8829c0925..e8bbdaaacbf 100644
--- a/tests/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.stderr
+++ b/tests/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.stderr
@@ -13,7 +13,7 @@ error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0282`.
 Future incompatibility report: Future breakage diagnostic:
-warning: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+warning: defaults for generic parameters are not allowed here
   --> $DIR/unbounded-type-param-in-fn-with-assoc-type.rs:3:11
    |
 LL | fn foo<T, U = u64>() -> (T, U) {
diff --git a/tests/ui/type/default_type_parameter_in_fn_or_impl.rs b/tests/ui/type/default_type_parameter_in_fn_or_impl.rs
deleted file mode 100644
index 33038e24bc6..00000000000
--- a/tests/ui/type/default_type_parameter_in_fn_or_impl.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-#![allow(unused)]
-
-fn avg<T=i32>(_: T) {}
-//~^ ERROR defaults for type parameters are only allowed
-//~| WARN this was previously accepted
-
-struct S<T>(T);
-impl<T=i32> S<T> {}
-//~^ ERROR defaults for type parameters are only allowed
-//~| WARN this was previously accepted
-
-fn main() {}
diff --git a/tests/ui/type/default_type_parameter_in_fn_or_impl.stderr b/tests/ui/type/default_type_parameter_in_fn_or_impl.stderr
deleted file mode 100644
index a3205cd3c29..00000000000
--- a/tests/ui/type/default_type_parameter_in_fn_or_impl.stderr
+++ /dev/null
@@ -1,43 +0,0 @@
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/default_type_parameter_in_fn_or_impl.rs:3:8
-   |
-LL | fn avg<T=i32>(_: T) {}
-   |        ^^^^^
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
-   = note: `#[deny(invalid_type_param_default)]` on by default
-
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/default_type_parameter_in_fn_or_impl.rs:8:6
-   |
-LL | impl<T=i32> S<T> {}
-   |      ^^^^^
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
-
-error: aborting due to 2 previous errors
-
-Future incompatibility report: Future breakage diagnostic:
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/default_type_parameter_in_fn_or_impl.rs:3:8
-   |
-LL | fn avg<T=i32>(_: T) {}
-   |        ^^^^^
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
-   = note: `#[deny(invalid_type_param_default)]` on by default
-
-Future breakage diagnostic:
-error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/default_type_parameter_in_fn_or_impl.rs:8:6
-   |
-LL | impl<T=i32> S<T> {}
-   |      ^^^^^
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
-   = note: `#[deny(invalid_type_param_default)]` on by default
-
diff --git a/tests/ui/type/pattern_types/bad_const_generics_args_on_const_param.rs b/tests/ui/type/pattern_types/bad_const_generics_args_on_const_param.rs
index c28fda6f91a..ff99ac98926 100644
--- a/tests/ui/type/pattern_types/bad_const_generics_args_on_const_param.rs
+++ b/tests/ui/type/pattern_types/bad_const_generics_args_on_const_param.rs
@@ -1,7 +1,7 @@
 //@known-bug: #127972
 //@ failure-status: 101
 //@ normalize-stderr: "note: .*\n\n" -> ""
-//@ normalize-stderr: "thread 'rustc' panicked.*\n" -> ""
+//@ normalize-stderr: "thread 'rustc'.*panicked.*\n" -> ""
 //@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
 //@ rustc-env:RUST_BACKTRACE=0
 
diff --git a/tests/ui/type/type-name-basic.rs b/tests/ui/type/type-name-basic.rs
index 9381cb82578..6a9f772e542 100644
--- a/tests/ui/type/type-name-basic.rs
+++ b/tests/ui/type/type-name-basic.rs
@@ -6,12 +6,85 @@
 #![allow(dead_code)]
 
 use std::any::type_name;
+use std::borrow::Cow;
 
-struct Foo<T> {
-    x: T,
+struct Foo<T>(T);
+
+struct Bar<'a>(&'a u32);
+
+struct Baz<'a, T>(&'a T);
+
+trait TrL<'a> {}
+trait TrLA<'a> {
+    type A;
+}
+trait TrLT<'a, T> {}
+trait TrLTA<'a, T> {
+    type A;
+}
+
+macro_rules! t {
+    ($ty:ty, $str:literal) => {
+        assert_eq!(type_name::<$ty>(), $str);
+    }
 }
 
 pub fn main() {
-    assert_eq!(type_name::<isize>(), "isize");
-    assert_eq!(type_name::<Foo<usize>>(), "type_name_basic::Foo<usize>");
+    t!(bool, "bool");
+    t!(char, "char");
+
+    t!(u8, "u8");
+    t!(u16, "u16");
+    t!(u32, "u32");
+    t!(u64, "u64");
+    t!(u128, "u128");
+    t!(usize, "usize");
+
+    t!(i8, "i8");
+    t!(i16, "i16");
+    t!(i32, "i32");
+    t!(i64, "i64");
+    t!(i128, "i128");
+    t!(isize, "isize");
+
+    t!(String, "alloc::string::String");
+    t!(str, "str");
+    t!(&str, "&str");
+    t!(&'static str, "&str");
+
+    t!((u16, u32, u64), "(u16, u32, u64)");
+    t!([usize; 4], "[usize; 4]");
+    t!([usize], "[usize]");
+    t!(&[usize], "&[usize]");
+
+    t!(*const bool, "*const bool");
+    t!(*mut u64, "*mut u64");
+
+    t!(Vec<Vec<u32>>, "alloc::vec::Vec<alloc::vec::Vec<u32>>");
+    t!(Foo<usize>, "type_name_basic::Foo<usize>");
+    t!(Bar<'static>, "type_name_basic::Bar");
+    t!(Baz<'static, u32>, "type_name_basic::Baz<u32>");
+
+    // FIXME: lifetime omission means these all print badly.
+    t!(dyn TrL<'static>, "dyn type_name_basic::TrL<>");
+    t!(dyn TrLA<'static, A = u32>, "dyn type_name_basic::TrLA<, A = u32>");
+    t!(
+        dyn TrLT<'static, Cow<'static, ()>>,
+        "dyn type_name_basic::TrLT<, alloc::borrow::Cow<()>>"
+    );
+    t!(
+        dyn TrLTA<'static, u32, A = Cow<'static, ()>>,
+        "dyn type_name_basic::TrLTA<, u32, A = alloc::borrow::Cow<()>>"
+    );
+
+    t!(fn(i32) -> i32, "fn(i32) -> i32");
+    t!(dyn for<'a> Fn(&'a u32), "dyn core::ops::function::Fn(&u32)");
+
+    struct S<'a, T>(&'a T);
+    impl<'a, T: Clone> S<'a, T> {
+        fn test() {
+            t!(Cow<'a, T>, "alloc::borrow::Cow<u32>");
+        }
+    }
+    S::<u32>::test();
 }
diff --git a/tests/ui/issues/issue-12863.rs b/tests/ui/typeck/function-in-pattern-error-12863.rs
index 1ac1c3d818e..d2fa2555658 100644
--- a/tests/ui/issues/issue-12863.rs
+++ b/tests/ui/typeck/function-in-pattern-error-12863.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/12863
+
 mod foo { pub fn bar() {} }
 
 fn main() {
diff --git a/tests/ui/issues/issue-12863.stderr b/tests/ui/typeck/function-in-pattern-error-12863.stderr
index 95d4a704e72..f28874b5d48 100644
--- a/tests/ui/issues/issue-12863.stderr
+++ b/tests/ui/typeck/function-in-pattern-error-12863.stderr
@@ -1,5 +1,5 @@
 error[E0532]: expected unit struct, unit variant or constant, found function `foo::bar`
-  --> $DIR/issue-12863.rs:5:9
+  --> $DIR/function-in-pattern-error-12863.rs:7:9
    |
 LL |         foo::bar => {}
    |         ^^^^^^^^ not a unit struct, unit variant or constant
diff --git a/tests/ui/issues/issue-48276.rs b/tests/ui/typeck/incorrect-self-type-in-trait-impl-48276.rs
index f55c056fa67..1cff2078755 100644
--- a/tests/ui/issues/issue-48276.rs
+++ b/tests/ui/typeck/incorrect-self-type-in-trait-impl-48276.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/48276
 // Regression test for issue #48276 - ICE when self type does not match what is
 // required by a trait and regions are involved.
 
diff --git a/tests/ui/issues/issue-48276.stderr b/tests/ui/typeck/incorrect-self-type-in-trait-impl-48276.stderr
index 370905ee0df..124dc459237 100644
--- a/tests/ui/issues/issue-48276.stderr
+++ b/tests/ui/typeck/incorrect-self-type-in-trait-impl-48276.stderr
@@ -1,5 +1,5 @@
 error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
-  --> $DIR/issue-48276.rs:11:5
+  --> $DIR/incorrect-self-type-in-trait-impl-48276.rs:12:5
    |
 LL |     fn from(a: A) -> Self;
    |     ---------------------- trait method declared without `&self`
@@ -8,7 +8,7 @@ LL |     fn from(self: &'a Self) -> &'b str {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl
 
 error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
-  --> $DIR/issue-48276.rs:20:5
+  --> $DIR/incorrect-self-type-in-trait-impl-48276.rs:21:5
    |
 LL |     fn from(&self) -> B {
    |     ^^^^^^^^^^^^^^^^^^^ `&self` used in impl
@@ -16,7 +16,7 @@ LL |     fn from(&self) -> B {
    = note: `from` from trait: `fn(T) -> Self`
 
 error[E0185]: method `from` has a `&self` declaration in the impl, but not in the trait
-  --> $DIR/issue-48276.rs:27:5
+  --> $DIR/incorrect-self-type-in-trait-impl-48276.rs:28:5
    |
 LL |     fn from(&self) -> &'static str {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl
diff --git a/tests/ui/issues/issue-13359.rs b/tests/ui/typeck/isize-usize-mismatch-error.rs
index 5d31d7f861c..2fb5cf489c0 100644
--- a/tests/ui/issues/issue-13359.rs
+++ b/tests/ui/typeck/isize-usize-mismatch-error.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13359
+
 //@ dont-require-annotations: NOTE
 
 fn foo(_s: i16) { }
diff --git a/tests/ui/issues/issue-13359.stderr b/tests/ui/typeck/isize-usize-mismatch-error.stderr
index 91f5de8e8f3..d5724665a03 100644
--- a/tests/ui/issues/issue-13359.stderr
+++ b/tests/ui/typeck/isize-usize-mismatch-error.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-13359.rs:8:9
+  --> $DIR/isize-usize-mismatch-error.rs:10:9
    |
 LL |     foo(1*(1 as isize));
    |     --- ^^^^^^^^^^^^^^ expected `i16`, found `isize`
@@ -7,7 +7,7 @@ LL |     foo(1*(1 as isize));
    |     arguments to this function are incorrect
    |
 note: function defined here
-  --> $DIR/issue-13359.rs:3:4
+  --> $DIR/isize-usize-mismatch-error.rs:5:4
    |
 LL | fn foo(_s: i16) { }
    |    ^^^ -------
@@ -17,7 +17,7 @@ LL |     foo((1*(1 as isize)).try_into().unwrap());
    |         +              +++++++++++++++++++++
 
 error[E0308]: mismatched types
-  --> $DIR/issue-13359.rs:12:9
+  --> $DIR/isize-usize-mismatch-error.rs:14:9
    |
 LL |     bar(1*(1 as usize));
    |     --- ^^^^^^^^^^^^^^ expected `u32`, found `usize`
@@ -25,7 +25,7 @@ LL |     bar(1*(1 as usize));
    |     arguments to this function are incorrect
    |
 note: function defined here
-  --> $DIR/issue-13359.rs:5:4
+  --> $DIR/isize-usize-mismatch-error.rs:7:4
    |
 LL | fn bar(_s: u32) { }
    |    ^^^ -------
diff --git a/tests/ui/issues/issue-32995-2.rs b/tests/ui/typeck/parenthesized-type-parameters-error-32995.rs
index e713a64d3f5..e0c2ab5f303 100644
--- a/tests/ui/issues/issue-32995-2.rs
+++ b/tests/ui/typeck/parenthesized-type-parameters-error-32995.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/32995
 fn main() {
     { fn f<X: ::std::marker()::Send>() {} }
     //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
diff --git a/tests/ui/issues/issue-32995-2.stderr b/tests/ui/typeck/parenthesized-type-parameters-error-32995.stderr
index 6c2d772a233..590cdcdb43b 100644
--- a/tests/ui/issues/issue-32995-2.stderr
+++ b/tests/ui/typeck/parenthesized-type-parameters-error-32995.stderr
@@ -1,17 +1,17 @@
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/issue-32995-2.rs:2:22
+  --> $DIR/parenthesized-type-parameters-error-32995.rs:3:22
    |
 LL |     { fn f<X: ::std::marker()::Send>() {} }
    |                      ^^^^^^^^ only `Fn` traits may use parentheses
 
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/issue-32995-2.rs:5:29
+  --> $DIR/parenthesized-type-parameters-error-32995.rs:6:29
    |
 LL |     { fn f() -> impl ::std::marker()::Send { } }
    |                             ^^^^^^^^ only `Fn` traits may use parentheses
 
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/issue-32995-2.rs:12:13
+  --> $DIR/parenthesized-type-parameters-error-32995.rs:13:13
    |
 LL | impl ::std::marker()::Copy for X {}
    |             ^^^^^^^^ only `Fn` traits may use parentheses
diff --git a/tests/ui/issues/issue-14721.rs b/tests/ui/typeck/str-no-field-desc-14721.rs
index c015a6bab08..605807ac04f 100644
--- a/tests/ui/issues/issue-14721.rs
+++ b/tests/ui/typeck/str-no-field-desc-14721.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/14721
+
 fn main() {
     let foo = "str";
     println!("{}", foo.desc); //~ ERROR no field `desc` on type `&str`
diff --git a/tests/ui/issues/issue-14721.stderr b/tests/ui/typeck/str-no-field-desc-14721.stderr
index c71b0363eef..fc1ec7179d7 100644
--- a/tests/ui/issues/issue-14721.stderr
+++ b/tests/ui/typeck/str-no-field-desc-14721.stderr
@@ -1,5 +1,5 @@
 error[E0609]: no field `desc` on type `&str`
-  --> $DIR/issue-14721.rs:3:24
+  --> $DIR/str-no-field-desc-14721.rs:5:24
    |
 LL |     println!("{}", foo.desc);
    |                        ^^^^ unknown field
diff --git a/tests/ui/issues/issue-11771.rs b/tests/ui/typeck/unit-type-add-error-11771.rs
index c69cd1e79e3..d009f50f4b9 100644
--- a/tests/ui/issues/issue-11771.rs
+++ b/tests/ui/typeck/unit-type-add-error-11771.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/11771
+
 fn main() {
     let x = ();
     1 +
diff --git a/tests/ui/issues/issue-11771.stderr b/tests/ui/typeck/unit-type-add-error-11771.stderr
index 5603dc18b63..155cc093524 100644
--- a/tests/ui/issues/issue-11771.stderr
+++ b/tests/ui/typeck/unit-type-add-error-11771.stderr
@@ -1,5 +1,5 @@
 error[E0277]: cannot add `()` to `{integer}`
-  --> $DIR/issue-11771.rs:3:7
+  --> $DIR/unit-type-add-error-11771.rs:5:7
    |
 LL |     1 +
    |       ^ no implementation for `{integer} + ()`
@@ -17,7 +17,7 @@ LL |     1 +
            and 56 others
 
 error[E0277]: cannot add `()` to `{integer}`
-  --> $DIR/issue-11771.rs:8:7
+  --> $DIR/unit-type-add-error-11771.rs:10:7
    |
 LL |     1 +
    |       ^ no implementation for `{integer} + ()`
diff --git a/tests/ui/issues/issue-30236.rs b/tests/ui/typeck/unused-type-parameter-span-30236.rs
index 08d08a54402..bcdc922a71b 100644
--- a/tests/ui/issues/issue-30236.rs
+++ b/tests/ui/typeck/unused-type-parameter-span-30236.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/30236
 type Foo<
     Unused //~ ERROR type parameter `Unused` is never used
     > = u8;
diff --git a/tests/ui/issues/issue-30236.stderr b/tests/ui/typeck/unused-type-parameter-span-30236.stderr
index bfe374a653f..038bd1ebd28 100644
--- a/tests/ui/issues/issue-30236.stderr
+++ b/tests/ui/typeck/unused-type-parameter-span-30236.stderr
@@ -1,5 +1,5 @@
 error[E0091]: type parameter `Unused` is never used
-  --> $DIR/issue-30236.rs:2:5
+  --> $DIR/unused-type-parameter-span-30236.rs:3:5
    |
 LL |     Unused
    |     ^^^^^^ unused type parameter
diff --git a/tests/ui/issues/issue-13202.rs b/tests/ui/typeck/unwrap-or-panic-input-13202.rs
index 99ffba3fba5..29833a727c5 100644
--- a/tests/ui/issues/issue-13202.rs
+++ b/tests/ui/typeck/unwrap-or-panic-input-13202.rs
@@ -1,3 +1,5 @@
+//! Regression test for https://github.com/rust-lang/rust/issues/13202
+
 //@ run-fail
 //@ error-pattern:bad input
 //@ needs-subprocess
diff --git a/tests/ui/issues/issue-18685.rs b/tests/ui/unboxed-closures/self-param-space-conflict-in-unboxed-closure-18685.rs
index 3dab341f615..38cf26c2777 100644
--- a/tests/ui/issues/issue-18685.rs
+++ b/tests/ui/unboxed-closures/self-param-space-conflict-in-unboxed-closure-18685.rs
@@ -1,8 +1,8 @@
+// https://github.com/rust-lang/rust/issues/18685
 //@ run-pass
 // Test that the self param space is not used in a conflicting
 // manner by unboxed closures within a default method on a trait
 
-
 trait Tr {
     fn foo(&self);
 
diff --git a/tests/ui/unboxed-closures/unboxed-closure-illegal-move.stderr b/tests/ui/unboxed-closures/unboxed-closure-illegal-move.stderr
index 8d9a61cb681..9d87402a15b 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-illegal-move.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-illegal-move.stderr
@@ -10,6 +10,11 @@ LL |         let f = to_fn(|| drop(x));
    |                       |
    |                       captured by this `Fn` closure
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/unboxed-closure-illegal-move.rs:7:33
+   |
+LL | fn to_fn<A:std::marker::Tuple,F:Fn<A>>(f: F) -> F { f }
+   |                                 ^^^^^
 help: consider cloning the value if the performance cost is acceptable
    |
 LL |         let f = to_fn(|| drop(x.clone()));
@@ -27,6 +32,11 @@ LL |         let f = to_fn_mut(|| drop(x));
    |                           |
    |                           captured by this `FnMut` closure
    |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/unboxed-closure-illegal-move.rs:8:37
+   |
+LL | fn to_fn_mut<A:std::marker::Tuple,F:FnMut<A>>(f: F) -> F { f }
+   |                                     ^^^^^^^^
 help: consider cloning the value if the performance cost is acceptable
    |
 LL |         let f = to_fn_mut(|| drop(x.clone()));
@@ -43,6 +53,12 @@ LL |         let f = to_fn(move || drop(x));
    |                       -------      ^ `x` is moved here
    |                       |
    |                       captured by this `Fn` closure
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/unboxed-closure-illegal-move.rs:7:33
+   |
+LL | fn to_fn<A:std::marker::Tuple,F:Fn<A>>(f: F) -> F { f }
+   |                                 ^^^^^
 
 error[E0507]: cannot move out of `x`, a captured variable in an `FnMut` closure
   --> $DIR/unboxed-closure-illegal-move.rs:32:40
@@ -55,6 +71,12 @@ LL |         let f = to_fn_mut(move || drop(x));
    |                           -------      ^ `x` is moved here
    |                           |
    |                           captured by this `FnMut` closure
+   |
+help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but an `FnOnce` consume them only once
+  --> $DIR/unboxed-closure-illegal-move.rs:8:37
+   |
+LL | fn to_fn_mut<A:std::marker::Tuple,F:FnMut<A>>(f: F) -> F { f }
+   |                                     ^^^^^^^^
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/issues/issue-88150.rs b/tests/ui/uninhabited/uninhabited-type-layout-computation-88150.rs
index 1dadba307c0..1387c5b6c10 100644
--- a/tests/ui/issues/issue-88150.rs
+++ b/tests/ui/uninhabited/uninhabited-type-layout-computation-88150.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/88150
 //@ run-pass
 //@ compile-flags:-C debuginfo=2
 //@ edition:2018
diff --git a/tests/ui/unpretty/exhaustive.hir.stdout b/tests/ui/unpretty/exhaustive.hir.stdout
index 9cfa65f5801..e9823c9575b 100644
--- a/tests/ui/unpretty/exhaustive.hir.stdout
+++ b/tests/ui/unpretty/exhaustive.hir.stdout
@@ -509,7 +509,7 @@ mod items {
         impl () { }
         impl <T> () { }
         impl Default for () { }
-        impl const <T> Default for () { }
+        impl <T> const Default for () { }
     }
     /// ItemKind::MacCall
     mod item_mac_call { }
diff --git a/tests/ui/unsized/relaxed-bounds-invalid-places.rs b/tests/ui/unsized/relaxed-bounds-invalid-places.rs
index b8eda1e7786..4c1f242a01c 100644
--- a/tests/ui/unsized/relaxed-bounds-invalid-places.rs
+++ b/tests/ui/unsized/relaxed-bounds-invalid-places.rs
@@ -22,6 +22,10 @@ impl<T> S1<T> {
     fn f() where T: ?Sized {} //~ ERROR this relaxed bound is not permitted here
 }
 
+// Test associated type bounds (ATB).
+// issue: <https://github.com/rust-lang/rust/issues/135229>
+struct S6<T>(T) where T: Iterator<Item: ?Sized>; //~ ERROR this relaxed bound is not permitted here
+
 trait Tr: ?Sized {} //~ ERROR relaxed bounds are not permitted in supertrait bounds
 
 // Test that relaxed `Sized` bounds are rejected in trait object types:
diff --git a/tests/ui/unsized/relaxed-bounds-invalid-places.stderr b/tests/ui/unsized/relaxed-bounds-invalid-places.stderr
index 30285d62693..d3f0535e2f0 100644
--- a/tests/ui/unsized/relaxed-bounds-invalid-places.stderr
+++ b/tests/ui/unsized/relaxed-bounds-invalid-places.stderr
@@ -38,8 +38,16 @@ LL |     fn f() where T: ?Sized {}
    |
    = note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
 
+error: this relaxed bound is not permitted here
+  --> $DIR/relaxed-bounds-invalid-places.rs:27:41
+   |
+LL | struct S6<T>(T) where T: Iterator<Item: ?Sized>;
+   |                                         ^^^^^^
+   |
+   = note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
+
 error: relaxed bounds are not permitted in supertrait bounds
-  --> $DIR/relaxed-bounds-invalid-places.rs:25:11
+  --> $DIR/relaxed-bounds-invalid-places.rs:29:11
    |
 LL | trait Tr: ?Sized {}
    |           ^^^^^^
@@ -47,19 +55,19 @@ LL | trait Tr: ?Sized {}
    = note: traits are `?Sized` by default
 
 error: relaxed bounds are not permitted in trait object types
-  --> $DIR/relaxed-bounds-invalid-places.rs:29:20
+  --> $DIR/relaxed-bounds-invalid-places.rs:33:20
    |
 LL | type O1 = dyn Tr + ?Sized;
    |                    ^^^^^^
 
 error: relaxed bounds are not permitted in trait object types
-  --> $DIR/relaxed-bounds-invalid-places.rs:30:15
+  --> $DIR/relaxed-bounds-invalid-places.rs:34:15
    |
 LL | type O2 = dyn ?Sized + ?Sized + Tr;
    |               ^^^^^^
 
 error: relaxed bounds are not permitted in trait object types
-  --> $DIR/relaxed-bounds-invalid-places.rs:30:24
+  --> $DIR/relaxed-bounds-invalid-places.rs:34:24
    |
 LL | type O2 = dyn ?Sized + ?Sized + Tr;
    |                        ^^^^^^
@@ -76,5 +84,5 @@ error: bound modifier `?` can only be applied to `Sized`
 LL | struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
    |                                 ^^^^^^^^^^^^^^^
 
-error: aborting due to 11 previous errors
+error: aborting due to 12 previous errors
 
diff --git a/tests/ui/unstable-feature-bound/unstable_feature_bound_on_trait.fail.stderr b/tests/ui/unstable-feature-bound/unstable_feature_bound_on_trait.fail.stderr
new file mode 100644
index 00000000000..69be101a40d
--- /dev/null
+++ b/tests/ui/unstable-feature-bound/unstable_feature_bound_on_trait.fail.stderr
@@ -0,0 +1,18 @@
+error: unstable feature `foo` is used without being enabled.
+  --> $DIR/unstable_feature_bound_on_trait.rs:28:5
+   |
+LL |     Foo::bar();
+   |     ^^^^^^^^^^
+   |
+   = help: The feature can be enabled by marking the current item with `#[unstable_feature_bound(foo)]`
+note: required by a bound in `Bar::bar`
+  --> $DIR/unstable_feature_bound_on_trait.rs:16:1
+   |
+LL | #[unstable_feature_bound(foo)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Bar::bar`
+...
+LL |     fn bar() {}
+   |        --- required by a bound in this associated function
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/unstable-feature-bound/unstable_feature_bound_on_trait.rs b/tests/ui/unstable-feature-bound/unstable_feature_bound_on_trait.rs
new file mode 100644
index 00000000000..0ee00d5e7fb
--- /dev/null
+++ b/tests/ui/unstable-feature-bound/unstable_feature_bound_on_trait.rs
@@ -0,0 +1,33 @@
+//@ revisions: pass fail
+//@[pass] check-pass
+
+#![allow(internal_features)]
+#![feature(staged_api)]
+#![stable(feature = "a", since = "1.1.1" )]
+
+/// Test the behaviour of marking a trait with #[unstable_feature_bound].
+/// In this testcase, even though the trait method `bar` and the `struct Foo` are
+/// both stable, #[unstable_feature_bound] is still needed at the call site of Foo::bar().
+
+#[stable(feature = "a", since = "1.1.1" )]
+struct Foo;
+
+#[unstable(feature = "foo", issue = "none" )]
+#[unstable_feature_bound(foo)]
+trait Bar {
+    #[stable(feature = "a", since = "1.1.1" )]
+    fn bar() {}
+}
+
+#[unstable_feature_bound(foo)]
+impl Bar for Foo {
+}
+
+#[cfg_attr(pass, unstable_feature_bound(foo))]
+fn moo() {
+    Foo::bar();
+    //[fail]~^ ERROR: unstable feature `foo` is used without being enabled.
+}
+
+
+fn main() {}
diff --git a/tests/ui/unstable-feature-bound/unstable_inherent_method.rs b/tests/ui/unstable-feature-bound/unstable_inherent_method.rs
index 5f3095430a8..0d6e4ebb408 100644
--- a/tests/ui/unstable-feature-bound/unstable_inherent_method.rs
+++ b/tests/ui/unstable-feature-bound/unstable_inherent_method.rs
@@ -9,14 +9,14 @@
 pub trait Trait {
     #[unstable(feature = "feat", issue = "none" )]
     #[unstable_feature_bound(foo)]
-    //~^ ERROR: attribute should be applied to `impl` or free function outside of any `impl` or trait
+    //~^ ERROR: attribute should be applied to `impl`, trait or free function
     fn foo();
 }
 
 #[stable(feature = "a", since = "1.1.1" )]
 impl Trait for u8 {
     #[unstable_feature_bound(foo)]
-    //~^ ERROR: attribute should be applied to `impl` or free function outside of any `impl` or trait
+    //~^ ERROR: attribute should be applied to `impl`, trait or free function
     fn foo() {}
 }
 
diff --git a/tests/ui/unstable-feature-bound/unstable_inherent_method.stderr b/tests/ui/unstable-feature-bound/unstable_inherent_method.stderr
index fa1c39db259..90cbb32df7c 100644
--- a/tests/ui/unstable-feature-bound/unstable_inherent_method.stderr
+++ b/tests/ui/unstable-feature-bound/unstable_inherent_method.stderr
@@ -1,20 +1,20 @@
-error: attribute should be applied to `impl` or free function outside of any `impl` or trait
+error: attribute should be applied to `impl`, trait or free function
   --> $DIR/unstable_inherent_method.rs:11:5
    |
 LL |     #[unstable_feature_bound(foo)]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 LL |
 LL |     fn foo();
-   |     --------- not an `impl` or free function
+   |     --------- not an `impl`, trait or free function
 
-error: attribute should be applied to `impl` or free function outside of any `impl` or trait
+error: attribute should be applied to `impl`, trait or free function
   --> $DIR/unstable_inherent_method.rs:18:5
    |
 LL |     #[unstable_feature_bound(foo)]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 LL |
 LL |     fn foo() {}
-   |     ----------- not an `impl` or free function
+   |     ----------- not an `impl`, trait or free function
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/wf/hir-wf-check-erase-regions.stderr b/tests/ui/wf/hir-wf-check-erase-regions.nll.stderr
index 07304cd448e..dcade3aa367 100644
--- a/tests/ui/wf/hir-wf-check-erase-regions.stderr
+++ b/tests/ui/wf/hir-wf-check-erase-regions.nll.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `&'a T` is not an iterator
-  --> $DIR/hir-wf-check-erase-regions.rs:7:21
+  --> $DIR/hir-wf-check-erase-regions.rs:11:21
    |
 LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'a T` is not an iterator
@@ -11,7 +11,7 @@ note: required by a bound in `std::iter::IntoIterator::IntoIter`
   --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
 
 error[E0277]: `&'a T` is not an iterator
-  --> $DIR/hir-wf-check-erase-regions.rs:7:5
+  --> $DIR/hir-wf-check-erase-regions.rs:11:5
    |
 LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
    |     ^^^^^^^^^^^^^ `&'a T` is not an iterator
@@ -23,7 +23,7 @@ note: required by a bound in `Flatten`
   --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
 
 error[E0277]: `&'a T` is not an iterator
-  --> $DIR/hir-wf-check-erase-regions.rs:11:27
+  --> $DIR/hir-wf-check-erase-regions.rs:15:27
    |
 LL |     fn into_iter(self) -> Self::IntoIter {
    |                           ^^^^^^^^^^^^^^ `&'a T` is not an iterator
@@ -35,7 +35,7 @@ note: required by a bound in `Flatten`
   --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
 
 error[E0277]: `&T` is not an iterator
-  --> $DIR/hir-wf-check-erase-regions.rs:11:27
+  --> $DIR/hir-wf-check-erase-regions.rs:15:27
    |
 LL |     fn into_iter(self) -> Self::IntoIter {
    |                           ^^^^^^^^^^^^^^ `&T` is not an iterator
diff --git a/tests/ui/wf/hir-wf-check-erase-regions.polonius.stderr b/tests/ui/wf/hir-wf-check-erase-regions.polonius.stderr
new file mode 100644
index 00000000000..55728aa642b
--- /dev/null
+++ b/tests/ui/wf/hir-wf-check-erase-regions.polonius.stderr
@@ -0,0 +1,39 @@
+error[E0277]: `&'a T` is not an iterator
+  --> $DIR/hir-wf-check-erase-regions.rs:11:21
+   |
+LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'a T` is not an iterator
+   |
+   = help: the trait `Iterator` is not implemented for `&'a T`
+   = help: the trait `Iterator` is implemented for `&mut I`
+   = note: required for `Flatten<std::slice::Iter<'a, T>>` to implement `Iterator`
+note: required by a bound in `std::iter::IntoIterator::IntoIter`
+  --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
+
+error[E0277]: `&'a T` is not an iterator
+  --> $DIR/hir-wf-check-erase-regions.rs:11:5
+   |
+LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
+   |     ^^^^^^^^^^^^^ `&'a T` is not an iterator
+   |
+   = help: the trait `Iterator` is not implemented for `&'a T`
+   = help: the trait `Iterator` is implemented for `&mut I`
+   = note: required for `&'a T` to implement `IntoIterator`
+note: required by a bound in `Flatten`
+  --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
+
+error[E0277]: `&'a T` is not an iterator
+  --> $DIR/hir-wf-check-erase-regions.rs:15:27
+   |
+LL |     fn into_iter(self) -> Self::IntoIter {
+   |                           ^^^^^^^^^^^^^^ `&'a T` is not an iterator
+   |
+   = help: the trait `Iterator` is not implemented for `&'a T`
+   = help: the trait `Iterator` is implemented for `&mut I`
+   = note: required for `&'a T` to implement `IntoIterator`
+note: required by a bound in `Flatten`
+  --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/hir-wf-check-erase-regions.rs b/tests/ui/wf/hir-wf-check-erase-regions.rs
index 20cc1cfe730..ef9132697ef 100644
--- a/tests/ui/wf/hir-wf-check-erase-regions.rs
+++ b/tests/ui/wf/hir-wf-check-erase-regions.rs
@@ -1,6 +1,10 @@
 // Regression test for #87549.
 //@ incremental
 
+//@ ignore-compare-mode-polonius (explicit revisions)
+//@ revisions: nll polonius
+//@ [polonius] compile-flags: -Zpolonius=next
+
 pub struct Table<T, const N: usize>([Option<T>; N]);
 
 impl<'a, T, const N: usize> IntoIterator for &'a Table<T, N> {
@@ -10,7 +14,7 @@ impl<'a, T, const N: usize> IntoIterator for &'a Table<T, N> {
 
     fn into_iter(self) -> Self::IntoIter {
         //~^ ERROR `&'a T` is not an iterator
-        //~| ERROR `&T` is not an iterator
+        //[nll]~| ERROR `&T` is not an iterator
         unimplemented!()
     }
 }
diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs
index ad7d972879f..072a699a6b5 100644
--- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs
+++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs
@@ -4,7 +4,7 @@ trait Trait<const N: dyn Trait = bar> {
     fn fnc<const N: dyn Trait = u32>(&self) -> dyn Trait {
         //~^ ERROR the name `N` is already used for a generic parameter in this item's generic parameters
         //~| ERROR expected value, found builtin type `u32`
-        //~| ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+        //~| ERROR defaults for generic parameters are not allowed here
         bar
         //~^ ERROR cannot find value `bar` in this scope
     }
diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr
index dc5a1cf3485..47f3e83fae2 100644
--- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr
+++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr
@@ -39,7 +39,7 @@ LL | trait Trait<const N: dyn Trait = bar> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
-error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+error: defaults for generic parameters are not allowed here
   --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:4:12
    |
 LL |     fn fnc<const N: dyn Trait = u32>(&self) -> dyn Trait {