about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-10-17 11:18:57 +0000
committerbors <bors@rust-lang.org>2024-10-17 11:18:57 +0000
commite09bf4c07af8a424f9022bfe8d42ec714a51f0be (patch)
tree0aa83217a4da4a550ed80601e35381bb06db1c33 /tests/ui
parentecf6fc5336a7fe24607b8c394f34a4fcd20079c8 (diff)
parent6e4f8fea36cd04f623c46d99adc3c370b1879883 (diff)
downloadrust-e09bf4c07af8a424f9022bfe8d42ec714a51f0be.tar.gz
rust-e09bf4c07af8a424f9022bfe8d42ec714a51f0be.zip
Auto merge of #18317 - lnicola:sync-from-rust, r=Veykril
minor: sync from downstream
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/abi/compatibility.rs6
-rw-r--r--tests/ui/abi/unsupported.aarch64.stderr174
-rw-r--r--tests/ui/abi/unsupported.arm.stderr157
-rw-r--r--tests/ui/abi/unsupported.i686.stderr118
-rw-r--r--tests/ui/abi/unsupported.riscv32.stderr157
-rw-r--r--tests/ui/abi/unsupported.riscv64.stderr157
-rw-r--r--tests/ui/abi/unsupported.rs145
-rw-r--r--tests/ui/abi/unsupported.x64.stderr157
-rw-r--r--tests/ui/allocator/dyn-compatible.rs13
-rw-r--r--tests/ui/allocator/object-safe.rs13
-rw-r--r--tests/ui/asm/aarch64/aarch64-sve.rs28
-rw-r--r--tests/ui/asm/aarch64/arm64ec-sve.rs31
-rw-r--r--tests/ui/asm/aarch64/arm64ec-sve.stderr14
-rw-r--r--tests/ui/associated-type-bounds/entails-sized-dyn-compatibility.rs (renamed from tests/ui/associated-type-bounds/entails-sized-object-safety.rs)12
-rw-r--r--tests/ui/associated-type-bounds/suggest-assoc-ty-bound-on-eq-bound.rs20
-rw-r--r--tests/ui/associated-type-bounds/suggest-assoc-ty-bound-on-eq-bound.stderr58
-rw-r--r--tests/ui/associated-types/associated-types-coherence-failure.stderr8
-rw-r--r--tests/ui/associated-types/remove-invalid-type-bound-suggest-issue-127555.rs1
-rw-r--r--tests/ui/associated-types/remove-invalid-type-bound-suggest-issue-127555.stderr16
-rw-r--r--tests/ui/async-await/in-trait/dyn-compatibility.rs (renamed from tests/ui/async-await/in-trait/object-safety.rs)0
-rw-r--r--tests/ui/async-await/in-trait/dyn-compatibility.stderr (renamed from tests/ui/async-await/in-trait/object-safety.stderr)4
-rw-r--r--tests/ui/async-await/pin-sugar-ambiguity.rs15
-rw-r--r--tests/ui/async-await/pin-sugar-no-const.rs8
-rw-r--r--tests/ui/async-await/pin-sugar-no-const.stderr15
-rw-r--r--tests/ui/async-await/pin-sugar.rs51
-rw-r--r--tests/ui/auto-traits/opaque_type_candidate_selection.rs30
-rw-r--r--tests/ui/autodiff/autodiff_illegal.rs160
-rw-r--r--tests/ui/autodiff/autodiff_illegal.stderr152
-rw-r--r--tests/ui/autodiff/auxiliary/my_macro.rs12
-rw-r--r--tests/ui/autodiff/visibility.rs17
-rw-r--r--tests/ui/autodiff/visibility.std_autodiff.stderr24
-rw-r--r--tests/ui/backtrace/dylib-dep.rs1
-rw-r--r--tests/ui/backtrace/line-tables-only.rs1
-rw-r--r--tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs2
-rw-r--r--tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr12
-rw-r--r--tests/ui/c-variadic/variadic-ffi-2-arm.rs9
-rw-r--r--tests/ui/c-variadic/variadic-ffi-2.rs14
-rw-r--r--tests/ui/c-variadic/variadic-ffi-2.stderr2
-rw-r--r--tests/ui/cfg/cfg-target-compact-errors.rs4
-rw-r--r--tests/ui/cfg/cfg-target-compact-errors.stderr8
-rw-r--r--tests/ui/check-cfg/mix.stderr2
-rw-r--r--tests/ui/check-cfg/well-known-values.stderr2
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.rs3
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr2
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.rs77
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.stderr78
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs16
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs21
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.stderr4
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.rs26
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.stderr43
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.rs84
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.stderr84
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.stderr9
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs89
-rw-r--r--tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.rs (renamed from tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs)6
-rw-r--r--tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr27
-rw-r--r--tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr27
-rw-r--r--tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr2
-rw-r--r--tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-downstream-inherent.old.stderr23
-rw-r--r--tests/ui/coherence/coherence-overlap-downstream-inherent.rs3
-rw-r--r--tests/ui/coherence/coherence-overlap-downstream-inherent.stderr (renamed from tests/ui/coherence/coherence-overlap-downstream-inherent.next.stderr)4
-rw-r--r--tests/ui/coherence/coherence-overlap-downstream.next.stderr21
-rw-r--r--tests/ui/coherence/coherence-overlap-downstream.rs3
-rw-r--r--tests/ui/coherence/coherence-overlap-downstream.stderr (renamed from tests/ui/coherence/coherence-overlap-downstream.old.stderr)4
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr14
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs3
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516-inherent.stderr (renamed from tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr)2
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516.old.stderr13
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516.rs3
-rw-r--r--tests/ui/coherence/coherence-overlap-issue-23516.stderr (renamed from tests/ui/coherence/coherence-overlap-issue-23516.next.stderr)2
-rw-r--r--tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr2
-rw-r--r--tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.classic.stderr19
-rw-r--r--tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.rs3
-rw-r--r--tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.stderr (renamed from tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.next.stderr)2
-rw-r--r--tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.classic.stderr19
-rw-r--r--tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.rs3
-rw-r--r--tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.stderr (renamed from tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.next.stderr)2
-rw-r--r--tests/ui/coherence/coherence-unsafe-trait-object-impl.rs2
-rw-r--r--tests/ui/coherence/coherent-due-to-fulfill.rs2
-rw-r--r--tests/ui/coherence/incoherent-even-though-we-fulfill.rs2
-rw-r--r--tests/ui/coherence/incoherent-even-though-we-fulfill.stderr2
-rw-r--r--tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr17
-rw-r--r--tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs3
-rw-r--r--tests/ui/coherence/inter-crate-ambiguity-causes-notes.stderr (renamed from tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr)2
-rw-r--r--tests/ui/coherence/negative-coherence-check-placeholder-outlives.stderr2
-rw-r--r--tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr2
-rw-r--r--tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr1
-rw-r--r--tests/ui/coherence/normalize-for-errors.current.stderr14
-rw-r--r--tests/ui/coherence/normalize-for-errors.rs6
-rw-r--r--tests/ui/coherence/normalize-for-errors.stderr (renamed from tests/ui/coherence/normalize-for-errors.next.stderr)2
-rw-r--r--tests/ui/coherence/occurs-check/associated-type.next.stderr4
-rw-r--r--tests/ui/coherence/occurs-check/associated-type.old.stderr10
-rw-r--r--tests/ui/coherence/occurs-check/associated-type.rs1
-rw-r--r--tests/ui/coherence/occurs-check/opaques.current.stderr12
-rw-r--r--tests/ui/coherence/occurs-check/opaques.next.stderr4
-rw-r--r--tests/ui/coherence/occurs-check/opaques.rs8
-rw-r--r--tests/ui/coherence/orphan-check-opaque-types-not-covering.classic.stderr21
-rw-r--r--tests/ui/coherence/orphan-check-opaque-types-not-covering.rs3
-rw-r--r--tests/ui/coherence/orphan-check-opaque-types-not-covering.stderr (renamed from tests/ui/coherence/orphan-check-opaque-types-not-covering.next.stderr)4
-rw-r--r--tests/ui/coherence/orphan-check-projections-covering.rs3
-rw-r--r--tests/ui/coherence/orphan-check-weak-aliases-not-covering.next.stderr12
-rw-r--r--tests/ui/coherence/orphan-check-weak-aliases-not-covering.rs3
-rw-r--r--tests/ui/coherence/orphan-check-weak-aliases-not-covering.stderr (renamed from tests/ui/coherence/orphan-check-weak-aliases-not-covering.classic.stderr)2
-rw-r--r--tests/ui/coherence/skip-reporting-if-references-err.current.stderr27
-rw-r--r--tests/ui/coherence/skip-reporting-if-references-err.rs6
-rw-r--r--tests/ui/coherence/skip-reporting-if-references-err.stderr (renamed from tests/ui/coherence/skip-reporting-if-references-err.next.stderr)2
-rw-r--r--tests/ui/coherence/super-traits/super-trait-knowable-1.current.stderr13
-rw-r--r--tests/ui/coherence/super-traits/super-trait-knowable-1.rs6
-rw-r--r--tests/ui/coherence/super-traits/super-trait-knowable-2.rs3
-rw-r--r--tests/ui/coherence/super-traits/super-trait-knowable-3.current.stderr13
-rw-r--r--tests/ui/coherence/super-traits/super-trait-knowable-3.rs6
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.rs (renamed from tests/ui/const-generics/adt_const_params/const_param_ty_object_safety.rs)0
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.stderr (renamed from tests/ui/const-generics/adt_const_params/const_param_ty_object_safety.stderr)4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.rs (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.rs)0
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr)8
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.rs (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.rs)0
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.stderr)8
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.rs)0
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr)8
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok.rs (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs)0
-rw-r--r--tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr39
-rw-r--r--tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs1
-rw-r--r--tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr23
-rw-r--r--tests/ui/const-generics/generic_const_exprs/unknown-alias-defkind-anonconst-ice-116710.rs1
-rw-r--r--tests/ui/const-generics/generic_const_exprs/unknown-alias-defkind-anonconst-ice-116710.stderr14
-rw-r--r--tests/ui/const-generics/not_wf_param_in_rpitit.rs3
-rw-r--r--tests/ui/const-generics/not_wf_param_in_rpitit.stderr55
-rw-r--r--tests/ui/consts/const-eval/float_methods.rs47
-rw-r--r--tests/ui/consts/const-unwrap.rs10
-rw-r--r--tests/ui/consts/const-unwrap.stderr12
-rw-r--r--tests/ui/consts/load-preserves-partial-init.rs1
-rw-r--r--tests/ui/coverage-attr/bad-attr-ice.rs2
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/broken_format.rs4
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr4
-rw-r--r--tests/ui/dyn-compatibility/almost-supertrait-associated-type.rs (renamed from tests/ui/object-safety/almost-supertrait-associated-type.rs)2
-rw-r--r--tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr (renamed from tests/ui/object-safety/almost-supertrait-associated-type.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_const_bounds.rs (renamed from tests/ui/object-safety/assoc_const_bounds.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_const_bounds_sized.rs (renamed from tests/ui/object-safety/assoc_const_bounds_sized.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds.rs (renamed from tests/ui/object-safety/assoc_type_bounds.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds.stderr (renamed from tests/ui/object-safety/assoc_type_bounds.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds2.rs (renamed from tests/ui/object-safety/assoc_type_bounds2.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds2.stderr (renamed from tests/ui/object-safety/assoc_type_bounds2.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.fixed (renamed from tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.rs (renamed from tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.stderr (renamed from tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized.rs (renamed from tests/ui/object-safety/assoc_type_bounds_sized.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized_others.rs (renamed from tests/ui/object-safety/assoc_type_bounds_sized_others.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized_others.stderr (renamed from tests/ui/object-safety/assoc_type_bounds_sized_others.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized_unnecessary.rs (renamed from tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized_unnecessary.stderr (renamed from tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs (renamed from tests/ui/object-safety/assoc_type_bounds_sized_used.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.stderr (renamed from tests/ui/object-safety/assoc_type_bounds_sized_used.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/associated-consts.curr.stderr (renamed from tests/ui/object-safety/object-safety-associated-consts.curr.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr)4
-rw-r--r--tests/ui/dyn-compatibility/associated-consts.rs (renamed from tests/ui/object-safety/object-safety-associated-consts.rs)4
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-2.new.stderr19
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr (renamed from tests/ui/object-safety/avoid-ice-on-warning-2.old.stderr)2
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-2.rs (renamed from tests/ui/object-safety/avoid-ice-on-warning-2.rs)7
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-3.new.stderr57
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr (renamed from tests/ui/object-safety/avoid-ice-on-warning-3.old.stderr)10
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-3.rs (renamed from tests/ui/object-safety/avoid-ice-on-warning-3.rs)8
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning.new.stderr32
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr (renamed from tests/ui/object-safety/avoid-ice-on-warning.old.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning.rs (renamed from tests/ui/object-safety/avoid-ice-on-warning.rs)1
-rw-r--r--tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.fixed (renamed from tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed)3
-rw-r--r--tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.stderr14
-rw-r--r--tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.old.stderr (renamed from tests/ui/object-safety/bare-trait-dont-suggest-dyn.old.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.rs (renamed from tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs)3
-rw-r--r--tests/ui/dyn-compatibility/bounds.rs (renamed from tests/ui/object-safety/object-safety-bounds.rs)2
-rw-r--r--tests/ui/dyn-compatibility/bounds.stderr (renamed from tests/ui/object-safety/object-safety-bounds.stderr)4
-rw-r--r--tests/ui/dyn-compatibility/by-value-self-use.rs (renamed from tests/ui/object-safety/object-safety-by-value-self-use.rs)2
-rw-r--r--tests/ui/dyn-compatibility/by-value-self-use.stderr (renamed from tests/ui/object-safety/object-safety-by-value-self-use.stderr)2
-rw-r--r--tests/ui/dyn-compatibility/by-value-self.rs (renamed from tests/ui/object-safety/object-safety-by-value-self.rs)2
-rw-r--r--tests/ui/dyn-compatibility/call-when-assoc-ty-is-sized.rs (renamed from tests/ui/object-safety/call-when-assoc-ty-is-sized.rs)0
-rw-r--r--tests/ui/dyn-compatibility/elaborated-predicates-ordering.rs (renamed from tests/ui/object-safety/issue-102933.rs)1
-rw-r--r--tests/ui/dyn-compatibility/erroneous_signature.rs (renamed from tests/ui/object-safety/erroneous_signature.rs)0
-rw-r--r--tests/ui/dyn-compatibility/erroneous_signature.stderr (renamed from tests/ui/object-safety/erroneous_signature.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/generics.curr.stderr (renamed from tests/ui/object-safety/object-safety-generics.curr.stderr)20
-rw-r--r--tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-generics.object_safe_for_dispatch.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/generics.rs (renamed from tests/ui/object-safety/object-safety-generics.rs)8
-rw-r--r--tests/ui/dyn-compatibility/impossible-predicates-multiple_supertrait_upcastable-check.rs (renamed from tests/ui/object-safety/issue-106247.rs)1
-rw-r--r--tests/ui/dyn-compatibility/item-bounds-can-reference-self.rs (renamed from tests/ui/object-safety/item-bounds-can-reference-self.rs)0
-rw-r--r--tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.rs (renamed from tests/ui/object-safety/issue-19538.rs)2
-rw-r--r--tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr (renamed from tests/ui/object-safety/issue-19538.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.rs (renamed from tests/ui/object-safety/object-safety-issue-22040.rs)0
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.stderr (renamed from tests/ui/object-safety/object-safety-issue-22040.stderr)12
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self.curr.stderr (renamed from tests/ui/object-safety/object-safety-mentions-Self.curr.stderr)16
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self.rs (renamed from tests/ui/object-safety/object-safety-mentions-Self.rs)4
-rw-r--r--tests/ui/dyn-compatibility/missing-assoc-type.rs (renamed from tests/ui/traits/object/object-unsafe-missing-assoc-type.rs)0
-rw-r--r--tests/ui/dyn-compatibility/missing-assoc-type.stderr (renamed from tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr)16
-rw-r--r--tests/ui/dyn-compatibility/no-static.curr.stderr (renamed from tests/ui/object-safety/object-safety-no-static.curr.stderr)12
-rw-r--r--tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr)4
-rw-r--r--tests/ui/dyn-compatibility/no-static.rs (renamed from tests/ui/object-safety/object-safety-no-static.rs)4
-rw-r--r--tests/ui/dyn-compatibility/phantom-fn.rs (renamed from tests/ui/object-safety/object-safety-phantom-fn.rs)2
-rw-r--r--tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs (renamed from tests/ui/object-safety/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs)57
-rw-r--r--tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr (renamed from tests/ui/object-safety/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr)141
-rw-r--r--tests/ui/dyn-compatibility/sized-2.curr.stderr (renamed from tests/ui/object-safety/object-safety-sized-2.curr.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr)4
-rw-r--r--tests/ui/dyn-compatibility/sized-2.rs (renamed from tests/ui/object-safety/object-safety-sized-2.rs)4
-rw-r--r--tests/ui/dyn-compatibility/sized.curr.stderr (renamed from tests/ui/object-safety/object-safety-sized.curr.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr)4
-rw-r--r--tests/ui/dyn-compatibility/sized.rs (renamed from tests/ui/object-safety/object-safety-sized.rs)4
-rw-r--r--tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs (renamed from tests/ui/object-safety/object-safety-supertrait-mentions-GAT.rs)0
-rw-r--r--tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr (renamed from tests/ui/object-safety/object-safety-supertrait-mentions-GAT.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/supertrait-mentions-Self.rs (renamed from tests/ui/object-safety/object-safety-supertrait-mentions-Self.rs)0
-rw-r--r--tests/ui/dyn-compatibility/supertrait-mentions-Self.stderr (renamed from tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs (renamed from tests/ui/object-safety/issue-102762.rs)5
-rw-r--r--tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr (renamed from tests/ui/object-safety/issue-102762.stderr)12
-rw-r--r--tests/ui/dyn-keyword/dyn-2021-edition-error.rs6
-rw-r--r--tests/ui/dyn-keyword/dyn-2021-edition-error.stderr10
-rw-r--r--tests/ui/dyn-keyword/suggest-dyn-on-bare-trait-in-pat.rs3
-rw-r--r--tests/ui/dyn-keyword/suggest-dyn-on-bare-trait-in-pat.stderr4
-rw-r--r--tests/ui/editions/dyn-trait-sugg-2021.rs2
-rw-r--r--tests/ui/editions/dyn-trait-sugg-2021.stderr4
-rw-r--r--tests/ui/error-codes/E0010-teach.stderr2
-rw-r--r--tests/ui/error-codes/e0119/issue-23563.stderr2
-rw-r--r--tests/ui/extern/issue-95829.rs2
-rw-r--r--tests/ui/extern/issue-95829.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr23
-rw-r--r--tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr29
-rw-r--r--tests/ui/feature-gates/feature-gate-autodiff-use.rs17
-rw-r--r--tests/ui/feature-gates/feature-gate-autodiff.has_support.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-autodiff.no_support.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-autodiff.rs12
-rw-r--r--tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.rs41
-rw-r--r--tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr83
-rw-r--r--tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.rs41
-rw-r--r--tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr83
-rw-r--r--tests/ui/feature-gates/feature-gate-pin_ergonomics.rs11
-rw-r--r--tests/ui/feature-gates/feature-gate-pin_ergonomics.stderr45
-rw-r--r--tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.rs6
-rw-r--r--tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-unnamed_fields.rs29
-rw-r--r--tests/ui/feature-gates/feature-gate-unnamed_fields.stderr63
-rw-r--r--tests/ui/feature-gates/feature-gate-with_negative_coherence.stderr2
-rw-r--r--tests/ui/feature-gates/unstable-attribute-rejects-already-stable-features.rs10
-rw-r--r--tests/ui/feature-gates/unstable-attribute-rejects-already-stable-features.stderr31
-rw-r--r--tests/ui/fmt/closing-brace-as-fill.rs2
-rw-r--r--tests/ui/fmt/closing-brace-as-fill.stderr6
-rw-r--r--tests/ui/fmt/format-string-error-2.rs2
-rw-r--r--tests/ui/fmt/format-string-error-2.stderr56
-rw-r--r--tests/ui/fmt/format-string-error.rs6
-rw-r--r--tests/ui/fmt/format-string-error.stderr24
-rw-r--r--tests/ui/fmt/format-string-wrong-order.rs4
-rw-r--r--tests/ui/fmt/format-string-wrong-order.stderr8
-rw-r--r--tests/ui/fmt/ifmt-bad-arg.rs2
-rw-r--r--tests/ui/fmt/ifmt-bad-arg.stderr8
-rw-r--r--tests/ui/fmt/issue-91556.rs4
-rw-r--r--tests/ui/fmt/issue-91556.stderr4
-rw-r--r--tests/ui/fmt/respanned-literal-issue-106191.rs4
-rw-r--r--tests/ui/fmt/respanned-literal-issue-106191.stderr8
-rw-r--r--tests/ui/for/issue-20605.next.stderr11
-rw-r--r--tests/ui/for/issue-20605.rs7
-rw-r--r--tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.next.stderr16
-rw-r--r--tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr2
-rw-r--r--tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.rs1
-rw-r--r--tests/ui/generic-associated-types/trait-objects.rs2
-rw-r--r--tests/ui/higher-ranked/leak-check/leak-check-in-selection-5-ambig.rs6
-rw-r--r--tests/ui/higher-ranked/structually-relate-aliases.rs4
-rw-r--r--tests/ui/higher-ranked/structually-relate-aliases.stderr1
-rw-r--r--tests/ui/hygiene/panic-location.rs3
-rw-r--r--tests/ui/hygiene/panic-location.run.stderr2
-rw-r--r--tests/ui/impl-trait/auto-trait-coherence.old.stderr4
-rw-r--r--tests/ui/impl-trait/auto-trait-coherence.rs6
-rw-r--r--tests/ui/impl-trait/auto-trait-coherence.stderr12
-rw-r--r--tests/ui/impl-trait/coherence-treats-tait-ambig.rs2
-rw-r--r--tests/ui/impl-trait/coherence-treats-tait-ambig.stderr2
-rw-r--r--tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.rs (renamed from tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.rs)11
-rw-r--r--tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr (renamed from tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr)72
-rw-r--r--tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-impl-trait.rs (renamed from tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.rs)16
-rw-r--r--tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-impl-trait.stderr (renamed from tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr)12
-rw-r--r--tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr15
-rw-r--r--tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs3
-rw-r--r--tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs4
-rw-r--r--tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.stderr36
-rw-r--r--tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-dyn-compatibility-check.rs (renamed from tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs)0
-rw-r--r--tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-dyn-compatibility-check.stderr (renamed from tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.stderr)16
-rw-r--r--tests/ui/impl-trait/in-trait/dyn-compatibility-sized.rs (renamed from tests/ui/impl-trait/in-trait/object-safety-sized.rs)0
-rw-r--r--tests/ui/impl-trait/in-trait/dyn-compatibility.rs (renamed from tests/ui/impl-trait/in-trait/object-safety.rs)0
-rw-r--r--tests/ui/impl-trait/in-trait/dyn-compatibility.stderr (renamed from tests/ui/impl-trait/in-trait/object-safety.stderr)16
-rw-r--r--tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.current.stderr28
-rw-r--r--tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.rs3
-rw-r--r--tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.rs1
-rw-r--r--tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr14
-rw-r--r--tests/ui/impl-trait/in-trait/variance.rs23
-rw-r--r--tests/ui/impl-trait/in-trait/variance.stderr34
-rw-r--r--tests/ui/impl-trait/method-resolution4.next.stderr17
-rw-r--r--tests/ui/impl-trait/method-resolution4.rs1
-rw-r--r--tests/ui/impl-trait/negative-reasoning.rs2
-rw-r--r--tests/ui/impl-trait/negative-reasoning.stderr6
-rw-r--r--tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs3
-rw-r--r--tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr14
-rw-r--r--tests/ui/impl-trait/precise-capturing/redundant.normal.stderr20
-rw-r--r--tests/ui/impl-trait/precise-capturing/redundant.rpitit.stderr18
-rw-r--r--tests/ui/impl-trait/precise-capturing/redundant.rs15
-rw-r--r--tests/ui/impl-trait/precise-capturing/redundant.stderr36
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs6
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr37
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.rs14
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr17
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit.rs31
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit.stderr56
-rw-r--r--tests/ui/impl-trait/precise-capturing/self-capture.rs5
-rw-r--r--tests/ui/impl-trait/precise-capturing/self-capture.stderr10
-rw-r--r--tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr29
-rw-r--r--tests/ui/impl-trait/recursive-coroutine-boxed.rs3
-rw-r--r--tests/ui/impl-trait/unsize-cast-validation-rpit.rs12
-rw-r--r--tests/ui/impl-trait/unsized_coercion.next.stderr39
-rw-r--r--tests/ui/impl-trait/unsized_coercion.rs3
-rw-r--r--tests/ui/impl-trait/unsized_coercion3.next.stderr43
-rw-r--r--tests/ui/impl-trait/unsized_coercion3.old.stderr2
-rw-r--r--tests/ui/impl-trait/unsized_coercion3.rs4
-rw-r--r--tests/ui/impl-unused-tps.rs46
-rw-r--r--tests/ui/impl-unused-tps.stderr84
-rw-r--r--tests/ui/intrinsics/intrinsic-alignment.rs1
-rw-r--r--tests/ui/intrinsics/intrinsic-fmuladd.rs42
-rw-r--r--tests/ui/issues/issue-48728.rs8
-rw-r--r--tests/ui/issues/issue-58734.rs8
-rw-r--r--tests/ui/issues/issue-85461.rs2
-rw-r--r--tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr)0
-rw-r--r--tests/ui/kindck/kindck-inherited-copy-bound.rs8
-rw-r--r--tests/ui/layout/post-mono-layout-cycle-2.rs59
-rw-r--r--tests/ui/layout/post-mono-layout-cycle-2.stderr23
-rw-r--r--tests/ui/layout/post-mono-layout-cycle.rs25
-rw-r--r--tests/ui/layout/post-mono-layout-cycle.stderr16
-rw-r--r--tests/ui/lint/non-local-defs/cargo-update.stderr1
-rw-r--r--tests/ui/lint/non-local-defs/consts.rs7
-rw-r--r--tests/ui/lint/non-local-defs/consts.stderr27
-rw-r--r--tests/ui/lint/non-local-defs/convoluted-locals-131474-with-mods.rs45
-rw-r--r--tests/ui/lint/non-local-defs/convoluted-locals-131474.rs33
-rw-r--r--tests/ui/lint/non-local-defs/exhaustive-trait.stderr6
-rw-r--r--tests/ui/lint/non-local-defs/exhaustive.stderr14
-rw-r--r--tests/ui/lint/non-local-defs/from-local-for-global.stderr1
-rw-r--r--tests/ui/lint/non-local-defs/generics.stderr3
-rw-r--r--tests/ui/lint/non-local-defs/inside-macro_rules.stderr1
-rw-r--r--tests/ui/lint/non-local-defs/local.rs7
-rw-r--r--tests/ui/lint/non-local-defs/macro_rules.stderr4
-rw-r--r--tests/ui/lint/non-local-defs/weird-exprs.stderr6
-rw-r--r--tests/ui/lint/non-snake-case/lint-non-snake-case-crate.cdylib_.stderr4
-rw-r--r--tests/ui/lint/non-snake-case/lint-non-snake-case-crate.dylib_.stderr4
-rw-r--r--tests/ui/lint/non-snake-case/lint-non-snake-case-crate.lib_.stderr4
-rw-r--r--tests/ui/lint/non-snake-case/lint-non-snake-case-crate.proc_macro_.stderr4
-rw-r--r--tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rlib_.stderr4
-rw-r--r--tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rs4
-rw-r--r--tests/ui/lint/non-snake-case/lint-non-snake-case-crate.staticlib_.stderr4
-rw-r--r--tests/ui/lint/unused/unused-parens-for-stmt-expr-attributes-issue-129833.fixed15
-rw-r--r--tests/ui/lint/unused/unused-parens-for-stmt-expr-attributes-issue-129833.rs15
-rw-r--r--tests/ui/lint/unused/unused-parens-for-stmt-expr-attributes-issue-129833.stderr31
-rw-r--r--tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.fixed13
-rw-r--r--tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.rs13
-rw-r--r--tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.stderr46
-rw-r--r--tests/ui/macros/issue-51848.stderr4
-rw-r--r--tests/ui/meta/revision-bad.rs1
-rw-r--r--tests/ui/mir/mir-inlining/always-encode-mirs.rs2
-rw-r--r--tests/ui/object-safety/avoid-ice-on-warning-2.new.stderr41
-rw-r--r--tests/ui/object-safety/avoid-ice-on-warning-3.new.stderr47
-rw-r--r--tests/ui/object-safety/avoid-ice-on-warning.new.stderr20
-rw-r--r--tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.stderr21
-rw-r--r--tests/ui/parser/fn-header-semantic-fail.rs10
-rw-r--r--tests/ui/parser/fn-header-semantic-fail.stderr32
-rw-r--r--tests/ui/parser/issues/invalid-path-sep-in-fn-definition-issue-130791.fixed7
-rw-r--r--tests/ui/parser/issues/invalid-path-sep-in-fn-definition-issue-130791.rs7
-rw-r--r--tests/ui/parser/issues/invalid-path-sep-in-fn-definition-issue-130791.stderr14
-rw-r--r--tests/ui/parser/no-const-fn-in-extern-block.rs6
-rw-r--r--tests/ui/parser/no-const-fn-in-extern-block.stderr12
-rw-r--r--tests/ui/pattern/match_ergonomics_2024.fixed57
-rw-r--r--tests/ui/pattern/match_ergonomics_2024.rs57
-rw-r--r--tests/ui/pattern/match_ergonomics_2024.stderr97
-rw-r--r--tests/ui/pattern/rfc-3627-match-ergonomics-2024/auxiliary/migration_lint_macros.rs (renamed from tests/ui/pattern/auxiliary/match_ergonomics_2024_macros.rs)0
-rw-r--r--tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed144
-rw-r--r--tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs144
-rw-r--r--tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr188
-rw-r--r--tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.rs46
-rw-r--r--tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.stderr160
-rw-r--r--tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_success.rs17
-rw-r--r--tests/ui/precondition-checks/alignment.rs11
-rw-r--r--tests/ui/precondition-checks/ascii-char-digit_unchecked.rs11
-rw-r--r--tests/ui/precondition-checks/assert_unchecked.rs9
-rw-r--r--tests/ui/precondition-checks/char-from_u32_unchecked.rs9
-rw-r--r--tests/ui/precondition-checks/copy-nonoverlapping.rs25
-rw-r--r--tests/ui/precondition-checks/copy.rs23
-rw-r--r--tests/ui/precondition-checks/layout.rs15
-rw-r--r--tests/ui/precondition-checks/misaligned-slice.rs10
-rw-r--r--tests/ui/precondition-checks/nonnull.rs9
-rw-r--r--tests/ui/precondition-checks/nonzero-from_mut_unchecked.rs12
-rw-r--r--tests/ui/precondition-checks/nonzero-new_unchecked.rs9
-rw-r--r--tests/ui/precondition-checks/null-slice.rs10
-rw-r--r--tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs11
-rw-r--r--tests/ui/precondition-checks/read.rs18
-rw-r--r--tests/ui/precondition-checks/read_volatile.rs17
-rw-r--r--tests/ui/precondition-checks/replace.rs17
-rw-r--r--tests/ui/precondition-checks/slice-from-raw-parts-mut.rs16
-rw-r--r--tests/ui/precondition-checks/slice-from-raw-parts.rs15
-rw-r--r--tests/ui/precondition-checks/slice-get_unchecked.rs20
-rw-r--r--tests/ui/precondition-checks/slice-get_unchecked_mut.rs20
-rw-r--r--tests/ui/precondition-checks/slice-swap_unchecked.rs14
-rw-r--r--tests/ui/precondition-checks/str-get_unchecked.rs18
-rw-r--r--tests/ui/precondition-checks/str-get_unchecked_mut.rs19
-rw-r--r--tests/ui/precondition-checks/swap-nonoverlapping.rs25
-rw-r--r--tests/ui/precondition-checks/unchecked_add.rs9
-rw-r--r--tests/ui/precondition-checks/unchecked_mul.rs9
-rw-r--r--tests/ui/precondition-checks/unchecked_shl.rs11
-rw-r--r--tests/ui/precondition-checks/unchecked_shr.rs11
-rw-r--r--tests/ui/precondition-checks/unchecked_sub.rs9
-rw-r--r--tests/ui/precondition-checks/unreachable_unchecked.rs9
-rw-r--r--tests/ui/precondition-checks/write.rs18
-rw-r--r--tests/ui/precondition-checks/write_bytes.rs18
-rw-r--r--tests/ui/precondition-checks/write_volatile.rs17
-rw-r--r--tests/ui/precondition-checks/zero-size-null.rs21
-rw-r--r--tests/ui/proc-macro/nested-macro-rules.stderr1
-rw-r--r--tests/ui/process/process-sigpipe.rs8
-rw-r--r--tests/ui/resolve/issue-111312.rs3
-rw-r--r--tests/ui/resolve/issue-111312.stderr21
-rw-r--r--tests/ui/resolve/issue-111727.rs3
-rw-r--r--tests/ui/resolve/issue-111727.stderr15
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/downcast-unsafe-trait-objects.rs (renamed from tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs)4
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr (renamed from tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr)0
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr (renamed from tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr)0
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.rs (renamed from tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs)4
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/static-dispatch-unsafe-object.rs (renamed from tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs)2
-rw-r--r--tests/ui/runtime/stdout-before-main.rs24
-rw-r--r--tests/ui/runtime/stdout-before-main.run.stdout1
-rw-r--r--tests/ui/rust-2021/ice-return-unsized-can-impl-2.rs15
-rw-r--r--tests/ui/rust-2021/ice-return-unsized-can-impl-2.stderr57
-rw-r--r--tests/ui/rust-2021/ice-return-unsized-can-impl.rs16
-rw-r--r--tests/ui/rust-2021/ice-return-unsized-can-impl.stderr30
-rw-r--r--tests/ui/rust-2021/ice-unsized-fn-params-2.rs12
-rw-r--r--tests/ui/rust-2021/ice-unsized-fn-params-2.stderr19
-rw-r--r--tests/ui/rust-2021/ice-unsized-fn-params.rs18
-rw-r--r--tests/ui/rust-2021/ice-unsized-fn-params.stderr57
-rw-r--r--tests/ui/rust-2024/auxiliary/reserved-guarded-strings-macro-2021.rs20
-rw-r--r--tests/ui/rust-2024/auxiliary/reserved-guarded-strings-macro-2024.rs21
-rw-r--r--tests/ui/rust-2024/reserved-guarded-strings-lexing.rs80
-rw-r--r--tests/ui/rust-2024/reserved-guarded-strings-lexing.stderr271
-rw-r--r--tests/ui/rust-2024/reserved-guarded-strings-migration.fixed99
-rw-r--r--tests/ui/rust-2024/reserved-guarded-strings-migration.rs99
-rw-r--r--tests/ui/rust-2024/reserved-guarded-strings-migration.stderr293
-rw-r--r--tests/ui/rust-2024/reserved-guarded-strings-via-macro-2.rs18
-rw-r--r--tests/ui/rust-2024/reserved-guarded-strings-via-macro-2.stderr20
-rw-r--r--tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs12
-rw-r--r--tests/ui/rust-2024/reserved-guarded-strings.rs74
-rw-r--r--tests/ui/rust-2024/reserved-guarded-strings.stderr254
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2021.stderr8
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2024.stderr8
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.rs4
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.fixed2
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.rs2
-rw-r--r--tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.stderr4
-rw-r--r--tests/ui/sanitizer/cfi/async-closures.rs2
-rw-r--r--tests/ui/self/arbitrary-self-types-dyn-incompatible.curr.stderr (renamed from tests/ui/self/arbitrary-self-types-not-object-safe.curr.stderr)8
-rw-r--r--tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr)4
-rw-r--r--tests/ui/self/arbitrary-self-types-dyn-incompatible.rs (renamed from tests/ui/self/arbitrary-self-types-not-object-safe.rs)6
-rw-r--r--tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs6
-rw-r--r--tests/ui/self/dyn-compatibility-sized-self-by-value-self.rs (renamed from tests/ui/self/object-safety-sized-self-by-value-self.rs)2
-rw-r--r--tests/ui/self/dyn-compatibility-sized-self-generic-method.rs (renamed from tests/ui/self/object-safety-sized-self-generic-method.rs)2
-rw-r--r--tests/ui/self/dyn-compatibility-sized-self-return-Self.rs (renamed from tests/ui/self/object-safety-sized-self-return-Self.rs)2
-rw-r--r--tests/ui/specialization/coherence/default-impl-normalization-ambig-2.rs19
-rw-r--r--tests/ui/specialization/coherence/default-impl-normalization-ambig-2.stderr21
-rw-r--r--tests/ui/specialization/coherence/default-item-normalization-ambig-1.rs25
-rw-r--r--tests/ui/specialization/coherence/default-item-normalization-ambig-1.stderr21
-rw-r--r--tests/ui/specialization/defaultimpl/specialization-no-default.rs3
-rw-r--r--tests/ui/specialization/issue-44861.rs8
-rw-r--r--tests/ui/specialization/specialization-default-items-drop-coherence.current.stderr12
-rw-r--r--tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr2
-rw-r--r--tests/ui/specialization/specialization-default-items-drop-coherence.rs8
-rw-r--r--tests/ui/specialization/specialization-overlap-projection.current.stderr22
-rw-r--r--tests/ui/specialization/specialization-overlap-projection.next.stderr6
-rw-r--r--tests/ui/specialization/specialization-overlap-projection.rs13
-rw-r--r--tests/ui/specialization/specialization-overlap-projection.stderr30
-rw-r--r--tests/ui/std/thread-sleep-ms.rs (renamed from tests/ui/issues/issue-12699.rs)3
-rw-r--r--tests/ui/structs-enums/rec-align-u64.rs1
-rw-r--r--tests/ui/suggestions/auxiliary/dyn-incompatible.rs (renamed from tests/ui/suggestions/auxiliary/not-object-safe.rs)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-references-self.rs (renamed from tests/ui/suggestions/object-unsafe-trait-references-self.rs)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-references-self.stderr (renamed from tests/ui/suggestions/object-unsafe-trait-references-self.stderr)14
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs22
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.stderr123
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.rs (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.stderr)12
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self.rs (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-self.rs)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-self.stderr)12
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.fixed (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.rs (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.stderr)6
-rw-r--r--tests/ui/suggestions/issue-104328.rs2
-rw-r--r--tests/ui/suggestions/issue-116434-2021.rs6
-rw-r--r--tests/ui/suggestions/issue-116434-2021.stderr27
-rw-r--r--tests/ui/suggestions/issue-98500.rs6
-rw-r--r--tests/ui/suggestions/issue-98500.stderr2
-rw-r--r--tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs25
-rw-r--r--tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.stderr176
-rw-r--r--tests/ui/suggestions/suggest-blanket-impl-local-trait.rs28
-rw-r--r--tests/ui/suggestions/suggest-blanket-impl-local-trait.stderr28
-rw-r--r--tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs6
-rw-r--r--tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.stderr12
-rw-r--r--tests/ui/target-feature/tied-features-no-implication-1.paca.stderr4
-rw-r--r--tests/ui/target-feature/tied-features-no-implication-1.pacg.stderr4
-rw-r--r--tests/ui/target-feature/tied-features-no-implication-1.rs20
-rw-r--r--tests/ui/target-feature/tied-features-no-implication.paca.stderr4
-rw-r--r--tests/ui/target-feature/tied-features-no-implication.pacg.stderr14
-rw-r--r--tests/ui/target-feature/tied-features-no-implication.rs29
-rw-r--r--tests/ui/target-feature/tied-features.rs9
-rw-r--r--tests/ui/target-feature/tied-features.stderr14
-rw-r--r--tests/ui/traits/alias/issue-83613.rs2
-rw-r--r--tests/ui/traits/alias/issue-83613.stderr4
-rw-r--r--tests/ui/traits/alias/no-duplicates.rs4
-rw-r--r--tests/ui/traits/alias/no-extra-traits.rs2
-rw-r--r--tests/ui/traits/alias/object-wf.rs4
-rw-r--r--tests/ui/traits/bound/not-on-bare-trait-2021.rs8
-rw-r--r--tests/ui/traits/bound/not-on-bare-trait-2021.stderr49
-rw-r--r--tests/ui/traits/issue-105231.rs3
-rw-r--r--tests/ui/traits/issue-105231.stderr22
-rw-r--r--tests/ui/traits/issue-106072.rs4
-rw-r--r--tests/ui/traits/issue-106072.stderr29
-rw-r--r--tests/ui/traits/missing-for-type-in-impl.e2021.stderr4
-rw-r--r--tests/ui/traits/missing-for-type-in-impl.rs2
-rw-r--r--tests/ui/traits/negative-bounds/on-unimplemented.rs12
-rw-r--r--tests/ui/traits/negative-bounds/on-unimplemented.stderr18
-rw-r--r--tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs13
-rw-r--r--tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr58
-rw-r--r--tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs4
-rw-r--r--tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr20
-rw-r--r--tests/ui/traits/next-solver/coherence/issue-102048.rs10
-rw-r--r--tests/ui/traits/next-solver/coherence/issue-102048.stderr16
-rw-r--r--tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.rs19
-rw-r--r--tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr21
-rw-r--r--tests/ui/traits/next-solver/dyn-incompatibility.rs (renamed from tests/ui/traits/next-solver/object-unsafety.rs)0
-rw-r--r--tests/ui/traits/next-solver/dyn-incompatibility.stderr (renamed from tests/ui/traits/next-solver/object-unsafety.stderr)10
-rw-r--r--tests/ui/traits/next-solver/issue-118950-root-region.rs4
-rw-r--r--tests/ui/traits/next-solver/issue-118950-root-region.stderr22
-rw-r--r--tests/ui/traits/next-solver/normalize/normalize-region-obligations.rs2
-rw-r--r--tests/ui/traits/next-solver/typeck/guide-ctors.rs32
-rw-r--r--tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.rs (renamed from tests/ui/traits/non_lifetime_binders/supertrait-object-safety.rs)0
-rw-r--r--tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr (renamed from tests/ui/traits/non_lifetime_binders/supertrait-object-safety.stderr)14
-rw-r--r--tests/ui/traits/object/print_vtable_sizes.rs2
-rw-r--r--tests/ui/traits/object/safety.rs2
-rw-r--r--tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.rs2
-rw-r--r--tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.stderr26
-rw-r--r--tests/ui/traits/vtable/vtable-dyn-incompatible.rs (renamed from tests/ui/traits/vtable/vtable-non-object-safe.rs)2
-rw-r--r--tests/ui/traits/vtable/vtable-dyn-incompatible.stderr (renamed from tests/ui/traits/vtable/vtable-non-object-safe.stderr)2
-rw-r--r--tests/ui/traits/wf-object/no-duplicates.rs4
-rw-r--r--tests/ui/traits/wf-object/reverse-order.rs2
-rw-r--r--tests/ui/transmutability/malformed-program-gracefulness/coherence-bikeshed-intrinsic-from.rs11
-rw-r--r--tests/ui/transmutability/malformed-program-gracefulness/coherence-bikeshed-intrinsic-from.stderr27
-rw-r--r--tests/ui/type-alias-impl-trait/impl_trait_for_same_tait.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.error.stderr4
-rw-r--r--tests/ui/type-alias-impl-trait/issue-104817.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-104817.stock.stderr4
-rw-r--r--tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.stderr24
-rw-r--r--tests/ui/typeck/issue-103899.rs10
-rw-r--r--tests/ui/union/unnamed-fields/anon-struct-in-enum-issue-121446.rs11
-rw-r--r--tests/ui/union/unnamed-fields/anon-struct-in-enum-issue-121446.stderr16
-rw-r--r--tests/ui/union/unnamed-fields/auxiliary/dep.rs18
-rw-r--r--tests/ui/union/unnamed-fields/field_uniqueness_check.rs337
-rw-r--r--tests/ui/union/unnamed-fields/field_uniqueness_check.stderr1734
-rw-r--r--tests/ui/union/unnamed-fields/repr_check.rs69
-rw-r--r--tests/ui/union/unnamed-fields/repr_check.stderr152
-rw-r--r--tests/ui/union/unnamed-fields/restrict_anonymous_structs.rs32
-rw-r--r--tests/ui/union/unnamed-fields/restrict_anonymous_structs.stderr48
-rw-r--r--tests/ui/union/unnamed-fields/restrict_anonymous_unions.rs32
-rw-r--r--tests/ui/union/unnamed-fields/restrict_anonymous_unions.stderr48
-rw-r--r--tests/ui/union/unnamed-fields/restrict_type_hir.rs44
-rw-r--r--tests/ui/union/unnamed-fields/restrict_type_hir.stderr62
-rw-r--r--tests/ui/union/unnamed-fields/unnamed-enum-field-issue-121757.rs25
-rw-r--r--tests/ui/union/unnamed-fields/unnamed-enum-field-issue-121757.stderr45
-rw-r--r--tests/ui/unpretty/expanded-exhaustive.rs15
-rw-r--r--tests/ui/unpretty/expanded-exhaustive.stdout19
-rw-r--r--tests/ui/unsized-locals/by-value-trait-dyn-compatibility-rpass.rs (renamed from tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs)0
-rw-r--r--tests/ui/unsized-locals/by-value-trait-dyn-compatibility-with-default.rs (renamed from tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs)0
-rw-r--r--tests/ui/unsized-locals/by-value-trait-dyn-compatibility.rs (renamed from tests/ui/unsized-locals/by-value-trait-object-safety.rs)0
-rw-r--r--tests/ui/unsized-locals/by-value-trait-dyn-compatibility.stderr (renamed from tests/ui/unsized-locals/by-value-trait-object-safety.stderr)4
-rw-r--r--tests/ui/use/unused-trait-with-method-err.rs17
-rw-r--r--tests/ui/use/unused-trait-with-method-err.stderr19
-rw-r--r--tests/ui/variance/type-resolve-error-two-structs-deep.rs13
-rw-r--r--tests/ui/variance/type-resolve-error-two-structs-deep.stderr9
-rw-r--r--tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.rs (renamed from tests/ui/wf/wf-convert-unsafe-trait-obj-box.rs)4
-rw-r--r--tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr (renamed from tests/ui/wf/wf-convert-unsafe-trait-obj-box.stderr)12
-rw-r--r--tests/ui/wf/wf-convert-dyn-incompat-trait-obj.rs (renamed from tests/ui/wf/wf-convert-unsafe-trait-obj.rs)4
-rw-r--r--tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr (renamed from tests/ui/wf/wf-convert-unsafe-trait-obj.stderr)12
-rw-r--r--tests/ui/wf/wf-dyn-incompat-trait-obj-match.rs (renamed from tests/ui/wf/wf-unsafe-trait-obj-match.rs)2
-rw-r--r--tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr (renamed from tests/ui/wf/wf-unsafe-trait-obj-match.stderr)10
-rw-r--r--tests/ui/wf/wf-dyn-incompatible.rs (renamed from tests/ui/wf/wf-object-safe.rs)2
-rw-r--r--tests/ui/wf/wf-dyn-incompatible.stderr (renamed from tests/ui/wf/wf-object-safe.stderr)4
587 files changed, 7709 insertions, 5535 deletions
diff --git a/tests/ui/abi/compatibility.rs b/tests/ui/abi/compatibility.rs
index b439a4bcf86..28c8063a923 100644
--- a/tests/ui/abi/compatibility.rs
+++ b/tests/ui/abi/compatibility.rs
@@ -160,14 +160,14 @@ mod prelude {
     pub struct Box<T: ?Sized, A = Global>(Unique<T>, A);
 
     #[repr(C)]
-    struct RcBox<T: ?Sized> {
+    struct RcInner<T: ?Sized> {
         strong: UnsafeCell<usize>,
         weak: UnsafeCell<usize>,
         value: T,
     }
     pub struct Rc<T: ?Sized, A = Global> {
-        ptr: NonNull<RcBox<T>>,
-        phantom: PhantomData<RcBox<T>>,
+        ptr: NonNull<RcInner<T>>,
+        phantom: PhantomData<RcInner<T>>,
         alloc: A,
     }
 
diff --git a/tests/ui/abi/unsupported.aarch64.stderr b/tests/ui/abi/unsupported.aarch64.stderr
index 123e7663257..82908ef88a8 100644
--- a/tests/ui/abi/unsupported.aarch64.stderr
+++ b/tests/ui/abi/unsupported.aarch64.stderr
@@ -1,55 +1,209 @@
+warning: the calling convention "ptx-kernel" is not supported on this target
+  --> $DIR/unsupported.rs:35:15
+   |
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
+
 error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:28:1
+  --> $DIR/unsupported.rs:40:1
+   |
+LL | extern "ptx-kernel" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "aapcs" is not supported on this target
+  --> $DIR/unsupported.rs:49:17
+   |
+LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
+   |                 ^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"aapcs"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:62:1
+   |
+LL | extern "aapcs" {}
+   | ^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "msp430-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:71:18
+   |
+LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:76:1
+   |
+LL | extern "msp430-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "avr-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:81:15
+   |
+LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:86:1
+   |
+LL | extern "avr-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "riscv-interrupt-m" is not supported on this target
+  --> $DIR/unsupported.rs:94:17
+   |
+LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:105:1
+   |
+LL | extern "riscv-interrupt-m" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "x86-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:116:15
+   |
+LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:127:1
+   |
+LL | extern "x86-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "thiscall" is not supported on this target
+  --> $DIR/unsupported.rs:139:20
+   |
+LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
+   |                    ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"thiscall"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:152:1
+   |
+LL | extern "thiscall" {}
+   | ^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "stdcall" is not supported on this target
+  --> $DIR/unsupported.rs:170:19
+   |
+LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
+   |                   ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+warning: use of calling convention not supported on this target
+  --> $DIR/unsupported.rs:183:1
+   |
+LL | extern "stdcall" {}
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
+   = note: `#[warn(unsupported_calling_conventions)]` on by default
+
+warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
+  --> $DIR/unsupported.rs:195:21
+   |
+LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
+  --> $DIR/unsupported.rs:203:22
+   |
+LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:208:1
+   |
+LL | extern "C-cmse-nonsecure-entry" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:33:1
    |
 LL | extern "ptx-kernel" fn ptx() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:30:1
+  --> $DIR/unsupported.rs:43:1
    |
 LL | extern "aapcs" fn aapcs() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
+  --> $DIR/unsupported.rs:69:1
    |
 LL | extern "msp430-interrupt" fn msp430() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:38:1
+  --> $DIR/unsupported.rs:79:1
    |
 LL | extern "avr-interrupt" fn avr() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:40:1
+  --> $DIR/unsupported.rs:89:1
    |
 LL | extern "riscv-interrupt-m" fn riscv() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:45:1
+  --> $DIR/unsupported.rs:111:1
    |
 LL | extern "x86-interrupt" fn x86() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"thiscall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:50:1
+  --> $DIR/unsupported.rs:133:1
    |
 LL | extern "thiscall" fn thiscall() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:56:1
+  --> $DIR/unsupported.rs:159:1
    |
 LL | extern "stdcall" fn stdcall() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
-   = note: `#[warn(unsupported_calling_conventions)]` on by default
 
-error: aborting due to 7 previous errors; 1 warning emitted
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:201:1
+   |
+LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 16 previous errors; 12 warnings emitted
 
 For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/unsupported.arm.stderr b/tests/ui/abi/unsupported.arm.stderr
index 7376bb17d6b..39ec5d16fcd 100644
--- a/tests/ui/abi/unsupported.arm.stderr
+++ b/tests/ui/abi/unsupported.arm.stderr
@@ -1,49 +1,188 @@
+warning: the calling convention "ptx-kernel" is not supported on this target
+  --> $DIR/unsupported.rs:35:15
+   |
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
+
+error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:40:1
+   |
+LL | extern "ptx-kernel" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "msp430-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:71:18
+   |
+LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:76:1
+   |
+LL | extern "msp430-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "avr-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:81:15
+   |
+LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:86:1
+   |
+LL | extern "avr-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "riscv-interrupt-m" is not supported on this target
+  --> $DIR/unsupported.rs:94:17
+   |
+LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:105:1
+   |
+LL | extern "riscv-interrupt-m" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "x86-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:116:15
+   |
+LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:127:1
+   |
+LL | extern "x86-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "thiscall" is not supported on this target
+  --> $DIR/unsupported.rs:139:20
+   |
+LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
+   |                    ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"thiscall"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:152:1
+   |
+LL | extern "thiscall" {}
+   | ^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "stdcall" is not supported on this target
+  --> $DIR/unsupported.rs:170:19
+   |
+LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
+   |                   ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+warning: use of calling convention not supported on this target
+  --> $DIR/unsupported.rs:183:1
+   |
+LL | extern "stdcall" {}
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
+   = note: `#[warn(unsupported_calling_conventions)]` on by default
+
+warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
+  --> $DIR/unsupported.rs:195:21
+   |
+LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
+  --> $DIR/unsupported.rs:203:22
+   |
+LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:208:1
+   |
+LL | extern "C-cmse-nonsecure-entry" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
 error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:28:1
+  --> $DIR/unsupported.rs:33:1
    |
 LL | extern "ptx-kernel" fn ptx() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
+  --> $DIR/unsupported.rs:69:1
    |
 LL | extern "msp430-interrupt" fn msp430() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:38:1
+  --> $DIR/unsupported.rs:79:1
    |
 LL | extern "avr-interrupt" fn avr() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:40:1
+  --> $DIR/unsupported.rs:89:1
    |
 LL | extern "riscv-interrupt-m" fn riscv() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:45:1
+  --> $DIR/unsupported.rs:111:1
    |
 LL | extern "x86-interrupt" fn x86() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"thiscall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:50:1
+  --> $DIR/unsupported.rs:133:1
    |
 LL | extern "thiscall" fn thiscall() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:56:1
+  --> $DIR/unsupported.rs:159:1
    |
 LL | extern "stdcall" fn stdcall() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
-   = note: `#[warn(unsupported_calling_conventions)]` on by default
 
-error: aborting due to 6 previous errors; 1 warning emitted
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:201:1
+   |
+LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 14 previous errors; 11 warnings emitted
 
 For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/unsupported.i686.stderr b/tests/ui/abi/unsupported.i686.stderr
index 23b0e581887..1dc01a66aab 100644
--- a/tests/ui/abi/unsupported.i686.stderr
+++ b/tests/ui/abi/unsupported.i686.stderr
@@ -1,33 +1,139 @@
+warning: the calling convention "ptx-kernel" is not supported on this target
+  --> $DIR/unsupported.rs:35:15
+   |
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
+
+error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:40:1
+   |
+LL | extern "ptx-kernel" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "aapcs" is not supported on this target
+  --> $DIR/unsupported.rs:49:17
+   |
+LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
+   |                 ^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"aapcs"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:62:1
+   |
+LL | extern "aapcs" {}
+   | ^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "msp430-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:71:18
+   |
+LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:76:1
+   |
+LL | extern "msp430-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "avr-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:81:15
+   |
+LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:86:1
+   |
+LL | extern "avr-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "riscv-interrupt-m" is not supported on this target
+  --> $DIR/unsupported.rs:94:17
+   |
+LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:105:1
+   |
+LL | extern "riscv-interrupt-m" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
+  --> $DIR/unsupported.rs:195:21
+   |
+LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
+  --> $DIR/unsupported.rs:203:22
+   |
+LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:208:1
+   |
+LL | extern "C-cmse-nonsecure-entry" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
 error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:28:1
+  --> $DIR/unsupported.rs:33:1
    |
 LL | extern "ptx-kernel" fn ptx() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:30:1
+  --> $DIR/unsupported.rs:43:1
    |
 LL | extern "aapcs" fn aapcs() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
+  --> $DIR/unsupported.rs:69:1
    |
 LL | extern "msp430-interrupt" fn msp430() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:38:1
+  --> $DIR/unsupported.rs:79:1
    |
 LL | extern "avr-interrupt" fn avr() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:40:1
+  --> $DIR/unsupported.rs:89:1
    |
 LL | extern "riscv-interrupt-m" fn riscv() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 5 previous errors
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:201:1
+   |
+LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 12 previous errors; 7 warnings emitted
 
 For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/unsupported.riscv32.stderr b/tests/ui/abi/unsupported.riscv32.stderr
index 708fd2c92a9..e7d5197feeb 100644
--- a/tests/ui/abi/unsupported.riscv32.stderr
+++ b/tests/ui/abi/unsupported.riscv32.stderr
@@ -1,49 +1,188 @@
+warning: the calling convention "ptx-kernel" is not supported on this target
+  --> $DIR/unsupported.rs:35:15
+   |
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
+
 error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:28:1
+  --> $DIR/unsupported.rs:40:1
+   |
+LL | extern "ptx-kernel" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "aapcs" is not supported on this target
+  --> $DIR/unsupported.rs:49:17
+   |
+LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
+   |                 ^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"aapcs"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:62:1
+   |
+LL | extern "aapcs" {}
+   | ^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "msp430-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:71:18
+   |
+LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:76:1
+   |
+LL | extern "msp430-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "avr-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:81:15
+   |
+LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:86:1
+   |
+LL | extern "avr-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "x86-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:116:15
+   |
+LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:127:1
+   |
+LL | extern "x86-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "thiscall" is not supported on this target
+  --> $DIR/unsupported.rs:139:20
+   |
+LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
+   |                    ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"thiscall"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:152:1
+   |
+LL | extern "thiscall" {}
+   | ^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "stdcall" is not supported on this target
+  --> $DIR/unsupported.rs:170:19
+   |
+LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
+   |                   ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+warning: use of calling convention not supported on this target
+  --> $DIR/unsupported.rs:183:1
+   |
+LL | extern "stdcall" {}
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
+   = note: `#[warn(unsupported_calling_conventions)]` on by default
+
+warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
+  --> $DIR/unsupported.rs:195:21
+   |
+LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
+  --> $DIR/unsupported.rs:203:22
+   |
+LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:208:1
+   |
+LL | extern "C-cmse-nonsecure-entry" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:33:1
    |
 LL | extern "ptx-kernel" fn ptx() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:30:1
+  --> $DIR/unsupported.rs:43:1
    |
 LL | extern "aapcs" fn aapcs() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
+  --> $DIR/unsupported.rs:69:1
    |
 LL | extern "msp430-interrupt" fn msp430() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:38:1
+  --> $DIR/unsupported.rs:79:1
    |
 LL | extern "avr-interrupt" fn avr() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:45:1
+  --> $DIR/unsupported.rs:111:1
    |
 LL | extern "x86-interrupt" fn x86() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"thiscall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:50:1
+  --> $DIR/unsupported.rs:133:1
    |
 LL | extern "thiscall" fn thiscall() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:56:1
+  --> $DIR/unsupported.rs:159:1
    |
 LL | extern "stdcall" fn stdcall() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
-   = note: `#[warn(unsupported_calling_conventions)]` on by default
 
-error: aborting due to 6 previous errors; 1 warning emitted
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:201:1
+   |
+LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 14 previous errors; 11 warnings emitted
 
 For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/unsupported.riscv64.stderr b/tests/ui/abi/unsupported.riscv64.stderr
index 708fd2c92a9..e7d5197feeb 100644
--- a/tests/ui/abi/unsupported.riscv64.stderr
+++ b/tests/ui/abi/unsupported.riscv64.stderr
@@ -1,49 +1,188 @@
+warning: the calling convention "ptx-kernel" is not supported on this target
+  --> $DIR/unsupported.rs:35:15
+   |
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
+
 error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:28:1
+  --> $DIR/unsupported.rs:40:1
+   |
+LL | extern "ptx-kernel" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "aapcs" is not supported on this target
+  --> $DIR/unsupported.rs:49:17
+   |
+LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
+   |                 ^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"aapcs"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:62:1
+   |
+LL | extern "aapcs" {}
+   | ^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "msp430-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:71:18
+   |
+LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:76:1
+   |
+LL | extern "msp430-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "avr-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:81:15
+   |
+LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:86:1
+   |
+LL | extern "avr-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "x86-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:116:15
+   |
+LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:127:1
+   |
+LL | extern "x86-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "thiscall" is not supported on this target
+  --> $DIR/unsupported.rs:139:20
+   |
+LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
+   |                    ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"thiscall"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:152:1
+   |
+LL | extern "thiscall" {}
+   | ^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "stdcall" is not supported on this target
+  --> $DIR/unsupported.rs:170:19
+   |
+LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
+   |                   ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+warning: use of calling convention not supported on this target
+  --> $DIR/unsupported.rs:183:1
+   |
+LL | extern "stdcall" {}
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
+   = note: `#[warn(unsupported_calling_conventions)]` on by default
+
+warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
+  --> $DIR/unsupported.rs:195:21
+   |
+LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
+  --> $DIR/unsupported.rs:203:22
+   |
+LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:208:1
+   |
+LL | extern "C-cmse-nonsecure-entry" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:33:1
    |
 LL | extern "ptx-kernel" fn ptx() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:30:1
+  --> $DIR/unsupported.rs:43:1
    |
 LL | extern "aapcs" fn aapcs() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
+  --> $DIR/unsupported.rs:69:1
    |
 LL | extern "msp430-interrupt" fn msp430() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:38:1
+  --> $DIR/unsupported.rs:79:1
    |
 LL | extern "avr-interrupt" fn avr() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:45:1
+  --> $DIR/unsupported.rs:111:1
    |
 LL | extern "x86-interrupt" fn x86() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"thiscall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:50:1
+  --> $DIR/unsupported.rs:133:1
    |
 LL | extern "thiscall" fn thiscall() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:56:1
+  --> $DIR/unsupported.rs:159:1
    |
 LL | extern "stdcall" fn stdcall() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
-   = note: `#[warn(unsupported_calling_conventions)]` on by default
 
-error: aborting due to 6 previous errors; 1 warning emitted
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:201:1
+   |
+LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 14 previous errors; 11 warnings emitted
 
 For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/unsupported.rs b/tests/ui/abi/unsupported.rs
index c12883e3fce..0eb039269a3 100644
--- a/tests/ui/abi/unsupported.rs
+++ b/tests/ui/abi/unsupported.rs
@@ -20,39 +20,142 @@
     abi_msp430_interrupt,
     abi_avr_interrupt,
     abi_x86_interrupt,
-    abi_riscv_interrupt
+    abi_riscv_interrupt,
+    abi_c_cmse_nonsecure_call,
+    cmse_nonsecure_entry
 )]
 #[lang = "sized"]
 trait Sized {}
 
+#[lang = "copy"]
+trait Copy {}
+
 extern "ptx-kernel" fn ptx() {}
 //~^ ERROR is not a supported ABI
+fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+    //~^ WARN unsupported_fn_ptr_calling_conventions
+    //~^^ WARN this was previously accepted
+    f()
+}
+extern "ptx-kernel" {}
+//~^ ERROR is not a supported ABI
+
 extern "aapcs" fn aapcs() {}
 //[x64]~^ ERROR is not a supported ABI
 //[i686]~^^ ERROR is not a supported ABI
 //[aarch64]~^^^ ERROR is not a supported ABI
 //[riscv32]~^^^^ ERROR is not a supported ABI
 //[riscv64]~^^^^^ ERROR is not a supported ABI
+fn aapcs_ptr(f: extern "aapcs" fn()) {
+    //[x64]~^ WARN unsupported_fn_ptr_calling_conventions
+    //[x64]~^^ WARN this was previously accepted
+    //[i686]~^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[i686]~^^^^ WARN this was previously accepted
+    //[aarch64]~^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[aarch64]~^^^^^^ WARN this was previously accepted
+    //[riscv32]~^^^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[riscv32]~^^^^^^^^ WARN this was previously accepted
+    //[riscv64]~^^^^^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[riscv64]~^^^^^^^^^^ WARN this was previously accepted
+    f()
+}
+extern "aapcs" {}
+//[x64]~^ ERROR is not a supported ABI
+//[i686]~^^ ERROR is not a supported ABI
+//[aarch64]~^^^ ERROR is not a supported ABI
+//[riscv32]~^^^^ ERROR is not a supported ABI
+//[riscv64]~^^^^^ ERROR is not a supported ABI
+
 extern "msp430-interrupt" fn msp430() {}
 //~^ ERROR is not a supported ABI
+fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+    //~^ WARN unsupported_fn_ptr_calling_conventions
+    //~^^ WARN this was previously accepted
+    f()
+}
+extern "msp430-interrupt" {}
+//~^ ERROR is not a supported ABI
+
 extern "avr-interrupt" fn avr() {}
 //~^ ERROR is not a supported ABI
+fn avr_ptr(f: extern "avr-interrupt" fn()) {
+    //~^ WARN unsupported_fn_ptr_calling_conventions
+    //~^^ WARN this was previously accepted
+    f()
+}
+extern "avr-interrupt" {}
+//~^ ERROR is not a supported ABI
+
 extern "riscv-interrupt-m" fn riscv() {}
 //[arm]~^ ERROR is not a supported ABI
 //[x64]~^^ ERROR is not a supported ABI
 //[i686]~^^^ ERROR is not a supported ABI
 //[aarch64]~^^^^ ERROR is not a supported ABI
+fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
+    //[arm]~^ WARN unsupported_fn_ptr_calling_conventions
+    //[arm]~^^ WARN this was previously accepted
+    //[x64]~^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[x64]~^^^^ WARN this was previously accepted
+    //[i686]~^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[i686]~^^^^^^ WARN this was previously accepted
+    //[aarch64]~^^^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[aarch64]~^^^^^^^^ WARN this was previously accepted
+    f()
+}
+extern "riscv-interrupt-m" {}
+//[arm]~^ ERROR is not a supported ABI
+//[x64]~^^ ERROR is not a supported ABI
+//[i686]~^^^ ERROR is not a supported ABI
+//[aarch64]~^^^^ ERROR is not a supported ABI
+
 extern "x86-interrupt" fn x86() {}
 //[aarch64]~^ ERROR is not a supported ABI
 //[arm]~^^ ERROR is not a supported ABI
 //[riscv32]~^^^ ERROR is not a supported ABI
 //[riscv64]~^^^^ ERROR is not a supported ABI
+fn x86_ptr(f: extern "x86-interrupt" fn()) {
+    //[aarch64]~^ WARN unsupported_fn_ptr_calling_conventions
+    //[aarch64]~^^ WARN this was previously accepted
+    //[arm]~^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[arm]~^^^^ WARN this was previously accepted
+    //[riscv32]~^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[riscv32]~^^^^^^ WARN this was previously accepted
+    //[riscv64]~^^^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[riscv64]~^^^^^^^^ WARN this was previously accepted
+    f()
+}
+extern "x86-interrupt" {}
+//[aarch64]~^ ERROR is not a supported ABI
+//[arm]~^^ ERROR is not a supported ABI
+//[riscv32]~^^^ ERROR is not a supported ABI
+//[riscv64]~^^^^ ERROR is not a supported ABI
+
 extern "thiscall" fn thiscall() {}
 //[x64]~^ ERROR is not a supported ABI
 //[arm]~^^ ERROR is not a supported ABI
 //[aarch64]~^^^ ERROR is not a supported ABI
 //[riscv32]~^^^^ ERROR is not a supported ABI
 //[riscv64]~^^^^^ ERROR is not a supported ABI
+fn thiscall_ptr(f: extern "thiscall" fn()) {
+    //[x64]~^ WARN unsupported_fn_ptr_calling_conventions
+    //[x64]~^^ WARN this was previously accepted
+    //[arm]~^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[arm]~^^^^ WARN this was previously accepted
+    //[aarch64]~^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[aarch64]~^^^^^^ WARN this was previously accepted
+    //[riscv32]~^^^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[riscv32]~^^^^^^^^ WARN this was previously accepted
+    //[riscv64]~^^^^^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[riscv64]~^^^^^^^^^^ WARN this was previously accepted
+    f()
+}
+extern "thiscall" {}
+//[x64]~^ ERROR is not a supported ABI
+//[arm]~^^ ERROR is not a supported ABI
+//[aarch64]~^^^ ERROR is not a supported ABI
+//[riscv32]~^^^^ ERROR is not a supported ABI
+//[riscv64]~^^^^^ ERROR is not a supported ABI
+
 extern "stdcall" fn stdcall() {}
 //[x64]~^ WARN use of calling convention not supported
 //[x64]~^^ WARN this was previously accepted
@@ -64,3 +167,43 @@ extern "stdcall" fn stdcall() {}
 //[riscv32]~^^^^^^^^ WARN this was previously accepted
 //[riscv64]~^^^^^^^^^ WARN use of calling convention not supported
 //[riscv64]~^^^^^^^^^^ WARN this was previously accepted
+fn stdcall_ptr(f: extern "stdcall" fn()) {
+    //[x64]~^ WARN unsupported_fn_ptr_calling_conventions
+    //[x64]~^^ WARN this was previously accepted
+    //[arm]~^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[arm]~^^^^ WARN this was previously accepted
+    //[aarch64]~^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[aarch64]~^^^^^^ WARN this was previously accepted
+    //[riscv32]~^^^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[riscv32]~^^^^^^^^ WARN this was previously accepted
+    //[riscv64]~^^^^^^^^^ WARN unsupported_fn_ptr_calling_conventions
+    //[riscv64]~^^^^^^^^^^ WARN this was previously accepted
+    f()
+}
+extern "stdcall" {}
+//[x64]~^ WARN use of calling convention not supported
+//[x64]~^^ WARN this was previously accepted
+//[arm]~^^^ WARN use of calling convention not supported
+//[arm]~^^^^ WARN this was previously accepted
+//[aarch64]~^^^^^ WARN use of calling convention not supported
+//[aarch64]~^^^^^^ WARN this was previously accepted
+//[riscv32]~^^^^^^^ WARN use of calling convention not supported
+//[riscv32]~^^^^^^^^ WARN this was previously accepted
+//[riscv64]~^^^^^^^^^ WARN use of calling convention not supported
+//[riscv64]~^^^^^^^^^^ WARN this was previously accepted
+
+fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
+    //~^ WARN unsupported_fn_ptr_calling_conventions
+    //~^^ WARN this was previously accepted
+    f()
+}
+
+extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
+//~^ ERROR is not a supported ABI
+fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
+    //~^ WARN unsupported_fn_ptr_calling_conventions
+    //~^^ WARN this was previously accepted
+    f()
+}
+extern "C-cmse-nonsecure-entry" {}
+//~^ ERROR is not a supported ABI
diff --git a/tests/ui/abi/unsupported.x64.stderr b/tests/ui/abi/unsupported.x64.stderr
index 7b918a948d3..bbca754dd41 100644
--- a/tests/ui/abi/unsupported.x64.stderr
+++ b/tests/ui/abi/unsupported.x64.stderr
@@ -1,49 +1,188 @@
+warning: the calling convention "ptx-kernel" is not supported on this target
+  --> $DIR/unsupported.rs:35:15
+   |
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
+
 error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:28:1
+  --> $DIR/unsupported.rs:40:1
+   |
+LL | extern "ptx-kernel" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "aapcs" is not supported on this target
+  --> $DIR/unsupported.rs:49:17
+   |
+LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
+   |                 ^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"aapcs"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:62:1
+   |
+LL | extern "aapcs" {}
+   | ^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "msp430-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:71:18
+   |
+LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:76:1
+   |
+LL | extern "msp430-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "avr-interrupt" is not supported on this target
+  --> $DIR/unsupported.rs:81:15
+   |
+LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:86:1
+   |
+LL | extern "avr-interrupt" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "riscv-interrupt-m" is not supported on this target
+  --> $DIR/unsupported.rs:94:17
+   |
+LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:105:1
+   |
+LL | extern "riscv-interrupt-m" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "thiscall" is not supported on this target
+  --> $DIR/unsupported.rs:139:20
+   |
+LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
+   |                    ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"thiscall"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:152:1
+   |
+LL | extern "thiscall" {}
+   | ^^^^^^^^^^^^^^^^^^^^
+
+warning: the calling convention "stdcall" is not supported on this target
+  --> $DIR/unsupported.rs:170:19
+   |
+LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
+   |                   ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+warning: use of calling convention not supported on this target
+  --> $DIR/unsupported.rs:183:1
+   |
+LL | extern "stdcall" {}
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
+   = note: `#[warn(unsupported_calling_conventions)]` on by default
+
+warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
+  --> $DIR/unsupported.rs:195:21
+   |
+LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
+  --> $DIR/unsupported.rs:203:22
+   |
+LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
+
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:208:1
+   |
+LL | extern "C-cmse-nonsecure-entry" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:33:1
    |
 LL | extern "ptx-kernel" fn ptx() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:30:1
+  --> $DIR/unsupported.rs:43:1
    |
 LL | extern "aapcs" fn aapcs() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
+  --> $DIR/unsupported.rs:69:1
    |
 LL | extern "msp430-interrupt" fn msp430() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:38:1
+  --> $DIR/unsupported.rs:79:1
    |
 LL | extern "avr-interrupt" fn avr() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:40:1
+  --> $DIR/unsupported.rs:89:1
    |
 LL | extern "riscv-interrupt-m" fn riscv() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0570]: `"thiscall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:50:1
+  --> $DIR/unsupported.rs:133:1
    |
 LL | extern "thiscall" fn thiscall() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:56:1
+  --> $DIR/unsupported.rs:159:1
    |
 LL | extern "stdcall" fn stdcall() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
-   = note: `#[warn(unsupported_calling_conventions)]` on by default
 
-error: aborting due to 6 previous errors; 1 warning emitted
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:201:1
+   |
+LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 14 previous errors; 11 warnings emitted
 
 For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/allocator/dyn-compatible.rs b/tests/ui/allocator/dyn-compatible.rs
new file mode 100644
index 00000000000..9d8235e58d9
--- /dev/null
+++ b/tests/ui/allocator/dyn-compatible.rs
@@ -0,0 +1,13 @@
+//@ run-pass
+
+// Check that `Allocator` is dyn-compatible, this allows for polymorphic allocators
+
+#![feature(allocator_api)]
+
+use std::alloc::{Allocator, System};
+
+fn ensure_dyn_compatible(_: &dyn Allocator) {}
+
+fn main() {
+    ensure_dyn_compatible(&System);
+}
diff --git a/tests/ui/allocator/object-safe.rs b/tests/ui/allocator/object-safe.rs
deleted file mode 100644
index 1c1f4fe0bf6..00000000000
--- a/tests/ui/allocator/object-safe.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-//@ run-pass
-
-// Check that `Allocator` is object safe, this allows for polymorphic allocators
-
-#![feature(allocator_api)]
-
-use std::alloc::{Allocator, System};
-
-fn ensure_object_safe(_: &dyn Allocator) {}
-
-fn main() {
-    ensure_object_safe(&System);
-}
diff --git a/tests/ui/asm/aarch64/aarch64-sve.rs b/tests/ui/asm/aarch64/aarch64-sve.rs
new file mode 100644
index 00000000000..8cdc9dd4266
--- /dev/null
+++ b/tests/ui/asm/aarch64/aarch64-sve.rs
@@ -0,0 +1,28 @@
+//@ only-aarch64
+//@ build-pass
+//@ needs-asm-support
+
+#![crate_type = "rlib"]
+#![feature(no_core, rustc_attrs, lang_items)]
+#![no_core]
+
+// AArch64 test corresponding to arm64ec-sve.rs.
+
+#[lang = "sized"]
+trait Sized {}
+#[lang = "copy"]
+trait Copy {}
+
+impl Copy for f64 {}
+
+#[rustc_builtin_macro]
+macro_rules! asm {
+    () => {};
+}
+
+fn f(x: f64) {
+    unsafe {
+        asm!("", out("p0") _);
+        asm!("", out("ffr") _);
+    }
+}
diff --git a/tests/ui/asm/aarch64/arm64ec-sve.rs b/tests/ui/asm/aarch64/arm64ec-sve.rs
new file mode 100644
index 00000000000..389b365a754
--- /dev/null
+++ b/tests/ui/asm/aarch64/arm64ec-sve.rs
@@ -0,0 +1,31 @@
+//@ compile-flags: --target arm64ec-pc-windows-msvc
+//@ needs-asm-support
+//@ needs-llvm-components: aarch64
+
+#![crate_type = "rlib"]
+#![feature(no_core, rustc_attrs, lang_items, asm_experimental_arch)]
+#![no_core]
+
+// SVE cannot be used for Arm64EC
+// https://github.com/rust-lang/rust/pull/131332#issuecomment-2401189142
+
+#[lang = "sized"]
+trait Sized {}
+#[lang = "copy"]
+trait Copy {}
+
+impl Copy for f64 {}
+
+#[rustc_builtin_macro]
+macro_rules! asm {
+    () => {};
+}
+
+fn f(x: f64) {
+    unsafe {
+        asm!("", out("p0") _);
+        //~^ ERROR cannot use register `p0`
+        asm!("", out("ffr") _);
+        //~^ ERROR cannot use register `ffr`
+    }
+}
diff --git a/tests/ui/asm/aarch64/arm64ec-sve.stderr b/tests/ui/asm/aarch64/arm64ec-sve.stderr
new file mode 100644
index 00000000000..3e1a5d57004
--- /dev/null
+++ b/tests/ui/asm/aarch64/arm64ec-sve.stderr
@@ -0,0 +1,14 @@
+error: cannot use register `p0`: x13, x14, x23, x24, x28, v16-v31, p*, ffr cannot be used for Arm64EC
+  --> $DIR/arm64ec-sve.rs:26:18
+   |
+LL |         asm!("", out("p0") _);
+   |                  ^^^^^^^^^^^
+
+error: cannot use register `ffr`: x13, x14, x23, x24, x28, v16-v31, p*, ffr cannot be used for Arm64EC
+  --> $DIR/arm64ec-sve.rs:28:18
+   |
+LL |         asm!("", out("ffr") _);
+   |                  ^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/associated-type-bounds/entails-sized-object-safety.rs b/tests/ui/associated-type-bounds/entails-sized-dyn-compatibility.rs
index ad2cbe48209..943df68493f 100644
--- a/tests/ui/associated-type-bounds/entails-sized-object-safety.rs
+++ b/tests/ui/associated-type-bounds/entails-sized-dyn-compatibility.rs
@@ -4,21 +4,21 @@ trait Tr1: Sized { type As1; }
 trait Tr2<'a>: Sized { type As2; }
 
 trait ObjTr1 { fn foo() -> Self where Self: Tr1<As1: Copy>; }
-fn _assert_obj_safe_1(_: Box<dyn ObjTr1>) {}
+fn _assert_dyn_compat_1(_: Box<dyn ObjTr1>) {}
 
 trait ObjTr2 { fn foo() -> Self where Self: Tr1<As1: 'static>; }
-fn _assert_obj_safe_2(_: Box<dyn ObjTr2>) {}
+fn _assert_dyn_compat_2(_: Box<dyn ObjTr2>) {}
 
 trait ObjTr3 { fn foo() -> Self where Self: Tr1<As1: Into<u8> + 'static + Copy>; }
-fn _assert_obj_safe_3(_: Box<dyn ObjTr3>) {}
+fn _assert_dyn_compat_3(_: Box<dyn ObjTr3>) {}
 
 trait ObjTr4 { fn foo() -> Self where Self: Tr1<As1: for<'a> Tr2<'a>>; }
-fn _assert_obj_safe_4(_: Box<dyn ObjTr4>) {}
+fn _assert_dyn_compat_4(_: Box<dyn ObjTr4>) {}
 
 trait ObjTr5 { fn foo() -> Self where for<'a> Self: Tr1<As1: Tr2<'a>>; }
-fn _assert_obj_safe_5(_: Box<dyn ObjTr5>) {}
+fn _assert_dyn_compat_5(_: Box<dyn ObjTr5>) {}
 
 trait ObjTr6 { fn foo() -> Self where Self: for<'a> Tr1<As1: Tr2<'a, As2: for<'b> Tr2<'b>>>; }
-fn _assert_obj_safe_6(_: Box<dyn ObjTr6>) {}
+fn _assert_dyn_compat_6(_: Box<dyn ObjTr6>) {}
 
 fn main() {}
diff --git a/tests/ui/associated-type-bounds/suggest-assoc-ty-bound-on-eq-bound.rs b/tests/ui/associated-type-bounds/suggest-assoc-ty-bound-on-eq-bound.rs
index 7df042d5f88..c8bb0ebd574 100644
--- a/tests/ui/associated-type-bounds/suggest-assoc-ty-bound-on-eq-bound.rs
+++ b/tests/ui/associated-type-bounds/suggest-assoc-ty-bound-on-eq-bound.rs
@@ -2,28 +2,24 @@
 //@ edition: 2021
 
 fn f(_: impl Trait<T = Copy>) {}
-//~^ ERROR trait objects must include the `dyn` keyword
-//~| HELP add `dyn` keyword before this trait
+//~^ ERROR expected a type, found a trait
+//~| HELP you can add the `dyn` keyword if you want a trait object
 //~| HELP you might have meant to write a bound here
-//~| ERROR the trait `Copy` cannot be made into an object
 
 fn g(_: impl Trait<T = std::fmt::Debug + Eq>) {}
-//~^ ERROR trait objects must include the `dyn` keyword
-//~| HELP add `dyn` keyword before this trait
+//~^ ERROR expected a type, found a trait
+//~| HELP you can add the `dyn` keyword if you want a trait object
 //~| HELP you might have meant to write a bound here
-//~| ERROR only auto traits can be used as additional traits in a trait object
-//~| HELP consider creating a new trait
-//~| ERROR the trait `Eq` cannot be made into an object
 
 fn h(_: impl Trait<T<> = 'static + for<'a> Fn(&'a ())>) {}
-//~^ ERROR trait objects must include the `dyn` keyword
-//~| HELP add `dyn` keyword before this trait
+//~^ ERROR expected a type, found a trait
+//~| HELP you can add the `dyn` keyword if you want a trait object
 //~| HELP you might have meant to write a bound here
 
 // Don't suggest assoc ty bound in trait object types, that's not valid:
 type Obj = dyn Trait<T = Clone>;
-//~^ ERROR trait objects must include the `dyn` keyword
-//~| HELP add `dyn` keyword before this trait
+//~^ ERROR expected a type, found a trait
+//~| HELP you can add the `dyn` keyword if you want a trait object
 
 trait Trait { type T; }
 
diff --git a/tests/ui/associated-type-bounds/suggest-assoc-ty-bound-on-eq-bound.stderr b/tests/ui/associated-type-bounds/suggest-assoc-ty-bound-on-eq-bound.stderr
index bec60187e42..dbe285c5310 100644
--- a/tests/ui/associated-type-bounds/suggest-assoc-ty-bound-on-eq-bound.stderr
+++ b/tests/ui/associated-type-bounds/suggest-assoc-ty-bound-on-eq-bound.stderr
@@ -1,41 +1,10 @@
-error[E0038]: the trait `Copy` cannot be made into an object
-  --> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:4:20
-   |
-LL | fn f(_: impl Trait<T = Copy>) {}
-   |                    ^^^^^^^^ `Copy` cannot be made into an object
-   |
-   = note: the trait cannot be made into an object because it requires `Self: Sized`
-   = note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-
-error[E0225]: only auto traits can be used as additional traits in a trait object
-  --> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:10:42
-   |
-LL | fn g(_: impl Trait<T = std::fmt::Debug + Eq>) {}
-   |                        ---------------   ^^ additional non-auto trait
-   |                        |
-   |                        first non-auto trait
-   |
-   = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Debug + Eq {}`
-   = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
-
-error[E0038]: the trait `Eq` cannot be made into an object
-  --> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:10:24
-   |
-LL | fn g(_: impl Trait<T = std::fmt::Debug + Eq>) {}
-   |                        ^^^^^^^^^^^^^^^^^^^^ `Eq` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   |
-   = note: the trait cannot be made into an object because it uses `Self` as a type parameter
-
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:4:24
    |
 LL | fn f(_: impl Trait<T = Copy>) {}
    |                        ^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | fn f(_: impl Trait<T = dyn Copy>) {}
    |                        +++
@@ -44,13 +13,13 @@ help: you might have meant to write a bound here
 LL | fn f(_: impl Trait<T: Copy>) {}
    |                     ~
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:10:24
+error[E0782]: expected a type, found a trait
+  --> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:9:24
    |
 LL | fn g(_: impl Trait<T = std::fmt::Debug + Eq>) {}
    |                        ^^^^^^^^^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | fn g(_: impl Trait<T = dyn std::fmt::Debug + Eq>) {}
    |                        +++
@@ -59,13 +28,13 @@ help: you might have meant to write a bound here
 LL | fn g(_: impl Trait<T: std::fmt::Debug + Eq>) {}
    |                     ~
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:18:26
+error[E0782]: expected a type, found a trait
+  --> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:14:26
    |
 LL | fn h(_: impl Trait<T<> = 'static + for<'a> Fn(&'a ())>) {}
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | fn h(_: impl Trait<T<> = dyn 'static + for<'a> Fn(&'a ())>) {}
    |                          +++
@@ -74,18 +43,17 @@ help: you might have meant to write a bound here
 LL | fn h(_: impl Trait<T<>: 'static + for<'a> Fn(&'a ())>) {}
    |                       ~
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:24:26
+error[E0782]: expected a type, found a trait
+  --> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:20:26
    |
 LL | type Obj = dyn Trait<T = Clone>;
    |                          ^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | type Obj = dyn Trait<T = dyn Clone>;
    |                          +++
 
-error: aborting due to 7 previous errors
+error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0038, E0225, E0782.
-For more information about an error, try `rustc --explain E0038`.
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/associated-types/associated-types-coherence-failure.stderr b/tests/ui/associated-types/associated-types-coherence-failure.stderr
index 211613b3714..25c22e5f82a 100644
--- a/tests/ui/associated-types/associated-types-coherence-failure.stderr
+++ b/tests/ui/associated-types/associated-types-coherence-failure.stderr
@@ -1,20 +1,20 @@
-error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `Cow<'_, _>`
+error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `<_ as ToOwned>::Owned`
   --> $DIR/associated-types-coherence-failure.rs:21:1
    |
 LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwned {
    | ----------------------------------------------------------------------------- first implementation here
 ...
 LL | impl<'a, B: ?Sized> IntoCow<'a, B> for Cow<'a, B> where B: ToOwned {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Cow<'_, _>`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<_ as ToOwned>::Owned`
 
-error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `&_`
+error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `<_ as ToOwned>::Owned`
   --> $DIR/associated-types-coherence-failure.rs:28:1
    |
 LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwned {
    | ----------------------------------------------------------------------------- first implementation here
 ...
 LL | impl<'a, B: ?Sized> IntoCow<'a, B> for &'a B where B: ToOwned {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<_ as ToOwned>::Owned`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/associated-types/remove-invalid-type-bound-suggest-issue-127555.rs b/tests/ui/associated-types/remove-invalid-type-bound-suggest-issue-127555.rs
index 6083cc7d96d..b4df58b3c25 100644
--- a/tests/ui/associated-types/remove-invalid-type-bound-suggest-issue-127555.rs
+++ b/tests/ui/associated-types/remove-invalid-type-bound-suggest-issue-127555.rs
@@ -14,7 +14,6 @@ impl Foo for Baz {
     //~^ ERROR `F` cannot be sent between threads safely
     where
         F: FnMut() + Send,
-        //~^ ERROR impl has stricter requirements than trait
     {
         ()
     }
diff --git a/tests/ui/associated-types/remove-invalid-type-bound-suggest-issue-127555.stderr b/tests/ui/associated-types/remove-invalid-type-bound-suggest-issue-127555.stderr
index 7f3cd2a5900..e6379954776 100644
--- a/tests/ui/associated-types/remove-invalid-type-bound-suggest-issue-127555.stderr
+++ b/tests/ui/associated-types/remove-invalid-type-bound-suggest-issue-127555.stderr
@@ -16,18 +16,6 @@ LL |     async fn bar<F>(&mut self, _func: F) -> ()
 LL |         F: FnMut() + Send,
    |                      ^^^^ required by this bound in `<Baz as Foo>::bar`
 
-error[E0276]: impl has stricter requirements than trait
-  --> $DIR/remove-invalid-type-bound-suggest-issue-127555.rs:16:22
-   |
-LL | /     fn bar<F>(&mut self, func: F) -> impl std::future::Future<Output = ()> + Send
-LL | |     where
-LL | |         F: FnMut();
-   | |___________________- definition of `bar` from trait
-...
-LL |           F: FnMut() + Send,
-   |                        ^^^^ impl has extra requirement `F: Send`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0276, E0277.
-For more information about an error, try `rustc --explain E0276`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/in-trait/object-safety.rs b/tests/ui/async-await/in-trait/dyn-compatibility.rs
index 8174a803e79..8174a803e79 100644
--- a/tests/ui/async-await/in-trait/object-safety.rs
+++ b/tests/ui/async-await/in-trait/dyn-compatibility.rs
diff --git a/tests/ui/async-await/in-trait/object-safety.stderr b/tests/ui/async-await/in-trait/dyn-compatibility.stderr
index 8e73abab933..5cc3b6800dd 100644
--- a/tests/ui/async-await/in-trait/object-safety.stderr
+++ b/tests/ui/async-await/in-trait/dyn-compatibility.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:9:12
+  --> $DIR/dyn-compatibility.rs:9:12
    |
 LL |     let x: &dyn Foo = todo!();
    |            ^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:5:14
+  --> $DIR/dyn-compatibility.rs:5:14
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/async-await/pin-sugar-ambiguity.rs b/tests/ui/async-await/pin-sugar-ambiguity.rs
new file mode 100644
index 00000000000..d183000931e
--- /dev/null
+++ b/tests/ui/async-await/pin-sugar-ambiguity.rs
@@ -0,0 +1,15 @@
+//@ check-pass
+#![feature(pin_ergonomics)]
+#![allow(dead_code, incomplete_features)]
+
+// Handle the case where there's ambiguity between pin as a contextual keyword and pin as a path.
+
+struct Foo;
+
+mod pin {
+    pub struct Foo;
+}
+
+fn main() {
+    let _x: &pin ::Foo = &pin::Foo;
+}
diff --git a/tests/ui/async-await/pin-sugar-no-const.rs b/tests/ui/async-await/pin-sugar-no-const.rs
new file mode 100644
index 00000000000..dd6456b6034
--- /dev/null
+++ b/tests/ui/async-await/pin-sugar-no-const.rs
@@ -0,0 +1,8 @@
+#![feature(pin_ergonomics)]
+#![allow(incomplete_features)]
+
+// Makes sure we don't accidentally accept `&pin Foo` without the `const` keyword.
+
+fn main() {
+    let _x: &pin i32 = todo!(); //~ ERROR found `i32`
+}
diff --git a/tests/ui/async-await/pin-sugar-no-const.stderr b/tests/ui/async-await/pin-sugar-no-const.stderr
new file mode 100644
index 00000000000..5f01156c1f0
--- /dev/null
+++ b/tests/ui/async-await/pin-sugar-no-const.stderr
@@ -0,0 +1,15 @@
+error: expected one of `!`, `(`, `::`, `;`, `<`, or `=`, found `i32`
+  --> $DIR/pin-sugar-no-const.rs:7:18
+   |
+LL |     let _x: &pin i32 = todo!();
+   |           -      ^^^ expected one of `!`, `(`, `::`, `;`, `<`, or `=`
+   |           |
+   |           while parsing the type for `_x`
+   |
+help: there is a keyword `in` with a similar name
+   |
+LL |     let _x: &in i32 = todo!();
+   |              ~~
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/async-await/pin-sugar.rs b/tests/ui/async-await/pin-sugar.rs
new file mode 100644
index 00000000000..8dbdec418b1
--- /dev/null
+++ b/tests/ui/async-await/pin-sugar.rs
@@ -0,0 +1,51 @@
+//@ check-pass
+
+#![feature(pin_ergonomics)]
+#![allow(dead_code, incomplete_features)]
+
+// Makes sure we can handle `&pin mut T` and `&pin const T` as sugar for `Pin<&mut T>` and
+// `Pin<&T>`.
+
+use std::pin::Pin;
+
+struct Foo;
+
+impl Foo {
+    fn baz(self: &pin mut Self) {
+    }
+
+    fn baz_const(self: &pin const Self) {
+    }
+
+    fn baz_lt<'a>(self: &'a pin mut Self) {
+    }
+
+    fn baz_const_lt(self: &'_ pin const Self) {
+    }
+}
+
+fn foo(_: &pin mut Foo) {
+}
+
+fn foo_const(x: &pin const Foo) {
+}
+
+fn bar(x: &pin mut Foo) {
+    foo(x);
+    foo(x); // for this to work we need to automatically reborrow,
+            // as if the user had written `foo(x.as_mut())`.
+
+    Foo::baz(x);
+    Foo::baz(x);
+
+    // make sure we can reborrow &mut as &.
+    foo_const(x);
+    Foo::baz_const(x);
+
+    let x: &pin const _ = Pin::new(&Foo);
+
+    foo_const(x); // make sure reborrowing from & to & works.
+    foo_const(x);
+}
+
+fn main() {}
diff --git a/tests/ui/auto-traits/opaque_type_candidate_selection.rs b/tests/ui/auto-traits/opaque_type_candidate_selection.rs
deleted file mode 100644
index d6973b76a6e..00000000000
--- a/tests/ui/auto-traits/opaque_type_candidate_selection.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-//! used to ICE: #119272
-
-//@ check-pass
-
-#![feature(type_alias_impl_trait)]
-mod defining_scope {
-    use super::*;
-    pub type Alias<T> = impl Sized;
-
-    pub fn cast<T>(x: Container<Alias<T>, T>) -> Container<T, T> {
-        x
-    }
-}
-
-struct Container<T: Trait<U>, U> {
-    x: <T as Trait<U>>::Assoc,
-}
-
-trait Trait<T> {
-    type Assoc;
-}
-
-impl<T> Trait<T> for T {
-    type Assoc = Box<u32>;
-}
-impl<T> Trait<T> for defining_scope::Alias<T> {
-    type Assoc = usize;
-}
-
-fn main() {}
diff --git a/tests/ui/autodiff/autodiff_illegal.rs b/tests/ui/autodiff/autodiff_illegal.rs
new file mode 100644
index 00000000000..c0548d2bbb8
--- /dev/null
+++ b/tests/ui/autodiff/autodiff_illegal.rs
@@ -0,0 +1,160 @@
+//@ needs-enzyme
+
+#![feature(autodiff)]
+//@ pretty-mode:expanded
+//@ pretty-compare-only
+//@ pp-exact:autodiff_illegal.pp
+
+// Test that invalid ad macros give nice errors and don't ICE.
+
+use std::autodiff::autodiff;
+
+// We can't use Duplicated on scalars
+#[autodiff(df1, Reverse, Duplicated)]
+pub fn f1(x: f64) {
+//~^ ERROR     Duplicated can not be used for this type
+    unimplemented!()
+}
+
+// Too many activities
+#[autodiff(df3, Reverse, Duplicated, Const)]
+pub fn f3(x: f64) {
+//~^^ ERROR     expected 1 activities, but found 2
+    unimplemented!()
+}
+
+// To few activities
+#[autodiff(df4, Reverse)]
+pub fn f4(x: f64) {
+//~^^ ERROR     expected 1 activities, but found 0
+    unimplemented!()
+}
+
+// We can't use Dual in Reverse mode
+#[autodiff(df5, Reverse, Dual)]
+pub fn f5(x: f64) {
+//~^^ ERROR     Dual can not be used in Reverse Mode
+    unimplemented!()
+}
+
+// We can't use Duplicated in Forward mode
+#[autodiff(df6, Forward, Duplicated)]
+pub fn f6(x: f64) {
+//~^^ ERROR Duplicated can not be used in Forward Mode
+//~^^ ERROR Duplicated can not be used for this type
+    unimplemented!()
+}
+
+fn dummy() {
+
+    #[autodiff(df7, Forward, Dual)]
+    let mut x = 5;
+    //~^ ERROR autodiff must be applied to function
+
+    #[autodiff(df7, Forward, Dual)]
+    x = x + 3;
+    //~^^ ERROR attributes on expressions are experimental [E0658]
+    //~^^ ERROR autodiff must be applied to function
+
+    #[autodiff(df7, Forward, Dual)]
+    let add_one_v2 = |x: u32| -> u32 { x + 1 };
+    //~^ ERROR autodiff must be applied to function
+}
+
+// Malformed, where args?
+#[autodiff]
+pub fn f7(x: f64) {
+//~^ ERROR autodiff must be applied to function
+    unimplemented!()
+}
+
+// Malformed, where args?
+#[autodiff()]
+pub fn f8(x: f64) {
+//~^ ERROR autodiff requires at least a name and mode
+    unimplemented!()
+}
+
+// Invalid attribute syntax
+#[autodiff = ""]
+pub fn f9(x: f64) {
+//~^ ERROR autodiff must be applied to function
+    unimplemented!()
+}
+
+fn fn_exists() {}
+
+// We colide with an already existing function
+#[autodiff(fn_exists, Reverse, Active)]
+pub fn f10(x: f64) {
+//~^^ ERROR the name `fn_exists` is defined multiple times [E0428]
+    unimplemented!()
+}
+
+// Malformed, missing a mode
+#[autodiff(df11)]
+pub fn f11() {
+//~^ ERROR autodiff requires at least a name and mode
+    unimplemented!()
+}
+
+// Invalid Mode
+#[autodiff(df12, Debug)]
+pub fn f12() {
+//~^^ ERROR unknown Mode: `Debug`. Use `Forward` or `Reverse`
+    unimplemented!()
+}
+
+// Invalid, please pick one Mode
+// or use two autodiff macros.
+#[autodiff(df13, Forward, Reverse)]
+pub fn f13() {
+//~^^ ERROR did not recognize Activity: `Reverse`
+    unimplemented!()
+}
+
+struct Foo {}
+
+// We can't handle Active structs, because that would mean (in the general case), that we would
+// need to allocate and initialize arbitrary user types. We have Duplicated/Dual input args for
+// that. FIXME: Give a nicer error and suggest to the user to have a `&mut Foo` input instead.
+#[autodiff(df14, Reverse, Active, Active)]
+fn f14(x: f32) -> Foo {
+    unimplemented!()
+}
+
+type MyFloat = f32;
+
+// We would like to support type alias to f32/f64 in argument type in the future,
+// but that requires us to implement our checks at a later stage
+// like THIR which has type information available.
+#[autodiff(df15, Reverse, Active, Active)]
+fn f15(x: MyFloat) -> f32 {
+//~^^ ERROR failed to resolve: use of undeclared type `MyFloat` [E0433]
+    unimplemented!()
+}
+
+// We would like to support type alias to f32/f64 in return type in the future
+#[autodiff(df16, Reverse, Active, Active)]
+fn f16(x: f32) -> MyFloat {
+    unimplemented!()
+}
+
+#[repr(transparent)]
+struct F64Trans { inner: f64 }
+
+// We would like to support `#[repr(transparent)]` f32/f64 wrapper in return type in the future
+#[autodiff(df17, Reverse, Active, Active)]
+fn f17(x: f64) -> F64Trans {
+    unimplemented!()
+}
+
+// We would like to support `#[repr(transparent)]` f32/f64 wrapper in argument type in the future
+#[autodiff(df18, Reverse, Active, Active)]
+fn f18(x: F64Trans) -> f64 {
+    //~^^ ERROR failed to resolve: use of undeclared type `F64Trans` [E0433]
+    unimplemented!()
+}
+
+
+fn main() {}
diff --git a/tests/ui/autodiff/autodiff_illegal.stderr b/tests/ui/autodiff/autodiff_illegal.stderr
new file mode 100644
index 00000000000..3a7242b2f5d
--- /dev/null
+++ b/tests/ui/autodiff/autodiff_illegal.stderr
@@ -0,0 +1,152 @@
+error[E0658]: attributes on expressions are experimental
+  --> $DIR/autodiff_illegal.rs:54:5
+   |
+LL |     #[autodiff(df7, Forward, Dual)]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
+   = help: add `#![feature(stmt_expr_attributes)]` 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: Duplicated can not be used for this type
+  --> $DIR/autodiff_illegal.rs:14:14
+   |
+LL | pub fn f1(x: f64) {
+   |              ^^^
+
+error: expected 1 activities, but found 2
+  --> $DIR/autodiff_illegal.rs:20:1
+   |
+LL | #[autodiff(df3, Reverse, Duplicated, Const)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: expected 1 activities, but found 0
+  --> $DIR/autodiff_illegal.rs:27:1
+   |
+LL | #[autodiff(df4, Reverse)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: Dual can not be used in Reverse Mode
+  --> $DIR/autodiff_illegal.rs:34:1
+   |
+LL | #[autodiff(df5, Reverse, Dual)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: Duplicated can not be used in Forward Mode
+  --> $DIR/autodiff_illegal.rs:41:1
+   |
+LL | #[autodiff(df6, Forward, Duplicated)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: Duplicated can not be used for this type
+  --> $DIR/autodiff_illegal.rs:42:14
+   |
+LL | pub fn f6(x: f64) {
+   |              ^^^
+
+error: autodiff must be applied to function
+  --> $DIR/autodiff_illegal.rs:51:5
+   |
+LL |     let mut x = 5;
+   |     ^^^^^^^^^^^^^^
+
+error: autodiff must be applied to function
+  --> $DIR/autodiff_illegal.rs:55:5
+   |
+LL |     x = x + 3;
+   |     ^
+
+error: autodiff must be applied to function
+  --> $DIR/autodiff_illegal.rs:60:5
+   |
+LL |     let add_one_v2 = |x: u32| -> u32 { x + 1 };
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: autodiff must be applied to function
+  --> $DIR/autodiff_illegal.rs:66:1
+   |
+LL | / pub fn f7(x: f64) {
+LL | |
+LL | |     unimplemented!()
+LL | | }
+   | |_^
+
+error: autodiff requires at least a name and mode
+  --> $DIR/autodiff_illegal.rs:73:1
+   |
+LL | / pub fn f8(x: f64) {
+LL | |
+LL | |     unimplemented!()
+LL | | }
+   | |_^
+
+error: autodiff must be applied to function
+  --> $DIR/autodiff_illegal.rs:80:1
+   |
+LL | / pub fn f9(x: f64) {
+LL | |
+LL | |     unimplemented!()
+LL | | }
+   | |_^
+
+error[E0428]: the name `fn_exists` is defined multiple times
+  --> $DIR/autodiff_illegal.rs:88:1
+   |
+LL | fn fn_exists() {}
+   | -------------- previous definition of the value `fn_exists` here
+...
+LL | #[autodiff(fn_exists, Reverse, Active)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `fn_exists` redefined here
+   |
+   = note: `fn_exists` must be defined only once in the value namespace of this module
+   = note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: autodiff requires at least a name and mode
+  --> $DIR/autodiff_illegal.rs:96:1
+   |
+LL | / pub fn f11() {
+LL | |
+LL | |     unimplemented!()
+LL | | }
+   | |_^
+
+error: unknown Mode: `Debug`. Use `Forward` or `Reverse`
+  --> $DIR/autodiff_illegal.rs:102:18
+   |
+LL | #[autodiff(df12, Debug)]
+   |                  ^^^^^
+
+error: did not recognize Activity: `Reverse`
+  --> $DIR/autodiff_illegal.rs:110:27
+   |
+LL | #[autodiff(df13, Forward, Reverse)]
+   |                           ^^^^^^^
+
+error[E0433]: failed to resolve: use of undeclared type `MyFloat`
+  --> $DIR/autodiff_illegal.rs:131:1
+   |
+LL | #[autodiff(df15, Reverse, Active, Active)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `MyFloat`
+   |
+   = note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0433]: failed to resolve: use of undeclared type `F64Trans`
+  --> $DIR/autodiff_illegal.rs:153:1
+   |
+LL | #[autodiff(df18, Reverse, Active, Active)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `F64Trans`
+   |
+   = note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 19 previous errors
+
+Some errors have detailed explanations: E0428, E0433, E0658.
+For more information about an error, try `rustc --explain E0428`.
diff --git a/tests/ui/autodiff/auxiliary/my_macro.rs b/tests/ui/autodiff/auxiliary/my_macro.rs
new file mode 100644
index 00000000000..417199611cc
--- /dev/null
+++ b/tests/ui/autodiff/auxiliary/my_macro.rs
@@ -0,0 +1,12 @@
+//@ force-host
+//@ no-prefer-dynamic
+#![crate_type = "proc-macro"]
+
+extern crate proc_macro;
+use proc_macro::TokenStream;
+
+#[proc_macro_attribute]
+#[macro_use]
+pub fn autodiff(_attr: TokenStream, item: TokenStream) -> TokenStream {
+    item // identity proc-macro
+}
diff --git a/tests/ui/autodiff/visibility.rs b/tests/ui/autodiff/visibility.rs
new file mode 100644
index 00000000000..6a4851de2dc
--- /dev/null
+++ b/tests/ui/autodiff/visibility.rs
@@ -0,0 +1,17 @@
+//@ ignore-enzyme
+//@ revisions: std_autodiff no_std_autodiff
+//@[no_std_autodiff] check-pass
+//@ aux-build: my_macro.rs
+#![crate_type = "lib"]
+#![feature(autodiff)]
+
+#[cfg(std_autodiff)]
+use std::autodiff::autodiff;
+
+extern crate my_macro;
+use my_macro::autodiff; // bring `autodiff` in scope
+
+#[autodiff]
+//[std_autodiff]~^^^ ERROR the name `autodiff` is defined multiple times
+//[std_autodiff]~^^ ERROR this rustc version does not support autodiff
+fn foo() {}
diff --git a/tests/ui/autodiff/visibility.std_autodiff.stderr b/tests/ui/autodiff/visibility.std_autodiff.stderr
new file mode 100644
index 00000000000..720c9a00170
--- /dev/null
+++ b/tests/ui/autodiff/visibility.std_autodiff.stderr
@@ -0,0 +1,24 @@
+error[E0252]: the name `autodiff` is defined multiple times
+  --> $DIR/visibility.rs:12:5
+   |
+LL | use std::autodiff::autodiff;
+   |     ----------------------- previous import of the macro `autodiff` here
+...
+LL | use my_macro::autodiff; // bring `autodiff` in scope
+   |     ^^^^^^^^^^^^^^^^^^ `autodiff` reimported here
+   |
+   = note: `autodiff` must be defined only once in the macro namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | use my_macro::autodiff as other_autodiff; // bring `autodiff` in scope
+   |                        +++++++++++++++++
+
+error: this rustc version does not support autodiff
+  --> $DIR/visibility.rs:14:1
+   |
+LL | #[autodiff]
+   | ^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0252`.
diff --git a/tests/ui/backtrace/dylib-dep.rs b/tests/ui/backtrace/dylib-dep.rs
index fcd1f92e28e..a41931ad548 100644
--- a/tests/ui/backtrace/dylib-dep.rs
+++ b/tests/ui/backtrace/dylib-dep.rs
@@ -9,6 +9,7 @@
 //@ ignore-musl musl doesn't support dynamic libraries (at least when the original test was written).
 //@ needs-unwind
 //@ compile-flags: -g -Copt-level=0 -Cstrip=none -Cforce-frame-pointers=yes
+//@ ignore-emscripten Requires custom symbolization code
 //@ aux-crate: dylib_dep_helper=dylib-dep-helper.rs
 //@ aux-crate: auxiliary=dylib-dep-helper-aux.rs
 //@ run-pass
diff --git a/tests/ui/backtrace/line-tables-only.rs b/tests/ui/backtrace/line-tables-only.rs
index 044f59e483a..6624c71e184 100644
--- a/tests/ui/backtrace/line-tables-only.rs
+++ b/tests/ui/backtrace/line-tables-only.rs
@@ -10,6 +10,7 @@
 //@ compile-flags: -Cstrip=none -Cdebuginfo=line-tables-only
 //@ ignore-android FIXME #17520
 //@ ignore-fuchsia Backtraces not symbolized
+//@ ignore-emscripten Requires custom symbolization code
 //@ needs-unwind
 //@ aux-build: line-tables-only-helper.rs
 
diff --git a/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs b/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs
index fce6210b2f4..d47a8e085fd 100644
--- a/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs
+++ b/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs
@@ -1,3 +1,5 @@
+//@ only-x86_64
+
 fn efiapi(f: extern "efiapi" fn(usize, ...)) {
     //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
     //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
diff --git a/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr b/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr
index 94e9628f0f0..41be3784245 100644
--- a/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr
+++ b/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr
@@ -1,5 +1,5 @@
 error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
-  --> $DIR/feature-gate-extended_varargs_abi_support.rs:1:14
+  --> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14
    |
 LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -9,13 +9,13 @@ LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
-  --> $DIR/feature-gate-extended_varargs_abi_support.rs:1:14
+  --> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14
    |
 LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
 
 error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
-  --> $DIR/feature-gate-extended_varargs_abi_support.rs:6:12
+  --> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12
    |
 LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -25,13 +25,13 @@ LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
-  --> $DIR/feature-gate-extended_varargs_abi_support.rs:6:12
+  --> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12
    |
 LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
 
 error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
-  --> $DIR/feature-gate-extended_varargs_abi_support.rs:11:11
+  --> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11
    |
 LL | fn win(f: extern "win64" fn(usize, ...)) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -41,7 +41,7 @@ LL | fn win(f: extern "win64" fn(usize, ...)) {
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
-  --> $DIR/feature-gate-extended_varargs_abi_support.rs:11:11
+  --> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11
    |
 LL | fn win(f: extern "win64" fn(usize, ...)) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
diff --git a/tests/ui/c-variadic/variadic-ffi-2-arm.rs b/tests/ui/c-variadic/variadic-ffi-2-arm.rs
new file mode 100644
index 00000000000..3b0a71007a0
--- /dev/null
+++ b/tests/ui/c-variadic/variadic-ffi-2-arm.rs
@@ -0,0 +1,9 @@
+//@ only-arm
+//@ build-pass
+#![feature(extended_varargs_abi_support)]
+
+fn aapcs(f: extern "aapcs" fn(usize, ...)) {
+    f(22, 44);
+}
+
+fn main() {}
diff --git a/tests/ui/c-variadic/variadic-ffi-2.rs b/tests/ui/c-variadic/variadic-ffi-2.rs
index a7261ebe936..bafb7e2b20c 100644
--- a/tests/ui/c-variadic/variadic-ffi-2.rs
+++ b/tests/ui/c-variadic/variadic-ffi-2.rs
@@ -1,6 +1,7 @@
 //@ ignore-arm stdcall isn't supported
 #![feature(extended_varargs_abi_support)]
 
+#[allow(unsupported_fn_ptr_calling_conventions)]
 fn baz(f: extern "stdcall" fn(usize, ...)) {
     //~^ ERROR: C-variadic function must have a compatible calling convention,
     // like C, cdecl, system, aapcs, win64, sysv64 or efiapi
@@ -10,15 +11,22 @@ fn baz(f: extern "stdcall" fn(usize, ...)) {
 fn system(f: extern "system" fn(usize, ...)) {
     f(22, 44);
 }
-fn aapcs(f: extern "aapcs" fn(usize, ...)) {
-    f(22, 44);
-}
+#[cfg(target_arch = "x86_64")]
 fn sysv(f: extern "sysv64" fn(usize, ...)) {
     f(22, 44);
 }
+#[cfg(target_arch = "x86_64")]
 fn win(f: extern "win64" fn(usize, ...)) {
     f(22, 44);
 }
+#[cfg(any(
+    target_arch = "arm",
+    target_arch = "aarch64",
+    target_arch = "riscv32",
+    target_arch = "riscv64",
+    target_arch = "x86",
+    target_arch = "x86_64"
+))]
 fn efiapi(f: extern "efiapi" fn(usize, ...)) {
     f(22, 44);
 }
diff --git a/tests/ui/c-variadic/variadic-ffi-2.stderr b/tests/ui/c-variadic/variadic-ffi-2.stderr
index fbf273b1f1d..e52de93a926 100644
--- a/tests/ui/c-variadic/variadic-ffi-2.stderr
+++ b/tests/ui/c-variadic/variadic-ffi-2.stderr
@@ -1,5 +1,5 @@
 error[E0045]: C-variadic function must have a compatible calling convention, like `C`, `cdecl`, `system`, `aapcs`, `win64`, `sysv64` or `efiapi`
-  --> $DIR/variadic-ffi-2.rs:4:11
+  --> $DIR/variadic-ffi-2.rs:5:11
    |
 LL | fn baz(f: extern "stdcall" fn(usize, ...)) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
diff --git a/tests/ui/cfg/cfg-target-compact-errors.rs b/tests/ui/cfg/cfg-target-compact-errors.rs
index daacbb2851d..e00d42fe4d9 100644
--- a/tests/ui/cfg/cfg-target-compact-errors.rs
+++ b/tests/ui/cfg/cfg-target-compact-errors.rs
@@ -14,4 +14,8 @@ fn two() {}
 //~^ ERROR invalid predicate `target_pointer`
 fn three() {}
 
+#[cfg(target(true))]
+//~^ ERROR `cfg` predicate key must be an identifier
+fn four() {}
+
 fn main() {}
diff --git a/tests/ui/cfg/cfg-target-compact-errors.stderr b/tests/ui/cfg/cfg-target-compact-errors.stderr
index bb858301eb5..219d9732c32 100644
--- a/tests/ui/cfg/cfg-target-compact-errors.stderr
+++ b/tests/ui/cfg/cfg-target-compact-errors.stderr
@@ -16,7 +16,13 @@ error[E0537]: invalid predicate `target_pointer`
 LL | #[cfg(target(os = "linux", pointer(width = "64")))]
    |                            ^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 3 previous errors
+error: `cfg` predicate key must be an identifier
+  --> $DIR/cfg-target-compact-errors.rs:17:14
+   |
+LL | #[cfg(target(true))]
+   |              ^^^^
+
+error: aborting due to 4 previous errors
 
 Some errors have detailed explanations: E0537, E0565.
 For more information about an error, try `rustc --explain E0537`.
diff --git a/tests/ui/check-cfg/mix.stderr b/tests/ui/check-cfg/mix.stderr
index 7726c2d52f5..c21016e9290 100644
--- a/tests/ui/check-cfg/mix.stderr
+++ b/tests/ui/check-cfg/mix.stderr
@@ -251,7 +251,7 @@ warning: unexpected `cfg` condition value: `zebra`
 LL |     cfg!(target_feature = "zebra");
    |          ^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `amx-bf16`, `amx-complex`, `amx-fp16`, `amx-int8`, `amx-tile`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, and `avx512vpopcntdq` and 244 more
+   = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `amx-bf16`, `amx-complex`, `amx-fp16`, `amx-int8`, `amx-tile`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, and `avx512vpopcntdq` and 245 more
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 
 warning: 27 warnings emitted
diff --git a/tests/ui/check-cfg/well-known-values.stderr b/tests/ui/check-cfg/well-known-values.stderr
index c6d403104ea..da790bbd528 100644
--- a/tests/ui/check-cfg/well-known-values.stderr
+++ b/tests/ui/check-cfg/well-known-values.stderr
@@ -174,7 +174,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
 LL |     target_feature = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `amx-bf16`, `amx-complex`, `amx-fp16`, `amx-int8`, `amx-tile`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `avxifma`, `avxneconvert`, `avxvnni`, `avxvnniint16`, `avxvnniint8`, `backchain`, `bf16`, `bmi1`, `bmi2`, `bti`, `bulk-memory`, `c`, `cache`, `cmpxchg16b`, `crc`, `crt-static`, `cssc`, `d`, `d32`, `dit`, `doloop`, `dotprod`, `dpb`, `dpb2`, `dsp`, `dsp1e2`, `dspe60`, `e`, `e1`, `e2`, `ecv`, `edsp`, `elrw`, `ermsb`, `exception-handling`, `extended-const`, `f`, `f16c`, `f32mm`, `f64mm`, `faminmax`, `fcma`, `fdivdu`, `fhm`, `flagm`, `flagm2`, `float1e2`, `float1e3`, `float3e4`, `float7e60`, `floate1`, `fma`, `fp-armv8`, `fp16`, `fp64`, `fp8`, `fp8dot2`, `fp8dot4`, `fp8fma`, `fpuv2_df`, `fpuv2_sf`, `fpuv3_df`, `fpuv3_hf`, `fpuv3_hi`, `fpuv3_sf`, `frecipe`, `frintts`, `fxsr`, `gfni`, `hard-float`, `hard-float-abi`, `hard-tp`, `hbc`, `high-registers`, `hvx`, `hvx-length128b`, `hwdiv`, `i8mm`, `jsconv`, `lahfsahf`, `lasx`, `lbt`, `lor`, `lse`, `lse128`, `lse2`, `lsx`, `lut`, `lvz`, `lzcnt`, `m`, `mclass`, `mops`, `movbe`, `mp`, `mp1e2`, `msa`, `mte`, `multivalue`, `mutable-globals`, `neon`, `nontrapping-fptoint`, `nvic`, `paca`, `pacg`, `pan`, `partword-atomics`, `pclmulqdq`, `pmuv3`, `popcnt`, `power10-vector`, `power8-altivec`, `power8-vector`, `power9-altivec`, `power9-vector`, `prfchw`, `quadword-atomics`, `rand`, `ras`, `rclass`, `rcpc`, `rcpc2`, `rcpc3`, `rdm`, `rdrand`, `rdseed`, `reference-types`, `relax`, `relaxed-simd`, `rtm`, `sb`, `sha`, `sha2`, `sha3`, `sha512`, `sign-ext`, `simd128`, `sm3`, `sm4`, `sme`, `sme-f16f16`, `sme-f64f64`, `sme-f8f16`, `sme-f8f32`, `sme-fa64`, `sme-i16i64`, `sme-lutv2`, `sme2`, `sme2p1`, `spe`, `ssbs`, `sse`, `sse2`, `sse3`, `sse4.1`, `sse4.2`, `sse4a`, `ssse3`, `ssve-fp8dot2`, `ssve-fp8dot4`, `ssve-fp8fma`, `sve`, `sve-b16b16`, `sve2`, `sve2-aes`, `sve2-bitperm`, `sve2-sha3`, `sve2-sm4`, `sve2p1`, `tbm`, `thumb-mode`, `thumb2`, `tme`, `trust`, `trustzone`, `ual`, `unaligned-scalar-mem`, `v`, `v5te`, `v6`, `v6k`, `v6t2`, `v7`, `v8`, `v8.1a`, `v8.2a`, `v8.3a`, `v8.4a`, `v8.5a`, `v8.6a`, `v8.7a`, `v8.8a`, `v8.9a`, `v9.1a`, `v9.2a`, `v9.3a`, `v9.4a`, `v9.5a`, `v9a`, `vaes`, `vdsp2e60f`, `vdspv1`, `vdspv2`, `vector`, `vfp2`, `vfp3`, `vfp4`, `vh`, `virt`, `virtualization`, `vpclmulqdq`, `vsx`, `wfxt`, `xop`, `xsave`, `xsavec`, `xsaveopt`, `xsaves`, `zaamo`, `zabha`, `zalrsc`, `zba`, `zbb`, `zbc`, `zbkb`, `zbkc`, `zbkx`, `zbs`, `zdinx`, `zfh`, `zfhmin`, `zfinx`, `zhinx`, `zhinxmin`, `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, and `zkt`
+   = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `amx-bf16`, `amx-complex`, `amx-fp16`, `amx-int8`, `amx-tile`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `avxifma`, `avxneconvert`, `avxvnni`, `avxvnniint16`, `avxvnniint8`, `backchain`, `bf16`, `bmi1`, `bmi2`, `bti`, `bulk-memory`, `c`, `cache`, `cmpxchg16b`, `crc`, `crt-static`, `cssc`, `d`, `d32`, `dit`, `doloop`, `dotprod`, `dpb`, `dpb2`, `dsp`, `dsp1e2`, `dspe60`, `e`, `e1`, `e2`, `ecv`, `edsp`, `elrw`, `ermsb`, `exception-handling`, `extended-const`, `f`, `f16c`, `f32mm`, `f64mm`, `faminmax`, `fcma`, `fdivdu`, `fhm`, `flagm`, `flagm2`, `float1e2`, `float1e3`, `float3e4`, `float7e60`, `floate1`, `fma`, `fp-armv8`, `fp16`, `fp64`, `fp8`, `fp8dot2`, `fp8dot4`, `fp8fma`, `fpuv2_df`, `fpuv2_sf`, `fpuv3_df`, `fpuv3_hf`, `fpuv3_hi`, `fpuv3_sf`, `frecipe`, `frintts`, `fxsr`, `gfni`, `hard-float`, `hard-float-abi`, `hard-tp`, `hbc`, `high-registers`, `hvx`, `hvx-length128b`, `hwdiv`, `i8mm`, `jsconv`, `lahfsahf`, `lasx`, `lbt`, `lor`, `lse`, `lse128`, `lse2`, `lsx`, `lut`, `lvz`, `lzcnt`, `m`, `mclass`, `mops`, `movbe`, `mp`, `mp1e2`, `msa`, `mte`, `multivalue`, `mutable-globals`, `neon`, `nontrapping-fptoint`, `nvic`, `paca`, `pacg`, `pan`, `partword-atomics`, `pclmulqdq`, `pmuv3`, `popcnt`, `power10-vector`, `power8-altivec`, `power8-vector`, `power9-altivec`, `power9-vector`, `prfchw`, `quadword-atomics`, `rand`, `ras`, `rclass`, `rcpc`, `rcpc2`, `rcpc3`, `rdm`, `rdrand`, `rdseed`, `reference-types`, `relax`, `relaxed-simd`, `rtm`, `sb`, `sha`, `sha2`, `sha3`, `sha512`, `sign-ext`, `simd128`, `sm3`, `sm4`, `sme`, `sme-b16b16`, `sme-f16f16`, `sme-f64f64`, `sme-f8f16`, `sme-f8f32`, `sme-fa64`, `sme-i16i64`, `sme-lutv2`, `sme2`, `sme2p1`, `spe`, `ssbs`, `sse`, `sse2`, `sse3`, `sse4.1`, `sse4.2`, `sse4a`, `ssse3`, `ssve-fp8dot2`, `ssve-fp8dot4`, `ssve-fp8fma`, `sve`, `sve-b16b16`, `sve2`, `sve2-aes`, `sve2-bitperm`, `sve2-sha3`, `sve2-sm4`, `sve2p1`, `tbm`, `thumb-mode`, `thumb2`, `tme`, `trust`, `trustzone`, `ual`, `unaligned-scalar-mem`, `v`, `v5te`, `v6`, `v6k`, `v6t2`, `v7`, `v8`, `v8.1a`, `v8.2a`, `v8.3a`, `v8.4a`, `v8.5a`, `v8.6a`, `v8.7a`, `v8.8a`, `v8.9a`, `v9.1a`, `v9.2a`, `v9.3a`, `v9.4a`, `v9.5a`, `v9a`, `vaes`, `vdsp2e60f`, `vdspv1`, `vdspv2`, `vector`, `vfp2`, `vfp3`, `vfp4`, `vh`, `virt`, `virtualization`, `vpclmulqdq`, `vsx`, `wfxt`, `xop`, `xsave`, `xsavec`, `xsaveopt`, `xsaves`, `zaamo`, `zabha`, `zalrsc`, `zba`, `zbb`, `zbc`, `zbkb`, `zbkc`, `zbkx`, `zbs`, `zdinx`, `zfh`, `zfhmin`, `zfinx`, `zhinx`, `zhinxmin`, `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, and `zkt`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.rs
index e05dbf3bbc4..2d0ed5d2a30 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.rs
@@ -1,8 +1,9 @@
 // gate-test-abi_c_cmse_nonsecure_call
+#[allow(unsupported_fn_ptr_calling_conventions)]
 fn main() {
     let non_secure_function = unsafe {
         core::mem::transmute::<usize, extern "C-cmse-nonsecure-call" fn(i32, i32, i32, i32) -> i32>(
-        //~^ ERROR [E0658]
+            //~^ ERROR [E0658]
             0x10000004,
         )
     };
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr
index 64e9b7cc639..120d5cc5293 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr
@@ -1,5 +1,5 @@
 error[E0658]: C-cmse-nonsecure-call ABI is experimental and subject to change
-  --> $DIR/gate_test.rs:4:46
+  --> $DIR/gate_test.rs:5:46
    |
 LL |         core::mem::transmute::<usize, extern "C-cmse-nonsecure-call" fn(i32, i32, i32, i32) -> i32>(
    |                                              ^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.rs
new file mode 100644
index 00000000000..a264bba6f3c
--- /dev/null
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.rs
@@ -0,0 +1,77 @@
+//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
+//@ needs-llvm-components: arm
+#![feature(cmse_nonsecure_entry, c_variadic, no_core, lang_items)]
+#![no_core]
+#[lang = "sized"]
+pub trait Sized {}
+#[lang = "copy"]
+pub trait Copy {}
+impl Copy for u32 {}
+
+#[repr(C)]
+struct Wrapper<T>(T);
+
+impl<T: Copy> Wrapper<T> {
+    extern "C-cmse-nonsecure-entry" fn ambient_generic(_: T, _: u32, _: u32, _: u32) -> u64 {
+        //~^ ERROR [E0798]
+        0
+    }
+
+    extern "C-cmse-nonsecure-entry" fn ambient_generic_nested(
+        //~^ ERROR [E0798]
+        _: Wrapper<T>,
+        _: u32,
+        _: u32,
+        _: u32,
+    ) -> u64 {
+        0
+    }
+}
+
+extern "C-cmse-nonsecure-entry" fn introduced_generic<U: Copy>(
+    //~^ ERROR [E0798]
+    _: U,
+    _: u32,
+    _: u32,
+    _: u32,
+) -> u64 {
+    0
+}
+
+extern "C-cmse-nonsecure-entry" fn impl_trait(_: impl Copy, _: u32, _: u32, _: u32) -> u64 {
+    //~^ ERROR [E0798]
+    0
+}
+
+extern "C-cmse-nonsecure-entry" fn reference(x: &usize) -> usize {
+    *x
+}
+
+trait Trait {}
+
+extern "C-cmse-nonsecure-entry" fn trait_object(x: &dyn Trait) -> &dyn Trait {
+    //~^ ERROR return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers [E0798]
+    x
+}
+
+extern "C-cmse-nonsecure-entry" fn static_trait_object(
+    x: &'static dyn Trait,
+) -> &'static dyn Trait {
+    //~^ ERROR return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers [E0798]
+    x
+}
+
+#[repr(transparent)]
+struct WrapperTransparent<'a>(&'a dyn Trait);
+
+extern "C-cmse-nonsecure-entry" fn wrapped_trait_object(
+    x: WrapperTransparent,
+) -> WrapperTransparent {
+    //~^ ERROR return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers [E0798]
+    x
+}
+
+extern "C-cmse-nonsecure-entry" fn c_variadic(_: u32, _: ...) {
+    //~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
+    //~| ERROR requires `va_list` lang_item
+}
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.stderr
new file mode 100644
index 00000000000..9e67f881f75
--- /dev/null
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.stderr
@@ -0,0 +1,78 @@
+error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
+  --> $DIR/generics.rs:74:55
+   |
+LL | extern "C-cmse-nonsecure-entry" fn c_variadic(_: u32, _: ...) {
+   |                                                       ^^^^^^
+
+error[E0798]: functions with the `"C-cmse-nonsecure-entry"` ABI cannot contain generics in their type
+  --> $DIR/generics.rs:31:1
+   |
+LL | / extern "C-cmse-nonsecure-entry" fn introduced_generic<U: Copy>(
+LL | |
+LL | |     _: U,
+LL | |     _: u32,
+LL | |     _: u32,
+LL | |     _: u32,
+LL | | ) -> u64 {
+   | |________^
+
+error[E0798]: functions with the `"C-cmse-nonsecure-entry"` ABI cannot contain generics in their type
+  --> $DIR/generics.rs:41:1
+   |
+LL | extern "C-cmse-nonsecure-entry" fn impl_trait(_: impl Copy, _: u32, _: u32, _: u32) -> u64 {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0798]: functions with the `"C-cmse-nonsecure-entry"` ABI cannot contain generics in their type
+  --> $DIR/generics.rs:15:5
+   |
+LL |     extern "C-cmse-nonsecure-entry" fn ambient_generic(_: T, _: u32, _: u32, _: u32) -> u64 {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0798]: functions with the `"C-cmse-nonsecure-entry"` ABI cannot contain generics in their type
+  --> $DIR/generics.rs:20:5
+   |
+LL | /     extern "C-cmse-nonsecure-entry" fn ambient_generic_nested(
+LL | |
+LL | |         _: Wrapper<T>,
+LL | |         _: u32,
+LL | |         _: u32,
+LL | |         _: u32,
+LL | |     ) -> u64 {
+   | |____________^
+
+error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/generics.rs:52:67
+   |
+LL | extern "C-cmse-nonsecure-entry" fn trait_object(x: &dyn Trait) -> &dyn Trait {
+   |                                                                   ^^^^^^^^^^ this type doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass their result via the available return registers
+   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
+
+error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/generics.rs:59:6
+   |
+LL | ) -> &'static dyn Trait {
+   |      ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass their result via the available return registers
+   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
+
+error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/generics.rs:69:6
+   |
+LL | ) -> WrapperTransparent {
+   |      ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass their result via the available return registers
+   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
+
+error: requires `va_list` lang_item
+  --> $DIR/generics.rs:74:55
+   |
+LL | extern "C-cmse-nonsecure-entry" fn c_variadic(_: u32, _: ...) {
+   |                                                       ^^^^^^
+
+error: aborting due to 9 previous errors
+
+For more information about this error, try `rustc --explain E0798`.
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs
deleted file mode 100644
index de6888fae62..00000000000
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-//@ build-pass
-//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
-//@ needs-llvm-components: arm
-#![feature(cmse_nonsecure_entry, no_core, lang_items)]
-#![no_core]
-#![crate_type = "lib"]
-#[lang = "sized"]
-trait Sized {}
-#[lang = "copy"]
-trait Copy {}
-impl Copy for u32 {}
-
-#[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn entry_function(_: u32, _: u32, _: u32, d: u32) -> u32 {
-    d
-}
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs
deleted file mode 100644
index 4413c461c04..00000000000
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-//@ build-fail
-//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
-//@ needs-llvm-components: arm
-#![feature(cmse_nonsecure_entry, no_core, lang_items)]
-#![no_core]
-#[lang = "sized"]
-trait Sized {}
-#[lang = "copy"]
-trait Copy {}
-impl Copy for u32 {}
-
-#[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn entry_function(
-    _: u32,
-    _: u32,
-    _: u32,
-    _: u32,
-    e: u32,
-) -> u32 {
-    e
-}
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.stderr
deleted file mode 100644
index cfbdda509e5..00000000000
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-error: <unknown>:0:0: in function entry_function i32 (i32, i32, i32, i32, i32): secure entry function requires arguments on stack
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.rs
new file mode 100644
index 00000000000..572d792d5a5
--- /dev/null
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.rs
@@ -0,0 +1,26 @@
+//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
+//@ needs-llvm-components: arm
+#![feature(cmse_nonsecure_entry, no_core, lang_items)]
+#![no_core]
+#[lang = "sized"]
+trait Sized {}
+#[lang = "copy"]
+trait Copy {}
+impl Copy for u32 {}
+
+#[repr(C, align(16))]
+#[allow(unused)]
+pub struct AlignRelevant(u32);
+
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn f1(_: u32, _: u32, _: u32, _: u32, _: u32, _: u32) {} //~ ERROR [E0798]
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn f2(_: u32, _: u32, _: u32, _: u16, _: u16) {} //~ ERROR [E0798]
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn f3(_: u32, _: u64, _: u32) {} //~ ERROR [E0798]
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn f4(_: AlignRelevant, _: u32) {} //~ ERROR [E0798]
+
+#[no_mangle]
+#[allow(improper_ctypes_definitions)]
+pub extern "C-cmse-nonsecure-entry" fn f5(_: [u32; 5]) {} //~ ERROR [E0798]
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.stderr
new file mode 100644
index 00000000000..b77e64c6bfb
--- /dev/null
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.stderr
@@ -0,0 +1,43 @@
+error[E0798]: arguments for `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:16:78
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn f1(_: u32, _: u32, _: u32, _: u32, _: u32, _: u32) {}
+   |                                                                              ^^^^^^^^^^^ these arguments don't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass all their arguments via the 4 32-bit available argument registers
+
+error[E0798]: arguments for `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:18:78
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn f2(_: u32, _: u32, _: u32, _: u16, _: u16) {}
+   |                                                                              ^^^ this argument doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass all their arguments via the 4 32-bit available argument registers
+
+error[E0798]: arguments for `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:20:62
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn f3(_: u32, _: u64, _: u32) {}
+   |                                                              ^^^ this argument doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass all their arguments via the 4 32-bit available argument registers
+
+error[E0798]: arguments for `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:22:64
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn f4(_: AlignRelevant, _: u32) {}
+   |                                                                ^^^ this argument doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass all their arguments via the 4 32-bit available argument registers
+
+error[E0798]: arguments for `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:26:46
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn f5(_: [u32; 5]) {}
+   |                                              ^^^^^^^^ this argument doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass all their arguments via the 4 32-bit available argument registers
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0798`.
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.rs
new file mode 100644
index 00000000000..5746d14f9b1
--- /dev/null
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.rs
@@ -0,0 +1,84 @@
+//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
+//@ needs-llvm-components: arm
+#![feature(cmse_nonsecure_entry, no_core, lang_items)]
+#![no_core]
+#[lang = "sized"]
+pub trait Sized {}
+#[lang = "copy"]
+pub trait Copy {}
+impl Copy for u32 {}
+impl Copy for u8 {}
+
+#[repr(C)]
+pub struct ReprCU64(u64);
+
+#[repr(C)]
+pub struct ReprCBytes(u8, u8, u8, u8, u8);
+
+#[repr(C)]
+pub struct U64Compound(u32, u32);
+
+#[repr(C, align(16))]
+pub struct ReprCAlign16(u16);
+
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn f1() -> ReprCU64 {
+    //~^ ERROR [E0798]
+    ReprCU64(0)
+}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn f2() -> ReprCBytes {
+    //~^ ERROR [E0798]
+    ReprCBytes(0, 1, 2, 3, 4)
+}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn f3() -> U64Compound {
+    //~^ ERROR [E0798]
+    U64Compound(2, 3)
+}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn f4() -> ReprCAlign16 {
+    //~^ ERROR [E0798]
+    ReprCAlign16(4)
+}
+
+#[no_mangle]
+#[allow(improper_ctypes_definitions)]
+pub extern "C-cmse-nonsecure-entry" fn f5() -> [u8; 5] {
+    //~^ ERROR [E0798]
+    [0xAA; 5]
+}
+#[no_mangle]
+#[allow(improper_ctypes_definitions)]
+pub extern "C-cmse-nonsecure-entry" fn u128() -> u128 {
+    //~^ ERROR [E0798]
+    123
+}
+#[no_mangle]
+#[allow(improper_ctypes_definitions)]
+pub extern "C-cmse-nonsecure-entry" fn i128() -> i128 {
+    //~^ ERROR [E0798]
+    456
+}
+
+#[repr(Rust)]
+pub union ReprRustUnionU64 {
+    _unused: u64,
+}
+
+#[repr(C)]
+pub union ReprCUnionU64 {
+    _unused: u64,
+}
+
+#[no_mangle]
+#[allow(improper_ctypes_definitions)]
+pub extern "C-cmse-nonsecure-entry" fn union_rust() -> ReprRustUnionU64 {
+    //~^ ERROR [E0798]
+    ReprRustUnionU64 { _unused: 1 }
+}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn union_c() -> ReprCUnionU64 {
+    //~^ ERROR [E0798]
+    ReprCUnionU64 { _unused: 2 }
+}
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.stderr
new file mode 100644
index 00000000000..9c885d95318
--- /dev/null
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.stderr
@@ -0,0 +1,84 @@
+error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:25:48
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn f1() -> ReprCU64 {
+   |                                                ^^^^^^^^ this type doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass their result via the available return registers
+   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
+
+error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:30:48
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn f2() -> ReprCBytes {
+   |                                                ^^^^^^^^^^ this type doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass their result via the available return registers
+   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
+
+error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:35:48
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn f3() -> U64Compound {
+   |                                                ^^^^^^^^^^^ this type doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass their result via the available return registers
+   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
+
+error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:40:48
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn f4() -> ReprCAlign16 {
+   |                                                ^^^^^^^^^^^^ this type doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass their result via the available return registers
+   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
+
+error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:47:48
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn f5() -> [u8; 5] {
+   |                                                ^^^^^^^ this type doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass their result via the available return registers
+   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
+
+error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:53:50
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn u128() -> u128 {
+   |                                                  ^^^^ this type doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass their result via the available return registers
+   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
+
+error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:59:50
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn i128() -> i128 {
+   |                                                  ^^^^ this type doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass their result via the available return registers
+   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
+
+error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:76:56
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn union_rust() -> ReprRustUnionU64 {
+   |                                                        ^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass their result via the available return registers
+   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
+
+error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:81:53
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn union_c() -> ReprCUnionU64 {
+   |                                                     ^^^^^^^^^^^^^ this type doesn't fit in the available registers
+   |
+   = note: functions with the `"C-cmse-nonsecure-entry"` ABI must pass their result via the available return registers
+   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
+
+error: aborting due to 9 previous errors
+
+For more information about this error, try `rustc --explain E0798`.
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.stderr
new file mode 100644
index 00000000000..77379f7049d
--- /dev/null
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.stderr
@@ -0,0 +1,9 @@
+error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
+  --> $DIR/trustzone-only.rs:5:1
+   |
+LL | pub extern "C-cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs
new file mode 100644
index 00000000000..8978b35d356
--- /dev/null
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs
@@ -0,0 +1,89 @@
+//@ build-pass
+//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
+//@ needs-llvm-components: arm
+#![feature(cmse_nonsecure_entry, no_core, lang_items)]
+#![no_core]
+#![crate_type = "lib"]
+#[lang = "sized"]
+pub trait Sized {}
+#[lang = "copy"]
+trait Copy {}
+impl Copy for u32 {}
+impl Copy for u8 {}
+
+#[repr(transparent)]
+pub struct ReprTransparentStruct<T> {
+    _marker1: (),
+    _marker2: (),
+    field: T,
+    _marker3: (),
+}
+
+#[repr(transparent)]
+pub enum ReprTransparentEnumU64 {
+    A(u64),
+}
+
+#[repr(C)]
+pub struct U32Compound(u16, u16);
+
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn inputs1() {}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn inputs2(_: u32, _: u32, _: u32, _: u32) {}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn inputs3(_: u64, _: u64) {}
+#[no_mangle]
+#[allow(improper_ctypes_definitions)]
+pub extern "C-cmse-nonsecure-entry" fn inputs4(_: u128) {}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn inputs5(_: f64, _: f32, _: f32) {}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn inputs6(_: ReprTransparentStruct<u64>, _: U32Compound) {}
+#[no_mangle]
+#[allow(improper_ctypes_definitions)]
+pub extern "C-cmse-nonsecure-entry" fn inputs7(_: [u32; 4]) {}
+
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn outputs1() -> u32 {
+    0
+}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn outputs2() -> u64 {
+    0
+}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn outputs3() -> i64 {
+    0
+}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn outputs4() -> f64 {
+    0.0
+}
+#[no_mangle]
+#[allow(improper_ctypes_definitions)]
+pub extern "C-cmse-nonsecure-entry" fn outputs5() -> [u8; 4] {
+    [0xAA; 4]
+}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn outputs6() -> ReprTransparentStruct<u64> {
+    ReprTransparentStruct { _marker1: (), _marker2: (), field: 0xAA, _marker3: () }
+}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn outputs7(
+) -> ReprTransparentStruct<ReprTransparentStruct<u64>> {
+    ReprTransparentStruct {
+        _marker1: (),
+        _marker2: (),
+        field: ReprTransparentStruct { _marker1: (), _marker2: (), field: 0xAA, _marker3: () },
+        _marker3: (),
+    }
+}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn outputs8() -> ReprTransparentEnumU64 {
+    ReprTransparentEnumU64::A(0)
+}
+#[no_mangle]
+pub extern "C-cmse-nonsecure-entry" fn outputs9() -> U32Compound {
+    U32Compound(1, 2)
+}
diff --git a/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs b/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.rs
index bce3b0fd729..f41d3a783ab 100644
--- a/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs
+++ b/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.rs
@@ -1,10 +1,10 @@
 // Test that we give suitable error messages when the user attempts to
 // impl a trait `Trait` for its own object type.
 
-// If the trait is not object-safe, we give a more tailored message
+// If the trait is dyn-incompatible, we give a more tailored message
 // because we're such schnuckels:
-trait NotObjectSafe { fn eq(&self, other: Self); }
-impl NotObjectSafe for dyn NotObjectSafe { }
+trait DynIncompatible { fn eq(&self, other: Self); }
+impl DynIncompatible for dyn DynIncompatible { }
 //~^ ERROR E0038
 //~| ERROR E0046
 
diff --git a/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr b/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr
new file mode 100644
index 00000000000..542be2dbc30
--- /dev/null
+++ b/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr
@@ -0,0 +1,27 @@
+error[E0038]: the trait `DynIncompatible` cannot be made into an object
+  --> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:7:26
+   |
+LL | impl DynIncompatible for dyn DynIncompatible { }
+   |                          ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` cannot be made into an object
+   |
+note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:6:45
+   |
+LL | trait DynIncompatible { fn eq(&self, other: Self); }
+   |       ---------------                       ^^^^ ...because method `eq` references the `Self` type in this parameter
+   |       |
+   |       this trait cannot be made into an object...
+   = help: consider moving `eq` to another trait
+
+error[E0046]: not all trait items implemented, missing: `eq`
+  --> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:7:1
+   |
+LL | trait DynIncompatible { fn eq(&self, other: Self); }
+   |                         -------------------------- `eq` from trait
+LL | impl DynIncompatible for dyn DynIncompatible { }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `eq` in implementation
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0038, E0046.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr b/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr
deleted file mode 100644
index ce65e079ab4..00000000000
--- a/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0038]: the trait `NotObjectSafe` cannot be made into an object
-  --> $DIR/coherence-impl-trait-for-trait-object-safe.rs:7:24
-   |
-LL | impl NotObjectSafe for dyn NotObjectSafe { }
-   |                        ^^^^^^^^^^^^^^^^^ `NotObjectSafe` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/coherence-impl-trait-for-trait-object-safe.rs:6:43
-   |
-LL | trait NotObjectSafe { fn eq(&self, other: Self); }
-   |       -------------                       ^^^^ ...because method `eq` references the `Self` type in this parameter
-   |       |
-   |       this trait cannot be made into an object...
-   = help: consider moving `eq` to another trait
-
-error[E0046]: not all trait items implemented, missing: `eq`
-  --> $DIR/coherence-impl-trait-for-trait-object-safe.rs:7:1
-   |
-LL | trait NotObjectSafe { fn eq(&self, other: Self); }
-   |                       -------------------------- `eq` from trait
-LL | impl NotObjectSafe for dyn NotObjectSafe { }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `eq` in implementation
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0038, E0046.
-For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr b/tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr
index dbb22d8937d..1d28bb46812 100644
--- a/tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr
+++ b/tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr
@@ -5,6 +5,8 @@ LL | impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {}
    | ---------------------------------------------- first implementation here
 LL | impl<'a, T> MyTrait<'a> for &'a T {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
+   |
+   = note: downstream crates may implement trait `MyPredicate<'_>` for type `&_`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr b/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr
index dbb22d8937d..1d28bb46812 100644
--- a/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr
+++ b/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr
@@ -5,6 +5,8 @@ LL | impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {}
    | ---------------------------------------------- first implementation here
 LL | impl<'a, T> MyTrait<'a> for &'a T {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
+   |
+   = note: downstream crates may implement trait `MyPredicate<'_>` for type `&_`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/coherence/coherence-overlap-downstream-inherent.old.stderr b/tests/ui/coherence/coherence-overlap-downstream-inherent.old.stderr
deleted file mode 100644
index 2938bc629b2..00000000000
--- a/tests/ui/coherence/coherence-overlap-downstream-inherent.old.stderr
+++ /dev/null
@@ -1,23 +0,0 @@
-error[E0592]: duplicate definitions with name `dummy`
-  --> $DIR/coherence-overlap-downstream-inherent.rs:10:26
-   |
-LL | impl<T:Sugar> Sweet<T> { fn dummy(&self) { } }
-   |                          ^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
-LL |
-LL | impl<T:Fruit> Sweet<T> { fn dummy(&self) { } }
-   |                          --------------- other definition for `dummy`
-
-error[E0592]: duplicate definitions with name `f`
-  --> $DIR/coherence-overlap-downstream-inherent.rs:16:38
-   |
-LL | impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} }
-   |                                      ^^^^^^^^^^^ duplicate definitions for `f`
-LL |
-LL | impl<X> A<i32, X> { fn f(&self) {} }
-   |                     ----------- other definition for `f`
-   |
-   = note: downstream crates may implement trait `Bar<_>` for type `i32`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/coherence/coherence-overlap-downstream-inherent.rs b/tests/ui/coherence/coherence-overlap-downstream-inherent.rs
index 3e90b7c7fdd..5dea33e330b 100644
--- a/tests/ui/coherence/coherence-overlap-downstream-inherent.rs
+++ b/tests/ui/coherence/coherence-overlap-downstream-inherent.rs
@@ -1,6 +1,3 @@
-//@ revisions: old next
-//@[next] compile-flags: -Znext-solver
-
 // Tests that we consider `T: Sugar + Fruit` to be ambiguous, even
 // though no impls are found.
 
diff --git a/tests/ui/coherence/coherence-overlap-downstream-inherent.next.stderr b/tests/ui/coherence/coherence-overlap-downstream-inherent.stderr
index 2938bc629b2..bbce4b530b4 100644
--- a/tests/ui/coherence/coherence-overlap-downstream-inherent.next.stderr
+++ b/tests/ui/coherence/coherence-overlap-downstream-inherent.stderr
@@ -1,5 +1,5 @@
 error[E0592]: duplicate definitions with name `dummy`
-  --> $DIR/coherence-overlap-downstream-inherent.rs:10:26
+  --> $DIR/coherence-overlap-downstream-inherent.rs:7:26
    |
 LL | impl<T:Sugar> Sweet<T> { fn dummy(&self) { } }
    |                          ^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
@@ -8,7 +8,7 @@ LL | impl<T:Fruit> Sweet<T> { fn dummy(&self) { } }
    |                          --------------- other definition for `dummy`
 
 error[E0592]: duplicate definitions with name `f`
-  --> $DIR/coherence-overlap-downstream-inherent.rs:16:38
+  --> $DIR/coherence-overlap-downstream-inherent.rs:13:38
    |
 LL | impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} }
    |                                      ^^^^^^^^^^^ duplicate definitions for `f`
diff --git a/tests/ui/coherence/coherence-overlap-downstream.next.stderr b/tests/ui/coherence/coherence-overlap-downstream.next.stderr
deleted file mode 100644
index 6c2e9466b4b..00000000000
--- a/tests/ui/coherence/coherence-overlap-downstream.next.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0119]: conflicting implementations of trait `Sweet`
-  --> $DIR/coherence-overlap-downstream.rs:11:1
-   |
-LL | impl<T:Sugar> Sweet for T { }
-   | ------------------------- first implementation here
-LL | impl<T:Fruit> Sweet for T { }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
-
-error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`
-  --> $DIR/coherence-overlap-downstream.rs:17:1
-   |
-LL | impl<X, T> Foo<X> for T where T: Bar<X> {}
-   | --------------------------------------- first implementation here
-LL | impl<X> Foo<X> for i32 {}
-   | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
-   |
-   = note: downstream crates may implement trait `Bar<_>` for type `i32`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-downstream.rs b/tests/ui/coherence/coherence-overlap-downstream.rs
index 8b99296d12a..738ec0e3d45 100644
--- a/tests/ui/coherence/coherence-overlap-downstream.rs
+++ b/tests/ui/coherence/coherence-overlap-downstream.rs
@@ -1,6 +1,3 @@
-//@ revisions: old next
-//@[next] compile-flags: -Znext-solver
-
 // Tests that we consider `T: Sugar + Fruit` to be ambiguous, even
 // though no impls are found.
 
diff --git a/tests/ui/coherence/coherence-overlap-downstream.old.stderr b/tests/ui/coherence/coherence-overlap-downstream.stderr
index 6c2e9466b4b..9ab099489d9 100644
--- a/tests/ui/coherence/coherence-overlap-downstream.old.stderr
+++ b/tests/ui/coherence/coherence-overlap-downstream.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `Sweet`
-  --> $DIR/coherence-overlap-downstream.rs:11:1
+  --> $DIR/coherence-overlap-downstream.rs:8:1
    |
 LL | impl<T:Sugar> Sweet for T { }
    | ------------------------- first implementation here
@@ -7,7 +7,7 @@ LL | impl<T:Fruit> Sweet for T { }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
 
 error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`
-  --> $DIR/coherence-overlap-downstream.rs:17:1
+  --> $DIR/coherence-overlap-downstream.rs:14:1
    |
 LL | impl<X, T> Foo<X> for T where T: Bar<X> {}
    | --------------------------------------- first implementation here
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr
deleted file mode 100644
index 2f3ad627808..00000000000
--- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0592]: duplicate definitions with name `dummy`
-  --> $DIR/coherence-overlap-issue-23516-inherent.rs:12:25
-   |
-LL | impl<T:Sugar> Cake<T> { fn dummy(&self) { } }
-   |                         ^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
-LL |
-LL | impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } }
-   |                              --------------- other definition for `dummy`
-   |
-   = note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>`
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0592`.
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs
index 53b0a40fa66..a272e620fca 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs
+++ b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.rs
@@ -1,6 +1,3 @@
-//@ revisions: old next
-//@[next] compile-flags: -Znext-solver
-
 // Tests that we consider `Box<U>: !Sugar` to be ambiguous, even
 // though we see no impl of `Sugar` for `Box`. Therefore, an overlap
 // error is reported for the following pair of impls (#23516).
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.stderr
index 2f3ad627808..aacdeb5b0f9 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr
+++ b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.stderr
@@ -1,5 +1,5 @@
 error[E0592]: duplicate definitions with name `dummy`
-  --> $DIR/coherence-overlap-issue-23516-inherent.rs:12:25
+  --> $DIR/coherence-overlap-issue-23516-inherent.rs:9:25
    |
 LL | impl<T:Sugar> Cake<T> { fn dummy(&self) { } }
    |                         ^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516.old.stderr b/tests/ui/coherence/coherence-overlap-issue-23516.old.stderr
deleted file mode 100644
index b9494774025..00000000000
--- a/tests/ui/coherence/coherence-overlap-issue-23516.old.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0119]: conflicting implementations of trait `Sweet` for type `Box<_>`
-  --> $DIR/coherence-overlap-issue-23516.rs:11:1
-   |
-LL | impl<T:Sugar> Sweet for T { }
-   | ------------------------- first implementation here
-LL | impl<U:Sugar> Sweet for Box<U> { }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Box<_>`
-   |
-   = note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>`
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516.rs b/tests/ui/coherence/coherence-overlap-issue-23516.rs
index 620e00cd057..63e42e8f412 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516.rs
+++ b/tests/ui/coherence/coherence-overlap-issue-23516.rs
@@ -1,6 +1,3 @@
-//@ revisions: old next
-//@[next] compile-flags: -Znext-solver
-
 // Tests that we consider `Box<U>: !Sugar` to be ambiguous, even
 // though we see no impl of `Sugar` for `Box`. Therefore, an overlap
 // error is reported for the following pair of impls (#23516).
diff --git a/tests/ui/coherence/coherence-overlap-issue-23516.next.stderr b/tests/ui/coherence/coherence-overlap-issue-23516.stderr
index b9494774025..7b1b240291a 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516.next.stderr
+++ b/tests/ui/coherence/coherence-overlap-issue-23516.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `Sweet` for type `Box<_>`
-  --> $DIR/coherence-overlap-issue-23516.rs:11:1
+  --> $DIR/coherence-overlap-issue-23516.rs:8:1
    |
 LL | impl<T:Sugar> Sweet for T { }
    | ------------------------- first implementation here
diff --git a/tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr b/tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr
index 21c82eedd5d..c5bb695eb18 100644
--- a/tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr
+++ b/tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr
@@ -5,6 +5,8 @@ LL | impl<T: DerefMut> Foo for T {}
    | --------------------------- first implementation here
 LL | impl<U> Foo for &U {}
    | ^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
+   |
+   = note: downstream crates may implement trait `std::ops::DerefMut` for type `&_`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.classic.stderr b/tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.classic.stderr
deleted file mode 100644
index 2ffb6000ec8..00000000000
--- a/tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.classic.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0119]: conflicting implementations of trait `Trait` for type `Box<_>`
-  --> $DIR/coherence-overlap-unnormalizable-projection-0.rs:27:1
-   |
-LL | / impl<T> Trait for T
-LL | | where
-LL | |     T: 'static,
-LL | |     for<'a> T: WithAssoc<'a>,
-LL | |     for<'a> <T as WithAssoc<'a>>::Assoc: WhereBound,
-   | |____________________________________________________- first implementation here
-...
-LL |   impl<T> Trait for Box<T> {}
-   |   ^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Box<_>`
-   |
-   = note: downstream crates may implement trait `WithAssoc<'a>` for type `std::boxed::Box<_>`
-   = note: downstream crates may implement trait `WhereBound` for type `<std::boxed::Box<_> as WithAssoc<'a>>::Assoc`
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.rs b/tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.rs
index b8b6d8846ef..0695076e221 100644
--- a/tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.rs
+++ b/tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.rs
@@ -2,9 +2,6 @@
 // "Coherence incorrectly considers `unnormalizable_projection: Trait` to not hold even if it could"
 #![crate_type = "lib"]
 
-//@ revisions: classic next
-//@[next] compile-flags: -Znext-solver
-
 trait WhereBound {}
 impl WhereBound for () {}
 
diff --git a/tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.next.stderr b/tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.stderr
index 99abdf65abd..57befbe6e68 100644
--- a/tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.next.stderr
+++ b/tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `Trait` for type `Box<_>`
-  --> $DIR/coherence-overlap-unnormalizable-projection-0.rs:27:1
+  --> $DIR/coherence-overlap-unnormalizable-projection-0.rs:24:1
    |
 LL | / impl<T> Trait for T
 LL | | where
diff --git a/tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.classic.stderr b/tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.classic.stderr
deleted file mode 100644
index 49b236f9d2a..00000000000
--- a/tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.classic.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0119]: conflicting implementations of trait `Trait` for type `Box<_>`
-  --> $DIR/coherence-overlap-unnormalizable-projection-1.rs:26:1
-   |
-LL | / impl<T> Trait for T
-LL | | where
-LL | |     T: 'static,
-LL | |     for<'a> T: WithAssoc<'a>,
-LL | |     for<'a> Box<<T as WithAssoc<'a>>::Assoc>: WhereBound,
-   | |_________________________________________________________- first implementation here
-...
-LL |   impl<T> Trait for Box<T> {}
-   |   ^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Box<_>`
-   |
-   = note: downstream crates may implement trait `WithAssoc<'a>` for type `std::boxed::Box<_>`
-   = note: downstream crates may implement trait `WhereBound` for type `std::boxed::Box<<std::boxed::Box<_> as WithAssoc<'a>>::Assoc>`
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.rs b/tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.rs
index 8eeadb3dc75..f5fb5aefb5c 100644
--- a/tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.rs
+++ b/tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.rs
@@ -2,9 +2,6 @@
 // "Coherence incorrectly considers `unnormalizable_projection: Trait` to not hold even if it could"
 #![crate_type = "lib"]
 
-//@ revisions: classic next
-//@[next] compile-flags: -Znext-solver
-
 pub trait WhereBound {}
 impl WhereBound for () {}
 
diff --git a/tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.next.stderr b/tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.stderr
index 781ab0fcbf7..22673cef640 100644
--- a/tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.next.stderr
+++ b/tests/ui/coherence/coherence-overlap-unnormalizable-projection-1.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `Trait` for type `Box<_>`
-  --> $DIR/coherence-overlap-unnormalizable-projection-1.rs:26:1
+  --> $DIR/coherence-overlap-unnormalizable-projection-1.rs:23:1
    |
 LL | / impl<T> Trait for T
 LL | | where
diff --git a/tests/ui/coherence/coherence-unsafe-trait-object-impl.rs b/tests/ui/coherence/coherence-unsafe-trait-object-impl.rs
index 9859a226efd..16baf0958a6 100644
--- a/tests/ui/coherence/coherence-unsafe-trait-object-impl.rs
+++ b/tests/ui/coherence/coherence-unsafe-trait-object-impl.rs
@@ -1,7 +1,7 @@
 // Check that unsafe trait object do not implement themselves
 // automatically
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Trait: Sized {
     fn call(&self);
diff --git a/tests/ui/coherence/coherent-due-to-fulfill.rs b/tests/ui/coherence/coherent-due-to-fulfill.rs
index 084f9be0a8c..f4555ee5171 100644
--- a/tests/ui/coherence/coherent-due-to-fulfill.rs
+++ b/tests/ui/coherence/coherent-due-to-fulfill.rs
@@ -1,6 +1,4 @@
-//@ compile-flags: -Znext-solver=coherence
 //@ check-pass
-
 trait Mirror {
     type Assoc;
 }
diff --git a/tests/ui/coherence/incoherent-even-though-we-fulfill.rs b/tests/ui/coherence/incoherent-even-though-we-fulfill.rs
index b3c9cf328c2..28e5b6d3db0 100644
--- a/tests/ui/coherence/incoherent-even-though-we-fulfill.rs
+++ b/tests/ui/coherence/incoherent-even-though-we-fulfill.rs
@@ -1,5 +1,3 @@
-//@ compile-flags: -Znext-solver=coherence
-
 trait Mirror {
     type Assoc;
 }
diff --git a/tests/ui/coherence/incoherent-even-though-we-fulfill.stderr b/tests/ui/coherence/incoherent-even-though-we-fulfill.stderr
index b16465d2011..0b15a4e100e 100644
--- a/tests/ui/coherence/incoherent-even-though-we-fulfill.stderr
+++ b/tests/ui/coherence/incoherent-even-though-we-fulfill.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `Foo` for type `()`
-  --> $DIR/incoherent-even-though-we-fulfill.rs:17:1
+  --> $DIR/incoherent-even-though-we-fulfill.rs:15:1
    |
 LL | impl<T> Foo for T where (): Mirror<Assoc = T> {}
    | --------------------------------------------- first implementation here
diff --git a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr
deleted file mode 100644
index 74be598c44c..00000000000
--- a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.old.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0119]: conflicting implementations of trait `From<()>` for type `S`
-  --> $DIR/inter-crate-ambiguity-causes-notes.rs:12:1
-   |
-LL |   impl From<()> for S {
-   |   ------------------- first implementation here
-...
-LL | / impl<I> From<I> for S
-LL | |
-LL | | where
-LL | |     I: Iterator<Item = ()>,
-   | |___________________________^ conflicting implementation for `S`
-   |
-   = note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `()` in future versions
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs
index 3dead2f0d19..5b11c78ab26 100644
--- a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs
+++ b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.rs
@@ -1,6 +1,3 @@
-//@ revisions: old next
-//@[next] compile-flags: -Znext-solver
-
 struct S;
 
 impl From<()> for S {
diff --git a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.stderr
index 74be598c44c..b32283274c6 100644
--- a/tests/ui/coherence/inter-crate-ambiguity-causes-notes.next.stderr
+++ b/tests/ui/coherence/inter-crate-ambiguity-causes-notes.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `From<()>` for type `S`
-  --> $DIR/inter-crate-ambiguity-causes-notes.rs:12:1
+  --> $DIR/inter-crate-ambiguity-causes-notes.rs:9:1
    |
 LL |   impl From<()> for S {
    |   ------------------- first implementation here
diff --git a/tests/ui/coherence/negative-coherence-check-placeholder-outlives.stderr b/tests/ui/coherence/negative-coherence-check-placeholder-outlives.stderr
index f515c39ea8d..bf1ffcb5f00 100644
--- a/tests/ui/coherence/negative-coherence-check-placeholder-outlives.stderr
+++ b/tests/ui/coherence/negative-coherence-check-placeholder-outlives.stderr
@@ -5,6 +5,8 @@ LL | impl<T> Bar for T where T: Foo {}
    | ------------------------------ first implementation here
 LL | impl<T> Bar for Box<T> {}
    | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Box<_>`
+   |
+   = note: downstream crates may implement trait `Foo` for type `std::boxed::Box<_>`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr b/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr
index f24de10f6ac..97e2e9759c1 100644
--- a/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr
+++ b/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr
@@ -6,6 +6,8 @@ LL | impl<T> Bar for T where T: Foo {}
 ...
 LL | impl<T> Bar for &T {}
    | ^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
+   |
+   = note: downstream crates may implement trait `Foo` for type `&_`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr
index 832c56a4554..8d59cbc3466 100644
--- a/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr
+++ b/tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr
@@ -8,6 +8,7 @@ LL | impl<T: ?Sized> FnMarker for fn(&T) {}
    |
    = warning: the behavior may change in a future release
    = note: for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
+   = note: downstream crates may implement trait `Marker` for type `&_`
    = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
 note: the lint level is defined here
   --> $DIR/negative-coherence-placeholder-region-constraints-on-unification.rs:4:11
diff --git a/tests/ui/coherence/normalize-for-errors.current.stderr b/tests/ui/coherence/normalize-for-errors.current.stderr
deleted file mode 100644
index dcbb73bd1ff..00000000000
--- a/tests/ui/coherence/normalize-for-errors.current.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0119]: conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>, _)`
-  --> $DIR/normalize-for-errors.rs:17:1
-   |
-LL | impl<T: Copy, S: Iterator> MyTrait<S> for (T, S::Item) {}
-   | ------------------------------------------------------ first implementation here
-LL |
-LL | impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(Box<(MyType,)>, _)`
-   |
-   = note: upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/normalize-for-errors.rs b/tests/ui/coherence/normalize-for-errors.rs
index c17bb766b5b..3ef91eb0386 100644
--- a/tests/ui/coherence/normalize-for-errors.rs
+++ b/tests/ui/coherence/normalize-for-errors.rs
@@ -1,7 +1,3 @@
-//@ revisions: current next
-//@ ignore-compare-mode-next-solver (explicit revisions)
-//@[next] compile-flags: -Znext-solver
-
 struct MyType;
 trait MyTrait<S> {}
 
@@ -18,6 +14,6 @@ impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
 //~^ ERROR conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>,
 //~| NOTE conflicting implementation for `(Box<(MyType,)>,
 //~| NOTE upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
-//[next]~| NOTE upstream crates may add a new impl of trait `std::clone::Clone` for type `std::boxed::Box<(MyType,)>` in future versions
+//~| NOTE upstream crates may add a new impl of trait `std::clone::Clone` for type `std::boxed::Box<(MyType,)>` in future versions
 
 fn main() {}
diff --git a/tests/ui/coherence/normalize-for-errors.next.stderr b/tests/ui/coherence/normalize-for-errors.stderr
index 44952dc1944..6fbcf5b0e1a 100644
--- a/tests/ui/coherence/normalize-for-errors.next.stderr
+++ b/tests/ui/coherence/normalize-for-errors.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>, <_ as Iterator>::Item)`
-  --> $DIR/normalize-for-errors.rs:17:1
+  --> $DIR/normalize-for-errors.rs:13:1
    |
 LL | impl<T: Copy, S: Iterator> MyTrait<S> for (T, S::Item) {}
    | ------------------------------------------------------ first implementation here
diff --git a/tests/ui/coherence/occurs-check/associated-type.next.stderr b/tests/ui/coherence/occurs-check/associated-type.next.stderr
index 9544bdbb468..466b991471e 100644
--- a/tests/ui/coherence/occurs-check/associated-type.next.stderr
+++ b/tests/ui/coherence/occurs-check/associated-type.next.stderr
@@ -3,7 +3,7 @@
  WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit), .. }
  WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit), .. }
 error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), ())>` for type `for<'a> fn(&'a (), ())`
-  --> $DIR/associated-type.rs:31:1
+  --> $DIR/associated-type.rs:32:1
    |
 LL |   impl<T> Overlap<T> for T {
    |   ------------------------ first implementation here
@@ -17,7 +17,7 @@ LL | |     for<'a> *const T: ToUnit<'a>,
    = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
 
 error[E0284]: type annotations needed: cannot normalize `<for<'a> fn(&'a (), ()) as Overlap<for<'a> fn(&'a (), ())>>::Assoc`
-  --> $DIR/associated-type.rs:44:59
+  --> $DIR/associated-type.rs:45:59
    |
 LL |     foo::<for<'a> fn(&'a (), ()), for<'a> fn(&'a (), ())>(3usize);
    |                                                           ^^^^^^ cannot normalize `<for<'a> fn(&'a (), ()) as Overlap<for<'a> fn(&'a (), ())>>::Assoc`
diff --git a/tests/ui/coherence/occurs-check/associated-type.old.stderr b/tests/ui/coherence/occurs-check/associated-type.old.stderr
index ccc7f30fa6f..1e0345f4ec0 100644
--- a/tests/ui/coherence/occurs-check/associated-type.old.stderr
+++ b/tests/ui/coherence/occurs-check/associated-type.old.stderr
@@ -1,13 +1,9 @@
  WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit), .. }
- WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, !2_0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit), .. }
  WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit), .. }
- WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, !2_0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit), .. }
  WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit), .. }
- WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, !2_0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit), .. }
  WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit), .. }
- WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, !2_0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit), .. }
-error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), _)>` for type `for<'a> fn(&'a (), _)`
-  --> $DIR/associated-type.rs:31:1
+error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), ())>` for type `for<'a> fn(&'a (), ())`
+  --> $DIR/associated-type.rs:32:1
    |
 LL |   impl<T> Overlap<T> for T {
    |   ------------------------ first implementation here
@@ -16,7 +12,7 @@ LL | / impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T
 LL | |
 LL | | where
 LL | |     for<'a> *const T: ToUnit<'a>,
-   | |_________________________________^ conflicting implementation for `for<'a> fn(&'a (), _)`
+   | |_________________________________^ conflicting implementation for `for<'a> fn(&'a (), ())`
    |
    = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
 
diff --git a/tests/ui/coherence/occurs-check/associated-type.rs b/tests/ui/coherence/occurs-check/associated-type.rs
index 4441c38ba6d..d56ccc5b353 100644
--- a/tests/ui/coherence/occurs-check/associated-type.rs
+++ b/tests/ui/coherence/occurs-check/associated-type.rs
@@ -1,4 +1,5 @@
 //@ revisions: old next
+//@ ignore-compare-mode-next-solver (explicit revisions)
 //@[next] compile-flags: -Znext-solver
 
 // A (partial) regression test for #105787
diff --git a/tests/ui/coherence/occurs-check/opaques.current.stderr b/tests/ui/coherence/occurs-check/opaques.current.stderr
new file mode 100644
index 00000000000..f3fc22027c2
--- /dev/null
+++ b/tests/ui/coherence/occurs-check/opaques.current.stderr
@@ -0,0 +1,12 @@
+error[E0119]: conflicting implementations of trait `Trait<_>`
+  --> $DIR/opaques.rs:28:1
+   |
+LL | impl<T> Trait<T> for T {
+   | ---------------------- first implementation here
+...
+LL | impl<T> Trait<T> for defining_scope::Alias<T> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/occurs-check/opaques.next.stderr b/tests/ui/coherence/occurs-check/opaques.next.stderr
index 757219398f1..04fd139f901 100644
--- a/tests/ui/coherence/occurs-check/opaques.next.stderr
+++ b/tests/ui/coherence/occurs-check/opaques.next.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `Trait<_>`
-  --> $DIR/opaques.rs:30:1
+  --> $DIR/opaques.rs:28:1
    |
 LL | impl<T> Trait<T> for T {
    | ---------------------- first implementation here
@@ -8,7 +8,7 @@ LL | impl<T> Trait<T> for defining_scope::Alias<T> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
 
 error[E0282]: type annotations needed
-  --> $DIR/opaques.rs:13:23
+  --> $DIR/opaques.rs:11:23
    |
 LL |     pub fn cast<T>(x: Container<Alias<T>, T>) -> Container<T, T> {
    |                       ^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
diff --git a/tests/ui/coherence/occurs-check/opaques.rs b/tests/ui/coherence/occurs-check/opaques.rs
index 241a247c841..e197256c78c 100644
--- a/tests/ui/coherence/occurs-check/opaques.rs
+++ b/tests/ui/coherence/occurs-check/opaques.rs
@@ -1,10 +1,8 @@
-//@revisions: old next
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
 //@[next] compile-flags: -Znext-solver
 
 // A regression test for #105787
-
-//@[old] known-bug: #105787
-//@[old] check-pass
 #![feature(type_alias_impl_trait)]
 mod defining_scope {
     use super::*;
@@ -28,7 +26,7 @@ impl<T> Trait<T> for T {
     type Assoc = Box<u32>;
 }
 impl<T> Trait<T> for defining_scope::Alias<T> {
-    //[next]~^ ERROR conflicting implementations of trait
+    //~^ ERROR conflicting implementations of trait
     type Assoc = usize;
 }
 
diff --git a/tests/ui/coherence/orphan-check-opaque-types-not-covering.classic.stderr b/tests/ui/coherence/orphan-check-opaque-types-not-covering.classic.stderr
deleted file mode 100644
index 44f76f321cf..00000000000
--- a/tests/ui/coherence/orphan-check-opaque-types-not-covering.classic.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
-  --> $DIR/orphan-check-opaque-types-not-covering.rs:17:6
-   |
-LL | impl<T> foreign::Trait0<Local, T, ()> for Identity<T> {}
-   |      ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
-   |
-   = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
-   = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
-
-error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
-  --> $DIR/orphan-check-opaque-types-not-covering.rs:26:6
-   |
-LL | impl<T> foreign::Trait1<Local, T> for Opaque<T> {}
-   |      ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
-   |
-   = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
-   = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/orphan-check-opaque-types-not-covering.rs b/tests/ui/coherence/orphan-check-opaque-types-not-covering.rs
index 8dc02b081c5..02e9eb65570 100644
--- a/tests/ui/coherence/orphan-check-opaque-types-not-covering.rs
+++ b/tests/ui/coherence/orphan-check-opaque-types-not-covering.rs
@@ -1,8 +1,5 @@
 // Opaque types never cover type parameters.
 
-//@ revisions: classic next
-//@[next] compile-flags: -Znext-solver
-
 //@ aux-crate:foreign=parametrized-trait.rs
 //@ edition:2021
 
diff --git a/tests/ui/coherence/orphan-check-opaque-types-not-covering.next.stderr b/tests/ui/coherence/orphan-check-opaque-types-not-covering.stderr
index 44f76f321cf..57f5bbd2278 100644
--- a/tests/ui/coherence/orphan-check-opaque-types-not-covering.next.stderr
+++ b/tests/ui/coherence/orphan-check-opaque-types-not-covering.stderr
@@ -1,5 +1,5 @@
 error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
-  --> $DIR/orphan-check-opaque-types-not-covering.rs:17:6
+  --> $DIR/orphan-check-opaque-types-not-covering.rs:14:6
    |
 LL | impl<T> foreign::Trait0<Local, T, ()> for Identity<T> {}
    |      ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
@@ -8,7 +8,7 @@ LL | impl<T> foreign::Trait0<Local, T, ()> for Identity<T> {}
    = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
 
 error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
-  --> $DIR/orphan-check-opaque-types-not-covering.rs:26:6
+  --> $DIR/orphan-check-opaque-types-not-covering.rs:23:6
    |
 LL | impl<T> foreign::Trait1<Local, T> for Opaque<T> {}
    |      ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
diff --git a/tests/ui/coherence/orphan-check-projections-covering.rs b/tests/ui/coherence/orphan-check-projections-covering.rs
index ae1917ec161..804784463a1 100644
--- a/tests/ui/coherence/orphan-check-projections-covering.rs
+++ b/tests/ui/coherence/orphan-check-projections-covering.rs
@@ -5,9 +5,6 @@
 // first which would've lead to real-word regressions.
 
 //@ check-pass
-//@ revisions: classic next
-//@[next] compile-flags: -Znext-solver
-
 //@ aux-crate:foreign=parametrized-trait.rs
 //@ edition:2021
 
diff --git a/tests/ui/coherence/orphan-check-weak-aliases-not-covering.next.stderr b/tests/ui/coherence/orphan-check-weak-aliases-not-covering.next.stderr
deleted file mode 100644
index 276833fa171..00000000000
--- a/tests/ui/coherence/orphan-check-weak-aliases-not-covering.next.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
-  --> $DIR/orphan-check-weak-aliases-not-covering.rs:16:6
-   |
-LL | impl<T> foreign::Trait1<Local, T> for Identity<T> {}
-   |      ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
-   |
-   = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
-   = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0210`.
diff --git a/tests/ui/coherence/orphan-check-weak-aliases-not-covering.rs b/tests/ui/coherence/orphan-check-weak-aliases-not-covering.rs
index 9ebc45a8829..6d9bccc4c68 100644
--- a/tests/ui/coherence/orphan-check-weak-aliases-not-covering.rs
+++ b/tests/ui/coherence/orphan-check-weak-aliases-not-covering.rs
@@ -1,8 +1,5 @@
 // Weak aliases might not cover type parameters.
 
-//@ revisions: classic next
-//@[next] compile-flags: -Znext-solver
-
 //@ aux-crate:foreign=parametrized-trait.rs
 //@ edition:2021
 
diff --git a/tests/ui/coherence/orphan-check-weak-aliases-not-covering.classic.stderr b/tests/ui/coherence/orphan-check-weak-aliases-not-covering.stderr
index 276833fa171..df915141a76 100644
--- a/tests/ui/coherence/orphan-check-weak-aliases-not-covering.classic.stderr
+++ b/tests/ui/coherence/orphan-check-weak-aliases-not-covering.stderr
@@ -1,5 +1,5 @@
 error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
-  --> $DIR/orphan-check-weak-aliases-not-covering.rs:16:6
+  --> $DIR/orphan-check-weak-aliases-not-covering.rs:13:6
    |
 LL | impl<T> foreign::Trait1<Local, T> for Identity<T> {}
    |      ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
diff --git a/tests/ui/coherence/skip-reporting-if-references-err.current.stderr b/tests/ui/coherence/skip-reporting-if-references-err.current.stderr
deleted file mode 100644
index 5eef3256b2c..00000000000
--- a/tests/ui/coherence/skip-reporting-if-references-err.current.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0726]: implicit elided lifetime not allowed here
-  --> $DIR/skip-reporting-if-references-err.rs:10:9
-   |
-LL | impl<T> ToUnit for T {}
-   |         ^^^^^^ expected lifetime parameter
-   |
-help: indicate the anonymous lifetime
-   |
-LL | impl<T> ToUnit<'_> for T {}
-   |               ++++
-
-error[E0277]: the trait bound `for<'a> (): ToUnit<'a>` is not satisfied
-  --> $DIR/skip-reporting-if-references-err.rs:15:29
-   |
-LL | impl Overlap for for<'a> fn(<() as ToUnit<'a>>::Unit) {}
-   |                             ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> ToUnit<'a>` is not implemented for `()`
-
-error[E0277]: the trait bound `for<'a> (): ToUnit<'a>` is not satisfied
-  --> $DIR/skip-reporting-if-references-err.rs:15:18
-   |
-LL | impl Overlap for for<'a> fn(<() as ToUnit<'a>>::Unit) {}
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> ToUnit<'a>` is not implemented for `()`
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0277, E0726.
-For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/coherence/skip-reporting-if-references-err.rs b/tests/ui/coherence/skip-reporting-if-references-err.rs
index f9eaa498232..dd8a71c4700 100644
--- a/tests/ui/coherence/skip-reporting-if-references-err.rs
+++ b/tests/ui/coherence/skip-reporting-if-references-err.rs
@@ -1,8 +1,4 @@
 // Regression test for #121006.
-//@ revisions: current next
-//@ ignore-compare-mode-next-solver (explicit revisions)
-//@[next] compile-flags: -Znext-solver
-
 trait ToUnit<'a> {
     type Unit;
 }
@@ -13,7 +9,5 @@ impl<T> ToUnit for T {}
 trait Overlap {}
 impl<U> Overlap for fn(U) {}
 impl Overlap for for<'a> fn(<() as ToUnit<'a>>::Unit) {}
-//[current]~^ ERROR the trait bound `for<'a> (): ToUnit<'a>` is not satisfied
-//[current]~| ERROR the trait bound `for<'a> (): ToUnit<'a>` is not satisfied
 
 fn main() {}
diff --git a/tests/ui/coherence/skip-reporting-if-references-err.next.stderr b/tests/ui/coherence/skip-reporting-if-references-err.stderr
index 5de4cf626e4..0ff3e88a0af 100644
--- a/tests/ui/coherence/skip-reporting-if-references-err.next.stderr
+++ b/tests/ui/coherence/skip-reporting-if-references-err.stderr
@@ -1,5 +1,5 @@
 error[E0726]: implicit elided lifetime not allowed here
-  --> $DIR/skip-reporting-if-references-err.rs:10:9
+  --> $DIR/skip-reporting-if-references-err.rs:6:9
    |
 LL | impl<T> ToUnit for T {}
    |         ^^^^^^ expected lifetime parameter
diff --git a/tests/ui/coherence/super-traits/super-trait-knowable-1.current.stderr b/tests/ui/coherence/super-traits/super-trait-knowable-1.current.stderr
deleted file mode 100644
index fb01cf158d9..00000000000
--- a/tests/ui/coherence/super-traits/super-trait-knowable-1.current.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0119]: conflicting implementations of trait `Overlap<_>` for type `()`
-  --> $DIR/super-trait-knowable-1.rs:16:1
-   |
-LL | impl<T, U: Sub<T>> Overlap<T> for U {}
-   | ----------------------------------- first implementation here
-LL | impl<T> Overlap<T> for () {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()`
-   |
-   = note: downstream crates may implement trait `Sub<_>` for type `()`
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/super-traits/super-trait-knowable-1.rs b/tests/ui/coherence/super-traits/super-trait-knowable-1.rs
index 80df8c19ee5..77af4d0f2e3 100644
--- a/tests/ui/coherence/super-traits/super-trait-knowable-1.rs
+++ b/tests/ui/coherence/super-traits/super-trait-knowable-1.rs
@@ -3,10 +3,7 @@
 // We therefore elaborate super trait bounds in the implicit negative
 // overlap check.
 
-//@ revisions: current next
-//@ ignore-compare-mode-next-solver (explicit revisions)
-//@[next] compile-flags: -Znext-solver
-//@[next] check-pass
+//@ check-pass
 
 trait Super {}
 trait Sub<T>: Super {}
@@ -14,6 +11,5 @@ trait Sub<T>: Super {}
 trait Overlap<T> {}
 impl<T, U: Sub<T>> Overlap<T> for U {}
 impl<T> Overlap<T> for () {}
-//[current]~^ ERROR conflicting implementations
 
 fn main() {}
diff --git a/tests/ui/coherence/super-traits/super-trait-knowable-2.rs b/tests/ui/coherence/super-traits/super-trait-knowable-2.rs
index d1f2e8d1c1a..323ee0b10c9 100644
--- a/tests/ui/coherence/super-traits/super-trait-knowable-2.rs
+++ b/tests/ui/coherence/super-traits/super-trait-knowable-2.rs
@@ -9,9 +9,6 @@
 // which caused the old solver to emit a `Tensor: TensorValue` goal in
 // `fn normalize_to_error` which then failed, causing this test to pass.
 
-//@ revisions: current next
-//@ ignore-compare-mode-next-solver (explicit revisions)
-//@[next] compile-flags: -Znext-solver
 //@ check-pass
 
 pub trait TensorValue {
diff --git a/tests/ui/coherence/super-traits/super-trait-knowable-3.current.stderr b/tests/ui/coherence/super-traits/super-trait-knowable-3.current.stderr
deleted file mode 100644
index 542edb8b7f6..00000000000
--- a/tests/ui/coherence/super-traits/super-trait-knowable-3.current.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0119]: conflicting implementations of trait `Overlap<_>` for type `()`
-  --> $DIR/super-trait-knowable-3.rs:19:1
-   |
-LL | impl<T, U: Bound<W<T>>> Overlap<T> for U {}
-   | ---------------------------------------- first implementation here
-LL | impl<T> Overlap<T> for () {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()`
-   |
-   = note: downstream crates may implement trait `Sub<_>` for type `()`
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/super-traits/super-trait-knowable-3.rs b/tests/ui/coherence/super-traits/super-trait-knowable-3.rs
index 295d7ac48d8..6198d3d303b 100644
--- a/tests/ui/coherence/super-traits/super-trait-knowable-3.rs
+++ b/tests/ui/coherence/super-traits/super-trait-knowable-3.rs
@@ -2,10 +2,7 @@
 // super trait bound is in a nested goal so this would not
 // compile if we were to only elaborate root goals.
 
-//@ revisions: current next
-//@ ignore-compare-mode-next-solver (explicit revisions)
-//@[next] compile-flags: -Znext-solver
-//@[next] check-pass
+//@ check-pass
 
 trait Super {}
 trait Sub<T>: Super {}
@@ -17,6 +14,5 @@ impl<T: Sub<U>, U> Bound<W<U>> for T {}
 trait Overlap<T> {}
 impl<T, U: Bound<W<T>>> Overlap<T> for U {}
 impl<T> Overlap<T> for () {}
-//[current]~^ ERROR conflicting implementations of trait `Overlap<_>` for type `()`
 
 fn main() {}
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_object_safety.rs b/tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.rs
index 6a553c2e085..6a553c2e085 100644
--- a/tests/ui/const-generics/adt_const_params/const_param_ty_object_safety.rs
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.rs
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_object_safety.stderr b/tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.stderr
index 831b40887ac..84281eb53c9 100644
--- a/tests/ui/const-generics/adt_const_params/const_param_ty_object_safety.stderr
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.stderr
@@ -1,5 +1,5 @@
 error[E0038]: the trait `ConstParamTy_` cannot be made into an object
-  --> $DIR/const_param_ty_object_safety.rs:6:12
+  --> $DIR/const_param_ty_dyn_compatibility.rs:6:12
    |
 LL | fn foo(a: &dyn ConstParamTy_) {}
    |            ^^^^^^^^^^^^^^^^^ `ConstParamTy_` cannot be made into an object
@@ -14,7 +14,7 @@ LL | fn foo(a: &impl ConstParamTy_) {}
    |            ~~~~
 
 error[E0038]: the trait `UnsizedConstParamTy` cannot be made into an object
-  --> $DIR/const_param_ty_object_safety.rs:9:12
+  --> $DIR/const_param_ty_dyn_compatibility.rs:9:12
    |
 LL | fn bar(a: &dyn UnsizedConstParamTy) {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^ `UnsizedConstParamTy` cannot be made into an object
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.rs b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.rs
index 1620e257667..1620e257667 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.rs
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.rs
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr
index fb57da42bb2..d2017615e67 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-err-ret.rs:17:16
+  --> $DIR/dyn-compatibility-err-ret.rs:17:16
    |
 LL | fn use_dyn(v: &dyn Foo) {
    |                ^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-err-ret.rs:8:8
+  --> $DIR/dyn-compatibility-err-ret.rs:8:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -17,13 +17,13 @@ LL |     fn test(&self) -> [u8; bar::<Self>()];
    = help: only type `()` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-err-ret.rs:18:5
+  --> $DIR/dyn-compatibility-err-ret.rs:18:5
    |
 LL |     v.test();
    |     ^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-err-ret.rs:8:8
+  --> $DIR/dyn-compatibility-err-ret.rs:8:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.rs b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.rs
index b3bbb842638..b3bbb842638 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.rs
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.rs
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.stderr b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr
index 831bda71295..26ca2d4df5f 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-err-where-bounds.rs:15:16
+  --> $DIR/dyn-compatibility-err-where-bounds.rs:15:16
    |
 LL | fn use_dyn(v: &dyn Foo) {
    |                ^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-err-where-bounds.rs:8:8
+  --> $DIR/dyn-compatibility-err-where-bounds.rs:8:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -15,13 +15,13 @@ LL |     fn test(&self) where [u8; bar::<Self>()]: Sized;
    = help: only type `()` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-err-where-bounds.rs:17:5
+  --> $DIR/dyn-compatibility-err-where-bounds.rs:17:5
    |
 LL |     v.test();
    |     ^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-err-where-bounds.rs:8:8
+  --> $DIR/dyn-compatibility-err-where-bounds.rs:8:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.rs b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs
index 298cfb512e4..298cfb512e4 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.rs
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr
index d1e1c976da6..a124fbc6092 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr
@@ -1,11 +1,11 @@
 error[E0284]: type annotations needed
-  --> $DIR/object-safety-ok-infer-err.rs:19:5
+  --> $DIR/dyn-compatibility-ok-infer-err.rs:19:5
    |
 LL |     use_dyn(&());
    |     ^^^^^^^ cannot infer the value of the const parameter `N` declared on the function `use_dyn`
    |
 note: required by a const generic parameter in `use_dyn`
-  --> $DIR/object-safety-ok-infer-err.rs:14:12
+  --> $DIR/dyn-compatibility-ok-infer-err.rs:14:12
    |
 LL | fn use_dyn<const N: usize>(v: &dyn Foo<N>) where [u8; N + 1]: Sized {
    |            ^^^^^^^^^^^^^^ required by this const generic parameter in `use_dyn`
@@ -15,7 +15,7 @@ LL |     use_dyn::<N>(&());
    |            +++++
 
 error[E0284]: type annotations needed
-  --> $DIR/object-safety-ok-infer-err.rs:19:5
+  --> $DIR/dyn-compatibility-ok-infer-err.rs:19:5
    |
 LL |     use_dyn(&());
    |     ^^^^^^^ --- type must be known at this point
@@ -23,7 +23,7 @@ LL |     use_dyn(&());
    |     cannot infer the value of the const parameter `N` declared on the function `use_dyn`
    |
 note: required for `()` to implement `Foo<_>`
-  --> $DIR/object-safety-ok-infer-err.rs:8:22
+  --> $DIR/dyn-compatibility-ok-infer-err.rs:8:22
    |
 LL | impl<const N: usize> Foo<N> for () {
    |      --------------  ^^^^^^     ^^
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok.rs
index 6220d681fe1..6220d681fe1 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok.rs
diff --git a/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs b/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs
index 4bea3ad87f5..c1d3321f840 100644
--- a/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs
+++ b/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs
@@ -14,10 +14,8 @@ fn f<T>(
          1
      }],
 ) -> impl Iterator<Item = SubAssign> {
-//~^ ERROR the type parameter `Rhs` must be explicitly specified
+//~^ ERROR expected a type, found a trait
 //~| ERROR `()` is not an iterator
-//~| ERROR trait objects must include the `dyn` keyword
-//~| ERROR the type parameter `Rhs` must be explicitly specified [E0393]
 }
 
 pub fn main() {}
diff --git a/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr b/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr
index 416a9381124..5c4d643a28e 100644
--- a/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr
@@ -16,37 +16,6 @@ help: you might be missing a type parameter
 LL | fn f<T, F>(
    |       +++
 
-error[E0393]: the type parameter `Rhs` must be explicitly specified
-  --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:16:27
-   |
-LL | ) -> impl Iterator<Item = SubAssign> {
-   |                           ^^^^^^^^^
-  --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
-   |
-   = note: type parameter `Rhs` must be specified for this
-   |
-   = note: because of the default `Self` reference, type parameters must be specified on object types
-help: set the type parameter to the desired type
-   |
-LL | ) -> impl Iterator<Item = SubAssign<Rhs>> {
-   |                                    +++++
-
-error[E0393]: the type parameter `Rhs` must be explicitly specified
-  --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:16:27
-   |
-LL | ) -> impl Iterator<Item = SubAssign> {
-   |                           ^^^^^^^^^
-  --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
-   |
-   = note: type parameter `Rhs` must be specified for this
-   |
-   = note: because of the default `Self` reference, type parameters must be specified on object types
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: set the type parameter to the desired type
-   |
-LL | ) -> impl Iterator<Item = SubAssign<Rhs>> {
-   |                                    +++++
-
 error[E0277]: `()` is not an iterator
   --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:16:6
    |
@@ -55,13 +24,13 @@ LL | ) -> impl Iterator<Item = SubAssign> {
    |
    = help: the trait `Iterator` is not implemented for `()`
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:16:27
    |
 LL | ) -> impl Iterator<Item = SubAssign> {
    |                           ^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | ) -> impl Iterator<Item = dyn SubAssign> {
    |                           +++
@@ -70,7 +39,7 @@ help: you might have meant to write a bound here
 LL | ) -> impl Iterator<Item: SubAssign> {
    |                        ~
 
-error: aborting due to 5 previous errors
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0277, E0393, E0412, E0782.
+Some errors have detailed explanations: E0277, E0412, E0782.
 For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs
index d11b457a3f6..a55be99fc0b 100644
--- a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs
+++ b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs
@@ -22,6 +22,7 @@ mod v20 {
     impl v17<512, v0> {
         pub const fn v21() -> v18 {}
         //~^ ERROR cannot find type `v18` in this scope
+        //~| ERROR duplicate definitions with name `v21`
     }
 
     impl<const v10: usize> v17<v10, v2> {
diff --git a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr
index 45be31c7ba3..30a45ce377e 100644
--- a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr
@@ -1,5 +1,5 @@
 error[E0432]: unresolved import `v20::v13`
-  --> $DIR/unevaluated-const-ice-119731.rs:37:15
+  --> $DIR/unevaluated-const-ice-119731.rs:38:15
    |
 LL | pub use v20::{v13, v17};
    |               ^^^
@@ -23,7 +23,7 @@ LL |         pub const fn v21() -> v18 {}
    |                               ^^^ help: a type alias with a similar name exists: `v11`
 
 error[E0412]: cannot find type `v18` in this scope
-  --> $DIR/unevaluated-const-ice-119731.rs:30:31
+  --> $DIR/unevaluated-const-ice-119731.rs:31:31
    |
 LL |     pub type v11 = [[usize; v4]; v4];
    |     --------------------------------- similarly named type alias `v11` defined here
@@ -32,7 +32,7 @@ LL |         pub const fn v21() -> v18 {
    |                               ^^^ help: a type alias with a similar name exists: `v11`
 
 error[E0422]: cannot find struct, variant or union type `v18` in this scope
-  --> $DIR/unevaluated-const-ice-119731.rs:32:13
+  --> $DIR/unevaluated-const-ice-119731.rs:33:13
    |
 LL |     pub type v11 = [[usize; v4]; v4];
    |     --------------------------------- similarly named type alias `v11` defined here
@@ -73,20 +73,29 @@ LL + #![feature(adt_const_params)]
    |
 
 error: maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
-  --> $DIR/unevaluated-const-ice-119731.rs:27:37
+  --> $DIR/unevaluated-const-ice-119731.rs:28:37
    |
 LL |     impl<const v10: usize> v17<v10, v2> {
    |                                     ^^
 
 error: maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
-  --> $DIR/unevaluated-const-ice-119731.rs:27:37
+  --> $DIR/unevaluated-const-ice-119731.rs:28:37
    |
 LL |     impl<const v10: usize> v17<v10, v2> {
    |                                     ^^
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 9 previous errors; 2 warnings emitted
+error[E0592]: duplicate definitions with name `v21`
+  --> $DIR/unevaluated-const-ice-119731.rs:23:9
+   |
+LL |         pub const fn v21() -> v18 {}
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `v21`
+...
+LL |         pub const fn v21() -> v18 {
+   |         ------------------------- other definition for `v21`
+
+error: aborting due to 10 previous errors; 2 warnings emitted
 
-Some errors have detailed explanations: E0412, E0422, E0425, E0432.
+Some errors have detailed explanations: E0412, E0422, E0425, E0432, E0592.
 For more information about an error, try `rustc --explain E0412`.
diff --git a/tests/ui/const-generics/generic_const_exprs/unknown-alias-defkind-anonconst-ice-116710.rs b/tests/ui/const-generics/generic_const_exprs/unknown-alias-defkind-anonconst-ice-116710.rs
index dd0b1e8c9f7..81ac9979bd8 100644
--- a/tests/ui/const-generics/generic_const_exprs/unknown-alias-defkind-anonconst-ice-116710.rs
+++ b/tests/ui/const-generics/generic_const_exprs/unknown-alias-defkind-anonconst-ice-116710.rs
@@ -10,6 +10,5 @@ trait Trait {}
 impl<const N: u32> Trait for A<N> {}
 
 impl<const N: u32> Trait for A<N> {}
-//~^ ERROR conflicting implementations of trait `Trait` for type `A<_>`
 
 pub fn main() {}
diff --git a/tests/ui/const-generics/generic_const_exprs/unknown-alias-defkind-anonconst-ice-116710.stderr b/tests/ui/const-generics/generic_const_exprs/unknown-alias-defkind-anonconst-ice-116710.stderr
index 80ac96d4870..e29c49ff042 100644
--- a/tests/ui/const-generics/generic_const_exprs/unknown-alias-defkind-anonconst-ice-116710.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/unknown-alias-defkind-anonconst-ice-116710.stderr
@@ -4,16 +4,6 @@ error[E0423]: expected value, found builtin type `u8`
 LL | struct A<const N: u32 = 1, const M: u32 = u8>;
    |                                           ^^ not a value
 
-error[E0119]: conflicting implementations of trait `Trait` for type `A<_>`
-  --> $DIR/unknown-alias-defkind-anonconst-ice-116710.rs:12:1
-   |
-LL | impl<const N: u32> Trait for A<N> {}
-   | --------------------------------- first implementation here
-LL |
-LL | impl<const N: u32> Trait for A<N> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `A<_>`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0119, E0423.
-For more information about an error, try `rustc --explain E0119`.
+For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/const-generics/not_wf_param_in_rpitit.rs b/tests/ui/const-generics/not_wf_param_in_rpitit.rs
index eb672194340..b454562ad49 100644
--- a/tests/ui/const-generics/not_wf_param_in_rpitit.rs
+++ b/tests/ui/const-generics/not_wf_param_in_rpitit.rs
@@ -1,12 +1,11 @@
 //@ edition:2021
 
-trait Trait<const N: Trait = bar> {
+trait Trait<const N: dyn Trait = bar> {
     //~^ ERROR: cannot find value `bar` in this scope
     //~| ERROR: cycle detected when computing type of `Trait::N`
     //~| ERROR: the trait `Trait` cannot be made into an object
     //~| ERROR: the trait `Trait` cannot be made into an object
     //~| ERROR: the trait `Trait` cannot be made into an object
-    //~| ERROR: trait objects must include the `dyn` keyword
     async fn a() {}
 }
 
diff --git a/tests/ui/const-generics/not_wf_param_in_rpitit.stderr b/tests/ui/const-generics/not_wf_param_in_rpitit.stderr
index ade40550c73..2500409e828 100644
--- a/tests/ui/const-generics/not_wf_param_in_rpitit.stderr
+++ b/tests/ui/const-generics/not_wf_param_in_rpitit.stderr
@@ -1,33 +1,33 @@
 error[E0425]: cannot find value `bar` in this scope
-  --> $DIR/not_wf_param_in_rpitit.rs:3:30
+  --> $DIR/not_wf_param_in_rpitit.rs:3:34
    |
-LL | trait Trait<const N: Trait = bar> {
-   |                              ^^^ not found in this scope
+LL | trait Trait<const N: dyn Trait = bar> {
+   |                                  ^^^ not found in this scope
 
 error[E0391]: cycle detected when computing type of `Trait::N`
-  --> $DIR/not_wf_param_in_rpitit.rs:3:22
+  --> $DIR/not_wf_param_in_rpitit.rs:3:26
    |
-LL | trait Trait<const N: Trait = bar> {
-   |                      ^^^^^
+LL | trait Trait<const N: dyn Trait = bar> {
+   |                          ^^^^^
    |
    = note: ...which immediately requires computing type of `Trait::N` again
 note: cycle used when computing explicit predicates of trait `Trait`
   --> $DIR/not_wf_param_in_rpitit.rs:3:1
    |
-LL | trait Trait<const N: Trait = bar> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | trait Trait<const N: dyn Trait = bar> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
 error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/not_wf_param_in_rpitit.rs:3:22
    |
-LL | trait Trait<const N: Trait = bar> {
-   |                      ^^^^^ `Trait` cannot be made into an object
+LL | trait Trait<const N: dyn Trait = bar> {
+   |                      ^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/not_wf_param_in_rpitit.rs:10:14
+  --> $DIR/not_wf_param_in_rpitit.rs:9:14
    |
-LL | trait Trait<const N: Trait = bar> {
+LL | trait Trait<const N: dyn Trait = bar> {
    |       ----- this trait cannot be made into an object...
 ...
 LL |     async fn a() {}
@@ -44,13 +44,13 @@ LL |     async fn a() where Self: Sized {}
 error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/not_wf_param_in_rpitit.rs:3:13
    |
-LL | trait Trait<const N: Trait = bar> {
-   |             ^^^^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object
+LL | trait Trait<const N: dyn Trait = bar> {
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/not_wf_param_in_rpitit.rs:10:14
+  --> $DIR/not_wf_param_in_rpitit.rs:9:14
    |
-LL | trait Trait<const N: Trait = bar> {
+LL | trait Trait<const N: dyn Trait = bar> {
    |       ----- this trait cannot be made into an object...
 ...
 LL |     async fn a() {}
@@ -67,13 +67,13 @@ LL |     async fn a() where Self: Sized {}
 error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/not_wf_param_in_rpitit.rs:3:13
    |
-LL | trait Trait<const N: Trait = bar> {
-   |             ^^^^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object
+LL | trait Trait<const N: dyn Trait = bar> {
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/not_wf_param_in_rpitit.rs:10:14
+  --> $DIR/not_wf_param_in_rpitit.rs:9:14
    |
-LL | trait Trait<const N: Trait = bar> {
+LL | trait Trait<const N: dyn Trait = bar> {
    |       ----- this trait cannot be made into an object...
 ...
 LL |     async fn a() {}
@@ -88,18 +88,7 @@ help: alternatively, consider constraining `a` so it does not apply to trait obj
 LL |     async fn a() where Self: Sized {}
    |                  +++++++++++++++++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/not_wf_param_in_rpitit.rs:3:22
-   |
-LL | trait Trait<const N: Trait = bar> {
-   |                      ^^^^^
-   |
-help: add `dyn` keyword before this trait
-   |
-LL | trait Trait<const N: dyn Trait = bar> {
-   |                      +++
-
-error: aborting due to 6 previous errors
+error: aborting due to 5 previous errors
 
-Some errors have detailed explanations: E0038, E0391, E0425, E0782.
+Some errors have detailed explanations: E0038, E0391, E0425.
 For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/consts/const-eval/float_methods.rs b/tests/ui/consts/const-eval/float_methods.rs
new file mode 100644
index 00000000000..49c31f68c5f
--- /dev/null
+++ b/tests/ui/consts/const-eval/float_methods.rs
@@ -0,0 +1,47 @@
+//@ run-pass
+//! Tests the float intrinsics: min, max, abs, copysign
+
+#![feature(const_float_methods)]
+#![feature(f16, f128)]
+
+const F16_MIN: f16 = 1.0_f16.min(0.5_f16);
+const F16_MAX: f16 = 1.0_f16.max(0.5_f16);
+const F16_ABS: f16 = (-1.0_f16).abs();
+const F16_COPYSIGN: f16 = 1.0_f16.copysign(-2.0_f16);
+
+const F32_MIN: f32 = 1.0_f32.min(0.5_f32);
+const F32_MAX: f32 = 1.0_f32.max(0.5_f32);
+const F32_ABS: f32 = (-1.0_f32).abs();
+const F32_COPYSIGN: f32 = 1.0_f32.copysign(-2.0_f32);
+
+const F64_MIN: f64 = 1.0_f64.min(0.5_f64);
+const F64_MAX: f64 = 1.0_f64.max(0.5_f64);
+const F64_ABS: f64 = (-1.0_f64).abs();
+const F64_COPYSIGN: f64 = 1.0_f64.copysign(-2.0_f64);
+
+const F128_MIN: f128 = 1.0_f128.min(0.5_f128);
+const F128_MAX: f128 = 1.0_f128.max(0.5_f128);
+const F128_ABS: f128 = (-1.0_f128).abs();
+const F128_COPYSIGN: f128 = 1.0_f128.copysign(-2.0_f128);
+
+fn main() {
+    assert_eq!(F16_MIN, 0.5);
+    assert_eq!(F16_MAX, 1.0);
+    assert_eq!(F16_ABS, 1.0);
+    assert_eq!(F16_COPYSIGN, -1.0);
+
+    assert_eq!(F32_MIN, 0.5);
+    assert_eq!(F32_MAX, 1.0);
+    assert_eq!(F32_ABS, 1.0);
+    assert_eq!(F32_COPYSIGN, -1.0);
+
+    assert_eq!(F64_MIN, 0.5);
+    assert_eq!(F64_MAX, 1.0);
+    assert_eq!(F64_ABS, 1.0);
+    assert_eq!(F64_COPYSIGN, -1.0);
+
+    assert_eq!(F128_MIN, 0.5);
+    assert_eq!(F128_MAX, 1.0);
+    assert_eq!(F128_ABS, 1.0);
+    assert_eq!(F128_COPYSIGN, -1.0);
+}
diff --git a/tests/ui/consts/const-unwrap.rs b/tests/ui/consts/const-unwrap.rs
index bc79c7db2fc..ea0a15af1be 100644
--- a/tests/ui/consts/const-unwrap.rs
+++ b/tests/ui/consts/const-unwrap.rs
@@ -1,11 +1,15 @@
 //@ check-fail
-
-#![feature(const_option)]
+// Verify that panicking `const_option` methods do the correct thing
 
 const FOO: i32 = Some(42i32).unwrap();
 
 const BAR: i32 = Option::<i32>::None.unwrap();
-//~^ERROR: evaluation of constant value failed
+//~^ ERROR: evaluation of constant value failed
+//~| NOTE: the evaluated program panicked
+
+const BAZ: i32 = Option::<i32>::None.expect("absolutely not!");
+//~^ ERROR: evaluation of constant value failed
+//~| NOTE: absolutely not!
 
 fn main() {
     println!("{}", FOO);
diff --git a/tests/ui/consts/const-unwrap.stderr b/tests/ui/consts/const-unwrap.stderr
index fee22a1d070..aa5dd9a5c36 100644
--- a/tests/ui/consts/const-unwrap.stderr
+++ b/tests/ui/consts/const-unwrap.stderr
@@ -1,9 +1,15 @@
 error[E0080]: evaluation of constant value failed
-  --> $DIR/const-unwrap.rs:7:18
+  --> $DIR/const-unwrap.rs:6:18
    |
 LL | const BAR: i32 = Option::<i32>::None.unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'called `Option::unwrap()` on a `None` value', $DIR/const-unwrap.rs:7:38
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'called `Option::unwrap()` on a `None` value', $DIR/const-unwrap.rs:6:38
 
-error: aborting due to 1 previous error
+error[E0080]: evaluation of constant value failed
+  --> $DIR/const-unwrap.rs:10:18
+   |
+LL | const BAZ: i32 = Option::<i32>::None.expect("absolutely not!");
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'absolutely not!', $DIR/const-unwrap.rs:10:38
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/load-preserves-partial-init.rs b/tests/ui/consts/load-preserves-partial-init.rs
index d97e9cb3d9d..2a8adbd5e16 100644
--- a/tests/ui/consts/load-preserves-partial-init.rs
+++ b/tests/ui/consts/load-preserves-partial-init.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 
-#![feature(const_ptr_write)]
 // issue: https://github.com/rust-lang/rust/issues/69488
 // Loads of partially-initialized data could produce completely-uninitialized results.
 // Test to make sure that we no longer do such a "deinitializing" load.
diff --git a/tests/ui/coverage-attr/bad-attr-ice.rs b/tests/ui/coverage-attr/bad-attr-ice.rs
index ae4d27d65eb..55c86d260d4 100644
--- a/tests/ui/coverage-attr/bad-attr-ice.rs
+++ b/tests/ui/coverage-attr/bad-attr-ice.rs
@@ -1,7 +1,7 @@
 #![cfg_attr(feat, feature(coverage_attribute))]
 //@ revisions: feat nofeat
 //@ compile-flags: -Cinstrument-coverage
-//@ needs-profiler-support
+//@ needs-profiler-runtime
 
 // Malformed `#[coverage(..)]` attributes should not cause an ICE when built
 // with `-Cinstrument-coverage`.
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.rs b/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.rs
index 8d8917fd319..3ca58b28181 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.rs
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.rs
@@ -19,8 +19,8 @@ trait ImportantTrait3 {}
 trait ImportantTrait4 {}
 
 #[diagnostic::on_unimplemented(message = "Test {Self:!}")]
-//~^WARN expected `'}'`, found `'!'`
-//~|WARN expected `'}'`, found `'!'`
+//~^WARN expected `}`, found `!`
+//~|WARN expected `}`, found `!`
 //~|WARN unmatched `}` found
 //~|WARN unmatched `}` found
 trait ImportantTrait5 {}
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr
index 932e81ca48e..b4ed06cb63d 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr
@@ -30,7 +30,7 @@ LL | #[diagnostic::on_unimplemented(message = "Test {Self:123}")]
    |
    = help: no format specifier are supported in this position
 
-warning: expected `'}'`, found `'!'`
+warning: expected `}`, found `!`
   --> $DIR/broken_format.rs:21:32
    |
 LL | #[diagnostic::on_unimplemented(message = "Test {Self:!}")]
@@ -153,7 +153,7 @@ note: required by a bound in `check_4`
 LL | fn check_4(_: impl ImportantTrait4) {}
    |                    ^^^^^^^^^^^^^^^ required by this bound in `check_4`
 
-warning: expected `'}'`, found `'!'`
+warning: expected `}`, found `!`
   --> $DIR/broken_format.rs:21:32
    |
 LL | #[diagnostic::on_unimplemented(message = "Test {Self:!}")]
diff --git a/tests/ui/object-safety/almost-supertrait-associated-type.rs b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.rs
index 963cdff526e..83076f7d5fc 100644
--- a/tests/ui/object-safety/almost-supertrait-associated-type.rs
+++ b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.rs
@@ -1,5 +1,5 @@
 // Test for fixed unsoundness in #126079.
-// Enforces that the associated types that are object safe
+// Enforces that the associated types that are dyn-compatible.
 
 use std::marker::PhantomData;
 
diff --git a/tests/ui/object-safety/almost-supertrait-associated-type.stderr b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr
index 99bcccc20c0..99bcccc20c0 100644
--- a/tests/ui/object-safety/almost-supertrait-associated-type.stderr
+++ b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr
diff --git a/tests/ui/object-safety/assoc_const_bounds.rs b/tests/ui/dyn-compatibility/assoc_const_bounds.rs
index 32c4de1981b..32c4de1981b 100644
--- a/tests/ui/object-safety/assoc_const_bounds.rs
+++ b/tests/ui/dyn-compatibility/assoc_const_bounds.rs
diff --git a/tests/ui/object-safety/assoc_const_bounds_sized.rs b/tests/ui/dyn-compatibility/assoc_const_bounds_sized.rs
index 1272a735e83..1272a735e83 100644
--- a/tests/ui/object-safety/assoc_const_bounds_sized.rs
+++ b/tests/ui/dyn-compatibility/assoc_const_bounds_sized.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds.rs b/tests/ui/dyn-compatibility/assoc_type_bounds.rs
index 8634ba626a1..8634ba626a1 100644
--- a/tests/ui/object-safety/assoc_type_bounds.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds.stderr b/tests/ui/dyn-compatibility/assoc_type_bounds.stderr
index 3d5482625af..3d5482625af 100644
--- a/tests/ui/object-safety/assoc_type_bounds.stderr
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds.stderr
diff --git a/tests/ui/object-safety/assoc_type_bounds2.rs b/tests/ui/dyn-compatibility/assoc_type_bounds2.rs
index f7dc2fb8839..f7dc2fb8839 100644
--- a/tests/ui/object-safety/assoc_type_bounds2.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds2.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds2.stderr b/tests/ui/dyn-compatibility/assoc_type_bounds2.stderr
index 815747436bf..815747436bf 100644
--- a/tests/ui/object-safety/assoc_type_bounds2.stderr
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds2.stderr
diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed b/tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.fixed
index 88697bad4d7..88697bad4d7 100644
--- a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.fixed
diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs b/tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.rs
index 944b296aa4d..944b296aa4d 100644
--- a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr b/tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.stderr
index 9bb770ce431..9bb770ce431 100644
--- a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.stderr
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized.rs b/tests/ui/dyn-compatibility/assoc_type_bounds_sized.rs
index 7535871afe5..7535871afe5 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_others.rs b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_others.rs
index 5b07bc92f32..5b07bc92f32 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_others.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_others.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_others.stderr b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_others.stderr
index 5438faaaf05..5438faaaf05 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_others.stderr
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_others.stderr
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_unnecessary.rs
index e9216da5927..e9216da5927 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_unnecessary.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.stderr b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_unnecessary.stderr
index aaadc4ed7b1..aaadc4ed7b1 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.stderr
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_unnecessary.stderr
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_used.rs b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs
index d59fc1712ea..d59fc1712ea 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_used.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_used.stderr b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.stderr
index b67a1244ece..b67a1244ece 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_used.stderr
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.stderr
diff --git a/tests/ui/object-safety/object-safety-associated-consts.curr.stderr b/tests/ui/dyn-compatibility/associated-consts.curr.stderr
index 3c070f17c82..17d184942c7 100644
--- a/tests/ui/object-safety/object-safety-associated-consts.curr.stderr
+++ b/tests/ui/dyn-compatibility/associated-consts.curr.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-associated-consts.rs:12:31
+  --> $DIR/associated-consts.rs:12:31
    |
 LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
    |                               ^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-associated-consts.rs:9:11
+  --> $DIR/associated-consts.rs:9:11
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -14,13 +14,13 @@ LL |     const X: usize;
    = help: consider moving `X` to another trait
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-associated-consts.rs:14:5
+  --> $DIR/associated-consts.rs:14:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-associated-consts.rs:9:11
+  --> $DIR/associated-consts.rs:9:11
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr b/tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr
index 5b98cc35505..cc5120232c2 100644
--- a/tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-associated-consts.rs:14:5
+  --> $DIR/associated-consts.rs:14:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-associated-consts.rs:9:11
+  --> $DIR/associated-consts.rs:9:11
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-associated-consts.rs b/tests/ui/dyn-compatibility/associated-consts.rs
index a090214bbb4..fc7b372b782 100644
--- a/tests/ui/object-safety/object-safety-associated-consts.rs
+++ b/tests/ui/dyn-compatibility/associated-consts.rs
@@ -1,9 +1,9 @@
 // Check that we correctly prevent users from making trait objects
 // from traits with associated consts.
 //
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 trait Bar {
     const X: usize;
diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.new.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.new.stderr
new file mode 100644
index 00000000000..83795f3128e
--- /dev/null
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.new.stderr
@@ -0,0 +1,19 @@
+error[E0782]: expected a type, found a trait
+  --> $DIR/avoid-ice-on-warning-2.rs:4:13
+   |
+LL | fn id<F>(f: Copy) -> usize {
+   |             ^^^^
+   |
+   = note: `Copy` it is dyn-incompatible, so it can't be `dyn`
+help: use a new generic type parameter, constrained by `Copy`
+   |
+LL | fn id<F, T: Copy>(f: T) -> usize {
+   |        +++++++++     ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL | fn id<F>(f: impl Copy) -> usize {
+   |             ++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-2.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr
index 180cd679dea..54daefea31c 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning-2.old.stderr
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr
@@ -36,7 +36,7 @@ LL | fn id<F>(f: Copy) -> usize {
    = note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
 
 error[E0618]: expected function, found `(dyn Copy + 'static)`
-  --> $DIR/avoid-ice-on-warning-2.rs:11:5
+  --> $DIR/avoid-ice-on-warning-2.rs:12:5
    |
 LL | fn id<F>(f: Copy) -> usize {
    |          - `f` has type `(dyn Copy + 'static)`
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-2.rs b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.rs
index db2f4aea05b..3c2da667b39 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning-2.rs
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.rs
@@ -2,13 +2,14 @@
 //@[old] edition:2015
 //@[new] edition:2021
 fn id<F>(f: Copy) -> usize {
-//~^ ERROR the trait `Copy` cannot be made into an object
-//~| ERROR: the size for values of type `(dyn Copy + 'static)`
+//[new]~^ ERROR expected a type, found a trait
+//[old]~^^ ERROR the trait `Copy` cannot be made into an object
+//[old]~| ERROR the size for values of type `(dyn Copy + 'static)`
 //[old]~| WARN trait objects without an explicit `dyn` are deprecated
 //[old]~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
 //[old]~| WARN trait objects without an explicit `dyn` are deprecated
 //[old]~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
     f()
-    //~^ ERROR: expected function, found `(dyn Copy + 'static)`
+    //[old]~^ ERROR: expected function, found `(dyn Copy + 'static)`
 }
 fn main() {}
diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.new.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.new.stderr
new file mode 100644
index 00000000000..813b5863738
--- /dev/null
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.new.stderr
@@ -0,0 +1,57 @@
+error[E0782]: expected a type, found a trait
+  --> $DIR/avoid-ice-on-warning-3.rs:14:19
+   |
+LL | trait A { fn g(b: B) -> B; }
+   |                   ^
+   |
+   = note: `B` it is dyn-incompatible, so it can't be `dyn`
+help: use a new generic type parameter, constrained by `B`
+   |
+LL | trait A { fn g<T: B>(b: T) -> B; }
+   |               ++++++    ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL | trait A { fn g(b: impl B) -> B; }
+   |                   ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/avoid-ice-on-warning-3.rs:14:25
+   |
+LL | trait A { fn g(b: B) -> B; }
+   |                         ^
+   |
+help: `B` is dyn-incompatible, use `impl B` to return an opaque type, as long as you return a single underlying type
+   |
+LL | trait A { fn g(b: B) -> impl B; }
+   |                         ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/avoid-ice-on-warning-3.rs:4:19
+   |
+LL | trait B { fn f(a: A) -> A; }
+   |                   ^
+   |
+   = note: `A` it is dyn-incompatible, so it can't be `dyn`
+help: use a new generic type parameter, constrained by `A`
+   |
+LL | trait B { fn f<T: A>(a: T) -> A; }
+   |               ++++++    ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL | trait B { fn f(a: impl A) -> A; }
+   |                   ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/avoid-ice-on-warning-3.rs:4:25
+   |
+LL | trait B { fn f(a: A) -> A; }
+   |                         ^
+   |
+help: `A` is dyn-incompatible, use `impl A` to return an opaque type, as long as you return a single underlying type
+   |
+LL | trait B { fn f(a: A) -> impl A; }
+   |                         ++++
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-3.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr
index bd362abb355..6bc2d73a0d0 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning-3.old.stderr
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr
@@ -26,7 +26,7 @@ LL | trait B { fn f(a: A) -> dyn A; }
    |                         +++
 
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/avoid-ice-on-warning-3.rs:12:19
+  --> $DIR/avoid-ice-on-warning-3.rs:14:19
    |
 LL | trait A { fn g(b: B) -> B; }
    |                   ^
@@ -39,7 +39,7 @@ LL | trait A { fn g(b: dyn B) -> B; }
    |                   +++
 
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/avoid-ice-on-warning-3.rs:12:25
+  --> $DIR/avoid-ice-on-warning-3.rs:14:25
    |
 LL | trait A { fn g(b: B) -> B; }
    |                         ^
@@ -72,7 +72,7 @@ LL | trait B { fn f(a: A) -> A; }
    |                   ^ `A` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/avoid-ice-on-warning-3.rs:12:14
+  --> $DIR/avoid-ice-on-warning-3.rs:14:14
    |
 LL | trait A { fn g(b: B) -> B; }
    |       -      ^ ...because associated function `g` has no `self` parameter
@@ -88,7 +88,7 @@ LL | trait A { fn g(b: B) -> B where Self: Sized; }
    |                           +++++++++++++++++
 
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/avoid-ice-on-warning-3.rs:12:19
+  --> $DIR/avoid-ice-on-warning-3.rs:14:19
    |
 LL | trait A { fn g(b: B) -> B; }
    |                   ^
@@ -102,7 +102,7 @@ LL | trait A { fn g(b: dyn B) -> B; }
    |                   +++
 
 error[E0038]: the trait `B` cannot be made into an object
-  --> $DIR/avoid-ice-on-warning-3.rs:12:19
+  --> $DIR/avoid-ice-on-warning-3.rs:14:19
    |
 LL | trait A { fn g(b: B) -> B; }
    |                   ^ `B` cannot be made into an object
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-3.rs b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.rs
index 38bee8142bb..00d47225e92 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning-3.rs
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.rs
@@ -2,7 +2,9 @@
 //@[old] edition:2015
 //@[new] edition:2021
 trait B { fn f(a: A) -> A; }
-//~^ ERROR the trait `A` cannot be made into an object
+//[new]~^ ERROR expected a type, found a trait
+//[new]~| ERROR expected a type, found a trait
+//[old]~^^^ ERROR the trait `A` cannot be made into an object
 //[old]~| WARN trait objects without an explicit `dyn` are deprecated
 //[old]~| WARN trait objects without an explicit `dyn` are deprecated
 //[old]~| WARN trait objects without an explicit `dyn` are deprecated
@@ -10,7 +12,9 @@ trait B { fn f(a: A) -> A; }
 //[old]~| WARN this is accepted in the current edition
 //[old]~| WARN this is accepted in the current edition
 trait A { fn g(b: B) -> B; }
-//~^ ERROR the trait `B` cannot be made into an object
+//[new]~^ ERROR expected a type, found a trait
+//[new]~| ERROR expected a type, found a trait
+//[old]~^^^ ERROR the trait `B` cannot be made into an object
 //[old]~| WARN trait objects without an explicit `dyn` are deprecated
 //[old]~| WARN trait objects without an explicit `dyn` are deprecated
 //[old]~| WARN trait objects without an explicit `dyn` are deprecated
diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning.new.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning.new.stderr
new file mode 100644
index 00000000000..e9eb1cdd0c2
--- /dev/null
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning.new.stderr
@@ -0,0 +1,32 @@
+error: return types are denoted using `->`
+  --> $DIR/avoid-ice-on-warning.rs:4:23
+   |
+LL | fn call_this<F>(f: F) : Fn(&str) + call_that {}
+   |                       ^
+   |
+help: use `->` instead
+   |
+LL | fn call_this<F>(f: F) -> Fn(&str) + call_that {}
+   |                       ~~
+
+error[E0405]: cannot find trait `call_that` in this scope
+  --> $DIR/avoid-ice-on-warning.rs:4:36
+   |
+LL | fn call_this<F>(f: F) : Fn(&str) + call_that {}
+   |                                    ^^^^^^^^^ not found in this scope
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/avoid-ice-on-warning.rs:4:25
+   |
+LL | fn call_this<F>(f: F) : Fn(&str) + call_that {}
+   |                         ^^^^^^^^^^^^^^^^^^^^
+   |
+help: `Fn(&str) + call_that` is dyn-incompatible, use `impl Fn(&str) + call_that` to return an opaque type, as long as you return a single underlying type
+   |
+LL | fn call_this<F>(f: F) : impl Fn(&str) + call_that {}
+   |                         ++++
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0405, E0782.
+For more information about an error, try `rustc --explain E0405`.
diff --git a/tests/ui/object-safety/avoid-ice-on-warning.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr
index 646fb57af9e..646fb57af9e 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning.old.stderr
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr
diff --git a/tests/ui/object-safety/avoid-ice-on-warning.rs b/tests/ui/dyn-compatibility/avoid-ice-on-warning.rs
index b90d8911d50..ef82321df0e 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning.rs
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning.rs
@@ -4,6 +4,7 @@
 fn call_this<F>(f: F) : Fn(&str) + call_that {}
 //~^ ERROR return types are denoted using `->`
 //~| ERROR cannot find trait `call_that` in this scope
+//[new]~| ERROR expected a type, found a trait
 //[old]~| WARN trait objects without an explicit `dyn` are deprecated
 //[old]~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
 fn main() {}
diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.fixed
index 4f5310082e1..a54892afd3e 100644
--- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed
+++ b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.fixed
@@ -4,7 +4,8 @@
 //@[new] run-rustfix
 #![deny(bare_trait_objects)]
 fn ord_prefer_dot(s: String) -> impl Ord {
-    //~^ ERROR the trait `Ord` cannot be made into an object
+    //[new]~^ ERROR expected a type, found a trait
+    //[old]~^^ ERROR the trait `Ord` cannot be made into an object
     //[old]~| ERROR trait objects without an explicit `dyn` are deprecated
     //[old]~| WARNING this is accepted in the current edition (Rust 2015)
     (s.starts_with("."), s)
diff --git a/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.stderr b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.stderr
new file mode 100644
index 00000000000..52168261a64
--- /dev/null
+++ b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.stderr
@@ -0,0 +1,14 @@
+error[E0782]: expected a type, found a trait
+  --> $DIR/bare-trait-dont-suggest-dyn.rs:6:33
+   |
+LL | fn ord_prefer_dot(s: String) -> Ord {
+   |                                 ^^^
+   |
+help: `Ord` is dyn-incompatible, use `impl Ord` to return an opaque type, as long as you return a single underlying type
+   |
+LL | fn ord_prefer_dot(s: String) -> impl Ord {
+   |                                 ++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.old.stderr b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.old.stderr
index 45c9b0ce5d9..45c9b0ce5d9 100644
--- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.old.stderr
+++ b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.old.stderr
diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.rs
index cb5a305eab0..cf9be612d2e 100644
--- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs
+++ b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.rs
@@ -4,7 +4,8 @@
 //@[new] run-rustfix
 #![deny(bare_trait_objects)]
 fn ord_prefer_dot(s: String) -> Ord {
-    //~^ ERROR the trait `Ord` cannot be made into an object
+    //[new]~^ ERROR expected a type, found a trait
+    //[old]~^^ ERROR the trait `Ord` cannot be made into an object
     //[old]~| ERROR trait objects without an explicit `dyn` are deprecated
     //[old]~| WARNING this is accepted in the current edition (Rust 2015)
     (s.starts_with("."), s)
diff --git a/tests/ui/object-safety/object-safety-bounds.rs b/tests/ui/dyn-compatibility/bounds.rs
index 44bd369324a..1e04d11c516 100644
--- a/tests/ui/object-safety/object-safety-bounds.rs
+++ b/tests/ui/dyn-compatibility/bounds.rs
@@ -1,4 +1,4 @@
-// Traits with bounds mentioning `Self` are not object safe
+// Traits with bounds mentioning `Self` are dyn-incompatible.
 
 trait X {
     type U: PartialEq<Self>;
diff --git a/tests/ui/object-safety/object-safety-bounds.stderr b/tests/ui/dyn-compatibility/bounds.stderr
index 96a81a69639..9231d524fd1 100644
--- a/tests/ui/object-safety/object-safety-bounds.stderr
+++ b/tests/ui/dyn-compatibility/bounds.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `X` cannot be made into an object
-  --> $DIR/object-safety-bounds.rs:7:15
+  --> $DIR/bounds.rs:7:15
    |
 LL | fn f() -> Box<dyn X<U = u32>> {
    |               ^^^^^^^^^^^^^^ `X` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-bounds.rs:4:13
+  --> $DIR/bounds.rs:4:13
    |
 LL | trait X {
    |       - this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-by-value-self-use.rs b/tests/ui/dyn-compatibility/by-value-self-use.rs
index 8e93c538217..3c04ec0cd88 100644
--- a/tests/ui/object-safety/object-safety-by-value-self-use.rs
+++ b/tests/ui/dyn-compatibility/by-value-self-use.rs
@@ -1,4 +1,4 @@
-// Check that while a trait with by-value self is object-safe, we
+// Check that while a trait with by-value self is dyn-compatible, we
 // can't actually invoke it from an object (yet...?).
 
 #![feature(rustc_attrs)]
diff --git a/tests/ui/object-safety/object-safety-by-value-self-use.stderr b/tests/ui/dyn-compatibility/by-value-self-use.stderr
index 1701f6059a8..14785b982a3 100644
--- a/tests/ui/object-safety/object-safety-by-value-self-use.stderr
+++ b/tests/ui/dyn-compatibility/by-value-self-use.stderr
@@ -1,5 +1,5 @@
 error[E0161]: cannot move a value of type `dyn Bar`
-  --> $DIR/object-safety-by-value-self-use.rs:15:5
+  --> $DIR/by-value-self-use.rs:15:5
    |
 LL |     t.bar()
    |     ^ the size of `dyn Bar` cannot be statically determined
diff --git a/tests/ui/object-safety/object-safety-by-value-self.rs b/tests/ui/dyn-compatibility/by-value-self.rs
index 0d20032327c..a057a7ff0b5 100644
--- a/tests/ui/object-safety/object-safety-by-value-self.rs
+++ b/tests/ui/dyn-compatibility/by-value-self.rs
@@ -1,4 +1,4 @@
-// Check that a trait with by-value self is considered object-safe.
+// Check that a trait with by-value self is considered dyn-compatible.
 
 //@ build-pass (FIXME(62277): could be check-pass?)
 #![allow(dead_code)]
diff --git a/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs b/tests/ui/dyn-compatibility/call-when-assoc-ty-is-sized.rs
index 7a3a7f3ca2f..7a3a7f3ca2f 100644
--- a/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs
+++ b/tests/ui/dyn-compatibility/call-when-assoc-ty-is-sized.rs
diff --git a/tests/ui/object-safety/issue-102933.rs b/tests/ui/dyn-compatibility/elaborated-predicates-ordering.rs
index aa678fea176..d3c3963a673 100644
--- a/tests/ui/object-safety/issue-102933.rs
+++ b/tests/ui/dyn-compatibility/elaborated-predicates-ordering.rs
@@ -1,4 +1,5 @@
 //@ check-pass
+// issue: rust-lang/rust#102933
 
 use std::future::Future;
 
diff --git a/tests/ui/object-safety/erroneous_signature.rs b/tests/ui/dyn-compatibility/erroneous_signature.rs
index cc1841cc4b2..cc1841cc4b2 100644
--- a/tests/ui/object-safety/erroneous_signature.rs
+++ b/tests/ui/dyn-compatibility/erroneous_signature.rs
diff --git a/tests/ui/object-safety/erroneous_signature.stderr b/tests/ui/dyn-compatibility/erroneous_signature.stderr
index f3b14ffe34c..f3b14ffe34c 100644
--- a/tests/ui/object-safety/erroneous_signature.stderr
+++ b/tests/ui/dyn-compatibility/erroneous_signature.stderr
diff --git a/tests/ui/object-safety/object-safety-generics.curr.stderr b/tests/ui/dyn-compatibility/generics.curr.stderr
index 7528785d90b..c63db38a080 100644
--- a/tests/ui/object-safety/object-safety-generics.curr.stderr
+++ b/tests/ui/dyn-compatibility/generics.curr.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:18:31
+  --> $DIR/generics.rs:18:31
    |
 LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
    |                               ^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -14,13 +14,13 @@ LL |     fn bar<T>(&self, t: T);
    = help: consider moving `bar` to another trait
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:25:40
+  --> $DIR/generics.rs:25:40
    |
 LL | fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
    |                                        ^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -29,13 +29,13 @@ LL |     fn bar<T>(&self, t: T);
    = help: consider moving `bar` to another trait
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:20:5
+  --> $DIR/generics.rs:20:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -45,13 +45,13 @@ LL |     fn bar<T>(&self, t: T);
    = note: required for the cast from `&T` to `&dyn Bar`
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:27:10
+  --> $DIR/generics.rs:27:10
    |
 LL |     t as &dyn Bar
    |          ^^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -60,13 +60,13 @@ LL |     fn bar<T>(&self, t: T);
    = help: consider moving `bar` to another trait
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:27:5
+  --> $DIR/generics.rs:27:5
    |
 LL |     t as &dyn Bar
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-generics.object_safe_for_dispatch.stderr b/tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr
index 4686b994b33..ba2546ef2dc 100644
--- a/tests/ui/object-safety/object-safety-generics.object_safe_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:20:5
+  --> $DIR/generics.rs:20:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -15,13 +15,13 @@ LL |     fn bar<T>(&self, t: T);
    = note: required for the cast from `&T` to `&dyn Bar`
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:27:5
+  --> $DIR/generics.rs:27:5
    |
 LL |     t as &dyn Bar
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-generics.rs b/tests/ui/dyn-compatibility/generics.rs
index f005a689ac4..b51555aa500 100644
--- a/tests/ui/object-safety/object-safety-generics.rs
+++ b/tests/ui/dyn-compatibility/generics.rs
@@ -1,9 +1,9 @@
 // Check that we correctly prevent users from making trait objects
 // from traits with generic methods, unless `where Self : Sized` is
 // present.
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 
 trait Bar {
@@ -18,14 +18,14 @@ trait Quux {
 fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
     //[curr]~^ ERROR E0038
     t
-    //[object_safe_for_dispatch]~^ ERROR E0038
+    //[dyn_compatible_for_dispatch]~^ ERROR E0038
     //[curr]~^^ ERROR E0038
 }
 
 fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
     //[curr]~^ ERROR E0038
     t as &dyn Bar
-    //[object_safe_for_dispatch]~^ ERROR E0038
+    //[dyn_compatible_for_dispatch]~^ ERROR E0038
     //[curr]~^^ ERROR E0038
     //[curr]~| ERROR E0038
 }
diff --git a/tests/ui/object-safety/issue-106247.rs b/tests/ui/dyn-compatibility/impossible-predicates-multiple_supertrait_upcastable-check.rs
index 20a451a59a1..c2b8ecc141d 100644
--- a/tests/ui/object-safety/issue-106247.rs
+++ b/tests/ui/dyn-compatibility/impossible-predicates-multiple_supertrait_upcastable-check.rs
@@ -1,4 +1,5 @@
 //@ check-pass
+// issue: rust-lang/rust#106247
 
 pub trait Trait {
     fn method(&self) where Self: Sync;
diff --git a/tests/ui/object-safety/item-bounds-can-reference-self.rs b/tests/ui/dyn-compatibility/item-bounds-can-reference-self.rs
index 4ae982e8f95..4ae982e8f95 100644
--- a/tests/ui/object-safety/item-bounds-can-reference-self.rs
+++ b/tests/ui/dyn-compatibility/item-bounds-can-reference-self.rs
diff --git a/tests/ui/object-safety/issue-19538.rs b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.rs
index 7054ef41b1c..1289d2d7874 100644
--- a/tests/ui/object-safety/issue-19538.rs
+++ b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.rs
@@ -1,3 +1,5 @@
+// issue: rust-lang/rust#19538
+
 trait Foo {
     fn foo<T>(&self, val: T);
 }
diff --git a/tests/ui/object-safety/issue-19538.stderr b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr
index 3dbe389686a..7378ec023c9 100644
--- a/tests/ui/object-safety/issue-19538.stderr
+++ b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/issue-19538.rs:17:15
+  --> $DIR/mention-correct-dyn-incompatible-trait.rs:19:15
    |
 LL |     let test: &mut dyn Bar = &mut thing;
    |               ^^^^^^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-19538.rs:2:8
+  --> $DIR/mention-correct-dyn-incompatible-trait.rs:4:8
    |
 LL |     fn foo<T>(&self, val: T);
    |        ^^^ ...because method `foo` has generic type parameters
@@ -16,13 +16,13 @@ LL | trait Bar: Foo { }
    = help: only type `Thing` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/issue-19538.rs:17:30
+  --> $DIR/mention-correct-dyn-incompatible-trait.rs:19:30
    |
 LL |     let test: &mut dyn Bar = &mut thing;
    |                              ^^^^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-19538.rs:2:8
+  --> $DIR/mention-correct-dyn-incompatible-trait.rs:4:8
    |
 LL |     fn foo<T>(&self, val: T);
    |        ^^^ ...because method `foo` has generic type parameters
diff --git a/tests/ui/object-safety/object-safety-issue-22040.rs b/tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.rs
index c9ec44cc0b8..c9ec44cc0b8 100644
--- a/tests/ui/object-safety/object-safety-issue-22040.rs
+++ b/tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.rs
diff --git a/tests/ui/object-safety/object-safety-issue-22040.stderr b/tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.stderr
index e5723f12258..7578edce7d1 100644
--- a/tests/ui/object-safety/object-safety-issue-22040.stderr
+++ b/tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Expr` cannot be made into an object
-  --> $DIR/object-safety-issue-22040.rs:12:23
+  --> $DIR/mentions-Self-in-super-predicates.rs:12:23
    |
 LL |     elements: Vec<Box<dyn Expr + 'x>>,
    |                       ^^^^^^^^^^^^^ `Expr` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-issue-22040.rs:5:21
+  --> $DIR/mentions-Self-in-super-predicates.rs:5:21
    |
 LL | trait Expr: Debug + PartialEq {
    |       ----          ^^^^^^^^^ ...because it uses `Self` as a type parameter
@@ -14,13 +14,13 @@ LL | trait Expr: Debug + PartialEq {
    = help: only type `SExpr<'x>` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Expr` cannot be made into an object
-  --> $DIR/object-safety-issue-22040.rs:38:16
+  --> $DIR/mentions-Self-in-super-predicates.rs:38:16
    |
 LL |     let a: Box<dyn Expr> = Box::new(SExpr::new());
    |                ^^^^^^^^ `Expr` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-issue-22040.rs:5:21
+  --> $DIR/mentions-Self-in-super-predicates.rs:5:21
    |
 LL | trait Expr: Debug + PartialEq {
    |       ----          ^^^^^^^^^ ...because it uses `Self` as a type parameter
@@ -29,13 +29,13 @@ LL | trait Expr: Debug + PartialEq {
    = help: only type `SExpr<'x>` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Expr` cannot be made into an object
-  --> $DIR/object-safety-issue-22040.rs:40:16
+  --> $DIR/mentions-Self-in-super-predicates.rs:40:16
    |
 LL |     let b: Box<dyn Expr> = Box::new(SExpr::new());
    |                ^^^^^^^^ `Expr` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-issue-22040.rs:5:21
+  --> $DIR/mentions-Self-in-super-predicates.rs:5:21
    |
 LL | trait Expr: Debug + PartialEq {
    |       ----          ^^^^^^^^^ ...because it uses `Self` as a type parameter
diff --git a/tests/ui/object-safety/object-safety-mentions-Self.curr.stderr b/tests/ui/dyn-compatibility/mentions-Self.curr.stderr
index 7efb6ec3542..434e41cf218 100644
--- a/tests/ui/object-safety/object-safety-mentions-Self.curr.stderr
+++ b/tests/ui/dyn-compatibility/mentions-Self.curr.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-mentions-Self.rs:22:31
+  --> $DIR/mentions-Self.rs:22:31
    |
 LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
    |                               ^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-mentions-Self.rs:11:22
+  --> $DIR/mentions-Self.rs:11:22
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -14,13 +14,13 @@ LL |     fn bar(&self, x: &Self);
    = help: consider moving `bar` to another trait
 
 error[E0038]: the trait `Baz` cannot be made into an object
-  --> $DIR/object-safety-mentions-Self.rs:28:31
+  --> $DIR/mentions-Self.rs:28:31
    |
 LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
    |                               ^^^^^^^ `Baz` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-mentions-Self.rs:15:22
+  --> $DIR/mentions-Self.rs:15:22
    |
 LL | trait Baz {
    |       --- this trait cannot be made into an object...
@@ -29,13 +29,13 @@ LL |     fn baz(&self) -> Self;
    = help: consider moving `baz` to another trait
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-mentions-Self.rs:24:5
+  --> $DIR/mentions-Self.rs:24:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-mentions-Self.rs:11:22
+  --> $DIR/mentions-Self.rs:11:22
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -45,13 +45,13 @@ LL |     fn bar(&self, x: &Self);
    = note: required for the cast from `&T` to `&dyn Bar`
 
 error[E0038]: the trait `Baz` cannot be made into an object
-  --> $DIR/object-safety-mentions-Self.rs:30:5
+  --> $DIR/mentions-Self.rs:30:5
    |
 LL |     t
    |     ^ `Baz` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-mentions-Self.rs:15:22
+  --> $DIR/mentions-Self.rs:15:22
    |
 LL | trait Baz {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr b/tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr
index d0efb9c587e..dc2d1f87eb7 100644
--- a/tests/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-mentions-Self.rs:24:5
+  --> $DIR/mentions-Self.rs:24:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-mentions-Self.rs:11:22
+  --> $DIR/mentions-Self.rs:11:22
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -15,13 +15,13 @@ LL |     fn bar(&self, x: &Self);
    = note: required for the cast from `&T` to `&dyn Bar`
 
 error[E0038]: the trait `Baz` cannot be made into an object
-  --> $DIR/object-safety-mentions-Self.rs:30:5
+  --> $DIR/mentions-Self.rs:30:5
    |
 LL |     t
    |     ^ `Baz` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-mentions-Self.rs:15:22
+  --> $DIR/mentions-Self.rs:15:22
    |
 LL | trait Baz {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-mentions-Self.rs b/tests/ui/dyn-compatibility/mentions-Self.rs
index 1311faf97bc..84c229e252d 100644
--- a/tests/ui/object-safety/object-safety-mentions-Self.rs
+++ b/tests/ui/dyn-compatibility/mentions-Self.rs
@@ -2,9 +2,9 @@
 // form traits that make use of `Self` in an argument or return
 // position, unless `where Self : Sized` is present..
 //
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 
 trait Bar {
diff --git a/tests/ui/traits/object/object-unsafe-missing-assoc-type.rs b/tests/ui/dyn-compatibility/missing-assoc-type.rs
index c83be544c0a..c83be544c0a 100644
--- a/tests/ui/traits/object/object-unsafe-missing-assoc-type.rs
+++ b/tests/ui/dyn-compatibility/missing-assoc-type.rs
diff --git a/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr b/tests/ui/dyn-compatibility/missing-assoc-type.stderr
index 9258b38f26c..f8450ba212d 100644
--- a/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr
+++ b/tests/ui/dyn-compatibility/missing-assoc-type.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-unsafe-missing-assoc-type.rs:5:16
+  --> $DIR/missing-assoc-type.rs:5:16
    |
 LL | fn bar(x: &dyn Foo) {}
    |                ^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-missing-assoc-type.rs:2:10
+  --> $DIR/missing-assoc-type.rs:2:10
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -14,13 +14,13 @@ LL |     type Bar<T>;
    = help: consider moving `Bar` to another trait
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-unsafe-missing-assoc-type.rs:5:16
+  --> $DIR/missing-assoc-type.rs:5:16
    |
 LL | fn bar(x: &dyn Foo) {}
    |                ^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-missing-assoc-type.rs:2:10
+  --> $DIR/missing-assoc-type.rs:2:10
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -30,13 +30,13 @@ LL |     type Bar<T>;
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-unsafe-missing-assoc-type.rs:5:16
+  --> $DIR/missing-assoc-type.rs:5:16
    |
 LL | fn bar(x: &dyn Foo) {}
    |                ^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-missing-assoc-type.rs:2:10
+  --> $DIR/missing-assoc-type.rs:2:10
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -46,13 +46,13 @@ LL |     type Bar<T>;
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-unsafe-missing-assoc-type.rs:5:12
+  --> $DIR/missing-assoc-type.rs:5:12
    |
 LL | fn bar(x: &dyn Foo) {}
    |            ^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-missing-assoc-type.rs:2:10
+  --> $DIR/missing-assoc-type.rs:2:10
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-no-static.curr.stderr b/tests/ui/dyn-compatibility/no-static.curr.stderr
index 91c3d89602e..584db779855 100644
--- a/tests/ui/object-safety/object-safety-no-static.curr.stderr
+++ b/tests/ui/dyn-compatibility/no-static.curr.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-no-static.rs:12:22
+  --> $DIR/no-static.rs:12:22
    |
 LL | fn diverges() -> Box<dyn Foo> {
    |                      ^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-no-static.rs:9:8
+  --> $DIR/no-static.rs:9:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -22,13 +22,13 @@ LL |     fn foo() where Self: Sized {}
    |              +++++++++++++++++
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-no-static.rs:22:12
+  --> $DIR/no-static.rs:22:12
    |
 LL |     let b: Box<dyn Foo> = Box::new(Bar);
    |            ^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-no-static.rs:9:8
+  --> $DIR/no-static.rs:9:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -45,13 +45,13 @@ LL |     fn foo() where Self: Sized {}
    |              +++++++++++++++++
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-no-static.rs:22:27
+  --> $DIR/no-static.rs:22:27
    |
 LL |     let b: Box<dyn Foo> = Box::new(Bar);
    |                           ^^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-no-static.rs:9:8
+  --> $DIR/no-static.rs:9:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr b/tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr
index 52f6865b6f3..f2deb3b8d84 100644
--- a/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-no-static.rs:22:27
+  --> $DIR/no-static.rs:22:27
    |
 LL |     let b: Box<dyn Foo> = Box::new(Bar);
    |                           ^^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-no-static.rs:9:8
+  --> $DIR/no-static.rs:9:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-no-static.rs b/tests/ui/dyn-compatibility/no-static.rs
index 4f4e03d734e..54af16fe18e 100644
--- a/tests/ui/object-safety/object-safety-no-static.rs
+++ b/tests/ui/dyn-compatibility/no-static.rs
@@ -1,9 +1,9 @@
 // Check that we correctly prevent users from making trait objects
 // from traits with static methods.
 //
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 trait Foo {
     fn foo() {}
diff --git a/tests/ui/object-safety/object-safety-phantom-fn.rs b/tests/ui/dyn-compatibility/phantom-fn.rs
index 1019c24859f..9e410da82ee 100644
--- a/tests/ui/object-safety/object-safety-phantom-fn.rs
+++ b/tests/ui/dyn-compatibility/phantom-fn.rs
@@ -1,4 +1,4 @@
-// Check that `Self` appearing in a phantom fn does not make a trait not object safe.
+// Check that `Self` appearing in a phantom fn does not make a trait dyn-incompatible.
 
 //@ build-pass (FIXME(62277): could be check-pass?)
 #![allow(dead_code)]
diff --git a/tests/ui/object-safety/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs b/tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs
index dabaa309c16..7bc2af463cb 100644
--- a/tests/ui/object-safety/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs
+++ b/tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs
@@ -6,104 +6,102 @@ struct IceCream;
 
 impl IceCream {
     fn foo(_: &Trait) {}
-    //~^ ERROR: trait objects must include the `dyn` keyword
+    //~^ ERROR: expected a type, found a trait
 
     fn bar(self, _: &'a Trait) {}
-    //~^ ERROR: trait objects must include the `dyn` keyword
+    //~^ ERROR: expected a type, found a trait
     //~| ERROR: use of undeclared lifetime name
 
     fn alice<'a>(&self, _: &Trait) {}
-    //~^ ERROR: trait objects must include the `dyn` keyword
+    //~^ ERROR: expected a type, found a trait
 
     fn bob<'a>(_: &'a Trait) {}
-    //~^ ERROR: trait objects must include the `dyn` keyword
+    //~^ ERROR: expected a type, found a trait
 
     fn cat() -> &Trait {
         //~^ ERROR: missing lifetime specifier
-        //~| ERROR: trait objects must include the `dyn` keyword
+        //~| ERROR: expected a type, found a trait
         &Type
     }
 
     fn dog<'a>() -> &Trait {
         //~^ ERROR: missing lifetime specifier
-        //~| ERROR: trait objects must include the `dyn` keyword
+        //~| ERROR: expected a type, found a trait
         &Type
     }
 
     fn kitten() -> &'a Trait {
         //~^ ERROR: use of undeclared lifetime name
-        //~| ERROR: trait objects must include the `dyn` keyword
+        //~| ERROR: expected a type, found a trait
         &Type
     }
 
     fn puppy<'a>() -> &'a Trait {
-        //~^ ERROR: trait objects must include the `dyn` keyword
+        //~^ ERROR: expected a type, found a trait
         &Type
     }
 
     fn parrot() -> &mut Trait {
         //~^ ERROR: missing lifetime specifier
-        //~| ERROR: trait objects must include the `dyn` keyword
+        //~| ERROR: expected a type, found a trait
         &mut Type
-        //~^ ERROR: cannot return reference to temporary value
     }
 }
 
 trait Sing {
     fn foo(_: &Trait);
-    //~^ ERROR: trait objects must include the `dyn` keyword
+    //~^ ERROR: expected a type, found a trait
 
     fn bar(_: &'a Trait);
-    //~^ ERROR: trait objects must include the `dyn` keyword
+    //~^ ERROR: expected a type, found a trait
     //~| ERROR: use of undeclared lifetime name
 
     fn alice<'a>(_: &Trait);
-    //~^ ERROR: trait objects must include the `dyn` keyword
+    //~^ ERROR: expected a type, found a trait
 
     fn bob<'a>(_: &'a Trait);
-    //~^ ERROR: trait objects must include the `dyn` keyword
+    //~^ ERROR: expected a type, found a trait
 
     fn cat() -> &Trait;
         //~^ ERROR: missing lifetime specifier
-        //~| ERROR: trait objects must include the `dyn` keyword
+        //~| ERROR: expected a type, found a trait
 
     fn dog<'a>() -> &Trait {
         //~^ ERROR: missing lifetime specifier
-        //~| ERROR: trait objects must include the `dyn` keyword
+        //~| ERROR: expected a type, found a trait
         &Type
     }
 
     fn kitten() -> &'a Trait {
         //~^ ERROR: use of undeclared lifetime name
-        //~| ERROR: trait objects must include the `dyn` keyword
+        //~| ERROR: expected a type, found a trait
         &Type
     }
 
     fn puppy<'a>() -> &'a Trait {
-        //~^ ERROR: trait objects must include the `dyn` keyword
+        //~^ ERROR: expected a type, found a trait
         &Type
     }
 
     fn parrot() -> &mut Trait {
         //~^ ERROR: missing lifetime specifier
-        //~| ERROR: trait objects must include the `dyn` keyword
+        //~| ERROR: expected a type, found a trait
         &mut Type
-        //~^ ERROR: cannot return reference to temporary value
     }
 }
 
 fn foo(_: &Trait) {}
-//~^ ERROR: trait objects must include the `dyn` keyword
+//~^ ERROR: expected a type, found a trait
 
 fn bar(_: &'a Trait) {}
-//~^ ERROR: trait objects must include the `dyn` keyword
+//~^ ERROR: expected a type, found a trait
 //~| ERROR: use of undeclared lifetime name
 
 fn alice<'a>(_: &Trait) {}
-//~^ ERROR: trait objects must include the `dyn` keyword
+//~^ ERROR: expected a type, found a trait
 
 fn bob<'a>(_: &'a Trait) {}
-//~^ ERROR: trait objects must include the `dyn` keyword
+//~^ ERROR: expected a type, found a trait
 
 struct Type;
 
@@ -111,32 +109,31 @@ impl Trait for Type {}
 
 fn cat() -> &Trait {
 //~^ ERROR: missing lifetime specifier
-//~| ERROR: trait objects must include the `dyn` keyword
+//~| ERROR: expected a type, found a trait
     &Type
 }
 
 fn dog<'a>() -> &Trait {
 //~^ ERROR: missing lifetime specifier
-//~| ERROR: trait objects must include the `dyn` keyword
+//~| ERROR: expected a type, found a trait
     &Type
 }
 
 fn kitten() -> &'a Trait {
 //~^ ERROR: use of undeclared lifetime name
-//~| ERROR: trait objects must include the `dyn` keyword
+//~| ERROR: expected a type, found a trait
     &Type
 }
 
 fn puppy<'a>() -> &'a Trait {
-//~^ ERROR: trait objects must include the `dyn` keyword
+//~^ ERROR: expected a type, found a trait
     &Type
 }
 
 fn parrot() -> &mut Trait {
     //~^ ERROR: missing lifetime specifier
-    //~| ERROR: trait objects must include the `dyn` keyword
+    //~| ERROR: expected a type, found a trait
     &mut Type
-    //~^ ERROR: cannot return reference to temporary value
 }
 
 fn main() {}
diff --git a/tests/ui/object-safety/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr b/tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr
index 8bdfea7766e..4c6d84f0534 100644
--- a/tests/ui/object-safety/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr
+++ b/tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr
@@ -65,7 +65,7 @@ LL |     fn parrot() -> &'static mut Trait {
    |                     +++++++
 
 error[E0261]: use of undeclared lifetime name `'a`
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:56:16
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:55:16
    |
 LL |     fn bar(_: &'a Trait);
    |                ^^ undeclared lifetime
@@ -80,7 +80,7 @@ LL | trait Sing<'a> {
    |           ++++
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:66:17
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:65:17
    |
 LL |     fn cat() -> &Trait;
    |                 ^ expected named lifetime parameter
@@ -97,7 +97,7 @@ LL +     fn cat() -> Trait;
    |
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:70:21
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:69:21
    |
 LL |     fn dog<'a>() -> &Trait {
    |                     ^ expected named lifetime parameter
@@ -109,7 +109,7 @@ LL |     fn dog<'a>() -> &'a Trait {
    |                      ++
 
 error[E0261]: use of undeclared lifetime name `'a`
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:76:21
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:75:21
    |
 LL |     fn kitten() -> &'a Trait {
    |                     ^^ undeclared lifetime
@@ -124,7 +124,7 @@ LL | trait Sing<'a> {
    |           ++++
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:87:20
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:86:20
    |
 LL |     fn parrot() -> &mut Trait {
    |                    ^ expected named lifetime parameter
@@ -136,7 +136,7 @@ LL |     fn parrot() -> &'static mut Trait {
    |                     +++++++
 
 error[E0261]: use of undeclared lifetime name `'a`
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:98:12
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:96:12
    |
 LL | fn bar(_: &'a Trait) {}
    |       -    ^^ undeclared lifetime
@@ -144,7 +144,7 @@ LL | fn bar(_: &'a Trait) {}
    |       help: consider introducing lifetime `'a` here: `<'a>`
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:112:13
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:110:13
    |
 LL | fn cat() -> &Trait {
    |             ^ expected named lifetime parameter
@@ -156,7 +156,7 @@ LL | fn cat() -> &'static Trait {
    |              +++++++
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:118:17
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:116:17
    |
 LL | fn dog<'a>() -> &Trait {
    |                 ^ expected named lifetime parameter
@@ -168,7 +168,7 @@ LL | fn dog<'a>() -> &'a Trait {
    |                  ++
 
 error[E0261]: use of undeclared lifetime name `'a`
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:124:17
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:122:17
    |
 LL | fn kitten() -> &'a Trait {
    |          -      ^^ undeclared lifetime
@@ -176,7 +176,7 @@ LL | fn kitten() -> &'a Trait {
    |          help: consider introducing lifetime `'a` here: `<'a>`
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:135:16
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:133:16
    |
 LL | fn parrot() -> &mut Trait {
    |                ^ expected named lifetime parameter
@@ -187,35 +187,8 @@ help: consider using the `'static` lifetime, but this is uncommon unless you're
 LL | fn parrot() -> &'static mut Trait {
    |                 +++++++
 
-error[E0515]: cannot return reference to temporary value
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:47:9
-   |
-LL |         &mut Type
-   |         ^^^^^----
-   |         |    |
-   |         |    temporary value created here
-   |         returns a reference to data owned by the current function
-
-error[E0515]: cannot return reference to temporary value
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:90:9
-   |
-LL |         &mut Type
-   |         ^^^^^----
-   |         |    |
-   |         |    temporary value created here
-   |         returns a reference to data owned by the current function
-
-error[E0515]: cannot return reference to temporary value
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:138:5
-   |
-LL |     &mut Type
-   |     ^^^^^----
-   |     |    |
-   |     |    temporary value created here
-   |     returns a reference to data owned by the current function
-
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:53:16
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:52:16
    |
 LL |     fn foo(_: &Trait);
    |                ^^^^^
@@ -233,8 +206,8 @@ help: alternatively, use a trait object to accept any type that implements `Trai
 LL |     fn foo(_: &dyn Trait);
    |                +++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:56:19
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:55:19
    |
 LL |     fn bar(_: &'a Trait);
    |                   ^^^^^
@@ -252,8 +225,8 @@ help: alternatively, use a trait object to accept any type that implements `Trai
 LL |     fn bar(_: &'a dyn Trait);
    |                   +++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:60:22
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:59:22
    |
 LL |     fn alice<'a>(_: &Trait);
    |                      ^^^^^
@@ -271,8 +244,8 @@ help: alternatively, use a trait object to accept any type that implements `Trai
 LL |     fn alice<'a>(_: &dyn Trait);
    |                      +++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:63:23
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:62:23
    |
 LL |     fn bob<'a>(_: &'a Trait);
    |                       ^^^^^
@@ -290,8 +263,8 @@ help: alternatively, use a trait object to accept any type that implements `Trai
 LL |     fn bob<'a>(_: &'a dyn Trait);
    |                       +++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:66:18
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:65:18
    |
 LL |     fn cat() -> &Trait;
    |                  ^^^^^
@@ -305,8 +278,8 @@ help: alternatively, you can return an owned trait object
 LL |     fn cat() -> Box<dyn Trait>;
    |                 ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:70:22
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:69:22
    |
 LL |     fn dog<'a>() -> &Trait {
    |                      ^^^^^
@@ -320,8 +293,8 @@ help: alternatively, you can return an owned trait object
 LL |     fn dog<'a>() -> Box<dyn Trait> {
    |                     ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:76:24
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:75:24
    |
 LL |     fn kitten() -> &'a Trait {
    |                        ^^^^^
@@ -335,8 +308,8 @@ help: alternatively, you can return an owned trait object
 LL |     fn kitten() -> Box<dyn Trait> {
    |                    ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:82:27
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:81:27
    |
 LL |     fn puppy<'a>() -> &'a Trait {
    |                           ^^^^^
@@ -350,8 +323,8 @@ help: alternatively, you can return an owned trait object
 LL |     fn puppy<'a>() -> Box<dyn Trait> {
    |                       ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:87:25
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:86:25
    |
 LL |     fn parrot() -> &mut Trait {
    |                         ^^^^^
@@ -365,8 +338,8 @@ help: alternatively, you can return an owned trait object
 LL |     fn parrot() -> Box<dyn Trait> {
    |                    ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:95:12
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:93:12
    |
 LL | fn foo(_: &Trait) {}
    |            ^^^^^
@@ -384,8 +357,8 @@ help: alternatively, use a trait object to accept any type that implements `Trai
 LL | fn foo(_: &dyn Trait) {}
    |            +++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:98:15
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:96:15
    |
 LL | fn bar(_: &'a Trait) {}
    |               ^^^^^
@@ -403,8 +376,8 @@ help: alternatively, use a trait object to accept any type that implements `Trai
 LL | fn bar(_: &'a dyn Trait) {}
    |               +++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:102:18
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:100:18
    |
 LL | fn alice<'a>(_: &Trait) {}
    |                  ^^^^^
@@ -422,8 +395,8 @@ help: alternatively, use a trait object to accept any type that implements `Trai
 LL | fn alice<'a>(_: &dyn Trait) {}
    |                  +++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:105:19
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:103:19
    |
 LL | fn bob<'a>(_: &'a Trait) {}
    |                   ^^^^^
@@ -441,8 +414,8 @@ help: alternatively, use a trait object to accept any type that implements `Trai
 LL | fn bob<'a>(_: &'a dyn Trait) {}
    |                   +++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:112:14
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:110:14
    |
 LL | fn cat() -> &Trait {
    |              ^^^^^
@@ -456,8 +429,8 @@ help: alternatively, you can return an owned trait object
 LL | fn cat() -> Box<dyn Trait> {
    |             ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:118:18
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:116:18
    |
 LL | fn dog<'a>() -> &Trait {
    |                  ^^^^^
@@ -471,8 +444,8 @@ help: alternatively, you can return an owned trait object
 LL | fn dog<'a>() -> Box<dyn Trait> {
    |                 ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:124:20
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:122:20
    |
 LL | fn kitten() -> &'a Trait {
    |                    ^^^^^
@@ -486,8 +459,8 @@ help: alternatively, you can return an owned trait object
 LL | fn kitten() -> Box<dyn Trait> {
    |                ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:130:23
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:128:23
    |
 LL | fn puppy<'a>() -> &'a Trait {
    |                       ^^^^^
@@ -501,8 +474,8 @@ help: alternatively, you can return an owned trait object
 LL | fn puppy<'a>() -> Box<dyn Trait> {
    |                   ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:135:21
+error[E0782]: expected a type, found a trait
+  --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:133:21
    |
 LL | fn parrot() -> &mut Trait {
    |                     ^^^^^
@@ -516,7 +489,7 @@ help: alternatively, you can return an owned trait object
 LL | fn parrot() -> Box<dyn Trait> {
    |                ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:8:16
    |
 LL |     fn foo(_: &Trait) {}
@@ -535,7 +508,7 @@ help: alternatively, use a trait object to accept any type that implements `Trai
 LL |     fn foo(_: &dyn Trait) {}
    |                +++
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:11:25
    |
 LL |     fn bar(self, _: &'a Trait) {}
@@ -554,7 +527,7 @@ help: alternatively, use a trait object to accept any type that implements `Trai
 LL |     fn bar(self, _: &'a dyn Trait) {}
    |                         +++
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:15:29
    |
 LL |     fn alice<'a>(&self, _: &Trait) {}
@@ -573,7 +546,7 @@ help: alternatively, use a trait object to accept any type that implements `Trai
 LL |     fn alice<'a>(&self, _: &dyn Trait) {}
    |                             +++
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:18:23
    |
 LL |     fn bob<'a>(_: &'a Trait) {}
@@ -592,7 +565,7 @@ help: alternatively, use a trait object to accept any type that implements `Trai
 LL |     fn bob<'a>(_: &'a dyn Trait) {}
    |                       +++
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:21:18
    |
 LL |     fn cat() -> &Trait {
@@ -607,7 +580,7 @@ help: alternatively, you can return an owned trait object
 LL |     fn cat() -> Box<dyn Trait> {
    |                 ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:27:22
    |
 LL |     fn dog<'a>() -> &Trait {
@@ -622,7 +595,7 @@ help: alternatively, you can return an owned trait object
 LL |     fn dog<'a>() -> Box<dyn Trait> {
    |                     ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:33:24
    |
 LL |     fn kitten() -> &'a Trait {
@@ -637,7 +610,7 @@ help: alternatively, you can return an owned trait object
 LL |     fn kitten() -> Box<dyn Trait> {
    |                    ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:39:27
    |
 LL |     fn puppy<'a>() -> &'a Trait {
@@ -652,7 +625,7 @@ help: alternatively, you can return an owned trait object
 LL |     fn puppy<'a>() -> Box<dyn Trait> {
    |                       ~~~~~~~~~~~~~~
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:44:25
    |
 LL |     fn parrot() -> &mut Trait {
@@ -667,7 +640,7 @@ help: alternatively, you can return an owned trait object
 LL |     fn parrot() -> Box<dyn Trait> {
    |                    ~~~~~~~~~~~~~~
 
-error: aborting due to 45 previous errors
+error: aborting due to 42 previous errors
 
-Some errors have detailed explanations: E0106, E0261, E0515, E0782.
+Some errors have detailed explanations: E0106, E0261, E0782.
 For more information about an error, try `rustc --explain E0106`.
diff --git a/tests/ui/object-safety/object-safety-sized-2.curr.stderr b/tests/ui/dyn-compatibility/sized-2.curr.stderr
index 4ce7ac5704e..1017fde53d3 100644
--- a/tests/ui/object-safety/object-safety-sized-2.curr.stderr
+++ b/tests/ui/dyn-compatibility/sized-2.curr.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-sized-2.rs:14:31
+  --> $DIR/sized-2.rs:14:31
    |
 LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
    |                               ^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-sized-2.rs:9:18
+  --> $DIR/sized-2.rs:9:18
    |
 LL | trait Bar
    |       --- this trait cannot be made into an object...
@@ -13,13 +13,13 @@ LL |     where Self : Sized
    |                  ^^^^^ ...because it requires `Self: Sized`
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-sized-2.rs:16:5
+  --> $DIR/sized-2.rs:16:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-sized-2.rs:9:18
+  --> $DIR/sized-2.rs:9:18
    |
 LL | trait Bar
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr b/tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr
index 99066c104b7..534cf0f1b03 100644
--- a/tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-sized-2.rs:16:5
+  --> $DIR/sized-2.rs:16:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-sized-2.rs:9:18
+  --> $DIR/sized-2.rs:9:18
    |
 LL | trait Bar
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-sized-2.rs b/tests/ui/dyn-compatibility/sized-2.rs
index cfb5d588d70..f5edd287f24 100644
--- a/tests/ui/object-safety/object-safety-sized-2.rs
+++ b/tests/ui/dyn-compatibility/sized-2.rs
@@ -1,9 +1,9 @@
 // Check that we correctly prevent users from making trait objects
 // from traits where `Self : Sized`.
 //
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 trait Bar
     where Self : Sized
diff --git a/tests/ui/object-safety/object-safety-sized.curr.stderr b/tests/ui/dyn-compatibility/sized.curr.stderr
index b61f968d902..613833aad12 100644
--- a/tests/ui/object-safety/object-safety-sized.curr.stderr
+++ b/tests/ui/dyn-compatibility/sized.curr.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-sized.rs:12:32
+  --> $DIR/sized.rs:12:32
    |
 LL | fn make_bar<T: Bar>(t: &T) -> &dyn Bar {
    |                                ^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-sized.rs:8:12
+  --> $DIR/sized.rs:8:12
    |
 LL | trait Bar: Sized {
    |       ---  ^^^^^ ...because it requires `Self: Sized`
@@ -13,13 +13,13 @@ LL | trait Bar: Sized {
    |       this trait cannot be made into an object...
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-sized.rs:14:5
+  --> $DIR/sized.rs:14:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-sized.rs:8:12
+  --> $DIR/sized.rs:8:12
    |
 LL | trait Bar: Sized {
    |       ---  ^^^^^ ...because it requires `Self: Sized`
diff --git a/tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr b/tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr
index 5ce713375a4..cf847bc1577 100644
--- a/tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-sized.rs:14:5
+  --> $DIR/sized.rs:14:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-sized.rs:8:12
+  --> $DIR/sized.rs:8:12
    |
 LL | trait Bar: Sized {
    |       ---  ^^^^^ ...because it requires `Self: Sized`
diff --git a/tests/ui/object-safety/object-safety-sized.rs b/tests/ui/dyn-compatibility/sized.rs
index f4d6c945b33..4c4fe3f8f25 100644
--- a/tests/ui/object-safety/object-safety-sized.rs
+++ b/tests/ui/dyn-compatibility/sized.rs
@@ -1,9 +1,9 @@
 // Check that we correctly prevent users from making trait objects
 // from traits where `Self : Sized`.
 //
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 trait Bar: Sized {
     fn bar<T>(&self, t: T);
diff --git a/tests/ui/object-safety/object-safety-supertrait-mentions-GAT.rs b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs
index 14e00d2ef32..14e00d2ef32 100644
--- a/tests/ui/object-safety/object-safety-supertrait-mentions-GAT.rs
+++ b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs
diff --git a/tests/ui/object-safety/object-safety-supertrait-mentions-GAT.stderr b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr
index 4d44627e779..ac5a5b28d94 100644
--- a/tests/ui/object-safety/object-safety-supertrait-mentions-GAT.stderr
+++ b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr
@@ -1,14 +1,14 @@
 error[E0311]: the parameter type `Self` may not live long enough
    |
 note: ...that is required by this bound
-  --> $DIR/object-safety-supertrait-mentions-GAT.rs:6:15
+  --> $DIR/supertrait-mentions-GAT.rs:6:15
    |
 LL |         Self: 'a;
    |               ^^
    = help: consider adding an explicit lifetime bound `Self: 'a`...
 
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-safety-supertrait-mentions-GAT.rs:10:20
+  --> $DIR/supertrait-mentions-GAT.rs:10:20
    |
 LL | trait SuperTrait<T>: for<'a> GatTrait<Gat<'a> = T> {
    |       ---------- in this trait
@@ -21,13 +21,13 @@ LL |     fn c(&self) -> Self;
    |                    ~~~~
 
 error[E0038]: the trait `SuperTrait` cannot be made into an object
-  --> $DIR/object-safety-supertrait-mentions-GAT.rs:10:20
+  --> $DIR/supertrait-mentions-GAT.rs:10:20
    |
 LL |     fn c(&self) -> dyn SuperTrait<T>;
    |                    ^^^^^^^^^^^^^^^^^ `SuperTrait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-supertrait-mentions-GAT.rs:4:10
+  --> $DIR/supertrait-mentions-GAT.rs:4:10
    |
 LL |     type Gat<'a>
    |          ^^^ ...because it contains the generic associated type `Gat`
diff --git a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.rs b/tests/ui/dyn-compatibility/supertrait-mentions-Self.rs
index d96c7ba72a3..d96c7ba72a3 100644
--- a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.rs
+++ b/tests/ui/dyn-compatibility/supertrait-mentions-Self.rs
diff --git a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr b/tests/ui/dyn-compatibility/supertrait-mentions-Self.stderr
index b1a70fb859d..6474b115c46 100644
--- a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr
+++ b/tests/ui/dyn-compatibility/supertrait-mentions-Self.stderr
@@ -1,11 +1,11 @@
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
-  --> $DIR/object-safety-supertrait-mentions-Self.rs:8:13
+  --> $DIR/supertrait-mentions-Self.rs:8:13
    |
 LL | trait Baz : Bar<Self> {
    |             ^^^^^^^^^ doesn't have a size known at compile-time
    |
 note: required by an implicit `Sized` bound in `Bar`
-  --> $DIR/object-safety-supertrait-mentions-Self.rs:4:11
+  --> $DIR/supertrait-mentions-Self.rs:4:11
    |
 LL | trait Bar<T> {
    |           ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
@@ -19,13 +19,13 @@ LL | trait Bar<T: ?Sized> {
    |            ++++++++
 
 error[E0038]: the trait `Baz` cannot be made into an object
-  --> $DIR/object-safety-supertrait-mentions-Self.rs:16:31
+  --> $DIR/supertrait-mentions-Self.rs:16:31
    |
 LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
    |                               ^^^^^^^ `Baz` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-supertrait-mentions-Self.rs:8:13
+  --> $DIR/supertrait-mentions-Self.rs:8:13
    |
 LL | trait Baz : Bar<Self> {
    |       ---   ^^^^^^^^^ ...because it uses `Self` as a type parameter
diff --git a/tests/ui/object-safety/issue-102762.rs b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs
index 576f73e08bc..5c71bd7769c 100644
--- a/tests/ui/object-safety/issue-102762.rs
+++ b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs
@@ -1,7 +1,8 @@
 //@ compile-flags: --crate-type=lib
 // This test checks that the `where_clauses_object_safety` lint does not cause
-// other object safety *hard errors* to be suppressed, because we currently
-// only emit one object safety error per trait...
+// other dyn-compatibility *hard errors* to be suppressed, because we currently
+// only emit one dyn-compatibility error per trait...
+// issue: rust-lang/rust#102762
 
 use std::future::Future;
 use std::pin::Pin;
diff --git a/tests/ui/object-safety/issue-102762.stderr b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr
index 05451eb8399..8d62ac9d923 100644
--- a/tests/ui/object-safety/issue-102762.stderr
+++ b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr
@@ -1,5 +1,5 @@
 error[E0038]: the trait `Fetcher` cannot be made into an object
-  --> $DIR/issue-102762.rs:18:21
+  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:19:21
    |
 LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
    |                      ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self`
@@ -8,7 +8,7 @@ LL | fn fetcher() -> Box<dyn Fetcher> {
    |                     ^^^^^^^^^^^ `Fetcher` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-102762.rs:10:22
+  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22
    |
 LL | pub trait Fetcher: Send + Sync {
    |           ------- this trait cannot be made into an object...
@@ -16,7 +16,7 @@ LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>>
    |                      ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on
 
 error[E0038]: the trait `Fetcher` cannot be made into an object
-  --> $DIR/issue-102762.rs:24:19
+  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:25:19
    |
 LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
    |                      ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self`
@@ -25,7 +25,7 @@ LL |     let fetcher = fetcher();
    |                   ^^^^^^^^^ `Fetcher` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-102762.rs:10:22
+  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22
    |
 LL | pub trait Fetcher: Send + Sync {
    |           ------- this trait cannot be made into an object...
@@ -33,7 +33,7 @@ LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>>
    |                      ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on
 
 error[E0038]: the trait `Fetcher` cannot be made into an object
-  --> $DIR/issue-102762.rs:26:13
+  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:27:13
    |
 LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
    |                      ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self`
@@ -42,7 +42,7 @@ LL |     let _ = fetcher.get();
    |             ^^^^^^^^^^^^^ `Fetcher` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-102762.rs:10:22
+  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22
    |
 LL | pub trait Fetcher: Send + Sync {
    |           ------- this trait cannot be made into an object...
diff --git a/tests/ui/dyn-keyword/dyn-2021-edition-error.rs b/tests/ui/dyn-keyword/dyn-2021-edition-error.rs
index f98bf4ef5d1..5d607d82ea1 100644
--- a/tests/ui/dyn-keyword/dyn-2021-edition-error.rs
+++ b/tests/ui/dyn-keyword/dyn-2021-edition-error.rs
@@ -1,10 +1,10 @@
 //@ edition:2021
 
 fn function(x: &SomeTrait, y: Box<SomeTrait>) {
-    //~^ ERROR trait objects must include the `dyn` keyword
-    //~| ERROR trait objects must include the `dyn` keyword
+    //~^ ERROR expected a type, found a trait
+    //~| ERROR expected a type, found a trait
     let _x: &SomeTrait = todo!();
-    //~^ ERROR trait objects must include the `dyn` keyword
+    //~^ ERROR expected a type, found a trait
 }
 
 trait SomeTrait {}
diff --git a/tests/ui/dyn-keyword/dyn-2021-edition-error.stderr b/tests/ui/dyn-keyword/dyn-2021-edition-error.stderr
index 52ee6c81ab7..6d1a1618ac0 100644
--- a/tests/ui/dyn-keyword/dyn-2021-edition-error.stderr
+++ b/tests/ui/dyn-keyword/dyn-2021-edition-error.stderr
@@ -1,4 +1,4 @@
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/dyn-2021-edition-error.rs:3:17
    |
 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
@@ -17,24 +17,24 @@ help: alternatively, use a trait object to accept any type that implements `Some
 LL | fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
    |                 +++
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/dyn-2021-edition-error.rs:3:35
    |
 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
    |                                   ^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
    |                                   +++
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/dyn-2021-edition-error.rs:6:14
    |
 LL |     let _x: &SomeTrait = todo!();
    |              ^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL |     let _x: &dyn SomeTrait = todo!();
    |              +++
diff --git a/tests/ui/dyn-keyword/suggest-dyn-on-bare-trait-in-pat.rs b/tests/ui/dyn-keyword/suggest-dyn-on-bare-trait-in-pat.rs
index 19b5edb620f..bee15788da9 100644
--- a/tests/ui/dyn-keyword/suggest-dyn-on-bare-trait-in-pat.rs
+++ b/tests/ui/dyn-keyword/suggest-dyn-on-bare-trait-in-pat.rs
@@ -9,6 +9,7 @@ impl dyn Trait {
 fn main() {
     match () {
         Trait::CONST => {}
-        //~^ ERROR trait objects must include the `dyn` keyword
+        //~^ ERROR expected a type, found a trait
+        //~| HELP you can add the `dyn` keyword if you want a trait object
     }
 }
diff --git a/tests/ui/dyn-keyword/suggest-dyn-on-bare-trait-in-pat.stderr b/tests/ui/dyn-keyword/suggest-dyn-on-bare-trait-in-pat.stderr
index 4446a89b63b..6a2bb3ec09a 100644
--- a/tests/ui/dyn-keyword/suggest-dyn-on-bare-trait-in-pat.stderr
+++ b/tests/ui/dyn-keyword/suggest-dyn-on-bare-trait-in-pat.stderr
@@ -1,10 +1,10 @@
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/suggest-dyn-on-bare-trait-in-pat.rs:11:9
    |
 LL |         Trait::CONST => {}
    |         ^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL |         <dyn Trait>::CONST => {}
    |         ++++      +
diff --git a/tests/ui/editions/dyn-trait-sugg-2021.rs b/tests/ui/editions/dyn-trait-sugg-2021.rs
index d702bfb2f88..a5364662600 100644
--- a/tests/ui/editions/dyn-trait-sugg-2021.rs
+++ b/tests/ui/editions/dyn-trait-sugg-2021.rs
@@ -8,5 +8,5 @@ impl<T> dyn Foo<T> {
 
 fn main() {
     Foo::hi(123);
-    //~^ ERROR trait objects must include the `dyn` keyword
+    //~^ ERROR expected a type, found a trait
 }
diff --git a/tests/ui/editions/dyn-trait-sugg-2021.stderr b/tests/ui/editions/dyn-trait-sugg-2021.stderr
index 8a65fea11c9..3aea8ac491d 100644
--- a/tests/ui/editions/dyn-trait-sugg-2021.stderr
+++ b/tests/ui/editions/dyn-trait-sugg-2021.stderr
@@ -1,10 +1,10 @@
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/dyn-trait-sugg-2021.rs:10:5
    |
 LL |     Foo::hi(123);
    |     ^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL |     <dyn Foo>::hi(123);
    |     ++++    +
diff --git a/tests/ui/error-codes/E0010-teach.stderr b/tests/ui/error-codes/E0010-teach.stderr
index 7634970f36e..37a9892ccbf 100644
--- a/tests/ui/error-codes/E0010-teach.stderr
+++ b/tests/ui/error-codes/E0010-teach.stderr
@@ -4,7 +4,7 @@ error[E0010]: allocations are not allowed in constants
 LL | const CON: Vec<i32> = vec![1, 2, 3];
    |                       ^^^^^^^^^^^^^ allocation not allowed in constants
    |
-   = note: The value of statics and constants must be known at compile time, and they live for the entire lifetime of a program. Creating a boxed value allocates memory on the heap at runtime, and therefore cannot be done at compile time.
+   = note: The runtime heap is not yet available at compile-time, so no runtime heap allocations can be created.
    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0015]: cannot call non-const fn `slice::<impl [i32]>::into_vec::<std::alloc::Global>` in constants
diff --git a/tests/ui/error-codes/e0119/issue-23563.stderr b/tests/ui/error-codes/e0119/issue-23563.stderr
index 86737742f74..a308769af13 100644
--- a/tests/ui/error-codes/e0119/issue-23563.stderr
+++ b/tests/ui/error-codes/e0119/issue-23563.stderr
@@ -1,4 +1,4 @@
-error[E0119]: conflicting implementations of trait `LolFrom<&[_]>` for type `LocalType<_>`
+error[E0119]: conflicting implementations of trait `LolFrom<&[u8]>` for type `LocalType<u8>`
   --> $DIR/issue-23563.rs:13:1
    |
 LL | impl<'a, T> LolFrom<&'a [T]> for LocalType<T> {
diff --git a/tests/ui/extern/issue-95829.rs b/tests/ui/extern/issue-95829.rs
index ad4e04f7c3a..c5ae4c68265 100644
--- a/tests/ui/extern/issue-95829.rs
+++ b/tests/ui/extern/issue-95829.rs
@@ -2,7 +2,7 @@
 
 extern {
     async fn L() { //~ ERROR: incorrect function inside `extern` block
-        //~^ ERROR: functions in `extern` blocks cannot have qualifiers
+        //~^ ERROR: functions in `extern` blocks cannot have `async` qualifier
         async fn M() {}
     }
 }
diff --git a/tests/ui/extern/issue-95829.stderr b/tests/ui/extern/issue-95829.stderr
index 16504d1f0c9..2f396b8cc04 100644
--- a/tests/ui/extern/issue-95829.stderr
+++ b/tests/ui/extern/issue-95829.stderr
@@ -15,13 +15,13 @@ LL | |     }
    = help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
    = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
 
-error: functions in `extern` blocks cannot have qualifiers
+error: functions in `extern` blocks cannot have `async` qualifier
   --> $DIR/issue-95829.rs:4:5
    |
 LL | extern {
    | ------ in this `extern` block
 LL |     async fn L() {
-   |     ^^^^^ help: remove this qualifier
+   |     ^^^^^ help: remove the `async` qualifier
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr b/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr
new file mode 100644
index 00000000000..36a017dd53c
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr
@@ -0,0 +1,23 @@
+error[E0658]: use of unstable library feature 'autodiff'
+  --> $DIR/feature-gate-autodiff-use.rs:13:3
+   |
+LL | #[autodiff(dfoo, Reverse)]
+   |   ^^^^^^^^
+   |
+   = note: see issue #124509 <https://github.com/rust-lang/rust/issues/124509> for more information
+   = help: add `#![feature(autodiff)]` 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]: use of unstable library feature 'autodiff'
+  --> $DIR/feature-gate-autodiff-use.rs:9:5
+   |
+LL | use std::autodiff::autodiff;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #124509 <https://github.com/rust-lang/rust/issues/124509> for more information
+   = help: add `#![feature(autodiff)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr b/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr
new file mode 100644
index 00000000000..4b767f824c8
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr
@@ -0,0 +1,29 @@
+error[E0658]: use of unstable library feature 'autodiff'
+  --> $DIR/feature-gate-autodiff-use.rs:13:3
+   |
+LL | #[autodiff(dfoo, Reverse)]
+   |   ^^^^^^^^
+   |
+   = note: see issue #124509 <https://github.com/rust-lang/rust/issues/124509> for more information
+   = help: add `#![feature(autodiff)]` 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: this rustc version does not support autodiff
+  --> $DIR/feature-gate-autodiff-use.rs:13:1
+   |
+LL | #[autodiff(dfoo, Reverse)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0658]: use of unstable library feature 'autodiff'
+  --> $DIR/feature-gate-autodiff-use.rs:9:5
+   |
+LL | use std::autodiff::autodiff;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #124509 <https://github.com/rust-lang/rust/issues/124509> for more information
+   = help: add `#![feature(autodiff)]` 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 3 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-autodiff-use.rs b/tests/ui/feature-gates/feature-gate-autodiff-use.rs
new file mode 100644
index 00000000000..2276a79d6e2
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-autodiff-use.rs
@@ -0,0 +1,17 @@
+//@ revisions: has_support no_support
+//@[no_support] ignore-enzyme
+//@[has_support] needs-enzyme
+
+// This checks that without enabling the autodiff feature, we can't import std::autodiff::autodiff;
+
+#![crate_type = "lib"]
+
+use std::autodiff::autodiff;
+//[has_support]~^ ERROR use of unstable library feature 'autodiff'
+//[no_support]~^^ ERROR use of unstable library feature 'autodiff'
+
+#[autodiff(dfoo, Reverse)]
+//[has_support]~^ ERROR use of unstable library feature 'autodiff' [E0658]
+//[no_support]~^^ ERROR use of unstable library feature 'autodiff' [E0658]
+//[no_support]~| ERROR this rustc version does not support autodiff
+fn foo() {}
diff --git a/tests/ui/feature-gates/feature-gate-autodiff.has_support.stderr b/tests/ui/feature-gates/feature-gate-autodiff.has_support.stderr
new file mode 100644
index 00000000000..c25cf7d3373
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-autodiff.has_support.stderr
@@ -0,0 +1,13 @@
+error: cannot find attribute `autodiff` in this scope
+  --> $DIR/feature-gate-autodiff.rs:9:3
+   |
+LL | #[autodiff(dfoo, Reverse)]
+   |   ^^^^^^^^
+   |
+help: consider importing this attribute macro
+   |
+LL + use std::autodiff::autodiff;
+   |
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/feature-gates/feature-gate-autodiff.no_support.stderr b/tests/ui/feature-gates/feature-gate-autodiff.no_support.stderr
new file mode 100644
index 00000000000..c25cf7d3373
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-autodiff.no_support.stderr
@@ -0,0 +1,13 @@
+error: cannot find attribute `autodiff` in this scope
+  --> $DIR/feature-gate-autodiff.rs:9:3
+   |
+LL | #[autodiff(dfoo, Reverse)]
+   |   ^^^^^^^^
+   |
+help: consider importing this attribute macro
+   |
+LL + use std::autodiff::autodiff;
+   |
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/feature-gates/feature-gate-autodiff.rs b/tests/ui/feature-gates/feature-gate-autodiff.rs
new file mode 100644
index 00000000000..4249b229a69
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-autodiff.rs
@@ -0,0 +1,12 @@
+//@ revisions: has_support no_support
+//@[no_support] ignore-enzyme
+//@[has_support] needs-enzyme
+
+#![crate_type = "lib"]
+
+// This checks that without the autodiff feature enabled, we can't use it.
+
+#[autodiff(dfoo, Reverse)]
+//[has_support]~^ ERROR cannot find attribute `autodiff` in this scope
+//[no_support]~^^ ERROR cannot find attribute `autodiff` in this scope
+fn foo() {}
diff --git a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs
index 23857cbaca8..3c9e903d4ba 100644
--- a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs
+++ b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs
@@ -1,4 +1,4 @@
-// Check that a self parameter type requires a DispatchFromDyn impl to be object safe
+// Check that a self parameter type requires a DispatchFromDyn impl to be dyn-compatible.
 
 #![feature(arbitrary_self_types, unsize, coerce_unsized)]
 
diff --git a/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.rs b/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.rs
new file mode 100644
index 00000000000..e38ab66dbe5
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.rs
@@ -0,0 +1,41 @@
+// Test that the use of the dyn-incompatible trait objects
+// are gated by the `dyn_compatible_for_dispatch` feature gate.
+
+trait DynIncompatible1: Sized {}
+
+trait DynIncompatible2 {
+    fn static_fn() {}
+}
+
+trait DynIncompatible3 {
+    fn foo<T>(&self);
+}
+
+trait DynIncompatible4 {
+    fn foo(&self, s: &Self);
+}
+
+fn takes_dyn_incompatible_ref<T>(obj: &dyn DynIncompatible1) {
+    //~^ ERROR E0038
+}
+
+fn return_dyn_incompatible_ref() -> &'static dyn DynIncompatible2 {
+    //~^ ERROR E0038
+    loop {}
+}
+
+fn takes_dyn_incompatible_box(obj: Box<dyn DynIncompatible3>) {
+    //~^ ERROR E0038
+}
+
+fn return_dyn_incompatible_rc() -> std::rc::Rc<dyn DynIncompatible4> {
+    //~^ ERROR E0038
+    loop {}
+}
+
+trait Trait {}
+
+impl Trait for dyn DynIncompatible1 {}
+//~^ ERROR E0038
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr b/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr
new file mode 100644
index 00000000000..ed021c154a5
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr
@@ -0,0 +1,83 @@
+error[E0038]: the trait `DynIncompatible1` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:18:40
+   |
+LL | fn takes_dyn_incompatible_ref<T>(obj: &dyn DynIncompatible1) {
+   |                                        ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible1` cannot be made into an object
+   |
+note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:4:25
+   |
+LL | trait DynIncompatible1: Sized {}
+   |       ----------------  ^^^^^ ...because it requires `Self: Sized`
+   |       |
+   |       this trait cannot be made into an object...
+
+error[E0038]: the trait `DynIncompatible2` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:22:46
+   |
+LL | fn return_dyn_incompatible_ref() -> &'static dyn DynIncompatible2 {
+   |                                              ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible2` cannot be made into an object
+   |
+note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:7:8
+   |
+LL | trait DynIncompatible2 {
+   |       ---------------- this trait cannot be made into an object...
+LL |     fn static_fn() {}
+   |        ^^^^^^^^^ ...because associated function `static_fn` has no `self` parameter
+help: consider turning `static_fn` into a method by giving it a `&self` argument
+   |
+LL |     fn static_fn(&self) {}
+   |                  +++++
+help: alternatively, consider constraining `static_fn` so it does not apply to trait objects
+   |
+LL |     fn static_fn() where Self: Sized {}
+   |                    +++++++++++++++++
+
+error[E0038]: the trait `DynIncompatible3` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:27:40
+   |
+LL | fn takes_dyn_incompatible_box(obj: Box<dyn DynIncompatible3>) {
+   |                                        ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible3` cannot be made into an object
+   |
+note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:11:8
+   |
+LL | trait DynIncompatible3 {
+   |       ---------------- this trait cannot be made into an object...
+LL |     fn foo<T>(&self);
+   |        ^^^ ...because method `foo` has generic type parameters
+   = help: consider moving `foo` to another trait
+
+error[E0038]: the trait `DynIncompatible4` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:31:48
+   |
+LL | fn return_dyn_incompatible_rc() -> std::rc::Rc<dyn DynIncompatible4> {
+   |                                                ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible4` cannot be made into an object
+   |
+note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:15:22
+   |
+LL | trait DynIncompatible4 {
+   |       ---------------- this trait cannot be made into an object...
+LL |     fn foo(&self, s: &Self);
+   |                      ^^^^^ ...because method `foo` references the `Self` type in this parameter
+   = help: consider moving `foo` to another trait
+
+error[E0038]: the trait `DynIncompatible1` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:38:16
+   |
+LL | impl Trait for dyn DynIncompatible1 {}
+   |                ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible1` cannot be made into an object
+   |
+note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:4:25
+   |
+LL | trait DynIncompatible1: Sized {}
+   |       ----------------  ^^^^^ ...because it requires `Self: Sized`
+   |       |
+   |       this trait cannot be made into an object...
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.rs b/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.rs
deleted file mode 100644
index 37348e476d4..00000000000
--- a/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-// Test that the use of the non object-safe trait objects
-// are gated by `object_safe_for_dispatch` feature gate.
-
-trait NonObjectSafe1: Sized {}
-
-trait NonObjectSafe2 {
-    fn static_fn() {}
-}
-
-trait NonObjectSafe3 {
-    fn foo<T>(&self);
-}
-
-trait NonObjectSafe4 {
-    fn foo(&self, s: &Self);
-}
-
-fn takes_non_object_safe_ref<T>(obj: &dyn NonObjectSafe1) {
-    //~^ ERROR E0038
-}
-
-fn return_non_object_safe_ref() -> &'static dyn NonObjectSafe2 {
-    //~^ ERROR E0038
-    loop {}
-}
-
-fn takes_non_object_safe_box(obj: Box<dyn NonObjectSafe3>) {
-    //~^ ERROR E0038
-}
-
-fn return_non_object_safe_rc() -> std::rc::Rc<dyn NonObjectSafe4> {
-    //~^ ERROR E0038
-    loop {}
-}
-
-trait Trait {}
-
-impl Trait for dyn NonObjectSafe1 {}
-//~^ ERROR E0038
-
-fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr b/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr
deleted file mode 100644
index fd5ed9c40f7..00000000000
--- a/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr
+++ /dev/null
@@ -1,83 +0,0 @@
-error[E0038]: the trait `NonObjectSafe1` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:18:39
-   |
-LL | fn takes_non_object_safe_ref<T>(obj: &dyn NonObjectSafe1) {
-   |                                       ^^^^^^^^^^^^^^^^^^ `NonObjectSafe1` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:4:23
-   |
-LL | trait NonObjectSafe1: Sized {}
-   |       --------------  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait cannot be made into an object...
-
-error[E0038]: the trait `NonObjectSafe2` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:22:45
-   |
-LL | fn return_non_object_safe_ref() -> &'static dyn NonObjectSafe2 {
-   |                                             ^^^^^^^^^^^^^^^^^^ `NonObjectSafe2` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:7:8
-   |
-LL | trait NonObjectSafe2 {
-   |       -------------- this trait cannot be made into an object...
-LL |     fn static_fn() {}
-   |        ^^^^^^^^^ ...because associated function `static_fn` has no `self` parameter
-help: consider turning `static_fn` into a method by giving it a `&self` argument
-   |
-LL |     fn static_fn(&self) {}
-   |                  +++++
-help: alternatively, consider constraining `static_fn` so it does not apply to trait objects
-   |
-LL |     fn static_fn() where Self: Sized {}
-   |                    +++++++++++++++++
-
-error[E0038]: the trait `NonObjectSafe3` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:27:39
-   |
-LL | fn takes_non_object_safe_box(obj: Box<dyn NonObjectSafe3>) {
-   |                                       ^^^^^^^^^^^^^^^^^^ `NonObjectSafe3` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:11:8
-   |
-LL | trait NonObjectSafe3 {
-   |       -------------- this trait cannot be made into an object...
-LL |     fn foo<T>(&self);
-   |        ^^^ ...because method `foo` has generic type parameters
-   = help: consider moving `foo` to another trait
-
-error[E0038]: the trait `NonObjectSafe4` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:31:47
-   |
-LL | fn return_non_object_safe_rc() -> std::rc::Rc<dyn NonObjectSafe4> {
-   |                                               ^^^^^^^^^^^^^^^^^^ `NonObjectSafe4` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:15:22
-   |
-LL | trait NonObjectSafe4 {
-   |       -------------- this trait cannot be made into an object...
-LL |     fn foo(&self, s: &Self);
-   |                      ^^^^^ ...because method `foo` references the `Self` type in this parameter
-   = help: consider moving `foo` to another trait
-
-error[E0038]: the trait `NonObjectSafe1` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:38:16
-   |
-LL | impl Trait for dyn NonObjectSafe1 {}
-   |                ^^^^^^^^^^^^^^^^^^ `NonObjectSafe1` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:4:23
-   |
-LL | trait NonObjectSafe1: Sized {}
-   |       --------------  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait cannot be made into an object...
-
-error: aborting due to 5 previous errors
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/feature-gates/feature-gate-pin_ergonomics.rs b/tests/ui/feature-gates/feature-gate-pin_ergonomics.rs
index 3382504af9d..4624faf1e53 100644
--- a/tests/ui/feature-gates/feature-gate-pin_ergonomics.rs
+++ b/tests/ui/feature-gates/feature-gate-pin_ergonomics.rs
@@ -1,4 +1,4 @@
-#![allow(dead_code, incomplete_features)]
+#![allow(dead_code)]
 
 use std::pin::Pin;
 
@@ -9,10 +9,13 @@ impl Foo {
     }
 }
 
-fn foo(_: Pin<&mut Foo>) {
+fn foo(x: Pin<&mut Foo>) {
+    let _y: &pin mut Foo = x; //~ ERROR pinned reference syntax is experimental
 }
 
-fn bar(mut x: Pin<&mut Foo>) {
+fn foo_sugar(_: &pin mut Foo) {} //~ ERROR pinned reference syntax is experimental
+
+fn bar(x: Pin<&mut Foo>) {
     foo(x);
     foo(x); //~ ERROR use of moved value: `x`
 }
@@ -22,4 +25,6 @@ fn baz(mut x: Pin<&mut Foo>) {
     x.foo(); //~ ERROR use of moved value: `x`
 }
 
+fn baz_sugar(_: &pin const Foo) {} //~ ERROR pinned reference syntax is experimental
+
 fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-pin_ergonomics.stderr b/tests/ui/feature-gates/feature-gate-pin_ergonomics.stderr
index 430b7866241..dd93a7be1ad 100644
--- a/tests/ui/feature-gates/feature-gate-pin_ergonomics.stderr
+++ b/tests/ui/feature-gates/feature-gate-pin_ergonomics.stderr
@@ -1,8 +1,38 @@
+error[E0658]: pinned reference syntax is experimental
+  --> $DIR/feature-gate-pin_ergonomics.rs:13:14
+   |
+LL |     let _y: &pin mut Foo = x;
+   |              ^^^
+   |
+   = note: see issue #130494 <https://github.com/rust-lang/rust/issues/130494> for more information
+   = help: add `#![feature(pin_ergonomics)]` 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]: pinned reference syntax is experimental
+  --> $DIR/feature-gate-pin_ergonomics.rs:16:18
+   |
+LL | fn foo_sugar(_: &pin mut Foo) {}
+   |                  ^^^
+   |
+   = note: see issue #130494 <https://github.com/rust-lang/rust/issues/130494> for more information
+   = help: add `#![feature(pin_ergonomics)]` 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]: pinned reference syntax is experimental
+  --> $DIR/feature-gate-pin_ergonomics.rs:28:18
+   |
+LL | fn baz_sugar(_: &pin const Foo) {}
+   |                  ^^^
+   |
+   = note: see issue #130494 <https://github.com/rust-lang/rust/issues/130494> for more information
+   = help: add `#![feature(pin_ergonomics)]` 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[E0382]: use of moved value: `x`
-  --> $DIR/feature-gate-pin_ergonomics.rs:17:9
+  --> $DIR/feature-gate-pin_ergonomics.rs:20:9
    |
-LL | fn bar(mut x: Pin<&mut Foo>) {
-   |        ----- move occurs because `x` has type `Pin<&mut Foo>`, which does not implement the `Copy` trait
+LL | fn bar(x: Pin<&mut Foo>) {
+   |        - move occurs because `x` has type `Pin<&mut Foo>`, which does not implement the `Copy` trait
 LL |     foo(x);
    |         - value moved here
 LL |     foo(x);
@@ -11,13 +41,13 @@ LL |     foo(x);
 note: consider changing this parameter type in function `foo` to borrow instead if owning the value isn't necessary
   --> $DIR/feature-gate-pin_ergonomics.rs:12:11
    |
-LL | fn foo(_: Pin<&mut Foo>) {
+LL | fn foo(x: Pin<&mut Foo>) {
    |    ---    ^^^^^^^^^^^^^ this parameter takes ownership of the value
    |    |
    |    in this function
 
 error[E0382]: use of moved value: `x`
-  --> $DIR/feature-gate-pin_ergonomics.rs:22:5
+  --> $DIR/feature-gate-pin_ergonomics.rs:25:5
    |
 LL | fn baz(mut x: Pin<&mut Foo>) {
    |        ----- move occurs because `x` has type `Pin<&mut Foo>`, which does not implement the `Copy` trait
@@ -36,6 +66,7 @@ help: consider reborrowing the `Pin` instead of moving it
 LL |     x.as_mut().foo();
    |      +++++++++
 
-error: aborting due to 2 previous errors
+error: aborting due to 5 previous errors
 
-For more information about this error, try `rustc --explain E0382`.
+Some errors have detailed explanations: E0382, E0658.
+For more information about an error, try `rustc --explain E0382`.
diff --git a/tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.rs b/tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.rs
new file mode 100644
index 00000000000..308b41dfc68
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.rs
@@ -0,0 +1,6 @@
+trait Foo {
+    fn test() -> impl Sized + use<Self>;
+    //~^ ERROR `use<...>` precise capturing syntax is currently not allowed in return-position
+}
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.stderr b/tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.stderr
new file mode 100644
index 00000000000..b2c6bf61124
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.stderr
@@ -0,0 +1,13 @@
+error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
+  --> $DIR/feature-gate-precise_capturing_in_traits.rs:2:31
+   |
+LL |     fn test() -> impl Sized + use<Self>;
+   |                               ^^^^^^^^^
+   |
+   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
+   = note: see issue #130044 <https://github.com/rust-lang/rust/issues/130044> for more information
+   = help: add `#![feature(precise_capturing_in_traits)]` 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
+
diff --git a/tests/ui/feature-gates/feature-gate-unnamed_fields.rs b/tests/ui/feature-gates/feature-gate-unnamed_fields.rs
deleted file mode 100644
index 302a9bbeb45..00000000000
--- a/tests/ui/feature-gates/feature-gate-unnamed_fields.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-#[repr(C)]
-struct Foo {
-    foo: u8,
-    _: union { //~ ERROR unnamed fields are not yet fully implemented [E0658]
-    //~^ ERROR unnamed fields are not yet fully implemented [E0658]
-        bar: u8,
-        baz: u16
-    }
-}
-
-#[repr(C)]
-union Bar {
-    foobar: u8,
-    _: struct { //~ ERROR unnamed fields are not yet fully implemented [E0658]
-    //~^ ERROR unnamed fields are not yet fully implemented [E0658]
-        foobaz: u8,
-        barbaz: u16
-    }
-}
-
-#[repr(C)]
-struct S;
-
-#[repr(C)]
-struct Baz {
-    _: S //~ ERROR unnamed fields are not yet fully implemented [E0658]
-}
-
-fn main(){}
diff --git a/tests/ui/feature-gates/feature-gate-unnamed_fields.stderr b/tests/ui/feature-gates/feature-gate-unnamed_fields.stderr
deleted file mode 100644
index bc9e95bab98..00000000000
--- a/tests/ui/feature-gates/feature-gate-unnamed_fields.stderr
+++ /dev/null
@@ -1,63 +0,0 @@
-error[E0658]: unnamed fields are not yet fully implemented
-  --> $DIR/feature-gate-unnamed_fields.rs:4:5
-   |
-LL |     _: union {
-   |     ^
-   |
-   = note: see issue #49804 <https://github.com/rust-lang/rust/issues/49804> for more information
-   = help: add `#![feature(unnamed_fields)]` 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]: unnamed fields are not yet fully implemented
-  --> $DIR/feature-gate-unnamed_fields.rs:4:8
-   |
-LL |       _: union {
-   |  ________^
-LL | |
-LL | |         bar: u8,
-LL | |         baz: u16
-LL | |     }
-   | |_____^
-   |
-   = note: see issue #49804 <https://github.com/rust-lang/rust/issues/49804> for more information
-   = help: add `#![feature(unnamed_fields)]` 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]: unnamed fields are not yet fully implemented
-  --> $DIR/feature-gate-unnamed_fields.rs:14:5
-   |
-LL |     _: struct {
-   |     ^
-   |
-   = note: see issue #49804 <https://github.com/rust-lang/rust/issues/49804> for more information
-   = help: add `#![feature(unnamed_fields)]` 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]: unnamed fields are not yet fully implemented
-  --> $DIR/feature-gate-unnamed_fields.rs:14:8
-   |
-LL |       _: struct {
-   |  ________^
-LL | |
-LL | |         foobaz: u8,
-LL | |         barbaz: u16
-LL | |     }
-   | |_____^
-   |
-   = note: see issue #49804 <https://github.com/rust-lang/rust/issues/49804> for more information
-   = help: add `#![feature(unnamed_fields)]` 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]: unnamed fields are not yet fully implemented
-  --> $DIR/feature-gate-unnamed_fields.rs:26:5
-   |
-LL |     _: S
-   |     ^
-   |
-   = note: see issue #49804 <https://github.com/rust-lang/rust/issues/49804> for more information
-   = help: add `#![feature(unnamed_fields)]` 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 5 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-with_negative_coherence.stderr b/tests/ui/feature-gates/feature-gate-with_negative_coherence.stderr
index ba076568088..b32f54aaecf 100644
--- a/tests/ui/feature-gates/feature-gate-with_negative_coherence.stderr
+++ b/tests/ui/feature-gates/feature-gate-with_negative_coherence.stderr
@@ -6,6 +6,8 @@ LL | impl<T: std::ops::DerefMut> Foo for T { }
 LL |
 LL | impl<T> Foo for &T { }
    | ^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
+   |
+   = note: downstream crates may implement trait `std::ops::DerefMut` for type `&_`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/feature-gates/unstable-attribute-rejects-already-stable-features.rs b/tests/ui/feature-gates/unstable-attribute-rejects-already-stable-features.rs
new file mode 100644
index 00000000000..9e697aaa0dc
--- /dev/null
+++ b/tests/ui/feature-gates/unstable-attribute-rejects-already-stable-features.rs
@@ -0,0 +1,10 @@
+//! Ensure #[unstable] doesn't accept already stable features
+
+#![feature(staged_api)]
+#![stable(feature = "rust_test", since = "1.0.0")]
+
+#[unstable(feature = "arbitrary_enum_discriminant", issue = "42")] //~ ERROR can't mark as unstable using an already stable feature
+#[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")] //~ ERROR can't mark as unstable using an already stable feature
+const fn my_fun() {}
+
+fn main() {}
diff --git a/tests/ui/feature-gates/unstable-attribute-rejects-already-stable-features.stderr b/tests/ui/feature-gates/unstable-attribute-rejects-already-stable-features.stderr
new file mode 100644
index 00000000000..319056a9c88
--- /dev/null
+++ b/tests/ui/feature-gates/unstable-attribute-rejects-already-stable-features.stderr
@@ -0,0 +1,31 @@
+error: can't mark as unstable using an already stable feature
+  --> $DIR/unstable-attribute-rejects-already-stable-features.rs:6:1
+   |
+LL | #[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this feature is already stable
+LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
+LL | const fn my_fun() {}
+   | -------------------- the stability attribute annotates this item
+   |
+help: consider removing the attribute
+  --> $DIR/unstable-attribute-rejects-already-stable-features.rs:6:1
+   |
+LL | #[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: can't mark as unstable using an already stable feature
+  --> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
+   |
+LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this feature is already stable
+LL | const fn my_fun() {}
+   | -------------------- the stability attribute annotates this item
+   |
+help: consider removing the attribute
+  --> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
+   |
+LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/fmt/closing-brace-as-fill.rs b/tests/ui/fmt/closing-brace-as-fill.rs
index 6ad257f943e..5865ee31c43 100644
--- a/tests/ui/fmt/closing-brace-as-fill.rs
+++ b/tests/ui/fmt/closing-brace-as-fill.rs
@@ -4,5 +4,5 @@
 
 fn main() {
     println!("Hello, world! {0:}<3", 2);
-    //~^ ERROR invalid format string: expected `'}'` but string was terminated
+    //~^ ERROR invalid format string: expected `}` but string was terminated
 }
diff --git a/tests/ui/fmt/closing-brace-as-fill.stderr b/tests/ui/fmt/closing-brace-as-fill.stderr
index 70068fa3aad..aa22beddf45 100644
--- a/tests/ui/fmt/closing-brace-as-fill.stderr
+++ b/tests/ui/fmt/closing-brace-as-fill.stderr
@@ -1,12 +1,12 @@
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/closing-brace-as-fill.rs:6:35
    |
 LL |     println!("Hello, world! {0:}<3", 2);
-   |                                -  ^ expected `'}'` in format string
+   |                                -  ^ expected `}` in format string
    |                                |
    |                                this is not interpreted as a formatting closing brace
    |
-   = note: the character `'}'` is interpreted as a fill character because of the `:` that precedes it
+   = note: the character `}` is interpreted as a fill character because of the `:` that precedes it
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/fmt/format-string-error-2.rs b/tests/ui/fmt/format-string-error-2.rs
index 1f7f0d8f6be..357dd7b10a3 100644
--- a/tests/ui/fmt/format-string-error-2.rs
+++ b/tests/ui/fmt/format-string-error-2.rs
@@ -72,7 +72,7 @@ raw  { \n
 
     // note: `\x7B` is `{`
     println!("\x7B}\u{8} {", 1);
-    //~^ ERROR invalid format string: expected `'}'` but string was terminated
+    //~^ ERROR invalid format string: expected `}` but string was terminated
 
     println!("\x7B}\u8 {", 1);
     //~^ ERROR incorrect unicode escape sequence
diff --git a/tests/ui/fmt/format-string-error-2.stderr b/tests/ui/fmt/format-string-error-2.stderr
index d5fe4081ac8..a2d142e0bab 100644
--- a/tests/ui/fmt/format-string-error-2.stderr
+++ b/tests/ui/fmt/format-string-error-2.stderr
@@ -9,138 +9,138 @@ help: format of unicode escape sequences uses braces
 LL |     println!("\x7B}\u{8} {", 1);
    |                    ~~~~~
 
-error: invalid format string: expected `'}'`, found `'a'`
+error: invalid format string: expected `}`, found `a`
   --> $DIR/format-string-error-2.rs:5:5
    |
 LL |     format!("{
    |              - because of this opening brace
 LL |     a");
-   |     ^ expected `'}'` in format string
+   |     ^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'b'`
+error: invalid format string: expected `}`, found `b`
   --> $DIR/format-string-error-2.rs:9:5
    |
 LL |     format!("{ \
    |              - because of this opening brace
 LL |                \
 LL |     b");
-   |     ^ expected `'}'` in format string
+   |     ^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'\'`
+error: invalid format string: expected `}`, found `\`
   --> $DIR/format-string-error-2.rs:11:18
    |
 LL |     format!(r#"{ \
-   |                - ^ expected `'}'` in format string
+   |                - ^ expected `}` in format string
    |                |
    |                because of this opening brace
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'\'`
+error: invalid format string: expected `}`, found `\`
   --> $DIR/format-string-error-2.rs:15:18
    |
 LL |     format!(r#"{ \n
-   |                - ^ expected `'}'` in format string
+   |                - ^ expected `}` in format string
    |                |
    |                because of this opening brace
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'e'`
+error: invalid format string: expected `}`, found `e`
   --> $DIR/format-string-error-2.rs:21:5
    |
 LL |     format!("{ \n
    |              - because of this opening brace
 LL | \n
 LL |     e");
-   |     ^ expected `'}'` in format string
+   |     ^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'a'`
+error: invalid format string: expected `}`, found `a`
   --> $DIR/format-string-error-2.rs:25:5
    |
 LL |     {
    |     - because of this opening brace
 LL |     a");
-   |     ^ expected `'}'` in format string
+   |     ^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'a'`
+error: invalid format string: expected `}`, found `a`
   --> $DIR/format-string-error-2.rs:29:5
    |
 LL |     {
    |     - because of this opening brace
 LL |     a
-   |     ^ expected `'}'` in format string
+   |     ^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'b'`
+error: invalid format string: expected `}`, found `b`
   --> $DIR/format-string-error-2.rs:35:5
    |
 LL |     { \
    |     - because of this opening brace
 LL |         \
 LL |     b");
-   |     ^ expected `'}'` in format string
+   |     ^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'b'`
+error: invalid format string: expected `}`, found `b`
   --> $DIR/format-string-error-2.rs:40:5
    |
 LL |     { \
    |     - because of this opening brace
 LL |         \
 LL |     b \
-   |     ^ expected `'}'` in format string
+   |     ^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'\'`
+error: invalid format string: expected `}`, found `\`
   --> $DIR/format-string-error-2.rs:45:8
    |
 LL | raw  { \
-   |      - ^ expected `'}'` in format string
+   |      - ^ expected `}` in format string
    |      |
    |      because of this opening brace
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'\'`
+error: invalid format string: expected `}`, found `\`
   --> $DIR/format-string-error-2.rs:50:8
    |
 LL | raw  { \n
-   |      - ^ expected `'}'` in format string
+   |      - ^ expected `}` in format string
    |      |
    |      because of this opening brace
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'e'`
+error: invalid format string: expected `}`, found `e`
   --> $DIR/format-string-error-2.rs:57:5
    |
 LL |   { \n
    |   - because of this opening brace
 LL | \n
 LL |     e");
-   |     ^ expected `'}'` in format string
+   |     ^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'a'`
+error: invalid format string: expected `}`, found `a`
   --> $DIR/format-string-error-2.rs:67:5
    |
 LL |     {
    |     - because of this opening brace
 LL |     asdf}
-   |     ^ expected `'}'` in format string
+   |     ^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
@@ -150,11 +150,11 @@ error: 1 positional argument in format string, but no arguments were given
 LL |     println!("\t{}");
    |                 ^^
 
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/format-string-error-2.rs:74:27
    |
 LL |     println!("\x7B}\u{8} {", 1);
-   |                          -^ expected `'}'` in format string
+   |                          -^ expected `}` in format string
    |                          |
    |                          because of this opening brace
    |
diff --git a/tests/ui/fmt/format-string-error.rs b/tests/ui/fmt/format-string-error.rs
index 9b436e2c479..cb9449be532 100644
--- a/tests/ui/fmt/format-string-error.rs
+++ b/tests/ui/fmt/format-string-error.rs
@@ -2,7 +2,7 @@
 
 fn main() {
     println!("{");
-    //~^ ERROR invalid format string: expected `'}'` but string was terminated
+    //~^ ERROR invalid format string: expected `}` but string was terminated
     println!("{{}}");
     println!("}");
     //~^ ERROR invalid format string: unmatched `}` found
@@ -13,11 +13,11 @@ fn main() {
     let _ = format!("{a:._$}", a = "", _ = 0);
     //~^ ERROR invalid format string: invalid argument name `_`
     let _ = format!("{");
-    //~^ ERROR invalid format string: expected `'}'` but string was terminated
+    //~^ ERROR invalid format string: expected `}` but string was terminated
     let _ = format!("}");
     //~^ ERROR invalid format string: unmatched `}` found
     let _ = format!("{\\}");
-    //~^ ERROR invalid format string: expected `'}'`, found `'\'`
+    //~^ ERROR invalid format string: expected `}`, found `\`
     let _ = format!("\n\n\n{\n\n\n");
     //~^ ERROR invalid format string
     let _ = format!(r###"
diff --git a/tests/ui/fmt/format-string-error.stderr b/tests/ui/fmt/format-string-error.stderr
index 37a181e6fcb..9d6a91413d0 100644
--- a/tests/ui/fmt/format-string-error.stderr
+++ b/tests/ui/fmt/format-string-error.stderr
@@ -1,8 +1,8 @@
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/format-string-error.rs:4:16
    |
 LL |     println!("{");
-   |               -^ expected `'}'` in format string
+   |               -^ expected `}` in format string
    |               |
    |               because of this opening brace
    |
@@ -40,11 +40,11 @@ LL |     let _ = format!("{a:._$}", a = "", _ = 0);
    |
    = note: argument name cannot be a single underscore
 
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/format-string-error.rs:15:23
    |
 LL |     let _ = format!("{");
-   |                      -^ expected `'}'` in format string
+   |                      -^ expected `}` in format string
    |                      |
    |                      because of this opening brace
    |
@@ -58,44 +58,44 @@ LL |     let _ = format!("}");
    |
    = note: if you intended to print `}`, you can escape it using `}}`
 
-error: invalid format string: expected `'}'`, found `'\'`
+error: invalid format string: expected `}`, found `\`
   --> $DIR/format-string-error.rs:19:23
    |
 LL |     let _ = format!("{\}");
-   |                      -^ expected `'}'` in format string
+   |                      -^ expected `}` in format string
    |                      |
    |                      because of this opening brace
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/format-string-error.rs:21:35
    |
 LL |     let _ = format!("\n\n\n{\n\n\n");
-   |                            -      ^ expected `'}'` in format string
+   |                            -      ^ expected `}` in format string
    |                            |
    |                            because of this opening brace
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/format-string-error.rs:27:3
    |
 LL |     {"###);
-   |     -^ expected `'}'` in format string
+   |     -^ expected `}` in format string
    |     |
    |     because of this opening brace
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/format-string-error.rs:35:1
    |
 LL |     {
    |     - because of this opening brace
 LL |
 LL | "###);
-   | ^ expected `'}'` in format string
+   | ^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
diff --git a/tests/ui/fmt/format-string-wrong-order.rs b/tests/ui/fmt/format-string-wrong-order.rs
index da775be3ffd..891279b97e4 100644
--- a/tests/ui/fmt/format-string-wrong-order.rs
+++ b/tests/ui/fmt/format-string-wrong-order.rs
@@ -7,9 +7,9 @@ fn main() {
     format!("{?:?}", bar);
     //~^ ERROR invalid format string: expected format parameter to occur after `:`
     format!("{??}", bar);
-    //~^ ERROR invalid format string: expected `'}'`, found `'?'`
+    //~^ ERROR invalid format string: expected `}`, found `?`
     format!("{?;bar}");
-    //~^ ERROR invalid format string: expected `'}'`, found `'?'`
+    //~^ ERROR invalid format string: expected `}`, found `?`
     format!("{?:#?}", bar);
     //~^ ERROR invalid format string: expected format parameter to occur after `:`
     format!("Hello {<5:}!", "x");
diff --git a/tests/ui/fmt/format-string-wrong-order.stderr b/tests/ui/fmt/format-string-wrong-order.stderr
index 3ef07720c15..7f017511761 100644
--- a/tests/ui/fmt/format-string-wrong-order.stderr
+++ b/tests/ui/fmt/format-string-wrong-order.stderr
@@ -22,21 +22,21 @@ LL |     format!("{?:?}", bar);
    |
    = note: `?` comes after `:`, try `:?` instead
 
-error: invalid format string: expected `'}'`, found `'?'`
+error: invalid format string: expected `}`, found `?`
   --> $DIR/format-string-wrong-order.rs:9:15
    |
 LL |     format!("{??}", bar);
-   |              -^ expected `'}'` in format string
+   |              -^ expected `}` in format string
    |              |
    |              because of this opening brace
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'`, found `'?'`
+error: invalid format string: expected `}`, found `?`
   --> $DIR/format-string-wrong-order.rs:11:15
    |
 LL |     format!("{?;bar}");
-   |              -^ expected `'}'` in format string
+   |              -^ expected `}` in format string
    |              |
    |              because of this opening brace
    |
diff --git a/tests/ui/fmt/ifmt-bad-arg.rs b/tests/ui/fmt/ifmt-bad-arg.rs
index 68861d7bf3f..e39ffb8fe1b 100644
--- a/tests/ui/fmt/ifmt-bad-arg.rs
+++ b/tests/ui/fmt/ifmt-bad-arg.rs
@@ -48,7 +48,7 @@ fn main() {
 
     // bad syntax of the format string
 
-    format!("{"); //~ ERROR: expected `'}'` but string was terminated
+    format!("{"); //~ ERROR: expected `}` but string was terminated
 
     format!("foo } bar"); //~ ERROR: unmatched `}` found
     format!("foo }"); //~ ERROR: unmatched `}` found
diff --git a/tests/ui/fmt/ifmt-bad-arg.stderr b/tests/ui/fmt/ifmt-bad-arg.stderr
index 09ce3dca411..4344aee83c2 100644
--- a/tests/ui/fmt/ifmt-bad-arg.stderr
+++ b/tests/ui/fmt/ifmt-bad-arg.stderr
@@ -136,11 +136,11 @@ LL |     format!("{valuea} {valueb}", valuea=5, valuec=7);
    |             |
    |             formatting specifier missing
 
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/ifmt-bad-arg.rs:51:15
    |
 LL |     format!("{");
-   |              -^ expected `'}'` in format string
+   |              -^ expected `}` in format string
    |              |
    |              because of this opening brace
    |
@@ -172,13 +172,13 @@ LL |     format!("foo %s baz", "bar");
    |
    = note: printf formatting is not supported; see the documentation for `std::fmt`
 
-error: invalid format string: expected `'}'`, found `'t'`
+error: invalid format string: expected `}`, found `t`
   --> $DIR/ifmt-bad-arg.rs:75:1
    |
 LL | ninth number: {
    |               - because of this opening brace
 LL | tenth number: {}",
-   | ^ expected `'}'` in format string
+   | ^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
diff --git a/tests/ui/fmt/issue-91556.rs b/tests/ui/fmt/issue-91556.rs
index e782e6f9076..fcf8909859c 100644
--- a/tests/ui/fmt/issue-91556.rs
+++ b/tests/ui/fmt/issue-91556.rs
@@ -1,8 +1,8 @@
 fn main() {
   let _ = format!(concat!("{0}𝖳𝖾𝗌𝗍{"), i);
-  //~^ ERROR: invalid format string: expected `'}'` but string was terminated
+  //~^ ERROR: invalid format string: expected `}` but string was terminated
   //~| NOTE: if you intended to print `{`, you can escape it using `{{`
   //~| NOTE: in this expansion of concat!
   //~| NOTE: in this expansion of concat!
-  //~| NOTE: expected `'}'` in format string
+  //~| NOTE: expected `}` in format string
 }
diff --git a/tests/ui/fmt/issue-91556.stderr b/tests/ui/fmt/issue-91556.stderr
index beab3db0d94..52917fb8c42 100644
--- a/tests/ui/fmt/issue-91556.stderr
+++ b/tests/ui/fmt/issue-91556.stderr
@@ -1,8 +1,8 @@
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/issue-91556.rs:2:19
    |
 LL |   let _ = format!(concat!("{0}𝖳𝖾𝗌𝗍{"), i);
-   |                   ^^^^^^^^^^^^^^^^^^^ expected `'}'` in format string
+   |                   ^^^^^^^^^^^^^^^^^^^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
    = note: this error originates in the macro `concat` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/fmt/respanned-literal-issue-106191.rs b/tests/ui/fmt/respanned-literal-issue-106191.rs
index b0c0855a870..0a127b1a0ca 100644
--- a/tests/ui/fmt/respanned-literal-issue-106191.rs
+++ b/tests/ui/fmt/respanned-literal-issue-106191.rs
@@ -4,7 +4,7 @@ extern crate format_string_proc_macro;
 
 fn main() {
     format_string_proc_macro::respan_to_invalid_format_literal!("¡");
-    //~^ ERROR invalid format string: expected `'}'` but string was terminated
+    //~^ ERROR invalid format string: expected `}` but string was terminated
     format_args!(r#concat!("¡        {"));
-    //~^ ERROR invalid format string: expected `'}'` but string was terminated
+    //~^ ERROR invalid format string: expected `}` but string was terminated
 }
diff --git a/tests/ui/fmt/respanned-literal-issue-106191.stderr b/tests/ui/fmt/respanned-literal-issue-106191.stderr
index 73a3af65a38..17ab29e799b 100644
--- a/tests/ui/fmt/respanned-literal-issue-106191.stderr
+++ b/tests/ui/fmt/respanned-literal-issue-106191.stderr
@@ -1,16 +1,16 @@
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/respanned-literal-issue-106191.rs:6:65
    |
 LL |     format_string_proc_macro::respan_to_invalid_format_literal!("¡");
-   |                                                                 ^^^ expected `'}'` in format string
+   |                                                                 ^^^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
 
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/respanned-literal-issue-106191.rs:8:18
    |
 LL |     format_args!(r#concat!("¡        {"));
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^ expected `'}'` in format string
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^ expected `}` in format string
    |
    = note: if you intended to print `{`, you can escape it using `{{`
    = note: this error originates in the macro `concat` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/for/issue-20605.next.stderr b/tests/ui/for/issue-20605.next.stderr
index 98609211865..1a66cb41464 100644
--- a/tests/ui/for/issue-20605.next.stderr
+++ b/tests/ui/for/issue-20605.next.stderr
@@ -11,13 +11,6 @@ help: consider mutably borrowing here
 LL |     for item in &mut *things { *item = 0 }
    |                 ++++
 
-error[E0614]: type `<dyn Iterator<Item = &'a mut u8> as IntoIterator>::Item` cannot be dereferenced
-  --> $DIR/issue-20605.rs:6:27
-   |
-LL |     for item in *things { *item = 0 }
-   |                           ^^^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0277, E0614.
-For more information about an error, try `rustc --explain E0277`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/for/issue-20605.rs b/tests/ui/for/issue-20605.rs
index 647dc84028c..5c56e64a017 100644
--- a/tests/ui/for/issue-20605.rs
+++ b/tests/ui/for/issue-20605.rs
@@ -4,12 +4,7 @@
 
 fn changer<'a>(mut things: Box<dyn Iterator<Item=&'a mut u8>>) {
     for item in *things { *item = 0 }
-    //[current]~^ ERROR `dyn Iterator<Item = &'a mut u8>` is not an iterator
-    //[next]~^^ ERROR `dyn Iterator<Item = &'a mut u8>` is not an iterator
-    //[next]~| ERROR type `<dyn Iterator<Item = &'a mut u8> as IntoIterator>::Item` cannot be dereferenced
-
-    // FIXME(-Znext-solver): these error messages are horrible and have to be
-    // improved before we stabilize the new solver.
+    //~^ ERROR `dyn Iterator<Item = &'a mut u8>` is not an iterator
 }
 
 fn main() {}
diff --git a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.next.stderr b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.next.stderr
index d913b2e91ca..d624fb1e42b 100644
--- a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.next.stderr
+++ b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.next.stderr
@@ -1,5 +1,5 @@
 error[E0283]: type annotations needed
-  --> $DIR/ambig-hr-projection-issue-93340.rs:16:5
+  --> $DIR/ambig-hr-projection-issue-93340.rs:17:5
    |
 LL |     cmp_eq
    |     ^^^^^^ cannot infer type of the type parameter `A` declared on the function `cmp_eq`
@@ -15,6 +15,16 @@ help: consider specifying the generic arguments
 LL |     cmp_eq::<A, B, O>
    |           +++++++++++
 
-error: aborting due to 1 previous error
+error[E0277]: expected a `Fn(<A as Scalar>::RefType<'_>, <B as Scalar>::RefType<'_>)` closure, found `for<'a, 'b> fn(<O as Scalar>::RefType<'a>, <_ as Scalar>::RefType<'b>) -> O {cmp_eq::<O, _, O>}`
+  --> $DIR/ambig-hr-projection-issue-93340.rs:14:1
+   |
+LL | / fn build_expression<A: Scalar, B: Scalar, O: Scalar>(
+LL | | ) -> impl Fn(A::RefType<'_>, B::RefType<'_>) -> O {
+   | |_________________________________________________^ expected an `Fn(<A as Scalar>::RefType<'_>, <B as Scalar>::RefType<'_>)` closure, found `for<'a, 'b> fn(<O as Scalar>::RefType<'a>, <_ as Scalar>::RefType<'b>) -> O {cmp_eq::<O, _, O>}`
+   |
+   = help: the trait `for<'a, 'b> Fn(<A as Scalar>::RefType<'a>, <B as Scalar>::RefType<'b>)` is not implemented for fn item `for<'a, 'b> fn(<O as Scalar>::RefType<'a>, <_ as Scalar>::RefType<'b>) -> O {cmp_eq::<O, _, O>}`
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0283`.
+Some errors have detailed explanations: E0277, E0283.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr
index d913b2e91ca..4a293d44e0e 100644
--- a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr
+++ b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr
@@ -1,5 +1,5 @@
 error[E0283]: type annotations needed
-  --> $DIR/ambig-hr-projection-issue-93340.rs:16:5
+  --> $DIR/ambig-hr-projection-issue-93340.rs:17:5
    |
 LL |     cmp_eq
    |     ^^^^^^ cannot infer type of the type parameter `A` declared on the function `cmp_eq`
diff --git a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.rs b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.rs
index acfebad38db..5f2e134109e 100644
--- a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.rs
+++ b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.rs
@@ -13,6 +13,7 @@ fn cmp_eq<'a, 'b, A: Scalar, B: Scalar, O: Scalar>(a: A::RefType<'a>, b: B::RefT
 
 fn build_expression<A: Scalar, B: Scalar, O: Scalar>(
 ) -> impl Fn(A::RefType<'_>, B::RefType<'_>) -> O {
+    //[next]~^^ expected a `Fn(<A as Scalar>::RefType<'_>, <B as Scalar>::RefType<'_>)` closure
     cmp_eq
     //~^ ERROR type annotations needed
 }
diff --git a/tests/ui/generic-associated-types/trait-objects.rs b/tests/ui/generic-associated-types/trait-objects.rs
index 277ffcc1f0d..743a3df0acc 100644
--- a/tests/ui/generic-associated-types/trait-objects.rs
+++ b/tests/ui/generic-associated-types/trait-objects.rs
@@ -6,7 +6,7 @@
 trait StreamingIterator {
     type Item<'a> where Self: 'a;
     fn size_hint(&self) -> (usize, Option<usize>);
-    // Uncommenting makes `StreamingIterator` not object safe
+    // Uncommenting makes `StreamingIterator` dyn-incompatible.
 //    fn next(&mut self) -> Self::Item<'_>;
 }
 
diff --git a/tests/ui/higher-ranked/leak-check/leak-check-in-selection-5-ambig.rs b/tests/ui/higher-ranked/leak-check/leak-check-in-selection-5-ambig.rs
index beda719ac20..9a44fd2e64a 100644
--- a/tests/ui/higher-ranked/leak-check/leak-check-in-selection-5-ambig.rs
+++ b/tests/ui/higher-ranked/leak-check/leak-check-in-selection-5-ambig.rs
@@ -3,9 +3,9 @@
 //@ check-pass
 
 // The new trait solver does not return region constraints if the goal
-// is still ambiguous. This causes the following test to fail with ambiguity,
-// even though `(): LeakCheckFailure<'!a, V>` would return `'!a: 'static`
-// which would have caused a leak check failure.
+// is still ambiguous. However, the `'!a = 'static` constraint from
+// `(): LeakCheckFailure<'!a, V>`  is also returned via the canonical
+// var values, causing this test to compile.
 
 trait Ambig {}
 impl Ambig for u32 {}
diff --git a/tests/ui/higher-ranked/structually-relate-aliases.rs b/tests/ui/higher-ranked/structually-relate-aliases.rs
index 8df24702811..73c2cd23d86 100644
--- a/tests/ui/higher-ranked/structually-relate-aliases.rs
+++ b/tests/ui/higher-ranked/structually-relate-aliases.rs
@@ -11,7 +11,7 @@ type Assoc<'a, T> = <T as ToUnit<'a>>::Unit;
 impl<T> Overlap<T> for T {}
 
 impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
-//~^ ERROR 13:17: 13:49: the trait bound `for<'a> T: ToUnit<'a>` is not satisfied [E0277]
-//~| ERROR 13:36: 13:48: the trait bound `for<'a> T: ToUnit<'a>` is not satisfied [E0277]
+//~^ ERROR the trait bound `for<'a> T: ToUnit<'a>` is not satisfied
+//~| ERROR the trait bound `for<'a> T: ToUnit<'a>` is not satisfied
 
 fn main() {}
diff --git a/tests/ui/higher-ranked/structually-relate-aliases.stderr b/tests/ui/higher-ranked/structually-relate-aliases.stderr
index 7de30efae1c..e9d91e45e21 100644
--- a/tests/ui/higher-ranked/structually-relate-aliases.stderr
+++ b/tests/ui/higher-ranked/structually-relate-aliases.stderr
@@ -1,5 +1,4 @@
  WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [?1t, '^0.Named(DefId(0:15 ~ structually_relate_aliases[de75]::{impl#1}::'a), "'a")], def_id: DefId(0:5 ~ structually_relate_aliases[de75]::ToUnit::Unit), .. }
- WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [?1t, !2_0.Named(DefId(0:15 ~ structually_relate_aliases[de75]::{impl#1}::'a), "'a")], def_id: DefId(0:5 ~ structually_relate_aliases[de75]::ToUnit::Unit), .. }
 error[E0277]: the trait bound `for<'a> T: ToUnit<'a>` is not satisfied
   --> $DIR/structually-relate-aliases.rs:13:36
    |
diff --git a/tests/ui/hygiene/panic-location.rs b/tests/ui/hygiene/panic-location.rs
index 7b20f1683a9..580a8bcff05 100644
--- a/tests/ui/hygiene/panic-location.rs
+++ b/tests/ui/hygiene/panic-location.rs
@@ -4,8 +4,7 @@
 //@ normalize-stderr-test: ".rs:\d+:\d+" -> ".rs:LL:CC"
 //
 // Regression test for issue #70963
-// The captured stderr from this test reports a location
-// inside `VecDeque::with_capacity`, instead of `<::core::macros::panic macros>`
+// The reported panic location should not be `<::core::macros::panic macros>`.
 fn main() {
     std::collections::VecDeque::<String>::with_capacity(!0);
 }
diff --git a/tests/ui/hygiene/panic-location.run.stderr b/tests/ui/hygiene/panic-location.run.stderr
index bfed4cd6650..b9086ecef81 100644
--- a/tests/ui/hygiene/panic-location.run.stderr
+++ b/tests/ui/hygiene/panic-location.run.stderr
@@ -1,3 +1,3 @@
-thread 'main' panicked at alloc/src/raw_vec.rs:LL:CC:
+thread 'main' panicked at $DIR/panic-location.rs:LL:CC:
 capacity overflow
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/impl-trait/auto-trait-coherence.old.stderr b/tests/ui/impl-trait/auto-trait-coherence.old.stderr
index 3f979d1a50b..cd91bfcb48d 100644
--- a/tests/ui/impl-trait/auto-trait-coherence.old.stderr
+++ b/tests/ui/impl-trait/auto-trait-coherence.old.stderr
@@ -1,11 +1,11 @@
-error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<OpaqueType>`
+error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<_>`
   --> $DIR/auto-trait-coherence.rs:24:1
    |
 LL | impl<T: Send> AnotherTrait for T {}
    | -------------------------------- first implementation here
 ...
 LL | impl AnotherTrait for D<OpaqueType> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<OpaqueType>`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<_>`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/auto-trait-coherence.rs b/tests/ui/impl-trait/auto-trait-coherence.rs
index e3036fd0fe2..0d7fef21cc9 100644
--- a/tests/ui/impl-trait/auto-trait-coherence.rs
+++ b/tests/ui/impl-trait/auto-trait-coherence.rs
@@ -1,6 +1,3 @@
-//@ revisions: old next
-//@[next] compile-flags: -Znext-solver
-
 // Tests that type alias impls traits do not leak auto-traits for
 // the purposes of coherence checking
 #![feature(type_alias_impl_trait)]
@@ -22,8 +19,7 @@ impl<T: Send> AnotherTrait for T {}
 // (We treat opaque types as "foreign types" that could grow more impls
 // in the future.)
 impl AnotherTrait for D<OpaqueType> {
-    //[old]~^ ERROR conflicting implementations of trait `AnotherTrait` for type `D<OpaqueType>`
-    //[next]~^^ ERROR conflicting implementations of trait `AnotherTrait` for type `D<_>`
+    //~^ ERROR conflicting implementations of trait `AnotherTrait` for type `D<_>`
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/auto-trait-coherence.stderr b/tests/ui/impl-trait/auto-trait-coherence.stderr
new file mode 100644
index 00000000000..e0f4c857717
--- /dev/null
+++ b/tests/ui/impl-trait/auto-trait-coherence.stderr
@@ -0,0 +1,12 @@
+error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<_>`
+  --> $DIR/auto-trait-coherence.rs:21:1
+   |
+LL | impl<T: Send> AnotherTrait for T {}
+   | -------------------------------- first implementation here
+...
+LL | impl AnotherTrait for D<OpaqueType> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<_>`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/impl-trait/coherence-treats-tait-ambig.rs b/tests/ui/impl-trait/coherence-treats-tait-ambig.rs
index df47208bf36..e8c1fcdd213 100644
--- a/tests/ui/impl-trait/coherence-treats-tait-ambig.rs
+++ b/tests/ui/impl-trait/coherence-treats-tait-ambig.rs
@@ -5,7 +5,7 @@ type T = impl Sized;
 struct Foo;
 
 impl Into<T> for Foo {
-//~^ ERROR conflicting implementations of trait `Into<T>` for type `Foo`
+//~^ ERROR conflicting implementations of trait `Into<_>` for type `Foo`
     fn into(self) -> T {
         Foo
     }
diff --git a/tests/ui/impl-trait/coherence-treats-tait-ambig.stderr b/tests/ui/impl-trait/coherence-treats-tait-ambig.stderr
index faaad276927..618bef1f271 100644
--- a/tests/ui/impl-trait/coherence-treats-tait-ambig.stderr
+++ b/tests/ui/impl-trait/coherence-treats-tait-ambig.stderr
@@ -1,4 +1,4 @@
-error[E0119]: conflicting implementations of trait `Into<T>` for type `Foo`
+error[E0119]: conflicting implementations of trait `Into<_>` for type `Foo`
   --> $DIR/coherence-treats-tait-ambig.rs:7:1
    |
 LL | impl Into<T> for Foo {
diff --git a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.rs b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.rs
index 068f7d3eea6..76dbb05f53d 100644
--- a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.rs
+++ b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.rs
@@ -1,24 +1,25 @@
 #![allow(bare_trait_objects)]
-trait NotObjectSafe {
+
+trait DynIncompatible {
     fn foo() -> Self;
 }
 
 struct A;
 struct B;
 
-impl NotObjectSafe for A {
+impl DynIncompatible for A {
     fn foo() -> Self {
         A
     }
 }
 
-impl NotObjectSafe for B {
+impl DynIncompatible for B {
     fn foo() -> Self {
         B
     }
 }
 
-fn car() -> dyn NotObjectSafe { //~ ERROR the trait `NotObjectSafe` cannot be made into an object
+fn car() -> dyn DynIncompatible { //~ ERROR the trait `DynIncompatible` cannot be made into an object
 //~^ ERROR return type cannot have an unboxed trait object
     if true {
         return A;
@@ -26,7 +27,7 @@ fn car() -> dyn NotObjectSafe { //~ ERROR the trait `NotObjectSafe` cannot be ma
     B
 }
 
-fn cat() -> Box<dyn NotObjectSafe> { //~ ERROR the trait `NotObjectSafe` cannot be made into an
+fn cat() -> Box<dyn DynIncompatible> { //~ ERROR the trait `DynIncompatible` cannot be made into an
     if true {
         return Box::new(A); //~ ERROR cannot be made into an object
     }
diff --git a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr
index 2a36824e292..576bd909cbc 100644
--- a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr
+++ b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr
@@ -1,17 +1,17 @@
-error[E0038]: the trait `NotObjectSafe` cannot be made into an object
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:21:13
+error[E0038]: the trait `DynIncompatible` cannot be made into an object
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:22:13
    |
-LL | fn car() -> dyn NotObjectSafe {
-   |             ^^^^^^^^^^^^^^^^^ `NotObjectSafe` cannot be made into an object
+LL | fn car() -> dyn DynIncompatible {
+   |             ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:3:8
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8
    |
-LL | trait NotObjectSafe {
-   |       ------------- this trait cannot be made into an object...
+LL | trait DynIncompatible {
+   |       --------------- this trait cannot be made into an object...
 LL |     fn foo() -> Self;
    |        ^^^ ...because associated function `foo` has no `self` parameter
-   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `NotObjectSafe` for this new enum and using it instead:
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `DynIncompatible` for this new enum and using it instead:
              A
              B
 help: consider turning `foo` into a method by giving it a `&self` argument
@@ -23,20 +23,20 @@ help: alternatively, consider constraining `foo` so it does not apply to trait o
 LL |     fn foo() -> Self where Self: Sized;
    |                      +++++++++++++++++
 
-error[E0038]: the trait `NotObjectSafe` cannot be made into an object
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:29:17
+error[E0038]: the trait `DynIncompatible` cannot be made into an object
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:30:17
    |
-LL | fn cat() -> Box<dyn NotObjectSafe> {
-   |                 ^^^^^^^^^^^^^^^^^ `NotObjectSafe` cannot be made into an object
+LL | fn cat() -> Box<dyn DynIncompatible> {
+   |                 ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:3:8
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8
    |
-LL | trait NotObjectSafe {
-   |       ------------- this trait cannot be made into an object...
+LL | trait DynIncompatible {
+   |       --------------- this trait cannot be made into an object...
 LL |     fn foo() -> Self;
    |        ^^^ ...because associated function `foo` has no `self` parameter
-   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `NotObjectSafe` for this new enum and using it instead:
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `DynIncompatible` for this new enum and using it instead:
              A
              B
 help: consider turning `foo` into a method by giving it a `&self` argument
@@ -49,15 +49,15 @@ LL |     fn foo() -> Self where Self: Sized;
    |                      +++++++++++++++++
 
 error[E0746]: return type cannot have an unboxed trait object
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:21:13
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:22:13
    |
-LL | fn car() -> dyn NotObjectSafe {
-   |             ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+LL | fn car() -> dyn DynIncompatible {
+   |             ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: if there were a single returned type, you could use `impl Trait` instead
 help: box the return type, and wrap all of the returned values in `Box::new`
    |
-LL ~ fn car() -> Box<dyn NotObjectSafe> {
+LL ~ fn car() -> Box<dyn DynIncompatible> {
 LL |
 LL |     if true {
 LL ~         return Box::new(A);
@@ -65,23 +65,23 @@ LL |     }
 LL ~     Box::new(B)
    |
 
-error[E0038]: the trait `NotObjectSafe` cannot be made into an object
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:31:16
+error[E0038]: the trait `DynIncompatible` cannot be made into an object
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:32:16
    |
 LL |         return Box::new(A);
-   |                ^^^^^^^^^^^ `NotObjectSafe` cannot be made into an object
+   |                ^^^^^^^^^^^ `DynIncompatible` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:3:8
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8
    |
-LL | trait NotObjectSafe {
-   |       ------------- this trait cannot be made into an object...
+LL | trait DynIncompatible {
+   |       --------------- this trait cannot be made into an object...
 LL |     fn foo() -> Self;
    |        ^^^ ...because associated function `foo` has no `self` parameter
-   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `NotObjectSafe` for this new enum and using it instead:
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `DynIncompatible` for this new enum and using it instead:
              A
              B
-   = note: required for the cast from `Box<A>` to `Box<(dyn NotObjectSafe + 'static)>`
+   = note: required for the cast from `Box<A>` to `Box<(dyn DynIncompatible + 'static)>`
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) -> Self;
@@ -91,23 +91,23 @@ help: alternatively, consider constraining `foo` so it does not apply to trait o
 LL |     fn foo() -> Self where Self: Sized;
    |                      +++++++++++++++++
 
-error[E0038]: the trait `NotObjectSafe` cannot be made into an object
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:33:5
+error[E0038]: the trait `DynIncompatible` cannot be made into an object
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:34:5
    |
 LL |     Box::new(B)
-   |     ^^^^^^^^^^^ `NotObjectSafe` cannot be made into an object
+   |     ^^^^^^^^^^^ `DynIncompatible` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:3:8
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8
    |
-LL | trait NotObjectSafe {
-   |       ------------- this trait cannot be made into an object...
+LL | trait DynIncompatible {
+   |       --------------- this trait cannot be made into an object...
 LL |     fn foo() -> Self;
    |        ^^^ ...because associated function `foo` has no `self` parameter
-   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `NotObjectSafe` for this new enum and using it instead:
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `DynIncompatible` for this new enum and using it instead:
              A
              B
-   = note: required for the cast from `Box<B>` to `Box<(dyn NotObjectSafe + 'static)>`
+   = note: required for the cast from `Box<B>` to `Box<(dyn DynIncompatible + 'static)>`
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) -> Self;
diff --git a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.rs b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-impl-trait.rs
index 503515013b9..25a901e4ff3 100644
--- a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.rs
+++ b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-impl-trait.rs
@@ -1,42 +1,42 @@
-trait NotObjectSafe {
+trait DynIncompatible {
     fn foo() -> Self;
 }
 
-trait ObjectSafe {
+trait DynCompatible {
     fn bar(&self);
 }
 
 struct A;
 struct B;
 
-impl NotObjectSafe for A {
+impl DynIncompatible for A {
     fn foo() -> Self {
         A
     }
 }
 
-impl NotObjectSafe for B {
+impl DynIncompatible for B {
     fn foo() -> Self {
         B
     }
 }
 
-impl ObjectSafe for A {
+impl DynCompatible for A {
     fn bar(&self) {}
 }
 
-impl ObjectSafe for B {
+impl DynCompatible for B {
     fn bar(&self) {}
 }
 
-fn can() -> impl NotObjectSafe {
+fn can() -> impl DynIncompatible {
     if true {
         return A;
     }
     B //~ ERROR mismatched types
 }
 
-fn cat() -> impl ObjectSafe {
+fn cat() -> impl DynCompatible {
     if true {
         return A;
     }
diff --git a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-impl-trait.stderr
index e5147bcea16..6a485881bfc 100644
--- a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr
+++ b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-impl-trait.stderr
@@ -1,17 +1,17 @@
 error[E0308]: mismatched types
-  --> $DIR/object-unsafe-trait-in-return-position-impl-trait.rs:36:5
+  --> $DIR/dyn-incompatible-trait-in-return-position-impl-trait.rs:36:5
    |
-LL | fn can() -> impl NotObjectSafe {
-   |             ------------------ expected `A` because of return type
+LL | fn can() -> impl DynIncompatible {
+   |             -------------------- expected `A` because of return type
 ...
 LL |     B
    |     ^ expected `A`, found `B`
 
 error[E0308]: mismatched types
-  --> $DIR/object-unsafe-trait-in-return-position-impl-trait.rs:43:5
+  --> $DIR/dyn-incompatible-trait-in-return-position-impl-trait.rs:43:5
    |
-LL | fn cat() -> impl ObjectSafe {
-   |             --------------- expected `A` because of return type
+LL | fn cat() -> impl DynCompatible {
+   |             ------------------ expected `A` because of return type
 ...
 LL |     B
    |     ^ expected `A`, found `B`
diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
index 7917fa991ee..1e268bc7f49 100644
--- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
+++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
@@ -1,21 +1,14 @@
-error[E0277]: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied
-  --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13
-   |
-LL | fn ice() -> impl AsRef<Fn(&())> {
-   |             ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()`
-
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24
    |
 LL | fn ice() -> impl AsRef<Fn(&())> {
    |                        ^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | fn ice() -> impl AsRef<dyn Fn(&())> {
    |                        +++
 
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0277, E0782.
-For more information about an error, try `rustc --explain E0277`.
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs
index 582386aa759..c71f794d5d1 100644
--- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs
+++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs
@@ -5,8 +5,7 @@
 
 fn ice() -> impl AsRef<Fn(&())> {
     //[edition2015]~^ ERROR: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied [E0277]
-    //[edition2021]~^^ ERROR: trait objects must include the `dyn` keyword [E0782]
-    //[edition2021]~| ERROR: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied [E0277]
+    //[edition2021]~^^ ERROR: expected a type, found a trait [E0782]
     todo!()
 }
 
diff --git a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs
index 5a6bf9bfaef..351cdad4ee1 100644
--- a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs
+++ b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs
@@ -14,6 +14,8 @@ struct W<T>(T);
 // `usize: Foo` doesn't hold. Therefore we ICE, because we don't expect to still
 // encounter weak types in `assemble_alias_bound_candidates_recur`.
 fn hello(_: W<A<usize>>) {}
-//~^ ERROR the size for values of type `A<usize>` cannot be known at compilation time
+//~^ ERROR the trait bound `usize: Foo` is not satisfied
+//~| ERROR the trait bound `usize: Foo` is not satisfied
+//~| ERROR the trait bound `usize: Foo` is not satisfied
 
 fn main() {}
diff --git a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.stderr b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.stderr
index 9663fab3d8c..79581066a3a 100644
--- a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.stderr
+++ b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.stderr
@@ -7,14 +7,42 @@ LL | #![feature(lazy_type_alias)]
    = note: see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
    = note: `#[warn(incomplete_features)]` on by default
 
-error[E0277]: the size for values of type `A<usize>` cannot be known at compilation time
+error[E0277]: the trait bound `usize: Foo` is not satisfied
   --> $DIR/alias-bounds-when-not-wf.rs:16:13
    |
 LL | fn hello(_: W<A<usize>>) {}
-   |             ^^^^^^^^^^^ doesn't have a size known at compile-time
+   |             ^^^^^^^^^^^ the trait `Foo` is not implemented for `usize`
    |
-   = help: the trait `Sized` is not implemented for `A<usize>`
+help: this trait has no implementations, consider adding one
+  --> $DIR/alias-bounds-when-not-wf.rs:6:1
+   |
+LL | trait Foo {}
+   | ^^^^^^^^^
+
+error[E0277]: the trait bound `usize: Foo` is not satisfied
+  --> $DIR/alias-bounds-when-not-wf.rs:16:10
+   |
+LL | fn hello(_: W<A<usize>>) {}
+   |          ^ the trait `Foo` is not implemented for `usize`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/alias-bounds-when-not-wf.rs:6:1
+   |
+LL | trait Foo {}
+   | ^^^^^^^^^
+
+error[E0277]: the trait bound `usize: Foo` is not satisfied
+  --> $DIR/alias-bounds-when-not-wf.rs:16:1
+   |
+LL | fn hello(_: W<A<usize>>) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `usize`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/alias-bounds-when-not-wf.rs:6:1
+   |
+LL | trait Foo {}
+   | ^^^^^^^^^
 
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 3 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-dyn-compatibility-check.rs
index daf29a0005d..daf29a0005d 100644
--- a/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs
+++ b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-dyn-compatibility-check.rs
diff --git a/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.stderr b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-dyn-compatibility-check.stderr
index af624e2a758..a975b6204aa 100644
--- a/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.stderr
+++ b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-dyn-compatibility-check.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
-  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:20:22
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:20:22
    |
 LL |         MyTrait::foo(&self)
    |         ------------ ^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
@@ -9,13 +9,13 @@ LL |         MyTrait::foo(&self)
    = help: the trait `MyTrait` is implemented for `Outer`
 
 error[E0038]: the trait `MyTrait` cannot be made into an object
-  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:20:9
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:20:9
    |
 LL |         MyTrait::foo(&self)
    |         ^^^^^^^^^^^^ `MyTrait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:5:22
    |
 LL | trait MyTrait {
    |       ------- this trait cannot be made into an object...
@@ -25,7 +25,7 @@ LL |     fn foo(&self) -> impl Marker;
    = help: only type `Outer` implements the trait, consider using it directly instead
 
 error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
-  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:20:9
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:20:9
    |
 LL |         MyTrait::foo(&self)
    |         ^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
@@ -33,13 +33,13 @@ LL |         MyTrait::foo(&self)
    = help: the trait `MyTrait` is implemented for `Outer`
 
 error[E0038]: the trait `MyTrait` cannot be made into an object
-  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:16:6
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:16:6
    |
 LL | impl dyn MyTrait {
    |      ^^^^^^^^^^^ `MyTrait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:5:22
    |
 LL | trait MyTrait {
    |       ------- this trait cannot be made into an object...
@@ -49,13 +49,13 @@ LL |     fn foo(&self) -> impl Marker;
    = help: only type `Outer` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `MyTrait` cannot be made into an object
-  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:18:15
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:18:15
    |
 LL |     fn other(&self) -> impl Marker {
    |               ^^^^ `MyTrait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:5:22
    |
 LL | trait MyTrait {
    |       ------- this trait cannot be made into an object...
diff --git a/tests/ui/impl-trait/in-trait/object-safety-sized.rs b/tests/ui/impl-trait/in-trait/dyn-compatibility-sized.rs
index b5b7a6ed9bf..b5b7a6ed9bf 100644
--- a/tests/ui/impl-trait/in-trait/object-safety-sized.rs
+++ b/tests/ui/impl-trait/in-trait/dyn-compatibility-sized.rs
diff --git a/tests/ui/impl-trait/in-trait/object-safety.rs b/tests/ui/impl-trait/in-trait/dyn-compatibility.rs
index 5cca4ad839c..5cca4ad839c 100644
--- a/tests/ui/impl-trait/in-trait/object-safety.rs
+++ b/tests/ui/impl-trait/in-trait/dyn-compatibility.rs
diff --git a/tests/ui/impl-trait/in-trait/object-safety.stderr b/tests/ui/impl-trait/in-trait/dyn-compatibility.stderr
index e2f23bca621..115cb014b8c 100644
--- a/tests/ui/impl-trait/in-trait/object-safety.stderr
+++ b/tests/ui/impl-trait/in-trait/dyn-compatibility.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:14:33
+  --> $DIR/dyn-compatibility.rs:14:33
    |
 LL |     let i = Box::new(42_u32) as Box<dyn Foo>;
    |                                 ^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:4:22
+  --> $DIR/dyn-compatibility.rs:4:22
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -15,13 +15,13 @@ LL |     fn baz(&self) -> impl Debug;
    = help: only type `u32` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:17:15
+  --> $DIR/dyn-compatibility.rs:17:15
    |
 LL |     let s = i.baz();
    |               ^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:4:22
+  --> $DIR/dyn-compatibility.rs:4:22
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -31,13 +31,13 @@ LL |     fn baz(&self) -> impl Debug;
    = help: only type `u32` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:17:13
+  --> $DIR/dyn-compatibility.rs:17:13
    |
 LL |     let s = i.baz();
    |             ^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:4:22
+  --> $DIR/dyn-compatibility.rs:4:22
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -47,13 +47,13 @@ LL |     fn baz(&self) -> impl Debug;
    = help: only type `u32` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:14:13
+  --> $DIR/dyn-compatibility.rs:14:13
    |
 LL |     let i = Box::new(42_u32) as Box<dyn Foo>;
    |             ^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:4:22
+  --> $DIR/dyn-compatibility.rs:4:22
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.current.stderr b/tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.current.stderr
index d71c1768a6a..058517f0014 100644
--- a/tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.current.stderr
+++ b/tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.current.stderr
@@ -73,32 +73,6 @@ help: consider further restricting this bound
 LL |         F: Callback<Self::CallbackArg> + MyFn<i32>,
    |                                        +++++++++++
 
-error[E0277]: the trait bound `F: Callback<i32>` is not satisfied
-  --> $DIR/false-positive-predicate-entailment-error.rs:43:12
-   |
-LL |         F: Callback<Self::CallbackArg>,
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MyFn<i32>` is not implemented for `F`, which is required by `F: Callback<i32>`
-   |
-note: required for `F` to implement `Callback<i32>`
-  --> $DIR/false-positive-predicate-entailment-error.rs:14:21
-   |
-LL | impl<A, F: MyFn<A>> Callback<A> for F {
-   |            -------  ^^^^^^^^^^^     ^
-   |            |
-   |            unsatisfied trait bound introduced here
-note: the requirement `F: Callback<i32>` appears on the `impl`'s method `autobatch` but not on the corresponding trait's method
-  --> $DIR/false-positive-predicate-entailment-error.rs:25:8
-   |
-LL | trait ChannelSender {
-   |       ------------- in this trait
-...
-LL |     fn autobatch<F>(self) -> impl Trait
-   |        ^^^^^^^^^ this trait's method doesn't have the requirement `F: Callback<i32>`
-help: consider further restricting this bound
-   |
-LL |         F: Callback<Self::CallbackArg> + MyFn<i32>,
-   |                                        +++++++++++
-
 error[E0277]: the trait bound `F: MyFn<i32>` is not satisfied
   --> $DIR/false-positive-predicate-entailment-error.rs:36:30
    |
@@ -168,6 +142,6 @@ help: consider further restricting this bound
 LL |         F: Callback<Self::CallbackArg> + MyFn<i32>,
    |                                        +++++++++++
 
-error: aborting due to 8 previous errors
+error: aborting due to 7 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.rs b/tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.rs
index 59fdeab9e0a..2987d183e04 100644
--- a/tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.rs
+++ b/tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.rs
@@ -41,8 +41,7 @@ impl ChannelSender for Sender {
     //[current]~| ERROR the trait bound `F: MyFn<i32>` is not satisfied
     where
         F: Callback<Self::CallbackArg>,
-        //[current]~^ ERROR the trait bound `F: Callback<i32>` is not satisfied
-        //[current]~| ERROR the trait bound `F: MyFn<i32>` is not satisfied
+        //[current]~^ ERROR the trait bound `F: MyFn<i32>` is not satisfied
     {
         Thing
     }
diff --git a/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.rs b/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.rs
index 84bc39d9263..ee47de2c732 100644
--- a/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.rs
+++ b/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.rs
@@ -8,7 +8,6 @@ impl Foo<char> for Bar {
     fn foo<F2: Foo<u8>>(self) -> impl Foo<u8> {
         //~^ ERROR: the trait bound `impl Foo<u8>: Foo<char>` is not satisfied [E0277]
         //~| ERROR: the trait bound `Bar: Foo<u8>` is not satisfied [E0277]
-        //~| ERROR: impl has stricter requirements than trait
         //~| ERROR: the trait bound `F2: Foo<u8>` is not satisfied
         self
     }
diff --git a/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr b/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr
index ae449099987..768224e4c51 100644
--- a/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr
+++ b/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr
@@ -23,15 +23,6 @@ note: required by a bound in `<Bar as Foo<char>>::foo`
 LL |     fn foo<F2: Foo<u8>>(self) -> impl Foo<u8> {
    |                ^^^^^^^ required by this bound in `<Bar as Foo<char>>::foo`
 
-error[E0276]: impl has stricter requirements than trait
-  --> $DIR/return-dont-satisfy-bounds.rs:8:16
-   |
-LL |     fn foo<F2>(self) -> impl Foo<T>;
-   |     -------------------------------- definition of `foo` from trait
-...
-LL |     fn foo<F2: Foo<u8>>(self) -> impl Foo<u8> {
-   |                ^^^^^^^ impl has extra requirement `F2: Foo<u8>`
-
 error[E0277]: the trait bound `Bar: Foo<u8>` is not satisfied
   --> $DIR/return-dont-satisfy-bounds.rs:8:34
    |
@@ -44,7 +35,6 @@ LL |         self
    = help: the trait `Foo<char>` is implemented for `Bar`
    = help: for that trait implementation, expected `char`, found `u8`
 
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0276, E0277.
-For more information about an error, try `rustc --explain E0276`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/in-trait/variance.rs b/tests/ui/impl-trait/in-trait/variance.rs
index 0ac44bf7546..19905c608e3 100644
--- a/tests/ui/impl-trait/in-trait/variance.rs
+++ b/tests/ui/impl-trait/in-trait/variance.rs
@@ -1,22 +1,25 @@
-#![feature(rustc_attrs)]
+#![feature(rustc_attrs, precise_capturing_in_traits)]
 #![allow(internal_features)]
 #![rustc_variance_of_opaques]
 
-trait Captures<'a> {}
-impl<T> Captures<'_> for T {}
-
 trait Foo<'i> {
     fn implicit_capture_early<'a: 'a>() -> impl Sized {}
-    //~^ [Self: o, 'i: *, 'a: *, 'a: o, 'i: o]
+    //~^ [Self: o, 'i: o, 'a: *, 'a: o, 'i: o]
+
+    fn explicit_capture_early<'a: 'a>() -> impl Sized + use<'i, 'a, Self> {}
+    //~^ [Self: o, 'i: o, 'a: *, 'i: o, 'a: o]
 
-    fn explicit_capture_early<'a: 'a>() -> impl Sized + Captures<'a> {}
-    //~^ [Self: o, 'i: *, 'a: *, 'a: o, 'i: o]
+    fn not_captured_early<'a: 'a>() -> impl Sized + use<'i, Self> {}
+    //~^ [Self: o, 'i: o, 'a: *, 'i: o]
 
     fn implicit_capture_late<'a>(_: &'a ()) -> impl Sized {}
-    //~^ [Self: o, 'i: *, 'a: o, 'i: o]
+    //~^ [Self: o, 'i: o, 'a: o, 'i: o]
+
+    fn explicit_capture_late<'a>(_: &'a ()) -> impl Sized + use<'i, 'a, Self> {}
+    //~^ [Self: o, 'i: o, 'i: o, 'a: o]
 
-    fn explicit_capture_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {}
-    //~^ [Self: o, 'i: *, 'a: o, 'i: o]
+    fn not_cpatured_late<'a>(_: &'a ()) -> impl Sized + use<'i, Self> {}
+    //~^ [Self: o, 'i: o, 'i: o]
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/in-trait/variance.stderr b/tests/ui/impl-trait/in-trait/variance.stderr
index 54e0afbaa95..f65174e1c35 100644
--- a/tests/ui/impl-trait/in-trait/variance.stderr
+++ b/tests/ui/impl-trait/in-trait/variance.stderr
@@ -1,26 +1,38 @@
-error: [Self: o, 'i: *, 'a: *, 'a: o, 'i: o]
-  --> $DIR/variance.rs:9:44
+error: [Self: o, 'i: o, 'a: *, 'a: o, 'i: o]
+  --> $DIR/variance.rs:6:44
    |
 LL |     fn implicit_capture_early<'a: 'a>() -> impl Sized {}
    |                                            ^^^^^^^^^^
 
-error: [Self: o, 'i: *, 'a: *, 'a: o, 'i: o]
-  --> $DIR/variance.rs:12:44
+error: [Self: o, 'i: o, 'a: *, 'i: o, 'a: o]
+  --> $DIR/variance.rs:9:44
+   |
+LL |     fn explicit_capture_early<'a: 'a>() -> impl Sized + use<'i, 'a, Self> {}
+   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: [Self: o, 'i: o, 'a: *, 'i: o]
+  --> $DIR/variance.rs:12:40
    |
-LL |     fn explicit_capture_early<'a: 'a>() -> impl Sized + Captures<'a> {}
-   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     fn not_captured_early<'a: 'a>() -> impl Sized + use<'i, Self> {}
+   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: [Self: o, 'i: *, 'a: o, 'i: o]
+error: [Self: o, 'i: o, 'a: o, 'i: o]
   --> $DIR/variance.rs:15:48
    |
 LL |     fn implicit_capture_late<'a>(_: &'a ()) -> impl Sized {}
    |                                                ^^^^^^^^^^
 
-error: [Self: o, 'i: *, 'a: o, 'i: o]
+error: [Self: o, 'i: o, 'i: o, 'a: o]
   --> $DIR/variance.rs:18:48
    |
-LL |     fn explicit_capture_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {}
-   |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     fn explicit_capture_late<'a>(_: &'a ()) -> impl Sized + use<'i, 'a, Self> {}
+   |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: [Self: o, 'i: o, 'i: o]
+  --> $DIR/variance.rs:21:44
+   |
+LL |     fn not_cpatured_late<'a>(_: &'a ()) -> impl Sized + use<'i, Self> {}
+   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 4 previous errors
+error: aborting due to 6 previous errors
 
diff --git a/tests/ui/impl-trait/method-resolution4.next.stderr b/tests/ui/impl-trait/method-resolution4.next.stderr
index b48de0af357..0524f49f98e 100644
--- a/tests/ui/impl-trait/method-resolution4.next.stderr
+++ b/tests/ui/impl-trait/method-resolution4.next.stderr
@@ -4,19 +4,6 @@ error[E0282]: type annotations needed
 LL |         foo(false).next().unwrap();
    |         ^^^^^^^^^^ cannot infer type
 
-error[E0308]: mismatched types
-  --> $DIR/method-resolution4.rs:16:5
-   |
-LL | fn foo(b: bool) -> impl Iterator<Item = ()> {
-   |                    ------------------------ the expected opaque type
-...
-LL |     std::iter::empty()
-   |     ^^^^^^^^^^^^^^^^^^ types differ
-   |
-   = note: expected opaque type `impl Iterator<Item = ()>`
-                   found struct `std::iter::Empty<_>`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0282, E0308.
-For more information about an error, try `rustc --explain E0282`.
+For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/impl-trait/method-resolution4.rs b/tests/ui/impl-trait/method-resolution4.rs
index 91884eb59fd..5c8813ed792 100644
--- a/tests/ui/impl-trait/method-resolution4.rs
+++ b/tests/ui/impl-trait/method-resolution4.rs
@@ -14,7 +14,6 @@ fn foo(b: bool) -> impl Iterator<Item = ()> {
         //[next]~^ type annotations needed
     }
     std::iter::empty()
-    //[next]~^ mismatched types
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/negative-reasoning.rs b/tests/ui/impl-trait/negative-reasoning.rs
index 70e24a3a9d0..0474dc0beda 100644
--- a/tests/ui/impl-trait/negative-reasoning.rs
+++ b/tests/ui/impl-trait/negative-reasoning.rs
@@ -17,7 +17,7 @@ impl<T: std::fmt::Debug> AnotherTrait for T {}
 
 // This is in error, because we cannot assume that `OpaqueType: !Debug`
 impl AnotherTrait for D<OpaqueType> {
-    //~^ ERROR conflicting implementations of trait `AnotherTrait` for type `D<OpaqueType>`
+    //~^ ERROR conflicting implementations of trait `AnotherTrait` for type `D<_>`
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/negative-reasoning.stderr b/tests/ui/impl-trait/negative-reasoning.stderr
index 3cb4be16fc3..631784c817b 100644
--- a/tests/ui/impl-trait/negative-reasoning.stderr
+++ b/tests/ui/impl-trait/negative-reasoning.stderr
@@ -1,13 +1,11 @@
-error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<OpaqueType>`
+error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<_>`
   --> $DIR/negative-reasoning.rs:19:1
    |
 LL | impl<T: std::fmt::Debug> AnotherTrait for T {}
    | ------------------------------------------- first implementation here
 ...
 LL | impl AnotherTrait for D<OpaqueType> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<OpaqueType>`
-   |
-   = note: upstream crates may add a new impl of trait `std::marker::FnPtr` for type `OpaqueType` in future versions
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<_>`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs
index 9d68819f657..6c2477c9744 100644
--- a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs
+++ b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs
@@ -1,10 +1,11 @@
+#![feature(precise_capturing_in_traits)]
+
 fn type_param<T>() -> impl Sized + use<> {}
 //~^ ERROR `impl Trait` must mention all type parameters in scope
 
 trait Foo {
     fn bar() -> impl Sized + use<>;
     //~^ ERROR `impl Trait` must mention the `Self` type of the trait
-    //~| ERROR `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr
index d9be9d543e4..93b44a0c18c 100644
--- a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr
+++ b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr
@@ -1,13 +1,5 @@
-error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
-  --> $DIR/forgot-to-capture-type.rs:5:30
-   |
-LL |     fn bar() -> impl Sized + use<>;
-   |                              ^^^^^
-   |
-   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
-
 error: `impl Trait` must mention all type parameters in scope in `use<...>`
-  --> $DIR/forgot-to-capture-type.rs:1:23
+  --> $DIR/forgot-to-capture-type.rs:3:23
    |
 LL | fn type_param<T>() -> impl Sized + use<> {}
    |               -       ^^^^^^^^^^^^^^^^^^
@@ -17,7 +9,7 @@ LL | fn type_param<T>() -> impl Sized + use<> {}
    = note: currently, all type parameters are required to be mentioned in the precise captures list
 
 error: `impl Trait` must mention the `Self` type of the trait in `use<...>`
-  --> $DIR/forgot-to-capture-type.rs:5:17
+  --> $DIR/forgot-to-capture-type.rs:7:17
    |
 LL | trait Foo {
    | --------- `Self` type parameter is implicitly captured by this `impl Trait`
@@ -26,5 +18,5 @@ LL |     fn bar() -> impl Sized + use<>;
    |
    = note: currently, all type parameters are required to be mentioned in the precise captures list
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/impl-trait/precise-capturing/redundant.normal.stderr b/tests/ui/impl-trait/precise-capturing/redundant.normal.stderr
deleted file mode 100644
index d1bcbaa33ae..00000000000
--- a/tests/ui/impl-trait/precise-capturing/redundant.normal.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant
-  --> $DIR/redundant.rs:5:19
-   |
-LL | fn hello<'a>() -> impl Sized + use<'a> {}
-   |                   ^^^^^^^^^^^^^-------
-   |                                |
-   |                                help: remove the `use<...>` syntax
-   |
-   = note: `#[warn(impl_trait_redundant_captures)]` on by default
-
-warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant
-  --> $DIR/redundant.rs:10:27
-   |
-LL |     fn inherent(&self) -> impl Sized + use<'_> {}
-   |                           ^^^^^^^^^^^^^-------
-   |                                        |
-   |                                        help: remove the `use<...>` syntax
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/impl-trait/precise-capturing/redundant.rpitit.stderr b/tests/ui/impl-trait/precise-capturing/redundant.rpitit.stderr
deleted file mode 100644
index 213888356e5..00000000000
--- a/tests/ui/impl-trait/precise-capturing/redundant.rpitit.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
-  --> $DIR/redundant.rs:16:35
-   |
-LL |     fn in_trait() -> impl Sized + use<'a, Self>;
-   |                                   ^^^^^^^^^^^^^
-   |
-   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
-
-error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
-  --> $DIR/redundant.rs:21:35
-   |
-LL |     fn in_trait() -> impl Sized + use<'a> {}
-   |                                   ^^^^^^^
-   |
-   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/impl-trait/precise-capturing/redundant.rs b/tests/ui/impl-trait/precise-capturing/redundant.rs
index 4a08ffb61be..e19d935f5b0 100644
--- a/tests/ui/impl-trait/precise-capturing/redundant.rs
+++ b/tests/ui/impl-trait/precise-capturing/redundant.rs
@@ -1,25 +1,24 @@
 //@ compile-flags: -Zunstable-options --edition=2024
-//@ revisions: normal rpitit
-//@[normal] check-pass
+//@ check-pass
+
+#![feature(precise_capturing_in_traits)]
 
 fn hello<'a>() -> impl Sized + use<'a> {}
-//[normal]~^ WARN all possible in-scope parameters are already captured
+//~^ WARN all possible in-scope parameters are already captured
 
 struct Inherent;
 impl Inherent {
     fn inherent(&self) -> impl Sized + use<'_> {}
-    //[normal]~^ WARN all possible in-scope parameters are already captured
+    //~^ WARN all possible in-scope parameters are already captured
 }
 
-#[cfg(rpitit)]
 trait Test<'a> {
     fn in_trait() -> impl Sized + use<'a, Self>;
-    //[rpitit]~^ ERROR `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
+    //~^ WARN all possible in-scope parameters are already captured
 }
-#[cfg(rpitit)]
 impl<'a> Test<'a> for () {
     fn in_trait() -> impl Sized + use<'a> {}
-    //[rpitit]~^ ERROR `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
+    //~^ WARN all possible in-scope parameters are already captured
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/redundant.stderr b/tests/ui/impl-trait/precise-capturing/redundant.stderr
new file mode 100644
index 00000000000..274d9d2375f
--- /dev/null
+++ b/tests/ui/impl-trait/precise-capturing/redundant.stderr
@@ -0,0 +1,36 @@
+warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant
+  --> $DIR/redundant.rs:6:19
+   |
+LL | fn hello<'a>() -> impl Sized + use<'a> {}
+   |                   ^^^^^^^^^^^^^-------
+   |                                |
+   |                                help: remove the `use<...>` syntax
+   |
+   = note: `#[warn(impl_trait_redundant_captures)]` on by default
+
+warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant
+  --> $DIR/redundant.rs:11:27
+   |
+LL |     fn inherent(&self) -> impl Sized + use<'_> {}
+   |                           ^^^^^^^^^^^^^-------
+   |                                        |
+   |                                        help: remove the `use<...>` syntax
+
+warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant
+  --> $DIR/redundant.rs:16:22
+   |
+LL |     fn in_trait() -> impl Sized + use<'a, Self>;
+   |                      ^^^^^^^^^^^^^-------------
+   |                                   |
+   |                                   help: remove the `use<...>` syntax
+
+warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant
+  --> $DIR/redundant.rs:20:22
+   |
+LL |     fn in_trait() -> impl Sized + use<'a> {}
+   |                      ^^^^^^^^^^^^^-------
+   |                                   |
+   |                                   help: remove the `use<...>` syntax
+
+warning: 4 warnings emitted
+
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs b/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs
index 71a91fe319e..b39c1408c05 100644
--- a/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs
+++ b/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs
@@ -2,15 +2,15 @@
 // trait definition, which is not allowed. Due to the default lifetime capture
 // rules of RPITITs, this is only doable if we use precise capturing.
 
+#![feature(precise_capturing_in_traits)]
+
 pub trait Foo {
     fn bar<'tr: 'tr>(&'tr mut self) -> impl Sized + use<Self>;
-    //~^ ERROR `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
 }
 
 impl Foo for () {
-    fn bar<'im: 'im>(&'im mut self) -> impl Sized + 'im {}
+    fn bar<'im: 'im>(&'im mut self) -> impl Sized + use<'im> {}
     //~^ ERROR return type captures more lifetimes than trait definition
-    //~| WARN impl trait in impl method signature does not match trait method signature
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr b/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr
index 339e2e6335e..45f755d3cc1 100644
--- a/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr
+++ b/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr
@@ -1,42 +1,17 @@
-error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
-  --> $DIR/rpitit-captures-more-method-lifetimes.rs:6:53
-   |
-LL |     fn bar<'tr: 'tr>(&'tr mut self) -> impl Sized + use<Self>;
-   |                                                     ^^^^^^^^^
-   |
-   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
-
 error: return type captures more lifetimes than trait definition
-  --> $DIR/rpitit-captures-more-method-lifetimes.rs:11:40
+  --> $DIR/rpitit-captures-more-method-lifetimes.rs:12:40
    |
-LL |     fn bar<'im: 'im>(&'im mut self) -> impl Sized + 'im {}
-   |            ---                         ^^^^^^^^^^^^^^^^
+LL |     fn bar<'im: 'im>(&'im mut self) -> impl Sized + use<'im> {}
+   |            ---                         ^^^^^^^^^^^^^^^^^^^^^
    |            |
    |            this lifetime was captured
    |
 note: hidden type must only reference lifetimes captured by this impl trait
-  --> $DIR/rpitit-captures-more-method-lifetimes.rs:6:40
+  --> $DIR/rpitit-captures-more-method-lifetimes.rs:8:40
    |
 LL |     fn bar<'tr: 'tr>(&'tr mut self) -> impl Sized + use<Self>;
    |                                        ^^^^^^^^^^^^^^^^^^^^^^
-   = note: hidden type inferred to be `impl Sized + 'im`
-
-warning: impl trait in impl method signature does not match trait method signature
-  --> $DIR/rpitit-captures-more-method-lifetimes.rs:11:40
-   |
-LL |     fn bar<'tr: 'tr>(&'tr mut self) -> impl Sized + use<Self>;
-   |                                        ---------------------- return type from trait method defined here
-...
-LL |     fn bar<'im: 'im>(&'im mut self) -> impl Sized + 'im {}
-   |                                        ^^^^^^^^^^^^^^^^
-   |
-   = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
-   = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
-   = note: `#[warn(refining_impl_trait_reachable)]` on by default
-help: replace the return type so that it matches the trait
-   |
-LL |     fn bar<'im: 'im>(&'im mut self) -> impl Sized {}
-   |                                        ~~~~~~~~~~
+   = note: hidden type inferred to be `impl Sized`
 
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.rs b/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.rs
new file mode 100644
index 00000000000..b16b0522d6e
--- /dev/null
+++ b/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.rs
@@ -0,0 +1,14 @@
+#![feature(precise_capturing_in_traits)]
+
+struct Invariant<'a>(&'a mut &'a mut ());
+
+trait Trait {
+    fn hello(self_: Invariant<'_>) -> impl Sized + use<Self>;
+}
+
+impl Trait for () {
+    fn hello(self_: Invariant<'_>) -> impl Sized + use<'_> {}
+    //~^ ERROR return type captures more lifetimes than trait definition
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr b/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr
new file mode 100644
index 00000000000..e1856b92910
--- /dev/null
+++ b/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr
@@ -0,0 +1,17 @@
+error: return type captures more lifetimes than trait definition
+  --> $DIR/rpitit-impl-captures-too-much.rs:10:39
+   |
+LL |     fn hello(self_: Invariant<'_>) -> impl Sized + use<'_> {}
+   |                               --      ^^^^^^^^^^^^^^^^^^^^
+   |                               |
+   |                               this lifetime was captured
+   |
+note: hidden type must only reference lifetimes captured by this impl trait
+  --> $DIR/rpitit-impl-captures-too-much.rs:6:39
+   |
+LL |     fn hello(self_: Invariant<'_>) -> impl Sized + use<Self>;
+   |                                       ^^^^^^^^^^^^^^^^^^^^^^
+   = note: hidden type inferred to be `impl Sized`
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit.rs b/tests/ui/impl-trait/precise-capturing/rpitit.rs
index feeeb1461e8..3f887e8e47f 100644
--- a/tests/ui/impl-trait/precise-capturing/rpitit.rs
+++ b/tests/ui/impl-trait/precise-capturing/rpitit.rs
@@ -1,19 +1,34 @@
-//@ known-bug: unknown
-
 // RPITITs don't have variances in their GATs, so they always relate invariantly
 // and act as if they capture all their args.
 // To fix this soundly, we need to make sure that all the trait header args
 // remain captured, since they affect trait selection.
 
-trait Foo<'a> {
-    fn hello() -> impl PartialEq + use<Self>;
+#![feature(precise_capturing_in_traits)]
+
+fn eq_types<T>(_: T, _: T) {}
+
+trait TraitLt<'a: 'a> {
+    fn hello() -> impl Sized + use<Self>;
+    //~^ ERROR `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list
+}
+fn trait_lt<'a, 'b, T: for<'r> TraitLt<'r>> () {
+    eq_types(
+        //~^ ERROR lifetime may not live long enough
+        //~| ERROR lifetime may not live long enough
+        <T as TraitLt<'a>>::hello(),
+        <T as TraitLt<'b>>::hello(),
+    );
 }
 
-fn test<'a, 'b, T: for<'r> Foo<'r>>() {
-    PartialEq::eq(
-        &<T as Foo<'a>>::hello(),
-        &<T as Foo<'b>>::hello(),
+trait MethodLt {
+    fn hello<'a: 'a>() -> impl Sized + use<Self>;
+}
+fn method_lt<'a, 'b, T: MethodLt> () {
+    eq_types(
+        T::hello::<'a>(),
+        T::hello::<'b>(),
     );
+    // Good!
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit.stderr b/tests/ui/impl-trait/precise-capturing/rpitit.stderr
index 5a120df9f04..498eae54a1c 100644
--- a/tests/ui/impl-trait/precise-capturing/rpitit.stderr
+++ b/tests/ui/impl-trait/precise-capturing/rpitit.stderr
@@ -1,44 +1,40 @@
-error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
-  --> $DIR/rpitit.rs:9:36
-   |
-LL |     fn hello() -> impl PartialEq + use<Self>;
-   |                                    ^^^^^^^^^
-   |
-   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
-
 error: `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list
-  --> $DIR/rpitit.rs:9:19
+  --> $DIR/rpitit.rs:11:19
    |
-LL | trait Foo<'a> {
-   |           -- this lifetime parameter is captured
-LL |     fn hello() -> impl PartialEq + use<Self>;
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime captured due to being mentioned in the bounds of the `impl Trait`
+LL | trait TraitLt<'a: 'a> {
+   |               -- all lifetime parameters originating from a trait are captured implicitly
+LL |     fn hello() -> impl Sized + use<Self>;
+   |                   ^^^^^^^^^^^^^^^^^^^^^^
 
 error: lifetime may not live long enough
-  --> $DIR/rpitit.rs:13:5
+  --> $DIR/rpitit.rs:15:5
    |
-LL |   fn test<'a, 'b, T: for<'r> Foo<'r>>() {
-   |           --  -- lifetime `'b` defined here
-   |           |
-   |           lifetime `'a` defined here
-LL | /     PartialEq::eq(
-LL | |         &<T as Foo<'a>>::hello(),
-LL | |         &<T as Foo<'b>>::hello(),
+LL |   fn trait_lt<'a, 'b, T: for<'r> TraitLt<'r>> () {
+   |               --  -- lifetime `'b` defined here
+   |               |
+   |               lifetime `'a` defined here
+LL | /     eq_types(
+LL | |
+LL | |
+LL | |         <T as TraitLt<'a>>::hello(),
+LL | |         <T as TraitLt<'b>>::hello(),
 LL | |     );
    | |_____^ argument requires that `'a` must outlive `'b`
    |
    = help: consider adding the following bound: `'a: 'b`
 
 error: lifetime may not live long enough
-  --> $DIR/rpitit.rs:13:5
+  --> $DIR/rpitit.rs:15:5
    |
-LL |   fn test<'a, 'b, T: for<'r> Foo<'r>>() {
-   |           --  -- lifetime `'b` defined here
-   |           |
-   |           lifetime `'a` defined here
-LL | /     PartialEq::eq(
-LL | |         &<T as Foo<'a>>::hello(),
-LL | |         &<T as Foo<'b>>::hello(),
+LL |   fn trait_lt<'a, 'b, T: for<'r> TraitLt<'r>> () {
+   |               --  -- lifetime `'b` defined here
+   |               |
+   |               lifetime `'a` defined here
+LL | /     eq_types(
+LL | |
+LL | |
+LL | |         <T as TraitLt<'a>>::hello(),
+LL | |         <T as TraitLt<'b>>::hello(),
 LL | |     );
    | |_____^ argument requires that `'b` must outlive `'a`
    |
@@ -46,5 +42,5 @@ LL | |     );
 
 help: `'a` and `'b` must be the same: replace one with the other
 
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/impl-trait/precise-capturing/self-capture.rs b/tests/ui/impl-trait/precise-capturing/self-capture.rs
index a61a7f06edc..15985da50b5 100644
--- a/tests/ui/impl-trait/precise-capturing/self-capture.rs
+++ b/tests/ui/impl-trait/precise-capturing/self-capture.rs
@@ -1,6 +1,9 @@
+//@ check-pass
+
+#![feature(precise_capturing_in_traits)]
+
 trait Foo {
     fn bar<'a>() -> impl Sized + use<Self>;
-    //~^ ERROR `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/self-capture.stderr b/tests/ui/impl-trait/precise-capturing/self-capture.stderr
deleted file mode 100644
index c1974600f30..00000000000
--- a/tests/ui/impl-trait/precise-capturing/self-capture.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
-  --> $DIR/self-capture.rs:2:34
-   |
-LL |     fn bar<'a>() -> impl Sized + use<Self>;
-   |                                  ^^^^^^^^^
-   |
-   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr b/tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr
index 96db2030a40..132f7de4ef2 100644
--- a/tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr
+++ b/tests/ui/impl-trait/recursive-coroutine-boxed.next.stderr
@@ -1,5 +1,5 @@
 error[E0282]: type annotations needed
-  --> $DIR/recursive-coroutine-boxed.rs:15:23
+  --> $DIR/recursive-coroutine-boxed.rs:14:23
    |
 LL |         let mut gen = Box::pin(foo());
    |                       ^^^^^^^^ cannot infer type of the type parameter `T` declared on the struct `Box`
@@ -12,29 +12,6 @@ help: consider specifying the generic argument
 LL |         let mut gen = Box::<T>::pin(foo());
    |                          +++++
 
-error[E0308]: mismatched types
-  --> $DIR/recursive-coroutine-boxed.rs:14:18
-   |
-LL |   fn foo() -> impl Coroutine<Yield = (), Return = ()> {
-   |               ---------------------------------------
-   |               |
-   |               the expected opaque type
-   |               expected `impl Coroutine<Yield = (), Return = ()>` because of return type
-...
-LL |       #[coroutine] || {
-   |  __________________^
-LL | |         let mut gen = Box::pin(foo());
-LL | |
-LL | |         let mut r = gen.as_mut().resume(());
-...  |
-LL | |         }
-LL | |     }
-   | |_____^ types differ
-   |
-   = note: expected opaque type `impl Coroutine<Yield = (), Return = ()>`
-                found coroutine `{coroutine@$DIR/recursive-coroutine-boxed.rs:14:18: 14:20}`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0282, E0308.
-For more information about an error, try `rustc --explain E0282`.
+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 24a77d73114..8d38e6aed12 100644
--- a/tests/ui/impl-trait/recursive-coroutine-boxed.rs
+++ b/tests/ui/impl-trait/recursive-coroutine-boxed.rs
@@ -10,8 +10,7 @@ fn foo() -> impl Coroutine<Yield = (), Return = ()> {
     // FIXME(-Znext-solver): this fails with a mismatched types as the
     // hidden type of the opaque ends up as {type error}. We should not
     // emit errors for such goals.
-
-    #[coroutine] || { //[next]~ ERROR mismatched types
+    #[coroutine] || {
         let mut gen = Box::pin(foo());
         //[next]~^ ERROR type annotations needed
         let mut r = gen.as_mut().resume(());
diff --git a/tests/ui/impl-trait/unsize-cast-validation-rpit.rs b/tests/ui/impl-trait/unsize-cast-validation-rpit.rs
new file mode 100644
index 00000000000..cace30aca8a
--- /dev/null
+++ b/tests/ui/impl-trait/unsize-cast-validation-rpit.rs
@@ -0,0 +1,12 @@
+//@ check-pass
+//@ compile-flags: -Zvalidate-mir
+
+fn hello() -> &'static [impl Sized; 0] {
+    if false {
+        let x = hello();
+        let _: &[i32] = x;
+    }
+    &[]
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/unsized_coercion.next.stderr b/tests/ui/impl-trait/unsized_coercion.next.stderr
index 49ac3f1845f..4cebd26a5be 100644
--- a/tests/ui/impl-trait/unsized_coercion.next.stderr
+++ b/tests/ui/impl-trait/unsized_coercion.next.stderr
@@ -1,26 +1,35 @@
-error[E0271]: type mismatch resolving `impl Trait <: dyn Trait`
-  --> $DIR/unsized_coercion.rs:14:17
+error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
+  --> $DIR/unsized_coercion.rs:15:17
    |
 LL |         let x = hello();
-   |                 ^^^^^^^ types differ
+   |                 ^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `dyn Trait`
 
 error[E0308]: mismatched types
-  --> $DIR/unsized_coercion.rs:18:14
+  --> $DIR/unsized_coercion.rs:19:5
    |
 LL | fn hello() -> Box<impl Trait> {
-   |                   ---------- the expected opaque type
+   |               ---------------
+   |               |   |
+   |               |   the expected opaque type
+   |               expected `Box<impl Trait>` because of return type
 ...
 LL |     Box::new(1u32)
-   |     -------- ^^^^ types differ
-   |     |
-   |     arguments to this function are incorrect
+   |     ^^^^^^^^^^^^^^ types differ
+   |
+   = note: expected struct `Box<impl Trait>`
+              found struct `Box<u32>`
+
+error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
+  --> $DIR/unsized_coercion.rs:12:1
+   |
+LL | fn hello() -> Box<impl Trait> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
-   = note: expected opaque type `impl Trait`
-                     found type `u32`
-note: associated function defined here
-  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+   = help: the trait `Sized` is not implemented for `dyn Trait`
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0271, E0308.
-For more information about an error, try `rustc --explain E0271`.
+Some errors have detailed explanations: E0277, E0308.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/unsized_coercion.rs b/tests/ui/impl-trait/unsized_coercion.rs
index 46e040c1428..b3791b38abc 100644
--- a/tests/ui/impl-trait/unsized_coercion.rs
+++ b/tests/ui/impl-trait/unsized_coercion.rs
@@ -10,9 +10,10 @@ trait Trait {}
 impl Trait for u32 {}
 
 fn hello() -> Box<impl Trait> {
+    //[next]~^ ERROR the size for values of type `dyn Trait` cannot be known at compilation time
     if true {
         let x = hello();
-        //[next]~^ ERROR: type mismatch resolving `impl Trait <: dyn Trait`
+        //[next]~^ ERROR: the size for values of type `dyn Trait` cannot be known at compilation time
         let y: Box<dyn Trait> = x;
     }
     Box::new(1u32) //[next]~ ERROR: mismatched types
diff --git a/tests/ui/impl-trait/unsized_coercion3.next.stderr b/tests/ui/impl-trait/unsized_coercion3.next.stderr
index 586ae076028..d1e1809cf16 100644
--- a/tests/ui/impl-trait/unsized_coercion3.next.stderr
+++ b/tests/ui/impl-trait/unsized_coercion3.next.stderr
@@ -1,38 +1,35 @@
-error[E0271]: type mismatch resolving `impl Trait + ?Sized <: dyn Send`
-  --> $DIR/unsized_coercion3.rs:13:17
+error[E0277]: the trait bound `dyn Send: Trait` is not satisfied
+  --> $DIR/unsized_coercion3.rs:14:17
    |
 LL |         let x = hello();
-   |                 ^^^^^^^ types differ
+   |                 ^^^^^^^ the trait `Trait` is not implemented for `dyn Send`
+   |
+   = help: the trait `Trait` is implemented for `u32`
 
 error[E0308]: mismatched types
-  --> $DIR/unsized_coercion3.rs:18:14
+  --> $DIR/unsized_coercion3.rs:19:5
    |
 LL | fn hello() -> Box<impl Trait + ?Sized> {
-   |                   ------------------- the expected opaque type
+   |               ------------------------
+   |               |   |
+   |               |   the expected opaque type
+   |               expected `Box<impl Trait + ?Sized>` because of return type
 ...
 LL |     Box::new(1u32)
-   |     -------- ^^^^ types differ
-   |     |
-   |     arguments to this function are incorrect
+   |     ^^^^^^^^^^^^^^ types differ
    |
-   = note: expected opaque type `impl Trait + ?Sized`
-                     found type `u32`
-note: associated function defined here
-  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+   = note: expected struct `Box<impl Trait + ?Sized>`
+              found struct `Box<u32>`
 
-error[E0277]: the size for values of type `impl Trait + ?Sized` cannot be known at compilation time
-  --> $DIR/unsized_coercion3.rs:18:14
+error[E0277]: the trait bound `dyn Send: Trait` is not satisfied
+  --> $DIR/unsized_coercion3.rs:11:1
    |
-LL |     Box::new(1u32)
-   |     -------- ^^^^ doesn't have a size known at compile-time
-   |     |
-   |     required by a bound introduced by this call
+LL | fn hello() -> Box<impl Trait + ?Sized> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `dyn Send`
    |
-   = help: the trait `Sized` is not implemented for `impl Trait + ?Sized`
-note: required by a bound in `Box::<T>::new`
-  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+   = help: the trait `Trait` is implemented for `u32`
 
 error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0271, E0277, E0308.
-For more information about an error, try `rustc --explain E0271`.
+Some errors have detailed explanations: E0277, E0308.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/unsized_coercion3.old.stderr b/tests/ui/impl-trait/unsized_coercion3.old.stderr
index 52a72b84a8d..3bb9f9c2095 100644
--- a/tests/ui/impl-trait/unsized_coercion3.old.stderr
+++ b/tests/ui/impl-trait/unsized_coercion3.old.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the size for values of type `impl Trait + ?Sized` cannot be known at compilation time
-  --> $DIR/unsized_coercion3.rs:15:32
+  --> $DIR/unsized_coercion3.rs:16:32
    |
 LL |         let y: Box<dyn Send> = x;
    |                                ^ doesn't have a size known at compile-time
diff --git a/tests/ui/impl-trait/unsized_coercion3.rs b/tests/ui/impl-trait/unsized_coercion3.rs
index 7e862de2157..c1dd5350e22 100644
--- a/tests/ui/impl-trait/unsized_coercion3.rs
+++ b/tests/ui/impl-trait/unsized_coercion3.rs
@@ -9,15 +9,15 @@ trait Trait {}
 impl Trait for u32 {}
 
 fn hello() -> Box<impl Trait + ?Sized> {
+    //[next]~^ ERROR: the trait bound `dyn Send: Trait` is not satisfied
     if true {
         let x = hello();
-        //[next]~^ ERROR: type mismatch resolving `impl Trait + ?Sized <: dyn Send`
+        //[next]~^ ERROR: the trait bound `dyn Send: Trait` is not satisfied
         let y: Box<dyn Send> = x;
         //[old]~^ ERROR: the size for values of type `impl Trait + ?Sized` cannot be know
     }
     Box::new(1u32)
     //[next]~^ ERROR: mismatched types
-    //[next]~| ERROR: the size for values of type `impl Trait + ?Sized` cannot be know
 }
 
 fn main() {}
diff --git a/tests/ui/impl-unused-tps.rs b/tests/ui/impl-unused-tps.rs
index 3eb9daedf76..a5836db3c8e 100644
--- a/tests/ui/impl-unused-tps.rs
+++ b/tests/ui/impl-unused-tps.rs
@@ -1,34 +1,35 @@
-//~ ERROR overflow evaluating the requirement `([isize; 0], _): Sized
-
 trait Foo<A> {
-    fn get(&self, A: &A) { }
+    fn get(&self, A: &A) {}
 }
 
 trait Bar {
     type Out;
 }
 
-impl<T> Foo<T> for [isize;0] {
+impl<T> Foo<T> for [isize; 0] {
     // OK, T is used in `Foo<T>`.
 }
 
-impl<T,U> Foo<T> for [isize;1] {
+impl<T, U> Foo<T> for [isize; 1] {
     //~^ ERROR the type parameter `U` is not constrained
 }
 
-impl<T,U> Foo<T> for [isize;2] where T : Bar<Out=U> {
+impl<T, U> Foo<T> for [isize; 2]
+where
+    T: Bar<Out = U>,
+{
     // OK, `U` is now constrained by the output type parameter.
 }
 
-impl<T:Bar<Out=U>,U> Foo<T> for [isize;3] {
+impl<T: Bar<Out = U>, U> Foo<T> for [isize; 3] {
     // OK, same as above but written differently.
 }
 
-impl<T,U> Foo<T> for U {
+impl<T, U> Foo<T> for U {
     //~^ ERROR conflicting implementations of trait `Foo<_>` for type `[isize; 0]`
 }
 
-impl<T,U> Bar for T {
+impl<T, U> Bar for T {
     //~^ ERROR the type parameter `U` is not constrained
 
     type Out = U;
@@ -36,28 +37,33 @@ impl<T,U> Bar for T {
     // Using `U` in an associated type within the impl is not good enough!
 }
 
-impl<T,U> Bar for T
-    where T : Bar<Out=U>
+impl<T, U> Bar for T
+where
+    T: Bar<Out = U>,
 {
-    //~^^^ ERROR the type parameter `U` is not constrained
-
+    //~^^^^ ERROR the type parameter `U` is not constrained by the impl trait, self type, or predicates
+    //~| ERROR conflicting implementations of trait `Bar`
     // This crafty self-referential attempt is still no good.
 }
 
-impl<T,U,V> Foo<T> for T
-    where (T,U): Bar<Out=V>
+impl<T, U, V> Foo<T> for T
+where
+    (T, U): Bar<Out = V>,
 {
-    //~^^^ ERROR the type parameter `U` is not constrained
-    //~|   ERROR the type parameter `V` is not constrained
+    //~^^^^ ERROR the type parameter `U` is not constrained
+    //~| ERROR the type parameter `V` is not constrained
+    //~| ERROR conflicting implementations of trait `Foo<[isize; 0]>` for type `[isize; 0]`
 
     // Here, `V` is bound by an output type parameter, but the inputs
     // are not themselves constrained.
 }
 
-impl<T,U,V> Foo<(T,U)> for T
-    where (T,U): Bar<Out=V>
+impl<T, U, V> Foo<(T, U)> for T
+where
+    (T, U): Bar<Out = V>,
 {
+    //~^^^^ ERROR conflicting implementations of trait `Foo<([isize; 0], _)>` for type `[isize; 0]`
     // As above, but both T and U ARE constrained.
 }
 
-fn main() { }
+fn main() {}
diff --git a/tests/ui/impl-unused-tps.stderr b/tests/ui/impl-unused-tps.stderr
index af427cb5f3e..da4589dee82 100644
--- a/tests/ui/impl-unused-tps.stderr
+++ b/tests/ui/impl-unused-tps.stderr
@@ -1,56 +1,76 @@
 error[E0119]: conflicting implementations of trait `Foo<_>` for type `[isize; 0]`
-  --> $DIR/impl-unused-tps.rs:27:1
+  --> $DIR/impl-unused-tps.rs:28:1
    |
-LL | impl<T> Foo<T> for [isize;0] {
-   | ---------------------------- first implementation here
+LL | impl<T> Foo<T> for [isize; 0] {
+   | ----------------------------- first implementation here
 ...
-LL | impl<T,U> Foo<T> for U {
-   | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `[isize; 0]`
+LL | impl<T, U> Foo<T> for U {
+   | ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `[isize; 0]`
 
-error[E0275]: overflow evaluating the requirement `([isize; 0], _): Sized`
+error[E0119]: conflicting implementations of trait `Bar`
+  --> $DIR/impl-unused-tps.rs:40:1
    |
-   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`impl_unused_tps`)
-note: required for `([isize; 0], _)` to implement `Bar`
-  --> $DIR/impl-unused-tps.rs:31:11
+LL |   impl<T, U> Bar for T {
+   |   -------------------- first implementation here
+...
+LL | / impl<T, U> Bar for T
+LL | | where
+LL | |     T: Bar<Out = U>,
+   | |____________________^ conflicting implementation
+
+error[E0119]: conflicting implementations of trait `Foo<[isize; 0]>` for type `[isize; 0]`
+  --> $DIR/impl-unused-tps.rs:49:1
+   |
+LL |   impl<T> Foo<T> for [isize; 0] {
+   |   ----------------------------- first implementation here
+...
+LL | / impl<T, U, V> Foo<T> for T
+LL | | where
+LL | |     (T, U): Bar<Out = V>,
+   | |_________________________^ conflicting implementation for `[isize; 0]`
+
+error[E0119]: conflicting implementations of trait `Foo<([isize; 0], _)>` for type `[isize; 0]`
+  --> $DIR/impl-unused-tps.rs:61:1
    |
-LL | impl<T,U> Bar for T {
-   |      -    ^^^     ^
-   |      |
-   |      unsatisfied trait bound introduced here
-   = note: 126 redundant requirements hidden
-   = note: required for `([isize; 0], _)` to implement `Bar`
+LL |   impl<T> Foo<T> for [isize; 0] {
+   |   ----------------------------- first implementation here
+...
+LL | / impl<T, U, V> Foo<(T, U)> for T
+LL | | where
+LL | |     (T, U): Bar<Out = V>,
+   | |_________________________^ conflicting implementation for `[isize; 0]`
 
 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
-  --> $DIR/impl-unused-tps.rs:15:8
+  --> $DIR/impl-unused-tps.rs:13:9
    |
-LL | impl<T,U> Foo<T> for [isize;1] {
-   |        ^ unconstrained type parameter
+LL | impl<T, U> Foo<T> for [isize; 1] {
+   |         ^ unconstrained type parameter
 
 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
-  --> $DIR/impl-unused-tps.rs:31:8
+  --> $DIR/impl-unused-tps.rs:32:9
    |
-LL | impl<T,U> Bar for T {
-   |        ^ unconstrained type parameter
+LL | impl<T, U> Bar for T {
+   |         ^ unconstrained type parameter
 
 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
-  --> $DIR/impl-unused-tps.rs:39:8
+  --> $DIR/impl-unused-tps.rs:40:9
    |
-LL | impl<T,U> Bar for T
-   |        ^ unconstrained type parameter
+LL | impl<T, U> Bar for T
+   |         ^ unconstrained type parameter
 
 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
-  --> $DIR/impl-unused-tps.rs:47:8
+  --> $DIR/impl-unused-tps.rs:49:9
    |
-LL | impl<T,U,V> Foo<T> for T
-   |        ^ unconstrained type parameter
+LL | impl<T, U, V> Foo<T> for T
+   |         ^ unconstrained type parameter
 
 error[E0207]: the type parameter `V` is not constrained by the impl trait, self type, or predicates
-  --> $DIR/impl-unused-tps.rs:47:10
+  --> $DIR/impl-unused-tps.rs:49:12
    |
-LL | impl<T,U,V> Foo<T> for T
-   |          ^ unconstrained type parameter
+LL | impl<T, U, V> Foo<T> for T
+   |            ^ unconstrained type parameter
 
-error: aborting due to 7 previous errors
+error: aborting due to 9 previous errors
 
-Some errors have detailed explanations: E0119, E0207, E0275.
+Some errors have detailed explanations: E0119, E0207.
 For more information about an error, try `rustc --explain E0119`.
diff --git a/tests/ui/intrinsics/intrinsic-alignment.rs b/tests/ui/intrinsics/intrinsic-alignment.rs
index 138273aadd2..4cb05f6a8df 100644
--- a/tests/ui/intrinsics/intrinsic-alignment.rs
+++ b/tests/ui/intrinsics/intrinsic-alignment.rs
@@ -13,7 +13,6 @@ mod rusti {
 #[cfg(any(
     target_os = "android",
     target_os = "dragonfly",
-    target_os = "emscripten",
     target_os = "freebsd",
     target_os = "fuchsia",
     target_os = "hurd",
diff --git a/tests/ui/intrinsics/intrinsic-fmuladd.rs b/tests/ui/intrinsics/intrinsic-fmuladd.rs
new file mode 100644
index 00000000000..d03297884f7
--- /dev/null
+++ b/tests/ui/intrinsics/intrinsic-fmuladd.rs
@@ -0,0 +1,42 @@
+//@ run-pass
+#![feature(core_intrinsics)]
+
+use std::intrinsics::*;
+
+macro_rules! assert_approx_eq {
+    ($a:expr, $b:expr) => {{
+        let (a, b) = (&$a, &$b);
+        assert!((*a - *b).abs() < 1.0e-6, "{} is not approximately equal to {}", *a, *b);
+    }};
+}
+
+fn main() {
+    unsafe {
+        let nan: f32 = f32::NAN;
+        let inf: f32 = f32::INFINITY;
+        let neg_inf: f32 = f32::NEG_INFINITY;
+        assert_approx_eq!(fmuladdf32(1.23, 4.5, 0.67), 6.205);
+        assert_approx_eq!(fmuladdf32(-1.23, -4.5, -0.67), 4.865);
+        assert_approx_eq!(fmuladdf32(0.0, 8.9, 1.2), 1.2);
+        assert_approx_eq!(fmuladdf32(3.4, -0.0, 5.6), 5.6);
+        assert!(fmuladdf32(nan, 7.8, 9.0).is_nan());
+        assert_eq!(fmuladdf32(inf, 7.8, 9.0), inf);
+        assert_eq!(fmuladdf32(neg_inf, 7.8, 9.0), neg_inf);
+        assert_eq!(fmuladdf32(8.9, inf, 3.2), inf);
+        assert_eq!(fmuladdf32(-3.2, 2.4, neg_inf), neg_inf);
+    }
+    unsafe {
+        let nan: f64 = f64::NAN;
+        let inf: f64 = f64::INFINITY;
+        let neg_inf: f64 = f64::NEG_INFINITY;
+        assert_approx_eq!(fmuladdf64(1.23, 4.5, 0.67), 6.205);
+        assert_approx_eq!(fmuladdf64(-1.23, -4.5, -0.67), 4.865);
+        assert_approx_eq!(fmuladdf64(0.0, 8.9, 1.2), 1.2);
+        assert_approx_eq!(fmuladdf64(3.4, -0.0, 5.6), 5.6);
+        assert!(fmuladdf64(nan, 7.8, 9.0).is_nan());
+        assert_eq!(fmuladdf64(inf, 7.8, 9.0), inf);
+        assert_eq!(fmuladdf64(neg_inf, 7.8, 9.0), neg_inf);
+        assert_eq!(fmuladdf64(8.9, inf, 3.2), inf);
+        assert_eq!(fmuladdf64(-3.2, 2.4, neg_inf), neg_inf);
+    }
+}
diff --git a/tests/ui/issues/issue-48728.rs b/tests/ui/issues/issue-48728.rs
index 7ef05f4277b..8ad9289c65c 100644
--- a/tests/ui/issues/issue-48728.rs
+++ b/tests/ui/issues/issue-48728.rs
@@ -1,12 +1,8 @@
 // Regression test for #48728, an ICE that occurred computing
 // coherence "help" information.
 
-//@ revisions: current next
-//@ ignore-compare-mode-next-solver (explicit revisions)
-//@[next] compile-flags: -Znext-solver
-//@[next] check-pass
-
-#[derive(Clone)] //[current]~ ERROR conflicting implementations of trait `Clone`
+//@ check-pass
+#[derive(Clone)]
 struct Node<T: ?Sized>(Box<T>);
 
 impl<T: Clone + ?Sized> Clone for Node<[T]> {
diff --git a/tests/ui/issues/issue-58734.rs b/tests/ui/issues/issue-58734.rs
index c838fde5d73..9b630666baf 100644
--- a/tests/ui/issues/issue-58734.rs
+++ b/tests/ui/issues/issue-58734.rs
@@ -1,22 +1,22 @@
 trait Trait {
     fn exists(self) -> ();
 
-    fn not_object_safe() -> Self;
+    fn dyn_incompatible() -> Self;
 }
 
 impl Trait for () {
     fn exists(self) -> () {
     }
 
-    fn not_object_safe() -> Self {
+    fn dyn_incompatible() -> Self {
         ()
     }
 }
 
 fn main() {
-    // object-safe or not, this call is OK
+    // dyn-compatible or not, this call is OK
     Trait::exists(());
-    // no object safety error
+    // no dyn-compatibility error
     Trait::nonexistent(());
     //~^ ERROR no function or associated item named `nonexistent` found
     //~| WARN trait objects without an explicit `dyn` are deprecated
diff --git a/tests/ui/issues/issue-85461.rs b/tests/ui/issues/issue-85461.rs
index 7fe7a4aa579..72538081ccb 100644
--- a/tests/ui/issues/issue-85461.rs
+++ b/tests/ui/issues/issue-85461.rs
@@ -1,6 +1,6 @@
 //@ compile-flags: -Cinstrument-coverage -Ccodegen-units=4 --crate-type dylib -Copt-level=0
 //@ build-pass
-//@ needs-profiler-support
+//@ needs-profiler-runtime
 //@ needs-dynamic-linking
 
 // Regression test for #85461 where MSVC sometimes fails to link instrument-coverage binaries
diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr b/tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr
index b4424f4750e..b4424f4750e 100644
--- a/tests/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr
+++ b/tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr
diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.rs b/tests/ui/kindck/kindck-inherited-copy-bound.rs
index c785736f42e..dda95229ddf 100644
--- a/tests/ui/kindck/kindck-inherited-copy-bound.rs
+++ b/tests/ui/kindck/kindck-inherited-copy-bound.rs
@@ -1,8 +1,8 @@
 // Test that Copy bounds inherited by trait are checked.
 //
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 
 use std::any::Any;
@@ -19,7 +19,7 @@ fn take_param<T:Foo>(foo: &T) { }
 fn a() {
     let x: Box<_> = Box::new(3);
     take_param(&x); //[curr]~ ERROR E0277
-    //[object_safe_for_dispatch]~^ ERROR E0277
+    //[dyn_compatible_for_dispatch]~^ ERROR E0277
 }
 
 fn b() {
@@ -28,7 +28,7 @@ fn b() {
     let z = &x as &dyn Foo;
     //[curr]~^ ERROR E0038
     //[curr]~| ERROR E0038
-    //[object_safe_for_dispatch]~^^^ ERROR E0038
+    //[dyn_compatible_for_dispatch]~^^^ ERROR E0038
 }
 
 fn main() { }
diff --git a/tests/ui/layout/post-mono-layout-cycle-2.rs b/tests/ui/layout/post-mono-layout-cycle-2.rs
new file mode 100644
index 00000000000..356f1e777c7
--- /dev/null
+++ b/tests/ui/layout/post-mono-layout-cycle-2.rs
@@ -0,0 +1,59 @@
+//@ build-fail
+//@ edition: 2021
+
+#![feature(async_closure, noop_waker)]
+
+use std::future::Future;
+use std::pin::pin;
+use std::task::*;
+
+pub fn block_on<T>(fut: impl Future<Output = T>) -> T {
+    let mut fut = pin!(fut);
+    // Poll loop, just to test the future...
+    let ctx = &mut Context::from_waker(Waker::noop());
+
+    loop {
+        match fut.as_mut().poll(ctx) {
+            Poll::Pending => {}
+            Poll::Ready(t) => break t,
+        }
+    }
+}
+
+trait Blah {
+    async fn iter<T>(&mut self, iterator: T)
+    where
+        T: IntoIterator<Item = ()>;
+}
+
+impl Blah for () {
+    async fn iter<T>(&mut self, iterator: T)
+    //~^ ERROR recursion in an async fn requires boxing
+    where
+        T: IntoIterator<Item = ()>,
+    {
+        Blah::iter(self, iterator).await
+    }
+}
+
+struct Wrap<T: Blah> {
+    t: T,
+}
+
+impl<T: Blah> Wrap<T>
+where
+    T: Blah,
+{
+    async fn ice(&mut self) {
+        //~^ ERROR a cycle occurred during layout computation
+        let arr: [(); 0] = [];
+        self.t.iter(arr.into_iter()).await;
+    }
+}
+
+fn main() {
+    block_on(async {
+        let mut t = Wrap { t: () };
+        t.ice();
+    })
+}
diff --git a/tests/ui/layout/post-mono-layout-cycle-2.stderr b/tests/ui/layout/post-mono-layout-cycle-2.stderr
new file mode 100644
index 00000000000..ad01c2694fa
--- /dev/null
+++ b/tests/ui/layout/post-mono-layout-cycle-2.stderr
@@ -0,0 +1,23 @@
+error[E0733]: recursion in an async fn requires boxing
+  --> $DIR/post-mono-layout-cycle-2.rs:30:5
+   |
+LL | /     async fn iter<T>(&mut self, iterator: T)
+LL | |
+LL | |     where
+LL | |         T: IntoIterator<Item = ()>,
+   | |___________________________________^
+LL |       {
+LL |           Blah::iter(self, iterator).await
+   |           -------------------------------- recursive call here
+   |
+   = note: a recursive `async fn` call must introduce indirection such as `Box::pin` to avoid an infinitely sized future
+
+error: a cycle occurred during layout computation
+  --> $DIR/post-mono-layout-cycle-2.rs:47:5
+   |
+LL |     async fn ice(&mut self) {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/layout/post-mono-layout-cycle.rs b/tests/ui/layout/post-mono-layout-cycle.rs
new file mode 100644
index 00000000000..8d136190c00
--- /dev/null
+++ b/tests/ui/layout/post-mono-layout-cycle.rs
@@ -0,0 +1,25 @@
+//@ build-fail
+//~^ cycle detected when computing layout of `Wrapper<()>`
+
+trait Trait {
+    type Assoc;
+}
+
+impl Trait for () {
+    type Assoc = Wrapper<()>;
+}
+
+struct Wrapper<T: Trait> {
+    _x: <T as Trait>::Assoc,
+}
+
+fn abi<T: Trait>(_: Option<Wrapper<T>>) {}
+//~^ ERROR a cycle occurred during layout computation
+
+fn indirect<T: Trait>() {
+    abi::<T>(None);
+}
+
+fn main() {
+    indirect::<()>();
+}
diff --git a/tests/ui/layout/post-mono-layout-cycle.stderr b/tests/ui/layout/post-mono-layout-cycle.stderr
new file mode 100644
index 00000000000..47f7f30b1cb
--- /dev/null
+++ b/tests/ui/layout/post-mono-layout-cycle.stderr
@@ -0,0 +1,16 @@
+error[E0391]: cycle detected when computing layout of `Wrapper<()>`
+   |
+   = note: ...which requires computing layout of `<() as Trait>::Assoc`...
+   = note: ...which again requires computing layout of `Wrapper<()>`, completing the cycle
+   = note: cycle used when computing layout of `core::option::Option<Wrapper<()>>`
+   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
+
+error: a cycle occurred during layout computation
+  --> $DIR/post-mono-layout-cycle.rs:16:1
+   |
+LL | fn abi<T: Trait>(_: Option<Wrapper<T>>) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/lint/non-local-defs/cargo-update.stderr b/tests/ui/lint/non-local-defs/cargo-update.stderr
index 77ee28b48cc..d579fa391fc 100644
--- a/tests/ui/lint/non-local-defs/cargo-update.stderr
+++ b/tests/ui/lint/non-local-defs/cargo-update.stderr
@@ -12,7 +12,6 @@ LL | non_local_macro::non_local_impl!(LocalStruct);
    = note: the macro `non_local_macro::non_local_impl` may come from an old version of the `non_local_macro` crate, try updating your dependency with `cargo update -p non_local_macro`
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
    = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
    = note: `#[warn(non_local_definitions)]` on by default
    = note: this warning originates in the macro `non_local_macro::non_local_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/lint/non-local-defs/consts.rs b/tests/ui/lint/non-local-defs/consts.rs
index d8a497e43e5..5b9dab3cfd3 100644
--- a/tests/ui/lint/non-local-defs/consts.rs
+++ b/tests/ui/lint/non-local-defs/consts.rs
@@ -63,6 +63,13 @@ fn main() {
 
         1
     };
+
+    const _: () = {
+        const _: () = {
+            impl Test {}
+            //~^ WARN non-local `impl` definition
+        };
+    };
 }
 
 trait Uto9 {}
diff --git a/tests/ui/lint/non-local-defs/consts.stderr b/tests/ui/lint/non-local-defs/consts.stderr
index 7f76056c021..20fb4a6432e 100644
--- a/tests/ui/lint/non-local-defs/consts.stderr
+++ b/tests/ui/lint/non-local-defs/consts.stderr
@@ -15,7 +15,6 @@ LL |     impl Uto for &Test {}
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
    = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
    = note: `#[warn(non_local_definitions)]` on by default
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -31,7 +30,6 @@ LL |     impl Uto2 for Test {}
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
    = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/consts.rs:32:5
@@ -46,7 +44,6 @@ LL |     impl Uto3 for Test {}
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
    = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/consts.rs:43:5
@@ -59,7 +56,6 @@ LL |     impl Test {
    |          `Test` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/consts.rs:50:9
@@ -78,7 +74,6 @@ LL | |     };
    | |_____- move the `impl` block outside of this inline constant `<unnameable>` and up 2 bodies
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/consts.rs:59:9
@@ -92,10 +87,22 @@ LL |         impl Test {
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
    = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
-  --> $DIR/consts.rs:72:9
+  --> $DIR/consts.rs:69:13
+   |
+LL |         const _: () = {
+   |         ----------- move the `impl` block outside of this constant `_` and up 3 bodies
+LL |             impl Test {}
+   |             ^^^^^----
+   |                  |
+   |                  `Test` is not local
+   |
+   = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
+   = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
+
+warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
+  --> $DIR/consts.rs:79:9
    |
 LL |     let _a = || {
    |              -- move the `impl` block outside of this closure `<unnameable>` and up 2 bodies
@@ -106,10 +113,9 @@ LL |         impl Uto9 for Test {}
    |              `Uto9` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
-  --> $DIR/consts.rs:79:9
+  --> $DIR/consts.rs:86:9
    |
 LL |       type A = [u32; {
    |  ____________________-
@@ -124,7 +130,6 @@ LL | |     }];
    | |_____- move the `impl` block outside of this constant expression `<unnameable>` and up 2 bodies
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
-warning: 8 warnings emitted
+warning: 9 warnings emitted
 
diff --git a/tests/ui/lint/non-local-defs/convoluted-locals-131474-with-mods.rs b/tests/ui/lint/non-local-defs/convoluted-locals-131474-with-mods.rs
new file mode 100644
index 00000000000..72fd056d461
--- /dev/null
+++ b/tests/ui/lint/non-local-defs/convoluted-locals-131474-with-mods.rs
@@ -0,0 +1,45 @@
+// This test check that no matter the nesting of const-anons and modules
+// we consider them as transparent.
+//
+// Similar to https://github.com/rust-lang/rust/issues/131474
+
+//@ check-pass
+
+pub mod tmp {
+    pub mod tmp {
+        pub struct Test;
+    }
+}
+
+const _: () = {
+    const _: () = {
+        const _: () = {
+            const _: () = {
+                impl tmp::tmp::Test {}
+            };
+        };
+    };
+};
+
+const _: () = {
+    const _: () = {
+        mod tmp {
+            pub(super) struct InnerTest;
+        }
+
+        impl tmp::InnerTest {}
+    };
+};
+
+// https://github.com/rust-lang/rust/issues/131643
+const _: () = {
+    const _: () = {
+        impl tmp::InnerTest {}
+    };
+
+    mod tmp {
+        pub(super) struct InnerTest;
+    }
+};
+
+fn main() {}
diff --git a/tests/ui/lint/non-local-defs/convoluted-locals-131474.rs b/tests/ui/lint/non-local-defs/convoluted-locals-131474.rs
new file mode 100644
index 00000000000..8e738544a71
--- /dev/null
+++ b/tests/ui/lint/non-local-defs/convoluted-locals-131474.rs
@@ -0,0 +1,33 @@
+// This test check that no matter the nesting of const-anons we consider
+// them as transparent.
+//
+// https://github.com/rust-lang/rust/issues/131474
+
+//@ check-pass
+
+pub struct Test;
+
+const _: () = {
+    const _: () = {
+        impl Test {}
+    };
+};
+
+const _: () = {
+    const _: () = {
+        struct InnerTest;
+
+        impl InnerTest {}
+    };
+};
+
+// https://github.com/rust-lang/rust/issues/131643
+const _: () = {
+    const _: () = {
+        impl InnerTest {}
+    };
+
+    struct InnerTest;
+};
+
+fn main() {}
diff --git a/tests/ui/lint/non-local-defs/exhaustive-trait.stderr b/tests/ui/lint/non-local-defs/exhaustive-trait.stderr
index c58ec12aaac..83e46df185d 100644
--- a/tests/ui/lint/non-local-defs/exhaustive-trait.stderr
+++ b/tests/ui/lint/non-local-defs/exhaustive-trait.stderr
@@ -10,7 +10,6 @@ LL |     impl PartialEq<()> for Dog {
    |          `PartialEq` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
    = note: `#[warn(non_local_definitions)]` on by default
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -26,7 +25,6 @@ LL |     impl PartialEq<()> for &Dog {
    |          `PartialEq` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive-trait.rs:21:5
@@ -41,7 +39,6 @@ LL |     impl PartialEq<Dog> for () {
    |          `PartialEq` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive-trait.rs:28:5
@@ -56,7 +53,6 @@ LL |     impl PartialEq<&Dog> for () {
    |          `PartialEq` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive-trait.rs:35:5
@@ -72,7 +68,6 @@ LL |     impl PartialEq<Dog> for &Dog {
    |          `PartialEq` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive-trait.rs:42:5
@@ -88,7 +83,6 @@ LL |     impl PartialEq<&Dog> for &Dog {
    |          `PartialEq` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: 6 warnings emitted
 
diff --git a/tests/ui/lint/non-local-defs/exhaustive.stderr b/tests/ui/lint/non-local-defs/exhaustive.stderr
index dd41b2206d8..1e6fc910621 100644
--- a/tests/ui/lint/non-local-defs/exhaustive.stderr
+++ b/tests/ui/lint/non-local-defs/exhaustive.stderr
@@ -9,7 +9,6 @@ LL |     impl Test {
    |          `Test` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
    = note: `#[warn(non_local_definitions)]` on by default
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -25,7 +24,6 @@ LL |     impl Display for Test {
    |          `Display` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive.rs:22:5
@@ -39,7 +37,6 @@ LL |     impl dyn Trait {}
    |              `Trait` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive.rs:25:5
@@ -54,7 +51,6 @@ LL |     impl<T: Trait> Trait for Vec<T> { }
    |                    `Trait` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive.rs:28:5
@@ -69,7 +65,6 @@ LL |     impl Trait for &dyn Trait {}
    |          `Trait` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive.rs:31:5
@@ -84,7 +79,6 @@ LL |     impl Trait for *mut Test {}
    |          `Trait` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive.rs:34:5
@@ -99,7 +93,6 @@ LL |     impl Trait for *mut [Test] {}
    |          `Trait` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive.rs:37:5
@@ -114,7 +107,6 @@ LL |     impl Trait for [Test; 8] {}
    |          `Trait` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive.rs:40:5
@@ -129,7 +121,6 @@ LL |     impl Trait for (Test,) {}
    |          `Trait` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive.rs:43:5
@@ -144,7 +135,6 @@ LL |     impl Trait for fn(Test) -> () {}
    |          `Trait` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive.rs:46:5
@@ -159,7 +149,6 @@ LL |     impl Trait for fn() -> Test {}
    |          `Trait` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive.rs:50:9
@@ -173,7 +162,6 @@ LL |         impl Trait for Test {}
    |              `Trait` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive.rs:67:9
@@ -187,7 +175,6 @@ LL |         impl Display for InsideMain {
    |              `Display` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/exhaustive.rs:74:9
@@ -201,7 +188,6 @@ LL |         impl InsideMain {
    |              `InsideMain` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: 14 warnings emitted
 
diff --git a/tests/ui/lint/non-local-defs/from-local-for-global.stderr b/tests/ui/lint/non-local-defs/from-local-for-global.stderr
index 6839ebd2c8a..f173c054e78 100644
--- a/tests/ui/lint/non-local-defs/from-local-for-global.stderr
+++ b/tests/ui/lint/non-local-defs/from-local-for-global.stderr
@@ -10,7 +10,6 @@ LL |     impl From<Cat> for () {
    |          `From` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
    = note: `#[warn(non_local_definitions)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/lint/non-local-defs/generics.stderr b/tests/ui/lint/non-local-defs/generics.stderr
index aefe8921fe2..66769cc1e0b 100644
--- a/tests/ui/lint/non-local-defs/generics.stderr
+++ b/tests/ui/lint/non-local-defs/generics.stderr
@@ -11,7 +11,6 @@ LL |     impl<T: Local> Global for Vec<T> { }
    |                    `Global` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
    = note: `#[warn(non_local_definitions)]` on by default
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -27,7 +26,6 @@ LL |     impl Uto7 for Test where Local: std::any::Any {}
    |          `Uto7` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/generics.rs:23:5
@@ -41,7 +39,6 @@ LL |     impl<T> Uto8 for T {}
    |             `Uto8` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: 3 warnings emitted
 
diff --git a/tests/ui/lint/non-local-defs/inside-macro_rules.stderr b/tests/ui/lint/non-local-defs/inside-macro_rules.stderr
index faab6aea2b3..b6fe1a921d7 100644
--- a/tests/ui/lint/non-local-defs/inside-macro_rules.stderr
+++ b/tests/ui/lint/non-local-defs/inside-macro_rules.stderr
@@ -14,7 +14,6 @@ LL | m!();
    |
    = note: the macro `m` defines the non-local `impl`, and may need to be changed
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
    = note: `#[warn(non_local_definitions)]` on by default
    = note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/lint/non-local-defs/local.rs b/tests/ui/lint/non-local-defs/local.rs
index 166ee88c021..f7ecd68f59e 100644
--- a/tests/ui/lint/non-local-defs/local.rs
+++ b/tests/ui/lint/non-local-defs/local.rs
@@ -51,3 +51,10 @@ fn bitflags() {
         impl Flags {}
     };
 }
+
+fn bitflags_internal() {
+    const _: () = {
+        struct InternalFlags;
+        impl InternalFlags {}
+    };
+}
diff --git a/tests/ui/lint/non-local-defs/macro_rules.stderr b/tests/ui/lint/non-local-defs/macro_rules.stderr
index 4e86fc7b987..28779a78066 100644
--- a/tests/ui/lint/non-local-defs/macro_rules.stderr
+++ b/tests/ui/lint/non-local-defs/macro_rules.stderr
@@ -6,7 +6,6 @@ LL |     macro_rules! m0 { () => { } };
    |
    = help: remove the `#[macro_export]` or move this `macro_rules!` outside the of the current constant `B`
    = note: a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
    = note: `#[warn(non_local_definitions)]` on by default
 
 warning: non-local `macro_rules!` definition, `#[macro_export]` macro should be written at top level module
@@ -17,7 +16,6 @@ LL | non_local_macro::non_local_macro_rules!(my_macro);
    |
    = help: remove the `#[macro_export]` or move this `macro_rules!` outside the of the current constant `_MACRO_EXPORT`
    = note: a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
    = note: the macro `non_local_macro::non_local_macro_rules` may come from an old version of the `non_local_macro` crate, try updating your dependency with `cargo update -p non_local_macro`
    = note: this warning originates in the macro `non_local_macro::non_local_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info)
 
@@ -29,7 +27,6 @@ LL |     macro_rules! m { () => { } };
    |
    = help: remove the `#[macro_export]` or move this `macro_rules!` outside the of the current function `main`
    = note: a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `macro_rules!` definition, `#[macro_export]` macro should be written at top level module
   --> $DIR/macro_rules.rs:29:13
@@ -39,7 +36,6 @@ LL |             macro_rules! m2 { () => { } };
    |
    = help: remove the `#[macro_export]` or move this `macro_rules!` outside the of the current associated function `bar` and up 2 bodies
    = note: a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: 4 warnings emitted
 
diff --git a/tests/ui/lint/non-local-defs/weird-exprs.stderr b/tests/ui/lint/non-local-defs/weird-exprs.stderr
index f6ce063929e..ec3517140ef 100644
--- a/tests/ui/lint/non-local-defs/weird-exprs.stderr
+++ b/tests/ui/lint/non-local-defs/weird-exprs.stderr
@@ -14,7 +14,6 @@ LL | | }];
    | |_- move the `impl` block outside of this constant expression `<unnameable>`
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
    = note: `#[warn(non_local_definitions)]` on by default
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
@@ -33,7 +32,6 @@ LL | |     }
    | |_____- move the `impl` block outside of this constant expression `<unnameable>`
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/weird-exprs.rs:25:9
@@ -52,7 +50,6 @@ LL | |     }];
    | |_____- move the `impl` block outside of this constant expression `<unnameable>` and up 2 bodies
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/weird-exprs.rs:34:9
@@ -70,7 +67,6 @@ LL | |     }];
    | |_____- move the `impl` block outside of this constant expression `<unnameable>` and up 2 bodies
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/weird-exprs.rs:41:9
@@ -88,7 +84,6 @@ LL | |     }]) {}
    | |_____- move the `impl` block outside of this constant expression `<unnameable>` and up 2 bodies
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> $DIR/weird-exprs.rs:48:9
@@ -107,7 +102,6 @@ LL | |     }] { todo!() }
    | |_____- move the `impl` block outside of this constant expression `<unnameable>` and up 2 bodies
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 
 warning: 6 warnings emitted
 
diff --git a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.cdylib_.stderr b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.cdylib_.stderr
index 9bccb270627..140d72b9742 100644
--- a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.cdylib_.stderr
+++ b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.cdylib_.stderr
@@ -1,11 +1,11 @@
 error: crate `NonSnakeCase` should have a snake case name
-  --> $DIR/lint-non-snake-case-crate.rs:25:18
+  --> $DIR/lint-non-snake-case-crate.rs:29:18
    |
 LL | #![crate_name = "NonSnakeCase"]
    |                  ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
    |
 note: the lint level is defined here
-  --> $DIR/lint-non-snake-case-crate.rs:27:9
+  --> $DIR/lint-non-snake-case-crate.rs:31:9
    |
 LL | #![deny(non_snake_case)]
    |         ^^^^^^^^^^^^^^
diff --git a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.dylib_.stderr b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.dylib_.stderr
index 9bccb270627..140d72b9742 100644
--- a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.dylib_.stderr
+++ b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.dylib_.stderr
@@ -1,11 +1,11 @@
 error: crate `NonSnakeCase` should have a snake case name
-  --> $DIR/lint-non-snake-case-crate.rs:25:18
+  --> $DIR/lint-non-snake-case-crate.rs:29:18
    |
 LL | #![crate_name = "NonSnakeCase"]
    |                  ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
    |
 note: the lint level is defined here
-  --> $DIR/lint-non-snake-case-crate.rs:27:9
+  --> $DIR/lint-non-snake-case-crate.rs:31:9
    |
 LL | #![deny(non_snake_case)]
    |         ^^^^^^^^^^^^^^
diff --git a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.lib_.stderr b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.lib_.stderr
index 9bccb270627..140d72b9742 100644
--- a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.lib_.stderr
+++ b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.lib_.stderr
@@ -1,11 +1,11 @@
 error: crate `NonSnakeCase` should have a snake case name
-  --> $DIR/lint-non-snake-case-crate.rs:25:18
+  --> $DIR/lint-non-snake-case-crate.rs:29:18
    |
 LL | #![crate_name = "NonSnakeCase"]
    |                  ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
    |
 note: the lint level is defined here
-  --> $DIR/lint-non-snake-case-crate.rs:27:9
+  --> $DIR/lint-non-snake-case-crate.rs:31:9
    |
 LL | #![deny(non_snake_case)]
    |         ^^^^^^^^^^^^^^
diff --git a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.proc_macro_.stderr b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.proc_macro_.stderr
index 9bccb270627..140d72b9742 100644
--- a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.proc_macro_.stderr
+++ b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.proc_macro_.stderr
@@ -1,11 +1,11 @@
 error: crate `NonSnakeCase` should have a snake case name
-  --> $DIR/lint-non-snake-case-crate.rs:25:18
+  --> $DIR/lint-non-snake-case-crate.rs:29:18
    |
 LL | #![crate_name = "NonSnakeCase"]
    |                  ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
    |
 note: the lint level is defined here
-  --> $DIR/lint-non-snake-case-crate.rs:27:9
+  --> $DIR/lint-non-snake-case-crate.rs:31:9
    |
 LL | #![deny(non_snake_case)]
    |         ^^^^^^^^^^^^^^
diff --git a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rlib_.stderr b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rlib_.stderr
index 9bccb270627..140d72b9742 100644
--- a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rlib_.stderr
+++ b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rlib_.stderr
@@ -1,11 +1,11 @@
 error: crate `NonSnakeCase` should have a snake case name
-  --> $DIR/lint-non-snake-case-crate.rs:25:18
+  --> $DIR/lint-non-snake-case-crate.rs:29:18
    |
 LL | #![crate_name = "NonSnakeCase"]
    |                  ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
    |
 note: the lint level is defined here
-  --> $DIR/lint-non-snake-case-crate.rs:27:9
+  --> $DIR/lint-non-snake-case-crate.rs:31:9
    |
 LL | #![deny(non_snake_case)]
    |         ^^^^^^^^^^^^^^
diff --git a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rs b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rs
index 57604d99a07..097b246c165 100644
--- a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rs
+++ b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rs
@@ -22,6 +22,10 @@
 //@[rlib_] compile-flags: --crate-type=rlib
 //@[staticlib_] compile-flags: --crate-type=staticlib
 
+// The compiler may emit a warning that causes stderr output
+// that contains a warning this test does not wish to check.
+//@[proc_macro_] needs-unwind
+
 #![crate_name = "NonSnakeCase"]
 //[cdylib_,dylib_,lib_,proc_macro_,rlib_,staticlib_]~^ ERROR crate `NonSnakeCase` should have a snake case name
 #![deny(non_snake_case)]
diff --git a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.staticlib_.stderr b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.staticlib_.stderr
index 9bccb270627..140d72b9742 100644
--- a/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.staticlib_.stderr
+++ b/tests/ui/lint/non-snake-case/lint-non-snake-case-crate.staticlib_.stderr
@@ -1,11 +1,11 @@
 error: crate `NonSnakeCase` should have a snake case name
-  --> $DIR/lint-non-snake-case-crate.rs:25:18
+  --> $DIR/lint-non-snake-case-crate.rs:29:18
    |
 LL | #![crate_name = "NonSnakeCase"]
    |                  ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
    |
 note: the lint level is defined here
-  --> $DIR/lint-non-snake-case-crate.rs:27:9
+  --> $DIR/lint-non-snake-case-crate.rs:31:9
    |
 LL | #![deny(non_snake_case)]
    |         ^^^^^^^^^^^^^^
diff --git a/tests/ui/lint/unused/unused-parens-for-stmt-expr-attributes-issue-129833.fixed b/tests/ui/lint/unused/unused-parens-for-stmt-expr-attributes-issue-129833.fixed
new file mode 100644
index 00000000000..8287b3d3ac7
--- /dev/null
+++ b/tests/ui/lint/unused/unused-parens-for-stmt-expr-attributes-issue-129833.fixed
@@ -0,0 +1,15 @@
+//@ run-rustfix
+// Check the `unused_parens` suggestion for paren_expr with attributes.
+// The suggestion should retain attributes in the front.
+
+#![feature(stmt_expr_attributes)]
+#![deny(unused_parens)]
+
+pub fn foo() -> impl Fn() {
+    let _ = #[inline] #[allow(dead_code)] || println!("Hello!"); //~ERROR unnecessary parentheses
+    #[inline] #[allow(dead_code)] || println!("Hello!") //~ERROR unnecessary parentheses
+}
+
+fn main() {
+    let _ = foo();
+}
diff --git a/tests/ui/lint/unused/unused-parens-for-stmt-expr-attributes-issue-129833.rs b/tests/ui/lint/unused/unused-parens-for-stmt-expr-attributes-issue-129833.rs
new file mode 100644
index 00000000000..0b6edae30e7
--- /dev/null
+++ b/tests/ui/lint/unused/unused-parens-for-stmt-expr-attributes-issue-129833.rs
@@ -0,0 +1,15 @@
+//@ run-rustfix
+// Check the `unused_parens` suggestion for paren_expr with attributes.
+// The suggestion should retain attributes in the front.
+
+#![feature(stmt_expr_attributes)]
+#![deny(unused_parens)]
+
+pub fn foo() -> impl Fn() {
+    let _ = (#[inline] #[allow(dead_code)] || println!("Hello!")); //~ERROR unnecessary parentheses
+    (#[inline] #[allow(dead_code)] || println!("Hello!")) //~ERROR unnecessary parentheses
+}
+
+fn main() {
+    let _ = foo();
+}
diff --git a/tests/ui/lint/unused/unused-parens-for-stmt-expr-attributes-issue-129833.stderr b/tests/ui/lint/unused/unused-parens-for-stmt-expr-attributes-issue-129833.stderr
new file mode 100644
index 00000000000..65513553f7e
--- /dev/null
+++ b/tests/ui/lint/unused/unused-parens-for-stmt-expr-attributes-issue-129833.stderr
@@ -0,0 +1,31 @@
+error: unnecessary parentheses around assigned value
+  --> $DIR/unused-parens-for-stmt-expr-attributes-issue-129833.rs:9:13
+   |
+LL |     let _ = (#[inline] #[allow(dead_code)] || println!("Hello!"));
+   |             ^                                                   ^
+   |
+note: the lint level is defined here
+  --> $DIR/unused-parens-for-stmt-expr-attributes-issue-129833.rs:6:9
+   |
+LL | #![deny(unused_parens)]
+   |         ^^^^^^^^^^^^^
+help: remove these parentheses
+   |
+LL -     let _ = (#[inline] #[allow(dead_code)] || println!("Hello!"));
+LL +     let _ = #[inline] #[allow(dead_code)] || println!("Hello!");
+   |
+
+error: unnecessary parentheses around block return value
+  --> $DIR/unused-parens-for-stmt-expr-attributes-issue-129833.rs:10:5
+   |
+LL |     (#[inline] #[allow(dead_code)] || println!("Hello!"))
+   |     ^                                                   ^
+   |
+help: remove these parentheses
+   |
+LL -     (#[inline] #[allow(dead_code)] || println!("Hello!"))
+LL +     #[inline] #[allow(dead_code)] || println!("Hello!")
+   |
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.fixed b/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.fixed
new file mode 100644
index 00000000000..1ca5125fe8b
--- /dev/null
+++ b/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.fixed
@@ -0,0 +1,13 @@
+//@ run-rustfix
+
+fn main() {
+    let s = "123";
+    println!("{:?} {} {}", {}, "sss", s);
+    //~^ ERROR format argument must be a string literal
+    println!("{:?}", {});
+    //~^ ERROR format argument must be a string literal
+    println!("{} {} {} {:?}", s, "sss", s, {});
+    //~^ ERROR format argument must be a string literal
+    println!("{:?} {} {:?}", (), s, {});
+    //~^ ERROR format argument must be a string literal
+}
diff --git a/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.rs b/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.rs
new file mode 100644
index 00000000000..c09b2a04061
--- /dev/null
+++ b/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.rs
@@ -0,0 +1,13 @@
+//@ run-rustfix
+
+fn main() {
+    let s = "123";
+    println!({}, "sss", s);
+    //~^ ERROR format argument must be a string literal
+    println!({});
+    //~^ ERROR format argument must be a string literal
+    println!(s, "sss", s, {});
+    //~^ ERROR format argument must be a string literal
+    println!((), s, {});
+    //~^ ERROR format argument must be a string literal
+}
diff --git a/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.stderr b/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.stderr
new file mode 100644
index 00000000000..81fca8c03cc
--- /dev/null
+++ b/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.stderr
@@ -0,0 +1,46 @@
+error: format argument must be a string literal
+  --> $DIR/format-empty-block-unit-tuple-suggestion-130170.rs:5:14
+   |
+LL |     println!({}, "sss", s);
+   |              ^^
+   |
+help: you might be missing a string literal to format with
+   |
+LL |     println!("{:?} {} {}", {}, "sss", s);
+   |              +++++++++++++
+
+error: format argument must be a string literal
+  --> $DIR/format-empty-block-unit-tuple-suggestion-130170.rs:7:14
+   |
+LL |     println!({});
+   |              ^^
+   |
+help: you might be missing a string literal to format with
+   |
+LL |     println!("{:?}", {});
+   |              +++++++
+
+error: format argument must be a string literal
+  --> $DIR/format-empty-block-unit-tuple-suggestion-130170.rs:9:14
+   |
+LL |     println!(s, "sss", s, {});
+   |              ^
+   |
+help: you might be missing a string literal to format with
+   |
+LL |     println!("{} {} {} {:?}", s, "sss", s, {});
+   |              ++++++++++++++++
+
+error: format argument must be a string literal
+  --> $DIR/format-empty-block-unit-tuple-suggestion-130170.rs:11:14
+   |
+LL |     println!((), s, {});
+   |              ^^
+   |
+help: you might be missing a string literal to format with
+   |
+LL |     println!("{:?} {} {:?}", (), s, {});
+   |              +++++++++++++++
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/macros/issue-51848.stderr b/tests/ui/macros/issue-51848.stderr
index c25bedf37b7..30b64113d73 100644
--- a/tests/ui/macros/issue-51848.stderr
+++ b/tests/ui/macros/issue-51848.stderr
@@ -1,8 +1,8 @@
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/issue-51848.rs:6:20
    |
 LL |         println!("{");
-   |                   -^ expected `'}'` in format string
+   |                   -^ expected `}` in format string
    |                   |
    |                   because of this opening brace
 ...
diff --git a/tests/ui/meta/revision-bad.rs b/tests/ui/meta/revision-bad.rs
index c5193b19d9e..0af5624ff9c 100644
--- a/tests/ui/meta/revision-bad.rs
+++ b/tests/ui/meta/revision-bad.rs
@@ -5,6 +5,7 @@
 //@ revisions: foo bar
 //@ should-fail
 //@ needs-run-enabled
+//@ compile-flags: --remap-path-prefix={{src-base}}=remapped
 //@[foo] error-pattern:bar
 //@[bar] error-pattern:foo
 
diff --git a/tests/ui/mir/mir-inlining/always-encode-mirs.rs b/tests/ui/mir/mir-inlining/always-encode-mirs.rs
index 9029ff6499b..4553560baaa 100644
--- a/tests/ui/mir/mir-inlining/always-encode-mirs.rs
+++ b/tests/ui/mir/mir-inlining/always-encode-mirs.rs
@@ -1,6 +1,6 @@
 // Regression test for MIR inlining with -Zalways-encode-mir enabled in the auxiliary crate.
 // Previously we inlined function not eligible for inlining which lead to linking error:
-// undefined reference to `internal::S'
+// undefined reference to `internal::S`
 //
 //@ aux-build:internal.rs
 //@ build-pass
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-2.new.stderr b/tests/ui/object-safety/avoid-ice-on-warning-2.new.stderr
deleted file mode 100644
index 4e3d2ebebad..00000000000
--- a/tests/ui/object-safety/avoid-ice-on-warning-2.new.stderr
+++ /dev/null
@@ -1,41 +0,0 @@
-error[E0038]: the trait `Copy` cannot be made into an object
-  --> $DIR/avoid-ice-on-warning-2.rs:4:13
-   |
-LL | fn id<F>(f: Copy) -> usize {
-   |             ^^^^ `Copy` cannot be made into an object
-   |
-   = note: the trait cannot be made into an object because it requires `Self: Sized`
-   = note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-
-error[E0618]: expected function, found `(dyn Copy + 'static)`
-  --> $DIR/avoid-ice-on-warning-2.rs:11:5
-   |
-LL | fn id<F>(f: Copy) -> usize {
-   |          - `f` has type `(dyn Copy + 'static)`
-...
-LL |     f()
-   |     ^--
-   |     |
-   |     call expression requires function
-
-error[E0277]: the size for values of type `(dyn Copy + 'static)` cannot be known at compilation time
-  --> $DIR/avoid-ice-on-warning-2.rs:4:13
-   |
-LL | fn id<F>(f: Copy) -> usize {
-   |             ^^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `(dyn Copy + 'static)`
-   = help: unsized fn params are gated as an unstable feature
-help: you can use `impl Trait` as the argument type
-   |
-LL | fn id<F>(f: impl Copy) -> usize {
-   |             ++++
-help: function arguments must have a statically known size, borrowed types always have a known size
-   |
-LL | fn id<F>(f: &dyn Copy) -> usize {
-   |             ++++
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0038, E0277, E0618.
-For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-3.new.stderr b/tests/ui/object-safety/avoid-ice-on-warning-3.new.stderr
deleted file mode 100644
index fdd3e8ab507..00000000000
--- a/tests/ui/object-safety/avoid-ice-on-warning-3.new.stderr
+++ /dev/null
@@ -1,47 +0,0 @@
-error[E0038]: the trait `A` cannot be made into an object
-  --> $DIR/avoid-ice-on-warning-3.rs:4:19
-   |
-LL | trait B { fn f(a: A) -> A; }
-   |                   ^ `A` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/avoid-ice-on-warning-3.rs:12:14
-   |
-LL | trait A { fn g(b: B) -> B; }
-   |       -      ^ ...because associated function `g` has no `self` parameter
-   |       |
-   |       this trait cannot be made into an object...
-help: consider turning `g` into a method by giving it a `&self` argument
-   |
-LL | trait A { fn g(&self, b: B) -> B; }
-   |                ++++++
-help: alternatively, consider constraining `g` so it does not apply to trait objects
-   |
-LL | trait A { fn g(b: B) -> B where Self: Sized; }
-   |                           +++++++++++++++++
-
-error[E0038]: the trait `B` cannot be made into an object
-  --> $DIR/avoid-ice-on-warning-3.rs:12:19
-   |
-LL | trait A { fn g(b: B) -> B; }
-   |                   ^ `B` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/avoid-ice-on-warning-3.rs:4:14
-   |
-LL | trait B { fn f(a: A) -> A; }
-   |       -      ^ ...because associated function `f` has no `self` parameter
-   |       |
-   |       this trait cannot be made into an object...
-help: consider turning `f` into a method by giving it a `&self` argument
-   |
-LL | trait B { fn f(&self, a: A) -> A; }
-   |                ++++++
-help: alternatively, consider constraining `f` so it does not apply to trait objects
-   |
-LL | trait B { fn f(a: A) -> A where Self: Sized; }
-   |                           +++++++++++++++++
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/avoid-ice-on-warning.new.stderr b/tests/ui/object-safety/avoid-ice-on-warning.new.stderr
deleted file mode 100644
index 4ff45d7a848..00000000000
--- a/tests/ui/object-safety/avoid-ice-on-warning.new.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: return types are denoted using `->`
-  --> $DIR/avoid-ice-on-warning.rs:4:23
-   |
-LL | fn call_this<F>(f: F) : Fn(&str) + call_that {}
-   |                       ^
-   |
-help: use `->` instead
-   |
-LL | fn call_this<F>(f: F) -> Fn(&str) + call_that {}
-   |                       ~~
-
-error[E0405]: cannot find trait `call_that` in this scope
-  --> $DIR/avoid-ice-on-warning.rs:4:36
-   |
-LL | fn call_this<F>(f: F) : Fn(&str) + call_that {}
-   |                                    ^^^^^^^^^ not found in this scope
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0405`.
diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.stderr b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.stderr
deleted file mode 100644
index bb2bf6ddcda..00000000000
--- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0038]: the trait `Ord` cannot be made into an object
-  --> $DIR/bare-trait-dont-suggest-dyn.rs:6:33
-   |
-LL | fn ord_prefer_dot(s: String) -> Ord {
-   |                                 ^^^ `Ord` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   |
-   = note: the trait cannot be made into an object because it uses `Self` as a type parameter
-  ::: $SRC_DIR/core/src/cmp.rs:LL:COL
-   |
-   = note: the trait cannot be made into an object because it uses `Self` as a type parameter
-help: consider using an opaque type instead
-   |
-LL | fn ord_prefer_dot(s: String) -> impl Ord {
-   |                                 ++++
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/parser/fn-header-semantic-fail.rs b/tests/ui/parser/fn-header-semantic-fail.rs
index 972e52d75da..202f362c81c 100644
--- a/tests/ui/parser/fn-header-semantic-fail.rs
+++ b/tests/ui/parser/fn-header-semantic-fail.rs
@@ -41,15 +41,15 @@ fn main() {
     }
 
     extern "C" {
-        async fn fe1(); //~ ERROR functions in `extern` blocks cannot have qualifiers
-        unsafe fn fe2(); //~ ERROR items in unadorned `extern` blocks cannot have safety qualifiers
-        const fn fe3(); //~ ERROR functions in `extern` blocks cannot have qualifiers
-        extern "C" fn fe4(); //~ ERROR functions in `extern` blocks cannot have qualifiers
+        async fn fe1(); //~ ERROR functions in `extern` blocks cannot
+        unsafe fn fe2(); //~ ERROR items in `extern` blocks without an `unsafe` qualifier cannot
+        const fn fe3(); //~ ERROR functions in `extern` blocks cannot
+        extern "C" fn fe4(); //~ ERROR functions in `extern` blocks cannot
         const async unsafe extern "C" fn fe5();
         //~^ ERROR functions in `extern` blocks
         //~| ERROR functions in `extern` blocks
         //~| ERROR functions in `extern` blocks
         //~| ERROR functions cannot be both `const` and `async`
-        //~| ERROR items in unadorned `extern` blocks cannot have safety qualifiers
+        //~| ERROR items in `extern` blocks without an `unsafe` qualifier cannot have
     }
 }
diff --git a/tests/ui/parser/fn-header-semantic-fail.stderr b/tests/ui/parser/fn-header-semantic-fail.stderr
index dda42f24b32..17e880c3a79 100644
--- a/tests/ui/parser/fn-header-semantic-fail.stderr
+++ b/tests/ui/parser/fn-header-semantic-fail.stderr
@@ -70,77 +70,77 @@ LL |         const async unsafe extern "C" fn fi5() {}
    |         |     `async` because of this
    |         `const` because of this
 
-error: functions in `extern` blocks cannot have qualifiers
+error: functions in `extern` blocks cannot have `async` qualifier
   --> $DIR/fn-header-semantic-fail.rs:44:9
    |
 LL |     extern "C" {
    |     ---------- in this `extern` block
 LL |         async fn fe1();
-   |         ^^^^^ help: remove this qualifier
+   |         ^^^^^ help: remove the `async` qualifier
 
-error: items in unadorned `extern` blocks cannot have safety qualifiers
+error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
   --> $DIR/fn-header-semantic-fail.rs:45:9
    |
 LL |         unsafe fn fe2();
    |         ^^^^^^^^^^^^^^^^
    |
-help: add unsafe to this `extern` block
+help: add `unsafe` to this `extern` block
    |
 LL |     unsafe extern "C" {
    |     ++++++
 
-error: functions in `extern` blocks cannot have qualifiers
+error: functions in `extern` blocks cannot have `const` qualifier
   --> $DIR/fn-header-semantic-fail.rs:46:9
    |
 LL |     extern "C" {
    |     ---------- in this `extern` block
 ...
 LL |         const fn fe3();
-   |         ^^^^^ help: remove this qualifier
+   |         ^^^^^ help: remove the `const` qualifier
 
-error: functions in `extern` blocks cannot have qualifiers
+error: functions in `extern` blocks cannot have `extern` qualifier
   --> $DIR/fn-header-semantic-fail.rs:47:9
    |
 LL |     extern "C" {
    |     ---------- in this `extern` block
 ...
 LL |         extern "C" fn fe4();
-   |         ^^^^^^^^^^ help: remove this qualifier
+   |         ^^^^^^^^^^ help: remove the `extern` qualifier
 
-error: functions in `extern` blocks cannot have qualifiers
+error: functions in `extern` blocks cannot have `async` qualifier
   --> $DIR/fn-header-semantic-fail.rs:48:15
    |
 LL |     extern "C" {
    |     ---------- in this `extern` block
 ...
 LL |         const async unsafe extern "C" fn fe5();
-   |               ^^^^^ help: remove this qualifier
+   |               ^^^^^ help: remove the `async` qualifier
 
-error: functions in `extern` blocks cannot have qualifiers
+error: functions in `extern` blocks cannot have `const` qualifier
   --> $DIR/fn-header-semantic-fail.rs:48:9
    |
 LL |     extern "C" {
    |     ---------- in this `extern` block
 ...
 LL |         const async unsafe extern "C" fn fe5();
-   |         ^^^^^ help: remove this qualifier
+   |         ^^^^^ help: remove the `const` qualifier
 
-error: functions in `extern` blocks cannot have qualifiers
+error: functions in `extern` blocks cannot have `extern` qualifier
   --> $DIR/fn-header-semantic-fail.rs:48:28
    |
 LL |     extern "C" {
    |     ---------- in this `extern` block
 ...
 LL |         const async unsafe extern "C" fn fe5();
-   |                            ^^^^^^^^^^ help: remove this qualifier
+   |                            ^^^^^^^^^^ help: remove the `extern` qualifier
 
-error: items in unadorned `extern` blocks cannot have safety qualifiers
+error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
   --> $DIR/fn-header-semantic-fail.rs:48:9
    |
 LL |         const async unsafe extern "C" fn fe5();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: add unsafe to this `extern` block
+help: add `unsafe` to this `extern` block
    |
 LL |     unsafe extern "C" {
    |     ++++++
diff --git a/tests/ui/parser/issues/invalid-path-sep-in-fn-definition-issue-130791.fixed b/tests/ui/parser/issues/invalid-path-sep-in-fn-definition-issue-130791.fixed
new file mode 100644
index 00000000000..2c6fddccb73
--- /dev/null
+++ b/tests/ui/parser/issues/invalid-path-sep-in-fn-definition-issue-130791.fixed
@@ -0,0 +1,7 @@
+//@ run-rustfix
+
+#[allow(dead_code)]
+fn invalid_path_separator<T>() {}
+//~^ ERROR invalid path separator in function definition
+
+fn main() {}
diff --git a/tests/ui/parser/issues/invalid-path-sep-in-fn-definition-issue-130791.rs b/tests/ui/parser/issues/invalid-path-sep-in-fn-definition-issue-130791.rs
new file mode 100644
index 00000000000..5f690615043
--- /dev/null
+++ b/tests/ui/parser/issues/invalid-path-sep-in-fn-definition-issue-130791.rs
@@ -0,0 +1,7 @@
+//@ run-rustfix
+
+#[allow(dead_code)]
+fn invalid_path_separator::<T>() {}
+//~^ ERROR invalid path separator in function definition
+
+fn main() {}
diff --git a/tests/ui/parser/issues/invalid-path-sep-in-fn-definition-issue-130791.stderr b/tests/ui/parser/issues/invalid-path-sep-in-fn-definition-issue-130791.stderr
new file mode 100644
index 00000000000..3ad05050da0
--- /dev/null
+++ b/tests/ui/parser/issues/invalid-path-sep-in-fn-definition-issue-130791.stderr
@@ -0,0 +1,14 @@
+error: invalid path separator in function definition
+  --> $DIR/invalid-path-sep-in-fn-definition-issue-130791.rs:4:26
+   |
+LL | fn invalid_path_separator::<T>() {}
+   |                          ^^
+   |
+help: remove invalid path separator
+   |
+LL - fn invalid_path_separator::<T>() {}
+LL + fn invalid_path_separator<T>() {}
+   |
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/parser/no-const-fn-in-extern-block.rs b/tests/ui/parser/no-const-fn-in-extern-block.rs
index 3ad9ba006d3..0f1e44ced10 100644
--- a/tests/ui/parser/no-const-fn-in-extern-block.rs
+++ b/tests/ui/parser/no-const-fn-in-extern-block.rs
@@ -1,9 +1,9 @@
 extern "C" {
     const fn foo();
-    //~^ ERROR functions in `extern` blocks cannot have qualifiers
+    //~^ ERROR functions in `extern` blocks cannot
     const unsafe fn bar();
-    //~^ ERROR functions in `extern` blocks cannot have qualifiers
-    //~| ERROR items in unadorned `extern` blocks cannot have safety qualifiers
+    //~^ ERROR functions in `extern` blocks cannot
+    //~| ERROR items in `extern` blocks without an `unsafe` qualifier cannot
 }
 
 fn main() {}
diff --git a/tests/ui/parser/no-const-fn-in-extern-block.stderr b/tests/ui/parser/no-const-fn-in-extern-block.stderr
index 8c23824a708..46f845e85c2 100644
--- a/tests/ui/parser/no-const-fn-in-extern-block.stderr
+++ b/tests/ui/parser/no-const-fn-in-extern-block.stderr
@@ -1,27 +1,27 @@
-error: functions in `extern` blocks cannot have qualifiers
+error: functions in `extern` blocks cannot have `const` qualifier
   --> $DIR/no-const-fn-in-extern-block.rs:2:5
    |
 LL | extern "C" {
    | ---------- in this `extern` block
 LL |     const fn foo();
-   |     ^^^^^ help: remove this qualifier
+   |     ^^^^^ help: remove the `const` qualifier
 
-error: functions in `extern` blocks cannot have qualifiers
+error: functions in `extern` blocks cannot have `const` qualifier
   --> $DIR/no-const-fn-in-extern-block.rs:4:5
    |
 LL | extern "C" {
    | ---------- in this `extern` block
 ...
 LL |     const unsafe fn bar();
-   |     ^^^^^ help: remove this qualifier
+   |     ^^^^^ help: remove the `const` qualifier
 
-error: items in unadorned `extern` blocks cannot have safety qualifiers
+error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
   --> $DIR/no-const-fn-in-extern-block.rs:4:5
    |
 LL |     const unsafe fn bar();
    |     ^^^^^^^^^^^^^^^^^^^^^^
    |
-help: add unsafe to this `extern` block
+help: add `unsafe` to this `extern` block
    |
 LL | unsafe extern "C" {
    | ++++++
diff --git a/tests/ui/pattern/match_ergonomics_2024.fixed b/tests/ui/pattern/match_ergonomics_2024.fixed
deleted file mode 100644
index 1ec2b5a214b..00000000000
--- a/tests/ui/pattern/match_ergonomics_2024.fixed
+++ /dev/null
@@ -1,57 +0,0 @@
-//@ edition: 2021
-//@ run-rustfix
-//@ rustfix-only-machine-applicable
-//@ aux-build:match_ergonomics_2024_macros.rs
-#![feature(mut_ref, ref_pat_eat_one_layer_2024)]
-#![allow(incomplete_features, unused)]
-#![deny(rust_2024_incompatible_pat)]
-
-extern crate match_ergonomics_2024_macros;
-
-struct Foo(u8);
-
-fn main() {
-    let &Foo(mut a) = &Foo(0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-    a = 42;
-
-    let &mut Foo(mut a) = &mut Foo(0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-    a = 42;
-
-    if let &&&&&Some(&_) = &&&&&Some(&0u8) {}
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-
-    if let &&&&&Some(&mut _) = &&&&&Some(&mut 0u8) {}
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-
-    if let &&&&&mut Some(&_) = &&&&&mut Some(&0u8) {}
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-
-    if let &mut Some(&mut Some(&mut Some(_))) = &mut Some(&mut Some(&mut Some(0u8))) {}
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-
-    if let &mut Some(&mut Some(&mut Some(ref mut _a))) = &mut Some(&mut Some(&mut Some(0u8))) {}
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-
-    struct Struct {
-        a: u32,
-        b: u32,
-        c: u32,
-    }
-    let s = Struct { a: 0, b: 0, c: 0 };
-    let &Struct { ref a, mut b, ref c } = &s;
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-
-    #[warn(rust_2024_incompatible_pat)]
-    match &(Some(0), Some(0)) {
-        // The two patterns are the same syntactically, but because they're defined in different
-        // editions they don't mean the same thing.
-        (Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(_y)) => {
-            //~^ WARN: the semantics of this pattern will change in edition 2024
-            _x = 4;
-            _y = &7;
-        }
-        _ => {}
-    }
-}
diff --git a/tests/ui/pattern/match_ergonomics_2024.rs b/tests/ui/pattern/match_ergonomics_2024.rs
deleted file mode 100644
index c9f992c12d4..00000000000
--- a/tests/ui/pattern/match_ergonomics_2024.rs
+++ /dev/null
@@ -1,57 +0,0 @@
-//@ edition: 2021
-//@ run-rustfix
-//@ rustfix-only-machine-applicable
-//@ aux-build:match_ergonomics_2024_macros.rs
-#![feature(mut_ref, ref_pat_eat_one_layer_2024)]
-#![allow(incomplete_features, unused)]
-#![deny(rust_2024_incompatible_pat)]
-
-extern crate match_ergonomics_2024_macros;
-
-struct Foo(u8);
-
-fn main() {
-    let Foo(mut a) = &Foo(0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-    a = 42;
-
-    let Foo(mut a) = &mut Foo(0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-    a = 42;
-
-    if let Some(&_) = &&&&&Some(&0u8) {}
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-
-    if let Some(&mut _) = &&&&&Some(&mut 0u8) {}
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-
-    if let Some(&_) = &&&&&mut Some(&0u8) {}
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-
-    if let Some(&mut Some(Some(_))) = &mut Some(&mut Some(&mut Some(0u8))) {}
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-
-    if let Some(&mut Some(Some(_a))) = &mut Some(&mut Some(&mut Some(0u8))) {}
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-
-    struct Struct {
-        a: u32,
-        b: u32,
-        c: u32,
-    }
-    let s = Struct { a: 0, b: 0, c: 0 };
-    let Struct { a, mut b, c } = &s;
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
-
-    #[warn(rust_2024_incompatible_pat)]
-    match &(Some(0), Some(0)) {
-        // The two patterns are the same syntactically, but because they're defined in different
-        // editions they don't mean the same thing.
-        (Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(_y)) => {
-            //~^ WARN: the semantics of this pattern will change in edition 2024
-            _x = 4;
-            _y = &7;
-        }
-        _ => {}
-    }
-}
diff --git a/tests/ui/pattern/match_ergonomics_2024.stderr b/tests/ui/pattern/match_ergonomics_2024.stderr
deleted file mode 100644
index 11844434ad2..00000000000
--- a/tests/ui/pattern/match_ergonomics_2024.stderr
+++ /dev/null
@@ -1,97 +0,0 @@
-error: the semantics of this pattern will change in edition 2024
-  --> $DIR/match_ergonomics_2024.rs:14:9
-   |
-LL |     let Foo(mut a) = &Foo(0);
-   |         -^^^^^^^^^
-   |         |
-   |         help: desugar the match ergonomics: `&`
-   |
-note: the lint level is defined here
-  --> $DIR/match_ergonomics_2024.rs:7:9
-   |
-LL | #![deny(rust_2024_incompatible_pat)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: the semantics of this pattern will change in edition 2024
-  --> $DIR/match_ergonomics_2024.rs:18:9
-   |
-LL |     let Foo(mut a) = &mut Foo(0);
-   |         -^^^^^^^^^
-   |         |
-   |         help: desugar the match ergonomics: `&mut`
-
-error: the semantics of this pattern will change in edition 2024
-  --> $DIR/match_ergonomics_2024.rs:22:12
-   |
-LL |     if let Some(&_) = &&&&&Some(&0u8) {}
-   |            -^^^^^^^
-   |            |
-   |            help: desugar the match ergonomics: `&&&&&`
-
-error: the semantics of this pattern will change in edition 2024
-  --> $DIR/match_ergonomics_2024.rs:25:12
-   |
-LL |     if let Some(&mut _) = &&&&&Some(&mut 0u8) {}
-   |            -^^^^^^^^^^^
-   |            |
-   |            help: desugar the match ergonomics: `&&&&&`
-
-error: the semantics of this pattern will change in edition 2024
-  --> $DIR/match_ergonomics_2024.rs:28:12
-   |
-LL |     if let Some(&_) = &&&&&mut Some(&0u8) {}
-   |            -^^^^^^^
-   |            |
-   |            help: desugar the match ergonomics: `&&&&&mut`
-
-error: the semantics of this pattern will change in edition 2024
-  --> $DIR/match_ergonomics_2024.rs:31:12
-   |
-LL |     if let Some(&mut Some(Some(_))) = &mut Some(&mut Some(&mut Some(0u8))) {}
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: desugar the match ergonomics
-   |
-LL |     if let &mut Some(&mut Some(&mut Some(_))) = &mut Some(&mut Some(&mut Some(0u8))) {}
-   |            ++++                ++++
-
-error: the semantics of this pattern will change in edition 2024
-  --> $DIR/match_ergonomics_2024.rs:34:12
-   |
-LL |     if let Some(&mut Some(Some(_a))) = &mut Some(&mut Some(&mut Some(0u8))) {}
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: desugar the match ergonomics
-   |
-LL |     if let &mut Some(&mut Some(&mut Some(ref mut _a))) = &mut Some(&mut Some(&mut Some(0u8))) {}
-   |            ++++                ++++      +++++++
-
-error: the semantics of this pattern will change in edition 2024
-  --> $DIR/match_ergonomics_2024.rs:43:9
-   |
-LL |     let Struct { a, mut b, c } = &s;
-   |         ^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: desugar the match ergonomics
-   |
-LL |     let &Struct { ref a, mut b, ref c } = &s;
-   |         +         +++           +++
-
-warning: the semantics of this pattern will change in edition 2024
-  --> $DIR/match_ergonomics_2024.rs:50:9
-   |
-LL |         (Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(_y)) => {
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: the lint level is defined here
-  --> $DIR/match_ergonomics_2024.rs:46:12
-   |
-LL |     #[warn(rust_2024_incompatible_pat)]
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
-help: desugar the match ergonomics
-   |
-LL |         &(Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(ref _y)) => {
-   |         +                                                                +++
-
-error: aborting due to 8 previous errors; 1 warning emitted
-
diff --git a/tests/ui/pattern/auxiliary/match_ergonomics_2024_macros.rs b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/auxiliary/migration_lint_macros.rs
index 0b70e4404ab..0b70e4404ab 100644
--- a/tests/ui/pattern/auxiliary/match_ergonomics_2024_macros.rs
+++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/auxiliary/migration_lint_macros.rs
diff --git a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed
new file mode 100644
index 00000000000..086671e69cb
--- /dev/null
+++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed
@@ -0,0 +1,144 @@
+//@ edition: 2021
+//@ run-rustfix
+//@ rustfix-only-machine-applicable
+//@ aux-build:migration_lint_macros.rs
+#![feature(mut_ref)]
+#![allow(incomplete_features, unused)]
+#![deny(rust_2024_incompatible_pat)]
+
+extern crate migration_lint_macros;
+
+struct Foo<T>(T);
+
+// Tests type equality in a way that avoids coercing `&&T` to `&T`.
+trait Eq<T> {}
+impl<T> Eq<T> for T {}
+fn assert_type_eq<T, U: Eq<T>>(_: T, _: U) {}
+
+fn main() {
+    let Foo(x) = &Foo(0);
+    assert_type_eq(x, &0u8);
+
+    let Foo(x) = &mut Foo(0);
+    assert_type_eq(x, &mut 0u8);
+
+    let &Foo(mut x) = &Foo(0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, 0u8);
+
+    let &mut Foo(mut x) = &mut Foo(0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, 0u8);
+
+    let &Foo(ref x) = &Foo(0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, &0u8);
+
+    let &mut Foo(ref x) = &mut Foo(0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, &0u8);
+
+    let &Foo(x) = &Foo(0);
+    assert_type_eq(x, 0u8);
+
+    let &mut Foo(x) = &mut Foo(0);
+    assert_type_eq(x, 0u8);
+
+    let &Foo(x) = &Foo(&0);
+    assert_type_eq(x, &0u8);
+
+    let &mut Foo(x) = &mut Foo(&0);
+    assert_type_eq(x, &0u8);
+
+    let &Foo(&x) = &Foo(&0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, 0u8);
+
+    let &Foo(&mut x) = &Foo(&mut 0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, 0u8);
+
+    let &mut Foo(&x) = &mut Foo(&0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, 0u8);
+
+    let &mut Foo(&mut x) = &mut Foo(&mut 0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, 0u8);
+
+    if let Some(x) = &&&&&Some(&0u8) {
+        assert_type_eq(x, &&0u8);
+    }
+
+    if let &&&&&Some(&x) = &&&&&Some(&0u8) {
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
+        //~| WARN: this changes meaning in Rust 2024
+        assert_type_eq(x, 0u8);
+    }
+
+    if let &&&&&Some(&mut x) = &&&&&Some(&mut 0u8) {
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
+        //~| WARN: this changes meaning in Rust 2024
+        assert_type_eq(x, 0u8);
+    }
+
+    if let &&&&&mut Some(&x) = &&&&&mut Some(&0u8) {
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
+        //~| WARN: this changes meaning in Rust 2024
+        assert_type_eq(x, 0u8);
+    }
+
+    if let &mut Some(&mut Some(&mut Some(ref mut x))) = &mut Some(&mut Some(&mut Some(0u8))) {
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
+        //~| WARN: this changes meaning in Rust 2024
+        assert_type_eq(x, &mut 0u8);
+    }
+
+    struct Struct<A, B, C> {
+        a: A,
+        b: B,
+        c: C,
+    }
+
+    let &Struct { ref a, mut b, ref c } = &Struct { a: 0, b: 0, c: 0 };
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(a, &0u32);
+    assert_type_eq(b, 0u32);
+
+    let &Struct { a: &a, ref b, ref c } = &Struct { a: &0, b: &0, c: &0 };
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(a, 0u32);
+    assert_type_eq(b, &&0u32);
+    assert_type_eq(c, &&0u32);
+
+    if let &Struct { a: &Some(a), b: &Some(&b), c: &Some(ref c) } =
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
+        //~| WARN: this changes meaning in Rust 2024
+        &(Struct { a: &Some(&0), b: &Some(&0), c: &Some(&0) })
+    {
+        assert_type_eq(a, &0u32);
+        assert_type_eq(b, 0u32);
+        assert_type_eq(c, &&0u32);
+    }
+
+    match &(Some(0), Some(0)) {
+        // The two patterns are the same syntactically, but because they're defined in different
+        // editions they don't mean the same thing.
+        &(Some(mut x), migration_lint_macros::mixed_edition_pat!(y)) => {
+            //~^ ERROR: patterns are not allowed to reset the default binding mode
+            assert_type_eq(x, 0u32);
+            assert_type_eq(y, 0u32);
+        }
+        _ => {}
+    }
+}
diff --git a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs
new file mode 100644
index 00000000000..acceafdb7ec
--- /dev/null
+++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs
@@ -0,0 +1,144 @@
+//@ edition: 2021
+//@ run-rustfix
+//@ rustfix-only-machine-applicable
+//@ aux-build:migration_lint_macros.rs
+#![feature(mut_ref)]
+#![allow(incomplete_features, unused)]
+#![deny(rust_2024_incompatible_pat)]
+
+extern crate migration_lint_macros;
+
+struct Foo<T>(T);
+
+// Tests type equality in a way that avoids coercing `&&T` to `&T`.
+trait Eq<T> {}
+impl<T> Eq<T> for T {}
+fn assert_type_eq<T, U: Eq<T>>(_: T, _: U) {}
+
+fn main() {
+    let Foo(x) = &Foo(0);
+    assert_type_eq(x, &0u8);
+
+    let Foo(x) = &mut Foo(0);
+    assert_type_eq(x, &mut 0u8);
+
+    let Foo(mut x) = &Foo(0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, 0u8);
+
+    let Foo(mut x) = &mut Foo(0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, 0u8);
+
+    let Foo(ref x) = &Foo(0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, &0u8);
+
+    let Foo(ref x) = &mut Foo(0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, &0u8);
+
+    let &Foo(x) = &Foo(0);
+    assert_type_eq(x, 0u8);
+
+    let &mut Foo(x) = &mut Foo(0);
+    assert_type_eq(x, 0u8);
+
+    let &Foo(x) = &Foo(&0);
+    assert_type_eq(x, &0u8);
+
+    let &mut Foo(x) = &mut Foo(&0);
+    assert_type_eq(x, &0u8);
+
+    let Foo(&x) = &Foo(&0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, 0u8);
+
+    let Foo(&mut x) = &Foo(&mut 0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, 0u8);
+
+    let Foo(&x) = &mut Foo(&0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, 0u8);
+
+    let Foo(&mut x) = &mut Foo(&mut 0);
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(x, 0u8);
+
+    if let Some(x) = &&&&&Some(&0u8) {
+        assert_type_eq(x, &&0u8);
+    }
+
+    if let Some(&x) = &&&&&Some(&0u8) {
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
+        //~| WARN: this changes meaning in Rust 2024
+        assert_type_eq(x, 0u8);
+    }
+
+    if let Some(&mut x) = &&&&&Some(&mut 0u8) {
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
+        //~| WARN: this changes meaning in Rust 2024
+        assert_type_eq(x, 0u8);
+    }
+
+    if let Some(&x) = &&&&&mut Some(&0u8) {
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
+        //~| WARN: this changes meaning in Rust 2024
+        assert_type_eq(x, 0u8);
+    }
+
+    if let Some(&mut Some(Some(x))) = &mut Some(&mut Some(&mut Some(0u8))) {
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
+        //~| WARN: this changes meaning in Rust 2024
+        assert_type_eq(x, &mut 0u8);
+    }
+
+    struct Struct<A, B, C> {
+        a: A,
+        b: B,
+        c: C,
+    }
+
+    let Struct { a, mut b, c } = &Struct { a: 0, b: 0, c: 0 };
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(a, &0u32);
+    assert_type_eq(b, 0u32);
+
+    let Struct { a: &a, b, ref c } = &Struct { a: &0, b: &0, c: &0 };
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
+    //~| WARN: this changes meaning in Rust 2024
+    assert_type_eq(a, 0u32);
+    assert_type_eq(b, &&0u32);
+    assert_type_eq(c, &&0u32);
+
+    if let Struct { a: &Some(a), b: Some(&b), c: Some(c) } =
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
+        //~| WARN: this changes meaning in Rust 2024
+        &(Struct { a: &Some(&0), b: &Some(&0), c: &Some(&0) })
+    {
+        assert_type_eq(a, &0u32);
+        assert_type_eq(b, 0u32);
+        assert_type_eq(c, &&0u32);
+    }
+
+    match &(Some(0), Some(0)) {
+        // The two patterns are the same syntactically, but because they're defined in different
+        // editions they don't mean the same thing.
+        (Some(mut x), migration_lint_macros::mixed_edition_pat!(y)) => {
+            //~^ ERROR: patterns are not allowed to reset the default binding mode
+            assert_type_eq(x, 0u32);
+            assert_type_eq(y, 0u32);
+        }
+        _ => {}
+    }
+}
diff --git a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr
new file mode 100644
index 00000000000..1c9a469e6ee
--- /dev/null
+++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr
@@ -0,0 +1,188 @@
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:25:9
+   |
+LL |     let Foo(mut x) = &Foo(0);
+   |         -^^^^^^^^^
+   |         |
+   |         help: desugar the match ergonomics: `&`
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+note: the lint level is defined here
+  --> $DIR/migration_lint.rs:7:9
+   |
+LL | #![deny(rust_2024_incompatible_pat)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:30:9
+   |
+LL |     let Foo(mut x) = &mut Foo(0);
+   |         -^^^^^^^^^
+   |         |
+   |         help: desugar the match ergonomics: `&mut`
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:35:9
+   |
+LL |     let Foo(ref x) = &Foo(0);
+   |         -^^^^^^^^^
+   |         |
+   |         help: desugar the match ergonomics: `&`
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:40:9
+   |
+LL |     let Foo(ref x) = &mut Foo(0);
+   |         -^^^^^^^^^
+   |         |
+   |         help: desugar the match ergonomics: `&mut`
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:57:9
+   |
+LL |     let Foo(&x) = &Foo(&0);
+   |         -^^^^^^
+   |         |
+   |         help: desugar the match ergonomics: `&`
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:62:9
+   |
+LL |     let Foo(&mut x) = &Foo(&mut 0);
+   |         -^^^^^^^^^^
+   |         |
+   |         help: desugar the match ergonomics: `&`
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:67:9
+   |
+LL |     let Foo(&x) = &mut Foo(&0);
+   |         -^^^^^^
+   |         |
+   |         help: desugar the match ergonomics: `&mut`
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:72:9
+   |
+LL |     let Foo(&mut x) = &mut Foo(&mut 0);
+   |         -^^^^^^^^^^
+   |         |
+   |         help: desugar the match ergonomics: `&mut`
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:81:12
+   |
+LL |     if let Some(&x) = &&&&&Some(&0u8) {
+   |            -^^^^^^^
+   |            |
+   |            help: desugar the match ergonomics: `&&&&&`
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:87:12
+   |
+LL |     if let Some(&mut x) = &&&&&Some(&mut 0u8) {
+   |            -^^^^^^^^^^^
+   |            |
+   |            help: desugar the match ergonomics: `&&&&&`
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:93:12
+   |
+LL |     if let Some(&x) = &&&&&mut Some(&0u8) {
+   |            -^^^^^^^
+   |            |
+   |            help: desugar the match ergonomics: `&&&&&mut`
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:99:12
+   |
+LL |     if let Some(&mut Some(Some(x))) = &mut Some(&mut Some(&mut Some(0u8))) {
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+help: desugar the match ergonomics
+   |
+LL |     if let &mut Some(&mut Some(&mut Some(ref mut x))) = &mut Some(&mut Some(&mut Some(0u8))) {
+   |            ++++                ++++      +++++++
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:111:9
+   |
+LL |     let Struct { a, mut b, c } = &Struct { a: 0, b: 0, c: 0 };
+   |         ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+help: desugar the match ergonomics
+   |
+LL |     let &Struct { ref a, mut b, ref c } = &Struct { a: 0, b: 0, c: 0 };
+   |         +         +++           +++
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:117:9
+   |
+LL |     let Struct { a: &a, b, ref c } = &Struct { a: &0, b: &0, c: &0 };
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+help: desugar the match ergonomics
+   |
+LL |     let &Struct { a: &a, ref b, ref c } = &Struct { a: &0, b: &0, c: &0 };
+   |         +                +++
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:124:12
+   |
+LL |     if let Struct { a: &Some(a), b: Some(&b), c: Some(c) } =
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this changes meaning in Rust 2024
+   = note: for more information, see 123076
+help: desugar the match ergonomics
+   |
+LL |     if let &Struct { a: &Some(a), b: &Some(&b), c: &Some(ref c) } =
+   |            +                         +             +     +++
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/migration_lint.rs:137:9
+   |
+LL |         (Some(mut x), migration_lint_macros::mixed_edition_pat!(y)) => {
+   |         -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |         |
+   |         help: desugar the match ergonomics: `&`
+
+error: aborting due to 16 previous errors
+
diff --git a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.rs b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.rs
new file mode 100644
index 00000000000..a822c90ab6e
--- /dev/null
+++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.rs
@@ -0,0 +1,46 @@
+//@ check-fail
+//@ edition: 2024
+//@ compile-flags: -Zunstable-options
+#![deny(rust_2024_incompatible_pat)]
+
+fn main() {}
+
+#[derive(Copy, Clone)]
+struct T;
+
+struct Foo {
+    f: &'static (u8,),
+}
+
+macro_rules! test_pat_on_type {
+    ($($tt:tt)*) => {
+        const _: () = {
+            // Define a new function to ensure all cases are tested independently.
+            fn foo($($tt)*) {}
+        };
+    };
+}
+
+test_pat_on_type![(&x,): &(T,)]; //~ ERROR mismatched types
+test_pat_on_type![(&x,): &(&T,)]; //~ ERROR patterns are not allowed to reset the default binding mode
+test_pat_on_type![(&x,): &(&mut T,)]; //~ ERROR mismatched types
+test_pat_on_type![(&mut x,): &(&T,)]; //~ ERROR mismatched types
+test_pat_on_type![(&mut x,): &(&mut T,)]; //~ ERROR patterns are not allowed to reset the default binding mode
+test_pat_on_type![(&x,): &&mut &(T,)]; //~ ERROR mismatched types
+test_pat_on_type![Foo { f: (&x,) }: Foo]; //~ ERROR mismatched types
+test_pat_on_type![Foo { f: (&x,) }: &mut Foo]; //~ ERROR mismatched types
+test_pat_on_type![Foo { f: &(x,) }: &Foo]; //~ ERROR patterns are not allowed to reset the default binding mode
+test_pat_on_type![(mut x,): &(T,)]; //~ ERROR patterns are not allowed to reset the default binding mode
+test_pat_on_type![(ref x,): &(T,)]; //~ ERROR patterns are not allowed to reset the default binding mode
+test_pat_on_type![(ref mut x,): &mut (T,)]; //~ ERROR patterns are not allowed to reset the default binding mode
+
+fn get<X>() -> X {
+    unimplemented!()
+}
+
+// Make sure this works even when the underlying type is inferred. This test passes on rust stable.
+fn infer<X: Copy>() -> X {
+    match &get() {
+        (&x,) => x, //~ ERROR patterns are not allowed to reset the default binding mode
+    }
+}
diff --git a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.stderr b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.stderr
new file mode 100644
index 00000000000..33e4f0021b7
--- /dev/null
+++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.stderr
@@ -0,0 +1,160 @@
+error[E0308]: mismatched types
+  --> $DIR/min_match_ergonomics_fail.rs:24:20
+   |
+LL | test_pat_on_type![(&x,): &(T,)];
+   |                    ^^    ----- expected due to this
+   |                    |
+   |                    expected `T`, found `&_`
+   |
+   = note: expected struct `T`
+           found reference `&_`
+help: consider removing `&` from the pattern
+   |
+LL - test_pat_on_type![(&x,): &(T,)];
+LL + test_pat_on_type![(x,): &(T,)];
+   |
+
+error[E0308]: mismatched types
+  --> $DIR/min_match_ergonomics_fail.rs:26:20
+   |
+LL | test_pat_on_type![(&x,): &(&mut T,)];
+   |                    ^^    ---------- expected due to this
+   |                    |
+   |                    types differ in mutability
+   |
+   = note: expected mutable reference `&mut T`
+                      found reference `&_`
+help: consider removing `&` from the pattern
+   |
+LL - test_pat_on_type![(&x,): &(&mut T,)];
+LL + test_pat_on_type![(x,): &(&mut T,)];
+   |
+
+error[E0308]: mismatched types
+  --> $DIR/min_match_ergonomics_fail.rs:27:20
+   |
+LL | test_pat_on_type![(&mut x,): &(&T,)];
+   |                    ^^^^^^    ------ expected due to this
+   |                    |
+   |                    types differ in mutability
+   |
+   = note:      expected reference `&T`
+           found mutable reference `&mut _`
+note: to declare a mutable binding use: `mut x`
+  --> $DIR/min_match_ergonomics_fail.rs:27:20
+   |
+LL | test_pat_on_type![(&mut x,): &(&T,)];
+   |                    ^^^^^^
+help: consider removing `&mut` from the pattern
+   |
+LL - test_pat_on_type![(&mut x,): &(&T,)];
+LL + test_pat_on_type![(x,): &(&T,)];
+   |
+
+error[E0308]: mismatched types
+  --> $DIR/min_match_ergonomics_fail.rs:29:20
+   |
+LL | test_pat_on_type![(&x,): &&mut &(T,)];
+   |                    ^^    ----------- expected due to this
+   |                    |
+   |                    expected `T`, found `&_`
+   |
+   = note: expected struct `T`
+           found reference `&_`
+help: consider removing `&` from the pattern
+   |
+LL - test_pat_on_type![(&x,): &&mut &(T,)];
+LL + test_pat_on_type![(x,): &&mut &(T,)];
+   |
+
+error[E0308]: mismatched types
+  --> $DIR/min_match_ergonomics_fail.rs:30:29
+   |
+LL | test_pat_on_type![Foo { f: (&x,) }: Foo];
+   |                             ^^      --- expected due to this
+   |                             |
+   |                             expected `u8`, found `&_`
+   |
+   = note:   expected type `u8`
+           found reference `&_`
+help: consider removing `&` from the pattern
+   |
+LL - test_pat_on_type![Foo { f: (&x,) }: Foo];
+LL + test_pat_on_type![Foo { f: (x,) }: Foo];
+   |
+
+error[E0308]: mismatched types
+  --> $DIR/min_match_ergonomics_fail.rs:31:29
+   |
+LL | test_pat_on_type![Foo { f: (&x,) }: &mut Foo];
+   |                             ^^      -------- expected due to this
+   |                             |
+   |                             expected `u8`, found `&_`
+   |
+   = note:   expected type `u8`
+           found reference `&_`
+help: consider removing `&` from the pattern
+   |
+LL - test_pat_on_type![Foo { f: (&x,) }: &mut Foo];
+LL + test_pat_on_type![Foo { f: (x,) }: &mut Foo];
+   |
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/min_match_ergonomics_fail.rs:25:19
+   |
+LL | test_pat_on_type![(&x,): &(&T,)];
+   |                   -^^^^
+   |                   |
+   |                   help: desugar the match ergonomics: `&`
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/min_match_ergonomics_fail.rs:28:19
+   |
+LL | test_pat_on_type![(&mut x,): &(&mut T,)];
+   |                   -^^^^^^^^
+   |                   |
+   |                   help: desugar the match ergonomics: `&`
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/min_match_ergonomics_fail.rs:32:19
+   |
+LL | test_pat_on_type![Foo { f: &(x,) }: &Foo];
+   |                   -^^^^^^^^^^^^^^^
+   |                   |
+   |                   help: desugar the match ergonomics: `&`
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/min_match_ergonomics_fail.rs:33:19
+   |
+LL | test_pat_on_type![(mut x,): &(T,)];
+   |                   -^^^^^^^
+   |                   |
+   |                   help: desugar the match ergonomics: `&`
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/min_match_ergonomics_fail.rs:34:19
+   |
+LL | test_pat_on_type![(ref x,): &(T,)];
+   |                   -^^^^^^^
+   |                   |
+   |                   help: desugar the match ergonomics: `&`
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/min_match_ergonomics_fail.rs:35:19
+   |
+LL | test_pat_on_type![(ref mut x,): &mut (T,)];
+   |                   -^^^^^^^^^^^
+   |                   |
+   |                   help: desugar the match ergonomics: `&mut`
+
+error: patterns are not allowed to reset the default binding mode in edition 2024
+  --> $DIR/min_match_ergonomics_fail.rs:44:9
+   |
+LL |         (&x,) => x,
+   |         -^^^^
+   |         |
+   |         help: desugar the match ergonomics: `&`
+
+error: aborting due to 13 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_success.rs b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_success.rs
new file mode 100644
index 00000000000..0fb448afca9
--- /dev/null
+++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_success.rs
@@ -0,0 +1,17 @@
+//@ check-pass
+#![allow(incomplete_features)]
+
+fn main() {}
+
+// Tests type equality in a way that avoids coercing `&&T` to `&T`.
+trait Eq<T> {}
+impl<T> Eq<T> for T {}
+fn assert_type_eq<T, U: Eq<T>>(_: T, _: U) {}
+
+#[derive(Copy, Clone)]
+struct T;
+
+fn test() {
+    let (x,) = &(&T,);
+    assert_type_eq(x, &&T);
+}
diff --git a/tests/ui/precondition-checks/alignment.rs b/tests/ui/precondition-checks/alignment.rs
new file mode 100644
index 00000000000..92400528fa0
--- /dev/null
+++ b/tests/ui/precondition-checks/alignment.rs
@@ -0,0 +1,11 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: Alignment::new_unchecked requires
+
+#![feature(ptr_alignment_type)]
+
+fn main() {
+    unsafe {
+        std::ptr::Alignment::new_unchecked(0);
+    }
+}
diff --git a/tests/ui/precondition-checks/ascii-char-digit_unchecked.rs b/tests/ui/precondition-checks/ascii-char-digit_unchecked.rs
new file mode 100644
index 00000000000..30c6f79fb08
--- /dev/null
+++ b/tests/ui/precondition-checks/ascii-char-digit_unchecked.rs
@@ -0,0 +1,11 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: `ascii::Char::digit_unchecked` input cannot exceed 9
+
+#![feature(ascii_char)]
+
+fn main() {
+    unsafe {
+        std::ascii::Char::digit_unchecked(b'a');
+    }
+}
diff --git a/tests/ui/precondition-checks/assert_unchecked.rs b/tests/ui/precondition-checks/assert_unchecked.rs
new file mode 100644
index 00000000000..22b2b414550
--- /dev/null
+++ b/tests/ui/precondition-checks/assert_unchecked.rs
@@ -0,0 +1,9 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: hint::assert_unchecked must never be called when the condition is false
+
+fn main() {
+    unsafe {
+        std::hint::assert_unchecked(false);
+    }
+}
diff --git a/tests/ui/precondition-checks/char-from_u32_unchecked.rs b/tests/ui/precondition-checks/char-from_u32_unchecked.rs
new file mode 100644
index 00000000000..d950f20c772
--- /dev/null
+++ b/tests/ui/precondition-checks/char-from_u32_unchecked.rs
@@ -0,0 +1,9 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: invalid value for `char`
+
+fn main() {
+    unsafe {
+        char::from_u32_unchecked(0xD801);
+    }
+}
diff --git a/tests/ui/precondition-checks/copy-nonoverlapping.rs b/tests/ui/precondition-checks/copy-nonoverlapping.rs
new file mode 100644
index 00000000000..81018e4bff3
--- /dev/null
+++ b/tests/ui/precondition-checks/copy-nonoverlapping.rs
@@ -0,0 +1,25 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: ptr::copy_nonoverlapping requires
+//@ revisions: null_src null_dst misaligned_src misaligned_dst overlapping
+
+use std::ptr;
+
+fn main() {
+    let src = [0u16; 3];
+    let mut dst = [0u16; 3];
+    let src = src.as_ptr();
+    let dst = dst.as_mut_ptr();
+    unsafe {
+        #[cfg(null_src)]
+        ptr::copy_nonoverlapping(ptr::null(), dst, 1);
+        #[cfg(null_dst)]
+        ptr::copy_nonoverlapping(src, ptr::null_mut(), 1);
+        #[cfg(misaligned_src)]
+        ptr::copy_nonoverlapping(src.byte_add(1), dst, 1);
+        #[cfg(misaligned_dst)]
+        ptr::copy_nonoverlapping(src, dst.byte_add(1), 1);
+        #[cfg(overlapping)]
+        ptr::copy_nonoverlapping(dst, dst.add(1), 2);
+    }
+}
diff --git a/tests/ui/precondition-checks/copy.rs b/tests/ui/precondition-checks/copy.rs
new file mode 100644
index 00000000000..694853f950a
--- /dev/null
+++ b/tests/ui/precondition-checks/copy.rs
@@ -0,0 +1,23 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: ptr::copy requires
+//@ revisions: null_src null_dst misaligned_src misaligned_dst
+
+use std::ptr;
+
+fn main() {
+    let src = [0u16; 3];
+    let mut dst = [0u16; 3];
+    let src = src.as_ptr();
+    let dst = dst.as_mut_ptr();
+    unsafe {
+        #[cfg(null_src)]
+        ptr::copy(ptr::null(), dst, 1);
+        #[cfg(null_dst)]
+        ptr::copy(src, ptr::null_mut(), 1);
+        #[cfg(misaligned_src)]
+        ptr::copy(src.byte_add(1), dst, 1);
+        #[cfg(misaligned_dst)]
+        ptr::copy(src, dst.byte_add(1), 1);
+    }
+}
diff --git a/tests/ui/precondition-checks/layout.rs b/tests/ui/precondition-checks/layout.rs
new file mode 100644
index 00000000000..4fd1bbc4a99
--- /dev/null
+++ b/tests/ui/precondition-checks/layout.rs
@@ -0,0 +1,15 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: Layout::from_size_align_unchecked requires
+//@ revisions: toolarge badalign
+//@[toolarge] compile-flags: --cfg toolarge
+//@[badalign] compile-flags: --cfg badalign
+
+fn main() {
+    unsafe {
+        #[cfg(toolarge)]
+        std::alloc::Layout::from_size_align_unchecked(isize::MAX as usize, 2);
+        #[cfg(badalign)]
+        std::alloc::Layout::from_size_align_unchecked(1, 3);
+    }
+}
diff --git a/tests/ui/precondition-checks/misaligned-slice.rs b/tests/ui/precondition-checks/misaligned-slice.rs
deleted file mode 100644
index 2963a0b5e63..00000000000
--- a/tests/ui/precondition-checks/misaligned-slice.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-//@ run-fail
-//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
-//@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts
-//@ ignore-debug
-
-fn main() {
-    unsafe {
-        let _s: &[u64] = std::slice::from_raw_parts(1usize as *const u64, 0);
-    }
-}
diff --git a/tests/ui/precondition-checks/nonnull.rs b/tests/ui/precondition-checks/nonnull.rs
new file mode 100644
index 00000000000..6b8edd4e582
--- /dev/null
+++ b/tests/ui/precondition-checks/nonnull.rs
@@ -0,0 +1,9 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: NonNull::new_unchecked requires
+
+fn main() {
+    unsafe {
+        std::ptr::NonNull::new_unchecked(std::ptr::null_mut::<u8>());
+    }
+}
diff --git a/tests/ui/precondition-checks/nonzero-from_mut_unchecked.rs b/tests/ui/precondition-checks/nonzero-from_mut_unchecked.rs
new file mode 100644
index 00000000000..46ce7dc356f
--- /dev/null
+++ b/tests/ui/precondition-checks/nonzero-from_mut_unchecked.rs
@@ -0,0 +1,12 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: NonZero::from_mut_unchecked requires
+
+#![feature(nonzero_from_mut)]
+
+fn main() {
+    unsafe {
+        let mut num = 0u8;
+        std::num::NonZeroU8::from_mut_unchecked(&mut num);
+    }
+}
diff --git a/tests/ui/precondition-checks/nonzero-new_unchecked.rs b/tests/ui/precondition-checks/nonzero-new_unchecked.rs
new file mode 100644
index 00000000000..7827a42844f
--- /dev/null
+++ b/tests/ui/precondition-checks/nonzero-new_unchecked.rs
@@ -0,0 +1,9 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: NonZero::new_unchecked requires
+
+fn main() {
+    unsafe {
+        std::num::NonZeroU8::new_unchecked(0);
+    }
+}
diff --git a/tests/ui/precondition-checks/null-slice.rs b/tests/ui/precondition-checks/null-slice.rs
deleted file mode 100644
index 280960358b7..00000000000
--- a/tests/ui/precondition-checks/null-slice.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-//@ run-fail
-//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
-//@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts
-//@ ignore-debug
-
-fn main() {
-    unsafe {
-        let _s: &[u8] = std::slice::from_raw_parts(std::ptr::null(), 0);
-    }
-}
diff --git a/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs b/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs
deleted file mode 100644
index 011e92183fa..00000000000
--- a/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-//@ run-fail
-//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
-//@ error-pattern: slice::get_unchecked requires
-//@ ignore-debug
-
-fn main() {
-    unsafe {
-        let sli: &[u8] = &[0];
-        sli.get_unchecked(1);
-    }
-}
diff --git a/tests/ui/precondition-checks/read.rs b/tests/ui/precondition-checks/read.rs
new file mode 100644
index 00000000000..ab9921a0cee
--- /dev/null
+++ b/tests/ui/precondition-checks/read.rs
@@ -0,0 +1,18 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: ptr::read requires
+//@ revisions: null misaligned
+//@ ignore-test
+
+use std::ptr;
+
+fn main() {
+    let src = [0u16; 2];
+    let src = src.as_ptr();
+    unsafe {
+        #[cfg(null)]
+        ptr::read(ptr::null::<u8>());
+        #[cfg(misaligned)]
+        ptr::read(src.byte_add(1));
+    }
+}
diff --git a/tests/ui/precondition-checks/read_volatile.rs b/tests/ui/precondition-checks/read_volatile.rs
new file mode 100644
index 00000000000..e14881d0290
--- /dev/null
+++ b/tests/ui/precondition-checks/read_volatile.rs
@@ -0,0 +1,17 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: ptr::read_volatile requires
+//@ revisions: null misaligned
+
+use std::ptr;
+
+fn main() {
+    let src = [0u16; 2];
+    let src = src.as_ptr();
+    unsafe {
+        #[cfg(null)]
+        ptr::read_volatile(ptr::null::<u8>());
+        #[cfg(misaligned)]
+        ptr::read_volatile(src.byte_add(1));
+    }
+}
diff --git a/tests/ui/precondition-checks/replace.rs b/tests/ui/precondition-checks/replace.rs
new file mode 100644
index 00000000000..2808cee7b64
--- /dev/null
+++ b/tests/ui/precondition-checks/replace.rs
@@ -0,0 +1,17 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: ptr::replace requires
+//@ revisions: null misaligned
+
+use std::ptr;
+
+fn main() {
+    let mut dst = [0u16; 2];
+    let dst = dst.as_mut_ptr();
+    unsafe {
+        #[cfg(null)]
+        ptr::replace(ptr::null_mut::<u8>(), 1);
+        #[cfg(misaligned)]
+        ptr::replace(dst.byte_add(1), 1u16);
+    }
+}
diff --git a/tests/ui/precondition-checks/slice-from-raw-parts-mut.rs b/tests/ui/precondition-checks/slice-from-raw-parts-mut.rs
new file mode 100644
index 00000000000..3801639e255
--- /dev/null
+++ b/tests/ui/precondition-checks/slice-from-raw-parts-mut.rs
@@ -0,0 +1,16 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts_mut requires
+//@ revisions: null misaligned toolarge
+
+fn main() {
+    unsafe {
+        #[cfg(null)]
+        let _s: &mut [u8] = std::slice::from_raw_parts_mut(std::ptr::null_mut(), 0);
+        #[cfg(misaligned)]
+        let _s: &mut [u16] = std::slice::from_raw_parts_mut(1usize as *mut u16, 0);
+        #[cfg(toolarge)]
+        let _s: &mut [u16] =
+            std::slice::from_raw_parts_mut(2usize as *mut u16, isize::MAX as usize);
+    }
+}
diff --git a/tests/ui/precondition-checks/slice-from-raw-parts.rs b/tests/ui/precondition-checks/slice-from-raw-parts.rs
new file mode 100644
index 00000000000..a3690fa045e
--- /dev/null
+++ b/tests/ui/precondition-checks/slice-from-raw-parts.rs
@@ -0,0 +1,15 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts requires
+//@ revisions: null misaligned toolarge
+
+fn main() {
+    unsafe {
+        #[cfg(null)]
+        let _s: &[u8] = std::slice::from_raw_parts(std::ptr::null(), 0);
+        #[cfg(misaligned)]
+        let _s: &[u16] = std::slice::from_raw_parts(1usize as *const u16, 0);
+        #[cfg(toolarge)]
+        let _s: &[u16] = std::slice::from_raw_parts(2usize as *const u16, isize::MAX as usize);
+    }
+}
diff --git a/tests/ui/precondition-checks/slice-get_unchecked.rs b/tests/ui/precondition-checks/slice-get_unchecked.rs
new file mode 100644
index 00000000000..1d8188fb953
--- /dev/null
+++ b/tests/ui/precondition-checks/slice-get_unchecked.rs
@@ -0,0 +1,20 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: slice::get_unchecked requires
+//@ revisions: usize range range_to range_from backwards_range
+
+fn main() {
+    unsafe {
+        let s = &[0];
+        #[cfg(usize)]
+        s.get_unchecked(1);
+        #[cfg(range)]
+        s.get_unchecked(1..2);
+        #[cfg(range_to)]
+        s.get_unchecked(..2);
+        #[cfg(range_from)]
+        s.get_unchecked(2..);
+        #[cfg(backwards_range)]
+        s.get_unchecked(1..0);
+     }
+}
diff --git a/tests/ui/precondition-checks/slice-get_unchecked_mut.rs b/tests/ui/precondition-checks/slice-get_unchecked_mut.rs
new file mode 100644
index 00000000000..34c1454af43
--- /dev/null
+++ b/tests/ui/precondition-checks/slice-get_unchecked_mut.rs
@@ -0,0 +1,20 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: slice::get_unchecked_mut requires
+//@ revisions: usize range range_to range_from backwards_range
+
+fn main() {
+    unsafe {
+        let mut s = &mut [0];
+        #[cfg(usize)]
+        s.get_unchecked_mut(1);
+        #[cfg(range)]
+        s.get_unchecked_mut(1..2);
+        #[cfg(range_to)]
+        s.get_unchecked_mut(..2);
+        #[cfg(range_from)]
+        s.get_unchecked_mut(2..);
+        #[cfg(backwards_range)]
+        s.get_unchecked_mut(1..0);
+     }
+}
diff --git a/tests/ui/precondition-checks/slice-swap_unchecked.rs b/tests/ui/precondition-checks/slice-swap_unchecked.rs
new file mode 100644
index 00000000000..227a49091ec
--- /dev/null
+++ b/tests/ui/precondition-checks/slice-swap_unchecked.rs
@@ -0,0 +1,14 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: index out of bounds: the len is 2 but the index is 2
+//@ revisions: oob_a oob_b
+
+fn main() {
+    let mut pair = [0u8; 2];
+    unsafe {
+        #[cfg(oob_a)]
+        pair.swap(0, 2);
+        #[cfg(oob_b)]
+        pair.swap(2, 0);
+    }
+}
diff --git a/tests/ui/precondition-checks/str-get_unchecked.rs b/tests/ui/precondition-checks/str-get_unchecked.rs
new file mode 100644
index 00000000000..14d17f997ec
--- /dev/null
+++ b/tests/ui/precondition-checks/str-get_unchecked.rs
@@ -0,0 +1,18 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: str::get_unchecked requires
+//@ revisions: range range_to range_from backwards_range
+
+fn main() {
+    unsafe {
+        let s = "💅";
+        #[cfg(range)]
+        s.get_unchecked(4..5);
+        #[cfg(range_to)]
+        s.get_unchecked(..5);
+        #[cfg(range_from)]
+        s.get_unchecked(5..);
+        #[cfg(backwards_range)]
+        s.get_unchecked(1..0);
+    }
+}
diff --git a/tests/ui/precondition-checks/str-get_unchecked_mut.rs b/tests/ui/precondition-checks/str-get_unchecked_mut.rs
new file mode 100644
index 00000000000..ca1b1690055
--- /dev/null
+++ b/tests/ui/precondition-checks/str-get_unchecked_mut.rs
@@ -0,0 +1,19 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: str::get_unchecked_mut requires
+//@ revisions: range range_to range_from backwards_range
+
+fn main() {
+    unsafe {
+        let mut s: String = "💅".chars().collect();
+        let mut s: &mut str = &mut s;
+        #[cfg(range)]
+        s.get_unchecked_mut(4..5);
+        #[cfg(range_to)]
+        s.get_unchecked_mut(..5);
+        #[cfg(range_from)]
+        s.get_unchecked_mut(5..);
+        #[cfg(backwards_range)]
+        s.get_unchecked_mut(1..0);
+    }
+}
diff --git a/tests/ui/precondition-checks/swap-nonoverlapping.rs b/tests/ui/precondition-checks/swap-nonoverlapping.rs
new file mode 100644
index 00000000000..52e4a3c870b
--- /dev/null
+++ b/tests/ui/precondition-checks/swap-nonoverlapping.rs
@@ -0,0 +1,25 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: ptr::swap_nonoverlapping requires
+//@ revisions: null_src null_dst misaligned_src misaligned_dst overlapping
+
+use std::ptr;
+
+fn main() {
+    let mut src = [0u16; 3];
+    let mut dst = [0u16; 3];
+    let src = src.as_mut_ptr();
+    let dst = dst.as_mut_ptr();
+    unsafe {
+        #[cfg(null_src)]
+        ptr::swap_nonoverlapping(ptr::null_mut(), dst, 1);
+        #[cfg(null_dst)]
+        ptr::swap_nonoverlapping(src, ptr::null_mut(), 1);
+        #[cfg(misaligned_src)]
+        ptr::swap_nonoverlapping(src.byte_add(1), dst, 1);
+        #[cfg(misaligned_dst)]
+        ptr::swap_nonoverlapping(src, dst.byte_add(1), 1);
+        #[cfg(overlapping)]
+        ptr::swap_nonoverlapping(dst, dst.add(1), 2);
+    }
+}
diff --git a/tests/ui/precondition-checks/unchecked_add.rs b/tests/ui/precondition-checks/unchecked_add.rs
new file mode 100644
index 00000000000..f44a6ea32ad
--- /dev/null
+++ b/tests/ui/precondition-checks/unchecked_add.rs
@@ -0,0 +1,9 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: u8::unchecked_add cannot overflow
+
+fn main() {
+    unsafe {
+        1u8.unchecked_add(u8::MAX);
+    }
+}
diff --git a/tests/ui/precondition-checks/unchecked_mul.rs b/tests/ui/precondition-checks/unchecked_mul.rs
new file mode 100644
index 00000000000..66655dda136
--- /dev/null
+++ b/tests/ui/precondition-checks/unchecked_mul.rs
@@ -0,0 +1,9 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: u8::unchecked_add cannot overflow
+
+fn main() {
+    unsafe {
+        2u8.unchecked_add(u8::MAX);
+    }
+}
diff --git a/tests/ui/precondition-checks/unchecked_shl.rs b/tests/ui/precondition-checks/unchecked_shl.rs
new file mode 100644
index 00000000000..1c96db0b1ec
--- /dev/null
+++ b/tests/ui/precondition-checks/unchecked_shl.rs
@@ -0,0 +1,11 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: u8::unchecked_shl cannot overflow
+
+#![feature(unchecked_shifts)]
+
+fn main() {
+    unsafe {
+        0u8.unchecked_shl(u8::BITS);
+    }
+}
diff --git a/tests/ui/precondition-checks/unchecked_shr.rs b/tests/ui/precondition-checks/unchecked_shr.rs
new file mode 100644
index 00000000000..4a6d9ffb1d3
--- /dev/null
+++ b/tests/ui/precondition-checks/unchecked_shr.rs
@@ -0,0 +1,11 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: u8::unchecked_shr cannot overflow
+
+#![feature(unchecked_shifts)]
+
+fn main() {
+    unsafe {
+        0u8.unchecked_shr(u8::BITS);
+    }
+}
diff --git a/tests/ui/precondition-checks/unchecked_sub.rs b/tests/ui/precondition-checks/unchecked_sub.rs
new file mode 100644
index 00000000000..545dde0e278
--- /dev/null
+++ b/tests/ui/precondition-checks/unchecked_sub.rs
@@ -0,0 +1,9 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: u8::unchecked_sub cannot overflow
+
+fn main() {
+    unsafe {
+        0u8.unchecked_sub(1u8);
+    }
+}
diff --git a/tests/ui/precondition-checks/unreachable_unchecked.rs b/tests/ui/precondition-checks/unreachable_unchecked.rs
new file mode 100644
index 00000000000..2435450c4b5
--- /dev/null
+++ b/tests/ui/precondition-checks/unreachable_unchecked.rs
@@ -0,0 +1,9 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: hint::unreachable_unchecked must never be reached
+
+fn main() {
+    unsafe {
+        std::hint::unreachable_unchecked();
+    }
+}
diff --git a/tests/ui/precondition-checks/write.rs b/tests/ui/precondition-checks/write.rs
new file mode 100644
index 00000000000..f76e776fcf3
--- /dev/null
+++ b/tests/ui/precondition-checks/write.rs
@@ -0,0 +1,18 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: ptr::write requires
+//@ revisions: null misaligned
+//@ ignore-test
+
+use std::ptr;
+
+fn main() {
+    let mut dst = [0u16; 2];
+    let mut dst = dst.as_mut_ptr();
+    unsafe {
+        #[cfg(null)]
+        ptr::write(ptr::null_mut::<u8>(), 1u8);
+        #[cfg(misaligned)]
+        ptr::write(dst.byte_add(1), 1u16);
+    }
+}
diff --git a/tests/ui/precondition-checks/write_bytes.rs b/tests/ui/precondition-checks/write_bytes.rs
new file mode 100644
index 00000000000..3f64be9d1ee
--- /dev/null
+++ b/tests/ui/precondition-checks/write_bytes.rs
@@ -0,0 +1,18 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: ptr::write requires
+//@ revisions: null misaligned
+//@ ignore-test
+
+use std::ptr;
+
+fn main() {
+    let mut dst = [0u16; 2];
+    let mut dst = dst.as_mut_ptr();
+    unsafe {
+        #[cfg(null)]
+        ptr::write_bytes(ptr::null_mut::<u8>(), 1u8, 2);
+        #[cfg(misaligned)]
+        ptr::write_bytes(dst.byte_add(1), 1u8, 2);
+    }
+}
diff --git a/tests/ui/precondition-checks/write_volatile.rs b/tests/ui/precondition-checks/write_volatile.rs
new file mode 100644
index 00000000000..ac0b89b5ecf
--- /dev/null
+++ b/tests/ui/precondition-checks/write_volatile.rs
@@ -0,0 +1,17 @@
+//@ run-fail
+//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
+//@ error-pattern: unsafe precondition(s) violated: ptr::write_volatile requires
+//@ revisions: null misaligned
+
+use std::ptr;
+
+fn main() {
+    let mut dst = [0u16; 2];
+    let mut dst = dst.as_mut_ptr();
+    unsafe {
+        #[cfg(null)]
+        ptr::write_volatile(ptr::null_mut::<u8>(), 1u8);
+        #[cfg(misaligned)]
+        ptr::write_volatile(dst.byte_add(1), 1u16);
+    }
+}
diff --git a/tests/ui/precondition-checks/zero-size-null.rs b/tests/ui/precondition-checks/zero-size-null.rs
new file mode 100644
index 00000000000..43a81175f94
--- /dev/null
+++ b/tests/ui/precondition-checks/zero-size-null.rs
@@ -0,0 +1,21 @@
+// Test that none of the precondition checks panic on zero-sized reads or writes through null.
+
+//@ run-pass
+//@ compile-flags: -Zmir-opt-level=0 -Copt-level=0 -Cdebug-assertions=yes
+
+use std::ptr;
+
+fn main() {
+    unsafe {
+        ptr::copy_nonoverlapping::<u8>(ptr::null(), ptr::null_mut(), 0);
+        ptr::copy_nonoverlapping::<()>(ptr::null(), ptr::null_mut(), 123);
+        ptr::copy::<u8>(ptr::null(), ptr::null_mut(), 0);
+        ptr::copy::<()>(ptr::null(), ptr::null_mut(), 123);
+        ptr::swap::<()>(ptr::null_mut(), ptr::null_mut());
+        ptr::replace::<()>(ptr::null_mut(), ());
+        ptr::read::<()>(ptr::null());
+        ptr::write::<()>(ptr::null_mut(), ());
+        ptr::read_volatile::<()>(ptr::null());
+        ptr::write_volatile::<()>(ptr::null_mut(), ());
+    }
+}
diff --git a/tests/ui/proc-macro/nested-macro-rules.stderr b/tests/ui/proc-macro/nested-macro-rules.stderr
index 8fe041d61b8..439297d87ca 100644
--- a/tests/ui/proc-macro/nested-macro-rules.stderr
+++ b/tests/ui/proc-macro/nested-macro-rules.stderr
@@ -19,7 +19,6 @@ LL |       nested_macro_rules::outer_macro!(SecondStruct, SecondAttrStruct);
    |
    = help: remove the `#[macro_export]` or move this `macro_rules!` outside the of the current function `main`
    = note: a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute
-   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
 note: the lint level is defined here
   --> $DIR/nested-macro-rules.rs:8:9
    |
diff --git a/tests/ui/process/process-sigpipe.rs b/tests/ui/process/process-sigpipe.rs
index 11f363d625f..9db130c26bd 100644
--- a/tests/ui/process/process-sigpipe.rs
+++ b/tests/ui/process/process-sigpipe.rs
@@ -15,11 +15,12 @@
 
 //@ ignore-vxworks no 'sh'
 //@ ignore-fuchsia no 'sh'
+//@ ignore-emscripten No threads
+//@ only-unix SIGPIPE is a unix feature
 
 use std::process;
 use std::thread;
 
-#[cfg(unix)]
 fn main() {
     // Just in case `yes` doesn't check for EPIPE...
     thread::spawn(|| {
@@ -34,8 +35,3 @@ fn main() {
     assert!(output.status.success());
     assert!(output.stderr.len() == 0);
 }
-
-#[cfg(not(unix))]
-fn main() {
-    // Not worried about signal masks on other platforms
-}
diff --git a/tests/ui/resolve/issue-111312.rs b/tests/ui/resolve/issue-111312.rs
index 79c6f67dadd..574e9870cd2 100644
--- a/tests/ui/resolve/issue-111312.rs
+++ b/tests/ui/resolve/issue-111312.rs
@@ -8,6 +8,5 @@ trait HasNot {}
 
 fn main() {
     HasNot::has();
-    //~^ ERROR trait objects must include the `dyn` keyword
-    //~| ERROR no function or associated item named `has` found for trait `HasNot`
+    //~^ ERROR expected a type, found a trait
 }
diff --git a/tests/ui/resolve/issue-111312.stderr b/tests/ui/resolve/issue-111312.stderr
index 431802ead30..a1f8d6bc46c 100644
--- a/tests/ui/resolve/issue-111312.stderr
+++ b/tests/ui/resolve/issue-111312.stderr
@@ -1,27 +1,14 @@
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/issue-111312.rs:10:5
    |
 LL |     HasNot::has();
    |     ^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL |     <dyn HasNot>::has();
    |     ++++       +
 
-error[E0599]: no function or associated item named `has` found for trait `HasNot`
-  --> $DIR/issue-111312.rs:10:13
-   |
-LL |     HasNot::has();
-   |             ^^^ function or associated item not found in `HasNot`
-   |
-note: `Has` defines an item `has`
-  --> $DIR/issue-111312.rs:3:1
-   |
-LL | trait Has {
-   | ^^^^^^^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0599, E0782.
-For more information about an error, try `rustc --explain E0599`.
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/resolve/issue-111727.rs b/tests/ui/resolve/issue-111727.rs
index fcab924b809..a5c2c0ca8c6 100644
--- a/tests/ui/resolve/issue-111727.rs
+++ b/tests/ui/resolve/issue-111727.rs
@@ -2,6 +2,5 @@
 
 fn main() {
     std::any::Any::create();
-    //~^ ERROR trait objects must include the `dyn` keyword
-    //~| ERROR no function or associated item named `create` found for trait `Any`
+    //~^ ERROR expected a type, found a trait
 }
diff --git a/tests/ui/resolve/issue-111727.stderr b/tests/ui/resolve/issue-111727.stderr
index 1ef5a1a1d5e..71ea989ac34 100644
--- a/tests/ui/resolve/issue-111727.stderr
+++ b/tests/ui/resolve/issue-111727.stderr
@@ -1,21 +1,14 @@
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/issue-111727.rs:4:5
    |
 LL |     std::any::Any::create();
    |     ^^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL |     <dyn std::any::Any>::create();
    |     ++++              +
 
-error[E0599]: no function or associated item named `create` found for trait `Any`
-  --> $DIR/issue-111727.rs:4:20
-   |
-LL |     std::any::Any::create();
-   |                    ^^^^^^ function or associated item not found in `Any`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0599, E0782.
-For more information about an error, try `rustc --explain E0599`.
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/downcast-unsafe-trait-objects.rs
index d4337dcb165..b1b2dcf3eb9 100644
--- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs
+++ b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/downcast-unsafe-trait-objects.rs
@@ -1,9 +1,9 @@
-// Check that we if we get ahold of an object unsafe trait
+// Check that we if we get ahold of a dyn-incompatible trait
 // object with auto traits and lifetimes, we can downcast it
 //
 //@ check-pass
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Trait: Sized {}
 
diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr
index 1489791b20d..1489791b20d 100644
--- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr
+++ b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr
diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr
index 1489791b20d..1489791b20d 100644
--- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr
+++ b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr
diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.rs
index a020d91fb14..425dc130d45 100644
--- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs
+++ b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.rs
@@ -1,11 +1,11 @@
-// Check that we can manually implement an object-unsafe trait for its trait object.
+// Check that we can manually implement a dyn-incompatible trait for its trait object.
 
 //@ revisions: current next
 //@ ignore-compare-mode-next-solver (explicit revisions)
 //@[next] compile-flags: -Znext-solver
 //@ run-pass
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Bad {
     fn stat() -> char {
diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/static-dispatch-unsafe-object.rs
index cbf76a6830b..c38928a9f44 100644
--- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs
+++ b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/static-dispatch-unsafe-object.rs
@@ -3,7 +3,7 @@
 //
 //@ check-pass
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Statics {
     fn plain() {}
diff --git a/tests/ui/runtime/stdout-before-main.rs b/tests/ui/runtime/stdout-before-main.rs
new file mode 100644
index 00000000000..26c734d3e9e
--- /dev/null
+++ b/tests/ui/runtime/stdout-before-main.rs
@@ -0,0 +1,24 @@
+//@ run-pass
+//@ check-run-results
+//@ only-gnu
+//@ only-linux
+//
+// Regression test for #130210.
+// .init_array doesn't work everywhere, so we limit the test to just GNU/Linux.
+
+use std::ffi::c_int;
+use std::thread;
+
+#[used]
+#[link_section = ".init_array"]
+static INIT: extern "C" fn(c_int, *const *const u8, *const *const u8) = {
+    extern "C" fn init(_argc: c_int, _argv: *const *const u8, _envp: *const *const u8) {
+        print!("Hello from before ");
+    }
+
+    init
+};
+
+fn main() {
+    println!("{}!", thread::current().name().unwrap());
+}
diff --git a/tests/ui/runtime/stdout-before-main.run.stdout b/tests/ui/runtime/stdout-before-main.run.stdout
new file mode 100644
index 00000000000..d7a3a4389ec
--- /dev/null
+++ b/tests/ui/runtime/stdout-before-main.run.stdout
@@ -0,0 +1 @@
+Hello from before main!
diff --git a/tests/ui/rust-2021/ice-return-unsized-can-impl-2.rs b/tests/ui/rust-2021/ice-return-unsized-can-impl-2.rs
new file mode 100644
index 00000000000..e57e9ce4844
--- /dev/null
+++ b/tests/ui/rust-2021/ice-return-unsized-can-impl-2.rs
@@ -0,0 +1,15 @@
+// Doesn't trigger ICE when returning unsized trait that can be impl
+// issue https://github.com/rust-lang/rust/issues/125512
+//@ edition:2021
+#![feature(dyn_compatible_for_dispatch)]
+trait B {
+    fn f(a: A) -> A;
+    //~^ ERROR: expected a type, found a trait
+    //~| ERROR: expected a type, found a trait
+}
+trait A {
+    fn concrete(b: B) -> B;
+    //~^ ERROR: expected a type, found a trait
+    //~| ERROR: expected a type, found a trait
+}
+fn main() {}
diff --git a/tests/ui/rust-2021/ice-return-unsized-can-impl-2.stderr b/tests/ui/rust-2021/ice-return-unsized-can-impl-2.stderr
new file mode 100644
index 00000000000..b8a9a5c8129
--- /dev/null
+++ b/tests/ui/rust-2021/ice-return-unsized-can-impl-2.stderr
@@ -0,0 +1,57 @@
+error[E0782]: expected a type, found a trait
+  --> $DIR/ice-return-unsized-can-impl-2.rs:11:20
+   |
+LL |     fn concrete(b: B) -> B;
+   |                    ^
+   |
+   = note: `B` it is dyn-incompatible, so it can't be `dyn`
+help: use a new generic type parameter, constrained by `B`
+   |
+LL |     fn concrete<T: B>(b: T) -> B;
+   |                ++++++    ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL |     fn concrete(b: impl B) -> B;
+   |                    ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/ice-return-unsized-can-impl-2.rs:11:26
+   |
+LL |     fn concrete(b: B) -> B;
+   |                          ^
+   |
+help: `B` is dyn-incompatible, use `impl B` to return an opaque type, as long as you return a single underlying type
+   |
+LL |     fn concrete(b: B) -> impl B;
+   |                          ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/ice-return-unsized-can-impl-2.rs:6:13
+   |
+LL |     fn f(a: A) -> A;
+   |             ^
+   |
+   = note: `A` it is dyn-incompatible, so it can't be `dyn`
+help: use a new generic type parameter, constrained by `A`
+   |
+LL |     fn f<T: A>(a: T) -> A;
+   |         ++++++    ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL |     fn f(a: impl A) -> A;
+   |             ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/ice-return-unsized-can-impl-2.rs:6:19
+   |
+LL |     fn f(a: A) -> A;
+   |                   ^
+   |
+help: `A` is dyn-incompatible, use `impl A` to return an opaque type, as long as you return a single underlying type
+   |
+LL |     fn f(a: A) -> impl A;
+   |                   ++++
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/rust-2021/ice-return-unsized-can-impl.rs b/tests/ui/rust-2021/ice-return-unsized-can-impl.rs
new file mode 100644
index 00000000000..055b11b4424
--- /dev/null
+++ b/tests/ui/rust-2021/ice-return-unsized-can-impl.rs
@@ -0,0 +1,16 @@
+// Doesn't trigger ICE when returning unsized trait that can be impl
+// issue https://github.com/rust-lang/rust/issues/120482
+//@ edition:2021
+#![feature(dyn_compatible_for_dispatch)]
+
+trait B {
+    fn bar(&self, x: &Self);
+}
+
+trait A {
+    fn g(new: B) -> B;
+    //~^ ERROR: expected a type, found a trait
+    //~| ERROR: expected a type, found a trait
+}
+
+fn main() {}
diff --git a/tests/ui/rust-2021/ice-return-unsized-can-impl.stderr b/tests/ui/rust-2021/ice-return-unsized-can-impl.stderr
new file mode 100644
index 00000000000..c0969570e92
--- /dev/null
+++ b/tests/ui/rust-2021/ice-return-unsized-can-impl.stderr
@@ -0,0 +1,30 @@
+error[E0782]: expected a type, found a trait
+  --> $DIR/ice-return-unsized-can-impl.rs:11:15
+   |
+LL |     fn g(new: B) -> B;
+   |               ^
+   |
+   = note: `B` it is dyn-incompatible, so it can't be `dyn`
+help: use a new generic type parameter, constrained by `B`
+   |
+LL |     fn g<T: B>(new: T) -> B;
+   |         ++++++      ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL |     fn g(new: impl B) -> B;
+   |               ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/ice-return-unsized-can-impl.rs:11:21
+   |
+LL |     fn g(new: B) -> B;
+   |                     ^
+   |
+help: `B` is dyn-incompatible, use `impl B` to return an opaque type, as long as you return a single underlying type
+   |
+LL |     fn g(new: B) -> impl B;
+   |                     ++++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/rust-2021/ice-unsized-fn-params-2.rs b/tests/ui/rust-2021/ice-unsized-fn-params-2.rs
new file mode 100644
index 00000000000..2b4f7bd088f
--- /dev/null
+++ b/tests/ui/rust-2021/ice-unsized-fn-params-2.rs
@@ -0,0 +1,12 @@
+//@ edition:2021
+// Test that it doesn't trigger an ICE when using an unsized fn params.
+// https://github.com/rust-lang/rust/issues/120241
+#![feature(dyn_compatible_for_dispatch)]
+#![feature(unsized_fn_params)]
+
+fn guard(_s: Copy) -> bool {
+    //~^ ERROR: expected a type, found a trait
+    panic!()
+}
+
+fn main() {}
diff --git a/tests/ui/rust-2021/ice-unsized-fn-params-2.stderr b/tests/ui/rust-2021/ice-unsized-fn-params-2.stderr
new file mode 100644
index 00000000000..d35c8ab3e42
--- /dev/null
+++ b/tests/ui/rust-2021/ice-unsized-fn-params-2.stderr
@@ -0,0 +1,19 @@
+error[E0782]: expected a type, found a trait
+  --> $DIR/ice-unsized-fn-params-2.rs:7:14
+   |
+LL | fn guard(_s: Copy) -> bool {
+   |              ^^^^
+   |
+   = note: `Copy` it is dyn-incompatible, so it can't be `dyn`
+help: use a new generic type parameter, constrained by `Copy`
+   |
+LL | fn guard<T: Copy>(_s: T) -> bool {
+   |         +++++++++     ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL | fn guard(_s: impl Copy) -> bool {
+   |              ++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/rust-2021/ice-unsized-fn-params.rs b/tests/ui/rust-2021/ice-unsized-fn-params.rs
new file mode 100644
index 00000000000..6d8c1c3f152
--- /dev/null
+++ b/tests/ui/rust-2021/ice-unsized-fn-params.rs
@@ -0,0 +1,18 @@
+//@ edition:2021
+// Test that it doesn't trigger an ICE when using an unsized fn params.
+// https://github.com/rust-lang/rust/issues/120241
+#![feature(dyn_compatible_for_dispatch)]
+
+trait B {
+    fn f(a: A) -> A;
+    //~^ ERROR: expected a type, found a trait
+    //~| ERROR: expected a type, found a trait
+}
+
+trait A {
+    fn g(b: B) -> B;
+    //~^ ERROR: expected a type, found a trait
+    //~| ERROR: expected a type, found a trait
+}
+
+fn main() {}
diff --git a/tests/ui/rust-2021/ice-unsized-fn-params.stderr b/tests/ui/rust-2021/ice-unsized-fn-params.stderr
new file mode 100644
index 00000000000..d56e9981a28
--- /dev/null
+++ b/tests/ui/rust-2021/ice-unsized-fn-params.stderr
@@ -0,0 +1,57 @@
+error[E0782]: expected a type, found a trait
+  --> $DIR/ice-unsized-fn-params.rs:13:13
+   |
+LL |     fn g(b: B) -> B;
+   |             ^
+   |
+   = note: `B` it is dyn-incompatible, so it can't be `dyn`
+help: use a new generic type parameter, constrained by `B`
+   |
+LL |     fn g<T: B>(b: T) -> B;
+   |         ++++++    ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL |     fn g(b: impl B) -> B;
+   |             ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/ice-unsized-fn-params.rs:13:19
+   |
+LL |     fn g(b: B) -> B;
+   |                   ^
+   |
+help: `B` is dyn-incompatible, use `impl B` to return an opaque type, as long as you return a single underlying type
+   |
+LL |     fn g(b: B) -> impl B;
+   |                   ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/ice-unsized-fn-params.rs:7:13
+   |
+LL |     fn f(a: A) -> A;
+   |             ^
+   |
+   = note: `A` it is dyn-incompatible, so it can't be `dyn`
+help: use a new generic type parameter, constrained by `A`
+   |
+LL |     fn f<T: A>(a: T) -> A;
+   |         ++++++    ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL |     fn f(a: impl A) -> A;
+   |             ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/ice-unsized-fn-params.rs:7:19
+   |
+LL |     fn f(a: A) -> A;
+   |                   ^
+   |
+help: `A` is dyn-incompatible, use `impl A` to return an opaque type, as long as you return a single underlying type
+   |
+LL |     fn f(a: A) -> impl A;
+   |                   ++++
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/rust-2024/auxiliary/reserved-guarded-strings-macro-2021.rs b/tests/ui/rust-2024/auxiliary/reserved-guarded-strings-macro-2021.rs
new file mode 100644
index 00000000000..81080fcdce3
--- /dev/null
+++ b/tests/ui/rust-2024/auxiliary/reserved-guarded-strings-macro-2021.rs
@@ -0,0 +1,20 @@
+//@ force-host
+//@ edition:2021
+//@ no-prefer-dynamic
+
+#![crate_type = "proc-macro"]
+
+extern crate proc_macro;
+
+use proc_macro::TokenStream;
+use std::str::FromStr;
+
+#[proc_macro]
+pub fn number_of_tokens_in_a_guarded_string_literal(_: TokenStream) -> TokenStream {
+    TokenStream::from_str("#\"abc\"#").unwrap().into_iter().count().to_string().parse().unwrap()
+}
+
+#[proc_macro]
+pub fn number_of_tokens_in_a_guarded_unterminated_string_literal(_: TokenStream) -> TokenStream {
+    TokenStream::from_str("#\"abc\"").unwrap().into_iter().count().to_string().parse().unwrap()
+}
diff --git a/tests/ui/rust-2024/auxiliary/reserved-guarded-strings-macro-2024.rs b/tests/ui/rust-2024/auxiliary/reserved-guarded-strings-macro-2024.rs
new file mode 100644
index 00000000000..2c3dc30f0ae
--- /dev/null
+++ b/tests/ui/rust-2024/auxiliary/reserved-guarded-strings-macro-2024.rs
@@ -0,0 +1,21 @@
+//@ force-host
+//@ compile-flags: -Zunstable-options
+//@ edition:2024
+//@ no-prefer-dynamic
+
+#![crate_type = "proc-macro"]
+
+extern crate proc_macro;
+
+use proc_macro::TokenStream;
+use std::str::FromStr;
+
+#[proc_macro]
+pub fn number_of_tokens_in_a_guarded_string_literal(_: TokenStream) -> TokenStream {
+    TokenStream::from_str("#\"abc\"#").unwrap().into_iter().count().to_string().parse().unwrap()
+}
+
+#[proc_macro]
+pub fn number_of_tokens_in_a_guarded_unterminated_string_literal(_: TokenStream) -> TokenStream {
+    TokenStream::from_str("#\"abc\"").unwrap().into_iter().count().to_string().parse().unwrap()
+}
diff --git a/tests/ui/rust-2024/reserved-guarded-strings-lexing.rs b/tests/ui/rust-2024/reserved-guarded-strings-lexing.rs
new file mode 100644
index 00000000000..83e0dcbb4be
--- /dev/null
+++ b/tests/ui/rust-2024/reserved-guarded-strings-lexing.rs
@@ -0,0 +1,80 @@
+//@ edition:2021
+// ignore-tidy-linelength
+
+#![warn(rust_2024_guarded_string_incompatible_syntax)]
+
+macro_rules! demo2 {
+    ( $a:tt $b:tt ) => { println!("two tokens") };
+}
+
+macro_rules! demo3 {
+    ( $a:tt $b:tt $c:tt ) => { println!("three tokens") };
+}
+
+macro_rules! demo4 {
+    ( $a:tt $b:tt $c:tt $d:tt ) => { println!("four tokens") };
+}
+
+macro_rules! demo5 {
+    ( $a:tt $b:tt $c:tt $d:tt $e:tt ) => { println!("five tokens") };
+}
+
+macro_rules! demo7 {
+    ( $a:tt $b:tt $c:tt $d:tt $e:tt $f:tt $g:tt ) => { println!("seven tokens") };
+}
+
+
+fn main() {
+    demo3!(## "foo");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo4!(### "foo");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo4!(## "foo"#);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo7!(### "foo"###);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+
+    demo5!(###"foo"#);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo5!(#"foo"###);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo4!("foo"###);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+
+    // Non-ascii identifiers
+    demo2!(Ñ"foo");
+    //~^ ERROR prefix `Ñ` is unknown
+    demo4!(Ñ#""#);
+    //~^ ERROR prefix `Ñ` is unknown
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo3!(🙃#"");
+    //~^ ERROR identifiers cannot contain emoji
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+}
diff --git a/tests/ui/rust-2024/reserved-guarded-strings-lexing.stderr b/tests/ui/rust-2024/reserved-guarded-strings-lexing.stderr
new file mode 100644
index 00000000000..e2e1ac42f05
--- /dev/null
+++ b/tests/ui/rust-2024/reserved-guarded-strings-lexing.stderr
@@ -0,0 +1,271 @@
+error: prefix `Ñ` is unknown
+  --> $DIR/reserved-guarded-strings-lexing.rs:70:12
+   |
+LL |     demo2!(Ñ"foo");
+   |            ^ unknown prefix
+   |
+   = note: prefixed identifiers and literals are reserved since Rust 2021
+help: consider inserting whitespace here
+   |
+LL |     demo2!(Ñ "foo");
+   |             +
+
+error: prefix `Ñ` is unknown
+  --> $DIR/reserved-guarded-strings-lexing.rs:72:12
+   |
+LL |     demo4!(Ñ#""#);
+   |            ^ unknown prefix
+   |
+   = note: prefixed identifiers and literals are reserved since Rust 2021
+help: consider inserting whitespace here
+   |
+LL |     demo4!(Ñ #""#);
+   |             +
+
+error: identifiers cannot contain emoji: `🙃`
+  --> $DIR/reserved-guarded-strings-lexing.rs:76:12
+   |
+LL |     demo3!(🙃#"");
+   |            ^^
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:28:12
+   |
+LL |     demo3!(## "foo");
+   |            ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+note: the lint level is defined here
+  --> $DIR/reserved-guarded-strings-lexing.rs:4:9
+   |
+LL | #![warn(rust_2024_guarded_string_incompatible_syntax)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo3!(# # "foo");
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:31:12
+   |
+LL |     demo4!(### "foo");
+   |            ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!(# ## "foo");
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:31:13
+   |
+LL |     demo4!(### "foo");
+   |             ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!(## # "foo");
+   |              +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:36:12
+   |
+LL |     demo4!(## "foo"#);
+   |            ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!(# # "foo"#);
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:39:12
+   |
+LL |     demo7!(### "foo"###);
+   |            ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo7!(# ## "foo"###);
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:39:13
+   |
+LL |     demo7!(### "foo"###);
+   |             ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo7!(## # "foo"###);
+   |              +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:39:21
+   |
+LL |     demo7!(### "foo"###);
+   |                     ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo7!(### "foo"# ##);
+   |                      +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:39:22
+   |
+LL |     demo7!(### "foo"###);
+   |                      ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo7!(### "foo"## #);
+   |                       +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:49:12
+   |
+LL |     demo5!(###"foo"#);
+   |            ^^^^^^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo5!(# ##"foo"#);
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:49:13
+   |
+LL |     demo5!(###"foo"#);
+   |             ^^^^^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo5!(## #"foo"#);
+   |              +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:49:14
+   |
+LL |     demo5!(###"foo"#);
+   |              ^^^^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo5!(### "foo"#);
+   |               +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:56:12
+   |
+LL |     demo5!(#"foo"###);
+   |            ^^^^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo5!(# "foo"###);
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:56:18
+   |
+LL |     demo5!(#"foo"###);
+   |                  ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo5!(#"foo"# ##);
+   |                   +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:56:19
+   |
+LL |     demo5!(#"foo"###);
+   |                   ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo5!(#"foo"## #);
+   |                    +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:63:17
+   |
+LL |     demo4!("foo"###);
+   |                 ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!("foo"# ##);
+   |                  +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:63:18
+   |
+LL |     demo4!("foo"###);
+   |                  ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!("foo"## #);
+   |                   +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:72:13
+   |
+LL |     demo4!(Ñ#""#);
+   |             ^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!(Ñ# ""#);
+   |              +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-lexing.rs:76:13
+   |
+LL |     demo3!(🙃#"");
+   |              ^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo3!(🙃# "");
+   |               +
+
+error: aborting due to 3 previous errors; 18 warnings emitted
+
diff --git a/tests/ui/rust-2024/reserved-guarded-strings-migration.fixed b/tests/ui/rust-2024/reserved-guarded-strings-migration.fixed
new file mode 100644
index 00000000000..d92df7b5375
--- /dev/null
+++ b/tests/ui/rust-2024/reserved-guarded-strings-migration.fixed
@@ -0,0 +1,99 @@
+//@ check-pass
+//@ run-rustfix
+//@ edition:2021
+
+#![warn(rust_2024_guarded_string_incompatible_syntax)]
+
+macro_rules! demo1 {
+    ( $a:tt ) => { println!("one tokens") };
+}
+
+macro_rules! demo2 {
+    ( $a:tt $b:tt ) => { println!("two tokens") };
+}
+
+macro_rules! demo3 {
+    ( $a:tt $b:tt $c:tt ) => { println!("three tokens") };
+}
+
+macro_rules! demo4 {
+    ( $a:tt $b:tt $c:tt $d:tt ) => { println!("four tokens") };
+}
+
+macro_rules! demo5 {
+    ( $a:tt $b:tt $c:tt $d:tt $e:tt ) => { println!("five tokens") };
+}
+
+macro_rules! demo6 {
+    ( $a:tt $b:tt $c:tt $d:tt $e:tt $f:tt ) => { println!("six tokens") };
+}
+
+
+fn main() {
+    demo1!("");
+    demo2!(# "");
+    demo3!(# ""#);
+    demo2!(# "foo");
+    demo3!(# "foo"#);
+    demo2!("foo"#);
+
+    demo3!(# # "foo");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo4!(# # # "foo");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo4!(# # "foo"#);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo6!(# # # "foo"# #);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+
+    demo4!("foo"# # #);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+
+    demo2!(# "");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo3!(# ""#);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo3!(# # "");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo2!(# "foo");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo3!(# # "foo");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo3!(# "foo"#);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo4!(# # "foo"#);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo5!(# # "foo"# #);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+}
diff --git a/tests/ui/rust-2024/reserved-guarded-strings-migration.rs b/tests/ui/rust-2024/reserved-guarded-strings-migration.rs
new file mode 100644
index 00000000000..5905f2abe32
--- /dev/null
+++ b/tests/ui/rust-2024/reserved-guarded-strings-migration.rs
@@ -0,0 +1,99 @@
+//@ check-pass
+//@ run-rustfix
+//@ edition:2021
+
+#![warn(rust_2024_guarded_string_incompatible_syntax)]
+
+macro_rules! demo1 {
+    ( $a:tt ) => { println!("one tokens") };
+}
+
+macro_rules! demo2 {
+    ( $a:tt $b:tt ) => { println!("two tokens") };
+}
+
+macro_rules! demo3 {
+    ( $a:tt $b:tt $c:tt ) => { println!("three tokens") };
+}
+
+macro_rules! demo4 {
+    ( $a:tt $b:tt $c:tt $d:tt ) => { println!("four tokens") };
+}
+
+macro_rules! demo5 {
+    ( $a:tt $b:tt $c:tt $d:tt $e:tt ) => { println!("five tokens") };
+}
+
+macro_rules! demo6 {
+    ( $a:tt $b:tt $c:tt $d:tt $e:tt $f:tt ) => { println!("six tokens") };
+}
+
+
+fn main() {
+    demo1!("");
+    demo2!(# "");
+    demo3!(# ""#);
+    demo2!(# "foo");
+    demo3!(# "foo"#);
+    demo2!("foo"#);
+
+    demo3!(## "foo");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo4!(### "foo");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo4!(## "foo"#);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo6!(### "foo"##);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+
+    demo4!("foo"###);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+
+    demo2!(#"");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo3!(#""#);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo3!(##"");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo2!(#"foo");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo3!(##"foo");
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo3!(#"foo"#);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo4!(##"foo"#);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    demo5!(##"foo"##);
+    //~^ WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+    //~| WARNING parsed as a guarded string in Rust 2024 [rust_2024_guarded_string_incompatible_syntax]
+    //~| WARNING hard error in Rust 2024
+}
diff --git a/tests/ui/rust-2024/reserved-guarded-strings-migration.stderr b/tests/ui/rust-2024/reserved-guarded-strings-migration.stderr
new file mode 100644
index 00000000000..d7f8e5c9b4b
--- /dev/null
+++ b/tests/ui/rust-2024/reserved-guarded-strings-migration.stderr
@@ -0,0 +1,293 @@
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:40:12
+   |
+LL |     demo3!(## "foo");
+   |            ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+note: the lint level is defined here
+  --> $DIR/reserved-guarded-strings-migration.rs:5:9
+   |
+LL | #![warn(rust_2024_guarded_string_incompatible_syntax)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo3!(# # "foo");
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:43:12
+   |
+LL |     demo4!(### "foo");
+   |            ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!(# ## "foo");
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:43:13
+   |
+LL |     demo4!(### "foo");
+   |             ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!(## # "foo");
+   |              +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:48:12
+   |
+LL |     demo4!(## "foo"#);
+   |            ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!(# # "foo"#);
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:51:12
+   |
+LL |     demo6!(### "foo"##);
+   |            ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo6!(# ## "foo"##);
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:51:13
+   |
+LL |     demo6!(### "foo"##);
+   |             ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo6!(## # "foo"##);
+   |              +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:51:21
+   |
+LL |     demo6!(### "foo"##);
+   |                     ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo6!(### "foo"# #);
+   |                      +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:59:17
+   |
+LL |     demo4!("foo"###);
+   |                 ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!("foo"# ##);
+   |                  +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:59:18
+   |
+LL |     demo4!("foo"###);
+   |                  ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!("foo"## #);
+   |                   +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:65:12
+   |
+LL |     demo2!(#"");
+   |            ^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo2!(# "");
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:68:12
+   |
+LL |     demo3!(#""#);
+   |            ^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo3!(# ""#);
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:71:12
+   |
+LL |     demo3!(##"");
+   |            ^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo3!(# #"");
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:71:13
+   |
+LL |     demo3!(##"");
+   |             ^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo3!(## "");
+   |              +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:76:12
+   |
+LL |     demo2!(#"foo");
+   |            ^^^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo2!(# "foo");
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:79:12
+   |
+LL |     demo3!(##"foo");
+   |            ^^^^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo3!(# #"foo");
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:79:13
+   |
+LL |     demo3!(##"foo");
+   |             ^^^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo3!(## "foo");
+   |              +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:84:12
+   |
+LL |     demo3!(#"foo"#);
+   |            ^^^^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo3!(# "foo"#);
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:87:12
+   |
+LL |     demo4!(##"foo"#);
+   |            ^^^^^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!(# #"foo"#);
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:87:13
+   |
+LL |     demo4!(##"foo"#);
+   |             ^^^^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo4!(## "foo"#);
+   |              +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:92:12
+   |
+LL |     demo5!(##"foo"##);
+   |            ^^^^^^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo5!(# #"foo"##);
+   |             +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:92:13
+   |
+LL |     demo5!(##"foo"##);
+   |             ^^^^^^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo5!(## "foo"##);
+   |              +
+
+warning: will be parsed as a guarded string in Rust 2024
+  --> $DIR/reserved-guarded-strings-migration.rs:92:19
+   |
+LL |     demo5!(##"foo"##);
+   |                   ^^
+   |
+   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
+   = note: for more information, see issue #123735 <https://github.com/rust-lang/rust/issues/123735>
+help: insert whitespace here to avoid this being parsed as a guarded string in Rust 2024
+   |
+LL |     demo5!(##"foo"# #);
+   |                    +
+
+warning: 22 warnings emitted
+
diff --git a/tests/ui/rust-2024/reserved-guarded-strings-via-macro-2.rs b/tests/ui/rust-2024/reserved-guarded-strings-via-macro-2.rs
new file mode 100644
index 00000000000..3f9f373ba22
--- /dev/null
+++ b/tests/ui/rust-2024/reserved-guarded-strings-via-macro-2.rs
@@ -0,0 +1,18 @@
+//@ edition:2021
+//@ aux-build:reserved-guarded-strings-macro-2021.rs
+//@ aux-build:reserved-guarded-strings-macro-2024.rs
+
+extern crate reserved_guarded_strings_macro_2021 as m2021;
+extern crate reserved_guarded_strings_macro_2024 as m2024;
+
+fn main() {
+    // Ok:
+    m2021::number_of_tokens_in_a_guarded_string_literal!();
+    m2021::number_of_tokens_in_a_guarded_unterminated_string_literal!();
+
+    // Error, even though *this* crate is 2021:
+    m2024::number_of_tokens_in_a_guarded_string_literal!();
+    //~^ ERROR invalid string literal
+    m2024::number_of_tokens_in_a_guarded_unterminated_string_literal!();
+    //~^ ERROR invalid string literal
+}
diff --git a/tests/ui/rust-2024/reserved-guarded-strings-via-macro-2.stderr b/tests/ui/rust-2024/reserved-guarded-strings-via-macro-2.stderr
new file mode 100644
index 00000000000..1074c8a682b
--- /dev/null
+++ b/tests/ui/rust-2024/reserved-guarded-strings-via-macro-2.stderr
@@ -0,0 +1,20 @@
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings-via-macro-2.rs:14:5
+   |
+LL |     m2024::number_of_tokens_in_a_guarded_string_literal!();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+   = note: this error originates in the macro `m2024::number_of_tokens_in_a_guarded_string_literal` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings-via-macro-2.rs:16:5
+   |
+LL |     m2024::number_of_tokens_in_a_guarded_unterminated_string_literal!();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+   = note: this error originates in the macro `m2024::number_of_tokens_in_a_guarded_unterminated_string_literal` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs b/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs
new file mode 100644
index 00000000000..f9e3c1e3c51
--- /dev/null
+++ b/tests/ui/rust-2024/reserved-guarded-strings-via-macro.rs
@@ -0,0 +1,12 @@
+//@ run-pass
+//@ compile-flags: -Zunstable-options
+//@ edition:2024
+//@ aux-build:reserved-guarded-strings-macro-2021.rs
+
+extern crate reserved_guarded_strings_macro_2021 as m2021;
+
+fn main() {
+    // Ok, even though *this* crate is 2024:
+    assert_eq!(m2021::number_of_tokens_in_a_guarded_string_literal!(), 3);
+    assert_eq!(m2021::number_of_tokens_in_a_guarded_unterminated_string_literal!(), 2);
+}
diff --git a/tests/ui/rust-2024/reserved-guarded-strings.rs b/tests/ui/rust-2024/reserved-guarded-strings.rs
new file mode 100644
index 00000000000..dab97039be0
--- /dev/null
+++ b/tests/ui/rust-2024/reserved-guarded-strings.rs
@@ -0,0 +1,74 @@
+//@ compile-flags: -Zunstable-options
+//@ edition:2024
+// ignore-tidy-linelength
+
+macro_rules! demo1 {
+    ( $a:tt ) => { println!("one tokens") };
+}
+
+macro_rules! demo2 {
+    ( $a:tt $b:tt ) => { println!("two tokens") };
+}
+
+macro_rules! demo3 {
+    ( $a:tt $b:tt $c:tt ) => { println!("three tokens") };
+}
+
+macro_rules! demo4 {
+    ( $a:tt $b:tt $c:tt $d:tt ) => { println!("four tokens") };
+}
+
+macro_rules! demo5 {
+    ( $a:tt $b:tt $c:tt $d:tt $e:tt ) => { println!("five tokens") };
+}
+
+macro_rules! demo6 {
+    ( $a:tt $b:tt $c:tt $d:tt $e:tt $f:tt ) => { println!("six tokens") };
+}
+
+macro_rules! demo7 {
+    ( $a:tt $b:tt $c:tt $d:tt $e:tt $f:tt $g:tt ) => { println!("seven tokens") };
+}
+
+macro_rules! demon {
+    ( $($n:tt)* ) => { println!("unknown number of tokens") };
+}
+
+fn main() {
+    demo1!("");
+    demo2!(# "");
+    demo3!(# ""#);
+    demo2!(# "foo");
+    demo3!(# "foo"#);
+    demo2!("foo"#);
+
+    demo2!(blah"xx"); //~ ERROR prefix `blah` is unknown
+    demo2!(blah#"xx"#);
+    //~^ ERROR prefix `blah` is unknown
+    //~| ERROR invalid string literal
+
+    demo2!(## "foo"); //~ ERROR invalid string literal
+    demo3!("foo"###); //~ ERROR invalid string literal
+    demo3!(### "foo"); //~ ERROR invalid string literal
+    demo3!(## "foo"#); //~ ERROR invalid string literal
+    demo5!(### "foo"###);
+    //~^ ERROR invalid string literal
+    //~| ERROR invalid string literal
+
+    demo1!(#""); //~ ERROR invalid string literal
+    demo1!(#""#); //~ ERROR invalid string literal
+    demo1!(####""); //~ ERROR invalid string literal
+    demo1!(#"foo"); //~ ERROR invalid string literal
+    demo1!(###"foo"); //~ ERROR invalid string literal
+    demo1!(#"foo"#); //~ ERROR invalid string literal
+    demo1!(###"foo"#); //~ ERROR invalid string literal
+    demo1!(###"foo"##); //~ ERROR invalid string literal
+    demo1!(###"foo"###); //~ ERROR invalid string literal
+    demo2!(#"foo"###);
+    //~^ ERROR invalid string literal
+    //~| ERROR invalid string literal
+
+    // More than 255 hashes
+    demon!(####################################################################################################################################################################################################################################################################"foo");
+    //~^ ERROR invalid string literal
+}
diff --git a/tests/ui/rust-2024/reserved-guarded-strings.stderr b/tests/ui/rust-2024/reserved-guarded-strings.stderr
new file mode 100644
index 00000000000..f465ba7944a
--- /dev/null
+++ b/tests/ui/rust-2024/reserved-guarded-strings.stderr
@@ -0,0 +1,254 @@
+error: prefix `blah` is unknown
+  --> $DIR/reserved-guarded-strings.rs:45:12
+   |
+LL |     demo2!(blah"xx");
+   |            ^^^^ unknown prefix
+   |
+   = note: prefixed identifiers and literals are reserved since Rust 2021
+help: consider inserting whitespace here
+   |
+LL |     demo2!(blah "xx");
+   |                +
+
+error: prefix `blah` is unknown
+  --> $DIR/reserved-guarded-strings.rs:46:12
+   |
+LL |     demo2!(blah#"xx"#);
+   |            ^^^^ unknown prefix
+   |
+   = note: prefixed identifiers and literals are reserved since Rust 2021
+help: consider inserting whitespace here
+   |
+LL |     demo2!(blah #"xx"#);
+   |                +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:46:16
+   |
+LL |     demo2!(blah#"xx"#);
+   |                ^^^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo2!(blah# "xx"#);
+   |                 +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:50:12
+   |
+LL |     demo2!(## "foo");
+   |            ^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo2!(# # "foo");
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:51:17
+   |
+LL |     demo3!("foo"###);
+   |                 ^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo3!("foo"# ##);
+   |                  +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:52:12
+   |
+LL |     demo3!(### "foo");
+   |            ^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo3!(# ## "foo");
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:53:12
+   |
+LL |     demo3!(## "foo"#);
+   |            ^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo3!(# # "foo"#);
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:54:12
+   |
+LL |     demo5!(### "foo"###);
+   |            ^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo5!(# ## "foo"###);
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:54:21
+   |
+LL |     demo5!(### "foo"###);
+   |                     ^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo5!(### "foo"# ##);
+   |                      +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:58:12
+   |
+LL |     demo1!(#"");
+   |            ^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo1!(# "");
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:59:12
+   |
+LL |     demo1!(#""#);
+   |            ^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo1!(# ""#);
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:60:12
+   |
+LL |     demo1!(####"");
+   |            ^^^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo1!(# ###"");
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:61:12
+   |
+LL |     demo1!(#"foo");
+   |            ^^^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo1!(# "foo");
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:62:12
+   |
+LL |     demo1!(###"foo");
+   |            ^^^^^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo1!(# ##"foo");
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:63:12
+   |
+LL |     demo1!(#"foo"#);
+   |            ^^^^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo1!(# "foo"#);
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:64:12
+   |
+LL |     demo1!(###"foo"#);
+   |            ^^^^^^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo1!(# ##"foo"#);
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:65:12
+   |
+LL |     demo1!(###"foo"##);
+   |            ^^^^^^^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo1!(# ##"foo"##);
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:66:12
+   |
+LL |     demo1!(###"foo"###);
+   |            ^^^^^^^^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo1!(# ##"foo"###);
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:67:12
+   |
+LL |     demo2!(#"foo"###);
+   |            ^^^^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo2!(# "foo"###);
+   |             +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:67:19
+   |
+LL |     demo2!(#"foo"###);
+   |                   ^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demo2!(#"foo"## #);
+   |                    +
+
+error: invalid string literal
+  --> $DIR/reserved-guarded-strings.rs:72:12
+   |
+LL | ...n!(####################################################################################################################################################################################################################################################################"foo...
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: unprefixed guarded string literals are reserved for future use since Rust 2024
+help: consider inserting whitespace here
+   |
+LL |     demon!(# ###################################################################################################################################################################################################################################################################"foo");
+   |             +
+
+error: aborting due to 21 previous errors
+
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2021.stderr b/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2021.stderr
index 93797987286..ddc5477116f 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2021.stderr
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2021.stderr
@@ -1,21 +1,21 @@
-error: items in unadorned `extern` blocks cannot have safety qualifiers
+error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
   --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:8:5
    |
 LL |     safe static TEST1: i32;
    |     ^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: add unsafe to this `extern` block
+help: add `unsafe` to this `extern` block
    |
 LL | unsafe extern "C" {
    | ++++++
 
-error: items in unadorned `extern` blocks cannot have safety qualifiers
+error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
   --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:10:5
    |
 LL |     safe fn test1(i: i32);
    |     ^^^^^^^^^^^^^^^^^^^^^^
    |
-help: add unsafe to this `extern` block
+help: add `unsafe` to this `extern` block
    |
 LL | unsafe extern "C" {
    | ++++++
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2024.stderr b/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2024.stderr
index e9db6006c0b..ae7b4cd47c0 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2024.stderr
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2024.stderr
@@ -10,24 +10,24 @@ LL | |
 LL | | }
    | |_^
 
-error: items in unadorned `extern` blocks cannot have safety qualifiers
+error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
   --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:8:5
    |
 LL |     safe static TEST1: i32;
    |     ^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: add unsafe to this `extern` block
+help: add `unsafe` to this `extern` block
    |
 LL | unsafe extern "C" {
    | ++++++
 
-error: items in unadorned `extern` blocks cannot have safety qualifiers
+error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
   --> $DIR/safe-unsafe-on-unadorned-extern-block.rs:10:5
    |
 LL |     safe fn test1(i: i32);
    |     ^^^^^^^^^^^^^^^^^^^^^^
    |
-help: add unsafe to this `extern` block
+help: add `unsafe` to this `extern` block
    |
 LL | unsafe extern "C" {
    | ++++++
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.rs b/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.rs
index 4badb50b267..89415a69f08 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.rs
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.rs
@@ -6,9 +6,9 @@
 extern "C" {
     //[edition2024]~^ ERROR extern blocks must be unsafe
     safe static TEST1: i32;
-    //~^ ERROR items in unadorned `extern` blocks cannot have safety qualifiers
+    //~^ ERROR items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
     safe fn test1(i: i32);
-    //~^ ERROR items in unadorned `extern` blocks cannot have safety qualifiers
+    //~^ ERROR items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
 }
 
 fn test2() {
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.fixed b/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.fixed
index 857d34eef85..79983a64c2b 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.fixed
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.fixed
@@ -3,7 +3,7 @@
 #![allow(dead_code)]
 
 unsafe extern "C" {
-    unsafe fn foo(); //~ ERROR items in unadorned `extern` blocks cannot have safety qualifiers
+    unsafe fn foo(); //~ ERROR items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
 }
 
 fn main() {}
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.rs b/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.rs
index edab9850d79..cb84d3d1411 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.rs
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.rs
@@ -3,7 +3,7 @@
 #![allow(dead_code)]
 
 extern "C" {
-    unsafe fn foo(); //~ ERROR items in unadorned `extern` blocks cannot have safety qualifiers
+    unsafe fn foo(); //~ ERROR items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
 }
 
 fn main() {}
diff --git a/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.stderr b/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.stderr
index 073245e650b..cf1c0012f4d 100644
--- a/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.stderr
+++ b/tests/ui/rust-2024/unsafe-extern-blocks/unsafe-on-extern-block-issue-126756.stderr
@@ -1,10 +1,10 @@
-error: items in unadorned `extern` blocks cannot have safety qualifiers
+error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
   --> $DIR/unsafe-on-extern-block-issue-126756.rs:6:5
    |
 LL |     unsafe fn foo();
    |     ^^^^^^^^^^^^^^^^
    |
-help: add unsafe to this `extern` block
+help: add `unsafe` to this `extern` block
    |
 LL | unsafe extern "C" {
    | ++++++
diff --git a/tests/ui/sanitizer/cfi/async-closures.rs b/tests/ui/sanitizer/cfi/async-closures.rs
index d94f2992d84..4eaa44cfa3f 100644
--- a/tests/ui/sanitizer/cfi/async-closures.rs
+++ b/tests/ui/sanitizer/cfi/async-closures.rs
@@ -21,7 +21,7 @@ use std::ops::AsyncFn;
 #[inline(never)]
 fn identity<T>(x: T) -> T { x }
 
-// We can't actually create a `dyn AsyncFn()`, because it's not object-safe, but we should check
+// We can't actually create a `dyn AsyncFn()`, because it's dyn-incompatible, but we should check
 // that we don't bug out when we encounter one.
 
 fn main() {
diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.curr.stderr b/tests/ui/self/arbitrary-self-types-dyn-incompatible.curr.stderr
index e2d73fc08f6..2eb7597d5c1 100644
--- a/tests/ui/self/arbitrary-self-types-not-object-safe.curr.stderr
+++ b/tests/ui/self/arbitrary-self-types-dyn-incompatible.curr.stderr
@@ -1,5 +1,5 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/arbitrary-self-types-not-object-safe.rs:33:32
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:33:32
    |
 LL |     fn foo(self: &Rc<Self>) -> usize;
    |                  --------- help: consider changing method `foo`'s `self` parameter to be `&self`: `&Self`
@@ -8,7 +8,7 @@ LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
    |                                ^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/arbitrary-self-types-not-object-safe.rs:8:18
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -17,7 +17,7 @@ LL |     fn foo(self: &Rc<Self>) -> usize;
    = help: only type `usize` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/arbitrary-self-types-not-object-safe.rs:33:13
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:33:13
    |
 LL |     fn foo(self: &Rc<Self>) -> usize;
    |                  --------- help: consider changing method `foo`'s `self` parameter to be `&self`: `&Self`
@@ -26,7 +26,7 @@ LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
    |             ^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/arbitrary-self-types-not-object-safe.rs:8:18
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr b/tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr
index fda07765c66..02af692c4a3 100644
--- a/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr
+++ b/tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr
@@ -1,5 +1,5 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/arbitrary-self-types-not-object-safe.rs:33:13
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:33:13
    |
 LL |     fn foo(self: &Rc<Self>) -> usize;
    |                  --------- help: consider changing method `foo`'s `self` parameter to be `&self`: `&Self`
@@ -8,7 +8,7 @@ LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
    |             ^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/arbitrary-self-types-not-object-safe.rs:8:18
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.rs b/tests/ui/self/arbitrary-self-types-dyn-incompatible.rs
index 0053eb5f739..940b2f1e8e2 100644
--- a/tests/ui/self/arbitrary-self-types-not-object-safe.rs
+++ b/tests/ui/self/arbitrary-self-types-dyn-incompatible.rs
@@ -1,6 +1,6 @@
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 use std::rc::Rc;
 
@@ -33,7 +33,7 @@ fn make_foo() {
     let x = Rc::new(5usize) as Rc<dyn Foo>;
     //[curr]~^ ERROR E0038
     //[curr]~| ERROR E0038
-    //[object_safe_for_dispatch]~^^^ ERROR E0038
+    //[dyn_compatible_for_dispatch]~^^^ ERROR E0038
 }
 
 fn make_bar() {
diff --git a/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs b/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs
index d7149002e7b..76d7754384e 100644
--- a/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs
+++ b/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs
@@ -50,9 +50,9 @@ impl<T: DispatchFromDyn<U>, U> DispatchFromDyn<Wrapper<U>> for Wrapper<T> {}
 
 
 trait Trait {
-    // This method isn't object-safe yet. Unsized by-value `self` is object-safe (but not callable
-    // without unsized_locals), but wrappers arond `Self` currently are not.
-    // FIXME (mikeyhew) uncomment this when unsized rvalues object-safety is implemented
+    // This method isn't dyn-compatible yet. Unsized by-value `self` is dyn-compatible (but not
+    // callable without unsized_locals), but wrappers arond `Self` currently are not.
+    // FIXME (mikeyhew) uncomment this when unsized rvalues dyn-compatibility is implemented
     // fn wrapper(self: Wrapper<Self>) -> i32;
     fn ptr_wrapper(self: Ptr<Wrapper<Self>>) -> i32;
     fn wrapper_ptr(self: Wrapper<Ptr<Self>>) -> i32;
diff --git a/tests/ui/self/object-safety-sized-self-by-value-self.rs b/tests/ui/self/dyn-compatibility-sized-self-by-value-self.rs
index d902812eb9a..658371c95e2 100644
--- a/tests/ui/self/object-safety-sized-self-by-value-self.rs
+++ b/tests/ui/self/dyn-compatibility-sized-self-by-value-self.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 #![allow(unused_mut)]
-// Check that a trait is still object-safe (and usable) if it has
+// Check that a trait is still dyn-compatible (and usable) if it has
 // methods with by-value self so long as they require `Self : Sized`.
 
 
diff --git a/tests/ui/self/object-safety-sized-self-generic-method.rs b/tests/ui/self/dyn-compatibility-sized-self-generic-method.rs
index 7a2ebd2cb79..a7b5013694f 100644
--- a/tests/ui/self/object-safety-sized-self-generic-method.rs
+++ b/tests/ui/self/dyn-compatibility-sized-self-generic-method.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 #![allow(unused_variables)]
-// Check that a trait is still object-safe (and usable) if it has
+// Check that a trait is still dyn-compatible (and usable) if it has
 // generic methods so long as they require `Self : Sized`.
 
 
diff --git a/tests/ui/self/object-safety-sized-self-return-Self.rs b/tests/ui/self/dyn-compatibility-sized-self-return-Self.rs
index 9fc3f856772..a15f4fd7813 100644
--- a/tests/ui/self/object-safety-sized-self-return-Self.rs
+++ b/tests/ui/self/dyn-compatibility-sized-self-return-Self.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-// Check that a trait is still object-safe (and usable) if it has
+// Check that a trait is still dyn-compatible (and usable) if it has
 // methods that return `Self` so long as they require `Self : Sized`.
 
 
diff --git a/tests/ui/specialization/coherence/default-impl-normalization-ambig-2.rs b/tests/ui/specialization/coherence/default-impl-normalization-ambig-2.rs
new file mode 100644
index 00000000000..1691530fa0a
--- /dev/null
+++ b/tests/ui/specialization/coherence/default-impl-normalization-ambig-2.rs
@@ -0,0 +1,19 @@
+// regression test for #118987
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
+
+trait Assoc {
+    type Output;
+}
+
+default impl<T: Clone> Assoc for T {
+    type Output = bool;
+}
+
+impl Assoc for u8 {}
+
+trait Foo {}
+
+impl Foo for <u8 as Assoc>::Output {}
+impl Foo for <u16 as Assoc>::Output {}
+//~^ ERROR the trait bound `u16: Assoc` is not satisfied
+fn main() {}
diff --git a/tests/ui/specialization/coherence/default-impl-normalization-ambig-2.stderr b/tests/ui/specialization/coherence/default-impl-normalization-ambig-2.stderr
new file mode 100644
index 00000000000..a2fca2ef5b6
--- /dev/null
+++ b/tests/ui/specialization/coherence/default-impl-normalization-ambig-2.stderr
@@ -0,0 +1,21 @@
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/default-impl-normalization-ambig-2.rs:2:12
+   |
+LL | #![feature(specialization)]
+   |            ^^^^^^^^^^^^^^
+   |
+   = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+   = help: consider using `min_specialization` instead, which is more stable and complete
+   = note: `#[warn(incomplete_features)]` on by default
+
+error[E0277]: the trait bound `u16: Assoc` is not satisfied
+  --> $DIR/default-impl-normalization-ambig-2.rs:17:14
+   |
+LL | impl Foo for <u16 as Assoc>::Output {}
+   |              ^^^^^^^^^^^^^^^^^^^^^^ the trait `Assoc` is not implemented for `u16`
+   |
+   = help: the trait `Assoc` is implemented for `u8`
+
+error: aborting due to 1 previous error; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/specialization/coherence/default-item-normalization-ambig-1.rs b/tests/ui/specialization/coherence/default-item-normalization-ambig-1.rs
new file mode 100644
index 00000000000..af7cf332d5f
--- /dev/null
+++ b/tests/ui/specialization/coherence/default-item-normalization-ambig-1.rs
@@ -0,0 +1,25 @@
+// regression test for #73299.
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
+
+trait X {
+    type U;
+    fn f(&self) -> Self::U {
+        loop {}
+    }
+}
+
+impl<T> X for T {
+    default type U = ();
+}
+
+trait Y {
+    fn g(&self) {}
+}
+
+impl Y for <() as X>::U {}
+impl Y for <i32 as X>::U {}
+//~^ ERROR conflicting implementations of trait `Y` for type `<() as X>::U`
+
+fn main() {
+    ().f().g();
+}
diff --git a/tests/ui/specialization/coherence/default-item-normalization-ambig-1.stderr b/tests/ui/specialization/coherence/default-item-normalization-ambig-1.stderr
new file mode 100644
index 00000000000..a15151cc9c4
--- /dev/null
+++ b/tests/ui/specialization/coherence/default-item-normalization-ambig-1.stderr
@@ -0,0 +1,21 @@
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/default-item-normalization-ambig-1.rs:2:12
+   |
+LL | #![feature(specialization)]
+   |            ^^^^^^^^^^^^^^
+   |
+   = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+   = help: consider using `min_specialization` instead, which is more stable and complete
+   = note: `#[warn(incomplete_features)]` on by default
+
+error[E0119]: conflicting implementations of trait `Y` for type `<() as X>::U`
+  --> $DIR/default-item-normalization-ambig-1.rs:20:1
+   |
+LL | impl Y for <() as X>::U {}
+   | ----------------------- first implementation here
+LL | impl Y for <i32 as X>::U {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<() as X>::U`
+
+error: aborting due to 1 previous error; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/specialization/defaultimpl/specialization-no-default.rs b/tests/ui/specialization/defaultimpl/specialization-no-default.rs
index 661724eef8a..ddc32337306 100644
--- a/tests/ui/specialization/defaultimpl/specialization-no-default.rs
+++ b/tests/ui/specialization/defaultimpl/specialization-no-default.rs
@@ -71,7 +71,8 @@ impl<T: Clone> Redundant for T {
 }
 
 default impl Redundant for i32 {
-    fn redundant(&self) {} //~ ERROR E0520
+    fn redundant(&self) {}
+    //~^ ERROR `redundant` specializes an item from a parent `impl`, but that item is not marked `default`
 }
 
 fn main() {}
diff --git a/tests/ui/specialization/issue-44861.rs b/tests/ui/specialization/issue-44861.rs
index 79d9b9490d0..9d6517e613a 100644
--- a/tests/ui/specialization/issue-44861.rs
+++ b/tests/ui/specialization/issue-44861.rs
@@ -12,9 +12,9 @@ pub trait Smartass {
     type Data2: CoerceUnsized<*const [u8]>;
 }
 
-pub trait MaybeObjectSafe {}
+pub trait MaybeDynCompatible {}
 
-impl MaybeObjectSafe for () {}
+impl MaybeDynCompatible for () {}
 
 impl<T> Smartass for T {
     type Data = <Self as Smartass>::Data2;
@@ -26,7 +26,7 @@ impl Smartass for () {
     type Data2 = *const [u8; 1];
 }
 
-impl Smartass for dyn MaybeObjectSafe {
+impl Smartass for dyn MaybeDynCompatible {
     type Data = *const [u8];
     type Data2 = *const [u8; 0];
 }
@@ -35,6 +35,6 @@ impl<U: Smartass+?Sized, T: Smartass+?Sized> CoerceUnsized<SmartassPtr<T>> for S
     where <U as Smartass>::Data: std::ops::CoerceUnsized<<T as Smartass>::Data>
 {}
 
-pub fn conv(s: SmartassPtr<()>) -> SmartassPtr<dyn MaybeObjectSafe> {
+pub fn conv(s: SmartassPtr<()>) -> SmartassPtr<dyn MaybeDynCompatible> {
     s
 }
diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.current.stderr b/tests/ui/specialization/specialization-default-items-drop-coherence.current.stderr
new file mode 100644
index 00000000000..36df6bfd9fc
--- /dev/null
+++ b/tests/ui/specialization/specialization-default-items-drop-coherence.current.stderr
@@ -0,0 +1,12 @@
+error[E0119]: conflicting implementations of trait `Overlap` for type `u32`
+  --> $DIR/specialization-default-items-drop-coherence.rs:26:1
+   |
+LL | impl Overlap for u32 {
+   | -------------------- first implementation here
+...
+LL | impl Overlap for <u32 as Default>::Id {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr b/tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr
index e9498a00317..36df6bfd9fc 100644
--- a/tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr
+++ b/tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `Overlap` for type `u32`
-  --> $DIR/specialization-default-items-drop-coherence.rs:29:1
+  --> $DIR/specialization-default-items-drop-coherence.rs:26:1
    |
 LL | impl Overlap for u32 {
    | -------------------- first implementation here
diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.rs b/tests/ui/specialization/specialization-default-items-drop-coherence.rs
index 6dc01277639..b3c1f72777c 100644
--- a/tests/ui/specialization/specialization-default-items-drop-coherence.rs
+++ b/tests/ui/specialization/specialization-default-items-drop-coherence.rs
@@ -1,8 +1,5 @@
-//@ revisions: classic coherence next
+//@ revisions: current next
 //@[next] compile-flags: -Znext-solver
-//@[coherence] compile-flags: -Znext-solver=coherence
-//@[classic] check-pass
-//@[classic] known-bug: #105782
 
 // Should fail. Default items completely drop candidates instead of ambiguity,
 // which is unsound during coherence, since coherence requires completeness.
@@ -27,8 +24,7 @@ impl Overlap for u32 {
 }
 
 impl Overlap for <u32 as Default>::Id {
-    //[coherence]~^ ERROR conflicting implementations of trait `Overlap` for type `u32`
-    //[next]~^^ ERROR conflicting implementations of trait `Overlap` for type `u32`
+    //~^ ERROR conflicting implementations of trait `Overlap` for type `u32`
     type Assoc = Box<usize>;
 }
 
diff --git a/tests/ui/specialization/specialization-overlap-projection.current.stderr b/tests/ui/specialization/specialization-overlap-projection.current.stderr
index a69826fa96b..4e77cb17fbb 100644
--- a/tests/ui/specialization/specialization-overlap-projection.current.stderr
+++ b/tests/ui/specialization/specialization-overlap-projection.current.stderr
@@ -1,5 +1,5 @@
 warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/specialization-overlap-projection.rs:10:12
+  --> $DIR/specialization-overlap-projection.rs:4:12
    |
 LL | #![feature(specialization)]
    |            ^^^^^^^^^^^^^^
@@ -8,5 +8,23 @@ LL | #![feature(specialization)]
    = help: consider using `min_specialization` instead, which is more stable and complete
    = note: `#[warn(incomplete_features)]` on by default
 
-warning: 1 warning emitted
+error[E0119]: conflicting implementations of trait `Foo` for type `u32`
+  --> $DIR/specialization-overlap-projection.rs:19:1
+   |
+LL | impl Foo for u32 {}
+   | ---------------- first implementation here
+LL | impl Foo for <u8 as Assoc>::Output {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32`
+
+error[E0119]: conflicting implementations of trait `Foo` for type `u32`
+  --> $DIR/specialization-overlap-projection.rs:21:1
+   |
+LL | impl Foo for u32 {}
+   | ---------------- first implementation here
+...
+LL | impl Foo for <u16 as Assoc>::Output {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32`
+
+error: aborting due to 2 previous errors; 1 warning emitted
 
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/specialization/specialization-overlap-projection.next.stderr b/tests/ui/specialization/specialization-overlap-projection.next.stderr
index 5b17696162e..4e77cb17fbb 100644
--- a/tests/ui/specialization/specialization-overlap-projection.next.stderr
+++ b/tests/ui/specialization/specialization-overlap-projection.next.stderr
@@ -1,5 +1,5 @@
 warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/specialization-overlap-projection.rs:10:12
+  --> $DIR/specialization-overlap-projection.rs:4:12
    |
 LL | #![feature(specialization)]
    |            ^^^^^^^^^^^^^^
@@ -9,7 +9,7 @@ LL | #![feature(specialization)]
    = note: `#[warn(incomplete_features)]` on by default
 
 error[E0119]: conflicting implementations of trait `Foo` for type `u32`
-  --> $DIR/specialization-overlap-projection.rs:25:1
+  --> $DIR/specialization-overlap-projection.rs:19:1
    |
 LL | impl Foo for u32 {}
    | ---------------- first implementation here
@@ -17,7 +17,7 @@ LL | impl Foo for <u8 as Assoc>::Output {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32`
 
 error[E0119]: conflicting implementations of trait `Foo` for type `u32`
-  --> $DIR/specialization-overlap-projection.rs:27:1
+  --> $DIR/specialization-overlap-projection.rs:21:1
    |
 LL | impl Foo for u32 {}
    | ---------------- first implementation here
diff --git a/tests/ui/specialization/specialization-overlap-projection.rs b/tests/ui/specialization/specialization-overlap-projection.rs
index 16dccf82dcb..f7a2a792243 100644
--- a/tests/ui/specialization/specialization-overlap-projection.rs
+++ b/tests/ui/specialization/specialization-overlap-projection.rs
@@ -1,13 +1,8 @@
-//@ revisions: current next
-//@ ignore-compare-mode-next-solver (explicit revisions)
-//@[next] compile-flags: -Znext-solver
-//@[current] check-pass
-
 // Test that impls on projected self types can resolve overlap, even when the
 // projections involve specialization, so long as the associated type is
 // provided by the most specialized impl.
-
-#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
+#![feature(specialization)]
+//~^ WARN the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
 
 trait Assoc {
     type Output;
@@ -23,8 +18,8 @@ impl Assoc for u16 { type Output = u16; }
 trait Foo {}
 impl Foo for u32 {}
 impl Foo for <u8 as Assoc>::Output {}
-//[next]~^ ERROR conflicting implementations of trait `Foo` for type `u32`
+//~^ ERROR conflicting implementations of trait `Foo` for type `u32`
 impl Foo for <u16 as Assoc>::Output {}
-//[next]~^ ERROR conflicting implementations of trait `Foo` for type `u32`
+//~^ ERROR conflicting implementations of trait `Foo` for type `u32`
 
 fn main() {}
diff --git a/tests/ui/specialization/specialization-overlap-projection.stderr b/tests/ui/specialization/specialization-overlap-projection.stderr
new file mode 100644
index 00000000000..5f3cd9c66cf
--- /dev/null
+++ b/tests/ui/specialization/specialization-overlap-projection.stderr
@@ -0,0 +1,30 @@
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/specialization-overlap-projection.rs:4:12
+   |
+LL | #![feature(specialization)]
+   |            ^^^^^^^^^^^^^^
+   |
+   = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+   = help: consider using `min_specialization` instead, which is more stable and complete
+   = note: `#[warn(incomplete_features)]` on by default
+
+error[E0119]: conflicting implementations of trait `Foo` for type `u32`
+  --> $DIR/specialization-overlap-projection.rs:20:1
+   |
+LL | impl Foo for u32 {}
+   | ---------------- first implementation here
+LL | impl Foo for <u8 as Assoc>::Output {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32`
+
+error[E0119]: conflicting implementations of trait `Foo` for type `u32`
+  --> $DIR/specialization-overlap-projection.rs:22:1
+   |
+LL | impl Foo for u32 {}
+   | ---------------- first implementation here
+...
+LL | impl Foo for <u16 as Assoc>::Output {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32`
+
+error: aborting due to 2 previous errors; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/issues/issue-12699.rs b/tests/ui/std/thread-sleep-ms.rs
index 4fc93735c3c..0a3d0253a20 100644
--- a/tests/ui/issues/issue-12699.rs
+++ b/tests/ui/std/thread-sleep-ms.rs
@@ -1,6 +1,9 @@
 //@ run-pass
 //@ ignore-sgx not supported
+//@ ignore-emscripten
+// FIXME: test hangs on emscripten
 #![allow(deprecated)]
+#![allow(unused_imports)]
 
 use std::thread;
 
diff --git a/tests/ui/structs-enums/rec-align-u64.rs b/tests/ui/structs-enums/rec-align-u64.rs
index 8ea72fdf45c..313ce6d578d 100644
--- a/tests/ui/structs-enums/rec-align-u64.rs
+++ b/tests/ui/structs-enums/rec-align-u64.rs
@@ -33,7 +33,6 @@ struct Outer {
 #[cfg(any(
     target_os = "android",
     target_os = "dragonfly",
-    target_os = "emscripten",
     target_os = "freebsd",
     target_os = "fuchsia",
     target_os = "hurd",
diff --git a/tests/ui/suggestions/auxiliary/not-object-safe.rs b/tests/ui/suggestions/auxiliary/dyn-incompatible.rs
index 7c9829b823e..7c9829b823e 100644
--- a/tests/ui/suggestions/auxiliary/not-object-safe.rs
+++ b/tests/ui/suggestions/auxiliary/dyn-incompatible.rs
diff --git a/tests/ui/suggestions/object-unsafe-trait-references-self.rs b/tests/ui/suggestions/dyn-incompatible-trait-references-self.rs
index 4b3d5faba46..4b3d5faba46 100644
--- a/tests/ui/suggestions/object-unsafe-trait-references-self.rs
+++ b/tests/ui/suggestions/dyn-incompatible-trait-references-self.rs
diff --git a/tests/ui/suggestions/object-unsafe-trait-references-self.stderr b/tests/ui/suggestions/dyn-incompatible-trait-references-self.stderr
index c00bb3efbf6..242c44abd9d 100644
--- a/tests/ui/suggestions/object-unsafe-trait-references-self.stderr
+++ b/tests/ui/suggestions/dyn-incompatible-trait-references-self.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/object-unsafe-trait-references-self.rs:9:12
+  --> $DIR/dyn-incompatible-trait-references-self.rs:9:12
    |
 LL | fn bar(x: &dyn Trait) {}
    |            ^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-references-self.rs:2:22
+  --> $DIR/dyn-incompatible-trait-references-self.rs:2:22
    |
 LL | trait Trait {
    |       ----- this trait cannot be made into an object...
@@ -18,13 +18,13 @@ LL |     fn bat(&self) -> Self {}
    = help: consider moving `bat` to another trait
 
 error[E0038]: the trait `Other` cannot be made into an object
-  --> $DIR/object-unsafe-trait-references-self.rs:13:12
+  --> $DIR/dyn-incompatible-trait-references-self.rs:13:12
    |
 LL | fn foo(x: &dyn Other) {}
    |            ^^^^^^^^^ `Other` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-references-self.rs:11:14
+  --> $DIR/dyn-incompatible-trait-references-self.rs:11:14
    |
 LL | trait Other: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
@@ -32,7 +32,7 @@ LL | trait Other: Sized {}
    |       this trait cannot be made into an object...
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
-  --> $DIR/object-unsafe-trait-references-self.rs:2:22
+  --> $DIR/dyn-incompatible-trait-references-self.rs:2:22
    |
 LL |     fn baz(&self, _: Self) {}
    |                      ^^^^ doesn't have a size known at compile-time
@@ -48,7 +48,7 @@ LL |     fn baz(&self, _: &Self) {}
    |                      +
 
 error[E0308]: mismatched types
-  --> $DIR/object-unsafe-trait-references-self.rs:4:27
+  --> $DIR/dyn-incompatible-trait-references-self.rs:4:27
    |
 LL | trait Trait {
    | ----------- expected this type parameter
@@ -60,7 +60,7 @@ LL |     fn bat(&self) -> Self {}
                    found unit type `()`
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
-  --> $DIR/object-unsafe-trait-references-self.rs:4:22
+  --> $DIR/dyn-incompatible-trait-references-self.rs:4:22
    |
 LL |     fn bat(&self) -> Self {}
    |                      ^^^^ doesn't have a size known at compile-time
diff --git a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs
new file mode 100644
index 00000000000..10b4781eb04
--- /dev/null
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs
@@ -0,0 +1,22 @@
+//@ edition:2021
+#![allow(bare_trait_objects)]
+trait A: Sized {
+    fn f(a: A) -> A;
+    //~^ ERROR expected a type, found a trait
+    //~| ERROR expected a type, found a trait
+    //~| ERROR associated item referring to unboxed trait object for its own trait
+}
+trait B {
+    fn f(b: B) -> B;
+    //~^ ERROR expected a type, found a trait
+    //~| ERROR expected a type, found a trait
+    //~| ERROR associated item referring to unboxed trait object for its own trait
+}
+trait C {
+    fn f(&self, c: C) -> C;
+    //~^ ERROR expected a type, found a trait
+    //~| ERROR expected a type, found a trait
+    //~| ERROR associated item referring to unboxed trait object for its own trait
+}
+
+fn main() {}
diff --git a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.stderr
new file mode 100644
index 00000000000..c0cfb18955c
--- /dev/null
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.stderr
@@ -0,0 +1,123 @@
+error: associated item referring to unboxed trait object for its own trait
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:4:13
+   |
+LL | trait A: Sized {
+   |       - in this trait
+LL |     fn f(a: A) -> A;
+   |             ^     ^
+   |
+help: you might have meant to use `Self` to refer to the implementing type
+   |
+LL |     fn f(a: Self) -> Self;
+   |             ~~~~     ~~~~
+
+error: associated item referring to unboxed trait object for its own trait
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:10:13
+   |
+LL | trait B {
+   |       - in this trait
+LL |     fn f(b: B) -> B;
+   |             ^     ^
+   |
+help: you might have meant to use `Self` to refer to the implementing type
+   |
+LL |     fn f(b: Self) -> Self;
+   |             ~~~~     ~~~~
+
+error: associated item referring to unboxed trait object for its own trait
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:16:20
+   |
+LL | trait C {
+   |       - in this trait
+LL |     fn f(&self, c: C) -> C;
+   |                    ^     ^
+   |
+help: you might have meant to use `Self` to refer to the implementing type
+   |
+LL |     fn f(&self, c: Self) -> Self;
+   |                    ~~~~     ~~~~
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:4:13
+   |
+LL |     fn f(a: A) -> A;
+   |             ^
+   |
+   = note: `A` it is dyn-incompatible, so it can't be `dyn`
+help: use a new generic type parameter, constrained by `A`
+   |
+LL |     fn f<T: A>(a: T) -> A;
+   |         ++++++    ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL |     fn f(a: impl A) -> A;
+   |             ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:4:19
+   |
+LL |     fn f(a: A) -> A;
+   |                   ^
+   |
+help: `A` is dyn-incompatible, use `impl A` to return an opaque type, as long as you return a single underlying type
+   |
+LL |     fn f(a: A) -> impl A;
+   |                   ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:10:13
+   |
+LL |     fn f(b: B) -> B;
+   |             ^
+   |
+   = note: `B` it is dyn-incompatible, so it can't be `dyn`
+help: use a new generic type parameter, constrained by `B`
+   |
+LL |     fn f<T: B>(b: T) -> B;
+   |         ++++++    ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL |     fn f(b: impl B) -> B;
+   |             ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:10:19
+   |
+LL |     fn f(b: B) -> B;
+   |                   ^
+   |
+help: `B` is dyn-incompatible, use `impl B` to return an opaque type, as long as you return a single underlying type
+   |
+LL |     fn f(b: B) -> impl B;
+   |                   ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:16:20
+   |
+LL |     fn f(&self, c: C) -> C;
+   |                    ^
+   |
+   = note: `C` it is dyn-incompatible, so it can't be `dyn`
+help: use a new generic type parameter, constrained by `C`
+   |
+LL |     fn f<T: C>(&self, c: T) -> C;
+   |         ++++++           ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL |     fn f(&self, c: impl C) -> C;
+   |                    ++++
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:16:26
+   |
+LL |     fn f(&self, c: C) -> C;
+   |                          ^
+   |
+help: `C` is dyn-incompatible, use `impl C` to return an opaque type, as long as you return a single underlying type
+   |
+LL |     fn f(&self, c: C) -> impl C;
+   |                          ++++
+
+error: aborting due to 9 previous errors
+
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.rs
index 4ab10f40eb6..4ab10f40eb6 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.rs
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr
index a7d36d9ebee..5e0d1a14452 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.stderr
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr
@@ -1,5 +1,5 @@
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self-2021.rs:4:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:4:13
    |
 LL | trait A: Sized {
    |       - in this trait
@@ -12,13 +12,13 @@ LL |     fn f(a: Self) -> Self;
    |             ~~~~     ~~~~
 
 error[E0038]: the trait `A` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self-2021.rs:4:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:4:13
    |
 LL |     fn f(a: dyn A) -> dyn A;
    |             ^^^^^ `A` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self-2021.rs:3:10
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:3:10
    |
 LL | trait A: Sized {
    |       -  ^^^^^ ...because it requires `Self: Sized`
@@ -26,7 +26,7 @@ LL | trait A: Sized {
    |       this trait cannot be made into an object...
 
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self-2021.rs:9:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:9:13
    |
 LL | trait B {
    |       - in this trait
@@ -39,13 +39,13 @@ LL |     fn f(a: Self) -> Self;
    |             ~~~~     ~~~~
 
 error[E0038]: the trait `B` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self-2021.rs:9:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:9:13
    |
 LL |     fn f(a: dyn B) -> dyn B;
    |             ^^^^^ `B` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self-2021.rs:9:8
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:9:8
    |
 LL | trait B {
    |       - this trait cannot be made into an object...
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self.rs b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.rs
index 75f99075eb1..75f99075eb1 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-self.rs
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.rs
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr
index 28952933c64..93f6ea2b12e 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-self.stderr
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr
@@ -1,5 +1,5 @@
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self.rs:3:13
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:3:13
    |
 LL | trait A: Sized {
    |       - in this trait
@@ -12,13 +12,13 @@ LL |     fn f(a: Self) -> Self;
    |             ~~~~     ~~~~
 
 error[E0038]: the trait `A` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self.rs:3:13
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:3:13
    |
 LL |     fn f(a: A) -> A;
    |             ^ `A` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self.rs:2:10
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:2:10
    |
 LL | trait A: Sized {
    |       -  ^^^^^ ...because it requires `Self: Sized`
@@ -26,7 +26,7 @@ LL | trait A: Sized {
    |       this trait cannot be made into an object...
 
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self.rs:8:13
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:8:13
    |
 LL | trait B {
    |       - in this trait
@@ -39,13 +39,13 @@ LL |     fn f(a: Self) -> Self;
    |             ~~~~     ~~~~
 
 error[E0038]: the trait `B` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self.rs:8:13
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:8:13
    |
 LL |     fn f(a: B) -> B;
    |             ^ `B` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self.rs:8:8
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:8:8
    |
 LL | trait B {
    |       - this trait cannot be made into an object...
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.fixed
index fd9b78934c7..fd9b78934c7 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.fixed
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.rs
index e4aa0d89239..e4aa0d89239 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.rs
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr
index 5e3a0290d42..beafd7c2ab0 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.stderr
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-where-sized.rs:9:12
+  --> $DIR/dyn-incompatible-trait-should-use-where-sized.rs:9:12
    |
 LL | fn bar(x: &dyn Trait) {}
    |            ^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-where-sized.rs:5:8
+  --> $DIR/dyn-incompatible-trait-should-use-where-sized.rs:5:8
    |
 LL | trait Trait {
    |       ----- this trait cannot be made into an object...
@@ -27,7 +27,7 @@ LL |     fn bar(self: &Self) {}
    |                  ~~~~~
 
 error[E0307]: invalid `self` parameter type: `()`
-  --> $DIR/object-unsafe-trait-should-use-where-sized.rs:6:18
+  --> $DIR/dyn-incompatible-trait-should-use-where-sized.rs:6:18
    |
 LL |     fn bar(self: ()) {}
    |                  ^^
diff --git a/tests/ui/suggestions/issue-104328.rs b/tests/ui/suggestions/issue-104328.rs
index c3707baf79f..2b0fbdb8d35 100644
--- a/tests/ui/suggestions/issue-104328.rs
+++ b/tests/ui/suggestions/issue-104328.rs
@@ -1,4 +1,4 @@
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Foo {
     fn f() {}
diff --git a/tests/ui/suggestions/issue-116434-2021.rs b/tests/ui/suggestions/issue-116434-2021.rs
index 6feba3dc6c1..77cdfb8b614 100644
--- a/tests/ui/suggestions/issue-116434-2021.rs
+++ b/tests/ui/suggestions/issue-116434-2021.rs
@@ -3,7 +3,8 @@
 trait Foo {
     type Clone;
     fn foo() -> Clone;
-    //~^ ERROR the trait `Clone` cannot be made into an object [E0038]
+    //~^ ERROR expected a type, found a trait
+    //~| HELP `Clone` is dyn-incompatible, use `impl Clone` to return an opaque type, as long as you return a single underlying type
     //~| HELP there is an associated type with the same name
 }
 
@@ -12,7 +13,8 @@ trait DbHandle: Sized {}
 trait DbInterface {
     type DbHandle;
     fn handle() -> DbHandle;
-    //~^ ERROR the trait `DbHandle` cannot be made into an object [E0038]
+    //~^ ERROR expected a type, found a trait
+    //~| HELP `DbHandle` is dyn-incompatible, use `impl DbHandle` to return an opaque type, as long as you return a single underlying type
     //~| HELP there is an associated type with the same name
 }
 
diff --git a/tests/ui/suggestions/issue-116434-2021.stderr b/tests/ui/suggestions/issue-116434-2021.stderr
index 7f8cc147210..3853f03f1db 100644
--- a/tests/ui/suggestions/issue-116434-2021.stderr
+++ b/tests/ui/suggestions/issue-116434-2021.stderr
@@ -1,29 +1,28 @@
-error[E0038]: the trait `Clone` cannot be made into an object
+error[E0782]: expected a type, found a trait
   --> $DIR/issue-116434-2021.rs:5:17
    |
 LL |     fn foo() -> Clone;
-   |                 ^^^^^ `Clone` cannot be made into an object
+   |                 ^^^^^
    |
-   = note: the trait cannot be made into an object because it requires `Self: Sized`
-   = note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+help: `Clone` is dyn-incompatible, use `impl Clone` to return an opaque type, as long as you return a single underlying type
+   |
+LL |     fn foo() -> impl Clone;
+   |                 ++++
 help: there is an associated type with the same name
    |
 LL |     fn foo() -> Self::Clone;
    |                 ++++++
 
-error[E0038]: the trait `DbHandle` cannot be made into an object
-  --> $DIR/issue-116434-2021.rs:14:20
+error[E0782]: expected a type, found a trait
+  --> $DIR/issue-116434-2021.rs:15:20
    |
 LL |     fn handle() -> DbHandle;
-   |                    ^^^^^^^^ `DbHandle` cannot be made into an object
+   |                    ^^^^^^^^
    |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-116434-2021.rs:10:17
+help: `DbHandle` is dyn-incompatible, use `impl DbHandle` to return an opaque type, as long as you return a single underlying type
    |
-LL | trait DbHandle: Sized {}
-   |       --------  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait cannot be made into an object...
+LL |     fn handle() -> impl DbHandle;
+   |                    ++++
 help: there is an associated type with the same name
    |
 LL |     fn handle() -> Self::DbHandle;
@@ -31,4 +30,4 @@ LL |     fn handle() -> Self::DbHandle;
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0038`.
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/suggestions/issue-98500.rs b/tests/ui/suggestions/issue-98500.rs
index b6fd9e7c23f..289b16abf4b 100644
--- a/tests/ui/suggestions/issue-98500.rs
+++ b/tests/ui/suggestions/issue-98500.rs
@@ -1,9 +1,9 @@
-//@ aux-build:not-object-safe.rs
+//@ aux-build:dyn-incompatible.rs
 
-extern crate not_object_safe;
+extern crate dyn_incompatible;
 
 pub trait B where
-    Self: not_object_safe::A,
+    Self: dyn_incompatible::A,
 {
     fn f2(&self);
 }
diff --git a/tests/ui/suggestions/issue-98500.stderr b/tests/ui/suggestions/issue-98500.stderr
index c4b446763af..d7136ec1a64 100644
--- a/tests/ui/suggestions/issue-98500.stderr
+++ b/tests/ui/suggestions/issue-98500.stderr
@@ -5,7 +5,7 @@ LL | struct S(Box<dyn B>);
    |              ^^^^^ `B` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/auxiliary/not-object-safe.rs:4:8
+  --> $DIR/auxiliary/dyn-incompatible.rs:4:8
    |
 LL |     fn f();
    |        ^ ...because associated function `f` has no `self` parameter
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs b/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs
deleted file mode 100644
index 37afab6b643..00000000000
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-//@ edition:2021
-#![allow(bare_trait_objects)]
-trait A: Sized {
-    fn f(a: A) -> A;
-    //~^ ERROR trait objects must include the `dyn` keyword
-    //~| ERROR trait objects must include the `dyn` keyword
-    //~| ERROR associated item referring to unboxed trait object for its own trait
-    //~| ERROR the trait `A` cannot be made into an object
-}
-trait B {
-    fn f(b: B) -> B;
-    //~^ ERROR trait objects must include the `dyn` keyword
-    //~| ERROR trait objects must include the `dyn` keyword
-    //~| ERROR associated item referring to unboxed trait object for its own trait
-    //~| ERROR the trait `B` cannot be made into an object
-}
-trait C {
-    fn f(&self, c: C) -> C;
-    //~^ ERROR trait objects must include the `dyn` keyword
-    //~| ERROR trait objects must include the `dyn` keyword
-    //~| ERROR associated item referring to unboxed trait object for its own trait
-    //~| ERROR the trait `C` cannot be made into an object
-}
-
-fn main() {}
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.stderr b/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.stderr
deleted file mode 100644
index a17f821ebec..00000000000
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.stderr
+++ /dev/null
@@ -1,176 +0,0 @@
-error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:4:13
-   |
-LL | trait A: Sized {
-   |       - in this trait
-LL |     fn f(a: A) -> A;
-   |             ^     ^
-   |
-help: you might have meant to use `Self` to refer to the implementing type
-   |
-LL |     fn f(a: Self) -> Self;
-   |             ~~~~     ~~~~
-
-error[E0038]: the trait `A` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:4:13
-   |
-LL |     fn f(a: A) -> A;
-   |             ^ `A` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:3:10
-   |
-LL | trait A: Sized {
-   |       -  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait cannot be made into an object...
-
-error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:11:13
-   |
-LL | trait B {
-   |       - in this trait
-LL |     fn f(b: B) -> B;
-   |             ^     ^
-   |
-help: you might have meant to use `Self` to refer to the implementing type
-   |
-LL |     fn f(b: Self) -> Self;
-   |             ~~~~     ~~~~
-
-error[E0038]: the trait `B` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:11:13
-   |
-LL |     fn f(b: B) -> B;
-   |             ^ `B` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:11:8
-   |
-LL | trait B {
-   |       - this trait cannot be made into an object...
-LL |     fn f(b: B) -> B;
-   |        ^ ...because associated function `f` has no `self` parameter
-help: consider turning `f` into a method by giving it a `&self` argument
-   |
-LL |     fn f(&self, b: B) -> B;
-   |          ++++++
-help: alternatively, consider constraining `f` so it does not apply to trait objects
-   |
-LL |     fn f(b: B) -> B where Self: Sized;
-   |                     +++++++++++++++++
-
-error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:18:20
-   |
-LL | trait C {
-   |       - in this trait
-LL |     fn f(&self, c: C) -> C;
-   |                    ^     ^
-   |
-help: you might have meant to use `Self` to refer to the implementing type
-   |
-LL |     fn f(&self, c: Self) -> Self;
-   |                    ~~~~     ~~~~
-
-error[E0038]: the trait `C` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:18:20
-   |
-LL |     fn f(&self, c: C) -> C;
-   |          -----     ^ `C` cannot be made into an object
-   |          |
-   |          help: consider changing method `f`'s `self` parameter to be `&self` (notice the capitalization): `&Self`
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:18:10
-   |
-LL | trait C {
-   |       - this trait cannot be made into an object...
-LL |     fn f(&self, c: C) -> C;
-   |          ^^^^^ ...because method `f`'s `self` parameter cannot be dispatched on
-
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:4:13
-   |
-LL |     fn f(a: A) -> A;
-   |             ^
-   |
-   = note: `A` it is dyn-incompatible, so it can't be `dyn`
-help: use a new generic type parameter, constrained by `A`
-   |
-LL |     fn f<T: A>(a: T) -> A;
-   |         ++++++    ~
-help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
-   |
-LL |     fn f(a: impl A) -> A;
-   |             ++++
-
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:4:19
-   |
-LL |     fn f(a: A) -> A;
-   |                   ^
-   |
-help: `A` is dyn-incompatible, use `impl A` to return an opaque type, as long as you return a single underlying type
-   |
-LL |     fn f(a: A) -> impl A;
-   |                   ++++
-
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:11:13
-   |
-LL |     fn f(b: B) -> B;
-   |             ^
-   |
-   = note: `B` it is dyn-incompatible, so it can't be `dyn`
-help: use a new generic type parameter, constrained by `B`
-   |
-LL |     fn f<T: B>(b: T) -> B;
-   |         ++++++    ~
-help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
-   |
-LL |     fn f(b: impl B) -> B;
-   |             ++++
-
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:11:19
-   |
-LL |     fn f(b: B) -> B;
-   |                   ^
-   |
-help: `B` is dyn-incompatible, use `impl B` to return an opaque type, as long as you return a single underlying type
-   |
-LL |     fn f(b: B) -> impl B;
-   |                   ++++
-
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:18:20
-   |
-LL |     fn f(&self, c: C) -> C;
-   |                    ^
-   |
-   = note: `C` it is dyn-incompatible, so it can't be `dyn`
-help: use a new generic type parameter, constrained by `C`
-   |
-LL |     fn f<T: C>(&self, c: T) -> C;
-   |         ++++++           ~
-help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
-   |
-LL |     fn f(&self, c: impl C) -> C;
-   |                    ++++
-
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:18:26
-   |
-LL |     fn f(&self, c: C) -> C;
-   |                          ^
-   |
-help: `C` is dyn-incompatible, use `impl C` to return an opaque type, as long as you return a single underlying type
-   |
-LL |     fn f(&self, c: C) -> impl C;
-   |                          ++++
-
-error: aborting due to 12 previous errors
-
-Some errors have detailed explanations: E0038, E0782.
-For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs b/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs
index 76300c6a3f4..dd7e203abd7 100644
--- a/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs
+++ b/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs
@@ -11,48 +11,48 @@ trait LocalTraitTwo { }
 trait GenericTrait<T> {}
 
 impl LocalTraitTwo for LocalTraitOne {}
-//~^ ERROR trait objects must include the `dyn` keyword
-//~| HELP add `dyn` keyword before this trait
+//~^ ERROR expected a type, found a trait
+//~| HELP you can add the `dyn` keyword if you want a trait object
 //~| HELP alternatively use a blanket implementation to implement `LocalTraitTwo` for all types that also implement `LocalTraitOne`
 
 impl fmt::Display for LocalTraitOne {
-//~^ ERROR trait objects must include the `dyn` keyword
-//~| HELP add `dyn` keyword before this trait
+//~^ ERROR expected a type, found a trait
+//~| HELP you can add the `dyn` keyword if you want a trait object
     fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
         todo!();
     }
 }
 
 impl fmt::Display for LocalTraitTwo + Send {
-//~^ ERROR trait objects must include the `dyn` keyword
-//~| HELP add `dyn` keyword before this trait
+//~^ ERROR expected a type, found a trait
+//~| HELP you can add the `dyn` keyword if you want a trait object
     fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
         todo!();
     }
 }
 
 impl LocalTraitOne for fmt::Display {}
-//~^ ERROR trait objects must include the `dyn` keyword
-//~| HELP add `dyn` keyword before this trait
+//~^ ERROR expected a type, found a trait
+//~| HELP you can add the `dyn` keyword if you want a trait object
 //~| HELP alternatively use a blanket implementation to implement `LocalTraitOne` for all types that also implement `fmt::Display`
 
 
 impl LocalTraitOne for fmt::Display + Send {}
-//~^ ERROR trait objects must include the `dyn` keyword
-//~| HELP add `dyn` keyword before this trait
+//~^ ERROR expected a type, found a trait
+//~| HELP you can add the `dyn` keyword if you want a trait object
 //~| HELP alternatively use a blanket implementation to implement `LocalTraitOne` for all types that also implement `fmt::Display + Send`
 
 
 impl<E> GenericTrait<E> for LocalTraitOne {}
-//~^ ERROR trait objects must include the `dyn` keyword
-//~| HELP add `dyn` keyword before this trait
+//~^ ERROR expected a type, found a trait
+//~| HELP you can add the `dyn` keyword if you want a trait object
 //~| HELP alternatively use a blanket implementation to implement `GenericTrait<E>` for all types that also implement `LocalTraitOne`
 
 trait GenericTraitTwo<T> {}
 
 impl<T, E> GenericTraitTwo<E> for GenericTrait<T> {}
-//~^ ERROR trait objects must include the `dyn` keyword
-//~| HELP add `dyn` keyword before this trait
+//~^ ERROR expected a type, found a trait
+//~| HELP you can add the `dyn` keyword if you want a trait object
 //~| HELP alternatively use a blanket implementation to implement `GenericTraitTwo<E>` for all types that also implement `GenericTrait<T>`
 
 fn main() {}
diff --git a/tests/ui/suggestions/suggest-blanket-impl-local-trait.stderr b/tests/ui/suggestions/suggest-blanket-impl-local-trait.stderr
index 769f3bd64f3..102438e1ec5 100644
--- a/tests/ui/suggestions/suggest-blanket-impl-local-trait.stderr
+++ b/tests/ui/suggestions/suggest-blanket-impl-local-trait.stderr
@@ -1,10 +1,10 @@
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/suggest-blanket-impl-local-trait.rs:34:24
    |
 LL | impl LocalTraitOne for fmt::Display {}
    |                        ^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | impl LocalTraitOne for dyn fmt::Display {}
    |                        +++
@@ -13,13 +13,13 @@ help: alternatively use a blanket implementation to implement `LocalTraitOne` fo
 LL | impl<T: fmt::Display> LocalTraitOne for T {}
    |     +++++++++++++++++                   ~
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/suggest-blanket-impl-local-trait.rs:40:24
    |
 LL | impl LocalTraitOne for fmt::Display + Send {}
    |                        ^^^^^^^^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | impl LocalTraitOne for dyn fmt::Display + Send {}
    |                        +++
@@ -28,13 +28,13 @@ help: alternatively use a blanket implementation to implement `LocalTraitOne` fo
 LL | impl<T: fmt::Display + Send> LocalTraitOne for T {}
    |     ++++++++++++++++++++++++                   ~
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/suggest-blanket-impl-local-trait.rs:13:24
    |
 LL | impl LocalTraitTwo for LocalTraitOne {}
    |                        ^^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | impl LocalTraitTwo for dyn LocalTraitOne {}
    |                        +++
@@ -43,13 +43,13 @@ help: alternatively use a blanket implementation to implement `LocalTraitTwo` fo
 LL | impl<T: LocalTraitOne> LocalTraitTwo for T {}
    |     ++++++++++++++++++                   ~
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/suggest-blanket-impl-local-trait.rs:46:29
    |
 LL | impl<E> GenericTrait<E> for LocalTraitOne {}
    |                             ^^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | impl<E> GenericTrait<E> for dyn LocalTraitOne {}
    |                             +++
@@ -58,35 +58,35 @@ help: alternatively use a blanket implementation to implement `GenericTrait<E>`
 LL | impl<E, T: LocalTraitOne> GenericTrait<E> for T {}
    |       ++++++++++++++++++                      ~
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/suggest-blanket-impl-local-trait.rs:18:23
    |
 LL | impl fmt::Display for LocalTraitOne {
    |                       ^^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | impl fmt::Display for dyn LocalTraitOne {
    |                       +++
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/suggest-blanket-impl-local-trait.rs:26:23
    |
 LL | impl fmt::Display for LocalTraitTwo + Send {
    |                       ^^^^^^^^^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | impl fmt::Display for dyn LocalTraitTwo + Send {
    |                       +++
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/suggest-blanket-impl-local-trait.rs:53:35
    |
 LL | impl<T, E> GenericTraitTwo<E> for GenericTrait<T> {}
    |                                   ^^^^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | impl<T, E> GenericTraitTwo<E> for dyn GenericTrait<T> {}
    |                                   +++
diff --git a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs
index a5ab8be7f45..fe36d093430 100644
--- a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs
+++ b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs
@@ -14,14 +14,14 @@ pub union Union<T> {
 
 impl<'a, T> Struct<T> for Trait<'a, T> {}
 //~^ ERROR expected trait, found struct `Struct`
-//~| ERROR trait objects must include the `dyn` keyword
+//~| ERROR expected a type, found a trait
 
 impl<'a, T> Enum<T> for Trait<'a, T> {}
 //~^ ERROR expected trait, found enum `Enum`
-//~| ERROR trait objects must include the `dyn` keyword
+//~| ERROR expected a type, found a trait
 
 impl<'a, T> Union<T> for Trait<'a, T> {}
 //~^ ERROR expected trait, found union `Union`
-//~| ERROR trait objects must include the `dyn` keyword
+//~| ERROR expected a type, found a trait
 
 fn main() {}
diff --git a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.stderr b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.stderr
index 2893370570d..0bd601e2170 100644
--- a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.stderr
+++ b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.stderr
@@ -58,35 +58,35 @@ LL | pub union Union<T> {
    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
    = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/suggest-swapping-self-ty-and-trait-edition-2021.rs:15:27
    |
 LL | impl<'a, T> Struct<T> for Trait<'a, T> {}
    |                           ^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | impl<'a, T> Struct<T> for dyn Trait<'a, T> {}
    |                           +++
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/suggest-swapping-self-ty-and-trait-edition-2021.rs:19:25
    |
 LL | impl<'a, T> Enum<T> for Trait<'a, T> {}
    |                         ^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | impl<'a, T> Enum<T> for dyn Trait<'a, T> {}
    |                         +++
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/suggest-swapping-self-ty-and-trait-edition-2021.rs:23:26
    |
 LL | impl<'a, T> Union<T> for Trait<'a, T> {}
    |                          ^^^^^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | impl<'a, T> Union<T> for dyn Trait<'a, T> {}
    |                          +++
diff --git a/tests/ui/target-feature/tied-features-no-implication-1.paca.stderr b/tests/ui/target-feature/tied-features-no-implication-1.paca.stderr
new file mode 100644
index 00000000000..bf211fbee2f
--- /dev/null
+++ b/tests/ui/target-feature/tied-features-no-implication-1.paca.stderr
@@ -0,0 +1,4 @@
+error: the target features paca, pacg must all be either enabled or disabled together
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/target-feature/tied-features-no-implication-1.pacg.stderr b/tests/ui/target-feature/tied-features-no-implication-1.pacg.stderr
new file mode 100644
index 00000000000..bf211fbee2f
--- /dev/null
+++ b/tests/ui/target-feature/tied-features-no-implication-1.pacg.stderr
@@ -0,0 +1,4 @@
+error: the target features paca, pacg must all be either enabled or disabled together
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/target-feature/tied-features-no-implication-1.rs b/tests/ui/target-feature/tied-features-no-implication-1.rs
new file mode 100644
index 00000000000..0473ca319b8
--- /dev/null
+++ b/tests/ui/target-feature/tied-features-no-implication-1.rs
@@ -0,0 +1,20 @@
+//@ revisions: paca pacg
+//@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
+//@ needs-llvm-components: aarch64
+//@[paca] compile-flags: -Ctarget-feature=+paca
+//@[paca] error-pattern: the target features paca, pacg must all be either enabled or disabled together
+//@[pacg] compile-flags: -Ctarget-feature=+pacg
+//@[paca] error-pattern: the target features paca, pacg must all be either enabled or disabled together
+#![feature(no_core, lang_items)]
+#![no_core]
+
+#[lang="sized"]
+trait Sized {}
+
+// In this test, demonstrate that +paca and +pacg both result in the tied feature error if there
+// isn't something causing an error.
+// See tied-features-no-implication.rs
+
+#[cfg(target_feature = "pacg")]
+pub unsafe fn foo() {
+}
diff --git a/tests/ui/target-feature/tied-features-no-implication.paca.stderr b/tests/ui/target-feature/tied-features-no-implication.paca.stderr
new file mode 100644
index 00000000000..bf211fbee2f
--- /dev/null
+++ b/tests/ui/target-feature/tied-features-no-implication.paca.stderr
@@ -0,0 +1,4 @@
+error: the target features paca, pacg must all be either enabled or disabled together
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/target-feature/tied-features-no-implication.pacg.stderr b/tests/ui/target-feature/tied-features-no-implication.pacg.stderr
new file mode 100644
index 00000000000..0e31dea24ea
--- /dev/null
+++ b/tests/ui/target-feature/tied-features-no-implication.pacg.stderr
@@ -0,0 +1,14 @@
+error[E0428]: the name `foo` is defined multiple times
+  --> $DIR/tied-features-no-implication.rs:28:1
+   |
+LL | fn foo() {}
+   | -------- previous definition of the value `foo` here
+...
+LL | pub unsafe fn foo() {
+   | ^^^^^^^^^^^^^^^^^^^ `foo` redefined here
+   |
+   = note: `foo` must be defined only once in the value namespace of this module
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/target-feature/tied-features-no-implication.rs b/tests/ui/target-feature/tied-features-no-implication.rs
new file mode 100644
index 00000000000..157b50bb0d3
--- /dev/null
+++ b/tests/ui/target-feature/tied-features-no-implication.rs
@@ -0,0 +1,29 @@
+//@ revisions: paca pacg
+//@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
+//@ needs-llvm-components: aarch64
+//@[paca] compile-flags: -Ctarget-feature=+paca
+//@[paca] error-pattern: the target features paca, pacg must all be either enabled or disabled together
+//@[pacg] compile-flags: -Ctarget-feature=+pacg
+//@[pacg] error-pattern: the name `foo` is defined multiple times
+#![feature(no_core, lang_items)]
+#![no_core]
+
+#[lang="sized"]
+trait Sized {}
+
+// Can't use `compile_error!` here without `core`/`std` but requiring these makes this test only
+// work if you have libcore built in the sysroot for `aarch64-unknown-linux-gnu`. Can't run this
+// test on any aarch64 platform because they all have different default available features - as
+// written, this test depends on `aarch64-unknown-linux-gnu` having -paca,-pacg by default.
+// Cause a multiple definition error instead.
+fn foo() {}
+
+// Enabling one of the tied features does not imply the other is enabled.
+//
+// With +paca, this multiple definition doesn't cause an error because +paca hasn't implied
+// +pacg. With +pacg, the multiple definition error is emitted (and the tied feature error would
+// be).
+
+#[cfg(target_feature = "pacg")]
+pub unsafe fn foo() {
+}
diff --git a/tests/ui/target-feature/tied-features.rs b/tests/ui/target-feature/tied-features.rs
index e36649d8eb1..c6cdf21a3e3 100644
--- a/tests/ui/target-feature/tied-features.rs
+++ b/tests/ui/target-feature/tied-features.rs
@@ -1,4 +1,3 @@
-//@ build-fail
 //@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
 //@ needs-llvm-components: aarch64
 #![feature(no_core, lang_items)]
@@ -7,7 +6,6 @@
 #[lang="sized"]
 trait Sized {}
 
-// FIXME: this should not need to be public.
 pub fn main() {
     #[target_feature(enable = "pacg")]
     //~^ ERROR must all be either enabled or disabled together
@@ -25,10 +23,15 @@ pub fn main() {
 //~^ ERROR must all be either enabled or disabled together
 unsafe fn foo() {}
 
-
 #[target_feature(enable = "paca,pacg")]
 unsafe fn bar() {}
 
 #[target_feature(enable = "paca")]
 #[target_feature(enable = "pacg")]
 unsafe fn baz() {}
+
+// Confirm that functions which do not end up collected for monomorphisation will still error.
+
+#[target_feature(enable = "paca")]
+//~^ ERROR must all be either enabled or disabled together
+unsafe fn unused() {}
diff --git a/tests/ui/target-feature/tied-features.stderr b/tests/ui/target-feature/tied-features.stderr
index 525c9084330..8d677735e84 100644
--- a/tests/ui/target-feature/tied-features.stderr
+++ b/tests/ui/target-feature/tied-features.stderr
@@ -1,5 +1,5 @@
 error: the target features paca, pacg must all be either enabled or disabled together
-  --> $DIR/tied-features.rs:12:5
+  --> $DIR/tied-features.rs:10:5
    |
 LL |     #[target_feature(enable = "pacg")]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -7,12 +7,20 @@ LL |     #[target_feature(enable = "pacg")]
    = help: add the missing features in a `target_feature` attribute
 
 error: the target features paca, pacg must all be either enabled or disabled together
-  --> $DIR/tied-features.rs:24:1
+  --> $DIR/tied-features.rs:22:1
    |
 LL | #[target_feature(enable = "paca")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add the missing features in a `target_feature` attribute
 
-error: aborting due to 2 previous errors
+error: the target features paca, pacg must all be either enabled or disabled together
+  --> $DIR/tied-features.rs:35:1
+   |
+LL | #[target_feature(enable = "paca")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add the missing features in a `target_feature` attribute
+
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/traits/alias/issue-83613.rs b/tests/ui/traits/alias/issue-83613.rs
index 2462e703a71..6f0012bf089 100644
--- a/tests/ui/traits/alias/issue-83613.rs
+++ b/tests/ui/traits/alias/issue-83613.rs
@@ -8,5 +8,5 @@ fn mk_opaque() -> OpaqueType {
 trait AnotherTrait {}
 impl<T: Send> AnotherTrait for T {}
 impl AnotherTrait for OpaqueType {}
-//~^ ERROR conflicting implementations of trait `AnotherTrait` for type `OpaqueType`
+//~^ ERROR conflicting implementations of trait `AnotherTrait`
 fn main() {}
diff --git a/tests/ui/traits/alias/issue-83613.stderr b/tests/ui/traits/alias/issue-83613.stderr
index 847fda41776..47181c3f33e 100644
--- a/tests/ui/traits/alias/issue-83613.stderr
+++ b/tests/ui/traits/alias/issue-83613.stderr
@@ -1,10 +1,10 @@
-error[E0119]: conflicting implementations of trait `AnotherTrait` for type `OpaqueType`
+error[E0119]: conflicting implementations of trait `AnotherTrait`
   --> $DIR/issue-83613.rs:10:1
    |
 LL | impl<T: Send> AnotherTrait for T {}
    | -------------------------------- first implementation here
 LL | impl AnotherTrait for OpaqueType {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `OpaqueType`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/alias/no-duplicates.rs b/tests/ui/traits/alias/no-duplicates.rs
index 88feb89170d..d0829ab4cec 100644
--- a/tests/ui/traits/alias/no-duplicates.rs
+++ b/tests/ui/traits/alias/no-duplicates.rs
@@ -1,4 +1,4 @@
-// The purpose of this test is to demonstrate that duplicating object safe traits
+// The purpose of this test is to demonstrate that duplicating dyn-compatible traits
 // that are not auto traits is rejected with trait aliases even though one could
 // reasonably accept this.
 
@@ -6,7 +6,7 @@
 
 use std::marker::Unpin;
 
-// Some arbitrary object-safe trait:
+// Some arbitrary dyn-compatible trait:
 trait Obj {}
 
 // Nest a few levels deep:
diff --git a/tests/ui/traits/alias/no-extra-traits.rs b/tests/ui/traits/alias/no-extra-traits.rs
index 4dad8c0f873..f3d35a8cd03 100644
--- a/tests/ui/traits/alias/no-extra-traits.rs
+++ b/tests/ui/traits/alias/no-extra-traits.rs
@@ -5,7 +5,7 @@
 
 use std::marker::Unpin;
 
-// Some arbitrary object-safe traits:
+// Some arbitrary dyn-compatible traits:
 trait ObjA {}
 trait ObjB {}
 
diff --git a/tests/ui/traits/alias/object-wf.rs b/tests/ui/traits/alias/object-wf.rs
index 3abffd22d14..a14cfea3bd7 100644
--- a/tests/ui/traits/alias/object-wf.rs
+++ b/tests/ui/traits/alias/object-wf.rs
@@ -20,7 +20,7 @@ fn _f0() {
     let _: Box<dyn Unpin + _1 + Send + Sync>;
 }
 
-// Include object safe traits:
+// Include dyn-compatible traits:
 
 fn _f1() {
     let _: Box<dyn Obj + _0>;
@@ -28,7 +28,7 @@ fn _f1() {
     let _: Box<dyn Obj + _1 + _0>;
 }
 
-// And when the object safe trait is in a trait alias:
+// And when the dyn-compatible trait is in a trait alias:
 
 trait _2 = Obj;
 
diff --git a/tests/ui/traits/bound/not-on-bare-trait-2021.rs b/tests/ui/traits/bound/not-on-bare-trait-2021.rs
index 07b866cb4a6..93d2f04b54e 100644
--- a/tests/ui/traits/bound/not-on-bare-trait-2021.rs
+++ b/tests/ui/traits/bound/not-on-bare-trait-2021.rs
@@ -6,13 +6,11 @@ trait Foo {
 // This should emit the less confusing error, not the more confusing one.
 
 fn foo(_x: Foo + Send) {
-    //~^ ERROR trait objects must include the `dyn` keyword
-    //~| ERROR size for values of type
+    //~^ ERROR expected a type, found a trait
 }
 fn bar(x: Foo) -> Foo {
-    //~^ ERROR trait objects must include the `dyn` keyword
-    //~| ERROR trait objects must include the `dyn` keyword
-    //~| ERROR size for values of type
+    //~^ ERROR expected a type, found a trait
+    //~| ERROR expected a type, found a trait
     x
 }
 
diff --git a/tests/ui/traits/bound/not-on-bare-trait-2021.stderr b/tests/ui/traits/bound/not-on-bare-trait-2021.stderr
index e05ae8e5267..e50186aff7e 100644
--- a/tests/ui/traits/bound/not-on-bare-trait-2021.stderr
+++ b/tests/ui/traits/bound/not-on-bare-trait-2021.stderr
@@ -1,38 +1,4 @@
-error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time
-  --> $DIR/not-on-bare-trait-2021.rs:8:12
-   |
-LL | fn foo(_x: Foo + Send) {
-   |            ^^^^^^^^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `(dyn Foo + Send + 'static)`
-   = help: unsized fn params are gated as an unstable feature
-help: you can use `impl Trait` as the argument type
-   |
-LL | fn foo(_x: impl Foo + Send) {
-   |            ++++
-help: function arguments must have a statically known size, borrowed types always have a known size
-   |
-LL | fn foo(_x: &(dyn Foo + Send)) {
-   |            +++++           +
-
-error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
-  --> $DIR/not-on-bare-trait-2021.rs:12:11
-   |
-LL | fn bar(x: Foo) -> Foo {
-   |           ^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)`
-   = help: unsized fn params are gated as an unstable feature
-help: you can use `impl Trait` as the argument type
-   |
-LL | fn bar(x: impl Foo) -> Foo {
-   |           ++++
-help: function arguments must have a statically known size, borrowed types always have a known size
-   |
-LL | fn bar(x: &dyn Foo) -> Foo {
-   |           ++++
-
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/not-on-bare-trait-2021.rs:8:12
    |
 LL | fn foo(_x: Foo + Send) {
@@ -51,8 +17,8 @@ help: alternatively, use a trait object to accept any type that implements `Foo
 LL | fn foo(_x: &(dyn Foo + Send)) {
    |            +++++           +
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/not-on-bare-trait-2021.rs:12:11
+error[E0782]: expected a type, found a trait
+  --> $DIR/not-on-bare-trait-2021.rs:11:11
    |
 LL | fn bar(x: Foo) -> Foo {
    |           ^^^
@@ -70,8 +36,8 @@ help: alternatively, use a trait object to accept any type that implements `Foo`
 LL | fn bar(x: &dyn Foo) -> Foo {
    |           ++++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/not-on-bare-trait-2021.rs:12:19
+error[E0782]: expected a type, found a trait
+  --> $DIR/not-on-bare-trait-2021.rs:11:19
    |
 LL | fn bar(x: Foo) -> Foo {
    |                   ^^^
@@ -85,7 +51,6 @@ help: alternatively, you can return an owned trait object
 LL | fn bar(x: Foo) -> Box<dyn Foo> {
    |                   +++++++    +
 
-error: aborting due to 5 previous errors
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0277, E0782.
-For more information about an error, try `rustc --explain E0277`.
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/traits/issue-105231.rs b/tests/ui/traits/issue-105231.rs
index 7338642beef..83c3158c106 100644
--- a/tests/ui/traits/issue-105231.rs
+++ b/tests/ui/traits/issue-105231.rs
@@ -1,4 +1,3 @@
-//~ ERROR overflow evaluating the requirement `A<A<A<A<A<A<A<...>>>>>>>: Send`
 struct A<T>(B<T>);
 //~^ ERROR recursive types `A` and `B` have infinite size
 //~| ERROR `T` is only used recursively
@@ -7,5 +6,5 @@ struct B<T>(A<A<T>>);
 trait Foo {}
 impl<T> Foo for T where T: Send {}
 impl Foo for B<u8> {}
-
+//~^ ERROR conflicting implementations of trait `Foo` for type `B<u8>`
 fn main() {}
diff --git a/tests/ui/traits/issue-105231.stderr b/tests/ui/traits/issue-105231.stderr
index d3014a79ad6..e113f8382b2 100644
--- a/tests/ui/traits/issue-105231.stderr
+++ b/tests/ui/traits/issue-105231.stderr
@@ -1,5 +1,5 @@
 error[E0072]: recursive types `A` and `B` have infinite size
-  --> $DIR/issue-105231.rs:2:1
+  --> $DIR/issue-105231.rs:1:1
    |
 LL | struct A<T>(B<T>);
    | ^^^^^^^^^^^ ---- recursive without indirection
@@ -16,7 +16,7 @@ LL ~ struct B<T>(Box<A<A<T>>>);
    |
 
 error: type parameter `T` is only used recursively
-  --> $DIR/issue-105231.rs:2:15
+  --> $DIR/issue-105231.rs:1:15
    |
 LL | struct A<T>(B<T>);
    |          -    ^
@@ -27,7 +27,7 @@ LL | struct A<T>(B<T>);
    = note: all type parameters must be used in a non-recursive way in order to constrain their variance
 
 error: type parameter `T` is only used recursively
-  --> $DIR/issue-105231.rs:5:17
+  --> $DIR/issue-105231.rs:4:17
    |
 LL | struct B<T>(A<A<T>>);
    |          -      ^
@@ -37,16 +37,18 @@ LL | struct B<T>(A<A<T>>);
    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
    = note: all type parameters must be used in a non-recursive way in order to constrain their variance
 
-error[E0275]: overflow evaluating the requirement `A<A<A<A<A<A<A<...>>>>>>>: Send`
+error[E0119]: conflicting implementations of trait `Foo` for type `B<u8>`
+  --> $DIR/issue-105231.rs:8:1
    |
-   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_105231`)
-note: required because it appears within the type `B<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<u8>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
-  --> $DIR/issue-105231.rs:5:8
+LL | impl<T> Foo for T where T: Send {}
+   | ------------------------------- first implementation here
+LL | impl Foo for B<u8> {}
+   | ^^^^^^^^^^^^^^^^^^ conflicting implementation for `B<u8>`
    |
-LL | struct B<T>(A<A<T>>);
-   |        ^
+   = note: overflow evaluating the requirement `B<u8>: Send`
+   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_105231`)
 
 error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0072, E0275.
+Some errors have detailed explanations: E0072, E0119.
 For more information about an error, try `rustc --explain E0072`.
diff --git a/tests/ui/traits/issue-106072.rs b/tests/ui/traits/issue-106072.rs
index 8adbac46a5b..696bd765ebc 100644
--- a/tests/ui/traits/issue-106072.rs
+++ b/tests/ui/traits/issue-106072.rs
@@ -1,6 +1,4 @@
-#[derive(Clone)] //~  trait objects must include the `dyn` keyword
-//~^ ERROR: the size for values of type `(dyn Foo + 'static)` cannot be known
-//~| ERROR: return type cannot have an unboxed trait object
+#[derive(Clone)] //~  expected a type, found a trait
 struct Foo;
 trait Foo {} //~ the name `Foo` is defined multiple times
 fn main() {}
diff --git a/tests/ui/traits/issue-106072.stderr b/tests/ui/traits/issue-106072.stderr
index 6476c8b3237..4a48e4e898d 100644
--- a/tests/ui/traits/issue-106072.stderr
+++ b/tests/ui/traits/issue-106072.stderr
@@ -1,5 +1,5 @@
 error[E0428]: the name `Foo` is defined multiple times
-  --> $DIR/issue-106072.rs:5:1
+  --> $DIR/issue-106072.rs:3:1
    |
 LL | struct Foo;
    | ----------- previous definition of the type `Foo` here
@@ -8,26 +8,7 @@ LL | trait Foo {}
    |
    = note: `Foo` must be defined only once in the type namespace of this module
 
-error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
-  --> $DIR/issue-106072.rs:1:10
-   |
-LL | #[derive(Clone)]
-   |          ^^^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)`
-note: required by a bound in `Clone`
-  --> $SRC_DIR/core/src/clone.rs:LL:COL
-   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0746]: return type cannot have an unboxed trait object
-  --> $DIR/issue-106072.rs:1:10
-   |
-LL | #[derive(Clone)]
-   |          ^^^^^ doesn't have a size known at compile-time
-   |
-   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/issue-106072.rs:1:10
    |
 LL | #[derive(Clone)]
@@ -35,7 +16,7 @@ LL | #[derive(Clone)]
    |
    = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 4 previous errors
+error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0277, E0428, E0746, E0782.
-For more information about an error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0428, E0782.
+For more information about an error, try `rustc --explain E0428`.
diff --git a/tests/ui/traits/missing-for-type-in-impl.e2021.stderr b/tests/ui/traits/missing-for-type-in-impl.e2021.stderr
index b5a607a54cb..a49c5d9d45b 100644
--- a/tests/ui/traits/missing-for-type-in-impl.e2021.stderr
+++ b/tests/ui/traits/missing-for-type-in-impl.e2021.stderr
@@ -10,13 +10,13 @@ help: this trait has no implementations, consider adding one
 LL | trait Foo<T> {
    | ^^^^^^^^^^^^
 
-error[E0782]: trait objects must include the `dyn` keyword
+error[E0782]: expected a type, found a trait
   --> $DIR/missing-for-type-in-impl.rs:8:6
    |
 LL | impl Foo<i64> {
    |      ^^^^^^^^
    |
-help: add `dyn` keyword before this trait
+help: you can add the `dyn` keyword if you want a trait object
    |
 LL | impl dyn Foo<i64> {
    |      +++
diff --git a/tests/ui/traits/missing-for-type-in-impl.rs b/tests/ui/traits/missing-for-type-in-impl.rs
index 7d4ad479e77..e5dd3651609 100644
--- a/tests/ui/traits/missing-for-type-in-impl.rs
+++ b/tests/ui/traits/missing-for-type-in-impl.rs
@@ -6,7 +6,7 @@ trait Foo<T> {
 
 /* note the "missing" for ... (in this case for i64, in order for this to compile) */
 impl Foo<i64> {
-//[e2021]~^ ERROR trait objects must include the `dyn` keyword
+//[e2021]~^ ERROR expected a type, found a trait
 //[e2015]~^^ WARNING trait objects without an explicit `dyn` are deprecated
 //[e2015]~| WARNING trait objects without an explicit `dyn` are deprecated
 //[e2015]~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
diff --git a/tests/ui/traits/negative-bounds/on-unimplemented.rs b/tests/ui/traits/negative-bounds/on-unimplemented.rs
new file mode 100644
index 00000000000..34582590861
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/on-unimplemented.rs
@@ -0,0 +1,12 @@
+#![feature(negative_bounds)]
+
+#[diagnostic::on_unimplemented(message = "this ain't fooing")]
+trait Foo {}
+struct NotFoo;
+
+fn hello() -> impl !Foo {
+    //~^ ERROR the trait bound `NotFoo: !Foo` is not satisfied
+    NotFoo
+}
+
+fn main() {}
diff --git a/tests/ui/traits/negative-bounds/on-unimplemented.stderr b/tests/ui/traits/negative-bounds/on-unimplemented.stderr
new file mode 100644
index 00000000000..07483e788e5
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/on-unimplemented.stderr
@@ -0,0 +1,18 @@
+error[E0277]: the trait bound `NotFoo: !Foo` is not satisfied
+  --> $DIR/on-unimplemented.rs:7:15
+   |
+LL | fn hello() -> impl !Foo {
+   |               ^^^^^^^^^ the trait bound `NotFoo: !Foo` is not satisfied
+LL |
+LL |     NotFoo
+   |     ------ return type was inferred to be `NotFoo` here
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/on-unimplemented.rs:4:1
+   |
+LL | trait Foo {}
+   | ^^^^^^^^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs
index 35757f2339d..1260cca5106 100644
--- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs
+++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs
@@ -13,9 +13,14 @@ fn main() {
 }
 
 fn weird0() -> impl Sized + !Sized {}
-//~^ ERROR type mismatch resolving `impl !Sized + Sized == ()`
+//~^ ERROR the trait bound `(): !Sized` is not satisfied
+//~| ERROR the trait bound `(): !Sized` is not satisfied
+//~| ERROR the trait bound `(): !Sized` is not satisfied
 fn weird1() -> impl !Sized + Sized {}
-//~^ ERROR type mismatch resolving `impl !Sized + Sized == ()`
+//~^ ERROR the trait bound `(): !Sized` is not satisfied
+//~| ERROR the trait bound `(): !Sized` is not satisfied
+//~| ERROR the trait bound `(): !Sized` is not satisfied
 fn weird2() -> impl !Sized {}
-//~^ ERROR type mismatch resolving `impl !Sized == ()`
-//~| ERROR the size for values of type `impl !Sized` cannot be known at compilation time
+//~^ ERROR the trait bound `(): !Sized` is not satisfied
+//~| ERROR the trait bound `(): !Sized` is not satisfied
+//~| ERROR the trait bound `(): !Sized` is not satisfied
diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr
index 3dd2b27b55b..4ec578a3b7b 100644
--- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr
+++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr
@@ -1,29 +1,56 @@
-error[E0271]: type mismatch resolving `impl !Sized + Sized == ()`
+error[E0277]: the trait bound `(): !Sized` is not satisfied
   --> $DIR/opaque-type-unsatisfied-bound.rs:15:16
    |
 LL | fn weird0() -> impl Sized + !Sized {}
-   |                ^^^^^^^^^^^^^^^^^^^ types differ
+   |                ^^^^^^^^^^^^^^^^^^^ the trait bound `(): !Sized` is not satisfied
 
-error[E0271]: type mismatch resolving `impl !Sized + Sized == ()`
-  --> $DIR/opaque-type-unsatisfied-bound.rs:17:16
+error[E0277]: the trait bound `(): !Sized` is not satisfied
+  --> $DIR/opaque-type-unsatisfied-bound.rs:15:36
    |
-LL | fn weird1() -> impl !Sized + Sized {}
-   |                ^^^^^^^^^^^^^^^^^^^ types differ
+LL | fn weird0() -> impl Sized + !Sized {}
+   |                                    ^^ the trait bound `(): !Sized` is not satisfied
+
+error[E0277]: the trait bound `(): !Sized` is not satisfied
+  --> $DIR/opaque-type-unsatisfied-bound.rs:15:1
+   |
+LL | fn weird0() -> impl Sized + !Sized {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait bound `(): !Sized` is not satisfied
 
-error[E0271]: type mismatch resolving `impl !Sized == ()`
+error[E0277]: the trait bound `(): !Sized` is not satisfied
   --> $DIR/opaque-type-unsatisfied-bound.rs:19:16
    |
+LL | fn weird1() -> impl !Sized + Sized {}
+   |                ^^^^^^^^^^^^^^^^^^^ the trait bound `(): !Sized` is not satisfied
+
+error[E0277]: the trait bound `(): !Sized` is not satisfied
+  --> $DIR/opaque-type-unsatisfied-bound.rs:19:36
+   |
+LL | fn weird1() -> impl !Sized + Sized {}
+   |                                    ^^ the trait bound `(): !Sized` is not satisfied
+
+error[E0277]: the trait bound `(): !Sized` is not satisfied
+  --> $DIR/opaque-type-unsatisfied-bound.rs:19:1
+   |
+LL | fn weird1() -> impl !Sized + Sized {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait bound `(): !Sized` is not satisfied
+
+error[E0277]: the trait bound `(): !Sized` is not satisfied
+  --> $DIR/opaque-type-unsatisfied-bound.rs:23:16
+   |
 LL | fn weird2() -> impl !Sized {}
-   |                ^^^^^^^^^^^ types differ
+   |                ^^^^^^^^^^^ the trait bound `(): !Sized` is not satisfied
 
-error[E0277]: the size for values of type `impl !Sized` cannot be known at compilation time
-  --> $DIR/opaque-type-unsatisfied-bound.rs:19:16
+error[E0277]: the trait bound `(): !Sized` is not satisfied
+  --> $DIR/opaque-type-unsatisfied-bound.rs:23:28
    |
 LL | fn weird2() -> impl !Sized {}
-   |                ^^^^^^^^^^^ doesn't have a size known at compile-time
+   |                            ^^ the trait bound `(): !Sized` is not satisfied
+
+error[E0277]: the trait bound `(): !Sized` is not satisfied
+  --> $DIR/opaque-type-unsatisfied-bound.rs:23:1
    |
-   = help: the trait `Sized` is not implemented for `impl !Sized`
-   = note: the return type of a function must have a statically known size
+LL | fn weird2() -> impl !Sized {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait bound `(): !Sized` is not satisfied
 
 error[E0277]: the trait bound `impl !Trait: Trait` is not satisfied
   --> $DIR/opaque-type-unsatisfied-bound.rs:12:13
@@ -39,7 +66,6 @@ note: required by a bound in `consume`
 LL | fn consume(_: impl Trait) {}
    |                    ^^^^^ required by this bound in `consume`
 
-error: aborting due to 5 previous errors
+error: aborting due to 10 previous errors
 
-Some errors have detailed explanations: E0271, E0277.
-For more information about an error, try `rustc --explain E0271`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs
index 9951826a846..c6826578658 100644
--- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs
+++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs
@@ -3,6 +3,8 @@
 #![feature(negative_bounds, unboxed_closures)]
 
 fn produce() -> impl !Fn<(u32,)> {}
-//~^ ERROR type mismatch resolving `impl !Fn<(u32,)> == ()`
+//~^ ERROR the trait bound `(): !Fn(u32)` is not satisfied
+//~| ERROR the trait bound `(): !Fn(u32)` is not satisfied
+//~| ERROR the trait bound `(): !Fn(u32)` is not satisfied
 
 fn main() {}
diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr
index e1b84e0df7a..f81f0a23ac3 100644
--- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr
+++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr
@@ -1,9 +1,21 @@
-error[E0271]: type mismatch resolving `impl !Fn<(u32,)> == ()`
+error[E0277]: the trait bound `(): !Fn(u32)` is not satisfied
   --> $DIR/opaque-type-unsatisfied-fn-bound.rs:5:17
    |
 LL | fn produce() -> impl !Fn<(u32,)> {}
-   |                 ^^^^^^^^^^^^^^^^ types differ
+   |                 ^^^^^^^^^^^^^^^^ the trait bound `(): !Fn(u32)` is not satisfied
 
-error: aborting due to 1 previous error
+error[E0277]: the trait bound `(): !Fn(u32)` is not satisfied
+  --> $DIR/opaque-type-unsatisfied-fn-bound.rs:5:34
+   |
+LL | fn produce() -> impl !Fn<(u32,)> {}
+   |                                  ^^ the trait bound `(): !Fn(u32)` is not satisfied
+
+error[E0277]: the trait bound `(): !Fn(u32)` is not satisfied
+  --> $DIR/opaque-type-unsatisfied-fn-bound.rs:5:1
+   |
+LL | fn produce() -> impl !Fn<(u32,)> {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait bound `(): !Fn(u32)` is not satisfied
+
+error: aborting due to 3 previous errors
 
-For more information about this error, try `rustc --explain E0271`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/next-solver/coherence/issue-102048.rs b/tests/ui/traits/next-solver/coherence/issue-102048.rs
index 16ae5d98488..847816eba12 100644
--- a/tests/ui/traits/next-solver/coherence/issue-102048.rs
+++ b/tests/ui/traits/next-solver/coherence/issue-102048.rs
@@ -1,7 +1,7 @@
 // This must fail coherence.
 //
 // Getting this to pass was fairly difficult, so here's an explanation
-// of what's happening:
+// of what was previously happening for this to compile:
 //
 // Normalizing projections currently tries to replace them with inference variables
 // while emitting a nested `Projection` obligation. This cannot be done if the projection
@@ -17,12 +17,6 @@
 // that to `i32`. We then try to unify `i32` from `impl1` with `u32` from `impl2` which fails,
 // causing coherence to consider these two impls distinct.
 
-//@ revisions: classic next
-//@[next] compile-flags: -Znext-solver
-
-//@[classic] known-bug: #102048
-//@[classic] check-pass
-
 pub trait Trait<T> {}
 
 pub trait WithAssoc1<'a> {
@@ -42,7 +36,7 @@ where
 
 // impl 2
 impl<T, U> Trait<for<'a> fn(<U as WithAssoc1<'a>>::Assoc, u32)> for (T, U) where
-    U: for<'a> WithAssoc1<'a> //[next]~^ ERROR conflicting implementations of trait
+    U: for<'a> WithAssoc1<'a> //~^ ERROR conflicting implementations of trait
 {
 }
 
diff --git a/tests/ui/traits/next-solver/coherence/issue-102048.stderr b/tests/ui/traits/next-solver/coherence/issue-102048.stderr
new file mode 100644
index 00000000000..e496517464b
--- /dev/null
+++ b/tests/ui/traits/next-solver/coherence/issue-102048.stderr
@@ -0,0 +1,16 @@
+error[E0119]: conflicting implementations of trait `Trait<for<'a> fn(<_ as WithAssoc1<'a>>::Assoc, <_ as WithAssoc2<'a>>::Assoc)>` for type `(_, _)`
+  --> $DIR/issue-102048.rs:38:1
+   |
+LL | / impl<T, U> Trait<for<'a> fn(<T as WithAssoc1<'a>>::Assoc, <U as WithAssoc2<'a>>::Assoc)> for (T, U)
+LL | | where
+LL | |     T: for<'a> WithAssoc1<'a> + for<'a> WithAssoc2<'a, Assoc = i32>,
+LL | |     U: for<'a> WithAssoc2<'a>,
+   | |______________________________- first implementation here
+...
+LL | / impl<T, U> Trait<for<'a> fn(<U as WithAssoc1<'a>>::Assoc, u32)> for (T, U) where
+LL | |     U: for<'a> WithAssoc1<'a>
+   | |_____________________________^ conflicting implementation for `(_, _)`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.rs b/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.rs
new file mode 100644
index 00000000000..bd3dccad152
--- /dev/null
+++ b/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.rs
@@ -0,0 +1,19 @@
+//@ compile-flags: -Znext-solver
+
+trait Mirror {
+    type Assoc;
+}
+impl<T> Mirror for T {
+    type Assoc = T;
+}
+
+fn arg() -> &'static [i32; 1] { todo!() }
+
+fn arg_error(x: <fn() as Mirror>::Assoc, y: ()) { todo!() }
+
+fn main() {
+    // Should suggest to reverse the args...
+    // but if we don't normalize the expected, then we don't.
+    arg_error((), || ());
+    //~^ ERROR arguments to this function are incorrect
+}
diff --git a/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr b/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr
new file mode 100644
index 00000000000..1938b3375a5
--- /dev/null
+++ b/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr
@@ -0,0 +1,21 @@
+error[E0308]: arguments to this function are incorrect
+  --> $DIR/coerce-in-may-coerce.rs:17:5
+   |
+LL |     arg_error((), || ());
+   |     ^^^^^^^^^ --  ----- expected `()`, found `{closure@$DIR/coerce-in-may-coerce.rs:17:19: 17:21}`
+   |               |
+   |               expected `<fn() as Mirror>::Assoc`, found `()`
+   |
+note: function defined here
+  --> $DIR/coerce-in-may-coerce.rs:12:4
+   |
+LL | fn arg_error(x: <fn() as Mirror>::Assoc, y: ()) { todo!() }
+   |    ^^^^^^^^^ --------------------------  -----
+help: swap these arguments
+   |
+LL |     arg_error(|| (), ());
+   |              ~~~~~~~~~~~
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/next-solver/object-unsafety.rs b/tests/ui/traits/next-solver/dyn-incompatibility.rs
index a347984daf6..a347984daf6 100644
--- a/tests/ui/traits/next-solver/object-unsafety.rs
+++ b/tests/ui/traits/next-solver/dyn-incompatibility.rs
diff --git a/tests/ui/traits/next-solver/object-unsafety.stderr b/tests/ui/traits/next-solver/dyn-incompatibility.stderr
index 75d0ce24413..7f2c0646ef5 100644
--- a/tests/ui/traits/next-solver/object-unsafety.stderr
+++ b/tests/ui/traits/next-solver/dyn-incompatibility.stderr
@@ -1,12 +1,12 @@
 error[E0277]: the trait bound `T: Copy` is not satisfied in `dyn Setup<From = T>`
-  --> $DIR/object-unsafety.rs:12:12
+  --> $DIR/dyn-incompatibility.rs:12:12
    |
 LL |     copy::<dyn Setup<From=T>>(t)
    |            ^^^^^^^^^^^^^^^^^ within `dyn Setup<From = T>`, the trait `Copy` is not implemented for `T`, which is required by `dyn Setup<From = T>: Setup`
    |
    = note: required because it appears within the type `dyn Setup<From = T>`
 note: required by a bound in `copy`
-  --> $DIR/object-unsafety.rs:7:12
+  --> $DIR/dyn-incompatibility.rs:7:12
    |
 LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
    |            ^^^^^ required by this bound in `copy`
@@ -16,7 +16,7 @@ LL | pub fn copy_any<T: std::marker::Copy>(t: &T) -> T {
    |                  +++++++++++++++++++
 
 error[E0308]: mismatched types
-  --> $DIR/object-unsafety.rs:12:31
+  --> $DIR/dyn-incompatibility.rs:12:31
    |
 LL |     copy::<dyn Setup<From=T>>(t)
    |     ------------------------- ^ types differ
@@ -26,13 +26,13 @@ LL |     copy::<dyn Setup<From=T>>(t)
    = note: expected reference `&<dyn Setup<From = T> as Setup>::From`
               found reference `&T`
 note: function defined here
-  --> $DIR/object-unsafety.rs:7:4
+  --> $DIR/dyn-incompatibility.rs:7:4
    |
 LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
    |    ^^^^                    --------------
 
 error[E0277]: the trait bound `T: Copy` is not satisfied in `dyn Setup<From = T>`
-  --> $DIR/object-unsafety.rs:12:5
+  --> $DIR/dyn-incompatibility.rs:12:5
    |
 LL |     copy::<dyn Setup<From=T>>(t)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `dyn Setup<From = T>`, the trait `Copy` is not implemented for `T`, which is required by `dyn Setup<From = T>: Setup`
diff --git a/tests/ui/traits/next-solver/issue-118950-root-region.rs b/tests/ui/traits/next-solver/issue-118950-root-region.rs
index 9f6dea5d5bf..e1bd234a275 100644
--- a/tests/ui/traits/next-solver/issue-118950-root-region.rs
+++ b/tests/ui/traits/next-solver/issue-118950-root-region.rs
@@ -17,7 +17,7 @@ type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit;
 impl<T> Overlap<T> for T {}
 
 impl<T> Overlap<for<'a> fn(Assoc<'a, T>)> for T where Missing: Overlap<T> {}
-//~^ ERROR conflicting implementations of trait `Overlap<fn(_)>` for type `fn(_)`
-//~| ERROR cannot find type `Missing` in this scope
+//~^ ERROR cannot find type `Missing` in this scope
+//~| ERROR the trait bound `for<'a> *const T: ToUnit<'a>` is not satisfied
 
 fn main() {}
diff --git a/tests/ui/traits/next-solver/issue-118950-root-region.stderr b/tests/ui/traits/next-solver/issue-118950-root-region.stderr
index 7c3e22fb401..f6545c6ebf9 100644
--- a/tests/ui/traits/next-solver/issue-118950-root-region.stderr
+++ b/tests/ui/traits/next-solver/issue-118950-root-region.stderr
@@ -26,21 +26,19 @@ LL | trait ToUnit<'a> {
    | ^^^^^^^^^^^^^^^^
 
  WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: ['^0.Named(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), "'a"), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc), .. }
- WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: ['^0.Named(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), "'a"), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc), .. }
- WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: ['^0.Named(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), "'a"), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc), .. }
- WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: ['^0.Named(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), "'a"), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc), .. }
-error[E0119]: conflicting implementations of trait `Overlap<fn(_)>` for type `fn(_)`
-  --> $DIR/issue-118950-root-region.rs:19:1
+error[E0277]: the trait bound `for<'a> *const T: ToUnit<'a>` is not satisfied
+  --> $DIR/issue-118950-root-region.rs:19:17
    |
-LL | impl<T> Overlap<T> for T {}
-   | ------------------------ first implementation here
-LL |
 LL | impl<T> Overlap<for<'a> fn(Assoc<'a, T>)> for T where Missing: Overlap<T> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `fn(_)`
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> ToUnit<'a>` is not implemented for `*const T`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/issue-118950-root-region.rs:8:1
    |
-   = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
+LL | trait ToUnit<'a> {
+   | ^^^^^^^^^^^^^^^^
 
 error: aborting due to 3 previous errors; 1 warning emitted
 
-Some errors have detailed explanations: E0119, E0277, E0412.
-For more information about an error, try `rustc --explain E0119`.
+Some errors have detailed explanations: E0277, E0412.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/next-solver/normalize/normalize-region-obligations.rs b/tests/ui/traits/next-solver/normalize/normalize-region-obligations.rs
index 7bf3274f9c6..c4c2e695a1d 100644
--- a/tests/ui/traits/next-solver/normalize/normalize-region-obligations.rs
+++ b/tests/ui/traits/next-solver/normalize/normalize-region-obligations.rs
@@ -15,7 +15,7 @@ trait Mirror { type Assoc: ?Sized; }
 impl<T: ?Sized> Mirror for T { type Assoc = T; }
 
 trait MirrorRegion<'a> { type Assoc: ?Sized; }
-impl<'a, T> MirrorRegion<'a> for T { type Assoc = T; }
+impl<'a, T: ?Sized> MirrorRegion<'a> for T { type Assoc = T; }
 
 impl<T> Foo for T {
     #[cfg(normalize_param_env)]
diff --git a/tests/ui/traits/next-solver/typeck/guide-ctors.rs b/tests/ui/traits/next-solver/typeck/guide-ctors.rs
new file mode 100644
index 00000000000..7432ea78a56
--- /dev/null
+++ b/tests/ui/traits/next-solver/typeck/guide-ctors.rs
@@ -0,0 +1,32 @@
+//@ compile-flags: -Znext-solver
+//@ check-pass
+
+// Makes sure we structurally normalize before trying to use expectation to guide
+// coercion in adt and tuples.
+
+use std::any::Any;
+
+trait Coerce {
+    type Assoc;
+}
+
+struct TupleGuidance;
+impl Coerce for TupleGuidance {
+    type Assoc = (&'static dyn Any,);
+}
+
+struct AdtGuidance;
+impl Coerce for AdtGuidance {
+    type Assoc = Adt<&'static dyn Any>;
+}
+
+struct Adt<T> {
+    f: T,
+}
+
+fn foo<'a, T: Coerce>(_: T::Assoc) {}
+
+fn main() {
+    foo::<TupleGuidance>((&0u32,));
+    foo::<AdtGuidance>(Adt { f: &0u32 });
+}
diff --git a/tests/ui/traits/non_lifetime_binders/supertrait-object-safety.rs b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.rs
index a635edb4485..a635edb4485 100644
--- a/tests/ui/traits/non_lifetime_binders/supertrait-object-safety.rs
+++ b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.rs
diff --git a/tests/ui/traits/non_lifetime_binders/supertrait-object-safety.stderr b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr
index 0854ea28150..dd2dca74f90 100644
--- a/tests/ui/traits/non_lifetime_binders/supertrait-object-safety.stderr
+++ b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr
@@ -1,5 +1,5 @@
 warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/supertrait-object-safety.rs:1:12
+  --> $DIR/supertrait-dyn-compatibility.rs:1:12
    |
 LL | #![feature(non_lifetime_binders)]
    |            ^^^^^^^^^^^^^^^^^^^^
@@ -8,13 +8,13 @@ LL | #![feature(non_lifetime_binders)]
    = note: `#[warn(incomplete_features)]` on by default
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/supertrait-object-safety.rs:19:23
+  --> $DIR/supertrait-dyn-compatibility.rs:19:23
    |
 LL |     let x: &dyn Foo = &();
    |                       ^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/supertrait-object-safety.rs:4:12
+  --> $DIR/supertrait-dyn-compatibility.rs:4:12
    |
 LL | trait Foo: for<T> Bar<T> {}
    |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
@@ -24,13 +24,13 @@ LL | trait Foo: for<T> Bar<T> {}
    = note: required for the cast from `&()` to `&dyn Foo`
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/supertrait-object-safety.rs:19:12
+  --> $DIR/supertrait-dyn-compatibility.rs:19:12
    |
 LL |     let x: &dyn Foo = &();
    |            ^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/supertrait-object-safety.rs:4:12
+  --> $DIR/supertrait-dyn-compatibility.rs:4:12
    |
 LL | trait Foo: for<T> Bar<T> {}
    |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
@@ -39,13 +39,13 @@ LL | trait Foo: for<T> Bar<T> {}
    = help: only type `()` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/supertrait-object-safety.rs:22:5
+  --> $DIR/supertrait-dyn-compatibility.rs:22:5
    |
 LL |     needs_bar(x);
    |     ^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/supertrait-object-safety.rs:4:12
+  --> $DIR/supertrait-dyn-compatibility.rs:4:12
    |
 LL | trait Foo: for<T> Bar<T> {}
    |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
diff --git a/tests/ui/traits/object/print_vtable_sizes.rs b/tests/ui/traits/object/print_vtable_sizes.rs
index 684458d079e..2b1745da5f3 100644
--- a/tests/ui/traits/object/print_vtable_sizes.rs
+++ b/tests/ui/traits/object/print_vtable_sizes.rs
@@ -7,7 +7,7 @@ trait A<T: help::V>: AsRef<[T::V]> + AsMut<[T::V]> {}
 trait B<T>: AsRef<T> + AsRef<T> + AsRef<T> + AsRef<T> {}
 
 trait C {
-    fn x() {} // not object safe, shouldn't be reported
+    fn x() {} // not dyn-compatible, shouldn't be reported
 }
 
 // This does not have any upcasting cost,
diff --git a/tests/ui/traits/object/safety.rs b/tests/ui/traits/object/safety.rs
index f43d332d696..f4abcf8542e 100644
--- a/tests/ui/traits/object/safety.rs
+++ b/tests/ui/traits/object/safety.rs
@@ -1,4 +1,4 @@
-// Check that static methods are not object-safe.
+// Check that static methods render the trait dyn-incompatible.
 
 trait Tr {
     fn foo();
diff --git a/tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.rs b/tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.rs
index d37943b929a..43443be88df 100644
--- a/tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.rs
+++ b/tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.rs
@@ -1,4 +1,3 @@
-//~ ERROR overflow
 // A regression test for #111729 checking that we correctly
 // track recursion depth for obligations returned by confirmation.
 use std::panic::RefUnwindSafe;
@@ -18,6 +17,7 @@ impl<T: RefUnwindSafe> Database for T {
     type Storage = SalsaStorage;
 }
 impl Database for RootDatabase {
+    //~^ ERROR conflicting implementations of trait `Database` for type `RootDatabase`
     type Storage = SalsaStorage;
 }
 
diff --git a/tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.stderr b/tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.stderr
index 2ab150fc0f6..1da7671b451 100644
--- a/tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.stderr
+++ b/tests/ui/traits/solver-cycles/cycle-via-builtin-auto-trait-impl.stderr
@@ -1,24 +1,12 @@
-error[E0275]: overflow evaluating the requirement `Runtime<RootDatabase>: RefUnwindSafe`
-   |
-   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`cycle_via_builtin_auto_trait_impl`)
-note: required because it appears within the type `RootDatabase`
-  --> $DIR/cycle-via-builtin-auto-trait-impl.rs:13:8
-   |
-LL | struct RootDatabase {
-   |        ^^^^^^^^^^^^
-note: required for `RootDatabase` to implement `Database`
-  --> $DIR/cycle-via-builtin-auto-trait-impl.rs:17:24
+error[E0119]: conflicting implementations of trait `Database` for type `RootDatabase`
+  --> $DIR/cycle-via-builtin-auto-trait-impl.rs:19:1
    |
 LL | impl<T: RefUnwindSafe> Database for T {
-   |         -------------  ^^^^^^^^     ^
-   |         |
-   |         unsatisfied trait bound introduced here
-note: required because it appears within the type `Runtime<RootDatabase>`
-  --> $DIR/cycle-via-builtin-auto-trait-impl.rs:24:8
-   |
-LL | struct Runtime<DB: Database> {
-   |        ^^^^^^^
+   | ------------------------------------- first implementation here
+...
+LL | impl Database for RootDatabase {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `RootDatabase`
 
 error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0275`.
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/vtable/vtable-non-object-safe.rs b/tests/ui/traits/vtable/vtable-dyn-incompatible.rs
index f98af0f23b7..64a8138bdcf 100644
--- a/tests/ui/traits/vtable/vtable-non-object-safe.rs
+++ b/tests/ui/traits/vtable/vtable-dyn-incompatible.rs
@@ -1,7 +1,7 @@
 //@ build-fail
 #![feature(rustc_attrs)]
 
-// Ensure that non-object-safe methods in Iterator does not generate
+// Ensure that dyn-incompatible methods in Iterator does not generate
 // vtable entries.
 
 #[rustc_dump_vtable]
diff --git a/tests/ui/traits/vtable/vtable-non-object-safe.stderr b/tests/ui/traits/vtable/vtable-dyn-incompatible.stderr
index 53eef5d0b13..e442c3eac00 100644
--- a/tests/ui/traits/vtable/vtable-non-object-safe.stderr
+++ b/tests/ui/traits/vtable/vtable-dyn-incompatible.stderr
@@ -7,7 +7,7 @@ error: vtable entries for `<std::vec::IntoIter<u8> as A>`: [
            Method(<std::vec::IntoIter<u8> as Iterator>::advance_by),
            Method(<std::vec::IntoIter<u8> as Iterator>::nth),
        ]
-  --> $DIR/vtable-non-object-safe.rs:8:1
+  --> $DIR/vtable-dyn-incompatible.rs:8:1
    |
 LL | trait A: Iterator {}
    | ^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/traits/wf-object/no-duplicates.rs b/tests/ui/traits/wf-object/no-duplicates.rs
index 678ede58296..83544064ce2 100644
--- a/tests/ui/traits/wf-object/no-duplicates.rs
+++ b/tests/ui/traits/wf-object/no-duplicates.rs
@@ -1,7 +1,7 @@
-// The purpose of this test is to demonstrate that duplicating object safe traits
+// The purpose of this test is to demonstrate that duplicating dyn-compatible traits
 // that are not auto-traits is rejected even though one could reasonably accept this.
 
-// Some arbitrary object-safe trait:
+// Some arbitrary dyn-compatible trait:
 trait Obj {}
 
 // Demonstrate that recursive expansion of trait aliases doesn't affect stable behavior:
diff --git a/tests/ui/traits/wf-object/reverse-order.rs b/tests/ui/traits/wf-object/reverse-order.rs
index b8f2aae8966..99c727cc332 100644
--- a/tests/ui/traits/wf-object/reverse-order.rs
+++ b/tests/ui/traits/wf-object/reverse-order.rs
@@ -2,7 +2,7 @@
 
 // Ensure that `dyn $($AutoTrait)+ ObjSafe` is well-formed.
 
-// Some arbitrary object-safe trait:
+// Some arbitrary dyn-compatible trait:
 trait Obj {}
 
 type _0 = dyn Unpin;
diff --git a/tests/ui/transmutability/malformed-program-gracefulness/coherence-bikeshed-intrinsic-from.rs b/tests/ui/transmutability/malformed-program-gracefulness/coherence-bikeshed-intrinsic-from.rs
new file mode 100644
index 00000000000..0cebc99cd41
--- /dev/null
+++ b/tests/ui/transmutability/malformed-program-gracefulness/coherence-bikeshed-intrinsic-from.rs
@@ -0,0 +1,11 @@
+#![feature(transmutability)]
+#![feature(type_alias_impl_trait)]
+trait OpaqueTrait {}
+type OpaqueType = impl OpaqueTrait;
+//~^ ERROR unconstrained opaque type
+trait AnotherTrait {}
+impl<T: std::mem::TransmuteFrom<(), ()>> AnotherTrait for T {}
+//~^ ERROR type provided when a constant was expected
+impl AnotherTrait for OpaqueType {}
+//~^ ERROR conflicting implementations of trait `AnotherTrait`
+pub fn main() {}
diff --git a/tests/ui/transmutability/malformed-program-gracefulness/coherence-bikeshed-intrinsic-from.stderr b/tests/ui/transmutability/malformed-program-gracefulness/coherence-bikeshed-intrinsic-from.stderr
new file mode 100644
index 00000000000..cdf9deecd51
--- /dev/null
+++ b/tests/ui/transmutability/malformed-program-gracefulness/coherence-bikeshed-intrinsic-from.stderr
@@ -0,0 +1,27 @@
+error[E0747]: type provided when a constant was expected
+  --> $DIR/coherence-bikeshed-intrinsic-from.rs:7:37
+   |
+LL | impl<T: std::mem::TransmuteFrom<(), ()>> AnotherTrait for T {}
+   |                                     ^^
+
+error[E0119]: conflicting implementations of trait `AnotherTrait`
+  --> $DIR/coherence-bikeshed-intrinsic-from.rs:9:1
+   |
+LL | impl<T: std::mem::TransmuteFrom<(), ()>> AnotherTrait for T {}
+   | ----------------------------------------------------------- first implementation here
+LL |
+LL | impl AnotherTrait for OpaqueType {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
+
+error: unconstrained opaque type
+  --> $DIR/coherence-bikeshed-intrinsic-from.rs:4:19
+   |
+LL | type OpaqueType = impl OpaqueTrait;
+   |                   ^^^^^^^^^^^^^^^^
+   |
+   = note: `OpaqueType` must be used in combination with a concrete type within the same module
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0119, E0747.
+For more information about an error, try `rustc --explain E0119`.
diff --git a/tests/ui/type-alias-impl-trait/impl_trait_for_same_tait.stderr b/tests/ui/type-alias-impl-trait/impl_trait_for_same_tait.stderr
index e35913be899..aaf75cc3db9 100644
--- a/tests/ui/type-alias-impl-trait/impl_trait_for_same_tait.stderr
+++ b/tests/ui/type-alias-impl-trait/impl_trait_for_same_tait.stderr
@@ -15,8 +15,6 @@ LL | impl Bop for Bar<()> {}
 ...
 LL | impl Bop for Barr {}
    | ^^^^^^^^^^^^^^^^^ conflicting implementation for `Bar<()>`
-   |
-   = note: upstream crates may add a new impl of trait `std::marker::FnPtr` for type `Barr` in future versions
 
 error[E0119]: conflicting implementations of trait `Bop` for type `Bar<()>`
   --> $DIR/impl_trait_for_same_tait.rs:30:1
diff --git a/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.error.stderr b/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.error.stderr
index a97227e481e..49997b073c9 100644
--- a/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.error.stderr
+++ b/tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.error.stderr
@@ -1,11 +1,11 @@
-error[E0119]: conflicting implementations of trait `Yay` for type `Alias`
+error[E0119]: conflicting implementations of trait `Yay` for type `<() as HideIt>::Assoc`
   --> $DIR/implied_lifetime_wf_check.rs:26:1
    |
 LL | impl Yay for <() as HideIt>::Assoc {}
    | ---------------------------------- first implementation here
 LL | #[cfg(error)]
 LL | impl Yay for i32 {}
-   | ^^^^^^^^^^^^^^^^ conflicting implementation for `Alias`
+   | ^^^^^^^^^^^^^^^^ conflicting implementation for `<() as HideIt>::Assoc`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/type-alias-impl-trait/issue-104817.rs b/tests/ui/type-alias-impl-trait/issue-104817.rs
index 4679d025fce..49146321614 100644
--- a/tests/ui/type-alias-impl-trait/issue-104817.rs
+++ b/tests/ui/type-alias-impl-trait/issue-104817.rs
@@ -14,6 +14,6 @@ fn mk_opaque() -> OpaqueType {
 trait AnotherTrait {}
 impl<T: Send> AnotherTrait for T {}
 impl AnotherTrait for OpaqueType {}
-//[stock]~^ conflicting implementations of trait `AnotherTrait` for type `OpaqueType`
+//[stock]~^ conflicting implementations of trait `AnotherTrait`
 
 fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/issue-104817.stock.stderr b/tests/ui/type-alias-impl-trait/issue-104817.stock.stderr
index 41c5206d9e8..df5a6c320a8 100644
--- a/tests/ui/type-alias-impl-trait/issue-104817.stock.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-104817.stock.stderr
@@ -1,10 +1,10 @@
-error[E0119]: conflicting implementations of trait `AnotherTrait` for type `OpaqueType`
+error[E0119]: conflicting implementations of trait `AnotherTrait`
   --> $DIR/issue-104817.rs:16:1
    |
 LL | impl<T: Send> AnotherTrait for T {}
    | -------------------------------- first implementation here
 LL | impl AnotherTrait for OpaqueType {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `OpaqueType`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.stderr b/tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.stderr
index 7bc2fa1b09e..921667f577b 100644
--- a/tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.stderr
+++ b/tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.stderr
@@ -1,3 +1,15 @@
+error[E0308]: mismatched types
+  --> $DIR/lazy_subtyping_of_opaques.rs:11:5
+   |
+LL | fn reify_as_tait() -> Thunk<Tait> {
+   |                       ----------- expected `Thunk<_>` because of return type
+LL |
+LL |     Thunk::new(|cont| cont)
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ expected `Thunk<_>`, found `()`
+   |
+   = note: expected struct `Thunk<_>`
+           found unit type `()`
+
 error[E0277]: expected a `FnOnce()` closure, found `()`
   --> $DIR/lazy_subtyping_of_opaques.rs:11:23
    |
@@ -12,19 +24,13 @@ error[E0277]: expected a `FnOnce()` closure, found `()`
    |
 LL | fn reify_as_tait() -> Thunk<Tait> {
    |                       ^^^^^^^^^^^ expected an `FnOnce()` closure, found `()`
+LL |
+LL |     Thunk::new(|cont| cont)
+   |     ----------------------- return type was inferred to be `{type error}` here
    |
    = help: the trait `FnOnce()` is not implemented for `()`
    = note: wrap the `()` in a closure with no arguments: `|| { /* code */ }`
 
-error[E0308]: mismatched types
-  --> $DIR/lazy_subtyping_of_opaques.rs:11:5
-   |
-LL |     Thunk::new(|cont| cont)
-   |     ^^^^^^^^^^^^^^^^^^^^^^^ expected `Thunk<_>`, found `()`
-   |
-   = note: expected struct `Thunk<_>`
-           found unit type `()`
-
 error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0277, E0308.
diff --git a/tests/ui/typeck/issue-103899.rs b/tests/ui/typeck/issue-103899.rs
index 38882e9dc54..81ab92a8994 100644
--- a/tests/ui/typeck/issue-103899.rs
+++ b/tests/ui/typeck/issue-103899.rs
@@ -1,11 +1,9 @@
 //@ revisions: current next
-//@[next] compile-flags: -Znext-solver
-//@[next] check-pass
 //@ ignore-compare-mode-next-solver (explicit revisions)
-//@[current] check-fail
-//@[current] failure-status: 101
-//@[current] dont-check-compiler-stderr
-//@[current] known-bug: #103899
+//@ check-fail
+//@ failure-status: 101
+//@ dont-check-compiler-stderr
+//@ known-bug: #103899
 
 trait BaseWithAssoc {
     type Assoc;
diff --git a/tests/ui/union/unnamed-fields/anon-struct-in-enum-issue-121446.rs b/tests/ui/union/unnamed-fields/anon-struct-in-enum-issue-121446.rs
deleted file mode 100644
index 00f9bfd5cdf..00000000000
--- a/tests/ui/union/unnamed-fields/anon-struct-in-enum-issue-121446.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-#![crate_type = "lib"]
-#![feature(unnamed_fields)]
-#![allow(unused, incomplete_features)]
-
-enum K {
-    M {
-        _ : struct { field: u8 },
-        //~^ error: unnamed fields are not allowed outside of structs or unions
-        //~| error: anonymous structs are not allowed outside of unnamed struct or union fields
-    }
-}
diff --git a/tests/ui/union/unnamed-fields/anon-struct-in-enum-issue-121446.stderr b/tests/ui/union/unnamed-fields/anon-struct-in-enum-issue-121446.stderr
deleted file mode 100644
index 43843141e2e..00000000000
--- a/tests/ui/union/unnamed-fields/anon-struct-in-enum-issue-121446.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error: unnamed fields are not allowed outside of structs or unions
-  --> $DIR/anon-struct-in-enum-issue-121446.rs:7:9
-   |
-LL |         _ : struct { field: u8 },
-   |         -^^^^^^^^^^^^^^^^^^^^^^^
-   |         |
-   |         unnamed field declared here
-
-error: anonymous structs are not allowed outside of unnamed struct or union fields
-  --> $DIR/anon-struct-in-enum-issue-121446.rs:7:13
-   |
-LL |         _ : struct { field: u8 },
-   |             ^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/union/unnamed-fields/auxiliary/dep.rs b/tests/ui/union/unnamed-fields/auxiliary/dep.rs
deleted file mode 100644
index a11f3e18f52..00000000000
--- a/tests/ui/union/unnamed-fields/auxiliary/dep.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-#[repr(C)]
-pub struct GoodStruct(());
-
-pub struct BadStruct(());
-
-pub enum BadEnum {
-    A,
-    B,
-}
-
-#[repr(C)]
-pub enum BadEnum2 {
-    A,
-    B,
-}
-
-pub type GoodAlias = GoodStruct;
-pub type BadAlias = i32;
diff --git a/tests/ui/union/unnamed-fields/field_uniqueness_check.rs b/tests/ui/union/unnamed-fields/field_uniqueness_check.rs
deleted file mode 100644
index ddb951aa06c..00000000000
--- a/tests/ui/union/unnamed-fields/field_uniqueness_check.rs
+++ /dev/null
@@ -1,337 +0,0 @@
-#![allow(incomplete_features)]
-#![feature(unnamed_fields)]
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-struct Foo {
-    a: u8,
-}
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-struct Bar {
-    _: union {
-        a: u8,
-    },
-}
-
-
-// duplicated with a normal field
-#[derive(Clone, Copy)]
-#[repr(C)]
-union A {
-    // referent field
-    a: u8,
-
-    // normal field
-    a: u8, //~ ERROR field `a` is already declared [E0124]
-    // nested field
-    _: struct {
-        a: u8, //~ ERROR field `a` is already declared [E0124]
-        a: u8, //~ ERROR field `a` is already declared [E0124]
-    },
-    // more nested field
-    _: union {
-        _: struct {
-            a: u8, //~ ERROR field `a` is already declared [E0124]
-        },
-    },
-    // nested field in a named adt
-    _: Foo, //~ ERROR field `a` is already declared
-    _: Bar, //~ ERROR field `a` is already declared
-    // nested field in a named adt in an anoymous adt
-    _: struct {
-        _: Foo, //~ ERROR field `a` is already declared
-        _: Bar, //~ ERROR field `a` is already declared
-    },
-}
-
-// duplicated with a nested field
-#[derive(Clone, Copy)]
-#[repr(C)]
-struct B {
-    _: union {
-        // referent field
-        a: u8,
-
-        // normal field (within the same anonymous adt)
-        a: u8, //~ ERROR field `a` is already declared [E0124]
-        // nested field (within the same anonymous adt)
-        _: struct {
-            a: u8, //~ ERROR field `a` is already declared [E0124]
-        },
-        // more nested field (within the same anonymous adt)
-        _: union {
-            _: struct {
-                a: u8, //~ ERROR field `a` is already declared [E0124]
-            },
-        },
-        // nested field in a named adt (within the same anonymous adt)
-        _: Foo, //~ ERROR field `a` is already declared
-        _: Bar, //~ ERROR field `a` is already declared
-        // nested field in a named adt in an anoymous adt (within the same anonymous adt)
-        _: struct {
-            _: Foo, //~ ERROR field `a` is already declared
-            _: Bar, //~ ERROR field `a` is already declared
-        },
-    },
-
-    // normal field
-    a: u8, //~ ERROR field `a` is already declared [E0124]
-    // nested field
-    _: struct {
-        a: u8, //~ ERROR field `a` is already declared [E0124]
-    },
-    // more nested field
-    _: union {
-        _: struct {
-            a: u8, //~ ERROR field `a` is already declared [E0124]
-        },
-    },
-    // nested field in a named adt
-    _: Foo, //~ ERROR field `a` is already declared
-    _: Bar, //~ ERROR field `a` is already declared
-    // nested field in a named adt in an anoymous adt
-    _: struct {
-        _: Foo, //~ ERROR field `a` is already declared
-        _: Bar, //~ ERROR field `a` is already declared
-    },
-}
-
-// duplicated with a more nested field
-#[derive(Clone, Copy)]
-#[repr(C)]
-union C {
-    _: struct {
-        _: union {
-            // referent field
-            a: u8,
-
-            // normal field (within the same anonymous adt)
-            a: u8, //~ ERROR field `a` is already declared [E0124]
-            // nested field (within the same anonymous adt)
-            _: struct {
-                a: u8, //~ ERROR field `a` is already declared [E0124]
-            },
-            // more nested field (within the same anonymous adt)
-            _: union {
-                _: struct {
-                    a: u8, //~ ERROR field `a` is already declared [E0124]
-                },
-            },
-            // nested field in a named adt (within the same anonymous adt)
-            _: Foo, //~ ERROR field `a` is already declared
-            _: Bar, //~ ERROR field `a` is already declared
-            // nested field in a named adt in an anoymous adt (within the same anonymous adt)
-            _: struct {
-                _: Foo, //~ ERROR field `a` is already declared
-                _: Bar, //~ ERROR field `a` is already declared
-            },
-        },
-
-        // normal field (within the direct outer anonymous adt)
-        a: u8, //~ ERROR field `a` is already declared [E0124]
-        // nested field (within the direct outer anonymous adt)
-        _: struct {
-            a: u8, //~ ERROR field `a` is already declared [E0124]
-        },
-        // more nested field (within the direct outer anonymous adt)
-        _: union {
-            _: struct {
-                a: u8, //~ ERROR field `a` is already declared [E0124]
-            },
-        },
-        // nested field in a named adt (within the direct outer anonymous adt)
-        _: Foo, //~ ERROR field `a` is already declared
-        _: Bar, //~ ERROR field `a` is already declared
-        // nested field in a named adt in an anoymous adt (within the direct outer anonymous adt)
-        _: struct {
-            _: Foo, //~ ERROR field `a` is already declared
-            _: Bar, //~ ERROR field `a` is already declared
-        },
-    },
-    // normal field
-    a: u8, //~ ERROR field `a` is already declared [E0124]
-    // nested field
-    _: union {
-        a: u8, //~ ERROR field `a` is already declared [E0124]
-    },
-    // more nested field
-    _: struct {
-        _: union {
-            a: u8, //~ ERROR field `a` is already declared [E0124]
-        },
-    },
-    // nested field in a named adt
-    _: Foo, //~ ERROR field `a` is already declared
-    _: Bar, //~ ERROR field `a` is already declared
-    // nested field in a named adt in an anoymous adt
-    _: union {
-        _: Foo, //~ ERROR field `a` is already declared
-        _: Bar, //~ ERROR field `a` is already declared
-    },
-}
-
-// duplicated with a nested field in a named adt
-#[derive(Clone, Copy)]
-#[repr(C)]
-struct D {
-    // referent field `a`
-    _: Foo,
-
-    // normal field
-    a: u8, //~ ERROR field `a` is already declared
-    // nested field
-    _: union {
-        a: u8, //~ ERROR field `a` is already declared
-    },
-    // more nested field
-    _: struct {
-        _: union {
-            a: u8, //~ ERROR field `a` is already declared
-        },
-    },
-    // nested field in another named adt
-    _: Foo, //~ ERROR field `a` is already declared
-    _: Bar, //~ ERROR field `a` is already declared
-    // nested field in a named adt in an anoymous adt
-    _: union {
-        _: Foo, //~ ERROR field `a` is already declared
-        _: Bar, //~ ERROR field `a` is already declared
-    },
-}
-
-// duplicated with a nested field in a nested field of a named adt
-#[derive(Clone, Copy)]
-#[repr(C)]
-union D2 {
-    // referent field `a`
-    _: Bar,
-
-    // normal field
-    a: u8, //~ ERROR field `a` is already declared
-    // nested field
-    _: union {
-        a: u8, //~ ERROR field `a` is already declared
-    },
-    // more nested field
-    _: struct {
-        _: union {
-            a: u8, //~ ERROR field `a` is already declared
-        },
-    },
-    // nested field in another named adt
-    _: Foo, //~ ERROR field `a` is already declared
-    _: Bar, //~ ERROR field `a` is already declared
-    // nested field in a named adt in an anoymous adt
-    _: union {
-        _: Foo, //~ ERROR field `a` is already declared
-        _: Bar, //~ ERROR field `a` is already declared
-    },
-}
-
-// duplicated with a nested field in a named adt in an anonymous adt
-#[derive(Clone, Copy)]
-#[repr(C)]
-struct E {
-    _: struct {
-        // referent field `a`
-        _: Foo,
-
-        // normal field (within the same anonymous adt)
-        a: u8, //~ ERROR field `a` is already declared
-        // nested field (within the same anonymous adt)
-        _: struct {
-            a: u8, //~ ERROR field `a` is already declared
-        },
-        // more nested field (within the same anonymous adt)
-        _: union {
-            _: struct {
-                a: u8, //~ ERROR field `a` is already declared
-            },
-        },
-        // nested field in a named adt (within the same anonymous adt)
-        _: Foo, //~ ERROR field `a` is already declared
-        _: Bar, //~ ERROR field `a` is already declared
-        // nested field in a named adt in an anoymous adt (within the same anonymous adt)
-        _: struct {
-            _: Foo, //~ ERROR field `a` is already declared
-            _: Bar, //~ ERROR field `a` is already declared
-        },
-    },
-
-    // normal field
-    a: u8, //~ ERROR field `a` is already declared
-    // nested field
-    _: union {
-        a: u8, //~ ERROR field `a` is already declared
-    },
-    // more nested field
-    _: struct {
-        _: union {
-            a: u8, //~ ERROR field `a` is already declared
-        },
-    },
-    // nested field in another named adt
-    _: Foo, //~ ERROR field `a` is already declared
-    _: Bar, //~ ERROR field `a` is already declared
-    // nested field in a named adt in an anoymous adt
-    _: union {
-        _: Foo, //~ ERROR field `a` is already declared
-        _: Bar, //~ ERROR field `a` is already declared
-    },
-}
-
-// duplicated with a nested field in a named adt in an anonymous adt
-#[repr(C)]
-#[derive(Clone, Copy)]
-union E2 {
-    _: struct {
-        // referent field `a`
-        _: Bar,
-
-        // normal field (within the same anonymous adt)
-        a: u8, //~ ERROR field `a` is already declared
-        // nested field (within the same anonymous adt)
-        _: struct {
-            a: u8, //~ ERROR field `a` is already declared
-        },
-        // more nested field (within the same anonymous adt)
-        _: union {
-            _: struct {
-                a: u8, //~ ERROR field `a` is already declared
-            },
-        },
-        // nested field in a named adt (within the same anonymous adt)
-        _: Foo, //~ ERROR field `a` is already declared
-        _: Bar, //~ ERROR field `a` is already declared
-        // nested field in a named adt in an anoymous adt (within the same anonymous adt)
-        _: struct {
-            _: Foo, //~ ERROR field `a` is already declared
-            _: Bar, //~ ERROR field `a` is already declared
-        },
-    },
-
-    // normal field
-    a: u8, //~ ERROR field `a` is already declared
-    // nested field
-    _: union {
-        a: u8, //~ ERROR field `a` is already declared
-    },
-    // more nested field
-    _: struct {
-        _: union {
-            a: u8, //~ ERROR field `a` is already declared
-        },
-    },
-    // nested field in another named adt
-    _: Foo, //~ ERROR field `a` is already declared
-    _: Bar, //~ ERROR field `a` is already declared
-    // nested field in a named adt in an anoymous adt
-    _: union {
-        _: Foo, //~ ERROR field `a` is already declared
-        _: Bar, //~ ERROR field `a` is already declared
-    },
-}
-
-fn main() {}
diff --git a/tests/ui/union/unnamed-fields/field_uniqueness_check.stderr b/tests/ui/union/unnamed-fields/field_uniqueness_check.stderr
deleted file mode 100644
index 11978386843..00000000000
--- a/tests/ui/union/unnamed-fields/field_uniqueness_check.stderr
+++ /dev/null
@@ -1,1734 +0,0 @@
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:27:5
-   |
-LL |     a: u8,
-   |     ----- `a` first declared here
-...
-LL |     a: u8,
-   |     ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:30:9
-   |
-LL |     a: u8,
-   |     ----- `a` first declared here
-...
-LL |         a: u8,
-   |         ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:31:9
-   |
-LL |     a: u8,
-   |     ----- `a` first declared here
-...
-LL |         a: u8,
-   |         ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:36:13
-   |
-LL |     a: u8,
-   |     ----- `a` first declared here
-...
-LL |             a: u8,
-   |             ^^^^^ field already declared
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:40:5
-   |
-LL |     a: u8,
-   |     ----- `a` first declared here
-...
-LL |     _: Foo,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:40:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:41:5
-   |
-LL |     a: u8,
-   |     ----- `a` first declared here
-...
-LL |     _: Bar,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:41:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:44:9
-   |
-LL |     a: u8,
-   |     ----- `a` first declared here
-...
-LL |         _: Foo,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:44:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:45:9
-   |
-LL |     a: u8,
-   |     ----- `a` first declared here
-...
-LL |         _: Bar,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:45:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:58:9
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |         a: u8,
-   |         ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:61:13
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |             a: u8,
-   |             ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:66:17
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |                 a: u8,
-   |                 ^^^^^ field already declared
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:70:9
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |         _: Foo,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:70:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:71:9
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |         _: Bar,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:71:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:74:13
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |             _: Foo,
-   |             ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:74:13
-   |
-LL |             _: Foo,
-   |             ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:75:13
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |             _: Bar,
-   |             ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:75:13
-   |
-LL |             _: Bar,
-   |             ^^^^^^
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:80:5
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |     a: u8,
-   |     ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:83:9
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |         a: u8,
-   |         ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:88:13
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |             a: u8,
-   |             ^^^^^ field already declared
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:92:5
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |     _: Foo,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:92:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:93:5
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |     _: Bar,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:93:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:96:9
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |         _: Foo,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:96:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:97:9
-   |
-LL |         a: u8,
-   |         ----- `a` first declared here
-...
-LL |         _: Bar,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:97:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:111:13
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |             a: u8,
-   |             ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:114:17
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |                 a: u8,
-   |                 ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:119:21
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |                     a: u8,
-   |                     ^^^^^ field already declared
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:123:13
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |             _: Foo,
-   |             ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:123:13
-   |
-LL |             _: Foo,
-   |             ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:124:13
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |             _: Bar,
-   |             ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:124:13
-   |
-LL |             _: Bar,
-   |             ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:127:17
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |                 _: Foo,
-   |                 ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:127:17
-   |
-LL |                 _: Foo,
-   |                 ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:128:17
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |                 _: Bar,
-   |                 ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:128:17
-   |
-LL |                 _: Bar,
-   |                 ^^^^^^
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:133:9
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |         a: u8,
-   |         ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:136:13
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |             a: u8,
-   |             ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:141:17
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |                 a: u8,
-   |                 ^^^^^ field already declared
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:145:9
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |         _: Foo,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:145:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:146:9
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |         _: Bar,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:146:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:149:13
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |             _: Foo,
-   |             ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:149:13
-   |
-LL |             _: Foo,
-   |             ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:150:13
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |             _: Bar,
-   |             ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:150:13
-   |
-LL |             _: Bar,
-   |             ^^^^^^
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:154:5
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |     a: u8,
-   |     ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:157:9
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |         a: u8,
-   |         ^^^^^ field already declared
-
-error[E0124]: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:162:13
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |             a: u8,
-   |             ^^^^^ field already declared
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:166:5
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |     _: Foo,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:166:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:167:5
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |     _: Bar,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:167:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:170:9
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |         _: Foo,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:170:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:171:9
-   |
-LL |             a: u8,
-   |             ----- `a` first declared here
-...
-LL |         _: Bar,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:171:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:183:5
-   |
-LL |     _: Foo,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |     a: u8,
-   |     ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:180:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:186:9
-   |
-LL |     _: Foo,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |         a: u8,
-   |         ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:180:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:191:13
-   |
-LL |     _: Foo,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |             a: u8,
-   |             ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:180:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:195:5
-   |
-LL |     _: Foo,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |     _: Foo,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:195:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:180:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:196:5
-   |
-LL |     _: Foo,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |     _: Bar,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:196:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:180:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:199:9
-   |
-LL |     _: Foo,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |         _: Foo,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:199:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:180:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:200:9
-   |
-LL |     _: Foo,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |         _: Bar,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:200:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:180:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:212:5
-   |
-LL |     _: Bar,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |     a: u8,
-   |     ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:209:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:215:9
-   |
-LL |     _: Bar,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |         a: u8,
-   |         ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:209:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:220:13
-   |
-LL |     _: Bar,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |             a: u8,
-   |             ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:209:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:224:5
-   |
-LL |     _: Bar,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |     _: Foo,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:224:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:209:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:225:5
-   |
-LL |     _: Bar,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |     _: Bar,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:225:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:209:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:228:9
-   |
-LL |     _: Bar,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |         _: Foo,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:228:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:209:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:229:9
-   |
-LL |     _: Bar,
-   |     ------ `a` first declared here in this unnamed field
-...
-LL |         _: Bar,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:229:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:209:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:242:9
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |         a: u8,
-   |         ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:245:13
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |             a: u8,
-   |             ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:250:17
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |                 a: u8,
-   |                 ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:254:9
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |         _: Foo,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:254:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:255:9
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |         _: Bar,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:255:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:258:13
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |             _: Foo,
-   |             ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:258:13
-   |
-LL |             _: Foo,
-   |             ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:259:13
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |             _: Bar,
-   |             ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:259:13
-   |
-LL |             _: Bar,
-   |             ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:264:5
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |     a: u8,
-   |     ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:267:9
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |         a: u8,
-   |         ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:272:13
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |             a: u8,
-   |             ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:276:5
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |     _: Foo,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:276:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:277:5
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |     _: Bar,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:277:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:280:9
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |         _: Foo,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:280:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:281:9
-   |
-LL |         _: Foo,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |         _: Bar,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:281:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:239:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:294:9
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |         a: u8,
-   |         ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:297:13
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |             a: u8,
-   |             ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:302:17
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |                 a: u8,
-   |                 ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:306:9
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |         _: Foo,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:306:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:307:9
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |         _: Bar,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:307:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:310:13
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |             _: Foo,
-   |             ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:310:13
-   |
-LL |             _: Foo,
-   |             ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:311:13
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |             _: Bar,
-   |             ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:311:13
-   |
-LL |             _: Bar,
-   |             ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:316:5
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |     a: u8,
-   |     ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:319:9
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |         a: u8,
-   |         ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:324:13
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |             a: u8,
-   |             ^^^^^ field already declared
-   |
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:328:5
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |     _: Foo,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:328:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:329:5
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |     _: Bar,
-   |     ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:329:5
-   |
-LL |     _: Bar,
-   |     ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:332:9
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |         _: Foo,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:7:5
-   |
-LL |     a: u8,
-   |     ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:332:9
-   |
-LL |         _: Foo,
-   |         ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: field `a` is already declared
-  --> $DIR/field_uniqueness_check.rs:333:9
-   |
-LL |         _: Bar,
-   |         ------ `a` first declared here in this unnamed field
-...
-LL |         _: Bar,
-   |         ^^^^^^ field `a` declared in this unnamed field
-   |
-note: field `a` declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:333:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-note: field `a` first declared here
-  --> $DIR/field_uniqueness_check.rs:14:9
-   |
-LL |         a: u8,
-   |         ^^^^^
-help: fields from the type of this unnamed field are considered fields of the outer type
-  --> $DIR/field_uniqueness_check.rs:291:9
-   |
-LL |         _: Bar,
-   |         ^^^^^^
-
-error: aborting due to 85 previous errors
-
-For more information about this error, try `rustc --explain E0124`.
diff --git a/tests/ui/union/unnamed-fields/repr_check.rs b/tests/ui/union/unnamed-fields/repr_check.rs
deleted file mode 100644
index b50b54b20af..00000000000
--- a/tests/ui/union/unnamed-fields/repr_check.rs
+++ /dev/null
@@ -1,69 +0,0 @@
-#![allow(incomplete_features)]
-#![feature(unnamed_fields)]
-
-struct A { //~ ERROR struct with unnamed fields must have `#[repr(C)]` representation
-           //~^ NOTE struct `A` defined here
-    _: struct { //~ NOTE unnamed field defined here
-        a: i32,
-    },
-    _: struct { //~ NOTE unnamed field defined here
-        _: struct {
-            b: i32,
-        },
-    },
-}
-
-union B { //~ ERROR union with unnamed fields must have `#[repr(C)]` representation
-          //~^ NOTE union `B` defined here
-    _: union { //~ NOTE unnamed field defined here
-        a: i32,
-    },
-    _: union { //~ NOTE unnamed field defined here
-        _: union {
-            b: i32,
-        },
-    },
-}
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-struct Foo {}
-
-#[derive(Clone, Copy)]
-struct Bar {}
-//~^ `Bar` defined here
-//~| `Bar` defined here
-//~| `Bar` defined here
-//~| `Bar` defined here
-
-struct C { //~ ERROR struct with unnamed fields must have `#[repr(C)]` representation
-           //~^ NOTE struct `C` defined here
-    _: Foo, //~ NOTE unnamed field defined here
-}
-
-union D { //~ ERROR union with unnamed fields must have `#[repr(C)]` representation
-          //~^ NOTE union `D` defined here
-    _: Foo, //~ NOTE unnamed field defined here
-}
-
-#[repr(C)]
-struct E {
-    _: Bar, //~ ERROR named type of unnamed field must have `#[repr(C)]` representation
-            //~^ NOTE unnamed field defined here
-    _: struct {
-        _: Bar, //~ ERROR named type of unnamed field must have `#[repr(C)]` representation
-                //~^ NOTE unnamed field defined here
-    },
-}
-
-#[repr(C)]
-union F {
-    _: Bar, //~ ERROR named type of unnamed field must have `#[repr(C)]` representation
-            //~^ NOTE unnamed field defined here
-    _: union {
-        _: Bar, //~ ERROR named type of unnamed field must have `#[repr(C)]` representation
-                //~^ NOTE unnamed field defined here
-    },
-}
-
-fn main() {}
diff --git a/tests/ui/union/unnamed-fields/repr_check.stderr b/tests/ui/union/unnamed-fields/repr_check.stderr
deleted file mode 100644
index 324968b1264..00000000000
--- a/tests/ui/union/unnamed-fields/repr_check.stderr
+++ /dev/null
@@ -1,152 +0,0 @@
-error: struct with unnamed fields must have `#[repr(C)]` representation
-  --> $DIR/repr_check.rs:4:1
-   |
-LL | struct A {
-   | ^^^^^^^^ struct `A` defined here
-   |
-note: unnamed field defined here
-  --> $DIR/repr_check.rs:6:5
-   |
-LL | /     _: struct {
-LL | |         a: i32,
-LL | |     },
-   | |_____^
-note: unnamed field defined here
-  --> $DIR/repr_check.rs:9:5
-   |
-LL | /     _: struct {
-LL | |         _: struct {
-LL | |             b: i32,
-LL | |         },
-LL | |     },
-   | |_____^
-help: add `#[repr(C)]` to this struct
-   |
-LL + #[repr(C)]
-LL | struct A {
-   |
-
-error: union with unnamed fields must have `#[repr(C)]` representation
-  --> $DIR/repr_check.rs:16:1
-   |
-LL | union B {
-   | ^^^^^^^ union `B` defined here
-   |
-note: unnamed field defined here
-  --> $DIR/repr_check.rs:18:5
-   |
-LL | /     _: union {
-LL | |         a: i32,
-LL | |     },
-   | |_____^
-note: unnamed field defined here
-  --> $DIR/repr_check.rs:21:5
-   |
-LL | /     _: union {
-LL | |         _: union {
-LL | |             b: i32,
-LL | |         },
-LL | |     },
-   | |_____^
-help: add `#[repr(C)]` to this union
-   |
-LL + #[repr(C)]
-LL | union B {
-   |
-
-error: struct with unnamed fields must have `#[repr(C)]` representation
-  --> $DIR/repr_check.rs:39:1
-   |
-LL | struct C {
-   | ^^^^^^^^ struct `C` defined here
-   |
-note: unnamed field defined here
-  --> $DIR/repr_check.rs:41:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-help: add `#[repr(C)]` to this struct
-   |
-LL + #[repr(C)]
-LL | struct C {
-   |
-
-error: union with unnamed fields must have `#[repr(C)]` representation
-  --> $DIR/repr_check.rs:44:1
-   |
-LL | union D {
-   | ^^^^^^^ union `D` defined here
-   |
-note: unnamed field defined here
-  --> $DIR/repr_check.rs:46:5
-   |
-LL |     _: Foo,
-   |     ^^^^^^
-help: add `#[repr(C)]` to this union
-   |
-LL + #[repr(C)]
-LL | union D {
-   |
-
-error: named type of unnamed field must have `#[repr(C)]` representation
-  --> $DIR/repr_check.rs:51:5
-   |
-LL | struct Bar {}
-   | ---------- `Bar` defined here
-...
-LL |     _: Bar,
-   |     ^^^^^^ unnamed field defined here
-   |
-help: add `#[repr(C)]` to this struct
-   |
-LL + #[repr(C)]
-LL | struct Bar {}
-   |
-
-error: named type of unnamed field must have `#[repr(C)]` representation
-  --> $DIR/repr_check.rs:54:9
-   |
-LL | struct Bar {}
-   | ---------- `Bar` defined here
-...
-LL |         _: Bar,
-   |         ^^^^^^ unnamed field defined here
-   |
-help: add `#[repr(C)]` to this struct
-   |
-LL + #[repr(C)]
-LL | struct Bar {}
-   |
-
-error: named type of unnamed field must have `#[repr(C)]` representation
-  --> $DIR/repr_check.rs:61:5
-   |
-LL | struct Bar {}
-   | ---------- `Bar` defined here
-...
-LL |     _: Bar,
-   |     ^^^^^^ unnamed field defined here
-   |
-help: add `#[repr(C)]` to this struct
-   |
-LL + #[repr(C)]
-LL | struct Bar {}
-   |
-
-error: named type of unnamed field must have `#[repr(C)]` representation
-  --> $DIR/repr_check.rs:64:9
-   |
-LL | struct Bar {}
-   | ---------- `Bar` defined here
-...
-LL |         _: Bar,
-   |         ^^^^^^ unnamed field defined here
-   |
-help: add `#[repr(C)]` to this struct
-   |
-LL + #[repr(C)]
-LL | struct Bar {}
-   |
-
-error: aborting due to 8 previous errors
-
diff --git a/tests/ui/union/unnamed-fields/restrict_anonymous_structs.rs b/tests/ui/union/unnamed-fields/restrict_anonymous_structs.rs
deleted file mode 100644
index 03545ed7b18..00000000000
--- a/tests/ui/union/unnamed-fields/restrict_anonymous_structs.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-#![allow(incomplete_features)]
-#![feature(unnamed_fields)]
-
-struct F {
-    field1: struct { field2: u8 }, //~ ERROR anonymous structs are not allowed outside of unnamed struct or union fields
-    _: struct { field3: u8 },
-}
-
-struct G {
-    _: (u8, u8), //~ ERROR unnamed fields can only have struct or union types
-}
-
-union H {
-    field1: struct { field2: u8 }, //~ ERROR anonymous structs are not allowed outside of unnamed struct or union fields
-    _: struct { field3: u8 },
-}
-
-union I {
-    _: (u8, u8), //~ ERROR unnamed fields can only have struct or union types
-}
-
-enum K {
-    M {
-        _ : struct { field: u8 }, //~ ERROR anonymous structs are not allowed outside of unnamed struct or union fields
-        //~^ ERROR unnamed fields are not allowed outside of structs or unions
-    },
-    N {
-        _ : u8, //~ ERROR unnamed fields are not allowed outside of structs or unions
-    }
-}
-
-fn main() {}
diff --git a/tests/ui/union/unnamed-fields/restrict_anonymous_structs.stderr b/tests/ui/union/unnamed-fields/restrict_anonymous_structs.stderr
deleted file mode 100644
index 3b3890af771..00000000000
--- a/tests/ui/union/unnamed-fields/restrict_anonymous_structs.stderr
+++ /dev/null
@@ -1,48 +0,0 @@
-error: anonymous structs are not allowed outside of unnamed struct or union fields
-  --> $DIR/restrict_anonymous_structs.rs:5:13
-   |
-LL |     field1: struct { field2: u8 },
-   |             ^^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
-
-error: unnamed fields can only have struct or union types
-  --> $DIR/restrict_anonymous_structs.rs:10:5
-   |
-LL |     _: (u8, u8),
-   |     ^  -------- not a struct or union
-
-error: anonymous structs are not allowed outside of unnamed struct or union fields
-  --> $DIR/restrict_anonymous_structs.rs:14:13
-   |
-LL |     field1: struct { field2: u8 },
-   |             ^^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
-
-error: unnamed fields can only have struct or union types
-  --> $DIR/restrict_anonymous_structs.rs:19:5
-   |
-LL |     _: (u8, u8),
-   |     ^  -------- not a struct or union
-
-error: unnamed fields are not allowed outside of structs or unions
-  --> $DIR/restrict_anonymous_structs.rs:24:9
-   |
-LL |         _ : struct { field: u8 },
-   |         -^^^^^^^^^^^^^^^^^^^^^^^
-   |         |
-   |         unnamed field declared here
-
-error: anonymous structs are not allowed outside of unnamed struct or union fields
-  --> $DIR/restrict_anonymous_structs.rs:24:13
-   |
-LL |         _ : struct { field: u8 },
-   |             ^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
-
-error: unnamed fields are not allowed outside of structs or unions
-  --> $DIR/restrict_anonymous_structs.rs:28:9
-   |
-LL |         _ : u8,
-   |         -^^^^^
-   |         |
-   |         unnamed field declared here
-
-error: aborting due to 7 previous errors
-
diff --git a/tests/ui/union/unnamed-fields/restrict_anonymous_unions.rs b/tests/ui/union/unnamed-fields/restrict_anonymous_unions.rs
deleted file mode 100644
index 9ffe71b28c2..00000000000
--- a/tests/ui/union/unnamed-fields/restrict_anonymous_unions.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-#![allow(incomplete_features)]
-#![feature(unnamed_fields)]
-
-struct F {
-    field1: union { field2: u8 }, //~ ERROR anonymous unions are not allowed outside of unnamed struct or union fields
-    _: union { field3: u8 },
-}
-
-struct G {
-    _: (u8, u8), //~ ERROR unnamed fields can only have struct or union types
-}
-
-union H {
-    field1: union { field2: u8 }, //~ ERROR anonymous unions are not allowed outside of unnamed struct or union fields
-    _: union { field3: u8 },
-}
-
-union I {
-    _: (u8, u8), //~ ERROR unnamed fields can only have struct or union types
-}
-
-enum K {
-    M {
-        _ : union { field: u8 }, //~ ERROR anonymous unions are not allowed outside of unnamed struct or union fields
-        //~^ ERROR unnamed fields are not allowed outside of structs or unions
-    },
-    N {
-        _ : u8, //~ ERROR unnamed fields are not allowed outside of structs or unions
-    }
-}
-
-fn main() {}
diff --git a/tests/ui/union/unnamed-fields/restrict_anonymous_unions.stderr b/tests/ui/union/unnamed-fields/restrict_anonymous_unions.stderr
deleted file mode 100644
index f8679aad2d7..00000000000
--- a/tests/ui/union/unnamed-fields/restrict_anonymous_unions.stderr
+++ /dev/null
@@ -1,48 +0,0 @@
-error: anonymous unions are not allowed outside of unnamed struct or union fields
-  --> $DIR/restrict_anonymous_unions.rs:5:13
-   |
-LL |     field1: union { field2: u8 },
-   |             ^^^^^^^^^^^^^^^^^^^^ anonymous union declared here
-
-error: unnamed fields can only have struct or union types
-  --> $DIR/restrict_anonymous_unions.rs:10:5
-   |
-LL |     _: (u8, u8),
-   |     ^  -------- not a struct or union
-
-error: anonymous unions are not allowed outside of unnamed struct or union fields
-  --> $DIR/restrict_anonymous_unions.rs:14:13
-   |
-LL |     field1: union { field2: u8 },
-   |             ^^^^^^^^^^^^^^^^^^^^ anonymous union declared here
-
-error: unnamed fields can only have struct or union types
-  --> $DIR/restrict_anonymous_unions.rs:19:5
-   |
-LL |     _: (u8, u8),
-   |     ^  -------- not a struct or union
-
-error: unnamed fields are not allowed outside of structs or unions
-  --> $DIR/restrict_anonymous_unions.rs:24:9
-   |
-LL |         _ : union { field: u8 },
-   |         -^^^^^^^^^^^^^^^^^^^^^^
-   |         |
-   |         unnamed field declared here
-
-error: anonymous unions are not allowed outside of unnamed struct or union fields
-  --> $DIR/restrict_anonymous_unions.rs:24:13
-   |
-LL |         _ : union { field: u8 },
-   |             ^^^^^^^^^^^^^^^^^^^ anonymous union declared here
-
-error: unnamed fields are not allowed outside of structs or unions
-  --> $DIR/restrict_anonymous_unions.rs:28:9
-   |
-LL |         _ : u8,
-   |         -^^^^^
-   |         |
-   |         unnamed field declared here
-
-error: aborting due to 7 previous errors
-
diff --git a/tests/ui/union/unnamed-fields/restrict_type_hir.rs b/tests/ui/union/unnamed-fields/restrict_type_hir.rs
deleted file mode 100644
index 80e4608be82..00000000000
--- a/tests/ui/union/unnamed-fields/restrict_type_hir.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-//@ aux-build:dep.rs
-
-// test for #121151
-
-#![allow(incomplete_features)]
-#![feature(unnamed_fields)]
-
-extern crate dep;
-
-#[repr(C)]
-struct A {
-    a: u8,
-}
-
-enum BadEnum {
-    A,
-    B,
-}
-
-#[repr(C)]
-enum BadEnum2 {
-    A,
-    B,
-}
-
-type MyStruct = A;
-type MyI32 = i32;
-
-#[repr(C)]
-struct L {
-    _: i32, //~ ERROR unnamed fields can only have struct or union types
-    _: MyI32, //~ ERROR unnamed fields can only have struct or union types
-    _: BadEnum, //~ ERROR unnamed fields can only have struct or union types
-    _: BadEnum2, //~ ERROR unnamed fields can only have struct or union types
-    _: MyStruct,
-    _: dep::BadStruct, //~ ERROR named type of unnamed field must have `#[repr(C)]` representation
-    _: dep::BadEnum, //~ ERROR unnamed fields can only have struct or union types
-    _: dep::BadEnum2, //~ ERROR unnamed fields can only have struct or union types
-    _: dep::BadAlias, //~ ERROR unnamed fields can only have struct or union types
-    _: dep::GoodAlias,
-    _: dep::GoodStruct,
-}
-
-fn main() {}
diff --git a/tests/ui/union/unnamed-fields/restrict_type_hir.stderr b/tests/ui/union/unnamed-fields/restrict_type_hir.stderr
deleted file mode 100644
index 3e80d7fbf5c..00000000000
--- a/tests/ui/union/unnamed-fields/restrict_type_hir.stderr
+++ /dev/null
@@ -1,62 +0,0 @@
-error: unnamed fields can only have struct or union types
-  --> $DIR/restrict_type_hir.rs:31:5
-   |
-LL |     _: i32,
-   |     ^^^^^^
-
-error: unnamed fields can only have struct or union types
-  --> $DIR/restrict_type_hir.rs:32:5
-   |
-LL |     _: MyI32,
-   |     ^^^^^^^^
-
-error: unnamed fields can only have struct or union types
-  --> $DIR/restrict_type_hir.rs:33:5
-   |
-LL |     _: BadEnum,
-   |     ^^^^^^^^^^
-
-error: unnamed fields can only have struct or union types
-  --> $DIR/restrict_type_hir.rs:34:5
-   |
-LL |     _: BadEnum2,
-   |     ^^^^^^^^^^^
-
-error: named type of unnamed field must have `#[repr(C)]` representation
-  --> $DIR/restrict_type_hir.rs:36:5
-   |
-LL |     _: dep::BadStruct,
-   |     ^^^^^^^^^^^^^^^^^ unnamed field defined here
-   |
-  ::: $DIR/auxiliary/dep.rs:4:1
-   |
-LL | pub struct BadStruct(());
-   | -------------------- `BadStruct` defined here
-   |
-help: add `#[repr(C)]` to this struct
-  --> $DIR/auxiliary/dep.rs:4:1
-   |
-LL + #[repr(C)]
-LL | pub struct BadStruct(());
-   |
-
-error: unnamed fields can only have struct or union types
-  --> $DIR/restrict_type_hir.rs:37:5
-   |
-LL |     _: dep::BadEnum,
-   |     ^^^^^^^^^^^^^^^
-
-error: unnamed fields can only have struct or union types
-  --> $DIR/restrict_type_hir.rs:38:5
-   |
-LL |     _: dep::BadEnum2,
-   |     ^^^^^^^^^^^^^^^^
-
-error: unnamed fields can only have struct or union types
-  --> $DIR/restrict_type_hir.rs:39:5
-   |
-LL |     _: dep::BadAlias,
-   |     ^^^^^^^^^^^^^^^^
-
-error: aborting due to 8 previous errors
-
diff --git a/tests/ui/union/unnamed-fields/unnamed-enum-field-issue-121757.rs b/tests/ui/union/unnamed-fields/unnamed-enum-field-issue-121757.rs
deleted file mode 100644
index 5d15ec4cffd..00000000000
--- a/tests/ui/union/unnamed-fields/unnamed-enum-field-issue-121757.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-type NodeId = u32;
-struct Type<'a>(std::marker::PhantomData::<&'a ()>);
-
-type Ast<'ast> = &'ast AstStructure<'ast>;
-
-struct AstStructure<'ast> {
-//~^ ERROR struct with unnamed fields must have `#[repr(C)]` representation
-    id: NodeId,
-    _: AstKind<'ast>
-//~^ ERROR unnamed fields are not yet fully implemented [E0658]
-//~^^ ERROR unnamed fields can only have struct or union types
-}
-
-enum AstKind<'ast> {
-    ExprInt,
-    ExprLambda(Ast<'ast>),
-}
-
-fn compute_types<'tcx,'ast>(ast: Ast<'ast>) -> Type<'tcx>
-{
-    match ast.kind {}
-//~^ ERROR no field `kind` on type `&'ast AstStructure<'ast>` [E0609]
-}
-
-fn main() {}
diff --git a/tests/ui/union/unnamed-fields/unnamed-enum-field-issue-121757.stderr b/tests/ui/union/unnamed-fields/unnamed-enum-field-issue-121757.stderr
deleted file mode 100644
index 4ea910202de..00000000000
--- a/tests/ui/union/unnamed-fields/unnamed-enum-field-issue-121757.stderr
+++ /dev/null
@@ -1,45 +0,0 @@
-error[E0658]: unnamed fields are not yet fully implemented
-  --> $DIR/unnamed-enum-field-issue-121757.rs:9:5
-   |
-LL |     _: AstKind<'ast>
-   |     ^
-   |
-   = note: see issue #49804 <https://github.com/rust-lang/rust/issues/49804> for more information
-   = help: add `#![feature(unnamed_fields)]` 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: struct with unnamed fields must have `#[repr(C)]` representation
-  --> $DIR/unnamed-enum-field-issue-121757.rs:6:1
-   |
-LL | struct AstStructure<'ast> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^ struct `AstStructure` defined here
-   |
-note: unnamed field defined here
-  --> $DIR/unnamed-enum-field-issue-121757.rs:9:5
-   |
-LL |     _: AstKind<'ast>
-   |     ^^^^^^^^^^^^^^^^
-help: add `#[repr(C)]` to this struct
-   |
-LL + #[repr(C)]
-LL | struct AstStructure<'ast> {
-   |
-
-error: unnamed fields can only have struct or union types
-  --> $DIR/unnamed-enum-field-issue-121757.rs:9:5
-   |
-LL |     _: AstKind<'ast>
-   |     ^^^^^^^^^^^^^^^^
-
-error[E0609]: no field `kind` on type `&'ast AstStructure<'ast>`
-  --> $DIR/unnamed-enum-field-issue-121757.rs:21:15
-   |
-LL |     match ast.kind {}
-   |               ^^^^ unknown field
-   |
-   = note: available fields are: `id`, `_`
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0609, E0658.
-For more information about an error, try `rustc --explain E0609`.
diff --git a/tests/ui/unpretty/expanded-exhaustive.rs b/tests/ui/unpretty/expanded-exhaustive.rs
index 279d723a26c..799e8071d02 100644
--- a/tests/ui/unpretty/expanded-exhaustive.rs
+++ b/tests/ui/unpretty/expanded-exhaustive.rs
@@ -23,7 +23,6 @@
 #![feature(trace_macros)]
 #![feature(trait_alias)]
 #![feature(try_blocks)]
-#![feature(unnamed_fields)]
 #![feature(yeet_expr)]
 #![allow(incomplete_features)]
 
@@ -786,20 +785,6 @@ mod types {
         let _: (T, T);
     }
 
-    /// TyKind::AnonStruct
-    fn ty_anon_struct() {
-        struct Struct {
-            _: struct { t: T },
-        }
-    }
-
-    /// TyKind::AnonUnion
-    fn ty_anon_union() {
-        struct Struct {
-            _: union { t: T },
-        }
-    }
-
     /// TyKind::Path
     fn ty_path() {
         let _: T;
diff --git a/tests/ui/unpretty/expanded-exhaustive.stdout b/tests/ui/unpretty/expanded-exhaustive.stdout
index 149659693ae..d8384951e12 100644
--- a/tests/ui/unpretty/expanded-exhaustive.stdout
+++ b/tests/ui/unpretty/expanded-exhaustive.stdout
@@ -24,7 +24,6 @@
 #![feature(trace_macros)]
 #![feature(trait_alias)]
 #![feature(try_blocks)]
-#![feature(unnamed_fields)]
 #![feature(yeet_expr)]
 #![allow(incomplete_features)]
 #[prelude_import]
@@ -364,8 +363,6 @@ mod expressions {
 
 
 
-
-
         { builtin # offset_of(T, field) };
     }
     /// ExprKind::MacCall
@@ -636,22 +633,6 @@ mod types {
     fn ty_never() { let _: !; }
     /// TyKind::Tup
     fn ty_tup() { let _: (); let _: (T,); let _: (T, T); }
-    /// TyKind::AnonStruct
-    fn ty_anon_struct() {
-        struct Struct {
-            _: struct  {
-                t: T,
-            },
-        }
-    }
-    /// TyKind::AnonUnion
-    fn ty_anon_union() {
-        struct Struct {
-            _: union  {
-                t: T,
-            },
-        }
-    }
     /// TyKind::Path
     fn ty_path() {
         let _: T;
diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility-rpass.rs
index 7ccea43d182..7ccea43d182 100644
--- a/tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs
+++ b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility-rpass.rs
diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility-with-default.rs
index 1f9b5f11fb5..1f9b5f11fb5 100644
--- a/tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs
+++ b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility-with-default.rs
diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety.rs b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility.rs
index d0ba6944a1e..d0ba6944a1e 100644
--- a/tests/ui/unsized-locals/by-value-trait-object-safety.rs
+++ b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility.rs
diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety.stderr b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility.stderr
index 6a93464febb..223624cfca4 100644
--- a/tests/ui/unsized-locals/by-value-trait-object-safety.stderr
+++ b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility.stderr
@@ -1,5 +1,5 @@
 warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/by-value-trait-object-safety.rs:1:12
+  --> $DIR/by-value-trait-dyn-compatibility.rs:1:12
    |
 LL | #![feature(unsized_locals)]
    |            ^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | #![feature(unsized_locals)]
    = note: `#[warn(incomplete_features)]` on by default
 
 error: the `foo` method cannot be invoked on a trait object
-  --> $DIR/by-value-trait-object-safety.rs:20:7
+  --> $DIR/by-value-trait-dyn-compatibility.rs:20:7
    |
 LL |         Self: Sized;
    |               ----- this has a `Sized` requirement
diff --git a/tests/ui/use/unused-trait-with-method-err.rs b/tests/ui/use/unused-trait-with-method-err.rs
new file mode 100644
index 00000000000..37684e1bf81
--- /dev/null
+++ b/tests/ui/use/unused-trait-with-method-err.rs
@@ -0,0 +1,17 @@
+// Test that we don't issue an unused import warning when there's
+// a method lookup error and that trait was possibly applicable.
+
+use foo::Bar;
+
+mod foo {
+    pub trait Bar {
+        fn uwu(&self) {}
+    }
+}
+
+struct Foo;
+
+fn main() {
+    Foo.uwu();
+    //~^ ERROR no method named `uwu` found for struct `Foo` in the current scope
+}
diff --git a/tests/ui/use/unused-trait-with-method-err.stderr b/tests/ui/use/unused-trait-with-method-err.stderr
new file mode 100644
index 00000000000..7ca4563673b
--- /dev/null
+++ b/tests/ui/use/unused-trait-with-method-err.stderr
@@ -0,0 +1,19 @@
+error[E0599]: no method named `uwu` found for struct `Foo` in the current scope
+  --> $DIR/unused-trait-with-method-err.rs:15:9
+   |
+LL | struct Foo;
+   | ---------- method `uwu` not found for this struct
+...
+LL |     Foo.uwu();
+   |         ^^^ method not found in `Foo`
+   |
+   = help: items from traits can only be used if the trait is implemented and in scope
+note: `Bar` defines an item `uwu`, perhaps you need to implement it
+  --> $DIR/unused-trait-with-method-err.rs:7:5
+   |
+LL |     pub trait Bar {
+   |     ^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/variance/type-resolve-error-two-structs-deep.rs b/tests/ui/variance/type-resolve-error-two-structs-deep.rs
new file mode 100644
index 00000000000..47ec532ab96
--- /dev/null
+++ b/tests/ui/variance/type-resolve-error-two-structs-deep.rs
@@ -0,0 +1,13 @@
+// Make sure we don't report bivariance errors when nesting structs w/ unresolved
+// fields into *other* structs.
+
+struct Hello<'a> {
+    missing: Missing<'a>,
+    //~^ ERROR cannot find type `Missing` in this scope
+}
+
+struct Other<'a> {
+    hello: Hello<'a>,
+}
+
+fn main() {}
diff --git a/tests/ui/variance/type-resolve-error-two-structs-deep.stderr b/tests/ui/variance/type-resolve-error-two-structs-deep.stderr
new file mode 100644
index 00000000000..3458d924bb1
--- /dev/null
+++ b/tests/ui/variance/type-resolve-error-two-structs-deep.stderr
@@ -0,0 +1,9 @@
+error[E0412]: cannot find type `Missing` in this scope
+  --> $DIR/type-resolve-error-two-structs-deep.rs:5:14
+   |
+LL |     missing: Missing<'a>,
+   |              ^^^^^^^ not found in this scope
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/wf/wf-convert-unsafe-trait-obj-box.rs b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.rs
index ffdb49a3be5..26292a1d218 100644
--- a/tests/ui/wf/wf-convert-unsafe-trait-obj-box.rs
+++ b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.rs
@@ -1,7 +1,7 @@
 // Check that we do not allow casts or coercions
-// to object unsafe trait objects inside a Box
+// to dyn-incompatible trait objects inside a Box
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Trait: Sized {}
 
diff --git a/tests/ui/wf/wf-convert-unsafe-trait-obj-box.stderr b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr
index 2565e25a242..38426545bc8 100644
--- a/tests/ui/wf/wf-convert-unsafe-trait-obj-box.stderr
+++ b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-convert-unsafe-trait-obj-box.rs:16:33
+  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:16:33
    |
 LL |     let t_box: Box<dyn Trait> = Box::new(S);
    |                                 ^^^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-convert-unsafe-trait-obj-box.rs:6:14
+  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
@@ -15,13 +15,13 @@ LL | trait Trait: Sized {}
    = note: required for the cast from `Box<S>` to `Box<dyn Trait>`
 
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-convert-unsafe-trait-obj-box.rs:17:15
+  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:17:15
    |
 LL |     takes_box(Box::new(S));
    |               ^^^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-convert-unsafe-trait-obj-box.rs:6:14
+  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
@@ -31,13 +31,13 @@ LL | trait Trait: Sized {}
    = note: required for the cast from `Box<S>` to `Box<(dyn Trait + 'static)>`
 
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-convert-unsafe-trait-obj-box.rs:15:5
+  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:15:5
    |
 LL |     Box::new(S) as Box<dyn Trait>;
    |     ^^^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-convert-unsafe-trait-obj-box.rs:6:14
+  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
diff --git a/tests/ui/wf/wf-convert-unsafe-trait-obj.rs b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.rs
index 143b854ed6b..ec4bb2897f9 100644
--- a/tests/ui/wf/wf-convert-unsafe-trait-obj.rs
+++ b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.rs
@@ -1,7 +1,7 @@
 // Check that we do not allow casts or coercions
-// to object unsafe trait objects by ref
+// to dyn-incompatible trait objects by ref
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Trait: Sized {}
 
diff --git a/tests/ui/wf/wf-convert-unsafe-trait-obj.stderr b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr
index 97f6bcd0428..94259aa5b0a 100644
--- a/tests/ui/wf/wf-convert-unsafe-trait-obj.stderr
+++ b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-convert-unsafe-trait-obj.rs:16:25
+  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:16:25
    |
 LL |     let t: &dyn Trait = &S;
    |                         ^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-convert-unsafe-trait-obj.rs:6:14
+  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
@@ -15,13 +15,13 @@ LL | trait Trait: Sized {}
    = note: required for the cast from `&S` to `&dyn Trait`
 
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-convert-unsafe-trait-obj.rs:17:17
+  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:17:17
    |
 LL |     takes_trait(&S);
    |                 ^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-convert-unsafe-trait-obj.rs:6:14
+  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
@@ -31,13 +31,13 @@ LL | trait Trait: Sized {}
    = note: required for the cast from `&S` to `&dyn Trait`
 
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-convert-unsafe-trait-obj.rs:15:5
+  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:15:5
    |
 LL |     &S as &dyn Trait;
    |     ^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-convert-unsafe-trait-obj.rs:6:14
+  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
diff --git a/tests/ui/wf/wf-unsafe-trait-obj-match.rs b/tests/ui/wf/wf-dyn-incompat-trait-obj-match.rs
index c8731a8ecaf..07e90538b85 100644
--- a/tests/ui/wf/wf-unsafe-trait-obj-match.rs
+++ b/tests/ui/wf/wf-dyn-incompat-trait-obj-match.rs
@@ -1,7 +1,7 @@
 // Check that we do not allow coercions to object
 // unsafe trait objects in match arms
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Trait: Sized {}
 
diff --git a/tests/ui/wf/wf-unsafe-trait-obj-match.stderr b/tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr
index edbdec6a5ef..d7366e12256 100644
--- a/tests/ui/wf/wf-unsafe-trait-obj-match.stderr
+++ b/tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr
@@ -1,5 +1,5 @@
 error[E0308]: `match` arms have incompatible types
-  --> $DIR/wf-unsafe-trait-obj-match.rs:23:17
+  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:23:17
    |
 LL | /     match opt() {
 LL | |         Some(()) => &S,
@@ -13,13 +13,13 @@ LL | |     }
               found reference `&R`
 
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-unsafe-trait-obj-match.rs:26:21
+  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:26:21
    |
 LL |         Some(()) => &S,
    |                     ^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-unsafe-trait-obj-match.rs:6:14
+  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
@@ -31,7 +31,7 @@ LL | trait Trait: Sized {}
    = note: required for the cast from `&S` to `&dyn Trait`
 
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-unsafe-trait-obj-match.rs:25:25
+  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:25:25
    |
 LL |       let t: &dyn Trait = match opt() {
    |  _________________________^
@@ -41,7 +41,7 @@ LL | |     };
    | |_____^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-unsafe-trait-obj-match.rs:6:14
+  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
diff --git a/tests/ui/wf/wf-object-safe.rs b/tests/ui/wf/wf-dyn-incompatible.rs
index 42e6917551f..16e7ca1cbc6 100644
--- a/tests/ui/wf/wf-object-safe.rs
+++ b/tests/ui/wf/wf-dyn-incompatible.rs
@@ -1,4 +1,4 @@
-// Check that object-safe traits are not WF when used as object types.
+// Check that dyn-incompatible traits are not WF when used as trait object types.
 // Issue #21953.
 
 trait A {
diff --git a/tests/ui/wf/wf-object-safe.stderr b/tests/ui/wf/wf-dyn-incompatible.stderr
index 7c14f3d2f8b..cf016b63c74 100644
--- a/tests/ui/wf/wf-object-safe.stderr
+++ b/tests/ui/wf/wf-dyn-incompatible.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `A` cannot be made into an object
-  --> $DIR/wf-object-safe.rs:9:13
+  --> $DIR/wf-dyn-incompatible.rs:9:13
    |
 LL |     let _x: &dyn A;
    |             ^^^^^^ `A` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-object-safe.rs:5:23
+  --> $DIR/wf-dyn-incompatible.rs:5:23
    |
 LL | trait A {
    |       - this trait cannot be made into an object...