about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/codegen-llvm/autodiff/abi_handling.rs4
-rw-r--r--tests/codegen-llvm/autodiff/batched.rs2
-rw-r--r--tests/codegen-llvm/autodiff/scalar.rs2
-rw-r--r--tests/codegen-llvm/autodiff/sret.rs2
-rw-r--r--tests/codegen-llvm/autodiff/typetree.rs33
-rw-r--r--tests/codegen-llvm/autodiff/void_ret.rs41
-rw-r--r--tests/codegen-llvm/debug-fndef-size.rs4
-rw-r--r--tests/codegen-llvm/debuginfo-dse.rs362
-rw-r--r--tests/codegen-llvm/global-allocator-attributes.rs41
-rw-r--r--tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs7
-rw-r--r--tests/codegen-llvm/pattern_type_symbols.rs4
-rw-r--r--tests/codegen-llvm/unwind-abis/c-unwind-abi-panic-abort.rs9
-rw-r--r--tests/codegen-llvm/unwind-and-panic-abort.rs9
-rw-r--r--tests/codegen-llvm/vec_pop_push_noop.rs5
-rw-r--r--tests/codegen-llvm/vecdeque_pop_push.rs5
-rw-r--r--tests/codegen-llvm/wasm_exceptions.rs57
-rw-r--r--tests/coverage/issue-83601.cov-map34
-rw-r--r--tests/coverage/issue-84561.cov-map136
-rw-r--r--tests/crashes/117808.rs27
-rw-r--r--tests/crashes/120016.rs14
-rw-r--r--tests/crashes/120175.rs1
-rw-r--r--tests/crashes/125772.rs2
-rw-r--r--tests/crashes/129095.rs13
-rw-r--r--tests/crashes/131292.rs2
-rw-r--r--tests/crashes/134174.rs17
-rw-r--r--tests/crashes/134654.rs15
-rw-r--r--tests/crashes/135570.rs15
-rw-r--r--tests/crashes/136381.rs18
-rw-r--r--tests/crashes/137190-1.rs10
-rw-r--r--tests/crashes/137468.rs16
-rw-r--r--tests/crashes/34127.rs2
-rw-r--r--tests/debuginfo/opt/dead_refs.rs50
-rw-r--r--tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir18
-rw-r--r--tests/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination-initial.diff4
-rw-r--r--tests/mir-opt/dead-store-elimination/ref.dead_first.DeadStoreElimination-initial.diff30
-rw-r--r--tests/mir-opt/dead-store-elimination/ref.rs31
-rw-r--r--tests/mir-opt/dead-store-elimination/ref.tuple.DeadStoreElimination-initial.diff25
-rw-r--r--tests/mir-opt/debuginfo/simplifycfg.drop_debuginfo.SimplifyCfg-final.diff26
-rw-r--r--tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_1.SimplifyCfg-final.diff30
-rw-r--r--tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_2.SimplifyCfg-final.diff29
-rw-r--r--tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_3.SimplifyCfg-final.diff37
-rw-r--r--tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_identical_succs.SimplifyCfg-final.diff29
-rw-r--r--tests/mir-opt/debuginfo/simplifycfg.rs207
-rw-r--r--tests/mir-opt/inline/forced_closure_inherent.caller-{closure#0}.ForceInline.panic-abort.diff21
-rw-r--r--tests/mir-opt/inline/forced_closure_inherent.caller-{closure#0}.ForceInline.panic-unwind.diff21
-rw-r--r--tests/mir-opt/inline/forced_closure_inherent.rs19
-rw-r--r--tests/mir-opt/inline/forced_inherent.caller.ForceInline.panic-abort.diff21
-rw-r--r--tests/mir-opt/inline/forced_inherent.caller.ForceInline.panic-unwind.diff21
-rw-r--r--tests/mir-opt/inline/forced_inherent.rs17
-rw-r--r--tests/mir-opt/inline/forced_inherent_ambiguous.caller.ForceInline.panic-abort.diff21
-rw-r--r--tests/mir-opt/inline/forced_inherent_ambiguous.caller.ForceInline.panic-unwind.diff21
-rw-r--r--tests/mir-opt/inline/forced_inherent_ambiguous.rs25
-rw-r--r--tests/mir-opt/inline/forced_inherent_async.caller.ForceInline.panic-abort.diff12
-rw-r--r--tests/mir-opt/inline/forced_inherent_async.caller.ForceInline.panic-unwind.diff12
-rw-r--r--tests/mir-opt/inline/forced_inherent_async.rs18
-rw-r--r--tests/mir-opt/inline/forced_inherent_dead_code.caller.ForceInline.panic-abort.diff21
-rw-r--r--tests/mir-opt/inline/forced_inherent_dead_code.caller.ForceInline.panic-unwind.diff21
-rw-r--r--tests/mir-opt/inline/forced_inherent_dead_code.rs21
-rw-r--r--tests/mir-opt/inline/inline_shims.drop.Inline.panic-abort.diff2
-rw-r--r--tests/mir-opt/inline/inline_shims.drop.Inline.panic-unwind.diff2
-rw-r--r--tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-abort.diff15
-rw-r--r--tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-unwind.diff15
-rw-r--r--tests/mir-opt/issue_101973.inner.GVN.panic-abort.diff1
-rw-r--r--tests/mir-opt/issue_101973.inner.GVN.panic-unwind.diff1
-rw-r--r--tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff12
-rw-r--r--tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-unwind.diff12
-rw-r--r--tests/mir-opt/pre-codegen/clone_as_copy.clone_as_copy.PreCodegen.after.mir4
-rw-r--r--tests/mir-opt/pre-codegen/clone_as_copy.enum_clone_as_copy.PreCodegen.after.mir46
-rw-r--r--tests/mir-opt/pre-codegen/clone_as_copy.rs16
-rw-r--r--tests/mir-opt/pre-codegen/dead_on_invalid_place.invalid_place.PreCodegen.after.mir13
-rw-r--r--tests/mir-opt/pre-codegen/dead_on_invalid_place.rs27
-rw-r--r--tests/mir-opt/pre-codegen/loops.filter_mapped.PreCodegen.after.mir44
-rw-r--r--tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir94
-rw-r--r--tests/mir-opt/pre-codegen/loops.mapped.PreCodegen.after.mir84
-rw-r--r--tests/mir-opt/pre-codegen/loops.rs1
-rw-r--r--tests/mir-opt/pre-codegen/loops.vec_move.PreCodegen.after.mir306
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir205
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir211
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir219
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.slice_iter_mut_next_back.PreCodegen.after.panic-abort.mir177
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.slice_iter_mut_next_back.PreCodegen.after.panic-unwind.mir177
-rw-r--r--tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir2
-rw-r--r--tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir2
-rw-r--r--tests/run-make/autodiff/type-trees/array-typetree/array.check4
-rw-r--r--tests/run-make/autodiff/type-trees/array-typetree/rmake.rs9
-rw-r--r--tests/run-make/autodiff/type-trees/array-typetree/test.rs15
-rw-r--r--tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy-ir.check8
-rw-r--r--tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.check13
-rw-r--r--tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.rs36
-rw-r--r--tests/run-make/autodiff/type-trees/memcpy-typetree/rmake.rs39
-rw-r--r--tests/run-make/autodiff/type-trees/mixed-struct-typetree/mixed.check2
-rw-r--r--tests/run-make/autodiff/type-trees/mixed-struct-typetree/rmake.rs16
-rw-r--r--tests/run-make/autodiff/type-trees/mixed-struct-typetree/test.rs23
-rw-r--r--tests/run-make/autodiff/type-trees/nott-flag/nott.check5
-rw-r--r--tests/run-make/autodiff/type-trees/nott-flag/rmake.rs30
-rw-r--r--tests/run-make/autodiff/type-trees/nott-flag/test.rs15
-rw-r--r--tests/run-make/autodiff/type-trees/nott-flag/with_tt.check4
-rw-r--r--tests/run-make/autodiff/type-trees/recursion-typetree/recursion.check3
-rw-r--r--tests/run-make/autodiff/type-trees/recursion-typetree/rmake.rs9
-rw-r--r--tests/run-make/autodiff/type-trees/recursion-typetree/test.rs100
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/f128.check4
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/rmake.rs12
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/test.rs15
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/f16.check4
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/rmake.rs12
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/test.rs15
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/f32.check4
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/rmake.rs12
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/test.rs15
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/f64.check4
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/rmake.rs12
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/test.rs15
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/i32.check4
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/rmake.rs12
-rw-r--r--tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/test.rs15
-rw-r--r--tests/run-make/autodiff/type-trees/slice-typetree/rmake.rs9
-rw-r--r--tests/run-make/autodiff/type-trees/slice-typetree/slice.check4
-rw-r--r--tests/run-make/autodiff/type-trees/slice-typetree/test.rs16
-rw-r--r--tests/run-make/autodiff/type-trees/struct-typetree/rmake.rs9
-rw-r--r--tests/run-make/autodiff/type-trees/struct-typetree/struct.check4
-rw-r--r--tests/run-make/autodiff/type-trees/struct-typetree/test.rs22
-rw-r--r--tests/run-make/autodiff/type-trees/tuple-typetree/rmake.rs9
-rw-r--r--tests/run-make/autodiff/type-trees/tuple-typetree/test.rs15
-rw-r--r--tests/run-make/autodiff/type-trees/tuple-typetree/tuple.check4
-rw-r--r--tests/run-make/autodiff/type-trees/type-analysis/vec/vec.check2
-rw-r--r--tests/run-make/doctests-compilation-time-info/rmake.rs119
-rw-r--r--tests/run-make/doctests-merge/doctest-2024.stdout1
-rw-r--r--tests/run-make/doctests-merge/rmake.rs2
-rw-r--r--tests/run-make/linker-warning/rmake.rs3
-rw-r--r--tests/run-make/split-debuginfo/rmake.rs150
-rw-r--r--tests/rustdoc-gui/search-result-color.goml45
-rw-r--r--tests/rustdoc-gui/search-tab.goml2
-rw-r--r--tests/rustdoc-gui/search-title.goml12
-rw-r--r--tests/rustdoc-gui/sidebar.goml2
-rw-r--r--tests/rustdoc-gui/src/lib2/lib.rs1
-rw-r--r--tests/rustdoc-gui/src/test_docs/lib.rs9
-rw-r--r--tests/rustdoc-js-std/asrawfd.js4
-rw-r--r--tests/rustdoc-js-std/quoted.js18
-rw-r--r--tests/rustdoc-js-std/trait-unbox.js (renamed from tests/rustdoc-js-std/bufread-fill-buf.js)6
-rw-r--r--tests/rustdoc-js/trait-methods.js20
-rw-r--r--tests/rustdoc-js/trait-methods.rs18
-rw-r--r--tests/rustdoc-ui/cfg-hide-show-conflict.rs3
-rw-r--r--tests/rustdoc-ui/cfg-hide-show-conflict.stderr14
-rw-r--r--tests/rustdoc-ui/doc-cfg.rs11
-rw-r--r--tests/rustdoc-ui/doc-cfg.stderr78
-rw-r--r--tests/rustdoc-ui/doctest/doctest-output.edition2015.stdout6
-rw-r--r--tests/rustdoc-ui/doctest/doctest-output.edition2024.stdout7
-rw-r--r--tests/rustdoc-ui/doctest/doctest-output.rs2
-rw-r--r--tests/rustdoc-ui/doctest/merged-ignore-no_run.rs2
-rw-r--r--tests/rustdoc-ui/doctest/merged-ignore-no_run.stdout5
-rw-r--r--tests/rustdoc-ui/feature-gate-doc_cfg.rs6
-rw-r--r--tests/rustdoc-ui/feature-gate-doc_cfg.stderr63
-rw-r--r--tests/rustdoc-ui/feature-gate-doc_cfg_hide.rs7
-rw-r--r--tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr13
-rw-r--r--tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.rs21
-rw-r--r--tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.stderr39
-rw-r--r--tests/rustdoc-ui/intra-doc/type-alias-primitive.rs14
-rw-r--r--tests/rustdoc-ui/invalid-cfg.rs2
-rw-r--r--tests/rustdoc-ui/issues/issue-91713.stdout4
-rw-r--r--tests/rustdoc-ui/lints/doc_cfg_hide.rs11
-rw-r--r--tests/rustdoc-ui/lints/doc_cfg_hide.stderr27
-rw-r--r--tests/rustdoc-ui/lints/invalid-html-tags-ice-146890.rs25
-rw-r--r--tests/rustdoc-ui/lints/invalid-html-tags-ice-146890.stderr38
-rw-r--r--tests/rustdoc/attribute-rendering.rs8
-rw-r--r--tests/rustdoc/attributes.rs12
-rw-r--r--tests/rustdoc/auxiliary/ext-repr.rs5
-rw-r--r--tests/rustdoc/doc-auto-cfg-public-in-private.rs16
-rw-r--r--tests/rustdoc/doc-auto-cfg.rs2
-rw-r--r--tests/rustdoc/doc-cfg/doc-cfg-hide.rs8
-rw-r--r--tests/rustdoc/doc-cfg/doc-cfg-implicit-gate.rs3
-rw-r--r--tests/rustdoc/doc-cfg/doc-cfg-implicit.rs2
-rw-r--r--tests/rustdoc/doc_auto_cfg.rs77
-rw-r--r--tests/rustdoc/doc_auto_cfg_reexports.rs35
-rw-r--r--tests/rustdoc/impl/doc_auto_cfg_nested_impl.rs2
-rw-r--r--tests/rustdoc/inline_cross/attributes.rs17
-rw-r--r--tests/rustdoc/inline_cross/auxiliary/attributes.rs9
-rw-r--r--tests/rustdoc/inline_cross/auxiliary/repr.rs42
-rw-r--r--tests/rustdoc/inline_cross/repr.rs40
-rw-r--r--tests/rustdoc/intra-doc/type-alias-primitive.rs21
-rw-r--r--tests/rustdoc/jump-to-def-assoc-items.rs54
-rw-r--r--tests/rustdoc/jump-to-def-ice-assoc-types.rs20
-rw-r--r--tests/rustdoc/jump-to-def-ice.rs24
-rw-r--r--tests/rustdoc/jump-to-def/jump-to-def-doc-links-calls.rs4
-rw-r--r--tests/rustdoc/jump-to-def/jump-to-def-pats.rs10
-rw-r--r--tests/rustdoc/jump-to-def/jump-to-non-local-method.rs7
-rw-r--r--tests/rustdoc/reexport/auxiliary/reexports-attrs.rs14
-rw-r--r--tests/rustdoc/reexport/doc_auto_cfg-reexport-foreign-113982.rs2
-rw-r--r--tests/rustdoc/reexport/glob-reexport-attribute-merge-doc-auto-cfg.rs2
-rw-r--r--tests/rustdoc/reexport/reexport-attrs.rs20
-rw-r--r--tests/rustdoc/reexport/reexport-cfg.rs2
-rw-r--r--tests/rustdoc/repr.rs154
-rw-r--r--tests/rustdoc/source-code-pages/check-source-code-urls-to-def.rs2
-rw-r--r--tests/rustdoc/target-feature.rs2
-rw-r--r--tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs4
-rw-r--r--tests/ui-fulldeps/mod_dir_path_canonicalized.rs1
-rw-r--r--tests/ui/array-slice-vec/box-of-array-of-drop-1.rs1
-rw-r--r--tests/ui/array-slice-vec/box-of-array-of-drop-2.rs1
-rw-r--r--tests/ui/array-slice-vec/nested-vec-3.rs1
-rw-r--r--tests/ui/array-slice-vec/slice-panic-1.rs1
-rw-r--r--tests/ui/array-slice-vec/slice-panic-2.rs1
-rw-r--r--tests/ui/asm/global-asm-isnt-really-a-mir-body.rs1
-rw-r--r--tests/ui/asm/x86_64/goto.rs1
-rw-r--r--tests/ui/asm/x86_64/goto.stderr4
-rw-r--r--tests/ui/asm/x86_64/srcloc.rs1
-rw-r--r--tests/ui/asm/x86_64/srcloc.stderr50
-rw-r--r--tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.rs17
-rw-r--r--tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.stderr34
-rw-r--r--tests/ui/associated-type-bounds/duplicate-bound-err.rs114
-rw-r--r--tests/ui/associated-type-bounds/duplicate-bound-err.stderr268
-rw-r--r--tests/ui/associated-type-bounds/duplicate-bound.rs240
-rw-r--r--tests/ui/associated-type-bounds/duplicate.rs278
-rw-r--r--tests/ui/associated-type-bounds/duplicate.stderr751
-rw-r--r--tests/ui/associated-types/associated-types-overridden-binding-2.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-overridden-binding.stderr2
-rw-r--r--tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.current.stderr (renamed from tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.stderr)6
-rw-r--r--tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.next.stderr21
-rw-r--r--tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.rs4
-rw-r--r--tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.rs14
-rw-r--r--tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.stderr63
-rw-r--r--tests/ui/attributes/empty-repr.stderr1
-rw-r--r--tests/ui/attributes/fn-align-dyn.rs1
-rw-r--r--tests/ui/attributes/main-removed-2/main.rs1
-rw-r--r--tests/ui/attributes/malformed-attrs.rs3
-rw-r--r--tests/ui/attributes/malformed-attrs.stderr53
-rw-r--r--tests/ui/attributes/unsafe/double-unsafe-attributes.rs2
-rw-r--r--tests/ui/attributes/unsafe/double-unsafe-attributes.stderr6
-rw-r--r--tests/ui/attributes/unsafe/unsafe-safe-attribute_diagnostic.rs2
-rw-r--r--tests/ui/attributes/unsafe/unsafe-safe-attribute_diagnostic.stderr6
-rw-r--r--tests/ui/autodiff/flag_nott.rs19
-rw-r--r--tests/ui/backtrace/synchronized-panic-handler.rs1
-rw-r--r--tests/ui/backtrace/synchronized-panic-handler.run.stderr4
-rw-r--r--tests/ui/borrowck/fn-item-check-type-params.stderr12
-rw-r--r--tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr6
-rw-r--r--tests/ui/borrowck/issue-17545.stderr3
-rw-r--r--tests/ui/box/unit/unwind-unique.rs1
-rw-r--r--tests/ui/c-variadic/inherent-method.rs1
-rw-r--r--tests/ui/c-variadic/trait-method.rs1
-rw-r--r--tests/ui/c-variadic/valid.rs1
-rw-r--r--tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs1
-rw-r--r--tests/ui/closures/deduce-signature/obligation-with-leaking-placeholders.next.stderr2
-rw-r--r--tests/ui/closures/impl-closure-147146.rs7
-rw-r--r--tests/ui/closures/impl-closure-147146.stderr15
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/undeclared-lifetime.rs21
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/undeclared-lifetime.stderr19
-rw-r--r--tests/ui/codegen/issue-82833-slice-miscompile.rs1
-rw-r--r--tests/ui/codegen/llvm-args-invalid-flag.rs1
-rw-r--r--tests/ui/codegen/remark-flag-functionality.rs1
-rw-r--r--tests/ui/codegen/virtual-function-elimination.rs1
-rw-r--r--tests/ui/coercion/no_local_for_coerced_const-issue-143671.rs46
-rw-r--r--tests/ui/compiletest-self-test/compile-flags-incremental.rs17
-rw-r--r--tests/ui/const-generics/adt_const_params/unsized_field-1.stderr6
-rw-r--r--tests/ui/const-generics/forbid-non-structural_match-types.stderr2
-rw-r--r--tests/ui/const-generics/generic_arg_infer/in-signature.stderr36
-rw-r--r--tests/ui/const-generics/issue-80471.stderr4
-rw-r--r--tests/ui/const-generics/issues/issue-97278.stderr4
-rw-r--r--tests/ui/consts/const-eval/ub-nonnull.rs4
-rw-r--r--tests/ui/consts/const-eval/ub-nonnull.stderr17
-rw-r--r--tests/ui/consts/const-eval/ub-ref-ptr.rs23
-rw-r--r--tests/ui/consts/const-eval/ub-ref-ptr.stderr67
-rw-r--r--tests/ui/consts/const_transmute_type_id7.rs16
-rw-r--r--tests/ui/consts/const_transmute_type_id7.stderr14
-rw-r--r--tests/ui/consts/refs_check_const_eq-issue-88384.stderr4
-rw-r--r--tests/ui/coroutine/copy-fast-path-query-cycle.rs40
-rw-r--r--tests/ui/coroutine/gen_block_panic.rs1
-rw-r--r--tests/ui/coroutine/gen_block_panic.stderr2
-rw-r--r--tests/ui/coroutine/handle_opaques_before_coroutines.rs15
-rw-r--r--tests/ui/delegation/fn-header-variadic.rs1
-rw-r--r--tests/ui/delegation/fn-header-variadic.stderr4
-rw-r--r--tests/ui/drop/drop-trait-enum.rs1
-rw-r--r--tests/ui/drop/terminate-in-initializer.rs1
-rw-r--r--tests/ui/empty/empty-attributes.stderr4
-rw-r--r--tests/ui/error-codes/E0121.stderr11
-rw-r--r--tests/ui/error-codes/E0719.rs5
-rw-r--r--tests/ui/error-codes/E0719.stderr34
-rw-r--r--tests/ui/errors/auxiliary/remapped_dep.rs2
-rw-r--r--tests/ui/errors/remap-path-prefix-reverse.local-self.stderr2
-rw-r--r--tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr2
-rw-r--r--tests/ui/errors/remap-path-prefix-reverse.rs1
-rw-r--r--tests/ui/errors/remap-path-prefix.rs2
-rw-r--r--tests/ui/errors/span-format_args-issue-140578.rs32
-rw-r--r--tests/ui/errors/span-format_args-issue-140578.stderr43
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_track_caller.rs1
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_track_caller.stderr2
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs1
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr2
-rw-r--r--tests/ui/explicit-tail-calls/callee_is_weird.stderr2
-rw-r--r--tests/ui/explicit-tail-calls/drop-order.rs1
-rw-r--r--tests/ui/explicit-tail-calls/indexer.rs1
-rw-r--r--tests/ui/explicit-tail-calls/recursion-etc.rs1
-rw-r--r--tests/ui/extern/extern-types-field-offset.rs6
-rw-r--r--tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs1
-rw-r--r--tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs1
-rw-r--r--tests/ui/feature-gates/feature-gate-doc_cfg.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-macro-attr.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.rs3
-rw-r--r--tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-reborrow.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-reborrow.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-sanitize.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-static_align-thread_local.rs11
-rw-r--r--tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs1
-rw-r--r--tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr2
-rw-r--r--tests/ui/fn/issue-80179.stderr21
-rw-r--r--tests/ui/fn/suggest-return-closure.stderr30
-rw-r--r--tests/ui/fn/suggest-return-future.stderr22
-rw-r--r--tests/ui/force-inlining/inherent.rs21
-rw-r--r--tests/ui/force-inlining/inherent.stderr13
-rw-r--r--tests/ui/force-inlining/invalid.rs1
-rw-r--r--tests/ui/force-inlining/invalid.stderr38
-rw-r--r--tests/ui/frontmatter/proc-macro-observer.rs1
-rw-r--r--tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr5
-rw-r--r--tests/ui/higher-ranked/do-not-blame-outlives-static-ice.rs12
-rw-r--r--tests/ui/higher-ranked/do-not-blame-outlives-static-ice.stderr17
-rw-r--r--tests/ui/higher-ranked/trait-bounds/issue-59311.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/trivial-does-not-hold.stderr2
-rw-r--r--tests/ui/hygiene/issue-77523-def-site-async-await.rs1
-rw-r--r--tests/ui/hygiene/panic-location.run.stderr2
-rw-r--r--tests/ui/impl-trait/call_method_ambiguous.next.stderr17
-rw-r--r--tests/ui/impl-trait/call_method_ambiguous.rs3
-rw-r--r--tests/ui/impl-trait/call_method_on_inherent_impl.next.stderr17
-rw-r--r--tests/ui/impl-trait/call_method_on_inherent_impl.rs3
-rw-r--r--tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.current.stderr2
-rw-r--r--tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.next.stderr18
-rw-r--r--tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.rs3
-rw-r--r--tests/ui/impl-trait/call_method_on_inherent_impl_ref-err.current.stderr (renamed from tests/ui/impl-trait/call_method_on_inherent_impl_ref.current.stderr)4
-rw-r--r--tests/ui/impl-trait/call_method_on_inherent_impl_ref-err.next.stderr19
-rw-r--r--tests/ui/impl-trait/call_method_on_inherent_impl_ref-err.rs24
-rw-r--r--tests/ui/impl-trait/call_method_on_inherent_impl_ref-ok.rs (renamed from tests/ui/impl-trait/call_method_on_inherent_impl_ref.rs)12
-rw-r--r--tests/ui/impl-trait/call_method_on_inherent_impl_ref.next.stderr31
-rw-r--r--tests/ui/impl-trait/hidden-type-is-opaque-2.default.stderr4
-rw-r--r--tests/ui/impl-trait/hidden-type-is-opaque-2.next.stderr4
-rw-r--r--tests/ui/impl-trait/method-resolution4.next.stderr9
-rw-r--r--tests/ui/impl-trait/method/broken-deref-chain.current.stderr19
-rw-r--r--tests/ui/impl-trait/method/broken-deref-chain.rs47
-rw-r--r--tests/ui/impl-trait/method/method-resolution.rs (renamed from tests/ui/impl-trait/method-resolution.rs)0
-rw-r--r--tests/ui/impl-trait/method/method-resolution2.next.stderr (renamed from tests/ui/impl-trait/method-resolution2.next.stderr)0
-rw-r--r--tests/ui/impl-trait/method/method-resolution2.rs (renamed from tests/ui/impl-trait/method-resolution2.rs)0
-rw-r--r--tests/ui/impl-trait/method/method-resolution3.current.stderr (renamed from tests/ui/impl-trait/method-resolution3.current.stderr)0
-rw-r--r--tests/ui/impl-trait/method/method-resolution3.next.stderr (renamed from tests/ui/impl-trait/method-resolution3.next.stderr)0
-rw-r--r--tests/ui/impl-trait/method/method-resolution3.rs (renamed from tests/ui/impl-trait/method-resolution3.rs)0
-rw-r--r--tests/ui/impl-trait/method/method-resolution4.rs (renamed from tests/ui/impl-trait/method-resolution4.rs)3
-rw-r--r--tests/ui/impl-trait/method/method-resolution5-deref-no-constrain.current.stderr19
-rw-r--r--tests/ui/impl-trait/method/method-resolution5-deref-no-constrain.rs23
-rw-r--r--tests/ui/impl-trait/method/method-resolution5-deref.rs30
-rw-r--r--tests/ui/impl-trait/method/would-constrain-opaque.current.stderr29
-rw-r--r--tests/ui/impl-trait/method/would-constrain-opaque.next.stderr27
-rw-r--r--tests/ui/impl-trait/method/would-constrain-opaque.rs39
-rw-r--r--tests/ui/impl-trait/precise-capturing/external-macro.rs1
-rw-r--r--tests/ui/impl-trait/precise-capturing/migration-note.rs2
-rw-r--r--tests/ui/impl-trait/precise-capturing/migration-note.stderr54
-rw-r--r--tests/ui/impl-trait/recursive-bound-eval.next.stderr9
-rw-r--r--tests/ui/impl-trait/recursive-bound-eval.rs6
-rw-r--r--tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr17
-rw-r--r--tests/ui/impl-trait/recursive-coroutine-boxed.rs3
-rw-r--r--tests/ui/impl-trait/where-allowed.stderr2
-rw-r--r--tests/ui/implied-bounds/bevy_world_query.rs6
-rw-r--r--tests/ui/imports/auxiliary/same-res-ambigious-extern-fail.rs16
-rw-r--r--tests/ui/imports/auxiliary/same-res-ambigious-extern-macro.rs8
-rw-r--r--tests/ui/imports/auxiliary/same-res-ambigious-extern.rs11
-rw-r--r--tests/ui/imports/same-res-ambigious.fail.stderr20
-rw-r--r--tests/ui/imports/same-res-ambigious.nightly-fail.stderr20
-rw-r--r--tests/ui/imports/same-res-ambigious.rs11
-rw-r--r--tests/ui/indexing/ambiguity-after-deref-step.rs9
-rw-r--r--tests/ui/indexing/ambiguity-after-deref-step.stderr17
-rw-r--r--tests/ui/indexing/index_message.stderr4
-rw-r--r--tests/ui/inference/need_type_info/incompat-call-after-qualified-path-0.stderr2
-rw-r--r--tests/ui/inference/need_type_info/incompat-call-after-qualified-path-1.stderr2
-rw-r--r--tests/ui/invalid-compile-flags/invalid-llvm-passes.rs1
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-option.rs2
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-option.stderr22
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-target.rs3
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-target.stderr4
-rw-r--r--tests/ui/issues/issue-2151.stderr2
-rw-r--r--tests/ui/issues/issue-25089.rs1
-rw-r--r--tests/ui/issues/issue-26655.rs1
-rw-r--r--tests/ui/issues/issue-27592.stderr12
-rw-r--r--tests/ui/issues/issue-27842.stderr12
-rw-r--r--tests/ui/issues/issue-29485.rs1
-rw-r--r--tests/ui/issues/issue-30018-panic.rs1
-rw-r--r--tests/ui/issues/issue-44056.rs1
-rw-r--r--tests/ui/issues/issue-68696-catch-during-unwind.rs1
-rw-r--r--tests/ui/keyword/soup.rs30
-rw-r--r--tests/ui/lang-items/missing-copy-lang-item-issue-19660.rs19
-rw-r--r--tests/ui/lang-items/missing-copy-lang-item-issue-19660.stderr8
-rw-r--r--tests/ui/lazy-type-alias-impl-trait/branches3.stderr8
-rw-r--r--tests/ui/lifetimes/re-empty-in-error.stderr2
-rw-r--r--tests/ui/lifetimes/temporary-lifetime-extension-tuple-ctor.rs6
-rw-r--r--tests/ui/linkage-attr/common-linkage-non-zero-init.rs1
-rw-r--r--tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rs1
-rw-r--r--tests/ui/linking/no-gc-encapsulation-symbols.rs1
-rw-r--r--tests/ui/lint/unused-qualification-in-derive-expansion.rs1
-rw-r--r--tests/ui/lto/debuginfo-lto-alloc.rs1
-rw-r--r--tests/ui/lto/debuginfo-lto.rs1
-rw-r--r--tests/ui/lto/dwarf-mixed-versions-lto.rs1
-rw-r--r--tests/ui/lto/fat-lto.rs1
-rw-r--r--tests/ui/lto/issue-100772.rs1
-rw-r--r--tests/ui/lto/lto-duplicate-symbols.rs1
-rw-r--r--tests/ui/lto/lto-many-codegen-units.rs1
-rw-r--r--tests/ui/lto/lto-rustc-loads-linker-plugin.rs1
-rw-r--r--tests/ui/lto/lto-still-runs-thread-dtors.rs1
-rw-r--r--tests/ui/macros/macro-local-data-key-priv.stderr2
-rw-r--r--tests/ui/macros/macro-rules-attr-error.rs19
-rw-r--r--tests/ui/macros/macro-rules-attr-error.stderr14
-rw-r--r--tests/ui/macros/macro-use-all-and-none.stderr3
-rw-r--r--tests/ui/macros/same-sequence-span.rs1
-rw-r--r--tests/ui/macros/same-sequence-span.stderr12
-rw-r--r--tests/ui/methods/overflow-if-subtyping.rs30
-rw-r--r--tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr6
-rw-r--r--tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr6
-rw-r--r--tests/ui/nll/local-outlives-static-via-hrtb.stderr10
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr5
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr5
-rw-r--r--tests/ui/nll/user-annotations/dump-fn-method.rs4
-rw-r--r--tests/ui/nll/user-annotations/dump-fn-method.stderr4
-rw-r--r--tests/ui/numbers-arithmetic/int-abs-overflow.rs1
-rw-r--r--tests/ui/numbers-arithmetic/issue-8460.rs1
-rw-r--r--tests/ui/panic-runtime/lto-unwind.rs1
-rw-r--r--tests/ui/panics/oom-panic-unwind.rs1
-rw-r--r--tests/ui/panics/panic-handler-chain-update-hook.rs1
-rw-r--r--tests/ui/panics/panic-handler-chain.rs1
-rw-r--r--tests/ui/panics/panic-handler-flail-wildly.rs1
-rw-r--r--tests/ui/panics/panic-handler-set-twice.rs1
-rw-r--r--tests/ui/panics/panic-in-dtor-drops-fields.rs1
-rw-r--r--tests/ui/panics/panic-recover-propagate.rs1
-rw-r--r--tests/ui/panics/rvalue-cleanup-during-box-panic.rs1
-rw-r--r--tests/ui/panics/unwind-force-no-unwind-tables.rs1
-rw-r--r--tests/ui/parser/issues/issue-87086-colon-path-sep.rs3
-rw-r--r--tests/ui/parser/issues/issue-87086-colon-path-sep.stderr20
-rw-r--r--tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs1
-rw-r--r--tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr2
-rw-r--r--tests/ui/parser/macro/bad-macro-definition.rs3
-rw-r--r--tests/ui/parser/macro/bad-macro-definition.stderr8
-rw-r--r--tests/ui/parser/macro/macro-attr-bad.rs6
-rw-r--r--tests/ui/parser/macro/macro-attr-bad.stderr26
-rw-r--r--tests/ui/parser/macro/macro-derive-bad.rs3
-rw-r--r--tests/ui/parser/macro/macro-derive-bad.stderr8
-rw-r--r--tests/ui/parser/macro/unicode-control-codepoints-macros.rs1
-rw-r--r--tests/ui/parser/macro/unicode-control-codepoints-macros.stderr10
-rw-r--r--tests/ui/parser/tuple-index-suffix-proc-macro.rs1
-rw-r--r--tests/ui/parser/tuple-index-suffix-proc-macro.stderr8
-rw-r--r--tests/ui/parser/type-ascription-in-pattern.rs17
-rw-r--r--tests/ui/parser/type-ascription-in-pattern.stderr80
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr22
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.rs4
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr4
-rw-r--r--tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr16
-rw-r--r--tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.fixed20
-rw-r--r--tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs20
-rw-r--r--tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.stderr36
-rw-r--r--tests/ui/proc-macro/add-impl.rs1
-rw-r--r--tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs1
-rw-r--r--tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr2
-rw-r--r--tests/ui/proc-macro/ambiguous-builtin-attrs.rs1
-rw-r--r--tests/ui/proc-macro/ambiguous-builtin-attrs.stderr30
-rw-r--r--tests/ui/proc-macro/append-impl.rs1
-rw-r--r--tests/ui/proc-macro/attr-args.rs1
-rw-r--r--tests/ui/proc-macro/attr-invalid-exprs.rs1
-rw-r--r--tests/ui/proc-macro/attr-invalid-exprs.stderr6
-rw-r--r--tests/ui/proc-macro/attr-on-trait.rs1
-rw-r--r--tests/ui/proc-macro/bang-macro.rs1
-rw-r--r--tests/ui/proc-macro/call-site.rs1
-rw-r--r--tests/ui/proc-macro/count_compound_ops.rs1
-rw-r--r--tests/ui/proc-macro/derive-bad.rs1
-rw-r--r--tests/ui/proc-macro/derive-bad.stderr6
-rw-r--r--tests/ui/proc-macro/derive-helper-shadowing.rs1
-rw-r--r--tests/ui/proc-macro/derive-helper-shadowing.stderr18
-rw-r--r--tests/ui/proc-macro/derive-same-struct.rs1
-rw-r--r--tests/ui/proc-macro/edition-imports-2018.rs1
-rw-r--r--tests/ui/proc-macro/env.rs1
-rw-r--r--tests/ui/proc-macro/expand-expr.rs5
-rw-r--r--tests/ui/proc-macro/expand-expr.stderr14
-rw-r--r--tests/ui/proc-macro/expand-to-unstable.rs1
-rw-r--r--tests/ui/proc-macro/expand-to-unstable.stderr2
-rw-r--r--tests/ui/proc-macro/expand-with-a-macro.rs1
-rw-r--r--tests/ui/proc-macro/gen-macro-rules-hygiene.rs1
-rw-r--r--tests/ui/proc-macro/gen-macro-rules-hygiene.stderr6
-rw-r--r--tests/ui/proc-macro/gen-macro-rules.rs1
-rw-r--r--tests/ui/proc-macro/generate-mod.rs1
-rw-r--r--tests/ui/proc-macro/generate-mod.stderr28
-rw-r--r--tests/ui/proc-macro/hygiene_example.rs1
-rw-r--r--tests/ui/proc-macro/is-available.rs1
-rw-r--r--tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs1
-rw-r--r--tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr18
-rw-r--r--tests/ui/proc-macro/issue-107113-wrap.rs1
-rw-r--r--tests/ui/proc-macro/issue-107113-wrap.stderr2
-rw-r--r--tests/ui/proc-macro/issue-118809.rs1
-rw-r--r--tests/ui/proc-macro/issue-118809.stderr4
-rw-r--r--tests/ui/proc-macro/issue-38586.rs1
-rw-r--r--tests/ui/proc-macro/issue-38586.stderr2
-rw-r--r--tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs1
-rw-r--r--tests/ui/proc-macro/issue-79148.rs1
-rw-r--r--tests/ui/proc-macro/issue-79148.stderr4
-rw-r--r--tests/ui/proc-macro/issue-83510.rs1
-rw-r--r--tests/ui/proc-macro/issue-83510.stderr8
-rw-r--r--tests/ui/proc-macro/issue-91800.rs1
-rw-r--r--tests/ui/proc-macro/issue-91800.stderr14
-rw-r--r--tests/ui/proc-macro/lifetimes-rpass.rs1
-rw-r--r--tests/ui/proc-macro/lints_in_proc_macros.rs1
-rw-r--r--tests/ui/proc-macro/lints_in_proc_macros.stderr2
-rw-r--r--tests/ui/proc-macro/load-two.rs1
-rw-r--r--tests/ui/proc-macro/macro-crate-multi-decorator.rs1
-rw-r--r--tests/ui/proc-macro/macro_rules_edition_from_pm.rs1
-rw-r--r--tests/ui/proc-macro/match-expander.rs1
-rw-r--r--tests/ui/proc-macro/match-expander.stderr2
-rw-r--r--tests/ui/proc-macro/mixed-site-span.rs1
-rw-r--r--tests/ui/proc-macro/mixed-site-span.stderr104
-rw-r--r--tests/ui/proc-macro/modify-ast.rs1
-rw-r--r--tests/ui/proc-macro/parent-source-spans.rs1
-rw-r--r--tests/ui/proc-macro/parent-source-spans.stderr42
-rw-r--r--tests/ui/proc-macro/pretty-print-hack-show.rs1
-rw-r--r--tests/ui/proc-macro/quote/basic.rs1
-rw-r--r--tests/ui/proc-macro/quote/not-quotable.stderr4
-rw-r--r--tests/ui/proc-macro/quote/not-repeatable.rs4
-rw-r--r--tests/ui/proc-macro/quote/not-repeatable.stderr11
-rw-r--r--tests/ui/proc-macro/span-api-tests.rs1
-rw-r--r--tests/ui/proc-macro/span-from-proc-macro.rs1
-rw-r--r--tests/ui/proc-macro/span-from-proc-macro.stderr8
-rw-r--r--tests/ui/proc-macro/weird-hygiene.rs1
-rw-r--r--tests/ui/proc-macro/weird-hygiene.stderr4
-rw-r--r--tests/ui/process/multi-panic.rs1
-rw-r--r--tests/ui/reborrow/custom_mut.rs13
-rw-r--r--tests/ui/reborrow/custom_mut.stderr29
-rw-r--r--tests/ui/reborrow/custom_mut_coerce_shared.rs28
-rw-r--r--tests/ui/reborrow/custom_mut_coerce_shared.stderr19
-rw-r--r--tests/ui/reborrow/option_mut.rs7
-rw-r--r--tests/ui/reborrow/option_mut.stderr21
-rw-r--r--tests/ui/reborrow/option_mut_coerce_shared.rs11
-rw-r--r--tests/ui/reborrow/option_mut_coerce_shared.stderr23
-rw-r--r--tests/ui/reborrow/pin_mut.rs10
-rw-r--r--tests/ui/reborrow/pin_mut.stderr21
-rw-r--r--tests/ui/reborrow/pin_mut_coerce_shared.rs13
-rw-r--r--tests/ui/reborrow/pin_mut_coerce_shared.stderr19
-rw-r--r--tests/ui/regions/multiple-sources-for-outlives-requirement.rs11
-rw-r--r--tests/ui/regions/multiple-sources-for-outlives-requirement.stderr20
-rw-r--r--tests/ui/regions/regions-infer-proc-static-upvar.stderr6
-rw-r--r--tests/ui/regions/regions-pattern-typing-issue-19552.stderr6
-rw-r--r--tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr4
-rw-r--r--tests/ui/repr/repr-empty-packed.stderr1
-rw-r--r--tests/ui/resolve/prelude-order.rs1
-rw-r--r--tests/ui/resolve/prelude-order.stderr10
-rw-r--r--tests/ui/resolve/unused-macro-import.rs13
-rw-r--r--tests/ui/resolve/unused-macro-import.stderr14
-rw-r--r--tests/ui/return/infer-return-ty-for-fn-sig-issue-125488.stderr44
-rw-r--r--tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs1
-rw-r--r--tests/ui/runtime/backtrace-debuginfo.rs1
-rw-r--r--tests/ui/runtime/out-of-stack.rs1
-rw-r--r--tests/ui/rust-2018/suggestions-not-always-applicable.fixed1
-rw-r--r--tests/ui/rust-2018/suggestions-not-always-applicable.rs1
-rw-r--r--tests/ui/rust-2021/reserved-prefixes-via-macro.rs1
-rw-r--r--tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs1
-rw-r--r--tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs1
-rw-r--r--tests/ui/sanitizer/cfi/transparent-has-regions.rs1
-rw-r--r--tests/ui/sanitizer/issue-111184-cfi-coroutine-witness.rs1
-rw-r--r--tests/ui/sepcomp/sepcomp-lib-lto.rs1
-rw-r--r--tests/ui/sepcomp/sepcomp-unwind.rs1
-rw-r--r--tests/ui/simd/auxiliary/simd-lane-limit.rs5
-rw-r--r--tests/ui/simd/intrinsic/generic-arithmetic-2.rs1
-rw-r--r--tests/ui/simd/intrinsic/generic-arithmetic-2.stderr56
-rw-r--r--tests/ui/simd/intrinsic/generic-elements.rs1
-rw-r--r--tests/ui/simd/intrinsic/generic-elements.stderr42
-rw-r--r--tests/ui/simd/masked-load-store-build-fail.rs1
-rw-r--r--tests/ui/simd/masked-load-store-build-fail.stderr16
-rw-r--r--tests/ui/simd/monomorphize-shuffle-index.generic.stderr2
-rw-r--r--tests/ui/simd/monomorphize-shuffle-index.rs1
-rw-r--r--tests/ui/simd/monomorphize-too-long.rs4
-rw-r--r--tests/ui/simd/monomorphize-too-long.stderr6
-rw-r--r--tests/ui/simd/monomorphize-zero-length.rs4
-rw-r--r--tests/ui/simd/monomorphize-zero-length.stderr6
-rw-r--r--tests/ui/simd/not-out-of-bounds.rs1
-rw-r--r--tests/ui/simd/not-out-of-bounds.stderr18
-rw-r--r--tests/ui/simd/simd-lane-limit-err-npow2.rs12
-rw-r--r--tests/ui/simd/simd-lane-limit-err-npow2.stderr8
-rw-r--r--tests/ui/simd/simd-lane-limit-err.rs11
-rw-r--r--tests/ui/simd/simd-lane-limit-err.stderr8
-rw-r--r--tests/ui/simd/simd-lane-limit-ok.rs14
-rw-r--r--tests/ui/simd/type-generic-monomorphisation-empty.rs4
-rw-r--r--tests/ui/simd/type-generic-monomorphisation-empty.stderr6
-rw-r--r--tests/ui/simd/type-generic-monomorphisation-oversized.rs5
-rw-r--r--tests/ui/simd/type-generic-monomorphisation-oversized.stderr6
-rw-r--r--tests/ui/span/issue-42234-unknown-receiver-type.stderr4
-rw-r--r--tests/ui/span/suggestion-non-ascii.stderr4
-rw-r--r--tests/ui/static/static-align.rs84
-rw-r--r--tests/ui/static/static-lifetime-bound.stderr6
-rw-r--r--tests/ui/static/static-region-bound.stderr6
-rw-r--r--tests/ui/structs-enums/unit-like-struct-drop-run.rs1
-rw-r--r--tests/ui/suggestions/auxiliary/hidden-struct.rs26
-rw-r--r--tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs18
-rw-r--r--tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr44
-rw-r--r--tests/ui/suggestions/issue-61963.rs1
-rw-r--r--tests/ui/suggestions/issue-61963.stderr6
-rw-r--r--tests/ui/suggestions/issue-97760.stderr7
-rw-r--r--tests/ui/suggestions/return-cycle-2.stderr11
-rw-r--r--tests/ui/suggestions/return-cycle.stderr11
-rw-r--r--tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.stderr11
-rw-r--r--tests/ui/suggestions/suggest-ref-macro.rs1
-rw-r--r--tests/ui/suggestions/suggest-ref-macro.stderr12
-rw-r--r--tests/ui/test-attrs/test-panic-abort-nocapture.rs1
-rw-r--r--tests/ui/test-attrs/test-panic-abort-nocapture.run.stderr4
-rw-r--r--tests/ui/test-attrs/test-panic-abort.rs1
-rw-r--r--tests/ui/test-attrs/test-panic-abort.run.stdout2
-rw-r--r--tests/ui/test-attrs/test-panic-while-printing.rs1
-rw-r--r--tests/ui/thread-local/long-docs.rs266
-rw-r--r--tests/ui/thread-local/no-unstable.rs17
-rw-r--r--tests/ui/thread-local/no-unstable.stderr57
-rw-r--r--tests/ui/threads-sendsync/task-stderr.rs1
-rw-r--r--tests/ui/threads-sendsync/unwind-resource.rs1
-rw-r--r--tests/ui/track-diagnostics/track.rs7
-rw-r--r--tests/ui/track-diagnostics/track.stderr6
-rw-r--r--tests/ui/traits/clone-unwind-rc-cleanup.rs1
-rw-r--r--tests/ui/traits/next-solver/cycles/ignore-head-usages-provisional-cache.rs55
-rw-r--r--tests/ui/traits/next-solver/forced-ambiguity-typenum-ice.rs60
-rw-r--r--tests/ui/traits/next-solver/opaques/overflow-hr-fn-trait-sized-1.rs25
-rw-r--r--tests/ui/traits/next-solver/opaques/overflow-hr-fn-trait-sized-2.rs14
-rw-r--r--tests/ui/traits/next-solver/well-formed-in-relate.stderr2
-rw-r--r--tests/ui/traits/next-solver/writeback-predicate-bound-region.rs14
-rw-r--r--tests/ui/traits/trait-upcasting/illegal-upcast-to-impl-opaque.rs7
-rw-r--r--tests/ui/type-alias-impl-trait/closures_in_branches.stderr4
-rw-r--r--tests/ui/type-alias-impl-trait/issue-77179.stderr11
-rw-r--r--tests/ui/type-alias-impl-trait/method_resolution_trait_method_from_opaque.next.stderr10
-rw-r--r--tests/ui/type-inference/box_has_sigdrop.rs9
-rw-r--r--tests/ui/type-inference/box_has_sigdrop.stderr17
-rw-r--r--tests/ui/type-inference/dropper_has_sigdrop.rs (renamed from tests/ui/type-inference/has_sigdrop.rs)0
-rw-r--r--tests/ui/type-inference/regression-issue-81317.stderr2
-rw-r--r--tests/ui/type/pattern_types/const_generics.rs3
-rw-r--r--tests/ui/type/pattern_types/transmute.current.stderr (renamed from tests/ui/type/pattern_types/transmute.stderr)4
-rw-r--r--tests/ui/type/pattern_types/transmute.next.stderr21
-rw-r--r--tests/ui/type/pattern_types/transmute.rs3
-rw-r--r--tests/ui/typeck/coercion-check-for-indexing-expression-issue-40861.stderr2
-rw-r--r--tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs1
-rw-r--r--tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr2
-rw-r--r--tests/ui/typeck/issue-13853.rs2
-rw-r--r--tests/ui/typeck/issue-13853.stderr12
-rw-r--r--tests/ui/typeck/issue-80779.stderr22
-rw-r--r--tests/ui/typeck/issue-98260.stderr11
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_item.stderr141
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_item_help.stderr11
-rw-r--r--tests/ui/union/union-unsafe.rs73
-rw-r--r--tests/ui/union/union-unsafe.stderr54
-rw-r--r--tests/ui/unpretty/exhaustive.hir.stdout3
-rw-r--r--tests/ui/unpretty/flattened-format-args.stdout3
-rw-r--r--tests/ui/unstable-feature-bound/unstable_impl_coherence.disabled.stderr2
-rw-r--r--tests/ui/unstable-feature-bound/unstable_impl_coherence.enabled.stderr2
-rw-r--r--tests/ui/unstable-feature-bound/unstable_impl_method_selection.stderr2
-rw-r--r--tests/ui/variance/leaking-unnameables.stderr11
-rw-r--r--tests/ui/wf/wf-in-where-clause-static.current.stderr6
-rw-r--r--tests/ui/wf/wf-in-where-clause-static.next.stderr6
648 files changed, 8591 insertions, 3076 deletions
diff --git a/tests/codegen-llvm/autodiff/abi_handling.rs b/tests/codegen-llvm/autodiff/abi_handling.rs
index 454ec698b91..5c8126898a8 100644
--- a/tests/codegen-llvm/autodiff/abi_handling.rs
+++ b/tests/codegen-llvm/autodiff/abi_handling.rs
@@ -1,7 +1,7 @@
 //@ revisions: debug release
 
-//@[debug] compile-flags: -Zautodiff=Enable -C opt-level=0 -Clto=fat
-//@[release] compile-flags: -Zautodiff=Enable -C opt-level=3 -Clto=fat
+//@[debug] compile-flags: -Zautodiff=Enable,NoTT -C opt-level=0 -Clto=fat
+//@[release] compile-flags: -Zautodiff=Enable,NoTT -C opt-level=3 -Clto=fat
 //@ no-prefer-dynamic
 //@ needs-enzyme
 
diff --git a/tests/codegen-llvm/autodiff/batched.rs b/tests/codegen-llvm/autodiff/batched.rs
index 306a6ed9d1f..dc82403212f 100644
--- a/tests/codegen-llvm/autodiff/batched.rs
+++ b/tests/codegen-llvm/autodiff/batched.rs
@@ -1,4 +1,4 @@
-//@ compile-flags: -Zautodiff=Enable -C opt-level=3  -Clto=fat
+//@ compile-flags: -Zautodiff=Enable,NoTT -C opt-level=3  -Clto=fat
 //@ no-prefer-dynamic
 //@ needs-enzyme
 //
diff --git a/tests/codegen-llvm/autodiff/scalar.rs b/tests/codegen-llvm/autodiff/scalar.rs
index 55b989f920d..53672a89230 100644
--- a/tests/codegen-llvm/autodiff/scalar.rs
+++ b/tests/codegen-llvm/autodiff/scalar.rs
@@ -1,4 +1,4 @@
-//@ compile-flags: -Zautodiff=Enable -C opt-level=3  -Clto=fat
+//@ compile-flags: -Zautodiff=Enable,NoTT -C opt-level=3  -Clto=fat
 //@ no-prefer-dynamic
 //@ needs-enzyme
 #![feature(autodiff)]
diff --git a/tests/codegen-llvm/autodiff/sret.rs b/tests/codegen-llvm/autodiff/sret.rs
index dbc253ce894..498cd3fea01 100644
--- a/tests/codegen-llvm/autodiff/sret.rs
+++ b/tests/codegen-llvm/autodiff/sret.rs
@@ -1,4 +1,4 @@
-//@ compile-flags: -Zautodiff=Enable -C opt-level=3  -Clto=fat
+//@ compile-flags: -Zautodiff=Enable,NoTT -C opt-level=3  -Clto=fat
 //@ no-prefer-dynamic
 //@ needs-enzyme
 
diff --git a/tests/codegen-llvm/autodiff/typetree.rs b/tests/codegen-llvm/autodiff/typetree.rs
new file mode 100644
index 00000000000..1cb0c2fb68b
--- /dev/null
+++ b/tests/codegen-llvm/autodiff/typetree.rs
@@ -0,0 +1,33 @@
+//@ compile-flags: -Zautodiff=Enable -C opt-level=3 -Clto=fat
+//@ no-prefer-dynamic
+//@ needs-enzyme
+
+// Test that basic autodiff still works with our TypeTree infrastructure
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+
+#[autodiff_reverse(d_simple, Duplicated, Active)]
+#[no_mangle]
+#[inline(never)]
+fn simple(x: &f64) -> f64 {
+    2.0 * x
+}
+
+// CHECK-LABEL: @simple
+// CHECK: fmul double
+
+// The derivative function should be generated normally
+// CHECK-LABEL: diffesimple
+// CHECK: fadd fast double
+
+fn main() {
+    let x = std::hint::black_box(3.0);
+    let output = simple(&x);
+    assert_eq!(6.0, output);
+
+    let mut df_dx = 0.0;
+    let output_ = d_simple(&x, &mut df_dx, 1.0);
+    assert_eq!(output, output_);
+    assert_eq!(2.0, df_dx);
+}
diff --git a/tests/codegen-llvm/autodiff/void_ret.rs b/tests/codegen-llvm/autodiff/void_ret.rs
new file mode 100644
index 00000000000..98c6b98eef4
--- /dev/null
+++ b/tests/codegen-llvm/autodiff/void_ret.rs
@@ -0,0 +1,41 @@
+//@ compile-flags: -Zautodiff=Enable,NoTT,NoPostopt -C no-prepopulate-passes -C opt-level=3  -Clto=fat
+//@ no-prefer-dynamic
+//@ needs-enzyme
+
+#![feature(autodiff)]
+use std::autodiff::*;
+
+// Usually we would store the return value of the differentiated function.
+// However, if the return type is void or an empty struct,
+// we don't need to store anything. Verify this, since it caused a bug.
+
+// CHECK:; void_ret::main
+// CHECK-NEXT:    ; Function Attrs:
+// CHECK-NEXT:    define internal
+// CHECK-NOT: store {} undef, ptr undef
+// CHECK: ret void
+
+#[autodiff_reverse(bar, Duplicated, Duplicated)]
+pub fn foo(r: &[f64; 10], res: &mut f64) {
+    let mut output = [0.0; 10];
+    output[0] = r[0];
+    output[1] = r[1] * r[2];
+    output[2] = r[4] * r[5];
+    output[3] = r[2] * r[6];
+    output[4] = r[1] * r[7];
+    output[5] = r[2] * r[8];
+    output[6] = r[1] * r[9];
+    output[7] = r[5] * r[6];
+    output[8] = r[5] * r[7];
+    output[9] = r[4] * r[8];
+    *res = output.iter().sum();
+}
+fn main() {
+    let inputs = Box::new([3.1; 10]);
+    let mut d_inputs = Box::new([0.0; 10]);
+    let mut res = Box::new(0.0);
+    let mut d_res = Box::new(1.0);
+
+    bar(&inputs, &mut d_inputs, &mut res, &mut d_res);
+    dbg!(&d_inputs);
+}
diff --git a/tests/codegen-llvm/debug-fndef-size.rs b/tests/codegen-llvm/debug-fndef-size.rs
index 8f716c34e7b..02629bd748c 100644
--- a/tests/codegen-llvm/debug-fndef-size.rs
+++ b/tests/codegen-llvm/debug-fndef-size.rs
@@ -16,5 +16,5 @@ pub fn main() {
 
 // CHECK: %compare.dbg.spill = alloca [0 x i8], align 1
 // CHECK: dbg{{.}}declare({{(metadata )?}}ptr %compare.dbg.spill, {{(metadata )?}}![[VAR:.*]], {{(metadata )?}}!DIExpression()
-// CHECK: ![[TYPE:.*]] = !DIDerivedType(tag: DW_TAG_pointer_type, name: "fn(&i32, &i32) -> core::cmp::Ordering", baseType: !{{.*}}, align: 8, dwarfAddressSpace: {{.*}})
-// CHECK: ![[VAR]] = !DILocalVariable(name: "compare", scope: !{{.*}}, file: !{{.*}}, line: {{.*}}, type: ![[TYPE]], align: 8)
+// CHECK-DAG: ![[TYPE:.*]] = !DIDerivedType(tag: DW_TAG_pointer_type, name: "fn(&i32, &i32) -> core::cmp::Ordering", baseType: !{{.*}}, align: 8, dwarfAddressSpace: {{.*}})
+// CHECK-DAG: ![[VAR]] = !DILocalVariable(name: "compare", scope: !{{.*}}, file: !{{.*}}, line: {{.*}}, type: ![[TYPE]], align: 8)
diff --git a/tests/codegen-llvm/debuginfo-dse.rs b/tests/codegen-llvm/debuginfo-dse.rs
new file mode 100644
index 00000000000..fd0c9f1c676
--- /dev/null
+++ b/tests/codegen-llvm/debuginfo-dse.rs
@@ -0,0 +1,362 @@
+//@ compile-flags: -Copt-level=3 -g -Zverify-llvm-ir -Zmerge-functions=disabled
+//@ revisions: CODEGEN OPTIMIZED
+//@[CODEGEN] compile-flags: -Cno-prepopulate-passes
+//@ only-64bit
+// ignore-tidy-linelength
+
+#![crate_type = "lib"]
+#![feature(repr_simd, rustc_attrs)]
+
+// The pass mode is direct and the backend represent is scalar.
+type Scalar = i32; // scalar(i32)
+type Scalar_Ref = &'static i32; // scalar(ptr)
+
+// The pass modes are pair and the backend represents are scalar pair.
+type Tuple_Scalar_Scalar = (i32, i32);
+struct Tuple_Ref_Scalar(&'static i32, i32);
+struct Tuple_ArrayRef_Scalar(&'static [i32; 16], i32); // pair(ptr, i32)
+impl Default for Tuple_ArrayRef_Scalar {
+    fn default() -> Tuple_ArrayRef_Scalar {
+        Tuple_ArrayRef_Scalar(&[0; 16], 0)
+    }
+}
+struct Tuple_Scalar_ArrayRef(i32, &'static [i32; 16]); // pair(i32, ptr)
+impl Default for Tuple_Scalar_ArrayRef {
+    fn default() -> Tuple_Scalar_ArrayRef {
+        Tuple_Scalar_ArrayRef(0, &[0; 16])
+    }
+}
+// The pass mode is indirect and the backend represent is memory.
+type Tuple_SliceRef_Scalar = (&'static [i32], i32);
+
+// The pass mode is pair and the backend represent is scalar pair.
+type SliceRef = &'static [i32]; // pair(ptr, i32)
+// The pass mode is indirect and the backend represent is memory.
+type Array = [i32; 16];
+// The pass mode is direct and the backend represent is scalar.
+type ArrayRef = &'static [i32; 16];
+
+// The pass mode is indirect and the backend represent is memory.
+type Typle_i32_i64_i8 = (i32, i64, i8);
+// The pass mode is indirect and the backend represent is memory.
+#[repr(C)]
+struct Aggregate_i32_Array_i8(i32, &'static [i32; 16], i8);
+
+type ZST = ();
+
+impl Default for Aggregate_i32_Array_i8 {
+    fn default() -> Aggregate_i32_Array_i8 {
+        Aggregate_i32_Array_i8(0, &[0; 16], 0)
+    }
+}
+// The pass mode is cast and the backend represent is scalar.
+#[derive(Default)]
+struct Aggregate_4xi8(i8, i8, i8, i8); // scalar(i32)
+
+// The pass mode is indirect and the backend represent is simd vector.
+#[repr(simd)]
+struct Simd_i32x4([i32; 4]);
+
+unsafe extern "Rust" {
+    #[rustc_nounwind]
+    safe fn opaque_fn();
+    #[rustc_nounwind]
+    safe fn opaque_ptr(_: *const core::ffi::c_void);
+}
+
+#[inline(never)]
+#[rustc_nounwind]
+fn opaque_use<T>(p: &T) {
+    opaque_ptr(&raw const p as *const _);
+}
+
+#[inline(never)]
+#[rustc_nounwind]
+fn opaque_read<T: Default>() -> T {
+    core::hint::black_box(T::default())
+}
+
+#[unsafe(no_mangle)]
+fn local_var() {
+    // CHECK-LABEL: define{{( dso_local)?}} void @local_var
+    let local_var_scalar: Scalar = opaque_read();
+    opaque_use(&local_var_scalar);
+    let dead_local_var_scalar: Scalar = opaque_read();
+    let local_var_aggregate_4xi8: Aggregate_4xi8 = opaque_read();
+    opaque_use(&local_var_aggregate_4xi8);
+    let local_var_aggregate_i32_array_i8: Aggregate_i32_Array_i8 = opaque_read();
+    opaque_use(&local_var_aggregate_i32_array_i8);
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+    // CHECK-NEXT: #dbg_value(ptr %local_var_scalar, [[ref_local_var_scalar:![0-9]+]], !DIExpression()
+    let ref_local_var_scalar = &local_var_scalar;
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_dead_local_var_scalar:![0-9]+]], !DIExpression()
+    let ref_dead_local_var_scalar = &dead_local_var_scalar;
+    // CHECK-NEXT: #dbg_value(ptr %local_var_aggregate_4xi8, [[ref_local_var_aggregate_4xi8:![0-9]+]], !DIExpression()
+    let ref_local_var_aggregate_4xi8 = &local_var_aggregate_4xi8;
+    // CHECK-NEXT: #dbg_value(ptr %local_var_aggregate_4xi8, [[ref_0_local_var_aggregate_4xi8:![0-9]+]], !DIExpression()
+    let ref_0_local_var_aggregate_4xi8 = &local_var_aggregate_4xi8.0;
+    // CHECK-NEXT: #dbg_value(ptr %local_var_aggregate_4xi8, [[ref_2_local_var_aggregate_4xi8:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 2, DW_OP_stack_value)
+    let ref_2_local_var_aggregate_4xi8 = &local_var_aggregate_4xi8.2;
+    // This introduces an extra load instruction.
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_1_1_local_var_aggregate_i32_array_i8:![0-9]+]], !DIExpression()
+    let ref_1_1_local_var_aggregate_i32_array_i8 = &local_var_aggregate_i32_array_i8.1[1];
+    // CHECK-NEXT: #dbg_value(ptr %local_var_aggregate_i32_array_i8, [[ref_2_local_var_aggregate_i32_array_i8:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 16, DW_OP_stack_value)
+    let ref_2_local_var_aggregate_i32_array_i8 = &local_var_aggregate_i32_array_i8.2;
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+}
+
+#[unsafe(no_mangle)]
+fn zst(zst: ZST, zst_ref: &ZST) {
+    // CHECK-LABEL: define{{( dso_local)?}} void @zst
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_zst:![0-9]+]], !DIExpression()
+    let ref_zst = &zst;
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_zst_ref:![0-9]+]], !DIExpression()
+    let ref_zst_ref = &zst_ref;
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+}
+
+// It only makes sense if the argument is a reference and it refer to projections.
+#[unsafe(no_mangle)]
+fn direct(
+    scalar: Scalar,
+    scalar_ref: Scalar_Ref,
+    array_ref: ArrayRef,
+    aggregate_4xi8_ref: &Aggregate_4xi8,
+) {
+    // CHECK-LABEL: define{{( dso_local)?}} void @direct
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_scalar:![0-9]+]], !DIExpression()
+    let ref_scalar = &scalar;
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_scalar_ref:![0-9]+]], !DIExpression()
+    let ref_scalar_ref = &scalar_ref;
+    // CHECK-NEXT: #dbg_value(ptr %array_ref, [[ref_0_array_ref:![0-9]+]], !DIExpression()
+    let ref_0_array_ref = &array_ref[0];
+    // CHECK-NEXT: #dbg_value(ptr %array_ref, [[ref_1_array_ref:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 4, DW_OP_stack_value)
+    let ref_1_array_ref = &array_ref[1];
+    // CHECK-NEXT: #dbg_value(ptr %aggregate_4xi8_ref, [[ref_1_aggregate_4xi8_ref:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 1, DW_OP_stack_value)
+    let ref_1_aggregate_4xi8_ref = &aggregate_4xi8_ref.1;
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+}
+
+// Arguments are passed through registers, the final values are poison.
+#[unsafe(no_mangle)]
+fn cast(aggregate_4xi8: Aggregate_4xi8) {
+    // CHECK-LABEL: define{{( dso_local)?}} void @cast(i32 %0)
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+    // The temporary allocated variable is eliminated.
+    // CODEGEN-NEXT: #dbg_value(ptr %aggregate_4xi8, [[ref_aggregate_4xi8:![0-9]+]], !DIExpression()
+    // OPTIMIZED-NEXT: #dbg_value(ptr undef, [[ref_aggregate_4xi8:![0-9]+]], !DIExpression()
+    let ref_aggregate_4xi8 = &aggregate_4xi8;
+    // CODEGEN-NEXT: #dbg_value(ptr %aggregate_4xi8, [[ref_0_aggregate_4xi8:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 1, DW_OP_stack_value)
+    // OPTIMIZED-NEXT: #dbg_value(ptr undef, [[ref_0_aggregate_4xi8:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 1, DW_OP_stack_value)
+    let ref_0_aggregate_4xi8 = &aggregate_4xi8.1;
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+}
+
+// Arguments are passed indirectly via a pointer.
+// The reference of argument is the pointer itself.
+#[unsafe(no_mangle)]
+fn indirect(
+    tuple_sliceref_scalar: Tuple_SliceRef_Scalar,
+    array: Array,
+    typle_i32_i64_i8: Typle_i32_i64_i8,
+    simd_i32x4: Simd_i32x4,
+) {
+    // CHECK-LABEL: define{{( dso_local)?}} void @indirect
+    // CHECK-SAME: (ptr{{.*}} %tuple_sliceref_scalar, ptr{{.*}} %array, ptr{{.*}} %typle_i32_i64_i8, ptr{{.*}} %simd_i32x4)
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+    // CHECK-NEXT: #dbg_value(ptr %tuple_sliceref_scalar, [[ref_tuple_sliceref_scalar:![0-9]+]], !DIExpression()
+    let ref_tuple_sliceref_scalar = &tuple_sliceref_scalar;
+    // CHECK-NEXT: #dbg_value(ptr %tuple_sliceref_scalar, [[ref_1_tuple_sliceref_scalar:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 16, DW_OP_stack_value)
+    let ref_1_tuple_sliceref_scalar = &tuple_sliceref_scalar.1;
+    // CHECK-NEXT: #dbg_value(ptr %array, [[ref_1_array:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 4, DW_OP_stack_value)
+    let ref_1_array = &array[1];
+    // CHECK-NEXT: #dbg_value(ptr %typle_i32_i64_i8, [[ref_1_typle_i32_i64_i8:![0-9]+]], !DIExpression()
+    let ref_1_typle_i32_i64_i8 = &typle_i32_i64_i8.1;
+    // CHECK-NEXT: #dbg_value(ptr %simd_i32x4, [[ref_simd_i32x4:![0-9]+]], !DIExpression()
+    let ref_simd_i32x4 = &simd_i32x4;
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+}
+
+// They are different MIR statements, but they have the same LLVM IR statement due to the ABI of arguments.
+// Both `direct_ref` and `indirect_byval` are passed as a pointer here.
+#[unsafe(no_mangle)]
+fn direct_ref_and_indirect(
+    direct_ref: &Aggregate_i32_Array_i8,
+    indirect_byval: Aggregate_i32_Array_i8,
+) {
+    // CHECK-LABEL: define{{( dso_local)?}} void @direct_ref_and_indirect
+    // CHECK-SAME: (ptr{{.*}} %direct_ref, ptr{{.*}} %indirect_byval)
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_direct_ref:![0-9]+]], !DIExpression()
+    let ref_direct_ref: &&Aggregate_i32_Array_i8 = &direct_ref;
+    // CHECK-NEXT: #dbg_value(ptr %direct_ref, [[ref_1_direct_ref:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 8, DW_OP_stack_value)
+    let ref_1_direct_ref = &direct_ref.1;
+    // CHECK-NEXT: #dbg_value(ptr %indirect_byval, [[ref_indirect_byval:![0-9]+]], !DIExpression()
+    let ref_indirect_byval: &Aggregate_i32_Array_i8 = &indirect_byval;
+    // CHECK-NEXT: #dbg_value(ptr %indirect_byval, [[ref_1_indirect_byval:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 8, DW_OP_stack_value)
+    let ref_1_indirect_byval = &indirect_byval.1;
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+}
+
+#[unsafe(no_mangle)]
+fn pair(
+    tuple_scalar_scalar: Tuple_Scalar_Scalar,
+    tuple_ref_scalar: Tuple_Ref_Scalar,
+    tuple_arrayref_scalar: Tuple_ArrayRef_Scalar,
+    tuple_scalar_arrayref: Tuple_Scalar_ArrayRef,
+    sliceref: SliceRef,
+) {
+    // CHECK-LABEL: define{{( dso_local)?}} void @pair
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_0_tuple_scalar_scalar:![0-9]+]], !DIExpression()
+    let ref_0_tuple_scalar_scalar = &tuple_scalar_scalar.0;
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_0_tuple_ref_scalar:![0-9]+]], !DIExpression()
+    let ref_0_tuple_ref_scalar = &tuple_ref_scalar.0;
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_1_tuple_ref_scalar:![0-9]+]], !DIExpression()
+    let ref_1_tuple_ref_scalar = &tuple_ref_scalar.1;
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_0_tuple_arrayref_scalar:![0-9]+]], !DIExpression()
+    let ref_0_tuple_arrayref_scalar = &tuple_arrayref_scalar.0;
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_1_tuple_arrayref_scalar:![0-9]+]], !DIExpression()
+    let ref_1_tuple_arrayref_scalar = &tuple_arrayref_scalar.1;
+    // FIXME: This can be a valid value.
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_0_1_tuple_arrayref_scalar:![0-9]+]], !DIExpression()
+    let ref_0_1_tuple_arrayref_scalar = &tuple_arrayref_scalar.0[1];
+    // FIXME: This can be a valid value.
+    // CHECK-NEXT: #dbg_value(ptr poison, [[ref_1_1_tuple_scalar_arrayref:![0-9]+]], !DIExpression()
+    let ref_1_1_tuple_scalar_arrayref = &tuple_scalar_arrayref.1[1];
+    // CHECK: #dbg_value(ptr %sliceref.0, [[ref_1_sliceref:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 4, DW_OP_stack_value)
+    let ref_1_sliceref = &sliceref[1];
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+}
+
+#[repr(C)]
+#[derive(Clone, Copy)]
+pub struct Foo(i32, i64, i32);
+
+#[repr(C)]
+pub struct Bar<'a> {
+    a: i32,
+    b: i64,
+    foo: &'a Foo,
+}
+
+#[unsafe(no_mangle)]
+pub fn dead_first(dead_first_foo: &Foo) -> &i32 {
+    // CHECK-LABEL: def {{.*}} ptr @dead_first
+    // CHECK-SAME: (ptr {{.*}} [[ARG_dead_first_foo:%.*]])
+    // CODEGEN: #dbg_declare(ptr %dead_first_foo.dbg.spill, [[ARG_dead_first_foo:![0-9]+]], !DIExpression()
+    // OPTIMIZED: #dbg_value(ptr %dead_first_foo, [[ARG_dead_first_foo:![0-9]+]], !DIExpression()
+    // CHECK: #dbg_value(ptr %dead_first_foo, [[VAR_dead_first_v0:![0-9]+]], !DIExpression()
+    // CHECK: %dead_first_v0 = getelementptr{{.*}} i8, ptr %dead_first_foo, i64 16
+    // CODEGEN: #dbg_declare(ptr %dead_first_v0.dbg.spill, [[VAR_dead_first_v0]], !DIExpression()
+    // OPTIMIZED: #dbg_value(ptr %dead_first_v0, [[VAR_dead_first_v0]], !DIExpression()
+    let mut dead_first_v0 = &dead_first_foo.0;
+    dead_first_v0 = &dead_first_foo.2;
+    dead_first_v0
+}
+
+#[unsafe(no_mangle)]
+pub fn fragment(fragment_v1: Foo, mut fragment_v2: Foo) -> Foo {
+    // CHECK-LABEL: define{{( dso_local)?}} void @fragment
+    // CHECK-SAME: (ptr {{.*}}, ptr {{.*}} [[ARG_fragment_v1:%.*]], ptr {{.*}} [[ARG_fragment_v2:%.*]])
+    // CHECK: #dbg_declare(ptr [[ARG_fragment_v1]]
+    // CHECK-NEXT: #dbg_declare(ptr [[ARG_fragment_v2]]
+    // CHECK-NEXT: #dbg_value(ptr [[ARG_fragment_v2]], [[VAR_fragment_f:![0-9]+]], !DIExpression(DW_OP_LLVM_fragment, 0, 64)
+    // CHECK-NEXT: #dbg_value(ptr [[ARG_fragment_v1]], [[VAR_fragment_f:![0-9]+]], !DIExpression(DW_OP_LLVM_fragment, 64, 64)
+    let fragment_f = || {
+        fragment_v2 = fragment_v1;
+    };
+    fragment_v2 = fragment_v1;
+    fragment_v2
+}
+
+#[unsafe(no_mangle)]
+pub fn deref(bar: Bar) -> i32 {
+    // CHECK-LABEL: define{{.*}} i32 @deref
+    // We are unable to represent dereference within this expression.
+    // CHECK: #dbg_value(ptr poison, [[VAR_deref_dead:![0-9]+]], !DIExpression()
+    let deref_dead = &bar.foo.2;
+    bar.a
+}
+
+#[unsafe(no_mangle)]
+fn index(slice: &[i32; 4], idx: usize) -> i32 {
+    // CHECK-LABEL: define{{.*}} i32 @index
+    // CHECK: call void @opaque_fn()
+    opaque_fn();
+    // CHECK: #dbg_value(ptr poison, [[VAR_index_from_var:![0-9]+]], !DIExpression()
+    let index_from_var = &slice[idx];
+    // CHECK: #dbg_value(ptr %slice, [[VAR_const_index_from_start:![0-9]+]], !DIExpression()
+    // CHECK-NEXT: #dbg_value(ptr poison, [[VAR_const_index_from_end:![0-9]+]], !DIExpression()
+    let [ref const_index_from_start, .., ref const_index_from_end] = slice[..] else {
+        return 0;
+    };
+    slice[0]
+}
+
+// CHECK-DAG: [[ref_local_var_scalar]] = !DILocalVariable(name: "ref_local_var_scalar"
+// CHECK-DAG: [[ref_dead_local_var_scalar]] = !DILocalVariable(name: "ref_dead_local_var_scalar"
+// CHECK-DAG: [[ref_local_var_aggregate_4xi8]] = !DILocalVariable(name: "ref_local_var_aggregate_4xi8"
+// CHECK-DAG: [[ref_0_local_var_aggregate_4xi8]] = !DILocalVariable(name: "ref_0_local_var_aggregate_4xi8"
+// CHECK-DAG: [[ref_2_local_var_aggregate_4xi8]] = !DILocalVariable(name: "ref_2_local_var_aggregate_4xi8"
+// CHECK-DAG: [[ref_1_1_local_var_aggregate_i32_array_i8]] = !DILocalVariable(name: "ref_1_1_local_var_aggregate_i32_array_i8"
+// CHECK-DAG: [[ref_2_local_var_aggregate_i32_array_i8]] = !DILocalVariable(name: "ref_2_local_var_aggregate_i32_array_i8"
+
+// CHECK-DAG: [[ref_zst]] = !DILocalVariable(name: "ref_zst"
+// CHECK-DAG: [[ref_zst_ref]] = !DILocalVariable(name: "ref_zst_ref"
+
+// CHECK-DAG: [[ref_scalar]] = !DILocalVariable(name: "ref_scalar"
+// CHECK-DAG: [[ref_scalar_ref]] = !DILocalVariable(name: "ref_scalar_ref"
+// CHECK-DAG: [[ref_0_array_ref]] = !DILocalVariable(name: "ref_0_array_ref"
+// CHECK-DAG: [[ref_1_array_ref]] = !DILocalVariable(name: "ref_1_array_ref"
+// CHECK-DAG: [[ref_1_aggregate_4xi8_ref]] = !DILocalVariable(name: "ref_1_aggregate_4xi8_ref"
+
+// CHECK-DAG: [[ref_aggregate_4xi8]] = !DILocalVariable(name: "ref_aggregate_4xi8"
+// CHECK-DAG: [[ref_0_aggregate_4xi8]] = !DILocalVariable(name: "ref_0_aggregate_4xi8"
+
+// CHECK-DAG: [[ref_tuple_sliceref_scalar]] = !DILocalVariable(name: "ref_tuple_sliceref_scalar"
+// CHECK-DAG: [[ref_1_tuple_sliceref_scalar]] = !DILocalVariable(name: "ref_1_tuple_sliceref_scalar"
+// CHECK-DAG: [[ref_1_array]] = !DILocalVariable(name: "ref_1_array"
+// CHECK-DAG: [[ref_1_typle_i32_i64_i8]] = !DILocalVariable(name: "ref_1_typle_i32_i64_i8"
+// CHECK-DAG: [[ref_simd_i32x4]] = !DILocalVariable(name: "ref_simd_i32x4"
+
+// CHECK-DAG: [[ref_direct_ref]] = !DILocalVariable(name: "ref_direct_ref"
+// CHECK-DAG: [[ref_1_direct_ref]] = !DILocalVariable(name: "ref_1_direct_ref"
+// CHECK-DAG: [[ref_indirect_byval]] = !DILocalVariable(name: "ref_indirect_byval"
+// CHECK-DAG: [[ref_1_indirect_byval]] = !DILocalVariable(name: "ref_1_indirect_byval"
+
+// CHECK-DAG: [[ref_0_tuple_scalar_scalar]] = !DILocalVariable(name: "ref_0_tuple_scalar_scalar"
+// CHECK-DAG: [[ref_0_tuple_ref_scalar]] = !DILocalVariable(name: "ref_0_tuple_ref_scalar"
+// CHECK-DAG: [[ref_1_tuple_ref_scalar]] = !DILocalVariable(name: "ref_1_tuple_ref_scalar"
+// CHECK-DAG: [[ref_0_tuple_arrayref_scalar]] = !DILocalVariable(name: "ref_0_tuple_arrayref_scalar"
+// CHECK-DAG: [[ref_1_tuple_arrayref_scalar]] = !DILocalVariable(name: "ref_1_tuple_arrayref_scalar"
+// CHECK-DAG: [[ref_0_1_tuple_arrayref_scalar]] = !DILocalVariable(name: "ref_0_1_tuple_arrayref_scalar"
+// CHECK-DAG: [[ref_1_1_tuple_scalar_arrayref]] = !DILocalVariable(name: "ref_1_1_tuple_scalar_arrayref"
+// CHECK-DAG: [[ref_1_sliceref]] = !DILocalVariable(name: "ref_1_sliceref"
+
+// CHECK-DAG: [[ARG_dead_first_foo]] = !DILocalVariable(name: "dead_first_foo"
+// CHECK-DAG: [[VAR_dead_first_v0]] = !DILocalVariable(name: "dead_first_v0"
+
+// CHECK-DAG: [[VAR_fragment_f]] = !DILocalVariable(name: "fragment_f"
+
+// CHECK-DAG: [[VAR_deref_dead]] = !DILocalVariable(name: "deref_dead"
+
+// CHECK-DAG: [[VAR_index_from_var]] = !DILocalVariable(name: "index_from_var"
+// CHECK-DAG: [[VAR_const_index_from_start]] = !DILocalVariable(name: "const_index_from_start"
+// CHECK-DAG: [[VAR_const_index_from_end]] = !DILocalVariable(name: "const_index_from_end"
diff --git a/tests/codegen-llvm/global-allocator-attributes.rs b/tests/codegen-llvm/global-allocator-attributes.rs
new file mode 100644
index 00000000000..472ca772075
--- /dev/null
+++ b/tests/codegen-llvm/global-allocator-attributes.rs
@@ -0,0 +1,41 @@
+//@ compile-flags: -C opt-level=3
+#![crate_type = "lib"]
+
+mod foobar {
+    use std::alloc::{GlobalAlloc, Layout};
+
+    struct Allocator;
+
+    unsafe impl GlobalAlloc for Allocator {
+        unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
+            // CHECK-LABEL: ; __rustc::__rust_alloc
+            // CHECK-NEXT: ; Function Attrs: {{.*}}allockind("alloc,uninitialized,aligned") allocsize(0){{.*}}
+            // CHECK-NEXT: define{{.*}} noalias{{.*}} ptr @{{.*}}__rust_alloc(i[[SIZE:[0-9]+]] {{.*}}%size, i[[SIZE]] allocalign{{.*}} %align)
+            panic!()
+        }
+
+        unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
+            // CHECK-LABEL: ; __rustc::__rust_dealloc
+            // CHECK-NEXT: ; Function Attrs: {{.*}}allockind("free"){{.*}}
+            // CHECK-NEXT: define{{.*}} void @{{.*}}__rust_dealloc(ptr allocptr{{.*}} %ptr, i[[SIZE]] {{.*}} %size, i[[SIZE]] {{.*}} %align)
+            panic!()
+        }
+
+        unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
+            // CHECK-LABEL: ; __rustc::__rust_realloc
+            // CHECK-NEXT: ; Function Attrs: {{.*}}allockind("realloc,aligned") allocsize(3){{.*}}
+            // CHECK-NEXT: define{{.*}} noalias{{.*}} ptr @{{.*}}__rust_realloc(ptr allocptr{{.*}} %ptr, i[[SIZE]] {{.*}} %size, i[[SIZE]] allocalign{{.*}} %align, i[[SIZE]] {{.*}} %new_size)
+            panic!()
+        }
+
+        unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 {
+            // CHECK-LABEL: ; __rustc::__rust_alloc_zeroed
+            // CHECK-NEXT: ; Function Attrs: {{.*}}allockind("alloc,zeroed,aligned") allocsize(0){{.*}}
+            // CHECK-NEXT: define{{.*}} noalias{{.*}} ptr @{{.*}}__rust_alloc_zeroed(i[[SIZE]] {{.*}} %size, i[[SIZE]] allocalign{{.*}} %align)
+            panic!()
+        }
+    }
+
+    #[global_allocator]
+    static GLOBAL: Allocator = Allocator;
+}
diff --git a/tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs b/tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs
index 853a1ff36b1..a0b453fac8e 100644
--- a/tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs
+++ b/tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs
@@ -1,4 +1,7 @@
 //@ compile-flags: -Copt-level=3
+//@ revisions: new old
+//@ [old] max-llvm-major-version: 21
+//@ [new] min-llvm-version: 22
 
 #![crate_type = "lib"]
 
@@ -22,8 +25,8 @@ pub unsafe fn update(s: *mut State) {
     // CHECK-NOT: memcpy
     // CHECK-NOT: 75{{3|4}}
 
-    // CHECK: %[[TAG:.+]] = load i8, ptr %s, align 1
-    // CHECK-NEXT: trunc nuw i8 %[[TAG]] to i1
+    // old: %[[TAG:.+]] = load i8, ptr %s, align 1
+    // old-NEXT: trunc nuw i8 %[[TAG]] to i1
 
     // CHECK-NOT: load
     // CHECK-NOT: store
diff --git a/tests/codegen-llvm/pattern_type_symbols.rs b/tests/codegen-llvm/pattern_type_symbols.rs
index e86a9ef27de..a90262ff12d 100644
--- a/tests/codegen-llvm/pattern_type_symbols.rs
+++ b/tests/codegen-llvm/pattern_type_symbols.rs
@@ -16,7 +16,7 @@ pub fn bar() {
     // CHECK: call pattern_type_symbols::foo::<u32>
     // CHECK: call void @_RINvC[[CRATE_IDENT:[a-zA-Z0-9]{12}]]_20pattern_type_symbols3foomEB2_
     foo::<u32>();
-    // CHECK: call pattern_type_symbols::foo::<(u32, [(); 0], [(); 999999999])>
-    // CHECK: call void @_RINvC[[CRATE_IDENT]]_20pattern_type_symbols3fooTmAum0_Aum3b9ac9ff_EEB2_
+    // CHECK: call pattern_type_symbols::foo::<u32 is 0..=999999999>
+    // CHECK: call void @_RINvC[[CRATE_IDENT]]_20pattern_type_symbols3fooWmRm0_m3b9ac9ff_EB2_
     foo::<NanoU32>();
 }
diff --git a/tests/codegen-llvm/unwind-abis/c-unwind-abi-panic-abort.rs b/tests/codegen-llvm/unwind-abis/c-unwind-abi-panic-abort.rs
index 8d2745ba2f7..2ce1d1b2e00 100644
--- a/tests/codegen-llvm/unwind-abis/c-unwind-abi-panic-abort.rs
+++ b/tests/codegen-llvm/unwind-abis/c-unwind-abi-panic-abort.rs
@@ -1,4 +1,9 @@
 //@ compile-flags: -C panic=abort
+//@ revisions: NONWASM WASM WASMEXN
+//@ [NONWASM] ignore-wasm32
+//@ [WASM] only-wasm32
+//@ [WASMEXN] only-wasm32
+//@ [WASMEXN] compile-flags: -Ctarget-feature=+exception-handling
 
 // Test that `nounwind` attributes are also applied to extern `C-unwind` Rust functions
 // when the code is compiled with `panic=abort`.
@@ -9,7 +14,9 @@
 #[no_mangle]
 pub unsafe extern "C-unwind" fn rust_item_that_can_unwind() {
     // Handle both legacy and v0 symbol mangling.
-    // CHECK: call void @{{.*core9panicking19panic_cannot_unwind}}
+    // NONWASM: call void @{{.*core9panicking19panic_cannot_unwind}}
+    // WASMEXN: call void @{{.*core9panicking19panic_cannot_unwind}}
+    // WASM-NOT: call void @{{.*core9panicking19panic_cannot_unwind}}
     may_unwind();
 }
 
diff --git a/tests/codegen-llvm/unwind-and-panic-abort.rs b/tests/codegen-llvm/unwind-and-panic-abort.rs
index 8efa140058a..c2838be00af 100644
--- a/tests/codegen-llvm/unwind-and-panic-abort.rs
+++ b/tests/codegen-llvm/unwind-and-panic-abort.rs
@@ -1,4 +1,9 @@
 //@ compile-flags: -C panic=abort
+//@ revisions: NONWASM WASM WASMEXN
+//@ [NONWASM] ignore-wasm32
+//@ [WASM] only-wasm32
+//@ [WASMEXN] only-wasm32
+//@ [WASMEXN] compile-flags: -Ctarget-feature=+exception-handling
 
 #![crate_type = "lib"]
 
@@ -9,7 +14,9 @@ extern "C-unwind" {
 // CHECK: Function Attrs:{{.*}}nounwind
 // CHECK-NEXT: define{{.*}}void @foo
 // Handle both legacy and v0 symbol mangling.
-// CHECK: call void @{{.*core9panicking19panic_cannot_unwind}}
+// NONWASM: call void @{{.*core9panicking19panic_cannot_unwind}}
+// WASMEXN: call void @{{.*core9panicking19panic_cannot_unwind}}
+// WASM-NOT: call void @{{.*core9panicking19panic_cannot_unwind}}
 #[no_mangle]
 pub unsafe extern "C" fn foo() {
     bar();
diff --git a/tests/codegen-llvm/vec_pop_push_noop.rs b/tests/codegen-llvm/vec_pop_push_noop.rs
index 3e375219fe0..977c220b3ba 100644
--- a/tests/codegen-llvm/vec_pop_push_noop.rs
+++ b/tests/codegen-llvm/vec_pop_push_noop.rs
@@ -1,4 +1,7 @@
 //@ compile-flags: -Copt-level=3
+//@ revisions: new old
+//@ [old] max-llvm-major-version: 21
+//@ [new] min-llvm-version: 22
 
 #![crate_type = "lib"]
 
@@ -7,7 +10,7 @@
 pub fn noop(v: &mut Vec<u8>) {
     // CHECK-NOT: grow_one
     // CHECK-NOT: call
-    // CHECK: tail call void @llvm.assume
+    // old: tail call void @llvm.assume
     // CHECK-NOT: grow_one
     // CHECK-NOT: call
     // CHECK: {{ret|[}]}}
diff --git a/tests/codegen-llvm/vecdeque_pop_push.rs b/tests/codegen-llvm/vecdeque_pop_push.rs
index 5afa1b2248b..6f9ad6674d6 100644
--- a/tests/codegen-llvm/vecdeque_pop_push.rs
+++ b/tests/codegen-llvm/vecdeque_pop_push.rs
@@ -1,4 +1,7 @@
 //@ compile-flags: -Copt-level=3
+//@ revisions: new old
+//@ [old] max-llvm-major-version: 21
+//@ [new] min-llvm-version: 22
 
 #![crate_type = "lib"]
 
@@ -8,7 +11,7 @@ use std::collections::VecDeque;
 // CHECK-LABEL: @noop_back(
 pub fn noop_back(v: &mut VecDeque<u8>) {
     // CHECK-NOT: grow
-    // CHECK: tail call void @llvm.assume
+    // old: tail call void @llvm.assume
     // CHECK-NOT: grow
     // CHECK: ret
     if let Some(x) = v.pop_back() {
diff --git a/tests/codegen-llvm/wasm_exceptions.rs b/tests/codegen-llvm/wasm_exceptions.rs
index 796b69b722b..e718f599a3c 100644
--- a/tests/codegen-llvm/wasm_exceptions.rs
+++ b/tests/codegen-llvm/wasm_exceptions.rs
@@ -1,8 +1,9 @@
 //@ only-wasm32
-//@ compile-flags: -C panic=unwind -Z emscripten-wasm-eh
+//@ revisions: WASM WASMEXN
+//@ [WASMEXN] compile-flags: -C panic=unwind -Z emscripten-wasm-eh
 
 #![crate_type = "lib"]
-#![feature(core_intrinsics, wasm_exception_handling_intrinsics)]
+#![feature(core_intrinsics, wasm_exception_handling_intrinsics, link_llvm_intrinsics)]
 
 extern "C-unwind" {
     fn may_panic();
@@ -22,7 +23,8 @@ impl Drop for LogOnDrop {
     }
 }
 
-// CHECK-LABEL: @test_cleanup() {{.*}} @__gxx_wasm_personality_v0
+// WASM-LABEL: @test_cleanup() {{.*}}
+// WASMEXN-LABEL: @test_cleanup() {{.*}} @__gxx_wasm_personality_v0
 #[no_mangle]
 pub fn test_cleanup() {
     let _log_on_drop = LogOnDrop;
@@ -30,12 +32,16 @@ pub fn test_cleanup() {
         may_panic();
     }
 
-    // CHECK-NOT: call
-    // CHECK: invoke void @may_panic()
-    // CHECK: %cleanuppad = cleanuppad within none []
+    // WASMEXN-NOT: call
+    // WASMEXN: invoke void @may_panic()
+    // WASMEXN: %cleanuppad = cleanuppad within none []
+    //
+    // WASM: call void @may_panic()
+    // WASM-NOT: invoke void @may_panic()
 }
 
-// CHECK-LABEL: @test_rtry() {{.*}} @__gxx_wasm_personality_v0
+// WASM-LABEL: @test_rtry() {{.*}}
+// WASMEXN-LABEL: @test_rtry() {{.*}} @__gxx_wasm_personality_v0
 #[no_mangle]
 pub fn test_rtry() {
     unsafe {
@@ -51,23 +57,40 @@ pub fn test_rtry() {
         );
     }
 
-    // CHECK-NOT: call
-    // CHECK: invoke void @may_panic()
-    // CHECK: {{.*}} = catchswitch within none [label {{.*}}] unwind to caller
-    // CHECK: {{.*}} = catchpad within {{.*}} [ptr null]
-    // CHECK: catchret
+    // WASMEXN-NOT: call
+    // WASMEXN: invoke void @may_panic()
+    // WASMEXN: {{.*}} = catchswitch within none [label {{.*}}] unwind to caller
+    // WASMEXN: {{.*}} = catchpad within {{.*}} [ptr null]
+    // WASMEXN: catchret
+
+    // WASM: call void @may_panic()
+    // WASM-NOT: invoke void @may_panic()
+    // WASM-NOT: catchswitch
+    // WASM-NOT: catchpad
+    // WASM-NOT: catchret
 }
 
 // Make sure the intrinsic is not inferred as nounwind. This is a regression test for #132416.
-// CHECK-LABEL: @test_intrinsic() {{.*}} @__gxx_wasm_personality_v0
+//
+// Note that this test uses the raw `wasm_throw` intrinsic because the one from
+// libstd was built with `-Cpanic=abort` and it's technically not valid to use
+// when this crate is compiled with `-Cpanic=unwind`.
+//
+// WASMEXN-LABEL: @test_intrinsic() {{.*}} @__gxx_wasm_personality_v0
 #[no_mangle]
+#[cfg(wasmexn)]
 pub fn test_intrinsic() {
     let _log_on_drop = LogOnDrop;
+
+    unsafe extern "C-unwind" {
+        #[link_name = "llvm.wasm.throw"]
+        fn wasm_throw(tag: i32, ptr: *mut u8) -> !;
+    }
     unsafe {
-        core::arch::wasm32::throw::<0>(core::ptr::null_mut());
+        wasm_throw(0, core::ptr::null_mut());
     }
 
-    // CHECK-NOT: call
-    // CHECK: invoke void @llvm.wasm.throw(i32 noundef 0, ptr noundef null)
-    // CHECK: %cleanuppad = cleanuppad within none []
+    // WASMEXN-NOT: call
+    // WASMEXN: invoke void @llvm.wasm.throw(i32 noundef 0, ptr noundef null)
+    // WASMEXN: %cleanuppad = cleanuppad within none []
 }
diff --git a/tests/coverage/issue-83601.cov-map b/tests/coverage/issue-83601.cov-map
index d1d751ff24b..e42b5591c0f 100644
--- a/tests/coverage/issue-83601.cov-map
+++ b/tests/coverage/issue-83601.cov-map
@@ -1,30 +1,22 @@
 Function name: issue_83601::main
-Raw bytes (76): 0x[01, 01, 01, 05, 09, 0e, 01, 06, 01, 00, 0a, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 05, 01, 09, 00, 0c, 05, 00, 0f, 00, 15, 05, 01, 05, 00, 0f, 02, 01, 05, 00, 0d, 02, 00, 0e, 00, 14, 02, 01, 05, 00, 0d, 02, 00, 0e, 00, 14, 02, 01, 05, 00, 0d, 02, 00, 0e, 00, 14, 02, 01, 01, 00, 02]
+Raw bytes (74): 0x[01, 01, 00, 0e, 01, 06, 01, 00, 0a, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 14, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 14, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 14, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => $DIR/issue-83601.rs
-Number of expressions: 1
-- expression 0 operands: lhs = Counter(1), rhs = Counter(2)
+Number of expressions: 0
 Number of file 0 mappings: 14
 - Code(Counter(0)) at (prev + 6, 1) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12)
 - Code(Counter(0)) at (prev + 0, 15) to (start + 0, 21)
 - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15)
-- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12)
-- Code(Counter(1)) at (prev + 0, 15) to (start + 0, 21)
-- Code(Counter(1)) at (prev + 1, 5) to (start + 0, 15)
-- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 13)
-    = (c1 - c2)
-- Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 20)
-    = (c1 - c2)
-- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 13)
-    = (c1 - c2)
-- Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 20)
-    = (c1 - c2)
-- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 13)
-    = (c1 - c2)
-- Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 20)
-    = (c1 - c2)
-- Code(Expression(0, Sub)) at (prev + 1, 1) to (start + 0, 2)
-    = (c1 - c2)
-Highest counter ID seen: c1
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12)
+- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 21)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13)
+- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 20)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13)
+- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 20)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13)
+- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 20)
+- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
+Highest counter ID seen: c0
 
diff --git a/tests/coverage/issue-84561.cov-map b/tests/coverage/issue-84561.cov-map
index 2b643ea599e..e5bb1afdcc2 100644
--- a/tests/coverage/issue-84561.cov-map
+++ b/tests/coverage/issue-84561.cov-map
@@ -73,20 +73,20 @@ Number of file 0 mappings: 4
 Highest counter ID seen: c0
 
 Function name: issue_84561::test3
-Raw bytes (409): 0x[01, 01, 0a, 0d, 11, 0d, 15, 0d, 19, 1d, 21, 29, 2d, 25, 29, 25, 29, 25, 29, 27, 31, 29, 2d, 4d, 01, 08, 01, 00, 0b, 01, 01, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 05, 01, 09, 00, 0c, 05, 00, 0f, 00, 15, 05, 01, 05, 00, 0f, 09, 01, 05, 00, 0d, 09, 00, 0e, 00, 14, 09, 01, 05, 00, 0d, 09, 00, 0e, 00, 14, 09, 01, 05, 00, 0d, 09, 00, 0e, 00, 14, 09, 02, 05, 00, 0f, 09, 01, 05, 00, 0f, 09, 01, 05, 00, 0f, 09, 01, 09, 00, 0c, 09, 00, 0f, 00, 15, 09, 01, 05, 00, 0f, 0d, 01, 05, 00, 0f, 0d, 01, 05, 00, 0f, 00, 00, 20, 00, 30, 0d, 01, 05, 00, 0d, 0d, 00, 0e, 00, 14, 0d, 01, 05, 00, 0d, 0d, 00, 0e, 00, 14, 0d, 02, 05, 00, 0f, 00, 00, 20, 00, 24, 00, 00, 29, 00, 30, 00, 00, 33, 00, 41, 00, 00, 4b, 00, 5a, 0d, 01, 05, 00, 0f, 00, 05, 09, 00, 0d, 00, 03, 09, 00, 10, 00, 02, 0d, 00, 1b, 00, 02, 0d, 00, 1c, 0d, 04, 09, 00, 10, 0d, 00, 13, 00, 2e, 0d, 02, 05, 00, 0f, 0d, 04, 05, 00, 0f, 0d, 04, 05, 00, 0f, 0d, 04, 09, 00, 0c, 0d, 00, 0f, 00, 15, 0d, 01, 05, 00, 0f, 0d, 04, 08, 00, 0f, 11, 01, 09, 00, 13, 02, 05, 09, 00, 13, 0d, 05, 08, 00, 0f, 15, 01, 09, 00, 13, 00, 03, 0d, 00, 1d, 06, 03, 09, 00, 13, 00, 03, 0d, 00, 1d, 0d, 03, 05, 00, 0f, 0d, 01, 0c, 00, 13, 19, 01, 0d, 00, 13, 0a, 02, 0d, 00, 13, 1d, 04, 05, 00, 0f, 1d, 02, 0c, 00, 13, 21, 01, 0d, 00, 13, 0e, 02, 0d, 00, 13, 27, 03, 05, 00, 0f, 25, 01, 0c, 00, 13, 29, 01, 0d, 00, 17, 29, 04, 0d, 00, 13, 1e, 02, 0d, 00, 17, 1e, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, 1e, 02, 15, 00, 1b, 2d, 04, 0d, 00, 13, 22, 03, 09, 00, 19, 31, 02, 05, 00, 0f, 31, 03, 09, 00, 22, 00, 02, 05, 00, 0f, 00, 03, 09, 00, 2c, 00, 02, 01, 00, 02]
+Raw bytes (409): 0x[01, 01, 0a, 01, 05, 01, 09, 01, 0d, 11, 15, 1d, 21, 19, 1d, 19, 1d, 19, 1d, 27, 25, 1d, 21, 4d, 01, 08, 01, 00, 0b, 01, 01, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 14, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 14, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 14, 01, 02, 05, 00, 0f, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0f, 01, 01, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0f, 01, 01, 05, 00, 0f, 00, 00, 20, 00, 30, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 14, 01, 01, 05, 00, 0d, 01, 00, 0e, 00, 14, 01, 02, 05, 00, 0f, 00, 00, 20, 00, 24, 00, 00, 29, 00, 30, 00, 00, 33, 00, 41, 00, 00, 4b, 00, 5a, 01, 01, 05, 00, 0f, 00, 05, 09, 00, 0d, 00, 03, 09, 00, 10, 00, 02, 0d, 00, 1b, 00, 02, 0d, 00, 1c, 01, 04, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 02, 05, 00, 0f, 01, 04, 05, 00, 0f, 01, 04, 05, 00, 0f, 01, 04, 09, 00, 0c, 01, 00, 0f, 00, 15, 01, 01, 05, 00, 0f, 01, 04, 08, 00, 0f, 05, 01, 09, 00, 13, 02, 05, 09, 00, 13, 01, 05, 08, 00, 0f, 09, 01, 09, 00, 13, 00, 03, 0d, 00, 1d, 06, 03, 09, 00, 13, 00, 03, 0d, 00, 1d, 01, 03, 05, 00, 0f, 01, 01, 0c, 00, 13, 0d, 01, 0d, 00, 13, 0a, 02, 0d, 00, 13, 11, 04, 05, 00, 0f, 11, 02, 0c, 00, 13, 15, 01, 0d, 00, 13, 0e, 02, 0d, 00, 13, 27, 03, 05, 00, 0f, 19, 01, 0c, 00, 13, 1d, 01, 0d, 00, 17, 1d, 04, 0d, 00, 13, 1e, 02, 0d, 00, 17, 1e, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, 1e, 02, 15, 00, 1b, 21, 04, 0d, 00, 13, 22, 03, 09, 00, 19, 25, 02, 05, 00, 0f, 25, 03, 09, 00, 22, 00, 02, 05, 00, 0f, 00, 03, 09, 00, 2c, 00, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => $DIR/issue-84561.rs
 Number of expressions: 10
-- expression 0 operands: lhs = Counter(3), rhs = Counter(4)
-- expression 1 operands: lhs = Counter(3), rhs = Counter(5)
-- expression 2 operands: lhs = Counter(3), rhs = Counter(6)
-- expression 3 operands: lhs = Counter(7), rhs = Counter(8)
-- expression 4 operands: lhs = Counter(10), rhs = Counter(11)
-- expression 5 operands: lhs = Counter(9), rhs = Counter(10)
-- expression 6 operands: lhs = Counter(9), rhs = Counter(10)
-- expression 7 operands: lhs = Counter(9), rhs = Counter(10)
-- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(12)
-- expression 9 operands: lhs = Counter(10), rhs = Counter(11)
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(3)
+- expression 3 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 4 operands: lhs = Counter(7), rhs = Counter(8)
+- expression 5 operands: lhs = Counter(6), rhs = Counter(7)
+- expression 6 operands: lhs = Counter(6), rhs = Counter(7)
+- expression 7 operands: lhs = Counter(6), rhs = Counter(7)
+- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(9)
+- expression 9 operands: lhs = Counter(7), rhs = Counter(8)
 Number of file 0 mappings: 77
 - Code(Counter(0)) at (prev + 8, 1) to (start + 0, 11)
 - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16)
@@ -94,85 +94,85 @@ Number of file 0 mappings: 77
 - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12)
 - Code(Counter(0)) at (prev + 0, 15) to (start + 0, 21)
 - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15)
-- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12)
-- Code(Counter(1)) at (prev + 0, 15) to (start + 0, 21)
-- Code(Counter(1)) at (prev + 1, 5) to (start + 0, 15)
-- Code(Counter(2)) at (prev + 1, 5) to (start + 0, 13)
-- Code(Counter(2)) at (prev + 0, 14) to (start + 0, 20)
-- Code(Counter(2)) at (prev + 1, 5) to (start + 0, 13)
-- Code(Counter(2)) at (prev + 0, 14) to (start + 0, 20)
-- Code(Counter(2)) at (prev + 1, 5) to (start + 0, 13)
-- Code(Counter(2)) at (prev + 0, 14) to (start + 0, 20)
-- Code(Counter(2)) at (prev + 2, 5) to (start + 0, 15)
-- Code(Counter(2)) at (prev + 1, 5) to (start + 0, 15)
-- Code(Counter(2)) at (prev + 1, 5) to (start + 0, 15)
-- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 12)
-- Code(Counter(2)) at (prev + 0, 15) to (start + 0, 21)
-- Code(Counter(2)) at (prev + 1, 5) to (start + 0, 15)
-- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 15)
-- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12)
+- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 21)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13)
+- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 20)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13)
+- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 20)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13)
+- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 20)
+- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 12)
+- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 21)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15)
 - Code(Zero) at (prev + 0, 32) to (start + 0, 48)
-- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 13)
-- Code(Counter(3)) at (prev + 0, 14) to (start + 0, 20)
-- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 13)
-- Code(Counter(3)) at (prev + 0, 14) to (start + 0, 20)
-- Code(Counter(3)) at (prev + 2, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13)
+- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 20)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13)
+- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 20)
+- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 15)
 - Code(Zero) at (prev + 0, 32) to (start + 0, 36)
 - Code(Zero) at (prev + 0, 41) to (start + 0, 48)
 - Code(Zero) at (prev + 0, 51) to (start + 0, 65)
 - Code(Zero) at (prev + 0, 75) to (start + 0, 90)
-- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15)
 - Code(Zero) at (prev + 5, 9) to (start + 0, 13)
 - Code(Zero) at (prev + 3, 9) to (start + 0, 16)
 - Code(Zero) at (prev + 2, 13) to (start + 0, 27)
 - Code(Zero) at (prev + 2, 13) to (start + 0, 28)
-- Code(Counter(3)) at (prev + 4, 9) to (start + 0, 16)
-- Code(Counter(3)) at (prev + 0, 19) to (start + 0, 46)
-- Code(Counter(3)) at (prev + 2, 5) to (start + 0, 15)
-- Code(Counter(3)) at (prev + 4, 5) to (start + 0, 15)
-- Code(Counter(3)) at (prev + 4, 5) to (start + 0, 15)
-- Code(Counter(3)) at (prev + 4, 9) to (start + 0, 12)
-- Code(Counter(3)) at (prev + 0, 15) to (start + 0, 21)
-- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 15)
-- Code(Counter(3)) at (prev + 4, 8) to (start + 0, 15)
-- Code(Counter(4)) at (prev + 1, 9) to (start + 0, 19)
+- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 16)
+- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46)
+- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 12)
+- Code(Counter(0)) at (prev + 0, 15) to (start + 0, 21)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 4, 8) to (start + 0, 15)
+- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 19)
 - Code(Expression(0, Sub)) at (prev + 5, 9) to (start + 0, 19)
-    = (c3 - c4)
-- Code(Counter(3)) at (prev + 5, 8) to (start + 0, 15)
-- Code(Counter(5)) at (prev + 1, 9) to (start + 0, 19)
+    = (c0 - c1)
+- Code(Counter(0)) at (prev + 5, 8) to (start + 0, 15)
+- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 19)
 - Code(Zero) at (prev + 3, 13) to (start + 0, 29)
 - Code(Expression(1, Sub)) at (prev + 3, 9) to (start + 0, 19)
-    = (c3 - c5)
+    = (c0 - c2)
 - Code(Zero) at (prev + 3, 13) to (start + 0, 29)
-- Code(Counter(3)) at (prev + 3, 5) to (start + 0, 15)
-- Code(Counter(3)) at (prev + 1, 12) to (start + 0, 19)
-- Code(Counter(6)) at (prev + 1, 13) to (start + 0, 19)
+- Code(Counter(0)) at (prev + 3, 5) to (start + 0, 15)
+- Code(Counter(0)) at (prev + 1, 12) to (start + 0, 19)
+- Code(Counter(3)) at (prev + 1, 13) to (start + 0, 19)
 - Code(Expression(2, Sub)) at (prev + 2, 13) to (start + 0, 19)
-    = (c3 - c6)
-- Code(Counter(7)) at (prev + 4, 5) to (start + 0, 15)
-- Code(Counter(7)) at (prev + 2, 12) to (start + 0, 19)
-- Code(Counter(8)) at (prev + 1, 13) to (start + 0, 19)
+    = (c0 - c3)
+- Code(Counter(4)) at (prev + 4, 5) to (start + 0, 15)
+- Code(Counter(4)) at (prev + 2, 12) to (start + 0, 19)
+- Code(Counter(5)) at (prev + 1, 13) to (start + 0, 19)
 - Code(Expression(3, Sub)) at (prev + 2, 13) to (start + 0, 19)
-    = (c7 - c8)
+    = (c4 - c5)
 - Code(Expression(9, Add)) at (prev + 3, 5) to (start + 0, 15)
-    = (c10 + c11)
-- Code(Counter(9)) at (prev + 1, 12) to (start + 0, 19)
-- Code(Counter(10)) at (prev + 1, 13) to (start + 0, 23)
-- Code(Counter(10)) at (prev + 4, 13) to (start + 0, 19)
+    = (c7 + c8)
+- Code(Counter(6)) at (prev + 1, 12) to (start + 0, 19)
+- Code(Counter(7)) at (prev + 1, 13) to (start + 0, 23)
+- Code(Counter(7)) at (prev + 4, 13) to (start + 0, 19)
 - Code(Expression(7, Sub)) at (prev + 2, 13) to (start + 0, 23)
-    = (c9 - c10)
+    = (c6 - c7)
 - Code(Expression(7, Sub)) at (prev + 1, 20) to (start + 0, 27)
-    = (c9 - c10)
+    = (c6 - c7)
 - Code(Zero) at (prev + 1, 21) to (start + 0, 27)
 - Code(Expression(7, Sub)) at (prev + 2, 21) to (start + 0, 27)
-    = (c9 - c10)
-- Code(Counter(11)) at (prev + 4, 13) to (start + 0, 19)
+    = (c6 - c7)
+- Code(Counter(8)) at (prev + 4, 13) to (start + 0, 19)
 - Code(Expression(8, Sub)) at (prev + 3, 9) to (start + 0, 25)
-    = ((c10 + c11) - c12)
-- Code(Counter(12)) at (prev + 2, 5) to (start + 0, 15)
-- Code(Counter(12)) at (prev + 3, 9) to (start + 0, 34)
+    = ((c7 + c8) - c9)
+- Code(Counter(9)) at (prev + 2, 5) to (start + 0, 15)
+- Code(Counter(9)) at (prev + 3, 9) to (start + 0, 34)
 - Code(Zero) at (prev + 2, 5) to (start + 0, 15)
 - Code(Zero) at (prev + 3, 9) to (start + 0, 44)
 - Code(Zero) at (prev + 2, 1) to (start + 0, 2)
-Highest counter ID seen: c12
+Highest counter ID seen: c9
 
diff --git a/tests/crashes/117808.rs b/tests/crashes/117808.rs
deleted file mode 100644
index 2c727986dd0..00000000000
--- a/tests/crashes/117808.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-//@ known-bug: #117808
-//@ edition:2021
-//@ needs-rustc-debug-assertions
-
-use std::future::Future;
-
-fn hrc<R, F: for<'a> AsyncClosure<'a, (), R>>(f: F) -> F {
-    f
-}
-
-fn main() {
-    hrc(|x| async {});
-}
-
-trait AsyncClosure<'a, I, R>
-where
-    I: 'a,
-{
-}
-
-impl<'a, I, R, Fut, F> AsyncClosure<'a, I, R> for F
-where
-    I: 'a,
-    F: Fn(&'a I) -> Fut,
-    Fut: Future<Output = R> + Send + 'a,
-{
-}
diff --git a/tests/crashes/120016.rs b/tests/crashes/120016.rs
index 7eda330e7ad..12f54dbc3d9 100644
--- a/tests/crashes/120016.rs
+++ b/tests/crashes/120016.rs
@@ -1,19 +1,19 @@
 //@ known-bug: #120016
-//@ compile-flags: -Zcrate-attr=feature(const_async_blocks)
+//@ compile-flags: -Zvalidate-mir
 //@ edition: 2021
 
-#![feature(type_alias_impl_trait, const_async_blocks)]
+#![feature(type_alias_impl_trait)]
 
 struct Bug {
     V1: [(); {
-        type F = impl std::future::Future<Output = impl Sized>;
+        type F = impl Sized;
         #[define_opaque(F)]
         fn concrete_use() -> F {
-            //~^ ERROR to be a future that resolves to `u8`, but it resolves to `()`
-            async {}
+            //~^ ERROR
+            1i32
         }
-        let f: F = async { 1 };
-        //~^ ERROR `async` blocks are not allowed in constants
+        let f: F = 0u32;
+
         1
     }],
 }
diff --git a/tests/crashes/120175.rs b/tests/crashes/120175.rs
index e441454bed2..e06da5a8e0a 100644
--- a/tests/crashes/120175.rs
+++ b/tests/crashes/120175.rs
@@ -1,5 +1,6 @@
 //@ known-bug: #120175
 //@ needs-rustc-debug-assertions
+//@ ignore-apple (raw-dylib doesn't work on Apple targets yet)
 
 #![feature(extern_types)]
 #![feature(raw_dylib_elf)]
diff --git a/tests/crashes/125772.rs b/tests/crashes/125772.rs
index 2965cfc9e7c..2b6cffd9463 100644
--- a/tests/crashes/125772.rs
+++ b/tests/crashes/125772.rs
@@ -1,5 +1,5 @@
 //@ known-bug: rust-lang/rust#125772
-//@ only-x86_64
+//@ only-64bit
 #![feature(generic_const_exprs)]
 
 struct Outer<const A: i64, const B: i64>();
diff --git a/tests/crashes/129095.rs b/tests/crashes/129095.rs
deleted file mode 100644
index b1bb74708c2..00000000000
--- a/tests/crashes/129095.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-//@ known-bug: rust-lang/rust#129095
-//@ compile-flags: -Zmir-enable-passes=+GVN -Zmir-enable-passes=+Inline -Zvalidate-mir
-
-#![feature(adt_const_params, unsized_const_params)]
-#![allow(incomplete_features)]
-
-pub fn function_with_bytes<const BYTES: &'static [u8; 4]>() -> &'static [u8] {
-    BYTES
-}
-
-pub fn main() {
-    assert_eq!(function_with_bytes::<b"AAAAA">(), &[0x41, 0x41, 0x41, 0x41]);
-}
diff --git a/tests/crashes/131292.rs b/tests/crashes/131292.rs
index 01e0eca0bd6..05b93d06b05 100644
--- a/tests/crashes/131292.rs
+++ b/tests/crashes/131292.rs
@@ -1,5 +1,5 @@
 //@ known-bug: #131292
-//@ only-x86_64
+//@ needs-asm-support
 use std::arch::asm;
 
 unsafe fn f6() {
diff --git a/tests/crashes/134174.rs b/tests/crashes/134174.rs
deleted file mode 100644
index 899cdc6faf3..00000000000
--- a/tests/crashes/134174.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-//@ known-bug: #134175
-//@compile-flags: -Zvalidate-mir -Zinline-mir=yes
-use std::vec::IntoIter;
-
-pub(crate) trait Foo: Iterator<Item = <Self as Foo>::Key> {
-    type Key;
-}
-
-impl Foo for IntoIter<i16> {}
-
-fn sum_foo<F: Foo<Key = i32>>(f: F) -> i32 {
-    f.fold(0, |a, b| a + b)
-}
-
-fn main() {
-    let x = sum_foo(vec![11, 10, 1].into_iter());
-}
diff --git a/tests/crashes/134654.rs b/tests/crashes/134654.rs
deleted file mode 100644
index f2323fe4ecd..00000000000
--- a/tests/crashes/134654.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-//@ known-bug: #134654
-//@ compile-flags: -Zmir-enable-passes=+GVN -Zmir-enable-passes=+Inline -Zvalidate-mir
-//@ only-x86_64
-
-#![feature(adt_const_params, unsized_const_params)]
-#![allow(incomplete_features)]
-
-fn function_with_bytes<const BYTES:
-    &'static [u8; 0xa9008fb6c9d81e42_0e25730562a601c8_u128]>() -> &'static [u8] {
-    BYTES
-}
-
-fn main() {
-    function_with_bytes::<b"aa">() == &[];
-}
diff --git a/tests/crashes/135570.rs b/tests/crashes/135570.rs
deleted file mode 100644
index 7919ceb26d5..00000000000
--- a/tests/crashes/135570.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-//@ known-bug: #135570
-//@compile-flags: -Zvalidate-mir -Zmir-enable-passes=+Inline -Copt-level=0 -Zmir-enable-passes=+GVN
-//@ only-x86_64
-
-#![feature(adt_const_params, unsized_const_params)]
-#![allow(incomplete_features)]
-
-fn function_with_bytes<const BYTES: &'static [u8; 0xc7b889180b67b07d_bc1a3c88783d35b5_u128]>(
-) -> &'static [u8] {
-    BYTES
-}
-
-fn main() {
-    function_with_bytes::<b"aa">() == &[];
-}
diff --git a/tests/crashes/136381.rs b/tests/crashes/136381.rs
deleted file mode 100644
index 13ccc14a2c5..00000000000
--- a/tests/crashes/136381.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-//@ known-bug: #136381
-//@ compile-flags: -Zvalidate-mir -Zmir-enable-passes=+GVN
-#![feature(trait_upcasting)]
-
-trait A {}
-trait B: A {
-    fn c(&self);
-}
-impl B for i32 {
-    fn c(self) {
-        todo!();
-    }
-}
-
-fn main() {
-    let baz: &dyn B = &1;
-    let bar: &dyn A = baz;
-}
diff --git a/tests/crashes/137190-1.rs b/tests/crashes/137190-1.rs
deleted file mode 100644
index bdfe883b712..00000000000
--- a/tests/crashes/137190-1.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-//@ known-bug: #137190
-//@ compile-flags: -Zmir-opt-level=2 -Zvalidate-mir
-trait A {
-    fn b(&self);
-}
-trait C: A {}
-impl C for () {}
-fn main() {
-    (&() as &dyn C as &dyn A).b();
-}
diff --git a/tests/crashes/137468.rs b/tests/crashes/137468.rs
deleted file mode 100644
index cceb0502bd2..00000000000
--- a/tests/crashes/137468.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-//@ known-bug: #137468
-//@ compile-flags: -Copt-level=0 -Zmir-enable-passes=+GVN -Zvalidate-mir
-trait Supertrait<T> {}
-
-trait Identity {
-    type Selff;
-}
-
-trait Trait<P>: Supertrait<()> + Supertrait<<P as Identity>::Selff> {}
-
-impl<P> Trait<P> for () {}
-
-fn main() {
-    let x: &dyn Trait<()> = &();
-    let x: &dyn Supertrait<()> = x;
-}
diff --git a/tests/crashes/34127.rs b/tests/crashes/34127.rs
index ea36b48ecba..26ebe722475 100644
--- a/tests/crashes/34127.rs
+++ b/tests/crashes/34127.rs
@@ -1,6 +1,6 @@
 //@ compile-flags: -g -Copt-level=0 -Z verify-llvm-ir
 //@ known-bug: #34127
-//@ only-x86_64
+//@ only-64bit
 
 pub fn main() {
 let _a = [(); 1 << 63];
diff --git a/tests/debuginfo/opt/dead_refs.rs b/tests/debuginfo/opt/dead_refs.rs
new file mode 100644
index 00000000000..61e74157334
--- /dev/null
+++ b/tests/debuginfo/opt/dead_refs.rs
@@ -0,0 +1,50 @@
+//@ min-lldb-version: 1800
+//@ min-gdb-version: 13.0
+//@ compile-flags: -g -Copt-level=3
+//@ disable-gdb-pretty-printers
+
+// Checks that we still can access dead variables from debuginfos.
+
+// === GDB TESTS ===================================================================================
+
+// gdb-command:run
+// gdb-command:print *ref_v0
+// gdb-check:$1 = 0
+
+// gdb-command:print *ref_v1
+// gdb-check:$2 = 1
+
+// gdb-command:print *ref_v2
+// gdb-check:$3 = 2
+
+// === LLDB TESTS ==================================================================================
+
+// lldb-command:run
+// lldb-command:v *ref_v0
+// lldb-check:[...] 0
+
+// lldb-command:v *ref_v1
+// lldb-check:[...] 1
+
+// lldb-command:v *ref_v2
+// lldb-check:[...] 2
+
+#![allow(unused_variables)]
+
+use std::hint::black_box;
+
+pub struct Foo(i32, i64, i32);
+
+#[inline(never)]
+#[no_mangle]
+fn test_ref(ref_foo: &Foo) -> i32 {
+    let ref_v0 = &ref_foo.0;
+    let ref_v1 = &ref_foo.1;
+    let ref_v2 = &ref_foo.2;
+    ref_foo.0 // #break
+}
+
+fn main() {
+    let foo = black_box(Foo(0, 1, 2));
+    black_box(test_ref(&foo));
+}
diff --git a/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir b/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
index a18d7e7478f..a1fe278c652 100644
--- a/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
+++ b/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
@@ -1,30 +1,30 @@
 // MIR for `address_of_reborrow` after SimplifyCfg-initial
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:8:10: 8:18, inferred_ty: *const [i32; 10]
+| 0: user_ty: Canonical { value: Ty(*const ^c_0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:8:10: 8:18, inferred_ty: *const [i32; 10]
 | 1: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [Region(U0)] }, span: $DIR/address_of.rs:10:10: 10:25, inferred_ty: *const dyn std::marker::Send
-| 2: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:14:12: 14:20, inferred_ty: *const [i32; 10]
-| 3: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:14:12: 14:20, inferred_ty: *const [i32; 10]
+| 2: user_ty: Canonical { value: Ty(*const ^c_0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:14:12: 14:20, inferred_ty: *const [i32; 10]
+| 3: user_ty: Canonical { value: Ty(*const ^c_0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:14:12: 14:20, inferred_ty: *const [i32; 10]
 | 4: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:15:12: 15:28, inferred_ty: *const [i32; 10]
 | 5: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:15:12: 15:28, inferred_ty: *const [i32; 10]
 | 6: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [Region(U0)] }, span: $DIR/address_of.rs:16:12: 16:27, inferred_ty: *const dyn std::marker::Send
 | 7: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [Region(U0)] }, span: $DIR/address_of.rs:16:12: 16:27, inferred_ty: *const dyn std::marker::Send
 | 8: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:17:12: 17:24, inferred_ty: *const [i32]
 | 9: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:17:12: 17:24, inferred_ty: *const [i32]
-| 10: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:19:10: 19:18, inferred_ty: *const [i32; 10]
+| 10: user_ty: Canonical { value: Ty(*const ^c_0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:19:10: 19:18, inferred_ty: *const [i32; 10]
 | 11: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [Region(U0)] }, span: $DIR/address_of.rs:21:10: 21:25, inferred_ty: *const dyn std::marker::Send
-| 12: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:24:12: 24:20, inferred_ty: *const [i32; 10]
-| 13: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:24:12: 24:20, inferred_ty: *const [i32; 10]
+| 12: user_ty: Canonical { value: Ty(*const ^c_0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:24:12: 24:20, inferred_ty: *const [i32; 10]
+| 13: user_ty: Canonical { value: Ty(*const ^c_0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:24:12: 24:20, inferred_ty: *const [i32; 10]
 | 14: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:25:12: 25:28, inferred_ty: *const [i32; 10]
 | 15: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:25:12: 25:28, inferred_ty: *const [i32; 10]
 | 16: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [Region(U0)] }, span: $DIR/address_of.rs:26:12: 26:27, inferred_ty: *const dyn std::marker::Send
 | 17: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [Region(U0)] }, span: $DIR/address_of.rs:26:12: 26:27, inferred_ty: *const dyn std::marker::Send
 | 18: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:27:12: 27:24, inferred_ty: *const [i32]
 | 19: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:27:12: 27:24, inferred_ty: *const [i32]
-| 20: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:29:10: 29:16, inferred_ty: *mut [i32; 10]
+| 20: user_ty: Canonical { value: Ty(*mut ^c_0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:29:10: 29:16, inferred_ty: *mut [i32; 10]
 | 21: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [Region(U0)] }, span: $DIR/address_of.rs:31:10: 31:23, inferred_ty: *mut dyn std::marker::Send
-| 22: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:34:12: 34:18, inferred_ty: *mut [i32; 10]
-| 23: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:34:12: 34:18, inferred_ty: *mut [i32; 10]
+| 22: user_ty: Canonical { value: Ty(*mut ^c_0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:34:12: 34:18, inferred_ty: *mut [i32; 10]
+| 23: user_ty: Canonical { value: Ty(*mut ^c_0), max_universe: U0, variables: [Ty { ui: U0, sub_root: 0 }] }, span: $DIR/address_of.rs:34:12: 34:18, inferred_ty: *mut [i32; 10]
 | 24: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:35:12: 35:26, inferred_ty: *mut [i32; 10]
 | 25: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:35:12: 35:26, inferred_ty: *mut [i32; 10]
 | 26: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [Region(U0)] }, span: $DIR/address_of.rs:36:12: 36:25, inferred_ty: *mut dyn std::marker::Send
diff --git a/tests/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination-initial.diff b/tests/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination-initial.diff
index ff18df1efcf..d584de6861c 100644
--- a/tests/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination-initial.diff
+++ b/tests/mir-opt/dead-store-elimination/cycle.cycle.DeadStoreElimination-initial.diff
@@ -19,10 +19,6 @@
 -         _3 = copy _2;
 -         _2 = copy _1;
 -         _1 = copy _5;
-+         nop;
-+         nop;
-+         nop;
-+         nop;
           _4 = cond() -> [return: bb1, unwind continue];
       }
   
diff --git a/tests/mir-opt/dead-store-elimination/ref.dead_first.DeadStoreElimination-initial.diff b/tests/mir-opt/dead-store-elimination/ref.dead_first.DeadStoreElimination-initial.diff
new file mode 100644
index 00000000000..2a793e24990
--- /dev/null
+++ b/tests/mir-opt/dead-store-elimination/ref.dead_first.DeadStoreElimination-initial.diff
@@ -0,0 +1,30 @@
+- // MIR for `dead_first` before DeadStoreElimination-initial
++ // MIR for `dead_first` after DeadStoreElimination-initial
+  
+  fn dead_first(_1: &Foo) -> &i32 {
+      debug v => _1;
+      let mut _0: &i32;
+      let mut _2: &i32;
+      let mut _3: &i32;
+      let _4: &i32;
+      scope 1 {
+          debug a => _2;
+      }
+  
+      bb0: {
+          StorageLive(_2);
+-         _2 = &((*_1).2: i32);
++         // DBG: _2 = &((*_1).2: i32);
+          StorageLive(_3);
+          StorageLive(_4);
+          _4 = &((*_1).0: i32);
+          _3 = &(*_4);
+          _2 = move _3;
+          StorageDead(_3);
+          StorageDead(_4);
+          _0 = &(*_2);
+          StorageDead(_2);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/dead-store-elimination/ref.rs b/tests/mir-opt/dead-store-elimination/ref.rs
new file mode 100644
index 00000000000..2d3200edab9
--- /dev/null
+++ b/tests/mir-opt/dead-store-elimination/ref.rs
@@ -0,0 +1,31 @@
+//@ test-mir-pass: DeadStoreElimination-initial
+
+pub struct Foo {
+    a: i32,
+    b: i64,
+    c: i32,
+}
+
+// EMIT_MIR ref.tuple.DeadStoreElimination-initial.diff
+pub fn tuple(v: (i32, &Foo)) -> i32 {
+    // CHECK-LABEL: fn tuple
+    // CHECK: debug _dead => [[dead:_[0-9]+]];
+    // CHECK: bb0:
+    // CHECK: DBG: [[dead]] = &((*_3).2: i32)
+    let _dead = &v.1.c;
+    v.1.a
+}
+
+// EMIT_MIR ref.dead_first.DeadStoreElimination-initial.diff
+pub fn dead_first(v: &Foo) -> &i32 {
+    // CHECK-LABEL: fn dead_first
+    // CHECK: debug a => [[var_a:_[0-9]+]];
+    // CHECK: bb0:
+    // CHECK: DBG: [[var_a]] = &((*_1).2: i32)
+    // CHECK: [[tmp_4:_[0-9]+]] = &((*_1).0: i32)
+    // CHECK: [[tmp_3:_[0-9]+]] = &(*[[tmp_4]])
+    // CHECK: [[var_a]] = move [[tmp_3]]
+    let mut a = &v.c;
+    a = &v.a;
+    a
+}
diff --git a/tests/mir-opt/dead-store-elimination/ref.tuple.DeadStoreElimination-initial.diff b/tests/mir-opt/dead-store-elimination/ref.tuple.DeadStoreElimination-initial.diff
new file mode 100644
index 00000000000..0b96569cbe4
--- /dev/null
+++ b/tests/mir-opt/dead-store-elimination/ref.tuple.DeadStoreElimination-initial.diff
@@ -0,0 +1,25 @@
+- // MIR for `tuple` before DeadStoreElimination-initial
++ // MIR for `tuple` after DeadStoreElimination-initial
+  
+  fn tuple(_1: (i32, &Foo)) -> i32 {
+      debug v => _1;
+      let mut _0: i32;
+      let _2: &i32;
+      let mut _3: &Foo;
+      let mut _4: &Foo;
+      scope 1 {
+          debug _dead => _2;
+      }
+  
+      bb0: {
+-         StorageLive(_2);
+-         _3 = deref_copy (_1.1: &Foo);
+-         _2 = &((*_3).2: i32);
++         // DBG: _2 = &((*_3).2: i32);
+          _4 = deref_copy (_1.1: &Foo);
+          _0 = copy ((*_4).0: i32);
+-         StorageDead(_2);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/debuginfo/simplifycfg.drop_debuginfo.SimplifyCfg-final.diff b/tests/mir-opt/debuginfo/simplifycfg.drop_debuginfo.SimplifyCfg-final.diff
new file mode 100644
index 00000000000..d4a73351ee4
--- /dev/null
+++ b/tests/mir-opt/debuginfo/simplifycfg.drop_debuginfo.SimplifyCfg-final.diff
@@ -0,0 +1,26 @@
+- // MIR for `drop_debuginfo` before SimplifyCfg-final
++ // MIR for `drop_debuginfo` after SimplifyCfg-final
+  
+  fn drop_debuginfo(_1: &Foo, _2: bool) -> i32 {
+      debug foo_a => _3;
+      debug foo_b => _4;
+      let mut _0: i32;
+      let mut _3: &i32;
+      let mut _4: &i64;
+  
+      bb0: {
+-         switchInt(copy _2) -> [1: bb1, otherwise: bb2];
+-     }
+- 
+-     bb1: {
+-         // DBG: _3 = &((*_1).0: i32);
+-         goto -> bb2;
+-     }
+- 
+-     bb2: {
+          // DBG: _4 = &((*_1).1: i64);
+          _0 = copy ((*_1).2: i32);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_1.SimplifyCfg-final.diff b/tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_1.SimplifyCfg-final.diff
new file mode 100644
index 00000000000..1c12358ad89
--- /dev/null
+++ b/tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_1.SimplifyCfg-final.diff
@@ -0,0 +1,30 @@
+- // MIR for `preserve_debuginfo_1` before SimplifyCfg-final
++ // MIR for `preserve_debuginfo_1` after SimplifyCfg-final
+  
+  fn preserve_debuginfo_1(_1: &Foo, _2: &mut bool) -> i32 {
+      debug foo_a => _3;
+      debug foo_b => _4;
+      debug foo_c => _5;
+      let mut _0: i32;
+      let mut _3: &i32;
+      let mut _4: &i64;
+      let mut _5: &i32;
+  
+      bb0: {
+-         goto -> bb1;
+-     }
+- 
+-     bb1: {
+          (*_2) = const true;
+          // DBG: _3 = &((*_1).0: i32);
+-         goto -> bb2;
+-     }
+- 
+-     bb2: {
+          // DBG: _4 = &((*_1).1: i64);
+          _0 = copy ((*_1).2: i32);
+          // DBG: _5 = &((*_1).2: i32);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_2.SimplifyCfg-final.diff b/tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_2.SimplifyCfg-final.diff
new file mode 100644
index 00000000000..de8e5612c87
--- /dev/null
+++ b/tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_2.SimplifyCfg-final.diff
@@ -0,0 +1,29 @@
+- // MIR for `preserve_debuginfo_2` before SimplifyCfg-final
++ // MIR for `preserve_debuginfo_2` after SimplifyCfg-final
+  
+  fn preserve_debuginfo_2(_1: &Foo) -> i32 {
+      debug foo_a => _2;
+      debug foo_b => _3;
+      debug foo_c => _4;
+      let mut _0: i32;
+      let mut _2: &i32;
+      let mut _3: &i64;
+      let mut _4: &i32;
+  
+      bb0: {
+-         goto -> bb1;
+-     }
+- 
+-     bb1: {
+          // DBG: _2 = &((*_1).0: i32);
+-         goto -> bb2;
+-     }
+- 
+-     bb2: {
+          // DBG: _3 = &((*_1).1: i64);
+          _0 = copy ((*_1).2: i32);
+          // DBG: _4 = &((*_1).2: i32);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_3.SimplifyCfg-final.diff b/tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_3.SimplifyCfg-final.diff
new file mode 100644
index 00000000000..11372a262a7
--- /dev/null
+++ b/tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_3.SimplifyCfg-final.diff
@@ -0,0 +1,37 @@
+- // MIR for `preserve_debuginfo_3` before SimplifyCfg-final
++ // MIR for `preserve_debuginfo_3` after SimplifyCfg-final
+  
+  fn preserve_debuginfo_3(_1: &Foo, _2: bool) -> i32 {
+      debug foo_a => _3;
+      debug foo_b => _4;
+      debug foo_c => _5;
+      let mut _0: i32;
+      let mut _3: &i32;
+      let mut _4: &i64;
+      let mut _5: &i32;
+  
+      bb0: {
+-         switchInt(copy _2) -> [1: bb1, otherwise: bb2];
++         switchInt(copy _2) -> [1: bb2, otherwise: bb1];
+      }
+  
+      bb1: {
+-         // DBG: _3 = &((*_1).0: i32);
+-         goto -> bb3;
+-     }
+- 
+-     bb2: {
+          // DBG: _4 = &((*_1).1: i64);
+          _0 = copy ((*_1).2: i32);
+          return;
+      }
+  
+-     bb3: {
++     bb2: {
++         // DBG: _3 = &((*_1).0: i32);
+          // DBG: _5 = &((*_1).2: i32);
+          _0 = copy ((*_1).0: i32);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_identical_succs.SimplifyCfg-final.diff b/tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_identical_succs.SimplifyCfg-final.diff
new file mode 100644
index 00000000000..0c6a75237d8
--- /dev/null
+++ b/tests/mir-opt/debuginfo/simplifycfg.preserve_debuginfo_identical_succs.SimplifyCfg-final.diff
@@ -0,0 +1,29 @@
+- // MIR for `preserve_debuginfo_identical_succs` before SimplifyCfg-final
++ // MIR for `preserve_debuginfo_identical_succs` after SimplifyCfg-final
+  
+  fn preserve_debuginfo_identical_succs(_1: &Foo, _2: bool) -> i32 {
+      debug foo_a => _3;
+      debug foo_b => _4;
+      debug foo_c => _5;
+      let mut _0: i32;
+      let mut _3: &i32;
+      let mut _4: &i64;
+      let mut _5: &i32;
+  
+      bb0: {
+-         switchInt(copy _2) -> [1: bb1, otherwise: bb1];
+-     }
+- 
+-     bb1: {
+          // DBG: _3 = &((*_1).0: i32);
+-         goto -> bb2;
+-     }
+- 
+-     bb2: {
+          // DBG: _4 = &((*_1).1: i64);
+          _0 = copy ((*_1).2: i32);
+          // DBG: _5 = &((*_1).2: i32);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/debuginfo/simplifycfg.rs b/tests/mir-opt/debuginfo/simplifycfg.rs
new file mode 100644
index 00000000000..2bd510fd3b9
--- /dev/null
+++ b/tests/mir-opt/debuginfo/simplifycfg.rs
@@ -0,0 +1,207 @@
+//@ test-mir-pass: SimplifyCfg-final
+//@ compile-flags: -Zmir-enable-passes=+DeadStoreElimination-initial
+
+#![feature(core_intrinsics, custom_mir)]
+#![crate_type = "lib"]
+
+use std::intrinsics::mir::*;
+
+pub struct Foo {
+    a: i32,
+    b: i64,
+    c: i32,
+}
+
+// EMIT_MIR simplifycfg.drop_debuginfo.SimplifyCfg-final.diff
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+pub fn drop_debuginfo(foo: &Foo, c: bool) -> i32 {
+    // CHECK-LABEL: fn drop_debuginfo
+    // CHECK: debug foo_b => [[foo_b:_[0-9]+]];
+    // CHECK: bb0: {
+    // CHECK-NEXT: DBG: [[foo_b]] = &((*_1).1: i64)
+    // CHECK-NEXT: _0 = copy ((*_1).2: i32);
+    // CHECK-NEXT: return;
+    mir! {
+        let _foo_a: &i32;
+        let _foo_b: &i64;
+        debug foo_a => _foo_a;
+        debug foo_b => _foo_b;
+        {
+            match c {
+                true => tmp,
+                _ => ret,
+            }
+        }
+        tmp = {
+            // Because we don't know if `c` is always true, we must drop this debuginfo.
+            _foo_a = &(*foo).a;
+            Goto(ret)
+        }
+        ret = {
+            _foo_b = &(*foo).b;
+            RET = (*foo).c;
+            Return()
+        }
+    }
+}
+
+// EMIT_MIR simplifycfg.preserve_debuginfo_1.SimplifyCfg-final.diff
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+pub fn preserve_debuginfo_1(foo: &Foo, v: &mut bool) -> i32 {
+    // CHECK-LABEL: fn preserve_debuginfo_1
+    // CHECK: debug foo_a => [[foo_a:_[0-9]+]];
+    // CHECK: debug foo_b => [[foo_b:_[0-9]+]];
+    // CHECK: debug foo_c => [[foo_c:_[0-9]+]];
+    // CHECK: bb0: {
+    // CHECK-NEXT: (*_2) = const true;
+    // CHECK-NEXT: DBG: [[foo_a]] = &((*_1).0: i32)
+    // CHECK-NEXT: DBG: [[foo_b]] = &((*_1).1: i64)
+    // CHECK-NEXT: _0 = copy ((*_1).2: i32);
+    // CHECK-NEXT: DBG: [[foo_c]] = &((*_1).2: i32)
+    // CHECK-NEXT: return;
+    mir! {
+        let _foo_a: &i32;
+        let _foo_b: &i64;
+        let _foo_c: &i32;
+        debug foo_a => _foo_a;
+        debug foo_b => _foo_b;
+        debug foo_c => _foo_c;
+        {
+            Goto(tmp)
+        }
+        tmp = {
+            *v = true;
+            _foo_a = &(*foo).a;
+            Goto(ret)
+        }
+        ret = {
+            _foo_b = &(*foo).b;
+            RET = (*foo).c;
+            _foo_c = &(*foo).c;
+            Return()
+        }
+    }
+}
+
+// EMIT_MIR simplifycfg.preserve_debuginfo_2.SimplifyCfg-final.diff
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+pub fn preserve_debuginfo_2(foo: &Foo) -> i32 {
+    // CHECK-LABEL: fn preserve_debuginfo_2
+    // CHECK: debug foo_a => [[foo_a:_[0-9]+]];
+    // CHECK: debug foo_b => [[foo_b:_[0-9]+]];
+    // CHECK: debug foo_c => [[foo_c:_[0-9]+]];
+    // CHECK: bb0: {
+    // CHECK-NEXT: DBG: [[foo_a]] = &((*_1).0: i32)
+    // CHECK-NEXT: DBG: [[foo_b]] = &((*_1).1: i64)
+    // CHECK-NEXT: _0 = copy ((*_1).2: i32);
+    // CHECK-NEXT: DBG: [[foo_c]] = &((*_1).2: i32)
+    // CHECK-NEXT: return;
+    mir! {
+        let _foo_a: &i32;
+        let _foo_b: &i64;
+        let _foo_c: &i32;
+        debug foo_a => _foo_a;
+        debug foo_b => _foo_b;
+        debug foo_c => _foo_c;
+        {
+            Goto(tmp)
+        }
+        tmp = {
+            _foo_a = &(*foo).a;
+            Goto(ret)
+        }
+        ret = {
+            _foo_b = &(*foo).b;
+            RET = (*foo).c;
+            _foo_c = &(*foo).c;
+            Return()
+        }
+    }
+}
+
+// EMIT_MIR simplifycfg.preserve_debuginfo_3.SimplifyCfg-final.diff
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+pub fn preserve_debuginfo_3(foo: &Foo, c: bool) -> i32 {
+    // CHECK-LABEL: fn preserve_debuginfo_3
+    // CHECK: debug foo_a => [[foo_a:_[0-9]+]];
+    // CHECK: debug foo_b => [[foo_b:_[0-9]+]];
+    // CHECK: debug foo_c => [[foo_c:_[0-9]+]];
+    // CHECK: bb0: {
+    // CHECK-NEXT: switchInt(copy _2) -> [1: bb2, otherwise: bb1];
+    // CHECK: bb1: {
+    // CHECK-NEXT: DBG: [[foo_b]] = &((*_1).1: i64)
+    // CHECK-NEXT: _0 = copy ((*_1).2: i32);
+    // CHECK-NEXT: return;
+    // CHECK: bb2: {
+    // CHECK-NEXT: DBG: [[foo_a]] = &((*_1).0: i32)
+    // CHECK-NEXT: DBG: [[foo_c]] = &((*_1).2: i32)
+    // CHECK-NEXT: _0 = copy ((*_1).0: i32);
+    // CHECK-NEXT: return;
+    mir! {
+        let _foo_a: &i32;
+        let _foo_b: &i64;
+        let _foo_c: &i32;
+        debug foo_a => _foo_a;
+        debug foo_b => _foo_b;
+        debug foo_c => _foo_c;
+        {
+            match c {
+                true => tmp,
+                _ => ret,
+            }
+        }
+        tmp = {
+            _foo_a = &(*foo).a;
+            Goto(ret_1)
+        }
+        ret = {
+            _foo_b = &(*foo).b;
+            RET = (*foo).c;
+            Return()
+        }
+        ret_1 = {
+            _foo_c = &(*foo).c;
+            RET = (*foo).a;
+            Return()
+        }
+    }
+}
+
+// EMIT_MIR simplifycfg.preserve_debuginfo_identical_succs.SimplifyCfg-final.diff
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+pub fn preserve_debuginfo_identical_succs(foo: &Foo, c: bool) -> i32 {
+    // CHECK-LABEL: fn preserve_debuginfo_identical_succs
+    // CHECK: debug foo_a => [[foo_a:_[0-9]+]];
+    // CHECK: debug foo_b => [[foo_b:_[0-9]+]];
+    // CHECK: debug foo_c => [[foo_c:_[0-9]+]];
+    // CHECK: bb0: {
+    // CHECK-NEXT: DBG: [[foo_a]] = &((*_1).0: i32)
+    // CHECK-NEXT: DBG: [[foo_b]] = &((*_1).1: i64)
+    // CHECK-NEXT: _0 = copy ((*_1).2: i32);
+    // CHECK-NEXT: DBG: [[foo_c]] = &((*_1).2: i32)
+    // CHECK-NEXT: return;
+    mir! {
+        let _foo_a: &i32;
+        let _foo_b: &i64;
+        let _foo_c: &i32;
+        debug foo_a => _foo_a;
+        debug foo_b => _foo_b;
+        debug foo_c => _foo_c;
+        {
+            match c {
+                true => tmp,
+                _ => tmp,
+            }
+        }
+        tmp = {
+            _foo_a = &(*foo).a;
+            Goto(ret)
+        }
+        ret = {
+            _foo_b = &(*foo).b;
+            RET = (*foo).c;
+            _foo_c = &(*foo).c;
+            Return()
+        }
+    }
+}
diff --git a/tests/mir-opt/inline/forced_closure_inherent.caller-{closure#0}.ForceInline.panic-abort.diff b/tests/mir-opt/inline/forced_closure_inherent.caller-{closure#0}.ForceInline.panic-abort.diff
new file mode 100644
index 00000000000..8e03432c2af
--- /dev/null
+++ b/tests/mir-opt/inline/forced_closure_inherent.caller-{closure#0}.ForceInline.panic-abort.diff
@@ -0,0 +1,21 @@
+- // MIR for `caller::{closure#0}` before ForceInline
++ // MIR for `caller::{closure#0}` after ForceInline
+  
+  fn caller::{closure#0}(_1: &{closure@$DIR/forced_closure_inherent.rs:14:6: 14:8}) -> () {
+      let mut _0: ();
+      let _2: ();
++     scope 1 (inlined Foo::callee_forced) {
++     }
+  
+      bb0: {
+          StorageLive(_2);
+-         _2 = Foo::callee_forced() -> [return: bb1, unwind unreachable];
+-     }
+- 
+-     bb1: {
+          StorageDead(_2);
+          _0 = const ();
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/inline/forced_closure_inherent.caller-{closure#0}.ForceInline.panic-unwind.diff b/tests/mir-opt/inline/forced_closure_inherent.caller-{closure#0}.ForceInline.panic-unwind.diff
new file mode 100644
index 00000000000..0e41fd89dac
--- /dev/null
+++ b/tests/mir-opt/inline/forced_closure_inherent.caller-{closure#0}.ForceInline.panic-unwind.diff
@@ -0,0 +1,21 @@
+- // MIR for `caller::{closure#0}` before ForceInline
++ // MIR for `caller::{closure#0}` after ForceInline
+  
+  fn caller::{closure#0}(_1: &{closure@$DIR/forced_closure_inherent.rs:14:6: 14:8}) -> () {
+      let mut _0: ();
+      let _2: ();
++     scope 1 (inlined Foo::callee_forced) {
++     }
+  
+      bb0: {
+          StorageLive(_2);
+-         _2 = Foo::callee_forced() -> [return: bb1, unwind continue];
+-     }
+- 
+-     bb1: {
+          StorageDead(_2);
+          _0 = const ();
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/inline/forced_closure_inherent.rs b/tests/mir-opt/inline/forced_closure_inherent.rs
new file mode 100644
index 00000000000..949c7d6ecbf
--- /dev/null
+++ b/tests/mir-opt/inline/forced_closure_inherent.rs
@@ -0,0 +1,19 @@
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+//@ compile-flags: -Copt-level=0 --crate-type=lib
+#![feature(rustc_attrs)]
+
+struct Foo {}
+
+impl Foo {
+    #[rustc_force_inline]
+    pub fn callee_forced() {}
+}
+
+// EMIT_MIR forced_closure_inherent.caller-{closure#0}.ForceInline.diff
+pub fn caller() {
+    (|| {
+        Foo::callee_forced();
+        // CHECK-LABEL: fn caller::{closure#0}(
+        // CHECK: (inlined Foo::callee_forced)
+    })();
+}
diff --git a/tests/mir-opt/inline/forced_inherent.caller.ForceInline.panic-abort.diff b/tests/mir-opt/inline/forced_inherent.caller.ForceInline.panic-abort.diff
new file mode 100644
index 00000000000..6ea1894af98
--- /dev/null
+++ b/tests/mir-opt/inline/forced_inherent.caller.ForceInline.panic-abort.diff
@@ -0,0 +1,21 @@
+- // MIR for `caller` before ForceInline
++ // MIR for `caller` after ForceInline
+  
+  fn caller() -> () {
+      let mut _0: ();
+      let _1: ();
++     scope 1 (inlined Foo::bar) {
++     }
+  
+      bb0: {
+          StorageLive(_1);
+-         _1 = Foo::bar() -> [return: bb1, unwind unreachable];
+-     }
+- 
+-     bb1: {
+          StorageDead(_1);
+          _0 = const ();
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/inline/forced_inherent.caller.ForceInline.panic-unwind.diff b/tests/mir-opt/inline/forced_inherent.caller.ForceInline.panic-unwind.diff
new file mode 100644
index 00000000000..dd91c338772
--- /dev/null
+++ b/tests/mir-opt/inline/forced_inherent.caller.ForceInline.panic-unwind.diff
@@ -0,0 +1,21 @@
+- // MIR for `caller` before ForceInline
++ // MIR for `caller` after ForceInline
+  
+  fn caller() -> () {
+      let mut _0: ();
+      let _1: ();
++     scope 1 (inlined Foo::bar) {
++     }
+  
+      bb0: {
+          StorageLive(_1);
+-         _1 = Foo::bar() -> [return: bb1, unwind continue];
+-     }
+- 
+-     bb1: {
+          StorageDead(_1);
+          _0 = const ();
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/inline/forced_inherent.rs b/tests/mir-opt/inline/forced_inherent.rs
new file mode 100644
index 00000000000..24bf8daa644
--- /dev/null
+++ b/tests/mir-opt/inline/forced_inherent.rs
@@ -0,0 +1,17 @@
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+//@ compile-flags: -Copt-level=0 --crate-type=lib
+#![feature(rustc_attrs)]
+
+struct Foo;
+
+impl Foo {
+    #[rustc_force_inline]
+    fn bar() {}
+}
+
+// EMIT_MIR forced_inherent.caller.ForceInline.diff
+fn caller() {
+    Foo::bar();
+    // CHECK-LABEL: fn caller(
+    // CHECK: (inlined Foo::bar)
+}
diff --git a/tests/mir-opt/inline/forced_inherent_ambiguous.caller.ForceInline.panic-abort.diff b/tests/mir-opt/inline/forced_inherent_ambiguous.caller.ForceInline.panic-abort.diff
new file mode 100644
index 00000000000..6ea1894af98
--- /dev/null
+++ b/tests/mir-opt/inline/forced_inherent_ambiguous.caller.ForceInline.panic-abort.diff
@@ -0,0 +1,21 @@
+- // MIR for `caller` before ForceInline
++ // MIR for `caller` after ForceInline
+  
+  fn caller() -> () {
+      let mut _0: ();
+      let _1: ();
++     scope 1 (inlined Foo::bar) {
++     }
+  
+      bb0: {
+          StorageLive(_1);
+-         _1 = Foo::bar() -> [return: bb1, unwind unreachable];
+-     }
+- 
+-     bb1: {
+          StorageDead(_1);
+          _0 = const ();
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/inline/forced_inherent_ambiguous.caller.ForceInline.panic-unwind.diff b/tests/mir-opt/inline/forced_inherent_ambiguous.caller.ForceInline.panic-unwind.diff
new file mode 100644
index 00000000000..dd91c338772
--- /dev/null
+++ b/tests/mir-opt/inline/forced_inherent_ambiguous.caller.ForceInline.panic-unwind.diff
@@ -0,0 +1,21 @@
+- // MIR for `caller` before ForceInline
++ // MIR for `caller` after ForceInline
+  
+  fn caller() -> () {
+      let mut _0: ();
+      let _1: ();
++     scope 1 (inlined Foo::bar) {
++     }
+  
+      bb0: {
+          StorageLive(_1);
+-         _1 = Foo::bar() -> [return: bb1, unwind continue];
+-     }
+- 
+-     bb1: {
+          StorageDead(_1);
+          _0 = const ();
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/inline/forced_inherent_ambiguous.rs b/tests/mir-opt/inline/forced_inherent_ambiguous.rs
new file mode 100644
index 00000000000..e3c5d3e4f9e
--- /dev/null
+++ b/tests/mir-opt/inline/forced_inherent_ambiguous.rs
@@ -0,0 +1,25 @@
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+//@ compile-flags: -Copt-level=0 --crate-type=lib
+#![feature(rustc_attrs)]
+
+struct Foo;
+
+impl Foo {
+    #[rustc_force_inline]
+    fn bar() {}
+}
+
+trait Tr {
+    fn bar();
+}
+
+impl Tr for Foo {
+    fn bar() {}
+}
+
+// EMIT_MIR forced_inherent_ambiguous.caller.ForceInline.diff
+fn caller() {
+    Foo::bar();
+    // CHECK-LABEL: fn caller(
+    // CHECK: (inlined Foo::bar)
+}
diff --git a/tests/mir-opt/inline/forced_inherent_async.caller.ForceInline.panic-abort.diff b/tests/mir-opt/inline/forced_inherent_async.caller.ForceInline.panic-abort.diff
new file mode 100644
index 00000000000..6495ddbafba
--- /dev/null
+++ b/tests/mir-opt/inline/forced_inherent_async.caller.ForceInline.panic-abort.diff
@@ -0,0 +1,12 @@
+- // MIR for `caller` before ForceInline
++ // MIR for `caller` after ForceInline
+  
+  fn caller() -> {async fn body of caller()} {
+      let mut _0: {async fn body of caller()};
+  
+      bb0: {
+          _0 = {coroutine@$DIR/forced_inherent_async.rs:14:19: 18:2 (#0)};
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/inline/forced_inherent_async.caller.ForceInline.panic-unwind.diff b/tests/mir-opt/inline/forced_inherent_async.caller.ForceInline.panic-unwind.diff
new file mode 100644
index 00000000000..6495ddbafba
--- /dev/null
+++ b/tests/mir-opt/inline/forced_inherent_async.caller.ForceInline.panic-unwind.diff
@@ -0,0 +1,12 @@
+- // MIR for `caller` before ForceInline
++ // MIR for `caller` after ForceInline
+  
+  fn caller() -> {async fn body of caller()} {
+      let mut _0: {async fn body of caller()};
+  
+      bb0: {
+          _0 = {coroutine@$DIR/forced_inherent_async.rs:14:19: 18:2 (#0)};
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/inline/forced_inherent_async.rs b/tests/mir-opt/inline/forced_inherent_async.rs
new file mode 100644
index 00000000000..ce58a0ac48f
--- /dev/null
+++ b/tests/mir-opt/inline/forced_inherent_async.rs
@@ -0,0 +1,18 @@
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+//@ compile-flags: -Copt-level=0 --crate-type=lib
+//@ edition: 2021
+#![feature(rustc_attrs)]
+
+struct Foo {}
+
+impl Foo {
+    #[rustc_force_inline]
+    pub fn callee_forced() {}
+}
+
+// EMIT_MIR forced_inherent_async.caller.ForceInline.diff
+async fn caller() {
+    Foo::callee_forced();
+    // CHECK-LABEL: fn caller(
+    // CHECK: (inlined Foo::callee_forced)
+}
diff --git a/tests/mir-opt/inline/forced_inherent_dead_code.caller.ForceInline.panic-abort.diff b/tests/mir-opt/inline/forced_inherent_dead_code.caller.ForceInline.panic-abort.diff
new file mode 100644
index 00000000000..edaf2820d85
--- /dev/null
+++ b/tests/mir-opt/inline/forced_inherent_dead_code.caller.ForceInline.panic-abort.diff
@@ -0,0 +1,21 @@
+- // MIR for `caller` before ForceInline
++ // MIR for `caller` after ForceInline
+  
+  fn caller() -> () {
+      let mut _0: ();
+      let _1: ();
++     scope 1 (inlined Foo::callee_forced) {
++     }
+  
+      bb0: {
+          StorageLive(_1);
+-         _1 = Foo::callee_forced() -> [return: bb1, unwind unreachable];
+-     }
+- 
+-     bb1: {
+          StorageDead(_1);
+          _0 = const ();
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/inline/forced_inherent_dead_code.caller.ForceInline.panic-unwind.diff b/tests/mir-opt/inline/forced_inherent_dead_code.caller.ForceInline.panic-unwind.diff
new file mode 100644
index 00000000000..22f8b14a724
--- /dev/null
+++ b/tests/mir-opt/inline/forced_inherent_dead_code.caller.ForceInline.panic-unwind.diff
@@ -0,0 +1,21 @@
+- // MIR for `caller` before ForceInline
++ // MIR for `caller` after ForceInline
+  
+  fn caller() -> () {
+      let mut _0: ();
+      let _1: ();
++     scope 1 (inlined Foo::callee_forced) {
++     }
+  
+      bb0: {
+          StorageLive(_1);
+-         _1 = Foo::callee_forced() -> [return: bb1, unwind continue];
+-     }
+- 
+-     bb1: {
+          StorageDead(_1);
+          _0 = const ();
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/inline/forced_inherent_dead_code.rs b/tests/mir-opt/inline/forced_inherent_dead_code.rs
new file mode 100644
index 00000000000..057a4cac528
--- /dev/null
+++ b/tests/mir-opt/inline/forced_inherent_dead_code.rs
@@ -0,0 +1,21 @@
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+//@ compile-flags: -Copt-level=0 -Clink-dead-code
+#![feature(rustc_attrs)]
+
+struct Foo {}
+
+impl Foo {
+    #[rustc_force_inline]
+    pub fn callee_forced() {}
+}
+
+// EMIT_MIR forced_inherent_dead_code.caller.ForceInline.diff
+pub fn caller() {
+    Foo::callee_forced();
+    // CHECK-LABEL: fn caller(
+    // CHECK: (inlined Foo::callee_forced)
+}
+
+fn main() {
+    caller();
+}
diff --git a/tests/mir-opt/inline/inline_shims.drop.Inline.panic-abort.diff b/tests/mir-opt/inline/inline_shims.drop.Inline.panic-abort.diff
index f6c111a2228..9509739413b 100644
--- a/tests/mir-opt/inline/inline_shims.drop.Inline.panic-abort.diff
+++ b/tests/mir-opt/inline/inline_shims.drop.Inline.panic-abort.diff
@@ -84,7 +84,6 @@
           _5 = copy _2;
 -         _0 = drop_in_place::<Option<B>>(move _5) -> [return: bb2, unwind unreachable];
 +         StorageLive(_15);
-+         StorageLive(_16);
 +         _15 = discriminant((*_5));
 +         switchInt(move _15) -> [0: bb5, otherwise: bb6];
       }
@@ -110,7 +109,6 @@
 +     }
 + 
 +     bb5: {
-+         StorageDead(_16);
 +         StorageDead(_15);
           StorageDead(_5);
           return;
diff --git a/tests/mir-opt/inline/inline_shims.drop.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_shims.drop.Inline.panic-unwind.diff
index 18324276425..34f89da19f5 100644
--- a/tests/mir-opt/inline/inline_shims.drop.Inline.panic-unwind.diff
+++ b/tests/mir-opt/inline/inline_shims.drop.Inline.panic-unwind.diff
@@ -27,13 +27,11 @@
           _5 = copy _2;
 -         _0 = drop_in_place::<Option<B>>(move _5) -> [return: bb2, unwind continue];
 +         StorageLive(_6);
-+         StorageLive(_7);
 +         _6 = discriminant((*_5));
 +         switchInt(move _6) -> [0: bb2, otherwise: bb3];
       }
   
       bb2: {
-+         StorageDead(_7);
 +         StorageDead(_6);
           StorageDead(_5);
           return;
diff --git a/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-abort.diff b/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-abort.diff
index 2ae86e2eb8b..0acb33febe5 100644
--- a/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-abort.diff
+++ b/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-abort.diff
@@ -129,11 +129,8 @@
           _10 = deref_copy (_1.1: &mut std::task::Context<'_>);
           _9 = &mut (*_10);
 -         _7 = <{async fn body of ActionPermit<'_, T>::perform()} as Future>::poll(move _8, move _9) -> [return: bb3, unwind unreachable];
-+         StorageLive(_11);
-+         StorageLive(_15);
 +         StorageLive(_16);
 +         StorageLive(_25);
-+         StorageLive(_27);
 +         StorageLive(_30);
 +         StorageLive(_31);
 +         StorageLive(_32);
@@ -166,11 +163,8 @@
 +         StorageDead(_32);
 +         StorageDead(_31);
 +         StorageDead(_30);
-+         StorageDead(_27);
 +         StorageDead(_25);
 +         StorageDead(_16);
-+         StorageDead(_15);
-+         StorageDead(_11);
           StorageDead(_9);
           StorageDead(_8);
           StorageDead(_7);
@@ -223,23 +217,15 @@
 +         _22 = &mut (*_23);
 +         StorageDead(_24);
 +         StorageLive(_44);
-+         StorageLive(_45);
 +         StorageLive(_49);
 +         StorageLive(_41);
 +         StorageLive(_42);
-+         StorageLive(_43);
-+         _45 = &mut _19;
-+         StorageLive(_46);
-+         _46 = &mut (_19.0: &mut std::future::Ready<()>);
 +         _44 = copy (_19.0: &mut std::future::Ready<()>);
-+         StorageDead(_46);
-+         _43 = &mut ((*_44).0: std::option::Option<()>);
 +         StorageLive(_47);
 +         _47 = Option::<()>::None;
 +         _42 = copy ((*_44).0: std::option::Option<()>);
 +         ((*_44).0: std::option::Option<()>) = copy _47;
 +         StorageDead(_47);
-+         StorageDead(_43);
 +         StorageLive(_48);
 +         _48 = discriminant(_42);
 +         switchInt(move _48) -> [0: bb11, 1: bb12, otherwise: bb5];
@@ -315,7 +301,6 @@
 +         _18 = Poll::<()>::Ready(move _41);
 +         StorageDead(_41);
 +         StorageDead(_49);
-+         StorageDead(_45);
 +         StorageDead(_44);
 +         StorageDead(_22);
 +         StorageDead(_19);
diff --git a/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-unwind.diff b/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-unwind.diff
index d7ae931aaae..98ee46c29b1 100644
--- a/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-unwind.diff
+++ b/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-unwind.diff
@@ -131,11 +131,8 @@
           _10 = deref_copy (_1.1: &mut std::task::Context<'_>);
           _9 = &mut (*_10);
 -         _7 = <{async fn body of ActionPermit<'_, T>::perform()} as Future>::poll(move _8, move _9) -> [return: bb3, unwind: bb5];
-+         StorageLive(_11);
-+         StorageLive(_15);
 +         StorageLive(_16);
 +         StorageLive(_25);
-+         StorageLive(_27);
 +         StorageLive(_30);
 +         StorageLive(_31);
 +         StorageLive(_32);
@@ -180,11 +177,8 @@
 +         StorageDead(_32);
 +         StorageDead(_31);
 +         StorageDead(_30);
-+         StorageDead(_27);
 +         StorageDead(_25);
 +         StorageDead(_16);
-+         StorageDead(_15);
-+         StorageDead(_11);
           StorageDead(_9);
           StorageDead(_8);
           StorageDead(_7);
@@ -240,23 +234,15 @@
 +         _22 = &mut (*_23);
 +         StorageDead(_24);
 +         StorageLive(_46);
-+         StorageLive(_47);
 +         StorageLive(_51);
 +         StorageLive(_43);
 +         StorageLive(_44);
-+         StorageLive(_45);
-+         _47 = &mut _19;
-+         StorageLive(_48);
-+         _48 = &mut (_19.0: &mut std::future::Ready<()>);
 +         _46 = copy (_19.0: &mut std::future::Ready<()>);
-+         StorageDead(_48);
-+         _45 = &mut ((*_46).0: std::option::Option<()>);
 +         StorageLive(_49);
 +         _49 = Option::<()>::None;
 +         _44 = copy ((*_46).0: std::option::Option<()>);
 +         ((*_46).0: std::option::Option<()>) = copy _49;
 +         StorageDead(_49);
-+         StorageDead(_45);
 +         StorageLive(_50);
 +         _50 = discriminant(_44);
 +         switchInt(move _50) -> [0: bb16, 1: bb17, otherwise: bb7];
@@ -356,7 +342,6 @@
 +         _18 = Poll::<()>::Ready(move _43);
 +         StorageDead(_43);
 +         StorageDead(_51);
-+         StorageDead(_47);
 +         StorageDead(_46);
 +         StorageDead(_22);
 +         StorageDead(_19);
diff --git a/tests/mir-opt/issue_101973.inner.GVN.panic-abort.diff b/tests/mir-opt/issue_101973.inner.GVN.panic-abort.diff
index ac88fe67bb8..3ea7387a48d 100644
--- a/tests/mir-opt/issue_101973.inner.GVN.panic-abort.diff
+++ b/tests/mir-opt/issue_101973.inner.GVN.panic-abort.diff
@@ -30,7 +30,6 @@
           StorageLive(_4);
           StorageLive(_5);
           _5 = copy _1;
-          nop;
 -         StorageLive(_14);
 -         _14 = BitAnd(copy _5, const 255_u32);
 -         _4 = BitOr(const 0_u32, move _14);
diff --git a/tests/mir-opt/issue_101973.inner.GVN.panic-unwind.diff b/tests/mir-opt/issue_101973.inner.GVN.panic-unwind.diff
index 96c3cae2d33..832db856b2c 100644
--- a/tests/mir-opt/issue_101973.inner.GVN.panic-unwind.diff
+++ b/tests/mir-opt/issue_101973.inner.GVN.panic-unwind.diff
@@ -30,7 +30,6 @@
           StorageLive(_4);
           StorageLive(_5);
           _5 = copy _1;
-          nop;
 -         StorageLive(_14);
 -         _14 = BitAnd(copy _5, const 255_u32);
 -         _4 = BitOr(const 0_u32, move _14);
diff --git a/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff b/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff
index 5cf36b9aebf..614d9ad440d 100644
--- a/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff
+++ b/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff
@@ -33,15 +33,9 @@
       }
   
       bb2: {
-          StorageLive(_5);
-          _5 = &(*_2)[0 of 3];
-          StorageLive(_6);
-          _6 = &(*_2)[1 of 3];
-          StorageLive(_7);
-          _7 = &(*_2)[2 of 3];
-          StorageDead(_7);
-          StorageDead(_6);
-          StorageDead(_5);
+          // DBG: _5 = &(*_2)[0 of 3];
+          // DBG: _6 = &(*_2)[1 of 3];
+          // DBG: _7 = &(*_2)[2 of 3];
           StorageDead(_4);
           return;
       }
diff --git a/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-unwind.diff b/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-unwind.diff
index 0598a3aa3f1..57a88cf8984 100644
--- a/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-unwind.diff
+++ b/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-unwind.diff
@@ -33,15 +33,9 @@
       }
   
       bb2: {
-          StorageLive(_5);
-          _5 = &(*_2)[0 of 3];
-          StorageLive(_6);
-          _6 = &(*_2)[1 of 3];
-          StorageLive(_7);
-          _7 = &(*_2)[2 of 3];
-          StorageDead(_7);
-          StorageDead(_6);
-          StorageDead(_5);
+          // DBG: _5 = &(*_2)[0 of 3];
+          // DBG: _6 = &(*_2)[1 of 3];
+          // DBG: _7 = &(*_2)[2 of 3];
           StorageDead(_4);
           return;
       }
diff --git a/tests/mir-opt/pre-codegen/clone_as_copy.clone_as_copy.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/clone_as_copy.clone_as_copy.PreCodegen.after.mir
index 34747e5a928..1e6e2ee1b8b 100644
--- a/tests/mir-opt/pre-codegen/clone_as_copy.clone_as_copy.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/clone_as_copy.clone_as_copy.PreCodegen.after.mir
@@ -12,10 +12,8 @@ fn clone_as_copy(_1: &NestCopy) -> NestCopy {
     }
 
     bb0: {
-        StorageLive(_2);
-        _2 = &((*_1).1: AllCopy);
+        // DBG: _2 = &((*_1).1: AllCopy);
         _0 = copy (*_1);
-        StorageDead(_2);
         return;
     }
 }
diff --git a/tests/mir-opt/pre-codegen/clone_as_copy.enum_clone_as_copy.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/clone_as_copy.enum_clone_as_copy.PreCodegen.after.mir
index e67f362ee04..76bb49bc9c1 100644
--- a/tests/mir-opt/pre-codegen/clone_as_copy.enum_clone_as_copy.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/clone_as_copy.enum_clone_as_copy.PreCodegen.after.mir
@@ -5,58 +5,28 @@ fn enum_clone_as_copy(_1: &Enum1) -> Enum1 {
     let mut _0: Enum1;
     scope 1 (inlined <Enum1 as Clone>::clone) {
         debug self => _1;
-        let mut _2: isize;
-        let _3: &AllCopy;
-        let _4: &NestCopy;
+        let _2: &AllCopy;
+        let _3: &NestCopy;
         scope 2 {
-            debug __self_0 => _3;
+            debug __self_0 => _2;
             scope 6 (inlined <AllCopy as Clone>::clone) {
-                debug self => _3;
+                debug self => _2;
             }
         }
         scope 3 {
-            debug __self_0 => _4;
+            debug __self_0 => _3;
             scope 4 (inlined <NestCopy as Clone>::clone) {
-                debug self => _4;
-                let _5: &AllCopy;
+                debug self => _3;
+                let _4: &AllCopy;
                 scope 5 (inlined <AllCopy as Clone>::clone) {
-                    debug self => _5;
+                    debug self => _4;
                 }
             }
         }
     }
 
     bb0: {
-        StorageLive(_2);
-        StorageLive(_3);
-        StorageLive(_4);
-        _2 = discriminant((*_1));
-        switchInt(move _2) -> [0: bb1, 1: bb2, otherwise: bb4];
-    }
-
-    bb1: {
-        _3 = &(((*_1) as A).0: AllCopy);
         _0 = copy (*_1);
-        goto -> bb3;
-    }
-
-    bb2: {
-        _4 = &(((*_1) as B).0: NestCopy);
-        StorageLive(_5);
-        _5 = &((((*_1) as B).0: NestCopy).1: AllCopy);
-        StorageDead(_5);
-        _0 = copy (*_1);
-        goto -> bb3;
-    }
-
-    bb3: {
-        StorageDead(_4);
-        StorageDead(_3);
-        StorageDead(_2);
         return;
     }
-
-    bb4: {
-        unreachable;
-    }
 }
diff --git a/tests/mir-opt/pre-codegen/clone_as_copy.rs b/tests/mir-opt/pre-codegen/clone_as_copy.rs
index f5ff1854d38..00f24754d59 100644
--- a/tests/mir-opt/pre-codegen/clone_as_copy.rs
+++ b/tests/mir-opt/pre-codegen/clone_as_copy.rs
@@ -25,19 +25,19 @@ enum Enum1 {
 // EMIT_MIR clone_as_copy.clone_as_copy.PreCodegen.after.mir
 fn clone_as_copy(v: &NestCopy) -> NestCopy {
     // CHECK-LABEL: fn clone_as_copy(
-    // CHECK-NOT: = AllCopy { {{.*}} };
-    // CHECK-NOT: = NestCopy { {{.*}} };
-    // CHECK: _0 = copy (*_1);
-    // CHECK: return;
+    // CHECK: let [[DEAD_VAR:_.*]]: &AllCopy;
+    // CHECK: bb0: {
+    // CHECK-NEXT: DBG: [[DEAD_VAR]] = &((*_1).1: AllCopy)
+    // CHECK-NEXT: _0 = copy (*_1);
+    // CHECK-NEXT: return;
     v.clone()
 }
 
-// FIXME: We can merge into exactly one assignment statement.
 // EMIT_MIR clone_as_copy.enum_clone_as_copy.PreCodegen.after.mir
 fn enum_clone_as_copy(v: &Enum1) -> Enum1 {
     // CHECK-LABEL: fn enum_clone_as_copy(
-    // CHECK-NOT: = Enum1::
-    // CHECK: _0 = copy (*_1);
-    // CHECK: _0 = copy (*_1);
+    // CHECK: bb0: {
+    // CHECK-NEXT: _0 = copy (*_1);
+    // CHECK-NEXT: return;
     v.clone()
 }
diff --git a/tests/mir-opt/pre-codegen/dead_on_invalid_place.invalid_place.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/dead_on_invalid_place.invalid_place.PreCodegen.after.mir
new file mode 100644
index 00000000000..4a2127178fb
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/dead_on_invalid_place.invalid_place.PreCodegen.after.mir
@@ -0,0 +1,13 @@
+// MIR for `invalid_place` after PreCodegen
+
+fn invalid_place(_1: bool) -> bool {
+    debug c1_ref => _2;
+    let mut _0: bool;
+    let mut _2: &bool;
+
+    bb0: {
+        // DBG: _2 = &?;
+        _0 = copy _1;
+        return;
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/dead_on_invalid_place.rs b/tests/mir-opt/pre-codegen/dead_on_invalid_place.rs
new file mode 100644
index 00000000000..5abe9fa43a5
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/dead_on_invalid_place.rs
@@ -0,0 +1,27 @@
+#![feature(core_intrinsics, custom_mir)]
+#![crate_type = "lib"]
+
+use std::intrinsics::mir::*;
+
+// EMIT_MIR dead_on_invalid_place.invalid_place.PreCodegen.after.mir
+#[custom_mir(dialect = "runtime")]
+pub fn invalid_place(c: bool) -> bool {
+    // CHECK-LABEL: fn invalid_place
+    // CHECK: debug c1_ref => [[c1_ref:_[0-9]+]];
+    // CHECK: bb0: {
+    // We cannot read the reference, since `c1` is dead.
+    // CHECK-NEXT: DBG: [[c1_ref]] = &?
+    // CHECK-NEXT: _0 = copy _1;
+    // CHECK-NEXT: return;
+    mir! {
+        let _c1_ref: &bool;
+        let c1: bool;
+        debug c1_ref => _c1_ref;
+        {
+            c1 = c;
+            _c1_ref = &c1;
+            RET = c;
+            Return()
+        }
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/loops.filter_mapped.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/loops.filter_mapped.PreCodegen.after.mir
index 75e8cb1d861..8f30ad30fcc 100644
--- a/tests/mir-opt/pre-codegen/loops.filter_mapped.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/loops.filter_mapped.PreCodegen.after.mir
@@ -6,20 +6,20 @@ fn filter_mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> Option<U>) -> ()
     let mut _0: ();
     let mut _3: std::iter::FilterMap<impl Iterator<Item = T>, impl Fn(T) -> Option<U>>;
     let mut _4: std::iter::FilterMap<impl Iterator<Item = T>, impl Fn(T) -> Option<U>>;
-    let mut _5: &mut std::iter::FilterMap<impl Iterator<Item = T>, impl Fn(T) -> Option<U>>;
-    let mut _8: std::option::Option<U>;
-    let mut _9: isize;
-    let _11: ();
+    let mut _7: std::option::Option<U>;
+    let mut _8: isize;
+    let _10: ();
+    let mut _11: &mut std::iter::FilterMap<impl Iterator<Item = T>, impl Fn(T) -> Option<U>>;
     scope 1 {
         debug iter => _4;
-        let _10: U;
+        let _9: U;
         scope 2 {
-            debug x => _10;
+            debug x => _9;
         }
         scope 4 (inlined <FilterMap<impl Iterator<Item = T>, impl Fn(T) -> Option<U>> as Iterator>::next) {
-            debug self => _5;
-            let mut _6: &mut impl Iterator<Item = T>;
-            let mut _7: &mut impl Fn(T) -> Option<U>;
+            debug self => _11;
+            let mut _5: &mut impl Iterator<Item = T>;
+            let mut _6: &mut impl Fn(T) -> Option<U>;
         }
     }
     scope 3 (inlined <FilterMap<impl Iterator<Item = T>, impl Fn(T) -> Option<U>> as IntoIterator>::into_iter) {
@@ -37,24 +37,24 @@ fn filter_mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> Option<U>) -> ()
     }
 
     bb2: {
-        StorageLive(_8);
-        _5 = &mut _4;
-        StorageLive(_6);
-        _6 = &mut (_4.0: impl Iterator<Item = T>);
         StorageLive(_7);
-        _7 = &mut (_4.1: impl Fn(T) -> Option<U>);
-        _8 = <impl Iterator<Item = T> as Iterator>::find_map::<U, &mut impl Fn(T) -> Option<U>>(move _6, move _7) -> [return: bb3, unwind: bb9];
+        // DBG: _11 = &_4;
+        StorageLive(_5);
+        _5 = &mut (_4.0: impl Iterator<Item = T>);
+        StorageLive(_6);
+        _6 = &mut (_4.1: impl Fn(T) -> Option<U>);
+        _7 = <impl Iterator<Item = T> as Iterator>::find_map::<U, &mut impl Fn(T) -> Option<U>>(move _5, move _6) -> [return: bb3, unwind: bb9];
     }
 
     bb3: {
-        StorageDead(_7);
         StorageDead(_6);
-        _9 = discriminant(_8);
-        switchInt(move _9) -> [0: bb4, 1: bb6, otherwise: bb8];
+        StorageDead(_5);
+        _8 = discriminant(_7);
+        switchInt(move _8) -> [0: bb4, 1: bb6, otherwise: bb8];
     }
 
     bb4: {
-        StorageDead(_8);
+        StorageDead(_7);
         drop(_4) -> [return: bb5, unwind continue];
     }
 
@@ -64,12 +64,12 @@ fn filter_mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> Option<U>) -> ()
     }
 
     bb6: {
-        _10 = move ((_8 as Some).0: U);
-        _11 = opaque::<U>(move _10) -> [return: bb7, unwind: bb9];
+        _9 = move ((_7 as Some).0: U);
+        _10 = opaque::<U>(move _9) -> [return: bb7, unwind: bb9];
     }
 
     bb7: {
-        StorageDead(_8);
+        StorageDead(_7);
         goto -> bb2;
     }
 
diff --git a/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir
index 154cbd3791c..beb7b936ccf 100644
--- a/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir
@@ -5,32 +5,31 @@ fn int_range(_1: usize, _2: usize) -> () {
     debug end => _2;
     let mut _0: ();
     let mut _3: std::ops::Range<usize>;
-    let mut _4: std::ops::Range<usize>;
-    let mut _5: &mut std::ops::Range<usize>;
-    let mut _13: std::option::Option<usize>;
-    let _15: ();
+    let mut _9: std::option::Option<usize>;
+    let _11: ();
+    let mut _12: &mut std::ops::Range<usize>;
     scope 1 {
-        debug iter => _4;
-        let _14: usize;
+        debug iter => _3;
+        let _10: usize;
         scope 2 {
-            debug i => _14;
+            debug i => _10;
         }
         scope 4 (inlined iter::range::<impl Iterator for std::ops::Range<usize>>::next) {
-            debug self => _5;
+            debug self => _12;
             scope 5 (inlined <std::ops::Range<usize> as iter::range::RangeIteratorImpl>::spec_next) {
-                debug self => _5;
-                let mut _6: &usize;
-                let mut _7: &usize;
-                let mut _10: bool;
-                let _11: usize;
-                let mut _12: usize;
+                debug self => _12;
+                let mut _6: bool;
+                let _7: usize;
+                let mut _8: usize;
+                let mut _13: &usize;
+                let mut _14: &usize;
                 scope 6 {
-                    debug old => _11;
+                    debug old => _7;
                     scope 8 (inlined <usize as Step>::forward_unchecked) {
-                        debug start => _11;
+                        debug start => _7;
                         debug n => const 1_usize;
                         scope 9 (inlined #[track_caller] core::num::<impl usize>::unchecked_add) {
-                            debug self => _11;
+                            debug self => _7;
                             debug rhs => const 1_usize;
                             scope 10 (inlined core::ub_checks::check_language_ub) {
                                 scope 11 (inlined core::ub_checks::check_language_ub::runtime) {
@@ -40,10 +39,10 @@ fn int_range(_1: usize, _2: usize) -> () {
                     }
                 }
                 scope 7 (inlined std::cmp::impls::<impl PartialOrd for usize>::lt) {
-                    debug self => _6;
-                    debug other => _7;
-                    let mut _8: usize;
-                    let mut _9: usize;
+                    debug self => _13;
+                    debug other => _14;
+                    let mut _4: usize;
+                    let mut _5: usize;
                 }
             }
         }
@@ -54,54 +53,45 @@ fn int_range(_1: usize, _2: usize) -> () {
 
     bb0: {
         _3 = std::ops::Range::<usize> { start: copy _1, end: copy _2 };
-        StorageLive(_4);
-        _4 = copy _3;
         goto -> bb1;
     }
 
     bb1: {
-        StorageLive(_13);
-        _5 = &mut _4;
-        StorageLive(_10);
-        StorageLive(_6);
-        _6 = &(_4.0: usize);
-        StorageLive(_7);
-        _7 = &(_4.1: usize);
-        StorageLive(_8);
-        _8 = copy (_4.0: usize);
         StorageLive(_9);
-        _9 = copy (_4.1: usize);
-        _10 = Lt(move _8, move _9);
-        StorageDead(_9);
-        StorageDead(_8);
-        switchInt(move _10) -> [0: bb2, otherwise: bb3];
+        // DBG: _12 = &_3;
+        StorageLive(_6);
+        // DBG: _13 = &(_3.0: usize);
+        // DBG: _14 = &(_3.1: usize);
+        StorageLive(_4);
+        _4 = copy (_3.0: usize);
+        StorageLive(_5);
+        _5 = copy (_3.1: usize);
+        _6 = Lt(move _4, move _5);
+        StorageDead(_5);
+        StorageDead(_4);
+        switchInt(move _6) -> [0: bb2, otherwise: bb3];
     }
 
     bb2: {
-        StorageDead(_7);
         StorageDead(_6);
-        StorageDead(_10);
-        StorageDead(_13);
-        StorageDead(_4);
+        StorageDead(_9);
         return;
     }
 
     bb3: {
-        StorageDead(_7);
+        _7 = copy (_3.0: usize);
+        StorageLive(_8);
+        _8 = AddUnchecked(copy _7, const 1_usize);
+        (_3.0: usize) = move _8;
+        StorageDead(_8);
+        _9 = Option::<usize>::Some(copy _7);
         StorageDead(_6);
-        _11 = copy (_4.0: usize);
-        StorageLive(_12);
-        _12 = AddUnchecked(copy _11, const 1_usize);
-        (_4.0: usize) = move _12;
-        StorageDead(_12);
-        _13 = Option::<usize>::Some(copy _11);
-        StorageDead(_10);
-        _14 = copy ((_13 as Some).0: usize);
-        _15 = opaque::<usize>(move _14) -> [return: bb4, unwind continue];
+        _10 = copy ((_9 as Some).0: usize);
+        _11 = opaque::<usize>(move _10) -> [return: bb4, unwind continue];
     }
 
     bb4: {
-        StorageDead(_13);
+        StorageDead(_9);
         goto -> bb1;
     }
 }
diff --git a/tests/mir-opt/pre-codegen/loops.mapped.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/loops.mapped.PreCodegen.after.mir
index d22ea54004c..406c96fc32f 100644
--- a/tests/mir-opt/pre-codegen/loops.mapped.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/loops.mapped.PreCodegen.after.mir
@@ -6,32 +6,32 @@ fn mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> U) -> () {
     let mut _0: ();
     let mut _3: std::iter::Map<impl Iterator<Item = T>, impl Fn(T) -> U>;
     let mut _4: std::iter::Map<impl Iterator<Item = T>, impl Fn(T) -> U>;
-    let mut _5: &mut std::iter::Map<impl Iterator<Item = T>, impl Fn(T) -> U>;
-    let mut _13: std::option::Option<U>;
-    let _15: ();
+    let mut _12: std::option::Option<U>;
+    let _14: ();
+    let mut _15: &mut std::iter::Map<impl Iterator<Item = T>, impl Fn(T) -> U>;
     scope 1 {
         debug iter => _4;
-        let _14: U;
+        let _13: U;
         scope 2 {
-            debug x => _14;
+            debug x => _13;
         }
         scope 4 (inlined <Map<impl Iterator<Item = T>, impl Fn(T) -> U> as Iterator>::next) {
-            debug self => _5;
-            let mut _6: &mut impl Iterator<Item = T>;
-            let mut _7: std::option::Option<T>;
-            let mut _8: &mut impl Fn(T) -> U;
+            debug self => _15;
+            let mut _5: &mut impl Iterator<Item = T>;
+            let mut _6: std::option::Option<T>;
+            let mut _7: &mut impl Fn(T) -> U;
             scope 5 (inlined Option::<T>::map::<U, &mut impl Fn(T) -> U>) {
-                debug self => _7;
-                debug f => _8;
-                let mut _9: isize;
-                let _10: T;
-                let mut _11: (T,);
-                let mut _12: U;
+                debug self => _6;
+                debug f => _7;
+                let mut _8: isize;
+                let _9: T;
+                let mut _10: (T,);
+                let mut _11: U;
                 scope 6 {
-                    debug x => _10;
+                    debug x => _9;
                     scope 7 (inlined ops::function::impls::<impl FnOnce<(T,)> for &mut impl Fn(T) -> U>::call_once) {
-                        debug self => _8;
-                        debug args => _11;
+                        debug self => _7;
+                        debug args => _10;
                     }
                 }
             }
@@ -52,30 +52,30 @@ fn mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> U) -> () {
     }
 
     bb2: {
-        StorageLive(_13);
-        _5 = &mut _4;
-        StorageLive(_8);
+        StorageLive(_12);
+        // DBG: _15 = &_4;
         StorageLive(_7);
         StorageLive(_6);
-        _6 = &mut (_4.0: impl Iterator<Item = T>);
-        _7 = <impl Iterator<Item = T> as Iterator>::next(move _6) -> [return: bb3, unwind: bb10];
+        StorageLive(_5);
+        _5 = &mut (_4.0: impl Iterator<Item = T>);
+        _6 = <impl Iterator<Item = T> as Iterator>::next(move _5) -> [return: bb3, unwind: bb10];
     }
 
     bb3: {
-        StorageDead(_6);
-        _8 = &mut (_4.1: impl Fn(T) -> U);
+        StorageDead(_5);
+        _7 = &mut (_4.1: impl Fn(T) -> U);
+        StorageLive(_8);
         StorageLive(_9);
-        StorageLive(_10);
-        _9 = discriminant(_7);
-        switchInt(move _9) -> [0: bb4, 1: bb6, otherwise: bb9];
+        _8 = discriminant(_6);
+        switchInt(move _8) -> [0: bb4, 1: bb6, otherwise: bb9];
     }
 
     bb4: {
-        StorageDead(_10);
         StorageDead(_9);
-        StorageDead(_7);
         StorageDead(_8);
-        StorageDead(_13);
+        StorageDead(_6);
+        StorageDead(_7);
+        StorageDead(_12);
         drop(_4) -> [return: bb5, unwind continue];
     }
 
@@ -85,27 +85,27 @@ fn mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> U) -> () {
     }
 
     bb6: {
-        _10 = move ((_7 as Some).0: T);
-        StorageLive(_12);
+        _9 = move ((_6 as Some).0: T);
         StorageLive(_11);
-        _11 = (copy _10,);
-        _12 = <impl Fn(T) -> U as FnMut<(T,)>>::call_mut(move _8, move _11) -> [return: bb7, unwind: bb10];
+        StorageLive(_10);
+        _10 = (copy _9,);
+        _11 = <impl Fn(T) -> U as FnMut<(T,)>>::call_mut(move _7, move _10) -> [return: bb7, unwind: bb10];
     }
 
     bb7: {
-        StorageDead(_11);
-        _13 = Option::<U>::Some(move _12);
-        StorageDead(_12);
         StorageDead(_10);
+        _12 = Option::<U>::Some(move _11);
+        StorageDead(_11);
         StorageDead(_9);
-        StorageDead(_7);
         StorageDead(_8);
-        _14 = move ((_13 as Some).0: U);
-        _15 = opaque::<U>(move _14) -> [return: bb8, unwind: bb10];
+        StorageDead(_6);
+        StorageDead(_7);
+        _13 = move ((_12 as Some).0: U);
+        _14 = opaque::<U>(move _13) -> [return: bb8, unwind: bb10];
     }
 
     bb8: {
-        StorageDead(_13);
+        StorageDead(_12);
         goto -> bb2;
     }
 
diff --git a/tests/mir-opt/pre-codegen/loops.rs b/tests/mir-opt/pre-codegen/loops.rs
index d0b8cc8db7a..952dd8cac60 100644
--- a/tests/mir-opt/pre-codegen/loops.rs
+++ b/tests/mir-opt/pre-codegen/loops.rs
@@ -1,5 +1,6 @@
 // skip-filecheck
 //@ compile-flags: -O -Zmir-opt-level=2 -g
+//@ ignore-std-debug-assertions (debug assertions result in different inlines)
 //@ needs-unwind
 
 #![crate_type = "lib"]
diff --git a/tests/mir-opt/pre-codegen/loops.vec_move.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/loops.vec_move.PreCodegen.after.mir
index e537dd6a28e..66eb1bcfaa6 100644
--- a/tests/mir-opt/pre-codegen/loops.vec_move.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/loops.vec_move.PreCodegen.after.mir
@@ -3,72 +3,320 @@
 fn vec_move(_1: Vec<impl Sized>) -> () {
     debug v => _1;
     let mut _0: ();
-    let mut _2: std::vec::IntoIter<impl Sized>;
-    let mut _3: std::vec::IntoIter<impl Sized>;
-    let mut _4: &mut std::vec::IntoIter<impl Sized>;
-    let mut _5: std::option::Option<impl Sized>;
-    let mut _6: isize;
-    let _8: ();
+    let mut _22: std::vec::IntoIter<impl Sized>;
+    let mut _23: std::vec::IntoIter<impl Sized>;
+    let mut _24: &mut std::vec::IntoIter<impl Sized>;
+    let mut _25: std::option::Option<impl Sized>;
+    let mut _26: isize;
+    let _28: ();
     scope 1 {
-        debug iter => _3;
-        let _7: impl Sized;
+        debug iter => _23;
+        let _27: impl Sized;
         scope 2 {
-            debug x => _7;
+            debug x => _27;
+        }
+    }
+    scope 3 (inlined <Vec<impl Sized> as IntoIterator>::into_iter) {
+        debug self => _1;
+        let _2: std::mem::ManuallyDrop<std::vec::Vec<impl Sized>>;
+        let mut _3: *const std::alloc::Global;
+        let mut _8: usize;
+        let mut _10: *mut impl Sized;
+        let mut _11: *const impl Sized;
+        let mut _12: usize;
+        let _29: &std::vec::Vec<impl Sized>;
+        let mut _30: &std::mem::ManuallyDrop<std::vec::Vec<impl Sized>>;
+        let mut _31: &alloc::raw_vec::RawVec<impl Sized>;
+        let mut _32: &std::mem::ManuallyDrop<std::vec::Vec<impl Sized>>;
+        let _33: &std::vec::Vec<impl Sized>;
+        let mut _34: &std::mem::ManuallyDrop<std::vec::Vec<impl Sized>>;
+        let _35: &std::vec::Vec<impl Sized>;
+        let mut _36: &std::mem::ManuallyDrop<std::vec::Vec<impl Sized>>;
+        let mut _37: &alloc::raw_vec::RawVec<impl Sized>;
+        let mut _38: &std::mem::ManuallyDrop<std::vec::Vec<impl Sized>>;
+        scope 4 {
+            debug me => _2;
+            scope 5 {
+                debug alloc => const ManuallyDrop::<std::alloc::Global> {{ value: std::alloc::Global }};
+                let _6: std::ptr::NonNull<impl Sized>;
+                scope 6 {
+                    debug buf => _6;
+                    let _7: *mut impl Sized;
+                    scope 7 {
+                        debug begin => _7;
+                        scope 8 {
+                            debug end => _11;
+                            let _20: usize;
+                            scope 9 {
+                                debug cap => _20;
+                            }
+                            scope 39 (inlined <ManuallyDrop<Vec<impl Sized>> as Deref>::deref) {
+                                debug self => _38;
+                            }
+                            scope 40 (inlined alloc::raw_vec::RawVec::<impl Sized>::capacity) {
+                                debug self => _37;
+                                let mut _19: usize;
+                                let mut _39: &alloc::raw_vec::RawVecInner;
+                                scope 41 (inlined std::mem::size_of::<impl Sized>) {
+                                }
+                                scope 42 (inlined alloc::raw_vec::RawVecInner::capacity) {
+                                    debug self => _39;
+                                    debug elem_size => _19;
+                                    let mut _21: core::num::niche_types::UsizeNoHighBit;
+                                    scope 43 (inlined core::num::niche_types::UsizeNoHighBit::as_inner) {
+                                        debug self => _21;
+                                    }
+                                }
+                            }
+                        }
+                        scope 25 (inlined <ManuallyDrop<Vec<impl Sized>> as Deref>::deref) {
+                            debug self => _34;
+                        }
+                        scope 26 (inlined Vec::<impl Sized>::len) {
+                            debug self => _33;
+                            let mut _13: bool;
+                            scope 27 {
+                            }
+                        }
+                        scope 28 (inlined std::ptr::mut_ptr::<impl *mut impl Sized>::wrapping_byte_add) {
+                            debug self => _7;
+                            debug count => _12;
+                            let mut _14: *mut u8;
+                            let mut _18: *mut u8;
+                            scope 29 (inlined std::ptr::mut_ptr::<impl *mut impl Sized>::cast::<u8>) {
+                                debug self => _7;
+                            }
+                            scope 30 (inlined std::ptr::mut_ptr::<impl *mut u8>::wrapping_add) {
+                                debug self => _14;
+                                debug count => _12;
+                                let mut _15: isize;
+                                scope 31 (inlined std::ptr::mut_ptr::<impl *mut u8>::wrapping_offset) {
+                                    debug self => _14;
+                                    debug count => _15;
+                                    let mut _16: *const u8;
+                                    let mut _17: *const u8;
+                                }
+                            }
+                            scope 32 (inlined std::ptr::mut_ptr::<impl *mut u8>::with_metadata_of::<impl Sized>) {
+                                debug self => _18;
+                                debug meta => _5;
+                                scope 33 (inlined std::ptr::metadata::<impl Sized>) {
+                                    debug ptr => _5;
+                                }
+                                scope 34 (inlined std::ptr::from_raw_parts_mut::<impl Sized, ()>) {
+                                }
+                            }
+                        }
+                        scope 35 (inlined <ManuallyDrop<Vec<impl Sized>> as Deref>::deref) {
+                            debug self => _36;
+                        }
+                        scope 36 (inlined Vec::<impl Sized>::len) {
+                            debug self => _35;
+                            let mut _9: bool;
+                            scope 37 {
+                            }
+                        }
+                        scope 38 (inlined #[track_caller] std::ptr::mut_ptr::<impl *mut impl Sized>::add) {
+                            debug self => _7;
+                            debug count => _8;
+                        }
+                    }
+                    scope 24 (inlined NonNull::<impl Sized>::as_ptr) {
+                        debug self => _6;
+                    }
+                }
+                scope 17 (inlined <ManuallyDrop<Vec<impl Sized>> as Deref>::deref) {
+                    debug self => _32;
+                }
+                scope 18 (inlined alloc::raw_vec::RawVec::<impl Sized>::non_null) {
+                    debug self => _31;
+                    scope 19 (inlined alloc::raw_vec::RawVecInner::non_null::<impl Sized>) {
+                        let mut _4: std::ptr::NonNull<u8>;
+                        scope 20 (inlined Unique::<u8>::cast::<impl Sized>) {
+                            scope 21 (inlined NonNull::<u8>::cast::<impl Sized>) {
+                                let mut _5: *const impl Sized;
+                                scope 22 (inlined NonNull::<u8>::as_ptr) {
+                                }
+                            }
+                        }
+                        scope 23 (inlined Unique::<impl Sized>::as_non_null_ptr) {
+                        }
+                    }
+                }
+            }
+            scope 11 (inlined <ManuallyDrop<Vec<impl Sized>> as Deref>::deref) {
+                debug self => _30;
+            }
+            scope 12 (inlined Vec::<impl Sized>::allocator) {
+                debug self => _29;
+                scope 13 (inlined alloc::raw_vec::RawVec::<impl Sized>::allocator) {
+                    scope 14 (inlined alloc::raw_vec::RawVecInner::allocator) {
+                    }
+                }
+            }
+            scope 15 (inlined #[track_caller] std::ptr::read::<std::alloc::Global>) {
+                debug src => _3;
+            }
+            scope 16 (inlined ManuallyDrop::<std::alloc::Global>::new) {
+                debug value => const std::alloc::Global;
+            }
+        }
+        scope 10 (inlined ManuallyDrop::<Vec<impl Sized>>::new) {
+            debug value => _1;
         }
     }
 
     bb0: {
+        StorageLive(_22);
+        StorageLive(_6);
+        StorageLive(_7);
+        StorageLive(_11);
+        StorageLive(_20);
+        StorageLive(_5);
+        StorageLive(_4);
+        StorageLive(_17);
         StorageLive(_2);
-        _2 = <Vec<impl Sized> as IntoIterator>::into_iter(move _1) -> [return: bb1, unwind continue];
+        _2 = ManuallyDrop::<Vec<impl Sized>> { value: copy _1 };
+        StorageLive(_3);
+        // DBG: _30 = &_2;
+        // DBG: _29 = &(_2.0: std::vec::Vec<impl Sized>);
+        _3 = &raw const ((((_2.0: std::vec::Vec<impl Sized>).0: alloc::raw_vec::RawVec<impl Sized>).0: alloc::raw_vec::RawVecInner).2: std::alloc::Global);
+        StorageDead(_3);
+        // DBG: _32 = &_2;
+        // DBG: _31 = &((_2.0: std::vec::Vec<impl Sized>).0: alloc::raw_vec::RawVec<impl Sized>);
+        _4 = copy (((((_2.0: std::vec::Vec<impl Sized>).0: alloc::raw_vec::RawVec<impl Sized>).0: alloc::raw_vec::RawVecInner).0: std::ptr::Unique<u8>).0: std::ptr::NonNull<u8>);
+        _5 = copy _4 as *const impl Sized (Transmute);
+        _6 = NonNull::<impl Sized> { pointer: copy _5 };
+        _7 = copy _4 as *mut impl Sized (Transmute);
+        switchInt(const <impl Sized as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb1, otherwise: bb2];
     }
 
     bb1: {
-        StorageLive(_3);
-        _3 = move _2;
-        goto -> bb2;
+        StorageLive(_10);
+        StorageLive(_8);
+        // DBG: _36 = &_2;
+        // DBG: _35 = &(_2.0: std::vec::Vec<impl Sized>);
+        _8 = copy ((_2.0: std::vec::Vec<impl Sized>).1: usize);
+        StorageLive(_9);
+        _9 = Le(copy _8, const <impl Sized as std::mem::SizedTypeProperties>::MAX_SLICE_LEN);
+        assume(move _9);
+        StorageDead(_9);
+        _10 = Offset(copy _7, copy _8);
+        _11 = copy _10 as *const impl Sized (PtrToPtr);
+        StorageDead(_8);
+        StorageDead(_10);
+        goto -> bb4;
     }
 
     bb2: {
-        StorageLive(_5);
-        _4 = &mut _3;
-        _5 = <std::vec::IntoIter<impl Sized> as Iterator>::next(move _4) -> [return: bb3, unwind: bb9];
+        StorageLive(_12);
+        // DBG: _34 = &_2;
+        // DBG: _33 = &(_2.0: std::vec::Vec<impl Sized>);
+        _12 = copy ((_2.0: std::vec::Vec<impl Sized>).1: usize);
+        StorageLive(_13);
+        _13 = Le(copy _12, const <impl Sized as std::mem::SizedTypeProperties>::MAX_SLICE_LEN);
+        assume(move _13);
+        StorageDead(_13);
+        StorageLive(_18);
+        StorageLive(_14);
+        _14 = copy _4 as *mut u8 (Transmute);
+        StorageLive(_15);
+        _15 = copy _12 as isize (IntToInt);
+        StorageLive(_16);
+        _16 = copy _4 as *const u8 (Transmute);
+        _17 = arith_offset::<u8>(move _16, move _15) -> [return: bb3, unwind unreachable];
     }
 
     bb3: {
-        _6 = discriminant(_5);
-        switchInt(move _6) -> [0: bb4, 1: bb6, otherwise: bb8];
+        StorageDead(_16);
+        _18 = copy _17 as *mut u8 (PtrToPtr);
+        StorageDead(_15);
+        StorageDead(_14);
+        StorageDead(_18);
+        StorageDead(_12);
+        _11 = copy _17 as *const impl Sized (PtrToPtr);
+        goto -> bb4;
     }
 
     bb4: {
-        StorageDead(_5);
-        drop(_3) -> [return: bb5, unwind continue];
+        // DBG: _38 = &_2;
+        // DBG: _37 = &((_2.0: std::vec::Vec<impl Sized>).0: alloc::raw_vec::RawVec<impl Sized>);
+        // DBG: _39 = &(((_2.0: std::vec::Vec<impl Sized>).0: alloc::raw_vec::RawVec<impl Sized>).0: alloc::raw_vec::RawVecInner);
+        StorageLive(_19);
+        _19 = SizeOf(impl Sized);
+        switchInt(move _19) -> [0: bb5, otherwise: bb6];
     }
 
     bb5: {
-        StorageDead(_3);
-        StorageDead(_2);
-        return;
+        _20 = const usize::MAX;
+        goto -> bb7;
     }
 
     bb6: {
-        _7 = move ((_5 as Some).0: impl Sized);
-        _8 = opaque::<impl Sized>(move _7) -> [return: bb7, unwind: bb9];
+        StorageLive(_21);
+        _21 = copy ((((_2.0: std::vec::Vec<impl Sized>).0: alloc::raw_vec::RawVec<impl Sized>).0: alloc::raw_vec::RawVecInner).1: core::num::niche_types::UsizeNoHighBit);
+        _20 = copy _21 as usize (Transmute);
+        StorageDead(_21);
+        goto -> bb7;
     }
 
     bb7: {
+        StorageDead(_19);
+        _22 = std::vec::IntoIter::<impl Sized> { buf: copy _6, phantom: const ZeroSized: PhantomData<impl Sized>, cap: move _20, alloc: const ManuallyDrop::<std::alloc::Global> {{ value: std::alloc::Global }}, ptr: copy _6, end: copy _11 };
+        StorageDead(_2);
+        StorageDead(_17);
+        StorageDead(_4);
         StorageDead(_5);
-        goto -> bb2;
+        StorageDead(_20);
+        StorageDead(_11);
+        StorageDead(_7);
+        StorageDead(_6);
+        StorageLive(_23);
+        _23 = move _22;
+        goto -> bb8;
     }
 
     bb8: {
+        StorageLive(_25);
+        _24 = &mut _23;
+        _25 = <std::vec::IntoIter<impl Sized> as Iterator>::next(move _24) -> [return: bb9, unwind: bb15];
+    }
+
+    bb9: {
+        _26 = discriminant(_25);
+        switchInt(move _26) -> [0: bb10, 1: bb12, otherwise: bb14];
+    }
+
+    bb10: {
+        StorageDead(_25);
+        drop(_23) -> [return: bb11, unwind continue];
+    }
+
+    bb11: {
+        StorageDead(_23);
+        StorageDead(_22);
+        return;
+    }
+
+    bb12: {
+        _27 = move ((_25 as Some).0: impl Sized);
+        _28 = opaque::<impl Sized>(move _27) -> [return: bb13, unwind: bb15];
+    }
+
+    bb13: {
+        StorageDead(_25);
+        goto -> bb8;
+    }
+
+    bb14: {
         unreachable;
     }
 
-    bb9 (cleanup): {
-        drop(_3) -> [return: bb10, unwind terminate(cleanup)];
+    bb15 (cleanup): {
+        drop(_23) -> [return: bb16, unwind terminate(cleanup)];
     }
 
-    bb10 (cleanup): {
+    bb16 (cleanup): {
         resume;
     }
 }
diff --git a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
index cbdd194afd3..2cab8818296 100644
--- a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
@@ -3,183 +3,134 @@
 fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2: &&(usize, usize, usize, usize)) -> bool {
     let mut _0: bool;
     let mut _3: &(usize, usize, usize, usize);
-    let _4: &usize;
-    let _5: &usize;
-    let _6: &usize;
-    let _7: &usize;
-    let mut _8: &&usize;
-    let _9: &usize;
-    let mut _10: &&usize;
-    let mut _13: bool;
-    let mut _14: &&usize;
+    let mut _6: bool;
+    let mut _9: bool;
+    let mut _10: bool;
+    let _13: &usize;
+    let _14: &usize;
     let _15: &usize;
-    let mut _16: &&usize;
-    let mut _19: bool;
+    let _16: &usize;
+    let mut _17: &&usize;
+    let mut _18: &&usize;
+    let mut _19: &&usize;
     let mut _20: &&usize;
-    let _21: &usize;
+    let mut _21: &&usize;
     let mut _22: &&usize;
-    let mut _23: bool;
+    let mut _23: &&usize;
     let mut _24: &&usize;
-    let _25: &usize;
-    let mut _26: &&usize;
     scope 1 {
-        debug a => _4;
-        debug b => _5;
-        debug c => _6;
-        debug d => _7;
+        debug a => _13;
+        debug b => _14;
+        debug c => _15;
+        debug d => _16;
         scope 2 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
-            debug self => _8;
-            debug other => _10;
+            debug self => _17;
+            debug other => _18;
             scope 3 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
-                debug self => _4;
-                debug other => _6;
-                let mut _11: usize;
-                let mut _12: usize;
+                debug self => _13;
+                debug other => _15;
+                let mut _4: usize;
+                let mut _5: usize;
             }
         }
         scope 4 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
-            debug self => _14;
-            debug other => _16;
+            debug self => _19;
+            debug other => _20;
             scope 5 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
-                debug self => _7;
-                debug other => _5;
-                let mut _17: usize;
-                let mut _18: usize;
+                debug self => _16;
+                debug other => _14;
+                let mut _7: usize;
+                let mut _8: usize;
             }
         }
         scope 6 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
-            debug self => _20;
+            debug self => _21;
             debug other => _22;
             scope 7 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
-                debug self => _6;
-                debug other => _4;
+                debug self => _15;
+                debug other => _13;
             }
         }
         scope 8 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
-            debug self => _24;
-            debug other => _26;
+            debug self => _23;
+            debug other => _24;
             scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
-                debug self => _5;
-                debug other => _7;
-                let mut _27: usize;
-                let mut _28: usize;
+                debug self => _14;
+                debug other => _16;
+                let mut _11: usize;
+                let mut _12: usize;
             }
         }
     }
 
     bb0: {
         _3 = copy (*_2);
-        _4 = &((*_3).0: usize);
-        _5 = &((*_3).1: usize);
-        _6 = &((*_3).2: usize);
-        _7 = &((*_3).3: usize);
-        StorageLive(_13);
-        StorageLive(_8);
-        _8 = &_4;
-        StorageLive(_10);
-        StorageLive(_9);
-        _9 = copy _6;
-        _10 = &_9;
-        _11 = copy ((*_3).0: usize);
-        _12 = copy ((*_3).2: usize);
-        _13 = Le(copy _11, copy _12);
-        switchInt(move _13) -> [0: bb1, otherwise: bb2];
+        // DBG: _13 = &((*_3).0: usize);
+        // DBG: _14 = &((*_3).1: usize);
+        // DBG: _15 = &((*_3).2: usize);
+        // DBG: _16 = &((*_3).3: usize);
+        StorageLive(_6);
+        // DBG: _17 = &_13;
+        // DBG: _18 = &?;
+        _4 = copy ((*_3).0: usize);
+        _5 = copy ((*_3).2: usize);
+        _6 = Le(copy _4, copy _5);
+        switchInt(move _6) -> [0: bb2, otherwise: bb1];
     }
 
     bb1: {
-        StorageDead(_9);
-        StorageDead(_10);
+        StorageLive(_9);
+        // DBG: _19 = &_16;
+        // DBG: _20 = &?;
+        StorageLive(_7);
+        _7 = copy ((*_3).3: usize);
+        StorageLive(_8);
+        _8 = copy ((*_3).1: usize);
+        _9 = Le(move _7, move _8);
         StorageDead(_8);
-        goto -> bb4;
+        StorageDead(_7);
+        switchInt(move _9) -> [0: bb2, otherwise: bb6];
     }
 
     bb2: {
-        StorageDead(_9);
-        StorageDead(_10);
-        StorageDead(_8);
-        StorageLive(_19);
-        StorageLive(_14);
-        _14 = &_7;
-        StorageLive(_16);
-        StorageLive(_15);
-        _15 = copy _5;
-        _16 = &_15;
-        StorageLive(_17);
-        _17 = copy ((*_3).3: usize);
-        StorageLive(_18);
-        _18 = copy ((*_3).1: usize);
-        _19 = Le(move _17, move _18);
-        StorageDead(_18);
-        StorageDead(_17);
-        switchInt(move _19) -> [0: bb3, otherwise: bb8];
+        StorageLive(_10);
+        // DBG: _21 = &_15;
+        // DBG: _22 = &?;
+        _10 = Le(copy _5, copy _4);
+        switchInt(move _10) -> [0: bb3, otherwise: bb4];
     }
 
     bb3: {
-        StorageDead(_15);
-        StorageDead(_16);
-        StorageDead(_14);
-        goto -> bb4;
+        _0 = const false;
+        goto -> bb5;
     }
 
     bb4: {
-        StorageLive(_23);
-        StorageLive(_20);
-        _20 = &_6;
-        StorageLive(_22);
-        StorageLive(_21);
-        _21 = copy _4;
-        _22 = &_21;
-        _23 = Le(copy _12, copy _11);
-        switchInt(move _23) -> [0: bb5, otherwise: bb6];
+        // DBG: _23 = &_14;
+        // DBG: _24 = &?;
+        StorageLive(_11);
+        _11 = copy ((*_3).1: usize);
+        StorageLive(_12);
+        _12 = copy ((*_3).3: usize);
+        _0 = Le(move _11, move _12);
+        StorageDead(_12);
+        StorageDead(_11);
+        goto -> bb5;
     }
 
     bb5: {
-        StorageDead(_21);
-        StorageDead(_22);
-        StorageDead(_20);
-        _0 = const false;
+        StorageDead(_10);
         goto -> bb7;
     }
 
     bb6: {
-        StorageDead(_21);
-        StorageDead(_22);
-        StorageDead(_20);
-        StorageLive(_24);
-        _24 = &_5;
-        StorageLive(_26);
-        StorageLive(_25);
-        _25 = copy _7;
-        _26 = &_25;
-        StorageLive(_27);
-        _27 = copy ((*_3).1: usize);
-        StorageLive(_28);
-        _28 = copy ((*_3).3: usize);
-        _0 = Le(move _27, move _28);
-        StorageDead(_28);
-        StorageDead(_27);
-        StorageDead(_25);
-        StorageDead(_26);
-        StorageDead(_24);
+        _0 = const true;
         goto -> bb7;
     }
 
     bb7: {
-        StorageDead(_23);
-        goto -> bb9;
-    }
-
-    bb8: {
-        StorageDead(_15);
-        StorageDead(_16);
-        StorageDead(_14);
-        _0 = const true;
-        goto -> bb9;
-    }
-
-    bb9: {
-        StorageDead(_19);
-        StorageDead(_13);
+        StorageDead(_9);
+        StorageDead(_6);
         return;
     }
 }
diff --git a/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir
index 0adf268d766..3009be3f9dc 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir
@@ -7,19 +7,87 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
     let mut _10: std::slice::Iter<'_, T>;
     let mut _11: std::iter::Rev<std::slice::Iter<'_, T>>;
     let mut _12: std::iter::Rev<std::slice::Iter<'_, T>>;
-    let mut _14: std::option::Option<&T>;
-    let mut _15: isize;
-    let mut _17: &impl Fn(&T);
-    let mut _18: (&T,);
-    let _19: ();
+    let mut _33: std::option::Option<&T>;
+    let mut _35: &impl Fn(&T);
+    let mut _36: (&T,);
+    let _37: ();
     scope 1 {
         debug iter => _12;
-        let _16: &T;
+        let _34: &T;
         scope 2 {
-            debug x => _16;
+            debug x => _34;
         }
         scope 18 (inlined <Rev<std::slice::Iter<'_, T>> as Iterator>::next) {
-            let mut _13: &mut std::slice::Iter<'_, T>;
+            scope 19 (inlined <std::slice::Iter<'_, T> as DoubleEndedIterator>::next_back) {
+                let mut _13: *const T;
+                let mut _18: bool;
+                let mut _19: *const T;
+                let _32: &T;
+                scope 20 {
+                    let _14: std::ptr::NonNull<T>;
+                    let _20: usize;
+                    scope 21 {
+                    }
+                    scope 22 {
+                        scope 25 (inlined <NonNull<T> as PartialEq>::eq) {
+                            let mut _15: std::ptr::NonNull<T>;
+                            let mut _16: *mut T;
+                            let mut _17: *mut T;
+                            scope 26 (inlined NonNull::<T>::as_ptr) {
+                            }
+                            scope 27 (inlined NonNull::<T>::as_ptr) {
+                            }
+                        }
+                    }
+                    scope 23 (inlined std::ptr::const_ptr::<impl *const T>::addr) {
+                        scope 24 (inlined std::ptr::const_ptr::<impl *const T>::cast::<()>) {
+                        }
+                    }
+                }
+                scope 28 (inlined std::slice::Iter::<'_, T>::next_back_unchecked) {
+                    let _26: std::ptr::NonNull<T>;
+                    scope 29 (inlined std::slice::Iter::<'_, T>::pre_dec_end) {
+                        let mut _21: *mut *const T;
+                        let mut _22: *mut std::ptr::NonNull<T>;
+                        let mut _23: std::ptr::NonNull<T>;
+                        let mut _27: *mut *const T;
+                        let mut _28: *mut usize;
+                        let mut _29: usize;
+                        let mut _30: usize;
+                        scope 30 {
+                            scope 31 {
+                            }
+                            scope 32 {
+                                scope 35 (inlined NonNull::<T>::sub) {
+                                    scope 36 (inlined #[track_caller] core::num::<impl isize>::unchecked_neg) {
+                                        scope 37 (inlined core::ub_checks::check_language_ub) {
+                                            scope 38 (inlined core::ub_checks::check_language_ub::runtime) {
+                                            }
+                                        }
+                                    }
+                                    scope 39 (inlined NonNull::<T>::offset) {
+                                        let mut _24: *const T;
+                                        let mut _25: *const T;
+                                        scope 40 (inlined NonNull::<T>::as_ptr) {
+                                        }
+                                    }
+                                }
+                            }
+                            scope 33 (inlined std::ptr::mut_ptr::<impl *mut *const T>::cast::<usize>) {
+                            }
+                            scope 34 (inlined std::ptr::mut_ptr::<impl *mut *const T>::cast::<NonNull<T>>) {
+                            }
+                        }
+                    }
+                    scope 41 (inlined NonNull::<T>::as_ref::<'_>) {
+                        let _31: *const T;
+                        scope 42 (inlined NonNull::<T>::as_ptr) {
+                        }
+                        scope 43 (inlined std::ptr::mut_ptr::<impl *mut T>::cast_const) {
+                        }
+                    }
+                }
+            }
         }
     }
     scope 3 (inlined core::slice::<impl [T]>::iter) {
@@ -105,45 +173,136 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
     }
 
     bb4: {
+        StorageLive(_33);
+        StorageLive(_20);
+        StorageLive(_19);
         StorageLive(_14);
-        StorageLive(_13);
-        _13 = &mut (_12.0: std::slice::Iter<'_, T>);
-        _14 = <std::slice::Iter<'_, T> as DoubleEndedIterator>::next_back(move _13) -> [return: bb5, unwind unreachable];
+        StorageLive(_32);
+        StorageLive(_18);
+        switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb5, otherwise: bb6];
     }
 
     bb5: {
+        StorageLive(_13);
+        _13 = copy ((_12.0: std::slice::Iter<'_, T>).1: *const T);
+        _14 = copy _13 as std::ptr::NonNull<T> (Transmute);
         StorageDead(_13);
-        _15 = discriminant(_14);
-        switchInt(move _15) -> [0: bb6, 1: bb8, otherwise: bb10];
+        StorageLive(_16);
+        StorageLive(_15);
+        _15 = copy ((_12.0: std::slice::Iter<'_, T>).0: std::ptr::NonNull<T>);
+        _16 = copy _15 as *mut T (Transmute);
+        StorageDead(_15);
+        StorageLive(_17);
+        _17 = copy _14 as *mut T (Transmute);
+        _18 = Eq(copy _16, copy _17);
+        StorageDead(_17);
+        StorageDead(_16);
+        goto -> bb7;
     }
 
     bb6: {
-        StorageDead(_14);
-        StorageDead(_12);
-        drop(_2) -> [return: bb7, unwind unreachable];
+        _19 = copy ((_12.0: std::slice::Iter<'_, T>).1: *const T);
+        _20 = copy _19 as usize (Transmute);
+        _18 = Eq(copy _20, const 0_usize);
+        goto -> bb7;
     }
 
     bb7: {
-        return;
+        switchInt(move _18) -> [0: bb8, otherwise: bb15];
     }
 
     bb8: {
-        _16 = copy ((_14 as Some).0: &T);
-        StorageLive(_17);
-        _17 = &_2;
-        StorageLive(_18);
-        _18 = (copy _16,);
-        _19 = <impl Fn(&T) as Fn<(&T,)>>::call(move _17, move _18) -> [return: bb9, unwind unreachable];
+        StorageLive(_26);
+        StorageLive(_28);
+        StorageLive(_22);
+        StorageLive(_23);
+        switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb9, otherwise: bb12];
     }
 
     bb9: {
+        StorageLive(_21);
+        _21 = &raw mut ((_12.0: std::slice::Iter<'_, T>).1: *const T);
+        _22 = copy _21 as *mut std::ptr::NonNull<T> (PtrToPtr);
+        StorageDead(_21);
+        _23 = copy (*_22);
+        switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb10, otherwise: bb11];
+    }
+
+    bb10: {
+        StorageLive(_25);
+        StorageLive(_24);
+        _24 = copy _23 as *const T (Transmute);
+        _25 = Offset(copy _24, const -1_isize);
+        StorageDead(_24);
+        _23 = NonNull::<T> { pointer: copy _25 };
+        StorageDead(_25);
+        goto -> bb11;
+    }
+
+    bb11: {
+        (*_22) = move _23;
+        _26 = copy (*_22);
+        goto -> bb13;
+    }
+
+    bb12: {
+        StorageLive(_27);
+        _27 = &raw mut ((_12.0: std::slice::Iter<'_, T>).1: *const T);
+        _28 = copy _27 as *mut usize (PtrToPtr);
+        StorageDead(_27);
+        StorageLive(_30);
+        StorageLive(_29);
+        _29 = copy (*_28);
+        _30 = SubUnchecked(move _29, const 1_usize);
+        StorageDead(_29);
+        (*_28) = move _30;
+        StorageDead(_30);
+        _26 = copy ((_12.0: std::slice::Iter<'_, T>).0: std::ptr::NonNull<T>);
+        goto -> bb13;
+    }
+
+    bb13: {
+        StorageDead(_23);
+        StorageDead(_22);
+        StorageDead(_28);
+        StorageLive(_31);
+        _31 = copy _26 as *const T (Transmute);
+        _32 = &(*_31);
+        StorageDead(_31);
+        StorageDead(_26);
+        _33 = Option::<&T>::Some(copy _32);
         StorageDead(_18);
-        StorageDead(_17);
+        StorageDead(_32);
         StorageDead(_14);
+        StorageDead(_19);
+        StorageDead(_20);
+        _34 = copy ((_33 as Some).0: &T);
+        StorageLive(_35);
+        _35 = &_2;
+        StorageLive(_36);
+        _36 = (copy _34,);
+        _37 = <impl Fn(&T) as Fn<(&T,)>>::call(move _35, move _36) -> [return: bb14, unwind unreachable];
+    }
+
+    bb14: {
+        StorageDead(_36);
+        StorageDead(_35);
+        StorageDead(_33);
         goto -> bb4;
     }
 
-    bb10: {
-        unreachable;
+    bb15: {
+        StorageDead(_18);
+        StorageDead(_32);
+        StorageDead(_14);
+        StorageDead(_19);
+        StorageDead(_20);
+        StorageDead(_33);
+        StorageDead(_12);
+        drop(_2) -> [return: bb16, unwind unreachable];
+    }
+
+    bb16: {
+        return;
     }
 }
diff --git a/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir
index cb0d640d445..e40bff5ea35 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir
@@ -7,19 +7,87 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
     let mut _10: std::slice::Iter<'_, T>;
     let mut _11: std::iter::Rev<std::slice::Iter<'_, T>>;
     let mut _12: std::iter::Rev<std::slice::Iter<'_, T>>;
-    let mut _14: std::option::Option<&T>;
-    let mut _15: isize;
-    let mut _17: &impl Fn(&T);
-    let mut _18: (&T,);
-    let _19: ();
+    let mut _33: std::option::Option<&T>;
+    let mut _35: &impl Fn(&T);
+    let mut _36: (&T,);
+    let _37: ();
     scope 1 {
         debug iter => _12;
-        let _16: &T;
+        let _34: &T;
         scope 2 {
-            debug x => _16;
+            debug x => _34;
         }
         scope 18 (inlined <Rev<std::slice::Iter<'_, T>> as Iterator>::next) {
-            let mut _13: &mut std::slice::Iter<'_, T>;
+            scope 19 (inlined <std::slice::Iter<'_, T> as DoubleEndedIterator>::next_back) {
+                let mut _13: *const T;
+                let mut _18: bool;
+                let mut _19: *const T;
+                let _32: &T;
+                scope 20 {
+                    let _14: std::ptr::NonNull<T>;
+                    let _20: usize;
+                    scope 21 {
+                    }
+                    scope 22 {
+                        scope 25 (inlined <NonNull<T> as PartialEq>::eq) {
+                            let mut _15: std::ptr::NonNull<T>;
+                            let mut _16: *mut T;
+                            let mut _17: *mut T;
+                            scope 26 (inlined NonNull::<T>::as_ptr) {
+                            }
+                            scope 27 (inlined NonNull::<T>::as_ptr) {
+                            }
+                        }
+                    }
+                    scope 23 (inlined std::ptr::const_ptr::<impl *const T>::addr) {
+                        scope 24 (inlined std::ptr::const_ptr::<impl *const T>::cast::<()>) {
+                        }
+                    }
+                }
+                scope 28 (inlined std::slice::Iter::<'_, T>::next_back_unchecked) {
+                    let _26: std::ptr::NonNull<T>;
+                    scope 29 (inlined std::slice::Iter::<'_, T>::pre_dec_end) {
+                        let mut _21: *mut *const T;
+                        let mut _22: *mut std::ptr::NonNull<T>;
+                        let mut _23: std::ptr::NonNull<T>;
+                        let mut _27: *mut *const T;
+                        let mut _28: *mut usize;
+                        let mut _29: usize;
+                        let mut _30: usize;
+                        scope 30 {
+                            scope 31 {
+                            }
+                            scope 32 {
+                                scope 35 (inlined NonNull::<T>::sub) {
+                                    scope 36 (inlined #[track_caller] core::num::<impl isize>::unchecked_neg) {
+                                        scope 37 (inlined core::ub_checks::check_language_ub) {
+                                            scope 38 (inlined core::ub_checks::check_language_ub::runtime) {
+                                            }
+                                        }
+                                    }
+                                    scope 39 (inlined NonNull::<T>::offset) {
+                                        let mut _24: *const T;
+                                        let mut _25: *const T;
+                                        scope 40 (inlined NonNull::<T>::as_ptr) {
+                                        }
+                                    }
+                                }
+                            }
+                            scope 33 (inlined std::ptr::mut_ptr::<impl *mut *const T>::cast::<usize>) {
+                            }
+                            scope 34 (inlined std::ptr::mut_ptr::<impl *mut *const T>::cast::<NonNull<T>>) {
+                            }
+                        }
+                    }
+                    scope 41 (inlined NonNull::<T>::as_ref::<'_>) {
+                        let _31: *const T;
+                        scope 42 (inlined NonNull::<T>::as_ptr) {
+                        }
+                        scope 43 (inlined std::ptr::mut_ptr::<impl *mut T>::cast_const) {
+                        }
+                    }
+                }
+            }
         }
     }
     scope 3 (inlined core::slice::<impl [T]>::iter) {
@@ -105,53 +173,144 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
     }
 
     bb4: {
+        StorageLive(_33);
+        StorageLive(_20);
+        StorageLive(_19);
         StorageLive(_14);
-        StorageLive(_13);
-        _13 = &mut (_12.0: std::slice::Iter<'_, T>);
-        _14 = <std::slice::Iter<'_, T> as DoubleEndedIterator>::next_back(move _13) -> [return: bb5, unwind: bb11];
+        StorageLive(_32);
+        StorageLive(_18);
+        switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb5, otherwise: bb6];
     }
 
     bb5: {
+        StorageLive(_13);
+        _13 = copy ((_12.0: std::slice::Iter<'_, T>).1: *const T);
+        _14 = copy _13 as std::ptr::NonNull<T> (Transmute);
         StorageDead(_13);
-        _15 = discriminant(_14);
-        switchInt(move _15) -> [0: bb6, 1: bb8, otherwise: bb10];
+        StorageLive(_16);
+        StorageLive(_15);
+        _15 = copy ((_12.0: std::slice::Iter<'_, T>).0: std::ptr::NonNull<T>);
+        _16 = copy _15 as *mut T (Transmute);
+        StorageDead(_15);
+        StorageLive(_17);
+        _17 = copy _14 as *mut T (Transmute);
+        _18 = Eq(copy _16, copy _17);
+        StorageDead(_17);
+        StorageDead(_16);
+        goto -> bb7;
     }
 
     bb6: {
-        StorageDead(_14);
-        StorageDead(_12);
-        drop(_2) -> [return: bb7, unwind continue];
+        _19 = copy ((_12.0: std::slice::Iter<'_, T>).1: *const T);
+        _20 = copy _19 as usize (Transmute);
+        _18 = Eq(copy _20, const 0_usize);
+        goto -> bb7;
     }
 
     bb7: {
-        return;
+        switchInt(move _18) -> [0: bb8, otherwise: bb17];
     }
 
     bb8: {
-        _16 = copy ((_14 as Some).0: &T);
-        StorageLive(_17);
-        _17 = &_2;
-        StorageLive(_18);
-        _18 = (copy _16,);
-        _19 = <impl Fn(&T) as Fn<(&T,)>>::call(move _17, move _18) -> [return: bb9, unwind: bb11];
+        StorageLive(_26);
+        StorageLive(_28);
+        StorageLive(_22);
+        StorageLive(_23);
+        switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb9, otherwise: bb12];
     }
 
     bb9: {
+        StorageLive(_21);
+        _21 = &raw mut ((_12.0: std::slice::Iter<'_, T>).1: *const T);
+        _22 = copy _21 as *mut std::ptr::NonNull<T> (PtrToPtr);
+        StorageDead(_21);
+        _23 = copy (*_22);
+        switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb10, otherwise: bb11];
+    }
+
+    bb10: {
+        StorageLive(_25);
+        StorageLive(_24);
+        _24 = copy _23 as *const T (Transmute);
+        _25 = Offset(copy _24, const -1_isize);
+        StorageDead(_24);
+        _23 = NonNull::<T> { pointer: copy _25 };
+        StorageDead(_25);
+        goto -> bb11;
+    }
+
+    bb11: {
+        (*_22) = move _23;
+        _26 = copy (*_22);
+        goto -> bb13;
+    }
+
+    bb12: {
+        StorageLive(_27);
+        _27 = &raw mut ((_12.0: std::slice::Iter<'_, T>).1: *const T);
+        _28 = copy _27 as *mut usize (PtrToPtr);
+        StorageDead(_27);
+        StorageLive(_30);
+        StorageLive(_29);
+        _29 = copy (*_28);
+        _30 = SubUnchecked(move _29, const 1_usize);
+        StorageDead(_29);
+        (*_28) = move _30;
+        StorageDead(_30);
+        _26 = copy ((_12.0: std::slice::Iter<'_, T>).0: std::ptr::NonNull<T>);
+        goto -> bb13;
+    }
+
+    bb13: {
+        StorageDead(_23);
+        StorageDead(_22);
+        StorageDead(_28);
+        StorageLive(_31);
+        _31 = copy _26 as *const T (Transmute);
+        _32 = &(*_31);
+        StorageDead(_31);
+        StorageDead(_26);
+        _33 = Option::<&T>::Some(copy _32);
         StorageDead(_18);
-        StorageDead(_17);
+        StorageDead(_32);
         StorageDead(_14);
-        goto -> bb4;
+        StorageDead(_19);
+        StorageDead(_20);
+        _34 = copy ((_33 as Some).0: &T);
+        StorageLive(_35);
+        _35 = &_2;
+        StorageLive(_36);
+        _36 = (copy _34,);
+        _37 = <impl Fn(&T) as Fn<(&T,)>>::call(move _35, move _36) -> [return: bb14, unwind: bb15];
     }
 
-    bb10: {
-        unreachable;
+    bb14: {
+        StorageDead(_36);
+        StorageDead(_35);
+        StorageDead(_33);
+        goto -> bb4;
     }
 
-    bb11 (cleanup): {
-        drop(_2) -> [return: bb12, unwind terminate(cleanup)];
+    bb15 (cleanup): {
+        drop(_2) -> [return: bb16, unwind terminate(cleanup)];
     }
 
-    bb12 (cleanup): {
+    bb16 (cleanup): {
         resume;
     }
+
+    bb17: {
+        StorageDead(_18);
+        StorageDead(_32);
+        StorageDead(_14);
+        StorageDead(_19);
+        StorageDead(_20);
+        StorageDead(_33);
+        StorageDead(_12);
+        drop(_2) -> [return: bb18, unwind continue];
+    }
+
+    bb18: {
+        return;
+    }
 }
diff --git a/tests/mir-opt/pre-codegen/slice_iter.slice_iter_mut_next_back.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_iter.slice_iter_mut_next_back.PreCodegen.after.panic-abort.mir
index 78f96bf4195..62b738c36bf 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.slice_iter_mut_next_back.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.slice_iter_mut_next_back.PreCodegen.after.panic-abort.mir
@@ -3,12 +3,187 @@
 fn slice_iter_mut_next_back(_1: &mut std::slice::IterMut<'_, T>) -> Option<&mut T> {
     debug it => _1;
     let mut _0: std::option::Option<&mut T>;
+    scope 1 (inlined <std::slice::IterMut<'_, T> as DoubleEndedIterator>::next_back) {
+        let mut _2: *mut T;
+        let mut _7: bool;
+        let mut _8: *mut T;
+        let mut _21: &mut T;
+        scope 2 {
+            let _3: std::ptr::NonNull<T>;
+            let _9: usize;
+            scope 3 {
+            }
+            scope 4 {
+                scope 7 (inlined <NonNull<T> as PartialEq>::eq) {
+                    let mut _4: std::ptr::NonNull<T>;
+                    let mut _5: *mut T;
+                    let mut _6: *mut T;
+                    scope 8 (inlined NonNull::<T>::as_ptr) {
+                    }
+                    scope 9 (inlined NonNull::<T>::as_ptr) {
+                    }
+                }
+            }
+            scope 5 (inlined std::ptr::mut_ptr::<impl *mut T>::addr) {
+                scope 6 (inlined std::ptr::mut_ptr::<impl *mut T>::cast::<()>) {
+                }
+            }
+        }
+        scope 10 (inlined std::slice::IterMut::<'_, T>::next_back_unchecked) {
+            let mut _15: std::ptr::NonNull<T>;
+            scope 11 (inlined std::slice::IterMut::<'_, T>::pre_dec_end) {
+                let mut _10: *mut *mut T;
+                let mut _11: *mut std::ptr::NonNull<T>;
+                let mut _12: std::ptr::NonNull<T>;
+                let mut _16: *mut *mut T;
+                let mut _17: *mut usize;
+                let mut _18: usize;
+                let mut _19: usize;
+                scope 12 {
+                    scope 13 {
+                    }
+                    scope 14 {
+                        scope 17 (inlined NonNull::<T>::sub) {
+                            scope 18 (inlined #[track_caller] core::num::<impl isize>::unchecked_neg) {
+                                scope 19 (inlined core::ub_checks::check_language_ub) {
+                                    scope 20 (inlined core::ub_checks::check_language_ub::runtime) {
+                                    }
+                                }
+                            }
+                            scope 21 (inlined NonNull::<T>::offset) {
+                                let mut _13: *const T;
+                                let mut _14: *const T;
+                                scope 22 (inlined NonNull::<T>::as_ptr) {
+                                }
+                            }
+                        }
+                    }
+                    scope 15 (inlined std::ptr::mut_ptr::<impl *mut *mut T>::cast::<usize>) {
+                    }
+                    scope 16 (inlined std::ptr::mut_ptr::<impl *mut *mut T>::cast::<NonNull<T>>) {
+                    }
+                }
+            }
+            scope 23 (inlined NonNull::<T>::as_mut::<'_>) {
+                let mut _20: *mut T;
+                scope 24 (inlined NonNull::<T>::as_ptr) {
+                }
+            }
+        }
+    }
 
     bb0: {
-        _0 = <std::slice::IterMut<'_, T> as DoubleEndedIterator>::next_back(move _1) -> [return: bb1, unwind unreachable];
+        StorageLive(_9);
+        StorageLive(_8);
+        StorageLive(_3);
+        StorageLive(_2);
+        StorageLive(_21);
+        StorageLive(_7);
+        switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb1, otherwise: bb2];
     }
 
     bb1: {
+        _2 = copy ((*_1).1: *mut T);
+        _3 = copy _2 as std::ptr::NonNull<T> (Transmute);
+        StorageLive(_5);
+        StorageLive(_4);
+        _4 = copy ((*_1).0: std::ptr::NonNull<T>);
+        _5 = copy _4 as *mut T (Transmute);
+        StorageDead(_4);
+        StorageLive(_6);
+        _6 = copy _3 as *mut T (Transmute);
+        _7 = Eq(copy _5, copy _6);
+        StorageDead(_6);
+        StorageDead(_5);
+        goto -> bb3;
+    }
+
+    bb2: {
+        _8 = copy ((*_1).1: *mut T);
+        _9 = copy _8 as usize (Transmute);
+        _7 = Eq(copy _9, const 0_usize);
+        goto -> bb3;
+    }
+
+    bb3: {
+        switchInt(move _7) -> [0: bb4, otherwise: bb10];
+    }
+
+    bb4: {
+        StorageLive(_15);
+        StorageLive(_17);
+        StorageLive(_11);
+        StorageLive(_12);
+        switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb5, otherwise: bb8];
+    }
+
+    bb5: {
+        StorageLive(_10);
+        _10 = &raw mut ((*_1).1: *mut T);
+        _11 = copy _10 as *mut std::ptr::NonNull<T> (PtrToPtr);
+        StorageDead(_10);
+        _12 = copy (*_11);
+        switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb6, otherwise: bb7];
+    }
+
+    bb6: {
+        StorageLive(_14);
+        StorageLive(_13);
+        _13 = copy _12 as *const T (Transmute);
+        _14 = Offset(copy _13, const -1_isize);
+        StorageDead(_13);
+        _12 = NonNull::<T> { pointer: copy _14 };
+        StorageDead(_14);
+        goto -> bb7;
+    }
+
+    bb7: {
+        (*_11) = move _12;
+        _15 = copy (*_11);
+        goto -> bb9;
+    }
+
+    bb8: {
+        StorageLive(_16);
+        _16 = &raw mut ((*_1).1: *mut T);
+        _17 = copy _16 as *mut usize (PtrToPtr);
+        StorageDead(_16);
+        StorageLive(_19);
+        StorageLive(_18);
+        _18 = copy (*_17);
+        _19 = SubUnchecked(move _18, const 1_usize);
+        StorageDead(_18);
+        (*_17) = move _19;
+        StorageDead(_19);
+        _15 = copy ((*_1).0: std::ptr::NonNull<T>);
+        goto -> bb9;
+    }
+
+    bb9: {
+        StorageDead(_12);
+        StorageDead(_11);
+        StorageDead(_17);
+        StorageLive(_20);
+        _20 = copy _15 as *mut T (Transmute);
+        _21 = &mut (*_20);
+        StorageDead(_20);
+        StorageDead(_15);
+        _0 = Option::<&mut T>::Some(copy _21);
+        goto -> bb11;
+    }
+
+    bb10: {
+        _0 = const {transmute(0x0000000000000000): Option<&mut T>};
+        goto -> bb11;
+    }
+
+    bb11: {
+        StorageDead(_7);
+        StorageDead(_21);
+        StorageDead(_2);
+        StorageDead(_3);
+        StorageDead(_8);
+        StorageDead(_9);
         return;
     }
 }
diff --git a/tests/mir-opt/pre-codegen/slice_iter.slice_iter_mut_next_back.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/slice_iter.slice_iter_mut_next_back.PreCodegen.after.panic-unwind.mir
index dfe5e206fad..62b738c36bf 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.slice_iter_mut_next_back.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.slice_iter_mut_next_back.PreCodegen.after.panic-unwind.mir
@@ -3,12 +3,187 @@
 fn slice_iter_mut_next_back(_1: &mut std::slice::IterMut<'_, T>) -> Option<&mut T> {
     debug it => _1;
     let mut _0: std::option::Option<&mut T>;
+    scope 1 (inlined <std::slice::IterMut<'_, T> as DoubleEndedIterator>::next_back) {
+        let mut _2: *mut T;
+        let mut _7: bool;
+        let mut _8: *mut T;
+        let mut _21: &mut T;
+        scope 2 {
+            let _3: std::ptr::NonNull<T>;
+            let _9: usize;
+            scope 3 {
+            }
+            scope 4 {
+                scope 7 (inlined <NonNull<T> as PartialEq>::eq) {
+                    let mut _4: std::ptr::NonNull<T>;
+                    let mut _5: *mut T;
+                    let mut _6: *mut T;
+                    scope 8 (inlined NonNull::<T>::as_ptr) {
+                    }
+                    scope 9 (inlined NonNull::<T>::as_ptr) {
+                    }
+                }
+            }
+            scope 5 (inlined std::ptr::mut_ptr::<impl *mut T>::addr) {
+                scope 6 (inlined std::ptr::mut_ptr::<impl *mut T>::cast::<()>) {
+                }
+            }
+        }
+        scope 10 (inlined std::slice::IterMut::<'_, T>::next_back_unchecked) {
+            let mut _15: std::ptr::NonNull<T>;
+            scope 11 (inlined std::slice::IterMut::<'_, T>::pre_dec_end) {
+                let mut _10: *mut *mut T;
+                let mut _11: *mut std::ptr::NonNull<T>;
+                let mut _12: std::ptr::NonNull<T>;
+                let mut _16: *mut *mut T;
+                let mut _17: *mut usize;
+                let mut _18: usize;
+                let mut _19: usize;
+                scope 12 {
+                    scope 13 {
+                    }
+                    scope 14 {
+                        scope 17 (inlined NonNull::<T>::sub) {
+                            scope 18 (inlined #[track_caller] core::num::<impl isize>::unchecked_neg) {
+                                scope 19 (inlined core::ub_checks::check_language_ub) {
+                                    scope 20 (inlined core::ub_checks::check_language_ub::runtime) {
+                                    }
+                                }
+                            }
+                            scope 21 (inlined NonNull::<T>::offset) {
+                                let mut _13: *const T;
+                                let mut _14: *const T;
+                                scope 22 (inlined NonNull::<T>::as_ptr) {
+                                }
+                            }
+                        }
+                    }
+                    scope 15 (inlined std::ptr::mut_ptr::<impl *mut *mut T>::cast::<usize>) {
+                    }
+                    scope 16 (inlined std::ptr::mut_ptr::<impl *mut *mut T>::cast::<NonNull<T>>) {
+                    }
+                }
+            }
+            scope 23 (inlined NonNull::<T>::as_mut::<'_>) {
+                let mut _20: *mut T;
+                scope 24 (inlined NonNull::<T>::as_ptr) {
+                }
+            }
+        }
+    }
 
     bb0: {
-        _0 = <std::slice::IterMut<'_, T> as DoubleEndedIterator>::next_back(move _1) -> [return: bb1, unwind continue];
+        StorageLive(_9);
+        StorageLive(_8);
+        StorageLive(_3);
+        StorageLive(_2);
+        StorageLive(_21);
+        StorageLive(_7);
+        switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb1, otherwise: bb2];
     }
 
     bb1: {
+        _2 = copy ((*_1).1: *mut T);
+        _3 = copy _2 as std::ptr::NonNull<T> (Transmute);
+        StorageLive(_5);
+        StorageLive(_4);
+        _4 = copy ((*_1).0: std::ptr::NonNull<T>);
+        _5 = copy _4 as *mut T (Transmute);
+        StorageDead(_4);
+        StorageLive(_6);
+        _6 = copy _3 as *mut T (Transmute);
+        _7 = Eq(copy _5, copy _6);
+        StorageDead(_6);
+        StorageDead(_5);
+        goto -> bb3;
+    }
+
+    bb2: {
+        _8 = copy ((*_1).1: *mut T);
+        _9 = copy _8 as usize (Transmute);
+        _7 = Eq(copy _9, const 0_usize);
+        goto -> bb3;
+    }
+
+    bb3: {
+        switchInt(move _7) -> [0: bb4, otherwise: bb10];
+    }
+
+    bb4: {
+        StorageLive(_15);
+        StorageLive(_17);
+        StorageLive(_11);
+        StorageLive(_12);
+        switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb5, otherwise: bb8];
+    }
+
+    bb5: {
+        StorageLive(_10);
+        _10 = &raw mut ((*_1).1: *mut T);
+        _11 = copy _10 as *mut std::ptr::NonNull<T> (PtrToPtr);
+        StorageDead(_10);
+        _12 = copy (*_11);
+        switchInt(const <T as std::mem::SizedTypeProperties>::IS_ZST) -> [0: bb6, otherwise: bb7];
+    }
+
+    bb6: {
+        StorageLive(_14);
+        StorageLive(_13);
+        _13 = copy _12 as *const T (Transmute);
+        _14 = Offset(copy _13, const -1_isize);
+        StorageDead(_13);
+        _12 = NonNull::<T> { pointer: copy _14 };
+        StorageDead(_14);
+        goto -> bb7;
+    }
+
+    bb7: {
+        (*_11) = move _12;
+        _15 = copy (*_11);
+        goto -> bb9;
+    }
+
+    bb8: {
+        StorageLive(_16);
+        _16 = &raw mut ((*_1).1: *mut T);
+        _17 = copy _16 as *mut usize (PtrToPtr);
+        StorageDead(_16);
+        StorageLive(_19);
+        StorageLive(_18);
+        _18 = copy (*_17);
+        _19 = SubUnchecked(move _18, const 1_usize);
+        StorageDead(_18);
+        (*_17) = move _19;
+        StorageDead(_19);
+        _15 = copy ((*_1).0: std::ptr::NonNull<T>);
+        goto -> bb9;
+    }
+
+    bb9: {
+        StorageDead(_12);
+        StorageDead(_11);
+        StorageDead(_17);
+        StorageLive(_20);
+        _20 = copy _15 as *mut T (Transmute);
+        _21 = &mut (*_20);
+        StorageDead(_20);
+        StorageDead(_15);
+        _0 = Option::<&mut T>::Some(copy _21);
+        goto -> bb11;
+    }
+
+    bb10: {
+        _0 = const {transmute(0x0000000000000000): Option<&mut T>};
+        goto -> bb11;
+    }
+
+    bb11: {
+        StorageDead(_7);
+        StorageDead(_21);
+        StorageDead(_2);
+        StorageDead(_3);
+        StorageDead(_8);
+        StorageDead(_9);
         return;
     }
 }
diff --git a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir
index fe4e2deab87..79aa9c5ae1e 100644
--- a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir
@@ -9,7 +9,7 @@ fn outer(_1: u8) -> u8 {
     }
 
     bb0: {
-        _2 = &_1;                        // scope 0 at $DIR/spans.rs:11:11: 11:13
+        // DBG: _2 = &_1;
         _0 = copy _1;                    // scope 1 at $DIR/spans.rs:15:5: 15:7
         return;                          // scope 0 at $DIR/spans.rs:12:2: 12:2
     }
diff --git a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir
index fe4e2deab87..79aa9c5ae1e 100644
--- a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir
@@ -9,7 +9,7 @@ fn outer(_1: u8) -> u8 {
     }
 
     bb0: {
-        _2 = &_1;                        // scope 0 at $DIR/spans.rs:11:11: 11:13
+        // DBG: _2 = &_1;
         _0 = copy _1;                    // scope 1 at $DIR/spans.rs:15:5: 15:7
         return;                          // scope 0 at $DIR/spans.rs:12:2: 12:2
     }
diff --git a/tests/run-make/autodiff/type-trees/array-typetree/array.check b/tests/run-make/autodiff/type-trees/array-typetree/array.check
new file mode 100644
index 00000000000..0d38bdec17e
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/array-typetree/array.check
@@ -0,0 +1,4 @@
+; Check that array TypeTree metadata is correctly generated  
+; Should show Float@double at each array element offset (0, 8, 16, 24, 32 bytes)
+
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_array{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@double}"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/array-typetree/rmake.rs b/tests/run-make/autodiff/type-trees/array-typetree/rmake.rs
new file mode 100644
index 00000000000..20b6a066906
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/array-typetree/rmake.rs
@@ -0,0 +1,9 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    rustc().input("test.rs").arg("-Zautodiff=Enable").emit("llvm-ir").run();
+    llvm_filecheck().patterns("array.check").stdin_buf(rfs::read("test.ll")).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/array-typetree/test.rs b/tests/run-make/autodiff/type-trees/array-typetree/test.rs
new file mode 100644
index 00000000000..f54ebf5a4c7
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/array-typetree/test.rs
@@ -0,0 +1,15 @@
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+
+#[autodiff_reverse(d_test, Duplicated, Active)]
+#[no_mangle]
+fn test_array(arr: &[f64; 5]) -> f64 {
+    arr[0] + arr[1] + arr[2] + arr[3] + arr[4]
+}
+
+fn main() {
+    let arr = [1.0, 2.0, 3.0, 4.0, 5.0];
+    let mut d_arr = [0.0; 5];
+    let _result = d_test(&arr, &mut d_arr, 1.0);
+}
diff --git a/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy-ir.check b/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy-ir.check
new file mode 100644
index 00000000000..0e6351ac4d3
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy-ir.check
@@ -0,0 +1,8 @@
+; Check that enzyme_type attributes are present in the LLVM IR function definition
+; This verifies our TypeTree system correctly attaches metadata for Enzyme
+
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_memcpy({{.*}}"enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@double}"
+
+; Check that llvm.memcpy exists (either call or declare)
+CHECK: {{(call|declare).*}}@llvm.memcpy
+
diff --git a/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.check b/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.check
new file mode 100644
index 00000000000..ae70830297a
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.check
@@ -0,0 +1,13 @@
+CHECK: force_memcpy
+
+CHECK: @llvm.memcpy.p0.p0.i64
+
+CHECK: test_memcpy - {[-1]:Float@double} |{[-1]:Pointer}:{}
+
+CHECK-DAG: ptr %{{[0-9]+}}: {[-1]:Pointer, [-1,0]:Float@double, [-1,8]:Float@double, [-1,16]:Float@double, [-1,24]:Float@double}
+
+CHECK-DAG: load double{{.*}}: {[-1]:Float@double}
+
+CHECK-DAG: fmul double{{.*}}: {[-1]:Float@double}
+
+CHECK-DAG: fadd double{{.*}}: {[-1]:Float@double}
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.rs b/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.rs
new file mode 100644
index 00000000000..3c1029190c8
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/memcpy-typetree/memcpy.rs
@@ -0,0 +1,36 @@
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+use std::ptr;
+
+#[inline(never)]
+fn force_memcpy(src: *const f64, dst: *mut f64, count: usize) {
+    unsafe {
+        ptr::copy_nonoverlapping(src, dst, count);
+    }
+}
+
+#[autodiff_reverse(d_test_memcpy, Duplicated, Active)]
+#[no_mangle]
+fn test_memcpy(input: &[f64; 128]) -> f64 {
+    let mut local_data = [0.0f64; 128];
+
+    // Use a separate function to prevent inlining and optimization
+    force_memcpy(input.as_ptr(), local_data.as_mut_ptr(), 128);
+
+    // Sum only first few elements to keep the computation simple
+    local_data[0] * local_data[0]
+        + local_data[1] * local_data[1]
+        + local_data[2] * local_data[2]
+        + local_data[3] * local_data[3]
+}
+
+fn main() {
+    let input = [1.0; 128];
+    let mut d_input = [0.0; 128];
+    let result = test_memcpy(&input);
+    let result_d = d_test_memcpy(&input, &mut d_input, 1.0);
+
+    assert_eq!(result, result_d);
+    println!("Memcpy test passed: result = {}", result);
+}
diff --git a/tests/run-make/autodiff/type-trees/memcpy-typetree/rmake.rs b/tests/run-make/autodiff/type-trees/memcpy-typetree/rmake.rs
new file mode 100644
index 00000000000..b4c650330fe
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/memcpy-typetree/rmake.rs
@@ -0,0 +1,39 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    // First, compile to LLVM IR to check for enzyme_type attributes
+    let _ir_output = rustc()
+        .input("memcpy.rs")
+        .arg("-Zautodiff=Enable")
+        .arg("-Zautodiff=NoPostopt")
+        .opt_level("0")
+        .arg("--emit=llvm-ir")
+        .arg("-o")
+        .arg("main.ll")
+        .run();
+
+    // Then compile with TypeTree analysis output for the existing checks
+    let output = rustc()
+        .input("memcpy.rs")
+        .arg("-Zautodiff=Enable,PrintTAFn=test_memcpy")
+        .arg("-Zautodiff=NoPostopt")
+        .opt_level("3")
+        .arg("-Clto=fat")
+        .arg("-g")
+        .run();
+
+    let stdout = output.stdout_utf8();
+    let stderr = output.stderr_utf8();
+    let ir_content = rfs::read_to_string("main.ll");
+
+    rfs::write("memcpy.stdout", &stdout);
+    rfs::write("memcpy.stderr", &stderr);
+    rfs::write("main.ir", &ir_content);
+
+    llvm_filecheck().patterns("memcpy.check").stdin_buf(stdout).run();
+
+    llvm_filecheck().patterns("memcpy-ir.check").stdin_buf(ir_content).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/mixed-struct-typetree/mixed.check b/tests/run-make/autodiff/type-trees/mixed-struct-typetree/mixed.check
new file mode 100644
index 00000000000..584f5840843
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/mixed-struct-typetree/mixed.check
@@ -0,0 +1,2 @@
+; Check that mixed struct with large array generates correct detailed type tree
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@float}"{{.*}}@test_mixed_struct{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Integer, [-1,8]:Float@float}"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/mixed-struct-typetree/rmake.rs b/tests/run-make/autodiff/type-trees/mixed-struct-typetree/rmake.rs
new file mode 100644
index 00000000000..1c19963bc36
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/mixed-struct-typetree/rmake.rs
@@ -0,0 +1,16 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    rustc()
+        .input("test.rs")
+        .arg("-Zautodiff=Enable")
+        .arg("-Zautodiff=NoPostopt")
+        .opt_level("0")
+        .emit("llvm-ir")
+        .run();
+
+    llvm_filecheck().patterns("mixed.check").stdin_buf(rfs::read("test.ll")).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/mixed-struct-typetree/test.rs b/tests/run-make/autodiff/type-trees/mixed-struct-typetree/test.rs
new file mode 100644
index 00000000000..7a734980e61
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/mixed-struct-typetree/test.rs
@@ -0,0 +1,23 @@
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+
+#[repr(C)]
+struct Container {
+    header: i64,
+    data: [f32; 1000],
+}
+
+#[autodiff_reverse(d_test, Duplicated, Active)]
+#[no_mangle]
+#[inline(never)]
+fn test_mixed_struct(container: &Container) -> f32 {
+    container.data[0] + container.data[999]
+}
+
+fn main() {
+    let container = Container { header: 42, data: [1.0; 1000] };
+    let mut d_container = Container { header: 0, data: [0.0; 1000] };
+    let result = d_test(&container, &mut d_container, 1.0);
+    std::hint::black_box(result);
+}
diff --git a/tests/run-make/autodiff/type-trees/nott-flag/nott.check b/tests/run-make/autodiff/type-trees/nott-flag/nott.check
new file mode 100644
index 00000000000..8d23e2ee319
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/nott-flag/nott.check
@@ -0,0 +1,5 @@
+// Check that enzyme_type attributes are NOT present when NoTT flag is used
+// This verifies the NoTT flag correctly disables TypeTree metadata
+
+CHECK: define{{.*}}@square
+CHECK-NOT: "enzyme_type"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/nott-flag/rmake.rs b/tests/run-make/autodiff/type-trees/nott-flag/rmake.rs
new file mode 100644
index 00000000000..de540b990ca
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/nott-flag/rmake.rs
@@ -0,0 +1,30 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    // Test with NoTT flag - should not generate TypeTree metadata
+    rustc()
+        .input("test.rs")
+        .arg("-Zautodiff=Enable,NoTT")
+        .emit("llvm-ir")
+        .arg("-o")
+        .arg("nott.ll")
+        .run();
+
+    // Test without NoTT flag - should generate TypeTree metadata
+    rustc()
+        .input("test.rs")
+        .arg("-Zautodiff=Enable")
+        .emit("llvm-ir")
+        .arg("-o")
+        .arg("with_tt.ll")
+        .run();
+
+    // Verify NoTT version does NOT have enzyme_type attributes
+    llvm_filecheck().patterns("nott.check").stdin_buf(rfs::read("nott.ll")).run();
+
+    // Verify TypeTree version DOES have enzyme_type attributes
+    llvm_filecheck().patterns("with_tt.check").stdin_buf(rfs::read("with_tt.ll")).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/nott-flag/test.rs b/tests/run-make/autodiff/type-trees/nott-flag/test.rs
new file mode 100644
index 00000000000..de3549c37c6
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/nott-flag/test.rs
@@ -0,0 +1,15 @@
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+
+#[autodiff_reverse(d_square, Duplicated, Active)]
+#[no_mangle]
+fn square(x: &f64) -> f64 {
+    x * x
+}
+
+fn main() {
+    let x = 2.0;
+    let mut dx = 0.0;
+    let _result = d_square(&x, &mut dx, 1.0);
+}
diff --git a/tests/run-make/autodiff/type-trees/nott-flag/with_tt.check b/tests/run-make/autodiff/type-trees/nott-flag/with_tt.check
new file mode 100644
index 00000000000..0b4c9119179
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/nott-flag/with_tt.check
@@ -0,0 +1,4 @@
+// Check that enzyme_type attributes are present when TypeTree is enabled
+// This verifies our TypeTree metadata attachment is working
+
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@square{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double}"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/recursion-typetree/recursion.check b/tests/run-make/autodiff/type-trees/recursion-typetree/recursion.check
new file mode 100644
index 00000000000..1960e7b816c
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/recursion-typetree/recursion.check
@@ -0,0 +1,3 @@
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_deep{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double}"
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_graph{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Integer, [-1,8]:Integer, [-1,16]:Integer, [-1,24]:Float@double}"
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_node{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double}"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/recursion-typetree/rmake.rs b/tests/run-make/autodiff/type-trees/recursion-typetree/rmake.rs
new file mode 100644
index 00000000000..78718f3a215
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/recursion-typetree/rmake.rs
@@ -0,0 +1,9 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    rustc().input("test.rs").arg("-Zautodiff=Enable").emit("llvm-ir").run();
+    llvm_filecheck().patterns("recursion.check").stdin_buf(rfs::read("test.ll")).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/recursion-typetree/test.rs b/tests/run-make/autodiff/type-trees/recursion-typetree/test.rs
new file mode 100644
index 00000000000..9d40bec1bf1
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/recursion-typetree/test.rs
@@ -0,0 +1,100 @@
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+
+// Self-referential struct to test recursion detection
+#[derive(Clone)]
+struct Node {
+    value: f64,
+    next: Option<Box<Node>>,
+}
+
+// Mutually recursive structs to test cycle detection
+#[derive(Clone)]
+struct GraphNodeA {
+    value: f64,
+    connections: Vec<GraphNodeB>,
+}
+
+#[derive(Clone)]
+struct GraphNodeB {
+    weight: f64,
+    target: Option<Box<GraphNodeA>>,
+}
+
+#[autodiff_reverse(d_test_node, Duplicated, Active)]
+#[no_mangle]
+fn test_node(node: &Node) -> f64 {
+    node.value * 2.0
+}
+
+#[autodiff_reverse(d_test_graph, Duplicated, Active)]
+#[no_mangle]
+fn test_graph(a: &GraphNodeA) -> f64 {
+    a.value * 3.0
+}
+
+// Simple depth test - deeply nested but not circular
+#[derive(Clone)]
+struct Level1 {
+    val: f64,
+    next: Option<Box<Level2>>,
+}
+#[derive(Clone)]
+struct Level2 {
+    val: f64,
+    next: Option<Box<Level3>>,
+}
+#[derive(Clone)]
+struct Level3 {
+    val: f64,
+    next: Option<Box<Level4>>,
+}
+#[derive(Clone)]
+struct Level4 {
+    val: f64,
+    next: Option<Box<Level5>>,
+}
+#[derive(Clone)]
+struct Level5 {
+    val: f64,
+    next: Option<Box<Level6>>,
+}
+#[derive(Clone)]
+struct Level6 {
+    val: f64,
+    next: Option<Box<Level7>>,
+}
+#[derive(Clone)]
+struct Level7 {
+    val: f64,
+    next: Option<Box<Level8>>,
+}
+#[derive(Clone)]
+struct Level8 {
+    val: f64,
+}
+
+#[autodiff_reverse(d_test_deep, Duplicated, Active)]
+#[no_mangle]
+fn test_deep(deep: &Level1) -> f64 {
+    deep.val * 4.0
+}
+
+fn main() {
+    let node = Node { value: 1.0, next: None };
+
+    let graph = GraphNodeA { value: 2.0, connections: vec![] };
+
+    let deep = Level1 { val: 5.0, next: None };
+
+    let mut d_node = Node { value: 0.0, next: None };
+
+    let mut d_graph = GraphNodeA { value: 0.0, connections: vec![] };
+
+    let mut d_deep = Level1 { val: 0.0, next: None };
+
+    let _result1 = d_test_node(&node, &mut d_node, 1.0);
+    let _result2 = d_test_graph(&graph, &mut d_graph, 1.0);
+    let _result3 = d_test_deep(&deep, &mut d_deep, 1.0);
+}
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/f128.check b/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/f128.check
new file mode 100644
index 00000000000..23db64eea52
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/f128.check
@@ -0,0 +1,4 @@
+; Check that f128 TypeTree metadata is correctly generated
+; Should show Float@fp128 for f128 values and Pointer for references
+
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@fp128}"{{.*}}@test_f128{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@fp128}"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/rmake.rs b/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/rmake.rs
new file mode 100644
index 00000000000..44320ecdd57
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/rmake.rs
@@ -0,0 +1,12 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    // Compile with TypeTree enabled and emit LLVM IR
+    rustc().input("test.rs").arg("-Zautodiff=Enable").emit("llvm-ir").run();
+
+    // Check that f128 TypeTree metadata is correctly generated
+    llvm_filecheck().patterns("f128.check").stdin_buf(rfs::read("test.ll")).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/test.rs b/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/test.rs
new file mode 100644
index 00000000000..5c71baa3e69
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/f128-typetree/test.rs
@@ -0,0 +1,15 @@
+#![feature(autodiff, f128)]
+
+use std::autodiff::autodiff_reverse;
+
+#[autodiff_reverse(d_test, Duplicated, Active)]
+#[no_mangle]
+fn test_f128(x: &f128) -> f128 {
+    *x * *x
+}
+
+fn main() {
+    let x = 2.0_f128;
+    let mut dx = 0.0_f128;
+    let _result = d_test(&x, &mut dx, 1.0);
+}
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/f16.check b/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/f16.check
new file mode 100644
index 00000000000..9adff68d36f
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/f16.check
@@ -0,0 +1,4 @@
+; Check that f16 TypeTree metadata is correctly generated
+; Should show Float@half for f16 values and Pointer for references
+
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@half}"{{.*}}@test_f16{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@half}"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/rmake.rs b/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/rmake.rs
new file mode 100644
index 00000000000..0aebdbf5520
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/rmake.rs
@@ -0,0 +1,12 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    // Compile with TypeTree enabled and emit LLVM IR
+    rustc().input("test.rs").arg("-Zautodiff=Enable").emit("llvm-ir").run();
+
+    // Check that f16 TypeTree metadata is correctly generated
+    llvm_filecheck().patterns("f16.check").stdin_buf(rfs::read("test.ll")).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/test.rs b/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/test.rs
new file mode 100644
index 00000000000..6b68e8252f4
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/f16-typetree/test.rs
@@ -0,0 +1,15 @@
+#![feature(autodiff, f16)]
+
+use std::autodiff::autodiff_reverse;
+
+#[autodiff_reverse(d_test, Duplicated, Active)]
+#[no_mangle]
+fn test_f16(x: &f16) -> f16 {
+    *x * *x
+}
+
+fn main() {
+    let x = 2.0_f16;
+    let mut dx = 0.0_f16;
+    let _result = d_test(&x, &mut dx, 1.0);
+}
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/f32.check b/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/f32.check
new file mode 100644
index 00000000000..176630f57e8
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/f32.check
@@ -0,0 +1,4 @@
+; Check that f32 TypeTree metadata is correctly generated
+; Should show Float@float for f32 values and Pointer for references
+
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@float}"{{.*}}@test_f32{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@float}"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/rmake.rs b/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/rmake.rs
new file mode 100644
index 00000000000..ee3ab753bf5
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/rmake.rs
@@ -0,0 +1,12 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    // Compile with TypeTree enabled and emit LLVM IR
+    rustc().input("test.rs").arg("-Zautodiff=Enable").emit("llvm-ir").run();
+
+    // Check that f32 TypeTree metadata is correctly generated
+    llvm_filecheck().patterns("f32.check").stdin_buf(rfs::read("test.ll")).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/test.rs b/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/test.rs
new file mode 100644
index 00000000000..56c118399ee
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/f32-typetree/test.rs
@@ -0,0 +1,15 @@
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+
+#[autodiff_reverse(d_test, Duplicated, Active)]
+#[no_mangle]
+fn test_f32(x: &f32) -> f32 {
+    x * x
+}
+
+fn main() {
+    let x = 2.0_f32;
+    let mut dx = 0.0_f32;
+    let _result = d_test(&x, &mut dx, 1.0);
+}
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/f64.check b/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/f64.check
new file mode 100644
index 00000000000..929cd379694
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/f64.check
@@ -0,0 +1,4 @@
+; Check that f64 TypeTree metadata is correctly generated  
+; Should show Float@double for f64 values and Pointer for references
+
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_f64{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double}"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/rmake.rs b/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/rmake.rs
new file mode 100644
index 00000000000..5fac9b23bc8
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/rmake.rs
@@ -0,0 +1,12 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    // Compile with TypeTree enabled and emit LLVM IR
+    rustc().input("test.rs").arg("-Zautodiff=Enable").emit("llvm-ir").run();
+
+    // Check that f64 TypeTree metadata is correctly generated
+    llvm_filecheck().patterns("f64.check").stdin_buf(rfs::read("test.ll")).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/test.rs b/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/test.rs
new file mode 100644
index 00000000000..235360b76b2
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/f64-typetree/test.rs
@@ -0,0 +1,15 @@
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+
+#[autodiff_reverse(d_test, Duplicated, Active)]
+#[no_mangle]
+fn test_f64(x: &f64) -> f64 {
+    x * x
+}
+
+fn main() {
+    let x = 2.0_f64;
+    let mut dx = 0.0_f64;
+    let _result = d_test(&x, &mut dx, 1.0);
+}
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/i32.check b/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/i32.check
new file mode 100644
index 00000000000..dee4aa5bbb6
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/i32.check
@@ -0,0 +1,4 @@
+; Check that i32 TypeTree metadata is correctly generated
+; Should show Integer for i32 values and Pointer for references
+
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Integer}"{{.*}}@test_i32{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Integer}"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/rmake.rs b/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/rmake.rs
new file mode 100644
index 00000000000..a40fd55d88a
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/rmake.rs
@@ -0,0 +1,12 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    // Compile with TypeTree enabled and emit LLVM IR
+    rustc().input("test.rs").arg("-Zautodiff=Enable").emit("llvm-ir").run();
+
+    // Check that i32 TypeTree metadata is correctly generated
+    llvm_filecheck().patterns("i32.check").stdin_buf(rfs::read("test.ll")).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/test.rs b/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/test.rs
new file mode 100644
index 00000000000..249803c5d9f
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/scalar-types/i32-typetree/test.rs
@@ -0,0 +1,15 @@
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+
+#[autodiff_reverse(d_test, Duplicated, Active)]
+#[no_mangle]
+fn test_i32(x: &i32) -> i32 {
+    x * x
+}
+
+fn main() {
+    let x = 5_i32;
+    let mut dx = 0_i32;
+    let _result = d_test(&x, &mut dx, 1);
+}
diff --git a/tests/run-make/autodiff/type-trees/slice-typetree/rmake.rs b/tests/run-make/autodiff/type-trees/slice-typetree/rmake.rs
new file mode 100644
index 00000000000..b81fb50bf1a
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/slice-typetree/rmake.rs
@@ -0,0 +1,9 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    rustc().input("test.rs").arg("-Zautodiff=Enable").emit("llvm-ir").run();
+    llvm_filecheck().patterns("slice.check").stdin_buf(rfs::read("test.ll")).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/slice-typetree/slice.check b/tests/run-make/autodiff/type-trees/slice-typetree/slice.check
new file mode 100644
index 00000000000..6543b616115
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/slice-typetree/slice.check
@@ -0,0 +1,4 @@
+; Check that slice TypeTree metadata is correctly generated
+; Should show Float@double for slice elements
+
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_slice{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,-1]:Float@double}"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/slice-typetree/test.rs b/tests/run-make/autodiff/type-trees/slice-typetree/test.rs
new file mode 100644
index 00000000000..7117fa3844f
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/slice-typetree/test.rs
@@ -0,0 +1,16 @@
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+
+#[autodiff_reverse(d_test, Duplicated, Active)]
+#[no_mangle]
+fn test_slice(slice: &[f64]) -> f64 {
+    slice.iter().sum()
+}
+
+fn main() {
+    let arr = [1.0, 2.0, 3.0, 4.0, 5.0];
+    let slice = &arr[..];
+    let mut d_slice = [0.0; 5];
+    let _result = d_test(slice, &mut d_slice[..], 1.0);
+}
diff --git a/tests/run-make/autodiff/type-trees/struct-typetree/rmake.rs b/tests/run-make/autodiff/type-trees/struct-typetree/rmake.rs
new file mode 100644
index 00000000000..0af1b65ee18
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/struct-typetree/rmake.rs
@@ -0,0 +1,9 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    rustc().input("test.rs").arg("-Zautodiff=Enable").emit("llvm-ir").run();
+    llvm_filecheck().patterns("struct.check").stdin_buf(rfs::read("test.ll")).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/struct-typetree/struct.check b/tests/run-make/autodiff/type-trees/struct-typetree/struct.check
new file mode 100644
index 00000000000..54956317e1e
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/struct-typetree/struct.check
@@ -0,0 +1,4 @@
+; Check that struct TypeTree metadata is correctly generated
+; Should show Float@double at offsets 0, 8, 16 for Point struct fields
+
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_struct{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double, [-1,8]:Float@double, [-1,16]:Float@double}"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/struct-typetree/test.rs b/tests/run-make/autodiff/type-trees/struct-typetree/test.rs
new file mode 100644
index 00000000000..cbe7b10e409
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/struct-typetree/test.rs
@@ -0,0 +1,22 @@
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+
+#[repr(C)]
+struct Point {
+    x: f64,
+    y: f64,
+    z: f64,
+}
+
+#[autodiff_reverse(d_test, Duplicated, Active)]
+#[no_mangle]
+fn test_struct(point: &Point) -> f64 {
+    point.x + point.y * 2.0 + point.z * 3.0
+}
+
+fn main() {
+    let point = Point { x: 1.0, y: 2.0, z: 3.0 };
+    let mut d_point = Point { x: 0.0, y: 0.0, z: 0.0 };
+    let _result = d_test(&point, &mut d_point, 1.0);
+}
diff --git a/tests/run-make/autodiff/type-trees/tuple-typetree/rmake.rs b/tests/run-make/autodiff/type-trees/tuple-typetree/rmake.rs
new file mode 100644
index 00000000000..76913828901
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/tuple-typetree/rmake.rs
@@ -0,0 +1,9 @@
+//@ needs-enzyme
+//@ ignore-cross-compile
+
+use run_make_support::{llvm_filecheck, rfs, rustc};
+
+fn main() {
+    rustc().input("test.rs").arg("-Zautodiff=Enable").emit("llvm-ir").run();
+    llvm_filecheck().patterns("tuple.check").stdin_buf(rfs::read("test.ll")).run();
+}
diff --git a/tests/run-make/autodiff/type-trees/tuple-typetree/test.rs b/tests/run-make/autodiff/type-trees/tuple-typetree/test.rs
new file mode 100644
index 00000000000..32187b587a3
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/tuple-typetree/test.rs
@@ -0,0 +1,15 @@
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+
+#[autodiff_reverse(d_test, Duplicated, Active)]
+#[no_mangle]
+fn test_tuple(tuple: &(f64, f64, f64)) -> f64 {
+    tuple.0 + tuple.1 * 2.0 + tuple.2 * 3.0
+}
+
+fn main() {
+    let tuple = (1.0, 2.0, 3.0);
+    let mut d_tuple = (0.0, 0.0, 0.0);
+    let _result = d_test(&tuple, &mut d_tuple, 1.0);
+}
diff --git a/tests/run-make/autodiff/type-trees/tuple-typetree/tuple.check b/tests/run-make/autodiff/type-trees/tuple-typetree/tuple.check
new file mode 100644
index 00000000000..47647e78cc3
--- /dev/null
+++ b/tests/run-make/autodiff/type-trees/tuple-typetree/tuple.check
@@ -0,0 +1,4 @@
+; Check that tuple TypeTree metadata is correctly generated
+; Should show Float@double at offsets 0, 8, 16 for (f64, f64, f64)
+
+CHECK: define{{.*}}"enzyme_type"="{[-1]:Float@double}"{{.*}}@test_tuple{{.*}}"enzyme_type"="{[-1]:Pointer, [-1,0]:Float@double, [-1,8]:Float@double, [-1,16]:Float@double}"
\ No newline at end of file
diff --git a/tests/run-make/autodiff/type-trees/type-analysis/vec/vec.check b/tests/run-make/autodiff/type-trees/type-analysis/vec/vec.check
index dcf9508b69d..cdb70eb83fc 100644
--- a/tests/run-make/autodiff/type-trees/type-analysis/vec/vec.check
+++ b/tests/run-make/autodiff/type-trees/type-analysis/vec/vec.check
@@ -1,7 +1,7 @@
 // CHECK: callee - {[-1]:Float@float} |{[-1]:Pointer}:{}
 // CHECK: ptr %{{[0-9]+}}: {[-1]:Pointer}
 // CHECK-DAG: %{{[0-9]+}} = getelementptr inbounds nuw i8, ptr %{{[0-9]+}}, i64 8, !dbg !{{[0-9]+}}: {[-1]:Pointer}
-// CHECK-DAG: %{{[0-9]+}} = load ptr, ptr %{{[0-9]+}}, align 8, !dbg !{{[0-9]+}}, !nonnull !102, !noundef !{{[0-9]+}}: {}
+// CHECK-DAG: %{{[0-9]+}} = load ptr, ptr %{{[0-9]+}}, align 8, !dbg !{{[0-9]+}}, !nonnull !{{[0-9]+}}, !noundef !{{[0-9]+}}: {}
 // CHECK-DAG: %{{[0-9]+}} = getelementptr inbounds nuw i8, ptr %{{[0-9]+}}, i64 16, !dbg !{{[0-9]+}}: {[-1]:Pointer}
 // CHECK-DAG: %{{[0-9]+}} = load i64, ptr %{{[0-9]+}}, align 8, !dbg !{{[0-9]+}}, !noundef !{{[0-9]+}}: {}
 // CHECK-DAG: %{{[0-9]+}} = icmp eq i64 %{{[0-9]+}}, 0, !dbg !{{[0-9]+}}: {[-1]:Integer}
diff --git a/tests/run-make/doctests-compilation-time-info/rmake.rs b/tests/run-make/doctests-compilation-time-info/rmake.rs
new file mode 100644
index 00000000000..2bcf664923f
--- /dev/null
+++ b/tests/run-make/doctests-compilation-time-info/rmake.rs
@@ -0,0 +1,119 @@
+//@ ignore-cross-compile (needs to run doctests)
+
+use run_make_support::rfs::write;
+use run_make_support::{cwd, rustdoc};
+
+fn assert_presence_of_compilation_time_report(
+    content: &str,
+    success: bool,
+    should_contain_compile_time: bool,
+) {
+    let mut cmd = rustdoc();
+    let file = cwd().join("foo.rs");
+
+    write(&file, content);
+    cmd.input(&file).arg("--test").edition("2024").env("RUST_BACKTRACE", "0");
+    let output = if success { cmd.run() } else { cmd.run_fail() };
+
+    assert_eq!(
+        output
+            .stdout_utf8()
+            .split("all doctests ran in ")
+            .last()
+            .is_some_and(|s| s.contains("; merged doctests compilation took")),
+        should_contain_compile_time,
+    );
+}
+
+fn main() {
+    // Checking with only successful merged doctests.
+    assert_presence_of_compilation_time_report(
+        "\
+//! ```
+//! let x = 12;
+//! ```",
+        true,
+        true,
+    );
+    // Checking with only failing merged doctests.
+    assert_presence_of_compilation_time_report(
+        "\
+//! ```
+//! panic!();
+//! ```",
+        false,
+        true,
+    );
+    // Checking with mix of successful doctests.
+    assert_presence_of_compilation_time_report(
+        "\
+//! ```
+//! let x = 12;
+//! ```
+//!
+//! ```compile_fail
+//! let x
+//! ```",
+        true,
+        true,
+    );
+    // Checking with mix of failing doctests.
+    assert_presence_of_compilation_time_report(
+        "\
+//! ```
+//! panic!();
+//! ```
+//!
+//! ```compile_fail
+//! let x
+//! ```",
+        false,
+        true,
+    );
+    // Checking with mix of failing doctests (v2).
+    assert_presence_of_compilation_time_report(
+        "\
+//! ```
+//! let x = 12;
+//! ```
+//!
+//! ```compile_fail
+//! let x = 12;
+//! ```",
+        false,
+        true,
+    );
+    // Checking with mix of failing doctests (v3).
+    assert_presence_of_compilation_time_report(
+        "\
+//! ```
+//! panic!();
+//! ```
+//!
+//! ```compile_fail
+//! let x = 12;
+//! ```",
+        false,
+        true,
+    );
+    // Checking with successful non-merged doctests.
+    assert_presence_of_compilation_time_report(
+        "\
+//! ```compile_fail
+//! let x
+//! ```",
+        true,
+        // If there is no merged doctests, then we should not display compilation time.
+        false,
+    );
+    // Checking with failing non-merged doctests.
+    assert_presence_of_compilation_time_report(
+        "\
+//! ```compile_fail
+//! let x = 12;
+//! ```",
+        false,
+        // If there is no merged doctests, then we should not display compilation time.
+        false,
+    );
+}
diff --git a/tests/run-make/doctests-merge/doctest-2024.stdout b/tests/run-make/doctests-merge/doctest-2024.stdout
index 7da08d68faa..a7e139bbd23 100644
--- a/tests/run-make/doctests-merge/doctest-2024.stdout
+++ b/tests/run-make/doctests-merge/doctest-2024.stdout
@@ -5,3 +5,4 @@ test doctest.rs - init (line 8) ... ok
 
 test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
 
+all doctests ran in $TIME; merged doctests compilation took $TIME
diff --git a/tests/run-make/doctests-merge/rmake.rs b/tests/run-make/doctests-merge/rmake.rs
index 7893d4988eb..f2a1e8e13dd 100644
--- a/tests/run-make/doctests-merge/rmake.rs
+++ b/tests/run-make/doctests-merge/rmake.rs
@@ -20,6 +20,8 @@ fn test_and_compare(input_file: &str, stdout_file: &str, edition: &str, dep: &Pa
         .expected_file(stdout_file)
         .actual_text("output", output.stdout_utf8())
         .normalize(r#"finished in \d+\.\d+s"#, "finished in $$TIME")
+        .normalize(r#"ran in \d+\.\d+s"#, "ran in $$TIME")
+        .normalize(r#"compilation took \d+\.\d+s"#, "compilation took $$TIME")
         .run();
 }
 
diff --git a/tests/run-make/linker-warning/rmake.rs b/tests/run-make/linker-warning/rmake.rs
index 9ea706af503..a31b08d6c69 100644
--- a/tests/run-make/linker-warning/rmake.rs
+++ b/tests/run-make/linker-warning/rmake.rs
@@ -61,14 +61,13 @@ fn main() {
         diff()
             .expected_file("short-error.txt")
             .actual_text("(linker error)", out.stderr())
-            .normalize(r#"/rustc[^/_-]*/"#, "/rustc/")
-            .normalize("libpanic_abort", "libpanic_unwind")
             .normalize(
                 regex::escape(
                     run_make_support::build_root().canonicalize().unwrap().to_str().unwrap(),
                 ),
                 "/build-root",
             )
+            .normalize("libpanic_abort", "libpanic_unwind")
             .normalize(r#""[^"]*\/symbols.o""#, "\"/symbols.o\"")
             .normalize(r#""[^"]*\/raw-dylibs""#, "\"/raw-dylibs\"")
             .run();
diff --git a/tests/run-make/split-debuginfo/rmake.rs b/tests/run-make/split-debuginfo/rmake.rs
index e8de5aed172..e53b7101078 100644
--- a/tests/run-make/split-debuginfo/rmake.rs
+++ b/tests/run-make/split-debuginfo/rmake.rs
@@ -188,6 +188,25 @@ enum UnstableOptions {
 }
 
 #[track_caller]
+fn dwo_out_filenames(dwo_out: Option<&str>) -> BTreeSet<String> {
+    let dwo_out = if let Some(d) = dwo_out {
+        d
+    } else {
+        return BTreeSet::new();
+    };
+    let files = shallow_find_files(dwo_out, |path| {
+        // Fiilter out source files
+        !has_extension(path, "rs")
+    });
+    files
+        .iter()
+        .map(|p| {
+            format!("{}/{}", dwo_out, p.file_name().unwrap().to_os_string().into_string().unwrap())
+        })
+        .collect()
+}
+
+#[track_caller]
 fn cwd_filenames() -> BTreeSet<String> {
     let files = shallow_find_files(cwd(), |path| {
         // Fiilter out source files
@@ -197,6 +216,17 @@ fn cwd_filenames() -> BTreeSet<String> {
 }
 
 #[track_caller]
+fn dwo_out_dwo_filenames(dwo_out: &str) -> BTreeSet<String> {
+    let files = shallow_find_files(dwo_out, |p| has_extension(p, "dwo"));
+    files
+        .iter()
+        .map(|p| {
+            format!("{}/{}", dwo_out, p.file_name().unwrap().to_os_string().into_string().unwrap())
+        })
+        .collect()
+}
+
+#[track_caller]
 fn cwd_dwo_filenames() -> BTreeSet<String> {
     let files = shallow_find_files(cwd(), |path| has_extension(path, "dwo"));
     files.iter().map(|p| p.file_name().unwrap().to_os_string().into_string().unwrap()).collect()
@@ -376,17 +406,19 @@ mod shared_linux_other_tests {
         lto: LinkerPluginLto,
         remap_path_prefix: RemapPathPrefix,
         remap_path_scope: RemapPathScope,
+        split_dwarf_output_directory: Option<&str>,
     ) {
         run_in_tmpdir(|| {
             println!(
-                "checking: unstable_options={:?} + split_kind={:?} + level={:?} + split_dwarf_kind={:?} + lto={:?} + remap_path_prefix={:?} + remap_path_scope={:?}",
+                "checking: unstable_options={:?} + split_kind={:?} + level={:?} + split_dwarf_kind={:?} + lto={:?} + remap_path_prefix={:?} + remap_path_scope={:?} + split_dwarf_out_dir={:?}",
                 unstable_options,
                 split_kind,
                 level,
                 split_dwarf_kind,
                 lto,
                 remap_path_prefix,
-                remap_path_scope
+                remap_path_scope,
+                split_dwarf_output_directory,
             );
 
             match cross_crate_test {
@@ -398,6 +430,7 @@ mod shared_linux_other_tests {
                     lto,
                     remap_path_prefix,
                     remap_path_scope,
+                    split_dwarf_output_directory,
                 ),
                 CrossCrateTest::No => simple_split_debuginfo(
                     unstable_options,
@@ -407,6 +440,7 @@ mod shared_linux_other_tests {
                     lto,
                     remap_path_prefix,
                     remap_path_scope,
+                    split_dwarf_output_directory,
                 ),
             }
         });
@@ -420,7 +454,11 @@ mod shared_linux_other_tests {
         lto: LinkerPluginLto,
         remap_path_prefix: RemapPathPrefix,
         remap_path_scope: RemapPathScope,
+        split_dwarf_output_directory: Option<&str>,
     ) {
+        if let Some(dwo_out) = split_dwarf_output_directory {
+            run_make_support::rfs::create_dir(dwo_out);
+        }
         match (split_kind, level, split_dwarf_kind, lto, remap_path_prefix, remap_path_scope) {
             // packed-crosscrate-split
             // - Debuginfo in `.dwo` files
@@ -531,13 +569,19 @@ mod shared_linux_other_tests {
                     .input("bar.rs")
                     .crate_type("lib")
                     .split_debuginfo(split_kind.cli_value())
+                    .split_dwarf_out_dir(split_dwarf_output_directory)
                     .debuginfo(level.cli_value())
                     .arg(format!("-Zsplit-dwarf-kind={}", split_dwarf_kind.cli_value()))
                     .run();
 
-                let bar_found_files = cwd_filenames();
+                let mut bar_found_files = cwd_filenames();
+                bar_found_files.append(&mut dwo_out_filenames(split_dwarf_output_directory));
 
-                let bar_dwo_files = cwd_dwo_filenames();
+                let bar_dwo_files = if let Some(dwo_out) = split_dwarf_output_directory {
+                    dwo_out_dwo_filenames(dwo_out)
+                } else {
+                    cwd_dwo_filenames()
+                };
                 assert_eq!(bar_dwo_files.len(), 1);
 
                 let mut bar_expected_files = BTreeSet::new();
@@ -553,13 +597,19 @@ mod shared_linux_other_tests {
                     .extern_("bar", "libbar.rlib")
                     .input("main.rs")
                     .split_debuginfo(split_kind.cli_value())
+                    .split_dwarf_out_dir(split_dwarf_output_directory)
                     .debuginfo(level.cli_value())
                     .arg(format!("-Zsplit-dwarf-kind={}", split_dwarf_kind.cli_value()))
                     .run();
 
-                let overall_found_files = cwd_filenames();
+                let mut overall_found_files = cwd_filenames();
+                overall_found_files.append(&mut dwo_out_filenames(split_dwarf_output_directory));
 
-                let overall_dwo_files = cwd_dwo_filenames();
+                let overall_dwo_files = if let Some(dwo_out) = split_dwarf_output_directory {
+                    dwo_out_dwo_filenames(dwo_out)
+                } else {
+                    cwd_dwo_filenames()
+                };
                 assert_eq!(overall_dwo_files.len(), 2);
 
                 let mut overall_expected_files = BTreeSet::new();
@@ -648,7 +698,11 @@ mod shared_linux_other_tests {
         lto: LinkerPluginLto,
         remap_path_prefix: RemapPathPrefix,
         remap_path_scope: RemapPathScope,
+        split_dwarf_output_directory: Option<&str>,
     ) {
+        if let Some(dwo_out) = split_dwarf_output_directory {
+            run_make_support::rfs::create_dir(dwo_out);
+        }
         match (split_kind, level, split_dwarf_kind, lto, remap_path_prefix, remap_path_scope) {
             // off (unspecified):
             // - Debuginfo in `.o` files
@@ -921,14 +975,19 @@ mod shared_linux_other_tests {
                 rustc(unstable_options)
                     .input("foo.rs")
                     .split_debuginfo(split_kind.cli_value())
+                    .split_dwarf_out_dir(split_dwarf_output_directory)
                     .debuginfo(level.cli_value())
                     .arg(format!("-Zsplit-dwarf-kind={}", split_dwarf_kind.cli_value()))
                     .run();
-                let found_files = cwd_filenames();
-
-                let dwo_files = cwd_dwo_filenames();
+                let mut found_files = cwd_filenames();
+                found_files.append(&mut dwo_out_filenames(split_dwarf_output_directory));
+
+                let dwo_files = if let Some(dwo_dir) = split_dwarf_output_directory {
+                    dwo_out_dwo_filenames(dwo_dir)
+                } else {
+                    cwd_dwo_filenames()
+                };
                 assert_eq!(dwo_files.len(), 1);
-
                 let mut expected_files = BTreeSet::new();
                 expected_files.extend(dwo_files);
                 expected_files.insert("foo".to_string());
@@ -1056,14 +1115,20 @@ mod shared_linux_other_tests {
                 rustc(unstable_options)
                     .input("foo.rs")
                     .split_debuginfo(split_kind.cli_value())
+                    .split_dwarf_out_dir(split_dwarf_output_directory)
                     .debuginfo(level.cli_value())
                     .arg(format!("-Zsplit-dwarf-kind={}", split_dwarf_kind.cli_value()))
                     .remap_path_prefix(cwd(), remapped_prefix)
                     .run();
 
-                let found_files = cwd_filenames();
+                let mut found_files = cwd_filenames();
+                found_files.append(&mut dwo_out_filenames(split_dwarf_output_directory));
 
-                let dwo_files = cwd_dwo_filenames();
+                let dwo_files = if let Some(dwo_out) = split_dwarf_output_directory {
+                    dwo_out_dwo_filenames(dwo_out)
+                } else {
+                    cwd_dwo_filenames()
+                };
                 assert_eq!(dwo_files.len(), 1);
 
                 let mut expected_files = BTreeSet::new();
@@ -1358,6 +1423,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
         );
 
         // off
@@ -1370,6 +1436,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
         );
 
         // packed-split
@@ -1382,6 +1449,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
         );
 
         // packed-single
@@ -1394,6 +1462,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
         );
 
         // packed-lto-split
@@ -1406,6 +1475,7 @@ fn main() {
             LinkerPluginLto::Yes,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
         );
 
         // packed-lto-single
@@ -1418,6 +1488,7 @@ fn main() {
             LinkerPluginLto::Yes,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
         );
 
         // FIXME: the remapping tests probably need to be reworked, see
@@ -1433,6 +1504,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Yes { remapped_prefix: "/__MY_REMAPPED_PATH__" },
             RemapPathScope::Unspecified,
+            None,
         );
 
         // packed-remapped-single
@@ -1445,6 +1517,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Yes { remapped_prefix: "/__MY_REMAPPED_PATH__" },
             RemapPathScope::Unspecified,
+            None,
         );
 
         // packed-remapped-scope
@@ -1457,6 +1530,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Yes { remapped_prefix: "/__MY_REMAPPED_PATH__" },
             RemapPathScope::Yes("debuginfo"),
+            None,
         );
 
         // packed-remapped-wrong-scope
@@ -1469,6 +1543,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Yes { remapped_prefix: "/__MY_REMAPPED_PATH__" },
             RemapPathScope::Yes("macro"),
+            None,
         );
 
         // packed-crosscrate-split
@@ -1481,6 +1556,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
         );
 
         // packed-crosscrate-single
@@ -1493,6 +1569,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
         );
 
         // unpacked-split
@@ -1505,6 +1582,20 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
+        );
+
+        // unpacked-split with split-dwarf-out-dir
+        shared_linux_other_tests::split_debuginfo(
+            CrossCrateTest::No,
+            UnstableOptions::Yes,
+            SplitDebuginfo::Unpacked,
+            DebuginfoLevel::Full,
+            SplitDwarfKind::Split,
+            LinkerPluginLto::Unspecified,
+            RemapPathPrefix::Unspecified,
+            RemapPathScope::Unspecified,
+            Some("other-dir"),
         );
 
         // unpacked-single
@@ -1517,6 +1608,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
         );
 
         // unpacked-lto-split
@@ -1529,6 +1621,7 @@ fn main() {
             LinkerPluginLto::Yes,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
         );
 
         // unpacked-lto-single
@@ -1541,6 +1634,7 @@ fn main() {
             LinkerPluginLto::Yes,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
         );
 
         // unpacked-remapped-split
@@ -1553,6 +1647,20 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Yes { remapped_prefix: "/__MY_REMAPPED_PATH__" },
             RemapPathScope::Unspecified,
+            None,
+        );
+
+        // unpacked-remapped-split with split-dwarf-out-dir
+        shared_linux_other_tests::split_debuginfo(
+            CrossCrateTest::No,
+            UnstableOptions::Yes,
+            SplitDebuginfo::Unpacked,
+            DebuginfoLevel::Full,
+            SplitDwarfKind::Split,
+            LinkerPluginLto::Unspecified,
+            RemapPathPrefix::Yes { remapped_prefix: "/__MY_REMAPPED_PATH__" },
+            RemapPathScope::Unspecified,
+            Some("other-dir"),
         );
 
         // unpacked-remapped-single
@@ -1565,6 +1673,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Yes { remapped_prefix: "/__MY_REMAPPED_PATH__" },
             RemapPathScope::Unspecified,
+            None,
         );
 
         // unpacked-remapped-scope
@@ -1577,6 +1686,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Yes { remapped_prefix: "/__MY_REMAPPED_PATH__" },
             RemapPathScope::Yes("debuginfo"),
+            None,
         );
 
         // unpacked-remapped-wrong-scope
@@ -1589,6 +1699,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Yes { remapped_prefix: "/__MY_REMAPPED_PATH__" },
             RemapPathScope::Yes("macro"),
+            None,
         );
 
         // unpacked-crosscrate-split
@@ -1601,6 +1712,20 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
+        );
+
+        // unpacked-crosscrate-split with split-dwarf-out-dir
+        shared_linux_other_tests::split_debuginfo(
+            CrossCrateTest::Yes,
+            UnstableOptions::Yes,
+            SplitDebuginfo::Unpacked,
+            DebuginfoLevel::Full,
+            SplitDwarfKind::Split,
+            LinkerPluginLto::Unspecified,
+            RemapPathPrefix::Unspecified,
+            RemapPathScope::Unspecified,
+            Some("other-dir"),
         );
 
         // unpacked-crosscrate-single
@@ -1613,6 +1738,7 @@ fn main() {
             LinkerPluginLto::Unspecified,
             RemapPathPrefix::Unspecified,
             RemapPathScope::Unspecified,
+            None,
         );
     }
 }
diff --git a/tests/rustdoc-gui/search-result-color.goml b/tests/rustdoc-gui/search-result-color.goml
index fe0f6401089..e5c11651bd2 100644
--- a/tests/rustdoc-gui/search-result-color.goml
+++ b/tests/rustdoc-gui/search-result-color.goml
@@ -5,7 +5,7 @@ include: "utils.goml"
 define-function: (
     "check-search-color",
     [
-        theme, count_color, desc_color, path_color, bottom_border_color, keyword_color,
+        theme, count_color, path_color, bottom_border_color, keyword_color,
         struct_color, associatedtype_color, tymethod_color, method_color, structfield_color,
         structfield_hover_color, macro_color, fn_color, hover_path_color, hover_background,
         attribute_color, grey
@@ -22,10 +22,6 @@ define-function: (
             ALL,
         )
         assert-css: (
-            "//*[@class='desc'][normalize-space()='Just a normal struct.']",
-            {"color": |desc_color|},
-        )
-        assert-css: (
             "//*[@class='result-name']//*[normalize-space()='test_docs::']",
             {"color": |path_color|},
         )
@@ -97,16 +93,6 @@ define-function: (
             ALL,
         )
 
-        // Checking color and background on hover.
-        move-cursor-to: "//*[@class='desc'][normalize-space()='Just a normal struct.']"
-        assert-css: (
-            "//*[@class='result-name']//*[normalize-space()='test_docs::']",
-            {"color": |hover_path_color|},
-        )
-        assert-css: (
-            "//*[@class='result-name']//*[normalize-space()='test_docs::']/ancestor::a",
-            {"color": |hover_path_color|, "background-color": |hover_background|},
-        )
     }
 )
 
@@ -157,7 +143,6 @@ show-text: true
 call-function: ("check-search-color", {
     "theme": "ayu",
     "count_color": "#888",
-    "desc_color": "#c5c5c5",
     "path_color": "#0096cf",
     "bottom_border_color": "#aaa3",
     "keyword_color": "#39afd7",
@@ -179,7 +164,6 @@ call-function: ("check-search-color", {
 call-function: ("check-search-color", {
     "theme": "dark",
     "count_color": "#888",
-    "desc_color": "#ddd",
     "path_color": "#ddd",
     "bottom_border_color": "#aaa3",
     "keyword_color": "#d2991d",
@@ -201,7 +185,6 @@ call-function: ("check-search-color", {
 call-function: ("check-search-color", {
     "theme": "light",
     "count_color": "#888",
-    "desc_color": "#000",
     "path_color": "#000",
     "bottom_border_color": "#aaa3",
     "keyword_color": "#3873ad",
@@ -226,12 +209,27 @@ call-function: ("perform-search", {"query": "thisisanalias"})
 
 define-function: (
     "check-alias",
-    [theme, alias, grey],
+    [theme, alias, grey, desc_color, hover_path_color, hover_background],
     block {
         call-function: ("switch-theme", {"theme": |theme|})
         // Checking that the colors for the alias element are the ones expected.
         assert-css: (".result-name .path .alias", {"color": |alias|})
         assert-css: (".result-name .path .alias > .grey", {"color": |grey|})
+        assert-css: (
+            "//*[@class='desc'][normalize-space()='Just a normal enum.']",
+            {"color": |desc_color|},
+        )
+        // Checking color and background on hover.
+        move-cursor-to: "//*[@class='desc'][normalize-space()='Just a normal enum.']"
+        assert-css: (
+            "//*[@class='result-name']//*[normalize-space()='test_docs::']",
+            {"color": |hover_path_color|},
+        )
+        assert-css: (
+            "//*[@class='result-name']//*[normalize-space()='test_docs::']/ancestor::a",
+            {"color": |hover_path_color|, "background-color": |hover_background|},
+        )
+
     },
 )
 
@@ -239,14 +237,23 @@ call-function: ("check-alias", {
     "theme": "ayu",
     "alias": "#c5c5c5",
     "grey": "#999",
+    "desc_color": "#c5c5c5",
+    "hover_path_color": "#fff",
+    "hover_background": "#3c3c3c",
 })
 call-function: ("check-alias", {
     "theme": "dark",
     "alias": "#fff",
     "grey": "#ccc",
+    "desc_color": "#ddd",
+    "hover_path_color": "#ddd",
+    "hover_background": "#616161",
 })
 call-function: ("check-alias", {
     "theme": "light",
     "alias": "#000",
     "grey": "#999",
+    "desc_color": "#000",
+    "hover_path_color": "#000",
+    "hover_background": "#ccc",
 })
diff --git a/tests/rustdoc-gui/search-tab.goml b/tests/rustdoc-gui/search-tab.goml
index 00ca952033d..0a3cfc231e5 100644
--- a/tests/rustdoc-gui/search-tab.goml
+++ b/tests/rustdoc-gui/search-tab.goml
@@ -79,7 +79,7 @@ call-function: ("check-colors", {
 set-window-size: (851, 600)
 
 // Check the size and count in tabs
-assert-text: ("#search-tabs > button:nth-child(1) > .count", " (27) ")
+assert-text: ("#search-tabs > button:nth-child(1) > .count", " (25) ")
 assert-text: ("#search-tabs > button:nth-child(2) > .count", " (7)  ")
 assert-text: ("#search-tabs > button:nth-child(3) > .count", " (0)  ")
 store-property: ("#search-tabs > button:nth-child(1)", {"offsetWidth": buttonWidth})
diff --git a/tests/rustdoc-gui/search-title.goml b/tests/rustdoc-gui/search-title.goml
index 83321a05f2b..5808ed845a3 100644
--- a/tests/rustdoc-gui/search-title.goml
+++ b/tests/rustdoc-gui/search-title.goml
@@ -20,3 +20,15 @@ assert-document-property: {"title": '"another one" Search - Rust'}
 press-key: "Escape"
 
 assert-document-property: {"title": |title|}
+
+// check that all.html does it correctly, too.
+go-to: "file://" + |DOC_PATH| + "/test_docs/all.html"
+assert-document-property: {"title": "List of all items in this crate"}
+call-function: ("perform-search", {"query": "verify"})
+assert-document-property: {"title": '"verify" Search - Rust'}
+
+// check that index.html does it correctly, too.
+go-to: "file://" + |DOC_PATH| + "/index.html"
+assert-document-property: {"title": "Index of crates"}
+call-function: ("perform-search", {"query": "verify"})
+assert-document-property: {"title": '"verify" Search - Rust'}
diff --git a/tests/rustdoc-gui/sidebar.goml b/tests/rustdoc-gui/sidebar.goml
index 5ec0008ad8a..0d371c8c6a4 100644
--- a/tests/rustdoc-gui/sidebar.goml
+++ b/tests/rustdoc-gui/sidebar.goml
@@ -1,5 +1,7 @@
 // Checks multiple things on the sidebar display (width of its elements, colors, etc).
 include: "utils.goml"
+// Disable animations so they don't mess up color assertions later.
+emulate-media-features: { "prefers-reduced-motion": "reduce" }
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 assert-property: (".sidebar", {"clientWidth": "199"})
 show-text: true
diff --git a/tests/rustdoc-gui/src/lib2/lib.rs b/tests/rustdoc-gui/src/lib2/lib.rs
index 8db754f91ce..400488cbe85 100644
--- a/tests/rustdoc-gui/src/lib2/lib.rs
+++ b/tests/rustdoc-gui/src/lib2/lib.rs
@@ -1,7 +1,6 @@
 // ignore-tidy-linelength
 
 #![feature(doc_cfg)]
-#![feature(doc_auto_cfg)]
 
 pub mod another_folder;
 pub mod another_mod;
diff --git a/tests/rustdoc-gui/src/test_docs/lib.rs b/tests/rustdoc-gui/src/test_docs/lib.rs
index 42f2fbd93b1..c0771583ab6 100644
--- a/tests/rustdoc-gui/src/test_docs/lib.rs
+++ b/tests/rustdoc-gui/src/test_docs/lib.rs
@@ -1,3 +1,4 @@
+//@ compile-flags: --enable-index-page -Z unstable-options
 //! The point of this crate is to be able to have enough different "kinds" of
 //! documentation generated so we can test each different features.
 #![doc(html_playground_url="https://play.rust-lang.org/")]
@@ -459,10 +460,10 @@ pub fn safe_fn() {}
 
 #[repr(C)]
 pub struct WithGenerics<T: TraitWithNoDocblocks, S = String, E = WhoLetTheDogOut, P = i8> {
-    s: S,
-    t: T,
-    e: E,
-    p: P,
+    pub s: S,
+    pub t: T,
+    pub e: E,
+    pub p: P,
 }
 
 pub struct StructWithPublicUndocumentedFields {
diff --git a/tests/rustdoc-js-std/asrawfd.js b/tests/rustdoc-js-std/asrawfd.js
index 5dbc4ba95d9..da08eeb8a53 100644
--- a/tests/rustdoc-js-std/asrawfd.js
+++ b/tests/rustdoc-js-std/asrawfd.js
@@ -1,12 +1,10 @@
 // ignore-order
 
 const EXPECTED = {
-    'query': 'RawFd::as_raw_fd',
+    'query': 'method:RawFd::as_raw_fd',
     'others': [
         // Reproduction test for https://github.com/rust-lang/rust/issues/78724
         // Validate that type alias methods get the correct path.
-        { 'path': 'std::os::fd::AsRawFd', 'name': 'as_raw_fd' },
-        { 'path': 'std::os::fd::AsRawFd', 'name': 'as_raw_fd' },
         { 'path': 'std::os::fd::RawFd', 'name': 'as_raw_fd' },
     ],
 };
diff --git a/tests/rustdoc-js-std/quoted.js b/tests/rustdoc-js-std/quoted.js
index 8a927501925..a8ca6521208 100644
--- a/tests/rustdoc-js-std/quoted.js
+++ b/tests/rustdoc-js-std/quoted.js
@@ -1,21 +1,21 @@
+// make sure quoted search works both for items and and without generics
 // ignore-order
 
 const FILTER_CRATE = 'std';
 
 const EXPECTED = {
-    'query': '"error"',
+    'query': '"result"',
     'others': [
-        { 'path': 'std', 'name': 'error' },
-        { 'path': 'std::fmt', 'name': 'Error' },
-        { 'path': 'std::io', 'name': 'Error' },
+        { 'path': 'std', 'name': 'result' },
+        { 'path': 'std::result', 'name': 'Result' },
+        { 'path': 'std::fmt', 'name': 'Result' },
     ],
     'in_args': [
-        { 'path': 'std::fmt::Error', 'name': 'eq' },
-        { 'path': 'std::fmt::Error', 'name': 'cmp' },
-        { 'path': 'std::fmt::Error', 'name': 'partial_cmp' },
-
+        { 'path': 'std::result::Result', 'name': 'branch' },
+        { 'path': 'std::result::Result', 'name': 'ok' },
+        { 'path': 'std::result::Result', 'name': 'unwrap' },
     ],
     'returned': [
-        { 'path': 'std::fmt::LowerExp', 'name': 'fmt' },
+        { 'path': 'std::bool', 'name': 'try_into' },
     ],
 };
diff --git a/tests/rustdoc-js-std/bufread-fill-buf.js b/tests/rustdoc-js-std/trait-unbox.js
index 6b9309f6864..44ddc0c1e75 100644
--- a/tests/rustdoc-js-std/bufread-fill-buf.js
+++ b/tests/rustdoc-js-std/trait-unbox.js
@@ -1,10 +1,10 @@
-// ignore-order
+// make sure type-based searches with traits get unboxed too
 
 const EXPECTED = [
     {
-        'query': 'bufread -> result<[u8]>',
+        'query': 'any -> result<box>',
         'others': [
-            { 'path': 'std::boxed::Box', 'name': 'fill_buf' },
+            { 'path': 'std::boxed::Box', 'name': 'downcast' },
         ],
     },
     {
diff --git a/tests/rustdoc-js/trait-methods.js b/tests/rustdoc-js/trait-methods.js
index dafad5e4378..083e52439f4 100644
--- a/tests/rustdoc-js/trait-methods.js
+++ b/tests/rustdoc-js/trait-methods.js
@@ -9,4 +9,24 @@ const EXPECTED = [
             { 'path': 'trait_methods::MyTrait', 'name': 'next' },
         ],
     },
+    // the traitParent deduplication pass should remove
+    // Empty::next, as it would be redundant
+    {
+        'query': 'next',
+        'correction': null,
+        'in_args': [],
+        'others': [
+            { 'path': 'trait_methods::MyTrait', 'name': 'next' },
+        ],
+    },
+    // if the trait does not match, no deduplication happens
+    {
+        'query': '-> option<()>',
+        'correction': null,
+        'in_args': [],
+        'others': [
+            { 'path': 'trait_methods::Empty', 'name': 'next' },
+                    { 'path': 'trait_methods::Void', 'name': 'next' },
+        ],
+    },
 ];
diff --git a/tests/rustdoc-js/trait-methods.rs b/tests/rustdoc-js/trait-methods.rs
index c88f5edfd55..a741b361a33 100644
--- a/tests/rustdoc-js/trait-methods.rs
+++ b/tests/rustdoc-js/trait-methods.rs
@@ -2,3 +2,21 @@ pub trait MyTrait {
     type Item;
     fn next(&mut self) -> Option<Self::Item>;
 }
+
+pub struct Empty;
+
+impl MyTrait for Empty {
+    type Item = ();
+    fn next(&mut self) -> Option<()> {
+        None
+    }
+}
+
+pub struct Void;
+
+impl MyTrait for Void {
+    type Item = ();
+    fn next(&mut self) -> Option<()> {
+        Some(())
+    }
+}
diff --git a/tests/rustdoc-ui/cfg-hide-show-conflict.rs b/tests/rustdoc-ui/cfg-hide-show-conflict.rs
new file mode 100644
index 00000000000..8e98b95c85b
--- /dev/null
+++ b/tests/rustdoc-ui/cfg-hide-show-conflict.rs
@@ -0,0 +1,3 @@
+#![feature(doc_cfg)]
+#![doc(auto_cfg(hide(target_os = "linux")))]
+#![doc(auto_cfg(show(windows, target_os = "linux")))] //~ ERROR
diff --git a/tests/rustdoc-ui/cfg-hide-show-conflict.stderr b/tests/rustdoc-ui/cfg-hide-show-conflict.stderr
new file mode 100644
index 00000000000..22231e82cd7
--- /dev/null
+++ b/tests/rustdoc-ui/cfg-hide-show-conflict.stderr
@@ -0,0 +1,14 @@
+error: same `cfg` was in `auto_cfg(hide(...))` and `auto_cfg(show(...))` on the same item
+  --> $DIR/cfg-hide-show-conflict.rs:3:31
+   |
+LL | #![doc(auto_cfg(show(windows, target_os = "linux")))]
+   |                               ^^^^^^^^^^^^^^^^^^^
+   |
+note: first change was here
+  --> $DIR/cfg-hide-show-conflict.rs:2:22
+   |
+LL | #![doc(auto_cfg(hide(target_os = "linux")))]
+   |                      ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/rustdoc-ui/doc-cfg.rs b/tests/rustdoc-ui/doc-cfg.rs
index 14943bbc341..d72643e2355 100644
--- a/tests/rustdoc-ui/doc-cfg.rs
+++ b/tests/rustdoc-ui/doc-cfg.rs
@@ -8,4 +8,15 @@
 //~^^ WARN unexpected `cfg` condition name: `bar`
 #[doc(cfg())] //~ ERROR
 #[doc(cfg(foo, bar))] //~ ERROR
+#[doc(auto_cfg(42))] //~ ERROR
+#[doc(auto_cfg(hide(true)))] //~ ERROR
+#[doc(auto_cfg(hide(42)))] //~ ERROR
+#[doc(auto_cfg(hide("a")))] //~ ERROR
+#[doc(auto_cfg(hide(foo::bar)))] //~ ERROR
+#[doc(auto_cfg = 42)] //~ ERROR
+#[doc(auto_cfg = "a")] //~ ERROR
+// Shouldn't lint
+#[doc(auto_cfg(hide(windows)))]
+#[doc(auto_cfg(hide(feature = "windows")))]
+#[doc(auto_cfg(hide(foo)))]
 pub fn foo() {}
diff --git a/tests/rustdoc-ui/doc-cfg.stderr b/tests/rustdoc-ui/doc-cfg.stderr
index 1233ee010de..49e8c324fac 100644
--- a/tests/rustdoc-ui/doc-cfg.stderr
+++ b/tests/rustdoc-ui/doc-cfg.stderr
@@ -1,26 +1,46 @@
-error: `cfg` predicate is not specified
-  --> $DIR/doc-cfg.rs:3:7
+error: only `hide` or `show` are allowed in `#[doc(auto_cfg(...))]`
+  --> $DIR/doc-cfg.rs:11:7
    |
-LL | #[doc(cfg(), cfg(foo, bar))]
-   |       ^^^^^ help: expected syntax is: `cfg(/* predicate */)`
+LL | #[doc(auto_cfg(42))]
+   |       ^^^^^^^^^^^^
+   |
+   = note: `#[deny(invalid_doc_attributes)]` on by default
 
-error: multiple `cfg` predicates are specified
-  --> $DIR/doc-cfg.rs:3:23
+error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items
+  --> $DIR/doc-cfg.rs:12:21
    |
-LL | #[doc(cfg(), cfg(foo, bar))]
-   |                       ^^^
+LL | #[doc(auto_cfg(hide(true)))]
+   |                     ^^^^
 
-error: `cfg` predicate is not specified
-  --> $DIR/doc-cfg.rs:9:7
+error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items
+  --> $DIR/doc-cfg.rs:13:21
    |
-LL | #[doc(cfg())]
-   |       ^^^^^ help: expected syntax is: `cfg(/* predicate */)`
+LL | #[doc(auto_cfg(hide(42)))]
+   |                     ^^
 
-error: multiple `cfg` predicates are specified
-  --> $DIR/doc-cfg.rs:10:16
+error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items
+  --> $DIR/doc-cfg.rs:14:21
    |
-LL | #[doc(cfg(foo, bar))]
-   |                ^^^
+LL | #[doc(auto_cfg(hide("a")))]
+   |                     ^^^
+
+error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items
+  --> $DIR/doc-cfg.rs:15:21
+   |
+LL | #[doc(auto_cfg(hide(foo::bar)))]
+   |                     ^^^^^^^^
+
+error: expected boolean for `#[doc(auto_cfg = ...)]`
+  --> $DIR/doc-cfg.rs:16:7
+   |
+LL | #[doc(auto_cfg = 42)]
+   |       ^^^^^^^^^^^^^
+
+error: expected boolean for `#[doc(auto_cfg = ...)]`
+  --> $DIR/doc-cfg.rs:17:7
+   |
+LL | #[doc(auto_cfg = "a")]
+   |       ^^^^^^^^^^^^^^
 
 warning: unexpected `cfg` condition name: `foo`
   --> $DIR/doc-cfg.rs:6:11
@@ -42,5 +62,29 @@ LL | #[doc(cfg(foo), cfg(bar))]
    = help: to expect this configuration use `--check-cfg=cfg(bar)`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 
-error: aborting due to 4 previous errors; 2 warnings emitted
+error: `cfg` predicate is not specified
+  --> $DIR/doc-cfg.rs:3:7
+   |
+LL | #[doc(cfg(), cfg(foo, bar))]
+   |       ^^^^^ help: expected syntax is: `cfg(/* predicate */)`
+
+error: multiple `cfg` predicates are specified
+  --> $DIR/doc-cfg.rs:3:23
+   |
+LL | #[doc(cfg(), cfg(foo, bar))]
+   |                       ^^^
+
+error: `cfg` predicate is not specified
+  --> $DIR/doc-cfg.rs:9:7
+   |
+LL | #[doc(cfg())]
+   |       ^^^^^ help: expected syntax is: `cfg(/* predicate */)`
+
+error: multiple `cfg` predicates are specified
+  --> $DIR/doc-cfg.rs:10:16
+   |
+LL | #[doc(cfg(foo, bar))]
+   |                ^^^
+
+error: aborting due to 11 previous errors; 2 warnings emitted
 
diff --git a/tests/rustdoc-ui/doctest/doctest-output.edition2015.stdout b/tests/rustdoc-ui/doctest/doctest-output.edition2015.stdout
index 0e2e30390ad..2ff7174577e 100644
--- a/tests/rustdoc-ui/doctest/doctest-output.edition2015.stdout
+++ b/tests/rustdoc-ui/doctest/doctest-output.edition2015.stdout
@@ -1,8 +1,8 @@
 
 running 3 tests
-test $DIR/doctest-output.rs - (line 12) ... ok
-test $DIR/doctest-output.rs - ExpandedStruct (line 28) ... ok
-test $DIR/doctest-output.rs - foo::bar (line 22) ... ok
+test $DIR/doctest-output.rs - (line 14) ... ok
+test $DIR/doctest-output.rs - ExpandedStruct (line 30) ... ok
+test $DIR/doctest-output.rs - foo::bar (line 24) ... ok
 
 test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
 
diff --git a/tests/rustdoc-ui/doctest/doctest-output.edition2024.stdout b/tests/rustdoc-ui/doctest/doctest-output.edition2024.stdout
index 0e2e30390ad..20bfd7e7086 100644
--- a/tests/rustdoc-ui/doctest/doctest-output.edition2024.stdout
+++ b/tests/rustdoc-ui/doctest/doctest-output.edition2024.stdout
@@ -1,8 +1,9 @@
 
 running 3 tests
-test $DIR/doctest-output.rs - (line 12) ... ok
-test $DIR/doctest-output.rs - ExpandedStruct (line 28) ... ok
-test $DIR/doctest-output.rs - foo::bar (line 22) ... ok
+test $DIR/doctest-output.rs - (line 14) ... ok
+test $DIR/doctest-output.rs - ExpandedStruct (line 30) ... ok
+test $DIR/doctest-output.rs - foo::bar (line 24) ... ok
 
 test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
 
+all doctests ran in $TIME; merged doctests compilation took $TIME
diff --git a/tests/rustdoc-ui/doctest/doctest-output.rs b/tests/rustdoc-ui/doctest/doctest-output.rs
index 04bd1813b4c..943f59e8b15 100644
--- a/tests/rustdoc-ui/doctest/doctest-output.rs
+++ b/tests/rustdoc-ui/doctest/doctest-output.rs
@@ -7,6 +7,8 @@
 //@[edition2024]compile-flags:--test --test-args=--test-threads=1
 //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
 //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
+//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME"
+//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME"
 //@ check-pass
 
 //! ```
diff --git a/tests/rustdoc-ui/doctest/merged-ignore-no_run.rs b/tests/rustdoc-ui/doctest/merged-ignore-no_run.rs
index 7dac64e6de4..f92bea74bfe 100644
--- a/tests/rustdoc-ui/doctest/merged-ignore-no_run.rs
+++ b/tests/rustdoc-ui/doctest/merged-ignore-no_run.rs
@@ -2,6 +2,8 @@
 //@ compile-flags:--test --test-args=--test-threads=1
 //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
 //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
+//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME"
+//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME"
 //@ check-pass
 
 /// ```ignore (test)
diff --git a/tests/rustdoc-ui/doctest/merged-ignore-no_run.stdout b/tests/rustdoc-ui/doctest/merged-ignore-no_run.stdout
index a32da0aeb96..6714cdb0b80 100644
--- a/tests/rustdoc-ui/doctest/merged-ignore-no_run.stdout
+++ b/tests/rustdoc-ui/doctest/merged-ignore-no_run.stdout
@@ -1,7 +1,8 @@
 
 running 2 tests
-test $DIR/merged-ignore-no_run.rs - ignored (line 7) ... ignored
-test $DIR/merged-ignore-no_run.rs - no_run (line 12) - compile ... ok
+test $DIR/merged-ignore-no_run.rs - ignored (line 9) ... ignored
+test $DIR/merged-ignore-no_run.rs - no_run (line 14) - compile ... ok
 
 test result: ok. 1 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in $TIME
 
+all doctests ran in $TIME; merged doctests compilation took $TIME
diff --git a/tests/rustdoc-ui/feature-gate-doc_cfg.rs b/tests/rustdoc-ui/feature-gate-doc_cfg.rs
new file mode 100644
index 00000000000..b474a1524bc
--- /dev/null
+++ b/tests/rustdoc-ui/feature-gate-doc_cfg.rs
@@ -0,0 +1,6 @@
+#![doc(auto_cfg)] //~ ERROR
+#![doc(auto_cfg(false))] //~ ERROR
+#![doc(auto_cfg(true))] //~ ERROR
+#![doc(auto_cfg(hide(feature = "solecism")))] //~ ERROR
+#![doc(auto_cfg(show(feature = "bla")))] //~ ERROR
+#![doc(cfg(feature = "solecism"))] //~ ERROR
diff --git a/tests/rustdoc-ui/feature-gate-doc_cfg.stderr b/tests/rustdoc-ui/feature-gate-doc_cfg.stderr
new file mode 100644
index 00000000000..68a86c1abb7
--- /dev/null
+++ b/tests/rustdoc-ui/feature-gate-doc_cfg.stderr
@@ -0,0 +1,63 @@
+error[E0658]: `#[doc(auto_cfg)]` is experimental
+  --> $DIR/feature-gate-doc_cfg.rs:1:1
+   |
+LL | #![doc(auto_cfg)]
+   | ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #43781 <https://github.com/rust-lang/rust/issues/43781> for more information
+   = help: add `#![feature(doc_cfg)]` 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]: `#[doc(auto_cfg)]` is experimental
+  --> $DIR/feature-gate-doc_cfg.rs:2:1
+   |
+LL | #![doc(auto_cfg(false))]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #43781 <https://github.com/rust-lang/rust/issues/43781> for more information
+   = help: add `#![feature(doc_cfg)]` 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]: `#[doc(auto_cfg)]` is experimental
+  --> $DIR/feature-gate-doc_cfg.rs:3:1
+   |
+LL | #![doc(auto_cfg(true))]
+   | ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #43781 <https://github.com/rust-lang/rust/issues/43781> for more information
+   = help: add `#![feature(doc_cfg)]` 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]: `#[doc(auto_cfg)]` is experimental
+  --> $DIR/feature-gate-doc_cfg.rs:4:1
+   |
+LL | #![doc(auto_cfg(hide(feature = "solecism")))]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #43781 <https://github.com/rust-lang/rust/issues/43781> for more information
+   = help: add `#![feature(doc_cfg)]` 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]: `#[doc(auto_cfg)]` is experimental
+  --> $DIR/feature-gate-doc_cfg.rs:5:1
+   |
+LL | #![doc(auto_cfg(show(feature = "bla")))]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #43781 <https://github.com/rust-lang/rust/issues/43781> for more information
+   = help: add `#![feature(doc_cfg)]` 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]: `#[doc(cfg)]` is experimental
+  --> $DIR/feature-gate-doc_cfg.rs:6:1
+   |
+LL | #![doc(cfg(feature = "solecism"))]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #43781 <https://github.com/rust-lang/rust/issues/43781> for more information
+   = help: add `#![feature(doc_cfg)]` 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
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/rustdoc-ui/feature-gate-doc_cfg_hide.rs b/tests/rustdoc-ui/feature-gate-doc_cfg_hide.rs
deleted file mode 100644
index 17812018b9b..00000000000
--- a/tests/rustdoc-ui/feature-gate-doc_cfg_hide.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-#![doc(cfg_hide(test))]
-//~^ ERROR `#[doc(cfg_hide)]` is experimental
-
-#[cfg(not(test))]
-pub fn public_fn() {}
-#[cfg(test)]
-pub fn internal_use_only() {}
diff --git a/tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr b/tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr
deleted file mode 100644
index 55135986ffe..00000000000
--- a/tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0658]: `#[doc(cfg_hide)]` is experimental
-  --> $DIR/feature-gate-doc_cfg_hide.rs:1:1
-   |
-LL | #![doc(cfg_hide(test))]
-   | ^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #43781 <https://github.com/rust-lang/rust/issues/43781> for more information
-   = help: add `#![feature(doc_cfg_hide)]` 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/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.rs b/tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.rs
new file mode 100644
index 00000000000..c4527c626d9
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.rs
@@ -0,0 +1,21 @@
+// Ensure that no warning is emitted if the disambiguator is used for type alias.
+// Regression test for <https://github.com/rust-lang/rust/issues/146855>.
+
+#![deny(rustdoc::broken_intra_doc_links)]
+
+pub struct Foo;
+
+#[allow(non_camel_case_types)]
+pub type f32 = Foo;
+
+/// This function returns [`f32`].
+//~^ ERROR: `f32` is both a type alias and a primitive type
+//~| HELP: to link to the type alias, prefix with `tyalias@`
+//~| HELP: to link to the primitive type, prefix with `prim@`
+pub fn my_fn() -> f32 {}
+
+/// This function returns [type@f32].
+//~^ ERROR: `f32` is both a type alias and a primitive type
+//~| HELP: to link to the type alias, prefix with `tyalias@`
+//~| HELP: to link to the primitive type, prefix with `prim@`
+pub fn my_fn2() -> f32 {}
diff --git a/tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.stderr b/tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.stderr
new file mode 100644
index 00000000000..c99e7d1d104
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/type-alias-primitive-suggestion.stderr
@@ -0,0 +1,39 @@
+error: `f32` is both a type alias and a primitive type
+  --> $DIR/type-alias-primitive-suggestion.rs:11:29
+   |
+LL | /// This function returns [`f32`].
+   |                             ^^^ ambiguous link
+   |
+note: the lint level is defined here
+  --> $DIR/type-alias-primitive-suggestion.rs:4:9
+   |
+LL | #![deny(rustdoc::broken_intra_doc_links)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: to link to the type alias, prefix with `tyalias@`
+   |
+LL | /// This function returns [`tyalias@f32`].
+   |                             ++++++++
+help: to link to the primitive type, prefix with `prim@`
+   |
+LL | /// This function returns [`prim@f32`].
+   |                             +++++
+
+error: `f32` is both a type alias and a primitive type
+  --> $DIR/type-alias-primitive-suggestion.rs:17:28
+   |
+LL | /// This function returns [type@f32].
+   |                            ^^^^^^^^ ambiguous link
+   |
+help: to link to the type alias, prefix with `tyalias@`
+   |
+LL - /// This function returns [type@f32].
+LL + /// This function returns [tyalias@f32].
+   |
+help: to link to the primitive type, prefix with `prim@`
+   |
+LL - /// This function returns [type@f32].
+LL + /// This function returns [prim@f32].
+   |
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/rustdoc-ui/intra-doc/type-alias-primitive.rs b/tests/rustdoc-ui/intra-doc/type-alias-primitive.rs
new file mode 100644
index 00000000000..62b2c83eeca
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/type-alias-primitive.rs
@@ -0,0 +1,14 @@
+// Ensure that no warning is emitted if the disambiguator is used for type alias.
+// Regression test for <https://github.com/rust-lang/rust/issues/146855>.
+
+//@ check-pass
+
+#![deny(rustdoc::broken_intra_doc_links)]
+
+pub struct Foo;
+
+#[allow(non_camel_case_types)]
+pub type f32 = Foo;
+
+/// This function returns [`tyalias@f32`] and not [`prim@f32`].
+pub fn my_fn() -> f32 {}
diff --git a/tests/rustdoc-ui/invalid-cfg.rs b/tests/rustdoc-ui/invalid-cfg.rs
index d237b8605c0..aff36286c53 100644
--- a/tests/rustdoc-ui/invalid-cfg.rs
+++ b/tests/rustdoc-ui/invalid-cfg.rs
@@ -1,4 +1,4 @@
 #![feature(doc_cfg)]
 #[doc(cfg = "x")] //~ ERROR not followed by parentheses
 #[doc(cfg(x, y))] //~ ERROR multiple `cfg` predicates
-struct S {}
+pub struct S {}
diff --git a/tests/rustdoc-ui/issues/issue-91713.stdout b/tests/rustdoc-ui/issues/issue-91713.stdout
index 30aadfe89f4..d34714be6c9 100644
--- a/tests/rustdoc-ui/issues/issue-91713.stdout
+++ b/tests/rustdoc-ui/issues/issue-91713.stdout
@@ -1,11 +1,11 @@
 Available passes for running rustdoc:
        check-doc-cfg - checks `#[doc(cfg(...))]` for stability feature and unexpected cfgs
 check_doc_test_visibility - run various visibility-related lints on doctests
+   propagate-doc-cfg - propagates `#[doc(cfg(...))]` to child items
 strip-aliased-non-local - strips all non-local private aliased items from the output
         strip-hidden - strips all `#[doc(hidden)]` items from the output
        strip-private - strips all private items from a crate which cannot be seen externally, implies strip-priv-imports
   strip-priv-imports - strips all private import statements (`use`, `extern crate`) from a crate
-   propagate-doc-cfg - propagates `#[doc(cfg(...))]` to child items
  propagate-stability - propagates stability to child items
 collect-intra-doc-links - resolves intra-doc links
  collect-trait-impls - retrieves trait impls for items in the crate
@@ -16,11 +16,11 @@ Default passes for rustdoc:
  collect-trait-impls
 check_doc_test_visibility
        check-doc-cfg
+collect-intra-doc-links
 strip-aliased-non-local
         strip-hidden  (when not --document-hidden-items)
        strip-private  (when not --document-private-items)
   strip-priv-imports  (when --document-private-items)
-collect-intra-doc-links
    propagate-doc-cfg
  propagate-stability
            run-lints
diff --git a/tests/rustdoc-ui/lints/doc_cfg_hide.rs b/tests/rustdoc-ui/lints/doc_cfg_hide.rs
index 9a8bce2a92a..397b21393e5 100644
--- a/tests/rustdoc-ui/lints/doc_cfg_hide.rs
+++ b/tests/rustdoc-ui/lints/doc_cfg_hide.rs
@@ -1,7 +1,4 @@
-#![feature(doc_cfg_hide)]
-
-#![doc(cfg_hide = "test")] //~ ERROR
-#![doc(cfg_hide)] //~ ERROR
-
-#[doc(cfg_hide(doc))] //~ ERROR
-pub fn foo() {}
+#![feature(doc_cfg)]
+#![doc(auto_cfg(hide = "test"))] //~ ERROR
+#![doc(auto_cfg(hide))] //~ ERROR
+#![doc(auto_cfg(hide(not(windows))))] //~ ERROR
diff --git a/tests/rustdoc-ui/lints/doc_cfg_hide.stderr b/tests/rustdoc-ui/lints/doc_cfg_hide.stderr
index 0c9d0879b0a..c63c8d607fa 100644
--- a/tests/rustdoc-ui/lints/doc_cfg_hide.stderr
+++ b/tests/rustdoc-ui/lints/doc_cfg_hide.stderr
@@ -1,27 +1,22 @@
-error: this attribute can only be applied at the crate level
-  --> $DIR/doc_cfg_hide.rs:6:7
+error: `#![doc(auto_cfg(hide(...)))]` expects a list of items
+  --> $DIR/doc_cfg_hide.rs:2:8
    |
-LL | #[doc(cfg_hide(doc))]
-   |       ^^^^^^^^^^^^^
+LL | #![doc(auto_cfg(hide = "test"))]
+   |        ^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
    = note: `#[deny(invalid_doc_attributes)]` on by default
-help: to apply to the crate, use an inner attribute
-   |
-LL | #![doc(cfg_hide(doc))]
-   |  +
 
-error: `#[doc(cfg_hide(...))]` takes a list of attributes
+error: `#![doc(auto_cfg(hide(...)))]` expects a list of items
   --> $DIR/doc_cfg_hide.rs:3:8
    |
-LL | #![doc(cfg_hide = "test")]
-   |        ^^^^^^^^^^^^^^^^^
+LL | #![doc(auto_cfg(hide))]
+   |        ^^^^^^^^^^^^^^
 
-error: `#[doc(cfg_hide(...))]` takes a list of attributes
-  --> $DIR/doc_cfg_hide.rs:4:8
+error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items
+  --> $DIR/doc_cfg_hide.rs:4:22
    |
-LL | #![doc(cfg_hide)]
-   |        ^^^^^^^^
+LL | #![doc(auto_cfg(hide(not(windows))))]
+   |                      ^^^^^^^^^^^^
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/rustdoc-ui/lints/invalid-html-tags-ice-146890.rs b/tests/rustdoc-ui/lints/invalid-html-tags-ice-146890.rs
new file mode 100644
index 00000000000..d7efc201e7e
--- /dev/null
+++ b/tests/rustdoc-ui/lints/invalid-html-tags-ice-146890.rs
@@ -0,0 +1,25 @@
+// this test ensures that bad HTML with multiline tags doesn't cause an ICE
+// regression test for https://github.com/rust-lang/rust/issues/146890
+#[deny(rustdoc::invalid_html_tags)]
+
+/// <TABLE
+/// BORDER>
+/// <TR
+/// >
+/// <TH
+//~^ ERROR: unclosed HTML tag `TH`
+/// >key
+/// </TD
+//~^ ERROR: unopened HTML tag `TD`
+/// >
+/// <TH
+//~^ ERROR: unclosed HTML tag `TH`
+/// >value
+/// </TD
+//~^ ERROR: unopened HTML tag `TD`
+/// >
+/// </TR
+/// >
+/// </TABLE
+/// >
+pub fn foo() {}
diff --git a/tests/rustdoc-ui/lints/invalid-html-tags-ice-146890.stderr b/tests/rustdoc-ui/lints/invalid-html-tags-ice-146890.stderr
new file mode 100644
index 00000000000..64a82b3a952
--- /dev/null
+++ b/tests/rustdoc-ui/lints/invalid-html-tags-ice-146890.stderr
@@ -0,0 +1,38 @@
+error: unopened HTML tag `TD`
+  --> $DIR/invalid-html-tags-ice-146890.rs:12:5
+   |
+LL |   /// </TD
+   |  _____^
+LL | |
+LL | | /// >
+   | |_____^
+   |
+note: the lint level is defined here
+  --> $DIR/invalid-html-tags-ice-146890.rs:3:8
+   |
+LL | #[deny(rustdoc::invalid_html_tags)]
+   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: unopened HTML tag `TD`
+  --> $DIR/invalid-html-tags-ice-146890.rs:18:5
+   |
+LL |   /// </TD
+   |  _____^
+LL | |
+LL | | /// >
+   | |_____^
+
+error: unclosed HTML tag `TH`
+  --> $DIR/invalid-html-tags-ice-146890.rs:9:5
+   |
+LL | /// <TH
+   |     ^^^
+
+error: unclosed HTML tag `TH`
+  --> $DIR/invalid-html-tags-ice-146890.rs:15:5
+   |
+LL | /// <TH
+   |     ^^^
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/rustdoc/attribute-rendering.rs b/tests/rustdoc/attribute-rendering.rs
deleted file mode 100644
index fb40d0a9887..00000000000
--- a/tests/rustdoc/attribute-rendering.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![crate_name = "foo"]
-
-//@ has 'foo/fn.f.html'
-//@ has - //*[@'class="code-attribute"]' '#[unsafe(export_name = "f")]'
-//@ has - //*[@'class="rust item-decl"]' 'pub fn f()'
-#[unsafe(export_name = "\
-f")]
-pub fn f() {}
diff --git a/tests/rustdoc/attributes.rs b/tests/rustdoc/attributes.rs
index 33e4e31bec6..429a42a7252 100644
--- a/tests/rustdoc/attributes.rs
+++ b/tests/rustdoc/attributes.rs
@@ -9,6 +9,18 @@ pub extern "C" fn f() {}
 #[unsafe(export_name = "bar")]
 pub extern "C" fn g() {}
 
+//@ has foo/fn.escape_special.html '//*[@class="code-attribute"]' \
+//                                 '#[unsafe(export_name = "\n\"\n")]'
+#[unsafe(export_name = "\n\"
+")]
+pub extern "C" fn escape_special() {}
+
+// issue: <https://github.com/rust-lang/rust/issues/142835>
+//@ has foo/fn.escape_html.html '//*[@class="code-attribute"]' \
+//                              '#[unsafe(export_name = "<script>alert()</script>")]'
+#[unsafe(export_name = "<script>alert()</script>")]
+pub extern "C" fn escape_html() {}
+
 //@ has foo/fn.example.html '//*[@class="code-attribute"]' '#[unsafe(link_section = ".text")]'
 #[unsafe(link_section = ".text")]
 pub extern "C" fn example() {}
diff --git a/tests/rustdoc/auxiliary/ext-repr.rs b/tests/rustdoc/auxiliary/ext-repr.rs
new file mode 100644
index 00000000000..25acaa49449
--- /dev/null
+++ b/tests/rustdoc/auxiliary/ext-repr.rs
@@ -0,0 +1,5 @@
+#[repr(i8)]
+pub enum ReprI8 {
+    Var0,
+    Var1,
+}
diff --git a/tests/rustdoc/doc-auto-cfg-public-in-private.rs b/tests/rustdoc/doc-auto-cfg-public-in-private.rs
new file mode 100644
index 00000000000..b78e3f1b932
--- /dev/null
+++ b/tests/rustdoc/doc-auto-cfg-public-in-private.rs
@@ -0,0 +1,16 @@
+// This test ensures that even though private items are removed from generated docs,
+// their `cfg`s will still impact their child items.
+
+#![feature(doc_cfg)]
+#![crate_name = "foo"]
+
+pub struct X;
+
+#[cfg(not(feature = "blob"))]
+fn foo() {
+    impl X {
+        //@ has 'foo/struct.X.html'
+        //@ has - '//*[@class="stab portability"]' 'Available on non-crate feature blob only.'
+        pub fn bar() {}
+    }
+}
diff --git a/tests/rustdoc/doc-auto-cfg.rs b/tests/rustdoc/doc-auto-cfg.rs
index b3fe8922fd7..e56cf18d08a 100644
--- a/tests/rustdoc/doc-auto-cfg.rs
+++ b/tests/rustdoc/doc-auto-cfg.rs
@@ -1,4 +1,4 @@
-#![feature(doc_auto_cfg)]
+#![feature(doc_cfg)]
 #![crate_name = "foo"]
 
 //@ has foo/fn.foo.html
diff --git a/tests/rustdoc/doc-cfg/doc-cfg-hide.rs b/tests/rustdoc/doc-cfg/doc-cfg-hide.rs
index ceb1f99fae0..e919206d3a4 100644
--- a/tests/rustdoc/doc-cfg/doc-cfg-hide.rs
+++ b/tests/rustdoc/doc-cfg/doc-cfg-hide.rs
@@ -1,7 +1,7 @@
 #![crate_name = "oud"]
-#![feature(doc_auto_cfg, doc_cfg, doc_cfg_hide)]
+#![feature(doc_cfg)]
 
-#![doc(cfg_hide(feature = "solecism"))]
+#![doc(auto_cfg(hide(feature = "solecism")))]
 
 //@ has 'oud/struct.Solecism.html'
 //@ count   - '//*[@class="stab portability"]' 0
@@ -18,7 +18,7 @@ pub struct Scribacious;
 
 //@ has 'oud/struct.Hyperdulia.html'
 //@ count   - '//*[@class="stab portability"]' 1
-//@ matches - '//*[@class="stab portability"]' 'crate feature hyperdulia'
+//@ matches - '//*[@class="stab portability"]' 'crate features hyperdulia only'
 //@ compile-flags:--cfg feature="hyperdulia"
 #[cfg(feature = "solecism")]
 #[cfg(feature = "hyperdulia")]
@@ -26,7 +26,7 @@ pub struct Hyperdulia;
 
 //@ has 'oud/struct.Oystercatcher.html'
 //@ count   - '//*[@class="stab portability"]' 1
-//@ matches - '//*[@class="stab portability"]' 'crate feature oystercatcher only'
+//@ matches - '//*[@class="stab portability"]' 'crate features oystercatcher only'
 //@ compile-flags:--cfg feature="oystercatcher"
 #[cfg(all(feature = "solecism", feature = "oystercatcher"))]
 pub struct Oystercatcher;
diff --git a/tests/rustdoc/doc-cfg/doc-cfg-implicit-gate.rs b/tests/rustdoc/doc-cfg/doc-cfg-implicit-gate.rs
index b5b8d0f427b..9ae8b8fca4f 100644
--- a/tests/rustdoc/doc-cfg/doc-cfg-implicit-gate.rs
+++ b/tests/rustdoc/doc-cfg/doc-cfg-implicit-gate.rs
@@ -1,7 +1,8 @@
 //@ compile-flags:--cfg feature="worricow"
+#![feature(doc_cfg)]
 #![crate_name = "xenogenous"]
 
 //@ has 'xenogenous/struct.Worricow.html'
-//@ count   - '//*[@class="stab portability"]' 0
+//@ count   - '//*[@class="stab portability"]' 1
 #[cfg(feature = "worricow")]
 pub struct Worricow;
diff --git a/tests/rustdoc/doc-cfg/doc-cfg-implicit.rs b/tests/rustdoc/doc-cfg/doc-cfg-implicit.rs
index 69b10867ee3..c092675ee5c 100644
--- a/tests/rustdoc/doc-cfg/doc-cfg-implicit.rs
+++ b/tests/rustdoc/doc-cfg/doc-cfg-implicit.rs
@@ -1,5 +1,5 @@
 #![crate_name = "funambulism"]
-#![feature(doc_auto_cfg, doc_cfg)]
+#![feature(doc_cfg)]
 
 //@ has 'funambulism/struct.Disorbed.html'
 //@ count   - '//*[@class="stab portability"]' 1
diff --git a/tests/rustdoc/doc_auto_cfg.rs b/tests/rustdoc/doc_auto_cfg.rs
new file mode 100644
index 00000000000..19ef174c177
--- /dev/null
+++ b/tests/rustdoc/doc_auto_cfg.rs
@@ -0,0 +1,77 @@
+// Test covering RFC 3631 features.
+
+#![crate_name = "foo"]
+#![feature(doc_cfg)]
+#![doc(auto_cfg(hide(feature = "hidden")))]
+
+//@ has 'foo/index.html'
+//@ !has - '//*[@class="stab portability"]' 'Non-moustache'
+//@ has - '//*[@class="stab portability"]' 'Non-pistache'
+//@ count - '//*[@class="stab portability"]' 1
+
+//@ has 'foo/m/index.html'
+//@ count - '//*[@title="Available on non-crate feature `hidden` only"]' 2
+#[cfg(not(feature = "hidden"))]
+pub mod m {
+    //@ count 'foo/m/struct.A.html' '//*[@class="stab portability"]' 0
+    pub struct A;
+
+    //@ has 'foo/m/inner/index.html' '//*[@class="stab portability"]' 'Available on non-crate feature hidden only.'
+    #[doc(auto_cfg(show(feature = "hidden")))]
+    pub mod inner {
+        //@ has 'foo/m/inner/struct.B.html' '//*[@class="stab portability"]' 'Available on non-crate feature hidden only.'
+        pub struct B;
+
+        //@ count 'foo/m/inner/struct.A.html' '//*[@class="stab portability"]' 0
+        #[doc(auto_cfg(hide(feature = "hidden")))]
+        pub struct A;
+    }
+
+    //@ has 'foo/m/struct.B.html' '//*[@class="stab portability"]' 'Available on non-crate feature hidden only.'
+    #[doc(auto_cfg(show(feature = "hidden")))]
+    pub struct B;
+}
+
+//@ count 'foo/n/index.html' '//*[@title="Available on non-crate feature `moustache` only"]' 3
+//@ count - '//dl/dt' 4
+#[cfg(not(feature = "moustache"))]
+#[doc(auto_cfg = false)]
+pub mod n {
+    // Should not have `moustache` listed.
+    //@ count 'foo/n/struct.X.html' '//*[@class="stab portability"]' 0
+    pub struct X;
+
+    // Should re-enable `auto_cfg` and make `moustache` listed.
+    //@ has 'foo/n/struct.Y.html' '//*[@class="stab portability"]' \
+    //  'Available on non-crate feature moustache only.'
+    #[doc(auto_cfg)]
+    pub struct Y;
+
+    // Should re-enable `auto_cfg` and make `moustache` listed for itself
+    // and for `Y`.
+    //@ has 'foo/n/inner/index.html' '//*[@class="stab portability"]' \
+    //  'Available on non-crate feature moustache only.'
+    #[doc(auto_cfg = true)]
+    pub mod inner {
+        //@ has 'foo/n/inner/struct.Y.html' '//*[@class="stab portability"]' \
+        //  'Available on non-crate feature moustache only.'
+        pub struct Y;
+    }
+
+    // Should re-enable `auto_cfg` and make `moustache` listed.
+    //@ has 'foo/n/struct.Z.html' '//*[@class="stab portability"]' \
+    //  'Available on non-crate feature moustache only.'
+    #[doc(auto_cfg(hide(feature = "hidden")))]
+    pub struct Z;
+}
+
+// Checking inheritance.
+//@ has 'foo/o/index.html' '//*[@class="stab portability"]' \
+//  'Available on non-crate feature pistache only.'
+#[doc(cfg(not(feature = "pistache")))]
+pub mod o {
+    //@ has 'foo/o/struct.A.html' '//*[@class="stab portability"]' \
+    //  'Available on non-crate feature pistache and non-crate feature tarte only.'
+    #[doc(cfg(not(feature = "tarte")))]
+    pub struct A;
+}
diff --git a/tests/rustdoc/doc_auto_cfg_reexports.rs b/tests/rustdoc/doc_auto_cfg_reexports.rs
new file mode 100644
index 00000000000..ecfe9aabcfe
--- /dev/null
+++ b/tests/rustdoc/doc_auto_cfg_reexports.rs
@@ -0,0 +1,35 @@
+// Checks that `cfg` are correctly applied on inlined reexports.
+
+#![crate_name = "foo"]
+#![feature(doc_cfg)]
+
+// Check with `std` item.
+//@ has 'foo/index.html' '//*[@class="stab portability"]' 'Non-moustache'
+//@ has 'foo/struct.C.html' '//*[@class="stab portability"]' \
+//      'Available on non-crate feature moustache only.'
+#[cfg(not(feature = "moustache"))]
+pub use std::cell::RefCell as C;
+
+// Check with local item.
+mod x {
+    pub struct B;
+}
+
+//@ has 'foo/index.html' '//*[@class="stab portability"]' 'Non-pistache'
+//@ has 'foo/struct.B.html' '//*[@class="stab portability"]' \
+//      'Available on non-crate feature pistache only.'
+#[cfg(not(feature = "pistache"))]
+pub use crate::x::B;
+
+// Now checking that `cfg`s are not applied on non-inlined reexports.
+pub mod pub_sub_mod {
+    //@ has 'foo/pub_sub_mod/index.html'
+    // There should be only only item with `cfg` note.
+    //@ count - '//*[@class="stab portability"]' 1
+    // And obviously the item should be "blabla".
+    //@ has - '//dt' 'blablaNon-pistache'
+    #[cfg(not(feature = "pistache"))]
+    pub fn blabla() {}
+
+    pub use self::blabla as another;
+}
diff --git a/tests/rustdoc/impl/doc_auto_cfg_nested_impl.rs b/tests/rustdoc/impl/doc_auto_cfg_nested_impl.rs
index f85d7b23637..f24ebcd52ac 100644
--- a/tests/rustdoc/impl/doc_auto_cfg_nested_impl.rs
+++ b/tests/rustdoc/impl/doc_auto_cfg_nested_impl.rs
@@ -1,6 +1,6 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/101129>.
 
-#![feature(doc_auto_cfg)]
+#![feature(doc_cfg)]
 #![crate_type = "lib"]
 #![crate_name = "foo"]
 
diff --git a/tests/rustdoc/inline_cross/attributes.rs b/tests/rustdoc/inline_cross/attributes.rs
index 4747f8ad67c..1657b7bdc8f 100644
--- a/tests/rustdoc/inline_cross/attributes.rs
+++ b/tests/rustdoc/inline_cross/attributes.rs
@@ -1,7 +1,20 @@
+// Ensure that we render attributes on inlined cross-crate re-exported items.
+// issue: <https://github.com/rust-lang/rust/issues/144004>
+
 //@ aux-crate:attributes=attributes.rs
 //@ edition:2021
 #![crate_name = "user"]
 
-//@ has 'user/struct.NonExhaustive.html'
-//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[non_exhaustive]'
+//@ has 'user/fn.no_mangle.html' '//pre[@class="rust item-decl"]' '#[unsafe(no_mangle)]'
+pub use attributes::no_mangle;
+
+//@ has 'user/fn.link_section.html' '//pre[@class="rust item-decl"]' \
+//                                  '#[unsafe(link_section = ".here")]'
+pub use attributes::link_section;
+
+//@ has 'user/fn.export_name.html' '//pre[@class="rust item-decl"]' \
+//                                 '#[unsafe(export_name = "exonym")]'
+pub use attributes::export_name;
+
+//@ has 'user/struct.NonExhaustive.html' '//pre[@class="rust item-decl"]' '#[non_exhaustive]'
 pub use attributes::NonExhaustive;
diff --git a/tests/rustdoc/inline_cross/auxiliary/attributes.rs b/tests/rustdoc/inline_cross/auxiliary/attributes.rs
index c6f155d4ba5..6068d385585 100644
--- a/tests/rustdoc/inline_cross/auxiliary/attributes.rs
+++ b/tests/rustdoc/inline_cross/auxiliary/attributes.rs
@@ -1,2 +1,11 @@
+#[unsafe(no_mangle)]
+pub fn no_mangle() {}
+
+#[unsafe(link_section = ".here")]
+pub fn link_section() {}
+
+#[unsafe(export_name = "exonym")]
+pub fn export_name() {}
+
 #[non_exhaustive]
 pub struct NonExhaustive;
diff --git a/tests/rustdoc/inline_cross/auxiliary/repr.rs b/tests/rustdoc/inline_cross/auxiliary/repr.rs
deleted file mode 100644
index 0211e1a8658..00000000000
--- a/tests/rustdoc/inline_cross/auxiliary/repr.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-#![feature(repr_simd)]
-
-#[repr(C, align(8))]
-pub struct ReprC {
-    field: u8,
-}
-#[repr(simd, packed(2))]
-pub struct ReprSimd {
-    field: [u8; 1],
-}
-#[repr(transparent)]
-pub struct ReprTransparent {
-    pub field: u8,
-}
-#[repr(isize)]
-pub enum ReprIsize {
-    Bla,
-}
-#[repr(u8)]
-pub enum ReprU8 {
-    Bla,
-}
-
-#[repr(transparent)] // private
-pub struct ReprTransparentPrivField {
-    field: u32, // non-1-ZST field
-}
-
-#[repr(transparent)] // public
-pub struct ReprTransparentPriv1ZstFields {
-    marker0: Marker,
-    pub main: u64, // non-1-ZST field
-    marker1: Marker,
-}
-
-#[repr(transparent)] // private
-pub struct ReprTransparentPrivFieldPub1ZstFields {
-    main: [u16; 0], // non-1-ZST field
-    pub marker: Marker,
-}
-
-pub struct Marker; // 1-ZST
diff --git a/tests/rustdoc/inline_cross/repr.rs b/tests/rustdoc/inline_cross/repr.rs
deleted file mode 100644
index d13e560b8d7..00000000000
--- a/tests/rustdoc/inline_cross/repr.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Regression test for <https://github.com/rust-lang/rust/issues/110698>.
-// This test ensures that the re-exported items still have the `#[repr(...)]` attribute.
-
-//@ aux-build:repr.rs
-
-#![crate_name = "foo"]
-
-extern crate repr;
-
-//@ has 'foo/struct.ReprC.html'
-//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(C, align(8))]'
-pub use repr::ReprC;
-//@ has 'foo/struct.ReprSimd.html'
-//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(simd, packed(2))]'
-pub use repr::ReprSimd;
-//@ has 'foo/struct.ReprTransparent.html'
-//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
-pub use repr::ReprTransparent;
-//@ has 'foo/enum.ReprIsize.html'
-//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(isize)]'
-pub use repr::ReprIsize;
-//@ has 'foo/enum.ReprU8.html'
-//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(u8)]'
-pub use repr::ReprU8;
-
-// Regression test for <https://github.com/rust-lang/rust/issues/90435>.
-// Check that we show `#[repr(transparent)]` iff the non-1-ZST field is public or at least one
-// field is public in case all fields are 1-ZST fields.
-
-//@ has 'foo/struct.ReprTransparentPrivField.html'
-//@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
-pub use repr::ReprTransparentPrivField;
-
-//@ has 'foo/struct.ReprTransparentPriv1ZstFields.html'
-//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
-pub use repr::ReprTransparentPriv1ZstFields;
-
-//@ has 'foo/struct.ReprTransparentPrivFieldPub1ZstFields.html'
-//@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
-pub use repr::ReprTransparentPrivFieldPub1ZstFields;
diff --git a/tests/rustdoc/intra-doc/type-alias-primitive.rs b/tests/rustdoc/intra-doc/type-alias-primitive.rs
new file mode 100644
index 00000000000..7504166cbcc
--- /dev/null
+++ b/tests/rustdoc/intra-doc/type-alias-primitive.rs
@@ -0,0 +1,21 @@
+// Ensure that no warning is emitted if the disambiguator is used for type alias.
+// Regression test for <https://github.com/rust-lang/rust/issues/146855>.
+
+#![crate_name = "foo"]
+#![deny(rustdoc::broken_intra_doc_links)]
+
+pub struct Foo;
+
+#[allow(non_camel_case_types)]
+pub type f32 = Foo;
+
+/// This function returns [`tyalias@f32`] and not [bla][`prim@f32`].
+//@ has 'foo/fn.my_fn.html'
+//@ has - '//a[@href="type.f32.html"]' "f32"
+//@ has - '//a[@href="{{channel}}/std/primitive.f32.html"]' "bla"
+pub fn my_fn() -> f32 { 0. }
+
+/// This function returns [`typealias@f32`].
+//@ has 'foo/fn.my_other_fn.html'
+//@ has - '//a[@href="type.f32.html"]' "f32"
+pub fn my_other_fn() -> f32 { 0. }
diff --git a/tests/rustdoc/jump-to-def-assoc-items.rs b/tests/rustdoc/jump-to-def-assoc-items.rs
new file mode 100644
index 00000000000..8cbf9906283
--- /dev/null
+++ b/tests/rustdoc/jump-to-def-assoc-items.rs
@@ -0,0 +1,54 @@
+// This test ensures that patterns also get a link generated.
+
+//@ compile-flags: -Zunstable-options --generate-link-to-definition
+
+#![crate_name = "foo"]
+
+//@ has 'src/foo/jump-to-def-assoc-items.rs.html'
+
+pub trait Trait {
+    type T;
+}
+pub trait Another {
+    type T;
+    const X: u32;
+}
+
+pub struct Foo;
+
+impl Foo {
+    pub fn new() -> Self { Foo }
+}
+
+pub struct C;
+
+impl C {
+    pub fn wat() {}
+}
+
+pub struct Bar;
+impl Trait for Bar {
+    type T = Foo;
+}
+impl Another for Bar {
+    type T = C;
+    const X: u32 = 12;
+}
+
+pub fn bar() {
+    //@ has - '//a[@href="#20"]' 'new'
+    <Bar as Trait>::T::new();
+    //@ has - '//a[@href="#26"]' 'wat'
+    <Bar as Another>::T::wat();
+
+    match 12u32 {
+        //@ has - '//a[@href="#14"]' 'X'
+        <Bar as Another>::X => {}
+        _ => {}
+    }
+}
+
+pub struct Far {
+        //@ has - '//a[@href="#10"]' 'T'
+    x: <Bar as Trait>::T,
+}
diff --git a/tests/rustdoc/jump-to-def-ice-assoc-types.rs b/tests/rustdoc/jump-to-def-ice-assoc-types.rs
new file mode 100644
index 00000000000..9915c53668f
--- /dev/null
+++ b/tests/rustdoc/jump-to-def-ice-assoc-types.rs
@@ -0,0 +1,20 @@
+// This test ensures that associated types don't crash rustdoc jump to def.
+
+//@ compile-flags: -Zunstable-options --generate-link-to-definition
+
+
+#![crate_name = "foo"]
+
+//@ has 'src/foo/jump-to-def-ice-assoc-types.rs.html'
+
+pub trait Trait {
+    type Node;
+}
+
+pub fn y<G: Trait>() {
+    struct X<G>(G);
+
+    impl<G: Trait> Trait for X<G> {
+        type Node = G::Node;
+    }
+}
diff --git a/tests/rustdoc/jump-to-def-ice.rs b/tests/rustdoc/jump-to-def-ice.rs
new file mode 100644
index 00000000000..5578b9af3d7
--- /dev/null
+++ b/tests/rustdoc/jump-to-def-ice.rs
@@ -0,0 +1,24 @@
+// This test ensures that items with no body don't panic when generating
+// jump to def links.
+
+//@ compile-flags: -Zunstable-options --generate-link-to-definition
+
+#![crate_name = "foo"]
+
+//@ has 'src/foo/jump-to-def-ice.rs.html'
+
+pub trait A {
+    type T;
+    type U;
+}
+
+impl A for () {
+    type T = Self::U;
+    type U = ();
+}
+
+pub trait C {
+    type X;
+}
+
+pub struct F<T: C>(pub T::X);
diff --git a/tests/rustdoc/jump-to-def/jump-to-def-doc-links-calls.rs b/tests/rustdoc/jump-to-def/jump-to-def-doc-links-calls.rs
index 61856978773..55e59f23b6f 100644
--- a/tests/rustdoc/jump-to-def/jump-to-def-doc-links-calls.rs
+++ b/tests/rustdoc/jump-to-def/jump-to-def-doc-links-calls.rs
@@ -8,7 +8,7 @@
 pub struct Bar;
 
 impl std::default::Default for Bar {
-    //@ has - '//a[@href="#20-22"]' 'Self::new'
+    //@ has - '//a[@href="#20-22"]' 'new'
     fn default() -> Self {
         Self::new()
     }
@@ -16,7 +16,7 @@ impl std::default::Default for Bar {
 
 //@ has - '//a[@href="#8"]' 'Bar'
 impl Bar {
-     //@ has - '//a[@href="#24-26"]' 'Self::bar'
+     //@ has - '//a[@href="#24-26"]' 'bar'
      pub fn new()-> Self {
          Self::bar()
      }
diff --git a/tests/rustdoc/jump-to-def/jump-to-def-pats.rs b/tests/rustdoc/jump-to-def/jump-to-def-pats.rs
index 147902b44cf..852eba208db 100644
--- a/tests/rustdoc/jump-to-def/jump-to-def-pats.rs
+++ b/tests/rustdoc/jump-to-def/jump-to-def-pats.rs
@@ -30,13 +30,13 @@ pub fn foo() -> Result<(), ()> {
 impl<T, E> fmt::Display for MyEnum<T, E> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match self {
-            //@ has - '//a[@href="#12"]' 'Self::Ok'
+            //@ has - '//a[@href="#12"]' 'Ok'
             Self::Ok(_) => f.write_str("MyEnum::Ok"),
-            //@ has - '//a[@href="#13"]' 'MyEnum::Err'
+            //@ has - '//a[@href="#13"]' 'Err'
             MyEnum::Err(_) => f.write_str("MyEnum::Err"),
-            //@ has - '//a[@href="#14"]' 'Self::Some'
+            //@ has - '//a[@href="#14"]' 'Some'
             Self::Some(_) => f.write_str("MyEnum::Some"),
-            //@ has - '//a[@href="#15"]' 'Self::None'
+            //@ has - '//a[@href="#15"]' 'None'
             Self::None => f.write_str("MyEnum::None"),
         }
     }
@@ -45,7 +45,7 @@ impl<T, E> fmt::Display for MyEnum<T, E> {
 impl X {
     fn p(&self) -> &str {
         match self {
-            //@ has - '//a[@href="#19"]' 'Self::A'
+            //@ has - '//a[@href="#19"]' 'A'
             Self::A => "X::A",
         }
     }
diff --git a/tests/rustdoc/jump-to-def/jump-to-non-local-method.rs b/tests/rustdoc/jump-to-def/jump-to-non-local-method.rs
index e2f530425f0..1d6d6b8d18f 100644
--- a/tests/rustdoc/jump-to-def/jump-to-non-local-method.rs
+++ b/tests/rustdoc/jump-to-def/jump-to-non-local-method.rs
@@ -21,9 +21,10 @@ pub fn bar2<T: Read>(readable: T) {
 }
 
 pub fn bar() {
-    //@ has - '//a[@href="{{channel}}/core/sync/atomic/struct.AtomicIsize.html#method.new"]' 'AtomicIsize::new'
+    //@ has - '//a[@href="{{channel}}/core/sync/atomic/struct.AtomicIsize.html"]' 'AtomicIsize'
+    //@ has - '//a[@href="{{channel}}/core/sync/atomic/struct.AtomicIsize.html#method.new"]' 'new'
     let _ = AtomicIsize::new(0);
-    //@ has - '//a[@href="#48"]' 'local_private'
+    //@ has - '//a[@href="#49"]' 'local_private'
     local_private();
 }
 
@@ -39,7 +40,7 @@ pub fn macro_call() -> Result<(), ()> {
 }
 
 pub fn variant() {
-    //@ has - '//a[@href="{{channel}}/core/cmp/enum.Ordering.html#variant.Less"]' 'Ordering::Less'
+    //@ has - '//a[@href="{{channel}}/core/cmp/enum.Ordering.html#variant.Less"]' 'Less'
     let _ = Ordering::Less;
     //@ has - '//a[@href="{{channel}}/core/marker/struct.PhantomData.html"]' 'PhantomData'
     let _: PhantomData::<usize> = PhantomData;
diff --git a/tests/rustdoc/reexport/auxiliary/reexports-attrs.rs b/tests/rustdoc/reexport/auxiliary/reexports-attrs.rs
deleted file mode 100644
index 96fa8209cde..00000000000
--- a/tests/rustdoc/reexport/auxiliary/reexports-attrs.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-#[unsafe(no_mangle)]
-pub fn f0() {}
-
-#[unsafe(link_section = ".here")]
-pub fn f1() {}
-
-#[unsafe(export_name = "f2export")]
-pub fn f2() {}
-
-#[repr(u8)]
-pub enum T0 { V1 }
-
-#[non_exhaustive]
-pub enum T1 {}
diff --git a/tests/rustdoc/reexport/doc_auto_cfg-reexport-foreign-113982.rs b/tests/rustdoc/reexport/doc_auto_cfg-reexport-foreign-113982.rs
index 76b25127a9c..f8ec4afc031 100644
--- a/tests/rustdoc/reexport/doc_auto_cfg-reexport-foreign-113982.rs
+++ b/tests/rustdoc/reexport/doc_auto_cfg-reexport-foreign-113982.rs
@@ -1,7 +1,7 @@
 //@ aux-build: issue-113982-doc_auto_cfg-reexport-foreign.rs
 
 // https://github.com/rust-lang/rust/issues/113982
-#![feature(no_core, doc_auto_cfg)]
+#![feature(no_core, doc_cfg)]
 #![no_core]
 #![crate_name = "foo"]
 
diff --git a/tests/rustdoc/reexport/glob-reexport-attribute-merge-doc-auto-cfg.rs b/tests/rustdoc/reexport/glob-reexport-attribute-merge-doc-auto-cfg.rs
index d0a2165ec8a..0aed2b0c462 100644
--- a/tests/rustdoc/reexport/glob-reexport-attribute-merge-doc-auto-cfg.rs
+++ b/tests/rustdoc/reexport/glob-reexport-attribute-merge-doc-auto-cfg.rs
@@ -2,7 +2,7 @@
 // the reexported item whereas glob reexports do with the `doc_auto_cfg` feature.
 
 #![crate_name = "foo"]
-#![feature(doc_auto_cfg)]
+#![feature(doc_cfg)]
 
 //@ has 'foo/index.html'
 // There are two items.
diff --git a/tests/rustdoc/reexport/reexport-attrs.rs b/tests/rustdoc/reexport/reexport-attrs.rs
deleted file mode 100644
index aec0a11c0c6..00000000000
--- a/tests/rustdoc/reexport/reexport-attrs.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-//@ aux-build: reexports-attrs.rs
-
-#![crate_name = "foo"]
-
-extern crate reexports_attrs;
-
-//@ 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"]' '#[unsafe(link_section = ".here")]'
-pub use reexports_attrs::f1;
-
-//@ 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)]'
-pub use reexports_attrs::T0;
-
-//@ has 'foo/enum.T1.html' '//pre[@class="rust item-decl"]' '#[non_exhaustive]'
-pub use reexports_attrs::T1;
diff --git a/tests/rustdoc/reexport/reexport-cfg.rs b/tests/rustdoc/reexport/reexport-cfg.rs
index 73b66824316..b624e5acf50 100644
--- a/tests/rustdoc/reexport/reexport-cfg.rs
+++ b/tests/rustdoc/reexport/reexport-cfg.rs
@@ -2,7 +2,7 @@
 // include `cfg`s from the previous chained items.
 
 #![crate_name = "foo"]
-#![feature(doc_auto_cfg, doc_cfg)]
+#![feature(doc_cfg)]
 
 mod foo {
     #[cfg(not(feature = "foo"))]
diff --git a/tests/rustdoc/repr.rs b/tests/rustdoc/repr.rs
index f4f683b3d81..1e8fad6ec0a 100644
--- a/tests/rustdoc/repr.rs
+++ b/tests/rustdoc/repr.rs
@@ -1,29 +1,163 @@
-// Regression test for <https://github.com/rust-lang/rust/issues/90435>.
-// Check that we show `#[repr(transparent)]` iff the non-1-ZST field is public or at least one
-// field is public in case all fields are 1-ZST fields.
+// Test the rendering of `#[repr]` on ADTs.
+#![feature(repr_simd)] // only used for the `ReprSimd` test case
+
+// Check the "local case" (HIR cleaning) //
+
+// Don't render the default repr which is `Rust`.
+//@ has 'repr/struct.ReprDefault.html'
+//@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(Rust)]'
+pub struct ReprDefault;
+
+// Don't render the `Rust` repr — even if given explicitly — since it's the default.
+//@ has 'repr/struct.ReprRust.html'
+//@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(Rust)]'
+#[repr(Rust)] // omitted
+pub struct ReprRust;
+
+//@ has 'repr/struct.ReprCPubFields.html'
+//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(C)]'
+#[repr(C)] // public
+pub struct ReprCPubFields {
+    pub a: u32,
+    pub b: u32,
+}
+
+//@ has 'repr/struct.ReprCPrivField.html'
+//@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(C)]'
+#[repr(C)] // private...
+pub struct ReprCPrivField {
+    a: u32, // ...since this is private
+    pub b: u32,
+}
+
+//@ has 'repr/enum.ReprIsize.html'
+//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(isize)]'
+#[repr(isize)] // public
+pub enum ReprIsize {
+    Bla,
+}
+
+//@ has 'repr/enum.ReprU32HiddenVariant.html'
+//@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(u32)]'
+#[repr(u32)] // private...
+pub enum ReprU32HiddenVariant {
+    #[doc(hidden)]
+    Hidden, // ...since this is hidden
+    Public,
+}
+
+//@ has 'repr/struct.ReprAlignHiddenField.html'
+//@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(align(4))]'
+#[repr(align(4))] // private...
+pub struct ReprAlignHiddenField {
+    #[doc(hidden)]
+    pub hidden: i16, // ...since this field is hidden
+}
+
+//@ has 'repr/struct.ReprSimd.html'
+//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(simd, packed(2))]'
+#[repr(simd, packed(2))] // public
+pub struct ReprSimd {
+    pub field: [u8; 1],
+}
+
+//@ has 'repr/enum.ReprU32Align.html'
+//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(u32, align(8))]'
+#[repr(u32, align(8))] // public
+pub enum ReprU32Align {
+    Variant(u16),
+}
+
+//@ has 'repr/enum.ReprCHiddenVariantField.html'
+//@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(C)]'
+#[repr(C)] // private...
+pub enum ReprCHiddenVariantField {
+    Variant { #[doc(hidden)] field: () }, //...since this field is hidden
+}
 
 //@ has 'repr/struct.ReprTransparentPrivField.html'
 //@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
-#[repr(transparent)] // private
+#[repr(transparent)] // private...
 pub struct ReprTransparentPrivField {
-    field: u32, // non-1-ZST field
+    field: u32, // ...since the non-1-ZST field is private
 }
 
 //@ has 'repr/struct.ReprTransparentPriv1ZstFields.html'
 //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
-#[repr(transparent)] // public
+#[repr(transparent)] // public...
 pub struct ReprTransparentPriv1ZstFields {
     marker0: Marker,
-    pub main: u64, // non-1-ZST field
+    pub main: u64, // ...since the non-1-ZST field is public and visible
     marker1: Marker,
+} // the two private 1-ZST fields don't matter
+
+//@ has 'repr/struct.ReprTransparentPrivFieldPub1ZstField.html'
+//@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
+#[repr(transparent)] // private...
+pub struct ReprTransparentPrivFieldPub1ZstField {
+    main: [u16; 0], // ...since the non-1-ZST field is private
+    pub marker: Marker, // this public 1-ZST field doesn't matter
 }
 
 //@ has 'repr/struct.ReprTransparentPub1ZstField.html'
 //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
-#[repr(transparent)] // public
+#[repr(transparent)] // public...
 pub struct ReprTransparentPub1ZstField {
-    marker0: Marker,
-    pub marker1: Marker,
+    marker0: Marker, // ...since we don't have a non-1-ZST field...
+    pub marker1: Marker, // ...and this field is public and visible
+}
+
+//@ has 'repr/struct.ReprTransparentUnitStruct.html'
+//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
+#[repr(transparent)] // public
+pub struct ReprTransparentUnitStruct;
+
+//@ has 'repr/enum.ReprTransparentEnumUnitVariant.html'
+//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
+#[repr(transparent)] // public
+pub enum ReprTransparentEnumUnitVariant {
+    Variant,
+}
+
+//@ has 'repr/enum.ReprTransparentEnumHiddenUnitVariant.html'
+//@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
+#[repr(transparent)] // private
+pub enum ReprTransparentEnumHiddenUnitVariant {
+    #[doc(hidden)] Variant(u32),
+}
+
+//@ has 'repr/enum.ReprTransparentEnumPub1ZstField.html'
+//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
+#[repr(transparent)] // public...
+pub enum ReprTransparentEnumPub1ZstField {
+    Variant {
+        field: u64, // ...since the non-1-ZST field is public
+        #[doc(hidden)]
+        marker: Marker, // this hidden 1-ZST field doesn't matter
+    },
+}
+
+//@ has 'repr/enum.ReprTransparentEnumHidden1ZstField.html'
+//@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
+#[repr(transparent)] // private...
+pub enum ReprTransparentEnumHidden1ZstField {
+    Variant {
+        #[doc(hidden)]
+        field: u64, // ...since the non-1-ZST field is public
+    },
 }
 
 struct Marker; // 1-ZST
+
+// Check the "extern case" (middle cleaning) //
+
+// Internally, HIR and middle cleaning share `#[repr]` rendering.
+// Thus we'll only test the very basics in this section.
+
+//@ aux-build: ext-repr.rs
+extern crate ext_repr as ext;
+
+// Regression test for <https://github.com/rust-lang/rust/issues/110698>.
+//@ has 'repr/enum.ReprI8.html'
+//@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(i8)]'
+pub use ext::ReprI8;
diff --git a/tests/rustdoc/source-code-pages/check-source-code-urls-to-def.rs b/tests/rustdoc/source-code-pages/check-source-code-urls-to-def.rs
index d701b88bf9f..a7b944fa2f6 100644
--- a/tests/rustdoc/source-code-pages/check-source-code-urls-to-def.rs
+++ b/tests/rustdoc/source-code-pages/check-source-code-urls-to-def.rs
@@ -34,7 +34,7 @@ fn babar() {}
 // The 5 links to line 23 and the line 23 itself.
 //@ count - '//pre[@class="rust"]//a[@href="#23"]' 6
 //@ has - '//pre[@class="rust"]//a[@href="../../source_code/struct.SourceCode.html"]' \
-//        'source_code::SourceCode'
+//        'SourceCode'
 pub fn foo(a: u32, b: &str, c: String, d: Foo, e: bar::Bar, f: source_code::SourceCode) {
     let x = 12;
     let y: Foo = Foo;
diff --git a/tests/rustdoc/target-feature.rs b/tests/rustdoc/target-feature.rs
index 59a08a0ca94..f2686f81fbf 100644
--- a/tests/rustdoc/target-feature.rs
+++ b/tests/rustdoc/target-feature.rs
@@ -1,3 +1,5 @@
+#![feature(doc_cfg)]
+
 #![crate_name = "foo"]
 
 //@ has 'foo/index.html'
diff --git a/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs b/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs
index 8449479287f..48f328f4fad 100644
--- a/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs
+++ b/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs
@@ -33,6 +33,10 @@ impl CodegenBackend for TheBackend {
         ""
     }
 
+    fn name(&self) -> &'static str {
+        "the-backend"
+    }
+
     fn codegen_crate(&self, tcx: TyCtxt<'_>) -> Box<dyn Any> {
         Box::new(CodegenResults {
             modules: vec![],
diff --git a/tests/ui-fulldeps/mod_dir_path_canonicalized.rs b/tests/ui-fulldeps/mod_dir_path_canonicalized.rs
index df5f29e35fe..86f2d5f5954 100644
--- a/tests/ui-fulldeps/mod_dir_path_canonicalized.rs
+++ b/tests/ui-fulldeps/mod_dir_path_canonicalized.rs
@@ -2,7 +2,6 @@
 // Testing that a librustc_ast can parse modules with canonicalized base path
 //@ ignore-cross-compile
 //@ ignore-remote
-// no-remap-src-base: Reading `file!()` (expectedly) fails when enabled.
 
 #![feature(rustc_private)]
 
diff --git a/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs b/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs
index c7c05946c4c..5f4e381c983 100644
--- a/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs
+++ b/tests/ui/array-slice-vec/box-of-array-of-drop-1.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 #![allow(overflowing_literals)]
 
diff --git a/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs b/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs
index 98175a26ec0..ea37d3e7212 100644
--- a/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs
+++ b/tests/ui/array-slice-vec/box-of-array-of-drop-2.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 #![allow(overflowing_literals)]
 
diff --git a/tests/ui/array-slice-vec/nested-vec-3.rs b/tests/ui/array-slice-vec/nested-vec-3.rs
index 51975743742..e3c04ed6f6b 100644
--- a/tests/ui/array-slice-vec/nested-vec-3.rs
+++ b/tests/ui/array-slice-vec/nested-vec-3.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 #![allow(overflowing_literals)]
 
diff --git a/tests/ui/array-slice-vec/slice-panic-1.rs b/tests/ui/array-slice-vec/slice-panic-1.rs
index a745dff96af..d7c1098fa2b 100644
--- a/tests/ui/array-slice-vec/slice-panic-1.rs
+++ b/tests/ui/array-slice-vec/slice-panic-1.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // Test that if a slicing expr[..] fails, the correct cleanups happen.
 
diff --git a/tests/ui/array-slice-vec/slice-panic-2.rs b/tests/ui/array-slice-vec/slice-panic-2.rs
index 483a4cbe245..157e716a95d 100644
--- a/tests/ui/array-slice-vec/slice-panic-2.rs
+++ b/tests/ui/array-slice-vec/slice-panic-2.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // Test that if a slicing expr[..] fails, the correct cleanups happen.
 
diff --git a/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs b/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs
index aef25d057d4..94dab4235e0 100644
--- a/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs
+++ b/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs
@@ -18,6 +18,7 @@
 
 //@ build-pass
 //@ needs-asm-support
+//@ ignore-backends: gcc
 
 use std::arch::global_asm;
 
diff --git a/tests/ui/asm/x86_64/goto.rs b/tests/ui/asm/x86_64/goto.rs
index 00a8e588f96..c1dbce0d1c9 100644
--- a/tests/ui/asm/x86_64/goto.rs
+++ b/tests/ui/asm/x86_64/goto.rs
@@ -1,6 +1,7 @@
 //@ only-x86_64
 //@ run-pass
 //@ needs-asm-support
+//@ ignore-backends: gcc
 
 #![deny(unreachable_code)]
 #![feature(asm_goto_with_outputs)]
diff --git a/tests/ui/asm/x86_64/goto.stderr b/tests/ui/asm/x86_64/goto.stderr
index 78b726b3f3d..f8f09f32f6c 100644
--- a/tests/ui/asm/x86_64/goto.stderr
+++ b/tests/ui/asm/x86_64/goto.stderr
@@ -1,5 +1,5 @@
 warning: unreachable statement
-  --> $DIR/goto.rs:143:9
+  --> $DIR/goto.rs:144:9
    |
 LL | /         asm!(
 LL | |             "jmp {}",
@@ -13,7 +13,7 @@ LL |           unreachable!();
    |           ^^^^^^^^^^^^^^ unreachable statement
    |
 note: the lint level is defined here
-  --> $DIR/goto.rs:133:8
+  --> $DIR/goto.rs:134:8
    |
 LL | #[warn(unreachable_code)]
    |        ^^^^^^^^^^^^^^^^
diff --git a/tests/ui/asm/x86_64/srcloc.rs b/tests/ui/asm/x86_64/srcloc.rs
index 2938bafe5e7..f4ffa8c5c3b 100644
--- a/tests/ui/asm/x86_64/srcloc.rs
+++ b/tests/ui/asm/x86_64/srcloc.rs
@@ -1,6 +1,7 @@
 //@ only-x86_64
 //@ build-fail
 //@ compile-flags: -Ccodegen-units=1
+//@ ignore-backends: gcc
 
 use std::arch::asm;
 
diff --git a/tests/ui/asm/x86_64/srcloc.stderr b/tests/ui/asm/x86_64/srcloc.stderr
index bb4e855163d..b2079120ec0 100644
--- a/tests/ui/asm/x86_64/srcloc.stderr
+++ b/tests/ui/asm/x86_64/srcloc.stderr
@@ -1,5 +1,5 @@
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:11:15
+  --> $DIR/srcloc.rs:12:15
    |
 LL |         asm!("invalid_instruction");
    |               ^^^^^^^^^^^^^^^^^^^
@@ -11,7 +11,7 @@ LL |     invalid_instruction
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:15:13
+  --> $DIR/srcloc.rs:16:13
    |
 LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:20:13
+  --> $DIR/srcloc.rs:21:13
    |
 LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
@@ -35,7 +35,7 @@ LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:26:13
+  --> $DIR/srcloc.rs:27:13
    |
 LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
@@ -47,7 +47,7 @@ LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:33:13
+  --> $DIR/srcloc.rs:34:13
    |
 LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
@@ -59,7 +59,7 @@ LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:38:14
+  --> $DIR/srcloc.rs:39:14
    |
 LL |         asm!(concat!("invalid", "_", "instruction"));
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -71,7 +71,7 @@ LL |     invalid_instruction
    |     ^^^^^^^^^^^^^^^^^^^
 
 warning: scale factor without index register is ignored
-  --> $DIR/srcloc.rs:41:15
+  --> $DIR/srcloc.rs:42:15
    |
 LL |         asm!("movaps %xmm3, (%esi, 2)", options(att_syntax));
    |               ^^^^^^^^^^^^^^^^^^^^^^^
@@ -83,7 +83,7 @@ LL |     movaps %xmm3, (%esi, 2)
    |                          ^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:45:14
+  --> $DIR/srcloc.rs:46:14
    |
 LL |             "invalid_instruction",
    |              ^^^^^^^^^^^^^^^^^^^
@@ -95,7 +95,7 @@ LL |     invalid_instruction
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:51:14
+  --> $DIR/srcloc.rs:52:14
    |
 LL |             "invalid_instruction",
    |              ^^^^^^^^^^^^^^^^^^^
@@ -107,7 +107,7 @@ LL | invalid_instruction
    | ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:58:14
+  --> $DIR/srcloc.rs:59:14
    |
 LL |             "invalid_instruction",
    |              ^^^^^^^^^^^^^^^^^^^
@@ -119,7 +119,7 @@ LL | invalid_instruction
    | ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:65:13
+  --> $DIR/srcloc.rs:66:13
    |
 LL |             concat!("invalid", "_", "instruction"),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -131,7 +131,7 @@ LL | invalid_instruction
    | ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:72:13
+  --> $DIR/srcloc.rs:73:13
    |
 LL |             concat!("invalid", "_", "instruction"),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -143,7 +143,7 @@ LL | invalid_instruction
    | ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction1'
-  --> $DIR/srcloc.rs:79:14
+  --> $DIR/srcloc.rs:80:14
    |
 LL |             "invalid_instruction1",
    |              ^^^^^^^^^^^^^^^^^^^^
@@ -155,7 +155,7 @@ LL |     invalid_instruction1
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction2'
-  --> $DIR/srcloc.rs:80:14
+  --> $DIR/srcloc.rs:81:14
    |
 LL |             "invalid_instruction2",
    |              ^^^^^^^^^^^^^^^^^^^^
@@ -167,7 +167,7 @@ LL | invalid_instruction2
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction1'
-  --> $DIR/srcloc.rs:86:13
+  --> $DIR/srcloc.rs:87:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction1", "\n",
@@ -182,7 +182,7 @@ LL |     invalid_instruction1
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction2'
-  --> $DIR/srcloc.rs:86:13
+  --> $DIR/srcloc.rs:87:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction1", "\n",
@@ -197,7 +197,7 @@ LL | invalid_instruction2
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction1'
-  --> $DIR/srcloc.rs:95:13
+  --> $DIR/srcloc.rs:96:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction1", "\n",
@@ -212,7 +212,7 @@ LL |     invalid_instruction1
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction2'
-  --> $DIR/srcloc.rs:95:13
+  --> $DIR/srcloc.rs:96:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction1", "\n",
@@ -227,7 +227,7 @@ LL | invalid_instruction2
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction3'
-  --> $DIR/srcloc.rs:99:13
+  --> $DIR/srcloc.rs:100:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction3", "\n",
@@ -242,7 +242,7 @@ LL | invalid_instruction3
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction4'
-  --> $DIR/srcloc.rs:99:13
+  --> $DIR/srcloc.rs:100:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction3", "\n",
@@ -257,7 +257,7 @@ LL | invalid_instruction4
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction1'
-  --> $DIR/srcloc.rs:110:13
+  --> $DIR/srcloc.rs:111:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction1", "\n",
@@ -272,7 +272,7 @@ LL |     invalid_instruction1
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction2'
-  --> $DIR/srcloc.rs:110:13
+  --> $DIR/srcloc.rs:111:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction1", "\n",
@@ -287,7 +287,7 @@ LL | invalid_instruction2
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction3'
-  --> $DIR/srcloc.rs:114:13
+  --> $DIR/srcloc.rs:115:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction3", "\n",
@@ -302,7 +302,7 @@ LL | invalid_instruction3
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction4'
-  --> $DIR/srcloc.rs:114:13
+  --> $DIR/srcloc.rs:115:13
    |
 LL | /             concat!(
 LL | |                 "invalid", "_", "instruction3", "\n",
@@ -317,7 +317,7 @@ LL | invalid_instruction4
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:127:14
+  --> $DIR/srcloc.rs:128:14
    |
 LL |             "invalid_instruction"
    |              ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.rs b/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.rs
new file mode 100644
index 00000000000..e5c1f47b9e0
--- /dev/null
+++ b/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.rs
@@ -0,0 +1,17 @@
+//@ compile-flags: -Zdeduplicate-diagnostics=yes
+
+// Regression test for #146467.
+#![feature(inherent_associated_types)]
+//~^ WARN the feature `inherent_associated_types` is incomplete
+
+struct Foo<T>(T);
+
+impl<'a> Foo<fn(&())> {
+    //~^ ERROR the lifetime parameter `'a` is not constrained by the impl trait
+    type Assoc = &'a ();
+}
+
+fn foo(_: for<'a> fn(Foo<fn(&'a ())>::Assoc)) {}
+//~^ ERROR mismatched types
+//~| ERROR higher-ranked subtype error
+fn main() {}
diff --git a/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.stderr b/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.stderr
new file mode 100644
index 00000000000..4c0726d4ddc
--- /dev/null
+++ b/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.stderr
@@ -0,0 +1,34 @@
+warning: the feature `inherent_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/hr-do-not-blame-outlives-static-ice.rs:4:12
+   |
+LL | #![feature(inherent_associated_types)]
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/hr-do-not-blame-outlives-static-ice.rs:9:6
+   |
+LL | impl<'a> Foo<fn(&())> {
+   |      ^^ unconstrained lifetime parameter
+
+error[E0308]: mismatched types
+  --> $DIR/hr-do-not-blame-outlives-static-ice.rs:14:11
+   |
+LL | fn foo(_: for<'a> fn(Foo<fn(&'a ())>::Assoc)) {}
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
+   |
+   = note: expected struct `Foo<for<'a> fn(&'a ())>`
+              found struct `Foo<for<'a> fn(&'a ())>`
+
+error: higher-ranked subtype error
+  --> $DIR/hr-do-not-blame-outlives-static-ice.rs:14:1
+   |
+LL | fn foo(_: for<'a> fn(Foo<fn(&'a ())>::Assoc)) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors; 1 warning emitted
+
+Some errors have detailed explanations: E0207, E0308.
+For more information about an error, try `rustc --explain E0207`.
diff --git a/tests/ui/associated-type-bounds/duplicate-bound-err.rs b/tests/ui/associated-type-bounds/duplicate-bound-err.rs
new file mode 100644
index 00000000000..01cc05f2545
--- /dev/null
+++ b/tests/ui/associated-type-bounds/duplicate-bound-err.rs
@@ -0,0 +1,114 @@
+//@ edition: 2024
+
+#![feature(associated_const_equality, type_alias_impl_trait, return_type_notation)]
+#![allow(refining_impl_trait_internal)]
+
+use std::iter;
+
+fn rpit1() -> impl Iterator<Item: Copy, Item: Send> {
+    iter::empty()
+    //~^ ERROR type annotations needed
+}
+fn rpit2() -> impl Iterator<Item: Copy, Item: Copy> {
+    iter::empty()
+    //~^ ERROR type annotations needed
+}
+fn rpit3() -> impl Iterator<Item: 'static, Item: 'static> {
+    iter::empty()
+    //~^ ERROR type annotations needed
+}
+
+type Tait1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
+//~^ ERROR unconstrained opaque type
+type Tait2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
+//~^ ERROR unconstrained opaque type
+type Tait3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
+//~^ ERROR unconstrained opaque type
+
+type Tait4 = impl Iterator<Item: Copy, Item: Send>;
+//~^ ERROR unconstrained opaque type
+type Tait5 = impl Iterator<Item: Copy, Item: Copy>;
+//~^ ERROR unconstrained opaque type
+type Tait6 = impl Iterator<Item: 'static, Item: 'static>;
+//~^ ERROR unconstrained opaque type
+
+fn mismatch() -> impl Iterator<Item: Copy, Item: Send> {
+    //~^ ERROR [E0277]
+    iter::empty::<*const ()>()
+}
+
+fn mismatch_2() -> impl Iterator<Item: Copy, Item: Send> {
+    //~^ ERROR [E0277]
+    iter::empty::<String>()
+}
+
+trait Trait {
+    type Gat<T>;
+
+    const ASSOC: i32;
+
+    fn foo() -> impl Sized;
+}
+
+impl Trait for () {
+    type Gat<T> = ();
+
+    const ASSOC: i32 = 3;
+
+    fn foo() {}
+}
+
+impl Trait for u32 {
+    type Gat<T> = ();
+
+    const ASSOC: i32 = 4;
+
+    fn foo() -> u32 {
+        42
+    }
+}
+
+fn uncallable(_: impl Iterator<Item = i32, Item = u32>) {}
+
+fn uncallable_const(_: impl Trait<ASSOC = 3, ASSOC = 4>) {}
+
+fn uncallable_rtn(_: impl Trait<foo(..): Trait<ASSOC = 3>, foo(..): Trait<ASSOC = 4>>) {}
+
+type MustFail = dyn Iterator<Item = i32, Item = u32>;
+//~^ ERROR [E0719]
+//~| ERROR conflicting associated type bounds
+
+trait Trait2 {
+    const ASSOC: u32;
+}
+
+type MustFail2 = dyn Trait2<ASSOC = 3u32, ASSOC = 4u32>;
+//~^ ERROR [E0719]
+//~| ERROR conflicting associated type bounds
+
+type MustFail3 = dyn Iterator<Item = i32, Item = i32>;
+//~^ ERROR [E0719]
+
+type MustFail4 = dyn Trait2<ASSOC = 3u32, ASSOC = 3u32>;
+//~^ ERROR [E0719]
+
+trait Trait3 {
+    fn foo() -> impl Iterator<Item = i32, Item = u32>;
+}
+
+impl Trait3 for () {
+    fn foo() -> impl Iterator<Item = i32, Item = u32> {
+        //~^ ERROR[E0271]
+        //~| ERROR[E0271]
+        [2u32].into_iter()
+    }
+}
+
+fn main() {
+    uncallable(iter::empty::<u32>()); //~ ERROR [E0271]
+    uncallable(iter::empty::<i32>()); //~ ERROR [E0271]
+    uncallable_const(()); //~ ERROR [E0271]
+    uncallable_const(4u32); //~ ERROR [E0271]
+    uncallable_rtn(()); //~ ERROR [E0271]
+    uncallable_rtn(17u32); //~ ERROR [E0271]
+}
diff --git a/tests/ui/associated-type-bounds/duplicate-bound-err.stderr b/tests/ui/associated-type-bounds/duplicate-bound-err.stderr
new file mode 100644
index 00000000000..1737d0dc5a3
--- /dev/null
+++ b/tests/ui/associated-type-bounds/duplicate-bound-err.stderr
@@ -0,0 +1,268 @@
+error[E0282]: type annotations needed
+  --> $DIR/duplicate-bound-err.rs:9:5
+   |
+LL |     iter::empty()
+   |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
+   |
+help: consider specifying the generic argument
+   |
+LL |     iter::empty::<T>()
+   |                +++++
+
+error[E0282]: type annotations needed
+  --> $DIR/duplicate-bound-err.rs:13:5
+   |
+LL |     iter::empty()
+   |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
+   |
+help: consider specifying the generic argument
+   |
+LL |     iter::empty::<T>()
+   |                +++++
+
+error[E0282]: type annotations needed
+  --> $DIR/duplicate-bound-err.rs:17:5
+   |
+LL |     iter::empty()
+   |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
+   |
+help: consider specifying the generic argument
+   |
+LL |     iter::empty::<T>()
+   |                +++++
+
+error: unconstrained opaque type
+  --> $DIR/duplicate-bound-err.rs:21:51
+   |
+LL | type Tait1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
+   |                                                   ^^^^^^^^^
+   |
+   = note: `Tait1` must be used in combination with a concrete type within the same crate
+
+error: unconstrained opaque type
+  --> $DIR/duplicate-bound-err.rs:23:51
+   |
+LL | type Tait2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
+   |                                                   ^^^^^^^^^
+   |
+   = note: `Tait2` must be used in combination with a concrete type within the same crate
+
+error: unconstrained opaque type
+  --> $DIR/duplicate-bound-err.rs:25:57
+   |
+LL | type Tait3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
+   |                                                         ^^^^^^^^^
+   |
+   = note: `Tait3` must be used in combination with a concrete type within the same crate
+
+error: unconstrained opaque type
+  --> $DIR/duplicate-bound-err.rs:28:14
+   |
+LL | type Tait4 = impl Iterator<Item: Copy, Item: Send>;
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `Tait4` must be used in combination with a concrete type within the same crate
+
+error: unconstrained opaque type
+  --> $DIR/duplicate-bound-err.rs:30:14
+   |
+LL | type Tait5 = impl Iterator<Item: Copy, Item: Copy>;
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `Tait5` must be used in combination with a concrete type within the same crate
+
+error: unconstrained opaque type
+  --> $DIR/duplicate-bound-err.rs:32:14
+   |
+LL | type Tait6 = impl Iterator<Item: 'static, Item: 'static>;
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `Tait6` must be used in combination with a concrete type within the same crate
+
+error[E0277]: `*const ()` cannot be sent between threads safely
+  --> $DIR/duplicate-bound-err.rs:35:18
+   |
+LL | fn mismatch() -> impl Iterator<Item: Copy, Item: Send> {
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const ()` cannot be sent between threads safely
+LL |
+LL |     iter::empty::<*const ()>()
+   |     -------------------------- return type was inferred to be `std::iter::Empty<*const ()>` here
+   |
+   = help: the trait `Send` is not implemented for `*const ()`
+
+error[E0277]: the trait bound `String: Copy` is not satisfied
+  --> $DIR/duplicate-bound-err.rs:40:20
+   |
+LL | fn mismatch_2() -> impl Iterator<Item: Copy, Item: Send> {
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
+LL |
+LL |     iter::empty::<String>()
+   |     ----------------------- return type was inferred to be `std::iter::Empty<String>` here
+
+error[E0271]: expected `IntoIter<u32, 1>` to be an iterator that yields `i32`, but it yields `u32`
+  --> $DIR/duplicate-bound-err.rs:100:17
+   |
+LL |     fn foo() -> impl Iterator<Item = i32, Item = u32> {
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
+...
+LL |         [2u32].into_iter()
+   |         ------------------ return type was inferred to be `std::array::IntoIter<u32, 1>` here
+
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
+  --> $DIR/duplicate-bound-err.rs:77:42
+   |
+LL | type MustFail = dyn Iterator<Item = i32, Item = u32>;
+   |                              ----------  ^^^^^^^^^^ re-bound here
+   |                              |
+   |                              `Item` bound here first
+
+error: conflicting associated type bounds for `Item`
+  --> $DIR/duplicate-bound-err.rs:77:17
+   |
+LL | type MustFail = dyn Iterator<Item = i32, Item = u32>;
+   |                 ^^^^^^^^^^^^^----------^^----------^
+   |                              |           |
+   |                              |           `Item` is specified to be `u32` here
+   |                              `Item` is specified to be `i32` here
+
+error[E0719]: the value of the associated type `ASSOC` in trait `Trait2` is already specified
+  --> $DIR/duplicate-bound-err.rs:85:43
+   |
+LL | type MustFail2 = dyn Trait2<ASSOC = 3u32, ASSOC = 4u32>;
+   |                             ------------  ^^^^^^^^^^^^ re-bound here
+   |                             |
+   |                             `ASSOC` bound here first
+
+error: conflicting associated type bounds for `ASSOC`
+  --> $DIR/duplicate-bound-err.rs:85:18
+   |
+LL | type MustFail2 = dyn Trait2<ASSOC = 3u32, ASSOC = 4u32>;
+   |                  ^^^^^^^^^^^------------^^------------^
+   |                             |             |
+   |                             |             `ASSOC` is specified to be `4` here
+   |                             `ASSOC` is specified to be `3` here
+
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
+  --> $DIR/duplicate-bound-err.rs:89:43
+   |
+LL | type MustFail3 = dyn Iterator<Item = i32, Item = i32>;
+   |                               ----------  ^^^^^^^^^^ re-bound here
+   |                               |
+   |                               `Item` bound here first
+
+error[E0719]: the value of the associated type `ASSOC` in trait `Trait2` is already specified
+  --> $DIR/duplicate-bound-err.rs:92:43
+   |
+LL | type MustFail4 = dyn Trait2<ASSOC = 3u32, ASSOC = 3u32>;
+   |                             ------------  ^^^^^^^^^^^^ re-bound here
+   |                             |
+   |                             `ASSOC` bound here first
+
+error[E0271]: expected `impl Iterator<Item = u32>` to be an iterator that yields `i32`, but it yields `u32`
+  --> $DIR/duplicate-bound-err.rs:100:17
+   |
+LL |     fn foo() -> impl Iterator<Item = i32, Item = u32> {
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
+   |
+note: required by a bound in `Trait3::foo::{anon_assoc#0}`
+  --> $DIR/duplicate-bound-err.rs:96:31
+   |
+LL |     fn foo() -> impl Iterator<Item = i32, Item = u32>;
+   |                               ^^^^^^^^^^ required by this bound in `Trait3::foo::{anon_assoc#0}`
+
+error[E0271]: expected `Empty<u32>` to be an iterator that yields `i32`, but it yields `u32`
+  --> $DIR/duplicate-bound-err.rs:108:16
+   |
+LL |     uncallable(iter::empty::<u32>());
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `uncallable`
+  --> $DIR/duplicate-bound-err.rs:71:32
+   |
+LL | fn uncallable(_: impl Iterator<Item = i32, Item = u32>) {}
+   |                                ^^^^^^^^^^ required by this bound in `uncallable`
+
+error[E0271]: expected `Empty<i32>` to be an iterator that yields `u32`, but it yields `i32`
+  --> $DIR/duplicate-bound-err.rs:109:16
+   |
+LL |     uncallable(iter::empty::<i32>());
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `uncallable`
+  --> $DIR/duplicate-bound-err.rs:71:44
+   |
+LL | fn uncallable(_: impl Iterator<Item = i32, Item = u32>) {}
+   |                                            ^^^^^^^^^^ required by this bound in `uncallable`
+
+error[E0271]: type mismatch resolving `<() as Trait>::ASSOC == 4`
+  --> $DIR/duplicate-bound-err.rs:110:22
+   |
+LL |     uncallable_const(());
+   |     ---------------- ^^ expected `4`, found `3`
+   |     |
+   |     required by a bound introduced by this call
+   |
+   = note: expected constant `4`
+              found constant `3`
+note: required by a bound in `uncallable_const`
+  --> $DIR/duplicate-bound-err.rs:73:46
+   |
+LL | fn uncallable_const(_: impl Trait<ASSOC = 3, ASSOC = 4>) {}
+   |                                              ^^^^^^^^^ required by this bound in `uncallable_const`
+
+error[E0271]: type mismatch resolving `<u32 as Trait>::ASSOC == 3`
+  --> $DIR/duplicate-bound-err.rs:111:22
+   |
+LL |     uncallable_const(4u32);
+   |     ---------------- ^^^^ expected `3`, found `4`
+   |     |
+   |     required by a bound introduced by this call
+   |
+   = note: expected constant `3`
+              found constant `4`
+note: required by a bound in `uncallable_const`
+  --> $DIR/duplicate-bound-err.rs:73:35
+   |
+LL | fn uncallable_const(_: impl Trait<ASSOC = 3, ASSOC = 4>) {}
+   |                                   ^^^^^^^^^ required by this bound in `uncallable_const`
+
+error[E0271]: type mismatch resolving `<() as Trait>::ASSOC == 4`
+  --> $DIR/duplicate-bound-err.rs:112:20
+   |
+LL |     uncallable_rtn(());
+   |     -------------- ^^ expected `4`, found `3`
+   |     |
+   |     required by a bound introduced by this call
+   |
+   = note: expected constant `4`
+              found constant `3`
+note: required by a bound in `uncallable_rtn`
+  --> $DIR/duplicate-bound-err.rs:75:75
+   |
+LL | fn uncallable_rtn(_: impl Trait<foo(..): Trait<ASSOC = 3>, foo(..): Trait<ASSOC = 4>>) {}
+   |                                                                           ^^^^^^^^^ required by this bound in `uncallable_rtn`
+
+error[E0271]: type mismatch resolving `<u32 as Trait>::ASSOC == 3`
+  --> $DIR/duplicate-bound-err.rs:113:20
+   |
+LL |     uncallable_rtn(17u32);
+   |     -------------- ^^^^^ expected `3`, found `4`
+   |     |
+   |     required by a bound introduced by this call
+   |
+   = note: expected constant `3`
+              found constant `4`
+note: required by a bound in `uncallable_rtn`
+  --> $DIR/duplicate-bound-err.rs:75:48
+   |
+LL | fn uncallable_rtn(_: impl Trait<foo(..): Trait<ASSOC = 3>, foo(..): Trait<ASSOC = 4>>) {}
+   |                                                ^^^^^^^^^ required by this bound in `uncallable_rtn`
+
+error: aborting due to 25 previous errors
+
+Some errors have detailed explanations: E0271, E0277, E0282, E0719.
+For more information about an error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-type-bounds/duplicate-bound.rs b/tests/ui/associated-type-bounds/duplicate-bound.rs
new file mode 100644
index 00000000000..696710d76f6
--- /dev/null
+++ b/tests/ui/associated-type-bounds/duplicate-bound.rs
@@ -0,0 +1,240 @@
+//@ edition: 2024
+//@ run-pass
+
+#![feature(associated_const_equality, return_type_notation)]
+#![allow(dead_code, refining_impl_trait_internal, type_alias_bounds)]
+
+use std::iter;
+use std::mem::ManuallyDrop;
+
+struct Si1<T: Iterator<Item: Copy, Item: Send>> {
+    f: T,
+}
+struct Si2<T: Iterator<Item: Copy, Item: Copy>> {
+    f: T,
+}
+struct Si3<T: Iterator<Item: 'static, Item: 'static>> {
+    f: T,
+}
+struct Sw1<T>
+where
+    T: Iterator<Item: Copy, Item: Send>,
+{
+    f: T,
+}
+struct Sw2<T>
+where
+    T: Iterator<Item: Copy, Item: Copy>,
+{
+    f: T,
+}
+struct Sw3<T>
+where
+    T: Iterator<Item: 'static, Item: 'static>,
+{
+    f: T,
+}
+
+enum Ei1<T: Iterator<Item: Copy, Item: Send>> {
+    V(T),
+}
+enum Ei2<T: Iterator<Item: Copy, Item: Copy>> {
+    V(T),
+}
+enum Ei3<T: Iterator<Item: 'static, Item: 'static>> {
+    V(T),
+}
+enum Ew1<T>
+where
+    T: Iterator<Item: Copy, Item: Send>,
+{
+    V(T),
+}
+enum Ew2<T>
+where
+    T: Iterator<Item: Copy, Item: Copy>,
+{
+    V(T),
+}
+enum Ew3<T>
+where
+    T: Iterator<Item: 'static, Item: 'static>,
+{
+    V(T),
+}
+
+union Ui1<T: Iterator<Item: Copy, Item: Send>> {
+    f: ManuallyDrop<T>,
+}
+union Ui2<T: Iterator<Item: Copy, Item: Copy>> {
+    f: ManuallyDrop<T>,
+}
+union Ui3<T: Iterator<Item: 'static, Item: 'static>> {
+    f: ManuallyDrop<T>,
+}
+union Uw1<T>
+where
+    T: Iterator<Item: Copy, Item: Send>,
+{
+    f: ManuallyDrop<T>,
+}
+union Uw2<T>
+where
+    T: Iterator<Item: Copy, Item: Copy>,
+{
+    f: ManuallyDrop<T>,
+}
+union Uw3<T>
+where
+    T: Iterator<Item: 'static, Item: 'static>,
+{
+    f: ManuallyDrop<T>,
+}
+
+fn fi1<T: Iterator<Item: Copy, Item: Send>>() {}
+fn fi2<T: Iterator<Item: Copy, Item: Copy>>() {}
+fn fi3<T: Iterator<Item: 'static, Item: 'static>>() {}
+fn fw1<T>()
+where
+    T: Iterator<Item: Copy, Item: Send>,
+{
+}
+fn fw2<T>()
+where
+    T: Iterator<Item: Copy, Item: Copy>,
+{
+}
+fn fw3<T>()
+where
+    T: Iterator<Item: 'static, Item: 'static>,
+{
+}
+
+fn rpit1() -> impl Iterator<Item: Copy, Item: Send> {
+    iter::empty::<u32>()
+}
+fn rpit2() -> impl Iterator<Item: Copy, Item: Copy> {
+    iter::empty::<u32>()
+}
+fn rpit3() -> impl Iterator<Item: 'static, Item: 'static> {
+    iter::empty::<u32>()
+}
+fn apit1(_: impl Iterator<Item: Copy, Item: Send>) {}
+fn apit2(_: impl Iterator<Item: Copy, Item: Copy>) {}
+fn apit3(_: impl Iterator<Item: 'static, Item: 'static>) {}
+
+type Tait1<T: Iterator<Item: Copy, Item: Send>> = T;
+type Tait2<T: Iterator<Item: Copy, Item: Copy>> = T;
+type Tait3<T: Iterator<Item: 'static, Item: 'static>> = T;
+type Taw1<T>
+where
+    T: Iterator<Item: Copy, Item: Send>,
+= T;
+type Taw2<T>
+where
+    T: Iterator<Item: Copy, Item: Copy>,
+= T;
+type Taw3<T>
+where
+    T: Iterator<Item: 'static, Item: 'static>,
+= T;
+
+trait Tri1<T: Iterator<Item: Copy, Item: Send>> {}
+trait Tri2<T: Iterator<Item: Copy, Item: Copy>> {}
+trait Tri3<T: Iterator<Item: 'static, Item: 'static>> {}
+trait Trs1: Iterator<Item: Copy, Item: Send> {}
+trait Trs2: Iterator<Item: Copy, Item: Copy> {}
+trait Trs3: Iterator<Item: 'static, Item: 'static> {}
+trait Trw1<T>
+where
+    T: Iterator<Item: Copy, Item: Send>,
+{
+}
+trait Trw2<T>
+where
+    T: Iterator<Item: Copy, Item: Copy>,
+{
+}
+trait Trw3<T>
+where
+    T: Iterator<Item: 'static, Item: 'static>,
+{
+}
+trait Trsw1
+where
+    Self: Iterator<Item: Copy, Item: Send>,
+{
+}
+trait Trsw2
+where
+    Self: Iterator<Item: Copy, Item: Copy>,
+{
+}
+trait Trsw3
+where
+    Self: Iterator<Item: 'static, Item: 'static>,
+{
+}
+trait Tra1 {
+    type A: Iterator<Item: Copy, Item: Send>;
+}
+trait Tra2 {
+    type A: Iterator<Item: Copy, Item: Copy>;
+}
+trait Tra3 {
+    type A: Iterator<Item: 'static, Item: 'static>;
+}
+
+trait Trait {
+    type Gat<T>;
+
+    const ASSOC: i32;
+
+    fn foo() -> impl Sized;
+}
+
+impl Trait for () {
+    type Gat<T> = ();
+
+    const ASSOC: i32 = 3;
+
+    fn foo() {}
+}
+
+trait Subtrait: Trait<Gat<u32> = u32, Gat<u64> = u64> {}
+
+fn f<T: Trait<Gat<i32> = (), Gat<i64> = ()>>() {
+    let _: T::Gat<i32> = ();
+    let _: T::Gat<i64> = ();
+}
+
+fn g<T: Trait<Gat<i32> = (), Gat<i64> = &'static str>>() {
+    let _: T::Gat<i32> = ();
+    let _: T::Gat<i64> = "";
+}
+
+fn uncallable(_: impl Iterator<Item = i32, Item = u32>) {}
+
+fn callable(_: impl Iterator<Item = i32, Item = i32>) {}
+
+fn uncallable_const(_: impl Trait<ASSOC = 3, ASSOC = 4>) {}
+
+fn callable_const(_: impl Trait<ASSOC = 3, ASSOC = 3>) {}
+
+fn uncallable_rtn(_: impl Trait<foo(..): Trait<ASSOC = 3>, foo(..): Trait<ASSOC = 4>>) {}
+
+fn callable_rtn(_: impl Trait<foo(..): Send, foo(..): Send, foo(..): Eq>) {}
+
+trait Trait2 {
+    const ASSOC: u32;
+}
+
+trait Trait3 {
+    fn foo() -> impl Iterator<Item = i32, Item = u32>;
+}
+
+fn main() {
+    callable(iter::empty::<i32>());
+    callable_const(());
+    callable_rtn(());
+}
diff --git a/tests/ui/associated-type-bounds/duplicate.rs b/tests/ui/associated-type-bounds/duplicate.rs
deleted file mode 100644
index e9d94787e98..00000000000
--- a/tests/ui/associated-type-bounds/duplicate.rs
+++ /dev/null
@@ -1,278 +0,0 @@
-#![feature(type_alias_impl_trait)]
-
-use std::iter;
-use std::mem::ManuallyDrop;
-
-struct SI1<T: Iterator<Item: Copy, Item: Send>> {
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    f: T,
-}
-struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    f: T,
-}
-struct SI3<T: Iterator<Item: 'static, Item: 'static>> {
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    f: T,
-}
-struct SW1<T>
-where
-    T: Iterator<Item: Copy, Item: Send>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-    f: T,
-}
-struct SW2<T>
-where
-    T: Iterator<Item: Copy, Item: Copy>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-    f: T,
-}
-struct SW3<T>
-where
-    T: Iterator<Item: 'static, Item: 'static>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-    f: T,
-}
-
-enum EI1<T: Iterator<Item: Copy, Item: Send>> {
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    V(T),
-}
-enum EI2<T: Iterator<Item: Copy, Item: Copy>> {
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    V(T),
-}
-enum EI3<T: Iterator<Item: 'static, Item: 'static>> {
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    V(T),
-}
-enum EW1<T>
-where
-    T: Iterator<Item: Copy, Item: Send>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-    V(T),
-}
-enum EW2<T>
-where
-    T: Iterator<Item: Copy, Item: Copy>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-    V(T),
-}
-enum EW3<T>
-where
-    T: Iterator<Item: 'static, Item: 'static>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-    V(T),
-}
-
-union UI1<T: Iterator<Item: Copy, Item: Send>> {
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    f: ManuallyDrop<T>,
-}
-union UI2<T: Iterator<Item: Copy, Item: Copy>> {
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    f: ManuallyDrop<T>,
-}
-union UI3<T: Iterator<Item: 'static, Item: 'static>> {
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    f: ManuallyDrop<T>,
-}
-union UW1<T>
-where
-    T: Iterator<Item: Copy, Item: Send>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-    f: ManuallyDrop<T>,
-}
-union UW2<T>
-where
-    T: Iterator<Item: Copy, Item: Copy>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-    f: ManuallyDrop<T>,
-}
-union UW3<T>
-where
-    T: Iterator<Item: 'static, Item: 'static>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-    f: ManuallyDrop<T>,
-}
-
-fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-fn FW1<T>()
-where
-    T: Iterator<Item: Copy, Item: Send>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-}
-fn FW2<T>()
-where
-    T: Iterator<Item: Copy, Item: Copy>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-}
-fn FW3<T>()
-where
-    T: Iterator<Item: 'static, Item: 'static>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-}
-
-fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    iter::empty()
-    //~^ ERROR type annotations needed
-}
-fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    iter::empty()
-    //~^ ERROR type annotations needed
-}
-fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    iter::empty()
-    //~^ ERROR type annotations needed
-}
-fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-
-type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-type TAW1<T>
-where
-    T: Iterator<Item: Copy, Item: Send>,
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-= T;
-type TAW2<T>
-where
-    T: Iterator<Item: Copy, Item: Copy>,
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-= T;
-type TAW3<T>
-where
-    T: Iterator<Item: 'static, Item: 'static>,
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-= T;
-
-type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR unconstrained opaque type
-type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR unconstrained opaque type
-type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR unconstrained opaque type
-type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR unconstrained opaque type
-type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR unconstrained opaque type
-type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR unconstrained opaque type
-
-trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-trait TRS1: Iterator<Item: Copy, Item: Send> {}
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-trait TRS2: Iterator<Item: Copy, Item: Copy> {}
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-trait TRS3: Iterator<Item: 'static, Item: 'static> {}
-//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-trait TRW1<T>
-where
-    T: Iterator<Item: Copy, Item: Send>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-}
-trait TRW2<T>
-where
-    T: Iterator<Item: Copy, Item: Copy>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-}
-trait TRW3<T>
-where
-    T: Iterator<Item: 'static, Item: 'static>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-}
-trait TRSW1
-where
-    Self: Iterator<Item: Copy, Item: Send>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-}
-trait TRSW2
-where
-    Self: Iterator<Item: Copy, Item: Copy>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-}
-trait TRSW3
-where
-    Self: Iterator<Item: 'static, Item: 'static>,
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-{
-}
-trait TRA1 {
-    type A: Iterator<Item: Copy, Item: Send>;
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-}
-trait TRA2 {
-    type A: Iterator<Item: Copy, Item: Copy>;
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-}
-trait TRA3 {
-    type A: Iterator<Item: 'static, Item: 'static>;
-    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
-}
-
-fn main() {}
diff --git a/tests/ui/associated-type-bounds/duplicate.stderr b/tests/ui/associated-type-bounds/duplicate.stderr
deleted file mode 100644
index 68fbb345f6f..00000000000
--- a/tests/ui/associated-type-bounds/duplicate.stderr
+++ /dev/null
@@ -1,751 +0,0 @@
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:6:36
-   |
-LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> {
-   |                        ----------  ^^^^^^^^^^ re-bound here
-   |                        |
-   |                        `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:10:36
-   |
-LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
-   |                        ----------  ^^^^^^^^^^ re-bound here
-   |                        |
-   |                        `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:14:39
-   |
-LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> {
-   |                        -------------  ^^^^^^^^^^^^^ re-bound here
-   |                        |
-   |                        `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:20:29
-   |
-LL |     T: Iterator<Item: Copy, Item: Send>,
-   |                 ----------  ^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:27:29
-   |
-LL |     T: Iterator<Item: Copy, Item: Copy>,
-   |                 ----------  ^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:34:32
-   |
-LL |     T: Iterator<Item: 'static, Item: 'static>,
-   |                 -------------  ^^^^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:40:34
-   |
-LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> {
-   |                      ----------  ^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:44:34
-   |
-LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> {
-   |                      ----------  ^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:48:37
-   |
-LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> {
-   |                      -------------  ^^^^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:54:29
-   |
-LL |     T: Iterator<Item: Copy, Item: Send>,
-   |                 ----------  ^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:61:29
-   |
-LL |     T: Iterator<Item: Copy, Item: Copy>,
-   |                 ----------  ^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:68:32
-   |
-LL |     T: Iterator<Item: 'static, Item: 'static>,
-   |                 -------------  ^^^^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:74:35
-   |
-LL | union UI1<T: Iterator<Item: Copy, Item: Send>> {
-   |                       ----------  ^^^^^^^^^^ re-bound here
-   |                       |
-   |                       `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:78:35
-   |
-LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> {
-   |                       ----------  ^^^^^^^^^^ re-bound here
-   |                       |
-   |                       `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:82:38
-   |
-LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> {
-   |                       -------------  ^^^^^^^^^^^^^ re-bound here
-   |                       |
-   |                       `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:88:29
-   |
-LL |     T: Iterator<Item: Copy, Item: Send>,
-   |                 ----------  ^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:95:29
-   |
-LL |     T: Iterator<Item: Copy, Item: Copy>,
-   |                 ----------  ^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:102:32
-   |
-LL |     T: Iterator<Item: 'static, Item: 'static>,
-   |                 -------------  ^^^^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:108:32
-   |
-LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
-   |                    ----------  ^^^^^^^^^^ re-bound here
-   |                    |
-   |                    `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:110:32
-   |
-LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
-   |                    ----------  ^^^^^^^^^^ re-bound here
-   |                    |
-   |                    `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:112:35
-   |
-LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
-   |                    -------------  ^^^^^^^^^^^^^ re-bound here
-   |                    |
-   |                    `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:116:29
-   |
-LL |     T: Iterator<Item: Copy, Item: Send>,
-   |                 ----------  ^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:122:29
-   |
-LL |     T: Iterator<Item: Copy, Item: Copy>,
-   |                 ----------  ^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:128:32
-   |
-LL |     T: Iterator<Item: 'static, Item: 'static>,
-   |                 -------------  ^^^^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:133:42
-   |
-LL | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
-   |                              ----------  ^^^^^^^^^^ re-bound here
-   |                              |
-   |                              `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:139:42
-   |
-LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
-   |                              ----------  ^^^^^^^^^^ re-bound here
-   |                              |
-   |                              `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:145:45
-   |
-LL | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
-   |                              -------------  ^^^^^^^^^^^^^ re-bound here
-   |                              |
-   |                              `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:151:40
-   |
-LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
-   |                            ----------  ^^^^^^^^^^ re-bound here
-   |                            |
-   |                            `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:153:40
-   |
-LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
-   |                            ----------  ^^^^^^^^^^ re-bound here
-   |                            |
-   |                            `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:155:43
-   |
-LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
-   |                            -------------  ^^^^^^^^^^^^^ re-bound here
-   |                            |
-   |                            `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:158:35
-   |
-LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
-   |                       ----------  ^^^^^^^^^^ re-bound here
-   |                       |
-   |                       `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:160:35
-   |
-LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
-   |                       ----------  ^^^^^^^^^^ re-bound here
-   |                       |
-   |                       `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:162:38
-   |
-LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
-   |                       -------------  ^^^^^^^^^^^^^ re-bound here
-   |                       |
-   |                       `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:166:29
-   |
-LL |     T: Iterator<Item: Copy, Item: Send>,
-   |                 ----------  ^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:171:29
-   |
-LL |     T: Iterator<Item: Copy, Item: Copy>,
-   |                 ----------  ^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:176:32
-   |
-LL |     T: Iterator<Item: 'static, Item: 'static>,
-   |                 -------------  ^^^^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:180:36
-   |
-LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
-   |                        ----------  ^^^^^^^^^^ re-bound here
-   |                        |
-   |                        `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:183:36
-   |
-LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
-   |                        ----------  ^^^^^^^^^^ re-bound here
-   |                        |
-   |                        `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:186:39
-   |
-LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
-   |                        -------------  ^^^^^^^^^^^^^ re-bound here
-   |                        |
-   |                        `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:202:36
-   |
-LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
-   |                        ----------  ^^^^^^^^^^ re-bound here
-   |                        |
-   |                        `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:204:36
-   |
-LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
-   |                        ----------  ^^^^^^^^^^ re-bound here
-   |                        |
-   |                        `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:206:39
-   |
-LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
-   |                        -------------  ^^^^^^^^^^^^^ re-bound here
-   |                        |
-   |                        `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:208:34
-   |
-LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
-   |                      ----------  ^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:208:34
-   |
-LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
-   |                      ----------  ^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:208:34
-   |
-LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
-   |                      ----------  ^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:212:34
-   |
-LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
-   |                      ----------  ^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:212:34
-   |
-LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
-   |                      ----------  ^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:212:34
-   |
-LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
-   |                      ----------  ^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:216:37
-   |
-LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
-   |                      -------------  ^^^^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:216:37
-   |
-LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
-   |                      -------------  ^^^^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:216:37
-   |
-LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
-   |                      -------------  ^^^^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:222:29
-   |
-LL |     T: Iterator<Item: Copy, Item: Send>,
-   |                 ----------  ^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:228:29
-   |
-LL |     T: Iterator<Item: Copy, Item: Copy>,
-   |                 ----------  ^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:234:32
-   |
-LL |     T: Iterator<Item: 'static, Item: 'static>,
-   |                 -------------  ^^^^^^^^^^^^^ re-bound here
-   |                 |
-   |                 `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:240:32
-   |
-LL |     Self: Iterator<Item: Copy, Item: Send>,
-   |                    ----------  ^^^^^^^^^^ re-bound here
-   |                    |
-   |                    `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:240:32
-   |
-LL |     Self: Iterator<Item: Copy, Item: Send>,
-   |                    ----------  ^^^^^^^^^^ re-bound here
-   |                    |
-   |                    `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:240:32
-   |
-LL |     Self: Iterator<Item: Copy, Item: Send>,
-   |                    ----------  ^^^^^^^^^^ re-bound here
-   |                    |
-   |                    `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:248:32
-   |
-LL |     Self: Iterator<Item: Copy, Item: Copy>,
-   |                    ----------  ^^^^^^^^^^ re-bound here
-   |                    |
-   |                    `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:248:32
-   |
-LL |     Self: Iterator<Item: Copy, Item: Copy>,
-   |                    ----------  ^^^^^^^^^^ re-bound here
-   |                    |
-   |                    `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:248:32
-   |
-LL |     Self: Iterator<Item: Copy, Item: Copy>,
-   |                    ----------  ^^^^^^^^^^ re-bound here
-   |                    |
-   |                    `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:256:35
-   |
-LL |     Self: Iterator<Item: 'static, Item: 'static>,
-   |                    -------------  ^^^^^^^^^^^^^ re-bound here
-   |                    |
-   |                    `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:256:35
-   |
-LL |     Self: Iterator<Item: 'static, Item: 'static>,
-   |                    -------------  ^^^^^^^^^^^^^ re-bound here
-   |                    |
-   |                    `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:256:35
-   |
-LL |     Self: Iterator<Item: 'static, Item: 'static>,
-   |                    -------------  ^^^^^^^^^^^^^ re-bound here
-   |                    |
-   |                    `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:263:34
-   |
-LL |     type A: Iterator<Item: Copy, Item: Send>;
-   |                      ----------  ^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:263:34
-   |
-LL |     type A: Iterator<Item: Copy, Item: Send>;
-   |                      ----------  ^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:268:34
-   |
-LL |     type A: Iterator<Item: Copy, Item: Copy>;
-   |                      ----------  ^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:268:34
-   |
-LL |     type A: Iterator<Item: Copy, Item: Copy>;
-   |                      ----------  ^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:273:37
-   |
-LL |     type A: Iterator<Item: 'static, Item: 'static>;
-   |                      -------------  ^^^^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:273:37
-   |
-LL |     type A: Iterator<Item: 'static, Item: 'static>;
-   |                      -------------  ^^^^^^^^^^^^^ re-bound here
-   |                      |
-   |                      `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:133:42
-   |
-LL | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
-   |                              ----------  ^^^^^^^^^^ re-bound here
-   |                              |
-   |                              `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0282]: type annotations needed
-  --> $DIR/duplicate.rs:136:5
-   |
-LL |     iter::empty()
-   |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
-   |
-help: consider specifying the generic argument
-   |
-LL |     iter::empty::<T>()
-   |                +++++
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:139:42
-   |
-LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
-   |                              ----------  ^^^^^^^^^^ re-bound here
-   |                              |
-   |                              `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0282]: type annotations needed
-  --> $DIR/duplicate.rs:142:5
-   |
-LL |     iter::empty()
-   |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
-   |
-help: consider specifying the generic argument
-   |
-LL |     iter::empty::<T>()
-   |                +++++
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:145:45
-   |
-LL | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
-   |                              -------------  ^^^^^^^^^^^^^ re-bound here
-   |                              |
-   |                              `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0282]: type annotations needed
-  --> $DIR/duplicate.rs:148:5
-   |
-LL |     iter::empty()
-   |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
-   |
-help: consider specifying the generic argument
-   |
-LL |     iter::empty::<T>()
-   |                +++++
-
-error: unconstrained opaque type
-  --> $DIR/duplicate.rs:180:51
-   |
-LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
-   |                                                   ^^^^^^^^^
-   |
-   = note: `ETAI1` must be used in combination with a concrete type within the same crate
-
-error: unconstrained opaque type
-  --> $DIR/duplicate.rs:183:51
-   |
-LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
-   |                                                   ^^^^^^^^^
-   |
-   = note: `ETAI2` must be used in combination with a concrete type within the same crate
-
-error: unconstrained opaque type
-  --> $DIR/duplicate.rs:186:57
-   |
-LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
-   |                                                         ^^^^^^^^^
-   |
-   = note: `ETAI3` must be used in combination with a concrete type within the same crate
-
-error: unconstrained opaque type
-  --> $DIR/duplicate.rs:189:14
-   |
-LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `ETAI4` must be used in combination with a concrete type within the same crate
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:189:40
-   |
-LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
-   |                            ----------  ^^^^^^^^^^ re-bound here
-   |                            |
-   |                            `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:189:40
-   |
-LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
-   |                            ----------  ^^^^^^^^^^ re-bound here
-   |                            |
-   |                            `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: unconstrained opaque type
-  --> $DIR/duplicate.rs:193:14
-   |
-LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `ETAI5` must be used in combination with a concrete type within the same crate
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:193:40
-   |
-LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
-   |                            ----------  ^^^^^^^^^^ re-bound here
-   |                            |
-   |                            `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:193:40
-   |
-LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
-   |                            ----------  ^^^^^^^^^^ re-bound here
-   |                            |
-   |                            `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: unconstrained opaque type
-  --> $DIR/duplicate.rs:197:14
-   |
-LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `ETAI6` must be used in combination with a concrete type within the same crate
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:197:43
-   |
-LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
-   |                            -------------  ^^^^^^^^^^^^^ re-bound here
-   |                            |
-   |                            `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:197:43
-   |
-LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
-   |                            -------------  ^^^^^^^^^^^^^ re-bound here
-   |                            |
-   |                            `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: aborting due to 87 previous errors
-
-Some errors have detailed explanations: E0282, E0719.
-For more information about an error, try `rustc --explain E0282`.
diff --git a/tests/ui/associated-types/associated-types-overridden-binding-2.stderr b/tests/ui/associated-types/associated-types-overridden-binding-2.stderr
index 71a4a2610aa..e96a2446b6c 100644
--- a/tests/ui/associated-types/associated-types-overridden-binding-2.stderr
+++ b/tests/ui/associated-types/associated-types-overridden-binding-2.stderr
@@ -1,4 +1,4 @@
-error: conflicting associated type bounds for `Item` when expanding trait alias
+error: conflicting associated type bounds for `Item`
   --> $DIR/associated-types-overridden-binding-2.rs:6:13
    |
 LL | trait I32Iterator = Iterator<Item = i32>;
diff --git a/tests/ui/associated-types/associated-types-overridden-binding.stderr b/tests/ui/associated-types/associated-types-overridden-binding.stderr
index 3b20015dfca..08ab9b63ee9 100644
--- a/tests/ui/associated-types/associated-types-overridden-binding.stderr
+++ b/tests/ui/associated-types/associated-types-overridden-binding.stderr
@@ -22,7 +22,7 @@ note: required by a bound in `I32Iterator`
 LL | trait I32Iterator = Iterator<Item = i32>;
    |                              ^^^^^^^^^^ required by this bound in `I32Iterator`
 
-error: conflicting associated type bounds for `Item` when expanding trait alias
+error: conflicting associated type bounds for `Item`
   --> $DIR/associated-types-overridden-binding.rs:10:13
    |
 LL | trait I32Iterator = Iterator<Item = i32>;
diff --git a/tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.stderr b/tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.current.stderr
index 486e5f94165..f3938ff606f 100644
--- a/tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.stderr
+++ b/tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.current.stderr
@@ -1,5 +1,5 @@
-error: reached the recursion limit while instantiating `ToChain::<'_, '_>::perm_pairs::<{async closure@$DIR/post-mono-higher-ranked-hang.rs:43:45: 43:67}>`
-  --> $DIR/post-mono-higher-ranked-hang.rs:43:21
+error: reached the recursion limit while instantiating `ToChain::<'_, '_>::perm_pairs::<{async closure@$DIR/post-mono-higher-ranked-hang.rs:47:45: 47:67}>`
+  --> $DIR/post-mono-higher-ranked-hang.rs:47:21
    |
 LL | /                     self.perm_pairs(l, &mut async move |left_pair| {
 LL | |
@@ -8,7 +8,7 @@ LL | |                     })
    | |______________________^
    |
 note: `ToChain::<'env, 'db>::perm_pairs` defined here
-  --> $DIR/post-mono-higher-ranked-hang.rs:34:5
+  --> $DIR/post-mono-higher-ranked-hang.rs:38:5
    |
 LL | /     fn perm_pairs<'l>(
 LL | |         &'l self,
diff --git a/tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.next.stderr b/tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.next.stderr
new file mode 100644
index 00000000000..f3938ff606f
--- /dev/null
+++ b/tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.next.stderr
@@ -0,0 +1,21 @@
+error: reached the recursion limit while instantiating `ToChain::<'_, '_>::perm_pairs::<{async closure@$DIR/post-mono-higher-ranked-hang.rs:47:45: 47:67}>`
+  --> $DIR/post-mono-higher-ranked-hang.rs:47:21
+   |
+LL | /                     self.perm_pairs(l, &mut async move |left_pair| {
+LL | |
+LL | |                         self.perm_pairs(r, yield_chain).await
+LL | |                     })
+   | |______________________^
+   |
+note: `ToChain::<'env, 'db>::perm_pairs` defined here
+  --> $DIR/post-mono-higher-ranked-hang.rs:38:5
+   |
+LL | /     fn perm_pairs<'l>(
+LL | |         &'l self,
+LL | |         perm: &'l SymPerm<'db>,
+LL | |         yield_chain: &'l mut impl AsyncFnMut(&SymPerm<'db>),
+LL | |     ) -> Pin<Box<dyn std::future::Future<Output = ()> + 'l>> {
+   | |____________________________________________________________^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.rs b/tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.rs
index f6ebf787f81..55d7cc30ec9 100644
--- a/tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.rs
+++ b/tests/ui/async-await/async-closures/post-mono-higher-ranked-hang.rs
@@ -2,6 +2,10 @@
 //@ aux-build:block-on.rs
 //@ edition:2021
 
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
 // Regression test for <https://github.com/rust-lang/rust/issues/135780>.
 
 extern crate block_on;
diff --git a/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.rs b/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.rs
index 19a31d1889b..f97ec779b32 100644
--- a/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.rs
+++ b/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.rs
@@ -44,4 +44,18 @@ fn through_field_and_ref_move<'a>(x: &S<'a>) {
     outlives::<'a>(call_once(c)); //~ ERROR explicit lifetime required in the type of `x`
 }
 
+struct T;
+impl T {
+    fn outlives<'a>(&'a self, _: impl Sized + 'a) {}
+}
+fn through_method<'a>(x: &'a i32) {
+    let c = async || { println!("{}", *x); }; //~ ERROR `x` does not live long enough
+    T.outlives::<'a>(c());
+    T.outlives::<'a>(call_once(c));
+
+    let c = async move || { println!("{}", *x); };
+    T.outlives::<'a>(c()); //~ ERROR `c` does not live long enough
+    T.outlives::<'a>(call_once(c));
+}
+
 fn main() {}
diff --git a/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.stderr b/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.stderr
index b7259074bf6..4aae9807dd2 100644
--- a/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.stderr
+++ b/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.stderr
@@ -28,6 +28,12 @@ LL |     outlives::<'a>(c());
 LL |     outlives::<'a>(call_once(c));
 LL | }
    | - `c` dropped here while still borrowed
+   |
+note: requirement that the value outlives `'a` introduced here
+  --> $DIR/without-precise-captures-we-are-powerless.rs:7:33
+   |
+LL | fn outlives<'a>(_: impl Sized + 'a) {}
+   |                                 ^^
 
 error[E0597]: `x` does not live long enough
   --> $DIR/without-precise-captures-we-are-powerless.rs:26:13
@@ -73,6 +79,12 @@ LL |     outlives::<'a>(c());
 LL |     outlives::<'a>(call_once(c));
 LL | }
    | - `c` dropped here while still borrowed
+   |
+note: requirement that the value outlives `'a` introduced here
+  --> $DIR/without-precise-captures-we-are-powerless.rs:7:33
+   |
+LL | fn outlives<'a>(_: impl Sized + 'a) {}
+   |                                 ^^
 
 error[E0505]: cannot move out of `c` because it is borrowed
   --> $DIR/without-precise-captures-we-are-powerless.rs:32:30
@@ -89,6 +101,12 @@ LL |     outlives::<'a>(c());
    |     argument requires that `c` is borrowed for `'a`
 LL |     outlives::<'a>(call_once(c));
    |                              ^ move out of `c` occurs here
+   |
+note: requirement that the value outlives `'a` introduced here
+  --> $DIR/without-precise-captures-we-are-powerless.rs:7:33
+   |
+LL | fn outlives<'a>(_: impl Sized + 'a) {}
+   |                                 ^^
 
 error[E0597]: `x` does not live long enough
   --> $DIR/without-precise-captures-we-are-powerless.rs:36:13
@@ -129,6 +147,12 @@ LL |     outlives::<'a>(c());
 LL |     outlives::<'a>(call_once(c));
 LL | }
    | - `c` dropped here while still borrowed
+   |
+note: requirement that the value outlives `'a` introduced here
+  --> $DIR/without-precise-captures-we-are-powerless.rs:7:33
+   |
+LL | fn outlives<'a>(_: impl Sized + 'a) {}
+   |                                 ^^
 
 error[E0621]: explicit lifetime required in the type of `x`
   --> $DIR/without-precise-captures-we-are-powerless.rs:44:5
@@ -141,7 +165,44 @@ help: add explicit lifetime `'a` to the type of `x`
 LL | fn through_field_and_ref_move<'a>(x: &'a S<'a>) {
    |                                       ++
 
-error: aborting due to 10 previous errors
+error[E0597]: `x` does not live long enough
+  --> $DIR/without-precise-captures-we-are-powerless.rs:52:13
+   |
+LL | fn through_method<'a>(x: &'a i32) {
+   |                   -- lifetime `'a` defined here
+LL |     let c = async || { println!("{}", *x); };
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
+LL |     T.outlives::<'a>(c());
+LL |     T.outlives::<'a>(call_once(c));
+   |     ------------------------------ argument requires that `x` is borrowed for `'a`
+...
+LL | }
+   |  - `x` dropped here while still borrowed
+
+error[E0597]: `c` does not live long enough
+  --> $DIR/without-precise-captures-we-are-powerless.rs:57:22
+   |
+LL | fn through_method<'a>(x: &'a i32) {
+   |                   -- lifetime `'a` defined here
+...
+LL |     let c = async move || { println!("{}", *x); };
+   |         - binding `c` declared here
+LL |     T.outlives::<'a>(c());
+   |     -----------------^---
+   |     |                |
+   |     |                borrowed value does not live long enough
+   |     argument requires that `c` is borrowed for `'a`
+LL |     T.outlives::<'a>(call_once(c));
+LL | }
+   | - `c` dropped here while still borrowed
+   |
+note: requirement that the value outlives `'a` introduced here
+  --> $DIR/without-precise-captures-we-are-powerless.rs:49:47
+   |
+LL |     fn outlives<'a>(&'a self, _: impl Sized + 'a) {}
+   |                                               ^^
+
+error: aborting due to 12 previous errors
 
 Some errors have detailed explanations: E0505, E0597, E0621.
 For more information about an error, try `rustc --explain E0505`.
diff --git a/tests/ui/attributes/empty-repr.stderr b/tests/ui/attributes/empty-repr.stderr
index 92901fa170c..6dfa2df75b7 100644
--- a/tests/ui/attributes/empty-repr.stderr
+++ b/tests/ui/attributes/empty-repr.stderr
@@ -4,6 +4,7 @@ error: unused attribute
 LL | #[repr()]
    | ^^^^^^^^^ help: remove this attribute
    |
+   = note: using `repr` with an empty list has no effect
 note: the lint level is defined here
   --> $DIR/empty-repr.rs:4:9
    |
diff --git a/tests/ui/attributes/fn-align-dyn.rs b/tests/ui/attributes/fn-align-dyn.rs
index 3778c75a2ca..91e2dab65a3 100644
--- a/tests/ui/attributes/fn-align-dyn.rs
+++ b/tests/ui/attributes/fn-align-dyn.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ ignore-wasm32 aligning functions is not currently supported on wasm (#143368)
+//@ ignore-backends: gcc
 
 // FIXME(#82232, #143834): temporarily renamed to mitigate `#[align]` nameres ambiguity
 #![feature(rustc_attrs)]
diff --git a/tests/ui/attributes/main-removed-2/main.rs b/tests/ui/attributes/main-removed-2/main.rs
index 53696d68ced..21a05dc4b40 100644
--- a/tests/ui/attributes/main-removed-2/main.rs
+++ b/tests/ui/attributes/main-removed-2/main.rs
@@ -2,6 +2,7 @@
 //@ proc-macro: tokyo.rs
 //@ compile-flags:--extern tokyo
 //@ edition:2021
+//@ ignore-backends: gcc
 
 use tokyo::main;
 
diff --git a/tests/ui/attributes/malformed-attrs.rs b/tests/ui/attributes/malformed-attrs.rs
index e30479b03b1..820484aa015 100644
--- a/tests/ui/attributes/malformed-attrs.rs
+++ b/tests/ui/attributes/malformed-attrs.rs
@@ -185,8 +185,7 @@ extern "C" {
 #[forbid]
 //~^ ERROR malformed
 #[debugger_visualizer]
-//~^ ERROR invalid argument
-//~| ERROR malformed `debugger_visualizer` attribute input
+//~^ ERROR malformed `debugger_visualizer` attribute input
 #[automatically_derived = 18]
 //~^ ERROR malformed
 mod yooo {
diff --git a/tests/ui/attributes/malformed-attrs.stderr b/tests/ui/attributes/malformed-attrs.stderr
index 246029ecf80..70ab3fb13c4 100644
--- a/tests/ui/attributes/malformed-attrs.stderr
+++ b/tests/ui/attributes/malformed-attrs.stderr
@@ -22,7 +22,7 @@ LL | #[cfg_attr(condition, attribute, other_attribute, ...)]
    |           ++++++++++++++++++++++++++++++++++++++++++++
 
 error[E0463]: can't find crate for `wloop`
-  --> $DIR/malformed-attrs.rs:210:1
+  --> $DIR/malformed-attrs.rs:209:1
    |
 LL | extern crate wloop;
    | ^^^^^^^^^^^^^^^^^^^ can't find crate
@@ -156,22 +156,14 @@ LL | #[forbid(lint1, lint2, ...)]
 LL | #[forbid(lint1, lint2, lint3, reason = "...")]
    |         +++++++++++++++++++++++++++++++++++++
 
-error: malformed `debugger_visualizer` attribute input
-  --> $DIR/malformed-attrs.rs:187: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:202:1
+  --> $DIR/malformed-attrs.rs:201:1
    |
 LL | #[thread_local()]
    | ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[thread_local]`
 
 error: malformed `no_link` attribute input
-  --> $DIR/malformed-attrs.rs:206:1
+  --> $DIR/malformed-attrs.rs:205:1
    |
 LL | #[no_link()]
    | ^^^^^^^^^^^^ help: must be of the form: `#[no_link]`
@@ -197,7 +189,7 @@ LL | #[proc_macro_derive]
    | ^^^^^^^^^^^^^^^^^^^^
 
 error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint
-  --> $DIR/malformed-attrs.rs:215:1
+  --> $DIR/malformed-attrs.rs:214:1
    |
 LL | #[allow_internal_unsafe = 1]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -226,16 +218,6 @@ LL | #[doc]
    = 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: invalid argument
-  --> $DIR/malformed-attrs.rs:187:1
-   |
-LL | #[debugger_visualizer]
-   | ^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: expected: `natvis_file = "..."`
-   = note: OR
-   = note: expected: `gdb_script_file = "..."`
-
 error[E0539]: malformed `export_name` attribute input
   --> $DIR/malformed-attrs.rs:29:1
    |
@@ -685,8 +667,19 @@ LL |     #[linkage = "external"]
    |               ++++++++++++
    = and 5 other candidates
 
+error[E0539]: malformed `debugger_visualizer` attribute input
+  --> $DIR/malformed-attrs.rs:187:1
+   |
+LL | #[debugger_visualizer]
+   | ^^^^^^^^^^^^^^^^^^^^^^
+   | |
+   | expected this to be a list
+   | 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[E0565]: malformed `automatically_derived` attribute input
-  --> $DIR/malformed-attrs.rs:190:1
+  --> $DIR/malformed-attrs.rs:189:1
    |
 LL | #[automatically_derived = 18]
    | ^^^^^^^^^^^^^^^^^^^^^^^^----^
@@ -695,7 +688,7 @@ LL | #[automatically_derived = 18]
    | help: must be of the form: `#[automatically_derived]`
 
 error[E0565]: malformed `non_exhaustive` attribute input
-  --> $DIR/malformed-attrs.rs:196:1
+  --> $DIR/malformed-attrs.rs:195:1
    |
 LL | #[non_exhaustive = 1]
    | ^^^^^^^^^^^^^^^^^---^
@@ -704,19 +697,19 @@ 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:208:1
+  --> $DIR/malformed-attrs.rs:207:1
    |
 LL | #[macro_use = 1]
    | ^^^^^^^^^^^^^^^^
 
 error: valid forms for the attribute are `#![macro_export(local_inner_macros)]` and `#![macro_export]`
-  --> $DIR/malformed-attrs.rs:213:1
+  --> $DIR/malformed-attrs.rs:212:1
    |
 LL | #[macro_export = 18]
    | ^^^^^^^^^^^^^^^^^^^^
 
 error[E0565]: malformed `allow_internal_unsafe` attribute input
-  --> $DIR/malformed-attrs.rs:215:1
+  --> $DIR/malformed-attrs.rs:214:1
    |
 LL | #[allow_internal_unsafe = 1]
    | ^^^^^^^^^^^^^^^^^^^^^^^^---^
@@ -800,7 +793,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:222:1
+  --> $DIR/malformed-attrs.rs:221:1
    |
 LL | #[ignore = 1]
    | ^^^^^^^^^^^^^
@@ -819,7 +812,7 @@ LL |     #[coroutine = 63] || {}
    = note: expected unit type `()`
               found coroutine `{coroutine@$DIR/malformed-attrs.rs:110:23: 110:25}`
 
-error: aborting due to 77 previous errors; 3 warnings emitted
+error: aborting due to 76 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`.
@@ -871,7 +864,7 @@ LL | #[ignore()]
 
 Future breakage diagnostic:
 error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
-  --> $DIR/malformed-attrs.rs:222:1
+  --> $DIR/malformed-attrs.rs:221:1
    |
 LL | #[ignore = 1]
    | ^^^^^^^^^^^^^
diff --git a/tests/ui/attributes/unsafe/double-unsafe-attributes.rs b/tests/ui/attributes/unsafe/double-unsafe-attributes.rs
index 894d1327da7..c0181d96053 100644
--- a/tests/ui/attributes/unsafe/double-unsafe-attributes.rs
+++ b/tests/ui/attributes/unsafe/double-unsafe-attributes.rs
@@ -1,7 +1,7 @@
 #[unsafe(unsafe(no_mangle))]
 //~^ ERROR expected identifier, found keyword `unsafe`
 //~| ERROR cannot find attribute `r#unsafe` in this scope
-//~| ERROR `r#unsafe` is not an unsafe attribute
+//~| ERROR unnecessary `unsafe`
 fn a() {}
 
 fn main() {}
diff --git a/tests/ui/attributes/unsafe/double-unsafe-attributes.stderr b/tests/ui/attributes/unsafe/double-unsafe-attributes.stderr
index 0825cf79408..846800daa54 100644
--- a/tests/ui/attributes/unsafe/double-unsafe-attributes.stderr
+++ b/tests/ui/attributes/unsafe/double-unsafe-attributes.stderr
@@ -9,13 +9,11 @@ help: escape `unsafe` to use it as an identifier
 LL | #[unsafe(r#unsafe(no_mangle))]
    |          ++
 
-error: `r#unsafe` is not an unsafe attribute
+error: unnecessary `unsafe` on safe attribute
   --> $DIR/double-unsafe-attributes.rs:1:3
    |
 LL | #[unsafe(unsafe(no_mangle))]
-   |   ^^^^^^ this is not an unsafe attribute
-   |
-   = note: extraneous unsafe is not allowed in attributes
+   |   ^^^^^^
 
 error: cannot find attribute `r#unsafe` in this scope
   --> $DIR/double-unsafe-attributes.rs:1:10
diff --git a/tests/ui/attributes/unsafe/unsafe-safe-attribute_diagnostic.rs b/tests/ui/attributes/unsafe/unsafe-safe-attribute_diagnostic.rs
index 0f241cc439f..d9054248a29 100644
--- a/tests/ui/attributes/unsafe/unsafe-safe-attribute_diagnostic.rs
+++ b/tests/ui/attributes/unsafe/unsafe-safe-attribute_diagnostic.rs
@@ -1,4 +1,4 @@
-#[unsafe(diagnostic::on_unimplemented( //~ ERROR: is not an unsafe attribute
+#[unsafe(diagnostic::on_unimplemented( //~ ERROR: unnecessary `unsafe`
     message = "testing",
 ))]
 trait Foo {}
diff --git a/tests/ui/attributes/unsafe/unsafe-safe-attribute_diagnostic.stderr b/tests/ui/attributes/unsafe/unsafe-safe-attribute_diagnostic.stderr
index 3bc291db5ac..a7662f5ee6c 100644
--- a/tests/ui/attributes/unsafe/unsafe-safe-attribute_diagnostic.stderr
+++ b/tests/ui/attributes/unsafe/unsafe-safe-attribute_diagnostic.stderr
@@ -1,10 +1,8 @@
-error: `diagnostic::on_unimplemented` is not an unsafe attribute
+error: unnecessary `unsafe` on safe attribute
   --> $DIR/unsafe-safe-attribute_diagnostic.rs:1:3
    |
 LL | #[unsafe(diagnostic::on_unimplemented(
-   |   ^^^^^^ this is not an unsafe attribute
-   |
-   = note: extraneous unsafe is not allowed in attributes
+   |   ^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/autodiff/flag_nott.rs b/tests/ui/autodiff/flag_nott.rs
new file mode 100644
index 00000000000..faa9949fe81
--- /dev/null
+++ b/tests/ui/autodiff/flag_nott.rs
@@ -0,0 +1,19 @@
+//@ compile-flags: -Zautodiff=Enable,NoTT
+//@ needs-enzyme
+//@ check-pass
+
+#![feature(autodiff)]
+
+use std::autodiff::autodiff_reverse;
+
+// Test that NoTT flag is accepted and doesn't cause compilation errors
+#[autodiff_reverse(d_square, Duplicated, Active)]
+fn square(x: &f64) -> f64 {
+    x * x
+}
+
+fn main() {
+    let x = 2.0;
+    let mut dx = 0.0;
+    let result = d_square(&x, &mut dx, 1.0);
+}
diff --git a/tests/ui/backtrace/synchronized-panic-handler.rs b/tests/ui/backtrace/synchronized-panic-handler.rs
index 29431ae3c45..ef7cc1faec8 100644
--- a/tests/ui/backtrace/synchronized-panic-handler.rs
+++ b/tests/ui/backtrace/synchronized-panic-handler.rs
@@ -4,6 +4,7 @@
 //@ exec-env:RUST_BACKTRACE=0
 //@ needs-threads
 //@ needs-unwind
+//@ ignore-backends: gcc
 use std::thread;
 const PANIC_MESSAGE: &str = "oops oh no woe is me";
 
diff --git a/tests/ui/backtrace/synchronized-panic-handler.run.stderr b/tests/ui/backtrace/synchronized-panic-handler.run.stderr
index c604d49c193..5296a0d39ff 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>' ($TID) panicked at $DIR/synchronized-panic-handler.rs:11:5:
+thread '<unnamed>' ($TID) panicked at $DIR/synchronized-panic-handler.rs:12:5:
 oops oh no woe is me
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
-thread '<unnamed>' ($TID) panicked at $DIR/synchronized-panic-handler.rs:11:5:
+thread '<unnamed>' ($TID) panicked at $DIR/synchronized-panic-handler.rs:12:5:
 oops oh no woe is me
diff --git a/tests/ui/borrowck/fn-item-check-type-params.stderr b/tests/ui/borrowck/fn-item-check-type-params.stderr
index aafb7e66ef5..7a0a7752a14 100644
--- a/tests/ui/borrowck/fn-item-check-type-params.stderr
+++ b/tests/ui/borrowck/fn-item-check-type-params.stderr
@@ -27,6 +27,12 @@ LL |     want(&String::new(), extend_lt);
    |     |     |
    |     |     creates a temporary value which is freed while still in use
    |     argument requires that borrow lasts for `'static`
+   |
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/fn-item-check-type-params.rs:47:33
+   |
+LL |     fn want<I, O>(_: I, _: impl Fn(I) -> O) {}
+   |                                 ^^^^^^^^^^
 
 error[E0716]: temporary value dropped while borrowed
   --> $DIR/fn-item-check-type-params.rs:54:26
@@ -36,6 +42,12 @@ LL |     let val = extend_lt(&String::from("blah blah blah"));
    |               |          |
    |               |          creates a temporary value which is freed while still in use
    |               argument requires that borrow lasts for `'static`
+   |
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/fn-item-check-type-params.rs:22:21
+   |
+LL |     (T, Option<U>): Displayable,
+   |                     ^^^^^^^^^^^
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr b/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr
index 5389226f7a7..7b840d54ed0 100644
--- a/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr
+++ b/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr
@@ -22,6 +22,12 @@ LL |         force_send(async_load(&not_static));
 ...
 LL |     }
    |     - `not_static` dropped here while still borrowed
+   |
+note: requirement that the value outlives `'1` introduced here
+  --> $DIR/implementation-not-general-enough-ice-133252.rs:16:18
+   |
+LL | fn force_send<T: Send>(_: T) {}
+   |                  ^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/borrowck/issue-17545.stderr b/tests/ui/borrowck/issue-17545.stderr
index 45e977e3947..63fd57cd233 100644
--- a/tests/ui/borrowck/issue-17545.stderr
+++ b/tests/ui/borrowck/issue-17545.stderr
@@ -10,6 +10,9 @@ LL | |     ));
    | |      -- temporary value is freed at the end of this statement
    | |______|
    |        argument requires that borrow lasts for `'a`
+   |
+note: requirement that the value outlives `'a` introduced here
+  --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/box/unit/unwind-unique.rs b/tests/ui/box/unit/unwind-unique.rs
index 1da55c45ee9..ed549f50a74 100644
--- a/tests/ui/box/unit/unwind-unique.rs
+++ b/tests/ui/box/unit/unwind-unique.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::thread;
 
diff --git a/tests/ui/c-variadic/inherent-method.rs b/tests/ui/c-variadic/inherent-method.rs
index 537bae7b3f0..c5256aaa1fe 100644
--- a/tests/ui/c-variadic/inherent-method.rs
+++ b/tests/ui/c-variadic/inherent-method.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ ignore-backends: gcc
 #![feature(c_variadic)]
 
 #[repr(transparent)]
diff --git a/tests/ui/c-variadic/trait-method.rs b/tests/ui/c-variadic/trait-method.rs
index 97da0706a3a..876a303f53b 100644
--- a/tests/ui/c-variadic/trait-method.rs
+++ b/tests/ui/c-variadic/trait-method.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ ignore-backends: gcc
 #![feature(c_variadic)]
 
 #[repr(transparent)]
diff --git a/tests/ui/c-variadic/valid.rs b/tests/ui/c-variadic/valid.rs
index 5a0b32026dc..8b42eb49329 100644
--- a/tests/ui/c-variadic/valid.rs
+++ b/tests/ui/c-variadic/valid.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ ignore-backends: gcc
 #![feature(c_variadic)]
 
 // In rust (and C23 and above) `...` can be the only argument.
diff --git a/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs b/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs
index cafb7389e29..2ca004d9a90 100644
--- a/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs
+++ b/tests/ui/cfg/assume-incomplete-release/assume-incomplete.rs
@@ -2,6 +2,7 @@
 //@ proc-macro: ver-cfg-rel.rs
 //@ revisions: assume no_assume
 //@ [assume]compile-flags: -Z assume-incomplete-release
+//@ ignore-backends: gcc
 
 #![feature(cfg_version)]
 
diff --git a/tests/ui/closures/deduce-signature/obligation-with-leaking-placeholders.next.stderr b/tests/ui/closures/deduce-signature/obligation-with-leaking-placeholders.next.stderr
index 3d667f12371..4bb9047b303 100644
--- a/tests/ui/closures/deduce-signature/obligation-with-leaking-placeholders.next.stderr
+++ b/tests/ui/closures/deduce-signature/obligation-with-leaking-placeholders.next.stderr
@@ -5,7 +5,7 @@ LL |     needs_foo(|x| {
    |                ^
 ...
 LL |         x.to_string();
-   |         - type must be known at this point
+   |           --------- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
diff --git a/tests/ui/closures/impl-closure-147146.rs b/tests/ui/closures/impl-closure-147146.rs
new file mode 100644
index 00000000000..b709e577354
--- /dev/null
+++ b/tests/ui/closures/impl-closure-147146.rs
@@ -0,0 +1,7 @@
+impl typeof(|| {}) {}
+//~^ ERROR `typeof` is a reserved keyword but unimplemented
+
+unsafe impl Send for typeof(|| {}) {}
+//~^ ERROR `typeof` is a reserved keyword but unimplemented
+
+fn main() {}
diff --git a/tests/ui/closures/impl-closure-147146.stderr b/tests/ui/closures/impl-closure-147146.stderr
new file mode 100644
index 00000000000..6da16b5d450
--- /dev/null
+++ b/tests/ui/closures/impl-closure-147146.stderr
@@ -0,0 +1,15 @@
+error[E0516]: `typeof` is a reserved keyword but unimplemented
+  --> $DIR/impl-closure-147146.rs:1:6
+   |
+LL | impl typeof(|| {}) {}
+   |      ^^^^^^^^^^^^^ reserved keyword
+
+error[E0516]: `typeof` is a reserved keyword but unimplemented
+  --> $DIR/impl-closure-147146.rs:4:22
+   |
+LL | unsafe impl Send for typeof(|| {}) {}
+   |                      ^^^^^^^^^^^^^ reserved keyword
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0516`.
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/undeclared-lifetime.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/undeclared-lifetime.rs
new file mode 100644
index 00000000000..0a0dca804ef
--- /dev/null
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/undeclared-lifetime.rs
@@ -0,0 +1,21 @@
+//@ add-core-stubs
+//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
+//@ incremental (required to trigger the bug)
+//@ needs-llvm-components: arm
+#![feature(abi_cmse_nonsecure_call, no_core)]
+#![no_core]
+
+extern crate minicore;
+use minicore::*;
+
+// A regression test for https://github.com/rust-lang/rust/issues/131639.
+// NOTE: `-Cincremental` was required for triggering the bug.
+
+fn foo() {
+    id::<extern "cmse-nonsecure-call" fn(&'a ())>(PhantomData);
+    //~^ ERROR use of undeclared lifetime name `'a`
+}
+
+fn id<T>(x: PhantomData<T>) -> PhantomData<T> {
+    x
+}
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/undeclared-lifetime.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/undeclared-lifetime.stderr
new file mode 100644
index 00000000000..7300bdb72cd
--- /dev/null
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/undeclared-lifetime.stderr
@@ -0,0 +1,19 @@
+error[E0261]: use of undeclared lifetime name `'a`
+  --> $DIR/undeclared-lifetime.rs:15:43
+   |
+LL |     id::<extern "cmse-nonsecure-call" fn(&'a ())>(PhantomData);
+   |                                           ^^ undeclared lifetime
+   |
+   = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
+help: consider making the type lifetime-generic with a new `'a` lifetime
+   |
+LL |     id::<for<'a> extern "cmse-nonsecure-call" fn(&'a ())>(PhantomData);
+   |          +++++++
+help: consider introducing lifetime `'a` here
+   |
+LL | fn foo<'a>() {
+   |       ++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0261`.
diff --git a/tests/ui/codegen/issue-82833-slice-miscompile.rs b/tests/ui/codegen/issue-82833-slice-miscompile.rs
index 32eac923a63..e0cb8716629 100644
--- a/tests/ui/codegen/issue-82833-slice-miscompile.rs
+++ b/tests/ui/codegen/issue-82833-slice-miscompile.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ compile-flags: -Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Copt-level=0 -Cdebuginfo=2
+//@ ignore-backends: gcc
 
 // Make sure LLVM does not miscompile this.
 
diff --git a/tests/ui/codegen/llvm-args-invalid-flag.rs b/tests/ui/codegen/llvm-args-invalid-flag.rs
index a8fa55a220a..f88a7101abd 100644
--- a/tests/ui/codegen/llvm-args-invalid-flag.rs
+++ b/tests/ui/codegen/llvm-args-invalid-flag.rs
@@ -1,6 +1,7 @@
 //@ compile-flags: -Cllvm-args=-not-a-real-llvm-arg
 //@ normalize-stderr: "--help" -> "-help"
 //@ normalize-stderr: "\n(\n|.)*" -> ""
+//@ ignore-backends: gcc
 
 // I'm seeing "--help" locally, but "-help" in CI, so I'm normalizing it to just "-help".
 
diff --git a/tests/ui/codegen/remark-flag-functionality.rs b/tests/ui/codegen/remark-flag-functionality.rs
index 797c55ba830..4cfc5f5c8ec 100644
--- a/tests/ui/codegen/remark-flag-functionality.rs
+++ b/tests/ui/codegen/remark-flag-functionality.rs
@@ -17,6 +17,7 @@
 
 //@ dont-check-compiler-stderr
 //@ dont-require-annotations: NOTE
+//@ ignore-backends: gcc
 
 #[no_mangle]
 #[inline(never)]
diff --git a/tests/ui/codegen/virtual-function-elimination.rs b/tests/ui/codegen/virtual-function-elimination.rs
index 3cbeb1293e5..90fc86f95c5 100644
--- a/tests/ui/codegen/virtual-function-elimination.rs
+++ b/tests/ui/codegen/virtual-function-elimination.rs
@@ -2,6 +2,7 @@
 //@ compile-flags: -Zvirtual-function-elimination=true -Clto=true
 //@ only-x86_64
 //@ no-prefer-dynamic
+//@ ignore-backends: gcc
 
 // issue #123955
 pub fn test0() {
diff --git a/tests/ui/coercion/no_local_for_coerced_const-issue-143671.rs b/tests/ui/coercion/no_local_for_coerced_const-issue-143671.rs
new file mode 100644
index 00000000000..38479d9070b
--- /dev/null
+++ b/tests/ui/coercion/no_local_for_coerced_const-issue-143671.rs
@@ -0,0 +1,46 @@
+//@ run-pass
+
+#![feature(unsize)]
+#![feature(coerce_unsized)]
+
+use std::fmt::Display;
+use std::marker::Unsize;
+use std::ops::CoerceUnsized;
+use std::rc::Weak;
+
+#[repr(transparent)]
+struct X<'a, T: ?Sized> {
+    f: &'a T,
+}
+
+impl<'a, T: ?Sized> Drop for X<'a, T> {
+    fn drop(&mut self) {
+        panic!()
+    }
+}
+
+impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<X<'a, U>> for X<'a, T> where
+    &'a T: CoerceUnsized<&'a U>
+{
+}
+
+const Y: X<'static, i32> = X { f: &0 };
+
+fn main() {
+    let _: [X<'static, dyn Display>; 0] = [Y; 0];
+    coercion_on_weak_in_const();
+    coercion_on_weak_as_cast();
+}
+
+fn coercion_on_weak_in_const() {
+    const X: Weak<i32> = Weak::new();
+    const Y: [Weak<dyn Send>; 0] = [X; 0];
+    let _ = Y;
+}
+
+fn coercion_on_weak_as_cast() {
+    const Y: X<'static, i32> = X { f: &0 };
+    // What happens in the following code is that
+    // a constant is explicitly coerced into
+    let _a: [X<'static, dyn Display>; 0] = [Y as X<'static, dyn Display>; 0];
+}
diff --git a/tests/ui/compiletest-self-test/compile-flags-incremental.rs b/tests/ui/compiletest-self-test/compile-flags-incremental.rs
new file mode 100644
index 00000000000..62a1ad84d8f
--- /dev/null
+++ b/tests/ui/compiletest-self-test/compile-flags-incremental.rs
@@ -0,0 +1,17 @@
+//@ revisions: good bad bad-space
+//@ check-pass
+
+//@[bad] compile-flags: -Cincremental=true
+//@[bad] should-fail
+
+//@[bad-space] compile-flags:  -C  incremental=dir
+//@[bad-space] should-fail
+
+fn main() {}
+
+// Tests should not try to manually enable incremental compilation with
+// `-Cincremental`, because that typically results in stray directories being
+// created in the repository root.
+//
+// Instead, use the `//@ incremental` directive, which instructs compiletest
+// to handle the details of passing `-Cincremental` with a fresh directory.
diff --git a/tests/ui/const-generics/adt_const_params/unsized_field-1.stderr b/tests/ui/const-generics/adt_const_params/unsized_field-1.stderr
index a5ae5c726da..134dbba0d63 100644
--- a/tests/ui/const-generics/adt_const_params/unsized_field-1.stderr
+++ b/tests/ui/const-generics/adt_const_params/unsized_field-1.stderr
@@ -7,7 +7,7 @@ LL |
 LL | struct A([u8]);
    |          ---- this field does not implement `ConstParamTy_`
    |
-note: the `ConstParamTy_` impl for `[u8]` requires that `unstable feature: `unsized_const_params``
+note: the `ConstParamTy_` impl for `[u8]` requires that `feature(unsized_const_params) is enabled`
   --> $DIR/unsized_field-1.rs:10:10
    |
 LL | struct A([u8]);
@@ -22,7 +22,7 @@ LL |
 LL | struct B(&'static [u8]);
    |          ------------- this field does not implement `ConstParamTy_`
    |
-note: the `ConstParamTy_` impl for `&'static [u8]` requires that `unstable feature: `unsized_const_params``
+note: the `ConstParamTy_` impl for `&'static [u8]` requires that `feature(unsized_const_params) is enabled`
   --> $DIR/unsized_field-1.rs:14:10
    |
 LL | struct B(&'static [u8]);
@@ -37,7 +37,7 @@ LL |
 LL | struct D(unsized_const_param::GenericNotUnsizedParam<&'static [u8]>);
    |          ---------------------------------------------------------- this field does not implement `ConstParamTy_`
    |
-note: the `ConstParamTy_` impl for `GenericNotUnsizedParam<&'static [u8]>` requires that `unstable feature: `unsized_const_params``
+note: the `ConstParamTy_` impl for `GenericNotUnsizedParam<&'static [u8]>` requires that `feature(unsized_const_params) is enabled`
   --> $DIR/unsized_field-1.rs:21:10
    |
 LL | struct D(unsized_const_param::GenericNotUnsizedParam<&'static [u8]>);
diff --git a/tests/ui/const-generics/forbid-non-structural_match-types.stderr b/tests/ui/const-generics/forbid-non-structural_match-types.stderr
index 8ef629329f1..94afded9469 100644
--- a/tests/ui/const-generics/forbid-non-structural_match-types.stderr
+++ b/tests/ui/const-generics/forbid-non-structural_match-types.stderr
@@ -6,8 +6,8 @@ LL | struct D<const X: C>;
    |
 help: add `#[derive(ConstParamTy, PartialEq, Eq)]` to the struct
    |
-LL - struct C;
 LL + #[derive(ConstParamTy, PartialEq, Eq)]
+LL | struct C;
    |
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_arg_infer/in-signature.stderr b/tests/ui/const-generics/generic_arg_infer/in-signature.stderr
index b6f2662a939..d7a7ab52c83 100644
--- a/tests/ui/const-generics/generic_arg_infer/in-signature.stderr
+++ b/tests/ui/const-generics/generic_arg_infer/in-signature.stderr
@@ -2,29 +2,39 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/in-signature.rs:6:21
    |
 LL | fn arr_fn() -> [u8; _] {
-   |                -----^-
-   |                |    |
-   |                |    not allowed in type signatures
-   |                help: replace with the correct return type: `[u8; 3]`
+   |                     ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - fn arr_fn() -> [u8; _] {
+LL + fn arr_fn() -> [u8; 3] {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/in-signature.rs:11:24
    |
 LL | fn ty_fn() -> Bar<i32, _> {
-   |               ---------^-
-   |               |        |
-   |               |        not allowed in type signatures
-   |               help: replace with the correct return type: `Bar<i32, 3>`
+   |                        ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - fn ty_fn() -> Bar<i32, _> {
+LL + fn ty_fn() -> Bar<i32, 3> {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/in-signature.rs:16:25
    |
 LL | fn ty_fn_mixed() -> Bar<_, _> {
-   |                     ----^--^-
-   |                     |   |  |
-   |                     |   |  not allowed in type signatures
-   |                     |   not allowed in type signatures
-   |                     help: replace with the correct return type: `Bar<i32, 3>`
+   |                         ^  ^ not allowed in type signatures
+   |                         |
+   |                         not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - fn ty_fn_mixed() -> Bar<_, _> {
+LL + fn ty_fn_mixed() -> Bar<i32, 3> {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
   --> $DIR/in-signature.rs:21:20
diff --git a/tests/ui/const-generics/issue-80471.stderr b/tests/ui/const-generics/issue-80471.stderr
index 8cf3d68e5d6..fff2eb53cf1 100644
--- a/tests/ui/const-generics/issue-80471.stderr
+++ b/tests/ui/const-generics/issue-80471.stderr
@@ -4,10 +4,10 @@ error[E0741]: `Nat` must implement `ConstParamTy` to be used as the type of a co
 LL | fn foo<const N: Nat>() {}
    |                 ^^^
    |
-help: add `#[derive(ConstParamTy)]` to the struct
+help: add `#[derive(ConstParamTy)]` to the enum
    |
-LL - enum Nat {
 LL + #[derive(ConstParamTy)]
+LL | enum Nat {
    |
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/issues/issue-97278.stderr b/tests/ui/const-generics/issues/issue-97278.stderr
index 4894ddb7b8d..21a5fc94032 100644
--- a/tests/ui/const-generics/issues/issue-97278.stderr
+++ b/tests/ui/const-generics/issues/issue-97278.stderr
@@ -4,10 +4,10 @@ error[E0741]: `Bar` must implement `ConstParamTy` to be used as the type of a co
 LL | fn test<const BAR: Bar>() {}
    |                    ^^^
    |
-help: add `#[derive(ConstParamTy)]` to the struct
+help: add `#[derive(ConstParamTy)]` to the enum
    |
-LL - enum Bar {
 LL + #[derive(ConstParamTy)]
+LL | enum Bar {
    |
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/consts/const-eval/ub-nonnull.rs b/tests/ui/consts/const-eval/ub-nonnull.rs
index 91646842624..851f3996cd1 100644
--- a/tests/ui/consts/const-eval/ub-nonnull.rs
+++ b/tests/ui/consts/const-eval/ub-nonnull.rs
@@ -57,4 +57,8 @@ const NULL_FAT_PTR: NonNull<dyn Send> = unsafe {
     mem::transmute((0_usize, meta))
 };
 
+static S: u32 = 0; // just a static to construct a maybe-null pointer off of
+const MAYBE_NULL_PTR: NonNull<()> = unsafe { mem::transmute((&raw const S).wrapping_add(4)) };
+//~^ ERROR invalid value
+
 fn main() {}
diff --git a/tests/ui/consts/const-eval/ub-nonnull.stderr b/tests/ui/consts/const-eval/ub-nonnull.stderr
index 91c82efbc5e..e4486e3c500 100644
--- a/tests/ui/consts/const-eval/ub-nonnull.stderr
+++ b/tests/ui/consts/const-eval/ub-nonnull.stderr
@@ -9,7 +9,7 @@ LL | const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
                HEX_DUMP
            }
 
-error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by 255 bytes, but got ALLOC1 which is only 1 byte from the end of the allocation
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by 255 bytes, but got ALLOC2 which is only 1 byte from the end of the allocation
   --> $DIR/ub-nonnull.rs:22:29
    |
 LL |     let out_of_bounds_ptr = &ptr[255];
@@ -37,7 +37,7 @@ LL | const NULL_USIZE: NonZero<usize> = unsafe { mem::transmute(0usize) };
                HEX_DUMP
            }
 
-error[E0080]: reading memory at ALLOC2[0x0..0x1], but memory is uninitialized at [0x0..0x1], and this operation requires initialized memory
+error[E0080]: reading memory at ALLOC3[0x0..0x1], but memory is uninitialized at [0x0..0x1], and this operation requires initialized memory
   --> $DIR/ub-nonnull.rs:36:38
    |
 LL | const UNINIT: NonZero<u8> = unsafe { MaybeUninit { uninit: () }.init };
@@ -80,6 +80,17 @@ LL | const NULL_FAT_PTR: NonNull<dyn Send> = unsafe {
                HEX_DUMP
            }
 
-error: aborting due to 8 previous errors
+error[E0080]: constructing invalid value: encountered a maybe-null pointer, but expected something that is definitely non-zero
+  --> $DIR/ub-nonnull.rs:61:1
+   |
+LL | const MAYBE_NULL_PTR: NonNull<()> = unsafe { mem::transmute((&raw const S).wrapping_add(4)) };
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
+   |
+   = note: the rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
+   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
+
+error: aborting due to 9 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.rs b/tests/ui/consts/const-eval/ub-ref-ptr.rs
index d8e5102fcbe..a5fdde1f9a4 100644
--- a/tests/ui/consts/const-eval/ub-ref-ptr.rs
+++ b/tests/ui/consts/const-eval/ub-ref-ptr.rs
@@ -4,7 +4,7 @@
 //@ normalize-stderr: "([0-9a-f][0-9a-f] |__ |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
 //@ dont-require-annotations: NOTE
 //@ normalize-stderr: "0x[0-9](\.\.|\])" -> "0x%$1"
-
+#![feature(rustc_attrs)]
 #![allow(invalid_value)]
 
 use std::mem;
@@ -27,6 +27,11 @@ const NULL: &u16 = unsafe { mem::transmute(0usize) };
 const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
 //~^ ERROR invalid value
 
+const MAYBE_NULL_BOX: Box<()> = unsafe { mem::transmute({
+//~^ ERROR maybe-null
+    let ref_ = &0u8;
+    (ref_ as *const u8).wrapping_add(10)
+}) };
 
 // It is very important that we reject this: We do promote `&(4 * REF_AS_USIZE)`,
 // but that would fail to compile; so we ended up breaking user code that would
@@ -57,7 +62,12 @@ const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
 //~^ ERROR invalid value
 const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
 //~^ ERROR invalid value
-
+const MAYBE_NULL_FN_PTR: fn() = unsafe { mem::transmute({
+//~^ ERROR invalid value
+    fn fun() {}
+    let ptr = fun as fn();
+    (ptr as *const u8).wrapping_add(10)
+}) };
 
 const UNALIGNED_READ: () = unsafe {
     let x = &[0u8; 4];
@@ -65,5 +75,14 @@ const UNALIGNED_READ: () = unsafe {
     ptr.read(); //~ ERROR accessing memory
 };
 
+// Check the general case of a pointer value not falling into the scalar valid range.
+#[rustc_layout_scalar_valid_range_start(1000)]
+pub struct High {
+    pointer: *const (),
+}
+static S: u32 = 0; // just a static to construct a pointer with unknown absolute address
+const INVALID_VALUE_PTR: High = unsafe { mem::transmute(&S) };
+//~^ ERROR invalid value
+
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.stderr b/tests/ui/consts/const-eval/ub-ref-ptr.stderr
index c45f66c2925..349a98f11be 100644
--- a/tests/ui/consts/const-eval/ub-ref-ptr.stderr
+++ b/tests/ui/consts/const-eval/ub-ref-ptr.stderr
@@ -42,8 +42,19 @@ LL | const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
                HEX_DUMP
            }
 
+error[E0080]: constructing invalid value: encountered a maybe-null box
+  --> $DIR/ub-ref-ptr.rs:30:1
+   |
+LL | const MAYBE_NULL_BOX: Box<()> = unsafe { mem::transmute({
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
+   |
+   = note: the rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
+   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
+
 error[E0080]: unable to turn pointer into integer
-  --> $DIR/ub-ref-ptr.rs:34:1
+  --> $DIR/ub-ref-ptr.rs:39:1
    |
 LL | const REF_AS_USIZE: usize = unsafe { mem::transmute(&0) };
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `REF_AS_USIZE` failed here
@@ -52,7 +63,7 @@ LL | const REF_AS_USIZE: usize = unsafe { mem::transmute(&0) };
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
 error[E0080]: unable to turn pointer into integer
-  --> $DIR/ub-ref-ptr.rs:37:39
+  --> $DIR/ub-ref-ptr.rs:42:39
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `REF_AS_USIZE_SLICE` failed here
@@ -61,13 +72,13 @@ LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
 note: erroneous constant encountered
-  --> $DIR/ub-ref-ptr.rs:37:38
+  --> $DIR/ub-ref-ptr.rs:42:38
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0080]: unable to turn pointer into integer
-  --> $DIR/ub-ref-ptr.rs:40:86
+  --> $DIR/ub-ref-ptr.rs:45:86
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
    |                                                                                      ^^^^^^^^^^^^^^^^^^^^ evaluation of `REF_AS_USIZE_BOX_SLICE` failed here
@@ -76,13 +87,13 @@ LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[us
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
 note: erroneous constant encountered
-  --> $DIR/ub-ref-ptr.rs:40:85
+  --> $DIR/ub-ref-ptr.rs:45:85
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
    |                                                                                     ^^^^^^^^^^^^^^^^^^^^^
 
 error[E0080]: constructing invalid value: encountered a dangling reference (0x539[noalloc] has no provenance)
-  --> $DIR/ub-ref-ptr.rs:43:1
+  --> $DIR/ub-ref-ptr.rs:48:1
    |
 LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
@@ -93,7 +104,7 @@ LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
            }
 
 error[E0080]: constructing invalid value: encountered a dangling box (0x539[noalloc] has no provenance)
-  --> $DIR/ub-ref-ptr.rs:46:1
+  --> $DIR/ub-ref-ptr.rs:51:1
    |
 LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
@@ -103,8 +114,8 @@ LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
                HEX_DUMP
            }
 
-error[E0080]: reading memory at ALLOC3[0x%..0x%], but memory is uninitialized at [0x%..0x%], and this operation requires initialized memory
-  --> $DIR/ub-ref-ptr.rs:49:41
+error[E0080]: reading memory at ALLOC6[0x%..0x%], but memory is uninitialized at [0x%..0x%], and this operation requires initialized memory
+  --> $DIR/ub-ref-ptr.rs:54:41
    |
 LL | const UNINIT_PTR: *const i32 = unsafe { MaybeUninit { uninit: () }.init };
    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `UNINIT_PTR` failed here
@@ -114,7 +125,7 @@ LL | const UNINIT_PTR: *const i32 = unsafe { MaybeUninit { uninit: () }.init };
            }
 
 error[E0080]: constructing invalid value: encountered null pointer, but expected a function pointer
-  --> $DIR/ub-ref-ptr.rs:52:1
+  --> $DIR/ub-ref-ptr.rs:57:1
    |
 LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
    | ^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
@@ -124,8 +135,8 @@ LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
                HEX_DUMP
            }
 
-error[E0080]: reading memory at ALLOC4[0x%..0x%], but memory is uninitialized at [0x%..0x%], and this operation requires initialized memory
-  --> $DIR/ub-ref-ptr.rs:54:38
+error[E0080]: reading memory at ALLOC7[0x%..0x%], but memory is uninitialized at [0x%..0x%], and this operation requires initialized memory
+  --> $DIR/ub-ref-ptr.rs:59:38
    |
 LL | const UNINIT_FN_PTR: fn() = unsafe { MaybeUninit { uninit: () }.init };
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `UNINIT_FN_PTR` failed here
@@ -135,7 +146,7 @@ LL | const UNINIT_FN_PTR: fn() = unsafe { MaybeUninit { uninit: () }.init };
            }
 
 error[E0080]: constructing invalid value: encountered 0xd[noalloc], but expected a function pointer
-  --> $DIR/ub-ref-ptr.rs:56:1
+  --> $DIR/ub-ref-ptr.rs:61:1
    |
 LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
@@ -145,8 +156,8 @@ LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
                HEX_DUMP
            }
 
-error[E0080]: constructing invalid value: encountered ALLOC2<imm>, but expected a function pointer
-  --> $DIR/ub-ref-ptr.rs:58:1
+error[E0080]: constructing invalid value: encountered ALLOC3<imm>, but expected a function pointer
+  --> $DIR/ub-ref-ptr.rs:63:1
    |
 LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
    | ^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
@@ -156,12 +167,34 @@ LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
                HEX_DUMP
            }
 
+error[E0080]: constructing invalid value: encountered ALLOC4+0xa, but expected a function pointer
+  --> $DIR/ub-ref-ptr.rs:65:1
+   |
+LL | const MAYBE_NULL_FN_PTR: fn() = unsafe { mem::transmute({
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
+   |
+   = note: the rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
+   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
+
 error[E0080]: accessing memory based on pointer with alignment 1, but alignment 4 is required
-  --> $DIR/ub-ref-ptr.rs:65:5
+  --> $DIR/ub-ref-ptr.rs:75:5
    |
 LL |     ptr.read();
    |     ^^^^^^^^^^ evaluation of `UNALIGNED_READ` failed here
 
-error: aborting due to 15 previous errors
+error[E0080]: constructing invalid value: encountered a pointer with unknown absolute address, but expected something that is definitely greater or equal to 1000
+  --> $DIR/ub-ref-ptr.rs:84:1
+   |
+LL | const INVALID_VALUE_PTR: High = unsafe { mem::transmute(&S) };
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
+   |
+   = note: the rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
+   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
+
+error: aborting due to 18 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const_transmute_type_id7.rs b/tests/ui/consts/const_transmute_type_id7.rs
new file mode 100644
index 00000000000..73b8187a800
--- /dev/null
+++ b/tests/ui/consts/const_transmute_type_id7.rs
@@ -0,0 +1,16 @@
+//! Ensure a decent error message for maybe-null references.
+//! (see <https://github.com/rust-lang/rust/issues/146748>)
+
+// Strip out raw byte dumps to make comparison platform-independent:
+//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
+//@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
+
+#![feature(const_trait_impl, const_cmp)]
+
+use std::any::TypeId;
+use std::mem::transmute;
+
+const A: [&(); 16 / size_of::<*const ()>()] = unsafe { transmute(TypeId::of::<i32>()) };
+//~^ERROR: maybe-null
+
+fn main() {}
diff --git a/tests/ui/consts/const_transmute_type_id7.stderr b/tests/ui/consts/const_transmute_type_id7.stderr
new file mode 100644
index 00000000000..664975831f4
--- /dev/null
+++ b/tests/ui/consts/const_transmute_type_id7.stderr
@@ -0,0 +1,14 @@
+error[E0080]: constructing invalid value at [0]: encountered a maybe-null reference
+  --> $DIR/const_transmute_type_id7.rs:13:1
+   |
+LL | const A: [&(); 16 / size_of::<*const ()>()] = unsafe { transmute(TypeId::of::<i32>()) };
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
+   |
+   = note: the rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
+   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/refs_check_const_eq-issue-88384.stderr b/tests/ui/consts/refs_check_const_eq-issue-88384.stderr
index 65e4dc22c28..62c5c527641 100644
--- a/tests/ui/consts/refs_check_const_eq-issue-88384.stderr
+++ b/tests/ui/consts/refs_check_const_eq-issue-88384.stderr
@@ -15,8 +15,8 @@ LL | struct Foo<const T: CompileTimeSettings>;
    |
 help: add `#[derive(ConstParamTy)]` to the struct
    |
-LL - struct CompileTimeSettings {
 LL + #[derive(ConstParamTy)]
+LL | struct CompileTimeSettings {
    |
 
 error[E0741]: `CompileTimeSettings` must implement `ConstParamTy` to be used as the type of a const generic parameter
@@ -27,8 +27,8 @@ LL | impl<const T: CompileTimeSettings> Foo<T> {
    |
 help: add `#[derive(ConstParamTy)]` to the struct
    |
-LL - struct CompileTimeSettings {
 LL + #[derive(ConstParamTy)]
+LL | struct CompileTimeSettings {
    |
 
 error: aborting due to 2 previous errors; 1 warning emitted
diff --git a/tests/ui/coroutine/copy-fast-path-query-cycle.rs b/tests/ui/coroutine/copy-fast-path-query-cycle.rs
new file mode 100644
index 00000000000..644cba0d47a
--- /dev/null
+++ b/tests/ui/coroutine/copy-fast-path-query-cycle.rs
@@ -0,0 +1,40 @@
+//@ edition: 2024
+//@ revisions: current next
+//@[next] compile-flags: -Znext-solver
+//@ check-pass
+
+// Regression test for #146813. We previously used a pseudo-canonical
+// query during HIR typeck which caused a query cycle when looking at the
+// witness of a coroutine.
+
+use std::future::Future;
+
+trait ConnectMiddleware {}
+
+trait ConnectHandler: Sized {
+    fn with<M>(self, _: M) -> impl ConnectHandler
+    where
+        M: ConnectMiddleware,
+    {
+        LayeredConnectHandler
+    }
+}
+
+struct LayeredConnectHandler;
+impl ConnectHandler for LayeredConnectHandler {}
+impl<F> ConnectHandler for F where F: FnOnce() {}
+
+impl<F, Fut> ConnectMiddleware for F
+where
+    F: FnOnce() -> Fut,
+    Fut: Future<Output = ()> + Send,
+{
+}
+
+pub async fn fails() {
+    { || {} }
+        .with(async || ())
+        .with(async || ())
+        .with(async || ());
+}
+fn main() {}
diff --git a/tests/ui/coroutine/gen_block_panic.rs b/tests/ui/coroutine/gen_block_panic.rs
index b6362d5046a..5417ed583e8 100644
--- a/tests/ui/coroutine/gen_block_panic.rs
+++ b/tests/ui/coroutine/gen_block_panic.rs
@@ -1,6 +1,7 @@
 //@ edition: 2024
 //@ run-pass
 //@ needs-unwind
+//@ ignore-backends: gcc
 #![feature(gen_blocks)]
 
 fn main() {
diff --git a/tests/ui/coroutine/gen_block_panic.stderr b/tests/ui/coroutine/gen_block_panic.stderr
index a43c9e03691..d0a146e7baf 100644
--- a/tests/ui/coroutine/gen_block_panic.stderr
+++ b/tests/ui/coroutine/gen_block_panic.stderr
@@ -1,5 +1,5 @@
 warning: unreachable statement
-  --> $DIR/gen_block_panic.rs:10:9
+  --> $DIR/gen_block_panic.rs:11:9
    |
 LL |         panic!("foo");
    |         ------------- any code following this expression is unreachable
diff --git a/tests/ui/coroutine/handle_opaques_before_coroutines.rs b/tests/ui/coroutine/handle_opaques_before_coroutines.rs
new file mode 100644
index 00000000000..2771c77429c
--- /dev/null
+++ b/tests/ui/coroutine/handle_opaques_before_coroutines.rs
@@ -0,0 +1,15 @@
+// test for https://github.com/rust-lang/trait-system-refactor-initiative/issues/239
+//@edition: 2024
+//@ check-pass
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
+fn foo<'a>() -> impl Send {
+    if false {
+        foo();
+    }
+    async {}
+}
+
+fn main() {}
diff --git a/tests/ui/delegation/fn-header-variadic.rs b/tests/ui/delegation/fn-header-variadic.rs
index 2c83d64d0b3..346c49f08e5 100644
--- a/tests/ui/delegation/fn-header-variadic.rs
+++ b/tests/ui/delegation/fn-header-variadic.rs
@@ -1,4 +1,5 @@
 //@ aux-crate:fn_header_aux=fn-header-aux.rs
+//@ ignore-backends: gcc
 
 #![feature(c_variadic)]
 #![feature(fn_delegation)]
diff --git a/tests/ui/delegation/fn-header-variadic.stderr b/tests/ui/delegation/fn-header-variadic.stderr
index 688a965fb4d..c2d7672939f 100644
--- a/tests/ui/delegation/fn-header-variadic.stderr
+++ b/tests/ui/delegation/fn-header-variadic.stderr
@@ -1,5 +1,5 @@
 error: delegation to C-variadic functions is not allowed
-  --> $DIR/fn-header-variadic.rs:11:17
+  --> $DIR/fn-header-variadic.rs:12:17
    |
 LL |     pub unsafe extern "C" fn variadic_fn(n: usize, mut args: ...) {}
    |     ------------------------------------------------------------- callee defined here
@@ -8,7 +8,7 @@ LL | reuse to_reuse::variadic_fn;
    |                 ^^^^^^^^^^^
 
 error: delegation to C-variadic functions is not allowed
-  --> $DIR/fn-header-variadic.rs:13:22
+  --> $DIR/fn-header-variadic.rs:14:22
    |
 LL | reuse fn_header_aux::variadic_fn_extern;
    |                      ^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/drop/drop-trait-enum.rs b/tests/ui/drop/drop-trait-enum.rs
index 5a88d959ec6..efb6b2a912a 100644
--- a/tests/ui/drop/drop-trait-enum.rs
+++ b/tests/ui/drop/drop-trait-enum.rs
@@ -4,6 +4,7 @@
 #![allow(unused_variables)]
 //@ needs-threads
 //@ needs-unwind
+//@ ignore-backends: gcc
 
 use std::thread;
 use std::sync::mpsc::{channel, Sender};
diff --git a/tests/ui/drop/terminate-in-initializer.rs b/tests/ui/drop/terminate-in-initializer.rs
index 24ec39fe096..5dd8fe43c71 100644
--- a/tests/ui/drop/terminate-in-initializer.rs
+++ b/tests/ui/drop/terminate-in-initializer.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // Issue #787
 // Don't try to clean up uninitialized locals
diff --git a/tests/ui/empty/empty-attributes.stderr b/tests/ui/empty/empty-attributes.stderr
index f0be56ddc6a..41dc790737d 100644
--- a/tests/ui/empty/empty-attributes.stderr
+++ b/tests/ui/empty/empty-attributes.stderr
@@ -56,12 +56,16 @@ error: unused attribute
    |
 LL | #[repr()]
    | ^^^^^^^^^ help: remove this attribute
+   |
+   = note: using `repr` with an empty list has no effect
 
 error: unused attribute
   --> $DIR/empty-attributes.rs:12:1
    |
 LL | #[target_feature()]
    | ^^^^^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+   = note: using `target_feature` with an empty list has no effect
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/error-codes/E0121.stderr b/tests/ui/error-codes/E0121.stderr
index b169373f643..074929c4e74 100644
--- a/tests/ui/error-codes/E0121.stderr
+++ b/tests/ui/error-codes/E0121.stderr
@@ -2,10 +2,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/E0121.rs:1:13
    |
 LL | fn foo() -> _ { 5 }
-   |             ^
-   |             |
-   |             not allowed in type signatures
-   |             help: replace with the correct return type: `i32`
+   |             ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - fn foo() -> _ { 5 }
+LL + fn foo() -> i32 { 5 }
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
   --> $DIR/E0121.rs:3:13
diff --git a/tests/ui/error-codes/E0719.rs b/tests/ui/error-codes/E0719.rs
index 0ea6d19000b..d7b4b876d1b 100644
--- a/tests/ui/error-codes/E0719.rs
+++ b/tests/ui/error-codes/E0719.rs
@@ -1,8 +1,3 @@
-trait Foo: Iterator<Item = i32, Item = i32> {}
-//~^ ERROR is already specified
-//~| ERROR is already specified
-//~| ERROR is already specified
-
 type Unit = ();
 
 fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
diff --git a/tests/ui/error-codes/E0719.stderr b/tests/ui/error-codes/E0719.stderr
index 7e8329db1f4..f4817568924 100644
--- a/tests/ui/error-codes/E0719.stderr
+++ b/tests/ui/error-codes/E0719.stderr
@@ -1,33 +1,5 @@
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/E0719.rs:1:33
-   |
-LL | trait Foo: Iterator<Item = i32, Item = i32> {}
-   |                     ----------  ^^^^^^^^^^ re-bound here
-   |                     |
-   |                     `Item` bound here first
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/E0719.rs:1:33
-   |
-LL | trait Foo: Iterator<Item = i32, Item = i32> {}
-   |                     ----------  ^^^^^^^^^^ re-bound here
-   |                     |
-   |                     `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/E0719.rs:1:33
-   |
-LL | trait Foo: Iterator<Item = i32, Item = i32> {}
-   |                     ----------  ^^^^^^^^^^ re-bound here
-   |                     |
-   |                     `Item` bound here first
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/E0719.rs:8:42
+  --> $DIR/E0719.rs:3:42
    |
 LL | fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
    |                               ---------  ^^^^^^^^^^^ re-bound here
@@ -35,13 +7,13 @@ LL | fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
    |                               `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/E0719.rs:14:38
+  --> $DIR/E0719.rs:9:38
    |
 LL |     let _: &dyn Iterator<Item = i32, Item = i32>;
    |                          ----------  ^^^^^^^^^^ re-bound here
    |                          |
    |                          `Item` bound here first
 
-error: aborting due to 5 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0719`.
diff --git a/tests/ui/errors/auxiliary/remapped_dep.rs b/tests/ui/errors/auxiliary/remapped_dep.rs
index 36d4699a306..997118f822c 100644
--- a/tests/ui/errors/auxiliary/remapped_dep.rs
+++ b/tests/ui/errors/auxiliary/remapped_dep.rs
@@ -1,4 +1,4 @@
 //@ compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux
-// no-remap-src-base: Manually remap, so the remapped path remains in .stderr file.
+// Manually remap, so the remapped path remains in .stderr file.
 
 pub struct SomeStruct {} // This line should be show as part of the error.
diff --git a/tests/ui/errors/remap-path-prefix-reverse.local-self.stderr b/tests/ui/errors/remap-path-prefix-reverse.local-self.stderr
index b4f83f6bfc0..b2651f3e03a 100644
--- a/tests/ui/errors/remap-path-prefix-reverse.local-self.stderr
+++ b/tests/ui/errors/remap-path-prefix-reverse.local-self.stderr
@@ -1,5 +1,5 @@
 error[E0423]: expected value, found struct `remapped_dep::SomeStruct`
-  --> $DIR/remap-path-prefix-reverse.rs:16:13
+  --> $DIR/remap-path-prefix-reverse.rs:15:13
    |
 LL |     let _ = remapped_dep::SomeStruct;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `remapped_dep::SomeStruct {}`
diff --git a/tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr b/tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr
index b4f83f6bfc0..b2651f3e03a 100644
--- a/tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr
+++ b/tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr
@@ -1,5 +1,5 @@
 error[E0423]: expected value, found struct `remapped_dep::SomeStruct`
-  --> $DIR/remap-path-prefix-reverse.rs:16:13
+  --> $DIR/remap-path-prefix-reverse.rs:15:13
    |
 LL |     let _ = remapped_dep::SomeStruct;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `remapped_dep::SomeStruct {}`
diff --git a/tests/ui/errors/remap-path-prefix-reverse.rs b/tests/ui/errors/remap-path-prefix-reverse.rs
index 28fdabb8f4d..562e44690f7 100644
--- a/tests/ui/errors/remap-path-prefix-reverse.rs
+++ b/tests/ui/errors/remap-path-prefix-reverse.rs
@@ -2,7 +2,6 @@
 //@ compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux
 
 //@ revisions: local-self remapped-self
-// [local-self] no-remap-src-base: The hack should work regardless of remapping.
 //@ [remapped-self] remap-src-base
 
 // Verify that the expected source code is shown.
diff --git a/tests/ui/errors/remap-path-prefix.rs b/tests/ui/errors/remap-path-prefix.rs
index 7e38e16280f..de18aa8cc20 100644
--- a/tests/ui/errors/remap-path-prefix.rs
+++ b/tests/ui/errors/remap-path-prefix.rs
@@ -2,7 +2,7 @@
 //@ compile-flags: --remap-path-prefix={{src-base}}=remapped
 //@ [with-diagnostic-scope]compile-flags: -Zremap-path-scope=diagnostics
 //@ [without-diagnostic-scope]compile-flags: -Zremap-path-scope=object
-// no-remap-src-base: Manually remap, so the remapped path remains in .stderr file.
+// Manually remap, so the remapped path remains in .stderr file.
 
 // The remapped paths are not normalized by compiletest.
 //@ normalize-stderr: "\\(errors)" -> "/$1"
diff --git a/tests/ui/errors/span-format_args-issue-140578.rs b/tests/ui/errors/span-format_args-issue-140578.rs
new file mode 100644
index 00000000000..8c91ded8337
--- /dev/null
+++ b/tests/ui/errors/span-format_args-issue-140578.rs
@@ -0,0 +1,32 @@
+fn check_format_args() {
+  print!("{:?} {a} {a:?}", [], a = 1 + 1);
+  //~^ ERROR type annotations needed
+}
+
+fn check_format_args_nl() {
+  println!("{:?} {a} {a:?}", [], a = 1 + 1);
+  //~^ ERROR type annotations needed
+}
+
+fn check_multi1() {
+  println!("{:?} {:?} {a} {a:?}", [], [], a = 1 + 1);
+  //~^ ERROR type annotations needed
+}
+
+fn check_multi2() {
+  println!("{:?} {:?} {a} {a:?} {b:?}", [], [], a = 1 + 1, b = []);
+  //~^ ERROR type annotations needed
+}
+
+fn check_unformatted() {
+  println!("
+  {:?} {:?}
+{a}
+{a:?}",
+        [],
+        //~^ ERROR type annotations needed
+ [],
+a = 1 + 1);
+}
+
+fn main() {}
diff --git a/tests/ui/errors/span-format_args-issue-140578.stderr b/tests/ui/errors/span-format_args-issue-140578.stderr
new file mode 100644
index 00000000000..6a273e5cd51
--- /dev/null
+++ b/tests/ui/errors/span-format_args-issue-140578.stderr
@@ -0,0 +1,43 @@
+error[E0282]: type annotations needed
+  --> $DIR/span-format_args-issue-140578.rs:2:28
+   |
+LL |   print!("{:?} {a} {a:?}", [], a = 1 + 1);
+   |                            ^^ cannot infer type
+   |
+   = note: this error originates in the macro `$crate::format_args` which comes from the expansion of the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0282]: type annotations needed
+  --> $DIR/span-format_args-issue-140578.rs:7:30
+   |
+LL |   println!("{:?} {a} {a:?}", [], a = 1 + 1);
+   |                              ^^ cannot infer type
+   |
+   = 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[E0282]: type annotations needed
+  --> $DIR/span-format_args-issue-140578.rs:12:35
+   |
+LL |   println!("{:?} {:?} {a} {a:?}", [], [], a = 1 + 1);
+   |                                   ^^ cannot infer type
+   |
+   = 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[E0282]: type annotations needed
+  --> $DIR/span-format_args-issue-140578.rs:17:41
+   |
+LL |   println!("{:?} {:?} {a} {a:?} {b:?}", [], [], a = 1 + 1, b = []);
+   |                                         ^^ cannot infer type
+   |
+   = 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[E0282]: type annotations needed
+  --> $DIR/span-format_args-issue-140578.rs:26:9
+   |
+LL |         [],
+   |         ^^ cannot infer type
+   |
+   = 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: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller.rs b/tests/ui/explicit-tail-calls/callee_is_track_caller.rs
index b85b335844b..1246a3801fc 100644
--- a/tests/ui/explicit-tail-calls/callee_is_track_caller.rs
+++ b/tests/ui/explicit-tail-calls/callee_is_track_caller.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ ignore-pass
+//@ ignore-backends: gcc
 #![expect(incomplete_features)]
 #![feature(explicit_tail_calls)]
 
diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller.stderr b/tests/ui/explicit-tail-calls/callee_is_track_caller.stderr
index e1a251d156f..020a0542a57 100644
--- a/tests/ui/explicit-tail-calls/callee_is_track_caller.stderr
+++ b/tests/ui/explicit-tail-calls/callee_is_track_caller.stderr
@@ -1,5 +1,5 @@
 warning: tail calling a function marked with `#[track_caller]` has no special effect
-  --> $DIR/callee_is_track_caller.rs:7:12
+  --> $DIR/callee_is_track_caller.rs:8:12
    |
 LL |     become b(x);
    |            ^^^^
diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs
index 33384de83eb..51688897b40 100644
--- a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs
+++ b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ ignore-pass
+//@ ignore-backends: gcc
 #![expect(incomplete_features)]
 #![feature(explicit_tail_calls)]
 
diff --git a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr
index 5a1c40509ad..7b4c144acff 100644
--- a/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr
+++ b/tests/ui/explicit-tail-calls/callee_is_track_caller_polymorphic.stderr
@@ -1,5 +1,5 @@
 warning: tail calling a function marked with `#[track_caller]` has no special effect
-  --> $DIR/callee_is_track_caller_polymorphic.rs:7:12
+  --> $DIR/callee_is_track_caller_polymorphic.rs:8:12
    |
 LL |     become T::f();
    |            ^^^^^^
diff --git a/tests/ui/explicit-tail-calls/callee_is_weird.stderr b/tests/ui/explicit-tail-calls/callee_is_weird.stderr
index a4e5a38ce33..9a5da28b559 100644
--- a/tests/ui/explicit-tail-calls/callee_is_weird.stderr
+++ b/tests/ui/explicit-tail-calls/callee_is_weird.stderr
@@ -12,7 +12,7 @@ error: tail calls can only be performed with function definitions or pointers
 LL |     become (&mut &std::sync::Exclusive::new(f))()
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: callee has type `Exclusive<fn() {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
diff --git a/tests/ui/explicit-tail-calls/drop-order.rs b/tests/ui/explicit-tail-calls/drop-order.rs
index 58e1afbdf0c..ff6e2f09f57 100644
--- a/tests/ui/explicit-tail-calls/drop-order.rs
+++ b/tests/ui/explicit-tail-calls/drop-order.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ ignore-backends: gcc
 #![expect(incomplete_features)]
 #![feature(explicit_tail_calls)]
 use std::cell::RefCell;
diff --git a/tests/ui/explicit-tail-calls/indexer.rs b/tests/ui/explicit-tail-calls/indexer.rs
index 5644506b2f5..c26d9774ce7 100644
--- a/tests/ui/explicit-tail-calls/indexer.rs
+++ b/tests/ui/explicit-tail-calls/indexer.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ ignore-backends: gcc
 // 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"
diff --git a/tests/ui/explicit-tail-calls/recursion-etc.rs b/tests/ui/explicit-tail-calls/recursion-etc.rs
index 8c89ceb7869..c22401d2379 100644
--- a/tests/ui/explicit-tail-calls/recursion-etc.rs
+++ b/tests/ui/explicit-tail-calls/recursion-etc.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ ignore-backends: gcc
 #![expect(incomplete_features)]
 #![feature(explicit_tail_calls)]
 
diff --git a/tests/ui/extern/extern-types-field-offset.rs b/tests/ui/extern/extern-types-field-offset.rs
index 035f063cd50..470ae07a0b5 100644
--- a/tests/ui/extern/extern-types-field-offset.rs
+++ b/tests/ui/extern/extern-types-field-offset.rs
@@ -2,6 +2,7 @@
 //@ check-run-results
 //@ exec-env:RUST_BACKTRACE=0
 //@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
+//@ ignore-backends: gcc
 #![feature(extern_types)]
 
 extern "C" {
@@ -22,12 +23,17 @@ fn main() {
     let x: &Newtype = unsafe { &*(&buf as *const _ as *const Newtype) };
     // Projecting to the newtype works, because it is always at offset 0.
     let field = &x.0;
+    // Avoid being eliminated by DSE.
+    std::hint::black_box(field);
 
     let x: &S = unsafe { &*(&buf as *const _ as *const S) };
     // Accessing sized fields is perfectly fine, even at non-zero offsets.
     let field = &x.i;
+    std::hint::black_box(field);
     let field = &x.j;
+    std::hint::black_box(field);
     // This needs to compute the field offset, but we don't know the type's alignment,
     // so this panics.
     let field = &x.a;
+    std::hint::black_box(field);
 }
diff --git a/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs b/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs
index 1cd52b70315..4d0afa1cdfa 100644
--- a/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs
+++ b/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs
@@ -21,6 +21,7 @@
 //@[no]compile-flags: -C lto=no
 //@[thin]compile-flags: -C lto=thin
 //@[fat]compile-flags: -C lto=fat
+//@ ignore-backends: gcc
 
 #![feature(panic_internals)]
 
diff --git a/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs b/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs
index a44eb3828d0..1fc3409c1f9 100644
--- a/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs
+++ b/tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs
@@ -48,6 +48,7 @@
 //@[fat1]compile-flags: -C opt-level=1 -C lto=fat
 //@[fat2]compile-flags: -C opt-level=2 -C lto=fat
 //@[fat3]compile-flags: -C opt-level=3 -C lto=fat
+//@ ignore-backends: gcc
 
 fn main() {
     use std::sync::atomic::{AtomicUsize, Ordering};
diff --git a/tests/ui/feature-gates/feature-gate-doc_cfg.rs b/tests/ui/feature-gates/feature-gate-doc_cfg.rs
index b12b8a10571..213a5a8c5a9 100644
--- a/tests/ui/feature-gates/feature-gate-doc_cfg.rs
+++ b/tests/ui/feature-gates/feature-gate-doc_cfg.rs
@@ -1,2 +1,2 @@
-#[doc(cfg(unix))] //~ ERROR: `#[doc(cfg)]` is experimental
+#[doc(cfg(unix))] //~ ERROR
 fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-macro-attr.stderr b/tests/ui/feature-gates/feature-gate-macro-attr.stderr
index b58418527c5..75bc93e8027 100644
--- a/tests/ui/feature-gates/feature-gate-macro-attr.stderr
+++ b/tests/ui/feature-gates/feature-gate-macro-attr.stderr
@@ -4,7 +4,7 @@ error[E0658]: `macro_rules!` attributes are unstable
 LL | macro_rules! myattr { attr() {} => {} }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
+   = note: see issue #143547 <https://github.com/rust-lang/rust/issues/143547> 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
 
diff --git a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs
index b4dc1fd4556..e37e405d1af 100644
--- a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs
+++ b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs
@@ -3,7 +3,7 @@ fn main() {
         //~^ ERROR non-exhaustive patterns: `usize::MAX..` not covered
         //~| NOTE pattern `usize::MAX..` not covered
         //~| NOTE the matched value is of type `usize`
-        //~| NOTE `usize` does not have a fixed maximum value
+        //~| NOTE `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
         0..=usize::MAX => {}
     }
 
@@ -11,7 +11,7 @@ fn main() {
         //~^ ERROR non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
         //~| NOTE patterns `..isize::MIN` and `isize::MAX..` not covered
         //~| NOTE the matched value is of type `isize`
-        //~| NOTE `isize` does not have fixed minimum and maximum values
+        //~| NOTE `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
         isize::MIN..=isize::MAX => {}
     }
 }
diff --git a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
index c89dcaf727a..cfb00d6e741 100644
--- a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
+++ b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
@@ -5,7 +5,7 @@ LL |     match 0usize {
    |           ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         0..=usize::MAX => {},
@@ -19,7 +19,7 @@ LL |     match 0isize {
    |           ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
+   = note: `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         isize::MIN..=isize::MAX => {},
diff --git a/tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.rs b/tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.rs
new file mode 100644
index 00000000000..c8ca4537089
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.rs
@@ -0,0 +1,3 @@
+use std::ops::CoerceShared; //~ ERROR  use of unstable library feature `reborrow`
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.stderr b/tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.stderr
new file mode 100644
index 00000000000..dbbbcdf2fd5
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-reborrow-coerce-shared.stderr
@@ -0,0 +1,13 @@
+error[E0658]: use of unstable library feature `reborrow`
+  --> $DIR/feature-gate-reborrow-coerce-shared.rs:1:5
+   |
+LL | use std::ops::CoerceShared;
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #145612 <https://github.com/rust-lang/rust/issues/145612> for more information
+   = help: add `#![feature(reborrow)]` 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-reborrow.rs b/tests/ui/feature-gates/feature-gate-reborrow.rs
index f016f6c6bfa..96eecfb28a1 100644
--- a/tests/ui/feature-gates/feature-gate-reborrow.rs
+++ b/tests/ui/feature-gates/feature-gate-reborrow.rs
@@ -1,3 +1,3 @@
-use std::marker::Reborrow; //~ ERROR  use of unstable library feature `reborrow`
+use std::ops::Reborrow; //~ ERROR  use of unstable library feature `reborrow`
 
 fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-reborrow.stderr b/tests/ui/feature-gates/feature-gate-reborrow.stderr
index 5e3033f3bf1..1224909f564 100644
--- a/tests/ui/feature-gates/feature-gate-reborrow.stderr
+++ b/tests/ui/feature-gates/feature-gate-reborrow.stderr
@@ -1,8 +1,8 @@
 error[E0658]: use of unstable library feature `reborrow`
   --> $DIR/feature-gate-reborrow.rs:1:5
    |
-LL | use std::marker::Reborrow;
-   |     ^^^^^^^^^^^^^^^^^^^^^
+LL | use std::ops::Reborrow;
+   |     ^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #145612 <https://github.com/rust-lang/rust/issues/145612> for more information
    = help: add `#![feature(reborrow)]` to the crate attributes to enable
diff --git a/tests/ui/feature-gates/feature-gate-sanitize.stderr b/tests/ui/feature-gates/feature-gate-sanitize.stderr
index 513999636a9..59e8b69de2e 100644
--- a/tests/ui/feature-gates/feature-gate-sanitize.stderr
+++ b/tests/ui/feature-gates/feature-gate-sanitize.stderr
@@ -4,7 +4,7 @@ error[E0557]: feature has been removed
 LL | #![feature(no_sanitize)]
    |            ^^^^^^^^^^^ feature has been removed
    |
-   = note: removed in CURRENT_RUSTC_VERSION; see <https://github.com/rust-lang/rust/pull/142681> for more information
+   = note: removed in 1.91.0; see <https://github.com/rust-lang/rust/pull/142681> for more information
    = note: renamed to sanitize(xyz = "on|off")
 
 error[E0658]: the `#[sanitize]` attribute is an experimental feature
diff --git a/tests/ui/feature-gates/feature-gate-static_align-thread_local.rs b/tests/ui/feature-gates/feature-gate-static_align-thread_local.rs
new file mode 100644
index 00000000000..29d4facffce
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-static_align-thread_local.rs
@@ -0,0 +1,11 @@
+// The feature gate error may be emitted twice, but only on certain targets
+//@ dont-require-annotations: ERROR
+//@ dont-check-compiler-stderr
+
+#![crate_type = "lib"]
+
+thread_local! {
+    //~^ ERROR the `#[rustc_align_static]` attribute is an experimental feature
+    #[rustc_align_static(16)]
+    static THREAD_LOCAL: u16 = 0;
+}
diff --git a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs
index 26d483e43ae..794b51c7a8a 100644
--- a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs
+++ b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: format-string-proc-macro.rs
+//@ ignore-backends: gcc
 
 extern crate format_string_proc_macro;
 
diff --git a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr
index e7ed2a76e6a..c341c6ee4c5 100644
--- a/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr
+++ b/tests/ui/fmt/format-args-capture-from-pm-first-arg-macro.stderr
@@ -1,5 +1,5 @@
 error: there is no argument named `x`
-  --> $DIR/format-args-capture-from-pm-first-arg-macro.rs:6:5
+  --> $DIR/format-args-capture-from-pm-first-arg-macro.rs:7:5
    |
 LL |     format_string_proc_macro::bad_format_args_captures!();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/fn/issue-80179.stderr b/tests/ui/fn/issue-80179.stderr
index f5d6c44db75..95158da3cff 100644
--- a/tests/ui/fn/issue-80179.stderr
+++ b/tests/ui/fn/issue-80179.stderr
@@ -2,21 +2,26 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/issue-80179.rs:10:24
    |
 LL | fn returns_fn_ptr() -> _ {
-   |                        ^
-   |                        |
-   |                        not allowed in type signatures
-   |                        help: replace with the correct return type: `fn() -> i32`
+   |                        ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - fn returns_fn_ptr() -> _ {
+LL + fn returns_fn_ptr() -> fn() -> i32 {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/issue-80179.rs:18:25
    |
 LL | fn returns_closure() -> _ {
-   |                         ^
-   |                         |
-   |                         not allowed in type signatures
-   |                         help: replace with an appropriate return type: `impl Fn() -> i32`
+   |                         ^ not allowed in type signatures
    |
    = note: for more information on `Fn` traits and closure types, see https://doc.rust-lang.org/book/ch13-01-closures.html
+help: replace with an appropriate return type
+   |
+LL - fn returns_closure() -> _ {
+LL + fn returns_closure() -> impl Fn() -> i32 {
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/fn/suggest-return-closure.stderr b/tests/ui/fn/suggest-return-closure.stderr
index 1860d1ca5d9..0639c23c75a 100644
--- a/tests/ui/fn/suggest-return-closure.stderr
+++ b/tests/ui/fn/suggest-return-closure.stderr
@@ -2,34 +2,40 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/suggest-return-closure.rs:1:17
    |
 LL | fn fn_once() -> _ {
-   |                 ^
-   |                 |
-   |                 not allowed in type signatures
-   |                 help: replace with an appropriate return type: `impl FnOnce()`
+   |                 ^ not allowed in type signatures
    |
    = note: for more information on `Fn` traits and closure types, see https://doc.rust-lang.org/book/ch13-01-closures.html
+help: replace with an appropriate return type
+   |
+LL - fn fn_once() -> _ {
+LL + fn fn_once() -> impl FnOnce() {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/suggest-return-closure.rs:13:16
    |
 LL | fn fn_mut() -> _ {
-   |                ^
-   |                |
-   |                not allowed in type signatures
-   |                help: replace with an appropriate return type: `impl FnMut(char)`
+   |                ^ not allowed in type signatures
    |
    = note: for more information on `Fn` traits and closure types, see https://doc.rust-lang.org/book/ch13-01-closures.html
+help: replace with an appropriate return type
+   |
+LL - fn fn_mut() -> _ {
+LL + fn fn_mut() -> impl FnMut(char) {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/suggest-return-closure.rs:33:13
    |
 LL | fn fun() -> _ {
-   |             ^
-   |             |
-   |             not allowed in type signatures
-   |             help: replace with an appropriate return type: `impl Fn() -> i32`
+   |             ^ not allowed in type signatures
    |
    = note: for more information on `Fn` traits and closure types, see https://doc.rust-lang.org/book/ch13-01-closures.html
+help: replace with an appropriate return type
+   |
+LL - fn fun() -> _ {
+LL + fn fun() -> impl Fn() -> i32 {
+   |
 
 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
   --> $DIR/suggest-return-closure.rs:24:9
diff --git a/tests/ui/fn/suggest-return-future.stderr b/tests/ui/fn/suggest-return-future.stderr
index a4c8b5d8c4b..7c097e50671 100644
--- a/tests/ui/fn/suggest-return-future.stderr
+++ b/tests/ui/fn/suggest-return-future.stderr
@@ -2,19 +2,25 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/suggest-return-future.rs:7:13
    |
 LL | fn foo() -> _ {
-   |             ^
-   |             |
-   |             not allowed in type signatures
-   |             help: replace with an appropriate return type: `impl Future<Output = i32>`
+   |             ^ not allowed in type signatures
+   |
+help: replace with an appropriate return type
+   |
+LL - fn foo() -> _ {
+LL + fn foo() -> impl Future<Output = i32> {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/suggest-return-future.rs:15:13
    |
 LL | fn bar() -> _ {
-   |             ^
-   |             |
-   |             not allowed in type signatures
-   |             help: replace with an appropriate return type: `impl Future<Output = i32>`
+   |             ^ not allowed in type signatures
+   |
+help: replace with an appropriate return type
+   |
+LL - fn bar() -> _ {
+LL + fn bar() -> impl Future<Output = i32> {
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/force-inlining/inherent.rs b/tests/ui/force-inlining/inherent.rs
new file mode 100644
index 00000000000..25c76eaf37a
--- /dev/null
+++ b/tests/ui/force-inlining/inherent.rs
@@ -0,0 +1,21 @@
+//@ check-fail
+#![feature(rustc_attrs)]
+
+struct Foo;
+
+impl Foo {
+    #[rustc_force_inline]
+    //~^ ERROR: `Foo::bar` is incompatible with `#[rustc_force_inline]`
+    #[rustc_no_mir_inline]
+    fn bar() {}
+}
+
+fn bar_caller() {
+    unsafe {
+        Foo::bar();
+    }
+}
+
+fn main() {
+    bar_caller();
+}
diff --git a/tests/ui/force-inlining/inherent.stderr b/tests/ui/force-inlining/inherent.stderr
new file mode 100644
index 00000000000..1ffc78848fe
--- /dev/null
+++ b/tests/ui/force-inlining/inherent.stderr
@@ -0,0 +1,13 @@
+error: `Foo::bar` is incompatible with `#[rustc_force_inline]`
+  --> $DIR/inherent.rs:7:5
+   |
+LL |     #[rustc_force_inline]
+   |     ^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     fn bar() {}
+   |     -------- `Foo::bar` defined here
+   |
+   = note: incompatible due to: #[rustc_no_mir_inline]
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/force-inlining/invalid.rs b/tests/ui/force-inlining/invalid.rs
index 6047739992f..eaacbb50209 100644
--- a/tests/ui/force-inlining/invalid.rs
+++ b/tests/ui/force-inlining/invalid.rs
@@ -114,7 +114,6 @@ trait FooQux = FooBaz;
 //~^ ERROR attribute cannot be used on
 impl<T> Bar<T> {
     #[rustc_force_inline]
-//~^ ERROR attribute cannot be used on
     fn foo() {}
 }
 
diff --git a/tests/ui/force-inlining/invalid.stderr b/tests/ui/force-inlining/invalid.stderr
index 299a3ed4a46..df3b646b6ce 100644
--- a/tests/ui/force-inlining/invalid.stderr
+++ b/tests/ui/force-inlining/invalid.stderr
@@ -1,5 +1,5 @@
 error: allow, cfg, cfg_attr, deny, expect, forbid, and warn are the only allowed built-in attributes in function parameters
-  --> $DIR/invalid.rs:132:11
+  --> $DIR/invalid.rs:131:11
    |
 LL | fn barqux(#[rustc_force_inline] _x: u32) {}
    |           ^^^^^^^^^^^^^^^^^^^^^
@@ -134,7 +134,7 @@ error: `#[rustc_force_inline]` attribute cannot be used on foreign functions
 LL |     #[rustc_force_inline]
    |     ^^^^^^^^^^^^^^^^^^^^^
    |
-   = help: `#[rustc_force_inline]` can only be applied to functions
+   = help: `#[rustc_force_inline]` can be applied to functions and inherent methods
 
 error: `#[rustc_force_inline]` attribute cannot be used on type aliases
   --> $DIR/invalid.rs:66:1
@@ -222,7 +222,7 @@ error: `#[rustc_force_inline]` attribute cannot be used on provided trait method
 LL |     #[rustc_force_inline]
    |     ^^^^^^^^^^^^^^^^^^^^^
    |
-   = help: `#[rustc_force_inline]` can only be applied to functions
+   = help: `#[rustc_force_inline]` can be applied to functions and inherent methods
 
 error: `#[rustc_force_inline]` attribute cannot be used on trait aliases
   --> $DIR/invalid.rs:109:1
@@ -240,16 +240,8 @@ LL | #[rustc_force_inline]
    |
    = help: `#[rustc_force_inline]` can only be applied to functions
 
-error: `#[rustc_force_inline]` attribute cannot be used on inherent methods
-  --> $DIR/invalid.rs:116:5
-   |
-LL |     #[rustc_force_inline]
-   |     ^^^^^^^^^^^^^^^^^^^^^
-   |
-   = help: `#[rustc_force_inline]` can only be applied to functions
-
 error: `#[rustc_force_inline]` attribute cannot be used on trait impl blocks
-  --> $DIR/invalid.rs:121:1
+  --> $DIR/invalid.rs:120:1
    |
 LL | #[rustc_force_inline]
    | ^^^^^^^^^^^^^^^^^^^^^
@@ -257,7 +249,7 @@ LL | #[rustc_force_inline]
    = help: `#[rustc_force_inline]` can only be applied to functions
 
 error: `#[rustc_force_inline]` attribute cannot be used on macro defs
-  --> $DIR/invalid.rs:128:1
+  --> $DIR/invalid.rs:127:1
    |
 LL | #[rustc_force_inline]
    | ^^^^^^^^^^^^^^^^^^^^^
@@ -265,7 +257,7 @@ LL | #[rustc_force_inline]
    = help: `#[rustc_force_inline]` can only be applied to functions
 
 error: `#[rustc_force_inline]` attribute cannot be used on function params
-  --> $DIR/invalid.rs:132:11
+  --> $DIR/invalid.rs:131:11
    |
 LL | fn barqux(#[rustc_force_inline] _x: u32) {}
    |           ^^^^^^^^^^^^^^^^^^^^^
@@ -273,15 +265,15 @@ LL | fn barqux(#[rustc_force_inline] _x: u32) {}
    = help: `#[rustc_force_inline]` can only be applied to functions
 
 error: `#[rustc_force_inline]` attribute cannot be used on closures
-  --> $DIR/invalid.rs:149:14
+  --> $DIR/invalid.rs:148:14
    |
 LL |     let _x = #[rustc_force_inline] || { };
    |              ^^^^^^^^^^^^^^^^^^^^^
    |
-   = help: `#[rustc_force_inline]` can only be applied to functions
+   = help: `#[rustc_force_inline]` can be applied to functions and inherent methods
 
 error: `#[rustc_force_inline]` attribute cannot be used on expressions
-  --> $DIR/invalid.rs:151:14
+  --> $DIR/invalid.rs:150:14
    |
 LL |     let _y = #[rustc_force_inline] 3 + 4;
    |              ^^^^^^^^^^^^^^^^^^^^^
@@ -289,7 +281,7 @@ LL |     let _y = #[rustc_force_inline] 3 + 4;
    = help: `#[rustc_force_inline]` can only be applied to functions
 
 error: `#[rustc_force_inline]` attribute cannot be used on statements
-  --> $DIR/invalid.rs:153:5
+  --> $DIR/invalid.rs:152:5
    |
 LL |     #[rustc_force_inline]
    |     ^^^^^^^^^^^^^^^^^^^^^
@@ -297,7 +289,7 @@ LL |     #[rustc_force_inline]
    = help: `#[rustc_force_inline]` can only be applied to functions
 
 error: `#[rustc_force_inline]` attribute cannot be used on match arms
-  --> $DIR/invalid.rs:158:9
+  --> $DIR/invalid.rs:157:9
    |
 LL |         #[rustc_force_inline]
    |         ^^^^^^^^^^^^^^^^^^^^^
@@ -305,7 +297,7 @@ LL |         #[rustc_force_inline]
    = help: `#[rustc_force_inline]` can only be applied to functions
 
 error: attribute cannot be applied to a `async`, `gen` or `async gen` function
-  --> $DIR/invalid.rs:136:1
+  --> $DIR/invalid.rs:135:1
    |
 LL | #[rustc_force_inline]
    | ^^^^^^^^^^^^^^^^^^^^^
@@ -314,7 +306,7 @@ LL | async fn async_foo() {}
    | -------------------- `async`, `gen` or `async gen` function
 
 error: attribute cannot be applied to a `async`, `gen` or `async gen` function
-  --> $DIR/invalid.rs:140:1
+  --> $DIR/invalid.rs:139:1
    |
 LL | #[rustc_force_inline]
    | ^^^^^^^^^^^^^^^^^^^^^
@@ -323,7 +315,7 @@ LL | gen fn gen_foo() {}
    | ---------------- `async`, `gen` or `async gen` function
 
 error: attribute cannot be applied to a `async`, `gen` or `async gen` function
-  --> $DIR/invalid.rs:144:1
+  --> $DIR/invalid.rs:143:1
    |
 LL | #[rustc_force_inline]
    | ^^^^^^^^^^^^^^^^^^^^^
@@ -331,7 +323,7 @@ LL |
 LL | async gen fn async_gen_foo() {}
    | ---------------------------- `async`, `gen` or `async gen` function
 
-error: aborting due to 37 previous errors
+error: aborting due to 36 previous errors
 
 Some errors have detailed explanations: E0539, E0805.
 For more information about an error, try `rustc --explain E0539`.
diff --git a/tests/ui/frontmatter/proc-macro-observer.rs b/tests/ui/frontmatter/proc-macro-observer.rs
index 6c4c8c57289..5237a0e982a 100644
--- a/tests/ui/frontmatter/proc-macro-observer.rs
+++ b/tests/ui/frontmatter/proc-macro-observer.rs
@@ -1,6 +1,7 @@
 //@ check-pass
 //@ proc-macro: makro.rs
 //@ edition: 2021
+//@ ignore-backends: gcc
 
 // Check that a proc-macro doesn't try to parse frontmatter and instead treats
 // it as a regular Rust token sequence. See `auxiliary/makro.rs` for details.
diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr b/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
index 8bb72833e30..77a637c470c 100644
--- a/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
+++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
@@ -14,6 +14,11 @@ note: due to a current limitation of the type system, this implies a `'static` l
    |
 LL |     for<'a> I::Item<'a>: Debug,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/hrtb-implied-1.rs:26:26
+   |
+LL |     for<'a> I::Item<'a>: Debug,
+   |                          ^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/higher-ranked/do-not-blame-outlives-static-ice.rs b/tests/ui/higher-ranked/do-not-blame-outlives-static-ice.rs
new file mode 100644
index 00000000000..dfdb816652c
--- /dev/null
+++ b/tests/ui/higher-ranked/do-not-blame-outlives-static-ice.rs
@@ -0,0 +1,12 @@
+//@ compile-flags: -Zdeduplicate-diagnostics=yes
+
+// Regression test for #146467.
+trait Trait { type Assoc; }
+
+impl Trait for fn(&()) { type Assoc = (); }
+
+fn f(_: for<'a> fn(<fn(&'a ()) as Trait>::Assoc)) {}
+//~^ ERROR implementation of `Trait` is not general enough
+//~| ERROR higher-ranked subtype error
+
+fn main() {}
diff --git a/tests/ui/higher-ranked/do-not-blame-outlives-static-ice.stderr b/tests/ui/higher-ranked/do-not-blame-outlives-static-ice.stderr
new file mode 100644
index 00000000000..c75a063e45f
--- /dev/null
+++ b/tests/ui/higher-ranked/do-not-blame-outlives-static-ice.stderr
@@ -0,0 +1,17 @@
+error: implementation of `Trait` is not general enough
+  --> $DIR/do-not-blame-outlives-static-ice.rs:8:9
+   |
+LL | fn f(_: for<'a> fn(<fn(&'a ()) as Trait>::Assoc)) {}
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Trait` is not general enough
+   |
+   = note: `for<'a> fn(&'a ())` must implement `Trait`, for any lifetime `'0`...
+   = note: ...but `Trait` is actually implemented for the type `for<'a> fn(&'a ())`
+
+error: higher-ranked subtype error
+  --> $DIR/do-not-blame-outlives-static-ice.rs:8:1
+   |
+LL | fn f(_: for<'a> fn(<fn(&'a ()) as Trait>::Assoc)) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/higher-ranked/trait-bounds/issue-59311.stderr b/tests/ui/higher-ranked/trait-bounds/issue-59311.stderr
index a26c617dc93..f8f64dcc545 100644
--- a/tests/ui/higher-ranked/trait-bounds/issue-59311.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/issue-59311.stderr
@@ -37,7 +37,7 @@ error: higher-ranked lifetime error
 LL |     v.t(|| {});
    |         ^^^^^
    |
-   = note: could not prove `for<'a> &'a V: 'b`
+   = note: could not prove `for<'a> &'a V: '_`
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/higher-ranked/trait-bounds/trivial-does-not-hold.stderr b/tests/ui/higher-ranked/trait-bounds/trivial-does-not-hold.stderr
index 9e0d7e4b7be..a04c6d770d7 100644
--- a/tests/ui/higher-ranked/trait-bounds/trivial-does-not-hold.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/trivial-does-not-hold.stderr
@@ -4,7 +4,7 @@ error: higher-ranked lifetime error
 LL |     || {};
    |     ^^^^^
    |
-   = note: could not prove `for<'a> &'a (): 'b`
+   = note: could not prove `for<'a> &'a (): '_`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/hygiene/issue-77523-def-site-async-await.rs b/tests/ui/hygiene/issue-77523-def-site-async-await.rs
index ad6bd5e0b78..0a279682b71 100644
--- a/tests/ui/hygiene/issue-77523-def-site-async-await.rs
+++ b/tests/ui/hygiene/issue-77523-def-site-async-await.rs
@@ -1,5 +1,6 @@
 //@ build-pass
 //@ aux-build:def-site-async-await.rs
+//@ ignore-backends: gcc
 
 // Regression test for issue #77523
 // Tests that we don't ICE when an unusual combination
diff --git a/tests/ui/hygiene/panic-location.run.stderr b/tests/ui/hygiene/panic-location.run.stderr
index d28ab864183..bd74e96fd8c 100644
--- a/tests/ui/hygiene/panic-location.run.stderr
+++ b/tests/ui/hygiene/panic-location.run.stderr
@@ -1,4 +1,4 @@
 
-thread 'main' ($TID) panicked at $DIR/panic-location.rs:LL:CC:
+thread 'main' ($TID) panicked at library/alloc/src/raw_vec/mod.rs:LL:CC:
 capacity overflow
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/impl-trait/call_method_ambiguous.next.stderr b/tests/ui/impl-trait/call_method_ambiguous.next.stderr
deleted file mode 100644
index 5251555f574..00000000000
--- a/tests/ui/impl-trait/call_method_ambiguous.next.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0282]: type annotations needed
-  --> $DIR/call_method_ambiguous.rs:26:13
-   |
-LL |         let mut iter = foo(n - 1, m);
-   |             ^^^^^^^^
-LL |
-LL |         assert_eq!(iter.get(), 1);
-   |                    ---- type must be known at this point
-   |
-help: consider giving `iter` an explicit type
-   |
-LL |         let mut iter: /* Type */ = foo(n - 1, m);
-   |                     ++++++++++++
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/impl-trait/call_method_ambiguous.rs b/tests/ui/impl-trait/call_method_ambiguous.rs
index 6bcafc8ce14..021d6c22f79 100644
--- a/tests/ui/impl-trait/call_method_ambiguous.rs
+++ b/tests/ui/impl-trait/call_method_ambiguous.rs
@@ -1,6 +1,6 @@
 //@ revisions: current next
 //@[next] compile-flags: -Znext-solver
-//@[current] run-pass
+//@ run-pass
 
 trait Get {
     fn get(&mut self) -> u32;
@@ -24,7 +24,6 @@ where
 fn foo(n: usize, m: &mut ()) -> impl Get + use<'_> {
     if n > 0 {
         let mut iter = foo(n - 1, m);
-        //[next]~^ ERROR type annotations needed
         assert_eq!(iter.get(), 1);
     }
     m
diff --git a/tests/ui/impl-trait/call_method_on_inherent_impl.next.stderr b/tests/ui/impl-trait/call_method_on_inherent_impl.next.stderr
deleted file mode 100644
index 271051f120a..00000000000
--- a/tests/ui/impl-trait/call_method_on_inherent_impl.next.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0282]: type annotations needed
-  --> $DIR/call_method_on_inherent_impl.rs:18:13
-   |
-LL |         let x = my_foo();
-   |             ^
-LL |
-LL |         x.my_debug();
-   |         - type must be known at this point
-   |
-help: consider giving `x` an explicit type
-   |
-LL |         let x: /* Type */ = my_foo();
-   |              ++++++++++++
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/impl-trait/call_method_on_inherent_impl.rs b/tests/ui/impl-trait/call_method_on_inherent_impl.rs
index 0e333c3260a..1dd38bc6717 100644
--- a/tests/ui/impl-trait/call_method_on_inherent_impl.rs
+++ b/tests/ui/impl-trait/call_method_on_inherent_impl.rs
@@ -1,6 +1,6 @@
 //@ revisions: current next
 //@[next] compile-flags: -Znext-solver
-//@[current] check-pass
+//@ check-pass
 
 trait MyDebug {
     fn my_debug(&self);
@@ -16,7 +16,6 @@ where
 fn my_foo() -> impl std::fmt::Debug {
     if false {
         let x = my_foo();
-        //[next]~^ ERROR type annotations needed
         x.my_debug();
     }
     ()
diff --git a/tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.current.stderr b/tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.current.stderr
index 6ecb2b05fc5..e7104664470 100644
--- a/tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.current.stderr
+++ b/tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.current.stderr
@@ -1,5 +1,5 @@
 error[E0599]: no method named `my_debug` found for reference `&impl Debug` in the current scope
-  --> $DIR/call_method_on_inherent_impl_on_rigid_type.rs:16:11
+  --> $DIR/call_method_on_inherent_impl_on_rigid_type.rs:15:11
    |
 LL |         x.my_debug();
    |           ^^^^^^^^ method not found in `&impl Debug`
diff --git a/tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.next.stderr b/tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.next.stderr
index 5fb0b8f1d14..de808259d40 100644
--- a/tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.next.stderr
+++ b/tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.next.stderr
@@ -1,17 +1,15 @@
-error[E0282]: type annotations needed for `&_`
-  --> $DIR/call_method_on_inherent_impl_on_rigid_type.rs:14:13
+error[E0599]: no method named `my_debug` found for reference `&_` in the current scope
+  --> $DIR/call_method_on_inherent_impl_on_rigid_type.rs:15:11
    |
-LL |         let x = &my_foo();
-   |             ^
-LL |
 LL |         x.my_debug();
-   |           -------- type must be known at this point
+   |           ^^^^^^^^ method not found in `&_`
    |
-help: consider giving `x` an explicit type, where the placeholders `_` are specified
+   = help: items from traits can only be used if the trait is implemented and in scope
+help: trait `MyDebug` which provides `my_debug` is implemented but not in scope; perhaps you want to import it
+   |
+LL + use MyDebug;
    |
-LL |         let x: &_ = &my_foo();
-   |              ++++
 
 error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0282`.
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.rs b/tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.rs
index 7fb2ff3b2bc..0c9909efa1b 100644
--- a/tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.rs
+++ b/tests/ui/impl-trait/call_method_on_inherent_impl_on_rigid_type.rs
@@ -12,9 +12,8 @@ impl MyDebug for &() {
 fn my_foo() -> impl std::fmt::Debug {
     if false {
         let x = &my_foo();
-        //[next]~^ ERROR: type annotations needed
         x.my_debug();
-        //[current]~^ ERROR: no method named `my_debug`
+        //~^ ERROR: no method named `my_debug`
     }
     ()
 }
diff --git a/tests/ui/impl-trait/call_method_on_inherent_impl_ref.current.stderr b/tests/ui/impl-trait/call_method_on_inherent_impl_ref-err.current.stderr
index fb51bb7b417..71acbd1497d 100644
--- a/tests/ui/impl-trait/call_method_on_inherent_impl_ref.current.stderr
+++ b/tests/ui/impl-trait/call_method_on_inherent_impl_ref-err.current.stderr
@@ -1,5 +1,5 @@
 error[E0599]: no method named `my_debug` found for opaque type `impl Debug` in the current scope
-  --> $DIR/call_method_on_inherent_impl_ref.rs:19:11
+  --> $DIR/call_method_on_inherent_impl_ref-err.rs:18:11
    |
 LL |     fn my_debug(&self);
    |        -------- the method is available for `&impl Debug` here
@@ -9,7 +9,7 @@ LL |         x.my_debug();
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `MyDebug` defines an item `my_debug`, perhaps you need to implement it
-  --> $DIR/call_method_on_inherent_impl_ref.rs:4:1
+  --> $DIR/call_method_on_inherent_impl_ref-err.rs:4:1
    |
 LL | trait MyDebug {
    | ^^^^^^^^^^^^^
diff --git a/tests/ui/impl-trait/call_method_on_inherent_impl_ref-err.next.stderr b/tests/ui/impl-trait/call_method_on_inherent_impl_ref-err.next.stderr
new file mode 100644
index 00000000000..523505e9802
--- /dev/null
+++ b/tests/ui/impl-trait/call_method_on_inherent_impl_ref-err.next.stderr
@@ -0,0 +1,19 @@
+error[E0599]: no method named `my_debug` found for type `_` in the current scope
+  --> $DIR/call_method_on_inherent_impl_ref-err.rs:18:11
+   |
+LL |     fn my_debug(&self);
+   |        -------- the method is available for `&_` here
+...
+LL |         x.my_debug();
+   |           ^^^^^^^^ method not found in `_`
+   |
+   = help: items from traits can only be used if the trait is implemented and in scope
+note: `MyDebug` defines an item `my_debug`, perhaps you need to implement it
+  --> $DIR/call_method_on_inherent_impl_ref-err.rs:4:1
+   |
+LL | trait MyDebug {
+   | ^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/impl-trait/call_method_on_inherent_impl_ref-err.rs b/tests/ui/impl-trait/call_method_on_inherent_impl_ref-err.rs
new file mode 100644
index 00000000000..0ed09bc76a4
--- /dev/null
+++ b/tests/ui/impl-trait/call_method_on_inherent_impl_ref-err.rs
@@ -0,0 +1,24 @@
+//@ revisions: current next
+//@[next] compile-flags: -Znext-solver
+
+trait MyDebug {
+    fn my_debug(&self);
+}
+
+impl<T> MyDebug for &T
+where
+    T: std::fmt::Debug,
+{
+    fn my_debug(&self) {}
+}
+
+fn my_foo() -> impl std::fmt::Debug {
+    if false {
+        let x = my_foo();
+        x.my_debug();
+        //~^ ERROR no method named `my_debug` found
+    }
+    ()
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/call_method_on_inherent_impl_ref.rs b/tests/ui/impl-trait/call_method_on_inherent_impl_ref-ok.rs
index 4e4098b37f9..40739d6a0ce 100644
--- a/tests/ui/impl-trait/call_method_on_inherent_impl_ref.rs
+++ b/tests/ui/impl-trait/call_method_on_inherent_impl_ref-ok.rs
@@ -1,5 +1,6 @@
 //@ revisions: current next
 //@[next] compile-flags: -Znext-solver
+//@ check-pass
 
 trait MyDebug {
     fn my_debug(&self);
@@ -12,20 +13,9 @@ where
     fn my_debug(&self) {}
 }
 
-fn my_foo() -> impl std::fmt::Debug {
-    if false {
-        let x = my_foo();
-        //[next]~^ ERROR type annotations needed
-        x.my_debug();
-        //[current]~^ ERROR no method named `my_debug` found
-    }
-    ()
-}
-
 fn my_bar() -> impl std::fmt::Debug {
     if false {
         let x = &my_bar();
-        //[next]~^ ERROR type annotations needed
         x.my_debug();
     }
     ()
diff --git a/tests/ui/impl-trait/call_method_on_inherent_impl_ref.next.stderr b/tests/ui/impl-trait/call_method_on_inherent_impl_ref.next.stderr
deleted file mode 100644
index 7202cb6f90a..00000000000
--- a/tests/ui/impl-trait/call_method_on_inherent_impl_ref.next.stderr
+++ /dev/null
@@ -1,31 +0,0 @@
-error[E0282]: type annotations needed
-  --> $DIR/call_method_on_inherent_impl_ref.rs:17:13
-   |
-LL |         let x = my_foo();
-   |             ^
-LL |
-LL |         x.my_debug();
-   |         - type must be known at this point
-   |
-help: consider giving `x` an explicit type
-   |
-LL |         let x: /* Type */ = my_foo();
-   |              ++++++++++++
-
-error[E0282]: type annotations needed for `&_`
-  --> $DIR/call_method_on_inherent_impl_ref.rs:27:13
-   |
-LL |         let x = &my_bar();
-   |             ^
-LL |
-LL |         x.my_debug();
-   |           -------- type must be known at this point
-   |
-help: consider giving `x` an explicit type, where the placeholders `_` are specified
-   |
-LL |         let x: &_ = &my_bar();
-   |              ++++
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/impl-trait/hidden-type-is-opaque-2.default.stderr b/tests/ui/impl-trait/hidden-type-is-opaque-2.default.stderr
index dca0a7b0a1a..cb383b2db38 100644
--- a/tests/ui/impl-trait/hidden-type-is-opaque-2.default.stderr
+++ b/tests/ui/impl-trait/hidden-type-is-opaque-2.default.stderr
@@ -5,7 +5,7 @@ LL |     Thunk::new(|mut cont| {
    |                 ^^^^^^^^
 LL |
 LL |         cont.reify_as();
-   |         ---- type must be known at this point
+   |              -------- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
@@ -19,7 +19,7 @@ LL |     Thunk::new(|mut cont| {
    |                 ^^^^^^^^
 LL |
 LL |         cont.reify_as();
-   |         ---- type must be known at this point
+   |              -------- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
diff --git a/tests/ui/impl-trait/hidden-type-is-opaque-2.next.stderr b/tests/ui/impl-trait/hidden-type-is-opaque-2.next.stderr
index dca0a7b0a1a..cb383b2db38 100644
--- a/tests/ui/impl-trait/hidden-type-is-opaque-2.next.stderr
+++ b/tests/ui/impl-trait/hidden-type-is-opaque-2.next.stderr
@@ -5,7 +5,7 @@ LL |     Thunk::new(|mut cont| {
    |                 ^^^^^^^^
 LL |
 LL |         cont.reify_as();
-   |         ---- type must be known at this point
+   |              -------- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
@@ -19,7 +19,7 @@ LL |     Thunk::new(|mut cont| {
    |                 ^^^^^^^^
 LL |
 LL |         cont.reify_as();
-   |         ---- type must be known at this point
+   |              -------- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
diff --git a/tests/ui/impl-trait/method-resolution4.next.stderr b/tests/ui/impl-trait/method-resolution4.next.stderr
deleted file mode 100644
index 0524f49f98e..00000000000
--- a/tests/ui/impl-trait/method-resolution4.next.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0282]: type annotations needed
-  --> $DIR/method-resolution4.rs:13:9
-   |
-LL |         foo(false).next().unwrap();
-   |         ^^^^^^^^^^ cannot infer type
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/impl-trait/method/broken-deref-chain.current.stderr b/tests/ui/impl-trait/method/broken-deref-chain.current.stderr
new file mode 100644
index 00000000000..726f076b183
--- /dev/null
+++ b/tests/ui/impl-trait/method/broken-deref-chain.current.stderr
@@ -0,0 +1,19 @@
+error[E0308]: mismatched types
+  --> $DIR/broken-deref-chain.rs:41:30
+   |
+LL | fn trait_method() -> impl Trait {
+   |                      ---------- the found opaque type
+...
+LL |         x.trait_method();
+   |         - here the type of `x` is inferred to be `Foo<u32, impl Trait>`
+LL |         let _: Foo<i32, _> = x; // Test that we did not apply the deref step
+   |                -----------   ^ expected `Foo<i32, _>`, found `Foo<u32, impl Trait>`
+   |                |
+   |                expected due to this
+   |
+   = note: expected struct `Foo<i32, _>`
+              found struct `Foo<u32, impl Trait>`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/method/broken-deref-chain.rs b/tests/ui/impl-trait/method/broken-deref-chain.rs
new file mode 100644
index 00000000000..8b45e044f43
--- /dev/null
+++ b/tests/ui/impl-trait/method/broken-deref-chain.rs
@@ -0,0 +1,47 @@
+//@ revisions: current next
+//@[next] compile-flags: -Znext-solver
+//@[next] check-pass
+
+// An annoying edge case of method selection. While computing the deref-chain
+// constrains `T` to `u32`, the final method candidate does not and instead
+// constrains to `i32`. In this case, we no longer check that the opaque
+// remains unconstrained. Both method calls in this test constrain the opaque
+// to `i32`.
+use std::ops::Deref;
+
+struct Foo<T, U>(T, U);
+impl<U> Deref for Foo<u32, U> {
+    type Target = U;
+    fn deref(&self) -> &Self::Target {
+        &self.1
+    }
+}
+
+impl Foo<i32, i32> {
+    fn method(&self) {}
+}
+fn inherent_method() -> impl Sized {
+    if false {
+        let x = Foo(Default::default(), inherent_method());
+        x.method();
+        let _: Foo<i32, _> = x; // Test that we did not apply the deref step
+    }
+    1i32
+}
+
+trait Trait {
+    fn trait_method(&self) {}
+}
+impl Trait for Foo<i32, i32> {}
+impl Trait for i32 {}
+fn trait_method() -> impl Trait {
+    if false {
+        let x = Foo(Default::default(), trait_method());
+        x.trait_method();
+        let _: Foo<i32, _> = x; // Test that we did not apply the deref step
+        //[current]~^ ERROR mismatched types
+    }
+    1i32
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/method-resolution.rs b/tests/ui/impl-trait/method/method-resolution.rs
index 60fbacd8646..60fbacd8646 100644
--- a/tests/ui/impl-trait/method-resolution.rs
+++ b/tests/ui/impl-trait/method/method-resolution.rs
diff --git a/tests/ui/impl-trait/method-resolution2.next.stderr b/tests/ui/impl-trait/method/method-resolution2.next.stderr
index 223430e1658..223430e1658 100644
--- a/tests/ui/impl-trait/method-resolution2.next.stderr
+++ b/tests/ui/impl-trait/method/method-resolution2.next.stderr
diff --git a/tests/ui/impl-trait/method-resolution2.rs b/tests/ui/impl-trait/method/method-resolution2.rs
index 88d4f3d9896..88d4f3d9896 100644
--- a/tests/ui/impl-trait/method-resolution2.rs
+++ b/tests/ui/impl-trait/method/method-resolution2.rs
diff --git a/tests/ui/impl-trait/method-resolution3.current.stderr b/tests/ui/impl-trait/method/method-resolution3.current.stderr
index 87dd862ef8f..87dd862ef8f 100644
--- a/tests/ui/impl-trait/method-resolution3.current.stderr
+++ b/tests/ui/impl-trait/method/method-resolution3.current.stderr
diff --git a/tests/ui/impl-trait/method-resolution3.next.stderr b/tests/ui/impl-trait/method/method-resolution3.next.stderr
index 87dd862ef8f..87dd862ef8f 100644
--- a/tests/ui/impl-trait/method-resolution3.next.stderr
+++ b/tests/ui/impl-trait/method/method-resolution3.next.stderr
diff --git a/tests/ui/impl-trait/method-resolution3.rs b/tests/ui/impl-trait/method/method-resolution3.rs
index 8c47ef4fc75..8c47ef4fc75 100644
--- a/tests/ui/impl-trait/method-resolution3.rs
+++ b/tests/ui/impl-trait/method/method-resolution3.rs
diff --git a/tests/ui/impl-trait/method-resolution4.rs b/tests/ui/impl-trait/method/method-resolution4.rs
index 90e7850cad5..f90a9309cda 100644
--- a/tests/ui/impl-trait/method-resolution4.rs
+++ b/tests/ui/impl-trait/method/method-resolution4.rs
@@ -6,12 +6,11 @@
 
 //@ revisions: current next
 //@[next] compile-flags: -Znext-solver
-//@[current] check-pass
+//@ check-pass
 
 fn foo(b: bool) -> impl Iterator<Item = ()> {
     if b {
         foo(false).next().unwrap();
-        //[next]~^ ERROR type annotations needed
     }
     std::iter::empty()
 }
diff --git a/tests/ui/impl-trait/method/method-resolution5-deref-no-constrain.current.stderr b/tests/ui/impl-trait/method/method-resolution5-deref-no-constrain.current.stderr
new file mode 100644
index 00000000000..08578de426a
--- /dev/null
+++ b/tests/ui/impl-trait/method/method-resolution5-deref-no-constrain.current.stderr
@@ -0,0 +1,19 @@
+error[E0308]: mismatched types
+  --> $DIR/method-resolution5-deref-no-constrain.rs:20:5
+   |
+LL | fn via_deref() -> impl Deref<Target = Foo> {
+   |                                       --- expected `&Foo` because of return type
+...
+LL |     Box::new(Foo)
+   |     ^^^^^^^^^^^^^ expected `&Foo`, found `Box<Foo>`
+   |
+   = note: expected reference `&Foo`
+                 found struct `Box<Foo>`
+help: consider borrowing here
+   |
+LL |     &Box::new(Foo)
+   |     +
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/method/method-resolution5-deref-no-constrain.rs b/tests/ui/impl-trait/method/method-resolution5-deref-no-constrain.rs
new file mode 100644
index 00000000000..2c41f62b9fd
--- /dev/null
+++ b/tests/ui/impl-trait/method/method-resolution5-deref-no-constrain.rs
@@ -0,0 +1,23 @@
+//! The recursive method call yields the opaque type. We want
+//! to use the impl candidate for `Foo` here without constraining
+//! the opaque to `&Foo`.
+
+//@ revisions: current next
+//@[next] compile-flags: -Znext-solver
+//@[next] check-pass
+
+use std::ops::Deref;
+struct Foo;
+impl Foo {
+    fn method(&self) {}
+}
+fn via_deref() -> impl Deref<Target = Foo> {
+    // Currently errors on stable, but should not
+    if false {
+        via_deref().method();
+    }
+
+    Box::new(Foo)
+    //[current]~^ ERROR mismatched types
+}
+fn main() {}
diff --git a/tests/ui/impl-trait/method/method-resolution5-deref.rs b/tests/ui/impl-trait/method/method-resolution5-deref.rs
new file mode 100644
index 00000000000..6133a8efe24
--- /dev/null
+++ b/tests/ui/impl-trait/method/method-resolution5-deref.rs
@@ -0,0 +1,30 @@
+//! The recursive method call yields the opaque type. We want
+//! to use the trait candidate for `impl Foo` here while not
+//! applying it for the `impl Deref`.
+
+//@ revisions: current next
+//@[next] compile-flags: -Znext-solver
+//@ check-pass
+
+use std::ops::Deref;
+trait Foo {
+    fn method(&self) {}
+}
+impl Foo for u32 {}
+fn via_deref() -> impl Deref<Target = impl Foo> {
+    if false {
+        via_deref().method();
+    }
+
+    Box::new(1u32)
+}
+
+fn via_deref_nested() -> Box<impl Deref<Target = impl Foo>> {
+    if false {
+        via_deref_nested().method();
+    }
+
+    Box::new(Box::new(1u32))
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/method/would-constrain-opaque.current.stderr b/tests/ui/impl-trait/method/would-constrain-opaque.current.stderr
new file mode 100644
index 00000000000..60533a39c53
--- /dev/null
+++ b/tests/ui/impl-trait/method/would-constrain-opaque.current.stderr
@@ -0,0 +1,29 @@
+error[E0599]: no method named `method` found for reference `&impl Sized` in the current scope
+  --> $DIR/would-constrain-opaque.rs:28:11
+   |
+LL |         x.method();
+   |           ^^^^^^ method not found in `&impl Sized`
+   |
+   = help: items from traits can only be used if the trait is implemented and in scope
+note: `Trait` defines an item `method`, perhaps you need to implement it
+  --> $DIR/would-constrain-opaque.rs:15:1
+   |
+LL | trait Trait: Sized {
+   | ^^^^^^^^^^^^^^^^^^
+
+error[E0599]: no method named `method` found for reference `&impl Sized` in the current scope
+  --> $DIR/would-constrain-opaque.rs:30:11
+   |
+LL |         x.method();
+   |           ^^^^^^ method not found in `&impl Sized`
+   |
+   = help: items from traits can only be used if the trait is implemented and in scope
+note: `Trait` defines an item `method`, perhaps you need to implement it
+  --> $DIR/would-constrain-opaque.rs:15:1
+   |
+LL | trait Trait: Sized {
+   | ^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/impl-trait/method/would-constrain-opaque.next.stderr b/tests/ui/impl-trait/method/would-constrain-opaque.next.stderr
new file mode 100644
index 00000000000..23a4ceb826a
--- /dev/null
+++ b/tests/ui/impl-trait/method/would-constrain-opaque.next.stderr
@@ -0,0 +1,27 @@
+error[E0599]: no method named `method` found for reference `&_` in the current scope
+  --> $DIR/would-constrain-opaque.rs:28:11
+   |
+LL |         x.method();
+   |           ^^^^^^ method not found in `&_`
+   |
+   = help: items from traits can only be used if the trait is implemented and in scope
+help: trait `Trait` which provides `method` is implemented but not in scope; perhaps you want to import it
+   |
+LL + use Trait;
+   |
+
+error[E0599]: no method named `method` found for reference `&_` in the current scope
+  --> $DIR/would-constrain-opaque.rs:30:11
+   |
+LL |         x.method();
+   |           ^^^^^^ method not found in `&_`
+   |
+   = help: items from traits can only be used if the trait is implemented and in scope
+help: trait `Trait` which provides `method` is implemented but not in scope; perhaps you want to import it
+   |
+LL + use Trait;
+   |
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/impl-trait/method/would-constrain-opaque.rs b/tests/ui/impl-trait/method/would-constrain-opaque.rs
new file mode 100644
index 00000000000..8dd32282529
--- /dev/null
+++ b/tests/ui/impl-trait/method/would-constrain-opaque.rs
@@ -0,0 +1,39 @@
+//@ revisions: current next
+//@[next] compile-flags: -Znext-solver
+
+// If we don't treat `impl Sized` as rigid, the first call would
+// resolve to the trait method, constraining the opaque, while the
+// second call would resolve to the inherent method.
+//
+// We avoid cases like this by rejecting candidates which constrain
+// opaque types encountered in the autoderef chain.
+//
+// FIXME(-Znext-solver): ideally we would note that the inference variable
+// is an opaque type in the error message and change this to a type annotations
+// needed error.
+
+trait Trait: Sized {
+    fn method(self) {}
+}
+impl Trait for &Foo {}
+
+struct Foo;
+impl Foo {
+    fn method(&self) {}
+}
+
+fn define_opaque(b: bool) -> impl Sized {
+    if b {
+        let x = &define_opaque(false);
+        x.method();
+        //~^ ERROR no method named `method` found for reference
+        x.method();
+        //~^ ERROR no method named `method` found for reference
+    }
+
+    Foo
+}
+
+fn main() {
+    define_opaque(true);
+}
diff --git a/tests/ui/impl-trait/precise-capturing/external-macro.rs b/tests/ui/impl-trait/precise-capturing/external-macro.rs
index 9d4d8a1bb11..1342ecd58dc 100644
--- a/tests/ui/impl-trait/precise-capturing/external-macro.rs
+++ b/tests/ui/impl-trait/precise-capturing/external-macro.rs
@@ -6,6 +6,7 @@
 //@ aux-crate: no_use_macro=no-use-macro.rs
 //@ edition: 2024
 //@ check-pass
+//@ ignore-backends: gcc
 
 no_use_pm::pm_rpit!{}
 
diff --git a/tests/ui/impl-trait/precise-capturing/migration-note.rs b/tests/ui/impl-trait/precise-capturing/migration-note.rs
index 7587e89409a..412d8af9884 100644
--- a/tests/ui/impl-trait/precise-capturing/migration-note.rs
+++ b/tests/ui/impl-trait/precise-capturing/migration-note.rs
@@ -32,6 +32,7 @@ fn needs_static() {
     //~| NOTE borrowed value does not live long enoug
 
     fn needs_static(_: impl Sized + 'static) {}
+    //~^ NOTE requirement that the value outlives `'static` introduced here
     needs_static(a);
     //~^ NOTE argument requires that `x` is borrowed for `'static`
 }
@@ -79,6 +80,7 @@ fn needs_static_mut() {
     //~| NOTE borrowed value does not live long enough
 
     fn needs_static(_: impl Sized + 'static) {}
+    //~^ NOTE requirement that the value outlives `'static` introduced here
     needs_static(a);
     //~^ NOTE argument requires that `x` is borrowed for `'static`
 }
diff --git a/tests/ui/impl-trait/precise-capturing/migration-note.stderr b/tests/ui/impl-trait/precise-capturing/migration-note.stderr
index aa0f6400091..880e7878477 100644
--- a/tests/ui/impl-trait/precise-capturing/migration-note.stderr
+++ b/tests/ui/impl-trait/precise-capturing/migration-note.stderr
@@ -1,5 +1,5 @@
 error[E0597]: `x` does not live long enough
-  --> $DIR/migration-note.rs:182:17
+  --> $DIR/migration-note.rs:184:17
    |
 LL |     let x = vec![0];
    |         - binding `x` declared here
@@ -50,6 +50,11 @@ LL |
 LL | }
    | - `x` dropped here while still borrowed
    |
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/migration-note.rs:34:37
+   |
+LL |     fn needs_static(_: impl Sized + 'static) {}
+   |                                     ^^^^^^^
 note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
   --> $DIR/migration-note.rs:29:13
    |
@@ -61,7 +66,7 @@ LL | fn display_len<T>(x: &Vec<T>) -> impl Display + use<T> {
    |                                               ++++++++
 
 error[E0505]: cannot move out of `x` because it is borrowed
-  --> $DIR/migration-note.rs:48:8
+  --> $DIR/migration-note.rs:49:8
    |
 LL |     let x = vec![1];
    |         - binding `x` declared here
@@ -76,7 +81,7 @@ LL | }
    | - borrow might be used here, when `a` is dropped and runs the destructor for type `impl std::fmt::Display`
    |
 note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
-  --> $DIR/migration-note.rs:43:13
+  --> $DIR/migration-note.rs:44:13
    |
 LL |     let a = display_len(&x);
    |             ^^^^^^^^^^^^^^^
@@ -90,7 +95,7 @@ LL |     let a = display_len(&x.clone());
    |                           ++++++++
 
 error[E0499]: cannot borrow `x` as mutable more than once at a time
-  --> $DIR/migration-note.rs:66:5
+  --> $DIR/migration-note.rs:67:5
    |
 LL |     let a = display_len_mut(&mut x);
    |                             ------ first mutable borrow occurs here
@@ -102,7 +107,7 @@ LL |     println!("{a}");
    |                - first borrow later used here
    |
 note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
-  --> $DIR/migration-note.rs:63:13
+  --> $DIR/migration-note.rs:64:13
    |
 LL |     let a = display_len_mut(&mut x);
    |             ^^^^^^^^^^^^^^^^^^^^^^^
@@ -112,7 +117,7 @@ LL | fn display_len_mut<T>(x: &mut Vec<T>) -> impl Display + use<T> {
    |                                                       ++++++++
 
 error[E0597]: `x` does not live long enough
-  --> $DIR/migration-note.rs:76:29
+  --> $DIR/migration-note.rs:77:29
    |
 LL |     let mut x = vec![1];
    |         ----- binding `x` declared here
@@ -126,8 +131,13 @@ LL |
 LL | }
    | - `x` dropped here while still borrowed
    |
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/migration-note.rs:82:37
+   |
+LL |     fn needs_static(_: impl Sized + 'static) {}
+   |                                     ^^^^^^^
 note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
-  --> $DIR/migration-note.rs:76:13
+  --> $DIR/migration-note.rs:77:13
    |
 LL |     let a = display_len_mut(&mut x);
    |             ^^^^^^^^^^^^^^^^^^^^^^^
@@ -137,7 +147,7 @@ LL | fn display_len_mut<T>(x: &mut Vec<T>) -> impl Display + use<T> {
    |                                                       ++++++++
 
 error[E0505]: cannot move out of `x` because it is borrowed
-  --> $DIR/migration-note.rs:95:8
+  --> $DIR/migration-note.rs:97:8
    |
 LL |     let mut x = vec![1];
    |         ----- binding `x` declared here
@@ -152,7 +162,7 @@ LL | }
    | - borrow might be used here, when `a` is dropped and runs the destructor for type `impl std::fmt::Display`
    |
 note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
-  --> $DIR/migration-note.rs:90:13
+  --> $DIR/migration-note.rs:92:13
    |
 LL |     let a = display_len_mut(&mut x);
    |             ^^^^^^^^^^^^^^^^^^^^^^^
@@ -166,7 +176,7 @@ LL |     let a = display_len_mut(&mut x.clone());
    |                                   ++++++++
 
 error[E0506]: cannot assign to `s.f` because it is borrowed
-  --> $DIR/migration-note.rs:115:5
+  --> $DIR/migration-note.rs:117:5
    |
 LL |     let a = display_field(&s.f);
    |                           ---- `s.f` is borrowed here
@@ -178,7 +188,7 @@ LL |     println!("{a}");
    |                - borrow later used here
    |
 note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
-  --> $DIR/migration-note.rs:112:13
+  --> $DIR/migration-note.rs:114:13
    |
 LL |     let a = display_field(&s.f);
    |             ^^^^^^^^^^^^^^^^^^^
@@ -188,7 +198,7 @@ LL | fn display_field<T: Copy + Display>(t: &T) -> impl Display + use<T> {
    |                                                            ++++++++
 
 error[E0506]: cannot assign to `s.f` because it is borrowed
-  --> $DIR/migration-note.rs:131:5
+  --> $DIR/migration-note.rs:133:5
    |
 LL |     let a = display_field(&mut s.f);
    |                           -------- `s.f` is borrowed here
@@ -200,7 +210,7 @@ LL |     println!("{a}");
    |                - borrow later used here
    |
 note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
-  --> $DIR/migration-note.rs:128:13
+  --> $DIR/migration-note.rs:130:13
    |
 LL |     let a = display_field(&mut s.f);
    |             ^^^^^^^^^^^^^^^^^^^^^^^
@@ -210,7 +220,7 @@ LL | fn display_field<T: Copy + Display>(t: &T) -> impl Display + use<T> {
    |                                                            ++++++++
 
 error[E0503]: cannot use `s.f` because it was mutably borrowed
-  --> $DIR/migration-note.rs:143:5
+  --> $DIR/migration-note.rs:145:5
    |
 LL |     let a = display_field(&mut s.f);
    |                           -------- `s.f` is borrowed here
@@ -222,7 +232,7 @@ LL |     println!("{a}");
    |                - borrow later used here
    |
 note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
-  --> $DIR/migration-note.rs:140:13
+  --> $DIR/migration-note.rs:142:13
    |
 LL |     let a = display_field(&mut s.f);
    |             ^^^^^^^^^^^^^^^^^^^^^^^
@@ -232,7 +242,7 @@ LL | fn display_field<T: Copy + Display>(t: &T) -> impl Display + use<T> {
    |                                                            ++++++++
 
 error[E0597]: `z.f` does not live long enough
-  --> $DIR/migration-note.rs:159:25
+  --> $DIR/migration-note.rs:161:25
    |
 LL |         let z = Z { f: vec![1] };
    |             - binding `z` declared here
@@ -248,7 +258,7 @@ LL | }
    |
    = note: values in a scope are dropped in the opposite order they are defined
 note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
-  --> $DIR/migration-note.rs:159:13
+  --> $DIR/migration-note.rs:161:13
    |
 LL |         x = display_len(&z.f);
    |             ^^^^^^^^^^^^^^^^^
@@ -258,7 +268,7 @@ LL | fn display_len<T>(x: &Vec<T>) -> impl Display + use<T> {
    |                                               ++++++++
 
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/migration-note.rs:170:40
+  --> $DIR/migration-note.rs:172:40
    |
 LL |     let x = { let x = display_len(&mut vec![0]); x };
    |                                        ^^^^^^^ - - borrow later used here
@@ -268,7 +278,7 @@ LL |     let x = { let x = display_len(&mut vec![0]); x };
    |
    = note: consider using a `let` binding to create a longer lived value
 note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
-  --> $DIR/migration-note.rs:170:23
+  --> $DIR/migration-note.rs:172:23
    |
 LL |     let x = { let x = display_len(&mut vec![0]); x };
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -279,7 +289,7 @@ LL | fn display_len<T>(x: &Vec<T>) -> impl Display + use<T> {
    |                                               ++++++++
 
 error[E0505]: cannot move out of `x` because it is borrowed
-  --> $DIR/migration-note.rs:198:10
+  --> $DIR/migration-note.rs:200:10
    |
 LL |     let x = String::new();
    |         - binding `x` declared here
@@ -294,12 +304,12 @@ LL | }
    | - borrow might be used here, when `y` is dropped and runs the destructor for type `impl Sized`
    |
 note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
-  --> $DIR/migration-note.rs:195:13
+  --> $DIR/migration-note.rs:197:13
    |
 LL |     let y = capture_apit(&x);
    |             ^^^^^^^^^^^^^^^^
 note: you could use a `use<...>` bound to explicitly specify captures, but argument-position `impl Trait`s are not nameable
-  --> $DIR/migration-note.rs:189:21
+  --> $DIR/migration-note.rs:191:21
    |
 LL | fn capture_apit(x: &impl Sized) -> impl Sized {}
    |                     ^^^^^^^^^^
diff --git a/tests/ui/impl-trait/recursive-bound-eval.next.stderr b/tests/ui/impl-trait/recursive-bound-eval.next.stderr
deleted file mode 100644
index 4bab290d71c..00000000000
--- a/tests/ui/impl-trait/recursive-bound-eval.next.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0282]: type annotations needed
-  --> $DIR/recursive-bound-eval.rs:20:13
-   |
-LL |     move || recursive_fn().parse()
-   |             ^^^^^^^^^^^^^^ cannot infer type
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/impl-trait/recursive-bound-eval.rs b/tests/ui/impl-trait/recursive-bound-eval.rs
index 7859c8983fc..058b12e5651 100644
--- a/tests/ui/impl-trait/recursive-bound-eval.rs
+++ b/tests/ui/impl-trait/recursive-bound-eval.rs
@@ -1,10 +1,9 @@
 //! Test that we can evaluate nested obligations when invoking methods on recursive calls on
 //! an RPIT.
 
-//@revisions: next current
+//@ revisions: next current
 //@[next] compile-flags: -Znext-solver
-
-//@[current] check-pass
+//@ check-pass
 
 pub trait Parser<E> {
     fn parse(&self) -> E;
@@ -18,7 +17,6 @@ impl<E, T: Fn() -> E> Parser<E> for T {
 
 pub fn recursive_fn<E>() -> impl Parser<E> {
     move || recursive_fn().parse()
-    //[next]~^ ERROR: type annotations needed
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr b/tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr
deleted file mode 100644
index 5ce6eb0fc39..00000000000
--- a/tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0282]: type annotations needed
-  --> $DIR/recursive-coroutine-boxed.rs:11:23
-   |
-LL |         let mut gen = Box::pin(foo());
-   |                       ^^^^^^^^ cannot infer type of the type parameter `T` declared on the struct `Box`
-LL |
-LL |         let mut r = gen.as_mut().resume(());
-   |                         ------ type must be known at this point
-   |
-help: consider specifying the generic argument
-   |
-LL |         let mut gen = Box::<T>::pin(foo());
-   |                          +++++
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/impl-trait/recursive-coroutine-boxed.rs b/tests/ui/impl-trait/recursive-coroutine-boxed.rs
index 306edc3591e..932023d103d 100644
--- a/tests/ui/impl-trait/recursive-coroutine-boxed.rs
+++ b/tests/ui/impl-trait/recursive-coroutine-boxed.rs
@@ -1,7 +1,7 @@
 //@ revisions: current next
 //@ ignore-compare-mode-next-solver (explicit revisions)
-//@[current] check-pass
 //@[next] compile-flags: -Znext-solver
+//@ check-pass
 #![feature(coroutines, coroutine_trait)]
 
 use std::ops::{Coroutine, CoroutineState};
@@ -9,7 +9,6 @@ use std::ops::{Coroutine, CoroutineState};
 fn foo() -> impl Coroutine<Yield = (), Return = ()> {
     #[coroutine] || {
         let mut gen = Box::pin(foo());
-        //[next]~^ ERROR type annotations needed
         let mut r = gen.as_mut().resume(());
         while let CoroutineState::Yielded(v) = r {
             yield v;
diff --git a/tests/ui/impl-trait/where-allowed.stderr b/tests/ui/impl-trait/where-allowed.stderr
index 08caff326c4..4d8f23bf7ca 100644
--- a/tests/ui/impl-trait/where-allowed.stderr
+++ b/tests/ui/impl-trait/where-allowed.stderr
@@ -387,6 +387,8 @@ LL | fn in_impl_Fn_return_in_return() -> &'static impl Fn() -> impl Debug { pani
              where A: Tuple, F: Fn<A>, F: ?Sized;
            - impl<Args, F, A> Fn<Args> for Box<F, A>
              where Args: Tuple, F: Fn<Args>, A: Allocator, F: ?Sized;
+           - impl<F, Args> Fn<Args> for Exclusive<F>
+             where F: Sync, F: Fn<Args>, Args: Tuple;
 
 error[E0118]: no nominal type found for inherent implementation
   --> $DIR/where-allowed.rs:240:1
diff --git a/tests/ui/implied-bounds/bevy_world_query.rs b/tests/ui/implied-bounds/bevy_world_query.rs
index 6548c03d1b0..e2750bcf957 100644
--- a/tests/ui/implied-bounds/bevy_world_query.rs
+++ b/tests/ui/implied-bounds/bevy_world_query.rs
@@ -1,6 +1,8 @@
-#![crate_name = "bevy_ecs"]
-
 //@ check-pass
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+#![crate_name = "bevy_ecs"]
 
 // We currently special case bevy from erroring on incorrect implied bounds
 // from normalization (issue #109628).
diff --git a/tests/ui/imports/auxiliary/same-res-ambigious-extern-fail.rs b/tests/ui/imports/auxiliary/same-res-ambigious-extern-fail.rs
new file mode 100644
index 00000000000..61a8d8f0054
--- /dev/null
+++ b/tests/ui/imports/auxiliary/same-res-ambigious-extern-fail.rs
@@ -0,0 +1,16 @@
+//@ edition:2018
+//@ proc-macro: same-res-ambigious-extern-macro.rs
+
+macro_rules! globbing{
+    () => {
+        pub use same_res_ambigious_extern_macro::*;
+    }
+}
+
+#[macro_use] // this imports the `RustEmbed` macro with `pub(crate)` visibility
+extern crate same_res_ambigious_extern_macro;
+globbing! {} // this imports the same `RustEmbed` macro with `pub` visibility
+
+pub trait RustEmbed {}
+
+pub use RustEmbed as Embed;
diff --git a/tests/ui/imports/auxiliary/same-res-ambigious-extern-macro.rs b/tests/ui/imports/auxiliary/same-res-ambigious-extern-macro.rs
new file mode 100644
index 00000000000..4e9b8427092
--- /dev/null
+++ b/tests/ui/imports/auxiliary/same-res-ambigious-extern-macro.rs
@@ -0,0 +1,8 @@
+//@ edition: 2018
+extern crate proc_macro;
+use proc_macro::TokenStream;
+
+#[proc_macro_derive(RustEmbed)]
+pub fn rust_embed_derive(_input: TokenStream) -> TokenStream {
+    TokenStream::new()
+}
diff --git a/tests/ui/imports/auxiliary/same-res-ambigious-extern.rs b/tests/ui/imports/auxiliary/same-res-ambigious-extern.rs
new file mode 100644
index 00000000000..5269dcd0b17
--- /dev/null
+++ b/tests/ui/imports/auxiliary/same-res-ambigious-extern.rs
@@ -0,0 +1,11 @@
+//@ edition:2018
+//@ proc-macro: same-res-ambigious-extern-macro.rs
+
+#[macro_use] // this imports the `RustEmbed` macro with `pub(crate)` visibility
+extern crate same_res_ambigious_extern_macro;
+// this imports the same `RustEmbed` macro with `pub` visibility
+pub use same_res_ambigious_extern_macro::*;
+
+pub trait RustEmbed {}
+
+pub use RustEmbed as Embed;
diff --git a/tests/ui/imports/same-res-ambigious.fail.stderr b/tests/ui/imports/same-res-ambigious.fail.stderr
new file mode 100644
index 00000000000..dfd7c5a5f94
--- /dev/null
+++ b/tests/ui/imports/same-res-ambigious.fail.stderr
@@ -0,0 +1,20 @@
+error[E0603]: derive macro `Embed` is private
+  --> $DIR/same-res-ambigious.rs:8:28
+   |
+LL | #[derive(ambigious_extern::Embed)]
+   |                            ^^^^^ private derive macro
+   |
+note: the derive macro `Embed` is defined here
+  --> $DIR/auxiliary/same-res-ambigious-extern-fail.rs:16:9
+   |
+LL | pub use RustEmbed as Embed;
+   |         ^^^^^^^^^
+help: import `Embed` directly
+   |
+LL - #[derive(ambigious_extern::Embed)]
+LL + #[derive(same_res_ambigious_extern_macro::RustEmbed)]
+   |
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/imports/same-res-ambigious.nightly-fail.stderr b/tests/ui/imports/same-res-ambigious.nightly-fail.stderr
new file mode 100644
index 00000000000..dfd7c5a5f94
--- /dev/null
+++ b/tests/ui/imports/same-res-ambigious.nightly-fail.stderr
@@ -0,0 +1,20 @@
+error[E0603]: derive macro `Embed` is private
+  --> $DIR/same-res-ambigious.rs:8:28
+   |
+LL | #[derive(ambigious_extern::Embed)]
+   |                            ^^^^^ private derive macro
+   |
+note: the derive macro `Embed` is defined here
+  --> $DIR/auxiliary/same-res-ambigious-extern-fail.rs:16:9
+   |
+LL | pub use RustEmbed as Embed;
+   |         ^^^^^^^^^
+help: import `Embed` directly
+   |
+LL - #[derive(ambigious_extern::Embed)]
+LL + #[derive(same_res_ambigious_extern_macro::RustEmbed)]
+   |
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0603`.
diff --git a/tests/ui/imports/same-res-ambigious.rs b/tests/ui/imports/same-res-ambigious.rs
new file mode 100644
index 00000000000..b5c13a15b7c
--- /dev/null
+++ b/tests/ui/imports/same-res-ambigious.rs
@@ -0,0 +1,11 @@
+//@ edition: 2018
+//@ revisions: fail pass
+//@[pass] check-pass
+//@[pass] aux-crate: ambigious_extern=same-res-ambigious-extern.rs
+//@[fail] aux-crate: ambigious_extern=same-res-ambigious-extern-fail.rs
+// see https://github.com/rust-lang/rust/pull/147196
+
+#[derive(ambigious_extern::Embed)] //[fail]~ ERROR: derive macro `Embed` is private
+struct Foo{}
+
+fn main(){}
diff --git a/tests/ui/indexing/ambiguity-after-deref-step.rs b/tests/ui/indexing/ambiguity-after-deref-step.rs
new file mode 100644
index 00000000000..2dd95eed097
--- /dev/null
+++ b/tests/ui/indexing/ambiguity-after-deref-step.rs
@@ -0,0 +1,9 @@
+// Regression test making sure that indexing fails with an ambiguity
+// error if one of the deref-steps encounters an inference variable.
+
+fn main() {
+    let x = &Default::default();
+    //~^ ERROR type annotations needed for `&_`
+    x[1];
+    let _: &Vec<()> = x;
+}
diff --git a/tests/ui/indexing/ambiguity-after-deref-step.stderr b/tests/ui/indexing/ambiguity-after-deref-step.stderr
new file mode 100644
index 00000000000..c7ddd4731c7
--- /dev/null
+++ b/tests/ui/indexing/ambiguity-after-deref-step.stderr
@@ -0,0 +1,17 @@
+error[E0282]: type annotations needed for `&_`
+  --> $DIR/ambiguity-after-deref-step.rs:5:9
+   |
+LL |     let x = &Default::default();
+   |         ^
+LL |
+LL |     x[1];
+   |     - type must be known at this point
+   |
+help: consider giving `x` an explicit type, where the placeholders `_` are specified
+   |
+LL |     let x: &_ = &Default::default();
+   |          ++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/indexing/index_message.stderr b/tests/ui/indexing/index_message.stderr
index 6affb1ed962..b6f61379f2a 100644
--- a/tests/ui/indexing/index_message.stderr
+++ b/tests/ui/indexing/index_message.stderr
@@ -2,7 +2,9 @@ error[E0608]: cannot index into a value of type `({integer},)`
   --> $DIR/index_message.rs:3:14
    |
 LL |     let _ = z[0];
-   |              ^^^ help: to access tuple elements, use: `.0`
+   |              ^^^ help: to access tuple element `0`, use: `.0`
+   |
+   = help: tuples are indexed with a dot and a literal index: `tuple.0`, `tuple.1`, etc.
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/inference/need_type_info/incompat-call-after-qualified-path-0.stderr b/tests/ui/inference/need_type_info/incompat-call-after-qualified-path-0.stderr
index 10056bdf3d4..ba1c81c4518 100644
--- a/tests/ui/inference/need_type_info/incompat-call-after-qualified-path-0.stderr
+++ b/tests/ui/inference/need_type_info/incompat-call-after-qualified-path-0.stderr
@@ -2,7 +2,7 @@ error[E0282]: type annotations needed
   --> $DIR/incompat-call-after-qualified-path-0.rs:21:6
    |
 LL |   f(|a, b| a.cmp(b));
-   |      ^     - type must be known at this point
+   |      ^       --- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
diff --git a/tests/ui/inference/need_type_info/incompat-call-after-qualified-path-1.stderr b/tests/ui/inference/need_type_info/incompat-call-after-qualified-path-1.stderr
index 632a9b99f84..93bba3625b5 100644
--- a/tests/ui/inference/need_type_info/incompat-call-after-qualified-path-1.stderr
+++ b/tests/ui/inference/need_type_info/incompat-call-after-qualified-path-1.stderr
@@ -2,7 +2,7 @@ error[E0282]: type annotations needed
   --> $DIR/incompat-call-after-qualified-path-1.rs:25:6
    |
 LL |   f(|a, b| a.cmp(b));
-   |      ^     - type must be known at this point
+   |      ^       --- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
diff --git a/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs b/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs
index 832821c9c88..2ed0014f8b0 100644
--- a/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs
+++ b/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs
@@ -1,5 +1,6 @@
 //@ build-fail
 //@ compile-flags: -Cpasses=unknown-pass
+//@ ignore-backends: gcc
 
 fn main() {}
 
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-option.rs b/tests/ui/invalid/invalid-debugger-visualizer-option.rs
index 0f1cf15a687..166962866dc 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-option.rs
+++ b/tests/ui/invalid/invalid-debugger-visualizer-option.rs
@@ -1,6 +1,6 @@
 //@ normalize-stderr: "foo.random:.*\(" -> "foo.random: $$FILE_NOT_FOUND_MSG ("
 //@ normalize-stderr: "os error \d+" -> "os error $$FILE_NOT_FOUND_CODE"
 
-#![debugger_visualizer(random_file = "../foo.random")] //~ ERROR invalid argument
+#![debugger_visualizer(random_file = "../foo.random")] //~ ERROR malformed `debugger_visualizer` attribute input
 #![debugger_visualizer(natvis_file = "../foo.random")] //~ ERROR
 fn main() {}
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-option.stderr b/tests/ui/invalid/invalid-debugger-visualizer-option.stderr
index 6fbb4d641e6..e877e39d8f1 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-option.stderr
+++ b/tests/ui/invalid/invalid-debugger-visualizer-option.stderr
@@ -1,18 +1,20 @@
-error: invalid argument
-  --> $DIR/invalid-debugger-visualizer-option.rs:4:24
-   |
-LL | #![debugger_visualizer(random_file = "../foo.random")]
-   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: expected: `natvis_file = "..."`
-   = note: OR
-   = note: expected: `gdb_script_file = "..."`
-
 error: couldn't read $DIR/../foo.random: $FILE_NOT_FOUND_MSG (os error $FILE_NOT_FOUND_CODE)
   --> $DIR/invalid-debugger-visualizer-option.rs:5:24
    |
 LL | #![debugger_visualizer(natvis_file = "../foo.random")]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+error[E0539]: malformed `debugger_visualizer` attribute input
+  --> $DIR/invalid-debugger-visualizer-option.rs:4:1
+   |
+LL | #![debugger_visualizer(random_file = "../foo.random")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^-----------^^^^^^^^^^^^^^^^^^^^
+   | |                      |
+   | |                      valid arguments are `natvis_file` or `gdb_script_file`
+   | 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: aborting due to 2 previous errors
 
+For more information about this error, try `rustc --explain E0539`.
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-target.rs b/tests/ui/invalid/invalid-debugger-visualizer-target.rs
index 1efb9555c24..48b04153214 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-target.rs
+++ b/tests/ui/invalid/invalid-debugger-visualizer-target.rs
@@ -1,2 +1,3 @@
-#[debugger_visualizer(natvis_file = "./foo.natvis.xml")] //~ ERROR attribute should be applied to a module
+#[debugger_visualizer(natvis_file = "./foo.natvis.xml")]
+//~^ ERROR `#[debugger_visualizer]` attribute cannot be used on functions
 fn main() {}
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-target.stderr b/tests/ui/invalid/invalid-debugger-visualizer-target.stderr
index 1df34532533..629af94c5ef 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-target.stderr
+++ b/tests/ui/invalid/invalid-debugger-visualizer-target.stderr
@@ -1,8 +1,10 @@
-error: attribute should be applied to a module
+error: `#[debugger_visualizer]` attribute cannot be used on functions
   --> $DIR/invalid-debugger-visualizer-target.rs:1:1
    |
 LL | #[debugger_visualizer(natvis_file = "./foo.natvis.xml")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: `#[debugger_visualizer]` can be applied to modules and crates
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-2151.stderr b/tests/ui/issues/issue-2151.stderr
index b130f162414..59fef42eb5e 100644
--- a/tests/ui/issues/issue-2151.stderr
+++ b/tests/ui/issues/issue-2151.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL |     let x = panic!();
    |         ^
 LL |     x.clone();
-   |     - type must be known at this point
+   |       ----- type must be known at this point
    |
 help: consider giving `x` an explicit type
    |
diff --git a/tests/ui/issues/issue-25089.rs b/tests/ui/issues/issue-25089.rs
index 929738c3e79..63fdf64cea9 100644
--- a/tests/ui/issues/issue-25089.rs
+++ b/tests/ui/issues/issue-25089.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::thread;
 
diff --git a/tests/ui/issues/issue-26655.rs b/tests/ui/issues/issue-26655.rs
index 416472b0b26..32c4b33a8c9 100644
--- a/tests/ui/issues/issue-26655.rs
+++ b/tests/ui/issues/issue-26655.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // Check that the destructors of simple enums are run on unwinding
 
diff --git a/tests/ui/issues/issue-27592.stderr b/tests/ui/issues/issue-27592.stderr
index c8649d82d74..f1de7b9e569 100644
--- a/tests/ui/issues/issue-27592.stderr
+++ b/tests/ui/issues/issue-27592.stderr
@@ -1,3 +1,9 @@
+error[E0515]: cannot return reference to temporary value
+  --> $DIR/issue-27592.rs:16:14
+   |
+LL |     write(|| format_args!("{}", String::from("Hello world")));
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returns a reference to data owned by the current function
+
 error[E0515]: cannot return value referencing temporary value
   --> $DIR/issue-27592.rs:16:14
    |
@@ -7,12 +13,6 @@ LL |     write(|| format_args!("{}", String::from("Hello world")));
    |              |                  temporary value created here
    |              returns a value referencing data owned by the current function
 
-error[E0515]: cannot return reference to temporary value
-  --> $DIR/issue-27592.rs:16:14
-   |
-LL |     write(|| format_args!("{}", String::from("Hello world")));
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returns a reference to data owned by the current function
-
 error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/issues/issue-27842.stderr b/tests/ui/issues/issue-27842.stderr
index b18fe1512b5..f388fdf85cd 100644
--- a/tests/ui/issues/issue-27842.stderr
+++ b/tests/ui/issues/issue-27842.stderr
@@ -2,17 +2,17 @@ error[E0608]: cannot index into a value of type `({integer}, {integer}, {integer
   --> $DIR/issue-27842.rs:4:16
    |
 LL |     let _ = tup[0];
-   |                ^^^ help: to access tuple elements, use: `.0`
+   |                ^^^ help: to access tuple element `0`, use: `.0`
+   |
+   = help: tuples are indexed with a dot and a literal index: `tuple.0`, `tuple.1`, etc.
 
 error[E0608]: cannot index into a value of type `({integer}, {integer}, {integer})`
   --> $DIR/issue-27842.rs:9:16
    |
 LL |     let _ = tup[i];
-   |                ^-^
-   |                 |
-   |                 cannot access tuple elements at a variable index
+   |                ^^^
    |
-   = help: to access tuple elements, use tuple indexing syntax (e.g., `tuple.0`)
+   = help: tuples are indexed with a dot and a literal index: `tuple.0`, `tuple.1`, etc.
 
 error[E0608]: cannot index into a value of type `({integer},)`
   --> $DIR/issue-27842.rs:14:16
@@ -20,7 +20,7 @@ error[E0608]: cannot index into a value of type `({integer},)`
 LL |     let _ = tup[3];
    |                ^^^
    |
-   = help: to access tuple elements, use tuple indexing syntax (e.g., `tuple.0`)
+   = help: tuples are indexed with a dot and a literal index: `tuple.0`, `tuple.1`, etc.
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/issues/issue-29485.rs b/tests/ui/issues/issue-29485.rs
index a44bcd49c6a..8e6436cb11e 100644
--- a/tests/ui/issues/issue-29485.rs
+++ b/tests/ui/issues/issue-29485.rs
@@ -3,6 +3,7 @@
 //@ aux-build:issue-29485.rs
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 #[feature(recover)]
 
diff --git a/tests/ui/issues/issue-30018-panic.rs b/tests/ui/issues/issue-30018-panic.rs
index 591848b6f7b..09b832bb59d 100644
--- a/tests/ui/issues/issue-30018-panic.rs
+++ b/tests/ui/issues/issue-30018-panic.rs
@@ -6,6 +6,7 @@
 
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 struct Foo;
 
diff --git a/tests/ui/issues/issue-44056.rs b/tests/ui/issues/issue-44056.rs
index 12e4f018466..37d7b00cf7f 100644
--- a/tests/ui/issues/issue-44056.rs
+++ b/tests/ui/issues/issue-44056.rs
@@ -2,5 +2,6 @@
 //@ only-x86_64
 //@ no-prefer-dynamic
 //@ compile-flags: -Ctarget-feature=+avx -Clto
+//@ ignore-backends: gcc
 
 fn main() {}
diff --git a/tests/ui/issues/issue-68696-catch-during-unwind.rs b/tests/ui/issues/issue-68696-catch-during-unwind.rs
index 80d63b0cde7..655879e1869 100644
--- a/tests/ui/issues/issue-68696-catch-during-unwind.rs
+++ b/tests/ui/issues/issue-68696-catch-during-unwind.rs
@@ -4,6 +4,7 @@
 // entering the catch_unwind.
 //
 //@ run-pass
+//@ ignore-backends: gcc
 
 use std::panic::catch_unwind;
 
diff --git a/tests/ui/keyword/soup.rs b/tests/ui/keyword/soup.rs
new file mode 100644
index 00000000000..c4dbe3fb483
--- /dev/null
+++ b/tests/ui/keyword/soup.rs
@@ -0,0 +1,30 @@
+//@ edition:2024
+//@ check-pass
+
+#![allow(unused_imports)]
+#![allow(missing_abi)]
+#![allow(unused_macros)]
+#![allow(non_camel_case_types)]
+#![allow(unreachable_code)]
+#![allow(unused_variables)]
+#![allow(dead_code)]
+#![allow(unused_must_use)]
+
+// all 48 keywords in 300 characters
+mod x {
+    pub(super) struct X;
+    use Ok;
+    impl X {
+        pub(in crate) async fn x(self: Self, x: &'static &'_ dyn for<> Fn()) where {
+            unsafe extern { safe fn x(); }
+            macro_rules! x { () => {}; }
+            if 'x: loop {
+                return match while let true = break 'x false { continue } {
+                    ref x => { &raw mut x; async { const { enum A {} } }.await as () },
+                };
+            } { type x = X; } else { move || { trait x { } union B { x: () } }; }
+        }
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/lang-items/missing-copy-lang-item-issue-19660.rs b/tests/ui/lang-items/missing-copy-lang-item-issue-19660.rs
deleted file mode 100644
index 35d5d079c68..00000000000
--- a/tests/ui/lang-items/missing-copy-lang-item-issue-19660.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-#![feature(lang_items, no_core)]
-#![no_core]
-#![no_main]
-
-#[lang = "pointee_sized"]
-pub trait PointeeSized {}
-
-#[lang = "meta_sized"]
-pub trait MetaSized: PointeeSized {}
-
-#[lang = "sized"]
-trait Sized: MetaSized { }
-
-struct S;
-
-#[no_mangle]
-extern "C" fn main(argc: i32, _argv: *const *const u8) -> i32 {
-    argc //~ ERROR requires `copy` lang_item
-}
diff --git a/tests/ui/lang-items/missing-copy-lang-item-issue-19660.stderr b/tests/ui/lang-items/missing-copy-lang-item-issue-19660.stderr
deleted file mode 100644
index 7b9541f734f..00000000000
--- a/tests/ui/lang-items/missing-copy-lang-item-issue-19660.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: requires `copy` lang_item
-  --> $DIR/missing-copy-lang-item-issue-19660.rs:18:5
-   |
-LL |     argc
-   |     ^^^^
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/lazy-type-alias-impl-trait/branches3.stderr b/tests/ui/lazy-type-alias-impl-trait/branches3.stderr
index 117d189867b..539673bc343 100644
--- a/tests/ui/lazy-type-alias-impl-trait/branches3.stderr
+++ b/tests/ui/lazy-type-alias-impl-trait/branches3.stderr
@@ -2,7 +2,7 @@ error[E0282]: type annotations needed
   --> $DIR/branches3.rs:9:10
    |
 LL |         |s| s.len()
-   |          ^  - type must be known at this point
+   |          ^    --- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
@@ -13,7 +13,7 @@ error[E0282]: type annotations needed
   --> $DIR/branches3.rs:18:10
    |
 LL |         |s| s.len()
-   |          ^  - type must be known at this point
+   |          ^    --- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
@@ -24,7 +24,7 @@ error[E0282]: type annotations needed
   --> $DIR/branches3.rs:26:10
    |
 LL |         |s| s.len()
-   |          ^  - type must be known at this point
+   |          ^    --- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
@@ -35,7 +35,7 @@ error[E0282]: type annotations needed
   --> $DIR/branches3.rs:33:10
    |
 LL |         |s| s.len()
-   |          ^  - type must be known at this point
+   |          ^    --- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
diff --git a/tests/ui/lifetimes/re-empty-in-error.stderr b/tests/ui/lifetimes/re-empty-in-error.stderr
index 554bcb5451f..b3b6d3d269c 100644
--- a/tests/ui/lifetimes/re-empty-in-error.stderr
+++ b/tests/ui/lifetimes/re-empty-in-error.stderr
@@ -4,7 +4,7 @@ error: higher-ranked lifetime error
 LL |     foo(&10);
    |     ^^^^^^^^
    |
-   = note: could not prove `for<'b> &'b (): 'a`
+   = note: could not prove `for<'b> &'b (): '_`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/lifetimes/temporary-lifetime-extension-tuple-ctor.rs b/tests/ui/lifetimes/temporary-lifetime-extension-tuple-ctor.rs
index bb537f855a4..7de786dff3b 100644
--- a/tests/ui/lifetimes/temporary-lifetime-extension-tuple-ctor.rs
+++ b/tests/ui/lifetimes/temporary-lifetime-extension-tuple-ctor.rs
@@ -1,4 +1,4 @@
-//@ edition:2024
+//@ reference: destructors.scope.lifetime-extension.exprs
 
 fn temp() -> String {
     String::from("Hello")
@@ -22,7 +22,7 @@ fn main() {
     let a = &temp();
     let b = Some(&temp());
     let c = Option::Some::<&String>(&temp());
-    use Option::Some as S;
+    use std::option::Option::Some as S;
     let d = S(&temp());
     let e = X(&temp());
     let f = Some(Ok::<_, ()>(std::borrow::Cow::Borrowed(if true {
@@ -31,6 +31,6 @@ fn main() {
         panic!()
     })));
     let some = Some; // Turn the ctor into a regular function.
-    let g = some(&temp()); //~ERROR temporary value dropped while borrowe
+    let g = some(&temp()); //~ERROR temporary value dropped while borrowed
     println!("{a:?} {b:?} {c:?} {d:?} {e:?} {f:?} {g:?}");
 }
diff --git a/tests/ui/linkage-attr/common-linkage-non-zero-init.rs b/tests/ui/linkage-attr/common-linkage-non-zero-init.rs
index e5de08a7a28..512616251c2 100644
--- a/tests/ui/linkage-attr/common-linkage-non-zero-init.rs
+++ b/tests/ui/linkage-attr/common-linkage-non-zero-init.rs
@@ -3,6 +3,7 @@
 //@ known-bug: #109681
 //@ ignore-wasm32 this appears to SIGABRT on wasm, not fail cleanly
 //@ compile-flags: -Z verify-llvm-ir
+//@ ignore-backends: gcc
 
 // This test verifies that we continue to hit the LLVM error for common linkage with non-zero
 // initializers, since it generates invalid LLVM IR.
diff --git a/tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rs b/tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rs
index 57492ed2d0e..62d352facd1 100644
--- a/tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rs
+++ b/tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rs
@@ -3,6 +3,7 @@
 //@ run-pass
 //@ compile-flags: -Cpanic=abort
 //@ edition: 2024
+//@ ignore-backends: gcc
 
 #![allow(incomplete_features)]
 #![feature(raw_dylib_elf)]
diff --git a/tests/ui/linking/no-gc-encapsulation-symbols.rs b/tests/ui/linking/no-gc-encapsulation-symbols.rs
index 36d69969199..c60f35b55eb 100644
--- a/tests/ui/linking/no-gc-encapsulation-symbols.rs
+++ b/tests/ui/linking/no-gc-encapsulation-symbols.rs
@@ -5,6 +5,7 @@
 //
 //@ build-pass
 //@ only-x86_64-unknown-linux-gnu
+//@ ignore-backends: gcc
 
 unsafe extern "Rust" {
     // The __start_ section name is magical for the linker,
diff --git a/tests/ui/lint/unused-qualification-in-derive-expansion.rs b/tests/ui/lint/unused-qualification-in-derive-expansion.rs
index b2067e22c44..bf095c6449d 100644
--- a/tests/ui/lint/unused-qualification-in-derive-expansion.rs
+++ b/tests/ui/lint/unused-qualification-in-derive-expansion.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: add-impl.rs
+//@ ignore-backends: gcc
 
 #![forbid(unused_qualifications)]
 
diff --git a/tests/ui/lto/debuginfo-lto-alloc.rs b/tests/ui/lto/debuginfo-lto-alloc.rs
index d6855f8760d..7c82d978a07 100644
--- a/tests/ui/lto/debuginfo-lto-alloc.rs
+++ b/tests/ui/lto/debuginfo-lto-alloc.rs
@@ -12,6 +12,7 @@
 //@ compile-flags: --test -C debuginfo=2 -C lto=fat
 //@ no-prefer-dynamic
 //@ incremental
+//@ ignore-backends: gcc
 
 extern crate alloc;
 
diff --git a/tests/ui/lto/debuginfo-lto.rs b/tests/ui/lto/debuginfo-lto.rs
index f189a1df056..6d8b836235c 100644
--- a/tests/ui/lto/debuginfo-lto.rs
+++ b/tests/ui/lto/debuginfo-lto.rs
@@ -7,6 +7,7 @@
 //@ aux-build:debuginfo-lto-aux.rs
 //@ compile-flags: -C lto -g
 //@ no-prefer-dynamic
+//@ ignore-backends: gcc
 
 extern crate debuginfo_lto_aux;
 
diff --git a/tests/ui/lto/dwarf-mixed-versions-lto.rs b/tests/ui/lto/dwarf-mixed-versions-lto.rs
index 900274eb22f..8ed3afa5e33 100644
--- a/tests/ui/lto/dwarf-mixed-versions-lto.rs
+++ b/tests/ui/lto/dwarf-mixed-versions-lto.rs
@@ -7,6 +7,7 @@
 //@ compile-flags: -C lto -g -Cdwarf-version=5
 //@ no-prefer-dynamic
 //@ build-pass
+//@ ignore-backends: gcc
 
 extern crate dwarf_mixed_versions_lto_aux;
 
diff --git a/tests/ui/lto/fat-lto.rs b/tests/ui/lto/fat-lto.rs
index 73d6801a25a..fe00d7feb37 100644
--- a/tests/ui/lto/fat-lto.rs
+++ b/tests/ui/lto/fat-lto.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ compile-flags: -Clto=fat
 //@ no-prefer-dynamic
+//@ ignore-backends: gcc
 
 fn main() {
     println!("hello!");
diff --git a/tests/ui/lto/issue-100772.rs b/tests/ui/lto/issue-100772.rs
index 9468e20894a..e07d44e3be8 100644
--- a/tests/ui/lto/issue-100772.rs
+++ b/tests/ui/lto/issue-100772.rs
@@ -3,6 +3,7 @@
 //@ compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi -C unsafe-allow-abi-mismatch=sanitizer
 //@ no-prefer-dynamic
 //@ only-x86_64-unknown-linux-gnu
+//@ ignore-backends: gcc
 
 #![feature(allocator_api)]
 
diff --git a/tests/ui/lto/lto-duplicate-symbols.rs b/tests/ui/lto/lto-duplicate-symbols.rs
index a62ab2e2217..08465eb0fb2 100644
--- a/tests/ui/lto/lto-duplicate-symbols.rs
+++ b/tests/ui/lto/lto-duplicate-symbols.rs
@@ -4,6 +4,7 @@
 //@ compile-flags: -C lto
 //@ no-prefer-dynamic
 //@ normalize-stderr: "lto-duplicate-symbols2\.lto_duplicate_symbols2\.[0-9a-zA-Z]+-cgu" -> "lto-duplicate-symbols2.lto_duplicate_symbols2.HASH-cgu"
+//@ ignore-backends: gcc
 extern crate lto_duplicate_symbols1;
 extern crate lto_duplicate_symbols2;
 
diff --git a/tests/ui/lto/lto-many-codegen-units.rs b/tests/ui/lto/lto-many-codegen-units.rs
index fb6636fb815..6761510e427 100644
--- a/tests/ui/lto/lto-many-codegen-units.rs
+++ b/tests/ui/lto/lto-many-codegen-units.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ compile-flags: -C lto -C codegen-units=8
 //@ no-prefer-dynamic
+//@ ignore-backends: gcc
 
 fn main() {
 }
diff --git a/tests/ui/lto/lto-rustc-loads-linker-plugin.rs b/tests/ui/lto/lto-rustc-loads-linker-plugin.rs
index 18e937cb29a..2be320f0bff 100644
--- a/tests/ui/lto/lto-rustc-loads-linker-plugin.rs
+++ b/tests/ui/lto/lto-rustc-loads-linker-plugin.rs
@@ -2,6 +2,7 @@
 //@ aux-build:lto-rustc-loads-linker-plugin.rs
 //@ run-pass
 //@ no-prefer-dynamic
+//@ ignore-backends: gcc
 
 // This test ensures that if a dependency was compiled with
 // `-Clinker-plugin-lto` then we can compile with `-Clto` and still link against
diff --git a/tests/ui/lto/lto-still-runs-thread-dtors.rs b/tests/ui/lto/lto-still-runs-thread-dtors.rs
index 900368496eb..9a97677773c 100644
--- a/tests/ui/lto/lto-still-runs-thread-dtors.rs
+++ b/tests/ui/lto/lto-still-runs-thread-dtors.rs
@@ -2,6 +2,7 @@
 //@ compile-flags: -C lto
 //@ no-prefer-dynamic
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // FIXME(static_mut_refs): this could use an atomic
 #![allow(static_mut_refs)]
diff --git a/tests/ui/macros/macro-local-data-key-priv.stderr b/tests/ui/macros/macro-local-data-key-priv.stderr
index e93bd11046d..8df1aec140d 100644
--- a/tests/ui/macros/macro-local-data-key-priv.stderr
+++ b/tests/ui/macros/macro-local-data-key-priv.stderr
@@ -9,7 +9,7 @@ note: the constant `baz` is defined here
    |
 LL |     thread_local!(static baz: f64 = 0.0);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_process_attrs` which comes from the expansion of the macro `thread_local` (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-error.rs b/tests/ui/macros/macro-rules-attr-error.rs
index 81eadb6692f..60290b883cb 100644
--- a/tests/ui/macros/macro-rules-attr-error.rs
+++ b/tests/ui/macros/macro-rules-attr-error.rs
@@ -50,3 +50,22 @@ macro_rules! forward_referenced_attr {
 macro_rules! cyclic_attr {
     attr() {} => {}
 }
+
+macro_rules! attr_with_safety {
+    unsafe attr() { struct RequiresUnsafe; } => {};
+    attr() { struct SafeInvocation; } => {};
+}
+
+#[attr_with_safety]
+struct SafeInvocation;
+
+//~v ERROR: unnecessary `unsafe` on safe attribute invocation
+#[unsafe(attr_with_safety)]
+struct SafeInvocation;
+
+//~v ERROR: unsafe attribute invocation requires `unsafe`
+#[attr_with_safety]
+struct RequiresUnsafe;
+
+#[unsafe(attr_with_safety)]
+struct RequiresUnsafe;
diff --git a/tests/ui/macros/macro-rules-attr-error.stderr b/tests/ui/macros/macro-rules-attr-error.stderr
index 674d35091b6..27527a2da7e 100644
--- a/tests/ui/macros/macro-rules-attr-error.stderr
+++ b/tests/ui/macros/macro-rules-attr-error.stderr
@@ -9,6 +9,18 @@ LL |     #[local_attr]
    |
    = note: this error originates in the attribute macro `local_attr` (in Nightly builds, run with -Z macro-backtrace for more info)
 
+error: unnecessary `unsafe` on safe attribute invocation
+  --> $DIR/macro-rules-attr-error.rs:63:3
+   |
+LL | #[unsafe(attr_with_safety)]
+   |   ^^^^^^
+
+error: unsafe attribute invocation requires `unsafe`
+  --> $DIR/macro-rules-attr-error.rs:67:1
+   |
+LL | #[attr_with_safety]
+   | ^^^^^^^^^^^^^^^^^^^
+
 error: cannot find macro `local_attr` in this scope
   --> $DIR/macro-rules-attr-error.rs:27:5
    |
@@ -59,5 +71,5 @@ note: a macro with the same name exists, but it appears later
 LL | macro_rules! cyclic_attr {
    |              ^^^^^^^^^^^
 
-error: aborting due to 6 previous errors
+error: aborting due to 8 previous errors
 
diff --git a/tests/ui/macros/macro-use-all-and-none.stderr b/tests/ui/macros/macro-use-all-and-none.stderr
index a5efb065a21..b4c05adcb33 100644
--- a/tests/ui/macros/macro-use-all-and-none.stderr
+++ b/tests/ui/macros/macro-use-all-and-none.stderr
@@ -2,8 +2,9 @@ warning: unused attribute
   --> $DIR/macro-use-all-and-none.rs:7:12
    |
 LL | #[macro_use()]
-   |            ^^ help: remove this attribute
+   |            ^^ help: remove these parentheses
    |
+   = note: using `macro_use` with an empty list is equivalent to not using a list at all
 note: the lint level is defined here
   --> $DIR/macro-use-all-and-none.rs:4:9
    |
diff --git a/tests/ui/macros/same-sequence-span.rs b/tests/ui/macros/same-sequence-span.rs
index dfaf669a769..9fae847a4e2 100644
--- a/tests/ui/macros/same-sequence-span.rs
+++ b/tests/ui/macros/same-sequence-span.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: proc_macro_sequence.rs
+//@ ignore-backends: gcc
 
 // Regression test for issue #62831: Check that multiple sequences with the same span in the
 // left-hand side of a macro definition behave as if they had unique spans, and in particular that
diff --git a/tests/ui/macros/same-sequence-span.stderr b/tests/ui/macros/same-sequence-span.stderr
index 34df201f5a5..1ca89b6b595 100644
--- a/tests/ui/macros/same-sequence-span.stderr
+++ b/tests/ui/macros/same-sequence-span.stderr
@@ -1,5 +1,5 @@
 error: `$x:expr` may be followed by `$y:tt`, which is not allowed for `expr` fragments
-  --> $DIR/same-sequence-span.rs:14:18
+  --> $DIR/same-sequence-span.rs:15:18
    |
 LL |     (1 $x:expr $($y:tt,)*
    |                  ^^^^^ not allowed after `expr` fragments
@@ -7,7 +7,7 @@ LL |     (1 $x:expr $($y:tt,)*
    = note: allowed there are: `=>`, `,` or `;`
 
 error: `$x:expr` may be followed by `=`, which is not allowed for `expr` fragments
-  --> $DIR/same-sequence-span.rs:15:18
+  --> $DIR/same-sequence-span.rs:16:18
    |
 LL |                $(= $z:tt)*
    |                  ^ not allowed after `expr` fragments
@@ -15,10 +15,10 @@ LL |                $(= $z:tt)*
    = note: allowed there are: `=>`, `,` or `;`
 
 error: `$x:expr` may be followed by `$y:tt`, which is not allowed for `expr` fragments
-  --> $DIR/same-sequence-span.rs:19:1
+  --> $DIR/same-sequence-span.rs:20:1
    |
-LL | | macro_rules! manual_foo {
-   | |__________________________^not allowed after `expr` fragments
+LL | | // `proc_macro_sequence.rs`.
+   | |_____________________________^not allowed after `expr` fragments
 ...
 LL |   proc_macro_sequence::make_foo!();
    |   ^-------------------------------
@@ -30,7 +30,7 @@ LL |   proc_macro_sequence::make_foo!();
    = note: this error originates in the macro `proc_macro_sequence::make_foo` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `$x:expr` may be followed by `=`, which is not allowed for `expr` fragments
-  --> $DIR/same-sequence-span.rs:19:1
+  --> $DIR/same-sequence-span.rs:20:1
    |
 LL | proc_macro_sequence::make_foo!();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not allowed after `expr` fragments
diff --git a/tests/ui/methods/overflow-if-subtyping.rs b/tests/ui/methods/overflow-if-subtyping.rs
new file mode 100644
index 00000000000..a97f29f1f6d
--- /dev/null
+++ b/tests/ui/methods/overflow-if-subtyping.rs
@@ -0,0 +1,30 @@
+//@ check-pass
+
+// Regression test for #128887.
+#![allow(unconditional_recursion)]
+trait Mappable<T> {
+    type Output;
+}
+
+trait Bound<T> {}
+// Deleting this impl made it compile on beta
+impl<T> Bound<T> for T {}
+
+trait Generic<M> {}
+
+// Deleting the `: Mappable<T>` already made it error on stable.
+struct IndexWithIter<I, M: Mappable<T>, T>(I, M, T);
+
+impl<I, M, T> IndexWithIter<I, M, T>
+where
+    <M as Mappable<T>>::Output: Bound<T>,
+    // Flipping these where bounds causes this to succeed, even when removing
+    // the where-clause on the struct definition.
+    M: Mappable<T>,
+    I: Generic<M>,
+{
+    fn new(x: I) {
+        IndexWithIter::<_, _, _>::new(x);
+    }
+}
+fn main() {}
diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
index e13653f3423..af07745a00a 100644
--- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
@@ -69,6 +69,12 @@ LL |         cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static ->
 LL |     })
 LL | }
    | - `a` dropped here while still borrowed
+   |
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:13:8
+   |
+LL |     F: for<'x> FnOnce(Cell<&'a u32>, Cell<&'x u32>),
+   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr b/tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr
index 15f48d88c37..4136ac418de 100644
--- a/tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr
+++ b/tests/ui/nll/closure-requirements/propagate-multiple-requirements.stderr
@@ -13,6 +13,12 @@ LL |         z = &local_arr;
 ...
 LL | }
    | - `local_arr` dropped here while still borrowed
+   |
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/propagate-multiple-requirements.rs:4:21
+   |
+LL | fn once<S, T, U, F: FnOnce(S, T) -> U>(f: F, s: S, t: T) -> U {
+   |                     ^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/nll/local-outlives-static-via-hrtb.stderr b/tests/ui/nll/local-outlives-static-via-hrtb.stderr
index a98f11ce513..263d271b6b3 100644
--- a/tests/ui/nll/local-outlives-static-via-hrtb.stderr
+++ b/tests/ui/nll/local-outlives-static-via-hrtb.stderr
@@ -17,6 +17,11 @@ note: due to a current limitation of the type system, this implies a `'static` l
    |
 LL | fn assert_static_via_hrtb<G>(_: G) where for<'a> G: Outlives<'a> {}
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/local-outlives-static-via-hrtb.rs:15:53
+   |
+LL | fn assert_static_via_hrtb<G>(_: G) where for<'a> G: Outlives<'a> {}
+   |                                                     ^^^^^^^^^^^^
 
 error[E0597]: `local` does not live long enough
   --> $DIR/local-outlives-static-via-hrtb.rs:25:45
@@ -37,6 +42,11 @@ note: due to a current limitation of the type system, this implies a `'static` l
    |
 LL |     for<'a> &'a T: Reference<AssociatedType = &'a ()>,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/local-outlives-static-via-hrtb.rs:19:30
+   |
+LL |     for<'a> &'a T: Reference<AssociatedType = &'a ()>,
+   |                              ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr
index 6e47b8e59f5..804b3f00a26 100644
--- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr
@@ -18,6 +18,11 @@ note: due to a current limitation of the type system, this implies a `'static` l
    |
 LL | fn bad<F: Fn(&()) -> &()>(_: F) {}
    |           ^^^^^^^^^^^^^^
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:20:22
+   |
+LL | fn bad<F: Fn(&()) -> &()>(_: F) {}
+   |                      ^^^
 
 error: implementation of `Fn` is not general enough
   --> $DIR/location-insensitive-scopes-issue-117146.rs:13:5
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr
index 6e47b8e59f5..804b3f00a26 100644
--- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr
@@ -18,6 +18,11 @@ note: due to a current limitation of the type system, this implies a `'static` l
    |
 LL | fn bad<F: Fn(&()) -> &()>(_: F) {}
    |           ^^^^^^^^^^^^^^
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:20:22
+   |
+LL | fn bad<F: Fn(&()) -> &()>(_: F) {}
+   |                      ^^^
 
 error: implementation of `Fn` is not general enough
   --> $DIR/location-insensitive-scopes-issue-117146.rs:13:5
diff --git a/tests/ui/nll/user-annotations/dump-fn-method.rs b/tests/ui/nll/user-annotations/dump-fn-method.rs
index 26714b6ffe3..ec349e36839 100644
--- a/tests/ui/nll/user-annotations/dump-fn-method.rs
+++ b/tests/ui/nll/user-annotations/dump-fn-method.rs
@@ -31,7 +31,7 @@ fn main() {
     // Here: we only want the `T` to be given, the rest should be variables.
     //
     // (`T` refers to the declaration of `Bazoom`)
-    let x = <_ as Bazoom<u32>>::method::<_>; //~ ERROR [^0, u32, ^1]
+    let x = <_ as Bazoom<u32>>::method::<_>; //~ ERROR [^c_0, u32, ^c_1]
     x(&22, 44, 66);
 
     // Here: all are given and definitely contain no lifetimes, so we
@@ -48,7 +48,7 @@ fn main() {
     //
     // (`U` refers to the declaration of `Bazoom`)
     let y = 22_u32;
-    y.method::<u32>(44, 66); //~ ERROR [^0, ^1, u32]
+    y.method::<u32>(44, 66); //~ ERROR [^c_0, ^c_1, u32]
 
     // Here: nothing is given, so we don't have any annotation.
     let y = 22_u32;
diff --git a/tests/ui/nll/user-annotations/dump-fn-method.stderr b/tests/ui/nll/user-annotations/dump-fn-method.stderr
index 8e847b464e1..f00fb0013df 100644
--- a/tests/ui/nll/user-annotations/dump-fn-method.stderr
+++ b/tests/ui/nll/user-annotations/dump-fn-method.stderr
@@ -4,7 +4,7 @@ error: user args: UserArgs { args: [&'static u32], user_self_ty: None }
 LL |     let x = foo::<&'static u32>;
    |             ^^^^^^^^^^^^^^^^^^^
 
-error: user args: UserArgs { args: [^0, u32, ^1], user_self_ty: None }
+error: user args: UserArgs { args: [^c_0, u32, ^c_1], user_self_ty: None }
   --> $DIR/dump-fn-method.rs:34:13
    |
 LL |     let x = <_ as Bazoom<u32>>::method::<_>;
@@ -16,7 +16,7 @@ error: user args: UserArgs { args: [u8, &'static u16, u32], user_self_ty: None }
 LL |     let x = <u8 as Bazoom<&'static u16>>::method::<u32>;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: user args: UserArgs { args: [^0, ^1, u32], user_self_ty: None }
+error: user args: UserArgs { args: [^c_0, ^c_1, u32], user_self_ty: None }
   --> $DIR/dump-fn-method.rs:51:5
    |
 LL |     y.method::<u32>(44, 66);
diff --git a/tests/ui/numbers-arithmetic/int-abs-overflow.rs b/tests/ui/numbers-arithmetic/int-abs-overflow.rs
index 6397f62d065..fd4a5a6052b 100644
--- a/tests/ui/numbers-arithmetic/int-abs-overflow.rs
+++ b/tests/ui/numbers-arithmetic/int-abs-overflow.rs
@@ -2,6 +2,7 @@
 //@ compile-flags: -C overflow-checks=on
 //@ needs-threads
 //@ needs-unwind
+//@ ignore-backends: gcc
 
 use std::thread;
 
diff --git a/tests/ui/numbers-arithmetic/issue-8460.rs b/tests/ui/numbers-arithmetic/issue-8460.rs
index 87867fdc93e..52df432669f 100644
--- a/tests/ui/numbers-arithmetic/issue-8460.rs
+++ b/tests/ui/numbers-arithmetic/issue-8460.rs
@@ -2,6 +2,7 @@
 #![allow(unused_must_use)]
 //@ needs-threads
 //@ needs-unwind
+//@ ignore-backends: gcc
 #![feature(rustc_attrs)]
 
 use std::thread;
diff --git a/tests/ui/panic-runtime/lto-unwind.rs b/tests/ui/panic-runtime/lto-unwind.rs
index 93275052f85..bafc6d5aaa5 100644
--- a/tests/ui/panic-runtime/lto-unwind.rs
+++ b/tests/ui/panic-runtime/lto-unwind.rs
@@ -3,6 +3,7 @@
 //@ needs-unwind
 //@ no-prefer-dynamic
 //@ needs-subprocess
+//@ ignore-backends: gcc
 
 use std::process::Command;
 use std::env;
diff --git a/tests/ui/panics/oom-panic-unwind.rs b/tests/ui/panics/oom-panic-unwind.rs
index 5974ad91406..4f7939ce60b 100644
--- a/tests/ui/panics/oom-panic-unwind.rs
+++ b/tests/ui/panics/oom-panic-unwind.rs
@@ -5,6 +5,7 @@
 //@ no-prefer-dynamic
 //@ needs-unwind
 //@ only-linux
+//@ ignore-backends: gcc
 
 use std::hint::black_box;
 use std::mem::forget;
diff --git a/tests/ui/panics/panic-handler-chain-update-hook.rs b/tests/ui/panics/panic-handler-chain-update-hook.rs
index 662ea9e978f..2ae79ad236e 100644
--- a/tests/ui/panics/panic-handler-chain-update-hook.rs
+++ b/tests/ui/panics/panic-handler-chain-update-hook.rs
@@ -3,6 +3,7 @@
 #![allow(stable_features)]
 
 //@ needs-threads
+//@ ignore-backends: gcc
 
 #![feature(std_panic)]
 #![feature(panic_update_hook)]
diff --git a/tests/ui/panics/panic-handler-chain.rs b/tests/ui/panics/panic-handler-chain.rs
index fea71ad9ec4..cc591c1d999 100644
--- a/tests/ui/panics/panic-handler-chain.rs
+++ b/tests/ui/panics/panic-handler-chain.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 #![allow(stable_features)]
 
 #![feature(std_panic)]
diff --git a/tests/ui/panics/panic-handler-flail-wildly.rs b/tests/ui/panics/panic-handler-flail-wildly.rs
index d42dfd68d9c..d5f5195d381 100644
--- a/tests/ui/panics/panic-handler-flail-wildly.rs
+++ b/tests/ui/panics/panic-handler-flail-wildly.rs
@@ -5,6 +5,7 @@
 #![allow(unused_must_use)]
 
 //@ needs-threads
+//@ ignore-backends: gcc
 
 #![feature(std_panic)]
 
diff --git a/tests/ui/panics/panic-handler-set-twice.rs b/tests/ui/panics/panic-handler-set-twice.rs
index 5f670d5f492..ca4ed65f568 100644
--- a/tests/ui/panics/panic-handler-set-twice.rs
+++ b/tests/ui/panics/panic-handler-set-twice.rs
@@ -6,6 +6,7 @@
 #![feature(std_panic)]
 
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::sync::atomic::{AtomicUsize, Ordering};
 use std::panic;
diff --git a/tests/ui/panics/panic-in-dtor-drops-fields.rs b/tests/ui/panics/panic-in-dtor-drops-fields.rs
index 38eb6d0acfb..db079234337 100644
--- a/tests/ui/panics/panic-in-dtor-drops-fields.rs
+++ b/tests/ui/panics/panic-in-dtor-drops-fields.rs
@@ -4,6 +4,7 @@
 #![allow(non_upper_case_globals)]
 
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::thread;
 
diff --git a/tests/ui/panics/panic-recover-propagate.rs b/tests/ui/panics/panic-recover-propagate.rs
index ef6ae4fd788..36ca279bdbd 100644
--- a/tests/ui/panics/panic-recover-propagate.rs
+++ b/tests/ui/panics/panic-recover-propagate.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::sync::atomic::{AtomicUsize, Ordering};
 use std::panic;
diff --git a/tests/ui/panics/rvalue-cleanup-during-box-panic.rs b/tests/ui/panics/rvalue-cleanup-during-box-panic.rs
index 84c5d85d7e0..03571f111aa 100644
--- a/tests/ui/panics/rvalue-cleanup-during-box-panic.rs
+++ b/tests/ui/panics/rvalue-cleanup-during-box-panic.rs
@@ -21,6 +21,7 @@
 // scenario worth testing.
 
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::thread;
 
diff --git a/tests/ui/panics/unwind-force-no-unwind-tables.rs b/tests/ui/panics/unwind-force-no-unwind-tables.rs
index 2226e4dd03e..715f288fff1 100644
--- a/tests/ui/panics/unwind-force-no-unwind-tables.rs
+++ b/tests/ui/panics/unwind-force-no-unwind-tables.rs
@@ -6,6 +6,7 @@
 //@ needs-unwind
 //@ ignore-windows target requires uwtable
 //@ compile-flags: -C panic=unwind -C force-unwind-tables=n
+//@ ignore-backends: gcc
 
 use std::panic::{self, AssertUnwindSafe};
 
diff --git a/tests/ui/parser/issues/issue-87086-colon-path-sep.rs b/tests/ui/parser/issues/issue-87086-colon-path-sep.rs
index d081c06044f..e1ea38f2795 100644
--- a/tests/ui/parser/issues/issue-87086-colon-path-sep.rs
+++ b/tests/ui/parser/issues/issue-87086-colon-path-sep.rs
@@ -37,10 +37,9 @@ fn g1() {
         //~| HELP: maybe write a path separator here
         _ => {}
     }
-    if let Foo:Bar = f() { //~ WARN: irrefutable `if let` pattern
+    if let Foo:Bar = f() {
     //~^ ERROR: expected one of
     //~| HELP: maybe write a path separator here
-    //~| HELP: consider replacing the `if let` with a `let`
     }
 }
 
diff --git a/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr b/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr
index a9bad96f9af..061586882e0 100644
--- a/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr
+++ b/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr
@@ -64,7 +64,7 @@ LL |     if let Foo::Bar = f() {
    |                +
 
 error: expected one of `@` or `|`, found `:`
-  --> $DIR/issue-87086-colon-path-sep.rs:49:16
+  --> $DIR/issue-87086-colon-path-sep.rs:48:16
    |
 LL |         ref qux: Foo::Baz => {}
    |                ^ -------- specifying the type of a pattern isn't supported
@@ -77,7 +77,7 @@ LL |         ref qux::Foo::Baz => {}
    |                ~~
 
 error: expected one of `@` or `|`, found `:`
-  --> $DIR/issue-87086-colon-path-sep.rs:58:16
+  --> $DIR/issue-87086-colon-path-sep.rs:57:16
    |
 LL |         mut qux: Foo::Baz => {}
    |                ^ -------- specifying the type of a pattern isn't supported
@@ -90,7 +90,7 @@ LL |         mut qux::Foo::Baz => {}
    |                ~~
 
 error: expected one of `@` or `|`, found `:`
-  --> $DIR/issue-87086-colon-path-sep.rs:69:12
+  --> $DIR/issue-87086-colon-path-sep.rs:68:12
    |
 LL |         Foo:Bar::Baz => {}
    |            ^-------- specifying the type of a pattern isn't supported
@@ -103,7 +103,7 @@ LL |         Foo::Bar::Baz => {}
    |             +
 
 error: expected one of `@` or `|`, found `:`
-  --> $DIR/issue-87086-colon-path-sep.rs:75:12
+  --> $DIR/issue-87086-colon-path-sep.rs:74:12
    |
 LL |         Foo:Bar => {}
    |            ^--- specifying the type of a pattern isn't supported
@@ -115,15 +115,5 @@ help: maybe write a path separator here
 LL |         Foo::Bar => {}
    |             +
 
-warning: irrefutable `if let` pattern
-  --> $DIR/issue-87086-colon-path-sep.rs:40:8
-   |
-LL |     if let Foo:Bar = f() {
-   |        ^^^^^^^^^^^^^^^^^
-   |
-   = note: this pattern will always match, so the `if let` is useless
-   = help: consider replacing the `if let` with a `let`
-   = note: `#[warn(irrefutable_let_patterns)]` on by default
-
-error: aborting due to 9 previous errors; 1 warning emitted
+error: aborting due to 9 previous errors
 
diff --git a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs
index 461890e63e3..c82efe79e4d 100644
--- a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs
+++ b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: issue-89971-outer-attr-following-inner-attr-ice.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate issue_89971_outer_attr_following_inner_attr_ice;
diff --git a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr
index 51df17c7cc6..392e7d0321f 100644
--- a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr
+++ b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr
@@ -1,5 +1,5 @@
 error: an inner attribute is not permitted in this context
-  --> $DIR/issue-89971-outer-attr-following-inner-attr-ice.rs:11:1
+  --> $DIR/issue-89971-outer-attr-following-inner-attr-ice.rs:12:1
    |
 LL | #![deny(missing_docs)]
    | ^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/parser/macro/bad-macro-definition.rs b/tests/ui/parser/macro/bad-macro-definition.rs
index 3c5c93ea3b3..12df6e64bd2 100644
--- a/tests/ui/parser/macro/bad-macro-definition.rs
+++ b/tests/ui/parser/macro/bad-macro-definition.rs
@@ -20,3 +20,6 @@ macro_rules! e { {} }
 
 macro_rules! f {}
 //~^ ERROR: macros must contain at least one rule
+
+macro_rules! g { unsafe {} => {} }
+//~^ ERROR: `unsafe` is only supported on `attr` rules
diff --git a/tests/ui/parser/macro/bad-macro-definition.stderr b/tests/ui/parser/macro/bad-macro-definition.stderr
index de6d9d6a38b..d15f33f708d 100644
--- a/tests/ui/parser/macro/bad-macro-definition.stderr
+++ b/tests/ui/parser/macro/bad-macro-definition.stderr
@@ -52,5 +52,11 @@ error: macros must contain at least one rule
 LL | macro_rules! f {}
    | ^^^^^^^^^^^^^^^^^
 
-error: aborting due to 9 previous errors
+error: `unsafe` is only supported on `attr` rules
+  --> $DIR/bad-macro-definition.rs:24:18
+   |
+LL | macro_rules! g { unsafe {} => {} }
+   |                  ^^^^^^
+
+error: aborting due to 10 previous errors
 
diff --git a/tests/ui/parser/macro/macro-attr-bad.rs b/tests/ui/parser/macro/macro-attr-bad.rs
index 9f50b057a7a..0ac46c8b768 100644
--- a/tests/ui/parser/macro/macro-attr-bad.rs
+++ b/tests/ui/parser/macro/macro-attr-bad.rs
@@ -13,6 +13,12 @@ macro_rules! attr_incomplete_3 { attr() {} }
 macro_rules! attr_incomplete_4 { attr() {} => }
 //~^ ERROR macro definition ended unexpectedly
 
+macro_rules! attr_incomplete_5 { unsafe }
+//~^ ERROR macro definition ended unexpectedly
+
+macro_rules! attr_incomplete_6 { unsafe attr }
+//~^ ERROR macro definition ended unexpectedly
+
 macro_rules! attr_noparens_1 { attr{} {} => {} }
 //~^ ERROR `attr` rule argument matchers require parentheses
 
diff --git a/tests/ui/parser/macro/macro-attr-bad.stderr b/tests/ui/parser/macro/macro-attr-bad.stderr
index bf0ed13cd55..481ef8118ae 100644
--- a/tests/ui/parser/macro/macro-attr-bad.stderr
+++ b/tests/ui/parser/macro/macro-attr-bad.stderr
@@ -22,8 +22,20 @@ error: macro definition ended unexpectedly
 LL | macro_rules! attr_incomplete_4 { attr() {} => }
    |                                              ^ expected right-hand side of macro rule
 
+error: macro definition ended unexpectedly
+  --> $DIR/macro-attr-bad.rs:16:40
+   |
+LL | macro_rules! attr_incomplete_5 { unsafe }
+   |                                        ^ expected `attr`
+
+error: macro definition ended unexpectedly
+  --> $DIR/macro-attr-bad.rs:19:45
+   |
+LL | macro_rules! attr_incomplete_6 { unsafe attr }
+   |                                             ^ expected macro attr args
+
 error: `attr` rule argument matchers require parentheses
-  --> $DIR/macro-attr-bad.rs:16:36
+  --> $DIR/macro-attr-bad.rs:22:36
    |
 LL | macro_rules! attr_noparens_1 { attr{} {} => {} }
    |                                    ^^
@@ -35,7 +47,7 @@ LL + macro_rules! attr_noparens_1 { attr() {} => {} }
    |
 
 error: `attr` rule argument matchers require parentheses
-  --> $DIR/macro-attr-bad.rs:19:36
+  --> $DIR/macro-attr-bad.rs:25:36
    |
 LL | macro_rules! attr_noparens_2 { attr[] {} => {} }
    |                                    ^^
@@ -47,13 +59,13 @@ 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
+  --> $DIR/macro-attr-bad.rs:28:37
    |
 LL | macro_rules! attr_noparens_3 { attr _ {} => {} }
    |                                     ^
 
 error: duplicate matcher binding
-  --> $DIR/macro-attr-bad.rs:25:52
+  --> $DIR/macro-attr-bad.rs:31:52
    |
 LL | macro_rules! attr_dup_matcher_1 { attr() {$x:ident $x:ident} => {} }
    |                                           -------- ^^^^^^^^ duplicate binding
@@ -61,7 +73,7 @@ LL | macro_rules! attr_dup_matcher_1 { attr() {$x:ident $x:ident} => {} }
    |                                           previous binding
 
 error: duplicate matcher binding
-  --> $DIR/macro-attr-bad.rs:28:49
+  --> $DIR/macro-attr-bad.rs:34:49
    |
 LL | macro_rules! attr_dup_matcher_2 { attr($x:ident $x:ident) {} => {} }
    |                                        -------- ^^^^^^^^ duplicate binding
@@ -69,12 +81,12 @@ LL | macro_rules! attr_dup_matcher_2 { attr($x:ident $x:ident) {} => {} }
    |                                        previous binding
 
 error: duplicate matcher binding
-  --> $DIR/macro-attr-bad.rs:31:51
+  --> $DIR/macro-attr-bad.rs:37:51
    |
 LL | macro_rules! attr_dup_matcher_3 { attr($x:ident) {$x:ident} => {} }
    |                                        --------   ^^^^^^^^ duplicate binding
    |                                        |
    |                                        previous binding
 
-error: aborting due to 10 previous errors
+error: aborting due to 12 previous errors
 
diff --git a/tests/ui/parser/macro/macro-derive-bad.rs b/tests/ui/parser/macro/macro-derive-bad.rs
index 79b9eb8c113..74e7d9acdaf 100644
--- a/tests/ui/parser/macro/macro-derive-bad.rs
+++ b/tests/ui/parser/macro/macro-derive-bad.rs
@@ -41,3 +41,6 @@ macro_rules! derive_dup_matcher { derive() {$x:ident $x:ident} => {} }
 //~^ ERROR duplicate matcher binding
 //~| NOTE duplicate binding
 //~| NOTE previous binding
+
+macro_rules! derive_unsafe { unsafe derive() {} => {} }
+//~^ ERROR `unsafe` is only supported on `attr` rules
diff --git a/tests/ui/parser/macro/macro-derive-bad.stderr b/tests/ui/parser/macro/macro-derive-bad.stderr
index ec750c9ac82..c98535f4031 100644
--- a/tests/ui/parser/macro/macro-derive-bad.stderr
+++ b/tests/ui/parser/macro/macro-derive-bad.stderr
@@ -86,5 +86,11 @@ LL | macro_rules! derive_dup_matcher { derive() {$x:ident $x:ident} => {} }
    |                                             |
    |                                             previous binding
 
-error: aborting due to 12 previous errors
+error: `unsafe` is only supported on `attr` rules
+  --> $DIR/macro-derive-bad.rs:45:30
+   |
+LL | macro_rules! derive_unsafe { unsafe derive() {} => {} }
+   |                              ^^^^^^
+
+error: aborting due to 13 previous errors
 
diff --git a/tests/ui/parser/macro/unicode-control-codepoints-macros.rs b/tests/ui/parser/macro/unicode-control-codepoints-macros.rs
index 775c5077976..701e7dfa30a 100644
--- a/tests/ui/parser/macro/unicode-control-codepoints-macros.rs
+++ b/tests/ui/parser/macro/unicode-control-codepoints-macros.rs
@@ -1,6 +1,7 @@
 // Regression test for #140281
 //@ edition: 2021
 //@ proc-macro: unicode-control.rs
+//@ ignore-backends: gcc
 
 extern crate unicode_control;
 use unicode_control::*;
diff --git a/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr b/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr
index ca813399eac..22fb1b945c6 100644
--- a/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr
+++ b/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr
@@ -1,5 +1,5 @@
 error: unicode codepoint changing visible direction of text present in doc comment
-  --> $DIR/unicode-control-codepoints-macros.rs:20:9
+  --> $DIR/unicode-control-codepoints-macros.rs:21:9
    |
 LL |         /// �test� RTL in doc in vec
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment contains invisible unicode text flow control codepoints
@@ -10,7 +10,7 @@ LL |         /// �test� RTL in doc in vec
    = note: `#[deny(text_direction_codepoint_in_literal)]` on by default
 
 error: unicode codepoint changing visible direction of text present in doc comment
-  --> $DIR/unicode-control-codepoints-macros.rs:25:9
+  --> $DIR/unicode-control-codepoints-macros.rs:26:9
    |
 LL | /         /**
 LL | |          * �test� RTL in doc in macro
@@ -22,7 +22,7 @@ LL | |          */
    = note: if you want to keep them but make them visible in your source code, you can escape them: '\u{202e}', '\u{2066}'
 
 error: unicode codepoint changing visible direction of text present in doc comment
-  --> $DIR/unicode-control-codepoints-macros.rs:32:9
+  --> $DIR/unicode-control-codepoints-macros.rs:33:9
    |
 LL | /         /**
 LL | |          * �test� RTL in doc in macro
@@ -34,7 +34,7 @@ LL | |          */
    = note: if you want to keep them but make them visible in your source code, you can escape them: '\u{202e}', '\u{2066}'
 
 error: unicode codepoint changing visible direction of text present in doc comment
-  --> $DIR/unicode-control-codepoints-macros.rs:40:9
+  --> $DIR/unicode-control-codepoints-macros.rs:41:9
    |
 LL |         /// �test� RTL in doc in proc macro
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment contains invisible unicode text flow control codepoints
@@ -44,7 +44,7 @@ LL |         /// �test� RTL in doc in proc macro
    = note: if you want to keep them but make them visible in your source code, you can escape them: '\u{202e}', '\u{2066}'
 
 error: unicode codepoint changing visible direction of text present in doc comment
-  --> $DIR/unicode-control-codepoints-macros.rs:45:9
+  --> $DIR/unicode-control-codepoints-macros.rs:46:9
    |
 LL |         /// �test� RTL in doc in proc macro
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment contains invisible unicode text flow control codepoints
diff --git a/tests/ui/parser/tuple-index-suffix-proc-macro.rs b/tests/ui/parser/tuple-index-suffix-proc-macro.rs
index 557c67738d3..2463897381e 100644
--- a/tests/ui/parser/tuple-index-suffix-proc-macro.rs
+++ b/tests/ui/parser/tuple-index-suffix-proc-macro.rs
@@ -3,6 +3,7 @@
 //! Like `tuple-index-suffix.rs`, but exercises the proc-macro interaction.
 
 //@ proc-macro: tuple-index-suffix-proc-macro-aux.rs
+//@ ignore-backends: gcc
 
 extern crate tuple_index_suffix_proc_macro_aux;
 use tuple_index_suffix_proc_macro_aux as aux;
diff --git a/tests/ui/parser/tuple-index-suffix-proc-macro.stderr b/tests/ui/parser/tuple-index-suffix-proc-macro.stderr
index 47d179d3555..a242af5a789 100644
--- a/tests/ui/parser/tuple-index-suffix-proc-macro.stderr
+++ b/tests/ui/parser/tuple-index-suffix-proc-macro.stderr
@@ -1,23 +1,23 @@
 error: suffixes on a tuple index are invalid
-  --> $DIR/tuple-index-suffix-proc-macro.rs:17:28
+  --> $DIR/tuple-index-suffix-proc-macro.rs:18:28
    |
 LL |     aux::bad_tup_indexing!(0usize);
    |                            ^^^^^^ invalid suffix `usize`
 
 error: suffixes on a tuple index are invalid
-  --> $DIR/tuple-index-suffix-proc-macro.rs:19:47
+  --> $DIR/tuple-index-suffix-proc-macro.rs:20:47
    |
 LL |     aux::bad_tup_struct_indexing!(tup_struct, 0isize);
    |                                               ^^^^^^ invalid suffix `isize`
 
 error: suffixes on a tuple index are invalid
-  --> $DIR/tuple-index-suffix-proc-macro.rs:24:28
+  --> $DIR/tuple-index-suffix-proc-macro.rs:25:28
    |
 LL |     aux::bad_tup_indexing!(0u8);
    |                            ^^^ invalid suffix `u8`
 
 error: suffixes on a tuple index are invalid
-  --> $DIR/tuple-index-suffix-proc-macro.rs:26:47
+  --> $DIR/tuple-index-suffix-proc-macro.rs:27:47
    |
 LL |     aux::bad_tup_struct_indexing!(tup_struct, 0u64);
    |                                               ^^^^ invalid suffix `u64`
diff --git a/tests/ui/parser/type-ascription-in-pattern.rs b/tests/ui/parser/type-ascription-in-pattern.rs
index 18d7061d69c..75059d33db6 100644
--- a/tests/ui/parser/type-ascription-in-pattern.rs
+++ b/tests/ui/parser/type-ascription-in-pattern.rs
@@ -1,15 +1,16 @@
 fn foo(x: bool) -> i32 {
-    match x { //~ ERROR struct literals are not allowed here
-        x: i32 => x, //~ ERROR expected
-        true => 42., //~ ERROR expected identifier
-        false => 0.333, //~ ERROR expected identifier
+    match x {
+        x: i32 => x, //~ ERROR: expected
+        //~^ ERROR: mismatched types
+        true => 42.,
+        false => 0.333,
     }
-} //~ ERROR expected one of
+}
 
 fn main() {
     match foo(true) {
-        42: i32 => (), //~ ERROR expected
-        _: f64 => (), //~ ERROR expected
-        x: i32 => (), //~ ERROR expected
+        42: i32 => (), //~ ERROR: expected
+        _: f64 => (), //~ ERROR: expected
+        x: i32 => (), //~ ERROR: expected
     }
 }
diff --git a/tests/ui/parser/type-ascription-in-pattern.stderr b/tests/ui/parser/type-ascription-in-pattern.stderr
index 135879f208b..09190754993 100644
--- a/tests/ui/parser/type-ascription-in-pattern.stderr
+++ b/tests/ui/parser/type-ascription-in-pattern.stderr
@@ -1,64 +1,18 @@
-error: expected one of `!`, `,`, `.`, `::`, `?`, `{`, `}`, or an operator, found `=>`
-  --> $DIR/type-ascription-in-pattern.rs:3:16
-   |
-LL |     match x {
-   |           - while parsing this struct
-LL |         x: i32 => x,
-   |               -^^ expected one of 8 possible tokens
-   |               |
-   |               help: try adding a comma: `,`
-
-error: expected identifier, found keyword `true`
-  --> $DIR/type-ascription-in-pattern.rs:4:9
-   |
-LL |     match x {
-   |           - while parsing this struct
-LL |         x: i32 => x,
-LL |         true => 42.,
-   |         ^^^^ expected identifier, found keyword
-
-error: expected identifier, found keyword `false`
-  --> $DIR/type-ascription-in-pattern.rs:5:9
-   |
-LL |     match x {
-   |           - while parsing this struct
-...
-LL |         false => 0.333,
-   |         ^^^^^ expected identifier, found keyword
-
-error: struct literals are not allowed here
-  --> $DIR/type-ascription-in-pattern.rs:2:11
-   |
-LL |       match x {
-   |  ___________^
-LL | |         x: i32 => x,
-LL | |         true => 42.,
-LL | |         false => 0.333,
-LL | |     }
-   | |_____^
-   |
-help: surround the struct literal with parentheses
+error: expected one of `@` or `|`, found `:`
+  --> $DIR/type-ascription-in-pattern.rs:3:10
    |
-LL ~     match (x {
 LL |         x: i32 => x,
-LL |         true => 42.,
-LL |         false => 0.333,
-LL ~     })
+   |          ^ --- specifying the type of a pattern isn't supported
+   |          |
+   |          expected one of `@` or `|`
    |
-
-error: expected one of `.`, `?`, `{`, or an operator, found `}`
-  --> $DIR/type-ascription-in-pattern.rs:7:1
+help: maybe write a path separator here
    |
-LL |     match x {
-   |     ----- while parsing this `match` expression
-...
-LL |     }
-   |      - expected one of `.`, `?`, `{`, or an operator
-LL | }
-   | ^ unexpected token
+LL |         x::i32 => x,
+   |          ~~
 
 error: expected one of `...`, `..=`, `..`, or `|`, found `:`
-  --> $DIR/type-ascription-in-pattern.rs:11:11
+  --> $DIR/type-ascription-in-pattern.rs:12:11
    |
 LL |         42: i32 => (),
    |           ^ --- specifying the type of a pattern isn't supported
@@ -66,7 +20,7 @@ LL |         42: i32 => (),
    |           expected one of `...`, `..=`, `..`, or `|`
 
 error: expected `|`, found `:`
-  --> $DIR/type-ascription-in-pattern.rs:12:10
+  --> $DIR/type-ascription-in-pattern.rs:13:10
    |
 LL |         _: f64 => (),
    |          ^ --- specifying the type of a pattern isn't supported
@@ -74,7 +28,7 @@ LL |         _: f64 => (),
    |          expected `|`
 
 error: expected one of `@` or `|`, found `:`
-  --> $DIR/type-ascription-in-pattern.rs:13:10
+  --> $DIR/type-ascription-in-pattern.rs:14:10
    |
 LL |         x: i32 => (),
    |          ^ --- specifying the type of a pattern isn't supported
@@ -86,5 +40,15 @@ help: maybe write a path separator here
 LL |         x::i32 => (),
    |          ~~
 
-error: aborting due to 8 previous errors
+error[E0308]: mismatched types
+  --> $DIR/type-ascription-in-pattern.rs:3:19
+   |
+LL | fn foo(x: bool) -> i32 {
+   |                    --- expected `i32` because of return type
+LL |     match x {
+LL |         x: i32 => x,
+   |                   ^ expected `i32`, found `bool`
+
+error: aborting due to 5 previous errors
 
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr
index 7caee64a33f..099d6e86243 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr
+++ b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr
@@ -5,7 +5,7 @@ LL |     match 0usize {
    |           ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         0..=usize::MAX => {},
@@ -19,7 +19,7 @@ LL |     match 0isize {
    |           ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
+   = note: `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         isize::MIN..=isize::MAX => {},
@@ -33,7 +33,7 @@ LL |     m!(0usize, 0..=usize::MAX);
    |        ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL |         match $s { $($t)+ => {}, usize::MAX.. => todo!() }
@@ -46,7 +46,7 @@ LL |     m!(0usize, 0..5 | 5..=usize::MAX);
    |        ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL |         match $s { $($t)+ => {}, usize::MAX.. => todo!() }
@@ -59,7 +59,7 @@ LL |     m!(0usize, 0..usize::MAX | usize::MAX);
    |        ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL |         match $s { $($t)+ => {}, usize::MAX.. => todo!() }
@@ -72,7 +72,7 @@ LL |     m!((0usize, true), (0..5, true) | (5..=usize::MAX, true) | (0..=usize::
    |        ^^^^^^^^^^^^^^ pattern `(usize::MAX.., _)` not covered
    |
    = note: the matched value is of type `(usize, bool)`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL |         match $s { $($t)+ => {}, (usize::MAX.., _) => todo!() }
@@ -85,7 +85,7 @@ LL |     m!(0isize, isize::MIN..=isize::MAX);
    |        ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
+   = note: `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL |         match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
@@ -98,7 +98,7 @@ LL |     m!(0isize, isize::MIN..5 | 5..=isize::MAX);
    |        ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
+   = note: `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL |         match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
@@ -111,7 +111,7 @@ LL |     m!(0isize, isize::MIN..=-1 | 0 | 1..=isize::MAX);
    |        ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
+   = note: `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL |         match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
@@ -124,7 +124,7 @@ LL |     m!(0isize, isize::MIN..isize::MAX | isize::MAX);
    |        ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
+   = note: `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL |         match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
@@ -137,7 +137,7 @@ LL |         (0isize, true),
    |         ^^^^^^^^^^^^^^ patterns `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
    |
    = note: the matched value is of type `(isize, bool)`
-   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
+   = note: `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL |         match $s { $($t)+ => {}, (..isize::MIN, _) | (isize::MAX.., _) => todo!() }
diff --git a/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.rs b/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.rs
index d60f479c0d1..6a0106134b5 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.rs
+++ b/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.rs
@@ -4,7 +4,7 @@ fn main() {
         //~^ ERROR non-exhaustive patterns: `usize::MAX..` not covered
         //~| NOTE pattern `usize::MAX..` not covered
         //~| NOTE the matched value is of type `usize`
-        //~| NOTE `usize` does not have a fixed maximum value
+        //~| NOTE `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
         0..=usize::MAX => {}
     }
 
@@ -12,7 +12,7 @@ fn main() {
         //~^ ERROR non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
         //~| NOTE patterns `..isize::MIN` and `isize::MAX..` not covered
         //~| NOTE the matched value is of type `isize`
-        //~| NOTE `isize` does not have fixed minimum and maximum values
+        //~| NOTE `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
         isize::MIN..=isize::MAX => {}
     }
 }
diff --git a/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr b/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr
index 36743aa8102..fefe7f46ead 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr
+++ b/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr
@@ -5,7 +5,7 @@ LL |     match 0usize {
    |           ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         0..=usize::MAX => {},
@@ -19,7 +19,7 @@ LL |     match 0isize {
    |           ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
+   = note: `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         isize::MIN..=isize::MAX => {},
diff --git a/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr b/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr
index c31411018bc..9d7b53093df 100644
--- a/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr
+++ b/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr
@@ -5,7 +5,7 @@ LL |     match 0 {
    |           ^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         1..=usize::MAX => (),
@@ -19,7 +19,7 @@ LL |     match (0usize, 0usize) {
    |           ^^^^^^^^^^^^^^^^ pattern `(usize::MAX.., _)` not covered
    |
    = note: the matched value is of type `(usize, usize)`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         (1..=usize::MAX, 1..=usize::MAX) => (),
@@ -33,7 +33,7 @@ LL |     match (0isize, 0usize) {
    |           ^^^^^^^^^^^^^^^^ patterns `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
    |
    = note: the matched value is of type `(isize, usize)`
-   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
+   = note: `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         (isize::MIN..=isize::MAX, 1..=usize::MAX) => (),
@@ -70,7 +70,7 @@ note: `Option<usize>` defined here
    |
    = note: not covered
    = note: the matched value is of type `Option<usize>`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         None => (),
@@ -93,7 +93,7 @@ note: `Option<Option<Option<usize>>>` defined here
    |
    = note: not covered
    = note: the matched value is of type `Option<Option<Option<usize>>>`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         None => (),
@@ -112,7 +112,7 @@ note: `A<usize>` defined here
 LL | struct A<T> {
    |        ^
    = note: the matched value is of type `A<usize>`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         A { a: 1..=usize::MAX } => (),
@@ -131,7 +131,7 @@ note: `B<isize, usize>` defined here
 LL | struct B<T, U>(T, U);
    |        ^
    = note: the matched value is of type `B<isize, usize>`
-   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
+   = note: `isize::MIN` and `isize::MAX` are not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         B(isize::MIN..=isize::MAX, 1..=usize::MAX) => (),
@@ -150,7 +150,7 @@ note: `B<isize, usize>` defined here
 LL | struct B<T, U>(T, U);
    |        ^
    = note: the matched value is of type `B<isize, usize>`
-   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
+   = note: `usize::MAX` is not treated as exhaustive, so half-open ranges are necessary to match exhaustively
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         B(_, 1..=usize::MAX) => (),
diff --git a/tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.fixed b/tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.fixed
new file mode 100644
index 00000000000..63cc3333b6b
--- /dev/null
+++ b/tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.fixed
@@ -0,0 +1,20 @@
+#![allow(dead_code, unused_variables)]
+//@ run-rustfix
+pub use my_mod::Foo;
+//~^ NOTE the type is accessed through this re-export, but the type's constructor is not visible in this import's scope due to private fields
+//~| NOTE the type is accessed through this re-export, but the type's constructor is not visible in this import's scope due to private fields
+
+mod my_mod {
+    pub struct Foo(u32);
+
+    mod my_sub_mod {
+        fn my_func() {
+            let crate::my_mod::Foo(x) = crate::my_mod::Foo(42);
+            //~^ ERROR cannot initialize a tuple struct which contains private fields
+            //~| HELP the type can be constructed directly, because its fields are available from the current scope
+            //~| ERROR cannot match against a tuple struct which contains private fields
+            //~| HELP the type can be constructed directly, because its fields are available from the current scope
+        }
+    }
+}
+fn main() {}
diff --git a/tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs b/tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs
new file mode 100644
index 00000000000..0b695f90654
--- /dev/null
+++ b/tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs
@@ -0,0 +1,20 @@
+#![allow(dead_code, unused_variables)]
+//@ run-rustfix
+pub use my_mod::Foo;
+//~^ NOTE the type is accessed through this re-export, but the type's constructor is not visible in this import's scope due to private fields
+//~| NOTE the type is accessed through this re-export, but the type's constructor is not visible in this import's scope due to private fields
+
+mod my_mod {
+    pub struct Foo(u32);
+
+    mod my_sub_mod {
+        fn my_func() {
+            let crate::Foo(x) = crate::Foo(42);
+            //~^ ERROR cannot initialize a tuple struct which contains private fields
+            //~| HELP the type can be constructed directly, because its fields are available from the current scope
+            //~| ERROR cannot match against a tuple struct which contains private fields
+            //~| HELP the type can be constructed directly, because its fields are available from the current scope
+        }
+    }
+}
+fn main() {}
diff --git a/tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.stderr b/tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.stderr
new file mode 100644
index 00000000000..6ab324cb32f
--- /dev/null
+++ b/tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.stderr
@@ -0,0 +1,36 @@
+error[E0423]: cannot initialize a tuple struct which contains private fields
+  --> $DIR/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs:12:33
+   |
+LL |             let crate::Foo(x) = crate::Foo(42);
+   |                                 ^^^^^^^^^^
+   |
+note: the type is accessed through this re-export, but the type's constructor is not visible in this import's scope due to private fields
+  --> $DIR/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs:3:9
+   |
+LL | pub use my_mod::Foo;
+   |         ^^^^^^^^^^^
+help: the type can be constructed directly, because its fields are available from the current scope
+   |
+LL |             let crate::Foo(x) = crate::my_mod::Foo(42);
+   |                                        ++++++++
+
+error[E0532]: cannot match against a tuple struct which contains private fields
+  --> $DIR/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs:12:17
+   |
+LL |             let crate::Foo(x) = crate::Foo(42);
+   |                 ^^^^^^^^^^
+   |
+note: the type is accessed through this re-export, but the type's constructor is not visible in this import's scope due to private fields
+  --> $DIR/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs:3:9
+   |
+LL | pub use my_mod::Foo;
+   |         ^^^^^^^^^^^
+help: the type can be constructed directly, because its fields are available from the current scope
+   |
+LL |             let crate::my_mod::Foo(x) = crate::Foo(42);
+   |                        ++++++++
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0423, E0532.
+For more information about an error, try `rustc --explain E0423`.
diff --git a/tests/ui/proc-macro/add-impl.rs b/tests/ui/proc-macro/add-impl.rs
index 2299f05c2e7..645e9321bba 100644
--- a/tests/ui/proc-macro/add-impl.rs
+++ b/tests/ui/proc-macro/add-impl.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: add-impl.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate add_impl;
diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs
index 8ee2223822a..e580e0784b3 100644
--- a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs
+++ b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs
@@ -1,5 +1,6 @@
 //@ proc-macro: builtin-attrs.rs
 //@ compile-flags:--test
+//@ ignore-backends: gcc
 
 #![feature(decl_macro, test)]
 
diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr
index 346cebf639d..e5de873cf31 100644
--- a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr
+++ b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `NonExistent` in this scope
-  --> $DIR/ambiguous-builtin-attrs-test.rs:19:5
+  --> $DIR/ambiguous-builtin-attrs-test.rs:20:5
    |
 LL |     NonExistent;
    |     ^^^^^^^^^^^ not found in this scope
diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs.rs b/tests/ui/proc-macro/ambiguous-builtin-attrs.rs
index edc7748eff3..63d3c79055c 100644
--- a/tests/ui/proc-macro/ambiguous-builtin-attrs.rs
+++ b/tests/ui/proc-macro/ambiguous-builtin-attrs.rs
@@ -1,5 +1,6 @@
 //@ edition:2018
 //@ proc-macro: builtin-attrs.rs
+//@ ignore-backends: gcc
 #![feature(decl_macro)] //~ ERROR `feature` is ambiguous
 
 extern crate builtin_attrs;
diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr b/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr
index 0f4ddc065a7..ff7894a41ea 100644
--- a/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr
+++ b/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr
@@ -1,11 +1,11 @@
 error[E0425]: cannot find value `NonExistent` in this scope
-  --> $DIR/ambiguous-builtin-attrs.rs:34:5
+  --> $DIR/ambiguous-builtin-attrs.rs:35:5
    |
 LL |     NonExistent;
    |     ^^^^^^^^^^^ not found in this scope
 
 error[E0659]: `repr` is ambiguous
-  --> $DIR/ambiguous-builtin-attrs.rs:9:3
+  --> $DIR/ambiguous-builtin-attrs.rs:10:3
    |
 LL | #[repr(C)]
    |   ^^^^ ambiguous name
@@ -13,14 +13,14 @@ LL | #[repr(C)]
    = note: ambiguous because of a name conflict with a builtin attribute
    = note: `repr` could refer to a built-in attribute
 note: `repr` could also refer to the attribute macro imported here
-  --> $DIR/ambiguous-builtin-attrs.rs:6:5
+  --> $DIR/ambiguous-builtin-attrs.rs:7:5
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
    = help: use `crate::repr` to refer to this attribute macro unambiguously
 
 error[E0659]: `repr` is ambiguous
-  --> $DIR/ambiguous-builtin-attrs.rs:11:19
+  --> $DIR/ambiguous-builtin-attrs.rs:12:19
    |
 LL | #[cfg_attr(all(), repr(C))]
    |                   ^^^^ ambiguous name
@@ -28,14 +28,14 @@ LL | #[cfg_attr(all(), repr(C))]
    = note: ambiguous because of a name conflict with a builtin attribute
    = note: `repr` could refer to a built-in attribute
 note: `repr` could also refer to the attribute macro imported here
-  --> $DIR/ambiguous-builtin-attrs.rs:6:5
+  --> $DIR/ambiguous-builtin-attrs.rs:7:5
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
    = help: use `crate::repr` to refer to this attribute macro unambiguously
 
 error[E0659]: `repr` is ambiguous
-  --> $DIR/ambiguous-builtin-attrs.rs:20:34
+  --> $DIR/ambiguous-builtin-attrs.rs:21:34
    |
 LL | fn non_macro_expanded_location<#[repr(C)] T>() {
    |                                  ^^^^ ambiguous name
@@ -43,14 +43,14 @@ LL | fn non_macro_expanded_location<#[repr(C)] T>() {
    = note: ambiguous because of a name conflict with a builtin attribute
    = note: `repr` could refer to a built-in attribute
 note: `repr` could also refer to the attribute macro imported here
-  --> $DIR/ambiguous-builtin-attrs.rs:6:5
+  --> $DIR/ambiguous-builtin-attrs.rs:7:5
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
    = help: use `crate::repr` to refer to this attribute macro unambiguously
 
 error[E0659]: `repr` is ambiguous
-  --> $DIR/ambiguous-builtin-attrs.rs:24:11
+  --> $DIR/ambiguous-builtin-attrs.rs:25:11
    |
 LL |         #[repr(C)]
    |           ^^^^ ambiguous name
@@ -58,14 +58,14 @@ LL |         #[repr(C)]
    = note: ambiguous because of a name conflict with a builtin attribute
    = note: `repr` could refer to a built-in attribute
 note: `repr` could also refer to the attribute macro imported here
-  --> $DIR/ambiguous-builtin-attrs.rs:6:5
+  --> $DIR/ambiguous-builtin-attrs.rs:7:5
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
    = help: use `crate::repr` to refer to this attribute macro unambiguously
 
 error[E0659]: `allow` is ambiguous
-  --> $DIR/ambiguous-builtin-attrs.rs:38:3
+  --> $DIR/ambiguous-builtin-attrs.rs:39:3
    |
 LL | #[allow(unused)]
    |   ^^^^^ ambiguous name
@@ -73,14 +73,14 @@ LL | #[allow(unused)]
    = note: ambiguous because of a name conflict with a builtin attribute
    = note: `allow` could refer to a built-in attribute
 note: `allow` could also refer to the built-in attribute imported here
-  --> $DIR/ambiguous-builtin-attrs.rs:37:5
+  --> $DIR/ambiguous-builtin-attrs.rs:38:5
    |
 LL | use deny as allow;
    |     ^^^^^^^^^^^^^
    = help: use `crate::allow` to refer to this built-in attribute unambiguously
 
 error[E0659]: `feature` is ambiguous
-  --> $DIR/ambiguous-builtin-attrs.rs:3:4
+  --> $DIR/ambiguous-builtin-attrs.rs:4:4
    |
 LL | #![feature(decl_macro)]
    |    ^^^^^^^ ambiguous name
@@ -88,20 +88,20 @@ LL | #![feature(decl_macro)]
    = note: ambiguous because of a name conflict with a builtin attribute
    = note: `feature` could refer to a built-in attribute
 note: `feature` could also refer to the attribute macro imported here
-  --> $DIR/ambiguous-builtin-attrs.rs:6:5
+  --> $DIR/ambiguous-builtin-attrs.rs:7:5
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
    = help: use `crate::feature` to refer to this attribute macro unambiguously
 
 error[E0517]: attribute should be applied to a struct, enum, or union
-  --> $DIR/ambiguous-builtin-attrs.rs:20:39
+  --> $DIR/ambiguous-builtin-attrs.rs:21:39
    |
 LL | fn non_macro_expanded_location<#[repr(C)] T>() {
    |                                       ^   - not a struct, enum, or union
 
 error[E0517]: attribute should be applied to a struct, enum, or union
-  --> $DIR/ambiguous-builtin-attrs.rs:24:16
+  --> $DIR/ambiguous-builtin-attrs.rs:25:16
    |
 LL |         #[repr(C)]
    |                ^
diff --git a/tests/ui/proc-macro/append-impl.rs b/tests/ui/proc-macro/append-impl.rs
index c0f208460b2..48d21968de0 100644
--- a/tests/ui/proc-macro/append-impl.rs
+++ b/tests/ui/proc-macro/append-impl.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: append-impl.rs
+//@ ignore-backends: gcc
 
 #![allow(warnings)]
 
diff --git a/tests/ui/proc-macro/attr-args.rs b/tests/ui/proc-macro/attr-args.rs
index 1d3e0f725d2..4109b450a8a 100644
--- a/tests/ui/proc-macro/attr-args.rs
+++ b/tests/ui/proc-macro/attr-args.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: attr-args.rs
+//@ ignore-backends: gcc
 
 #![allow(warnings)]
 
diff --git a/tests/ui/proc-macro/attr-invalid-exprs.rs b/tests/ui/proc-macro/attr-invalid-exprs.rs
index f476858a32b..bdfc0587b3b 100644
--- a/tests/ui/proc-macro/attr-invalid-exprs.rs
+++ b/tests/ui/proc-macro/attr-invalid-exprs.rs
@@ -1,6 +1,7 @@
 //! Attributes producing expressions in invalid locations
 
 //@ proc-macro: attr-stmt-expr.rs
+//@ ignore-backends: gcc
 
 #![feature(proc_macro_hygiene)]
 #![feature(stmt_expr_attributes)]
diff --git a/tests/ui/proc-macro/attr-invalid-exprs.stderr b/tests/ui/proc-macro/attr-invalid-exprs.stderr
index 0d500c87145..43241e1e6fd 100644
--- a/tests/ui/proc-macro/attr-invalid-exprs.stderr
+++ b/tests/ui/proc-macro/attr-invalid-exprs.stderr
@@ -1,11 +1,11 @@
 error: expected expression, found end of macro arguments
-  --> $DIR/attr-invalid-exprs.rs:12:13
+  --> $DIR/attr-invalid-exprs.rs:13:13
    |
 LL |     let _ = #[no_output] "Hello, world!";
    |             ^^^^^^^^^^^^
 
 error: macro expansion ignores `,` and any tokens following
-  --> $DIR/attr-invalid-exprs.rs:15:13
+  --> $DIR/attr-invalid-exprs.rs:16:13
    |
 LL |     let _ = #[duplicate] "Hello, world!";
    |             ^^^^^^^^^^^^ caused by the macro expansion here
@@ -17,7 +17,7 @@ LL |     let _ = #[duplicate]; "Hello, world!";
    |                         +
 
 error: macro expansion ignores `,` and any tokens following
-  --> $DIR/attr-invalid-exprs.rs:24:9
+  --> $DIR/attr-invalid-exprs.rs:25:9
    |
 LL |         #[duplicate]
    |         ^^^^^^^^^^^^ caused by the macro expansion here
diff --git a/tests/ui/proc-macro/attr-on-trait.rs b/tests/ui/proc-macro/attr-on-trait.rs
index e95760a837c..345653864f8 100644
--- a/tests/ui/proc-macro/attr-on-trait.rs
+++ b/tests/ui/proc-macro/attr-on-trait.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: attr-on-trait.rs
+//@ ignore-backends: gcc
 
 extern crate attr_on_trait;
 
diff --git a/tests/ui/proc-macro/bang-macro.rs b/tests/ui/proc-macro/bang-macro.rs
index 2287e34c5dd..75f40de242e 100644
--- a/tests/ui/proc-macro/bang-macro.rs
+++ b/tests/ui/proc-macro/bang-macro.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: bang-macro.rs
+//@ ignore-backends: gcc
 
 extern crate bang_macro;
 use bang_macro::rewrite;
diff --git a/tests/ui/proc-macro/call-site.rs b/tests/ui/proc-macro/call-site.rs
index 9c285e1ed11..5de4061b2a9 100644
--- a/tests/ui/proc-macro/call-site.rs
+++ b/tests/ui/proc-macro/call-site.rs
@@ -1,5 +1,6 @@
 //@ check-pass
 //@ proc-macro: call-site.rs
+//@ ignore-backends: gcc
 
 extern crate call_site;
 
diff --git a/tests/ui/proc-macro/count_compound_ops.rs b/tests/ui/proc-macro/count_compound_ops.rs
index 20b0b87817e..fe90e7bfbe4 100644
--- a/tests/ui/proc-macro/count_compound_ops.rs
+++ b/tests/ui/proc-macro/count_compound_ops.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: count_compound_ops.rs
+//@ ignore-backends: gcc
 
 extern crate count_compound_ops;
 use count_compound_ops::count_compound_ops;
diff --git a/tests/ui/proc-macro/derive-bad.rs b/tests/ui/proc-macro/derive-bad.rs
index 9b237c731db..9b9a2bc33c9 100644
--- a/tests/ui/proc-macro/derive-bad.rs
+++ b/tests/ui/proc-macro/derive-bad.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: derive-bad.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate derive_bad;
diff --git a/tests/ui/proc-macro/derive-bad.stderr b/tests/ui/proc-macro/derive-bad.stderr
index 43e97f40ba8..8a252e826ef 100644
--- a/tests/ui/proc-macro/derive-bad.stderr
+++ b/tests/ui/proc-macro/derive-bad.stderr
@@ -1,5 +1,5 @@
 error: expected `:`, found `}`
-  --> $DIR/derive-bad.rs:6:10
+  --> $DIR/derive-bad.rs:7:10
    |
 LL | #[derive(A)]
    |          ^
@@ -10,13 +10,13 @@ LL | #[derive(A)]
    = note: this error originates in the derive macro `A` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: proc-macro derive produced unparsable tokens
-  --> $DIR/derive-bad.rs:6:10
+  --> $DIR/derive-bad.rs:7:10
    |
 LL | #[derive(A)]
    |          ^
 
 error[E0428]: the name `A` is defined multiple times
-  --> $DIR/derive-bad.rs:9:1
+  --> $DIR/derive-bad.rs:10:1
    |
 LL | #[derive(A)]
    |          - previous definition of the type `A` here
diff --git a/tests/ui/proc-macro/derive-helper-shadowing.rs b/tests/ui/proc-macro/derive-helper-shadowing.rs
index ee883be3352..5ddd914d102 100644
--- a/tests/ui/proc-macro/derive-helper-shadowing.rs
+++ b/tests/ui/proc-macro/derive-helper-shadowing.rs
@@ -1,6 +1,7 @@
 //@ edition:2018
 //@ proc-macro: test-macros.rs
 //@ proc-macro: derive-helper-shadowing.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate test_macros;
diff --git a/tests/ui/proc-macro/derive-helper-shadowing.stderr b/tests/ui/proc-macro/derive-helper-shadowing.stderr
index 2e4ddd19b7e..90b42e8d6e2 100644
--- a/tests/ui/proc-macro/derive-helper-shadowing.stderr
+++ b/tests/ui/proc-macro/derive-helper-shadowing.stderr
@@ -1,17 +1,17 @@
 error: cannot use a derive helper attribute through an import
-  --> $DIR/derive-helper-shadowing.rs:42:15
+  --> $DIR/derive-helper-shadowing.rs:43:15
    |
 LL |             #[renamed]
    |               ^^^^^^^
    |
 note: the derive helper attribute imported here
-  --> $DIR/derive-helper-shadowing.rs:41:17
+  --> $DIR/derive-helper-shadowing.rs:42:17
    |
 LL |             use empty_helper as renamed;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: cannot find attribute `empty_helper` in this scope
-  --> $DIR/derive-helper-shadowing.rs:38:22
+  --> $DIR/derive-helper-shadowing.rs:39:22
    |
 LL |             #[derive(GenHelperUse)]
    |                      ^^^^^^^^^^^^
@@ -24,7 +24,7 @@ LL +             use empty_helper;
    |
 
 error: cannot find attribute `empty_helper` in this scope
-  --> $DIR/derive-helper-shadowing.rs:14:11
+  --> $DIR/derive-helper-shadowing.rs:15:11
    |
 LL |         #[empty_helper]
    |           ^^^^^^^^^^^^
@@ -40,26 +40,26 @@ LL +             use crate::empty_helper;
    |
 
 error[E0659]: `empty_helper` is ambiguous
-  --> $DIR/derive-helper-shadowing.rs:19:3
+  --> $DIR/derive-helper-shadowing.rs:20:3
    |
 LL | #[empty_helper]
    |   ^^^^^^^^^^^^ ambiguous name
    |
    = note: ambiguous because of a name conflict with a derive helper attribute
 note: `empty_helper` could refer to the derive helper attribute defined here
-  --> $DIR/derive-helper-shadowing.rs:22:10
+  --> $DIR/derive-helper-shadowing.rs:23:10
    |
 LL | #[derive(Empty)]
    |          ^^^^^
 note: `empty_helper` could also refer to the attribute macro imported here
-  --> $DIR/derive-helper-shadowing.rs:10:5
+  --> $DIR/derive-helper-shadowing.rs:11:5
    |
 LL | use test_macros::empty_attr as empty_helper;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: use `crate::empty_helper` to refer to this attribute macro unambiguously
 
 error: derive helper attribute is used before it is introduced
-  --> $DIR/derive-helper-shadowing.rs:19:3
+  --> $DIR/derive-helper-shadowing.rs:20:3
    |
 LL | #[empty_helper]
    |   ^^^^^^^^^^^^
@@ -76,7 +76,7 @@ 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
+  --> $DIR/derive-helper-shadowing.rs:20:3
    |
 LL | #[empty_helper]
    |   ^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/derive-same-struct.rs b/tests/ui/proc-macro/derive-same-struct.rs
index f7669ba1480..04ab08dc76e 100644
--- a/tests/ui/proc-macro/derive-same-struct.rs
+++ b/tests/ui/proc-macro/derive-same-struct.rs
@@ -3,6 +3,7 @@
 #![allow(path_statements)]
 #![allow(dead_code)]
 //@ proc-macro: derive-same-struct.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate derive_same_struct;
diff --git a/tests/ui/proc-macro/edition-imports-2018.rs b/tests/ui/proc-macro/edition-imports-2018.rs
index a3808d9dce8..af9eed74adb 100644
--- a/tests/ui/proc-macro/edition-imports-2018.rs
+++ b/tests/ui/proc-macro/edition-imports-2018.rs
@@ -1,6 +1,7 @@
 //@ check-pass
 //@ edition:2018
 //@ proc-macro: edition-imports-2015.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate edition_imports_2015;
diff --git a/tests/ui/proc-macro/env.rs b/tests/ui/proc-macro/env.rs
index 94e3b09e526..fc248f88359 100644
--- a/tests/ui/proc-macro/env.rs
+++ b/tests/ui/proc-macro/env.rs
@@ -2,6 +2,7 @@
 //@ run-pass
 //@ rustc-env: THE_CONST=1
 //@ compile-flags: -Zunstable-options --env-set THE_CONST=12 --env-set ANOTHER=4
+//@ ignore-backends: gcc
 
 #![crate_name = "foo"]
 
diff --git a/tests/ui/proc-macro/expand-expr.rs b/tests/ui/proc-macro/expand-expr.rs
index 8a4ed9768d5..c3dddd8e459 100644
--- a/tests/ui/proc-macro/expand-expr.rs
+++ b/tests/ui/proc-macro/expand-expr.rs
@@ -1,5 +1,6 @@
 //@ proc-macro: expand-expr.rs
-// no-remap-src-base: check_expand_expr_file!() fails when enabled.
+//@ ignore-backends: gcc
+// No `remap-src-base`, since `check_expand_expr_file!()` fails when enabled.
 
 #![feature(concat_bytes)]
 extern crate expand_expr;
@@ -10,7 +11,7 @@ use expand_expr::{
 
 // Check builtin macros can be expanded.
 
-expand_expr_is!(13u32, line!());
+expand_expr_is!(14u32, line!());
 expand_expr_is!(24u32, column!());
 
 expand_expr_is!("Hello, World!", concat!("Hello, ", "World", "!"));
diff --git a/tests/ui/proc-macro/expand-expr.stderr b/tests/ui/proc-macro/expand-expr.stderr
index 8b1df177cfa..fd5f672adf5 100644
--- a/tests/ui/proc-macro/expand-expr.stderr
+++ b/tests/ui/proc-macro/expand-expr.stderr
@@ -1,29 +1,29 @@
 error: expected one of `.`, `?`, or an operator, found `;`
-  --> $DIR/expand-expr.rs:108:27
+  --> $DIR/expand-expr.rs:109:27
    |
 LL | expand_expr_fail!("string"; hello);
    |                           ^ expected one of `.`, `?`, or an operator
 
 error: expected expression, found `$`
-  --> $DIR/expand-expr.rs:111:19
+  --> $DIR/expand-expr.rs:112:19
    |
 LL | expand_expr_fail!($);
    |                   ^ expected expression
 
 error: expected expression, found `$`
-  --> $DIR/expand-expr.rs:112:29
+  --> $DIR/expand-expr.rs:113:29
    |
 LL | expand_expr_fail!(echo_tts!($));
    |                             ^ expected expression
 
 error: expected expression, found `$`
-  --> $DIR/expand-expr.rs:113:28
+  --> $DIR/expand-expr.rs:114:28
    |
 LL | expand_expr_fail!(echo_pm!($));
    |                            ^ expected expression
 
 error: macro expansion ignores `hello` and any tokens following
-  --> $DIR/expand-expr.rs:117:47
+  --> $DIR/expand-expr.rs:118:47
    |
 LL | expand_expr_is!("string", echo_tts!("string"; hello));
    |                           --------------------^^^^^- caused by the macro expansion here
@@ -35,7 +35,7 @@ LL | expand_expr_is!("string", echo_tts!("string"; hello););
    |                                                     +
 
 error: macro expansion ignores `;` and any tokens following
-  --> $DIR/expand-expr.rs:118:44
+  --> $DIR/expand-expr.rs:119:44
    |
 LL | expand_expr_is!("string", echo_pm!("string"; hello));
    |                           -----------------^------- caused by the macro expansion here
@@ -47,7 +47,7 @@ LL | expand_expr_is!("string", echo_pm!("string"; hello););
    |                                                    +
 
 error: recursion limit reached while expanding `recursive_expand!`
-  --> $DIR/expand-expr.rs:126:16
+  --> $DIR/expand-expr.rs:127:16
    |
 LL | const _: u32 = recursive_expand!();
    |                ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/expand-to-unstable.rs b/tests/ui/proc-macro/expand-to-unstable.rs
index 8968471ebd8..37bfeab1fe7 100644
--- a/tests/ui/proc-macro/expand-to-unstable.rs
+++ b/tests/ui/proc-macro/expand-to-unstable.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: derive-unstable.rs
+//@ ignore-backends: gcc
 
 #![allow(warnings)]
 
diff --git a/tests/ui/proc-macro/expand-to-unstable.stderr b/tests/ui/proc-macro/expand-to-unstable.stderr
index 563c7ae8f95..255f80501ea 100644
--- a/tests/ui/proc-macro/expand-to-unstable.stderr
+++ b/tests/ui/proc-macro/expand-to-unstable.stderr
@@ -1,5 +1,5 @@
 error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
-  --> $DIR/expand-to-unstable.rs:8:10
+  --> $DIR/expand-to-unstable.rs:9:10
    |
 LL | #[derive(Unstable)]
    |          ^^^^^^^^
diff --git a/tests/ui/proc-macro/expand-with-a-macro.rs b/tests/ui/proc-macro/expand-with-a-macro.rs
index e5baf3601db..aa02cefbec6 100644
--- a/tests/ui/proc-macro/expand-with-a-macro.rs
+++ b/tests/ui/proc-macro/expand-with-a-macro.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ proc-macro: expand-with-a-macro.rs
+//@ ignore-backends: gcc
 
 
 #![deny(warnings)]
diff --git a/tests/ui/proc-macro/gen-macro-rules-hygiene.rs b/tests/ui/proc-macro/gen-macro-rules-hygiene.rs
index 3deec94fa34..fb7c830c2ed 100644
--- a/tests/ui/proc-macro/gen-macro-rules-hygiene.rs
+++ b/tests/ui/proc-macro/gen-macro-rules-hygiene.rs
@@ -3,6 +3,7 @@
 // `$crate` refers to the crate that defines `macro_rules` and not the outer transparent macro.
 
 //@ proc-macro: gen-macro-rules-hygiene.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate gen_macro_rules_hygiene;
diff --git a/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr b/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr
index df7c4f72eb0..e904b43aaae 100644
--- a/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr
+++ b/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr
@@ -1,5 +1,5 @@
 error[E0426]: use of undeclared label `'label_use`
-  --> $DIR/gen-macro-rules-hygiene.rs:12:1
+  --> $DIR/gen-macro-rules-hygiene.rs:13:1
    |
 LL | gen_macro_rules!();
    | ^^^^^^^^^^^^^^^^^^ undeclared label `'label_use`
@@ -10,7 +10,7 @@ LL |         generated!();
    = note: this error originates in the macro `generated` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `local_use` in this scope
-  --> $DIR/gen-macro-rules-hygiene.rs:12:1
+  --> $DIR/gen-macro-rules-hygiene.rs:13:1
    |
 LL | gen_macro_rules!();
    | ^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `local_def`
@@ -21,7 +21,7 @@ LL |         generated!();
    = note: this error originates in the macro `generated` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `local_def` in this scope
-  --> $DIR/gen-macro-rules-hygiene.rs:21:9
+  --> $DIR/gen-macro-rules-hygiene.rs:22:9
    |
 LL |         local_def;
    |         ^^^^^^^^^ help: a local variable with a similar name exists: `local_use`
diff --git a/tests/ui/proc-macro/gen-macro-rules.rs b/tests/ui/proc-macro/gen-macro-rules.rs
index 121d029e2e3..8ee38b2cc27 100644
--- a/tests/ui/proc-macro/gen-macro-rules.rs
+++ b/tests/ui/proc-macro/gen-macro-rules.rs
@@ -2,6 +2,7 @@
 
 //@ check-pass
 //@ proc-macro: gen-macro-rules.rs
+//@ ignore-backends: gcc
 
 extern crate gen_macro_rules as repro;
 
diff --git a/tests/ui/proc-macro/generate-mod.rs b/tests/ui/proc-macro/generate-mod.rs
index 729bfc1db66..0a1629e75ec 100644
--- a/tests/ui/proc-macro/generate-mod.rs
+++ b/tests/ui/proc-macro/generate-mod.rs
@@ -1,6 +1,7 @@
 // Modules generated by transparent proc macros still acts as barriers for names (issue #50504).
 
 //@ proc-macro: generate-mod.rs
+//@ ignore-backends: gcc
 
 extern crate generate_mod;
 
diff --git a/tests/ui/proc-macro/generate-mod.stderr b/tests/ui/proc-macro/generate-mod.stderr
index 142ff1abeed..03cf8c35188 100644
--- a/tests/ui/proc-macro/generate-mod.stderr
+++ b/tests/ui/proc-macro/generate-mod.stderr
@@ -1,5 +1,5 @@
 error[E0412]: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:9:1
+  --> $DIR/generate-mod.rs:10:1
    |
 LL | generate_mod::check!();
    | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -9,7 +9,7 @@ LL | generate_mod::check!();
    = note: this error originates in the macro `generate_mod::check` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0412]: cannot find type `Outer` in this scope
-  --> $DIR/generate-mod.rs:9:1
+  --> $DIR/generate-mod.rs:10:1
    |
 LL | generate_mod::check!();
    | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -19,7 +19,7 @@ LL | generate_mod::check!();
    = note: this error originates in the macro `generate_mod::check` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0412]: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:12:1
+  --> $DIR/generate-mod.rs:13:1
    |
 LL | #[generate_mod::check_attr]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -29,7 +29,7 @@ LL | #[generate_mod::check_attr]
    = note: this error originates in the attribute macro `generate_mod::check_attr` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0412]: cannot find type `OuterAttr` in this scope
-  --> $DIR/generate-mod.rs:12:1
+  --> $DIR/generate-mod.rs:13:1
    |
 LL | #[generate_mod::check_attr]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -39,7 +39,7 @@ LL | #[generate_mod::check_attr]
    = note: this error originates in the attribute macro `generate_mod::check_attr` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:16:10
+  --> $DIR/generate-mod.rs:17:10
    |
 LL | #[derive(generate_mod::CheckDerive)]
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -50,7 +50,7 @@ LL | #[derive(generate_mod::CheckDerive)]
    = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: cannot find type `OuterDerive` in this scope
-  --> $DIR/generate-mod.rs:16:10
+  --> $DIR/generate-mod.rs:17:10
    |
 LL | #[derive(generate_mod::CheckDerive)]
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -60,7 +60,7 @@ LL | #[derive(generate_mod::CheckDerive)]
    = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:23:14
+  --> $DIR/generate-mod.rs:24:14
    |
 LL |     #[derive(generate_mod::CheckDerive)]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -70,7 +70,7 @@ LL |     #[derive(generate_mod::CheckDerive)]
    = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: cannot find type `OuterDerive` in this scope
-  --> $DIR/generate-mod.rs:23:14
+  --> $DIR/generate-mod.rs:24:14
    |
 LL |     #[derive(generate_mod::CheckDerive)]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -84,7 +84,7 @@ error: aborting due to 8 previous errors
 For more information about this error, try `rustc --explain E0412`.
 Future incompatibility report: Future breakage diagnostic:
 error: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:16:10
+  --> $DIR/generate-mod.rs:17:10
    |
 LL | #[derive(generate_mod::CheckDerive)]
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -96,7 +96,7 @@ LL | #[derive(generate_mod::CheckDerive)]
 
 Future breakage diagnostic:
 error: cannot find type `OuterDerive` in this scope
-  --> $DIR/generate-mod.rs:16:10
+  --> $DIR/generate-mod.rs:17:10
    |
 LL | #[derive(generate_mod::CheckDerive)]
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -108,7 +108,7 @@ LL | #[derive(generate_mod::CheckDerive)]
 
 Future breakage diagnostic:
 error: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:23:14
+  --> $DIR/generate-mod.rs:24:14
    |
 LL |     #[derive(generate_mod::CheckDerive)]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -120,7 +120,7 @@ LL |     #[derive(generate_mod::CheckDerive)]
 
 Future breakage diagnostic:
 error: cannot find type `OuterDerive` in this scope
-  --> $DIR/generate-mod.rs:23:14
+  --> $DIR/generate-mod.rs:24:14
    |
 LL |     #[derive(generate_mod::CheckDerive)]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -132,7 +132,7 @@ LL |     #[derive(generate_mod::CheckDerive)]
 
 Future breakage diagnostic:
 warning: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:30:10
+  --> $DIR/generate-mod.rs:31:10
    |
 LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
@@ -143,7 +143,7 @@ LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
 
 Future breakage diagnostic:
 warning: cannot find type `OuterDeriveLint` in this scope
-  --> $DIR/generate-mod.rs:30:10
+  --> $DIR/generate-mod.rs:31:10
    |
 LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
diff --git a/tests/ui/proc-macro/hygiene_example.rs b/tests/ui/proc-macro/hygiene_example.rs
index 84b5e345608..f74f22fb3b0 100644
--- a/tests/ui/proc-macro/hygiene_example.rs
+++ b/tests/ui/proc-macro/hygiene_example.rs
@@ -1,5 +1,6 @@
 //@ check-pass
 //@ aux-build:hygiene_example.rs
+//@ ignore-backends: gcc
 
 extern crate hygiene_example;
 use hygiene_example::hello;
diff --git a/tests/ui/proc-macro/is-available.rs b/tests/ui/proc-macro/is-available.rs
index faee560d7a9..9e9cf5d11b6 100644
--- a/tests/ui/proc-macro/is-available.rs
+++ b/tests/ui/proc-macro/is-available.rs
@@ -3,6 +3,7 @@
 extern crate proc_macro;
 
 //@ proc-macro: is-available.rs
+//@ ignore-backends: gcc
 extern crate is_available;
 
 fn main() {
diff --git a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs
index abdd6bf136d..d420f2641da 100644
--- a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs
+++ b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: issue-104884.rs
+//@ ignore-backends: gcc
 
 use std::collections::BinaryHeap;
 
diff --git a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr
index f3ed9e5761d..b7aed4a8485 100644
--- a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr
+++ b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr
@@ -1,11 +1,11 @@
 error[E0277]: can't compare `PriorityQueue<T>` with `PriorityQueue<T>`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:10
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:10
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |          ^^^^^^^^^^ no implementation for `PriorityQueue<T> == PriorityQueue<T>`
    |
 help: the trait `PartialEq` is not implemented for `PriorityQueue<T>`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:20:1
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:21:1
    |
 LL | struct PriorityQueue<T>(BinaryHeap<PriorityQueueEntry<T>>);
    | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,13 +13,13 @@ note: required by a bound in `PartialOrd`
   --> $SRC_DIR/core/src/cmp.rs:LL:COL
 
 error[E0277]: the trait bound `PriorityQueue<T>: Eq` is not satisfied
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:22
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |                      ^^^^^^^ unsatisfied trait bound
    |
 help: the trait `Eq` is not implemented for `PriorityQueue<T>`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:20:1
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:21:1
    |
 LL | struct PriorityQueue<T>(BinaryHeap<PriorityQueueEntry<T>>);
    | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -28,13 +28,13 @@ note: required by a bound in `Ord`
    = note: this error originates in the derive macro `AddImpl` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0277]: can't compare `T` with `T`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:22
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |                      ^^^^^^^ no implementation for `T < T` and `T > T`
    |
 note: required for `PriorityQueue<T>` to implement `PartialOrd`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:10
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:10
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |          ^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
@@ -42,7 +42,7 @@ note: required by a bound in `Ord`
   --> $SRC_DIR/core/src/cmp.rs:LL:COL
 
 error[E0277]: can't compare `BinaryHeap<PriorityQueueEntry<T>>` with `_`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:20:25
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:21:25
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |          ---------- in this derive macro expansion
@@ -53,7 +53,7 @@ LL | struct PriorityQueue<T>(BinaryHeap<PriorityQueueEntry<T>>);
    = help: the trait `PartialOrd<_>` is not implemented for `BinaryHeap<PriorityQueueEntry<T>>`
 
 error[E0599]: no method named `cmp` found for struct `BinaryHeap<PriorityQueueEntry<T>>` in the current scope
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:22
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |                      ^^^^^^^ `BinaryHeap<PriorityQueueEntry<T>>` is not an iterator
@@ -61,7 +61,7 @@ LL | #[derive(PartialOrd, AddImpl)]
    = note: this error originates in the derive macro `AddImpl` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0609]: no field `height` on type `&PriorityQueue<T>`
-  --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22
+  --> $DIR/issue-104884-trait-impl-sugg-err.rs:14:22
    |
 LL | #[derive(PartialOrd, AddImpl)]
    |                      ^^^^^^^ unknown field
diff --git a/tests/ui/proc-macro/issue-107113-wrap.rs b/tests/ui/proc-macro/issue-107113-wrap.rs
index 2799e79bb1c..a46cf893d90 100644
--- a/tests/ui/proc-macro/issue-107113-wrap.rs
+++ b/tests/ui/proc-macro/issue-107113-wrap.rs
@@ -1,5 +1,6 @@
 //@ edition:2021
 //@ proc-macro: issue-107113.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate issue_107113;
diff --git a/tests/ui/proc-macro/issue-107113-wrap.stderr b/tests/ui/proc-macro/issue-107113-wrap.stderr
index b541051147d..9b5b0333256 100644
--- a/tests/ui/proc-macro/issue-107113-wrap.stderr
+++ b/tests/ui/proc-macro/issue-107113-wrap.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-107113-wrap.rs:7:1
+  --> $DIR/issue-107113-wrap.rs:8:1
    |
 LL | #[issue_107113::main]
    | ^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/issue-118809.rs b/tests/ui/proc-macro/issue-118809.rs
index a6a3956981a..3ceede7e885 100644
--- a/tests/ui/proc-macro/issue-118809.rs
+++ b/tests/ui/proc-macro/issue-118809.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: issue-118809.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate issue_118809;
diff --git a/tests/ui/proc-macro/issue-118809.stderr b/tests/ui/proc-macro/issue-118809.stderr
index 30b09fd4006..98329fea119 100644
--- a/tests/ui/proc-macro/issue-118809.stderr
+++ b/tests/ui/proc-macro/issue-118809.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-118809.rs:6:10
+  --> $DIR/issue-118809.rs:7:10
    |
 LL | #[derive(Deserialize)]
    |          ^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | #[derive(Deserialize)]
    |          arguments to this enum variant are incorrect
    |
 help: the type constructed contains `u32` due to the type of the argument passed
-  --> $DIR/issue-118809.rs:6:10
+  --> $DIR/issue-118809.rs:7:10
    |
 LL | #[derive(Deserialize)]
    |          ^^^^^^^^^^^ this argument influences the type of `Some`
diff --git a/tests/ui/proc-macro/issue-38586.rs b/tests/ui/proc-macro/issue-38586.rs
index 88dbb8037be..c9623fd383b 100644
--- a/tests/ui/proc-macro/issue-38586.rs
+++ b/tests/ui/proc-macro/issue-38586.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: issue-38586.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate issue_38586;
diff --git a/tests/ui/proc-macro/issue-38586.stderr b/tests/ui/proc-macro/issue-38586.stderr
index 00491556450..e49d4c83e27 100644
--- a/tests/ui/proc-macro/issue-38586.stderr
+++ b/tests/ui/proc-macro/issue-38586.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `foo` in this scope
-  --> $DIR/issue-38586.rs:6:10
+  --> $DIR/issue-38586.rs:7:10
    |
 LL | #[derive(A)]
    |          ^ not found in this scope
diff --git a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs
index df236cce6d2..988641b2b9c 100644
--- a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs
+++ b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs
@@ -4,6 +4,7 @@
 //@ edition:2018
 //@ proc-macro: issue-59191.rs
 //@ needs-unwind (affects error output)
+//@ ignore-backends: gcc
 
 #![feature(custom_inner_attributes)]
 #![issue_59191::no_main]
diff --git a/tests/ui/proc-macro/issue-79148.rs b/tests/ui/proc-macro/issue-79148.rs
index b2248759b5f..7ce6216c842 100644
--- a/tests/ui/proc-macro/issue-79148.rs
+++ b/tests/ui/proc-macro/issue-79148.rs
@@ -1,5 +1,6 @@
 //@ proc-macro: re-export.rs
 //@ edition:2018
+//@ ignore-backends: gcc
 
 extern crate re_export;
 
diff --git a/tests/ui/proc-macro/issue-79148.stderr b/tests/ui/proc-macro/issue-79148.stderr
index 8adc4c6e0db..80a5b1a0855 100644
--- a/tests/ui/proc-macro/issue-79148.stderr
+++ b/tests/ui/proc-macro/issue-79148.stderr
@@ -1,11 +1,11 @@
 error[E0364]: `Variant` is only public within the crate, and cannot be re-exported outside
-  --> $DIR/issue-79148.rs:8:1
+  --> $DIR/issue-79148.rs:9:1
    |
 LL | cause_ice!();
    | ^^^^^^^^^^^^
    |
 note: consider marking `Variant` as `pub` in the imported module
-  --> $DIR/issue-79148.rs:8:1
+  --> $DIR/issue-79148.rs:9:1
    |
 LL | cause_ice!();
    | ^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/issue-83510.rs b/tests/ui/proc-macro/issue-83510.rs
index 67469511fc3..d49e1867f1d 100644
--- a/tests/ui/proc-macro/issue-83510.rs
+++ b/tests/ui/proc-macro/issue-83510.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: issue-83510.rs
+//@ ignore-backends: gcc
 
 extern crate issue_83510;
 
diff --git a/tests/ui/proc-macro/issue-83510.stderr b/tests/ui/proc-macro/issue-83510.stderr
index e59b77af3dc..a7c3f5a1d5b 100644
--- a/tests/ui/proc-macro/issue-83510.stderr
+++ b/tests/ui/proc-macro/issue-83510.stderr
@@ -1,5 +1,5 @@
 error[E0412]: cannot find type `Foo` in this scope
-  --> $DIR/issue-83510.rs:5:1
+  --> $DIR/issue-83510.rs:6:1
    |
 LL | issue_83510::dance_like_you_want_to_ice!();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -7,7 +7,7 @@ LL | issue_83510::dance_like_you_want_to_ice!();
    = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0404]: expected trait, found struct `Box`
-  --> $DIR/issue-83510.rs:5:1
+  --> $DIR/issue-83510.rs:6:1
    |
 LL | issue_83510::dance_like_you_want_to_ice!();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a trait
@@ -15,7 +15,7 @@ LL | issue_83510::dance_like_you_want_to_ice!();
    = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0405]: cannot find trait `Baz` in this scope
-  --> $DIR/issue-83510.rs:5:1
+  --> $DIR/issue-83510.rs:6:1
    |
 LL | issue_83510::dance_like_you_want_to_ice!();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -23,7 +23,7 @@ LL | issue_83510::dance_like_you_want_to_ice!();
    = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0658]: inherent associated types are unstable
-  --> $DIR/issue-83510.rs:5:1
+  --> $DIR/issue-83510.rs:6:1
    |
 LL | issue_83510::dance_like_you_want_to_ice!();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/issue-91800.rs b/tests/ui/proc-macro/issue-91800.rs
index 8cecfad32b5..79cbf8632f0 100644
--- a/tests/ui/proc-macro/issue-91800.rs
+++ b/tests/ui/proc-macro/issue-91800.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: issue-91800-macro.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate issue_91800_macro;
diff --git a/tests/ui/proc-macro/issue-91800.stderr b/tests/ui/proc-macro/issue-91800.stderr
index 63ebc0a552e..be5a8ece384 100644
--- a/tests/ui/proc-macro/issue-91800.stderr
+++ b/tests/ui/proc-macro/issue-91800.stderr
@@ -1,5 +1,5 @@
 error: macros that expand to items must be delimited with braces or followed by a semicolon
-  --> $DIR/issue-91800.rs:6:10
+  --> $DIR/issue-91800.rs:7:10
    |
 LL | #[derive(MyTrait)]
    |          ^^^^^^^
@@ -7,13 +7,13 @@ LL | #[derive(MyTrait)]
    = note: this error originates in the derive macro `MyTrait` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: proc-macro derive produced unparsable tokens
-  --> $DIR/issue-91800.rs:6:10
+  --> $DIR/issue-91800.rs:7:10
    |
 LL | #[derive(MyTrait)]
    |          ^^^^^^^
 
 error: 
-  --> $DIR/issue-91800.rs:6:10
+  --> $DIR/issue-91800.rs:7:10
    |
 LL | #[derive(MyTrait)]
    |          ^^^^^^^
@@ -21,7 +21,7 @@ LL | #[derive(MyTrait)]
    = note: this error originates in the derive macro `MyTrait` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: macros that expand to items must be delimited with braces or followed by a semicolon
-  --> $DIR/issue-91800.rs:10:1
+  --> $DIR/issue-91800.rs:11:1
    |
 LL | #[attribute_macro]
    | ^^^^^^^^^^^^^^^^^^
@@ -29,7 +29,7 @@ LL | #[attribute_macro]
    = note: this error originates in the attribute macro `attribute_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: 
-  --> $DIR/issue-91800.rs:10:1
+  --> $DIR/issue-91800.rs:11:1
    |
 LL | #[attribute_macro]
    | ^^^^^^^^^^^^^^^^^^
@@ -37,7 +37,7 @@ LL | #[attribute_macro]
    = note: this error originates in the attribute macro `attribute_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: macros that expand to items must be delimited with braces or followed by a semicolon
-  --> $DIR/issue-91800.rs:15:1
+  --> $DIR/issue-91800.rs:16:1
    |
 LL | fn_macro! {}
    | ^^^^^^^^^^^^
@@ -45,7 +45,7 @@ LL | fn_macro! {}
    = note: this error originates in the macro `fn_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: 
-  --> $DIR/issue-91800.rs:15:1
+  --> $DIR/issue-91800.rs:16:1
    |
 LL | fn_macro! {}
    | ^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/lifetimes-rpass.rs b/tests/ui/proc-macro/lifetimes-rpass.rs
index c462b27722f..9b794e695cd 100644
--- a/tests/ui/proc-macro/lifetimes-rpass.rs
+++ b/tests/ui/proc-macro/lifetimes-rpass.rs
@@ -2,6 +2,7 @@
 
 #![allow(unused_variables)]
 //@ proc-macro: lifetimes-rpass.rs
+//@ ignore-backends: gcc
 
 extern crate lifetimes_rpass as lifetimes;
 use lifetimes::*;
diff --git a/tests/ui/proc-macro/lints_in_proc_macros.rs b/tests/ui/proc-macro/lints_in_proc_macros.rs
index 6714b8b6e1d..2c22c787982 100644
--- a/tests/ui/proc-macro/lints_in_proc_macros.rs
+++ b/tests/ui/proc-macro/lints_in_proc_macros.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: bang_proc_macro2.rs
+//@ ignore-backends: gcc
 
 extern crate bang_proc_macro2;
 
diff --git a/tests/ui/proc-macro/lints_in_proc_macros.stderr b/tests/ui/proc-macro/lints_in_proc_macros.stderr
index 244d218608b..016b236bda8 100644
--- a/tests/ui/proc-macro/lints_in_proc_macros.stderr
+++ b/tests/ui/proc-macro/lints_in_proc_macros.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `foobar2` in this scope
-  --> $DIR/lints_in_proc_macros.rs:9:5
+  --> $DIR/lints_in_proc_macros.rs:10:5
    |
 LL |     bang_proc_macro2!();
    |     ^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `foobar`
diff --git a/tests/ui/proc-macro/load-two.rs b/tests/ui/proc-macro/load-two.rs
index 608379949e6..197e7845db3 100644
--- a/tests/ui/proc-macro/load-two.rs
+++ b/tests/ui/proc-macro/load-two.rs
@@ -4,6 +4,7 @@
 #![allow(dead_code)]
 //@ proc-macro: derive-atob.rs
 //@ proc-macro: derive-ctod.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate derive_atob;
diff --git a/tests/ui/proc-macro/macro-crate-multi-decorator.rs b/tests/ui/proc-macro/macro-crate-multi-decorator.rs
index c4f02e7adfc..e247c9526a4 100644
--- a/tests/ui/proc-macro/macro-crate-multi-decorator.rs
+++ b/tests/ui/proc-macro/macro-crate-multi-decorator.rs
@@ -2,6 +2,7 @@
 
 //@ check-pass
 //@ proc-macro: duplicate.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate duplicate;
diff --git a/tests/ui/proc-macro/macro_rules_edition_from_pm.rs b/tests/ui/proc-macro/macro_rules_edition_from_pm.rs
index 8fc7d909749..fc3ae3ef2c8 100644
--- a/tests/ui/proc-macro/macro_rules_edition_from_pm.rs
+++ b/tests/ui/proc-macro/macro_rules_edition_from_pm.rs
@@ -7,6 +7,7 @@
 //@[edition2021] edition:2021
 //@[edition2024] edition:2024
 //@ check-pass
+//@ ignore-backends: gcc
 
 // This checks how the expr fragment specifier works.
 macro_rules_edition_pm::make_edition_macro!{}
diff --git a/tests/ui/proc-macro/match-expander.rs b/tests/ui/proc-macro/match-expander.rs
index 23e5746c540..b7245c7e682 100644
--- a/tests/ui/proc-macro/match-expander.rs
+++ b/tests/ui/proc-macro/match-expander.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: match-expander.rs
+//@ ignore-backends: gcc
 // Ensure that we don't point at macro invocation when providing inference contexts.
 
 #[macro_use]
diff --git a/tests/ui/proc-macro/match-expander.stderr b/tests/ui/proc-macro/match-expander.stderr
index b77468ec60a..d2423336b1d 100644
--- a/tests/ui/proc-macro/match-expander.stderr
+++ b/tests/ui/proc-macro/match-expander.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/match-expander.rs:8:5
+  --> $DIR/match-expander.rs:9:5
    |
 LL |     match_expander::matcher!();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `S`, found `bool`
diff --git a/tests/ui/proc-macro/mixed-site-span.rs b/tests/ui/proc-macro/mixed-site-span.rs
index 442b440c121..98a022632cd 100644
--- a/tests/ui/proc-macro/mixed-site-span.rs
+++ b/tests/ui/proc-macro/mixed-site-span.rs
@@ -2,6 +2,7 @@
 
 //@ aux-build: token-site-span.rs
 //@ proc-macro: mixed-site-span.rs
+//@ ignore-backends: gcc
 
 extern crate mixed_site_span;
 extern crate token_site_span;
diff --git a/tests/ui/proc-macro/mixed-site-span.stderr b/tests/ui/proc-macro/mixed-site-span.stderr
index d62031a853c..2d2d55fe148 100644
--- a/tests/ui/proc-macro/mixed-site-span.stderr
+++ b/tests/ui/proc-macro/mixed-site-span.stderr
@@ -1,5 +1,5 @@
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:47:5
+  --> $DIR/mixed-site-span.rs:48:5
    |
 LL |     invoke_with_crate!{input proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -7,7 +7,7 @@ LL |     invoke_with_crate!{input proc_macro_item}
    = note: this error originates in the macro `invoke_with_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:48:5
+  --> $DIR/mixed-site-span.rs:49:5
    |
 LL |     invoke_with_ident!{input proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -15,7 +15,7 @@ LL |     invoke_with_ident!{input proc_macro_item}
    = note: this error originates in the macro `invoke_with_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:49:5
+  --> $DIR/mixed-site-span.rs:50:5
    |
 LL |     invoke_with_crate!{call proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -23,7 +23,7 @@ LL |     invoke_with_crate!{call proc_macro_item}
    = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `invoke_with_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:50:5
+  --> $DIR/mixed-site-span.rs:51:5
    |
 LL |     invoke_with_ident!{call proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -31,7 +31,7 @@ LL |     invoke_with_ident!{call proc_macro_item}
    = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `invoke_with_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:51:5
+  --> $DIR/mixed-site-span.rs:52:5
    |
 LL |     invoke_with_ident!{hello call proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -39,7 +39,7 @@ LL |     invoke_with_ident!{hello call proc_macro_item}
    = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `invoke_with_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate::proc_macro_item`
-  --> $DIR/mixed-site-span.rs:54:5
+  --> $DIR/mixed-site-span.rs:55:5
    |
 LL |     invoke_with_ident!{krate input proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------------^
@@ -50,7 +50,7 @@ LL |     invoke_with_ident!{krate input proc_macro_item}
    = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `invoke_with_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate::proc_macro_item`
-  --> $DIR/mixed-site-span.rs:55:5
+  --> $DIR/mixed-site-span.rs:56:5
    |
 LL |     with_crate!{krate input proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^---------------^
@@ -61,7 +61,7 @@ LL |     with_crate!{krate input proc_macro_item}
    = note: this error originates in the macro `with_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:56:5
+  --> $DIR/mixed-site-span.rs:57:5
    |
 LL |     with_crate!{krate call proc_macro_item}
    |     ^^^^^^^^^^^^^^^^^^^^^^^---------------^
@@ -72,7 +72,7 @@ LL |     with_crate!{krate call proc_macro_item}
    = note: this error originates in the macro `with_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:60:28
+  --> $DIR/mixed-site-span.rs:61:28
    |
 LL |         invoke_with_ident!{$crate input proc_macro_item}
    |                            ^^^^^^       --------------- help: a similar name exists in the module: `proc_macro_rules`
@@ -85,7 +85,7 @@ LL |     test!();
    = note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:61:21
+  --> $DIR/mixed-site-span.rs:62:21
    |
 LL |         with_crate!{$crate input proc_macro_item}
    |                     ^^^^^^       --------------- help: a similar name exists in the module: `proc_macro_rules`
@@ -98,7 +98,7 @@ LL |     test!();
    = note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:62:9
+  --> $DIR/mixed-site-span.rs:63:9
    |
 LL |         with_crate!{$crate call proc_macro_item}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^---------------^
@@ -112,7 +112,7 @@ LL |     test!();
    = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:67:5
+  --> $DIR/mixed-site-span.rs:68:5
    |
 LL |     test!();
    |     ^^^^^^^ no `proc_macro_item` in the root
@@ -120,7 +120,7 @@ LL |     test!();
    = note: this error originates in the macro `with_crate` which comes from the expansion of the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate::TokenItem`
-  --> $DIR/mixed-site-span.rs:87:5
+  --> $DIR/mixed-site-span.rs:88:5
    |
 LL |     invoke_with_ident!{krate input TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -133,7 +133,7 @@ LL |     quote!(use $krate::$ident as token_site_span::TokenItem as _;)
    |                                  +++++++++++++++++++++++++++++
 
 error[E0432]: unresolved import `$crate::TokenItem`
-  --> $DIR/mixed-site-span.rs:88:5
+  --> $DIR/mixed-site-span.rs:89:5
    |
 LL |     with_crate!{krate input TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -146,7 +146,7 @@ LL |     quote!(use $krate::$ident as token_site_span::TokenItem as _;)
    |                                  +++++++++++++++++++++++++++++
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:89:5
+  --> $DIR/mixed-site-span.rs:90:5
    |
 LL |     with_crate!{krate call TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -159,7 +159,7 @@ LL +     token_site_span::TokenItem as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:92:5
+  --> $DIR/mixed-site-span.rs:93:5
    |
 LL |     invoke_with_crate!{mixed TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -173,7 +173,7 @@ LL +     ($s:ident $i:ident) => { token_site_span::TokenItem as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:93:5
+  --> $DIR/mixed-site-span.rs:94:5
    |
 LL |     invoke_with_ident!{mixed TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -187,7 +187,7 @@ LL +     ($s:ident $i:ident) => { token_site_span::TokenItem as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:94:5
+  --> $DIR/mixed-site-span.rs:95:5
    |
 LL |     invoke_with_ident!{krate mixed TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -201,7 +201,7 @@ LL +     ($m:ident $s:ident $i:ident) => { token_site_span::TokenItem as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:95:5
+  --> $DIR/mixed-site-span.rs:96:5
    |
 LL |     with_crate!{krate mixed TokenItem}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -214,7 +214,7 @@ LL +     token_site_span::TokenItem as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:99:28
+  --> $DIR/mixed-site-span.rs:100:28
    |
 LL |         invoke_with_ident!{$crate input TokenItem}
    |                            ^^^^^^ no `TokenItem` in the root
@@ -230,7 +230,7 @@ LL +         invoke_with_ident!{token_site_span::TokenItem as _ input TokenItem}
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:100:21
+  --> $DIR/mixed-site-span.rs:101:21
    |
 LL |         with_crate!{$crate input TokenItem}
    |                     ^^^^^^ no `TokenItem` in the root
@@ -246,7 +246,7 @@ LL +         with_crate!{token_site_span::TokenItem as _ input TokenItem}
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:101:9
+  --> $DIR/mixed-site-span.rs:102:9
    |
 LL |         with_crate!{$crate call TokenItem}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -262,7 +262,7 @@ LL +         token_site_span::TokenItem as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:108:5
+  --> $DIR/mixed-site-span.rs:109:5
    |
 LL |     test!();
    |     ^^^^^^^ no `TokenItem` in the root
@@ -276,7 +276,7 @@ LL +     ($m:ident $s:ident $i:ident) => { token_site_span::TokenItem as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:105:9
+  --> $DIR/mixed-site-span.rs:106:9
    |
 LL |         with_crate!{$crate mixed TokenItem}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -292,7 +292,7 @@ LL +         token_site_span::TokenItem as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:129:5
+  --> $DIR/mixed-site-span.rs:130:5
    |
 LL |     invoke_with_crate!{input ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -306,7 +306,7 @@ LL +     ($s:ident $i:ident) => { with_crate!{ItemUse as _ $s $i} };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:130:5
+  --> $DIR/mixed-site-span.rs:131:5
    |
 LL |     invoke_with_ident!{input ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -320,7 +320,7 @@ LL +     ($s:ident $i:ident) => { with_crate!{ItemUse as _ $s $i} };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:133:5
+  --> $DIR/mixed-site-span.rs:134:5
    |
 LL |     invoke_with_crate!{mixed ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -334,7 +334,7 @@ LL +     ($s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:134:5
+  --> $DIR/mixed-site-span.rs:135:5
    |
 LL |     invoke_with_ident!{mixed ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -348,7 +348,7 @@ LL +     ($s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:135:5
+  --> $DIR/mixed-site-span.rs:136:5
    |
 LL |     invoke_with_ident!{krate mixed ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -362,7 +362,7 @@ LL +     ($m:ident $s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:136:5
+  --> $DIR/mixed-site-span.rs:137:5
    |
 LL |     with_crate!{krate mixed ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -375,7 +375,7 @@ LL +     ItemUse as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:138:5
+  --> $DIR/mixed-site-span.rs:139:5
    |
 LL |     invoke_with_crate!{call ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -389,7 +389,7 @@ LL +     ($s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:139:5
+  --> $DIR/mixed-site-span.rs:140:5
    |
 LL |     invoke_with_ident!{call ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -403,7 +403,7 @@ LL +     ($s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:140:5
+  --> $DIR/mixed-site-span.rs:141:5
    |
 LL |     invoke_with_ident!{hello call ItemUse}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -417,7 +417,7 @@ LL +     ($m:ident $s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:148:5
+  --> $DIR/mixed-site-span.rs:149:5
    |
 LL |     test!();
    |     ^^^^^^^ no `ItemUse` in the root
@@ -431,7 +431,7 @@ LL +     ($m:ident $s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:144:9
+  --> $DIR/mixed-site-span.rs:145:9
    |
 LL |         with_crate!{$crate mixed ItemUse}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -447,7 +447,7 @@ LL +         ItemUse as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:148:5
+  --> $DIR/mixed-site-span.rs:149:5
    |
 LL |     test!();
    |     ^^^^^^^ no `ItemUse` in the root
@@ -461,7 +461,7 @@ LL +     ($m:ident $s:ident $i:ident) => { ItemUse as _ };
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:153:1
+  --> $DIR/mixed-site-span.rs:154:1
    |
 LL | use_input_crate!{proc_macro_item}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -469,7 +469,7 @@ LL | use_input_crate!{proc_macro_item}
    = note: this error originates in the macro `use_input_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:154:1
+  --> $DIR/mixed-site-span.rs:155:1
    |
 LL | use_input_krate!{proc_macro_item}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -477,7 +477,7 @@ LL | use_input_krate!{proc_macro_item}
    = note: this error originates in the macro `use_input_krate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:157:1
+  --> $DIR/mixed-site-span.rs:158:1
    |
 LL | use_call_crate!{proc_macro_item}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -485,7 +485,7 @@ LL | use_call_crate!{proc_macro_item}
    = note: this error originates in the macro `use_call_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:158:1
+  --> $DIR/mixed-site-span.rs:159:1
    |
 LL | use_call_krate!{proc_macro_item}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `proc_macro_item` in the root
@@ -493,7 +493,7 @@ LL | use_call_krate!{proc_macro_item}
    = note: this error originates in the macro `use_call_krate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:163:1
+  --> $DIR/mixed-site-span.rs:164:1
    |
 LL | use_mixed_crate!{TokenItem}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -507,7 +507,7 @@ LL +     token_site_span::TokenItem as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:164:1
+  --> $DIR/mixed-site-span.rs:165:1
    |
 LL | use_mixed_krate!{TokenItem}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TokenItem` in the root
@@ -521,7 +521,7 @@ LL + token_site_span::TokenItem as _
    |
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:169:1
+  --> $DIR/mixed-site-span.rs:170:1
    |
 LL | use_input_crate!{ItemUse}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -529,7 +529,7 @@ LL | use_input_crate!{ItemUse}
    = note: this error originates in the macro `use_input_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:170:1
+  --> $DIR/mixed-site-span.rs:171:1
    |
 LL | use_input_krate!{ItemUse}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -537,7 +537,7 @@ LL | use_input_krate!{ItemUse}
    = note: this error originates in the macro `use_input_krate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:171:1
+  --> $DIR/mixed-site-span.rs:172:1
    |
 LL | use_mixed_crate!{ItemUse}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -545,7 +545,7 @@ LL | use_mixed_crate!{ItemUse}
    = note: this error originates in the macro `use_mixed_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:172:1
+  --> $DIR/mixed-site-span.rs:173:1
    |
 LL | use_mixed_krate!{ItemUse}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -553,7 +553,7 @@ LL | use_mixed_krate!{ItemUse}
    = note: this error originates in the macro `use_mixed_krate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:173:1
+  --> $DIR/mixed-site-span.rs:174:1
    |
 LL | use_call_crate!{ItemUse}
    | ^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -561,7 +561,7 @@ LL | use_call_crate!{ItemUse}
    = note: this error originates in the macro `use_call_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0432]: unresolved import `$crate`
-  --> $DIR/mixed-site-span.rs:174:1
+  --> $DIR/mixed-site-span.rs:175:1
    |
 LL | use_call_krate!{ItemUse}
    | ^^^^^^^^^^^^^^^^^^^^^^^^ no `ItemUse` in the root
@@ -569,7 +569,7 @@ LL | use_call_krate!{ItemUse}
    = note: this error originates in the macro `use_call_krate` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0426]: use of undeclared label `'label_use`
-  --> $DIR/mixed-site-span.rs:21:9
+  --> $DIR/mixed-site-span.rs:22:9
    |
 LL |         proc_macro_rules!();
    |         ^^^^^^^^^^^^^^^^^^^ undeclared label `'label_use`
@@ -577,7 +577,7 @@ LL |         proc_macro_rules!();
    = note: this error originates in the macro `proc_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0412]: cannot find type `ItemUse` in crate `$crate`
-  --> $DIR/mixed-site-span.rs:21:9
+  --> $DIR/mixed-site-span.rs:22:9
    |
 LL |         proc_macro_rules!();
    |         ^^^^^^^^^^^^^^^^^^^ not found in `$crate`
@@ -589,7 +589,7 @@ LL + use ItemUse;
    |
 
 error[E0425]: cannot find value `local_use` in this scope
-  --> $DIR/mixed-site-span.rs:21:9
+  --> $DIR/mixed-site-span.rs:22:9
    |
 LL |         proc_macro_rules!();
    |         ^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `local_def`
@@ -597,7 +597,7 @@ LL |         proc_macro_rules!();
    = note: this error originates in the macro `proc_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `local_def` in this scope
-  --> $DIR/mixed-site-span.rs:26:9
+  --> $DIR/mixed-site-span.rs:27:9
    |
 LL |         local_def;
    |         ^^^^^^^^^ help: a local variable with a similar name exists: `local_use`
diff --git a/tests/ui/proc-macro/modify-ast.rs b/tests/ui/proc-macro/modify-ast.rs
index 9e890f3ebaa..75aea597ed5 100644
--- a/tests/ui/proc-macro/modify-ast.rs
+++ b/tests/ui/proc-macro/modify-ast.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: modify-ast.rs
+//@ ignore-backends: gcc
 
 extern crate modify_ast;
 
diff --git a/tests/ui/proc-macro/parent-source-spans.rs b/tests/ui/proc-macro/parent-source-spans.rs
index cc3ac795f7f..f675f6fb6f7 100644
--- a/tests/ui/proc-macro/parent-source-spans.rs
+++ b/tests/ui/proc-macro/parent-source-spans.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: parent-source-spans.rs
+//@ ignore-backends: gcc
 
 #![feature(decl_macro)]
 
diff --git a/tests/ui/proc-macro/parent-source-spans.stderr b/tests/ui/proc-macro/parent-source-spans.stderr
index db1eed5e458..28a70eea873 100644
--- a/tests/ui/proc-macro/parent-source-spans.stderr
+++ b/tests/ui/proc-macro/parent-source-spans.stderr
@@ -1,5 +1,5 @@
 error: first final: "hello"
-  --> $DIR/parent-source-spans.rs:16:12
+  --> $DIR/parent-source-spans.rs:17:12
    |
 LL |     three!($a, $b);
    |            ^^
@@ -10,7 +10,7 @@ LL |     one!("hello", "world");
    = note: this error originates in the macro `two` which comes from the expansion of the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: second final: "world"
-  --> $DIR/parent-source-spans.rs:16:16
+  --> $DIR/parent-source-spans.rs:17:16
    |
 LL |     three!($a, $b);
    |                ^^
@@ -21,7 +21,7 @@ LL |     one!("hello", "world");
    = note: this error originates in the macro `two` which comes from the expansion of the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: first parent: "hello"
-  --> $DIR/parent-source-spans.rs:10:5
+  --> $DIR/parent-source-spans.rs:11:5
    |
 LL |     two!($a, $b);
    |     ^^^^^^^^^^^^
@@ -32,7 +32,7 @@ LL |     one!("hello", "world");
    = note: this error originates in the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: second parent: "world"
-  --> $DIR/parent-source-spans.rs:10:5
+  --> $DIR/parent-source-spans.rs:11:5
    |
 LL |     two!($a, $b);
    |     ^^^^^^^^^^^^
@@ -43,31 +43,31 @@ LL |     one!("hello", "world");
    = note: this error originates in the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: first grandparent: "hello"
-  --> $DIR/parent-source-spans.rs:36:5
+  --> $DIR/parent-source-spans.rs:37:5
    |
 LL |     one!("hello", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: second grandparent: "world"
-  --> $DIR/parent-source-spans.rs:36:5
+  --> $DIR/parent-source-spans.rs:37:5
    |
 LL |     one!("hello", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: first source: "hello"
-  --> $DIR/parent-source-spans.rs:36:5
+  --> $DIR/parent-source-spans.rs:37:5
    |
 LL |     one!("hello", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: second source: "world"
-  --> $DIR/parent-source-spans.rs:36:5
+  --> $DIR/parent-source-spans.rs:37:5
    |
 LL |     one!("hello", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: first final: "yay"
-  --> $DIR/parent-source-spans.rs:16:12
+  --> $DIR/parent-source-spans.rs:17:12
    |
 LL |     three!($a, $b);
    |            ^^
@@ -78,7 +78,7 @@ LL |     two!("yay", "rust");
    = note: this error originates in the macro `two` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: second final: "rust"
-  --> $DIR/parent-source-spans.rs:16:16
+  --> $DIR/parent-source-spans.rs:17:16
    |
 LL |     three!($a, $b);
    |                ^^
@@ -89,55 +89,55 @@ LL |     two!("yay", "rust");
    = note: this error originates in the macro `two` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: first parent: "yay"
-  --> $DIR/parent-source-spans.rs:42:5
+  --> $DIR/parent-source-spans.rs:43:5
    |
 LL |     two!("yay", "rust");
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: second parent: "rust"
-  --> $DIR/parent-source-spans.rs:42:5
+  --> $DIR/parent-source-spans.rs:43:5
    |
 LL |     two!("yay", "rust");
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: first source: "yay"
-  --> $DIR/parent-source-spans.rs:42:5
+  --> $DIR/parent-source-spans.rs:43:5
    |
 LL |     two!("yay", "rust");
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: second source: "rust"
-  --> $DIR/parent-source-spans.rs:42:5
+  --> $DIR/parent-source-spans.rs:43:5
    |
 LL |     two!("yay", "rust");
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: first final: "hip"
-  --> $DIR/parent-source-spans.rs:48:12
+  --> $DIR/parent-source-spans.rs:49:12
    |
 LL |     three!("hip", "hop");
    |            ^^^^^
 
 error: second final: "hop"
-  --> $DIR/parent-source-spans.rs:48:19
+  --> $DIR/parent-source-spans.rs:49:19
    |
 LL |     three!("hip", "hop");
    |                   ^^^^^
 
 error: first source: "hip"
-  --> $DIR/parent-source-spans.rs:48:12
+  --> $DIR/parent-source-spans.rs:49:12
    |
 LL |     three!("hip", "hop");
    |            ^^^^^
 
 error: second source: "hop"
-  --> $DIR/parent-source-spans.rs:48:19
+  --> $DIR/parent-source-spans.rs:49:19
    |
 LL |     three!("hip", "hop");
    |                   ^^^^^
 
 error[E0425]: cannot find value `ok` in this scope
-  --> $DIR/parent-source-spans.rs:29:5
+  --> $DIR/parent-source-spans.rs:30:5
    |
 LL |     parent_source_spans!($($tokens)*);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
@@ -152,7 +152,7 @@ LL |     one!("hello", "world");
    = note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `ok` in this scope
-  --> $DIR/parent-source-spans.rs:29:5
+  --> $DIR/parent-source-spans.rs:30:5
    |
 LL |     parent_source_spans!($($tokens)*);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
@@ -167,7 +167,7 @@ LL |     two!("yay", "rust");
    = note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `two` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `ok` in this scope
-  --> $DIR/parent-source-spans.rs:29:5
+  --> $DIR/parent-source-spans.rs:30:5
    |
 LL |     parent_source_spans!($($tokens)*);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
diff --git a/tests/ui/proc-macro/pretty-print-hack-show.rs b/tests/ui/proc-macro/pretty-print-hack-show.rs
index 70f0d5f6ea9..08e26c81142 100644
--- a/tests/ui/proc-macro/pretty-print-hack-show.rs
+++ b/tests/ui/proc-macro/pretty-print-hack-show.rs
@@ -1,7 +1,6 @@
 //@ proc-macro: test-macros.rs
 //@ compile-flags: -Z span-debug
 //@ revisions: local remapped
-// [local] no-remap-src-base: The hack should work regardless of remapping.
 //@ [remapped] remap-src-base
 
 #![no_std] // Don't load unnecessary hygiene information from std
diff --git a/tests/ui/proc-macro/quote/basic.rs b/tests/ui/proc-macro/quote/basic.rs
index 0336dbb7856..4c6fb2408fb 100644
--- a/tests/ui/proc-macro/quote/basic.rs
+++ b/tests/ui/proc-macro/quote/basic.rs
@@ -1,5 +1,6 @@
 //@ run-pass
 //@ proc-macro: basic.rs
+//@ ignore-backends: gcc
 
 extern crate basic;
 
diff --git a/tests/ui/proc-macro/quote/not-quotable.stderr b/tests/ui/proc-macro/quote/not-quotable.stderr
index d1c3d06f2b6..62a02638e54 100644
--- a/tests/ui/proc-macro/quote/not-quotable.stderr
+++ b/tests/ui/proc-macro/quote/not-quotable.stderr
@@ -15,8 +15,8 @@ LL |     let _ = quote! { $ip };
              Cow<'_, T>
              Option<T>
              Rc<T>
-             RepInterp<T>
-           and 25 others
+             bool
+           and 24 others
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/proc-macro/quote/not-repeatable.rs b/tests/ui/proc-macro/quote/not-repeatable.rs
index 0291e4ddf88..373f0e74dbd 100644
--- a/tests/ui/proc-macro/quote/not-repeatable.rs
+++ b/tests/ui/proc-macro/quote/not-repeatable.rs
@@ -8,5 +8,7 @@ struct Ipv4Addr;
 
 fn main() {
     let ip = Ipv4Addr;
-    let _ = quote! { $($ip)* }; //~ ERROR the method `quote_into_iter` exists for struct `Ipv4Addr`, but its trait bounds were not satisfied
+    let _ = quote! { $($ip)* };
+    //~^ ERROR the method `quote_into_iter` exists for struct `Ipv4Addr`, but its trait bounds were not satisfied
+    //~| ERROR type annotations needed
 }
diff --git a/tests/ui/proc-macro/quote/not-repeatable.stderr b/tests/ui/proc-macro/quote/not-repeatable.stderr
index aeda08d7de6..ff31799abb0 100644
--- a/tests/ui/proc-macro/quote/not-repeatable.stderr
+++ b/tests/ui/proc-macro/quote/not-repeatable.stderr
@@ -20,6 +20,13 @@ note: the traits `Iterator` and `ToTokens` must be implemented
   --> $SRC_DIR/proc_macro/src/to_tokens.rs:LL:COL
   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
 
-error: aborting due to 1 previous error
+error[E0282]: type annotations needed
+  --> $DIR/not-repeatable.rs:11:13
+   |
+LL |     let _ = quote! { $($ip)* };
+   |             ^^^^^^^^^^^^^^^^^^ cannot infer type
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0599`.
+Some errors have detailed explanations: E0282, E0599.
+For more information about an error, try `rustc --explain E0282`.
diff --git a/tests/ui/proc-macro/span-api-tests.rs b/tests/ui/proc-macro/span-api-tests.rs
index 792859ed05b..12832ba1163 100644
--- a/tests/ui/proc-macro/span-api-tests.rs
+++ b/tests/ui/proc-macro/span-api-tests.rs
@@ -2,6 +2,7 @@
 //@ proc-macro: span-api-tests.rs
 //@ aux-build:span-test-macros.rs
 //@ compile-flags: -Ztranslate-remapped-path-to-local-path=yes
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate span_test_macros;
diff --git a/tests/ui/proc-macro/span-from-proc-macro.rs b/tests/ui/proc-macro/span-from-proc-macro.rs
index 4e12a695a5c..24a28d53476 100644
--- a/tests/ui/proc-macro/span-from-proc-macro.rs
+++ b/tests/ui/proc-macro/span-from-proc-macro.rs
@@ -1,6 +1,7 @@
 //@ proc-macro: custom-quote.rs
 //@ proc-macro: span-from-proc-macro.rs
 //@ compile-flags: -Z macro-backtrace
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate span_from_proc_macro;
diff --git a/tests/ui/proc-macro/span-from-proc-macro.stderr b/tests/ui/proc-macro/span-from-proc-macro.stderr
index c79ab04eadf..945a5620fac 100644
--- a/tests/ui/proc-macro/span-from-proc-macro.stderr
+++ b/tests/ui/proc-macro/span-from-proc-macro.stderr
@@ -7,7 +7,7 @@ LL | pub fn error_from_attribute(_args: TokenStream, _input: TokenStream) -> Tok
 LL |             field: MissingType
    |                    ^^^^^^^^^^^ not found in this scope
    |
-  ::: $DIR/span-from-proc-macro.rs:8:1
+  ::: $DIR/span-from-proc-macro.rs:9:1
    |
 LL | #[error_from_attribute]
    | ----------------------- in this attribute macro expansion
@@ -21,7 +21,7 @@ LL | pub fn error_from_derive(_input: TokenStream) -> TokenStream {
 LL |             Variant(OtherMissingType)
    |                     ^^^^^^^^^^^^^^^^ not found in this scope
    |
-  ::: $DIR/span-from-proc-macro.rs:11:10
+  ::: $DIR/span-from-proc-macro.rs:12:10
    |
 LL | #[derive(ErrorFromDerive)]
    |          --------------- in this derive macro expansion
@@ -35,7 +35,7 @@ LL |     custom_quote::custom_quote! {
 LL |         my_ident
    |         ^^^^^^^^ not found in this scope
    |
-  ::: $DIR/span-from-proc-macro.rs:16:5
+  ::: $DIR/span-from-proc-macro.rs:17:5
    |
 LL |     other_error_from_bang!();
    |     ------------------------ in this macro invocation
@@ -51,7 +51,7 @@ LL |             let bang_error: bool = 25;
 LL | pub fn error_from_bang(_input: TokenStream) -> TokenStream {
    | ---------------------------------------------------------- in this expansion of `error_from_bang!`
    |
-  ::: $DIR/span-from-proc-macro.rs:15:5
+  ::: $DIR/span-from-proc-macro.rs:16:5
    |
 LL |     error_from_bang!();
    |     ------------------ in this macro invocation
diff --git a/tests/ui/proc-macro/weird-hygiene.rs b/tests/ui/proc-macro/weird-hygiene.rs
index de55484109a..8d8427d0e41 100644
--- a/tests/ui/proc-macro/weird-hygiene.rs
+++ b/tests/ui/proc-macro/weird-hygiene.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: weird-hygiene.rs
+//@ ignore-backends: gcc
 
 #![feature(stmt_expr_attributes)]
 #![feature(proc_macro_hygiene)]
diff --git a/tests/ui/proc-macro/weird-hygiene.stderr b/tests/ui/proc-macro/weird-hygiene.stderr
index 256e68e8970..0cfac3f89a0 100644
--- a/tests/ui/proc-macro/weird-hygiene.stderr
+++ b/tests/ui/proc-macro/weird-hygiene.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `hidden_ident` in this scope
-  --> $DIR/weird-hygiene.rs:23:43
+  --> $DIR/weird-hygiene.rs:24:43
    |
 LL |             Value = (stringify!($tokens + hidden_ident), 1).1
    |                                           ^^^^^^^^^^^^ not found in this scope
@@ -10,7 +10,7 @@ LL |     other!(50);
    = note: this error originates in the macro `inner` which comes from the expansion of the macro `other` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `hidden_ident` in this scope
-  --> $DIR/weird-hygiene.rs:34:13
+  --> $DIR/weird-hygiene.rs:35:13
    |
 LL |             hidden_ident
    |             ^^^^^^^^^^^^ not found in this scope
diff --git a/tests/ui/process/multi-panic.rs b/tests/ui/process/multi-panic.rs
index 1fddffeb770..67bbd16fba7 100644
--- a/tests/ui/process/multi-panic.rs
+++ b/tests/ui/process/multi-panic.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-subprocess
 //@ needs-unwind
+//@ ignore-backends: gcc
 
 fn check_for_no_backtrace(test: std::process::Output) {
     assert!(!test.status.success());
diff --git a/tests/ui/reborrow/custom_mut.rs b/tests/ui/reborrow/custom_mut.rs
new file mode 100644
index 00000000000..1e7c4693238
--- /dev/null
+++ b/tests/ui/reborrow/custom_mut.rs
@@ -0,0 +1,13 @@
+#![feature(reborrow)]
+use std::ops::Reborrow;
+
+struct CustomMut<'a, T>(&'a mut T);
+impl<'a, T> Reborrow for CustomMut<'a, T> {}
+
+fn method(a: CustomMut<'_, ()>) {}
+
+fn main() {
+    let a = CustomMut(&mut ());
+    let _ = method(a);
+    let _ = method(a); //~ERROR use of moved value: `a`
+}
diff --git a/tests/ui/reborrow/custom_mut.stderr b/tests/ui/reborrow/custom_mut.stderr
new file mode 100644
index 00000000000..3b3f47b62d6
--- /dev/null
+++ b/tests/ui/reborrow/custom_mut.stderr
@@ -0,0 +1,29 @@
+error[E0382]: use of moved value: `a`
+  --> $DIR/custom_mut.rs:12:20
+   |
+LL |     let a = CustomMut(&mut ());
+   |         - move occurs because `a` has type `CustomMut<'_, ()>`, which does not implement the `Copy` trait
+LL |     let _ = method(a);
+   |                    - value moved here
+LL |     let _ = method(a);
+   |                    ^ value used here after move
+   |
+note: consider changing this parameter type in function `method` to borrow instead if owning the value isn't necessary
+  --> $DIR/custom_mut.rs:7:14
+   |
+LL | fn method(a: CustomMut<'_, ()>) {}
+   |    ------    ^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
+   |    |
+   |    in this function
+note: if `CustomMut<'_, ()>` implemented `Clone`, you could clone the value
+  --> $DIR/custom_mut.rs:4:1
+   |
+LL | struct CustomMut<'a, T>(&'a mut T);
+   | ^^^^^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     let _ = method(a);
+   |                    - you could clone this value
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/reborrow/custom_mut_coerce_shared.rs b/tests/ui/reborrow/custom_mut_coerce_shared.rs
new file mode 100644
index 00000000000..e2d25835c09
--- /dev/null
+++ b/tests/ui/reborrow/custom_mut_coerce_shared.rs
@@ -0,0 +1,28 @@
+#![feature(reborrow)]
+use std::ops::{CoerceShared, Reborrow};
+
+struct CustomMut<'a, T>(&'a mut T);
+impl<'a, T> Reborrow for CustomMut<'a, T> {}
+impl<'a, T> CoerceShared for CustomMut<'a, T> {
+    type Target = CustomRef<'a, T>;
+}
+
+struct CustomRef<'a, T>(&'a T);
+
+impl<'a, T> Clone for CustomRef<'a, T> {
+    fn clone(&self) -> Self {
+        Self(self.0)
+    }
+}
+impl<'a, T> Copy for CustomRef<'a, T> {}
+
+fn method(a: CustomRef<'_, ()>) {}  //~NOTE function defined here
+
+fn main() {
+    let a = CustomMut(&mut ());
+    method(a);
+    //~^ ERROR mismatched types
+    //~| NOTE expected `CustomRef<'_, ()>`, found `CustomMut<'_, ()>`
+    //~| NOTE arguments to this function are incorrect
+    //~| NOTE expected struct `CustomRef<'_, ()>`
+}
diff --git a/tests/ui/reborrow/custom_mut_coerce_shared.stderr b/tests/ui/reborrow/custom_mut_coerce_shared.stderr
new file mode 100644
index 00000000000..508651badc0
--- /dev/null
+++ b/tests/ui/reborrow/custom_mut_coerce_shared.stderr
@@ -0,0 +1,19 @@
+error[E0308]: mismatched types
+  --> $DIR/custom_mut_coerce_shared.rs:23:12
+   |
+LL |     method(a);
+   |     ------ ^ expected `CustomRef<'_, ()>`, found `CustomMut<'_, ()>`
+   |     |
+   |     arguments to this function are incorrect
+   |
+   = note: expected struct `CustomRef<'_, ()>`
+              found struct `CustomMut<'_, ()>`
+note: function defined here
+  --> $DIR/custom_mut_coerce_shared.rs:19:4
+   |
+LL | fn method(a: CustomRef<'_, ()>) {}
+   |    ^^^^^^ --------------------
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/reborrow/option_mut.rs b/tests/ui/reborrow/option_mut.rs
new file mode 100644
index 00000000000..04d8301772d
--- /dev/null
+++ b/tests/ui/reborrow/option_mut.rs
@@ -0,0 +1,7 @@
+fn method(a: Option<&mut ()>) {}
+
+fn main() {
+    let a = Some(&mut ());
+    let _ = method(a);
+    let _ = method(a); //~ERROR use of moved value: `a`
+}
diff --git a/tests/ui/reborrow/option_mut.stderr b/tests/ui/reborrow/option_mut.stderr
new file mode 100644
index 00000000000..d665e266079
--- /dev/null
+++ b/tests/ui/reborrow/option_mut.stderr
@@ -0,0 +1,21 @@
+error[E0382]: use of moved value: `a`
+  --> $DIR/option_mut.rs:6:20
+   |
+LL |     let a = Some(&mut ());
+   |         - move occurs because `a` has type `Option<&mut ()>`, which does not implement the `Copy` trait
+LL |     let _ = method(a);
+   |                    - value moved here
+LL |     let _ = method(a);
+   |                    ^ value used here after move
+   |
+note: consider changing this parameter type in function `method` to borrow instead if owning the value isn't necessary
+  --> $DIR/option_mut.rs:1:14
+   |
+LL | fn method(a: Option<&mut ()>) {}
+   |    ------    ^^^^^^^^^^^^^^^ this parameter takes ownership of the value
+   |    |
+   |    in this function
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/reborrow/option_mut_coerce_shared.rs b/tests/ui/reborrow/option_mut_coerce_shared.rs
new file mode 100644
index 00000000000..95d33ed94dd
--- /dev/null
+++ b/tests/ui/reborrow/option_mut_coerce_shared.rs
@@ -0,0 +1,11 @@
+fn method(a: Option<&()>) {}  //~NOTE function defined here
+
+fn main() {
+    let a = Some(&mut ());
+    method(a);
+    //~^ ERROR mismatched types
+    //~| NOTE arguments to this function are incorrect
+    //~| NOTE types differ in mutability
+    //~| NOTE expected enum `Option<&()>`
+    //~| NOTE    found enum `Option<&mut ()>`
+}
diff --git a/tests/ui/reborrow/option_mut_coerce_shared.stderr b/tests/ui/reborrow/option_mut_coerce_shared.stderr
new file mode 100644
index 00000000000..6ca1a237461
--- /dev/null
+++ b/tests/ui/reborrow/option_mut_coerce_shared.stderr
@@ -0,0 +1,23 @@
+error[E0308]: mismatched types
+  --> $DIR/option_mut_coerce_shared.rs:5:12
+   |
+LL |     method(a);
+   |     ------ ^ types differ in mutability
+   |     |
+   |     arguments to this function are incorrect
+   |
+   = note: expected enum `Option<&()>`
+              found enum `Option<&mut ()>`
+note: function defined here
+  --> $DIR/option_mut_coerce_shared.rs:1:4
+   |
+LL | fn method(a: Option<&()>) {}
+   |    ^^^^^^ --------------
+help: try using `.as_deref()` to convert `Option<&mut ()>` to `Option<&()>`
+   |
+LL |     method(a.as_deref());
+   |             +++++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/reborrow/pin_mut.rs b/tests/ui/reborrow/pin_mut.rs
new file mode 100644
index 00000000000..959cb14f8c9
--- /dev/null
+++ b/tests/ui/reborrow/pin_mut.rs
@@ -0,0 +1,10 @@
+use std::pin::Pin;
+
+fn method(a: Pin<&mut ()>) {}
+
+fn main() {
+    let a = &mut ();
+    let a = Pin::new(a);
+    let _ = method(a);
+    let _ = method(a); //~ERROR use of moved value: `a`
+}
diff --git a/tests/ui/reborrow/pin_mut.stderr b/tests/ui/reborrow/pin_mut.stderr
new file mode 100644
index 00000000000..64e3f603e11
--- /dev/null
+++ b/tests/ui/reborrow/pin_mut.stderr
@@ -0,0 +1,21 @@
+error[E0382]: use of moved value: `a`
+  --> $DIR/pin_mut.rs:9:20
+   |
+LL |     let a = Pin::new(a);
+   |         - move occurs because `a` has type `Pin<&mut ()>`, which does not implement the `Copy` trait
+LL |     let _ = method(a);
+   |                    - value moved here
+LL |     let _ = method(a);
+   |                    ^ value used here after move
+   |
+note: consider changing this parameter type in function `method` to borrow instead if owning the value isn't necessary
+  --> $DIR/pin_mut.rs:3:14
+   |
+LL | fn method(a: Pin<&mut ()>) {}
+   |    ------    ^^^^^^^^^^^^ this parameter takes ownership of the value
+   |    |
+   |    in this function
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/reborrow/pin_mut_coerce_shared.rs b/tests/ui/reborrow/pin_mut_coerce_shared.rs
new file mode 100644
index 00000000000..06af0b765d0
--- /dev/null
+++ b/tests/ui/reborrow/pin_mut_coerce_shared.rs
@@ -0,0 +1,13 @@
+use std::pin::Pin;
+
+fn method(a: Pin<&()>) {}  //~NOTE function defined here
+
+fn main() {
+    let a = &mut ();
+    let a = Pin::new(a);
+    method(a);
+    //~^ ERROR mismatched types
+    //~| NOTE arguments to this function are incorrect
+    //~| NOTE types differ in mutability
+    //~| NOTE expected struct `Pin<&()>`
+}
diff --git a/tests/ui/reborrow/pin_mut_coerce_shared.stderr b/tests/ui/reborrow/pin_mut_coerce_shared.stderr
new file mode 100644
index 00000000000..74ecf4de4c7
--- /dev/null
+++ b/tests/ui/reborrow/pin_mut_coerce_shared.stderr
@@ -0,0 +1,19 @@
+error[E0308]: mismatched types
+  --> $DIR/pin_mut_coerce_shared.rs:8:12
+   |
+LL |     method(a);
+   |     ------ ^ types differ in mutability
+   |     |
+   |     arguments to this function are incorrect
+   |
+   = note: expected struct `Pin<&()>`
+              found struct `Pin<&mut ()>`
+note: function defined here
+  --> $DIR/pin_mut_coerce_shared.rs:3:4
+   |
+LL | fn method(a: Pin<&()>) {}
+   |    ^^^^^^ -----------
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/regions/multiple-sources-for-outlives-requirement.rs b/tests/ui/regions/multiple-sources-for-outlives-requirement.rs
new file mode 100644
index 00000000000..720cd1cf6ee
--- /dev/null
+++ b/tests/ui/regions/multiple-sources-for-outlives-requirement.rs
@@ -0,0 +1,11 @@
+fn outlives_indir<'a: 'b, 'b, T: 'a>(_x: T) {}
+//~^ NOTE: requirements that the value outlives `'b` introduced here
+
+fn foo<'b>() { //~ NOTE: lifetime `'b` defined here
+    outlives_indir::<'_, 'b, _>(&mut 1u32); //~ ERROR: temporary value dropped while borrowed
+    //~^ NOTE: argument requires that borrow lasts for `'b`
+    //~| NOTE: creates a temporary value which is freed while still in use
+    //~| NOTE: temporary value is freed at the end of this statement
+}
+
+fn main() {}
diff --git a/tests/ui/regions/multiple-sources-for-outlives-requirement.stderr b/tests/ui/regions/multiple-sources-for-outlives-requirement.stderr
new file mode 100644
index 00000000000..4cdaf950e15
--- /dev/null
+++ b/tests/ui/regions/multiple-sources-for-outlives-requirement.stderr
@@ -0,0 +1,20 @@
+error[E0716]: temporary value dropped while borrowed
+  --> $DIR/multiple-sources-for-outlives-requirement.rs:5:38
+   |
+LL | fn foo<'b>() {
+   |        -- lifetime `'b` defined here
+LL |     outlives_indir::<'_, 'b, _>(&mut 1u32);
+   |     ---------------------------------^^^^-- temporary value is freed at the end of this statement
+   |     |                                |
+   |     |                                creates a temporary value which is freed while still in use
+   |     argument requires that borrow lasts for `'b`
+   |
+note: requirements that the value outlives `'b` introduced here
+  --> $DIR/multiple-sources-for-outlives-requirement.rs:1:23
+   |
+LL | fn outlives_indir<'a: 'b, 'b, T: 'a>(_x: T) {}
+   |                       ^^         ^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/regions/regions-infer-proc-static-upvar.stderr b/tests/ui/regions/regions-infer-proc-static-upvar.stderr
index 919fcffdc53..158d74ed06d 100644
--- a/tests/ui/regions/regions-infer-proc-static-upvar.stderr
+++ b/tests/ui/regions/regions-infer-proc-static-upvar.stderr
@@ -11,6 +11,12 @@ LL | |     });
    | |______- argument requires that `x` is borrowed for `'static`
 LL |   }
    |   - `x` dropped here while still borrowed
+   |
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/regions-infer-proc-static-upvar.rs:4:19
+   |
+LL | fn foo<F:FnOnce()+'static>(_p: F) { }
+   |                   ^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/regions/regions-pattern-typing-issue-19552.stderr b/tests/ui/regions/regions-pattern-typing-issue-19552.stderr
index 1d3d5e831c3..a8fd827bc69 100644
--- a/tests/ui/regions/regions-pattern-typing-issue-19552.stderr
+++ b/tests/ui/regions/regions-pattern-typing-issue-19552.stderr
@@ -10,6 +10,12 @@ LL |         [ word ] => { assert_static(word); }
 LL |     }
 LL | }
    | - `line` dropped here while still borrowed
+   |
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/regions-pattern-typing-issue-19552.rs:1:21
+   |
+LL | fn assert_static<T: 'static>(_t: T) {}
+   |                     ^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr b/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr
index ba44beb76db..b8a8f927542 100644
--- a/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr
+++ b/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr
@@ -5,9 +5,9 @@ LL |     let x = [Foo(PhantomData); 2];
    |         ^
 LL |
 LL |     extract(x).max(2);
-   |     ---------- type must be known at this point
+   |                --- type must be known at this point
    |
-help: consider giving `x` an explicit type, where the type for type parameter `T` is specified
+help: consider giving `x` an explicit type, where the placeholders `_` are specified
    |
 LL |     let x: [Foo<T>; 2] = [Foo(PhantomData); 2];
    |          +++++++++++++
diff --git a/tests/ui/repr/repr-empty-packed.stderr b/tests/ui/repr/repr-empty-packed.stderr
index 6565b2e8c1d..adf32c95529 100644
--- a/tests/ui/repr/repr-empty-packed.stderr
+++ b/tests/ui/repr/repr-empty-packed.stderr
@@ -15,6 +15,7 @@ error: unused attribute
 LL | #[repr()]
    | ^^^^^^^^^ help: remove this attribute
    |
+   = note: using `repr` with an empty list has no effect
 note: the lint level is defined here
   --> $DIR/repr-empty-packed.rs:2:9
    |
diff --git a/tests/ui/resolve/prelude-order.rs b/tests/ui/resolve/prelude-order.rs
index a3f194270d4..c6683bdff22 100644
--- a/tests/ui/resolve/prelude-order.rs
+++ b/tests/ui/resolve/prelude-order.rs
@@ -1,5 +1,6 @@
 //@ proc-macro:macro_helpers.rs
 //@ compile-flags: --crate-type=lib
+//@ ignore-backends: gcc
 
 /* There are 5 preludes and 3 namespaces. Test the order in which they are resolved.
  * See https://doc.rust-lang.org/nightly/reference/names/preludes.html.
diff --git a/tests/ui/resolve/prelude-order.stderr b/tests/ui/resolve/prelude-order.stderr
index 1b9cc94285a..4dad39fb6d2 100644
--- a/tests/ui/resolve/prelude-order.stderr
+++ b/tests/ui/resolve/prelude-order.stderr
@@ -1,17 +1,17 @@
 error[E0433]: failed to resolve: could not find `inner` in `type_ns`
-  --> $DIR/prelude-order.rs:61:12
+  --> $DIR/prelude-order.rs:62:12
    |
 LL | #[type_ns::inner]
    |            ^^^^^ could not find `inner` in `type_ns`
 
 error[E0433]: failed to resolve: could not find `inner` in `usize`
-  --> $DIR/prelude-order.rs:73:10
+  --> $DIR/prelude-order.rs:74:10
    |
 LL | #[usize::inner]
    |          ^^^^^ could not find `inner` in `usize`
 
 error[E0573]: expected type, found crate `Option`
-  --> $DIR/prelude-order.rs:79:12
+  --> $DIR/prelude-order.rs:80:12
    |
 LL | fn e2() -> Option<i32> { None }
    |            ^^^^^^^^^^^ not a type
@@ -22,7 +22,7 @@ LL + use std::option::Option;
    |
 
 error[E0308]: mismatched types
-  --> $DIR/prelude-order.rs:82:1
+  --> $DIR/prelude-order.rs:83:1
    |
 LL | #[test]
    | ^^^^^^^- help: try adding a return type: `-> &'static str`
@@ -32,7 +32,7 @@ LL | #[test]
    = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0308]: mismatched types
-  --> $DIR/prelude-order.rs:86:1
+  --> $DIR/prelude-order.rs:87:1
    |
 LL | #[global_allocator]
    | ^^^^^^^^^^^^^^^^^^^- help: try adding a return type: `-> &'static str`
diff --git a/tests/ui/resolve/unused-macro-import.rs b/tests/ui/resolve/unused-macro-import.rs
new file mode 100644
index 00000000000..e85f7a43993
--- /dev/null
+++ b/tests/ui/resolve/unused-macro-import.rs
@@ -0,0 +1,13 @@
+//@ check-pass
+
+#![warn(unused_imports)]
+
+#[macro_export]
+macro_rules! mac { () => {} }
+
+fn main() {
+    // Unused, `mac` as `macro_rules!` is already in scope and has higher priority.
+    use crate::mac; //~ WARN unused import: `crate::mac`
+
+    mac!();
+}
diff --git a/tests/ui/resolve/unused-macro-import.stderr b/tests/ui/resolve/unused-macro-import.stderr
new file mode 100644
index 00000000000..5f9813808a0
--- /dev/null
+++ b/tests/ui/resolve/unused-macro-import.stderr
@@ -0,0 +1,14 @@
+warning: unused import: `crate::mac`
+  --> $DIR/unused-macro-import.rs:10:9
+   |
+LL |     use crate::mac;
+   |         ^^^^^^^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/unused-macro-import.rs:3:9
+   |
+LL | #![warn(unused_imports)]
+   |         ^^^^^^^^^^^^^^
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/return/infer-return-ty-for-fn-sig-issue-125488.stderr b/tests/ui/return/infer-return-ty-for-fn-sig-issue-125488.stderr
index 8b7c5e1681a..839e4265e03 100644
--- a/tests/ui/return/infer-return-ty-for-fn-sig-issue-125488.stderr
+++ b/tests/ui/return/infer-return-ty-for-fn-sig-issue-125488.stderr
@@ -2,37 +2,49 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/infer-return-ty-for-fn-sig-issue-125488.rs:8:24
    |
 LL |     fn f1(s: S<'_>) -> _ {
-   |                        ^
-   |                        |
-   |                        not allowed in type signatures
-   |                        help: replace with the correct return type: `S<'_>`
+   |                        ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -     fn f1(s: S<'_>) -> _ {
+LL +     fn f1(s: S<'_>) -> S<'_> {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/infer-return-ty-for-fn-sig-issue-125488.rs:13:24
    |
 LL |     fn f2(s: S<'_>) -> _ {
-   |                        ^
-   |                        |
-   |                        not allowed in type signatures
-   |                        help: replace with the correct return type: `S<'_>`
+   |                        ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -     fn f2(s: S<'_>) -> _ {
+LL +     fn f2(s: S<'_>) -> S<'_> {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/infer-return-ty-for-fn-sig-issue-125488.rs:23:24
    |
 LL |     fn f3(s: S<'_>) -> _ {
-   |                        ^
-   |                        |
-   |                        not allowed in type signatures
-   |                        help: replace with the correct return type: `S<'_>`
+   |                        ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -     fn f3(s: S<'_>) -> _ {
+LL +     fn f3(s: S<'_>) -> S<'_> {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/infer-return-ty-for-fn-sig-issue-125488.rs:28:24
    |
 LL |     fn f4(s: S<'_>) -> _ {
-   |                        ^
-   |                        |
-   |                        not allowed in type signatures
-   |                        help: replace with the correct return type: `S<'_>`
+   |                        ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -     fn f4(s: S<'_>) -> _ {
+LL +     fn f4(s: S<'_>) -> S<'_> {
+   |
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs
index 414d5518e1f..2387dfb2bc5 100644
--- a/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs
+++ b/tests/ui/rfcs/rfc-3348-c-string-literals/edition-spans.rs
@@ -7,6 +7,7 @@
 //@ check-pass
 
 //@ proc-macro: count.rs
+//@ ignore-backends: gcc
 extern crate count;
 
 const _: () = {
diff --git a/tests/ui/runtime/backtrace-debuginfo.rs b/tests/ui/runtime/backtrace-debuginfo.rs
index 5e91f22aec0..d3b4d057e6d 100644
--- a/tests/ui/runtime/backtrace-debuginfo.rs
+++ b/tests/ui/runtime/backtrace-debuginfo.rs
@@ -19,6 +19,7 @@
 // FIXME(#117097): backtrace (possibly unwinding mechanism) seems to be different on at least
 // `i686-mingw` (32-bit windows-gnu)? cc #128911.
 //@ ignore-windows-gnu
+//@ ignore-backends: gcc
 
 use std::env;
 
diff --git a/tests/ui/runtime/out-of-stack.rs b/tests/ui/runtime/out-of-stack.rs
index 913d3637c8f..3e092728f29 100644
--- a/tests/ui/runtime/out-of-stack.rs
+++ b/tests/ui/runtime/out-of-stack.rs
@@ -10,6 +10,7 @@
 //@ ignore-tvos stack overflow handlers aren't enabled
 //@ ignore-watchos stack overflow handlers aren't enabled
 //@ ignore-visionos stack overflow handlers aren't enabled
+//@ ignore-backends: gcc
 
 #![feature(rustc_private)]
 
diff --git a/tests/ui/rust-2018/suggestions-not-always-applicable.fixed b/tests/ui/rust-2018/suggestions-not-always-applicable.fixed
index e3070ba150b..3a42434494d 100644
--- a/tests/ui/rust-2018/suggestions-not-always-applicable.fixed
+++ b/tests/ui/rust-2018/suggestions-not-always-applicable.fixed
@@ -3,6 +3,7 @@
 //@ run-rustfix
 //@ rustfix-only-machine-applicable
 //@ check-pass
+//@ ignore-backends: gcc
 
 #![warn(rust_2018_compatibility)]
 
diff --git a/tests/ui/rust-2018/suggestions-not-always-applicable.rs b/tests/ui/rust-2018/suggestions-not-always-applicable.rs
index e3070ba150b..3a42434494d 100644
--- a/tests/ui/rust-2018/suggestions-not-always-applicable.rs
+++ b/tests/ui/rust-2018/suggestions-not-always-applicable.rs
@@ -3,6 +3,7 @@
 //@ run-rustfix
 //@ rustfix-only-machine-applicable
 //@ check-pass
+//@ ignore-backends: gcc
 
 #![warn(rust_2018_compatibility)]
 
diff --git a/tests/ui/rust-2021/reserved-prefixes-via-macro.rs b/tests/ui/rust-2021/reserved-prefixes-via-macro.rs
index eec1b859c20..456649f23ca 100644
--- a/tests/ui/rust-2021/reserved-prefixes-via-macro.rs
+++ b/tests/ui/rust-2021/reserved-prefixes-via-macro.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ edition:2021
 //@ proc-macro: reserved-prefixes-macro-2018.rs
+//@ ignore-backends: gcc
 
 extern crate reserved_prefixes_macro_2018 as m2018;
 
diff --git a/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs b/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs
index ead2ab40b77..ddb32c26717 100644
--- a/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs
+++ b/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ edition:2024
 //@ proc-macro: reserved-guarded-strings-macro-2021.rs
+//@ ignore-backends: gcc
 
 extern crate reserved_guarded_strings_macro_2021 as m2021;
 
diff --git a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs
index e2c504e708c..8b7073649b7 100644
--- a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs
+++ b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-from-pm.rs
@@ -6,6 +6,7 @@
 //@[edition2021] edition:2021
 //@[edition2024] edition:2024
 //@ proc-macro: unsafe-attributes-pm.rs
+//@ ignore-backends: gcc
 
 unsafe_attributes_pm::missing_unsafe!();
 
diff --git a/tests/ui/sanitizer/cfi/transparent-has-regions.rs b/tests/ui/sanitizer/cfi/transparent-has-regions.rs
index b82850133c1..3e9893df23c 100644
--- a/tests/ui/sanitizer/cfi/transparent-has-regions.rs
+++ b/tests/ui/sanitizer/cfi/transparent-has-regions.rs
@@ -3,6 +3,7 @@
 //@ no-prefer-dynamic
 //@ only-x86_64-unknown-linux-gnu
 //@ build-pass
+//@ ignore-backends: gcc
 
 pub trait Trait {}
 
diff --git a/tests/ui/sanitizer/issue-111184-cfi-coroutine-witness.rs b/tests/ui/sanitizer/issue-111184-cfi-coroutine-witness.rs
index be81c7bd0ca..ac2b95b6398 100644
--- a/tests/ui/sanitizer/issue-111184-cfi-coroutine-witness.rs
+++ b/tests/ui/sanitizer/issue-111184-cfi-coroutine-witness.rs
@@ -7,6 +7,7 @@
 //@ no-prefer-dynamic
 //@ only-x86_64-unknown-linux-gnu
 //@ build-pass
+//@ ignore-backends: gcc
 
 use std::future::Future;
 
diff --git a/tests/ui/sepcomp/sepcomp-lib-lto.rs b/tests/ui/sepcomp/sepcomp-lib-lto.rs
index 2166a8fd031..f47ea25a4fc 100644
--- a/tests/ui/sepcomp/sepcomp-lib-lto.rs
+++ b/tests/ui/sepcomp/sepcomp-lib-lto.rs
@@ -5,6 +5,7 @@
 //@ aux-build:sepcomp_lib.rs
 //@ compile-flags: -C lto -g
 //@ no-prefer-dynamic
+//@ ignore-backends: gcc
 
 extern crate sepcomp_lib;
 use sepcomp_lib::a::one;
diff --git a/tests/ui/sepcomp/sepcomp-unwind.rs b/tests/ui/sepcomp/sepcomp-unwind.rs
index 95591676b5e..0038e887c4e 100644
--- a/tests/ui/sepcomp/sepcomp-unwind.rs
+++ b/tests/ui/sepcomp/sepcomp-unwind.rs
@@ -3,6 +3,7 @@
 #![allow(dead_code)]
 //@ compile-flags: -C codegen-units=3
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // Test unwinding through multiple compilation units.
 
diff --git a/tests/ui/simd/auxiliary/simd-lane-limit.rs b/tests/ui/simd/auxiliary/simd-lane-limit.rs
new file mode 100644
index 00000000000..dde6b880c62
--- /dev/null
+++ b/tests/ui/simd/auxiliary/simd-lane-limit.rs
@@ -0,0 +1,5 @@
+#![feature(rustc_attrs, repr_simd)]
+
+#[repr(simd, packed)]
+#[rustc_simd_monomorphize_lane_limit = "8"]
+pub struct Simd<T, const N: usize>(pub [T; N]);
diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-2.rs b/tests/ui/simd/intrinsic/generic-arithmetic-2.rs
index caec607d6fe..d67ff6b33b7 100644
--- a/tests/ui/simd/intrinsic/generic-arithmetic-2.rs
+++ b/tests/ui/simd/intrinsic/generic-arithmetic-2.rs
@@ -1,4 +1,5 @@
 //@ build-fail
+//@ ignore-backends: gcc
 
 #![feature(repr_simd, core_intrinsics)]
 #![allow(non_camel_case_types)]
diff --git a/tests/ui/simd/intrinsic/generic-arithmetic-2.stderr b/tests/ui/simd/intrinsic/generic-arithmetic-2.stderr
index a27a8d721fb..a2646c8e848 100644
--- a/tests/ui/simd/intrinsic/generic-arithmetic-2.stderr
+++ b/tests/ui/simd/intrinsic/generic-arithmetic-2.stderr
@@ -1,167 +1,167 @@
 error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:68:9
+  --> $DIR/generic-arithmetic-2.rs:69:9
    |
 LL |         simd_add(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_sub` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:70:9
+  --> $DIR/generic-arithmetic-2.rs:71:9
    |
 LL |         simd_sub(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_mul` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:72:9
+  --> $DIR/generic-arithmetic-2.rs:73:9
    |
 LL |         simd_mul(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_div` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:74:9
+  --> $DIR/generic-arithmetic-2.rs:75:9
    |
 LL |         simd_div(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shl` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:76:9
+  --> $DIR/generic-arithmetic-2.rs:77:9
    |
 LL |         simd_shl(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shr` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:78:9
+  --> $DIR/generic-arithmetic-2.rs:79:9
    |
 LL |         simd_shr(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_funnel_shl` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:80:9
+  --> $DIR/generic-arithmetic-2.rs:81:9
    |
 LL |         simd_funnel_shl(0, 0, 0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_funnel_shr` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:82:9
+  --> $DIR/generic-arithmetic-2.rs:83:9
    |
 LL |         simd_funnel_shr(0, 0, 0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_and` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:84:9
+  --> $DIR/generic-arithmetic-2.rs:85:9
    |
 LL |         simd_and(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_or` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:86:9
+  --> $DIR/generic-arithmetic-2.rs:87:9
    |
 LL |         simd_or(0, 0);
    |         ^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_xor` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:88:9
+  --> $DIR/generic-arithmetic-2.rs:89:9
    |
 LL |         simd_xor(0, 0);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_neg` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:91:9
+  --> $DIR/generic-arithmetic-2.rs:92:9
    |
 LL |         simd_neg(0);
    |         ^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_bswap` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:93:9
+  --> $DIR/generic-arithmetic-2.rs:94:9
    |
 LL |         simd_bswap(0);
    |         ^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_bitreverse` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:95:9
+  --> $DIR/generic-arithmetic-2.rs:96:9
    |
 LL |         simd_bitreverse(0);
    |         ^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_ctlz` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:97:9
+  --> $DIR/generic-arithmetic-2.rs:98:9
    |
 LL |         simd_ctlz(0);
    |         ^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_cttz` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-arithmetic-2.rs:99:9
+  --> $DIR/generic-arithmetic-2.rs:100:9
    |
 LL |         simd_cttz(0);
    |         ^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shl` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:102:9
+  --> $DIR/generic-arithmetic-2.rs:103:9
    |
 LL |         simd_shl(z, z);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shr` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:104:9
+  --> $DIR/generic-arithmetic-2.rs:105:9
    |
 LL |         simd_shr(z, z);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_funnel_shl` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:106:9
+  --> $DIR/generic-arithmetic-2.rs:107:9
    |
 LL |         simd_funnel_shl(z, z, z);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_funnel_shr` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:108:9
+  --> $DIR/generic-arithmetic-2.rs:109:9
    |
 LL |         simd_funnel_shr(z, z, z);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_and` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:110:9
+  --> $DIR/generic-arithmetic-2.rs:111:9
    |
 LL |         simd_and(z, z);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_or` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:112:9
+  --> $DIR/generic-arithmetic-2.rs:113:9
    |
 LL |         simd_or(z, z);
    |         ^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_xor` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:114:9
+  --> $DIR/generic-arithmetic-2.rs:115:9
    |
 LL |         simd_xor(z, z);
    |         ^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_bswap` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:116:9
+  --> $DIR/generic-arithmetic-2.rs:117:9
    |
 LL |         simd_bswap(z);
    |         ^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_bitreverse` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:118:9
+  --> $DIR/generic-arithmetic-2.rs:119:9
    |
 LL |         simd_bitreverse(z);
    |         ^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_ctlz` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:120:9
+  --> $DIR/generic-arithmetic-2.rs:121:9
    |
 LL |         simd_ctlz(z);
    |         ^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_ctpop` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:122:9
+  --> $DIR/generic-arithmetic-2.rs:123:9
    |
 LL |         simd_ctpop(z);
    |         ^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_cttz` intrinsic: unsupported operation on `f32x4` with element `f32`
-  --> $DIR/generic-arithmetic-2.rs:124:9
+  --> $DIR/generic-arithmetic-2.rs:125:9
    |
 LL |         simd_cttz(z);
    |         ^^^^^^^^^^^^
diff --git a/tests/ui/simd/intrinsic/generic-elements.rs b/tests/ui/simd/intrinsic/generic-elements.rs
index 905299a9289..08d1e3ce944 100644
--- a/tests/ui/simd/intrinsic/generic-elements.rs
+++ b/tests/ui/simd/intrinsic/generic-elements.rs
@@ -1,4 +1,5 @@
 //@ build-fail
+//@ ignore-backends: gcc
 
 #![feature(
     repr_simd,
diff --git a/tests/ui/simd/intrinsic/generic-elements.stderr b/tests/ui/simd/intrinsic/generic-elements.stderr
index 3779aa86cee..a32a923633b 100644
--- a/tests/ui/simd/intrinsic/generic-elements.stderr
+++ b/tests/ui/simd/intrinsic/generic-elements.stderr
@@ -1,125 +1,125 @@
 error[E0511]: invalid monomorphization of `simd_insert` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:51:9
+  --> $DIR/generic-elements.rs:52:9
    |
 LL |         simd_insert(0, 0, 0);
    |         ^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_insert` intrinsic: expected inserted type `i32` (element of input `i32x4`), found `f64`
-  --> $DIR/generic-elements.rs:53:9
+  --> $DIR/generic-elements.rs:54:9
    |
 LL |         simd_insert(x, 0, 1.0);
    |         ^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_extract` intrinsic: expected return type `i32` (element of input `i32x4`), found `f32`
-  --> $DIR/generic-elements.rs:55:9
+  --> $DIR/generic-elements.rs:56:9
    |
 LL |         simd_extract::<_, f32>(x, 0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:59:9
+  --> $DIR/generic-elements.rs:60:9
    |
 LL |         simd_shuffle::<i32, _, i32>(0, 0, IDX2);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:62:9
+  --> $DIR/generic-elements.rs:63:9
    |
 LL |         simd_shuffle::<i32, _, i32>(0, 0, IDX4);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:65:9
+  --> $DIR/generic-elements.rs:66:9
    |
 LL |         simd_shuffle::<i32, _, i32>(0, 0, IDX8);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x2` with element type `f32`
-  --> $DIR/generic-elements.rs:68:9
+  --> $DIR/generic-elements.rs:69:9
    |
 LL |         simd_shuffle::<_, _, f32x2>(x, x, IDX2);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x4` with element type `f32`
-  --> $DIR/generic-elements.rs:70:9
+  --> $DIR/generic-elements.rs:71:9
    |
 LL |         simd_shuffle::<_, _, f32x4>(x, x, IDX4);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x8` with element type `f32`
-  --> $DIR/generic-elements.rs:72:9
+  --> $DIR/generic-elements.rs:73:9
    |
 LL |         simd_shuffle::<_, _, f32x8>(x, x, IDX8);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected return type of length 2, found `i32x8` with length 8
-  --> $DIR/generic-elements.rs:75:9
+  --> $DIR/generic-elements.rs:76:9
    |
 LL |         simd_shuffle::<_, _, i32x8>(x, x, IDX2);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected return type of length 4, found `i32x8` with length 8
-  --> $DIR/generic-elements.rs:77:9
+  --> $DIR/generic-elements.rs:78:9
    |
 LL |         simd_shuffle::<_, _, i32x8>(x, x, IDX4);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: expected return type of length 8, found `i32x2` with length 2
-  --> $DIR/generic-elements.rs:79:9
+  --> $DIR/generic-elements.rs:80:9
    |
 LL |         simd_shuffle::<_, _, i32x2>(x, x, IDX8);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:83:9
+  --> $DIR/generic-elements.rs:84:9
    |
 LL |         simd_shuffle_const_generic::<i32, i32, I2>(0, 0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:86:9
+  --> $DIR/generic-elements.rs:87:9
    |
 LL |         simd_shuffle_const_generic::<i32, i32, I4>(0, 0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected SIMD input type, found non-SIMD `i32`
-  --> $DIR/generic-elements.rs:89:9
+  --> $DIR/generic-elements.rs:90:9
    |
 LL |         simd_shuffle_const_generic::<i32, i32, I8>(0, 0);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x2` with element type `f32`
-  --> $DIR/generic-elements.rs:92:9
+  --> $DIR/generic-elements.rs:93:9
    |
 LL |         simd_shuffle_const_generic::<_, f32x2, I2>(x, x);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x4` with element type `f32`
-  --> $DIR/generic-elements.rs:94:9
+  --> $DIR/generic-elements.rs:95:9
    |
 LL |         simd_shuffle_const_generic::<_, f32x4, I4>(x, x);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected return element type `i32` (element of input `i32x4`), found `f32x8` with element type `f32`
-  --> $DIR/generic-elements.rs:96:9
+  --> $DIR/generic-elements.rs:97:9
    |
 LL |         simd_shuffle_const_generic::<_, f32x8, I8>(x, x);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected return type of length 2, found `i32x8` with length 8
-  --> $DIR/generic-elements.rs:99:9
+  --> $DIR/generic-elements.rs:100:9
    |
 LL |         simd_shuffle_const_generic::<_, i32x8, I2>(x, x);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected return type of length 4, found `i32x8` with length 8
-  --> $DIR/generic-elements.rs:101:9
+  --> $DIR/generic-elements.rs:102:9
    |
 LL |         simd_shuffle_const_generic::<_, i32x8, I4>(x, x);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_shuffle_const_generic` intrinsic: expected return type of length 8, found `i32x2` with length 2
-  --> $DIR/generic-elements.rs:103:9
+  --> $DIR/generic-elements.rs:104:9
    |
 LL |         simd_shuffle_const_generic::<_, i32x2, I8>(x, x);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/simd/masked-load-store-build-fail.rs b/tests/ui/simd/masked-load-store-build-fail.rs
index 4b6cc17683c..c711b6dfd97 100644
--- a/tests/ui/simd/masked-load-store-build-fail.rs
+++ b/tests/ui/simd/masked-load-store-build-fail.rs
@@ -1,4 +1,5 @@
 //@ build-fail
+//@ ignore-backends: gcc
 #![feature(repr_simd, core_intrinsics)]
 
 use std::intrinsics::simd::{simd_masked_load, simd_masked_store};
diff --git a/tests/ui/simd/masked-load-store-build-fail.stderr b/tests/ui/simd/masked-load-store-build-fail.stderr
index 7f09841b597..b9158f46ea9 100644
--- a/tests/ui/simd/masked-load-store-build-fail.stderr
+++ b/tests/ui/simd/masked-load-store-build-fail.stderr
@@ -1,47 +1,47 @@
 error[E0511]: invalid monomorphization of `simd_masked_load` intrinsic: expected third argument with length 8 (same as input type `Simd<i8, 8>`), found `Simd<u8, 4>` with length 4
-  --> $DIR/masked-load-store-build-fail.rs:15:9
+  --> $DIR/masked-load-store-build-fail.rs:16:9
    |
 LL |         simd_masked_load(Simd::<i8, 8>([-1, 0, -1, -1, 0, 0, 0, 0]), arr.as_ptr(), default);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_load` intrinsic: expected element type `u8` of second argument `*const i8` to be a pointer to the element type `u8` of the first argument `Simd<u8, 4>`, found `u8` != `*_ u8`
-  --> $DIR/masked-load-store-build-fail.rs:18:9
+  --> $DIR/masked-load-store-build-fail.rs:19:9
    |
 LL |         simd_masked_load(Simd::<i8, 4>([-1, 0, -1, -1]), arr.as_ptr() as *const i8, default);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_load` intrinsic: expected element type `u32` of second argument `*const u8` to be a pointer to the element type `u32` of the first argument `Simd<u32, 4>`, found `u32` != `*_ u32`
-  --> $DIR/masked-load-store-build-fail.rs:21:9
+  --> $DIR/masked-load-store-build-fail.rs:22:9
    |
 LL |         simd_masked_load(Simd::<i8, 4>([-1, 0, -1, -1]), arr.as_ptr(), Simd::<u32, 4>([9; 4]));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_load` intrinsic: expected mask element type to be an integer, found `f32`
-  --> $DIR/masked-load-store-build-fail.rs:24:9
+  --> $DIR/masked-load-store-build-fail.rs:25:9
    |
 LL |         simd_masked_load(Simd::<f32, 4>([1.0, 0.0, 1.0, 1.0]), arr.as_ptr(), default);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_store` intrinsic: expected element type `u32` of second argument `*const u8` to be a pointer to the element type `u32` of the first argument `Simd<u32, 4>`, found `u32` != `*mut u32`
-  --> $DIR/masked-load-store-build-fail.rs:27:9
+  --> $DIR/masked-load-store-build-fail.rs:28:9
    |
 LL |         simd_masked_store(Simd([-1i8; 4]), arr.as_ptr(), Simd([5u32; 4]));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_store` intrinsic: expected element type `u8` of second argument `*const u8` to be a pointer to the element type `u8` of the first argument `Simd<u8, 4>`, found `u8` != `*mut u8`
-  --> $DIR/masked-load-store-build-fail.rs:30:9
+  --> $DIR/masked-load-store-build-fail.rs:31:9
    |
 LL |         simd_masked_store(Simd([-1i8; 4]), arr.as_ptr(), Simd([5u8; 4]));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_store` intrinsic: expected third argument with length 4 (same as input type `Simd<i8, 4>`), found `Simd<u8, 2>` with length 2
-  --> $DIR/masked-load-store-build-fail.rs:33:9
+  --> $DIR/masked-load-store-build-fail.rs:34:9
    |
 LL |         simd_masked_store(Simd([-1i8; 4]), arr.as_mut_ptr(), Simd([5u8; 2]));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_masked_store` intrinsic: expected mask element type to be an integer, found `f32`
-  --> $DIR/masked-load-store-build-fail.rs:36:9
+  --> $DIR/masked-load-store-build-fail.rs:37:9
    |
 LL |         simd_masked_store(Simd([1f32; 4]), arr.as_mut_ptr(), Simd([5u8; 4]));
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/simd/monomorphize-shuffle-index.generic.stderr b/tests/ui/simd/monomorphize-shuffle-index.generic.stderr
index b0742bc5ef8..c82adbf8d4c 100644
--- a/tests/ui/simd/monomorphize-shuffle-index.generic.stderr
+++ b/tests/ui/simd/monomorphize-shuffle-index.generic.stderr
@@ -1,5 +1,5 @@
 error: overly complex generic constant
-  --> $DIR/monomorphize-shuffle-index.rs:36:51
+  --> $DIR/monomorphize-shuffle-index.rs:37:51
    |
 LL |         return simd_shuffle_const_generic::<_, _, { &Self::I.0 }>(a, b);
    |                                                   ^^----------^^
diff --git a/tests/ui/simd/monomorphize-shuffle-index.rs b/tests/ui/simd/monomorphize-shuffle-index.rs
index 1490f8e2319..ba952cdb0dc 100644
--- a/tests/ui/simd/monomorphize-shuffle-index.rs
+++ b/tests/ui/simd/monomorphize-shuffle-index.rs
@@ -1,6 +1,7 @@
 //@ revisions: old generic generic_with_fn
 //@[old]run-pass
 //@[generic_with_fn]run-pass
+//@ ignore-backends: gcc
 #![feature(
     repr_simd,
     core_intrinsics,
diff --git a/tests/ui/simd/monomorphize-too-long.rs b/tests/ui/simd/monomorphize-too-long.rs
index 4fac987b0b5..9c837415191 100644
--- a/tests/ui/simd/monomorphize-too-long.rs
+++ b/tests/ui/simd/monomorphize-too-long.rs
@@ -6,7 +6,5 @@
 struct Simd<T, const N: usize>([T; N]);
 
 fn main() {
-    let _too_big = Simd([1_u16; 54321]);
+    let _too_big = Simd([1_u16; 54321]); //~ ERROR the SIMD type `Simd<u16, 54321>` has more elements than the limit 32768
 }
-
-//~? ERROR monomorphising SIMD type `Simd<u16, 54321>` of length greater than 32768
diff --git a/tests/ui/simd/monomorphize-too-long.stderr b/tests/ui/simd/monomorphize-too-long.stderr
index 978eef307ab..71bc78ef5c9 100644
--- a/tests/ui/simd/monomorphize-too-long.stderr
+++ b/tests/ui/simd/monomorphize-too-long.stderr
@@ -1,4 +1,8 @@
-error: monomorphising SIMD type `Simd<u16, 54321>` of length greater than 32768
+error: the SIMD type `Simd<u16, 54321>` has more elements than the limit 32768
+  --> $DIR/monomorphize-too-long.rs:9:9
+   |
+LL |     let _too_big = Simd([1_u16; 54321]);
+   |         ^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/simd/monomorphize-zero-length.rs b/tests/ui/simd/monomorphize-zero-length.rs
index d38870c572d..f956197a61c 100644
--- a/tests/ui/simd/monomorphize-zero-length.rs
+++ b/tests/ui/simd/monomorphize-zero-length.rs
@@ -6,7 +6,5 @@
 struct Simd<T, const N: usize>([T; N]);
 
 fn main() {
-    let _empty = Simd([1.0; 0]);
+    let _empty = Simd([1.0; 0]); //~ ERROR the SIMD type `Simd<f64, 0>` has zero elements
 }
-
-//~? ERROR monomorphising SIMD type `Simd<f64, 0>` of zero length
diff --git a/tests/ui/simd/monomorphize-zero-length.stderr b/tests/ui/simd/monomorphize-zero-length.stderr
index 738c20fe51a..66f26d95c9d 100644
--- a/tests/ui/simd/monomorphize-zero-length.stderr
+++ b/tests/ui/simd/monomorphize-zero-length.stderr
@@ -1,4 +1,8 @@
-error: monomorphising SIMD type `Simd<f64, 0>` of zero length
+error: the SIMD type `Simd<f64, 0>` has zero elements
+  --> $DIR/monomorphize-zero-length.rs:9:9
+   |
+LL |     let _empty = Simd([1.0; 0]);
+   |         ^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/simd/not-out-of-bounds.rs b/tests/ui/simd/not-out-of-bounds.rs
index 4bd2a69edbf..c80c90e3ab9 100644
--- a/tests/ui/simd/not-out-of-bounds.rs
+++ b/tests/ui/simd/not-out-of-bounds.rs
@@ -1,4 +1,5 @@
 //@ build-fail
+//@ ignore-backends: gcc
 #![allow(non_camel_case_types)]
 #![feature(repr_simd, core_intrinsics)]
 
diff --git a/tests/ui/simd/not-out-of-bounds.stderr b/tests/ui/simd/not-out-of-bounds.stderr
index 4b6bda93e45..734c21fbf41 100644
--- a/tests/ui/simd/not-out-of-bounds.stderr
+++ b/tests/ui/simd/not-out-of-bounds.stderr
@@ -1,5 +1,5 @@
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 4)
-  --> $DIR/not-out-of-bounds.rs:52:21
+  --> $DIR/not-out-of-bounds.rs:53:21
    |
 LL |                     $y(vec1, vec2, IDX)
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -10,7 +10,7 @@ LL |     test_shuffle_lanes!(2, u8x2, simd_shuffle);
    = note: this error originates in the macro `test_shuffle_lanes` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 8)
-  --> $DIR/not-out-of-bounds.rs:52:21
+  --> $DIR/not-out-of-bounds.rs:53:21
    |
 LL |                     $y(vec1, vec2, IDX)
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -21,7 +21,7 @@ LL |     test_shuffle_lanes!(4, u8x4, simd_shuffle);
    = note: this error originates in the macro `test_shuffle_lanes` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 16)
-  --> $DIR/not-out-of-bounds.rs:52:21
+  --> $DIR/not-out-of-bounds.rs:53:21
    |
 LL |                     $y(vec1, vec2, IDX)
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -32,7 +32,7 @@ LL |     test_shuffle_lanes!(8, u8x8, simd_shuffle);
    = note: this error originates in the macro `test_shuffle_lanes` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 32)
-  --> $DIR/not-out-of-bounds.rs:52:21
+  --> $DIR/not-out-of-bounds.rs:53:21
    |
 LL |                     $y(vec1, vec2, IDX)
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -43,7 +43,7 @@ LL |     test_shuffle_lanes!(16, u8x16, simd_shuffle);
    = note: this error originates in the macro `test_shuffle_lanes` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 64)
-  --> $DIR/not-out-of-bounds.rs:52:21
+  --> $DIR/not-out-of-bounds.rs:53:21
    |
 LL |                     $y(vec1, vec2, IDX)
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -54,7 +54,7 @@ LL |     test_shuffle_lanes!(32, u8x32, simd_shuffle);
    = note: this error originates in the macro `test_shuffle_lanes` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 128)
-  --> $DIR/not-out-of-bounds.rs:52:21
+  --> $DIR/not-out-of-bounds.rs:53:21
    |
 LL |                     $y(vec1, vec2, IDX)
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -65,19 +65,19 @@ LL |     test_shuffle_lanes!(64, u8x64, simd_shuffle);
    = note: this error originates in the macro `test_shuffle_lanes` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: SIMD index #0 is out of bounds (limit 4)
-  --> $DIR/not-out-of-bounds.rs:77:23
+  --> $DIR/not-out-of-bounds.rs:78:23
    |
 LL |         let _: u8x2 = simd_shuffle(v, v, I);
    |                       ^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_insert` intrinsic: SIMD index #1 is out of bounds (limit 2)
-  --> $DIR/not-out-of-bounds.rs:83:9
+  --> $DIR/not-out-of-bounds.rs:84:9
    |
 LL |         simd_insert(v, 2, 0u8);
    |         ^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `simd_extract` intrinsic: SIMD index #1 is out of bounds (limit 2)
-  --> $DIR/not-out-of-bounds.rs:84:24
+  --> $DIR/not-out-of-bounds.rs:85:24
    |
 LL |         let _val: u8 = simd_extract(v, 2);
    |                        ^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/simd/simd-lane-limit-err-npow2.rs b/tests/ui/simd/simd-lane-limit-err-npow2.rs
new file mode 100644
index 00000000000..d5c5c92e953
--- /dev/null
+++ b/tests/ui/simd/simd-lane-limit-err-npow2.rs
@@ -0,0 +1,12 @@
+//@ build-fail
+//@ aux-crate:simd=simd-lane-limit.rs
+
+extern crate simd;
+
+use simd::Simd;
+
+fn main() {
+    // test non-power-of-two, since #[repr(simd, packed)] has unusual layout
+    let _x: Simd<i32, 24> = Simd([0; 24]);
+    //~^ ERROR the SIMD type `simd::Simd<i32, 24>` has more elements than the limit 8
+}
diff --git a/tests/ui/simd/simd-lane-limit-err-npow2.stderr b/tests/ui/simd/simd-lane-limit-err-npow2.stderr
new file mode 100644
index 00000000000..fff26c4c1c1
--- /dev/null
+++ b/tests/ui/simd/simd-lane-limit-err-npow2.stderr
@@ -0,0 +1,8 @@
+error: the SIMD type `simd::Simd<i32, 24>` has more elements than the limit 8
+  --> $DIR/simd-lane-limit-err-npow2.rs:10:9
+   |
+LL |     let _x: Simd<i32, 24> = Simd([0; 24]);
+   |         ^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/simd/simd-lane-limit-err.rs b/tests/ui/simd/simd-lane-limit-err.rs
new file mode 100644
index 00000000000..00390bdbdaf
--- /dev/null
+++ b/tests/ui/simd/simd-lane-limit-err.rs
@@ -0,0 +1,11 @@
+//@ build-fail
+//@ aux-crate:simd=simd-lane-limit.rs
+
+extern crate simd;
+
+use simd::Simd;
+
+fn main() {
+    let _x: Simd<i32, 16> = Simd([0; 16]);
+    //~^ ERROR the SIMD type `simd::Simd<i32, 16>` has more elements than the limit 8
+}
diff --git a/tests/ui/simd/simd-lane-limit-err.stderr b/tests/ui/simd/simd-lane-limit-err.stderr
new file mode 100644
index 00000000000..3f2eaeda2d4
--- /dev/null
+++ b/tests/ui/simd/simd-lane-limit-err.stderr
@@ -0,0 +1,8 @@
+error: the SIMD type `simd::Simd<i32, 16>` has more elements than the limit 8
+  --> $DIR/simd-lane-limit-err.rs:9:9
+   |
+LL |     let _x: Simd<i32, 16> = Simd([0; 16]);
+   |         ^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/simd/simd-lane-limit-ok.rs b/tests/ui/simd/simd-lane-limit-ok.rs
new file mode 100644
index 00000000000..52fd3158440
--- /dev/null
+++ b/tests/ui/simd/simd-lane-limit-ok.rs
@@ -0,0 +1,14 @@
+//@ build-pass
+//@ aux-crate:simd=simd-lane-limit.rs
+
+extern crate simd;
+
+use simd::Simd;
+
+fn main() {
+    let _x: Simd<i32, 4> = Simd([0; 4]);
+    let _y: Simd<i32, 8> = Simd([0; 8]);
+
+    // test non-power-of-two, since #[repr(simd, packed)] has unusual layout
+    let _z: Simd<i32, 6> = Simd([0; 6]);
+}
diff --git a/tests/ui/simd/type-generic-monomorphisation-empty.rs b/tests/ui/simd/type-generic-monomorphisation-empty.rs
index c08dc9fe3df..7c43b8914da 100644
--- a/tests/ui/simd/type-generic-monomorphisation-empty.rs
+++ b/tests/ui/simd/type-generic-monomorphisation-empty.rs
@@ -6,7 +6,5 @@
 struct Simd<const N: usize>([f32; N]);
 
 fn main() {
-    let _ = Simd::<0>([]);
+    let _empty = Simd::<0>([]); //~ ERROR the SIMD type `Simd<0>` has zero elements
 }
-
-//~? ERROR monomorphising SIMD type `Simd<0>` of zero length
diff --git a/tests/ui/simd/type-generic-monomorphisation-empty.stderr b/tests/ui/simd/type-generic-monomorphisation-empty.stderr
index fc294607ae3..450db7e47db 100644
--- a/tests/ui/simd/type-generic-monomorphisation-empty.stderr
+++ b/tests/ui/simd/type-generic-monomorphisation-empty.stderr
@@ -1,4 +1,8 @@
-error: monomorphising SIMD type `Simd<0>` of zero length
+error: the SIMD type `Simd<0>` has zero elements
+  --> $DIR/type-generic-monomorphisation-empty.rs:9:9
+   |
+LL |     let _empty = Simd::<0>([]);
+   |         ^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/simd/type-generic-monomorphisation-oversized.rs b/tests/ui/simd/type-generic-monomorphisation-oversized.rs
index efe3480317c..73a1f00e8c7 100644
--- a/tests/ui/simd/type-generic-monomorphisation-oversized.rs
+++ b/tests/ui/simd/type-generic-monomorphisation-oversized.rs
@@ -6,7 +6,6 @@
 struct Simd<const N: usize>([f32; N]);
 
 fn main() {
-    let _ = Simd::<65536>([0.; 65536]);
+    let _x = Simd::<65536>([0.; 65536]);
+    //~^ ERROR the SIMD type `Simd<65536>` has more elements than the limit 32768
 }
-
-//~? ERROR monomorphising SIMD type `Simd<65536>` of length greater than 32768
diff --git a/tests/ui/simd/type-generic-monomorphisation-oversized.stderr b/tests/ui/simd/type-generic-monomorphisation-oversized.stderr
index 39ff36799cc..0065049abd6 100644
--- a/tests/ui/simd/type-generic-monomorphisation-oversized.stderr
+++ b/tests/ui/simd/type-generic-monomorphisation-oversized.stderr
@@ -1,4 +1,8 @@
-error: monomorphising SIMD type `Simd<65536>` of length greater than 32768
+error: the SIMD type `Simd<65536>` has more elements than the limit 32768
+  --> $DIR/type-generic-monomorphisation-oversized.rs:9:9
+   |
+LL |     let _x = Simd::<65536>([0.; 65536]);
+   |         ^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/span/issue-42234-unknown-receiver-type.stderr b/tests/ui/span/issue-42234-unknown-receiver-type.stderr
index 10308ec07da..71ac4f53b3f 100644
--- a/tests/ui/span/issue-42234-unknown-receiver-type.stderr
+++ b/tests/ui/span/issue-42234-unknown-receiver-type.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL |     let x: Option<_> = None;
    |                        ^^^^ cannot infer type of the type parameter `T` declared on the enum `Option`
 LL |     x.unwrap().method_that_could_exist_on_some_type();
-   |     ---------- type must be known at this point
+   |                ------------------------------------ type must be known at this point
    |
 help: consider specifying the generic argument
    |
@@ -16,6 +16,8 @@ error[E0282]: type annotations needed
    |
 LL |         .sum::<_>()
    |          ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
+LL |         .to_string()
+   |          --------- type must be known at this point
    |
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/span/suggestion-non-ascii.stderr b/tests/ui/span/suggestion-non-ascii.stderr
index 6e6e31a5698..361f744ee8e 100644
--- a/tests/ui/span/suggestion-non-ascii.stderr
+++ b/tests/ui/span/suggestion-non-ascii.stderr
@@ -2,7 +2,9 @@ error[E0608]: cannot index into a value of type `({integer},)`
   --> $DIR/suggestion-non-ascii.rs:3:24
    |
 LL |     println!("☃{}", tup[0]);
-   |                        ^^^ help: to access tuple elements, use: `.0`
+   |                        ^^^ help: to access tuple element `0`, use: `.0`
+   |
+   = help: tuples are indexed with a dot and a literal index: `tuple.0`, `tuple.1`, etc.
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/static/static-align.rs b/tests/ui/static/static-align.rs
index 93241db09f9..e2db7c01adf 100644
--- a/tests/ui/static/static-align.rs
+++ b/tests/ui/static/static-align.rs
@@ -1,10 +1,14 @@
 //@ run-pass
+//@ compile-flags: --cfg FOURTY_TWO="42" --cfg TRUE --check-cfg=cfg(FOURTY_TWO,values("42")) --check-cfg=cfg(TRUE)
 #![feature(static_align)]
+#![deny(non_upper_case_globals)]
+
+use std::cell::Cell;
 
 #[rustc_align_static(64)]
 static A: u8 = 0;
 
-#[rustc_align_static(64)]
+#[rustc_align_static(4096)]
 static B: u8 = 0;
 
 #[rustc_align_static(128)]
@@ -17,10 +21,86 @@ unsafe extern "C" {
     static C: u64;
 }
 
+struct HasDrop(*const HasDrop);
+
+impl Drop for HasDrop {
+    fn drop(&mut self) {
+        assert_eq!(core::ptr::from_mut(self).cast_const(), self.0);
+    }
+}
+
+thread_local! {
+    #[rustc_align_static(4096)]
+    static LOCAL: u64 = 0;
+
+    #[allow(unused_mut, reason = "test attribute handling")]
+    #[cfg_attr(true, rustc_align_static(4096))]
+    static CONST_LOCAL: u64 = const { 0 };
+
+    #[cfg_attr(any(true), cfg_attr(true, rustc_align_static(4096)))]
+    #[allow(unused_mut, reason = "test attribute handling")]
+    static HASDROP_LOCAL: Cell<HasDrop> = Cell::new(HasDrop(core::ptr::null()));
+
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    #[allow(unused_mut, reason = "test attribute handling")]
+    #[cfg_attr(TRUE,
+      cfg_attr(FOURTY_TWO = "42",
+      cfg_attr(all(),
+      cfg_attr(any(true),
+      cfg_attr(true, rustc_align_static(4096))))))]
+    #[allow(unused_mut, reason = "test attribute handling")]
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    static HASDROP_CONST_LOCAL: Cell<HasDrop> = const { Cell::new(HasDrop(core::ptr::null())) };
+
+    #[cfg_attr(TRUE,)]
+    #[cfg_attr(true,)]
+    #[cfg_attr(false,)]
+    #[cfg_attr(
+        TRUE,
+        rustc_align_static(32),
+        cfg_attr(true, allow(non_upper_case_globals, reason = "test attribute handling")),
+        cfg_attr(false,)
+    )]
+    #[cfg_attr(false, rustc_align_static(0))]
+    static more_attr_testing: u64 = 0;
+}
+
+fn thread_local_ptr<T>(key: &'static std::thread::LocalKey<T>) -> *const T {
+    key.with(|local| core::ptr::from_ref::<T>(local))
+}
+
 fn main() {
     assert!(core::ptr::from_ref(&A).addr().is_multiple_of(64));
-    assert!(core::ptr::from_ref(&B).addr().is_multiple_of(64));
+    assert!(core::ptr::from_ref(&B).addr().is_multiple_of(4096));
 
     assert!(core::ptr::from_ref(&EXPORTED).addr().is_multiple_of(128));
     unsafe { assert!(core::ptr::from_ref(&C).addr().is_multiple_of(128)) };
+
+    assert!(thread_local_ptr(&LOCAL).addr().is_multiple_of(4096));
+    assert!(thread_local_ptr(&CONST_LOCAL).addr().is_multiple_of(4096));
+    assert!(thread_local_ptr(&HASDROP_LOCAL).addr().is_multiple_of(4096));
+    assert!(thread_local_ptr(&HASDROP_CONST_LOCAL).addr().is_multiple_of(4096));
+    assert!(thread_local_ptr(&more_attr_testing).addr().is_multiple_of(32));
+
+    // Test that address (and therefore alignment) is maintained during drop
+    let hasdrop_ptr = thread_local_ptr(&HASDROP_LOCAL);
+    core::mem::forget(HASDROP_LOCAL.replace(HasDrop(hasdrop_ptr.cast())));
+    let hasdrop_const_ptr = thread_local_ptr(&HASDROP_CONST_LOCAL);
+    core::mem::forget(HASDROP_CONST_LOCAL.replace(HasDrop(hasdrop_const_ptr.cast())));
 }
diff --git a/tests/ui/static/static-lifetime-bound.stderr b/tests/ui/static/static-lifetime-bound.stderr
index 8b0d3a0bf4c..51be79be5db 100644
--- a/tests/ui/static/static-lifetime-bound.stderr
+++ b/tests/ui/static/static-lifetime-bound.stderr
@@ -10,6 +10,12 @@ LL |     f(&x);
    |     argument requires that `x` is borrowed for `'static`
 LL | }
    | - `x` dropped here while still borrowed
+   |
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/static-lifetime-bound.rs:1:10
+   |
+LL | fn f<'a: 'static>(_: &'a i32) {}
+   |          ^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/static/static-region-bound.stderr b/tests/ui/static/static-region-bound.stderr
index a47c9457102..8472738daa4 100644
--- a/tests/ui/static/static-region-bound.stderr
+++ b/tests/ui/static/static-region-bound.stderr
@@ -7,6 +7,12 @@ LL |     f(x);
    |     ---- argument requires that borrow lasts for `'static`
 LL | }
    | - temporary value is freed at the end of this statement
+   |
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/static-region-bound.rs:3:8
+   |
+LL | fn f<T:'static>(_: T) {}
+   |        ^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/structs-enums/unit-like-struct-drop-run.rs b/tests/ui/structs-enums/unit-like-struct-drop-run.rs
index 3d00871837c..5e3fc5931bd 100644
--- a/tests/ui/structs-enums/unit-like-struct-drop-run.rs
+++ b/tests/ui/structs-enums/unit-like-struct-drop-run.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-unwind
 //@ needs-threads
+//@ ignore-backends: gcc
 
 // Make sure the destructor is run for unit-like structs.
 
diff --git a/tests/ui/suggestions/auxiliary/hidden-struct.rs b/tests/ui/suggestions/auxiliary/hidden-struct.rs
index 30d69acac20..1f495a9f222 100644
--- a/tests/ui/suggestions/auxiliary/hidden-struct.rs
+++ b/tests/ui/suggestions/auxiliary/hidden-struct.rs
@@ -1,3 +1,5 @@
+// `Foo` and `Bar` should not be suggested in diagnostics of dependents
+
 #[doc(hidden)]
 pub mod hidden {
     pub struct Foo;
@@ -5,13 +7,29 @@ pub mod hidden {
 
 pub mod hidden1 {
     #[doc(hidden)]
-    pub struct Foo;
+    pub struct Bar;
 }
 
+// `Baz` and `Quux` *should* be suggested in diagnostics of dependents
 
 #[doc(hidden)]
-pub(crate) mod hidden2 {
-    pub struct Bar;
+pub mod hidden2 {
+    pub struct Baz;
+}
+
+pub use hidden2::Baz;
+
+#[doc(hidden)]
+pub(crate) mod hidden3 {
+    pub struct Quux;
 }
 
-pub use hidden2::Bar;
+pub use hidden3::Quux;
+
+pub trait Marker {}
+
+impl Marker for Option<u32> {}
+impl Marker for hidden::Foo {}
+impl Marker for hidden1::Bar {}
+impl Marker for Baz {}
+impl Marker for Quux {}
diff --git a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs
index 281975dcc2f..a83e496f270 100644
--- a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs
+++ b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs
@@ -1,5 +1,4 @@
 //@ aux-build:hidden-struct.rs
-//@ compile-flags: --crate-type lib
 
 extern crate hidden_struct;
 
@@ -9,7 +8,20 @@ mod local {
 }
 
 pub fn test(_: Foo) {}
-//~^ ERROR cannot find type `Foo` in this scope
+//~^ ERROR [E0412]
 
 pub fn test2(_: Bar) {}
-//~^ ERROR cannot find type `Bar` in this scope
+//~^ ERROR [E0412]
+
+pub fn test3(_: Baz) {}
+//~^ ERROR [E0412]
+
+pub fn test4(_: Quux) {}
+//~^ ERROR [E0412]
+
+fn test5<T: hidden_struct::Marker>() {}
+
+fn main() {
+    test5::<i32>();
+    //~^ ERROR [E0277]
+}
diff --git a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr
index 7fb4d95ff9b..7036708756d 100644
--- a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr
+++ b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr
@@ -1,5 +1,5 @@
 error[E0412]: cannot find type `Foo` in this scope
-  --> $DIR/dont-suggest-foreign-doc-hidden.rs:11:16
+  --> $DIR/dont-suggest-foreign-doc-hidden.rs:10:16
    |
 LL | pub fn test(_: Foo) {}
    |                ^^^ not found in this scope
@@ -10,16 +10,50 @@ LL + use local::Foo;
    |
 
 error[E0412]: cannot find type `Bar` in this scope
-  --> $DIR/dont-suggest-foreign-doc-hidden.rs:14:17
+  --> $DIR/dont-suggest-foreign-doc-hidden.rs:13:17
    |
 LL | pub fn test2(_: Bar) {}
    |                 ^^^ not found in this scope
+
+error[E0412]: cannot find type `Baz` in this scope
+  --> $DIR/dont-suggest-foreign-doc-hidden.rs:16:17
+   |
+LL | pub fn test3(_: Baz) {}
+   |                 ^^^ not found in this scope
    |
 help: consider importing this struct
    |
-LL + use hidden_struct::Bar;
+LL + use hidden_struct::Baz;
+   |
+
+error[E0412]: cannot find type `Quux` in this scope
+  --> $DIR/dont-suggest-foreign-doc-hidden.rs:19:17
+   |
+LL | pub fn test4(_: Quux) {}
+   |                 ^^^^ not found in this scope
+   |
+help: consider importing this struct
+   |
+LL + use hidden_struct::Quux;
+   |
+
+error[E0277]: the trait bound `i32: Marker` is not satisfied
+  --> $DIR/dont-suggest-foreign-doc-hidden.rs:25:13
+   |
+LL |     test5::<i32>();
+   |             ^^^ the trait `Marker` is not implemented for `i32`
+   |
+   = help: the following other types implement trait `Marker`:
+             Baz
+             Option<u32>
+             Quux
+note: required by a bound in `test5`
+  --> $DIR/dont-suggest-foreign-doc-hidden.rs:22:13
    |
+LL | fn test5<T: hidden_struct::Marker>() {}
+   |             ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test5`
 
-error: aborting due to 2 previous errors
+error: aborting due to 5 previous errors
 
-For more information about this error, try `rustc --explain E0412`.
+Some errors have detailed explanations: E0277, E0412.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/suggestions/issue-61963.rs b/tests/ui/suggestions/issue-61963.rs
index 77e4b21f5db..bf0680b9860 100644
--- a/tests/ui/suggestions/issue-61963.rs
+++ b/tests/ui/suggestions/issue-61963.rs
@@ -1,6 +1,7 @@
 //@ edition: 2015
 //@ proc-macro: issue-61963.rs
 //@ proc-macro: issue-61963-1.rs
+//@ ignore-backends: gcc
 #![deny(bare_trait_objects)]
 
 #[macro_use]
diff --git a/tests/ui/suggestions/issue-61963.stderr b/tests/ui/suggestions/issue-61963.stderr
index ffdeef12bb7..f9146a619ec 100644
--- a/tests/ui/suggestions/issue-61963.stderr
+++ b/tests/ui/suggestions/issue-61963.stderr
@@ -1,5 +1,5 @@
 error: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/issue-61963.rs:23:14
+  --> $DIR/issue-61963.rs:24:14
    |
 LL |     bar: Box<Bar>,
    |              ^^^
@@ -7,7 +7,7 @@ LL |     bar: Box<Bar>,
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
    = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/warnings-promoted-to-error.html>
 note: the lint level is defined here
-  --> $DIR/issue-61963.rs:4:9
+  --> $DIR/issue-61963.rs:5:9
    |
 LL | #![deny(bare_trait_objects)]
    |         ^^^^^^^^^^^^^^^^^^
@@ -17,7 +17,7 @@ LL |     bar: Box<dyn Bar>,
    |              +++
 
 error: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/issue-61963.rs:19:1
+  --> $DIR/issue-61963.rs:20:1
    |
 LL | pub struct Foo {
    | ^^^
diff --git a/tests/ui/suggestions/issue-97760.stderr b/tests/ui/suggestions/issue-97760.stderr
index 1084ea7c9e0..c3cf7e13987 100644
--- a/tests/ui/suggestions/issue-97760.stderr
+++ b/tests/ui/suggestions/issue-97760.stderr
@@ -1,11 +1,8 @@
 error[E0277]: `<impl IntoIterator as IntoIterator>::Item` doesn't implement `std::fmt::Display`
-  --> $DIR/issue-97760.rs:4:20
+  --> $DIR/issue-97760.rs:4:19
    |
 LL |         println!("{x}");
-   |                   -^-
-   |                   ||
-   |                   |`<impl IntoIterator as IntoIterator>::Item` cannot be formatted with the default formatter
-   |                   required by this formatting parameter
+   |                   ^^^ `<impl IntoIterator as IntoIterator>::Item` cannot be formatted with the default formatter
    |
    = help: the trait `std::fmt::Display` is not implemented for `<impl IntoIterator as IntoIterator>::Item`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
diff --git a/tests/ui/suggestions/return-cycle-2.stderr b/tests/ui/suggestions/return-cycle-2.stderr
index 23de2309e87..e852cd34a72 100644
--- a/tests/ui/suggestions/return-cycle-2.stderr
+++ b/tests/ui/suggestions/return-cycle-2.stderr
@@ -2,10 +2,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/return-cycle-2.rs:6:34
    |
 LL |     fn as_ref(_: i32, _: i32) -> _ {
-   |                                  ^
-   |                                  |
-   |                                  not allowed in type signatures
-   |                                  help: replace with the correct return type: `Token<&'static T>`
+   |                                  ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -     fn as_ref(_: i32, _: i32) -> _ {
+LL +     fn as_ref(_: i32, _: i32) -> Token<&'static T> {
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/suggestions/return-cycle.stderr b/tests/ui/suggestions/return-cycle.stderr
index 60470490441..cd46c2daa40 100644
--- a/tests/ui/suggestions/return-cycle.stderr
+++ b/tests/ui/suggestions/return-cycle.stderr
@@ -2,10 +2,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/return-cycle.rs:6:17
    |
 LL |     fn new() -> _ {
-   |                 ^
-   |                 |
-   |                 not allowed in type signatures
-   |                 help: replace with the correct return type: `Token<()>`
+   |                 ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -     fn new() -> _ {
+LL +     fn new() -> Token<()> {
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.stderr b/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.stderr
index bf7790e2307..9880dd95d86 100644
--- a/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.stderr
+++ b/tests/ui/suggestions/suggest-fn-ptr-for-fn-item-in-fn-ret.stderr
@@ -2,10 +2,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/suggest-fn-ptr-for-fn-item-in-fn-ret.rs:7:13
    |
 LL | fn bar() -> _ { Wrapper(foo) }
-   |             ^
-   |             |
-   |             not allowed in type signatures
-   |             help: replace with the correct return type: `Wrapper<fn()>`
+   |             ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - fn bar() -> _ { Wrapper(foo) }
+LL + fn bar() -> Wrapper<fn()> { Wrapper(foo) }
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/suggestions/suggest-ref-macro.rs b/tests/ui/suggestions/suggest-ref-macro.rs
index 2f31af33782..41a2acf9062 100644
--- a/tests/ui/suggestions/suggest-ref-macro.rs
+++ b/tests/ui/suggestions/suggest-ref-macro.rs
@@ -1,5 +1,6 @@
 // run-check
 //@ proc-macro: proc-macro-type-error.rs
+//@ ignore-backends: gcc
 
 extern crate proc_macro_type_error;
 
diff --git a/tests/ui/suggestions/suggest-ref-macro.stderr b/tests/ui/suggestions/suggest-ref-macro.stderr
index 08bc9e86a50..2a52c1e2445 100644
--- a/tests/ui/suggestions/suggest-ref-macro.stderr
+++ b/tests/ui/suggestions/suggest-ref-macro.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/suggest-ref-macro.rs:8:1
+  --> $DIR/suggest-ref-macro.rs:9:1
    |
 LL | #[hello]
    | ^^^^^^^^
@@ -8,14 +8,14 @@ LL | #[hello]
    | arguments to this function are incorrect
    |
 note: function defined here
-  --> $DIR/suggest-ref-macro.rs:8:1
+  --> $DIR/suggest-ref-macro.rs:9:1
    |
 LL | #[hello]
    | ^^^^^^^^
    = note: this error originates in the attribute macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0308]: mismatched types
-  --> $DIR/suggest-ref-macro.rs:15:11
+  --> $DIR/suggest-ref-macro.rs:16:11
    |
 LL |         x(123);
    |         - ^^^ expected `&mut i32`, found integer
@@ -26,7 +26,7 @@ LL |     bla!();
    |     ------ in this macro invocation
    |
 note: function defined here
-  --> $DIR/suggest-ref-macro.rs:11:4
+  --> $DIR/suggest-ref-macro.rs:12:4
    |
 LL | fn x(_: &mut i32) {}
    |    ^ -----------
@@ -37,7 +37,7 @@ LL |         x(&mut 123);
    |           ++++
 
 error[E0308]: mismatched types
-  --> $DIR/suggest-ref-macro.rs:26:10
+  --> $DIR/suggest-ref-macro.rs:27:10
    |
 LL |         x($v)
    |         - arguments to this function are incorrect
@@ -46,7 +46,7 @@ LL |     bla!(456);
    |          ^^^ expected `&mut i32`, found integer
    |
 note: function defined here
-  --> $DIR/suggest-ref-macro.rs:11:4
+  --> $DIR/suggest-ref-macro.rs:12:4
    |
 LL | fn x(_: &mut i32) {}
    |    ^ -----------
diff --git a/tests/ui/test-attrs/test-panic-abort-nocapture.rs b/tests/ui/test-attrs/test-panic-abort-nocapture.rs
index 6a1025ea087..7c78d432fa0 100644
--- a/tests/ui/test-attrs/test-panic-abort-nocapture.rs
+++ b/tests/ui/test-attrs/test-panic-abort-nocapture.rs
@@ -6,7 +6,6 @@
 //@ exec-env:RUST_BACKTRACE=0
 //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
 
-//@ ignore-android #120567
 //@ needs-subprocess
 
 #![cfg(test)]
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 8d7c62f8ec7..d8f65a78261 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' ($TID) panicked at $DIR/test-panic-abort-nocapture.rs:32:5:
+thread 'main' ($TID) panicked at $DIR/test-panic-abort-nocapture.rs:31:5:
 assertion `left == right` failed
   left: 2
  right: 4
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
-thread 'main' ($TID) panicked at $DIR/test-panic-abort-nocapture.rs:26:5:
+thread 'main' ($TID) panicked at $DIR/test-panic-abort-nocapture.rs:25:5:
 assertion `left == right` failed
   left: 2
  right: 4
diff --git a/tests/ui/test-attrs/test-panic-abort.rs b/tests/ui/test-attrs/test-panic-abort.rs
index 6c9b641fb6f..13a30223399 100644
--- a/tests/ui/test-attrs/test-panic-abort.rs
+++ b/tests/ui/test-attrs/test-panic-abort.rs
@@ -6,7 +6,6 @@
 //@ exec-env:RUST_BACKTRACE=0
 //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
 
-//@ ignore-android #120567
 //@ needs-subprocess
 
 #![cfg(test)]
diff --git a/tests/ui/test-attrs/test-panic-abort.run.stdout b/tests/ui/test-attrs/test-panic-abort.run.stdout
index 4d65c05b944..ca247f7da41 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' ($TID) panicked at $DIR/test-panic-abort.rs:37:5:
+thread 'main' ($TID) panicked at $DIR/test-panic-abort.rs:36:5:
 assertion `left == right` failed
   left: 2
  right: 5
diff --git a/tests/ui/test-attrs/test-panic-while-printing.rs b/tests/ui/test-attrs/test-panic-while-printing.rs
index a50a15fbe5a..49e8d9c7afd 100644
--- a/tests/ui/test-attrs/test-panic-while-printing.rs
+++ b/tests/ui/test-attrs/test-panic-while-printing.rs
@@ -1,6 +1,7 @@
 //@ compile-flags:--test
 //@ run-pass
 //@ needs-unwind
+//@ ignore-backends: gcc
 
 use std::fmt;
 use std::fmt::{Display, Formatter};
diff --git a/tests/ui/thread-local/long-docs.rs b/tests/ui/thread-local/long-docs.rs
new file mode 100644
index 00000000000..0577d0b27c2
--- /dev/null
+++ b/tests/ui/thread-local/long-docs.rs
@@ -0,0 +1,266 @@
+//@ check-pass
+
+thread_local! {
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    pub static LONG_DOCS: () = ();
+
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    /// I love doc comments.
+    #[allow(unused_mut, reason = "testing")]
+    pub static LONG_DOCS_2: () = ();
+}
+
+fn main() {}
diff --git a/tests/ui/thread-local/no-unstable.rs b/tests/ui/thread-local/no-unstable.rs
new file mode 100644
index 00000000000..3de7985e62d
--- /dev/null
+++ b/tests/ui/thread-local/no-unstable.rs
@@ -0,0 +1,17 @@
+thread_local! {
+    //~^ ERROR: use of an internal attribute [E0658]
+    //~| ERROR: use of an internal attribute [E0658]
+    //~| ERROR: `#[used(linker)]` is currently unstable [E0658]
+    //~| ERROR: `#[used]` attribute cannot be used on constants
+
+    #[rustc_dummy = 17]
+    pub static FOO: () = ();
+
+    #[cfg_attr(true, rustc_dummy = 17)]
+    pub static BAR: () = ();
+
+    #[used(linker)]
+    pub static BAZ: () = ();
+}
+
+fn main() {}
diff --git a/tests/ui/thread-local/no-unstable.stderr b/tests/ui/thread-local/no-unstable.stderr
new file mode 100644
index 00000000000..fbcd804d917
--- /dev/null
+++ b/tests/ui/thread-local/no-unstable.stderr
@@ -0,0 +1,57 @@
+error[E0658]: use of an internal attribute
+  --> $DIR/no-unstable.rs:1:1
+   |
+LL | / thread_local! {
+...  |
+LL | |     pub static BAZ: () = ();
+LL | | }
+   | |_^
+   |
+   = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
+   = note: the `#[rustc_dummy]` attribute is an internal implementation detail that will never be stable
+   = note: the `#[rustc_dummy]` attribute is used for rustc unit tests
+   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_process_attrs` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0658]: use of an internal attribute
+  --> $DIR/no-unstable.rs:1:1
+   |
+LL | / thread_local! {
+...  |
+LL | |     pub static BAZ: () = ();
+LL | | }
+   | |_^
+   |
+   = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
+   = note: the `#[rustc_dummy]` attribute is an internal implementation detail that will never be stable
+   = note: the `#[rustc_dummy]` attribute is used for rustc unit tests
+   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_process_attrs` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0658]: `#[used(linker)]` is currently unstable
+  --> $DIR/no-unstable.rs:1:1
+   |
+LL | / thread_local! {
+...  |
+LL | |     pub static BAZ: () = ();
+LL | | }
+   | |_^
+   |
+   = note: see issue #93798 <https://github.com/rust-lang/rust/issues/93798> for more information
+   = help: add `#![feature(used_with_arg)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_process_attrs` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: `#[used]` attribute cannot be used on constants
+  --> $DIR/no-unstable.rs:1:1
+   |
+LL | / thread_local! {
+...  |
+LL | |     pub static BAZ: () = ();
+LL | | }
+   | |_^
+   |
+   = help: `#[used]` can only be applied to statics
+   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_process_attrs` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/threads-sendsync/task-stderr.rs b/tests/ui/threads-sendsync/task-stderr.rs
index 3934084e02a..f54b5a5cc5f 100644
--- a/tests/ui/threads-sendsync/task-stderr.rs
+++ b/tests/ui/threads-sendsync/task-stderr.rs
@@ -1,6 +1,7 @@
 //@ run-pass
 //@ needs-threads
 //@ needs-unwind
+//@ ignore-backends: gcc
 
 #![feature(internal_output_capture)]
 
diff --git a/tests/ui/threads-sendsync/unwind-resource.rs b/tests/ui/threads-sendsync/unwind-resource.rs
index ec27a1846fe..c5fbfc5bf5b 100644
--- a/tests/ui/threads-sendsync/unwind-resource.rs
+++ b/tests/ui/threads-sendsync/unwind-resource.rs
@@ -3,6 +3,7 @@
 
 #![allow(non_camel_case_types)]
 //@ needs-threads
+//@ ignore-backends: gcc
 
 use std::sync::mpsc::{channel, Sender};
 use std::thread;
diff --git a/tests/ui/track-diagnostics/track.rs b/tests/ui/track-diagnostics/track.rs
index 9ce0a4a555a..2d6d6170fe0 100644
--- a/tests/ui/track-diagnostics/track.rs
+++ b/tests/ui/track-diagnostics/track.rs
@@ -13,13 +13,8 @@
 // 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
+    break rust;
     //~^ ERROR cannot find value `rust` in this scope
     //~| NOTE created at
     //~| ERROR `break` outside of a loop or labeled block
diff --git a/tests/ui/track-diagnostics/track.stderr b/tests/ui/track-diagnostics/track.stderr
index bc04ded379d..76b4bd14f5c 100644
--- a/tests/ui/track-diagnostics/track.stderr
+++ b/tests/ui/track-diagnostics/track.stderr
@@ -1,7 +1,7 @@
 error[E0425]: cannot find value `rust` in this scope
   --> $DIR/track.rs:LL:CC
    |
-LL |     break rust
+LL |     break rust;
    |           ^^^^ not found in this scope
    |
    = note: -Ztrack-diagnostics: created at compiler/rustc_resolve/src/late/diagnostics.rs:LL:CC
@@ -9,7 +9,7 @@ LL |     break rust
 error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/track.rs:LL:CC
    |
-LL |     break rust
+LL |     break rust;
    |     ^^^^^^^^^^ cannot `break` outside of a loop or labeled block
    |
    = note: -Ztrack-diagnostics: created at compiler/rustc_hir_typeck/src/loops.rs:LL:CC
@@ -17,7 +17,7 @@ LL |     break rust
 error: internal compiler error: It looks like you're trying to break rust; would you like some ICE?
   --> $DIR/track.rs:LL:CC
    |
-LL |     break rust
+LL |     break rust;
    |     ^^^^^^^^^^
    |
    = note: -Ztrack-diagnostics: created at compiler/rustc_hir_typeck/src/lib.rs:LL:CC
diff --git a/tests/ui/traits/clone-unwind-rc-cleanup.rs b/tests/ui/traits/clone-unwind-rc-cleanup.rs
index cd02050ea27..dab48a1b4c6 100644
--- a/tests/ui/traits/clone-unwind-rc-cleanup.rs
+++ b/tests/ui/traits/clone-unwind-rc-cleanup.rs
@@ -2,6 +2,7 @@
 
 //@ run-pass
 //@ needs-unwind
+//@ ignore-backends: gcc
 
 #![allow(unused_variables)]
 #![allow(unused_imports)]
diff --git a/tests/ui/traits/next-solver/cycles/ignore-head-usages-provisional-cache.rs b/tests/ui/traits/next-solver/cycles/ignore-head-usages-provisional-cache.rs
new file mode 100644
index 00000000000..9a33ae53644
--- /dev/null
+++ b/tests/ui/traits/next-solver/cycles/ignore-head-usages-provisional-cache.rs
@@ -0,0 +1,55 @@
+//@ compile-flags: -Znext-solver
+//@ check-pass
+
+// A regression test for trait-system-refactor-initiative#232. We've
+// previously incorrectly rebased provisional cache entries even if
+// the cycle head didn't reach a fixpoint as it did not depend on any
+// cycles itself.
+//
+// Just because the result of a goal does not depend on its own provisional
+// result, it does not mean its nested goals don't depend on its result.
+struct B;
+struct C;
+struct D;
+
+pub trait Trait {
+    type Output;
+}
+macro_rules! k {
+    ($t:ty) => {
+        <$t as Trait>::Output
+    };
+}
+
+trait CallB<T1, T2> {
+    type Output;
+    type Return;
+}
+
+trait CallC<T1> {
+    type Output;
+    type Return;
+}
+
+trait CallD<T1, T2> {
+    type Output;
+}
+
+fn foo<X, Y>()
+where
+    X: Trait,
+    Y: Trait,
+    D: CallD<k![X], k![Y]>,
+    C: CallC<<D as CallD<k![X], k![Y]>>::Output>,
+    <C as CallC<<D as CallD<k![X], k![Y]>>::Output>>::Output: Trait,
+    B: CallB<
+            <C as CallC<<D as CallD<k![X], k![Y]>>::Output>>::Return,
+            <C as CallC<<D as CallD<k![X], k![Y]>>::Output>>::Output,
+        >,
+    <B as CallB<
+        <C as CallC<<D as CallD<k![X], k![Y]>>::Output>>::Return,
+        <C as CallC<<D as CallD<k![X], k![Y]>>::Output>>::Output,
+    >>::Output: Trait<Output = ()>,
+{
+}
+fn main() {}
diff --git a/tests/ui/traits/next-solver/forced-ambiguity-typenum-ice.rs b/tests/ui/traits/next-solver/forced-ambiguity-typenum-ice.rs
new file mode 100644
index 00000000000..679d6b1fb16
--- /dev/null
+++ b/tests/ui/traits/next-solver/forced-ambiguity-typenum-ice.rs
@@ -0,0 +1,60 @@
+//@ compile-flags: -Znext-solver
+//@ check-pass
+
+// Regression test for trait-system-refactor-initiative#105. We previously encountered
+// an ICE in typenum as `forced_ambiguity` failed. While this test no longer causes
+// `forced_ambiguity` to error, we still want to use it as a regression test.
+
+pub struct UInt<U, B> {
+    _msb: U,
+    _lsb: B,
+}
+pub struct B1;
+pub trait Sub<Rhs> {
+    type Output;
+}
+impl<U, B> Sub<B1> for UInt<UInt<U, B>, B1> {
+    type Output = ();
+}
+impl<U> Sub<B1> for UInt<U, ()>
+where
+    U: Sub<B1>,
+    U::Output: Send,
+{
+    type Output = ();
+}
+
+pub trait Op<N, R, I> {
+    fn op(&self) {
+        unimplemented!()
+    }
+}
+trait OpIf<N, R, I> {}
+
+impl<N, Ur, Br, I> Op<N, UInt<Ur, Br>, I> for ()
+where
+    N: Sub<I>,
+    (): OpIf<N, UInt<UInt<Ur, Br>, N::Output>, I>,
+{
+}
+impl<N, R, Ui, Bi> OpIf<N, R, UInt<Ui, Bi>> for ()
+where
+    UInt<Ui, Bi>: Sub<B1>,
+    (): Op<N, R, <UInt<Ui, Bi> as Sub<B1>>::Output>,
+{
+}
+impl<N, R> OpIf<N, R, ()> for () where R: Sub<N> {}
+
+pub trait Compute {
+    type Output;
+}
+
+pub fn repro<Ul, Bl>()
+where
+    UInt<Ul, Bl>: Compute,
+    <UInt<Ul, Bl> as Compute>::Output: Sub<B1>,
+    (): Op<UInt<(), Bl>, (), ()>,
+{
+    ().op();
+}
+fn main() {}
diff --git a/tests/ui/traits/next-solver/opaques/overflow-hr-fn-trait-sized-1.rs b/tests/ui/traits/next-solver/opaques/overflow-hr-fn-trait-sized-1.rs
new file mode 100644
index 00000000000..e35e48dfcec
--- /dev/null
+++ b/tests/ui/traits/next-solver/opaques/overflow-hr-fn-trait-sized-1.rs
@@ -0,0 +1,25 @@
+//@ ignore-compare-mode-next-solver
+//@ compile-flags: -Znext-solver
+//@ check-pass
+
+// Regression test for trait-system-refactor-initiative#220. Builtin `Fn`-trait
+// candidates required `for<'latebound> Output<'latebound>: Sized` which ended
+// up resulting in overflow if the return type is an opaque in the defining scope.
+//
+// We now eagerly instantiate the binder of the function definition which avoids
+// that overflow by relating the lifetime of the opaque to something from the
+// input.
+fn flat_map<T, F, I, G>(_: F, _: G)
+where
+    F: FnOnce(T) -> I,
+    I: Iterator,
+    G: Fn(<I as Iterator>::Item) -> usize,
+{
+}
+
+fn rarw<'a>(_: &'a ()) -> impl Iterator<Item = &'a str> {
+    flat_map(rarw, |x| x.len());
+    std::iter::empty()
+}
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/opaques/overflow-hr-fn-trait-sized-2.rs b/tests/ui/traits/next-solver/opaques/overflow-hr-fn-trait-sized-2.rs
new file mode 100644
index 00000000000..1d64e422d89
--- /dev/null
+++ b/tests/ui/traits/next-solver/opaques/overflow-hr-fn-trait-sized-2.rs
@@ -0,0 +1,14 @@
+//@ ignore-compare-mode-next-solver
+//@ compile-flags: -Znext-solver
+//@ check-pass
+
+// Regression test for trait-system-refactor-initiative#204, see
+// the sibling test for more details.
+
+fn constrain<'a, F: FnOnce(&'a ())>(_: F) {}
+fn foo<'a>(_: &'a ()) -> impl Sized + use<'a> {
+    constrain(foo);
+    ()
+}
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/well-formed-in-relate.stderr b/tests/ui/traits/next-solver/well-formed-in-relate.stderr
index 5294a072d31..d79e465b3e3 100644
--- a/tests/ui/traits/next-solver/well-formed-in-relate.stderr
+++ b/tests/ui/traits/next-solver/well-formed-in-relate.stderr
@@ -12,6 +12,8 @@ LL |     x = unconstrained_map();
              where A: Tuple, F: Fn<A>, F: ?Sized;
            - impl<Args, F, A> Fn<Args> for Box<F, A>
              where Args: Tuple, F: Fn<Args>, A: Allocator, F: ?Sized;
+           - impl<F, Args> Fn<Args> for Exclusive<F>
+             where F: Sync, F: Fn<Args>, Args: Tuple;
 note: required by a bound in `unconstrained_map`
   --> $DIR/well-formed-in-relate.rs:21:25
    |
diff --git a/tests/ui/traits/next-solver/writeback-predicate-bound-region.rs b/tests/ui/traits/next-solver/writeback-predicate-bound-region.rs
new file mode 100644
index 00000000000..a7ed5dbcf08
--- /dev/null
+++ b/tests/ui/traits/next-solver/writeback-predicate-bound-region.rs
@@ -0,0 +1,14 @@
+//@ edition: 2024
+//@ check-pass
+//@ compile-flags: -Znext-solver
+
+// This previously ICE'd during writeback when resolving
+// the stalled coroutine predicate due to its bound lifetime.
+
+trait Trait<'a> {}
+impl<'a, T: Send> Trait<'a> for T {}
+
+fn is_trait<T: for<'a> Trait<'a>>(_: T) {}
+fn main() {
+    is_trait(async {})
+}
diff --git a/tests/ui/traits/trait-upcasting/illegal-upcast-to-impl-opaque.rs b/tests/ui/traits/trait-upcasting/illegal-upcast-to-impl-opaque.rs
index 2760c1696b5..f603ff1ec80 100644
--- a/tests/ui/traits/trait-upcasting/illegal-upcast-to-impl-opaque.rs
+++ b/tests/ui/traits/trait-upcasting/illegal-upcast-to-impl-opaque.rs
@@ -1,12 +1,5 @@
 //@ revisions: current next
 //@[next] compile-flags: -Znext-solver
-//@[next] failure-status: 101
-//@[next] known-bug: unknown
-//@[next] normalize-stderr: "note: .*\n\n" -> ""
-//@[next] normalize-stderr: "thread 'rustc' panicked.*\n.*\n" -> ""
-//@[next] normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
-//@[next] normalize-stderr: "delayed at .*" -> ""
-//@[next] rustc-env:RUST_BACKTRACE=0
 //@ check-pass
 
 trait Super {
diff --git a/tests/ui/type-alias-impl-trait/closures_in_branches.stderr b/tests/ui/type-alias-impl-trait/closures_in_branches.stderr
index 849ffd214f0..559bc57d906 100644
--- a/tests/ui/type-alias-impl-trait/closures_in_branches.stderr
+++ b/tests/ui/type-alias-impl-trait/closures_in_branches.stderr
@@ -2,7 +2,7 @@ error[E0282]: type annotations needed
   --> $DIR/closures_in_branches.rs:8:10
    |
 LL |         |x| x.len()
-   |          ^  - type must be known at this point
+   |          ^    --- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
@@ -13,7 +13,7 @@ error[E0282]: type annotations needed
   --> $DIR/closures_in_branches.rs:22:10
    |
 LL |         |x| x.len()
-   |          ^  - type must be known at this point
+   |          ^    --- type must be known at this point
    |
 help: consider giving this closure parameter an explicit type
    |
diff --git a/tests/ui/type-alias-impl-trait/issue-77179.stderr b/tests/ui/type-alias-impl-trait/issue-77179.stderr
index c0f197ec48c..222edfb90a7 100644
--- a/tests/ui/type-alias-impl-trait/issue-77179.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-77179.stderr
@@ -11,10 +11,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/issue-77179.rs:8:22
    |
 LL | fn test() -> Pointer<_> {
-   |              --------^-
-   |              |       |
-   |              |       not allowed in type signatures
-   |              help: replace with the correct return type: `Pointer<i32>`
+   |                      ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - fn test() -> Pointer<_> {
+LL + fn test() -> Pointer<i32> {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/issue-77179.rs:19:25
diff --git a/tests/ui/type-alias-impl-trait/method_resolution_trait_method_from_opaque.next.stderr b/tests/ui/type-alias-impl-trait/method_resolution_trait_method_from_opaque.next.stderr
index bbdd3923821..37bde4b18a4 100644
--- a/tests/ui/type-alias-impl-trait/method_resolution_trait_method_from_opaque.next.stderr
+++ b/tests/ui/type-alias-impl-trait/method_resolution_trait_method_from_opaque.next.stderr
@@ -1,8 +1,14 @@
 error[E0282]: type annotations needed
-  --> $DIR/method_resolution_trait_method_from_opaque.rs:28:9
+  --> $DIR/method_resolution_trait_method_from_opaque.rs:28:18
    |
 LL |         self.bar.next().unwrap();
-   |         ^^^^^^^^ cannot infer type
+   |                  ^^^^
+   |
+help: try using a fully qualified path to specify the expected types
+   |
+LL -         self.bar.next().unwrap();
+LL +         <_ as Iterator>::next(&mut self.bar).unwrap();
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/type-inference/box_has_sigdrop.rs b/tests/ui/type-inference/box_has_sigdrop.rs
new file mode 100644
index 00000000000..3e801197a78
--- /dev/null
+++ b/tests/ui/type-inference/box_has_sigdrop.rs
@@ -0,0 +1,9 @@
+//@ should-fail
+//@ compile-flags: -Wrust-2021-incompatible-closure-captures
+// Inference, canonicalization, and significant drops should work nicely together.
+// Related issue: #86868
+
+fn main() {
+    let mut state = 0;
+    Box::new(move || state)
+}
diff --git a/tests/ui/type-inference/box_has_sigdrop.stderr b/tests/ui/type-inference/box_has_sigdrop.stderr
new file mode 100644
index 00000000000..b61b6322c10
--- /dev/null
+++ b/tests/ui/type-inference/box_has_sigdrop.stderr
@@ -0,0 +1,17 @@
+error[E0308]: mismatched types
+  --> $DIR/box_has_sigdrop.rs:8:5
+   |
+LL | fn main() {
+   |          - expected `()` because of default return type
+LL |     let mut state = 0;
+LL |     Box::new(move || state)
+   |     ^^^^^^^^^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;`
+   |     |
+   |     expected `()`, found `Box<{closure@box_has_sigdrop.rs:8:14}>`
+   |
+   = note: expected unit type `()`
+                 found struct `Box<{closure@$DIR/box_has_sigdrop.rs:8:14: 8:21}>`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type-inference/has_sigdrop.rs b/tests/ui/type-inference/dropper_has_sigdrop.rs
index c3d835cfe16..c3d835cfe16 100644
--- a/tests/ui/type-inference/has_sigdrop.rs
+++ b/tests/ui/type-inference/dropper_has_sigdrop.rs
diff --git a/tests/ui/type-inference/regression-issue-81317.stderr b/tests/ui/type-inference/regression-issue-81317.stderr
index fcd3fca06e1..a070b50e311 100644
--- a/tests/ui/type-inference/regression-issue-81317.stderr
+++ b/tests/ui/type-inference/regression-issue-81317.stderr
@@ -5,7 +5,7 @@ LL |     let iv = S ^ index.into();
    |         ^^
 LL |
 LL |     &iv.to_bytes_be();
-   |      -- type must be known at this point
+   |         ----------- type must be known at this point
    |
 help: consider giving `iv` an explicit type
    |
diff --git a/tests/ui/type/pattern_types/const_generics.rs b/tests/ui/type/pattern_types/const_generics.rs
index 79d46c010d7..f5eb90e94d4 100644
--- a/tests/ui/type/pattern_types/const_generics.rs
+++ b/tests/ui/type/pattern_types/const_generics.rs
@@ -1,4 +1,7 @@
 //@ check-pass
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
 
 #![feature(pattern_types, generic_pattern_types, pattern_type_macro)]
 #![expect(incomplete_features)]
diff --git a/tests/ui/type/pattern_types/transmute.stderr b/tests/ui/type/pattern_types/transmute.current.stderr
index 578549b515c..edec542e5e1 100644
--- a/tests/ui/type/pattern_types/transmute.stderr
+++ b/tests/ui/type/pattern_types/transmute.current.stderr
@@ -1,5 +1,5 @@
 error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
-  --> $DIR/transmute.rs:20:14
+  --> $DIR/transmute.rs:23:14
    |
 LL |     unsafe { std::mem::transmute(x) }
    |              ^^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL |     unsafe { std::mem::transmute(x) }
    = note: target type: `u32` (32 bits)
 
 error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
-  --> $DIR/transmute.rs:28:14
+  --> $DIR/transmute.rs:31:14
    |
 LL |     unsafe { std::mem::transmute(x) }
    |              ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/type/pattern_types/transmute.next.stderr b/tests/ui/type/pattern_types/transmute.next.stderr
new file mode 100644
index 00000000000..edec542e5e1
--- /dev/null
+++ b/tests/ui/type/pattern_types/transmute.next.stderr
@@ -0,0 +1,21 @@
+error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
+  --> $DIR/transmute.rs:23:14
+   |
+LL |     unsafe { std::mem::transmute(x) }
+   |              ^^^^^^^^^^^^^^^^^^^
+   |
+   = note: source type: `Option<(u32) is S..=E>` (size can vary because of u32)
+   = note: target type: `u32` (32 bits)
+
+error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
+  --> $DIR/transmute.rs:31:14
+   |
+LL |     unsafe { std::mem::transmute(x) }
+   |              ^^^^^^^^^^^^^^^^^^^
+   |
+   = note: source type: `Option<(u32) is S..=E>` (size can vary because of u32)
+   = note: target type: `Option<u32>` (64 bits)
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/ui/type/pattern_types/transmute.rs b/tests/ui/type/pattern_types/transmute.rs
index 43dd62a19e7..4e686245f93 100644
--- a/tests/ui/type/pattern_types/transmute.rs
+++ b/tests/ui/type/pattern_types/transmute.rs
@@ -1,3 +1,6 @@
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
 #![feature(pattern_types, pattern_type_macro, generic_pattern_types)]
 #![expect(incomplete_features)]
 
diff --git a/tests/ui/typeck/coercion-check-for-indexing-expression-issue-40861.stderr b/tests/ui/typeck/coercion-check-for-indexing-expression-issue-40861.stderr
index 13bc0cd94f3..ef5f1786801 100644
--- a/tests/ui/typeck/coercion-check-for-indexing-expression-issue-40861.stderr
+++ b/tests/ui/typeck/coercion-check-for-indexing-expression-issue-40861.stderr
@@ -4,7 +4,7 @@ error[E0608]: cannot index into a value of type `()`
 LL |     ()[f(&[1.0])];
    |       ^^^^^^^^^^^
    |
-   = help: to access tuple elements, use tuple indexing syntax (e.g., `tuple.0`)
+   = help: tuples are indexed with a dot and a literal index: `tuple.0`, `tuple.1`, etc.
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs b/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs
index c08030fc5c1..81c2d778b05 100644
--- a/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs
+++ b/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.rs
@@ -1,4 +1,5 @@
 //@ proc-macro: derive-demo-issue-136343.rs
+//@ ignore-backends: gcc
 
 #[macro_use]
 extern crate derive_demo_issue_136343;
diff --git a/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr b/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr
index 0b9c1d9123a..d69eaae5335 100644
--- a/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr
+++ b/tests/ui/typeck/invalid-sugg-for-derive-macro-issue-136343.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/invalid-sugg-for-derive-macro-issue-136343.rs:6:10
+  --> $DIR/invalid-sugg-for-derive-macro-issue-136343.rs:7:10
    |
 LL | #[derive(Sample)]
    |          ^^^^^^
diff --git a/tests/ui/typeck/issue-13853.rs b/tests/ui/typeck/issue-13853.rs
index ac9886d2e72..ed44d506261 100644
--- a/tests/ui/typeck/issue-13853.rs
+++ b/tests/ui/typeck/issue-13853.rs
@@ -25,7 +25,7 @@ impl Node for Stuff {
 
 fn iterate<N: Node, G: Graph<N>>(graph: &G) {
     for node in graph.iter() { //~ ERROR no method named `iter` found
-        node.zomg();
+        node.zomg(); //~ ERROR type annotations needed
     }
 }
 
diff --git a/tests/ui/typeck/issue-13853.stderr b/tests/ui/typeck/issue-13853.stderr
index 45363c87d29..9b8698d6ed2 100644
--- a/tests/ui/typeck/issue-13853.stderr
+++ b/tests/ui/typeck/issue-13853.stderr
@@ -17,6 +17,12 @@ error[E0599]: no method named `iter` found for reference `&G` in the current sco
 LL |     for node in graph.iter() {
    |                       ^^^^ method not found in `&G`
 
+error[E0282]: type annotations needed
+  --> $DIR/issue-13853.rs:28:14
+   |
+LL |         node.zomg();
+   |              ^^^^ cannot infer type
+
 error[E0308]: mismatched types
   --> $DIR/issue-13853.rs:37:13
    |
@@ -37,7 +43,7 @@ help: consider borrowing here
 LL |     iterate(&graph);
    |             +
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0308, E0599.
-For more information about an error, try `rustc --explain E0308`.
+Some errors have detailed explanations: E0282, E0308, E0599.
+For more information about an error, try `rustc --explain E0282`.
diff --git a/tests/ui/typeck/issue-80779.stderr b/tests/ui/typeck/issue-80779.stderr
index 2261ba61654..90c80fa2ea6 100644
--- a/tests/ui/typeck/issue-80779.stderr
+++ b/tests/ui/typeck/issue-80779.stderr
@@ -2,19 +2,25 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/issue-80779.rs:10:28
    |
 LL | pub fn g(_: T<'static>) -> _ {}
-   |                            ^
-   |                            |
-   |                            not allowed in type signatures
-   |                            help: replace with the correct return type: `()`
+   |                            ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - pub fn g(_: T<'static>) -> _ {}
+LL + pub fn g(_: T<'static>) -> () {}
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/issue-80779.rs:5:29
    |
 LL | pub fn f<'a>(val: T<'a>) -> _ {
-   |                             ^
-   |                             |
-   |                             not allowed in type signatures
-   |                             help: replace with the correct return type: `()`
+   |                             ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - pub fn f<'a>(val: T<'a>) -> _ {
+LL + pub fn f<'a>(val: T<'a>) -> () {
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/typeck/issue-98260.stderr b/tests/ui/typeck/issue-98260.stderr
index b7debd335b0..f380db55cdf 100644
--- a/tests/ui/typeck/issue-98260.stderr
+++ b/tests/ui/typeck/issue-98260.stderr
@@ -2,10 +2,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/issue-98260.rs:3:27
    |
 LL |     fn a(aa: B) -> Result<_, B> {
-   |                    -------^----
-   |                    |      |
-   |                    |      not allowed in type signatures
-   |                    help: replace with the correct return type: `Result<(), B>`
+   |                           ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -     fn a(aa: B) -> Result<_, B> {
+LL +     fn a(aa: B) -> Result<(), B> {
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/typeck/typeck_type_placeholder_item.stderr b/tests/ui/typeck/typeck_type_placeholder_item.stderr
index 87750ee6dc1..240dc1ae8ab 100644
--- a/tests/ui/typeck/typeck_type_placeholder_item.stderr
+++ b/tests/ui/typeck/typeck_type_placeholder_item.stderr
@@ -48,20 +48,27 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/typeck_type_placeholder_item.rs:7:14
    |
 LL | fn test() -> _ { 5 }
-   |              ^
-   |              |
-   |              not allowed in type signatures
-   |              help: replace with the correct return type: `i32`
+   |              ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - fn test() -> _ { 5 }
+LL + fn test() -> i32 { 5 }
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/typeck_type_placeholder_item.rs:10:16
    |
 LL | fn test2() -> (_, _) { (5, 5) }
-   |               -^--^-
-   |               ||  |
-   |               ||  not allowed in type signatures
-   |               |not allowed in type signatures
-   |               help: replace with the correct return type: `(i32, i32)`
+   |                ^  ^ not allowed in type signatures
+   |                |
+   |                not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - fn test2() -> (_, _) { (5, 5) }
+LL + fn test2() -> (i32, i32) { (5, 5) }
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
   --> $DIR/typeck_type_placeholder_item.rs:13:15
@@ -189,19 +196,25 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/typeck_type_placeholder_item.rs:47:26
    |
 LL | fn test11(x: &usize) -> &_ {
-   |                         -^
-   |                         ||
-   |                         |not allowed in type signatures
-   |                         help: replace with the correct return type: `&&usize`
+   |                          ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - fn test11(x: &usize) -> &_ {
+LL + fn test11(x: &usize) -> &&usize {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/typeck_type_placeholder_item.rs:52:52
    |
 LL | unsafe fn test12(x: *const usize) -> *const *const _ {
-   |                                      --------------^
-   |                                      |             |
-   |                                      |             not allowed in type signatures
-   |                                      help: replace with the correct return type: `*const *const usize`
+   |                                                    ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - unsafe fn test12(x: *const usize) -> *const *const _ {
+LL + unsafe fn test12(x: *const usize) -> *const *const usize {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
   --> $DIR/typeck_type_placeholder_item.rs:58:24
@@ -261,20 +274,27 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/typeck_type_placeholder_item.rs:80:21
    |
 LL |     fn fn_test() -> _ { 5 }
-   |                     ^
-   |                     |
-   |                     not allowed in type signatures
-   |                     help: replace with the correct return type: `i32`
+   |                     ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -     fn fn_test() -> _ { 5 }
+LL +     fn fn_test() -> i32 { 5 }
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/typeck_type_placeholder_item.rs:83:23
    |
 LL |     fn fn_test2() -> (_, _) { (5, 5) }
-   |                      -^--^-
-   |                      ||  |
-   |                      ||  not allowed in type signatures
-   |                      |not allowed in type signatures
-   |                      help: replace with the correct return type: `(i32, i32)`
+   |                       ^  ^ not allowed in type signatures
+   |                       |
+   |                       not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -     fn fn_test2() -> (_, _) { (5, 5) }
+LL +     fn fn_test2() -> (i32, i32) { (5, 5) }
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
   --> $DIR/typeck_type_placeholder_item.rs:86:22
@@ -374,20 +394,27 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/typeck_type_placeholder_item.rs:134:30
    |
 LL |     fn fn_test12(x: i32) -> (_, _) { (x, x) }
-   |                             -^--^-
-   |                             ||  |
-   |                             ||  not allowed in type signatures
-   |                             |not allowed in type signatures
-   |                             help: replace with the correct return type: `(i32, i32)`
+   |                              ^  ^ not allowed in type signatures
+   |                              |
+   |                              not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -     fn fn_test12(x: i32) -> (_, _) { (x, x) }
+LL +     fn fn_test12(x: i32) -> (i32, i32) { (x, x) }
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/typeck_type_placeholder_item.rs:137:33
    |
 LL |     fn fn_test13(x: _) -> (i32, _) { (x, x) }
-   |                           ------^-
-   |                           |     |
-   |                           |     not allowed in type signatures
-   |                           help: replace with the correct return type: `(i32, i32)`
+   |                                 ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -     fn fn_test13(x: _) -> (i32, _) { (x, x) }
+LL +     fn fn_test13(x: _) -> (i32, i32) { (x, x) }
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
   --> $DIR/typeck_type_placeholder_item.rs:142:31
@@ -528,10 +555,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/typeck_type_placeholder_item.rs:226:31
    |
 LL | fn value() -> Option<&'static _> {
-   |               ----------------^-
-   |               |               |
-   |               |               not allowed in type signatures
-   |               help: replace with the correct return type: `Option<&'static u8>`
+   |                               ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - fn value() -> Option<&'static _> {
+LL + fn value() -> Option<&'static u8> {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
   --> $DIR/typeck_type_placeholder_item.rs:231:17
@@ -549,10 +579,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/typeck_type_placeholder_item.rs:235:31
    |
 LL | fn evens_squared(n: usize) -> _ {
-   |                               ^
-   |                               |
-   |                               not allowed in type signatures
-   |                               help: replace with an appropriate return type: `impl Iterator<Item = usize>`
+   |                               ^ not allowed in type signatures
+   |
+help: replace with an appropriate return type
+   |
+LL - fn evens_squared(n: usize) -> _ {
+LL + fn evens_squared(n: usize) -> impl Iterator<Item = usize> {
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
   --> $DIR/typeck_type_placeholder_item.rs:240:10
@@ -570,10 +603,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/typeck_type_placeholder_item.rs:40:24
    |
 LL |     fn test9(&self) -> _ { () }
-   |                        ^
-   |                        |
-   |                        not allowed in type signatures
-   |                        help: replace with the correct return type: `()`
+   |                        ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -     fn test9(&self) -> _ { () }
+LL +     fn test9(&self) -> () { () }
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
   --> $DIR/typeck_type_placeholder_item.rs:43:27
@@ -585,10 +621,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/typeck_type_placeholder_item.rs:107:31
    |
 LL |         fn fn_test9(&self) -> _ { () }
-   |                               ^
-   |                               |
-   |                               not allowed in type signatures
-   |                               help: replace with the correct return type: `()`
+   |                               ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL -         fn fn_test9(&self) -> _ { () }
+LL +         fn fn_test9(&self) -> () { () }
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
   --> $DIR/typeck_type_placeholder_item.rs:110:34
diff --git a/tests/ui/typeck/typeck_type_placeholder_item_help.stderr b/tests/ui/typeck/typeck_type_placeholder_item_help.stderr
index 2fce00e7a8e..3f21ff6d4ec 100644
--- a/tests/ui/typeck/typeck_type_placeholder_item_help.stderr
+++ b/tests/ui/typeck/typeck_type_placeholder_item_help.stderr
@@ -2,10 +2,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/typeck_type_placeholder_item_help.rs:4:15
    |
 LL | fn test1() -> _ { Some(42) }
-   |               ^
-   |               |
-   |               not allowed in type signatures
-   |               help: replace with the correct return type: `Option<i32>`
+   |               ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - fn test1() -> _ { Some(42) }
+LL + fn test1() -> Option<i32> { Some(42) }
+   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
   --> $DIR/typeck_type_placeholder_item_help.rs:7:14
diff --git a/tests/ui/union/union-unsafe.rs b/tests/ui/union/union-unsafe.rs
index bd3946686be..beb074f4e8e 100644
--- a/tests/ui/union/union-unsafe.rs
+++ b/tests/ui/union/union-unsafe.rs
@@ -1,5 +1,6 @@
 use std::cell::RefCell;
 use std::mem::ManuallyDrop;
+use std::ops::Deref;
 
 union U1 {
     a: u8,
@@ -17,6 +18,10 @@ union U4<T: Copy> {
     a: T,
 }
 
+union U5 {
+    a: usize,
+}
+
 union URef {
     p: &'static mut i32,
 }
@@ -31,6 +36,20 @@ fn deref_union_field(mut u: URef) {
     *(u.p) = 13; //~ ERROR access to union field is unsafe
 }
 
+union A {
+    a: usize,
+    b: &'static &'static B,
+}
+
+union B {
+    c: usize,
+}
+
+fn raw_deref_union_field(mut u: URef) {
+    // This is unsafe because we first dereference u.p (reading uninitialized memory)
+    let _p = &raw const *(u.p); //~ ERROR access to union field is unsafe
+}
+
 fn assign_noncopy_union_field(mut u: URefCell) {
     u.a = (ManuallyDrop::new(RefCell::new(0)), 1); // OK (assignment does not drop)
     u.a.0 = ManuallyDrop::new(RefCell::new(0)); // OK (assignment does not drop)
@@ -57,6 +76,20 @@ fn main() {
     let a = u1.a; //~ ERROR access to union field is unsafe
     u1.a = 11; // OK
 
+    let mut u2 = U1 { a: 10 };
+    let a = &raw mut u2.a; // OK
+    unsafe { *a = 3 };
+
+    let mut u3 = U1 { a: 10 };
+    let a = std::ptr::addr_of_mut!(u3.a); // OK
+    unsafe { *a = 14 };
+
+    let u4 = U5 { a: 2 };
+    let vec = vec![1, 2, 3];
+    // This is unsafe because we read u4.a (potentially uninitialized memory)
+    // to use as an array index
+    let _a = &raw const vec[u4.a]; //~ ERROR access to union field is unsafe
+
     let U1 { a } = u1; //~ ERROR access to union field is unsafe
     if let U1 { a: 12 } = u1 {} //~ ERROR access to union field is unsafe
     if let Some(U1 { a: 13 }) = Some(u1) {} //~ ERROR access to union field is unsafe
@@ -73,4 +106,44 @@ fn main() {
     let mut u3 = U3 { a: ManuallyDrop::new(String::from("old")) }; // OK
     u3.a = ManuallyDrop::new(String::from("new")); // OK (assignment does not drop)
     *u3.a = String::from("new"); //~ ERROR access to union field is unsafe
+
+    let mut unions = [U1 { a: 1 }, U1 { a: 2 }];
+
+    // Array indexing + union field raw borrow - should be OK
+    let ptr = &raw mut unions[0].a; // OK
+    let ptr2 = &raw const unions[1].a; // OK
+
+    let a = A { a: 0 };
+    let _p = &raw const (**a.b).c; //~ ERROR access to union field is unsafe
+
+    arbitrary_deref();
+}
+
+// regression test for https://github.com/rust-lang/rust/pull/141469#discussion_r2312546218
+fn arbitrary_deref() {
+    use std::ops::Deref;
+
+    union A {
+        a: usize,
+        b: B,
+    }
+
+    #[derive(Copy, Clone)]
+    struct B(&'static str);
+
+    impl Deref for B {
+        type Target = C;
+
+        fn deref(&self) -> &C {
+            println!("{:?}", self.0);
+            &C { c: 0 }
+        }
+    }
+
+    union C {
+        c: usize,
+    }
+
+    let a = A { a: 0 };
+    let _p = &raw const (*a.b).c; //~ ERROR access to union field is unsafe
 }
diff --git a/tests/ui/union/union-unsafe.stderr b/tests/ui/union/union-unsafe.stderr
index 82b3f897167..01f4d95eb64 100644
--- a/tests/ui/union/union-unsafe.stderr
+++ b/tests/ui/union/union-unsafe.stderr
@@ -1,5 +1,5 @@
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:31:6
+  --> $DIR/union-unsafe.rs:36:6
    |
 LL |     *(u.p) = 13;
    |      ^^^^^ access to union field
@@ -7,7 +7,15 @@ LL |     *(u.p) = 13;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:43:6
+  --> $DIR/union-unsafe.rs:50:26
+   |
+LL |     let _p = &raw const *(u.p);
+   |                          ^^^^^ access to union field
+   |
+   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
+
+error[E0133]: access to union field is unsafe and requires unsafe function or block
+  --> $DIR/union-unsafe.rs:62:6
    |
 LL |     *u3.a = T::default();
    |      ^^^^ access to union field
@@ -15,7 +23,7 @@ LL |     *u3.a = T::default();
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:49:6
+  --> $DIR/union-unsafe.rs:68:6
    |
 LL |     *u3.a = T::default();
    |      ^^^^ access to union field
@@ -23,7 +31,7 @@ LL |     *u3.a = T::default();
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:57:13
+  --> $DIR/union-unsafe.rs:76:13
    |
 LL |     let a = u1.a;
    |             ^^^^ access to union field
@@ -31,7 +39,15 @@ LL |     let a = u1.a;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:60:14
+  --> $DIR/union-unsafe.rs:91:29
+   |
+LL |     let _a = &raw const vec[u4.a];
+   |                             ^^^^ access to union field
+   |
+   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
+
+error[E0133]: access to union field is unsafe and requires unsafe function or block
+  --> $DIR/union-unsafe.rs:93:14
    |
 LL |     let U1 { a } = u1;
    |              ^ access to union field
@@ -39,7 +55,7 @@ LL |     let U1 { a } = u1;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:61:20
+  --> $DIR/union-unsafe.rs:94:20
    |
 LL |     if let U1 { a: 12 } = u1 {}
    |                    ^^ access to union field
@@ -47,7 +63,7 @@ LL |     if let U1 { a: 12 } = u1 {}
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:62:25
+  --> $DIR/union-unsafe.rs:95:25
    |
 LL |     if let Some(U1 { a: 13 }) = Some(u1) {}
    |                         ^^ access to union field
@@ -55,7 +71,7 @@ LL |     if let Some(U1 { a: 13 }) = Some(u1) {}
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:67:6
+  --> $DIR/union-unsafe.rs:100:6
    |
 LL |     *u2.a = String::from("new");
    |      ^^^^ access to union field
@@ -63,7 +79,7 @@ LL |     *u2.a = String::from("new");
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:71:6
+  --> $DIR/union-unsafe.rs:104:6
    |
 LL |     *u3.a = 1;
    |      ^^^^ access to union field
@@ -71,13 +87,29 @@ LL |     *u3.a = 1;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:75:6
+  --> $DIR/union-unsafe.rs:108:6
    |
 LL |     *u3.a = String::from("new");
    |      ^^^^ access to union field
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
-error: aborting due to 10 previous errors
+error[E0133]: access to union field is unsafe and requires unsafe function or block
+  --> $DIR/union-unsafe.rs:117:28
+   |
+LL |     let _p = &raw const (**a.b).c;
+   |                            ^^^ access to union field
+   |
+   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
+
+error[E0133]: access to union field is unsafe and requires unsafe function or block
+  --> $DIR/union-unsafe.rs:148:27
+   |
+LL |     let _p = &raw const (*a.b).c;
+   |                           ^^^ access to union field
+   |
+   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
+
+error: aborting due to 14 previous errors
 
 For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unpretty/exhaustive.hir.stdout b/tests/ui/unpretty/exhaustive.hir.stdout
index 96d85d1e7c1..27cba656030 100644
--- a/tests/ui/unpretty/exhaustive.hir.stdout
+++ b/tests/ui/unpretty/exhaustive.hir.stdout
@@ -398,7 +398,8 @@ mod expressions {
         let expr;
         format_arguments::new_const(&[]);
         {
-            super let args = [format_argument::new_display(&expr)];
+            super let args = (&expr,);
+            super let args = [format_argument::new_display(args.0)];
             format_arguments::new_v1(&[""], &args)
         };
     }
diff --git a/tests/ui/unpretty/flattened-format-args.stdout b/tests/ui/unpretty/flattened-format-args.stdout
index 0792dc10e94..233c9f1c91b 100644
--- a/tests/ui/unpretty/flattened-format-args.stdout
+++ b/tests/ui/unpretty/flattened-format-args.stdout
@@ -11,7 +11,8 @@ fn main() {
     // Should flatten to println!("a 123 b {x} xyz\n"):
     {
         ::std::io::_print({
-                super let args = [format_argument::new_display(&x)];
+                super let args = (&x,);
+                super let args = [format_argument::new_display(args.0)];
                 format_arguments::new_v1(&["a 123 b ", " xyz\n"], &args)
             });
     };
diff --git a/tests/ui/unstable-feature-bound/unstable_impl_coherence.disabled.stderr b/tests/ui/unstable-feature-bound/unstable_impl_coherence.disabled.stderr
index c3147558b03..afef024e1b9 100644
--- a/tests/ui/unstable-feature-bound/unstable_impl_coherence.disabled.stderr
+++ b/tests/ui/unstable-feature-bound/unstable_impl_coherence.disabled.stderr
@@ -6,7 +6,7 @@ LL | impl aux::Trait for LocalTy {}
    |
    = note: conflicting implementation in crate `unstable_impl_coherence_aux`:
            - impl<T> Trait for T
-             where unstable feature: `foo`;
+             where feature(foo) is enabled;
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/unstable-feature-bound/unstable_impl_coherence.enabled.stderr b/tests/ui/unstable-feature-bound/unstable_impl_coherence.enabled.stderr
index c3147558b03..afef024e1b9 100644
--- a/tests/ui/unstable-feature-bound/unstable_impl_coherence.enabled.stderr
+++ b/tests/ui/unstable-feature-bound/unstable_impl_coherence.enabled.stderr
@@ -6,7 +6,7 @@ LL | impl aux::Trait for LocalTy {}
    |
    = note: conflicting implementation in crate `unstable_impl_coherence_aux`:
            - impl<T> Trait for T
-             where unstable feature: `foo`;
+             where feature(foo) is enabled;
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/unstable-feature-bound/unstable_impl_method_selection.stderr b/tests/ui/unstable-feature-bound/unstable_impl_method_selection.stderr
index c2bb10f043b..840af730154 100644
--- a/tests/ui/unstable-feature-bound/unstable_impl_method_selection.stderr
+++ b/tests/ui/unstable-feature-bound/unstable_impl_method_selection.stderr
@@ -7,7 +7,7 @@ LL |     vec![].foo();
    = note: multiple `impl`s satisfying `Vec<_>: Trait` found in the `unstable_impl_method_selection_aux` crate:
            - impl Trait for Vec<u32>;
            - impl Trait for Vec<u64>
-             where unstable feature: `bar`;
+             where feature(bar) is enabled;
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/variance/leaking-unnameables.stderr b/tests/ui/variance/leaking-unnameables.stderr
index 92afe952801..59bdc33040d 100644
--- a/tests/ui/variance/leaking-unnameables.stderr
+++ b/tests/ui/variance/leaking-unnameables.stderr
@@ -2,10 +2,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/leaking-unnameables.rs:8:18
    |
 LL | pub fn f<T>() -> _ {
-   |                  ^
-   |                  |
-   |                  not allowed in type signatures
-   |                  help: replace with the correct return type: `fn()`
+   |                  ^ not allowed in type signatures
+   |
+help: replace with the correct return type
+   |
+LL - pub fn f<T>() -> _ {
+LL + pub fn f<T>() -> fn() {
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/wf/wf-in-where-clause-static.current.stderr b/tests/ui/wf/wf-in-where-clause-static.current.stderr
index d0bb89884c6..788fe2c3faa 100644
--- a/tests/ui/wf/wf-in-where-clause-static.current.stderr
+++ b/tests/ui/wf/wf-in-where-clause-static.current.stderr
@@ -6,6 +6,12 @@ LL |     let s = foo(&String::from("blah blah blah"));
    |             |    |
    |             |    creates a temporary value which is freed while still in use
    |             argument requires that borrow lasts for `'static`
+   |
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/wf-in-where-clause-static.rs:12:17
+   |
+LL |     &'static S: Static,
+   |                 ^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/wf/wf-in-where-clause-static.next.stderr b/tests/ui/wf/wf-in-where-clause-static.next.stderr
index d0bb89884c6..788fe2c3faa 100644
--- a/tests/ui/wf/wf-in-where-clause-static.next.stderr
+++ b/tests/ui/wf/wf-in-where-clause-static.next.stderr
@@ -6,6 +6,12 @@ LL |     let s = foo(&String::from("blah blah blah"));
    |             |    |
    |             |    creates a temporary value which is freed while still in use
    |             argument requires that borrow lasts for `'static`
+   |
+note: requirement that the value outlives `'static` introduced here
+  --> $DIR/wf-in-where-clause-static.rs:12:17
+   |
+LL |     &'static S: Static,
+   |                 ^^^^^^
 
 error: aborting due to 1 previous error