about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/codegen/asm-arm64ec-clobbers.rs36
-rw-r--r--tests/codegen/asm-msp430-clobbers.rs36
-rw-r--r--tests/crashes/118987.rs17
-rw-r--r--tests/crashes/120241-2.rs10
-rw-r--r--tests/crashes/120241.rs13
-rw-r--r--tests/crashes/120482.rs13
-rw-r--r--tests/crashes/125512.rs10
-rw-r--r--tests/crashes/131507.rs10
-rw-r--r--tests/crashes/131534.rs5
-rw-r--r--tests/crashes/131535.rs4
-rw-r--r--tests/crashes/131538.rs13
-rw-r--r--tests/debuginfo/strings-and-strs.rs3
-rw-r--r--tests/debuginfo/type-names.rs4
-rw-r--r--tests/pretty/autodiff_forward.pp107
-rw-r--r--tests/pretty/autodiff_forward.rs39
-rw-r--r--tests/pretty/autodiff_reverse.pp86
-rw-r--r--tests/pretty/autodiff_reverse.rs40
-rw-r--r--tests/run-make/README.md2
-rw-r--r--tests/run-make/non-unicode-env/non_unicode_env.rs1
-rw-r--r--tests/run-make/non-unicode-env/non_unicode_env.stderr10
-rw-r--r--tests/rustdoc-json/fns/extern_safe.rs2
-rw-r--r--tests/rustdoc-ui/doctest/non-local-defs-impl.stdout1
-rw-r--r--tests/rustdoc-ui/doctest/non_local_defs.stderr1
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs2
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr4
-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/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/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/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/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/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-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.old.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.next.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/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.next.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.classic.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/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/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/avoid-ice-on-warning-2.new.stderr40
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr2
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-2.rs7
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-3.new.stderr74
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr10
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-3.rs8
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning.new.stderr16
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning.rs1
-rw-r--r--tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.fixed3
-rw-r--r--tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.stderr15
-rw-r--r--tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.rs3
-rw-r--r--tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs57
-rw-r--r--tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr141
-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/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-pin_ergonomics.rs11
-rw-r--r--tests/ui/feature-gates/feature-gate-pin_ergonomics.stderr45
-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/higher-ranked/leak-check/leak-check-in-selection-5-ambig.rs6
-rw-r--r--tests/ui/higher-ranked/structually-relate-aliases.rs3
-rw-r--r--tests/ui/higher-ranked/structually-relate-aliases.stderr33
-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/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/negative-reasoning.rs2
-rw-r--r--tests/ui/impl-trait/negative-reasoning.stderr6
-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/lint/non-local-defs/cargo-update.stderr1
-rw-r--r--tests/ui/lint/non-local-defs/consts.stderr9
-rw-r--r--tests/ui/lint/non-local-defs/convoluted-locals-131474-with-mods.rs11
-rw-r--r--tests/ui/lint/non-local-defs/convoluted-locals-131474.rs9
-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/macro_rules.stderr4
-rw-r--r--tests/ui/lint/non-local-defs/weird-exprs.stderr6
-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/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/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/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/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/specialization/coherence/default-impl-normalization-ambig-2.rs (renamed from tests/crashes/118987-2.rs)4
-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.rs (renamed from tests/crashes/74299.rs)5
-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/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/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs15
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.stderr81
-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/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/traits/alias/issue-83613.rs2
-rw-r--r--tests/ui/traits/alias/issue-83613.stderr4
-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/next-solver/coherence/issue-102048.rs10
-rw-r--r--tests/ui/traits/next-solver/coherence/issue-102048.stderr16
-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/transmutability/malformed-program-gracefulness/coherence-bikeshed-intrinsic-from.rs (renamed from tests/crashes/124207.rs)4
-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/use/unused-trait-with-method-err.rs17
-rw-r--r--tests/ui/use/unused-trait-with-method-err.stderr19
329 files changed, 4586 insertions, 1553 deletions
diff --git a/tests/codegen/asm-arm64ec-clobbers.rs b/tests/codegen/asm-arm64ec-clobbers.rs
new file mode 100644
index 00000000000..2ec61907947
--- /dev/null
+++ b/tests/codegen/asm-arm64ec-clobbers.rs
@@ -0,0 +1,36 @@
+//@ assembly-output: emit-asm
+//@ compile-flags: --target arm64ec-pc-windows-msvc
+//@ needs-llvm-components: aarch64
+
+#![crate_type = "rlib"]
+#![feature(no_core, rustc_attrs, lang_items, asm_experimental_arch)]
+#![no_core]
+
+#[lang = "sized"]
+trait Sized {}
+
+#[rustc_builtin_macro]
+macro_rules! asm {
+    () => {};
+}
+
+// CHECK-LABEL: @cc_clobber
+// CHECK: call void asm sideeffect "", "~{cc}"()
+#[no_mangle]
+pub unsafe fn cc_clobber() {
+    asm!("", options(nostack, nomem));
+}
+
+// CHECK-LABEL: @no_clobber
+// CHECK: call void asm sideeffect "", ""()
+#[no_mangle]
+pub unsafe fn no_clobber() {
+    asm!("", options(nostack, nomem, preserves_flags));
+}
+
+// CHECK-LABEL: @clobber_abi
+// CHECK: asm sideeffect "", "={w0},={w1},={w2},={w3},={w4},={w5},={w6},={w7},={w8},={w9},={w10},={w11},={w12},={w15},={w16},={w17},={w30},={q0},={q1},={q2},={q3},={q4},={q5},={q6},={q7},={q8},={q9},={q10},={q11},={q12},={q13},={q14},={q15}"()
+#[no_mangle]
+pub unsafe fn clobber_abi() {
+    asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags));
+}
diff --git a/tests/codegen/asm-msp430-clobbers.rs b/tests/codegen/asm-msp430-clobbers.rs
new file mode 100644
index 00000000000..c00c04f3088
--- /dev/null
+++ b/tests/codegen/asm-msp430-clobbers.rs
@@ -0,0 +1,36 @@
+//@ assembly-output: emit-asm
+//@ compile-flags: --target msp430-none-elf
+//@ needs-llvm-components: msp430
+
+#![crate_type = "rlib"]
+#![feature(no_core, rustc_attrs, lang_items, asm_experimental_arch)]
+#![no_core]
+
+#[lang = "sized"]
+trait Sized {}
+
+#[rustc_builtin_macro]
+macro_rules! asm {
+    () => {};
+}
+
+// CHECK-LABEL: @sr_clobber
+// CHECK: call void asm sideeffect "", "~{sr}"()
+#[no_mangle]
+pub unsafe fn sr_clobber() {
+    asm!("", options(nostack, nomem));
+}
+
+// CHECK-LABEL: @no_clobber
+// CHECK: call void asm sideeffect "", ""()
+#[no_mangle]
+pub unsafe fn no_clobber() {
+    asm!("", options(nostack, nomem, preserves_flags));
+}
+
+// CHECK-LABEL: @clobber_abi
+// CHECK: asm sideeffect "", "={r11},={r12},={r13},={r14},={r15}"()
+#[no_mangle]
+pub unsafe fn clobber_abi() {
+    asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags));
+}
diff --git a/tests/crashes/118987.rs b/tests/crashes/118987.rs
deleted file mode 100644
index 4382a7bcb63..00000000000
--- a/tests/crashes/118987.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-//@ known-bug: #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 {}
diff --git a/tests/crashes/120241-2.rs b/tests/crashes/120241-2.rs
deleted file mode 100644
index 91ec3362090..00000000000
--- a/tests/crashes/120241-2.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-//@ known-bug: #120241
-//@ edition:2021
-#![feature(dyn_compatible_for_dispatch)]
-#![feature(unsized_fn_params)]
-
-fn guard(_s: Copy) -> bool {
-    panic!()
-}
-
-fn main() {}
diff --git a/tests/crashes/120241.rs b/tests/crashes/120241.rs
deleted file mode 100644
index b4fcb903714..00000000000
--- a/tests/crashes/120241.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-//@ known-bug: #120241
-//@ edition:2021
-#![feature(dyn_compatible_for_dispatch)]
-
-trait B {
-    fn f(a: A) -> A;
-}
-
-trait A {
-    fn g(b: B) -> B;
-}
-
-fn main() {}
diff --git a/tests/crashes/120482.rs b/tests/crashes/120482.rs
deleted file mode 100644
index a395855d796..00000000000
--- a/tests/crashes/120482.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-//@ known-bug: #120482
-//@ edition:2021
-#![feature(dyn_compatible_for_dispatch)]
-
-trait B {
-    fn bar(&self, x: &Self);
-}
-
-trait A {
-    fn g(new: B) -> B;
-}
-
-fn main() {}
diff --git a/tests/crashes/125512.rs b/tests/crashes/125512.rs
deleted file mode 100644
index 37dbdf2f32f..00000000000
--- a/tests/crashes/125512.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-//@ known-bug: rust-lang/rust#125512
-//@ edition:2021
-#![feature(dyn_compatible_for_dispatch)]
-trait B {
-    fn f(a: A) -> A;
-}
-trait A {
-    fn concrete(b: B) -> B;
-}
-fn main() {}
diff --git a/tests/crashes/131507.rs b/tests/crashes/131507.rs
new file mode 100644
index 00000000000..d402fb8afc3
--- /dev/null
+++ b/tests/crashes/131507.rs
@@ -0,0 +1,10 @@
+//@ known-bug: #131507
+//@ compile-flags: -Zmir-opt-level=5 -Zvalidate-mir
+#![feature(non_lifetime_binders)]
+
+fn brick()
+where
+    for<T> T: Copy,
+{
+    || format_args!("");
+}
diff --git a/tests/crashes/131534.rs b/tests/crashes/131534.rs
new file mode 100644
index 00000000000..545b3e68fe8
--- /dev/null
+++ b/tests/crashes/131534.rs
@@ -0,0 +1,5 @@
+//@ known-bug: #131534
+#![feature(generic_const_exprs)]
+type Value<'v> = &[[u8; SIZE]];
+
+trait Trait: Fn(Value) -> Value {}
diff --git a/tests/crashes/131535.rs b/tests/crashes/131535.rs
new file mode 100644
index 00000000000..47ccdf87f2d
--- /dev/null
+++ b/tests/crashes/131535.rs
@@ -0,0 +1,4 @@
+//@ known-bug: #131535
+#![feature(non_lifetime_binders)]
+trait v0<> {}
+fn kind  :(v0<'_, > impl for<v4> v0<'_, v2 = impl v0<v4> + '_>) {}
diff --git a/tests/crashes/131538.rs b/tests/crashes/131538.rs
new file mode 100644
index 00000000000..f971d8b7791
--- /dev/null
+++ b/tests/crashes/131538.rs
@@ -0,0 +1,13 @@
+//@ known-bug: #131538
+#![feature(generic_associated_types_extended)]
+#![feature(trivial_bounds)]
+
+trait HealthCheck {
+    async fn check<const N: usize>();
+}
+
+fn do_health_check_par()
+where
+    HealthCheck: HealthCheck,
+{
+}
diff --git a/tests/debuginfo/strings-and-strs.rs b/tests/debuginfo/strings-and-strs.rs
index b7ee3312d13..3d6589db34b 100644
--- a/tests/debuginfo/strings-and-strs.rs
+++ b/tests/debuginfo/strings-and-strs.rs
@@ -19,8 +19,7 @@
 // gdb-check:$4 = ("Hello", "World")
 
 // gdb-command:print str_in_rc
-// gdb-check:$5 = alloc::rc::Rc<&str, alloc::alloc::Global> {ptr: core::ptr::non_null::NonNull<alloc::rc::RcBox<&str>> {pointer: 0x[...]}, phantom: core::marker::PhantomData<alloc::rc::RcBox<&str>>, alloc: alloc::alloc::Global}
-
+// gdb-check:$5 = alloc::rc::Rc<&str, alloc::alloc::Global> {ptr: core::ptr::non_null::NonNull<alloc::rc::RcInner<&str>> {pointer: 0x[...]}, phantom: core::marker::PhantomData<alloc::rc::RcInner<&str>>, alloc: alloc::alloc::Global}
 
 // === LLDB TESTS ==================================================================================
 // lldb-command:run
diff --git a/tests/debuginfo/type-names.rs b/tests/debuginfo/type-names.rs
index 6831786c228..4caaf3fc97f 100644
--- a/tests/debuginfo/type-names.rs
+++ b/tests/debuginfo/type-names.rs
@@ -17,7 +17,7 @@
 // gdb-check:type = type_names::GenericStruct<type_names::mod1::Struct2, type_names::mod1::mod2::Struct3>
 
 // gdb-command:whatis generic_struct2
-// gdb-check:type = type_names::GenericStruct<type_names::Struct1, extern "fastcall" fn(isize) -> usize>
+// gdb-check:type = type_names::GenericStruct<type_names::Struct1, extern "system" fn(isize) -> usize>
 
 // gdb-command:whatis mod_struct
 // gdb-check:type = type_names::mod1::Struct2
@@ -372,7 +372,7 @@ fn main() {
     let simple_struct = Struct1;
     let generic_struct1: GenericStruct<mod1::Struct2, mod1::mod2::Struct3> =
         GenericStruct(PhantomData);
-    let generic_struct2: GenericStruct<Struct1, extern "fastcall" fn(isize) -> usize> =
+    let generic_struct2: GenericStruct<Struct1, extern "system" fn(isize) -> usize> =
         GenericStruct(PhantomData);
     let mod_struct = mod1::Struct2;
 
diff --git a/tests/pretty/autodiff_forward.pp b/tests/pretty/autodiff_forward.pp
new file mode 100644
index 00000000000..23c3b5b34a8
--- /dev/null
+++ b/tests/pretty/autodiff_forward.pp
@@ -0,0 +1,107 @@
+#![feature(prelude_import)]
+#![no_std]
+//@ needs-enzyme
+
+#![feature(autodiff)]
+#[prelude_import]
+use ::std::prelude::rust_2015::*;
+#[macro_use]
+extern crate std;
+//@ pretty-mode:expanded
+//@ pretty-compare-only
+//@ pp-exact:autodiff_forward.pp
+
+// Test that forward mode ad macros are expanded correctly.
+
+use std::autodiff::autodiff;
+
+#[rustc_autodiff]
+#[inline(never)]
+pub fn f1(x: &[f64], y: f64) -> f64 {
+
+
+
+    // Not the most interesting derivative, but who are we to judge
+
+    // We want to be sure that the same function can be differentiated in different ways
+
+    ::core::panicking::panic("not implemented")
+}
+#[rustc_autodiff(Forward, Dual, Const, Dual,)]
+#[inline(never)]
+pub fn df1(x: &[f64], bx: &[f64], y: f64) -> (f64, f64) {
+    unsafe { asm!("NOP", options(pure, nomem)); };
+    ::core::hint::black_box(f1(x, y));
+    ::core::hint::black_box((bx,));
+    ::core::hint::black_box((f1(x, y), f64::default()))
+}
+#[rustc_autodiff]
+#[inline(never)]
+pub fn f2(x: &[f64], y: f64) -> f64 {
+    ::core::panicking::panic("not implemented")
+}
+#[rustc_autodiff(Forward, Dual, Const, Const,)]
+#[inline(never)]
+pub fn df2(x: &[f64], bx: &[f64], y: f64) -> f64 {
+    unsafe { asm!("NOP", options(pure, nomem)); };
+    ::core::hint::black_box(f2(x, y));
+    ::core::hint::black_box((bx,));
+    ::core::hint::black_box(f2(x, y))
+}
+#[rustc_autodiff]
+#[inline(never)]
+pub fn f3(x: &[f64], y: f64) -> f64 {
+    ::core::panicking::panic("not implemented")
+}
+#[rustc_autodiff(ForwardFirst, Dual, Const, Const,)]
+#[inline(never)]
+pub fn df3(x: &[f64], bx: &[f64], y: f64) -> f64 {
+    unsafe { asm!("NOP", options(pure, nomem)); };
+    ::core::hint::black_box(f3(x, y));
+    ::core::hint::black_box((bx,));
+    ::core::hint::black_box(f3(x, y))
+}
+#[rustc_autodiff]
+#[inline(never)]
+pub fn f4() {}
+#[rustc_autodiff(Forward, None)]
+#[inline(never)]
+pub fn df4() {
+    unsafe { asm!("NOP", options(pure, nomem)); };
+    ::core::hint::black_box(f4());
+    ::core::hint::black_box(());
+}
+#[rustc_autodiff]
+#[inline(never)]
+#[rustc_autodiff]
+#[inline(never)]
+#[rustc_autodiff]
+#[inline(never)]
+pub fn f5(x: &[f64], y: f64) -> f64 {
+    ::core::panicking::panic("not implemented")
+}
+#[rustc_autodiff(Forward, Const, Dual, Const,)]
+#[inline(never)]
+pub fn df5_y(x: &[f64], y: f64, by: f64) -> f64 {
+    unsafe { asm!("NOP", options(pure, nomem)); };
+    ::core::hint::black_box(f5(x, y));
+    ::core::hint::black_box((by,));
+    ::core::hint::black_box(f5(x, y))
+}
+#[rustc_autodiff(Forward, Dual, Const, Const,)]
+#[inline(never)]
+pub fn df5_x(x: &[f64], bx: &[f64], y: f64) -> f64 {
+    unsafe { asm!("NOP", options(pure, nomem)); };
+    ::core::hint::black_box(f5(x, y));
+    ::core::hint::black_box((bx,));
+    ::core::hint::black_box(f5(x, y))
+}
+#[rustc_autodiff(Reverse, Duplicated, Const, Active,)]
+#[inline(never)]
+pub fn df5_rev(x: &[f64], dx: &mut [f64], y: f64, dret: f64) -> f64 {
+    unsafe { asm!("NOP", options(pure, nomem)); };
+    ::core::hint::black_box(f5(x, y));
+    ::core::hint::black_box((dx, dret));
+    ::core::hint::black_box(f5(x, y))
+}
+fn main() {}
diff --git a/tests/pretty/autodiff_forward.rs b/tests/pretty/autodiff_forward.rs
new file mode 100644
index 00000000000..35108d0d6f1
--- /dev/null
+++ b/tests/pretty/autodiff_forward.rs
@@ -0,0 +1,39 @@
+//@ needs-enzyme
+
+#![feature(autodiff)]
+//@ pretty-mode:expanded
+//@ pretty-compare-only
+//@ pp-exact:autodiff_forward.pp
+
+// Test that forward mode ad macros are expanded correctly.
+
+use std::autodiff::autodiff;
+
+#[autodiff(df1, Forward, Dual, Const, Dual)]
+pub fn f1(x: &[f64], y: f64) -> f64 {
+    unimplemented!()
+}
+
+#[autodiff(df2, Forward, Dual, Const, Const)]
+pub fn f2(x: &[f64], y: f64) -> f64 {
+    unimplemented!()
+}
+
+#[autodiff(df3, ForwardFirst, Dual, Const, Const)]
+pub fn f3(x: &[f64], y: f64) -> f64 {
+    unimplemented!()
+}
+
+// Not the most interesting derivative, but who are we to judge
+#[autodiff(df4, Forward)]
+pub fn f4() {}
+
+// We want to be sure that the same function can be differentiated in different ways
+#[autodiff(df5_rev, Reverse, Duplicated, Const, Active)]
+#[autodiff(df5_x, Forward, Dual, Const, Const)]
+#[autodiff(df5_y, Forward, Const, Dual, Const)]
+pub fn f5(x: &[f64], y: f64) -> f64 {
+    unimplemented!()
+}
+
+fn main() {}
diff --git a/tests/pretty/autodiff_reverse.pp b/tests/pretty/autodiff_reverse.pp
new file mode 100644
index 00000000000..a98d3782c70
--- /dev/null
+++ b/tests/pretty/autodiff_reverse.pp
@@ -0,0 +1,86 @@
+#![feature(prelude_import)]
+#![no_std]
+//@ needs-enzyme
+
+#![feature(autodiff)]
+#[prelude_import]
+use ::std::prelude::rust_2015::*;
+#[macro_use]
+extern crate std;
+//@ pretty-mode:expanded
+//@ pretty-compare-only
+//@ pp-exact:autodiff_reverse.pp
+
+// Test that reverse mode ad macros are expanded correctly.
+
+use std::autodiff::autodiff;
+
+#[rustc_autodiff]
+#[inline(never)]
+pub fn f1(x: &[f64], y: f64) -> f64 {
+
+    // Not the most interesting derivative, but who are we to judge
+
+
+    // What happens if we already have Reverse in type (enum variant decl) and value (enum variant
+    // constructor) namespace? > It's expected to work normally.
+
+
+    ::core::panicking::panic("not implemented")
+}
+#[rustc_autodiff(Reverse, Duplicated, Const, Active,)]
+#[inline(never)]
+pub fn df1(x: &[f64], dx: &mut [f64], y: f64, dret: f64) -> f64 {
+    unsafe { asm!("NOP", options(pure, nomem)); };
+    ::core::hint::black_box(f1(x, y));
+    ::core::hint::black_box((dx, dret));
+    ::core::hint::black_box(f1(x, y))
+}
+#[rustc_autodiff]
+#[inline(never)]
+pub fn f2() {}
+#[rustc_autodiff(Reverse, None)]
+#[inline(never)]
+pub fn df2() {
+    unsafe { asm!("NOP", options(pure, nomem)); };
+    ::core::hint::black_box(f2());
+    ::core::hint::black_box(());
+}
+#[rustc_autodiff]
+#[inline(never)]
+pub fn f3(x: &[f64], y: f64) -> f64 {
+    ::core::panicking::panic("not implemented")
+}
+#[rustc_autodiff(ReverseFirst, Duplicated, Const, Active,)]
+#[inline(never)]
+pub fn df3(x: &[f64], dx: &mut [f64], y: f64, dret: f64) -> f64 {
+    unsafe { asm!("NOP", options(pure, nomem)); };
+    ::core::hint::black_box(f3(x, y));
+    ::core::hint::black_box((dx, dret));
+    ::core::hint::black_box(f3(x, y))
+}
+enum Foo { Reverse, }
+use Foo::Reverse;
+#[rustc_autodiff]
+#[inline(never)]
+pub fn f4(x: f32) { ::core::panicking::panic("not implemented") }
+#[rustc_autodiff(Reverse, Const, None)]
+#[inline(never)]
+pub fn df4(x: f32) {
+    unsafe { asm!("NOP", options(pure, nomem)); };
+    ::core::hint::black_box(f4(x));
+    ::core::hint::black_box(());
+}
+#[rustc_autodiff]
+#[inline(never)]
+pub fn f5(x: *const f32, y: &f32) {
+    ::core::panicking::panic("not implemented")
+}
+#[rustc_autodiff(Reverse, DuplicatedOnly, Duplicated, None)]
+#[inline(never)]
+pub unsafe fn df5(x: *const f32, dx: *mut f32, y: &f32, dy: &mut f32) {
+    unsafe { asm!("NOP", options(pure, nomem)); };
+    ::core::hint::black_box(f5(x, y));
+    ::core::hint::black_box((dx, dy));
+}
+fn main() {}
diff --git a/tests/pretty/autodiff_reverse.rs b/tests/pretty/autodiff_reverse.rs
new file mode 100644
index 00000000000..657201caa94
--- /dev/null
+++ b/tests/pretty/autodiff_reverse.rs
@@ -0,0 +1,40 @@
+//@ needs-enzyme
+
+#![feature(autodiff)]
+//@ pretty-mode:expanded
+//@ pretty-compare-only
+//@ pp-exact:autodiff_reverse.pp
+
+// Test that reverse mode ad macros are expanded correctly.
+
+use std::autodiff::autodiff;
+
+#[autodiff(df1, Reverse, Duplicated, Const, Active)]
+pub fn f1(x: &[f64], y: f64) -> f64 {
+    unimplemented!()
+}
+
+// Not the most interesting derivative, but who are we to judge
+#[autodiff(df2, Reverse)]
+pub fn f2() {}
+
+#[autodiff(df3, ReverseFirst, Duplicated, Const, Active)]
+pub fn f3(x: &[f64], y: f64) -> f64 {
+    unimplemented!()
+}
+
+enum Foo { Reverse }
+use Foo::Reverse;
+// What happens if we already have Reverse in type (enum variant decl) and value (enum variant
+// constructor) namespace? > It's expected to work normally.
+#[autodiff(df4, Reverse, Const)]
+pub fn f4(x: f32) {
+    unimplemented!()
+}
+
+#[autodiff(df5, Reverse, DuplicatedOnly, Duplicated)]
+pub fn f5(x: *const f32, y: &f32) {
+    unimplemented!()
+}
+
+fn main() {}
diff --git a/tests/run-make/README.md b/tests/run-make/README.md
index 40359903473..9e1eaa881c9 100644
--- a/tests/run-make/README.md
+++ b/tests/run-make/README.md
@@ -29,7 +29,7 @@ The setup for the `rmake.rs` version is a 3-stage process:
    structure within `build/<target>/test/run-make/`
 
    ```
-   <test-name>/
+   <test-name>/<test-name>/
        rmake.exe              # recipe binary
        rmake_out/             # sources from test sources copied over
    ```
diff --git a/tests/run-make/non-unicode-env/non_unicode_env.rs b/tests/run-make/non-unicode-env/non_unicode_env.rs
index 865fc937365..3efa4842d94 100644
--- a/tests/run-make/non-unicode-env/non_unicode_env.rs
+++ b/tests/run-make/non-unicode-env/non_unicode_env.rs
@@ -1,3 +1,4 @@
 fn main() {
     let _ = env!("NON_UNICODE_VAR");
+    let _ = option_env!("NON_UNICODE_VAR");
 }
diff --git a/tests/run-make/non-unicode-env/non_unicode_env.stderr b/tests/run-make/non-unicode-env/non_unicode_env.stderr
index c4dcd7b2eb7..1f260ac9c07 100644
--- a/tests/run-make/non-unicode-env/non_unicode_env.stderr
+++ b/tests/run-make/non-unicode-env/non_unicode_env.stderr
@@ -6,5 +6,13 @@ error: environment variable `NON_UNICODE_VAR` is not a valid Unicode string
   |
   = note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 1 previous error
+error: environment variable `NON_UNICODE_VAR` is not a valid Unicode string
+ --> non_unicode_env.rs:3:13
+  |
+3 |     let _ = option_env!("NON_UNICODE_VAR");
+  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  |
+  = note: this error originates in the macro `option_env` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 2 previous errors
 
diff --git a/tests/rustdoc-json/fns/extern_safe.rs b/tests/rustdoc-json/fns/extern_safe.rs
index a4a2d2c7f8c..b00f9f50bd2 100644
--- a/tests/rustdoc-json/fns/extern_safe.rs
+++ b/tests/rustdoc-json/fns/extern_safe.rs
@@ -2,7 +2,7 @@ extern "C" {
     //@ is "$.index[*][?(@.name=='f1')].inner.function.header.is_unsafe" true
     pub fn f1();
 
-    // items in unadorned `extern` blocks cannot have safety qualifiers
+    // items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
 }
 
 unsafe extern "C" {
diff --git a/tests/rustdoc-ui/doctest/non-local-defs-impl.stdout b/tests/rustdoc-ui/doctest/non-local-defs-impl.stdout
index f39d2c2608b..c1f750017e7 100644
--- a/tests/rustdoc-ui/doctest/non-local-defs-impl.stdout
+++ b/tests/rustdoc-ui/doctest/non-local-defs-impl.stdout
@@ -18,7 +18,6 @@ LL |     impl Trait for &Local {}
    |          `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>
 note: the lint level is defined here
   --> $DIR/non-local-defs-impl.rs:11:9
    |
diff --git a/tests/rustdoc-ui/doctest/non_local_defs.stderr b/tests/rustdoc-ui/doctest/non_local_defs.stderr
index 2b47e6b5bc4..e39dc4d5ee0 100644
--- a/tests/rustdoc-ui/doctest/non_local_defs.stderr
+++ b/tests/rustdoc-ui/doctest/non_local_defs.stderr
@@ -6,7 +6,6 @@ LL | macro_rules! a_macro { () => {} }
    |
    = help: remove the `#[macro_export]` or make this doc-test a standalone test with its own `fn 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: `#[warn(non_local_definitions)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
index e8cec632177..1577b68e748 100644
--- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
@@ -178,7 +178,7 @@ struct ErrorWithNonexistentField {
 }
 
 #[derive(Diagnostic)]
-//~^ ERROR invalid format string: expected `'}'`
+//~^ ERROR invalid format string: expected `}`
 #[diag(no_crate_example, code = E0123)]
 struct ErrorMissingClosingBrace {
     #[suggestion(no_crate_suggestion, code = "{name")]
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
index 97f9896f3a7..ff7af388514 100644
--- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
@@ -184,11 +184,11 @@ error: `name` doesn't refer to a field on this type
 LL |     #[suggestion(no_crate_suggestion, code = "{name}")]
    |                                              ^^^^^^^^
 
-error: invalid format string: expected `'}'` but string was terminated
+error: invalid format string: expected `}` but string was terminated
   --> $DIR/diagnostic-derive.rs:180:10
    |
 LL | #[derive(Diagnostic)]
-   |          ^^^^^^^^^^ 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 derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
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/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/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/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/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/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-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.old.stderr b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr
deleted file mode 100644
index 2f3ad627808..00000000000
--- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.old.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.next.stderr b/tests/ui/coherence/coherence-overlap-issue-23516-inherent.stderr
index 2f3ad627808..aacdeb5b0f9 100644
--- a/tests/ui/coherence/coherence-overlap-issue-23516-inherent.next.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/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.next.stderr b/tests/ui/coherence/orphan-check-opaque-types-not-covering.next.stderr
deleted file mode 100644
index 44f76f321cf..00000000000
--- a/tests/ui/coherence/orphan-check-opaque-types-not-covering.next.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.classic.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.classic.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/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/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/dyn-compatibility/avoid-ice-on-warning-2.new.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.new.stderr
index 4e3d2ebebad..83795f3128e 100644
--- a/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.new.stderr
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.new.stderr
@@ -1,41 +1,19 @@
-error[E0038]: the trait `Copy` cannot be made into an object
+error[E0782]: expected a type, found a trait
   --> $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
+   = 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>(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, 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 {
    |             ++++
-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
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0038, E0277, E0618.
-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/dyn-compatibility/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/dyn-compatibility/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/dyn-compatibility/avoid-ice-on-warning-2.rs b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.rs
index db2f4aea05b..3c2da667b39 100644
--- a/tests/ui/dyn-compatibility/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
index fdd3e8ab507..813b5863738 100644
--- a/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.new.stderr
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.new.stderr
@@ -1,47 +1,57 @@
-error[E0038]: the trait `A` cannot be made into an object
-  --> $DIR/avoid-ice-on-warning-3.rs:4:19
+error[E0782]: expected a type, found a trait
+  --> $DIR/avoid-ice-on-warning-3.rs:14:19
    |
-LL | trait B { fn f(a: A) -> A; }
-   |                   ^ `A` cannot be made into an object
+LL | trait A { fn g(b: B) -> B; }
+   |                   ^
    |
-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
+   = 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; }
-   |       -      ^ ...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
+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) -> B where Self: Sized; }
-   |                           +++++++++++++++++
+LL | trait A { fn g(b: B) -> impl B; }
+   |                         ++++
 
-error[E0038]: the trait `B` cannot be made into an object
-  --> $DIR/avoid-ice-on-warning-3.rs:12:19
+error[E0782]: expected a type, found a trait
+  --> $DIR/avoid-ice-on-warning-3.rs:4:19
    |
-LL | trait A { fn g(b: B) -> B; }
-   |                   ^ `B` cannot be made into an object
+LL | trait B { fn f(a: A) -> A; }
+   |                   ^
    |
-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
+   = 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; }
-   |       -      ^ ...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
+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) -> A where Self: Sized; }
-   |                           +++++++++++++++++
+LL | trait B { fn f(a: A) -> impl A; }
+   |                         ++++
 
-error: aborting due to 2 previous errors
+error: aborting due to 4 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/dyn-compatibility/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/dyn-compatibility/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/dyn-compatibility/avoid-ice-on-warning-3.rs b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.rs
index 38bee8142bb..00d47225e92 100644
--- a/tests/ui/dyn-compatibility/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
index 4ff45d7a848..e9eb1cdd0c2 100644
--- a/tests/ui/dyn-compatibility/avoid-ice-on-warning.new.stderr
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning.new.stderr
@@ -15,6 +15,18 @@ error[E0405]: cannot find trait `call_that` in this scope
 LL | fn call_this<F>(f: F) : Fn(&str) + call_that {}
    |                                    ^^^^^^^^^ not found in this scope
 
-error: aborting due to 2 previous errors
+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
 
-For more information about this error, try `rustc --explain E0405`.
+Some errors have detailed explanations: E0405, E0782.
+For more information about an error, try `rustc --explain E0405`.
diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning.rs b/tests/ui/dyn-compatibility/avoid-ice-on-warning.rs
index b90d8911d50..ef82321df0e 100644
--- a/tests/ui/dyn-compatibility/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/dyn-compatibility/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/dyn-compatibility/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
index bb2bf6ddcda..52168261a64 100644
--- a/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.stderr
+++ b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.stderr
@@ -1,21 +1,14 @@
-error[E0038]: the trait `Ord` cannot be made into an object
+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 {
-   |                                 ^^^ `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
+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 E0038`.
+For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.rs b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.rs
index cb5a305eab0..cf9be612d2e 100644
--- a/tests/ui/dyn-compatibility/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/dyn-compatibility/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/dyn-compatibility/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/dyn-compatibility/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/dyn-compatibility/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/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/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-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-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/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..69882450961 100644
--- a/tests/ui/higher-ranked/structually-relate-aliases.rs
+++ b/tests/ui/higher-ranked/structually-relate-aliases.rs
@@ -11,7 +11,6 @@ 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 conflicting implementations of trait `Overlap<for<'a> fn(&'a (), _)>`
 
 fn main() {}
diff --git a/tests/ui/higher-ranked/structually-relate-aliases.stderr b/tests/ui/higher-ranked/structually-relate-aliases.stderr
index 7de30efae1c..4ecd5829bc3 100644
--- a/tests/ui/higher-ranked/structually-relate-aliases.stderr
+++ b/tests/ui/higher-ranked/structually-relate-aliases.stderr
@@ -1,27 +1,18 @@
  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
-   |
-LL | impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
-   |                                    ^^^^^^^^^^^^ the trait `for<'a> ToUnit<'a>` is not implemented for `T`
-   |
-help: consider restricting type parameter `T`
-   |
-LL | impl<T: for<'a> ToUnit<'a>> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
-   |       ++++++++++++++++++++
-
-error[E0277]: the trait bound `for<'a> T: ToUnit<'a>` is not satisfied
-  --> $DIR/structually-relate-aliases.rs:13:17
+ 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, '^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, '^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[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), _)>` for type `for<'a> fn(&'a (), _)`
+  --> $DIR/structually-relate-aliases.rs:13:1
    |
+LL | impl<T> Overlap<T> for T {}
+   | ------------------------ first implementation here
+LL |
 LL | impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> ToUnit<'a>` is not implemented for `T`
-   |
-help: consider restricting type parameter `T`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a> fn(&'a (), _)`
    |
-LL | impl<T: for<'a> ToUnit<'a>> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
-   |       ++++++++++++++++++++
+   = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
 
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0277`.
+For more information about this error, try `rustc --explain E0119`.
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/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/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-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/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.stderr b/tests/ui/lint/non-local-defs/consts.stderr
index 4bf50bae5ea..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,7 +87,6 @@ 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:69:13
@@ -106,7 +100,6 @@ 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:79:9
@@ -120,7 +113,6 @@ 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:86:9
@@ -138,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: 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
index cef0f0205e8..72fd056d461 100644
--- 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
@@ -31,4 +31,15 @@ const _: () = {
     };
 };
 
+// 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
index 4881723f13b..8e738544a71 100644
--- a/tests/ui/lint/non-local-defs/convoluted-locals-131474.rs
+++ b/tests/ui/lint/non-local-defs/convoluted-locals-131474.rs
@@ -21,4 +21,13 @@ const _: () = {
     };
 };
 
+// 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/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/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/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/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/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/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/crashes/118987-2.rs b/tests/ui/specialization/coherence/default-impl-normalization-ambig-2.rs
index 4382a7bcb63..1691530fa0a 100644
--- a/tests/crashes/118987-2.rs
+++ b/tests/ui/specialization/coherence/default-impl-normalization-ambig-2.rs
@@ -1,4 +1,4 @@
-//@ known-bug: #118987
+// regression test for #118987
 #![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 trait Assoc {
@@ -15,3 +15,5 @@ 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/crashes/74299.rs b/tests/ui/specialization/coherence/default-item-normalization-ambig-1.rs
index 0e2ddce1c5b..af7cf332d5f 100644
--- a/tests/crashes/74299.rs
+++ b/tests/ui/specialization/coherence/default-item-normalization-ambig-1.rs
@@ -1,5 +1,5 @@
-//@ known-bug: #74299
-#![feature(specialization)]
+// regression test for #73299.
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 trait X {
     type U;
@@ -18,6 +18,7 @@ trait Y {
 
 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/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/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs
index 37afab6b643..10b4781eb04 100644
--- 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
@@ -2,24 +2,21 @@
 #![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 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
-    //~| 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 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
-    //~| 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 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
-    //~| ERROR the trait `C` cannot be made into an object
 }
 
 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
index 53304382584..c0cfb18955c 100644
--- 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
@@ -11,22 +11,8 @@ 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/dyn-incompatible-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/dyn-incompatible-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/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:11:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:10:13
    |
 LL | trait B {
    |       - in this trait
@@ -38,30 +24,8 @@ 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/dyn-incompatible-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/dyn-incompatible-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/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:18:20
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:16:20
    |
 LL | trait C {
    |       - in this trait
@@ -73,23 +37,7 @@ 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/dyn-incompatible-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/dyn-incompatible-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
+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;
@@ -105,7 +53,7 @@ help: you can also use an opaque type, but users won't be able to specify the ty
 LL |     fn f(a: impl A) -> A;
    |             ++++
 
-error[E0782]: trait objects must include the `dyn` keyword
+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;
@@ -116,8 +64,8 @@ help: `A` is dyn-incompatible, use `impl A` to return an opaque type, as long as
 LL |     fn f(a: A) -> impl A;
    |                   ++++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:11:13
+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;
    |             ^
@@ -132,8 +80,8 @@ help: you can also use an opaque type, but users won't be able to specify the ty
 LL |     fn f(b: impl B) -> B;
    |             ++++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:11:19
+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;
    |                   ^
@@ -143,8 +91,8 @@ help: `B` is dyn-incompatible, use `impl B` to return an opaque type, as long as
 LL |     fn f(b: B) -> impl B;
    |                   ++++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:18:20
+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;
    |                    ^
@@ -159,8 +107,8 @@ help: you can also use an opaque type, but users won't be able to specify the ty
 LL |     fn f(&self, c: impl C) -> C;
    |                    ++++
 
-error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:18:26
+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;
    |                          ^
@@ -170,7 +118,6 @@ help: `C` is dyn-incompatible, use `impl C` to return an opaque type, as long as
 LL |     fn f(&self, c: C) -> impl C;
    |                          ++++
 
-error: aborting due to 12 previous errors
+error: aborting due to 9 previous errors
 
-Some errors have detailed explanations: E0038, 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/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/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/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/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/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/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/crashes/124207.rs b/tests/ui/transmutability/malformed-program-gracefulness/coherence-bikeshed-intrinsic-from.rs
index a11eedb140a..0cebc99cd41 100644
--- a/tests/crashes/124207.rs
+++ b/tests/ui/transmutability/malformed-program-gracefulness/coherence-bikeshed-intrinsic-from.rs
@@ -1,9 +1,11 @@
-//@ known-bug: #124207
 #![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/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`.