about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-06-28 07:40:14 +0000
committerGitHub <noreply@github.com>2025-06-28 07:40:14 +0000
commit96a70e2e917a2e8e1dc028fcaeacba5b420d8e71 (patch)
treead46d6add78b59ba3d90ffab57c876d237e4ace0 /tests/ui
parent03901977c9b88132a478b4dba6ebb8a795140082 (diff)
parent35e6def4879ff3b30862d827665ce9da052ed730 (diff)
downloadrust-96a70e2e917a2e8e1dc028fcaeacba5b420d8e71.tar.gz
rust-96a70e2e917a2e8e1dc028fcaeacba5b420d8e71.zip
Merge pull request #4417 from rust-lang/rustup-2025-06-28
Automatic Rustup
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/SUMMARY.md10
-rw-r--r--tests/ui/abi/bad-custom.rs34
-rw-r--r--tests/ui/abi/bad-custom.stderr94
-rw-r--r--tests/ui/abi/cannot-be-called.avr.stderr75
-rw-r--r--tests/ui/abi/cannot-be-called.i686.stderr75
-rw-r--r--tests/ui/abi/cannot-be-called.msp430.stderr75
-rw-r--r--tests/ui/abi/cannot-be-called.riscv32.stderr87
-rw-r--r--tests/ui/abi/cannot-be-called.riscv64.stderr87
-rw-r--r--tests/ui/abi/cannot-be-called.rs92
-rw-r--r--tests/ui/abi/cannot-be-called.x64.stderr75
-rw-r--r--tests/ui/abi/cannot-be-called.x64_win.stderr75
-rw-r--r--tests/ui/abi/cannot-be-coroutine.avr.stderr23
-rw-r--r--tests/ui/abi/cannot-be-coroutine.i686.stderr23
-rw-r--r--tests/ui/abi/cannot-be-coroutine.msp430.stderr23
-rw-r--r--tests/ui/abi/cannot-be-coroutine.riscv32.stderr35
-rw-r--r--tests/ui/abi/cannot-be-coroutine.riscv64.stderr35
-rw-r--r--tests/ui/abi/cannot-be-coroutine.rs54
-rw-r--r--tests/ui/abi/cannot-be-coroutine.x64.stderr23
-rw-r--r--tests/ui/abi/cannot-be-coroutine.x64_win.stderr23
-rw-r--r--tests/ui/abi/invalid-call-abi-ctfe.rs14
-rw-r--r--tests/ui/abi/invalid-call-abi-ctfe.stderr9
-rw-r--r--tests/ui/abi/invalid-call-abi.rs12
-rw-r--r--tests/ui/abi/invalid-call-abi.stderr9
-rw-r--r--tests/ui/abi/unsupported-abi-transmute.rs12
-rw-r--r--tests/ui/abi/unsupported-abi-transmute.stderr9
-rw-r--r--tests/ui/abi/unsupported-in-impls.rs36
-rw-r--r--tests/ui/abi/unsupported-in-impls.stderr27
-rw-r--r--tests/ui/abi/unsupported-varargs-fnptr.rs19
-rw-r--r--tests/ui/abi/unsupported-varargs-fnptr.stderr9
-rw-r--r--tests/ui/abi/unsupported.aarch64.stderr443
-rw-r--r--tests/ui/abi/unsupported.arm.stderr403
-rw-r--r--tests/ui/abi/unsupported.i686.stderr245
-rw-r--r--tests/ui/abi/unsupported.riscv32.stderr411
-rw-r--r--tests/ui/abi/unsupported.riscv64.stderr411
-rw-r--r--tests/ui/abi/unsupported.rs67
-rw-r--r--tests/ui/abi/unsupported.x64.stderr361
-rw-r--r--tests/ui/abi/unsupported.x64_win.stderr329
-rw-r--r--tests/ui/allocator/no_std-alloc-error-handler-custom.rs13
-rw-r--r--tests/ui/allocator/no_std-alloc-error-handler-default.rs13
-rw-r--r--tests/ui/argument-suggestions/issue-100154.stderr4
-rw-r--r--tests/ui/argument-suggestions/issue-100478.rs4
-rw-r--r--tests/ui/asm/naked-functions-inline.stderr14
-rw-r--r--tests/ui/asm/naked-invalid-attr.stderr18
-rw-r--r--tests/ui/associated-consts/assoc-const-eq-const_evaluatable_unchecked.rs17
-rw-r--r--tests/ui/associated-inherent-types/issue-109299.stderr9
-rw-r--r--tests/ui/associated-types/defaults-unsound-62211-1.current.stderr3
-rw-r--r--tests/ui/associated-types/defaults-unsound-62211-1.next.stderr3
-rw-r--r--tests/ui/associated-types/defaults-unsound-62211-2.current.stderr3
-rw-r--r--tests/ui/associated-types/defaults-unsound-62211-2.next.stderr3
-rw-r--r--tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed2
-rw-r--r--tests/ui/async-await/incorrect-move-async-order-issue-79694.rs2
-rw-r--r--tests/ui/async-await/issues/issue-95307.rs5
-rw-r--r--tests/ui/async-await/issues/issue-95307.stderr28
-rw-r--r--tests/ui/attributes/expected-word.rs3
-rw-r--r--tests/ui/attributes/expected-word.stderr12
-rw-r--r--tests/ui/attributes/lint_on_root.rs7
-rw-r--r--tests/ui/attributes/lint_on_root.stderr12
-rw-r--r--tests/ui/attributes/malformed-fn-align.rs5
-rw-r--r--tests/ui/attributes/malformed-fn-align.stderr49
-rw-r--r--tests/ui/attributes/malformed-must_use.rs4
-rw-r--r--tests/ui/attributes/malformed-must_use.stderr8
-rw-r--r--tests/ui/attributes/mixed_export_name_and_no_mangle.fixed4
-rw-r--r--tests/ui/attributes/mixed_export_name_and_no_mangle.rs4
-rw-r--r--tests/ui/attributes/mixed_export_name_and_no_mangle.stderr12
-rw-r--r--tests/ui/attributes/mixed_export_name_and_no_mangle_2024.fixed15
-rw-r--r--tests/ui/attributes/mixed_export_name_and_no_mangle_2024.rs17
-rw-r--r--tests/ui/attributes/mixed_export_name_and_no_mangle_2024.stderr39
-rw-r--r--tests/ui/attributes/rustc_skip_during_method_dispatch.rs38
-rw-r--r--tests/ui/attributes/rustc_skip_during_method_dispatch.stderr76
-rw-r--r--tests/ui/attributes/used_with_arg.rs15
-rw-r--r--tests/ui/attributes/used_with_arg.stderr39
-rw-r--r--tests/ui/attributes/used_with_multi_args.rs2
-rw-r--r--tests/ui/attributes/used_with_multi_args.stderr16
-rw-r--r--tests/ui/binop/issue-77910-1.stderr3
-rw-r--r--tests/ui/borrowck/borrowck-move-by-capture.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-move-moved-value-into-closure.stderr6
-rw-r--r--tests/ui/borrowck/generic_const_early_param.stderr17
-rw-r--r--tests/ui/cast/ice-cast-type-with-error-124848.stderr25
-rw-r--r--tests/ui/check-cfg/target_feature.stderr4
-rw-r--r--tests/ui/closures/issue-111932.stderr4
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/callback-as-argument.rs6
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.rs8
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr31
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.rs28
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.stderr70
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-via-stack.rs12
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-via-stack.stderr50
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.rs20
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.stderr90
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/via-registers.rs34
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs4
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr6
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs4
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr4
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.rs6
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.stderr18
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.rs24
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.stderr50
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.rs10
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.stderr50
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.rs18
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.stderr90
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.aarch64.stderr8
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs2
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.thumb7.stderr8
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.x86.stderr8
-rw-r--r--tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs32
-rw-r--r--tests/ui/coercion/invalid-blanket-coerce-unsized-impl.rs13
-rw-r--r--tests/ui/coercion/invalid-blanket-coerce-unsized-impl.stderr19
-rw-r--r--tests/ui/compiletest-self-test/line-annotation-mismatches.rs42
-rw-r--r--tests/ui/compiletest-self-test/line-annotation-mismatches.stderr61
-rw-r--r--tests/ui/const-generics/const_trait_fn-issue-88433.rs3
-rw-r--r--tests/ui/const-generics/generic_arg_infer/in-signature.rs2
-rw-r--r--tests/ui/const-generics/generic_arg_infer/in-signature.stderr28
-rw-r--r--tests/ui/const-generics/generic_const_exprs/non-local-const.rs10
-rw-r--r--tests/ui/const-generics/generic_const_exprs/non-local-const.stderr10
-rw-r--r--tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr40
-rw-r--r--tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr7
-rw-r--r--tests/ui/const-generics/ice-unexpected-inference-var-122549.stderr9
-rw-r--r--tests/ui/const-generics/issues/issue-86535-2.rs2
-rw-r--r--tests/ui/const-generics/issues/issue-86535-2.stderr10
-rw-r--r--tests/ui/const-generics/issues/issue-86535.rs2
-rw-r--r--tests/ui/const-generics/issues/issue-86535.stderr10
-rw-r--r--tests/ui/const-generics/issues/issue-88119.stderr4
-rw-r--r--tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr9
-rw-r--r--tests/ui/consts/const-block-const-bound.rs2
-rw-r--r--tests/ui/consts/const-block-const-bound.stderr4
-rw-r--r--tests/ui/consts/const-eval/format.stderr2
-rw-r--r--tests/ui/consts/const-mut-refs/issue-76510.rs2
-rw-r--r--tests/ui/consts/const-mut-refs/issue-76510.stderr8
-rw-r--r--tests/ui/consts/const-mut-refs/mut_ref_in_final.rs16
-rw-r--r--tests/ui/consts/const-mut-refs/mut_ref_in_final.stderr75
-rw-r--r--tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs2
-rw-r--r--tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr2
-rw-r--r--tests/ui/consts/const-promoted-opaque.atomic.stderr8
-rw-r--r--tests/ui/consts/const-promoted-opaque.rs2
-rw-r--r--tests/ui/consts/const-size_of-cycle.stderr12
-rw-r--r--tests/ui/consts/const_cmp_type_id.rs5
-rw-r--r--tests/ui/consts/const_cmp_type_id.stderr26
-rw-r--r--tests/ui/consts/const_refs_to_static.rs5
-rw-r--r--tests/ui/consts/const_refs_to_static_fail.rs16
-rw-r--r--tests/ui/consts/const_refs_to_static_fail.stderr27
-rw-r--r--tests/ui/consts/const_refs_to_static_fail_invalid.rs6
-rw-r--r--tests/ui/consts/const_refs_to_static_fail_invalid.stderr26
-rw-r--r--tests/ui/consts/constifconst-call-in-const-position.rs2
-rw-r--r--tests/ui/consts/constifconst-call-in-const-position.stderr6
-rw-r--r--tests/ui/consts/fn_trait_refs.rs20
-rw-r--r--tests/ui/consts/fn_trait_refs.stderr168
-rw-r--r--tests/ui/consts/issue-17718-const-bad-values.rs4
-rw-r--r--tests/ui/consts/issue-17718-const-bad-values.stderr10
-rw-r--r--tests/ui/consts/issue-17718-const-borrow.rs6
-rw-r--r--tests/ui/consts/issue-17718-const-borrow.stderr24
-rw-r--r--tests/ui/consts/issue-44415.stderr12
-rw-r--r--tests/ui/consts/issue-73976-monomorphic.stderr8
-rw-r--r--tests/ui/consts/issue-90870.rs15
-rw-r--r--tests/ui/consts/issue-90870.stderr58
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static.rs9
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static.stderr13
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs9
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr49
-rw-r--r--tests/ui/consts/miri_unleashed/mutable_references.rs7
-rw-r--r--tests/ui/consts/miri_unleashed/mutable_references.stderr39
-rw-r--r--tests/ui/consts/normalize-before-const-arg-has-type-goal.rs19
-rw-r--r--tests/ui/consts/normalize-before-const-arg-has-type-goal.stderr9
-rw-r--r--tests/ui/consts/partial_qualif.rs2
-rw-r--r--tests/ui/consts/partial_qualif.stderr8
-rw-r--r--tests/ui/consts/qualif_overwrite.rs2
-rw-r--r--tests/ui/consts/qualif_overwrite.stderr8
-rw-r--r--tests/ui/consts/qualif_overwrite_2.rs2
-rw-r--r--tests/ui/consts/qualif_overwrite_2.stderr8
-rw-r--r--tests/ui/consts/recursive-static-write.rs24
-rw-r--r--tests/ui/consts/recursive-static-write.stderr15
-rw-r--r--tests/ui/consts/recursive-zst-static.default.stderr10
-rw-r--r--tests/ui/consts/recursive-zst-static.rs2
-rw-r--r--tests/ui/consts/recursive-zst-static.unleash.stderr10
-rw-r--r--tests/ui/consts/refs-to-cell-in-final.rs6
-rw-r--r--tests/ui/consts/refs-to-cell-in-final.stderr24
-rw-r--r--tests/ui/consts/unsafe_cell_in_const.rs15
-rw-r--r--tests/ui/consts/unstable-const-fn-in-libcore.rs2
-rw-r--r--tests/ui/consts/unstable-const-fn-in-libcore.stderr32
-rw-r--r--tests/ui/consts/write-to-static-mut-in-static.rs3
-rw-r--r--tests/ui/consts/write-to-static-mut-in-static.stderr12
-rw-r--r--tests/ui/consts/write_to_static_via_mut_ref.rs2
-rw-r--r--tests/ui/consts/write_to_static_via_mut_ref.stderr8
-rw-r--r--tests/ui/coroutine/auto-trait-regions.rs12
-rw-r--r--tests/ui/coroutine/auto-trait-regions.stderr24
-rw-r--r--tests/ui/coroutine/clone-impl-static.rs6
-rw-r--r--tests/ui/coroutine/clone-impl-static.stderr8
-rw-r--r--tests/ui/defaults-well-formedness.rs27
-rw-r--r--tests/ui/deprecation/deprecated-expr-precedence.rs8
-rw-r--r--tests/ui/deprecation/deprecated-expr-precedence.stderr11
-rw-r--r--tests/ui/deprecation/deprecated_main_function.rs (renamed from tests/ui/deprecation-in-force-unstable.rs)2
-rw-r--r--tests/ui/deprecation/deprecated_no_stack_check.rs2
-rw-r--r--tests/ui/deprecation/deprecated_no_stack_check.stderr4
-rw-r--r--tests/ui/deref-rc.rs8
-rw-r--r--tests/ui/deref.rs6
-rw-r--r--tests/ui/derive-uninhabited-enum-38885.rs19
-rw-r--r--tests/ui/derives/clone-debug-dead-code.stderr2
-rw-r--r--tests/ui/derives/derive-debug-uninhabited-enum.rs23
-rw-r--r--tests/ui/derives/derive-debug-uninhabited-enum.stderr (renamed from tests/ui/derive-uninhabited-enum-38885.stderr)2
-rw-r--r--tests/ui/derives/derives-span-Debug-enum-struct-variant.stderr3
-rw-r--r--tests/ui/derives/derives-span-Debug-enum.stderr3
-rw-r--r--tests/ui/derives/derives-span-Debug-struct.stderr3
-rw-r--r--tests/ui/derives/derives-span-Debug-tuple-struct.stderr3
-rw-r--r--tests/ui/derives/nonsense-input-to-debug.rs12
-rw-r--r--tests/ui/derives/nonsense-input-to-debug.stderr30
-rw-r--r--tests/ui/destructure-trait-ref.rs46
-rw-r--r--tests/ui/did_you_mean/bad-assoc-ty.edition2015.stderr (renamed from tests/ui/did_you_mean/bad-assoc-ty.stderr)128
-rw-r--r--tests/ui/did_you_mean/bad-assoc-ty.edition2021.stderr296
-rw-r--r--tests/ui/did_you_mean/bad-assoc-ty.rs12
-rw-r--r--tests/ui/diverging-fallback-method-chain.rs20
-rw-r--r--tests/ui/diverging-fallback-option.rs14
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr10
-rw-r--r--tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr18
-rw-r--r--tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs3
-rw-r--r--tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr21
-rw-r--r--tests/ui/error-codes/E0017.rs4
-rw-r--r--tests/ui/error-codes/E0017.stderr16
-rw-r--r--tests/ui/error-codes/E0261.stderr16
-rw-r--r--tests/ui/error-codes/E0492.stderr16
-rw-r--r--tests/ui/errors/remap-path-prefix-diagnostics.not-diag-in-deps.stderr4
-rw-r--r--tests/ui/errors/remap-path-prefix-diagnostics.only-debuginfo-in-deps.stderr4
-rw-r--r--tests/ui/errors/remap-path-prefix-diagnostics.only-diag-in-deps.stderr4
-rw-r--r--tests/ui/errors/remap-path-prefix-diagnostics.only-macro-in-deps.stderr4
-rw-r--r--tests/ui/errors/remap-path-prefix-diagnostics.with-debuginfo-in-deps.stderr4
-rw-r--r--tests/ui/errors/remap-path-prefix-diagnostics.with-diag-in-deps.stderr4
-rw-r--r--tests/ui/errors/remap-path-prefix-diagnostics.with-macro-in-deps.stderr4
-rw-r--r--tests/ui/expr/if/if-else-chain-missing-else.stderr21
-rw-r--r--tests/ui/expr/if/if-else-type-mismatch.stderr17
-rw-r--r--tests/ui/extern-flag/auxiliary/panic_handler.rs10
-rw-r--r--tests/ui/feature-gates/feature-gate-abi-custom.rs8
-rw-r--r--tests/ui/feature-gates/feature-gate-abi-custom.stderr8
-rw-r--r--tests/ui/feature-gates/feature-gate-abi_gpu_kernel.AMDGPU.stderr8
-rw-r--r--tests/ui/feature-gates/feature-gate-abi_gpu_kernel.HOST.stderr103
-rw-r--r--tests/ui/feature-gates/feature-gate-abi_gpu_kernel.NVPTX.stderr8
-rw-r--r--tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-cfi_encoding.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-concat_idents.rs11
-rw-r--r--tests/ui/feature-gates/feature-gate-concat_idents.stderr23
-rw-r--r--tests/ui/feature-gates/feature-gate-concat_idents2.rs6
-rw-r--r--tests/ui/feature-gates/feature-gate-concat_idents2.stderr20
-rw-r--r--tests/ui/feature-gates/feature-gate-concat_idents3.rs9
-rw-r--r--tests/ui/feature-gates/feature-gate-concat_idents3.stderr23
-rw-r--r--tests/ui/feature-gates/feature-gate-coverage-attribute.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-coverage-attribute.stderr6
-rw-r--r--tests/ui/feature-gates/feature-gate-fn_align.stderr10
-rw-r--r--tests/ui/feature-gates/feature-gate-loop-match.rs30
-rw-r--r--tests/ui/feature-gates/feature-gate-loop-match.stderr33
-rw-r--r--tests/ui/feature-gates/feature-gate-naked_functions_target_feature.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-optimize_attribute.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-optimize_attribute.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-pin_ergonomics.rs28
-rw-r--r--tests/ui/feature-gates/feature-gate-pin_ergonomics.stderr70
-rw-r--r--tests/ui/feature-gates/feature-gate-unsized_fn_params.edition2015.stderr (renamed from tests/ui/feature-gates/feature-gate-unsized_fn_params.stderr)8
-rw-r--r--tests/ui/feature-gates/feature-gate-unsized_fn_params.edition2021.stderr65
-rw-r--r--tests/ui/feature-gates/feature-gate-unsized_fn_params.rs7
-rw-r--r--tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.rs2
-rw-r--r--tests/ui/feature-gates/gated-bad-feature.rs1
-rw-r--r--tests/ui/feature-gates/gated-bad-feature.stderr16
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr16
-rw-r--r--tests/ui/feature-gates/removed-features-note-version-and-pr-issue-141619.rs2
-rw-r--r--tests/ui/feature-gates/removed-features-note-version-and-pr-issue-141619.stderr6
-rw-r--r--tests/ui/fmt/format-args-argument-span.stderr10
-rw-r--r--tests/ui/fmt/ifmt-unimpl.stderr4
-rw-r--r--tests/ui/fmt/non-source-literals.rs13
-rw-r--r--tests/ui/fmt/non-source-literals.stderr53
-rw-r--r--tests/ui/fn/error-recovery-mismatch.stderr6
-rw-r--r--tests/ui/generic-associated-types/generic-associated-types-where.stderr3
-rw-r--r--tests/ui/generic-const-items/assoc-const-AnonConst-ice-108220.rs35
-rw-r--r--tests/ui/generics/default-type-params-well-formedness.rs50
-rw-r--r--tests/ui/generics/generic-extern-lifetime.stderr9
-rw-r--r--tests/ui/generics/impl-block-params-declared-in-wrong-spot-issue-113073.stderr9
-rw-r--r--tests/ui/generics/overlapping-errors-span-issue-123861.stderr6
-rw-r--r--tests/ui/hygiene/no_implicit_prelude.stderr2
-rw-r--r--tests/ui/impl-header-lifetime-elision/assoc-type.rs2
-rw-r--r--tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.edition2015.stderr (renamed from tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.stderr)2
-rw-r--r--tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.edition2024.stderr10
-rw-r--r--tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.rs6
-rw-r--r--tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.edition2015.stderr (renamed from tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.stderr)2
-rw-r--r--tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.edition2024.stderr17
-rw-r--r--tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.rs6
-rw-r--r--tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.edition2015.stderr (renamed from tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr)42
-rw-r--r--tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.edition2021.stderr308
-rw-r--r--tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.rs13
-rw-r--r--tests/ui/impl-trait/extra-impl-in-trait-impl.fixed1
-rw-r--r--tests/ui/impl-trait/extra-impl-in-trait-impl.rs1
-rw-r--r--tests/ui/impl-trait/extra-impl-in-trait-impl.stderr8
-rw-r--r--tests/ui/impl-trait/hidden-lifetimes.edition2015.stderr (renamed from tests/ui/impl-trait/hidden-lifetimes.stderr)4
-rw-r--r--tests/ui/impl-trait/hidden-lifetimes.edition2024.stderr26
-rw-r--r--tests/ui/impl-trait/hidden-lifetimes.rs12
-rw-r--r--tests/ui/impl-trait/impl-fn-hrtb-bounds-2.edition2015.stderr (renamed from tests/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr)2
-rw-r--r--tests/ui/impl-trait/impl-fn-hrtb-bounds-2.edition2024.stderr15
-rw-r--r--tests/ui/impl-trait/impl-fn-hrtb-bounds-2.rs7
-rw-r--r--tests/ui/impl-trait/impl-fn-predefined-lifetimes.edition2015.stderr (renamed from tests/ui/impl-trait/impl-fn-predefined-lifetimes.stderr)2
-rw-r--r--tests/ui/impl-trait/impl-fn-predefined-lifetimes.edition2024.stderr11
-rw-r--r--tests/ui/impl-trait/impl-fn-predefined-lifetimes.rs3
-rw-r--r--tests/ui/impl-trait/in-bindings/lifetime-equality.rs19
-rw-r--r--tests/ui/impl-trait/in-bindings/region-lifetimes.rs17
-rw-r--r--tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr4
-rw-r--r--tests/ui/impl-trait/in-trait/not-inferred-generic.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/wf-bounds.stderr3
-rw-r--r--tests/ui/impl-trait/issues/issue-54895.edition2015.stderr (renamed from tests/ui/impl-trait/issues/issue-54895.stderr)4
-rw-r--r--tests/ui/impl-trait/issues/issue-54895.edition2024.stderr27
-rw-r--r--tests/ui/impl-trait/issues/issue-54895.rs4
-rw-r--r--tests/ui/impl-trait/issues/issue-79099.edition2015.stderr (renamed from tests/ui/impl-trait/issues/issue-79099.stderr)4
-rw-r--r--tests/ui/impl-trait/issues/issue-79099.edition2024.stderr14
-rw-r--r--tests/ui/impl-trait/issues/issue-79099.rs5
-rw-r--r--tests/ui/impl-trait/name-mentioning-macro.rs12
-rw-r--r--tests/ui/impl-trait/name-mentioning-macro.stderr16
-rw-r--r--tests/ui/impl-trait/normalize-tait-in-const.rs2
-rw-r--r--tests/ui/impl-trait/normalize-tait-in-const.stderr20
-rw-r--r--tests/ui/impl-trait/precise-capturing/bad-lifetimes.stderr9
-rw-r--r--tests/ui/impl-trait/precise-capturing/dyn-use.edition2015.stderr (renamed from tests/ui/impl-trait/precise-capturing/dyn-use.stderr)2
-rw-r--r--tests/ui/impl-trait/precise-capturing/dyn-use.edition2024.stderr26
-rw-r--r--tests/ui/impl-trait/precise-capturing/dyn-use.rs10
-rw-r--r--tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.edition2015.stderr (renamed from tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.stderr)16
-rw-r--r--tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.edition2024.stderr51
-rw-r--r--tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.rs15
-rw-r--r--tests/ui/impl-trait/struct-field-fragment-in-name.rs16
-rw-r--r--tests/ui/imports/import-from-missing-star-2.edition2015.stderr (renamed from tests/ui/imports/import-from-missing-star-2.stderr)2
-rw-r--r--tests/ui/imports/import-from-missing-star-2.edition2024.stderr11
-rw-r--r--tests/ui/imports/import-from-missing-star-2.rs5
-rw-r--r--tests/ui/imports/issue-28134.rs2
-rw-r--r--tests/ui/imports/multiple-extern-by-macro-for-underscore.ed2015.stderr (renamed from tests/ui/imports/multiple-extern-by-macro-for-underscore.stderr)2
-rw-r--r--tests/ui/imports/multiple-extern-by-macro-for-underscore.ed2021.stderr8
-rw-r--r--tests/ui/imports/multiple-extern-by-macro-for-underscore.rs4
-rw-r--r--tests/ui/inference/deref-suggestion.stderr27
-rw-r--r--tests/ui/inference/hint-closure-signature-119266.rs2
-rw-r--r--tests/ui/inference/ice-ifer-var-leaked-out-of-rollback-122098.stderr9
-rw-r--r--tests/ui/inference/issue-107090.stderr25
-rw-r--r--tests/ui/integral-indexing.rs16
-rw-r--r--tests/ui/issues/issue-32950.rs10
-rw-r--r--tests/ui/issues/issue-32950.stderr15
-rw-r--r--tests/ui/issues/issue-43988.stderr4
-rw-r--r--tests/ui/issues/issue-46604.rs2
-rw-r--r--tests/ui/issues/issue-46604.stderr8
-rw-r--r--tests/ui/issues/issue-50403.rs6
-rw-r--r--tests/ui/issues/issue-50403.stderr8
-rw-r--r--tests/ui/issues/issue-59488.stderr6
-rw-r--r--tests/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr3
-rw-r--r--tests/ui/issues/issue-92741.rs6
-rw-r--r--tests/ui/lifetimes/issue-107988.stderr9
-rw-r--r--tests/ui/lifetimes/no_lending_iterators.rs6
-rw-r--r--tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr13
-rw-r--r--tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs2
-rw-r--r--tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr2
-rw-r--r--tests/ui/lint/dead-code/issue-41883.stderr2
-rw-r--r--tests/ui/lint/dead-code/issue-59003.rs2
-rw-r--r--tests/ui/lint/dead-code/lint-unused-adt-appeared-in-pattern.rs37
-rw-r--r--tests/ui/lint/dead-code/lint-unused-adt-appeared-in-pattern.stderr20
-rw-r--r--tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr2
-rw-r--r--tests/ui/lint/dead-code/not-lint-adt-appeared-in-pattern-issue-120770.rs32
-rw-r--r--tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.rs2
-rw-r--r--tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.stderr8
-rw-r--r--tests/ui/lint/dead-code/unused-struct-derive-default.rs1
-rw-r--r--tests/ui/lint/dead-code/unused-struct-derive-default.stderr1
-rw-r--r--tests/ui/lint/lint-non-uppercase-usages.fixed44
-rw-r--r--tests/ui/lint/lint-non-uppercase-usages.rs44
-rw-r--r--tests/ui/lint/lint-non-uppercase-usages.stderr39
-rw-r--r--tests/ui/lint/unused/unused-attr-duplicate.stderr148
-rw-r--r--tests/ui/loop-match/break-to-block.rs23
-rw-r--r--tests/ui/loop-match/const-continue-to-block.rs26
-rw-r--r--tests/ui/loop-match/const-continue-to-block.stderr8
-rw-r--r--tests/ui/loop-match/const-continue-to-loop.rs27
-rw-r--r--tests/ui/loop-match/const-continue-to-loop.stderr8
-rw-r--r--tests/ui/loop-match/const-continue-to-polymorphic-const.rs29
-rw-r--r--tests/ui/loop-match/const-continue-to-polymorphic-const.stderr8
-rw-r--r--tests/ui/loop-match/drop-in-match-arm.rs47
-rw-r--r--tests/ui/loop-match/invalid-attribute.rs43
-rw-r--r--tests/ui/loop-match/invalid-attribute.stderr131
-rw-r--r--tests/ui/loop-match/invalid.rs161
-rw-r--r--tests/ui/loop-match/invalid.stderr91
-rw-r--r--tests/ui/loop-match/loop-match.rs45
-rw-r--r--tests/ui/loop-match/macro.rs48
-rw-r--r--tests/ui/loop-match/nested.rs83
-rw-r--r--tests/ui/loop-match/or-patterns.rs54
-rw-r--r--tests/ui/loop-match/unsupported-type.rs27
-rw-r--r--tests/ui/loop-match/unsupported-type.stderr10
-rw-r--r--tests/ui/loop-match/unwind.rs53
-rw-r--r--tests/ui/loop-match/valid-patterns.rs117
-rw-r--r--tests/ui/macros/concat-bytes-error.rs25
-rw-r--r--tests/ui/macros/concat-bytes-error.stderr99
-rw-r--r--tests/ui/macros/issue-118048.rs1
-rw-r--r--tests/ui/macros/issue-118048.stderr20
-rw-r--r--tests/ui/macros/macro-comma-support-rpass.rs12
-rw-r--r--tests/ui/macros/macro-metavar-expr-concat/empty-input.rs12
-rw-r--r--tests/ui/macros/macro-metavar-expr-concat/empty-input.stderr19
-rw-r--r--tests/ui/macros/macro-reexport-removed.rs1
-rw-r--r--tests/ui/macros/macro-reexport-removed.stderr6
-rw-r--r--tests/ui/macros/macro-span-issue-116502.rs2
-rw-r--r--tests/ui/macros/macro-span-issue-116502.stderr35
-rw-r--r--tests/ui/macros/macros-nonfatal-errors.rs5
-rw-r--r--tests/ui/macros/macros-nonfatal-errors.stderr68
-rw-r--r--tests/ui/macros/missing-writer-issue-139830.rs9
-rw-r--r--tests/ui/macros/missing-writer-issue-139830.stderr23
-rw-r--r--tests/ui/macros/stringify.rs5
-rw-r--r--tests/ui/methods/dont-ice-on-object-lookup-w-error-region.stderr9
-rw-r--r--tests/ui/methods/method-call-lifetime-args-unresolved.stderr7
-rw-r--r--tests/ui/methods/suggest-convert-ptr-to-ref.stderr6
-rw-r--r--tests/ui/mir/unreachable-loop-jump-threading.rs10
-rw-r--r--tests/ui/mir/unreachable-loop-jump-threading.stderr10
-rw-r--r--tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr3
-rw-r--r--tests/ui/mismatched_types/transforming-option-ref-issue-127545.rs8
-rw-r--r--tests/ui/modules/issue-107649.stderr5
-rw-r--r--tests/ui/modules/module_suggestion_when_module_not_found/submodule/mod.rs1
-rw-r--r--tests/ui/modules/module_suggestion_when_module_not_found/submodule2.rs1
-rw-r--r--tests/ui/modules/module_suggestion_when_module_not_found/success.rs4
-rw-r--r--tests/ui/modules/module_suggestion_when_module_not_found/success/compiletest-ignore-dir0
-rw-r--r--tests/ui/modules/module_suggestion_when_module_not_found/success/submodule3/mod.rs1
-rw-r--r--tests/ui/modules/module_suggestion_when_module_not_found/success/submodule4.rs1
-rw-r--r--tests/ui/modules/module_suggestion_when_module_not_found/suggestion.rs7
-rw-r--r--tests/ui/modules/module_suggestion_when_module_not_found/suggestion.stderr49
-rw-r--r--tests/ui/modules_and_files_visibility/mod_file_disambig.stderr5
-rw-r--r--tests/ui/moves/moves-based-on-type-capture-clause-bad.fixed11
-rw-r--r--tests/ui/moves/moves-based-on-type-capture-clause-bad.rs1
-rw-r--r--tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr8
-rw-r--r--tests/ui/moves/no-capture-arc.rs (renamed from tests/ui/no-capture-arc.rs)0
-rw-r--r--tests/ui/moves/no-capture-arc.stderr (renamed from tests/ui/no-capture-arc.stderr)6
-rw-r--r--tests/ui/moves/no-reuse-move-arc.fixed17
-rw-r--r--tests/ui/moves/no-reuse-move-arc.rs (renamed from tests/ui/no-reuse-move-arc.rs)1
-rw-r--r--tests/ui/moves/no-reuse-move-arc.stderr (renamed from tests/ui/no-reuse-move-arc.stderr)8
-rw-r--r--tests/ui/never_type/never-type-fallback-option.rs22
-rw-r--r--tests/ui/nll/user-annotations/region-error-ice-109072.stderr9
-rw-r--r--tests/ui/no_std/simple-runs.rs12
-rw-r--r--tests/ui/on-unimplemented/no-debug.stderr16
-rw-r--r--tests/ui/panic-runtime/auxiliary/depends.rs8
-rw-r--r--tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs6
-rw-r--r--tests/ui/panic-runtime/incompatible-type.rs10
-rw-r--r--tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs9
-rw-r--r--tests/ui/parser/bad-lit-suffixes.rs1
-rw-r--r--tests/ui/parser/bad-lit-suffixes.stderr21
-rw-r--r--tests/ui/parser/bounds-type.rs8
-rw-r--r--tests/ui/parser/bounds-type.stderr18
-rw-r--r--tests/ui/parser/issues/issue-105366.fixed1
-rw-r--r--tests/ui/parser/issues/issue-105366.rs1
-rw-r--r--tests/ui/parser/issues/issue-105366.stderr2
-rw-r--r--tests/ui/parser/recover/recover-field-semi.rs6
-rw-r--r--tests/ui/parser/recover/recover-field-semi.stderr12
-rw-r--r--tests/ui/parser/trait-object-delimiters.rs2
-rw-r--r--tests/ui/parser/trait-object-delimiters.stderr4
-rw-r--r--tests/ui/pin-ergonomics/borrow-unpin.pinned.stderr238
-rw-r--r--tests/ui/pin-ergonomics/borrow-unpin.rs143
-rw-r--r--tests/ui/pin-ergonomics/borrow-unpin.unpin.stderr136
-rw-r--r--tests/ui/pin-ergonomics/borrow.rs38
-rw-r--r--tests/ui/pin-ergonomics/coerce-non-pointer-pin.rs (renamed from tests/ui/async-await/pin-ergonomics/coerce-non-pointer-pin.rs)0
-rw-r--r--tests/ui/pin-ergonomics/coerce-non-pointer-pin.stderr (renamed from tests/ui/async-await/pin-ergonomics/coerce-non-pointer-pin.stderr)0
-rw-r--r--tests/ui/pin-ergonomics/reborrow-arg.rs (renamed from tests/ui/async-await/pin-ergonomics/reborrow-arg.rs)0
-rw-r--r--tests/ui/pin-ergonomics/reborrow-const-as-mut.rs (renamed from tests/ui/async-await/pin-ergonomics/reborrow-const-as-mut.rs)0
-rw-r--r--tests/ui/pin-ergonomics/reborrow-const-as-mut.stderr (renamed from tests/ui/async-await/pin-ergonomics/reborrow-const-as-mut.stderr)0
-rw-r--r--tests/ui/pin-ergonomics/reborrow-once.rs (renamed from tests/ui/async-await/pin-ergonomics/reborrow-once.rs)0
-rw-r--r--tests/ui/pin-ergonomics/reborrow-once.stderr (renamed from tests/ui/async-await/pin-ergonomics/reborrow-once.stderr)0
-rw-r--r--tests/ui/pin-ergonomics/reborrow-self.rs (renamed from tests/ui/async-await/pin-ergonomics/reborrow-self.rs)0
-rw-r--r--tests/ui/pin-ergonomics/reborrow-shorter.rs (renamed from tests/ui/async-await/pin-ergonomics/reborrow-shorter.rs)0
-rw-r--r--tests/ui/pin-ergonomics/sugar-ambiguity.rs (renamed from tests/ui/async-await/pin-ergonomics/sugar-ambiguity.rs)0
-rw-r--r--tests/ui/pin-ergonomics/sugar-no-const.rs (renamed from tests/ui/async-await/pin-ergonomics/sugar-no-const.rs)0
-rw-r--r--tests/ui/pin-ergonomics/sugar-no-const.stderr (renamed from tests/ui/async-await/pin-ergonomics/sugar-no-const.stderr)0
-rw-r--r--tests/ui/pin-ergonomics/sugar-self.rs (renamed from tests/ui/async-await/pin-ergonomics/sugar-self.rs)0
-rw-r--r--tests/ui/pin-ergonomics/sugar.rs (renamed from tests/ui/async-await/pin-ergonomics/sugar.rs)0
-rw-r--r--tests/ui/print-calling-conventions.stdout5
-rw-r--r--tests/ui/range/range-1.stderr10
-rw-r--r--tests/ui/recursion/recursive-static-definition.rs4
-rw-r--r--tests/ui/recursion/recursive-static-definition.stderr4
-rw-r--r--tests/ui/regions/regions-in-enums.stderr14
-rw-r--r--tests/ui/regions/regions-in-structs.stderr15
-rw-r--r--tests/ui/regions/regions-name-undeclared.stderr49
-rw-r--r--tests/ui/regions/regions-undeclared.stderr31
-rw-r--r--tests/ui/repr/repr.stderr6
-rw-r--r--tests/ui/rfcs/rfc-2091-track-caller/error-odd-syntax.stderr8
-rw-r--r--tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.stderr8
-rw-r--r--tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-ref-impl.rs17
-rw-r--r--tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs3
-rw-r--r--tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr7
-rw-r--r--tests/ui/rustdoc/renamed-features-rustdoc_internals.rs2
-rw-r--r--tests/ui/rustdoc/renamed-features-rustdoc_internals.stderr8
-rw-r--r--tests/ui/sanitizer/cfi/invalid-attr-encoding.rs2
-rw-r--r--tests/ui/self/self-infer.stderr12
-rw-r--r--tests/ui/sized-hierarchy/reject-dyn-pointeesized.rs16
-rw-r--r--tests/ui/sized-hierarchy/reject-dyn-pointeesized.stderr14
-rw-r--r--tests/ui/span/issue-71363.stderr7
-rw-r--r--tests/ui/specialization/const_trait_impl.rs8
-rw-r--r--tests/ui/specialization/const_trait_impl.stderr60
-rw-r--r--tests/ui/statics/check-immutable-mut-slices.rs2
-rw-r--r--tests/ui/statics/check-immutable-mut-slices.stderr8
-rw-r--r--tests/ui/statics/missing_lifetime.stderr9
-rw-r--r--tests/ui/statics/read_before_init.rs24
-rw-r--r--tests/ui/statics/read_before_init.stderr31
-rw-r--r--tests/ui/stats/input-stats.rs5
-rw-r--r--tests/ui/stats/input-stats.stderr200
-rw-r--r--tests/ui/stats/macro-stats.stderr40
-rw-r--r--tests/ui/structs-enums/recover-enum-with-bad-where.rs8
-rw-r--r--tests/ui/structs-enums/recover-enum-with-bad-where.stderr15
-rw-r--r--tests/ui/suggestions/bad-infer-in-trait-impl.stderr6
-rw-r--r--tests/ui/suggestions/bound-suggestions.stderr24
-rw-r--r--tests/ui/suggestions/derive-macro-missing-bounds.stderr3
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs3
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.stderr52
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.rs6
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr38
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self.rs6
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr38
-rw-r--r--tests/ui/suggestions/impl-trait-with-missing-bounds.stderr18
-rw-r--r--tests/ui/suggestions/issue-105645.rs2
-rw-r--r--tests/ui/suggestions/issue-116434-2015.rs2
-rw-r--r--tests/ui/suggestions/issue-116434-2015.stderr18
-rw-r--r--tests/ui/suggestions/issue-81098.stderr10
-rw-r--r--tests/ui/suggestions/issue-97760.stderr5
-rw-r--r--tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature.stderr9
-rw-r--r--tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr6
-rw-r--r--tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr6
-rw-r--r--tests/ui/suggestions/option-content-move3.stderr2
-rw-r--r--tests/ui/suggestions/path-display.stderr9
-rw-r--r--tests/ui/suggestions/return-bindings.stderr16
-rw-r--r--tests/ui/suggestions/suggest-full-enum-variant-for-local-module.rs2
-rw-r--r--tests/ui/syntax-extension-minor.rs15
-rw-r--r--tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.riscv.stderr10
-rw-r--r--tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.rs2
-rw-r--r--tests/ui/target-feature/retpoline-target-feature-flag.by_feature1.stderr2
-rw-r--r--tests/ui/target-feature/retpoline-target-feature-flag.by_feature2.stderr2
-rw-r--r--tests/ui/target-feature/retpoline-target-feature-flag.by_feature3.stderr2
-rw-r--r--tests/ui/target-feature/retpoline-target-feature-flag.rs6
-rw-r--r--tests/ui/thir-print/thir-tree-loop-match.rs22
-rw-r--r--tests/ui/thir-print/thir-tree-loop-match.stdout301
-rw-r--r--tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs6
-rw-r--r--tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs2
-rw-r--r--tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.current.stderr4
-rw-r--r--tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.next.stderr4
-rw-r--r--tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs14
-rw-r--r--tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.current.stderr4
-rw-r--r--tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.next.stderr4
-rw-r--r--tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs10
-rw-r--r--tests/ui/traits/const-traits/assoc-type.current.stderr6
-rw-r--r--tests/ui/traits/const-traits/assoc-type.next.stderr6
-rw-r--r--tests/ui/traits/const-traits/assoc-type.rs4
-rw-r--r--tests/ui/traits/const-traits/auxiliary/minicore.rs24
-rw-r--r--tests/ui/traits/const-traits/call-const-closure.rs2
-rw-r--r--tests/ui/traits/const-traits/call-const-closure.stderr2
-rw-r--r--tests/ui/traits/const-traits/call-const-in-conditionally-const.rs (renamed from tests/ui/traits/const-traits/call-const-in-tilde-const.rs)2
-rw-r--r--tests/ui/traits/const-traits/call-const-in-conditionally-const.stderr (renamed from tests/ui/traits/const-traits/call-const-in-tilde-const.stderr)2
-rw-r--r--tests/ui/traits/const-traits/call-const-trait-method-fail.rs2
-rw-r--r--tests/ui/traits/const-traits/call-const-trait-method-fail.stderr2
-rw-r--r--tests/ui/traits/const-traits/call-const-trait-method-pass.rs3
-rw-r--r--tests/ui/traits/const-traits/call-const-trait-method-pass.stderr20
-rw-r--r--tests/ui/traits/const-traits/call-generic-in-impl.rs5
-rw-r--r--tests/ui/traits/const-traits/call-generic-in-impl.stderr30
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-chain.rs7
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-chain.stderr66
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-dup-bound.rs11
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr74
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-fail.rs2
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-fail.stderr6
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-nonconst.rs2
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-nonconst.stderr4
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-pass.rs5
-rw-r--r--tests/ui/traits/const-traits/call-generic-method-pass.stderr47
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-and-const-params.rs (renamed from tests/ui/traits/const-traits/tilde-const-and-const-params.rs)8
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-and-const-params.stderr39
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-assoc-fn-in-trait-impl.rs (renamed from tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs)4
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs (renamed from tests/ui/traits/const-traits/tilde-const-in-struct-args.rs)2
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-inherent-assoc-const-fn.rs (renamed from tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs)2
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-invalid-places.rs61
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr310
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-trait-bound-assoc-tys.rs (renamed from tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs)4
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-trait-bound-syntax.rs9
-rw-r--r--tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs8
-rw-r--r--tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr24
-rw-r--r--tests/ui/traits/const-traits/const-bounds-non-const-trait.rs6
-rw-r--r--tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr16
-rw-r--r--tests/ui/traits/const-traits/const-closure-parse-not-item.rs2
-rw-r--r--tests/ui/traits/const-traits/const-closure-parse-not-item.stderr30
-rw-r--r--tests/ui/traits/const-traits/const-closure-trait-method-fail.rs2
-rw-r--r--tests/ui/traits/const-traits/const-closure-trait-method-fail.stderr20
-rw-r--r--tests/ui/traits/const-traits/const-closure-trait-method.rs2
-rw-r--r--tests/ui/traits/const-traits/const-closure-trait-method.stderr20
-rw-r--r--tests/ui/traits/const-traits/const-closures.rs8
-rw-r--r--tests/ui/traits/const-traits/const-closures.stderr80
-rw-r--r--tests/ui/traits/const-traits/const-cond-for-rpitit.rs6
-rw-r--r--tests/ui/traits/const-traits/const-default-method-bodies.rs2
-rw-r--r--tests/ui/traits/const-traits/const-default-method-bodies.stderr2
-rw-r--r--tests/ui/traits/const-traits/const-drop-bound.rs6
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr10
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail-2.rs6
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr10
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr8
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr8
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr8
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr8
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail.rs2
-rw-r--r--tests/ui/traits/const-traits/const-drop.rs4
-rw-r--r--tests/ui/traits/const-traits/const-impl-trait.rs18
-rw-r--r--tests/ui/traits/const-traits/const-impl-trait.stderr202
-rw-r--r--tests/ui/traits/const-traits/const-in-closure.rs9
-rw-r--r--tests/ui/traits/const-traits/const-opaque.no.stderr4
-rw-r--r--tests/ui/traits/const-traits/const-opaque.rs4
-rw-r--r--tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs6
-rw-r--r--tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr20
-rw-r--r--tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.rs3
-rw-r--r--tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.stderr8
-rw-r--r--tests/ui/traits/const-traits/const_derives/derive-const-use.stderr58
-rw-r--r--tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs3
-rw-r--r--tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr35
-rw-r--r--tests/ui/traits/const-traits/cross-crate.gatednc.stderr2
-rw-r--r--tests/ui/traits/const-traits/default-method-body-is-const-body-checking.rs4
-rw-r--r--tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr6
-rw-r--r--tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs2
-rw-r--r--tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr2
-rw-r--r--tests/ui/traits/const-traits/dont-ice-on-const-pred-for-bounds.rs2
-rw-r--r--tests/ui/traits/const-traits/dont-prefer-param-env-for-infer-self-ty.rs6
-rw-r--r--tests/ui/traits/const-traits/double-error-for-unimplemented-trait.rs2
-rw-r--r--tests/ui/traits/const-traits/double-error-for-unimplemented-trait.stderr8
-rw-r--r--tests/ui/traits/const-traits/duplicate-constness.rs (renamed from tests/ui/traits/const-traits/tilde-twice.rs)4
-rw-r--r--tests/ui/traits/const-traits/duplicate-constness.stderr8
-rw-r--r--tests/ui/traits/const-traits/eval-bad-signature.rs2
-rw-r--r--tests/ui/traits/const-traits/feature-gate.rs4
-rw-r--r--tests/ui/traits/const-traits/feature-gate.stock.stderr12
-rw-r--r--tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs2
-rw-r--r--tests/ui/traits/const-traits/ice-112822-expected-type-for-param.rs9
-rw-r--r--tests/ui/traits/const-traits/ice-112822-expected-type-for-param.stderr41
-rw-r--r--tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs6
-rw-r--r--tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.stderr20
-rw-r--r--tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs2
-rw-r--r--tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr4
-rw-r--r--tests/ui/traits/const-traits/impl-conditionally-const-trait.rs12
-rw-r--r--tests/ui/traits/const-traits/impl-conditionally-const-trait.stderr8
-rw-r--r--tests/ui/traits/const-traits/impl-tilde-const-trait.rs9
-rw-r--r--tests/ui/traits/const-traits/impl-tilde-const-trait.stderr8
-rw-r--r--tests/ui/traits/const-traits/inherent-impl-const-bounds.rs2
-rw-r--r--tests/ui/traits/const-traits/issue-100222.rs21
-rw-r--r--tests/ui/traits/const-traits/issue-92111.rs2
-rw-r--r--tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs4
-rw-r--r--tests/ui/traits/const-traits/item-bound-entailment-fails.rs12
-rw-r--r--tests/ui/traits/const-traits/item-bound-entailment-fails.stderr18
-rw-r--r--tests/ui/traits/const-traits/item-bound-entailment.rs8
-rw-r--r--tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.rs16
-rw-r--r--tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.stderr22
-rw-r--r--tests/ui/traits/const-traits/minicore-deref-fail.rs6
-rw-r--r--tests/ui/traits/const-traits/minicore-deref-fail.stderr4
-rw-r--r--tests/ui/traits/const-traits/minicore-drop-fail.rs2
-rw-r--r--tests/ui/traits/const-traits/minicore-fn-fail.rs6
-rw-r--r--tests/ui/traits/const-traits/minicore-fn-fail.stderr6
-rw-r--r--tests/ui/traits/const-traits/minicore-works.rs4
-rw-r--r--tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.rs8
-rw-r--r--tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.stderr26
-rw-r--r--tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs2
-rw-r--r--tests/ui/traits/const-traits/non-const-op-in-closure-in-const.stderr20
-rw-r--r--tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr4
-rw-r--r--tests/ui/traits/const-traits/overlap-const-with-nonconst.rs4
-rw-r--r--tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr4
-rw-r--r--tests/ui/traits/const-traits/predicate-entailment-fails.rs8
-rw-r--r--tests/ui/traits/const-traits/predicate-entailment-fails.stderr14
-rw-r--r--tests/ui/traits/const-traits/predicate-entailment-passes.rs4
-rw-r--r--tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs10
-rw-r--r--tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.stderr10
-rw-r--r--tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs2
-rw-r--r--tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs6
-rw-r--r--tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs2
-rw-r--r--tests/ui/traits/const-traits/specialization/specialize-on-conditionally-const.rs (renamed from tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs)11
-rw-r--r--tests/ui/traits/const-traits/specializing-constness-2.rs4
-rw-r--r--tests/ui/traits/const-traits/specializing-constness-2.stderr2
-rw-r--r--tests/ui/traits/const-traits/specializing-constness.rs2
-rw-r--r--tests/ui/traits/const-traits/specializing-constness.stderr4
-rw-r--r--tests/ui/traits/const-traits/staged-api.rs2
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr38
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr40
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-2.rs16
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr16
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr2
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr70
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr70
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr12
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr12
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.rs22
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr58
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr40
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr36
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail.rs2
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail.stderr2
-rw-r--r--tests/ui/traits/const-traits/super-traits.rs4
-rw-r--r--tests/ui/traits/const-traits/syntactical-unstable.rs12
-rw-r--r--tests/ui/traits/const-traits/syntactical-unstable.stderr50
-rw-r--r--tests/ui/traits/const-traits/syntax.rs9
-rw-r--r--tests/ui/traits/const-traits/syntax.stderr8
-rw-r--r--tests/ui/traits/const-traits/tilde-const-and-const-params.stderr39
-rw-r--r--tests/ui/traits/const-traits/tilde-const-invalid-places.rs61
-rw-r--r--tests/ui/traits/const-traits/tilde-const-invalid-places.stderr310
-rw-r--r--tests/ui/traits/const-traits/tilde-const-syntax.rs9
-rw-r--r--tests/ui/traits/const-traits/tilde-twice.stderr8
-rw-r--r--tests/ui/traits/const-traits/trait-where-clause-const.rs8
-rw-r--r--tests/ui/traits/const-traits/trait-where-clause-const.stderr12
-rw-r--r--tests/ui/traits/const-traits/trait-where-clause-run.rs2
-rw-r--r--tests/ui/traits/const-traits/trait-where-clause-self-referential.rs4
-rw-r--r--tests/ui/traits/const-traits/trait-where-clause.rs8
-rw-r--r--tests/ui/traits/const-traits/trait-where-clause.stderr32
-rw-r--r--tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs4
-rw-r--r--tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr76
-rw-r--r--tests/ui/traits/next-solver/coherence/coherence-fulfill-overflow.rs10
-rw-r--r--tests/ui/traits/next-solver/coherence/coherence-fulfill-overflow.stderr10
-rw-r--r--tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs29
-rw-r--r--tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.with.stderr14
-rw-r--r--tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.without.stderr14
-rw-r--r--tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs21
-rw-r--r--tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr4
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs6
-rw-r--r--tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr4
-rw-r--r--tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs7
-rw-r--r--tests/ui/traits/next-solver/dont-canonicalize-re-error.rs8
-rw-r--r--tests/ui/traits/next-solver/dont-canonicalize-re-error.stderr23
-rw-r--r--tests/ui/traits/next-solver/normalize/normalize-region-obligations.rs10
-rw-r--r--tests/ui/traits/next-solver/overflow/coherence-alias-hang.rs16
-rw-r--r--tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs8
-rw-r--r--tests/ui/traits/next-solver/supertrait-alias-1.rs6
-rw-r--r--tests/ui/traits/on_unimplemented_long_types.stderr3
-rw-r--r--tests/ui/traits/overflow-computing-ambiguity.rs9
-rw-r--r--tests/ui/traits/overflow-computing-ambiguity.stderr8
-rw-r--r--tests/ui/traits/span-bug-issue-121414.stderr9
-rw-r--r--tests/ui/traits/suggest-remove-deref-issue-140166.stderr4
-rw-r--r--tests/ui/traits/trait-object-destructure.rs29
-rw-r--r--tests/ui/traits/trait-object-destructure.stderr (renamed from tests/ui/destructure-trait-ref.stderr)12
-rw-r--r--tests/ui/type-alias-impl-trait/bounds-are-checked3.stderr3
-rw-r--r--tests/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr8
-rw-r--r--tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.edition2015.stderr (renamed from tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.stderr)2
-rw-r--r--tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.edition2024.stderr91
-rw-r--r--tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.rs13
-rw-r--r--tests/ui/type-alias-impl-trait/nested.stderr4
-rw-r--r--tests/ui/type/binding-assigned-block-without-tail-expression.stderr16
-rw-r--r--tests/ui/type/option-ref-advice.rs4
-rw-r--r--tests/ui/type/pattern_types/derives_fail.stderr4
-rw-r--r--tests/ui/typeck/consider-borrowing-141810-1.stderr25
-rw-r--r--tests/ui/typeck/consider-borrowing-141810-2.stderr21
-rw-r--r--tests/ui/typeck/consider-borrowing-141810-3.stderr21
-rw-r--r--tests/ui/typeck/inference-method-chain-diverging-fallback.rs19
-rw-r--r--tests/ui/typeck/issue-100246.rs2
-rw-r--r--tests/ui/typeck/issue-74086.rs3
-rw-r--r--tests/ui/typeck/issue-74086.stderr8
-rw-r--r--tests/ui/typeck/issue-81885.rs6
-rw-r--r--tests/ui/typeck/issue-81885.stderr16
-rw-r--r--tests/ui/typeck/issue-89275.rs2
-rw-r--r--tests/ui/typeck/point-at-type-param-in-path-expr.stderr4
-rw-r--r--tests/ui/typeck/type-placeholder-fn-in-const.rs6
-rw-r--r--tests/ui/typeck/type-placeholder-fn-in-const.stderr16
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_item.rs16
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_item.stderr428
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_item_help.rs3
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_item_help.stderr16
-rw-r--r--tests/ui/underscore-imports/issue-110164.ed2015.stderr (renamed from tests/ui/underscore-imports/issue-110164.stderr)36
-rw-r--r--tests/ui/underscore-imports/issue-110164.ed2021.stderr39
-rw-r--r--tests/ui/underscore-imports/issue-110164.rs7
-rw-r--r--tests/ui/underscore-imports/multiple-uses.ed2015.stderr49
-rw-r--r--tests/ui/underscore-imports/multiple-uses.ed2021.stderr49
-rw-r--r--tests/ui/underscore-imports/multiple-uses.rs16
-rw-r--r--tests/ui/unpretty/ast-const-trait-bound.rs2
-rw-r--r--tests/ui/unpretty/ast-const-trait-bound.stdout2
-rw-r--r--tests/ui/unpretty/deprecated-attr.rs5
-rw-r--r--tests/ui/unpretty/deprecated-attr.stdout9
-rw-r--r--tests/ui/unpretty/diagnostic-attr.stdout4
-rw-r--r--tests/ui/unpretty/exhaustive-asm.hir.stdout2
-rw-r--r--tests/ui/unpretty/exhaustive.expanded.stdout12
-rw-r--r--tests/ui/unpretty/exhaustive.hir.stderr44
-rw-r--r--tests/ui/unpretty/exhaustive.hir.stdout79
-rw-r--r--tests/ui/unpretty/exhaustive.rs13
-rw-r--r--tests/ui/unsized-locals/yote.rs2
-rw-r--r--tests/ui/unsized-locals/yote.stderr4
-rw-r--r--tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs1
-rw-r--r--tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr19
-rw-r--r--tests/ui/wf/issue-87495.stderr5
767 files changed, 10630 insertions, 6808 deletions
diff --git a/tests/ui/SUMMARY.md b/tests/ui/SUMMARY.md
index d807e38dab2..72b673dd50a 100644
--- a/tests/ui/SUMMARY.md
+++ b/tests/ui/SUMMARY.md
@@ -8,6 +8,8 @@ For now, only immediate subdirectories under `tests/ui/` are described, but thes
 
 These tests deal with *Application Binary Interfaces* (ABI), mostly relating to function name mangling (and the `#[no_mangle]` attribute), calling conventions, or compiler flags which affect ABI.
 
+Tests for unsupported ABIs can be made cross-platform by using the `extern "rust-invalid"` ABI, which is considered unsupported on every platform.
+
 ## `tests/ui/allocator`
 
 These tests exercise `#![feature(allocator_api)]` and the `#[global_allocator]` attribute.
@@ -208,14 +210,14 @@ Tests targeted at how we deduce the types of closure arguments. This process is
 
 Any closure-focused tests that does not fit in the other more specific closure subdirectories belong here. E.g. syntax, `move`, lifetimes.
 
-## `tests/ui/cmse-nonsecure/`: `C-cmse-nonsecure` ABIs
+## `tests/ui/cmse-nonsecure/`: `cmse-nonsecure` ABIs
 
-Tests for `cmse_nonsecure_entry` and `abi_c_cmse_nonsecure_call` ABIs. Used specifically for the Armv8-M architecture, the former marks Secure functions with additional behaviours, such as adding a special symbol and constraining the number of parameters, while the latter alters function pointers to indicate they are non-secure and to handle them differently than usual.
+Tests for `extern "cmse-nonsecure-call"` and `extern "cmse-nonsecure-entry"` functions. Used specifically for the Armv8-M architecture, the former marks Secure functions with additional behaviours, such as adding a special symbol and constraining the number of parameters, while the latter alters function pointers to indicate they are non-secure and to handle them differently than usual.
 
 See:
 
-- [`cmse_nonsecure_entry` | The Unstable book](https://doc.rust-lang.org/unstable-book/language-features/cmse-nonsecure-entry.html)
-- [`abi_c_cmse_nonsecure_call` | The Unstable book](https://doc.rust-lang.org/beta/unstable-book/language-features/abi-c-cmse-nonsecure-call.html)
+- [`cmse_nonsecure_entry` | The Unstable book](https://doc.rust-lang.org/nightly/unstable-book/language-features/cmse-nonsecure-entry.html)
+- [`abi_cmse_nonsecure_call` | The Unstable book](https://doc.rust-lang.org/nightly/unstable-book/language-features/abi-cmse-nonsecure-call.html)
 
 ## `tests/ui/codegen/`: Code Generation
 
diff --git a/tests/ui/abi/bad-custom.rs b/tests/ui/abi/bad-custom.rs
index e792f0955b9..7c881134ccb 100644
--- a/tests/ui/abi/bad-custom.rs
+++ b/tests/ui/abi/bad-custom.rs
@@ -5,7 +5,7 @@
 
 #[unsafe(naked)]
 extern "custom" fn must_be_unsafe(a: i64) -> i64 {
-    //~^ ERROR functions with the `"custom"` ABI must be unsafe
+    //~^ ERROR functions with the "custom" ABI must be unsafe
     //~| ERROR invalid signature for `extern "custom"` function
     std::arch::naked_asm!("")
 }
@@ -23,7 +23,7 @@ unsafe extern "custom" fn no_return_type() -> i64 {
 }
 
 unsafe extern "custom" fn double(a: i64) -> i64 {
-    //~^ ERROR items with the `"custom"` ABI can only be declared externally or defined via naked functions
+    //~^ ERROR items with the "custom" ABI can only be declared externally or defined via naked functions
     //~| ERROR invalid signature for `extern "custom"` function
     unimplemented!()
 }
@@ -32,7 +32,7 @@ struct Thing(i64);
 
 impl Thing {
     unsafe extern "custom" fn is_even(self) -> bool {
-        //~^ ERROR items with the `"custom"` ABI can only be declared externally or defined via naked functions
+        //~^ ERROR items with the "custom" ABI can only be declared externally or defined via naked functions
         //~| ERROR invalid signature for `extern "custom"` function
         unimplemented!()
     }
@@ -40,7 +40,7 @@ impl Thing {
 
 trait BitwiseNot {
     unsafe extern "custom" fn bitwise_not(a: i64) -> i64 {
-        //~^ ERROR items with the `"custom"` ABI can only be declared externally or defined via naked functions
+        //~^ ERROR items with the "custom" ABI can only be declared externally or defined via naked functions
         //~| ERROR invalid signature for `extern "custom"` function
         unimplemented!()
     }
@@ -50,14 +50,14 @@ impl BitwiseNot for Thing {}
 
 trait Negate {
     extern "custom" fn negate(a: i64) -> i64;
-    //~^ ERROR functions with the `"custom"` ABI must be unsafe
+    //~^ ERROR functions with the "custom" ABI must be unsafe
     //~| ERROR invalid signature for `extern "custom"` function
 }
 
 impl Negate for Thing {
     extern "custom" fn negate(a: i64) -> i64 {
-        //~^ ERROR items with the `"custom"` ABI can only be declared externally or defined via naked functions
-        //~| ERROR functions with the `"custom"` ABI must be unsafe
+        //~^ ERROR items with the "custom" ABI can only be declared externally or defined via naked functions
+        //~| ERROR functions with the "custom" ABI must be unsafe
         //~| ERROR invalid signature for `extern "custom"` function
         -a
     }
@@ -68,24 +68,24 @@ unsafe extern "custom" {
     //~^ ERROR invalid signature for `extern "custom"` function
 
     safe fn extern_cannot_be_safe();
-    //~^ ERROR foreign functions with the `"custom"` ABI cannot be safe
+    //~^ ERROR foreign functions with the "custom" ABI cannot be safe
 }
 
 fn caller(f: unsafe extern "custom" fn(i64) -> i64, mut x: i64) -> i64 {
     unsafe { f(x) }
-    //~^ ERROR functions with the `"custom"` ABI cannot be called
+    //~^ ERROR functions with the "custom" ABI cannot be called
 }
 
 fn caller_by_ref(f: &unsafe extern "custom" fn(i64) -> i64, mut x: i64) -> i64 {
     unsafe { f(x) }
-    //~^ ERROR functions with the `"custom"` ABI cannot be called
+    //~^ ERROR functions with the "custom" ABI cannot be called
 }
 
 type Custom = unsafe extern "custom" fn(i64) -> i64;
 
 fn caller_alias(f: Custom, mut x: i64) -> i64 {
     unsafe { f(x) }
-    //~^ ERROR functions with the `"custom"` ABI cannot be called
+    //~^ ERROR functions with the "custom" ABI cannot be called
 }
 
 #[unsafe(naked)]
@@ -95,8 +95,8 @@ const unsafe extern "custom" fn no_const_fn() {
 }
 
 async unsafe extern "custom" fn no_async_fn() {
-    //~^ ERROR items with the `"custom"` ABI can only be declared externally or defined via naked functions
-    //~| ERROR functions with the `"custom"` ABI cannot be `async`
+    //~^ ERROR items with the "custom" ABI can only be declared externally or defined via naked functions
+    //~| ERROR functions with the "custom" ABI cannot be `async`
 }
 
 fn no_promotion_to_fn_trait(f: unsafe extern "custom" fn()) -> impl Fn()  {
@@ -107,15 +107,15 @@ fn no_promotion_to_fn_trait(f: unsafe extern "custom" fn()) -> impl Fn()  {
 pub fn main() {
     unsafe {
         assert_eq!(double(21), 42);
-        //~^ ERROR functions with the `"custom"` ABI cannot be called
+        //~^ ERROR functions with the "custom" ABI cannot be called
 
         assert_eq!(unsafe { increment(41) }, 42);
-        //~^ ERROR functions with the `"custom"` ABI cannot be called
+        //~^ ERROR functions with the "custom" ABI cannot be called
 
         assert!(Thing(41).is_even());
-        //~^ ERROR functions with the `"custom"` ABI cannot be called
+        //~^ ERROR functions with the "custom" ABI cannot be called
 
         assert_eq!(Thing::bitwise_not(42), !42);
-        //~^ ERROR functions with the `"custom"` ABI cannot be called
+        //~^ ERROR functions with the "custom" ABI cannot be called
     }
 }
diff --git a/tests/ui/abi/bad-custom.stderr b/tests/ui/abi/bad-custom.stderr
index ec0f11af898..893382875a2 100644
--- a/tests/ui/abi/bad-custom.stderr
+++ b/tests/ui/abi/bad-custom.stderr
@@ -1,4 +1,4 @@
-error: functions with the `"custom"` ABI must be unsafe
+error: functions with the "custom" ABI must be unsafe
   --> $DIR/bad-custom.rs:7:1
    |
 LL | extern "custom" fn must_be_unsafe(a: i64) -> i64 {
@@ -15,7 +15,7 @@ error: invalid signature for `extern "custom"` function
 LL | extern "custom" fn must_be_unsafe(a: i64) -> i64 {
    |                                   ^^^^^^     ^^^
    |
-   = note: functions with the `"custom"` ABI cannot have any parameters or return type
+   = note: functions with the "custom" ABI cannot have any parameters or return type
 help: remove the parameters and return type
    |
 LL - extern "custom" fn must_be_unsafe(a: i64) -> i64 {
@@ -28,7 +28,7 @@ error: invalid signature for `extern "custom"` function
 LL | unsafe extern "custom" fn no_parameters(a: i64) {
    |                                         ^^^^^^
    |
-   = note: functions with the `"custom"` ABI cannot have any parameters or return type
+   = note: functions with the "custom" ABI cannot have any parameters or return type
 help: remove the parameters and return type
    |
 LL - unsafe extern "custom" fn no_parameters(a: i64) {
@@ -41,7 +41,7 @@ error: invalid signature for `extern "custom"` function
 LL | unsafe extern "custom" fn no_return_type() -> i64 {
    |                                               ^^^
    |
-   = note: functions with the `"custom"` ABI cannot have any parameters or return type
+   = note: functions with the "custom" ABI cannot have any parameters or return type
 help: remove the parameters and return type
    |
 LL - unsafe extern "custom" fn no_return_type() -> i64 {
@@ -54,7 +54,7 @@ error: invalid signature for `extern "custom"` function
 LL | unsafe extern "custom" fn double(a: i64) -> i64 {
    |                                  ^^^^^^     ^^^
    |
-   = note: functions with the `"custom"` ABI cannot have any parameters or return type
+   = note: functions with the "custom" ABI cannot have any parameters or return type
 help: remove the parameters and return type
    |
 LL - unsafe extern "custom" fn double(a: i64) -> i64 {
@@ -67,7 +67,7 @@ error: invalid signature for `extern "custom"` function
 LL |     unsafe extern "custom" fn is_even(self) -> bool {
    |                                       ^^^^     ^^^^
    |
-   = note: functions with the `"custom"` ABI cannot have any parameters or return type
+   = note: functions with the "custom" ABI cannot have any parameters or return type
 help: remove the parameters and return type
    |
 LL -     unsafe extern "custom" fn is_even(self) -> bool {
@@ -80,14 +80,14 @@ error: invalid signature for `extern "custom"` function
 LL |     unsafe extern "custom" fn bitwise_not(a: i64) -> i64 {
    |                                           ^^^^^^     ^^^
    |
-   = note: functions with the `"custom"` ABI cannot have any parameters or return type
+   = note: functions with the "custom" ABI cannot have any parameters or return type
 help: remove the parameters and return type
    |
 LL -     unsafe extern "custom" fn bitwise_not(a: i64) -> i64 {
 LL +     unsafe extern "custom" fn bitwise_not() {
    |
 
-error: functions with the `"custom"` ABI must be unsafe
+error: functions with the "custom" ABI must be unsafe
   --> $DIR/bad-custom.rs:52:5
    |
 LL |     extern "custom" fn negate(a: i64) -> i64;
@@ -104,14 +104,14 @@ error: invalid signature for `extern "custom"` function
 LL |     extern "custom" fn negate(a: i64) -> i64;
    |                               ^^^^^^     ^^^
    |
-   = note: functions with the `"custom"` ABI cannot have any parameters or return type
+   = note: functions with the "custom" ABI cannot have any parameters or return type
 help: remove the parameters and return type
    |
 LL -     extern "custom" fn negate(a: i64) -> i64;
 LL +     extern "custom" fn negate();
    |
 
-error: functions with the `"custom"` ABI must be unsafe
+error: functions with the "custom" ABI must be unsafe
   --> $DIR/bad-custom.rs:58:5
    |
 LL |     extern "custom" fn negate(a: i64) -> i64 {
@@ -128,7 +128,7 @@ error: invalid signature for `extern "custom"` function
 LL |     extern "custom" fn negate(a: i64) -> i64 {
    |                               ^^^^^^     ^^^
    |
-   = note: functions with the `"custom"` ABI cannot have any parameters or return type
+   = note: functions with the "custom" ABI cannot have any parameters or return type
 help: remove the parameters and return type
    |
 LL -     extern "custom" fn negate(a: i64) -> i64 {
@@ -141,14 +141,14 @@ error: invalid signature for `extern "custom"` function
 LL |     fn increment(a: i64) -> i64;
    |                  ^^^^^^     ^^^
    |
-   = note: functions with the `"custom"` ABI cannot have any parameters or return type
+   = note: functions with the "custom" ABI cannot have any parameters or return type
 help: remove the parameters and return type
    |
 LL -     fn increment(a: i64) -> i64;
 LL +     fn increment();
    |
 
-error: foreign functions with the `"custom"` ABI cannot be safe
+error: foreign functions with the "custom" ABI cannot be safe
   --> $DIR/bad-custom.rs:70:5
    |
 LL |     safe fn extern_cannot_be_safe();
@@ -160,7 +160,7 @@ LL -     safe fn extern_cannot_be_safe();
 LL +     fn extern_cannot_be_safe();
    |
 
-error: functions with the `"custom"` ABI cannot be `async`
+error: functions with the "custom" ABI cannot be `async`
   --> $DIR/bad-custom.rs:97:1
    |
 LL | async unsafe extern "custom" fn no_async_fn() {
@@ -172,7 +172,7 @@ LL - async unsafe extern "custom" fn no_async_fn() {
 LL + unsafe extern "custom" fn no_async_fn() {
    |
 
-error: items with the `"custom"` ABI can only be declared externally or defined via naked functions
+error: items with the "custom" ABI can only be declared externally or defined via naked functions
   --> $DIR/bad-custom.rs:97:1
    |
 LL | async unsafe extern "custom" fn no_async_fn() {
@@ -197,7 +197,7 @@ LL |     f
    = note: unsafe function cannot be called generically without an unsafe block
    = note: wrap the `unsafe extern "custom" fn()` in a closure with no arguments: `|| { /* code */ }`
 
-error: items with the `"custom"` ABI can only be declared externally or defined via naked functions
+error: items with the "custom" ABI can only be declared externally or defined via naked functions
   --> $DIR/bad-custom.rs:25:1
    |
 LL | unsafe extern "custom" fn double(a: i64) -> i64 {
@@ -209,7 +209,7 @@ LL + #[unsafe(naked)]
 LL | unsafe extern "custom" fn double(a: i64) -> i64 {
    |
 
-error: items with the `"custom"` ABI can only be declared externally or defined via naked functions
+error: items with the "custom" ABI can only be declared externally or defined via naked functions
   --> $DIR/bad-custom.rs:34:5
    |
 LL |     unsafe extern "custom" fn is_even(self) -> bool {
@@ -221,7 +221,7 @@ LL +     #[unsafe(naked)]
 LL |     unsafe extern "custom" fn is_even(self) -> bool {
    |
 
-error: items with the `"custom"` ABI can only be declared externally or defined via naked functions
+error: items with the "custom" ABI can only be declared externally or defined via naked functions
   --> $DIR/bad-custom.rs:42:5
    |
 LL |     unsafe extern "custom" fn bitwise_not(a: i64) -> i64 {
@@ -233,7 +233,7 @@ LL +     #[unsafe(naked)]
 LL |     unsafe extern "custom" fn bitwise_not(a: i64) -> i64 {
    |
 
-error: items with the `"custom"` ABI can only be declared externally or defined via naked functions
+error: items with the "custom" ABI can only be declared externally or defined via naked functions
   --> $DIR/bad-custom.rs:58:5
    |
 LL |     extern "custom" fn negate(a: i64) -> i64 {
@@ -245,43 +245,85 @@ LL +     #[unsafe(naked)]
 LL |     extern "custom" fn negate(a: i64) -> i64 {
    |
 
-error: functions with the `"custom"` ABI cannot be called
+error: functions with the "custom" ABI cannot be called
+  --> $DIR/bad-custom.rs:75:14
+   |
+LL |     unsafe { f(x) }
+   |              ^^^^
+   |
+note: an `extern "custom"` function can only be called using inline assembly
   --> $DIR/bad-custom.rs:75:14
    |
 LL |     unsafe { f(x) }
    |              ^^^^
 
-error: functions with the `"custom"` ABI cannot be called
+error: functions with the "custom" ABI cannot be called
+  --> $DIR/bad-custom.rs:80:14
+   |
+LL |     unsafe { f(x) }
+   |              ^^^^
+   |
+note: an `extern "custom"` function can only be called using inline assembly
   --> $DIR/bad-custom.rs:80:14
    |
 LL |     unsafe { f(x) }
    |              ^^^^
 
-error: functions with the `"custom"` ABI cannot be called
+error: functions with the "custom" ABI cannot be called
+  --> $DIR/bad-custom.rs:87:14
+   |
+LL |     unsafe { f(x) }
+   |              ^^^^
+   |
+note: an `extern "custom"` function can only be called using inline assembly
   --> $DIR/bad-custom.rs:87:14
    |
 LL |     unsafe { f(x) }
    |              ^^^^
 
-error: functions with the `"custom"` ABI cannot be called
+error: functions with the "custom" ABI cannot be called
+  --> $DIR/bad-custom.rs:109:20
+   |
+LL |         assert_eq!(double(21), 42);
+   |                    ^^^^^^^^^^
+   |
+note: an `extern "custom"` function can only be called using inline assembly
   --> $DIR/bad-custom.rs:109:20
    |
 LL |         assert_eq!(double(21), 42);
    |                    ^^^^^^^^^^
 
-error: functions with the `"custom"` ABI cannot be called
+error: functions with the "custom" ABI cannot be called
+  --> $DIR/bad-custom.rs:112:29
+   |
+LL |         assert_eq!(unsafe { increment(41) }, 42);
+   |                             ^^^^^^^^^^^^^
+   |
+note: an `extern "custom"` function can only be called using inline assembly
   --> $DIR/bad-custom.rs:112:29
    |
 LL |         assert_eq!(unsafe { increment(41) }, 42);
    |                             ^^^^^^^^^^^^^
 
-error: functions with the `"custom"` ABI cannot be called
+error: functions with the "custom" ABI cannot be called
+  --> $DIR/bad-custom.rs:115:17
+   |
+LL |         assert!(Thing(41).is_even());
+   |                 ^^^^^^^^^^^^^^^^^^^
+   |
+note: an `extern "custom"` function can only be called using inline assembly
   --> $DIR/bad-custom.rs:115:17
    |
 LL |         assert!(Thing(41).is_even());
    |                 ^^^^^^^^^^^^^^^^^^^
 
-error: functions with the `"custom"` ABI cannot be called
+error: functions with the "custom" ABI cannot be called
+  --> $DIR/bad-custom.rs:118:20
+   |
+LL |         assert_eq!(Thing::bitwise_not(42), !42);
+   |                    ^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: an `extern "custom"` function can only be called using inline assembly
   --> $DIR/bad-custom.rs:118:20
    |
 LL |         assert_eq!(Thing::bitwise_not(42), !42);
diff --git a/tests/ui/abi/cannot-be-called.avr.stderr b/tests/ui/abi/cannot-be-called.avr.stderr
new file mode 100644
index 00000000000..1129893cbfa
--- /dev/null
+++ b/tests/ui/abi/cannot-be-called.avr.stderr
@@ -0,0 +1,75 @@
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:37:8
+   |
+LL | extern "msp430-interrupt" fn msp430() {}
+   |        ^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:41:8
+   |
+LL | extern "riscv-interrupt-m" fn riscv_m() {}
+   |        ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:43:8
+   |
+LL | extern "riscv-interrupt-s" fn riscv_s() {}
+   |        ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "x86-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:45:8
+   |
+LL | extern "x86-interrupt" fn x86() {}
+   |        ^^^^^^^^^^^^^^^
+
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:70:25
+   |
+LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+   |                         ^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:76:26
+   |
+LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
+   |                          ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:82:26
+   |
+LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
+   |                          ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "x86-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:88:22
+   |
+LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
+   |                      ^^^^^^^^^^^^^^^
+
+error: functions with the "avr-interrupt" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:50:5
+   |
+LL |     avr();
+   |     ^^^^^
+   |
+note: an `extern "avr-interrupt"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:50:5
+   |
+LL |     avr();
+   |     ^^^^^
+
+error: functions with the "avr-interrupt" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:66:5
+   |
+LL |     f()
+   |     ^^^
+   |
+note: an `extern "avr-interrupt"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:66:5
+   |
+LL |     f()
+   |     ^^^
+
+error: aborting due to 10 previous errors
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/cannot-be-called.i686.stderr b/tests/ui/abi/cannot-be-called.i686.stderr
new file mode 100644
index 00000000000..024d5e2e93d
--- /dev/null
+++ b/tests/ui/abi/cannot-be-called.i686.stderr
@@ -0,0 +1,75 @@
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:37:8
+   |
+LL | extern "msp430-interrupt" fn msp430() {}
+   |        ^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:39:8
+   |
+LL | extern "avr-interrupt" fn avr() {}
+   |        ^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:41:8
+   |
+LL | extern "riscv-interrupt-m" fn riscv_m() {}
+   |        ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:43:8
+   |
+LL | extern "riscv-interrupt-s" fn riscv_s() {}
+   |        ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:64:22
+   |
+LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
+   |                      ^^^^^^^^^^^^^^^
+
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:70:25
+   |
+LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+   |                         ^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:76:26
+   |
+LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
+   |                          ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:82:26
+   |
+LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
+   |                          ^^^^^^^^^^^^^^^^^^^
+
+error: functions with the "x86-interrupt" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:58:5
+   |
+LL |     x86();
+   |     ^^^^^
+   |
+note: an `extern "x86-interrupt"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:58:5
+   |
+LL |     x86();
+   |     ^^^^^
+
+error: functions with the "x86-interrupt" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:90:5
+   |
+LL |     f()
+   |     ^^^
+   |
+note: an `extern "x86-interrupt"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:90:5
+   |
+LL |     f()
+   |     ^^^
+
+error: aborting due to 10 previous errors
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/cannot-be-called.msp430.stderr b/tests/ui/abi/cannot-be-called.msp430.stderr
new file mode 100644
index 00000000000..52d7d792510
--- /dev/null
+++ b/tests/ui/abi/cannot-be-called.msp430.stderr
@@ -0,0 +1,75 @@
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:39:8
+   |
+LL | extern "avr-interrupt" fn avr() {}
+   |        ^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:41:8
+   |
+LL | extern "riscv-interrupt-m" fn riscv_m() {}
+   |        ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:43:8
+   |
+LL | extern "riscv-interrupt-s" fn riscv_s() {}
+   |        ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "x86-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:45:8
+   |
+LL | extern "x86-interrupt" fn x86() {}
+   |        ^^^^^^^^^^^^^^^
+
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:64:22
+   |
+LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
+   |                      ^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:76:26
+   |
+LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
+   |                          ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:82:26
+   |
+LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
+   |                          ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "x86-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:88:22
+   |
+LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
+   |                      ^^^^^^^^^^^^^^^
+
+error: functions with the "msp430-interrupt" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:52:5
+   |
+LL |     msp430();
+   |     ^^^^^^^^
+   |
+note: an `extern "msp430-interrupt"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:52:5
+   |
+LL |     msp430();
+   |     ^^^^^^^^
+
+error: functions with the "msp430-interrupt" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:72:5
+   |
+LL |     f()
+   |     ^^^
+   |
+note: an `extern "msp430-interrupt"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:72:5
+   |
+LL |     f()
+   |     ^^^
+
+error: aborting due to 10 previous errors
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/cannot-be-called.riscv32.stderr b/tests/ui/abi/cannot-be-called.riscv32.stderr
new file mode 100644
index 00000000000..119d93bd58e
--- /dev/null
+++ b/tests/ui/abi/cannot-be-called.riscv32.stderr
@@ -0,0 +1,87 @@
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:37:8
+   |
+LL | extern "msp430-interrupt" fn msp430() {}
+   |        ^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:39:8
+   |
+LL | extern "avr-interrupt" fn avr() {}
+   |        ^^^^^^^^^^^^^^^
+
+error[E0570]: "x86-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:45:8
+   |
+LL | extern "x86-interrupt" fn x86() {}
+   |        ^^^^^^^^^^^^^^^
+
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:64:22
+   |
+LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
+   |                      ^^^^^^^^^^^^^^^
+
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:70:25
+   |
+LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+   |                         ^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "x86-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:88:22
+   |
+LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
+   |                      ^^^^^^^^^^^^^^^
+
+error: functions with the "riscv-interrupt-m" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:54:5
+   |
+LL |     riscv_m();
+   |     ^^^^^^^^^
+   |
+note: an `extern "riscv-interrupt-m"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:54:5
+   |
+LL |     riscv_m();
+   |     ^^^^^^^^^
+
+error: functions with the "riscv-interrupt-s" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:56:5
+   |
+LL |     riscv_s();
+   |     ^^^^^^^^^
+   |
+note: an `extern "riscv-interrupt-s"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:56:5
+   |
+LL |     riscv_s();
+   |     ^^^^^^^^^
+
+error: functions with the "riscv-interrupt-m" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:78:5
+   |
+LL |     f()
+   |     ^^^
+   |
+note: an `extern "riscv-interrupt-m"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:78:5
+   |
+LL |     f()
+   |     ^^^
+
+error: functions with the "riscv-interrupt-s" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:84:5
+   |
+LL |     f()
+   |     ^^^
+   |
+note: an `extern "riscv-interrupt-s"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:84:5
+   |
+LL |     f()
+   |     ^^^
+
+error: aborting due to 10 previous errors
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/cannot-be-called.riscv64.stderr b/tests/ui/abi/cannot-be-called.riscv64.stderr
new file mode 100644
index 00000000000..119d93bd58e
--- /dev/null
+++ b/tests/ui/abi/cannot-be-called.riscv64.stderr
@@ -0,0 +1,87 @@
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:37:8
+   |
+LL | extern "msp430-interrupt" fn msp430() {}
+   |        ^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:39:8
+   |
+LL | extern "avr-interrupt" fn avr() {}
+   |        ^^^^^^^^^^^^^^^
+
+error[E0570]: "x86-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:45:8
+   |
+LL | extern "x86-interrupt" fn x86() {}
+   |        ^^^^^^^^^^^^^^^
+
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:64:22
+   |
+LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
+   |                      ^^^^^^^^^^^^^^^
+
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:70:25
+   |
+LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+   |                         ^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "x86-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:88:22
+   |
+LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
+   |                      ^^^^^^^^^^^^^^^
+
+error: functions with the "riscv-interrupt-m" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:54:5
+   |
+LL |     riscv_m();
+   |     ^^^^^^^^^
+   |
+note: an `extern "riscv-interrupt-m"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:54:5
+   |
+LL |     riscv_m();
+   |     ^^^^^^^^^
+
+error: functions with the "riscv-interrupt-s" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:56:5
+   |
+LL |     riscv_s();
+   |     ^^^^^^^^^
+   |
+note: an `extern "riscv-interrupt-s"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:56:5
+   |
+LL |     riscv_s();
+   |     ^^^^^^^^^
+
+error: functions with the "riscv-interrupt-m" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:78:5
+   |
+LL |     f()
+   |     ^^^
+   |
+note: an `extern "riscv-interrupt-m"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:78:5
+   |
+LL |     f()
+   |     ^^^
+
+error: functions with the "riscv-interrupt-s" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:84:5
+   |
+LL |     f()
+   |     ^^^
+   |
+note: an `extern "riscv-interrupt-s"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:84:5
+   |
+LL |     f()
+   |     ^^^
+
+error: aborting due to 10 previous errors
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/cannot-be-called.rs b/tests/ui/abi/cannot-be-called.rs
new file mode 100644
index 00000000000..af979d65d33
--- /dev/null
+++ b/tests/ui/abi/cannot-be-called.rs
@@ -0,0 +1,92 @@
+/*! Tests entry-point ABIs cannot be called
+
+Interrupt ABIs share similar semantics, in that they are special entry-points unusable by Rust.
+So we test that they error in essentially all of the same places.
+*/
+//@ add-core-stubs
+//@ revisions: x64 x64_win i686 riscv32 riscv64 avr msp430
+//
+//@ [x64] needs-llvm-components: x86
+//@ [x64] compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib
+//@ [x64_win] needs-llvm-components: x86
+//@ [x64_win] compile-flags: --target=x86_64-pc-windows-msvc --crate-type=rlib
+//@ [i686] needs-llvm-components: x86
+//@ [i686] compile-flags: --target=i686-unknown-linux-gnu --crate-type=rlib
+//@ [riscv32] needs-llvm-components: riscv
+//@ [riscv32] compile-flags: --target=riscv32i-unknown-none-elf --crate-type=rlib
+//@ [riscv64] needs-llvm-components: riscv
+//@ [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf --crate-type=rlib
+//@ [avr] needs-llvm-components: avr
+//@ [avr] compile-flags: --target=avr-none -C target-cpu=atmega328p --crate-type=rlib
+//@ [msp430] needs-llvm-components: msp430
+//@ [msp430] compile-flags: --target=msp430-none-elf --crate-type=rlib
+#![no_core]
+#![feature(
+    no_core,
+    abi_msp430_interrupt,
+    abi_avr_interrupt,
+    abi_x86_interrupt,
+    abi_riscv_interrupt
+)]
+
+extern crate minicore;
+use minicore::*;
+
+/* extern "interrupt" definition */
+
+extern "msp430-interrupt" fn msp430() {}
+//[x64,x64_win,i686,riscv32,riscv64,avr]~^ ERROR is not a supported ABI
+extern "avr-interrupt" fn avr() {}
+//[x64,x64_win,i686,riscv32,riscv64,msp430]~^ ERROR is not a supported ABI
+extern "riscv-interrupt-m" fn riscv_m() {}
+//[x64,x64_win,i686,avr,msp430]~^ ERROR is not a supported ABI
+extern "riscv-interrupt-s" fn riscv_s() {}
+//[x64,x64_win,i686,avr,msp430]~^ ERROR is not a supported ABI
+extern "x86-interrupt" fn x86() {}
+//[riscv32,riscv64,avr,msp430]~^ ERROR is not a supported ABI
+
+/* extern "interrupt" calls  */
+fn call_the_interrupts() {
+    avr();
+    //[avr]~^ ERROR functions with the "avr-interrupt" ABI cannot be called
+    msp430();
+    //[msp430]~^ ERROR functions with the "msp430-interrupt" ABI cannot be called
+    riscv_m();
+    //[riscv32,riscv64]~^ ERROR functions with the "riscv-interrupt-m" ABI cannot be called
+    riscv_s();
+    //[riscv32,riscv64]~^ ERROR functions with the "riscv-interrupt-s" ABI cannot be called
+    x86();
+    //[x64,x64_win,i686]~^ ERROR functions with the "x86-interrupt" ABI cannot be called
+}
+
+/* extern "interrupt" fnptr calls */
+
+fn avr_ptr(f: extern "avr-interrupt" fn()) {
+    //[x64,x64_win,i686,riscv32,riscv64,msp430]~^ ERROR is not a supported ABI
+    f()
+    //[avr]~^ ERROR functions with the "avr-interrupt" ABI cannot be called
+}
+
+fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+    //[x64,x64_win,i686,riscv32,riscv64,avr]~^ ERROR is not a supported ABI
+    f()
+    //[msp430]~^ ERROR functions with the "msp430-interrupt" ABI cannot be called
+}
+
+fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
+    //[x64,x64_win,i686,avr,msp430]~^ ERROR is not a supported ABI
+    f()
+    //[riscv32,riscv64]~^ ERROR functions with the "riscv-interrupt-m" ABI cannot be called
+}
+
+fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
+    //[x64,x64_win,i686,avr,msp430]~^ ERROR is not a supported ABI
+    f()
+    //[riscv32,riscv64]~^ ERROR functions with the "riscv-interrupt-s" ABI cannot be called
+}
+
+fn x86_ptr(f: extern "x86-interrupt" fn()) {
+    //[riscv32,riscv64,avr,msp430]~^ ERROR is not a supported ABI
+    f()
+    //[x64,x64_win,i686]~^ ERROR functions with the "x86-interrupt" ABI cannot be called
+}
diff --git a/tests/ui/abi/cannot-be-called.x64.stderr b/tests/ui/abi/cannot-be-called.x64.stderr
new file mode 100644
index 00000000000..024d5e2e93d
--- /dev/null
+++ b/tests/ui/abi/cannot-be-called.x64.stderr
@@ -0,0 +1,75 @@
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:37:8
+   |
+LL | extern "msp430-interrupt" fn msp430() {}
+   |        ^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:39:8
+   |
+LL | extern "avr-interrupt" fn avr() {}
+   |        ^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:41:8
+   |
+LL | extern "riscv-interrupt-m" fn riscv_m() {}
+   |        ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:43:8
+   |
+LL | extern "riscv-interrupt-s" fn riscv_s() {}
+   |        ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:64:22
+   |
+LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
+   |                      ^^^^^^^^^^^^^^^
+
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:70:25
+   |
+LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+   |                         ^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:76:26
+   |
+LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
+   |                          ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:82:26
+   |
+LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
+   |                          ^^^^^^^^^^^^^^^^^^^
+
+error: functions with the "x86-interrupt" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:58:5
+   |
+LL |     x86();
+   |     ^^^^^
+   |
+note: an `extern "x86-interrupt"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:58:5
+   |
+LL |     x86();
+   |     ^^^^^
+
+error: functions with the "x86-interrupt" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:90:5
+   |
+LL |     f()
+   |     ^^^
+   |
+note: an `extern "x86-interrupt"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:90:5
+   |
+LL |     f()
+   |     ^^^
+
+error: aborting due to 10 previous errors
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/cannot-be-called.x64_win.stderr b/tests/ui/abi/cannot-be-called.x64_win.stderr
new file mode 100644
index 00000000000..024d5e2e93d
--- /dev/null
+++ b/tests/ui/abi/cannot-be-called.x64_win.stderr
@@ -0,0 +1,75 @@
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:37:8
+   |
+LL | extern "msp430-interrupt" fn msp430() {}
+   |        ^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:39:8
+   |
+LL | extern "avr-interrupt" fn avr() {}
+   |        ^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:41:8
+   |
+LL | extern "riscv-interrupt-m" fn riscv_m() {}
+   |        ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:43:8
+   |
+LL | extern "riscv-interrupt-s" fn riscv_s() {}
+   |        ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:64:22
+   |
+LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
+   |                      ^^^^^^^^^^^^^^^
+
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:70:25
+   |
+LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
+   |                         ^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:76:26
+   |
+LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
+   |                          ^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
+  --> $DIR/cannot-be-called.rs:82:26
+   |
+LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
+   |                          ^^^^^^^^^^^^^^^^^^^
+
+error: functions with the "x86-interrupt" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:58:5
+   |
+LL |     x86();
+   |     ^^^^^
+   |
+note: an `extern "x86-interrupt"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:58:5
+   |
+LL |     x86();
+   |     ^^^^^
+
+error: functions with the "x86-interrupt" ABI cannot be called
+  --> $DIR/cannot-be-called.rs:90:5
+   |
+LL |     f()
+   |     ^^^
+   |
+note: an `extern "x86-interrupt"` function can only be called using inline assembly
+  --> $DIR/cannot-be-called.rs:90:5
+   |
+LL |     f()
+   |     ^^^
+
+error: aborting due to 10 previous errors
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/cannot-be-coroutine.avr.stderr b/tests/ui/abi/cannot-be-coroutine.avr.stderr
new file mode 100644
index 00000000000..b06da0f3352
--- /dev/null
+++ b/tests/ui/abi/cannot-be-coroutine.avr.stderr
@@ -0,0 +1,23 @@
+error: functions with the "avr-interrupt" ABI cannot be `async`
+  --> $DIR/cannot-be-coroutine.rs:36:1
+   |
+LL | async extern "avr-interrupt" fn avr() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: remove the `async` keyword from this definiton
+   |
+LL - async extern "avr-interrupt" fn avr() {
+LL + extern "avr-interrupt" fn avr() {
+   |
+
+error: requires `ResumeTy` lang_item
+  --> $DIR/cannot-be-coroutine.rs:32:19
+   |
+LL |   async fn vanilla(){
+   |  ___________________^
+LL | |
+LL | | }
+   | |_^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/abi/cannot-be-coroutine.i686.stderr b/tests/ui/abi/cannot-be-coroutine.i686.stderr
new file mode 100644
index 00000000000..cbbddd087c8
--- /dev/null
+++ b/tests/ui/abi/cannot-be-coroutine.i686.stderr
@@ -0,0 +1,23 @@
+error: functions with the "x86-interrupt" ABI cannot be `async`
+  --> $DIR/cannot-be-coroutine.rs:52:1
+   |
+LL | async extern "x86-interrupt" fn x86() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: remove the `async` keyword from this definiton
+   |
+LL - async extern "x86-interrupt" fn x86() {
+LL + extern "x86-interrupt" fn x86() {
+   |
+
+error: requires `ResumeTy` lang_item
+  --> $DIR/cannot-be-coroutine.rs:32:19
+   |
+LL |   async fn vanilla(){
+   |  ___________________^
+LL | |
+LL | | }
+   | |_^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/abi/cannot-be-coroutine.msp430.stderr b/tests/ui/abi/cannot-be-coroutine.msp430.stderr
new file mode 100644
index 00000000000..951ce13b605
--- /dev/null
+++ b/tests/ui/abi/cannot-be-coroutine.msp430.stderr
@@ -0,0 +1,23 @@
+error: functions with the "msp430-interrupt" ABI cannot be `async`
+  --> $DIR/cannot-be-coroutine.rs:40:1
+   |
+LL | async extern "msp430-interrupt" fn msp430() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: remove the `async` keyword from this definiton
+   |
+LL - async extern "msp430-interrupt" fn msp430() {
+LL + extern "msp430-interrupt" fn msp430() {
+   |
+
+error: requires `ResumeTy` lang_item
+  --> $DIR/cannot-be-coroutine.rs:32:19
+   |
+LL |   async fn vanilla(){
+   |  ___________________^
+LL | |
+LL | | }
+   | |_^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/abi/cannot-be-coroutine.riscv32.stderr b/tests/ui/abi/cannot-be-coroutine.riscv32.stderr
new file mode 100644
index 00000000000..8e3b3a2940a
--- /dev/null
+++ b/tests/ui/abi/cannot-be-coroutine.riscv32.stderr
@@ -0,0 +1,35 @@
+error: functions with the "riscv-interrupt-m" ABI cannot be `async`
+  --> $DIR/cannot-be-coroutine.rs:44:1
+   |
+LL | async extern "riscv-interrupt-m" fn riscv_m() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: remove the `async` keyword from this definiton
+   |
+LL - async extern "riscv-interrupt-m" fn riscv_m() {
+LL + extern "riscv-interrupt-m" fn riscv_m() {
+   |
+
+error: functions with the "riscv-interrupt-s" ABI cannot be `async`
+  --> $DIR/cannot-be-coroutine.rs:48:1
+   |
+LL | async extern "riscv-interrupt-s" fn riscv_s() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: remove the `async` keyword from this definiton
+   |
+LL - async extern "riscv-interrupt-s" fn riscv_s() {
+LL + extern "riscv-interrupt-s" fn riscv_s() {
+   |
+
+error: requires `ResumeTy` lang_item
+  --> $DIR/cannot-be-coroutine.rs:32:19
+   |
+LL |   async fn vanilla(){
+   |  ___________________^
+LL | |
+LL | | }
+   | |_^
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/abi/cannot-be-coroutine.riscv64.stderr b/tests/ui/abi/cannot-be-coroutine.riscv64.stderr
new file mode 100644
index 00000000000..8e3b3a2940a
--- /dev/null
+++ b/tests/ui/abi/cannot-be-coroutine.riscv64.stderr
@@ -0,0 +1,35 @@
+error: functions with the "riscv-interrupt-m" ABI cannot be `async`
+  --> $DIR/cannot-be-coroutine.rs:44:1
+   |
+LL | async extern "riscv-interrupt-m" fn riscv_m() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: remove the `async` keyword from this definiton
+   |
+LL - async extern "riscv-interrupt-m" fn riscv_m() {
+LL + extern "riscv-interrupt-m" fn riscv_m() {
+   |
+
+error: functions with the "riscv-interrupt-s" ABI cannot be `async`
+  --> $DIR/cannot-be-coroutine.rs:48:1
+   |
+LL | async extern "riscv-interrupt-s" fn riscv_s() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: remove the `async` keyword from this definiton
+   |
+LL - async extern "riscv-interrupt-s" fn riscv_s() {
+LL + extern "riscv-interrupt-s" fn riscv_s() {
+   |
+
+error: requires `ResumeTy` lang_item
+  --> $DIR/cannot-be-coroutine.rs:32:19
+   |
+LL |   async fn vanilla(){
+   |  ___________________^
+LL | |
+LL | | }
+   | |_^
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/abi/cannot-be-coroutine.rs b/tests/ui/abi/cannot-be-coroutine.rs
new file mode 100644
index 00000000000..7270a55f69e
--- /dev/null
+++ b/tests/ui/abi/cannot-be-coroutine.rs
@@ -0,0 +1,54 @@
+//@ add-core-stubs
+//@ edition: 2021
+//@ revisions: x64 x64_win i686 riscv32 riscv64 avr msp430
+//
+//@ [x64] needs-llvm-components: x86
+//@ [x64] compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib
+//@ [x64_win] needs-llvm-components: x86
+//@ [x64_win] compile-flags: --target=x86_64-pc-windows-msvc --crate-type=rlib
+//@ [i686] needs-llvm-components: x86
+//@ [i686] compile-flags: --target=i686-unknown-linux-gnu --crate-type=rlib
+//@ [riscv32] needs-llvm-components: riscv
+//@ [riscv32] compile-flags: --target=riscv32i-unknown-none-elf --crate-type=rlib
+//@ [riscv64] needs-llvm-components: riscv
+//@ [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf --crate-type=rlib
+//@ [avr] needs-llvm-components: avr
+//@ [avr] compile-flags: --target=avr-none -C target-cpu=atmega328p --crate-type=rlib
+//@ [msp430] needs-llvm-components: msp430
+//@ [msp430] compile-flags: --target=msp430-none-elf --crate-type=rlib
+#![no_core]
+#![feature(
+    no_core,
+    abi_msp430_interrupt,
+    abi_avr_interrupt,
+    abi_x86_interrupt,
+    abi_riscv_interrupt
+)]
+
+extern crate minicore;
+use minicore::*;
+
+// We ignore this error; implementing all of the async-related lang items is not worth it.
+async fn vanilla(){
+    //~^ ERROR requires `ResumeTy` lang_item
+}
+
+async extern "avr-interrupt" fn avr() {
+    //[avr]~^ ERROR functions with the "avr-interrupt" ABI cannot be `async`
+}
+
+async extern "msp430-interrupt" fn msp430() {
+    //[msp430]~^ ERROR functions with the "msp430-interrupt" ABI cannot be `async`
+}
+
+async extern "riscv-interrupt-m" fn riscv_m() {
+    //[riscv32,riscv64]~^ ERROR functions with the "riscv-interrupt-m" ABI cannot be `async`
+}
+
+async extern "riscv-interrupt-s" fn riscv_s() {
+    //[riscv32,riscv64]~^ ERROR functions with the "riscv-interrupt-s" ABI cannot be `async`
+}
+
+async extern "x86-interrupt" fn x86() {
+    //[x64,x64_win,i686]~^ ERROR functions with the "x86-interrupt" ABI cannot be `async`
+}
diff --git a/tests/ui/abi/cannot-be-coroutine.x64.stderr b/tests/ui/abi/cannot-be-coroutine.x64.stderr
new file mode 100644
index 00000000000..cbbddd087c8
--- /dev/null
+++ b/tests/ui/abi/cannot-be-coroutine.x64.stderr
@@ -0,0 +1,23 @@
+error: functions with the "x86-interrupt" ABI cannot be `async`
+  --> $DIR/cannot-be-coroutine.rs:52:1
+   |
+LL | async extern "x86-interrupt" fn x86() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: remove the `async` keyword from this definiton
+   |
+LL - async extern "x86-interrupt" fn x86() {
+LL + extern "x86-interrupt" fn x86() {
+   |
+
+error: requires `ResumeTy` lang_item
+  --> $DIR/cannot-be-coroutine.rs:32:19
+   |
+LL |   async fn vanilla(){
+   |  ___________________^
+LL | |
+LL | | }
+   | |_^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/abi/cannot-be-coroutine.x64_win.stderr b/tests/ui/abi/cannot-be-coroutine.x64_win.stderr
new file mode 100644
index 00000000000..cbbddd087c8
--- /dev/null
+++ b/tests/ui/abi/cannot-be-coroutine.x64_win.stderr
@@ -0,0 +1,23 @@
+error: functions with the "x86-interrupt" ABI cannot be `async`
+  --> $DIR/cannot-be-coroutine.rs:52:1
+   |
+LL | async extern "x86-interrupt" fn x86() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: remove the `async` keyword from this definiton
+   |
+LL - async extern "x86-interrupt" fn x86() {
+LL + extern "x86-interrupt" fn x86() {
+   |
+
+error: requires `ResumeTy` lang_item
+  --> $DIR/cannot-be-coroutine.rs:32:19
+   |
+LL |   async fn vanilla(){
+   |  ___________________^
+LL | |
+LL | | }
+   | |_^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/abi/invalid-call-abi-ctfe.rs b/tests/ui/abi/invalid-call-abi-ctfe.rs
new file mode 100644
index 00000000000..343cc728fe3
--- /dev/null
+++ b/tests/ui/abi/invalid-call-abi-ctfe.rs
@@ -0,0 +1,14 @@
+// Fix for #142969 where an invalid ABI in a signature still had its call ABI computed
+// because CTFE tried to evaluate it, despite previous errors during AST-to-HIR lowering.
+
+#![feature(rustc_attrs)]
+
+const extern "rust-invalid" fn foo() {
+    //~^ ERROR "rust-invalid" is not a supported ABI for the current target
+    panic!()
+}
+
+const _: () = foo();
+
+
+fn main() {}
diff --git a/tests/ui/abi/invalid-call-abi-ctfe.stderr b/tests/ui/abi/invalid-call-abi-ctfe.stderr
new file mode 100644
index 00000000000..402de4b69b9
--- /dev/null
+++ b/tests/ui/abi/invalid-call-abi-ctfe.stderr
@@ -0,0 +1,9 @@
+error[E0570]: "rust-invalid" is not a supported ABI for the current target
+  --> $DIR/invalid-call-abi-ctfe.rs:6:14
+   |
+LL | const extern "rust-invalid" fn foo() {
+   |              ^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/invalid-call-abi.rs b/tests/ui/abi/invalid-call-abi.rs
new file mode 100644
index 00000000000..076ddd91ab0
--- /dev/null
+++ b/tests/ui/abi/invalid-call-abi.rs
@@ -0,0 +1,12 @@
+// Tests the `"rustc-invalid"` ABI, which is never canonizable.
+
+#![feature(rustc_attrs)]
+
+const extern "rust-invalid" fn foo() {
+    //~^ ERROR "rust-invalid" is not a supported ABI for the current target
+    panic!()
+}
+
+fn main() {
+    foo();
+}
diff --git a/tests/ui/abi/invalid-call-abi.stderr b/tests/ui/abi/invalid-call-abi.stderr
new file mode 100644
index 00000000000..c4a90158dcf
--- /dev/null
+++ b/tests/ui/abi/invalid-call-abi.stderr
@@ -0,0 +1,9 @@
+error[E0570]: "rust-invalid" is not a supported ABI for the current target
+  --> $DIR/invalid-call-abi.rs:5:14
+   |
+LL | const extern "rust-invalid" fn foo() {
+   |              ^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/unsupported-abi-transmute.rs b/tests/ui/abi/unsupported-abi-transmute.rs
new file mode 100644
index 00000000000..42aa180e1fd
--- /dev/null
+++ b/tests/ui/abi/unsupported-abi-transmute.rs
@@ -0,0 +1,12 @@
+// Check we error before unsupported ABIs reach codegen stages.
+
+//@ edition: 2018
+//@ compile-flags: --crate-type=lib
+#![feature(rustc_attrs)]
+
+use core::mem;
+
+fn anything() {
+    let a = unsafe { mem::transmute::<usize, extern "rust-invalid" fn(i32)>(4) }(2);
+    //~^ ERROR: is not a supported ABI for the current target [E0570]
+}
diff --git a/tests/ui/abi/unsupported-abi-transmute.stderr b/tests/ui/abi/unsupported-abi-transmute.stderr
new file mode 100644
index 00000000000..f1d202b1a1c
--- /dev/null
+++ b/tests/ui/abi/unsupported-abi-transmute.stderr
@@ -0,0 +1,9 @@
+error[E0570]: "rust-invalid" is not a supported ABI for the current target
+  --> $DIR/unsupported-abi-transmute.rs:10:53
+   |
+LL |     let a = unsafe { mem::transmute::<usize, extern "rust-invalid" fn(i32)>(4) }(2);
+   |                                                     ^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/unsupported-in-impls.rs b/tests/ui/abi/unsupported-in-impls.rs
new file mode 100644
index 00000000000..71797954865
--- /dev/null
+++ b/tests/ui/abi/unsupported-in-impls.rs
@@ -0,0 +1,36 @@
+// Test for https://github.com/rust-lang/rust/issues/86232
+// Due to AST-to-HIR lowering nuances, we used to allow unsupported ABIs to "leak" into the HIR
+// without being checked, as we would check after generating the ExternAbi.
+// Checking afterwards only works if we examine every HIR construct that contains an ExternAbi,
+// and those may be very different in HIR, even if they read the same in source.
+// This made it very easy to make mistakes.
+//
+// Here we test that an unsupported ABI in various impl-related positions will be rejected,
+// both in the original declarations and the actual implementations.
+
+#![feature(rustc_attrs)]
+//@ compile-flags: --crate-type lib
+
+pub struct FnPtrBearer {
+    pub ptr: extern "rust-invalid" fn(),
+    //~^ ERROR: is not a supported ABI
+}
+
+impl FnPtrBearer {
+    pub extern "rust-invalid" fn inherent_fn(self) {
+        //~^ ERROR: is not a supported ABI
+        (self.ptr)()
+    }
+}
+
+pub trait Trait {
+    extern "rust-invalid" fn trait_fn(self);
+    //~^ ERROR: is not a supported ABI
+}
+
+impl Trait for FnPtrBearer {
+    extern "rust-invalid" fn trait_fn(self) {
+        //~^ ERROR: is not a supported ABI
+        self.inherent_fn()
+    }
+}
diff --git a/tests/ui/abi/unsupported-in-impls.stderr b/tests/ui/abi/unsupported-in-impls.stderr
new file mode 100644
index 00000000000..d7a188f8a04
--- /dev/null
+++ b/tests/ui/abi/unsupported-in-impls.stderr
@@ -0,0 +1,27 @@
+error[E0570]: "rust-invalid" is not a supported ABI for the current target
+  --> $DIR/unsupported-in-impls.rs:15:21
+   |
+LL |     pub ptr: extern "rust-invalid" fn(),
+   |                     ^^^^^^^^^^^^^^
+
+error[E0570]: "rust-invalid" is not a supported ABI for the current target
+  --> $DIR/unsupported-in-impls.rs:20:16
+   |
+LL |     pub extern "rust-invalid" fn inherent_fn(self) {
+   |                ^^^^^^^^^^^^^^
+
+error[E0570]: "rust-invalid" is not a supported ABI for the current target
+  --> $DIR/unsupported-in-impls.rs:27:12
+   |
+LL |     extern "rust-invalid" fn trait_fn(self);
+   |            ^^^^^^^^^^^^^^
+
+error[E0570]: "rust-invalid" is not a supported ABI for the current target
+  --> $DIR/unsupported-in-impls.rs:32:12
+   |
+LL |     extern "rust-invalid" fn trait_fn(self) {
+   |            ^^^^^^^^^^^^^^
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/unsupported-varargs-fnptr.rs b/tests/ui/abi/unsupported-varargs-fnptr.rs
new file mode 100644
index 00000000000..1d23916d039
--- /dev/null
+++ b/tests/ui/abi/unsupported-varargs-fnptr.rs
@@ -0,0 +1,19 @@
+// FIXME(workingjubilee): add revisions and generalize to other platform-specific varargs ABIs,
+// preferably after the only-arch directive is enhanced with an "or pattern" syntax
+// NOTE: This deliberately tests an ABI that supports varargs, so no `extern "rust-invalid"`
+//@ only-x86_64
+
+// We have to use this flag to force ABI computation of an invalid ABI
+//@ compile-flags: -Clink-dead-code
+
+#![feature(extended_varargs_abi_support)]
+
+// sometimes fn ptrs with varargs make layout and ABI computation ICE
+// as found in https://github.com/rust-lang/rust/issues/142107
+
+fn aapcs(f: extern "aapcs" fn(usize, ...)) {
+//~^ ERROR [E0570]
+// Note we DO NOT have to actually make a call to trigger the ICE!
+}
+
+fn main() {}
diff --git a/tests/ui/abi/unsupported-varargs-fnptr.stderr b/tests/ui/abi/unsupported-varargs-fnptr.stderr
new file mode 100644
index 00000000000..238f2b31330
--- /dev/null
+++ b/tests/ui/abi/unsupported-varargs-fnptr.stderr
@@ -0,0 +1,9 @@
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported-varargs-fnptr.rs:14:20
+   |
+LL | fn aapcs(f: extern "aapcs" fn(usize, ...)) {
+   |                    ^^^^^^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0570`.
diff --git a/tests/ui/abi/unsupported.aarch64.stderr b/tests/ui/abi/unsupported.aarch64.stderr
index 4721c26026d..61d07f29fd7 100644
--- a/tests/ui/abi/unsupported.aarch64.stderr
+++ b/tests/ui/abi/unsupported.aarch64.stderr
@@ -1,403 +1,202 @@
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38:15
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:36:8
    |
-LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "ptx-kernel" fn ptx() {}
+   |        ^^^^^^^^^^^^
+
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:38:22
    |
-   = 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
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |                      ^^^^^^^^^^^^
 
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:43:1
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:42:8
    |
 LL | extern "ptx-kernel" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^
 
-warning: the calling convention "aapcs" is not supported on this target
-  --> $DIR/unsupported.rs:50:17
+error[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:44:8
    |
-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>
+LL | extern "gpu-kernel" fn gpu() {}
+   |        ^^^^^^^^^^^^
 
-error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:55:1
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:47:8
    |
-LL | extern "aapcs" {}
-   | ^^^^^^^^^^^^^^^^^
+LL | extern "aapcs" fn aapcs() {}
+   |        ^^^^^^^
 
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60:18
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:49:24
    |
-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>
+LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
+   |                        ^^^^^^^
 
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:65:1
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:53:8
    |
-LL | extern "msp430-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "aapcs" {}
+   |        ^^^^^^^
 
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70:15
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:56:8
    |
-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>
+LL | extern "msp430-interrupt" {}
+   |        ^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:75:1
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:59:8
    |
 LL | extern "avr-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-warning: the calling convention "riscv-interrupt-m" is not supported on this target
-  --> $DIR/unsupported.rs:80: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:85:1
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:62:8
    |
 LL | extern "riscv-interrupt-m" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^^^^^
 
-warning: the calling convention "x86-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:90:15
-   |
-LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+error[E0570]: "x86-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:65:8
    |
-   = 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>
+LL | extern "x86-interrupt" {}
+   |        ^^^^^^^^^^^^^^^
 
-error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:95:1
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:68:8
    |
-LL | extern "x86-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "thiscall" fn thiscall() {}
+   |        ^^^^^^^^^^
 
-warning: the calling convention "thiscall" is not supported on this target
-  --> $DIR/unsupported.rs:100:20
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:70:27
    |
 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:105:1
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:74:8
    |
 LL | extern "thiscall" {}
-   | ^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^
+
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:77:8
+   |
+LL | extern "stdcall" fn stdcall() {}
+   |        ^^^^^^^^^
+   |
+   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-warning: the calling convention "stdcall" is not supported on this target
-  --> $DIR/unsupported.rs:112:19
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:81:26
    |
 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>
+   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-error[E0570]: `"stdcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:119:1
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:87:8
    |
 LL | extern "stdcall" {}
-   | ^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^
    |
    = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:123:1
+error[E0570]: "stdcall-unwind" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:91:8
    |
 LL | extern "stdcall-unwind" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^^
    |
    = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:131:17
-   |
-LL | fn cdecl_ptr(f: extern "cdecl" 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
-   = help: use `extern "C"` instead
-   = note: `#[warn(unsupported_calling_conventions)]` on by default
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:136:1
+error[E0570]: "vectorcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:111:8
    |
-LL | extern "cdecl" {}
-   | ^^^^^^^^^^^^^^^^^
-   |
-   = 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
-   = help: use `extern "C"` instead
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:139:1
-   |
-LL | extern "cdecl-unwind" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
-   = help: use `extern "C-unwind"` instead
+LL | extern "vectorcall" fn vectorcall() {}
+   |        ^^^^^^^^^^^^
 
-warning: the calling convention "vectorcall" is not supported on this target
-  --> $DIR/unsupported.rs:145:22
+error[E0570]: "vectorcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:113:29
    |
 LL | fn vectorcall_ptr(f: extern "vectorcall" 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]: `"vectorcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:150:1
+error[E0570]: "vectorcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:117:8
    |
 LL | extern "vectorcall" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^
 
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153:21
-   |
-LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:120:28
    |
-   = 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>
+LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) {
+   |                            ^^^^^^^^^^^^^^^^^^^^^
 
-warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
-  --> $DIR/unsupported.rs:161:22
-   |
-LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:125:8
    |
-   = 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>
+LL | extern "cmse-nonsecure-entry" fn cmse_entry() {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:166:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:127:29
    |
-LL | extern "C-cmse-nonsecure-entry" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) {
+   |                             ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:131:8
    |
-LL | extern "ptx-kernel" fn ptx() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:45:1
-   |
-LL | extern "gpu-kernel" fn gpu() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:48:1
-   |
-LL | extern "aapcs" fn aapcs() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cmse-nonsecure-entry" {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:58:1
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:99:17
    |
-LL | extern "msp430-interrupt" fn msp430() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:68:1
-   |
-LL | extern "avr-interrupt" fn avr() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:78:1
-   |
-LL | extern "riscv-interrupt-m" fn riscv() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:88:1
-   |
-LL | extern "x86-interrupt" fn x86() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"thiscall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:98:1
-   |
-LL | extern "thiscall" fn thiscall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"stdcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:108:1
-   |
-LL | extern "stdcall" fn stdcall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:128:1
-   |
-LL | extern "cdecl" fn cdecl() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn cdecl_ptr(f: extern "cdecl" 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: use `extern "C"` instead
+   = note: `#[warn(unsupported_calling_conventions)]` on by default
 
-error[E0570]: `"vectorcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:143:1
-   |
-LL | extern "vectorcall" fn vectorcall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:159:1
-   |
-LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 22 previous errors; 15 warnings emitted
-
-For more information about this error, try `rustc --explain E0570`.
-Future incompatibility report: Future breakage diagnostic:
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38: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
-
-Future breakage diagnostic:
-warning: the calling convention "aapcs" is not supported on this target
-  --> $DIR/unsupported.rs:50: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "riscv-interrupt-m" is not supported on this target
-  --> $DIR/unsupported.rs:80: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "x86-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:90: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "thiscall" is not supported on this target
-  --> $DIR/unsupported.rs:100: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "stdcall" is not supported on this target
-  --> $DIR/unsupported.rs:112:19
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:104:1
    |
-LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
-   |                   ^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cdecl" {}
+   | ^^^^^^^^^^^^^^^^^
    |
    = 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
+   = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
+   = help: use `extern "C"` instead
 
-Future breakage diagnostic:
-warning: the calling convention "vectorcall" is not supported on this target
-  --> $DIR/unsupported.rs:145:22
+warning: "cdecl-unwind" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:107:1
    |
-LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cdecl-unwind" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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
+   = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
+   = help: use `extern "C-unwind"` instead
 
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153:21
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:96:1
    |
-LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cdecl" fn cdecl() {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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
+   = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
+   = help: use `extern "C"` instead
 
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
-  --> $DIR/unsupported.rs:161: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
+error: aborting due to 25 previous errors; 4 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 ed9cd2ab2c5..37b6e2316b0 100644
--- a/tests/ui/abi/unsupported.arm.stderr
+++ b/tests/ui/abi/unsupported.arm.stderr
@@ -1,371 +1,184 @@
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38:15
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:36:8
    |
-LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "ptx-kernel" fn ptx() {}
+   |        ^^^^^^^^^^^^
+
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:38:22
    |
-   = 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
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |                      ^^^^^^^^^^^^
 
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:43:1
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:42:8
    |
 LL | extern "ptx-kernel" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^
 
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60:18
+error[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:44:8
    |
-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>
+LL | extern "gpu-kernel" fn gpu() {}
+   |        ^^^^^^^^^^^^
 
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:65:1
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:56:8
    |
 LL | extern "msp430-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70: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:75:1
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:59:8
    |
 LL | extern "avr-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^
 
-warning: the calling convention "riscv-interrupt-m" is not supported on this target
-  --> $DIR/unsupported.rs:80: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:85:1
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:62:8
    |
 LL | extern "riscv-interrupt-m" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^^^^^
 
-warning: the calling convention "x86-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:90:15
-   |
-LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+error[E0570]: "x86-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:65:8
    |
-   = 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>
+LL | extern "x86-interrupt" {}
+   |        ^^^^^^^^^^^^^^^
 
-error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:95:1
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:68:8
    |
-LL | extern "x86-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "thiscall" fn thiscall() {}
+   |        ^^^^^^^^^^
 
-warning: the calling convention "thiscall" is not supported on this target
-  --> $DIR/unsupported.rs:100:20
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:70:27
    |
 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:105:1
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:74:8
    |
 LL | extern "thiscall" {}
-   | ^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^
 
-warning: the calling convention "stdcall" is not supported on this target
-  --> $DIR/unsupported.rs:112:19
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:77:8
+   |
+LL | extern "stdcall" fn stdcall() {}
+   |        ^^^^^^^^^
+   |
+   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
+
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:81:26
    |
 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>
+   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-error[E0570]: `"stdcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:119:1
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:87:8
    |
 LL | extern "stdcall" {}
-   | ^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^
    |
    = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:123:1
+error[E0570]: "stdcall-unwind" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:91:8
    |
 LL | extern "stdcall-unwind" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^^
    |
    = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:131:17
-   |
-LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
-   |                 ^^^^^^^^^^^^^^^^^^^
+error[E0570]: "vectorcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:111:8
    |
-   = 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
-   = help: use `extern "C"` instead
-   = note: `#[warn(unsupported_calling_conventions)]` on by default
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:136:1
-   |
-LL | extern "cdecl" {}
-   | ^^^^^^^^^^^^^^^^^
-   |
-   = 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
-   = help: use `extern "C"` instead
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:139:1
-   |
-LL | extern "cdecl-unwind" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
-   = help: use `extern "C-unwind"` instead
+LL | extern "vectorcall" fn vectorcall() {}
+   |        ^^^^^^^^^^^^
 
-warning: the calling convention "vectorcall" is not supported on this target
-  --> $DIR/unsupported.rs:145:22
+error[E0570]: "vectorcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:113:29
    |
 LL | fn vectorcall_ptr(f: extern "vectorcall" 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]: `"vectorcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:150:1
+error[E0570]: "vectorcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:117:8
    |
 LL | extern "vectorcall" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^
-
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153: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:161: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:166:1
-   |
-LL | extern "C-cmse-nonsecure-entry" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
-   |
-LL | extern "ptx-kernel" fn ptx() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:45:1
-   |
-LL | extern "gpu-kernel" fn gpu() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:58:1
-   |
-LL | extern "msp430-interrupt" fn msp430() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:68:1
-   |
-LL | extern "avr-interrupt" fn avr() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^
 
-error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:78:1
+error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:120:28
    |
-LL | extern "riscv-interrupt-m" fn riscv() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) {
+   |                            ^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:88:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:125:8
    |
-LL | extern "x86-interrupt" fn x86() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cmse-nonsecure-entry" fn cmse_entry() {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"thiscall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:98:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:127:29
    |
-LL | extern "thiscall" fn thiscall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) {
+   |                             ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"stdcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:108:1
-   |
-LL | extern "stdcall" fn stdcall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:131:8
    |
-   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
+LL | extern "cmse-nonsecure-entry" {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:128:1
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:99:17
    |
-LL | extern "cdecl" fn cdecl() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn cdecl_ptr(f: extern "cdecl" 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: use `extern "C"` instead
+   = note: `#[warn(unsupported_calling_conventions)]` on by default
 
-error[E0570]: `"vectorcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:143:1
-   |
-LL | extern "vectorcall" fn vectorcall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:159:1
-   |
-LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 20 previous errors; 14 warnings emitted
-
-For more information about this error, try `rustc --explain E0570`.
-Future incompatibility report: Future breakage diagnostic:
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38: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
-
-Future breakage diagnostic:
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "riscv-interrupt-m" is not supported on this target
-  --> $DIR/unsupported.rs:80: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "x86-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:90: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "thiscall" is not supported on this target
-  --> $DIR/unsupported.rs:100: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "stdcall" is not supported on this target
-  --> $DIR/unsupported.rs:112:19
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:104:1
    |
-LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
-   |                   ^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cdecl" {}
+   | ^^^^^^^^^^^^^^^^^
    |
    = 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
+   = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
+   = help: use `extern "C"` instead
 
-Future breakage diagnostic:
-warning: the calling convention "vectorcall" is not supported on this target
-  --> $DIR/unsupported.rs:145:22
+warning: "cdecl-unwind" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:107:1
    |
-LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cdecl-unwind" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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
+   = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
+   = help: use `extern "C-unwind"` instead
 
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153:21
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:96:1
    |
-LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cdecl" fn cdecl() {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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
+   = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
+   = help: use `extern "C"` instead
 
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
-  --> $DIR/unsupported.rs:161: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
+error: aborting due to 22 previous errors; 4 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 4d903b435d8..8478c481941 100644
--- a/tests/ui/abi/unsupported.i686.stderr
+++ b/tests/ui/abi/unsupported.i686.stderr
@@ -1,222 +1,87 @@
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38:15
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:36:8
    |
-LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "ptx-kernel" fn ptx() {}
+   |        ^^^^^^^^^^^^
+
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:38:22
    |
-   = 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
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |                      ^^^^^^^^^^^^
 
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:43:1
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:42:8
    |
 LL | extern "ptx-kernel" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^
 
-warning: the calling convention "aapcs" is not supported on this target
-  --> $DIR/unsupported.rs:50:17
+error[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:44:8
    |
-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>
+LL | extern "gpu-kernel" fn gpu() {}
+   |        ^^^^^^^^^^^^
 
-error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:55:1
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:47:8
    |
-LL | extern "aapcs" {}
-   | ^^^^^^^^^^^^^^^^^
+LL | extern "aapcs" fn aapcs() {}
+   |        ^^^^^^^
 
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60:18
-   |
-LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:49:24
    |
-   = 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>
+LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
+   |                        ^^^^^^^
 
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:65:1
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:53:8
    |
-LL | extern "msp430-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "aapcs" {}
+   |        ^^^^^^^
 
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70:15
-   |
-LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:56:8
    |
-   = 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>
+LL | extern "msp430-interrupt" {}
+   |        ^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:75:1
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:59:8
    |
 LL | extern "avr-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^
 
-warning: the calling convention "riscv-interrupt-m" is not supported on this target
-  --> $DIR/unsupported.rs:80: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:85:1
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:62:8
    |
 LL | extern "riscv-interrupt-m" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153: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:161: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:166:1
-   |
-LL | extern "C-cmse-nonsecure-entry" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
-   |
-LL | extern "ptx-kernel" fn ptx() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:45:1
+error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:120:28
    |
-LL | extern "gpu-kernel" fn gpu() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:48:1
-   |
-LL | extern "aapcs" fn aapcs() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) {
+   |                            ^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:58:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:125:8
    |
-LL | extern "msp430-interrupt" fn msp430() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cmse-nonsecure-entry" fn cmse_entry() {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:68:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:127:29
    |
-LL | extern "avr-interrupt" fn avr() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) {
+   |                             ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:78:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:131:8
    |
-LL | extern "riscv-interrupt-m" fn riscv() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cmse-nonsecure-entry" {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:159:1
-   |
-LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 13 previous errors; 7 warnings emitted
+error: aborting due to 14 previous errors
 
 For more information about this error, try `rustc --explain E0570`.
-Future incompatibility report: Future breakage diagnostic:
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38: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
-
-Future breakage diagnostic:
-warning: the calling convention "aapcs" is not supported on this target
-  --> $DIR/unsupported.rs:50: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "riscv-interrupt-m" is not supported on this target
-  --> $DIR/unsupported.rs:80: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
-  --> $DIR/unsupported.rs:161: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
diff --git a/tests/ui/abi/unsupported.riscv32.stderr b/tests/ui/abi/unsupported.riscv32.stderr
index 9e75dfafca0..d7eb222eb76 100644
--- a/tests/ui/abi/unsupported.riscv32.stderr
+++ b/tests/ui/abi/unsupported.riscv32.stderr
@@ -1,371 +1,196 @@
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38:15
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:36:8
    |
-LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "ptx-kernel" fn ptx() {}
+   |        ^^^^^^^^^^^^
+
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:38:22
    |
-   = 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
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |                      ^^^^^^^^^^^^
 
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:43:1
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:42:8
    |
 LL | extern "ptx-kernel" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^
 
-warning: the calling convention "aapcs" is not supported on this target
-  --> $DIR/unsupported.rs:50:17
+error[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:44:8
    |
-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>
+LL | extern "gpu-kernel" fn gpu() {}
+   |        ^^^^^^^^^^^^
 
-error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:55:1
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:47:8
    |
-LL | extern "aapcs" {}
-   | ^^^^^^^^^^^^^^^^^
+LL | extern "aapcs" fn aapcs() {}
+   |        ^^^^^^^
 
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60:18
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:49:24
    |
-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>
+LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
+   |                        ^^^^^^^
 
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:65:1
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:53:8
    |
-LL | extern "msp430-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "aapcs" {}
+   |        ^^^^^^^
 
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70:15
-   |
-LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:56:8
    |
-   = 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>
+LL | extern "msp430-interrupt" {}
+   |        ^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:75:1
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:59:8
    |
 LL | extern "avr-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^
 
-warning: the calling convention "x86-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:90:15
+error[E0570]: "x86-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:65:8
    |
-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>
+LL | extern "x86-interrupt" {}
+   |        ^^^^^^^^^^^^^^^
 
-error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:95:1
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:68:8
    |
-LL | extern "x86-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "thiscall" fn thiscall() {}
+   |        ^^^^^^^^^^
 
-warning: the calling convention "thiscall" is not supported on this target
-  --> $DIR/unsupported.rs:100:20
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:70:27
    |
 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:105:1
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:74:8
    |
 LL | extern "thiscall" {}
-   | ^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^
 
-warning: the calling convention "stdcall" is not supported on this target
-  --> $DIR/unsupported.rs:112:19
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:77:8
+   |
+LL | extern "stdcall" fn stdcall() {}
+   |        ^^^^^^^^^
+   |
+   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
+
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:81:26
    |
 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>
+   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-error[E0570]: `"stdcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:119:1
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:87:8
    |
 LL | extern "stdcall" {}
-   | ^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^
    |
    = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:123:1
+error[E0570]: "stdcall-unwind" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:91:8
    |
 LL | extern "stdcall-unwind" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^^
    |
    = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:131:17
+error[E0570]: "vectorcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:111:8
    |
-LL | fn cdecl_ptr(f: extern "cdecl" 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
-   = help: use `extern "C"` instead
-   = note: `#[warn(unsupported_calling_conventions)]` on by default
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:136:1
-   |
-LL | extern "cdecl" {}
-   | ^^^^^^^^^^^^^^^^^
-   |
-   = 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
-   = help: use `extern "C"` instead
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:139:1
-   |
-LL | extern "cdecl-unwind" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
-   = help: use `extern "C-unwind"` instead
+LL | extern "vectorcall" fn vectorcall() {}
+   |        ^^^^^^^^^^^^
 
-warning: the calling convention "vectorcall" is not supported on this target
-  --> $DIR/unsupported.rs:145:22
+error[E0570]: "vectorcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:113:29
    |
 LL | fn vectorcall_ptr(f: extern "vectorcall" 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]: `"vectorcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:150:1
+error[E0570]: "vectorcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:117:8
    |
 LL | extern "vectorcall" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^
-
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153: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:161:22
-   |
-LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:120:28
    |
-   = 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>
+LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) {
+   |                            ^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:166:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:125:8
    |
-LL | extern "C-cmse-nonsecure-entry" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cmse-nonsecure-entry" fn cmse_entry() {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:127:29
    |
-LL | extern "ptx-kernel" fn ptx() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) {
+   |                             ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:45:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:131:8
    |
-LL | extern "gpu-kernel" fn gpu() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cmse-nonsecure-entry" {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:48:1
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:99:17
    |
-LL | extern "aapcs" fn aapcs() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:58:1
-   |
-LL | extern "msp430-interrupt" fn msp430() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:68:1
-   |
-LL | extern "avr-interrupt" fn avr() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:88:1
-   |
-LL | extern "x86-interrupt" fn x86() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"thiscall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:98:1
-   |
-LL | extern "thiscall" fn thiscall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"stdcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:108:1
-   |
-LL | extern "stdcall" fn stdcall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:128:1
-   |
-LL | extern "cdecl" fn cdecl() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn cdecl_ptr(f: extern "cdecl" 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: use `extern "C"` instead
+   = note: `#[warn(unsupported_calling_conventions)]` on by default
 
-error[E0570]: `"vectorcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:143:1
-   |
-LL | extern "vectorcall" fn vectorcall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:159:1
-   |
-LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 20 previous errors; 14 warnings emitted
-
-For more information about this error, try `rustc --explain E0570`.
-Future incompatibility report: Future breakage diagnostic:
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38: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
-
-Future breakage diagnostic:
-warning: the calling convention "aapcs" is not supported on this target
-  --> $DIR/unsupported.rs:50: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "x86-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:90: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "thiscall" is not supported on this target
-  --> $DIR/unsupported.rs:100: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "stdcall" is not supported on this target
-  --> $DIR/unsupported.rs:112:19
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:104:1
    |
-LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
-   |                   ^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cdecl" {}
+   | ^^^^^^^^^^^^^^^^^
    |
    = 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
+   = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
+   = help: use `extern "C"` instead
 
-Future breakage diagnostic:
-warning: the calling convention "vectorcall" is not supported on this target
-  --> $DIR/unsupported.rs:145:22
+warning: "cdecl-unwind" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:107:1
    |
-LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cdecl-unwind" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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
+   = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
+   = help: use `extern "C-unwind"` instead
 
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153:21
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:96:1
    |
-LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cdecl" fn cdecl() {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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
+   = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
+   = help: use `extern "C"` instead
 
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
-  --> $DIR/unsupported.rs:161: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
+error: aborting due to 24 previous errors; 4 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 9e75dfafca0..d7eb222eb76 100644
--- a/tests/ui/abi/unsupported.riscv64.stderr
+++ b/tests/ui/abi/unsupported.riscv64.stderr
@@ -1,371 +1,196 @@
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38:15
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:36:8
    |
-LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "ptx-kernel" fn ptx() {}
+   |        ^^^^^^^^^^^^
+
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:38:22
    |
-   = 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
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |                      ^^^^^^^^^^^^
 
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:43:1
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:42:8
    |
 LL | extern "ptx-kernel" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^
 
-warning: the calling convention "aapcs" is not supported on this target
-  --> $DIR/unsupported.rs:50:17
+error[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:44:8
    |
-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>
+LL | extern "gpu-kernel" fn gpu() {}
+   |        ^^^^^^^^^^^^
 
-error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:55:1
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:47:8
    |
-LL | extern "aapcs" {}
-   | ^^^^^^^^^^^^^^^^^
+LL | extern "aapcs" fn aapcs() {}
+   |        ^^^^^^^
 
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60:18
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:49:24
    |
-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>
+LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
+   |                        ^^^^^^^
 
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:65:1
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:53:8
    |
-LL | extern "msp430-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "aapcs" {}
+   |        ^^^^^^^
 
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70:15
-   |
-LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:56:8
    |
-   = 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>
+LL | extern "msp430-interrupt" {}
+   |        ^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:75:1
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:59:8
    |
 LL | extern "avr-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^
 
-warning: the calling convention "x86-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:90:15
+error[E0570]: "x86-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:65:8
    |
-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>
+LL | extern "x86-interrupt" {}
+   |        ^^^^^^^^^^^^^^^
 
-error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:95:1
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:68:8
    |
-LL | extern "x86-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "thiscall" fn thiscall() {}
+   |        ^^^^^^^^^^
 
-warning: the calling convention "thiscall" is not supported on this target
-  --> $DIR/unsupported.rs:100:20
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:70:27
    |
 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:105:1
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:74:8
    |
 LL | extern "thiscall" {}
-   | ^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^
 
-warning: the calling convention "stdcall" is not supported on this target
-  --> $DIR/unsupported.rs:112:19
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:77:8
+   |
+LL | extern "stdcall" fn stdcall() {}
+   |        ^^^^^^^^^
+   |
+   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
+
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:81:26
    |
 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>
+   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-error[E0570]: `"stdcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:119:1
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:87:8
    |
 LL | extern "stdcall" {}
-   | ^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^
    |
    = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:123:1
+error[E0570]: "stdcall-unwind" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:91:8
    |
 LL | extern "stdcall-unwind" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^^
    |
    = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:131:17
+error[E0570]: "vectorcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:111:8
    |
-LL | fn cdecl_ptr(f: extern "cdecl" 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
-   = help: use `extern "C"` instead
-   = note: `#[warn(unsupported_calling_conventions)]` on by default
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:136:1
-   |
-LL | extern "cdecl" {}
-   | ^^^^^^^^^^^^^^^^^
-   |
-   = 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
-   = help: use `extern "C"` instead
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:139:1
-   |
-LL | extern "cdecl-unwind" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
-   = help: use `extern "C-unwind"` instead
+LL | extern "vectorcall" fn vectorcall() {}
+   |        ^^^^^^^^^^^^
 
-warning: the calling convention "vectorcall" is not supported on this target
-  --> $DIR/unsupported.rs:145:22
+error[E0570]: "vectorcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:113:29
    |
 LL | fn vectorcall_ptr(f: extern "vectorcall" 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]: `"vectorcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:150:1
+error[E0570]: "vectorcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:117:8
    |
 LL | extern "vectorcall" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^
-
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153: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:161:22
-   |
-LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:120:28
    |
-   = 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>
+LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) {
+   |                            ^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:166:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:125:8
    |
-LL | extern "C-cmse-nonsecure-entry" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cmse-nonsecure-entry" fn cmse_entry() {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:127:29
    |
-LL | extern "ptx-kernel" fn ptx() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) {
+   |                             ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:45:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:131:8
    |
-LL | extern "gpu-kernel" fn gpu() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cmse-nonsecure-entry" {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:48:1
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:99:17
    |
-LL | extern "aapcs" fn aapcs() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:58:1
-   |
-LL | extern "msp430-interrupt" fn msp430() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:68:1
-   |
-LL | extern "avr-interrupt" fn avr() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:88:1
-   |
-LL | extern "x86-interrupt" fn x86() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"thiscall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:98:1
-   |
-LL | extern "thiscall" fn thiscall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"stdcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:108:1
-   |
-LL | extern "stdcall" fn stdcall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:128:1
-   |
-LL | extern "cdecl" fn cdecl() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn cdecl_ptr(f: extern "cdecl" 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 #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: use `extern "C"` instead
+   = note: `#[warn(unsupported_calling_conventions)]` on by default
 
-error[E0570]: `"vectorcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:143:1
-   |
-LL | extern "vectorcall" fn vectorcall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:159:1
-   |
-LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 20 previous errors; 14 warnings emitted
-
-For more information about this error, try `rustc --explain E0570`.
-Future incompatibility report: Future breakage diagnostic:
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38: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
-
-Future breakage diagnostic:
-warning: the calling convention "aapcs" is not supported on this target
-  --> $DIR/unsupported.rs:50: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "x86-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:90: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "thiscall" is not supported on this target
-  --> $DIR/unsupported.rs:100: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "stdcall" is not supported on this target
-  --> $DIR/unsupported.rs:112:19
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:104:1
    |
-LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
-   |                   ^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cdecl" {}
+   | ^^^^^^^^^^^^^^^^^
    |
    = 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
+   = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
+   = help: use `extern "C"` instead
 
-Future breakage diagnostic:
-warning: the calling convention "vectorcall" is not supported on this target
-  --> $DIR/unsupported.rs:145:22
+warning: "cdecl-unwind" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:107:1
    |
-LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cdecl-unwind" {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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
+   = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
+   = help: use `extern "C-unwind"` instead
 
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153:21
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:96:1
    |
-LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cdecl" fn cdecl() {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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
+   = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
+   = help: use `extern "C"` instead
 
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
-  --> $DIR/unsupported.rs:161: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
+error: aborting due to 24 previous errors; 4 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 43bdfe3ea24..828fcc147a5 100644
--- a/tests/ui/abi/unsupported.rs
+++ b/tests/ui/abi/unsupported.rs
@@ -25,7 +25,7 @@
     abi_gpu_kernel,
     abi_x86_interrupt,
     abi_riscv_interrupt,
-    abi_c_cmse_nonsecure_call,
+    abi_cmse_nonsecure_call,
     abi_vectorcall,
     cmse_nonsecure_entry
 )]
@@ -36,8 +36,7 @@ use minicore::*;
 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
+//~^ ERROR is not a supported ABI
     f()
 }
 extern "ptx-kernel" {}
@@ -48,58 +47,28 @@ extern "gpu-kernel" fn gpu() {}
 extern "aapcs" fn aapcs() {}
 //[x64,x64_win,i686,aarch64,riscv32,riscv64]~^ ERROR is not a supported ABI
 fn aapcs_ptr(f: extern "aapcs" fn()) {
-    //[x64,x64_win,i686,aarch64,riscv32,riscv64]~^ WARN unsupported_fn_ptr_calling_conventions
-    //[x64,x64_win,i686,aarch64,riscv32,riscv64]~^^ WARN this was previously accepted
+    //[x64,x64_win,i686,aarch64,riscv32,riscv64]~^ ERROR is not a supported ABI
     f()
 }
 extern "aapcs" {}
 //[x64,x64_win,i686,aarch64,riscv32,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() {}
-//[x64,x64_win,i686,arm,aarch64]~^ ERROR is not a supported ABI
-fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
-    //[x64,x64_win,i686,arm,aarch64]~^ WARN unsupported_fn_ptr_calling_conventions
-    //[x64,x64_win,i686,arm,aarch64]~^^ WARN this was previously accepted
-    f()
-}
 extern "riscv-interrupt-m" {}
 //[x64,x64_win,i686,arm,aarch64]~^ ERROR is not a supported ABI
 
-extern "x86-interrupt" fn x86() {}
-//[aarch64,arm,riscv32,riscv64]~^ ERROR is not a supported ABI
-fn x86_ptr(f: extern "x86-interrupt" fn()) {
-    //[aarch64,arm,riscv32,riscv64]~^ WARN unsupported_fn_ptr_calling_conventions
-    //[aarch64,arm,riscv32,riscv64]~^^ WARN this was previously accepted
-    f()
-}
 extern "x86-interrupt" {}
 //[aarch64,arm,riscv32,riscv64]~^ ERROR is not a supported ABI
 
 extern "thiscall" fn thiscall() {}
 //[x64,x64_win,arm,aarch64,riscv32,riscv64]~^ ERROR is not a supported ABI
 fn thiscall_ptr(f: extern "thiscall" fn()) {
-    //[x64,x64_win,arm,aarch64,riscv32,riscv64]~^ WARN unsupported_fn_ptr_calling_conventions
-    //[x64,x64_win,arm,aarch64,riscv32,riscv64]~^^ WARN this was previously accepted
+    //[x64,x64_win,arm,aarch64,riscv32,riscv64]~^ ERROR is not a supported ABI
     f()
 }
 extern "thiscall" {}
@@ -110,10 +79,9 @@ extern "stdcall" fn stdcall() {}
 //[x64_win]~^^ WARN unsupported_calling_conventions
 //[x64_win]~^^^ WARN this was previously accepted
 fn stdcall_ptr(f: extern "stdcall" fn()) {
-    //[x64_win]~^ WARN unsupported_calling_conventions
-    //[x64_win]~| WARN this was previously accepted
-    //[x64,arm,aarch64,riscv32,riscv64]~^^^ WARN unsupported_fn_ptr_calling_conventions
-    //[x64,arm,aarch64,riscv32,riscv64]~| WARN this was previously accepted
+    //[x64,arm,aarch64,riscv32,riscv64]~^ ERROR is not a supported ABI
+    //[x64_win]~^^ WARN unsupported_calling_conventions
+    //[x64_win]~|  WARN this was previously accepted
     f()
 }
 extern "stdcall" {}
@@ -130,7 +98,7 @@ extern "cdecl" fn cdecl() {}
 //[x64,x64_win,arm,aarch64,riscv32,riscv64]~^^ WARN this was previously accepted
 fn cdecl_ptr(f: extern "cdecl" fn()) {
     //[x64,x64_win,arm,aarch64,riscv32,riscv64]~^ WARN unsupported_calling_conventions
-    //[x64,x64_win,arm,aarch64,riscv32,riscv64]~^^ WARN this was previously accepted
+    //[x64,x64_win,arm,aarch64,riscv32,riscv64]~| WARN this was previously accepted
     f()
 }
 extern "cdecl" {}
@@ -143,31 +111,28 @@ extern "cdecl-unwind" {}
 extern "vectorcall" fn vectorcall() {}
 //[arm,aarch64,riscv32,riscv64]~^ ERROR is not a supported ABI
 fn vectorcall_ptr(f: extern "vectorcall" fn()) {
-    //[arm,aarch64,riscv32,riscv64]~^ WARN unsupported_fn_ptr_calling_conventions
-    //[arm,aarch64,riscv32,riscv64]~^^ WARN this was previously accepted
+    //[arm,aarch64,riscv32,riscv64]~^ ERROR is not a supported ABI
     f()
 }
 extern "vectorcall" {}
 //[arm,aarch64,riscv32,riscv64]~^ ERROR is not a supported ABI
 
-fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
-    //~^ WARN unsupported_fn_ptr_calling_conventions
-    //~^^ WARN this was previously accepted
+fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) {
+//~^ ERROR is not a supported ABI
     f()
 }
 
-extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
+extern "cmse-nonsecure-entry" fn cmse_entry() {}
+//~^ ERROR is not a supported ABI
+fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) {
 //~^ 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" {}
+extern "cmse-nonsecure-entry" {}
 //~^ ERROR is not a supported ABI
 
 #[cfg(windows)]
 #[link(name = "foo", kind = "raw-dylib")]
 extern "cdecl" {}
-//[x64_win]~^ WARN use of calling convention not supported on this target
+//[x64_win]~^ WARN unsupported_calling_conventions
 //[x64_win]~^^ WARN this was previously accepted
diff --git a/tests/ui/abi/unsupported.x64.stderr b/tests/ui/abi/unsupported.x64.stderr
index 5b55e5707fa..cf04680b587 100644
--- a/tests/ui/abi/unsupported.x64.stderr
+++ b/tests/ui/abi/unsupported.x64.stderr
@@ -1,121 +1,139 @@
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38:15
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:36:8
    |
-LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "ptx-kernel" fn ptx() {}
+   |        ^^^^^^^^^^^^
+
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:38:22
    |
-   = 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
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |                      ^^^^^^^^^^^^
 
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:43:1
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:42:8
    |
 LL | extern "ptx-kernel" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^
 
-warning: the calling convention "aapcs" is not supported on this target
-  --> $DIR/unsupported.rs:50:17
-   |
-LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
-   |                 ^^^^^^^^^^^^^^^^^^^
+error[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:44:8
    |
-   = 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>
+LL | extern "gpu-kernel" fn gpu() {}
+   |        ^^^^^^^^^^^^
 
-error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:55:1
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:47:8
    |
-LL | extern "aapcs" {}
-   | ^^^^^^^^^^^^^^^^^
+LL | extern "aapcs" fn aapcs() {}
+   |        ^^^^^^^
 
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60:18
-   |
-LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:49:24
    |
-   = 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>
+LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
+   |                        ^^^^^^^
 
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:65:1
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:53:8
    |
-LL | extern "msp430-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "aapcs" {}
+   |        ^^^^^^^
 
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70:15
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:56:8
    |
-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>
+LL | extern "msp430-interrupt" {}
+   |        ^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:75:1
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:59:8
    |
 LL | extern "avr-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^
 
-warning: the calling convention "riscv-interrupt-m" is not supported on this target
-  --> $DIR/unsupported.rs:80:17
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:62:8
    |
-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>
+LL | extern "riscv-interrupt-m" {}
+   |        ^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:85:1
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:68:8
    |
-LL | extern "riscv-interrupt-m" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "thiscall" fn thiscall() {}
+   |        ^^^^^^^^^^
 
-warning: the calling convention "thiscall" is not supported on this target
-  --> $DIR/unsupported.rs:100:20
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:70:27
    |
 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:105:1
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:74:8
    |
 LL | extern "thiscall" {}
-   | ^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^
 
-warning: the calling convention "stdcall" is not supported on this target
-  --> $DIR/unsupported.rs:112:19
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:77:8
+   |
+LL | extern "stdcall" fn stdcall() {}
+   |        ^^^^^^^^^
+   |
+   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
+
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:81:26
    |
 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>
+   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-error[E0570]: `"stdcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:119:1
+error[E0570]: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:87:8
    |
 LL | extern "stdcall" {}
-   | ^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^
    |
    = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:123:1
+error[E0570]: "stdcall-unwind" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:91:8
    |
 LL | extern "stdcall-unwind" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^^
    |
    = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:131:17
+error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:120:28
+   |
+LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) {
+   |                            ^^^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:125:8
+   |
+LL | extern "cmse-nonsecure-entry" fn cmse_entry() {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:127:29
+   |
+LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) {
+   |                             ^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:131:8
+   |
+LL | extern "cmse-nonsecure-entry" {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:99:17
    |
 LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
    |                 ^^^^^^^^^^^^^^^^^^^
@@ -125,8 +143,8 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
    = help: use `extern "C"` instead
    = note: `#[warn(unsupported_calling_conventions)]` on by default
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:136:1
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:104:1
    |
 LL | extern "cdecl" {}
    | ^^^^^^^^^^^^^^^^^
@@ -135,8 +153,8 @@ LL | extern "cdecl" {}
    = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: use `extern "C"` instead
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:139:1
+warning: "cdecl-unwind" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:107:1
    |
 LL | extern "cdecl-unwind" {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,82 +163,8 @@ LL | extern "cdecl-unwind" {}
    = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: use `extern "C-unwind"` instead
 
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153: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:161: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:166:1
-   |
-LL | extern "C-cmse-nonsecure-entry" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
-   |
-LL | extern "ptx-kernel" fn ptx() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:45:1
-   |
-LL | extern "gpu-kernel" fn gpu() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:48:1
-   |
-LL | extern "aapcs" fn aapcs() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:58:1
-   |
-LL | extern "msp430-interrupt" fn msp430() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:68:1
-   |
-LL | extern "avr-interrupt" fn avr() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:78:1
-   |
-LL | extern "riscv-interrupt-m" fn riscv() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"thiscall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:98:1
-   |
-LL | extern "thiscall" fn thiscall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"stdcall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:108:1
-   |
-LL | extern "stdcall" fn stdcall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:128:1
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:96:1
    |
 LL | extern "cdecl" fn cdecl() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -229,111 +173,6 @@ LL | extern "cdecl" fn cdecl() {}
    = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: use `extern "C"` instead
 
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:159:1
-   |
-LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 18 previous errors; 13 warnings emitted
+error: aborting due to 21 previous errors; 4 warnings emitted
 
 For more information about this error, try `rustc --explain E0570`.
-Future incompatibility report: Future breakage diagnostic:
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38: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
-
-Future breakage diagnostic:
-warning: the calling convention "aapcs" is not supported on this target
-  --> $DIR/unsupported.rs:50: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "riscv-interrupt-m" is not supported on this target
-  --> $DIR/unsupported.rs:80: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "thiscall" is not supported on this target
-  --> $DIR/unsupported.rs:100: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "stdcall" is not supported on this target
-  --> $DIR/unsupported.rs:112: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
-  --> $DIR/unsupported.rs:161: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
diff --git a/tests/ui/abi/unsupported.x64_win.stderr b/tests/ui/abi/unsupported.x64_win.stderr
index 93b5a272e92..d383a4df732 100644
--- a/tests/ui/abi/unsupported.x64_win.stderr
+++ b/tests/ui/abi/unsupported.x64_win.stderr
@@ -1,96 +1,107 @@
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38:15
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:36:8
    |
-LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "ptx-kernel" fn ptx() {}
+   |        ^^^^^^^^^^^^
+
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:38:22
    |
-   = 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
+LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
+   |                      ^^^^^^^^^^^^
 
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:43:1
+error[E0570]: "ptx-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:42:8
    |
 LL | extern "ptx-kernel" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^
 
-warning: the calling convention "aapcs" is not supported on this target
-  --> $DIR/unsupported.rs:50:17
+error[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:44:8
    |
-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>
+LL | extern "gpu-kernel" fn gpu() {}
+   |        ^^^^^^^^^^^^
 
-error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:55:1
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:47:8
    |
-LL | extern "aapcs" {}
-   | ^^^^^^^^^^^^^^^^^
+LL | extern "aapcs" fn aapcs() {}
+   |        ^^^^^^^
 
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60:18
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:49:24
    |
-LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
+   |                        ^^^^^^^
+
+error[E0570]: "aapcs" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:53:8
    |
-   = 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>
+LL | extern "aapcs" {}
+   |        ^^^^^^^
 
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:65:1
+error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:56:8
    |
 LL | extern "msp430-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^^^^^^^^^
 
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70:15
+error[E0570]: "avr-interrupt" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:59:8
    |
-LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "avr-interrupt" {}
+   |        ^^^^^^^^^^^^^^^
+
+error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:62:8
    |
-   = 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>
+LL | extern "riscv-interrupt-m" {}
+   |        ^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:75:1
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:68:8
    |
-LL | extern "avr-interrupt" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "thiscall" fn thiscall() {}
+   |        ^^^^^^^^^^
 
-warning: the calling convention "riscv-interrupt-m" is not supported on this target
-  --> $DIR/unsupported.rs:80:17
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:70:27
    |
-LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
+   |                           ^^^^^^^^^^
+
+error[E0570]: "thiscall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:74:8
    |
-   = 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>
+LL | extern "thiscall" {}
+   |        ^^^^^^^^^^
 
-error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:85:1
+error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:120:28
    |
-LL | extern "riscv-interrupt-m" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn cmse_call_ptr(f: extern "cmse-nonsecure-call" fn()) {
+   |                            ^^^^^^^^^^^^^^^^^^^^^
 
-warning: the calling convention "thiscall" is not supported on this target
-  --> $DIR/unsupported.rs:100:20
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:125:8
    |
-LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
-   |                    ^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "cmse-nonsecure-entry" fn cmse_entry() {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:127:29
    |
-   = 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>
+LL | fn cmse_entry_ptr(f: extern "cmse-nonsecure-entry" fn()) {
+   |                             ^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0570]: `"thiscall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:105:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:131:8
    |
-LL | extern "thiscall" {}
-   | ^^^^^^^^^^^^^^^^^^^^
+LL | extern "cmse-nonsecure-entry" {}
+   |        ^^^^^^^^^^^^^^^^^^^^^^
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:112:19
+warning: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:81:19
    |
 LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
    |                   ^^^^^^^^^^^^^^^^^^^^^
@@ -100,8 +111,8 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
    = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
    = note: `#[warn(unsupported_calling_conventions)]` on by default
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:119:1
+warning: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:87:1
    |
 LL | extern "stdcall" {}
    | ^^^^^^^^^^^^^^^^^^^
@@ -110,8 +121,8 @@ LL | extern "stdcall" {}
    = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:123:1
+warning: "stdcall-unwind" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:91:1
    |
 LL | extern "stdcall-unwind" {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -120,8 +131,8 @@ LL | extern "stdcall-unwind" {}
    = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:131:17
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:99:17
    |
 LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
    |                 ^^^^^^^^^^^^^^^^^^^
@@ -130,8 +141,8 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
    = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: use `extern "C"` instead
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:136:1
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:104:1
    |
 LL | extern "cdecl" {}
    | ^^^^^^^^^^^^^^^^^
@@ -140,8 +151,8 @@ LL | extern "cdecl" {}
    = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: use `extern "C"` instead
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:139:1
+warning: "cdecl-unwind" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:107:1
    |
 LL | extern "cdecl-unwind" {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -150,32 +161,8 @@ LL | extern "cdecl-unwind" {}
    = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: use `extern "C-unwind"` instead
 
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153: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:161: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:166:1
-   |
-LL | extern "C-cmse-nonsecure-entry" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:171:1
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:136:1
    |
 LL | extern "cdecl" {}
    | ^^^^^^^^^^^^^^^^^
@@ -184,50 +171,8 @@ LL | extern "cdecl" {}
    = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: use `extern "C"` instead
 
-error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:36:1
-   |
-LL | extern "ptx-kernel" fn ptx() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:45:1
-   |
-LL | extern "gpu-kernel" fn gpu() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"aapcs"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:48:1
-   |
-LL | extern "aapcs" fn aapcs() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:58:1
-   |
-LL | extern "msp430-interrupt" fn msp430() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:68:1
-   |
-LL | extern "avr-interrupt" fn avr() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:78:1
-   |
-LL | extern "riscv-interrupt-m" fn riscv() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"thiscall"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:98:1
-   |
-LL | extern "thiscall" fn thiscall() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:108:1
+warning: "stdcall" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:77:1
    |
 LL | extern "stdcall" fn stdcall() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -236,8 +181,8 @@ LL | extern "stdcall" fn stdcall() {}
    = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
 
-warning: use of calling convention not supported on this target
-  --> $DIR/unsupported.rs:128:1
+warning: "cdecl" is not a supported ABI for the current target
+  --> $DIR/unsupported.rs:96:1
    |
 LL | extern "cdecl" fn cdecl() {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -246,100 +191,6 @@ LL | extern "cdecl" fn cdecl() {}
    = note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
    = help: use `extern "C"` instead
 
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/unsupported.rs:159:1
-   |
-LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 15 previous errors; 17 warnings emitted
+error: aborting due to 17 previous errors; 9 warnings emitted
 
 For more information about this error, try `rustc --explain E0570`.
-Future incompatibility report: Future breakage diagnostic:
-warning: the calling convention "ptx-kernel" is not supported on this target
-  --> $DIR/unsupported.rs:38: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
-
-Future breakage diagnostic:
-warning: the calling convention "aapcs" is not supported on this target
-  --> $DIR/unsupported.rs:50: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "msp430-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:60: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "avr-interrupt" is not supported on this target
-  --> $DIR/unsupported.rs:70: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "riscv-interrupt-m" is not supported on this target
-  --> $DIR/unsupported.rs:80: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "thiscall" is not supported on this target
-  --> $DIR/unsupported.rs:100: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/unsupported.rs:153: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
-Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
-  --> $DIR/unsupported.rs:161: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>
-   = note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
-
diff --git a/tests/ui/allocator/no_std-alloc-error-handler-custom.rs b/tests/ui/allocator/no_std-alloc-error-handler-custom.rs
index 6bbfb72510d..1b0f0608fc6 100644
--- a/tests/ui/allocator/no_std-alloc-error-handler-custom.rs
+++ b/tests/ui/allocator/no_std-alloc-error-handler-custom.rs
@@ -6,13 +6,14 @@
 //@ compile-flags:-C panic=abort
 //@ aux-build:helper.rs
 
-#![feature(rustc_private, lang_items)]
+#![feature(rustc_private, lang_items, panic_unwind)]
 #![feature(alloc_error_handler)]
 #![no_std]
 #![no_main]
 
 extern crate alloc;
 extern crate libc;
+extern crate unwind; // For _Unwind_Resume
 
 // ARM targets need these symbols
 #[no_mangle]
@@ -70,7 +71,15 @@ fn panic(panic_info: &core::panic::PanicInfo) -> ! {
 // in these libraries will refer to `rust_eh_personality` if LLVM can not *prove* the contents won't
 // unwind. So, for this test case we will define the symbol.
 #[lang = "eh_personality"]
-extern "C" fn rust_eh_personality() {}
+extern "C" fn rust_eh_personality(
+    _version: i32,
+    _actions: i32,
+    _exception_class: u64,
+    _exception_object: *mut (),
+    _context: *mut (),
+) -> i32 {
+    loop {}
+}
 
 #[derive(Default, Debug)]
 struct Page(#[allow(dead_code)] [[u64; 32]; 16]);
diff --git a/tests/ui/allocator/no_std-alloc-error-handler-default.rs b/tests/ui/allocator/no_std-alloc-error-handler-default.rs
index 8bcf054ac85..51ecf1a6731 100644
--- a/tests/ui/allocator/no_std-alloc-error-handler-default.rs
+++ b/tests/ui/allocator/no_std-alloc-error-handler-default.rs
@@ -6,12 +6,13 @@
 //@ compile-flags:-C panic=abort
 //@ aux-build:helper.rs
 
-#![feature(rustc_private, lang_items)]
+#![feature(rustc_private, lang_items, panic_unwind)]
 #![no_std]
 #![no_main]
 
 extern crate alloc;
 extern crate libc;
+extern crate unwind; // For _Unwind_Resume
 
 // ARM targets need these symbols
 #[no_mangle]
@@ -57,7 +58,15 @@ fn panic(panic_info: &core::panic::PanicInfo) -> ! {
 // in these libraries will refer to `rust_eh_personality` if LLVM can not *prove* the contents won't
 // unwind. So, for this test case we will define the symbol.
 #[lang = "eh_personality"]
-extern "C" fn rust_eh_personality() {}
+extern "C" fn rust_eh_personality(
+    _version: i32,
+    _actions: i32,
+    _exception_class: u64,
+    _exception_object: *mut (),
+    _context: *mut (),
+) -> i32 {
+    loop {}
+}
 
 #[derive(Default, Debug)]
 struct Page(#[allow(dead_code)] [[u64; 32]; 16]);
diff --git a/tests/ui/argument-suggestions/issue-100154.stderr b/tests/ui/argument-suggestions/issue-100154.stderr
index 7eaebcafb59..9732beac449 100644
--- a/tests/ui/argument-suggestions/issue-100154.stderr
+++ b/tests/ui/argument-suggestions/issue-100154.stderr
@@ -17,10 +17,8 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
   --> $DIR/issue-100154.rs:4:11
    |
 LL |     foo::<()>(());
-   |           ^^ `()` cannot be formatted with the default formatter
+   |           ^^ the trait `std::fmt::Display` is not implemented for `()`
    |
-   = help: the trait `std::fmt::Display` is not implemented for `()`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `foo`
   --> $DIR/issue-100154.rs:1:16
    |
diff --git a/tests/ui/argument-suggestions/issue-100478.rs b/tests/ui/argument-suggestions/issue-100478.rs
index b0a9703112e..219870f3b23 100644
--- a/tests/ui/argument-suggestions/issue-100478.rs
+++ b/tests/ui/argument-suggestions/issue-100478.rs
@@ -32,8 +32,8 @@ fn four_shuffle(_a: T1, _b: T2, _c: T3, _d: T4) {}
 
 fn main() {
     three_diff(T2::new(0)); //~ ERROR function takes
-    four_shuffle(T3::default(), T4::default(), T1::default(), T2::default()); //~ ERROR 35:5: 35:17: arguments to this function are incorrect [E0308]
-    four_shuffle(T3::default(), T2::default(), T1::default(), T3::default()); //~ ERROR 36:5: 36:17: arguments to this function are incorrect [E0308]
+    four_shuffle(T3::default(), T4::default(), T1::default(), T2::default()); //~ ERROR arguments to this function are incorrect [E0308]
+    four_shuffle(T3::default(), T2::default(), T1::default(), T3::default()); //~ ERROR arguments to this function are incorrect [E0308]
 
     let p1 = T1::new(0);
     let p2 = Arc::new(T2::new(0));
diff --git a/tests/ui/asm/naked-functions-inline.stderr b/tests/ui/asm/naked-functions-inline.stderr
index 07d5f3bc49a..91140a301ed 100644
--- a/tests/ui/asm/naked-functions-inline.stderr
+++ b/tests/ui/asm/naked-functions-inline.stderr
@@ -1,26 +1,26 @@
 error[E0736]: attribute incompatible with `#[unsafe(naked)]`
-  --> $DIR/naked-functions-inline.rs:12:1
+  --> $DIR/naked-functions-inline.rs:12:3
    |
 LL | #[unsafe(naked)]
    | ---------------- function marked with `#[unsafe(naked)]` here
 LL | #[inline]
-   | ^^^^^^^^^ the `inline` attribute is incompatible with `#[unsafe(naked)]`
+   |   ^^^^^^ the `inline` attribute is incompatible with `#[unsafe(naked)]`
 
 error[E0736]: attribute incompatible with `#[unsafe(naked)]`
-  --> $DIR/naked-functions-inline.rs:19:1
+  --> $DIR/naked-functions-inline.rs:19:3
    |
 LL | #[unsafe(naked)]
    | ---------------- function marked with `#[unsafe(naked)]` here
 LL | #[inline(always)]
-   | ^^^^^^^^^^^^^^^^^ the `inline` attribute is incompatible with `#[unsafe(naked)]`
+   |   ^^^^^^ the `inline` attribute is incompatible with `#[unsafe(naked)]`
 
 error[E0736]: attribute incompatible with `#[unsafe(naked)]`
-  --> $DIR/naked-functions-inline.rs:26:1
+  --> $DIR/naked-functions-inline.rs:26:3
    |
 LL | #[unsafe(naked)]
    | ---------------- function marked with `#[unsafe(naked)]` here
 LL | #[inline(never)]
-   | ^^^^^^^^^^^^^^^^ the `inline` attribute is incompatible with `#[unsafe(naked)]`
+   |   ^^^^^^ the `inline` attribute is incompatible with `#[unsafe(naked)]`
 
 error[E0736]: attribute incompatible with `#[unsafe(naked)]`
   --> $DIR/naked-functions-inline.rs:33:19
@@ -28,7 +28,7 @@ error[E0736]: attribute incompatible with `#[unsafe(naked)]`
 LL | #[unsafe(naked)]
    | ---------------- function marked with `#[unsafe(naked)]` here
 LL | #[cfg_attr(all(), inline(never))]
-   |                   ^^^^^^^^^^^^^ the `inline` attribute is incompatible with `#[unsafe(naked)]`
+   |                   ^^^^^^ the `inline` attribute is incompatible with `#[unsafe(naked)]`
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/asm/naked-invalid-attr.stderr b/tests/ui/asm/naked-invalid-attr.stderr
index ef389e7d921..915b54b3fc2 100644
--- a/tests/ui/asm/naked-invalid-attr.stderr
+++ b/tests/ui/asm/naked-invalid-attr.stderr
@@ -4,6 +4,15 @@ error[E0433]: failed to resolve: use of unresolved module or unlinked crate `a`
 LL | #[::a]
    |     ^ use of unresolved module or unlinked crate `a`
 
+error[E0736]: attribute incompatible with `#[unsafe(naked)]`
+  --> $DIR/naked-invalid-attr.rs:56:3
+   |
+LL | #[::a]
+   |   ^^^ the `{{root}}::a` attribute is incompatible with `#[unsafe(naked)]`
+...
+LL | #[unsafe(naked)]
+   | ---------------- function marked with `#[unsafe(naked)]` here
+
 error: attribute should be applied to a function definition
   --> $DIR/naked-invalid-attr.rs:13:1
    |
@@ -33,15 +42,6 @@ LL |     #[unsafe(naked)]
 LL |     || {};
    |     ----- not a function definition
 
-error[E0736]: attribute incompatible with `#[unsafe(naked)]`
-  --> $DIR/naked-invalid-attr.rs:56:1
-   |
-LL | #[::a]
-   | ^^^^^^ the `{{root}}::a` attribute is incompatible with `#[unsafe(naked)]`
-...
-LL | #[unsafe(naked)]
-   | ---------------- function marked with `#[unsafe(naked)]` here
-
 error: attribute should be applied to a function definition
   --> $DIR/naked-invalid-attr.rs:22:5
    |
diff --git a/tests/ui/associated-consts/assoc-const-eq-const_evaluatable_unchecked.rs b/tests/ui/associated-consts/assoc-const-eq-const_evaluatable_unchecked.rs
new file mode 100644
index 00000000000..4b6de6f56d5
--- /dev/null
+++ b/tests/ui/associated-consts/assoc-const-eq-const_evaluatable_unchecked.rs
@@ -0,0 +1,17 @@
+// The impl of lint `const_evaluatable_unchecked` used to wrongly assume and `assert!` that
+// successfully evaluating a type-system constant that has non-region args had to be an anon const.
+// In the case below however we have a type-system assoc const (here: `<() as TraitA<T>>::K`).
+//
+// issue: <https://github.com/rust-lang/rust/issues/108220>
+//@ check-pass
+#![feature(associated_const_equality)]
+
+pub trait TraitA<T> { const K: u8 = 0; }
+pub trait TraitB<T> {}
+
+impl<T> TraitA<T> for () {}
+impl<T> TraitB<T> for () where (): TraitA<T, K = 0> {}
+
+fn check<T>() where (): TraitB<T> {}
+
+fn main() {}
diff --git a/tests/ui/associated-inherent-types/issue-109299.stderr b/tests/ui/associated-inherent-types/issue-109299.stderr
index 1e11c0e8c2a..f29d3cc7834 100644
--- a/tests/ui/associated-inherent-types/issue-109299.stderr
+++ b/tests/ui/associated-inherent-types/issue-109299.stderr
@@ -2,9 +2,12 @@ error[E0261]: use of undeclared lifetime name `'d`
   --> $DIR/issue-109299.rs:6:12
    |
 LL | impl Lexer<'d> {
-   |     -      ^^ undeclared lifetime
-   |     |
-   |     help: consider introducing lifetime `'d` here: `<'d>`
+   |            ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'d` here
+   |
+LL | impl<'d> Lexer<'d> {
+   |     ++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/associated-types/defaults-unsound-62211-1.current.stderr b/tests/ui/associated-types/defaults-unsound-62211-1.current.stderr
index 8b6f0a47aed..b17e26b608d 100644
--- a/tests/ui/associated-types/defaults-unsound-62211-1.current.stderr
+++ b/tests/ui/associated-types/defaults-unsound-62211-1.current.stderr
@@ -2,9 +2,8 @@ error[E0277]: `Self` doesn't implement `std::fmt::Display`
   --> $DIR/defaults-unsound-62211-1.rs:24:96
    |
 LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
-   |                                                                                                ^^^^ `Self` cannot be formatted with the default formatter
+   |                                                                                                ^^^^ the trait `std::fmt::Display` is not implemented for `Self`
    |
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `UncheckedCopy::Output`
   --> $DIR/defaults-unsound-62211-1.rs:24:86
    |
diff --git a/tests/ui/associated-types/defaults-unsound-62211-1.next.stderr b/tests/ui/associated-types/defaults-unsound-62211-1.next.stderr
index 010f51df15a..a858c9c1ba0 100644
--- a/tests/ui/associated-types/defaults-unsound-62211-1.next.stderr
+++ b/tests/ui/associated-types/defaults-unsound-62211-1.next.stderr
@@ -2,9 +2,8 @@ error[E0277]: `Self` doesn't implement `std::fmt::Display`
   --> $DIR/defaults-unsound-62211-1.rs:24:96
    |
 LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
-   |                                                                                                ^^^^ `Self` cannot be formatted with the default formatter
+   |                                                                                                ^^^^ the trait `std::fmt::Display` is not implemented for `Self`
    |
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `UncheckedCopy::Output`
   --> $DIR/defaults-unsound-62211-1.rs:24:86
    |
diff --git a/tests/ui/associated-types/defaults-unsound-62211-2.current.stderr b/tests/ui/associated-types/defaults-unsound-62211-2.current.stderr
index 7552b089133..facfec85afe 100644
--- a/tests/ui/associated-types/defaults-unsound-62211-2.current.stderr
+++ b/tests/ui/associated-types/defaults-unsound-62211-2.current.stderr
@@ -2,9 +2,8 @@ error[E0277]: `Self` doesn't implement `std::fmt::Display`
   --> $DIR/defaults-unsound-62211-2.rs:24:96
    |
 LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
-   |                                                                                                ^^^^ `Self` cannot be formatted with the default formatter
+   |                                                                                                ^^^^ the trait `std::fmt::Display` is not implemented for `Self`
    |
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `UncheckedCopy::Output`
   --> $DIR/defaults-unsound-62211-2.rs:24:86
    |
diff --git a/tests/ui/associated-types/defaults-unsound-62211-2.next.stderr b/tests/ui/associated-types/defaults-unsound-62211-2.next.stderr
index 93478946570..1360843172f 100644
--- a/tests/ui/associated-types/defaults-unsound-62211-2.next.stderr
+++ b/tests/ui/associated-types/defaults-unsound-62211-2.next.stderr
@@ -2,9 +2,8 @@ error[E0277]: `Self` doesn't implement `std::fmt::Display`
   --> $DIR/defaults-unsound-62211-2.rs:24:96
    |
 LL |     type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
-   |                                                                                                ^^^^ `Self` cannot be formatted with the default formatter
+   |                                                                                                ^^^^ the trait `std::fmt::Display` is not implemented for `Self`
    |
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `UncheckedCopy::Output`
   --> $DIR/defaults-unsound-62211-2.rs:24:86
    |
diff --git a/tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed b/tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed
index c74a32e442f..9e5e889506c 100644
--- a/tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed
+++ b/tests/ui/async-await/incorrect-move-async-order-issue-79694.fixed
@@ -4,5 +4,5 @@
 // Regression test for issue 79694
 
 fn main() {
-    let _ = async move { }; //~ ERROR 7:13: 7:23: the order of `move` and `async` is incorrect
+    let _ = async move { }; //~ ERROR the order of `move` and `async` is incorrect
 }
diff --git a/tests/ui/async-await/incorrect-move-async-order-issue-79694.rs b/tests/ui/async-await/incorrect-move-async-order-issue-79694.rs
index 81ffbacc327..9c36a6c96da 100644
--- a/tests/ui/async-await/incorrect-move-async-order-issue-79694.rs
+++ b/tests/ui/async-await/incorrect-move-async-order-issue-79694.rs
@@ -4,5 +4,5 @@
 // Regression test for issue 79694
 
 fn main() {
-    let _ = move async { }; //~ ERROR 7:13: 7:23: the order of `move` and `async` is incorrect
+    let _ = move async { }; //~ ERROR the order of `move` and `async` is incorrect
 }
diff --git a/tests/ui/async-await/issues/issue-95307.rs b/tests/ui/async-await/issues/issue-95307.rs
index 83df65612b4..40905c239c3 100644
--- a/tests/ui/async-await/issues/issue-95307.rs
+++ b/tests/ui/async-await/issues/issue-95307.rs
@@ -5,7 +5,10 @@
 
 pub trait C {
     async fn new() -> [u8; _];
-    //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for functions
+    //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for opaque types
+    //~| ERROR: the placeholder `_` is not allowed within types on item signatures for opaque types
+    //~| ERROR: the placeholder `_` is not allowed within types on item signatures for opaque types
+    //~| ERROR: the placeholder `_` is not allowed within types on item signatures for opaque types
 }
 
 fn main() {}
diff --git a/tests/ui/async-await/issues/issue-95307.stderr b/tests/ui/async-await/issues/issue-95307.stderr
index c670686f7c9..0aae7a215cd 100644
--- a/tests/ui/async-await/issues/issue-95307.stderr
+++ b/tests/ui/async-await/issues/issue-95307.stderr
@@ -1,9 +1,33 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
   --> $DIR/issue-95307.rs:7:28
    |
 LL |     async fn new() -> [u8; _];
    |                            ^ not allowed in type signatures
 
-error: aborting due to 1 previous error
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
+  --> $DIR/issue-95307.rs:7:28
+   |
+LL |     async fn new() -> [u8; _];
+   |                            ^ not allowed in type signatures
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
+  --> $DIR/issue-95307.rs:7:28
+   |
+LL |     async fn new() -> [u8; _];
+   |                            ^ not allowed in type signatures
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
+  --> $DIR/issue-95307.rs:7:28
+   |
+LL |     async fn new() -> [u8; _];
+   |                            ^ not allowed in type signatures
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/attributes/expected-word.rs b/tests/ui/attributes/expected-word.rs
new file mode 100644
index 00000000000..246aa78db82
--- /dev/null
+++ b/tests/ui/attributes/expected-word.rs
@@ -0,0 +1,3 @@
+#[cold = true]
+//~^ ERROR malformed `cold` attribute input [E0565]
+fn main() {}
diff --git a/tests/ui/attributes/expected-word.stderr b/tests/ui/attributes/expected-word.stderr
new file mode 100644
index 00000000000..dcb10e7aee8
--- /dev/null
+++ b/tests/ui/attributes/expected-word.stderr
@@ -0,0 +1,12 @@
+error[E0565]: malformed `cold` attribute input
+  --> $DIR/expected-word.rs:1:1
+   |
+LL | #[cold = true]
+   | ^^^^^^^------^
+   | |      |
+   | |      didn't expect any arguments here
+   | help: must be of the form: `#[cold]`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0565`.
diff --git a/tests/ui/attributes/lint_on_root.rs b/tests/ui/attributes/lint_on_root.rs
new file mode 100644
index 00000000000..93d47bf0d71
--- /dev/null
+++ b/tests/ui/attributes/lint_on_root.rs
@@ -0,0 +1,7 @@
+// NOTE: this used to panic in debug builds (by a sanity assertion)
+// and not emit any lint on release builds. See https://github.com/rust-lang/rust/issues/142891.
+#![inline = ""]
+//~^ ERROR valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
+//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+
+fn main() {}
diff --git a/tests/ui/attributes/lint_on_root.stderr b/tests/ui/attributes/lint_on_root.stderr
new file mode 100644
index 00000000000..aaa46e6f54b
--- /dev/null
+++ b/tests/ui/attributes/lint_on_root.stderr
@@ -0,0 +1,12 @@
+error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
+  --> $DIR/lint_on_root.rs:3:1
+   |
+LL | #![inline = ""]
+   | ^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/attributes/malformed-fn-align.rs b/tests/ui/attributes/malformed-fn-align.rs
index 35ffd6d8acc..f5ab9555e56 100644
--- a/tests/ui/attributes/malformed-fn-align.rs
+++ b/tests/ui/attributes/malformed-fn-align.rs
@@ -3,7 +3,10 @@
 
 trait MyTrait {
     #[align] //~ ERROR malformed `align` attribute input
-    fn myfun();
+    fn myfun1();
+
+    #[align(1, 2)] //~ ERROR malformed `align` attribute input
+    fn myfun2();
 }
 
 #[align = 16] //~ ERROR malformed `align` attribute input
diff --git a/tests/ui/attributes/malformed-fn-align.stderr b/tests/ui/attributes/malformed-fn-align.stderr
index 765255c2c3a..b769d0b457d 100644
--- a/tests/ui/attributes/malformed-fn-align.stderr
+++ b/tests/ui/attributes/malformed-fn-align.stderr
@@ -2,54 +2,55 @@ error[E0539]: malformed `align` attribute input
   --> $DIR/malformed-fn-align.rs:5:5
    |
 LL |     #[align]
-   |     ^^^^^^^^ expected this to be a list
-   |
-help: try changing it to one of the following valid forms of the attribute
-   |
-LL |     #[align(<alignment in bytes>)]
-   |            ++++++++++++++++++++++
+   |     ^^^^^^^^
+   |     |
+   |     expected this to be a list
+   |     help: must be of the form: `#[align(<alignment in bytes>)]`
+
+error[E0805]: malformed `align` attribute input
+  --> $DIR/malformed-fn-align.rs:8:5
+   |
+LL |     #[align(1, 2)]
+   |     ^^^^^^^------^
+   |     |      |
+   |     |      expected a single argument here
+   |     help: must be of the form: `#[align(<alignment in bytes>)]`
 
 error[E0539]: malformed `align` attribute input
-  --> $DIR/malformed-fn-align.rs:9:1
+  --> $DIR/malformed-fn-align.rs:12:1
    |
 LL | #[align = 16]
-   | ^^^^^^^^^^^^^ expected this to be a list
-   |
-help: try changing it to one of the following valid forms of the attribute
-   |
-LL - #[align = 16]
-LL + #[align(<alignment in bytes>)]
-   |
-LL - #[align = 16]
-LL + #[align]
-   |
+   | ^^^^^^^^^^^^^
+   | |
+   | expected this to be a list
+   | help: must be of the form: `#[align(<alignment in bytes>)]`
 
 error[E0589]: invalid alignment value: not an unsuffixed integer
-  --> $DIR/malformed-fn-align.rs:12:9
+  --> $DIR/malformed-fn-align.rs:15:9
    |
 LL | #[align("hello")]
    |         ^^^^^^^
 
 error[E0589]: invalid alignment value: not a power of two
-  --> $DIR/malformed-fn-align.rs:15:9
+  --> $DIR/malformed-fn-align.rs:18:9
    |
 LL | #[align(0)]
    |         ^
 
 error: `#[repr(align(...))]` is not supported on function items
-  --> $DIR/malformed-fn-align.rs:18:8
+  --> $DIR/malformed-fn-align.rs:21:8
    |
 LL | #[repr(align(16))]
    |        ^^^^^^^^^
    |
 help: use `#[align(...)]` instead
-  --> $DIR/malformed-fn-align.rs:18:8
+  --> $DIR/malformed-fn-align.rs:21:8
    |
 LL | #[repr(align(16))]
    |        ^^^^^^^^^
 
 error: `#[align(...)]` is not supported on struct items
-  --> $DIR/malformed-fn-align.rs:21:1
+  --> $DIR/malformed-fn-align.rs:24:1
    |
 LL | #[align(16)]
    | ^^^^^^^^^^^^
@@ -60,7 +61,7 @@ LL - #[align(16)]
 LL + #[repr(align(16))]
    |
 
-error: aborting due to 6 previous errors
+error: aborting due to 7 previous errors
 
-Some errors have detailed explanations: E0539, E0589.
+Some errors have detailed explanations: E0539, E0589, E0805.
 For more information about an error, try `rustc --explain E0539`.
diff --git a/tests/ui/attributes/malformed-must_use.rs b/tests/ui/attributes/malformed-must_use.rs
new file mode 100644
index 00000000000..4b98affa8ab
--- /dev/null
+++ b/tests/ui/attributes/malformed-must_use.rs
@@ -0,0 +1,4 @@
+#[must_use()] //~ ERROR valid forms for the attribute are `#[must_use = "reason"]` and `#[must_use]`
+struct Test;
+
+fn main() {}
diff --git a/tests/ui/attributes/malformed-must_use.stderr b/tests/ui/attributes/malformed-must_use.stderr
new file mode 100644
index 00000000000..c948ba67744
--- /dev/null
+++ b/tests/ui/attributes/malformed-must_use.stderr
@@ -0,0 +1,8 @@
+error: valid forms for the attribute are `#[must_use = "reason"]` and `#[must_use]`
+  --> $DIR/malformed-must_use.rs:1:1
+   |
+LL | #[must_use()]
+   | ^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/attributes/mixed_export_name_and_no_mangle.fixed b/tests/ui/attributes/mixed_export_name_and_no_mangle.fixed
index d8b5235c52f..55c196f6dec 100644
--- a/tests/ui/attributes/mixed_export_name_and_no_mangle.fixed
+++ b/tests/ui/attributes/mixed_export_name_and_no_mangle.fixed
@@ -3,11 +3,11 @@
 //@ check-pass
 
 #![warn(unused_attributes)]
-//~^ WARN `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
+//~^ WARN `#[no_mangle]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
 #[export_name = "foo"]
 pub fn bar() {}
 
-//~^ WARN `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
+//~^ WARN `#[no_mangle]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
 #[export_name = "baz"]
 pub fn bak() {}
 
diff --git a/tests/ui/attributes/mixed_export_name_and_no_mangle.rs b/tests/ui/attributes/mixed_export_name_and_no_mangle.rs
index 83a673a7d13..79f1e5c19c5 100644
--- a/tests/ui/attributes/mixed_export_name_and_no_mangle.rs
+++ b/tests/ui/attributes/mixed_export_name_and_no_mangle.rs
@@ -4,12 +4,12 @@
 
 #![warn(unused_attributes)]
 #[no_mangle]
-//~^ WARN `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
+//~^ WARN `#[no_mangle]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
 #[export_name = "foo"]
 pub fn bar() {}
 
 #[unsafe(no_mangle)]
-//~^ WARN `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
+//~^ WARN `#[no_mangle]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
 #[export_name = "baz"]
 pub fn bak() {}
 
diff --git a/tests/ui/attributes/mixed_export_name_and_no_mangle.stderr b/tests/ui/attributes/mixed_export_name_and_no_mangle.stderr
index c760d27db25..1dcaa636800 100644
--- a/tests/ui/attributes/mixed_export_name_and_no_mangle.stderr
+++ b/tests/ui/attributes/mixed_export_name_and_no_mangle.stderr
@@ -1,8 +1,8 @@
-warning: `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[export_name]`
+warning: `#[no_mangle]` attribute may not be used in combination with `#[export_name]`
   --> $DIR/mixed_export_name_and_no_mangle.rs:6:1
    |
 LL | #[no_mangle]
-   | ^^^^^^^^^^^^ `#[unsafe(no_mangle)]` is ignored
+   | ^^^^^^^^^^^^ `#[no_mangle]` is ignored
    |
 note: `#[export_name]` takes precedence
   --> $DIR/mixed_export_name_and_no_mangle.rs:8:1
@@ -14,23 +14,23 @@ note: the lint level is defined here
    |
 LL | #![warn(unused_attributes)]
    |         ^^^^^^^^^^^^^^^^^
-help: remove the `#[unsafe(no_mangle)]` attribute
+help: remove the `#[no_mangle]` attribute
    |
 LL - #[no_mangle]
    |
 
-warning: `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[export_name]`
+warning: `#[no_mangle]` attribute may not be used in combination with `#[export_name]`
   --> $DIR/mixed_export_name_and_no_mangle.rs:11:1
    |
 LL | #[unsafe(no_mangle)]
-   | ^^^^^^^^^^^^^^^^^^^^ `#[unsafe(no_mangle)]` is ignored
+   | ^^^^^^^^^^^^^^^^^^^^ `#[no_mangle]` is ignored
    |
 note: `#[export_name]` takes precedence
   --> $DIR/mixed_export_name_and_no_mangle.rs:13:1
    |
 LL | #[export_name = "baz"]
    | ^^^^^^^^^^^^^^^^^^^^^^
-help: remove the `#[unsafe(no_mangle)]` attribute
+help: remove the `#[no_mangle]` attribute
    |
 LL - #[unsafe(no_mangle)]
    |
diff --git a/tests/ui/attributes/mixed_export_name_and_no_mangle_2024.fixed b/tests/ui/attributes/mixed_export_name_and_no_mangle_2024.fixed
new file mode 100644
index 00000000000..581cb200770
--- /dev/null
+++ b/tests/ui/attributes/mixed_export_name_and_no_mangle_2024.fixed
@@ -0,0 +1,15 @@
+// issue: rust-lang/rust#47446
+//@ run-rustfix
+//@ check-pass
+//@ edition:2024
+
+#![warn(unused_attributes)]
+//~^ WARN `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[unsafe(export_name)]` [unused_attributes]
+#[unsafe(export_name = "foo")]
+pub fn bar() {}
+
+//~^ WARN `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[unsafe(export_name)]` [unused_attributes]
+#[unsafe(export_name = "baz")]
+pub fn bak() {}
+
+fn main() {}
diff --git a/tests/ui/attributes/mixed_export_name_and_no_mangle_2024.rs b/tests/ui/attributes/mixed_export_name_and_no_mangle_2024.rs
new file mode 100644
index 00000000000..1e4a06132f2
--- /dev/null
+++ b/tests/ui/attributes/mixed_export_name_and_no_mangle_2024.rs
@@ -0,0 +1,17 @@
+// issue: rust-lang/rust#47446
+//@ run-rustfix
+//@ check-pass
+//@ edition:2024
+
+#![warn(unused_attributes)]
+#[unsafe(no_mangle)]
+//~^ WARN `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[unsafe(export_name)]` [unused_attributes]
+#[unsafe(export_name = "foo")]
+pub fn bar() {}
+
+#[unsafe(no_mangle)]
+//~^ WARN `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[unsafe(export_name)]` [unused_attributes]
+#[unsafe(export_name = "baz")]
+pub fn bak() {}
+
+fn main() {}
diff --git a/tests/ui/attributes/mixed_export_name_and_no_mangle_2024.stderr b/tests/ui/attributes/mixed_export_name_and_no_mangle_2024.stderr
new file mode 100644
index 00000000000..09804f9f92b
--- /dev/null
+++ b/tests/ui/attributes/mixed_export_name_and_no_mangle_2024.stderr
@@ -0,0 +1,39 @@
+warning: `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[unsafe(export_name)]`
+  --> $DIR/mixed_export_name_and_no_mangle_2024.rs:7:1
+   |
+LL | #[unsafe(no_mangle)]
+   | ^^^^^^^^^^^^^^^^^^^^ `#[unsafe(no_mangle)]` is ignored
+   |
+note: `#[unsafe(export_name)]` takes precedence
+  --> $DIR/mixed_export_name_and_no_mangle_2024.rs:9:1
+   |
+LL | #[unsafe(export_name = "foo")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: the lint level is defined here
+  --> $DIR/mixed_export_name_and_no_mangle_2024.rs:6:9
+   |
+LL | #![warn(unused_attributes)]
+   |         ^^^^^^^^^^^^^^^^^
+help: remove the `#[unsafe(no_mangle)]` attribute
+   |
+LL - #[unsafe(no_mangle)]
+   |
+
+warning: `#[unsafe(no_mangle)]` attribute may not be used in combination with `#[unsafe(export_name)]`
+  --> $DIR/mixed_export_name_and_no_mangle_2024.rs:12:1
+   |
+LL | #[unsafe(no_mangle)]
+   | ^^^^^^^^^^^^^^^^^^^^ `#[unsafe(no_mangle)]` is ignored
+   |
+note: `#[unsafe(export_name)]` takes precedence
+  --> $DIR/mixed_export_name_and_no_mangle_2024.rs:14:1
+   |
+LL | #[unsafe(export_name = "baz")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: remove the `#[unsafe(no_mangle)]` attribute
+   |
+LL - #[unsafe(no_mangle)]
+   |
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/attributes/rustc_skip_during_method_dispatch.rs b/tests/ui/attributes/rustc_skip_during_method_dispatch.rs
new file mode 100644
index 00000000000..25b473d5a58
--- /dev/null
+++ b/tests/ui/attributes/rustc_skip_during_method_dispatch.rs
@@ -0,0 +1,38 @@
+#![feature(rustc_attrs)]
+
+#[rustc_skip_during_method_dispatch]
+//~^ ERROR: malformed `rustc_skip_during_method_dispatch` attribute input [E0539]
+trait NotAList {}
+
+#[rustc_skip_during_method_dispatch = "array"]
+//~^ ERROR: malformed `rustc_skip_during_method_dispatch` attribute input [E0539]
+trait AlsoNotAList {}
+
+#[rustc_skip_during_method_dispatch()]
+//~^ ERROR: malformed `rustc_skip_during_method_dispatch` attribute input
+trait Argless {}
+
+#[rustc_skip_during_method_dispatch(array, boxed_slice, array)]
+//~^ ERROR: malformed `rustc_skip_during_method_dispatch` attribute input
+trait Duplicate {}
+
+#[rustc_skip_during_method_dispatch(slice)]
+//~^ ERROR: malformed `rustc_skip_during_method_dispatch` attribute input
+trait Unexpected {}
+
+#[rustc_skip_during_method_dispatch(array = true)]
+//~^ ERROR: malformed `rustc_skip_during_method_dispatch` attribute input
+trait KeyValue {}
+
+#[rustc_skip_during_method_dispatch("array")]
+//~^ ERROR: malformed `rustc_skip_during_method_dispatch` attribute input
+trait String {}
+
+#[rustc_skip_during_method_dispatch(array, boxed_slice)]
+trait OK {}
+
+#[rustc_skip_during_method_dispatch(array)]
+//~^ ERROR: attribute should be applied to a trait
+impl OK for () {}
+
+fn main() {}
diff --git a/tests/ui/attributes/rustc_skip_during_method_dispatch.stderr b/tests/ui/attributes/rustc_skip_during_method_dispatch.stderr
new file mode 100644
index 00000000000..2f5d7968489
--- /dev/null
+++ b/tests/ui/attributes/rustc_skip_during_method_dispatch.stderr
@@ -0,0 +1,76 @@
+error[E0539]: malformed `rustc_skip_during_method_dispatch` attribute input
+  --> $DIR/rustc_skip_during_method_dispatch.rs:3:1
+   |
+LL | #[rustc_skip_during_method_dispatch]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | |
+   | expected this to be a list
+   | help: must be of the form: `#[rustc_skip_during_method_dispatch(array, boxed_slice)]`
+
+error[E0539]: malformed `rustc_skip_during_method_dispatch` attribute input
+  --> $DIR/rustc_skip_during_method_dispatch.rs:7:1
+   |
+LL | #[rustc_skip_during_method_dispatch = "array"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | |
+   | expected this to be a list
+   | help: must be of the form: `#[rustc_skip_during_method_dispatch(array, boxed_slice)]`
+
+error[E0539]: malformed `rustc_skip_during_method_dispatch` attribute input
+  --> $DIR/rustc_skip_during_method_dispatch.rs:11:1
+   |
+LL | #[rustc_skip_during_method_dispatch()]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--^
+   | |                                  |
+   | |                                  expected at least 1 argument here
+   | help: must be of the form: `#[rustc_skip_during_method_dispatch(array, boxed_slice)]`
+
+error[E0538]: malformed `rustc_skip_during_method_dispatch` attribute input
+  --> $DIR/rustc_skip_during_method_dispatch.rs:15:1
+   |
+LL | #[rustc_skip_during_method_dispatch(array, boxed_slice, array)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----^^
+   | |                                                       |
+   | |                                                       found `array` used as a key more than once
+   | help: must be of the form: `#[rustc_skip_during_method_dispatch(array, boxed_slice)]`
+
+error[E0539]: malformed `rustc_skip_during_method_dispatch` attribute input
+  --> $DIR/rustc_skip_during_method_dispatch.rs:19:1
+   |
+LL | #[rustc_skip_during_method_dispatch(slice)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----^^
+   | |                                   |
+   | |                                   valid arguments are `array` or `boxed_slice`
+   | help: must be of the form: `#[rustc_skip_during_method_dispatch(array, boxed_slice)]`
+
+error[E0565]: malformed `rustc_skip_during_method_dispatch` attribute input
+  --> $DIR/rustc_skip_during_method_dispatch.rs:23:1
+   |
+LL | #[rustc_skip_during_method_dispatch(array = true)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------^^
+   | |                                         |
+   | |                                         didn't expect any arguments here
+   | help: must be of the form: `#[rustc_skip_during_method_dispatch(array, boxed_slice)]`
+
+error[E0565]: malformed `rustc_skip_during_method_dispatch` attribute input
+  --> $DIR/rustc_skip_during_method_dispatch.rs:27:1
+   |
+LL | #[rustc_skip_during_method_dispatch("array")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------^^
+   | |                                   |
+   | |                                   didn't expect a literal here
+   | help: must be of the form: `#[rustc_skip_during_method_dispatch(array, boxed_slice)]`
+
+error: attribute should be applied to a trait
+  --> $DIR/rustc_skip_during_method_dispatch.rs:34:1
+   |
+LL | #[rustc_skip_during_method_dispatch(array)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |
+LL | impl OK for () {}
+   | ----------------- not a trait
+
+error: aborting due to 8 previous errors
+
+Some errors have detailed explanations: E0538, E0539, E0565.
+For more information about an error, try `rustc --explain E0538`.
diff --git a/tests/ui/attributes/used_with_arg.rs b/tests/ui/attributes/used_with_arg.rs
index ad80ff53f0e..bc7a6f07442 100644
--- a/tests/ui/attributes/used_with_arg.rs
+++ b/tests/ui/attributes/used_with_arg.rs
@@ -1,3 +1,4 @@
+#![deny(unused_attributes)]
 #![feature(used_with_arg)]
 
 #[used(linker)]
@@ -6,14 +7,22 @@ static mut USED_LINKER: [usize; 1] = [0];
 #[used(compiler)]
 static mut USED_COMPILER: [usize; 1] = [0];
 
-#[used(compiler)] //~ ERROR `used(compiler)` and `used(linker)` can't be used together
+#[used(compiler)]
 #[used(linker)]
 static mut USED_COMPILER_LINKER2: [usize; 1] = [0];
 
-#[used(compiler)] //~ ERROR `used(compiler)` and `used(linker)` can't be used together
-#[used(linker)]
 #[used(compiler)]
 #[used(linker)]
+#[used(compiler)] //~ ERROR unused attribute
+#[used(linker)] //~ ERROR unused attribute
 static mut USED_COMPILER_LINKER3: [usize; 1] = [0];
 
+#[used(compiler)]
+#[used]
+static mut USED_WITHOUT_ATTR1: [usize; 1] = [0];
+
+#[used(linker)]
+#[used] //~ ERROR unused attribute
+static mut USED_WITHOUT_ATTR2: [usize; 1] = [0];
+
 fn main() {}
diff --git a/tests/ui/attributes/used_with_arg.stderr b/tests/ui/attributes/used_with_arg.stderr
index 440e5c4a5a0..9ff91a4e03b 100644
--- a/tests/ui/attributes/used_with_arg.stderr
+++ b/tests/ui/attributes/used_with_arg.stderr
@@ -1,18 +1,43 @@
-error: `used(compiler)` and `used(linker)` can't be used together
-  --> $DIR/used_with_arg.rs:9:1
+error: unused attribute
+  --> $DIR/used_with_arg.rs:16:1
+   |
+LL | #[used(compiler)]
+   | ^^^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/used_with_arg.rs:14:1
    |
 LL | #[used(compiler)]
    | ^^^^^^^^^^^^^^^^^
+note: the lint level is defined here
+  --> $DIR/used_with_arg.rs:1:9
+   |
+LL | #![deny(unused_attributes)]
+   |         ^^^^^^^^^^^^^^^^^
+
+error: unused attribute
+  --> $DIR/used_with_arg.rs:17:1
+   |
+LL | #[used(linker)]
+   | ^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/used_with_arg.rs:15:1
+   |
 LL | #[used(linker)]
    | ^^^^^^^^^^^^^^^
 
-error: `used(compiler)` and `used(linker)` can't be used together
-  --> $DIR/used_with_arg.rs:13:1
+error: unused attribute
+  --> $DIR/used_with_arg.rs:25:1
+   |
+LL | #[used]
+   | ^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/used_with_arg.rs:24:1
    |
-LL | #[used(compiler)]
-   | ^^^^^^^^^^^^^^^^^
 LL | #[used(linker)]
    | ^^^^^^^^^^^^^^^
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/attributes/used_with_multi_args.rs b/tests/ui/attributes/used_with_multi_args.rs
index d3109cc6444..1c054f792eb 100644
--- a/tests/ui/attributes/used_with_multi_args.rs
+++ b/tests/ui/attributes/used_with_multi_args.rs
@@ -1,6 +1,6 @@
 #![feature(used_with_arg)]
 
-#[used(compiler, linker)] //~ ERROR expected `used`, `used(compiler)` or `used(linker)`
+#[used(compiler, linker)] //~ ERROR malformed `used` attribute input
 static mut USED_COMPILER_LINKER: [usize; 1] = [0];
 
 fn main() {}
diff --git a/tests/ui/attributes/used_with_multi_args.stderr b/tests/ui/attributes/used_with_multi_args.stderr
index d4417a202d5..e48209cf204 100644
--- a/tests/ui/attributes/used_with_multi_args.stderr
+++ b/tests/ui/attributes/used_with_multi_args.stderr
@@ -1,8 +1,20 @@
-error: expected `used`, `used(compiler)` or `used(linker)`
+error[E0805]: malformed `used` attribute input
   --> $DIR/used_with_multi_args.rs:3:1
    |
 LL | #[used(compiler, linker)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^------------------^
+   |       |
+   |       expected a single argument here
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[used(compiler, linker)]
+LL + #[used(compiler|linker)]
+   |
+LL - #[used(compiler, linker)]
+LL + #[used]
+   |
 
 error: aborting due to 1 previous error
 
+For more information about this error, try `rustc --explain E0805`.
diff --git a/tests/ui/binop/issue-77910-1.stderr b/tests/ui/binop/issue-77910-1.stderr
index 74deac900d4..80c384f39bd 100644
--- a/tests/ui/binop/issue-77910-1.stderr
+++ b/tests/ui/binop/issue-77910-1.stderr
@@ -16,9 +16,8 @@ LL | fn foo(s: &i32) -> &i32 {
    |    --- consider calling this function
 ...
 LL |     assert_eq!(foo, y);
-   |     ^^^^^^^^^^^^^^^^^^ `for<'a> fn(&'a i32) -> &'a i32 {foo}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |     ^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `for<'a> fn(&'a i32) -> &'a i32 {foo}`
    |
-   = help: the trait `Debug` is not implemented for fn item `for<'a> fn(&'a i32) -> &'a i32 {foo}`
    = help: use parentheses to call this function: `foo(/* &i32 */)`
    = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/borrowck/borrowck-move-by-capture.stderr b/tests/ui/borrowck/borrowck-move-by-capture.stderr
index 9915acfe065..58d5e90e990 100644
--- a/tests/ui/borrowck/borrowck-move-by-capture.stderr
+++ b/tests/ui/borrowck/borrowck-move-by-capture.stderr
@@ -12,7 +12,7 @@ LL |         let _h = to_fn_once(move || -> isize { *bar });
    |                             |                  move occurs because `bar` has type `Box<isize>`, which does not implement the `Copy` trait
    |                             `bar` is moved here
    |
-help: clone the value before moving it into the closure
+help: consider cloning the value before moving it into the closure
    |
 LL ~         let value = bar.clone();
 LL ~         let _h = to_fn_once(move || -> isize { value });
diff --git a/tests/ui/borrowck/borrowck-move-moved-value-into-closure.stderr b/tests/ui/borrowck/borrowck-move-moved-value-into-closure.stderr
index 6a77d86f250..5ddc6a6d82d 100644
--- a/tests/ui/borrowck/borrowck-move-moved-value-into-closure.stderr
+++ b/tests/ui/borrowck/borrowck-move-moved-value-into-closure.stderr
@@ -12,6 +12,12 @@ LL |     call_f(move|| { *t + 1 });
    |            ^^^^^^   -- use occurs due to use in closure
    |            |
    |            value used here after move
+   |
+help: consider cloning the value before moving it into the closure
+   |
+LL ~     let value = t.clone();
+LL ~     call_f(move|| { value + 1 });
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/borrowck/generic_const_early_param.stderr b/tests/ui/borrowck/generic_const_early_param.stderr
index 3f56d6a3325..6447f92aba8 100644
--- a/tests/ui/borrowck/generic_const_early_param.stderr
+++ b/tests/ui/borrowck/generic_const_early_param.stderr
@@ -7,19 +7,24 @@ LL | struct DataWrapper<'static> {
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/generic_const_early_param.rs:6:12
    |
-LL | struct DataWrapper<'static> {
-   |                    - help: consider introducing lifetime `'a` here: `'a,`
-LL |
 LL |     data: &'a [u8; Self::SIZE],
    |            ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | struct DataWrapper<'a, 'static> {
+   |                    +++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/generic_const_early_param.rs:10:18
    |
 LL | impl DataWrapper<'a> {
-   |     -            ^^ undeclared lifetime
-   |     |
-   |     help: consider introducing lifetime `'a` here: `<'a>`
+   |                  ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | impl<'a> DataWrapper<'a> {
+   |     ++++
 
 warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
   --> $DIR/generic_const_early_param.rs:1:12
diff --git a/tests/ui/cast/ice-cast-type-with-error-124848.stderr b/tests/ui/cast/ice-cast-type-with-error-124848.stderr
index 0b2ab1dfc4c..316a484d971 100644
--- a/tests/ui/cast/ice-cast-type-with-error-124848.stderr
+++ b/tests/ui/cast/ice-cast-type-with-error-124848.stderr
@@ -2,27 +2,34 @@ error[E0261]: use of undeclared lifetime name `'unpinned`
   --> $DIR/ice-cast-type-with-error-124848.rs:7:32
    |
 LL | struct MyType<'a>(Cell<Option<&'unpinned mut MyType<'a>>>, Pin);
-   |               -                ^^^^^^^^^ undeclared lifetime
-   |               |
-   |               help: consider introducing lifetime `'unpinned` here: `'unpinned,`
+   |                                ^^^^^^^^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'unpinned` here
+   |
+LL | struct MyType<'unpinned, 'a>(Cell<Option<&'unpinned mut MyType<'a>>>, Pin);
+   |               ++++++++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/ice-cast-type-with-error-124848.rs:14:53
    |
-LL | fn main() {
-   |        - help: consider introducing lifetime `'a` here: `<'a>`
-...
 LL |     let bad_addr = &unpinned as *const Cell<Option<&'a mut MyType<'a>>> as usize;
    |                                                     ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | fn main<'a>() {
+   |        ++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/ice-cast-type-with-error-124848.rs:14:67
    |
-LL | fn main() {
-   |        - help: consider introducing lifetime `'a` here: `<'a>`
-...
 LL |     let bad_addr = &unpinned as *const Cell<Option<&'a mut MyType<'a>>> as usize;
    |                                                                   ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | fn main<'a>() {
+   |        ++++
 
 error[E0412]: cannot find type `Pin` in this scope
   --> $DIR/ice-cast-type-with-error-124848.rs:7:60
diff --git a/tests/ui/check-cfg/target_feature.stderr b/tests/ui/check-cfg/target_feature.stderr
index f29a41d6a8e..f422919983b 100644
--- a/tests/ui/check-cfg/target_feature.stderr
+++ b/tests/ui/check-cfg/target_feature.stderr
@@ -211,10 +211,6 @@ LL |     cfg!(target_feature = "_UNEXPECTED_VALUE");
 `reference-types`
 `relax`
 `relaxed-simd`
-`reserve-x18`
-`retpoline-external-thunk`
-`retpoline-indirect-branches`
-`retpoline-indirect-calls`
 `rtm`
 `sb`
 `scq`
diff --git a/tests/ui/closures/issue-111932.stderr b/tests/ui/closures/issue-111932.stderr
index 93488ad2011..fc3b7b0c6e6 100644
--- a/tests/ui/closures/issue-111932.stderr
+++ b/tests/ui/closures/issue-111932.stderr
@@ -14,11 +14,9 @@ error[E0277]: the size for values of type `dyn Foo` cannot be known at compilati
 LL |         println!("{:?}", foo);
    |                   ----   ^^^ doesn't have a size known at compile-time
    |                   |
-   |                   required by a bound introduced by this call
+   |                   required by this formatting parameter
    |
    = help: the trait `Sized` is not implemented for `dyn Foo`
-note: required by an implicit `Sized` bound in `core::fmt::rt::Argument::<'_>::new_debug`
-  --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/callback-as-argument.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/callback-as-argument.rs
index b25a81b858b..796c2634b62 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/callback-as-argument.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/callback-as-argument.rs
@@ -2,15 +2,15 @@
 //@ build-pass
 //@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
 //@ needs-llvm-components: arm
-#![feature(abi_c_cmse_nonsecure_call, cmse_nonsecure_entry, no_core, lang_items, intrinsics)]
+#![feature(abi_cmse_nonsecure_call, cmse_nonsecure_entry, no_core, lang_items, intrinsics)]
 #![no_core]
 
 extern crate minicore;
 use minicore::*;
 
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn test(
-    f: extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32) -> u32,
+pub extern "cmse-nonsecure-entry" fn test(
+    f: extern "cmse-nonsecure-call" fn(u32, u32, u32, u32) -> u32,
     a: u32,
     b: u32,
     c: u32,
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 2d0ed5d2a30..cb805309a02 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.rs
@@ -1,9 +1,9 @@
-// gate-test-abi_c_cmse_nonsecure_call
-#[allow(unsupported_fn_ptr_calling_conventions)]
+// gate-test-abi_cmse_nonsecure_call
 fn main() {
     let non_secure_function = unsafe {
-        core::mem::transmute::<usize, extern "C-cmse-nonsecure-call" fn(i32, i32, i32, i32) -> i32>(
-            //~^ ERROR [E0658]
+        core::mem::transmute::<usize, extern "cmse-nonsecure-call" fn(i32, i32, i32, i32) -> i32>(
+            //~^ ERROR: is not a supported ABI for the current target [E0570]
+            //~| ERROR: ABI is experimental and subject to change [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 beb0ab70cc7..ecf70e890f4 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr
@@ -1,23 +1,20 @@
-error[E0658]: the extern "C-cmse-nonsecure-call" ABI is experimental and subject to change
-  --> $DIR/gate_test.rs:5:46
+error[E0570]: "cmse-nonsecure-call" is not a supported ABI for the current target
+  --> $DIR/gate_test.rs:4:46
    |
-LL |         core::mem::transmute::<usize, extern "C-cmse-nonsecure-call" fn(i32, i32, i32, i32) -> i32>(
-   |                                              ^^^^^^^^^^^^^^^^^^^^^^^
+LL |         core::mem::transmute::<usize, extern "cmse-nonsecure-call" fn(i32, i32, i32, i32) -> i32>(
+   |                                              ^^^^^^^^^^^^^^^^^^^^^
+
+error[E0658]: the extern "cmse-nonsecure-call" ABI is experimental and subject to change
+  --> $DIR/gate_test.rs:4:46
+   |
+LL |         core::mem::transmute::<usize, extern "cmse-nonsecure-call" fn(i32, i32, i32, i32) -> i32>(
+   |                                              ^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #81391 <https://github.com/rust-lang/rust/issues/81391> for more information
-   = help: add `#![feature(abi_c_cmse_nonsecure_call)]` to the crate attributes to enable
+   = help: add `#![feature(abi_cmse_nonsecure_call)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0658`.
-Future incompatibility report: Future breakage diagnostic:
-warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
-  --> $DIR/gate_test.rs:5:39
-   |
-LL |         core::mem::transmute::<usize, extern "C-cmse-nonsecure-call" fn(i32, i32, i32, i32) -> i32>(
-   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = 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: aborting due to 2 previous errors
 
+Some errors have detailed explanations: E0570, E0658.
+For more information about an error, try `rustc --explain E0570`.
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.rs
index 84080890e08..4ce5890a2da 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.rs
@@ -1,7 +1,7 @@
 //@ add-core-stubs
 //@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
 //@ needs-llvm-components: arm
-#![feature(abi_c_cmse_nonsecure_call, no_core, lang_items)]
+#![feature(abi_cmse_nonsecure_call, no_core, lang_items)]
 #![no_core]
 
 extern crate minicore;
@@ -11,31 +11,31 @@ use minicore::*;
 struct Wrapper<T>(T);
 
 struct Test<T: Copy> {
-    f1: extern "C-cmse-nonsecure-call" fn<U: Copy>(U, u32, u32, u32) -> u64,
+    f1: extern "cmse-nonsecure-call" fn<U: Copy>(U, u32, u32, u32) -> u64,
     //~^ ERROR cannot find type `U` in this scope
     //~| ERROR function pointer types may not have generic parameters
-    f2: extern "C-cmse-nonsecure-call" fn(impl Copy, u32, u32, u32) -> u64,
+    f2: extern "cmse-nonsecure-call" fn(impl Copy, u32, u32, u32) -> u64,
     //~^ ERROR `impl Trait` is not allowed in `fn` pointer parameters
-    f3: extern "C-cmse-nonsecure-call" fn(T, u32, u32, u32) -> u64, //~ ERROR [E0798]
-    f4: extern "C-cmse-nonsecure-call" fn(Wrapper<T>, u32, u32, u32) -> u64, //~ ERROR [E0798]
+    f3: extern "cmse-nonsecure-call" fn(T, u32, u32, u32) -> u64, //~ ERROR [E0798]
+    f4: extern "cmse-nonsecure-call" fn(Wrapper<T>, u32, u32, u32) -> u64, //~ ERROR [E0798]
 }
 
-type WithReference = extern "C-cmse-nonsecure-call" fn(&usize);
+type WithReference = extern "cmse-nonsecure-call" fn(&usize);
 
 trait Trait {}
-type WithTraitObject = extern "C-cmse-nonsecure-call" fn(&dyn Trait) -> &dyn Trait;
-//~^ ERROR return value of `"C-cmse-nonsecure-call"` function too large to pass via registers [E0798]
+type WithTraitObject = extern "cmse-nonsecure-call" fn(&dyn Trait) -> &dyn Trait;
+//~^ ERROR return value of `"cmse-nonsecure-call"` function too large to pass via registers [E0798]
 
 type WithStaticTraitObject =
-    extern "C-cmse-nonsecure-call" fn(&'static dyn Trait) -> &'static dyn Trait;
-//~^ ERROR return value of `"C-cmse-nonsecure-call"` function too large to pass via registers [E0798]
+    extern "cmse-nonsecure-call" fn(&'static dyn Trait) -> &'static dyn Trait;
+//~^ ERROR return value of `"cmse-nonsecure-call"` function too large to pass via registers [E0798]
 
 #[repr(transparent)]
 struct WrapperTransparent<'a>(&'a dyn Trait);
 
 type WithTransparentTraitObject =
-    extern "C-cmse-nonsecure-call" fn(WrapperTransparent) -> WrapperTransparent;
-//~^ ERROR return value of `"C-cmse-nonsecure-call"` function too large to pass via registers [E0798]
+    extern "cmse-nonsecure-call" fn(WrapperTransparent) -> WrapperTransparent;
+//~^ ERROR return value of `"cmse-nonsecure-call"` function too large to pass via registers [E0798]
 
-type WithVarArgs = extern "C-cmse-nonsecure-call" fn(u32, ...);
-//~^ ERROR C-variadic functions with the "C-cmse-nonsecure-call" calling convention are not supported
+type WithVarArgs = extern "cmse-nonsecure-call" fn(u32, ...);
+//~^ ERROR C-variadic functions with the "cmse-nonsecure-call" calling convention are not supported
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.stderr
index 2b51f48915b..15656853576 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.stderr
@@ -1,21 +1,21 @@
 error: function pointer types may not have generic parameters
-  --> $DIR/generics.rs:14:42
+  --> $DIR/generics.rs:14:40
    |
-LL |     f1: extern "C-cmse-nonsecure-call" fn<U: Copy>(U, u32, u32, u32) -> u64,
-   |                                          ^^^^^^^^^
+LL |     f1: extern "cmse-nonsecure-call" fn<U: Copy>(U, u32, u32, u32) -> u64,
+   |                                        ^^^^^^^^^
 
 error[E0412]: cannot find type `U` in this scope
-  --> $DIR/generics.rs:14:52
+  --> $DIR/generics.rs:14:50
    |
 LL | struct Test<T: Copy> {
    |             - similarly named type parameter `T` defined here
-LL |     f1: extern "C-cmse-nonsecure-call" fn<U: Copy>(U, u32, u32, u32) -> u64,
-   |                                                    ^
+LL |     f1: extern "cmse-nonsecure-call" fn<U: Copy>(U, u32, u32, u32) -> u64,
+   |                                                  ^
    |
 help: a type parameter with a similar name exists
    |
-LL -     f1: extern "C-cmse-nonsecure-call" fn<U: Copy>(U, u32, u32, u32) -> u64,
-LL +     f1: extern "C-cmse-nonsecure-call" fn<U: Copy>(T, u32, u32, u32) -> u64,
+LL -     f1: extern "cmse-nonsecure-call" fn<U: Copy>(U, u32, u32, u32) -> u64,
+LL +     f1: extern "cmse-nonsecure-call" fn<U: Copy>(T, u32, u32, u32) -> u64,
    |
 help: you might be missing a type parameter
    |
@@ -23,57 +23,57 @@ LL | struct Test<T: Copy, U> {
    |                    +++
 
 error[E0562]: `impl Trait` is not allowed in `fn` pointer parameters
-  --> $DIR/generics.rs:17:43
+  --> $DIR/generics.rs:17:41
    |
-LL |     f2: extern "C-cmse-nonsecure-call" fn(impl Copy, u32, u32, u32) -> u64,
-   |                                           ^^^^^^^^^
+LL |     f2: extern "cmse-nonsecure-call" fn(impl Copy, u32, u32, u32) -> u64,
+   |                                         ^^^^^^^^^
    |
    = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0798]: function pointers with the `"C-cmse-nonsecure-call"` ABI cannot contain generics in their type
+error[E0798]: function pointers with the `"cmse-nonsecure-call"` ABI cannot contain generics in their type
   --> $DIR/generics.rs:19:9
    |
-LL |     f3: extern "C-cmse-nonsecure-call" fn(T, u32, u32, u32) -> u64,
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     f3: extern "cmse-nonsecure-call" fn(T, u32, u32, u32) -> u64,
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0798]: function pointers with the `"C-cmse-nonsecure-call"` ABI cannot contain generics in their type
+error[E0798]: function pointers with the `"cmse-nonsecure-call"` ABI cannot contain generics in their type
   --> $DIR/generics.rs:20:9
    |
-LL |     f4: extern "C-cmse-nonsecure-call" fn(Wrapper<T>, u32, u32, u32) -> u64,
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     f4: extern "cmse-nonsecure-call" fn(Wrapper<T>, u32, u32, u32) -> u64,
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0798]: return value of `"C-cmse-nonsecure-call"` function too large to pass via registers
-  --> $DIR/generics.rs:26:73
+error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/generics.rs:26:71
    |
-LL | type WithTraitObject = extern "C-cmse-nonsecure-call" fn(&dyn Trait) -> &dyn Trait;
-   |                                                                         ^^^^^^^^^^ this type doesn't fit in the available registers
+LL | type WithTraitObject = extern "cmse-nonsecure-call" fn(&dyn Trait) -> &dyn Trait;
+   |                                                                       ^^^^^^^^^^ this type doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
+   = note: functions with the `"cmse-nonsecure-call"` 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-call"` function too large to pass via registers
-  --> $DIR/generics.rs:30:62
+error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/generics.rs:30:60
    |
-LL |     extern "C-cmse-nonsecure-call" fn(&'static dyn Trait) -> &'static dyn Trait;
-   |                                                              ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
+LL |     extern "cmse-nonsecure-call" fn(&'static dyn Trait) -> &'static dyn Trait;
+   |                                                            ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
+   = note: functions with the `"cmse-nonsecure-call"` 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-call"` function too large to pass via registers
-  --> $DIR/generics.rs:37:62
+error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/generics.rs:37:60
    |
-LL |     extern "C-cmse-nonsecure-call" fn(WrapperTransparent) -> WrapperTransparent;
-   |                                                              ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
+LL |     extern "cmse-nonsecure-call" fn(WrapperTransparent) -> WrapperTransparent;
+   |                                                            ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
+   = note: functions with the `"cmse-nonsecure-call"` 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[E0045]: C-variadic functions with the "C-cmse-nonsecure-call" calling convention are not supported
+error[E0045]: C-variadic functions with the "cmse-nonsecure-call" calling convention are not supported
   --> $DIR/generics.rs:40:20
    |
-LL | type WithVarArgs = extern "C-cmse-nonsecure-call" fn(u32, ...);
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
+LL | type WithVarArgs = extern "cmse-nonsecure-call" fn(u32, ...);
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
 
 error: aborting due to 9 previous errors
 
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-via-stack.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-via-stack.rs
index 8328f9b6dd5..7036cd367e4 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-via-stack.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-via-stack.rs
@@ -1,7 +1,7 @@
 //@ add-core-stubs
 //@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
 //@ needs-llvm-components: arm
-#![feature(abi_c_cmse_nonsecure_call, no_core, lang_items)]
+#![feature(abi_cmse_nonsecure_call, no_core, lang_items)]
 #![no_core]
 
 extern crate minicore;
@@ -13,10 +13,10 @@ pub struct AlignRelevant(u32);
 
 #[no_mangle]
 pub fn test(
-    f1: extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32, x: u32, y: u32), //~ ERROR [E0798]
-    f2: extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u16, u16),            //~ ERROR [E0798]
-    f3: extern "C-cmse-nonsecure-call" fn(u32, u64, u32),                      //~ ERROR [E0798]
-    f4: extern "C-cmse-nonsecure-call" fn(AlignRelevant, u32),                 //~ ERROR [E0798]
-    f5: extern "C-cmse-nonsecure-call" fn([u32; 5]),                           //~ ERROR [E0798]
+    f1: extern "cmse-nonsecure-call" fn(u32, u32, u32, u32, x: u32, y: u32), //~ ERROR [E0798]
+    f2: extern "cmse-nonsecure-call" fn(u32, u32, u32, u16, u16),            //~ ERROR [E0798]
+    f3: extern "cmse-nonsecure-call" fn(u32, u64, u32),                      //~ ERROR [E0798]
+    f4: extern "cmse-nonsecure-call" fn(AlignRelevant, u32),                 //~ ERROR [E0798]
+    f5: extern "cmse-nonsecure-call" fn([u32; 5]),                           //~ ERROR [E0798]
 ) {
 }
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-via-stack.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-via-stack.stderr
index 10a5e856107..5d59405fbd1 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-via-stack.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/params-via-stack.stderr
@@ -1,42 +1,42 @@
-error[E0798]: arguments for `"C-cmse-nonsecure-call"` function too large to pass via registers
-  --> $DIR/params-via-stack.rs:16:63
+error[E0798]: arguments for `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:16:61
    |
-LL |     f1: extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32, x: u32, y: u32),
-   |                                                               ^^^^^^^^^^^^^^ these arguments don't fit in the available registers
+LL |     f1: extern "cmse-nonsecure-call" fn(u32, u32, u32, u32, x: u32, y: u32),
+   |                                                             ^^^^^^^^^^^^^^ these arguments don't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass all their arguments via the 4 32-bit available argument registers
+   = note: functions with the `"cmse-nonsecure-call"` ABI must pass all their arguments via the 4 32-bit available argument registers
 
-error[E0798]: arguments for `"C-cmse-nonsecure-call"` function too large to pass via registers
-  --> $DIR/params-via-stack.rs:17:63
+error[E0798]: arguments for `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:17:61
    |
-LL |     f2: extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u16, u16),
-   |                                                               ^^^ this argument doesn't fit in the available registers
+LL |     f2: extern "cmse-nonsecure-call" fn(u32, u32, u32, u16, u16),
+   |                                                             ^^^ this argument doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass all their arguments via the 4 32-bit available argument registers
+   = note: functions with the `"cmse-nonsecure-call"` ABI must pass all their arguments via the 4 32-bit available argument registers
 
-error[E0798]: arguments for `"C-cmse-nonsecure-call"` function too large to pass via registers
-  --> $DIR/params-via-stack.rs:18:53
+error[E0798]: arguments for `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:18:51
    |
-LL |     f3: extern "C-cmse-nonsecure-call" fn(u32, u64, u32),
-   |                                                     ^^^ this argument doesn't fit in the available registers
+LL |     f3: extern "cmse-nonsecure-call" fn(u32, u64, u32),
+   |                                                   ^^^ this argument doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass all their arguments via the 4 32-bit available argument registers
+   = note: functions with the `"cmse-nonsecure-call"` ABI must pass all their arguments via the 4 32-bit available argument registers
 
-error[E0798]: arguments for `"C-cmse-nonsecure-call"` function too large to pass via registers
-  --> $DIR/params-via-stack.rs:19:58
+error[E0798]: arguments for `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:19:56
    |
-LL |     f4: extern "C-cmse-nonsecure-call" fn(AlignRelevant, u32),
-   |                                                          ^^^ this argument doesn't fit in the available registers
+LL |     f4: extern "cmse-nonsecure-call" fn(AlignRelevant, u32),
+   |                                                        ^^^ this argument doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass all their arguments via the 4 32-bit available argument registers
+   = note: functions with the `"cmse-nonsecure-call"` ABI must pass all their arguments via the 4 32-bit available argument registers
 
-error[E0798]: arguments for `"C-cmse-nonsecure-call"` function too large to pass via registers
-  --> $DIR/params-via-stack.rs:20:43
+error[E0798]: arguments for `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:20:41
    |
-LL |     f5: extern "C-cmse-nonsecure-call" fn([u32; 5]),
-   |                                           ^^^^^^^^ this argument doesn't fit in the available registers
+LL |     f5: extern "cmse-nonsecure-call" fn([u32; 5]),
+   |                                         ^^^^^^^^ this argument doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass all their arguments via the 4 32-bit available argument registers
+   = note: functions with the `"cmse-nonsecure-call"` ABI must pass all their arguments via the 4 32-bit available argument registers
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.rs
index 890ec4b00f6..77347b04ede 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.rs
@@ -3,7 +3,7 @@
 //@ needs-llvm-components: arm
 //@ add-core-stubs
 
-#![feature(abi_c_cmse_nonsecure_call, no_core, lang_items)]
+#![feature(abi_cmse_nonsecure_call, no_core, lang_items)]
 #![no_core]
 
 extern crate minicore;
@@ -23,18 +23,18 @@ pub struct ReprCAlign16(u16);
 
 #[no_mangle]
 pub fn test(
-    f1: extern "C-cmse-nonsecure-call" fn() -> ReprCU64, //~ ERROR [E0798]
-    f2: extern "C-cmse-nonsecure-call" fn() -> ReprCBytes, //~ ERROR [E0798]
-    f3: extern "C-cmse-nonsecure-call" fn() -> U64Compound, //~ ERROR [E0798]
-    f4: extern "C-cmse-nonsecure-call" fn() -> ReprCAlign16, //~ ERROR [E0798]
-    f5: extern "C-cmse-nonsecure-call" fn() -> [u8; 5],  //~ ERROR [E0798]
+    f1: extern "cmse-nonsecure-call" fn() -> ReprCU64, //~ ERROR [E0798]
+    f2: extern "cmse-nonsecure-call" fn() -> ReprCBytes, //~ ERROR [E0798]
+    f3: extern "cmse-nonsecure-call" fn() -> U64Compound, //~ ERROR [E0798]
+    f4: extern "cmse-nonsecure-call" fn() -> ReprCAlign16, //~ ERROR [E0798]
+    f5: extern "cmse-nonsecure-call" fn() -> [u8; 5],  //~ ERROR [E0798]
 ) {
 }
 
 #[allow(improper_ctypes_definitions)]
 struct Test {
-    u128: extern "C-cmse-nonsecure-call" fn() -> u128, //~ ERROR [E0798]
-    i128: extern "C-cmse-nonsecure-call" fn() -> i128, //~ ERROR [E0798]
+    u128: extern "cmse-nonsecure-call" fn() -> u128, //~ ERROR [E0798]
+    i128: extern "cmse-nonsecure-call" fn() -> i128, //~ ERROR [E0798]
 }
 
 #[repr(C)]
@@ -49,7 +49,7 @@ pub union ReprRustUnionU64 {
 
 #[no_mangle]
 pub fn test_union(
-    f1: extern "C-cmse-nonsecure-call" fn() -> ReprRustUnionU64, //~ ERROR [E0798]
-    f2: extern "C-cmse-nonsecure-call" fn() -> ReprCUnionU64,    //~ ERROR [E0798]
+    f1: extern "cmse-nonsecure-call" fn() -> ReprRustUnionU64, //~ ERROR [E0798]
+    f2: extern "cmse-nonsecure-call" fn() -> ReprCUnionU64,    //~ ERROR [E0798]
 ) {
 }
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.stderr
index d2077352900..ddf969c1bce 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.stderr
@@ -1,82 +1,82 @@
-error[E0798]: return value of `"C-cmse-nonsecure-call"` function too large to pass via registers
-  --> $DIR/return-via-stack.rs:36:50
+error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:36:48
    |
-LL |     u128: extern "C-cmse-nonsecure-call" fn() -> u128,
-   |                                                  ^^^^ this type doesn't fit in the available registers
+LL |     u128: extern "cmse-nonsecure-call" fn() -> u128,
+   |                                                ^^^^ this type doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
+   = note: functions with the `"cmse-nonsecure-call"` 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-call"` function too large to pass via registers
-  --> $DIR/return-via-stack.rs:37:50
+error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:37:48
    |
-LL |     i128: extern "C-cmse-nonsecure-call" fn() -> i128,
-   |                                                  ^^^^ this type doesn't fit in the available registers
+LL |     i128: extern "cmse-nonsecure-call" fn() -> i128,
+   |                                                ^^^^ this type doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
+   = note: functions with the `"cmse-nonsecure-call"` 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-call"` function too large to pass via registers
-  --> $DIR/return-via-stack.rs:26:48
+error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:26:46
    |
-LL |     f1: extern "C-cmse-nonsecure-call" fn() -> ReprCU64,
-   |                                                ^^^^^^^^ this type doesn't fit in the available registers
+LL |     f1: extern "cmse-nonsecure-call" fn() -> ReprCU64,
+   |                                              ^^^^^^^^ this type doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
+   = note: functions with the `"cmse-nonsecure-call"` 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-call"` function too large to pass via registers
-  --> $DIR/return-via-stack.rs:27:48
+error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:27:46
    |
-LL |     f2: extern "C-cmse-nonsecure-call" fn() -> ReprCBytes,
-   |                                                ^^^^^^^^^^ this type doesn't fit in the available registers
+LL |     f2: extern "cmse-nonsecure-call" fn() -> ReprCBytes,
+   |                                              ^^^^^^^^^^ this type doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
+   = note: functions with the `"cmse-nonsecure-call"` 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-call"` function too large to pass via registers
-  --> $DIR/return-via-stack.rs:28:48
+error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:28:46
    |
-LL |     f3: extern "C-cmse-nonsecure-call" fn() -> U64Compound,
-   |                                                ^^^^^^^^^^^ this type doesn't fit in the available registers
+LL |     f3: extern "cmse-nonsecure-call" fn() -> U64Compound,
+   |                                              ^^^^^^^^^^^ this type doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
+   = note: functions with the `"cmse-nonsecure-call"` 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-call"` function too large to pass via registers
-  --> $DIR/return-via-stack.rs:29:48
+error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:29:46
    |
-LL |     f4: extern "C-cmse-nonsecure-call" fn() -> ReprCAlign16,
-   |                                                ^^^^^^^^^^^^ this type doesn't fit in the available registers
+LL |     f4: extern "cmse-nonsecure-call" fn() -> ReprCAlign16,
+   |                                              ^^^^^^^^^^^^ this type doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
+   = note: functions with the `"cmse-nonsecure-call"` 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-call"` function too large to pass via registers
-  --> $DIR/return-via-stack.rs:30:48
+error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:30:46
    |
-LL |     f5: extern "C-cmse-nonsecure-call" fn() -> [u8; 5],
-   |                                                ^^^^^^^ this type doesn't fit in the available registers
+LL |     f5: extern "cmse-nonsecure-call" fn() -> [u8; 5],
+   |                                              ^^^^^^^ this type doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
+   = note: functions with the `"cmse-nonsecure-call"` 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-call"` function too large to pass via registers
-  --> $DIR/return-via-stack.rs:52:48
+error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:52:46
    |
-LL |     f1: extern "C-cmse-nonsecure-call" fn() -> ReprRustUnionU64,
-   |                                                ^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
+LL |     f1: extern "cmse-nonsecure-call" fn() -> ReprRustUnionU64,
+   |                                              ^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
+   = note: functions with the `"cmse-nonsecure-call"` 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-call"` function too large to pass via registers
-  --> $DIR/return-via-stack.rs:53:48
+error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:53:46
    |
-LL |     f2: extern "C-cmse-nonsecure-call" fn() -> ReprCUnionU64,
-   |                                                ^^^^^^^^^^^^^ this type doesn't fit in the available registers
+LL |     f2: extern "cmse-nonsecure-call" fn() -> ReprCUnionU64,
+   |                                              ^^^^^^^^^^^^^ this type doesn't fit in the available registers
    |
-   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
+   = note: functions with the `"cmse-nonsecure-call"` 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
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/via-registers.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/via-registers.rs
index 7dfe6cf9672..419d26875bc 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/via-registers.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/via-registers.rs
@@ -2,7 +2,7 @@
 //@ build-pass
 //@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
 //@ needs-llvm-components: arm
-#![feature(abi_c_cmse_nonsecure_call, no_core, lang_items, intrinsics)]
+#![feature(abi_cmse_nonsecure_call, no_core, lang_items, intrinsics)]
 #![no_core]
 
 extern crate minicore;
@@ -27,26 +27,26 @@ pub struct U32Compound(u16, u16);
 #[no_mangle]
 #[allow(improper_ctypes_definitions)]
 pub fn params(
-    f1: extern "C-cmse-nonsecure-call" fn(),
-    f2: extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32),
-    f3: extern "C-cmse-nonsecure-call" fn(u64, u64),
-    f4: extern "C-cmse-nonsecure-call" fn(u128),
-    f5: extern "C-cmse-nonsecure-call" fn(f64, f32, f32),
-    f6: extern "C-cmse-nonsecure-call" fn(ReprTransparentStruct<u64>, U32Compound),
-    f7: extern "C-cmse-nonsecure-call" fn([u32; 4]),
+    f1: extern "cmse-nonsecure-call" fn(),
+    f2: extern "cmse-nonsecure-call" fn(u32, u32, u32, u32),
+    f3: extern "cmse-nonsecure-call" fn(u64, u64),
+    f4: extern "cmse-nonsecure-call" fn(u128),
+    f5: extern "cmse-nonsecure-call" fn(f64, f32, f32),
+    f6: extern "cmse-nonsecure-call" fn(ReprTransparentStruct<u64>, U32Compound),
+    f7: extern "cmse-nonsecure-call" fn([u32; 4]),
 ) {
 }
 
 #[no_mangle]
 pub fn returns(
-    f1: extern "C-cmse-nonsecure-call" fn() -> u32,
-    f2: extern "C-cmse-nonsecure-call" fn() -> u64,
-    f3: extern "C-cmse-nonsecure-call" fn() -> i64,
-    f4: extern "C-cmse-nonsecure-call" fn() -> f64,
-    f5: extern "C-cmse-nonsecure-call" fn() -> [u8; 4],
-    f6: extern "C-cmse-nonsecure-call" fn() -> ReprTransparentStruct<u64>,
-    f7: extern "C-cmse-nonsecure-call" fn() -> ReprTransparentStruct<ReprTransparentStruct<u64>>,
-    f8: extern "C-cmse-nonsecure-call" fn() -> ReprTransparentEnumU64,
-    f9: extern "C-cmse-nonsecure-call" fn() -> U32Compound,
+    f1: extern "cmse-nonsecure-call" fn() -> u32,
+    f2: extern "cmse-nonsecure-call" fn() -> u64,
+    f3: extern "cmse-nonsecure-call" fn() -> i64,
+    f4: extern "cmse-nonsecure-call" fn() -> f64,
+    f5: extern "cmse-nonsecure-call" fn() -> [u8; 4],
+    f6: extern "cmse-nonsecure-call" fn() -> ReprTransparentStruct<u64>,
+    f7: extern "cmse-nonsecure-call" fn() -> ReprTransparentStruct<ReprTransparentStruct<u64>>,
+    f8: extern "cmse-nonsecure-call" fn() -> ReprTransparentEnumU64,
+    f9: extern "cmse-nonsecure-call" fn() -> U32Compound,
 ) {
 }
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs
index 5a2d2db19c5..44a1e7d69a8 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs
@@ -1,10 +1,10 @@
 //@ add-core-stubs
 //@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
 //@ needs-llvm-components: arm
-#![feature(abi_c_cmse_nonsecure_call, lang_items, no_core)]
+#![feature(abi_cmse_nonsecure_call, lang_items, no_core)]
 #![no_core]
 
 extern crate minicore;
 use minicore::*;
 
-pub extern "C-cmse-nonsecure-call" fn test() {} //~ ERROR [E0781]
+pub extern "cmse-nonsecure-call" fn test() {} //~ ERROR [E0781]
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr
index f49fab043a4..b9cccecc64b 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr
@@ -1,8 +1,8 @@
-error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers
+error[E0781]: the `"cmse-nonsecure-call"` ABI is only allowed on function pointers
   --> $DIR/wrong-abi-location-1.rs:10:1
    |
-LL | pub extern "C-cmse-nonsecure-call" fn test() {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | pub extern "cmse-nonsecure-call" fn test() {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs
index e93b153949a..f23f45f786f 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs
@@ -1,12 +1,12 @@
 //@ add-core-stubs
 //@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
 //@ needs-llvm-components: arm
-#![feature(abi_c_cmse_nonsecure_call, lang_items, no_core)]
+#![feature(abi_cmse_nonsecure_call, lang_items, no_core)]
 #![no_core]
 
 extern crate minicore;
 use minicore::*;
 
-extern "C-cmse-nonsecure-call" { //~ ERROR [E0781]
+extern "cmse-nonsecure-call" { //~ ERROR [E0781]
     fn test();
 }
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr
index bae8d20d81c..437d7b80b1f 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr
@@ -1,7 +1,7 @@
-error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers
+error[E0781]: the `"cmse-nonsecure-call"` ABI is only allowed on function pointers
   --> $DIR/wrong-abi-location-2.rs:10:1
    |
-LL | / extern "C-cmse-nonsecure-call" {
+LL | / extern "cmse-nonsecure-call" {
 LL | |     fn test();
 LL | | }
    | |_^
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.rs
index 6061451b2e9..8ec22033a3d 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.rs
@@ -1,9 +1,9 @@
 // gate-test-cmse_nonsecure_entry
 
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
-    //~^ ERROR [E0570]
-    //~| ERROR [E0658]
+pub extern "cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
+    //~^ ERROR: is not a supported ABI for the current target [E0570]
+    //~| ERROR: ABI is experimental and subject to change [E0658]
     input + 6
 }
 
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.stderr
index 0afbbe647af..e40862e74ee 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.stderr
@@ -1,19 +1,19 @@
-error[E0658]: the extern "C-cmse-nonsecure-entry" ABI is experimental and subject to change
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
   --> $DIR/gate_test.rs:4:12
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | pub extern "cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
+   |            ^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0658]: the extern "cmse-nonsecure-entry" ABI is experimental and subject to change
+  --> $DIR/gate_test.rs:4:12
+   |
+LL | pub extern "cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
+   |            ^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #75835 <https://github.com/rust-lang/rust/issues/75835> for more information
    = help: add `#![feature(cmse_nonsecure_entry)]` 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[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/gate_test.rs:4:1
-   |
-LL | pub extern "C-cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0570, E0658.
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.rs
index 19b6179dde7..800dd580af2 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.rs
@@ -11,12 +11,12 @@ use minicore::*;
 struct Wrapper<T>(T);
 
 impl<T: Copy> Wrapper<T> {
-    extern "C-cmse-nonsecure-entry" fn ambient_generic(_: T, _: u32, _: u32, _: u32) -> u64 {
+    extern "cmse-nonsecure-entry" fn ambient_generic(_: T, _: u32, _: u32, _: u32) -> u64 {
         //~^ ERROR [E0798]
         0
     }
 
-    extern "C-cmse-nonsecure-entry" fn ambient_generic_nested(
+    extern "cmse-nonsecure-entry" fn ambient_generic_nested(
         //~^ ERROR [E0798]
         _: Wrapper<T>,
         _: u32,
@@ -27,7 +27,7 @@ impl<T: Copy> Wrapper<T> {
     }
 }
 
-extern "C-cmse-nonsecure-entry" fn introduced_generic<U: Copy>(
+extern "cmse-nonsecure-entry" fn introduced_generic<U: Copy>(
     //~^ ERROR [E0798]
     _: U,
     _: u32,
@@ -37,40 +37,40 @@ extern "C-cmse-nonsecure-entry" fn introduced_generic<U: Copy>(
     0
 }
 
-extern "C-cmse-nonsecure-entry" fn impl_trait(_: impl Copy, _: u32, _: u32, _: u32) -> u64 {
+extern "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 {
+extern "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]
+extern "cmse-nonsecure-entry" fn trait_object(x: &dyn Trait) -> &dyn Trait {
+    //~^ ERROR return value of `"cmse-nonsecure-entry"` function too large to pass via registers [E0798]
     x
 }
 
-extern "C-cmse-nonsecure-entry" fn static_trait_object(
+extern "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]
+    //~^ ERROR return value of `"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(
+extern "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]
+    //~^ ERROR return value of `"cmse-nonsecure-entry"` function too large to pass via registers [E0798]
     x
 }
 
-extern "C-cmse-nonsecure-entry" fn c_variadic(_: u32, _: ...) {
+extern "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
index c314671dc29..f0190671b5a 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/generics.stderr
@@ -1,13 +1,13 @@
 error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
-  --> $DIR/generics.rs:73:55
+  --> $DIR/generics.rs:73:53
    |
-LL | extern "C-cmse-nonsecure-entry" fn c_variadic(_: u32, _: ...) {
-   |                                                       ^^^^^^
+LL | extern "cmse-nonsecure-entry" fn c_variadic(_: u32, _: ...) {
+   |                                                     ^^^^^^
 
-error[E0798]: functions with the `"C-cmse-nonsecure-entry"` ABI cannot contain generics in their type
+error[E0798]: functions with the `"cmse-nonsecure-entry"` ABI cannot contain generics in their type
   --> $DIR/generics.rs:30:1
    |
-LL | / extern "C-cmse-nonsecure-entry" fn introduced_generic<U: Copy>(
+LL | / extern "cmse-nonsecure-entry" fn introduced_generic<U: Copy>(
 LL | |
 LL | |     _: U,
 LL | |     _: u32,
@@ -16,22 +16,22 @@ LL | |     _: u32,
 LL | | ) -> u64 {
    | |________^
 
-error[E0798]: functions with the `"C-cmse-nonsecure-entry"` ABI cannot contain generics in their type
+error[E0798]: functions with the `"cmse-nonsecure-entry"` ABI cannot contain generics in their type
   --> $DIR/generics.rs:40:1
    |
-LL | extern "C-cmse-nonsecure-entry" fn impl_trait(_: impl Copy, _: u32, _: u32, _: u32) -> u64 {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | extern "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
+error[E0798]: functions with the `"cmse-nonsecure-entry"` ABI cannot contain generics in their type
   --> $DIR/generics.rs:14:5
    |
-LL |     extern "C-cmse-nonsecure-entry" fn ambient_generic(_: T, _: u32, _: u32, _: u32) -> u64 {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     extern "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
+error[E0798]: functions with the `"cmse-nonsecure-entry"` ABI cannot contain generics in their type
   --> $DIR/generics.rs:19:5
    |
-LL | /     extern "C-cmse-nonsecure-entry" fn ambient_generic_nested(
+LL | /     extern "cmse-nonsecure-entry" fn ambient_generic_nested(
 LL | |
 LL | |         _: Wrapper<T>,
 LL | |         _: u32,
@@ -40,38 +40,38 @@ LL | |         _: u32,
 LL | |     ) -> u64 {
    | |____________^
 
-error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
-  --> $DIR/generics.rs:51:67
+error[E0798]: return value of `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/generics.rs:51:65
    |
-LL | extern "C-cmse-nonsecure-entry" fn trait_object(x: &dyn Trait) -> &dyn Trait {
-   |                                                                   ^^^^^^^^^^ this type doesn't fit in the available registers
+LL | extern "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: functions with the `"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
+error[E0798]: return value of `"cmse-nonsecure-entry"` function too large to pass via registers
   --> $DIR/generics.rs:58: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: functions with the `"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
+error[E0798]: return value of `"cmse-nonsecure-entry"` function too large to pass via registers
   --> $DIR/generics.rs:68: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: functions with the `"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:73:55
+  --> $DIR/generics.rs:73:53
    |
-LL | extern "C-cmse-nonsecure-entry" fn c_variadic(_: u32, _: ...) {
-   |                                                       ^^^^^^
+LL | extern "cmse-nonsecure-entry" fn c_variadic(_: u32, _: ...) {
+   |                                                     ^^^^^^
 
 error: aborting due to 9 previous errors
 
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
index 4c53f9422da..d4f722fa193 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.rs
@@ -12,14 +12,14 @@ use minicore::*;
 pub struct AlignRelevant(u32);
 
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn f1(_: u32, _: u32, _: u32, _: u32, _: u32, _: u32) {} //~ ERROR [E0798]
+pub extern "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]
+pub extern "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]
+pub extern "cmse-nonsecure-entry" fn f3(_: u32, _: u64, _: u32) {} //~ ERROR [E0798]
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn f4(_: AlignRelevant, _: u32) {} //~ ERROR [E0798]
+pub extern "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]
+pub extern "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
index 24e9ddf32fe..f8b96bddc94 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.stderr
@@ -1,42 +1,42 @@
-error[E0798]: arguments for `"C-cmse-nonsecure-entry"` function too large to pass via registers
-  --> $DIR/params-via-stack.rs:15:78
+error[E0798]: arguments for `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:15:76
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn f1(_: u32, _: u32, _: u32, _: u32, _: u32, _: u32) {}
-   |                                                                              ^^^^^^^^^^^ these arguments don't fit in the available registers
+LL | pub extern "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
+   = note: functions with the `"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:17:78
+error[E0798]: arguments for `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:17:76
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn f2(_: u32, _: u32, _: u32, _: u16, _: u16) {}
-   |                                                                              ^^^ this argument doesn't fit in the available registers
+LL | pub extern "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
+   = note: functions with the `"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:19:62
+error[E0798]: arguments for `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:19:60
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn f3(_: u32, _: u64, _: u32) {}
-   |                                                              ^^^ this argument doesn't fit in the available registers
+LL | pub extern "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
+   = note: functions with the `"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:21:64
+error[E0798]: arguments for `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:21:62
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn f4(_: AlignRelevant, _: u32) {}
-   |                                                                ^^^ this argument doesn't fit in the available registers
+LL | pub extern "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
+   = note: functions with the `"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:25:46
+error[E0798]: arguments for `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/params-via-stack.rs:25:44
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn f5(_: [u32; 5]) {}
-   |                                              ^^^^^^^^ this argument doesn't fit in the available registers
+LL | pub extern "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
+   = note: functions with the `"cmse-nonsecure-entry"` ABI must pass all their arguments via the 4 32-bit available argument registers
 
 error: aborting due to 5 previous errors
 
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
index 735eab10fa1..0052a0977ed 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.rs
@@ -22,41 +22,41 @@ pub struct U64Compound(u32, u32);
 pub struct ReprCAlign16(u16);
 
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn f1() -> ReprCU64 {
+pub extern "cmse-nonsecure-entry" fn f1() -> ReprCU64 {
     //~^ ERROR [E0798]
     ReprCU64(0)
 }
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn f2() -> ReprCBytes {
+pub extern "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 {
+pub extern "cmse-nonsecure-entry" fn f3() -> U64Compound {
     //~^ ERROR [E0798]
     U64Compound(2, 3)
 }
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn f4() -> ReprCAlign16 {
+pub extern "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] {
+pub extern "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 {
+pub extern "cmse-nonsecure-entry" fn u128() -> u128 {
     //~^ ERROR [E0798]
     123
 }
 #[no_mangle]
 #[allow(improper_ctypes_definitions)]
-pub extern "C-cmse-nonsecure-entry" fn i128() -> i128 {
+pub extern "cmse-nonsecure-entry" fn i128() -> i128 {
     //~^ ERROR [E0798]
     456
 }
@@ -73,12 +73,12 @@ pub union ReprCUnionU64 {
 
 #[no_mangle]
 #[allow(improper_ctypes_definitions)]
-pub extern "C-cmse-nonsecure-entry" fn union_rust() -> ReprRustUnionU64 {
+pub extern "cmse-nonsecure-entry" fn union_rust() -> ReprRustUnionU64 {
     //~^ ERROR [E0798]
     ReprRustUnionU64 { _unused: 1 }
 }
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn union_c() -> ReprCUnionU64 {
+pub extern "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
index 9c885d95318..c5effed92ae 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/return-via-stack.stderr
@@ -1,82 +1,82 @@
-error[E0798]: return value of `"C-cmse-nonsecure-entry"` function too large to pass via registers
-  --> $DIR/return-via-stack.rs:25:48
+error[E0798]: return value of `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:25:46
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn f1() -> ReprCU64 {
-   |                                                ^^^^^^^^ this type doesn't fit in the available registers
+LL | pub extern "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: functions with the `"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
+error[E0798]: return value of `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:30:46
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn f2() -> ReprCBytes {
-   |                                                ^^^^^^^^^^ this type doesn't fit in the available registers
+LL | pub extern "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: functions with the `"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
+error[E0798]: return value of `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:35:46
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn f3() -> U64Compound {
-   |                                                ^^^^^^^^^^^ this type doesn't fit in the available registers
+LL | pub extern "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: functions with the `"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
+error[E0798]: return value of `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:40:46
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn f4() -> ReprCAlign16 {
-   |                                                ^^^^^^^^^^^^ this type doesn't fit in the available registers
+LL | pub extern "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: functions with the `"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
+error[E0798]: return value of `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:47:46
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn f5() -> [u8; 5] {
-   |                                                ^^^^^^^ this type doesn't fit in the available registers
+LL | pub extern "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: functions with the `"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
+error[E0798]: return value of `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:53:48
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn u128() -> u128 {
-   |                                                  ^^^^ this type doesn't fit in the available registers
+LL | pub extern "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: functions with the `"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
+error[E0798]: return value of `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:59:48
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn i128() -> i128 {
-   |                                                  ^^^^ this type doesn't fit in the available registers
+LL | pub extern "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: functions with the `"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
+error[E0798]: return value of `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:76:54
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn union_rust() -> ReprRustUnionU64 {
-   |                                                        ^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
+LL | pub extern "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: functions with the `"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
+error[E0798]: return value of `"cmse-nonsecure-entry"` function too large to pass via registers
+  --> $DIR/return-via-stack.rs:81:51
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn union_c() -> ReprCUnionU64 {
-   |                                                     ^^^^^^^^^^^^^ this type doesn't fit in the available registers
+LL | pub extern "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: functions with the `"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
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.aarch64.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.aarch64.stderr
index 6a90dc8d635..3949eac1542 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.aarch64.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.aarch64.stderr
@@ -1,8 +1,8 @@
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/trustzone-only.rs:17:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/trustzone-only.rs:17:12
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | pub extern "cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
+   |            ^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs
index 6d84dab2166..ff5d2ec0ab6 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.rs
@@ -14,7 +14,7 @@ extern crate minicore;
 use minicore::*;
 
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
+pub extern "cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
     //~^ ERROR [E0570]
     input
 }
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.thumb7.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.thumb7.stderr
index 6a90dc8d635..3949eac1542 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.thumb7.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.thumb7.stderr
@@ -1,8 +1,8 @@
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/trustzone-only.rs:17:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/trustzone-only.rs:17:12
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | pub extern "cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
+   |            ^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.x86.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.x86.stderr
index 6a90dc8d635..3949eac1542 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.x86.stderr
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/trustzone-only.x86.stderr
@@ -1,8 +1,8 @@
-error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
-  --> $DIR/trustzone-only.rs:17:1
+error[E0570]: "cmse-nonsecure-entry" is not a supported ABI for the current target
+  --> $DIR/trustzone-only.rs:17:12
    |
-LL | pub extern "C-cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | pub extern "cmse-nonsecure-entry" fn entry_function(input: u32) -> u32 {
+   |            ^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs
index 912fc8b85eb..34373288125 100644
--- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs
+++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/via-registers.rs
@@ -26,49 +26,49 @@ pub enum ReprTransparentEnumU64 {
 pub struct U32Compound(u16, u16);
 
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn inputs1() {}
+pub extern "cmse-nonsecure-entry" fn inputs1() {}
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn inputs2(_: u32, _: u32, _: u32, _: u32) {}
+pub extern "cmse-nonsecure-entry" fn inputs2(_: u32, _: u32, _: u32, _: u32) {}
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn inputs3(_: u64, _: u64) {}
+pub extern "cmse-nonsecure-entry" fn inputs3(_: u64, _: u64) {}
 #[no_mangle]
 #[allow(improper_ctypes_definitions)]
-pub extern "C-cmse-nonsecure-entry" fn inputs4(_: u128) {}
+pub extern "cmse-nonsecure-entry" fn inputs4(_: u128) {}
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn inputs5(_: f64, _: f32, _: f32) {}
+pub extern "cmse-nonsecure-entry" fn inputs5(_: f64, _: f32, _: f32) {}
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn inputs6(_: ReprTransparentStruct<u64>, _: U32Compound) {}
+pub extern "cmse-nonsecure-entry" fn inputs6(_: ReprTransparentStruct<u64>, _: U32Compound) {}
 #[no_mangle]
 #[allow(improper_ctypes_definitions)]
-pub extern "C-cmse-nonsecure-entry" fn inputs7(_: [u32; 4]) {}
+pub extern "cmse-nonsecure-entry" fn inputs7(_: [u32; 4]) {}
 
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn outputs1() -> u32 {
+pub extern "cmse-nonsecure-entry" fn outputs1() -> u32 {
     0
 }
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn outputs2() -> u64 {
+pub extern "cmse-nonsecure-entry" fn outputs2() -> u64 {
     0
 }
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn outputs3() -> i64 {
+pub extern "cmse-nonsecure-entry" fn outputs3() -> i64 {
     0
 }
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn outputs4() -> f64 {
+pub extern "cmse-nonsecure-entry" fn outputs4() -> f64 {
     0.0
 }
 #[no_mangle]
 #[allow(improper_ctypes_definitions)]
-pub extern "C-cmse-nonsecure-entry" fn outputs5() -> [u8; 4] {
+pub extern "cmse-nonsecure-entry" fn outputs5() -> [u8; 4] {
     [0xAA; 4]
 }
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn outputs6() -> ReprTransparentStruct<u64> {
+pub extern "cmse-nonsecure-entry" fn outputs6() -> ReprTransparentStruct<u64> {
     ReprTransparentStruct { _marker1: (), _marker2: (), field: 0xAA, _marker3: () }
 }
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn outputs7(
+pub extern "cmse-nonsecure-entry" fn outputs7(
 ) -> ReprTransparentStruct<ReprTransparentStruct<u64>> {
     ReprTransparentStruct {
         _marker1: (),
@@ -78,10 +78,10 @@ pub extern "C-cmse-nonsecure-entry" fn outputs7(
     }
 }
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn outputs8() -> ReprTransparentEnumU64 {
+pub extern "cmse-nonsecure-entry" fn outputs8() -> ReprTransparentEnumU64 {
     ReprTransparentEnumU64::A(0)
 }
 #[no_mangle]
-pub extern "C-cmse-nonsecure-entry" fn outputs9() -> U32Compound {
+pub extern "cmse-nonsecure-entry" fn outputs9() -> U32Compound {
     U32Compound(1, 2)
 }
diff --git a/tests/ui/coercion/invalid-blanket-coerce-unsized-impl.rs b/tests/ui/coercion/invalid-blanket-coerce-unsized-impl.rs
new file mode 100644
index 00000000000..a4fd7710718
--- /dev/null
+++ b/tests/ui/coercion/invalid-blanket-coerce-unsized-impl.rs
@@ -0,0 +1,13 @@
+// Regression test minimized from #126982.
+// We used to apply a coerce_unsized coercion to literally every argument since
+// the blanket applied in literally all cases, even though it was incoherent.
+
+#![feature(coerce_unsized)]
+
+impl<A> std::ops::CoerceUnsized<A> for A {}
+//~^ ERROR type parameter `A` must be used as the type parameter for some local type
+//~| ERROR the trait `CoerceUnsized` may only be implemented for a coercion between structures
+
+const C: usize = 1;
+
+fn main() {}
diff --git a/tests/ui/coercion/invalid-blanket-coerce-unsized-impl.stderr b/tests/ui/coercion/invalid-blanket-coerce-unsized-impl.stderr
new file mode 100644
index 00000000000..377906ee334
--- /dev/null
+++ b/tests/ui/coercion/invalid-blanket-coerce-unsized-impl.stderr
@@ -0,0 +1,19 @@
+error[E0210]: type parameter `A` must be used as the type parameter for some local type (e.g., `MyStruct<A>`)
+  --> $DIR/invalid-blanket-coerce-unsized-impl.rs:7:6
+   |
+LL | impl<A> std::ops::CoerceUnsized<A> for A {}
+   |      ^ type parameter `A` must be used as the type parameter for some local type
+   |
+   = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
+   = note: only traits defined in the current crate can be implemented for a type parameter
+
+error[E0377]: the trait `CoerceUnsized` may only be implemented for a coercion between structures
+  --> $DIR/invalid-blanket-coerce-unsized-impl.rs:7:1
+   |
+LL | impl<A> std::ops::CoerceUnsized<A> for A {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0210, E0377.
+For more information about an error, try `rustc --explain E0210`.
diff --git a/tests/ui/compiletest-self-test/line-annotation-mismatches.rs b/tests/ui/compiletest-self-test/line-annotation-mismatches.rs
new file mode 100644
index 00000000000..d2a14374ed4
--- /dev/null
+++ b/tests/ui/compiletest-self-test/line-annotation-mismatches.rs
@@ -0,0 +1,42 @@
+//@ should-fail
+
+// The warning is reported with unknown line
+//@ compile-flags: -D raw_pointer_derive
+//~? WARN kind and unknown line match the reported warning, but we do not suggest it
+
+// The error is expected but not reported at all.
+//~ ERROR this error does not exist
+
+// The error is reported but not expected at all.
+// "`main` function not found in crate" (the main function is intentionally not added)
+
+// An "unimportant" diagnostic is expected on a wrong line.
+//~ ERROR aborting due to
+
+// An "unimportant" diagnostic is expected with a wrong kind.
+//~? ERROR For more information about an error
+
+fn wrong_line_or_kind() {
+    // A diagnostic expected on a wrong line.
+    unresolved1;
+    //~ ERROR cannot find value `unresolved1` in this scope
+
+    // A diagnostic expected with a wrong kind.
+    unresolved2; //~ WARN cannot find value `unresolved2` in this scope
+
+    // A diagnostic expected with a missing kind (treated as a wrong kind).
+    unresolved3; //~ cannot find value `unresolved3` in this scope
+
+    // A diagnostic expected with a wrong line and kind.
+    unresolved4;
+    //~ WARN cannot find value `unresolved4` in this scope
+}
+
+fn wrong_message() {
+    // A diagnostic expected with a wrong message, but the line is known and right.
+    unresolvedA; //~ ERROR stub message 1
+
+    // A diagnostic expected with a wrong message, but the line is known and right,
+    // even if the kind doesn't match.
+    unresolvedB; //~ WARN stub message 2
+}
diff --git a/tests/ui/compiletest-self-test/line-annotation-mismatches.stderr b/tests/ui/compiletest-self-test/line-annotation-mismatches.stderr
new file mode 100644
index 00000000000..7ca3bfaf396
--- /dev/null
+++ b/tests/ui/compiletest-self-test/line-annotation-mismatches.stderr
@@ -0,0 +1,61 @@
+warning: lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
+   |
+   = note: requested on the command line with `-D raw_pointer_derive`
+   = note: `#[warn(renamed_and_removed_lints)]` on by default
+
+error[E0425]: cannot find value `unresolved1` in this scope
+  --> $DIR/line-annotation-mismatches.rs:21:5
+   |
+LL |     unresolved1;
+   |     ^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find value `unresolved2` in this scope
+  --> $DIR/line-annotation-mismatches.rs:25:5
+   |
+LL |     unresolved2;
+   |     ^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find value `unresolved3` in this scope
+  --> $DIR/line-annotation-mismatches.rs:28:5
+   |
+LL |     unresolved3;
+   |     ^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find value `unresolved4` in this scope
+  --> $DIR/line-annotation-mismatches.rs:31:5
+   |
+LL |     unresolved4;
+   |     ^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find value `unresolvedA` in this scope
+  --> $DIR/line-annotation-mismatches.rs:37:5
+   |
+LL |     unresolvedA;
+   |     ^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find value `unresolvedB` in this scope
+  --> $DIR/line-annotation-mismatches.rs:41:5
+   |
+LL |     unresolvedB;
+   |     ^^^^^^^^^^^ not found in this scope
+
+warning: lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
+   |
+   = note: requested on the command line with `-D raw_pointer_derive`
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0601]: `main` function not found in crate `line_annotation_mismatches`
+  --> $DIR/line-annotation-mismatches.rs:42:2
+   |
+LL | }
+   |  ^ consider adding a `main` function to `$DIR/line-annotation-mismatches.rs`
+
+warning: lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
+   |
+   = note: requested on the command line with `-D raw_pointer_derive`
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 7 previous errors; 3 warnings emitted
+
+Some errors have detailed explanations: E0425, E0601.
+For more information about an error, try `rustc --explain E0425`.
diff --git a/tests/ui/const-generics/const_trait_fn-issue-88433.rs b/tests/ui/const-generics/const_trait_fn-issue-88433.rs
index bc91fc1700e..2f92a528bf7 100644
--- a/tests/ui/const-generics/const_trait_fn-issue-88433.rs
+++ b/tests/ui/const-generics/const_trait_fn-issue-88433.rs
@@ -10,7 +10,6 @@ trait Func<T> {
     fn call_once(self, arg: T) -> Self::Output;
 }
 
-
 struct Closure;
 
 impl const Func<&usize> for Closure {
@@ -21,7 +20,7 @@ impl const Func<&usize> for Closure {
     }
 }
 
-enum Bug<T = [(); Closure.call_once(&0) ]> {
+enum Bug<T = [(); Closure.call_once(&0)]> {
     V(T),
 }
 
diff --git a/tests/ui/const-generics/generic_arg_infer/in-signature.rs b/tests/ui/const-generics/generic_arg_infer/in-signature.rs
index cd0235bf45a..1be8b564224 100644
--- a/tests/ui/const-generics/generic_arg_infer/in-signature.rs
+++ b/tests/ui/const-generics/generic_arg_infer/in-signature.rs
@@ -41,6 +41,7 @@ trait TyAssocConst {
 trait TyAssocConstMixed {
     const ARR: Bar<_, _>;
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated constants
+    //~| ERROR the placeholder `_` is not allowed within types on item signatures for associated constants
 }
 
 trait AssocTy {
@@ -57,4 +58,5 @@ impl AssocTy for i16 {
 impl AssocTy for i32 {
     type Assoc = Bar<_, _>;
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
+    //~| ERROR the placeholder `_` is not allowed within types on item signatures for associated types
 }
diff --git a/tests/ui/const-generics/generic_arg_infer/in-signature.stderr b/tests/ui/const-generics/generic_arg_infer/in-signature.stderr
index f964fc8d2f2..b6f2662a939 100644
--- a/tests/ui/const-generics/generic_arg_infer/in-signature.stderr
+++ b/tests/ui/const-generics/generic_arg_infer/in-signature.stderr
@@ -103,24 +103,28 @@ LL + static TY_STATIC_MIXED: Bar<i32, 3> = Bar::<i32, 3>(0);
    |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
-  --> $DIR/in-signature.rs:50:23
+  --> $DIR/in-signature.rs:51:23
    |
 LL |     type Assoc = [u8; _];
    |                       ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
-  --> $DIR/in-signature.rs:54:27
+  --> $DIR/in-signature.rs:55:27
    |
 LL |     type Assoc = Bar<i32, _>;
    |                           ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
-  --> $DIR/in-signature.rs:58:22
+  --> $DIR/in-signature.rs:59:22
    |
 LL |     type Assoc = Bar<_, _>;
-   |                      ^  ^ not allowed in type signatures
-   |                      |
-   |                      not allowed in type signatures
+   |                      ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
+  --> $DIR/in-signature.rs:59:25
+   |
+LL |     type Assoc = Bar<_, _>;
+   |                         ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
   --> $DIR/in-signature.rs:34:21
@@ -138,10 +142,14 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/in-signature.rs:42:20
    |
 LL |     const ARR: Bar<_, _>;
-   |                    ^  ^ not allowed in type signatures
-   |                    |
-   |                    not allowed in type signatures
+   |                    ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
+  --> $DIR/in-signature.rs:42:23
+   |
+LL |     const ARR: Bar<_, _>;
+   |                       ^ not allowed in type signatures
 
-error: aborting due to 15 previous errors
+error: aborting due to 17 previous errors
 
 For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/const-generics/generic_const_exprs/non-local-const.rs b/tests/ui/const-generics/generic_const_exprs/non-local-const.rs
new file mode 100644
index 00000000000..0a30cc385ac
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/non-local-const.rs
@@ -0,0 +1,10 @@
+// regression test for #133808.
+
+#![feature(generic_const_exprs)]
+#![feature(min_generic_const_args)]
+#![allow(incomplete_features)]
+#![crate_type = "lib"]
+
+pub trait Foo {}
+impl Foo for [u8; std::path::MAIN_SEPARATOR] {}
+//~^ ERROR the constant `MAIN_SEPARATOR` is not of type `usize`
diff --git a/tests/ui/const-generics/generic_const_exprs/non-local-const.stderr b/tests/ui/const-generics/generic_const_exprs/non-local-const.stderr
new file mode 100644
index 00000000000..d8df3269a19
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/non-local-const.stderr
@@ -0,0 +1,10 @@
+error: the constant `MAIN_SEPARATOR` is not of type `usize`
+  --> $DIR/non-local-const.rs:9:14
+   |
+LL | impl Foo for [u8; std::path::MAIN_SEPARATOR] {}
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `char`
+   |
+   = note: the length of array `[u8; MAIN_SEPARATOR]` must be type `usize`
+
+error: aborting due to 1 previous error
+
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 a55be99fc0b..02a95ed3e90 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
@@ -28,6 +28,10 @@ mod v20 {
     impl<const v10: usize> v17<v10, v2> {
         //~^ ERROR maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
         //~| ERROR maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
+        //~| ERROR maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
+        //~| ERROR maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
+        //~| ERROR maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
+        //~| ERROR maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
         pub const fn v21() -> v18 {
             //~^ ERROR cannot find type `v18` in this scope
             v18 { _p: () }
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 b73611c79b2..cf0bdd0e9a1 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:38:15
+  --> $DIR/unevaluated-const-ice-119731.rs:42: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:31:31
+  --> $DIR/unevaluated-const-ice-119731.rs:35: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:33:13
+  --> $DIR/unevaluated-const-ice-119731.rs:37:13
    |
 LL |     pub type v11 = [[usize; v4]; v4];
    |     --------------------------------- similarly named type alias `v11` defined here
@@ -86,6 +86,38 @@ LL |     impl<const v10: usize> v17<v10, v2> {
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
+error: maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
+  --> $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: maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
+  --> $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: maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
+  --> $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: maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#0}
+  --> $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[E0592]: duplicate definitions with name `v21`
   --> $DIR/unevaluated-const-ice-119731.rs:23:9
    |
@@ -95,7 +127,7 @@ LL |         pub const fn v21() -> v18 {}
 LL |         pub const fn v21() -> v18 {
    |         ------------------------- other definition for `v21`
 
-error: aborting due to 10 previous errors; 2 warnings emitted
+error: aborting due to 14 previous errors; 2 warnings emitted
 
 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/unresolved_lifetimes_error.stderr b/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr
index 67eed46eadd..ae074373da2 100644
--- a/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr
@@ -1,10 +1,13 @@
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/unresolved_lifetimes_error.rs:5:13
    |
-LL | fn foo() -> [(); {
-   |       - help: consider introducing lifetime `'a` here: `<'a>`
 LL |     let a: &'a ();
    |             ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | fn foo<'a>() -> [(); {
+   |       ++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/const-generics/ice-unexpected-inference-var-122549.stderr b/tests/ui/const-generics/ice-unexpected-inference-var-122549.stderr
index afad3388145..3b24808cd16 100644
--- a/tests/ui/const-generics/ice-unexpected-inference-var-122549.stderr
+++ b/tests/ui/const-generics/ice-unexpected-inference-var-122549.stderr
@@ -17,9 +17,12 @@ error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/ice-unexpected-inference-var-122549.rs:11:34
    |
 LL | struct ConstChunksExact<'rem, T: 'a, const N: usize> {}
-   |                         -        ^^ undeclared lifetime
-   |                         |
-   |                         help: consider introducing lifetime `'a` here: `'a,`
+   |                                  ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | struct ConstChunksExact<'a, 'rem, T: 'a, const N: usize> {}
+   |                         +++
 
 error[E0046]: not all trait items implemented, missing: `const_chunks_exact`
   --> $DIR/ice-unexpected-inference-var-122549.rs:9:1
diff --git a/tests/ui/const-generics/issues/issue-86535-2.rs b/tests/ui/const-generics/issues/issue-86535-2.rs
index 8d064f3eeb1..5c9132fe54d 100644
--- a/tests/ui/const-generics/issues/issue-86535-2.rs
+++ b/tests/ui/const-generics/issues/issue-86535-2.rs
@@ -9,7 +9,7 @@ pub trait Foo {
         [(); Self::ASSOC_C]:;
 }
 
-struct Bar<const N: &'static ()>;
+struct Bar<const N: &'static ()>; //~ WARN struct `Bar` is never constructed
 impl<const N: &'static ()> Foo for Bar<N> {
     const ASSOC_C: usize = 3;
 
diff --git a/tests/ui/const-generics/issues/issue-86535-2.stderr b/tests/ui/const-generics/issues/issue-86535-2.stderr
new file mode 100644
index 00000000000..0ba74836575
--- /dev/null
+++ b/tests/ui/const-generics/issues/issue-86535-2.stderr
@@ -0,0 +1,10 @@
+warning: struct `Bar` is never constructed
+  --> $DIR/issue-86535-2.rs:12:8
+   |
+LL | struct Bar<const N: &'static ()>;
+   |        ^^^
+   |
+   = note: `#[warn(dead_code)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/const-generics/issues/issue-86535.rs b/tests/ui/const-generics/issues/issue-86535.rs
index 62454f4a388..2cdf801c156 100644
--- a/tests/ui/const-generics/issues/issue-86535.rs
+++ b/tests/ui/const-generics/issues/issue-86535.rs
@@ -2,7 +2,7 @@
 #![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
 #![allow(incomplete_features, unused_variables)]
 
-struct F<const S: &'static str>;
+struct F<const S: &'static str>; //~ WARN struct `F` is never constructed
 impl<const S: &'static str> X for F<{ S }> {
     const W: usize = 3;
 
diff --git a/tests/ui/const-generics/issues/issue-86535.stderr b/tests/ui/const-generics/issues/issue-86535.stderr
new file mode 100644
index 00000000000..84d6c1c11ff
--- /dev/null
+++ b/tests/ui/const-generics/issues/issue-86535.stderr
@@ -0,0 +1,10 @@
+warning: struct `F` is never constructed
+  --> $DIR/issue-86535.rs:5:8
+   |
+LL | struct F<const S: &'static str>;
+   |        ^
+   |
+   = note: `#[warn(dead_code)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/const-generics/issues/issue-88119.stderr b/tests/ui/const-generics/issues/issue-88119.stderr
index 94f06bbbbc4..0aabf48011d 100644
--- a/tests/ui/const-generics/issues/issue-88119.stderr
+++ b/tests/ui/const-generics/issues/issue-88119.stderr
@@ -6,7 +6,7 @@ LL | #![feature(const_trait_impl, generic_const_exprs)]
    |
    = help: remove one of these features
 
-error[E0275]: overflow evaluating the requirement `&T: ~const ConstName`
+error[E0275]: overflow evaluating the requirement `&T: [const] ConstName`
   --> $DIR/issue-88119.rs:19:49
    |
 LL | impl<T: ?Sized + ConstName> const ConstName for &T
@@ -42,7 +42,7 @@ note: required by a bound in `<&T as ConstName>`
 LL |     [(); name_len::<T>()]:,
    |     ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `<&T as ConstName>`
 
-error[E0275]: overflow evaluating the requirement `&mut T: ~const ConstName`
+error[E0275]: overflow evaluating the requirement `&mut T: [const] ConstName`
   --> $DIR/issue-88119.rs:26:49
    |
 LL | impl<T: ?Sized + ConstName> const ConstName for &mut T
diff --git a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr
index d95a8861230..586c96011e4 100644
--- a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr
+++ b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr
@@ -2,9 +2,12 @@ error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/ice-type-mismatch-when-copying-112824.rs:5:21
    |
 LL | pub struct Opcode2(&'a S);
-   |                   - ^^ undeclared lifetime
-   |                   |
-   |                   help: consider introducing lifetime `'a` here: `<'a>`
+   |                     ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | pub struct Opcode2<'a>(&'a S);
+   |                   ++++
 
 error[E0412]: cannot find type `S` in this scope
   --> $DIR/ice-type-mismatch-when-copying-112824.rs:5:24
diff --git a/tests/ui/consts/const-block-const-bound.rs b/tests/ui/consts/const-block-const-bound.rs
index b4b89a93e75..1847c880a39 100644
--- a/tests/ui/consts/const-block-const-bound.rs
+++ b/tests/ui/consts/const-block-const-bound.rs
@@ -3,7 +3,7 @@
 
 use std::marker::Destruct;
 
-const fn f<T: ~const Destruct>(x: T) {}
+const fn f<T: [const] Destruct>(x: T) {}
 
 struct UnconstDrop;
 
diff --git a/tests/ui/consts/const-block-const-bound.stderr b/tests/ui/consts/const-block-const-bound.stderr
index 624772f5aed..b6c8027918f 100644
--- a/tests/ui/consts/const-block-const-bound.stderr
+++ b/tests/ui/consts/const-block-const-bound.stderr
@@ -9,8 +9,8 @@ LL |         f(UnconstDrop);
 note: required by a bound in `f`
   --> $DIR/const-block-const-bound.rs:6:15
    |
-LL | const fn f<T: ~const Destruct>(x: T) {}
-   |               ^^^^^^^^^^^^^^^ required by this bound in `f`
+LL | const fn f<T: [const] Destruct>(x: T) {}
+   |               ^^^^^^^^^^^^^^^^ required by this bound in `f`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/format.stderr b/tests/ui/consts/const-eval/format.stderr
index 2f202705b7f..bd50ac0bf41 100644
--- a/tests/ui/consts/const-eval/format.stderr
+++ b/tests/ui/consts/const-eval/format.stderr
@@ -13,7 +13,7 @@ LL |     println!("{:?}", 0);
    |     ^^^^^^^^^^^^^^^^^^^
    |
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-   = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0015]: cannot call non-const function `_print` in constant functions
   --> $DIR/format.rs:7:5
diff --git a/tests/ui/consts/const-mut-refs/issue-76510.rs b/tests/ui/consts/const-mut-refs/issue-76510.rs
index 6ebbd4e50f6..a6f7540dd59 100644
--- a/tests/ui/consts/const-mut-refs/issue-76510.rs
+++ b/tests/ui/consts/const-mut-refs/issue-76510.rs
@@ -1,7 +1,7 @@
 use std::mem::{transmute, ManuallyDrop};
 
 const S: &'static mut str = &mut " hello ";
-//~^ ERROR: mutable references are not allowed in the final value of constants
+//~^ ERROR: mutable borrows of temporaries
 
 const fn trigger() -> [(); unsafe {
         let s = transmute::<(*const u8, usize), &ManuallyDrop<str>>((S.as_ptr(), 3));
diff --git a/tests/ui/consts/const-mut-refs/issue-76510.stderr b/tests/ui/consts/const-mut-refs/issue-76510.stderr
index aff86e83578..3a6c95141e5 100644
--- a/tests/ui/consts/const-mut-refs/issue-76510.stderr
+++ b/tests/ui/consts/const-mut-refs/issue-76510.stderr
@@ -1,8 +1,12 @@
-error[E0764]: mutable references are not allowed in the final value of constants
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/issue-76510.rs:3:29
    |
 LL | const S: &'static mut str = &mut " hello ";
-   |                             ^^^^^^^^^^^^^^
+   |                             ^^^^^^^^^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final.rs b/tests/ui/consts/const-mut-refs/mut_ref_in_final.rs
index 28facc18886..9f9384adeb7 100644
--- a/tests/ui/consts/const-mut-refs/mut_ref_in_final.rs
+++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final.rs
@@ -12,13 +12,13 @@ const A: *const i32 = &4;
 // It could be made sound to allow it to compile,
 // but we do not want to allow this to compile,
 // as that would be an enormous footgun in oli-obk's opinion.
-const B: *mut i32 = &mut 4; //~ ERROR mutable references are not allowed
+const B: *mut i32 = &mut 4; //~ ERROR mutable borrows of temporaries
 
 // Ok, no actual mutable allocation exists
 const B2: Option<&mut i32> = None;
 
 // Not ok, can't prove that no mutable allocation ends up in final value
-const B3: Option<&mut i32> = Some(&mut 42); //~ ERROR mutable references are not allowed
+const B3: Option<&mut i32> = Some(&mut 42); //~ ERROR mutable borrows of temporaries
 
 const fn helper(x: &mut i32) -> Option<&mut i32> { Some(x) }
 const B4: Option<&mut i32> = helper(&mut 42); //~ ERROR temporary value dropped while borrowed
@@ -26,8 +26,10 @@ const B4: Option<&mut i32> = helper(&mut 42); //~ ERROR temporary value dropped
 // Not ok, since it points to read-only memory.
 const IMMUT_MUT_REF: &mut u16 = unsafe { mem::transmute(&13) };
 //~^ ERROR pointing to read-only memory
+static IMMUT_MUT_REF_STATIC: &mut u16 = unsafe { mem::transmute(&13) };
+//~^ ERROR pointing to read-only memory
 
-// Ok, because no references to mutable data exist here, since the `{}` moves
+// Ok, because no borrows of mutable data exist here, since the `{}` moves
 // its value and then takes a reference to that.
 const C: *const i32 = &{
     let mut x = 42;
@@ -67,13 +69,13 @@ unsafe impl<T> Sync for SyncPtr<T> {}
 // (This relies on `SyncPtr` being a curly brace struct.)
 // However, we intern the inner memory as read-only, so this must be rejected.
 static RAW_MUT_CAST_S: SyncPtr<i32> = SyncPtr { x : &mut 42 as *mut _ as *const _ };
-//~^ ERROR mutable references are not allowed
+//~^ ERROR mutable borrows of temporaries
 static RAW_MUT_COERCE_S: SyncPtr<i32> = SyncPtr { x: &mut 0 };
-//~^ ERROR mutable references are not allowed
+//~^ ERROR mutable borrows of temporaries
 const RAW_MUT_CAST_C: SyncPtr<i32> = SyncPtr { x : &mut 42 as *mut _ as *const _ };
-//~^ ERROR mutable references are not allowed
+//~^ ERROR mutable borrows of temporaries
 const RAW_MUT_COERCE_C: SyncPtr<i32> = SyncPtr { x: &mut 0 };
-//~^ ERROR mutable references are not allowed
+//~^ ERROR mutable borrows of temporaries
 
 fn main() {
     println!("{}", unsafe { *A });
diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final.stderr
index 122e5c1bdf0..16dee44d800 100644
--- a/tests/ui/consts/const-mut-refs/mut_ref_in_final.stderr
+++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final.stderr
@@ -1,14 +1,22 @@
-error[E0764]: mutable references are not allowed in the final value of constants
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/mut_ref_in_final.rs:15:21
    |
 LL | const B: *mut i32 = &mut 4;
-   |                     ^^^^^^
+   |                     ^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
-error[E0764]: mutable references are not allowed in the final value of constants
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/mut_ref_in_final.rs:21:35
    |
 LL | const B3: Option<&mut i32> = Some(&mut 42);
-   |                                   ^^^^^^^
+   |                                   ^^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error[E0716]: temporary value dropped while borrowed
   --> $DIR/mut_ref_in_final.rs:24:42
@@ -31,8 +39,19 @@ LL | const IMMUT_MUT_REF: &mut u16 = unsafe { mem::transmute(&13) };
                HEX_DUMP
            }
 
+error[E0080]: constructing invalid value: encountered mutable reference or box pointing to read-only memory
+  --> $DIR/mut_ref_in_final.rs:29:1
+   |
+LL | static IMMUT_MUT_REF_STATIC: &mut u16 = unsafe { mem::transmute(&13) };
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
+   |
+   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
+   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
+
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/mut_ref_in_final.rs:50:65
+  --> $DIR/mut_ref_in_final.rs:52:65
    |
 LL | const FOO: NotAMutex<&mut i32> = NotAMutex(UnsafeCell::new(&mut 42));
    |                                  -------------------------------^^--
@@ -42,7 +61,7 @@ LL | const FOO: NotAMutex<&mut i32> = NotAMutex(UnsafeCell::new(&mut 42));
    |                                  using this value as a constant requires that borrow lasts for `'static`
 
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/mut_ref_in_final.rs:53:67
+  --> $DIR/mut_ref_in_final.rs:55:67
    |
 LL | static FOO2: NotAMutex<&mut i32> = NotAMutex(UnsafeCell::new(&mut 42));
    |                                    -------------------------------^^--
@@ -52,7 +71,7 @@ LL | static FOO2: NotAMutex<&mut i32> = NotAMutex(UnsafeCell::new(&mut 42));
    |                                    using this value as a static requires that borrow lasts for `'static`
 
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/mut_ref_in_final.rs:56:71
+  --> $DIR/mut_ref_in_final.rs:58:71
    |
 LL | static mut FOO3: NotAMutex<&mut i32> = NotAMutex(UnsafeCell::new(&mut 42));
    |                                        -------------------------------^^--
@@ -61,31 +80,47 @@ LL | static mut FOO3: NotAMutex<&mut i32> = NotAMutex(UnsafeCell::new(&mut 42));
    |                                        |                              creates a temporary value which is freed while still in use
    |                                        using this value as a static requires that borrow lasts for `'static`
 
-error[E0764]: mutable references are not allowed in the final value of statics
-  --> $DIR/mut_ref_in_final.rs:69:53
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
+  --> $DIR/mut_ref_in_final.rs:71:53
    |
 LL | static RAW_MUT_CAST_S: SyncPtr<i32> = SyncPtr { x : &mut 42 as *mut _ as *const _ };
-   |                                                     ^^^^^^^
+   |                                                     ^^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
-error[E0764]: mutable references are not allowed in the final value of statics
-  --> $DIR/mut_ref_in_final.rs:71:54
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
+  --> $DIR/mut_ref_in_final.rs:73:54
    |
 LL | static RAW_MUT_COERCE_S: SyncPtr<i32> = SyncPtr { x: &mut 0 };
-   |                                                      ^^^^^^
+   |                                                      ^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
-error[E0764]: mutable references are not allowed in the final value of constants
-  --> $DIR/mut_ref_in_final.rs:73:52
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
+  --> $DIR/mut_ref_in_final.rs:75:52
    |
 LL | const RAW_MUT_CAST_C: SyncPtr<i32> = SyncPtr { x : &mut 42 as *mut _ as *const _ };
-   |                                                    ^^^^^^^
+   |                                                    ^^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
-error[E0764]: mutable references are not allowed in the final value of constants
-  --> $DIR/mut_ref_in_final.rs:75:53
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
+  --> $DIR/mut_ref_in_final.rs:77:53
    |
 LL | const RAW_MUT_COERCE_C: SyncPtr<i32> = SyncPtr { x: &mut 0 };
-   |                                                     ^^^^^^
+   |                                                     ^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
-error: aborting due to 11 previous errors
+error: aborting due to 12 previous errors
 
 Some errors have detailed explanations: E0080, E0716, E0764.
 For more information about an error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs
index 2707e8a14ec..1ae901f1653 100644
--- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs
+++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs
@@ -16,7 +16,7 @@ static mut BUFFER: i32 = 42;
 const fn helper() -> Option<&'static mut i32> { unsafe {
     Some(&mut *std::ptr::addr_of_mut!(BUFFER))
 } }
-const MUT: Option<&mut i32> = helper(); //~ ERROR encountered reference to mutable
+const MUT: Option<&mut i32> = helper(); //~ ERROR encountered mutable reference
 
 const fn helper_int2ptr() -> Option<&'static mut i32> { unsafe {
     // Undefined behaviour (integer as pointer), who doesn't love tests like this.
diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr
index 6456587b77a..302e342bce6 100644
--- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr
+++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr
@@ -1,4 +1,4 @@
-error[E0080]: constructing invalid value at .<enum-variant(Some)>.0: encountered reference to mutable memory in `const`
+error[E0080]: constructing invalid value at .<enum-variant(Some)>.0: encountered mutable reference in `const` value
   --> $DIR/mut_ref_in_final_dynamic_check.rs:19:1
    |
 LL | const MUT: Option<&mut i32> = helper();
diff --git a/tests/ui/consts/const-promoted-opaque.atomic.stderr b/tests/ui/consts/const-promoted-opaque.atomic.stderr
index 9c0c969d586..64cc7b3a329 100644
--- a/tests/ui/consts/const-promoted-opaque.atomic.stderr
+++ b/tests/ui/consts/const-promoted-opaque.atomic.stderr
@@ -7,11 +7,15 @@ LL |
 LL | };
    | - value is dropped here
 
-error[E0492]: constants cannot refer to interior mutable data
+error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/const-promoted-opaque.rs:36:19
    |
 LL | const BAZ: &Foo = &FOO;
-   |                   ^^^^ this borrow of an interior mutable value may end up in the final value
+   |                   ^^^^ this borrow of an interior mutable value refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error[E0716]: temporary value dropped while borrowed
   --> $DIR/const-promoted-opaque.rs:40:26
diff --git a/tests/ui/consts/const-promoted-opaque.rs b/tests/ui/consts/const-promoted-opaque.rs
index 188dacd1003..270dddbb4a2 100644
--- a/tests/ui/consts/const-promoted-opaque.rs
+++ b/tests/ui/consts/const-promoted-opaque.rs
@@ -34,7 +34,7 @@ const BAR: () = {
 };
 
 const BAZ: &Foo = &FOO;
-//[atomic]~^ ERROR: constants cannot refer to interior mutable data
+//[atomic]~^ ERROR: interior mutable shared borrows of temporaries
 
 fn main() {
     let _: &'static _ = &FOO;
diff --git a/tests/ui/consts/const-size_of-cycle.stderr b/tests/ui/consts/const-size_of-cycle.stderr
index bf17d76a092..b127f83d885 100644
--- a/tests/ui/consts/const-size_of-cycle.stderr
+++ b/tests/ui/consts/const-size_of-cycle.stderr
@@ -11,13 +11,17 @@ LL |     bytes: [u8; std::mem::size_of::<Foo>()]
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: ...which requires computing layout of `Foo`...
    = note: ...which requires computing layout of `[u8; std::mem::size_of::<Foo>()]`...
-   = note: ...which requires normalizing `[u8; std::mem::size_of::<Foo>()]`...
+note: ...which requires normalizing `[u8; std::mem::size_of::<Foo>()]`...
+  --> $DIR/const-size_of-cycle.rs:2:17
+   |
+LL |     bytes: [u8; std::mem::size_of::<Foo>()]
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: ...which again requires evaluating type-level constant, completing the cycle
 note: cycle used when checking that `Foo` is well-formed
-  --> $DIR/const-size_of-cycle.rs:1:1
+  --> $DIR/const-size_of-cycle.rs:2:17
    |
-LL | struct Foo {
-   | ^^^^^^^^^^
+LL |     bytes: [u8; std::mem::size_of::<Foo>()]
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
    = 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: aborting due to 1 previous error
diff --git a/tests/ui/consts/const_cmp_type_id.rs b/tests/ui/consts/const_cmp_type_id.rs
index e89b8d37787..dca0615083a 100644
--- a/tests/ui/consts/const_cmp_type_id.rs
+++ b/tests/ui/consts/const_cmp_type_id.rs
@@ -6,11 +6,10 @@ use std::any::TypeId;
 fn main() {
     const {
         assert!(TypeId::of::<u8>() == TypeId::of::<u8>());
-        //~^ ERROR cannot call non-const operator in constants
+        //~^ ERROR the trait bound `TypeId: const PartialEq` is not satisfied
         assert!(TypeId::of::<()>() != TypeId::of::<u8>());
-        //~^ ERROR cannot call non-const operator in constants
+        //~^ ERROR the trait bound `TypeId: const PartialEq` is not satisfied
         let _a = TypeId::of::<u8>() < TypeId::of::<u16>();
-        //~^ ERROR cannot call non-const operator in constants
         // can't assert `_a` because it is not deterministic
         // FIXME(const_trait_impl) make it pass
     }
diff --git a/tests/ui/consts/const_cmp_type_id.stderr b/tests/ui/consts/const_cmp_type_id.stderr
index 62f8d42c0e6..a8242a200ef 100644
--- a/tests/ui/consts/const_cmp_type_id.stderr
+++ b/tests/ui/consts/const_cmp_type_id.stderr
@@ -1,33 +1,15 @@
-error[E0015]: cannot call non-const operator in constants
+error[E0277]: the trait bound `TypeId: const PartialEq` is not satisfied
   --> $DIR/const_cmp_type_id.rs:8:17
    |
 LL |         assert!(TypeId::of::<u8>() == TypeId::of::<u8>());
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: impl defined here, but it is not `const`
-  --> $SRC_DIR/core/src/any.rs:LL:COL
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
 
-error[E0015]: cannot call non-const operator in constants
+error[E0277]: the trait bound `TypeId: const PartialEq` is not satisfied
   --> $DIR/const_cmp_type_id.rs:10:17
    |
 LL |         assert!(TypeId::of::<()>() != TypeId::of::<u8>());
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: impl defined here, but it is not `const`
-  --> $SRC_DIR/core/src/any.rs:LL:COL
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-
-error[E0015]: cannot call non-const operator in constants
-  --> $DIR/const_cmp_type_id.rs:12:18
-   |
-LL |         let _a = TypeId::of::<u8>() < TypeId::of::<u16>();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: impl defined here, but it is not `const`
-  --> $SRC_DIR/core/src/any.rs:LL:COL
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0015`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/consts/const_refs_to_static.rs b/tests/ui/consts/const_refs_to_static.rs
index 3c59697e8ed..187fab86a89 100644
--- a/tests/ui/consts/const_refs_to_static.rs
+++ b/tests/ui/consts/const_refs_to_static.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+use std::sync::atomic::AtomicU32;
 
 static S: i32 = 0;
 static mut S_MUT: i32 = 0;
@@ -10,9 +11,13 @@ const C1_READ: () = {
 };
 const C2: *const i32 = std::ptr::addr_of!(S_MUT);
 
+static FOO: AtomicU32 = AtomicU32::new(0);
+const NOT_VALID_AS_PATTERN: &'static AtomicU32 = &FOO;
+
 fn main() {
     assert_eq!(*C1, 0);
     assert_eq!(unsafe { *C2 }, 0);
     // Computing this pattern will read from an immutable static. That's fine.
     assert!(matches!(&0, C1));
+    let _val = NOT_VALID_AS_PATTERN;
 }
diff --git a/tests/ui/consts/const_refs_to_static_fail.rs b/tests/ui/consts/const_refs_to_static_fail.rs
index b8bab91e005..5bb9ca0a65e 100644
--- a/tests/ui/consts/const_refs_to_static_fail.rs
+++ b/tests/ui/consts/const_refs_to_static_fail.rs
@@ -9,13 +9,23 @@ use std::cell::SyncUnsafeCell;
 static S: SyncUnsafeCell<i32> = SyncUnsafeCell::new(0);
 static mut S_MUT: i32 = 0;
 
-const C1: &SyncUnsafeCell<i32> = &S; //~ERROR encountered reference to mutable memory
+const C1: &SyncUnsafeCell<i32> = &S;
 const C1_READ: () = unsafe {
-    assert!(*C1.get() == 0);
+    assert!(*C1.get() == 0); //~ERROR constant accesses mutable global memory
 };
 const C2: *const i32 = unsafe { std::ptr::addr_of!(S_MUT) };
 const C2_READ: () = unsafe {
     assert!(*C2 == 0); //~ERROR constant accesses mutable global memory
 };
 
-fn main() {}
+const BAD_PATTERN: &i32 = {
+    static mut S: i32 = 0;
+    unsafe { &mut S }
+};
+
+fn main() {
+    match &0 {
+        BAD_PATTERN => {}, //~ ERROR cannot be used as pattern
+        _ => {},
+    }
+}
diff --git a/tests/ui/consts/const_refs_to_static_fail.stderr b/tests/ui/consts/const_refs_to_static_fail.stderr
index 86d6c11dc0c..c567b3e0ce1 100644
--- a/tests/ui/consts/const_refs_to_static_fail.stderr
+++ b/tests/ui/consts/const_refs_to_static_fail.stderr
@@ -1,19 +1,8 @@
-error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
-  --> $DIR/const_refs_to_static_fail.rs:12:1
-   |
-LL | const C1: &SyncUnsafeCell<i32> = &S;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
-   |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
-
-note: erroneous constant encountered
-  --> $DIR/const_refs_to_static_fail.rs:14:14
+error[E0080]: constant accesses mutable global memory
+  --> $DIR/const_refs_to_static_fail.rs:14:13
    |
 LL |     assert!(*C1.get() == 0);
-   |              ^^
+   |             ^^^^^^^^^ evaluation of `C1_READ` failed here
 
 error[E0080]: constant accesses mutable global memory
   --> $DIR/const_refs_to_static_fail.rs:18:13
@@ -21,6 +10,14 @@ error[E0080]: constant accesses mutable global memory
 LL |     assert!(*C2 == 0);
    |             ^^^ evaluation of `C2_READ` failed here
 
-error: aborting due to 2 previous errors
+error: constant BAD_PATTERN cannot be used as pattern
+  --> $DIR/const_refs_to_static_fail.rs:28:9
+   |
+LL |         BAD_PATTERN => {},
+   |         ^^^^^^^^^^^
+   |
+   = note: constants that reference mutable or external memory cannot be used as pattern
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const_refs_to_static_fail_invalid.rs b/tests/ui/consts/const_refs_to_static_fail_invalid.rs
index 34ed8540f3f..229b9fdcc60 100644
--- a/tests/ui/consts/const_refs_to_static_fail_invalid.rs
+++ b/tests/ui/consts/const_refs_to_static_fail_invalid.rs
@@ -23,11 +23,10 @@ fn extern_() {
     }
 
     const C: &i8 = unsafe { &S };
-    //~^ERROR: `extern` static
 
     // This must be rejected here (or earlier), since the pattern cannot be read.
     match &0 {
-        C => {} // ok, `const` already emitted an error
+        C => {} //~ ERROR cannot be used as pattern
         _ => {}
     }
 }
@@ -36,12 +35,11 @@ fn mutable() {
     static mut S_MUT: i32 = 0;
 
     const C: &i32 = unsafe { &S_MUT };
-    //~^ERROR: encountered reference to mutable memory
 
     // This *must not build*, the constant we are matching against
     // could change its value!
     match &42 {
-        C => {} // ok, `const` already emitted an error
+        C => {} //~ ERROR cannot be used as pattern
         _ => {}
     }
 }
diff --git a/tests/ui/consts/const_refs_to_static_fail_invalid.stderr b/tests/ui/consts/const_refs_to_static_fail_invalid.stderr
index 8a034aa00bc..8be8b4bc50f 100644
--- a/tests/ui/consts/const_refs_to_static_fail_invalid.stderr
+++ b/tests/ui/consts/const_refs_to_static_fail_invalid.stderr
@@ -9,27 +9,21 @@ LL |     const C: &bool = unsafe { std::mem::transmute(&S) };
                HEX_DUMP
            }
 
-error[E0080]: constructing invalid value: encountered reference to `extern` static in `const`
-  --> $DIR/const_refs_to_static_fail_invalid.rs:25:5
+error: constant extern_::C cannot be used as pattern
+  --> $DIR/const_refs_to_static_fail_invalid.rs:29:9
    |
-LL |     const C: &i8 = unsafe { &S };
-   |     ^^^^^^^^^^^^ it is undefined behavior to use this value
+LL |         C => {}
+   |         ^
    |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
+   = note: constants that reference mutable or external memory cannot be used as pattern
 
-error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
-  --> $DIR/const_refs_to_static_fail_invalid.rs:38:5
+error: constant mutable::C cannot be used as pattern
+  --> $DIR/const_refs_to_static_fail_invalid.rs:42:9
    |
-LL |     const C: &i32 = unsafe { &S_MUT };
-   |     ^^^^^^^^^^^^^ it is undefined behavior to use this value
+LL |         C => {}
+   |         ^
    |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
+   = note: constants that reference mutable or external memory cannot be used as pattern
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/consts/constifconst-call-in-const-position.rs b/tests/ui/consts/constifconst-call-in-const-position.rs
index 80e47c2230f..da29030dbc7 100644
--- a/tests/ui/consts/constifconst-call-in-const-position.rs
+++ b/tests/ui/consts/constifconst-call-in-const-position.rs
@@ -14,7 +14,7 @@ impl Tr for () {
     }
 }
 
-const fn foo<T: ~const Tr>() -> [u8; T::a()] {
+const fn foo<T: [const] Tr>() -> [u8; T::a()] {
     [0; T::a()]
 }
 
diff --git a/tests/ui/consts/constifconst-call-in-const-position.stderr b/tests/ui/consts/constifconst-call-in-const-position.stderr
index c778299560f..e84e686251a 100644
--- a/tests/ui/consts/constifconst-call-in-const-position.stderr
+++ b/tests/ui/consts/constifconst-call-in-const-position.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `T: const Tr` is not satisfied
-  --> $DIR/constifconst-call-in-const-position.rs:17:38
+  --> $DIR/constifconst-call-in-const-position.rs:17:39
    |
-LL | const fn foo<T: ~const Tr>() -> [u8; T::a()] {
-   |                                      ^
+LL | const fn foo<T: [const] Tr>() -> [u8; T::a()] {
+   |                                       ^
 
 error[E0277]: the trait bound `T: const Tr` is not satisfied
   --> $DIR/constifconst-call-in-const-position.rs:18:9
diff --git a/tests/ui/consts/fn_trait_refs.rs b/tests/ui/consts/fn_trait_refs.rs
index af233efd738..e475c0a1b6f 100644
--- a/tests/ui/consts/fn_trait_refs.rs
+++ b/tests/ui/consts/fn_trait_refs.rs
@@ -11,47 +11,47 @@ use std::marker::Destruct;
 
 const fn tester_fn<T>(f: T) -> T::Output
 where
-    T: ~const Fn<()> + ~const Destruct,
+    T: [const] Fn<()> + [const] Destruct,
 {
     f()
 }
 
 const fn tester_fn_mut<T>(mut f: T) -> T::Output
 where
-    T: ~const FnMut<()> + ~const Destruct,
+    T: [const] FnMut<()> + [const] Destruct,
 {
     f()
 }
 
 const fn tester_fn_once<T>(f: T) -> T::Output
 where
-    T: ~const FnOnce<()>,
+    T: [const] FnOnce<()>,
 {
     f()
 }
 
 const fn test_fn<T>(mut f: T) -> (T::Output, T::Output, T::Output)
 where
-    T: ~const Fn<()> + ~const Destruct,
+    T: [const] Fn<()> + [const] Destruct,
 {
     (
-        // impl<A: Tuple, F: ~const Fn + ?Sized> const Fn<A> for &F
+        // impl<A: Tuple, F: [const] Fn + ?Sized> const Fn<A> for &F
         tester_fn(&f),
-        // impl<A: Tuple, F: ~const Fn + ?Sized> const FnMut<A> for &F
+        // impl<A: Tuple, F: [const] Fn + ?Sized> const FnMut<A> for &F
         tester_fn_mut(&f),
-        // impl<A: Tuple, F: ~const Fn + ?Sized> const FnOnce<A> for &F
+        // impl<A: Tuple, F: [const] Fn + ?Sized> const FnOnce<A> for &F
         tester_fn_once(&f),
     )
 }
 
 const fn test_fn_mut<T>(mut f: T) -> (T::Output, T::Output)
 where
-    T: ~const FnMut<()> + ~const Destruct,
+    T: [const] FnMut<()> + [const] Destruct,
 {
     (
-        // impl<A: Tuple, F: ~const FnMut + ?Sized> const FnMut<A> for &mut F
+        // impl<A: Tuple, F: [const] FnMut + ?Sized> const FnMut<A> for &mut F
         tester_fn_mut(&mut f),
-        // impl<A: Tuple, F: ~const FnMut + ?Sized> const FnOnce<A> for &mut F
+        // impl<A: Tuple, F: [const] FnMut + ?Sized> const FnOnce<A> for &mut F
         tester_fn_once(&mut f),
     )
 }
diff --git a/tests/ui/consts/fn_trait_refs.stderr b/tests/ui/consts/fn_trait_refs.stderr
index d688bfbde2b..ee716c932e8 100644
--- a/tests/ui/consts/fn_trait_refs.stderr
+++ b/tests/ui/consts/fn_trait_refs.stderr
@@ -4,172 +4,162 @@ error[E0635]: unknown feature `const_fn_trait_ref_impls`
 LL | #![feature(const_fn_trait_ref_impls)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0635]: unknown feature `const_cmp`
-  --> $DIR/fn_trait_refs.rs:7:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:14:6
    |
-LL | #![feature(const_cmp)]
-   |            ^^^^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:14:8
-   |
-LL |     T: ~const Fn<()> + ~const Destruct,
-   |        ^^^^^^ can't be applied to `Fn`
+LL |     T: [const] Fn<()> + [const] Destruct,
+   |      ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:14:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:14:6
    |
-LL |     T: ~const Fn<()> + ~const Destruct,
-   |        ^^^^^^ can't be applied to `Fn`
+LL |     T: [const] Fn<()> + [const] Destruct,
+   |      ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:14:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:14:6
    |
-LL |     T: ~const Fn<()> + ~const Destruct,
-   |        ^^^^^^ can't be applied to `Fn`
+LL |     T: [const] Fn<()> + [const] Destruct,
+   |      ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:21:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:21:6
    |
-LL |     T: ~const FnMut<()> + ~const Destruct,
-   |        ^^^^^^ can't be applied to `FnMut`
+LL |     T: [const] FnMut<()> + [const] Destruct,
+   |      ^^^^^^^^^ can't be applied to `FnMut`
    |
-note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:21:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:21:6
    |
-LL |     T: ~const FnMut<()> + ~const Destruct,
-   |        ^^^^^^ can't be applied to `FnMut`
+LL |     T: [const] FnMut<()> + [const] Destruct,
+   |      ^^^^^^^^^ can't be applied to `FnMut`
    |
-note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:21:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:21:6
    |
-LL |     T: ~const FnMut<()> + ~const Destruct,
-   |        ^^^^^^ can't be applied to `FnMut`
+LL |     T: [const] FnMut<()> + [const] Destruct,
+   |      ^^^^^^^^^ can't be applied to `FnMut`
    |
-note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:28:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:28:6
    |
-LL |     T: ~const FnOnce<()>,
-   |        ^^^^^^ can't be applied to `FnOnce`
+LL |     T: [const] FnOnce<()>,
+   |      ^^^^^^^^^ can't be applied to `FnOnce`
    |
-note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:28:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:28:6
    |
-LL |     T: ~const FnOnce<()>,
-   |        ^^^^^^ can't be applied to `FnOnce`
+LL |     T: [const] FnOnce<()>,
+   |      ^^^^^^^^^ can't be applied to `FnOnce`
    |
-note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:28:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:28:6
    |
-LL |     T: ~const FnOnce<()>,
-   |        ^^^^^^ can't be applied to `FnOnce`
+LL |     T: [const] FnOnce<()>,
+   |      ^^^^^^^^^ can't be applied to `FnOnce`
    |
-note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:35:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:35:6
    |
-LL |     T: ~const Fn<()> + ~const Destruct,
-   |        ^^^^^^ can't be applied to `Fn`
+LL |     T: [const] Fn<()> + [const] Destruct,
+   |      ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:35:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:35:6
    |
-LL |     T: ~const Fn<()> + ~const Destruct,
-   |        ^^^^^^ can't be applied to `Fn`
+LL |     T: [const] Fn<()> + [const] Destruct,
+   |      ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:35:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:35:6
    |
-LL |     T: ~const Fn<()> + ~const Destruct,
-   |        ^^^^^^ can't be applied to `Fn`
+LL |     T: [const] Fn<()> + [const] Destruct,
+   |      ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:49:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:49:6
    |
-LL |     T: ~const FnMut<()> + ~const Destruct,
-   |        ^^^^^^ can't be applied to `FnMut`
+LL |     T: [const] FnMut<()> + [const] Destruct,
+   |      ^^^^^^^^^ can't be applied to `FnMut`
    |
-note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:49:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:49:6
    |
-LL |     T: ~const FnMut<()> + ~const Destruct,
-   |        ^^^^^^ can't be applied to `FnMut`
+LL |     T: [const] FnMut<()> + [const] Destruct,
+   |      ^^^^^^^^^ can't be applied to `FnMut`
    |
-note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:49:8
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/fn_trait_refs.rs:49:6
    |
-LL |     T: ~const FnMut<()> + ~const Destruct,
-   |        ^^^^^^ can't be applied to `FnMut`
+LL |     T: [const] FnMut<()> + [const] Destruct,
+   |      ^^^^^^^^^ can't be applied to `FnMut`
    |
-note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0015]: cannot call non-const operator in constants
+error[E0277]: the trait bound `(i32, i32, i32): const PartialEq` is not satisfied
   --> $DIR/fn_trait_refs.rs:71:17
    |
 LL |         assert!(test_one == (1, 1, 1));
    |                 ^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
 
-error[E0015]: cannot call non-const operator in constants
+error[E0277]: the trait bound `(i32, i32): const PartialEq` is not satisfied
   --> $DIR/fn_trait_refs.rs:74:17
    |
 LL |         assert!(test_two == (2, 2));
    |                 ^^^^^^^^^^^^^^^^^^
-   |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
 
 error[E0015]: cannot call non-const closure in constant functions
   --> $DIR/fn_trait_refs.rs:16:5
@@ -195,7 +185,7 @@ LL |     f()
    |
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
 
-error: aborting due to 22 previous errors
+error: aborting due to 21 previous errors
 
-Some errors have detailed explanations: E0015, E0635.
+Some errors have detailed explanations: E0015, E0277, E0635.
 For more information about an error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/issue-17718-const-bad-values.rs b/tests/ui/consts/issue-17718-const-bad-values.rs
index 40fc02cf644..a447350e35b 100644
--- a/tests/ui/consts/issue-17718-const-bad-values.rs
+++ b/tests/ui/consts/issue-17718-const-bad-values.rs
@@ -5,10 +5,10 @@
 #![allow(static_mut_refs)]
 
 const C1: &'static mut [usize] = &mut [];
-//~^ ERROR: mutable references are not allowed
+//~^ ERROR: mutable borrows of temporaries
 
 static mut S: i32 = 3;
 const C2: &'static mut i32 = unsafe { &mut S };
-//~^ ERROR: reference to mutable memory
+//~^ ERROR: encountered mutable reference
 
 fn main() {}
diff --git a/tests/ui/consts/issue-17718-const-bad-values.stderr b/tests/ui/consts/issue-17718-const-bad-values.stderr
index effb614b15b..68d1a72b71e 100644
--- a/tests/ui/consts/issue-17718-const-bad-values.stderr
+++ b/tests/ui/consts/issue-17718-const-bad-values.stderr
@@ -1,10 +1,14 @@
-error[E0764]: mutable references are not allowed in the final value of constants
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/issue-17718-const-bad-values.rs:7:34
    |
 LL | const C1: &'static mut [usize] = &mut [];
-   |                                  ^^^^^^^
+   |                                  ^^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
-error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
+error[E0080]: constructing invalid value: encountered mutable reference in `const` value
   --> $DIR/issue-17718-const-bad-values.rs:11:1
    |
 LL | const C2: &'static mut i32 = unsafe { &mut S };
diff --git a/tests/ui/consts/issue-17718-const-borrow.rs b/tests/ui/consts/issue-17718-const-borrow.rs
index 89316dbd5c4..63733332591 100644
--- a/tests/ui/consts/issue-17718-const-borrow.rs
+++ b/tests/ui/consts/issue-17718-const-borrow.rs
@@ -2,13 +2,13 @@ use std::cell::UnsafeCell;
 
 const A: UnsafeCell<usize> = UnsafeCell::new(1);
 const B: &'static UnsafeCell<usize> = &A;
-//~^ ERROR: cannot refer to interior mutable
+//~^ ERROR: interior mutable shared borrows of temporaries
 
 struct C { a: UnsafeCell<usize> }
 const D: C = C { a: UnsafeCell::new(1) };
 const E: &'static UnsafeCell<usize> = &D.a;
-//~^ ERROR: cannot refer to interior mutable
+//~^ ERROR: interior mutable shared borrows of temporaries
 const F: &'static C = &D;
-//~^ ERROR: cannot refer to interior mutable
+//~^ ERROR: interior mutable shared borrows of temporaries
 
 fn main() {}
diff --git a/tests/ui/consts/issue-17718-const-borrow.stderr b/tests/ui/consts/issue-17718-const-borrow.stderr
index e3ff6c923ad..420a2c378a2 100644
--- a/tests/ui/consts/issue-17718-const-borrow.stderr
+++ b/tests/ui/consts/issue-17718-const-borrow.stderr
@@ -1,20 +1,32 @@
-error[E0492]: constants cannot refer to interior mutable data
+error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/issue-17718-const-borrow.rs:4:39
    |
 LL | const B: &'static UnsafeCell<usize> = &A;
-   |                                       ^^ this borrow of an interior mutable value may end up in the final value
+   |                                       ^^ this borrow of an interior mutable value refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
-error[E0492]: constants cannot refer to interior mutable data
+error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/issue-17718-const-borrow.rs:9:39
    |
 LL | const E: &'static UnsafeCell<usize> = &D.a;
-   |                                       ^^^^ this borrow of an interior mutable value may end up in the final value
+   |                                       ^^^^ this borrow of an interior mutable value refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
-error[E0492]: constants cannot refer to interior mutable data
+error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/issue-17718-const-borrow.rs:11:23
    |
 LL | const F: &'static C = &D;
-   |                       ^^ this borrow of an interior mutable value may end up in the final value
+   |                       ^^ this borrow of an interior mutable value refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/consts/issue-44415.stderr b/tests/ui/consts/issue-44415.stderr
index 641945fce9f..0e3f2e6199f 100644
--- a/tests/ui/consts/issue-44415.stderr
+++ b/tests/ui/consts/issue-44415.stderr
@@ -11,13 +11,17 @@ LL |     bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: ...which requires computing layout of `Foo`...
    = note: ...which requires computing layout of `[u8; unsafe { intrinsics::size_of::<Foo>() }]`...
-   = note: ...which requires normalizing `[u8; unsafe { intrinsics::size_of::<Foo>() }]`...
+note: ...which requires normalizing `[u8; unsafe { intrinsics::size_of::<Foo>() }]`...
+  --> $DIR/issue-44415.rs:6:17
+   |
+LL |     bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: ...which again requires evaluating type-level constant, completing the cycle
 note: cycle used when checking that `Foo` is well-formed
-  --> $DIR/issue-44415.rs:5:1
+  --> $DIR/issue-44415.rs:6:17
    |
-LL | struct Foo {
-   | ^^^^^^^^^^
+LL |     bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = 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: aborting due to 1 previous error
diff --git a/tests/ui/consts/issue-73976-monomorphic.stderr b/tests/ui/consts/issue-73976-monomorphic.stderr
index ef754b23ff0..367d5be09da 100644
--- a/tests/ui/consts/issue-73976-monomorphic.stderr
+++ b/tests/ui/consts/issue-73976-monomorphic.stderr
@@ -1,13 +1,9 @@
-error[E0015]: cannot call non-const operator in constant functions
+error[E0277]: the trait bound `TypeId: [const] PartialEq` is not satisfied
   --> $DIR/issue-73976-monomorphic.rs:21:5
    |
 LL |     GetTypeId::<T>::VALUE == GetTypeId::<usize>::VALUE
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: impl defined here, but it is not `const`
-  --> $SRC_DIR/core/src/any.rs:LL:COL
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
 
 error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0015`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/consts/issue-90870.rs b/tests/ui/consts/issue-90870.rs
index b62769a33f8..f807ae75ee5 100644
--- a/tests/ui/consts/issue-90870.rs
+++ b/tests/ui/consts/issue-90870.rs
@@ -3,22 +3,31 @@
 #![allow(dead_code)]
 
 const fn f(a: &u8, b: &u8) -> bool {
+    //~^ HELP: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+    //~| HELP: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+    //~| HELP: add `#![feature(const_trait_impl)]` to the crate attributes to enable
     a == b
-    //~^ ERROR: cannot call non-const operator in constant functions [E0015]
+    //~^ ERROR: cannot call conditionally-const operator in constant functions
+    //~| ERROR: `PartialEq` is not yet stable as a const trait
     //~| HELP: consider dereferencing here
+    //~| HELP: add `#![feature(const_trait_impl)]` to the crate attributes to enable
 }
 
 const fn g(a: &&&&i64, b: &&&&i64) -> bool {
     a == b
-    //~^ ERROR: cannot call non-const operator in constant functions [E0015]
+    //~^ ERROR: cannot call conditionally-const operator in constant functions
+    //~| ERROR: `PartialEq` is not yet stable as a const trait
     //~| HELP: consider dereferencing here
+    //~| HELP: add `#![feature(const_trait_impl)]` to the crate attributes to enable
 }
 
 const fn h(mut a: &[u8], mut b: &[u8]) -> bool {
     while let ([l, at @ ..], [r, bt @ ..]) = (a, b) {
         if l == r {
-        //~^ ERROR: cannot call non-const operator in constant functions [E0015]
+        //~^ ERROR: cannot call conditionally-const operator in constant functions
+        //~| ERROR: `PartialEq` is not yet stable as a const trait
         //~| HELP: consider dereferencing here
+        //~| HELP: add `#![feature(const_trait_impl)]` to the crate attributes to enable
             a = at;
             b = bt;
         } else {
diff --git a/tests/ui/consts/issue-90870.stderr b/tests/ui/consts/issue-90870.stderr
index ea987920d7d..8d6f21fd82f 100644
--- a/tests/ui/consts/issue-90870.stderr
+++ b/tests/ui/consts/issue-90870.stderr
@@ -1,39 +1,81 @@
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/issue-90870.rs:6:5
+error[E0658]: cannot call conditionally-const operator in constant functions
+  --> $DIR/issue-90870.rs:9:5
    |
 LL |     a == b
    |     ^^^^^^
    |
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
+   = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
+   = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 help: consider dereferencing here
    |
 LL |     *a == *b
    |     +     +
 
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/issue-90870.rs:12:5
+error: `PartialEq` is not yet stable as a const trait
+  --> $DIR/issue-90870.rs:9:5
+   |
+LL |     a == b
+   |     ^^^^^^
+   |
+help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+   |
+LL + #![feature(const_trait_impl)]
+   |
+
+error[E0658]: cannot call conditionally-const operator in constant functions
+  --> $DIR/issue-90870.rs:17:5
    |
 LL |     a == b
    |     ^^^^^^
    |
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
+   = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
+   = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 help: consider dereferencing here
    |
 LL |     ****a == ****b
    |     ++++     ++++
 
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/issue-90870.rs:19:12
+error: `PartialEq` is not yet stable as a const trait
+  --> $DIR/issue-90870.rs:17:5
+   |
+LL |     a == b
+   |     ^^^^^^
+   |
+help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+   |
+LL + #![feature(const_trait_impl)]
+   |
+
+error[E0658]: cannot call conditionally-const operator in constant functions
+  --> $DIR/issue-90870.rs:26:12
    |
 LL |         if l == r {
    |            ^^^^^^
    |
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
+   = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
+   = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 help: consider dereferencing here
    |
 LL |         if *l == *r {
    |            +     +
 
-error: aborting due to 3 previous errors
+error: `PartialEq` is not yet stable as a const trait
+  --> $DIR/issue-90870.rs:26:12
+   |
+LL |         if l == r {
+   |            ^^^^^^
+   |
+help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+   |
+LL + #![feature(const_trait_impl)]
+   |
+
+error: aborting due to 6 previous errors
 
-For more information about this error, try `rustc --explain E0015`.
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.rs b/tests/ui/consts/miri_unleashed/const_refers_to_static.rs
index 6cc67094346..eb78b5335cb 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static.rs
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.rs
@@ -20,7 +20,7 @@ static mut MUTABLE: u32 = 0;
 const READ_MUT: u32 = unsafe { MUTABLE }; //~ERROR constant accesses mutable global memory
 
 // Evaluating this does not read anything mutable, but validation does, so this should error.
-const REF_INTERIOR_MUT: &usize = { //~ ERROR encountered reference to mutable memory
+const REF_INTERIOR_MUT: &usize = {
     static FOO: AtomicUsize = AtomicUsize::new(0);
     unsafe { &*(&FOO as *const _ as *const usize) }
 };
@@ -30,6 +30,13 @@ static MY_STATIC: u8 = 4;
 const REF_IMMUT: &u8 = &MY_STATIC;
 const READ_IMMUT: u8 = *REF_IMMUT;
 
+fn foo() {
+    match &0 {
+        REF_INTERIOR_MUT => {}, //~ ERROR cannot be used as pattern
+        _ => {},
+    }
+}
+
 fn main() {}
 
 //~? WARN skipping const checks
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static.stderr
index eed3b4d9065..6b70a211a72 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.stderr
@@ -16,16 +16,13 @@ error[E0080]: constant accesses mutable global memory
 LL | const READ_MUT: u32 = unsafe { MUTABLE };
    |                                ^^^^^^^ evaluation of `READ_MUT` failed here
 
-error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
-  --> $DIR/const_refers_to_static.rs:23:1
+error: constant REF_INTERIOR_MUT cannot be used as pattern
+  --> $DIR/const_refers_to_static.rs:35:9
    |
-LL | const REF_INTERIOR_MUT: &usize = {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
+LL |         REF_INTERIOR_MUT => {},
+   |         ^^^^^^^^^^^^^^^^
    |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
+   = note: constants that reference mutable or external memory cannot be used as pattern
 
 warning: skipping const checks
    |
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
index 6c7e7835661..cb093305429 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
@@ -11,18 +11,15 @@ extern crate static_cross_crate;
 // Sneaky: reference to a mutable static.
 // Allowing this would be a disaster for pattern matching, we could violate exhaustiveness checking!
 const SLICE_MUT: &[u8; 1] = {
-    //~^ ERROR encountered reference to mutable memory
     unsafe { &static_cross_crate::ZERO }
 };
 
 const U8_MUT: &u8 = {
-    //~^ ERROR encountered reference to mutable memory
     unsafe { &static_cross_crate::ZERO[0] }
 };
 
 // Also test indirection that reads from other static.
 const U8_MUT2: &u8 = {
-    //~^ ERROR encountered reference to mutable memory
     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
 };
 const U8_MUT3: &u8 = {
@@ -37,14 +34,14 @@ const U8_MUT3: &u8 = {
 
 pub fn test(x: &[u8; 1]) -> bool {
     match x {
-        SLICE_MUT => true, // ok, `const` error already emitted
+        SLICE_MUT => true, //~ ERROR cannot be used as pattern
         &[1..] => false,
     }
 }
 
 pub fn test2(x: &u8) -> bool {
     match x {
-        U8_MUT => true, // ok, `const` error already emitted
+        U8_MUT => true, //~ ERROR cannot be used as pattern
         &(1..) => false,
     }
 }
@@ -53,7 +50,7 @@ pub fn test2(x: &u8) -> bool {
 // the errors above otherwise stop compilation too early?
 pub fn test3(x: &u8) -> bool {
     match x {
-        U8_MUT2 => true, // ok, `const` error already emitted
+        U8_MUT2 => true, //~ ERROR cannot be used as pattern
         &(1..) => false,
     }
 }
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr
index 8af3a1948f0..d753506cc94 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr
@@ -1,41 +1,32 @@
-error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
-  --> $DIR/const_refers_to_static_cross_crate.rs:13:1
-   |
-LL | const SLICE_MUT: &[u8; 1] = {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
+error[E0080]: constant accesses mutable global memory
+  --> $DIR/const_refers_to_static_cross_crate.rs:27:15
    |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `U8_MUT3` failed here
 
-error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
-  --> $DIR/const_refers_to_static_cross_crate.rs:18:1
+error: constant SLICE_MUT cannot be used as pattern
+  --> $DIR/const_refers_to_static_cross_crate.rs:37:9
    |
-LL | const U8_MUT: &u8 = {
-   | ^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
+LL |         SLICE_MUT => true,
+   |         ^^^^^^^^^
    |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
+   = note: constants that reference mutable or external memory cannot be used as pattern
 
-error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
-  --> $DIR/const_refers_to_static_cross_crate.rs:24:1
+error: constant U8_MUT cannot be used as pattern
+  --> $DIR/const_refers_to_static_cross_crate.rs:44:9
    |
-LL | const U8_MUT2: &u8 = {
-   | ^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
+LL |         U8_MUT => true,
+   |         ^^^^^^
    |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
+   = note: constants that reference mutable or external memory cannot be used as pattern
 
-error[E0080]: constant accesses mutable global memory
-  --> $DIR/const_refers_to_static_cross_crate.rs:30:15
+error: constant U8_MUT2 cannot be used as pattern
+  --> $DIR/const_refers_to_static_cross_crate.rs:53:9
    |
-LL |         match static_cross_crate::OPT_ZERO {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `U8_MUT3` failed here
+LL |         U8_MUT2 => true,
+   |         ^^^^^^^
+   |
+   = note: constants that reference mutable or external memory cannot be used as pattern
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/consts/miri_unleashed/mutable_references.rs b/tests/ui/consts/miri_unleashed/mutable_references.rs
index 63d243f892c..2e95393ccbf 100644
--- a/tests/ui/consts/miri_unleashed/mutable_references.rs
+++ b/tests/ui/consts/miri_unleashed/mutable_references.rs
@@ -26,7 +26,7 @@ const BLUNT: &mut i32 = &mut 42;
 //~^ ERROR: pointing to read-only memory
 
 const SUBTLE: &mut i32 = unsafe {
-    //~^ ERROR: constructing invalid value: encountered reference to mutable memory in `const`
+    //~^ ERROR: encountered mutable reference
     static mut STATIC: i32 = 0;
     &mut STATIC
 };
@@ -65,7 +65,10 @@ static mut MUT_TO_READONLY: &mut i32 = unsafe { &mut *(&READONLY as *const _ as
 // # Check for consts pointing to mutable memory
 
 static mut MUTABLE: i32 = 42;
-const POINTS_TO_MUTABLE: &i32 = unsafe { &MUTABLE }; //~ ERROR encountered reference to mutable memory
+const POINTS_TO_MUTABLE: &i32 = unsafe { &MUTABLE }; // OK, as long as it is not used as a pattern.
+
+// This fails since `&*MUTABLE_REF` is basically a copy of `MUTABLE_REF`, but we
+// can't read from that static as it is mutable.
 static mut MUTABLE_REF: &mut i32 = &mut 42;
 const POINTS_TO_MUTABLE2: &i32 = unsafe { &*MUTABLE_REF };
 //~^ ERROR accesses mutable global memory
diff --git a/tests/ui/consts/miri_unleashed/mutable_references.stderr b/tests/ui/consts/miri_unleashed/mutable_references.stderr
index 22860e4f6d9..137efde44b3 100644
--- a/tests/ui/consts/miri_unleashed/mutable_references.stderr
+++ b/tests/ui/consts/miri_unleashed/mutable_references.stderr
@@ -43,7 +43,7 @@ LL | const BLUNT: &mut i32 = &mut 42;
                HEX_DUMP
            }
 
-error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
+error[E0080]: constructing invalid value: encountered mutable reference in `const` value
   --> $DIR/mutable_references.rs:28:1
    |
 LL | const SUBTLE: &mut i32 = unsafe {
@@ -98,49 +98,38 @@ LL | static mut MUT_TO_READONLY: &mut i32 = unsafe { &mut *(&READONLY as *const
                HEX_DUMP
            }
 
-error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
-  --> $DIR/mutable_references.rs:68:1
-   |
-LL | const POINTS_TO_MUTABLE: &i32 = unsafe { &MUTABLE };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
-   |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
-
 error[E0080]: constant accesses mutable global memory
-  --> $DIR/mutable_references.rs:70:43
+  --> $DIR/mutable_references.rs:73:43
    |
 LL | const POINTS_TO_MUTABLE2: &i32 = unsafe { &*MUTABLE_REF };
    |                                           ^^^^^^^^^^^^^ evaluation of `POINTS_TO_MUTABLE2` failed here
 
 error: encountered mutable pointer in final value of constant
-  --> $DIR/mutable_references.rs:73:1
+  --> $DIR/mutable_references.rs:76:1
    |
 LL | const POINTS_TO_MUTABLE_INNER: *const i32 = &mut 42 as *mut _ as *const _;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: encountered mutable pointer in final value of constant
-  --> $DIR/mutable_references.rs:76:1
+  --> $DIR/mutable_references.rs:79:1
    |
 LL | const POINTS_TO_MUTABLE_INNER2: *const i32 = &mut 42 as *const _;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: encountered mutable pointer in final value of constant
-  --> $DIR/mutable_references.rs:96:1
+  --> $DIR/mutable_references.rs:99:1
    |
 LL | const RAW_MUT_CAST: SyncPtr<i32> = SyncPtr { x: &mut 42 as *mut _ as *const _ };
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: encountered mutable pointer in final value of constant
-  --> $DIR/mutable_references.rs:99:1
+  --> $DIR/mutable_references.rs:102:1
    |
 LL | const RAW_MUT_COERCE: SyncPtr<i32> = SyncPtr { x: &mut 0 };
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0594]: cannot assign to `*OH_YES`, as `OH_YES` is an immutable static item
-  --> $DIR/mutable_references.rs:106:5
+  --> $DIR/mutable_references.rs:109:5
    |
 LL |     *OH_YES = 99;
    |     ^^^^^^^^^^^^ cannot assign
@@ -188,37 +177,37 @@ help: skipping check that does not even have a feature gate
 LL | const SNEAKY: &dyn Sync = &Synced { x: UnsafeCell::new(42) };
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:73:45
+  --> $DIR/mutable_references.rs:76:45
    |
 LL | const POINTS_TO_MUTABLE_INNER: *const i32 = &mut 42 as *mut _ as *const _;
    |                                             ^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:76:46
+  --> $DIR/mutable_references.rs:79:46
    |
 LL | const POINTS_TO_MUTABLE_INNER2: *const i32 = &mut 42 as *const _;
    |                                              ^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:81:47
+  --> $DIR/mutable_references.rs:84:47
    |
 LL | const INTERIOR_MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
    |                                               ^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:93:51
+  --> $DIR/mutable_references.rs:96:51
    |
 LL | const RAW_SYNC: SyncPtr<AtomicI32> = SyncPtr { x: &AtomicI32::new(42) };
    |                                                   ^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:96:49
+  --> $DIR/mutable_references.rs:99:49
    |
 LL | const RAW_MUT_CAST: SyncPtr<i32> = SyncPtr { x: &mut 42 as *mut _ as *const _ };
    |                                                 ^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:99:51
+  --> $DIR/mutable_references.rs:102:51
    |
 LL | const RAW_MUT_COERCE: SyncPtr<i32> = SyncPtr { x: &mut 0 };
    |                                                   ^^^^^^
 
-error: aborting due to 17 previous errors; 1 warning emitted
+error: aborting due to 16 previous errors; 1 warning emitted
 
 Some errors have detailed explanations: E0080, E0594.
 For more information about an error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/normalize-before-const-arg-has-type-goal.rs b/tests/ui/consts/normalize-before-const-arg-has-type-goal.rs
new file mode 100644
index 00000000000..9caa3c9e214
--- /dev/null
+++ b/tests/ui/consts/normalize-before-const-arg-has-type-goal.rs
@@ -0,0 +1,19 @@
+trait A<const B: bool> {}
+
+//     vv- Let's call this const "UNEVALUATED" for the comment below.
+impl A<{}> for () {}
+//~^ ERROR mismatched types
+
+// During overlap check, we end up trying to prove `(): A<?0c>`. Inference guides
+// `?0c = UNEVALUATED` (which is the `{}` const in the erroneous impl). We then
+// fail to prove `ConstArgHasType<UNEVALUATED, u8>` since `UNEVALUATED` has the
+// type `bool` from the type_of query. We then deeply normalize the predicate for
+// error reporting, which ends up normalizing `UNEVALUATED` to a ConstKind::Error.
+// This ended up ICEing when trying to report an error for the `ConstArgHasType`
+// predicate, since we don't expect `ConstArgHasType(ERROR, Ty)` to ever fail.
+
+trait C<const D: u8> {}
+impl<const D: u8> C<D> for () where (): A<D> {}
+impl<const D: u8> C<D> for () {}
+
+fn main() {}
diff --git a/tests/ui/consts/normalize-before-const-arg-has-type-goal.stderr b/tests/ui/consts/normalize-before-const-arg-has-type-goal.stderr
new file mode 100644
index 00000000000..a53231846b7
--- /dev/null
+++ b/tests/ui/consts/normalize-before-const-arg-has-type-goal.stderr
@@ -0,0 +1,9 @@
+error[E0308]: mismatched types
+  --> $DIR/normalize-before-const-arg-has-type-goal.rs:4:8
+   |
+LL | impl A<{}> for () {}
+   |        ^^ expected `bool`, found `()`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/partial_qualif.rs b/tests/ui/consts/partial_qualif.rs
index 7c28b8b8a62..18438cc576b 100644
--- a/tests/ui/consts/partial_qualif.rs
+++ b/tests/ui/consts/partial_qualif.rs
@@ -3,7 +3,7 @@ use std::cell::Cell;
 const FOO: &(Cell<usize>, bool) = {
     let mut a = (Cell::new(0), false);
     a.1 = true; // sets `qualif(a)` to `qualif(a) | qualif(true)`
-    &{a} //~ ERROR cannot refer to interior mutable
+    &{a} //~ ERROR interior mutable shared borrows of temporaries
 };
 
 fn main() {}
diff --git a/tests/ui/consts/partial_qualif.stderr b/tests/ui/consts/partial_qualif.stderr
index 05e0eeee133..b7632eb868a 100644
--- a/tests/ui/consts/partial_qualif.stderr
+++ b/tests/ui/consts/partial_qualif.stderr
@@ -1,8 +1,12 @@
-error[E0492]: constants cannot refer to interior mutable data
+error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/partial_qualif.rs:6:5
    |
 LL |     &{a}
-   |     ^^^^ this borrow of an interior mutable value may end up in the final value
+   |     ^^^^ this borrow of an interior mutable value refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/qualif_overwrite.rs b/tests/ui/consts/qualif_overwrite.rs
index aae4e41ffd7..93310b3f2a6 100644
--- a/tests/ui/consts/qualif_overwrite.rs
+++ b/tests/ui/consts/qualif_overwrite.rs
@@ -7,7 +7,7 @@ use std::cell::Cell;
 const FOO: &Option<Cell<usize>> = {
     let mut a = Some(Cell::new(0));
     a = None; // sets `qualif(a)` to `qualif(a) | qualif(None)`
-    &{a} //~ ERROR cannot refer to interior mutable
+    &{a} //~ ERROR interior mutable shared borrows of temporaries
 };
 
 fn main() {}
diff --git a/tests/ui/consts/qualif_overwrite.stderr b/tests/ui/consts/qualif_overwrite.stderr
index 976cf7bd79e..4aaaa4b2ca9 100644
--- a/tests/ui/consts/qualif_overwrite.stderr
+++ b/tests/ui/consts/qualif_overwrite.stderr
@@ -1,8 +1,12 @@
-error[E0492]: constants cannot refer to interior mutable data
+error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/qualif_overwrite.rs:10:5
    |
 LL |     &{a}
-   |     ^^^^ this borrow of an interior mutable value may end up in the final value
+   |     ^^^^ this borrow of an interior mutable value refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/qualif_overwrite_2.rs b/tests/ui/consts/qualif_overwrite_2.rs
index 1819d9a6d20..e739790b566 100644
--- a/tests/ui/consts/qualif_overwrite_2.rs
+++ b/tests/ui/consts/qualif_overwrite_2.rs
@@ -5,7 +5,7 @@ use std::cell::Cell;
 const FOO: &Option<Cell<usize>> = {
     let mut a = (Some(Cell::new(0)),);
     a.0 = None; // sets `qualif(a)` to `qualif(a) | qualif(None)`
-    &{a.0} //~ ERROR cannot refer to interior mutable
+    &{a.0} //~ ERROR interior mutable shared borrows of temporaries
 };
 
 fn main() {}
diff --git a/tests/ui/consts/qualif_overwrite_2.stderr b/tests/ui/consts/qualif_overwrite_2.stderr
index a107c4a5c6d..bc168141876 100644
--- a/tests/ui/consts/qualif_overwrite_2.stderr
+++ b/tests/ui/consts/qualif_overwrite_2.stderr
@@ -1,8 +1,12 @@
-error[E0492]: constants cannot refer to interior mutable data
+error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/qualif_overwrite_2.rs:8:5
    |
 LL |     &{a.0}
-   |     ^^^^^^ this borrow of an interior mutable value may end up in the final value
+   |     ^^^^^^ this borrow of an interior mutable value refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/recursive-static-write.rs b/tests/ui/consts/recursive-static-write.rs
new file mode 100644
index 00000000000..dc5813d8c78
--- /dev/null
+++ b/tests/ui/consts/recursive-static-write.rs
@@ -0,0 +1,24 @@
+//! Ensure that writing to `S` while initializing `S` errors.
+//! Regression test for <https://github.com/rust-lang/rust/issues/142404>.
+#![allow(dead_code)]
+
+struct Foo {
+    x: i32,
+    y: (),
+}
+
+static S: Foo = Foo {
+    x: 0,
+    y: unsafe {
+        (&raw const S.x).cast_mut().write(1); //~ERROR access itself during initialization
+    },
+};
+
+static mut S2: Foo = Foo {
+    x: 0,
+    y: unsafe {
+        S2.x = 1; //~ERROR access itself during initialization
+    },
+};
+
+fn main() {}
diff --git a/tests/ui/consts/recursive-static-write.stderr b/tests/ui/consts/recursive-static-write.stderr
new file mode 100644
index 00000000000..f5b5c49317c
--- /dev/null
+++ b/tests/ui/consts/recursive-static-write.stderr
@@ -0,0 +1,15 @@
+error[E0080]: encountered static that tried to access itself during initialization
+  --> $DIR/recursive-static-write.rs:13:9
+   |
+LL |         (&raw const S.x).cast_mut().write(1);
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `S` failed here
+
+error[E0080]: encountered static that tried to access itself during initialization
+  --> $DIR/recursive-static-write.rs:20:9
+   |
+LL |         S2.x = 1;
+   |         ^^^^^^^^ evaluation of `S2` failed here
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/recursive-zst-static.default.stderr b/tests/ui/consts/recursive-zst-static.default.stderr
index fee33a892d0..c814576dfd5 100644
--- a/tests/ui/consts/recursive-zst-static.default.stderr
+++ b/tests/ui/consts/recursive-zst-static.default.stderr
@@ -1,20 +1,20 @@
-error[E0080]: encountered static that tried to initialize itself with itself
+error[E0080]: encountered static that tried to access itself during initialization
   --> $DIR/recursive-zst-static.rs:10:18
    |
 LL | static FOO: () = FOO;
    |                  ^^^ evaluation of `FOO` failed here
 
 error[E0391]: cycle detected when evaluating initializer of static `A`
-  --> $DIR/recursive-zst-static.rs:13:16
+  --> $DIR/recursive-zst-static.rs:13:1
    |
 LL | static A: () = B;
-   |                ^
+   | ^^^^^^^^^^^^
    |
 note: ...which requires evaluating initializer of static `B`...
-  --> $DIR/recursive-zst-static.rs:14:16
+  --> $DIR/recursive-zst-static.rs:14:1
    |
 LL | static B: () = A;
-   |                ^
+   | ^^^^^^^^^^^^
    = note: ...which again requires evaluating initializer of static `A`, completing the cycle
    = note: cycle used when running analysis passes on this crate
    = 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
diff --git a/tests/ui/consts/recursive-zst-static.rs b/tests/ui/consts/recursive-zst-static.rs
index 852caae9493..853af6d70eb 100644
--- a/tests/ui/consts/recursive-zst-static.rs
+++ b/tests/ui/consts/recursive-zst-static.rs
@@ -8,7 +8,7 @@
 // See https://github.com/rust-lang/rust/issues/71078 for more details.
 
 static FOO: () = FOO;
-//~^ ERROR encountered static that tried to initialize itself with itself
+//~^ ERROR encountered static that tried to access itself during initialization
 
 static A: () = B; //~ ERROR cycle detected when evaluating initializer of static `A`
 static B: () = A;
diff --git a/tests/ui/consts/recursive-zst-static.unleash.stderr b/tests/ui/consts/recursive-zst-static.unleash.stderr
index fee33a892d0..c814576dfd5 100644
--- a/tests/ui/consts/recursive-zst-static.unleash.stderr
+++ b/tests/ui/consts/recursive-zst-static.unleash.stderr
@@ -1,20 +1,20 @@
-error[E0080]: encountered static that tried to initialize itself with itself
+error[E0080]: encountered static that tried to access itself during initialization
   --> $DIR/recursive-zst-static.rs:10:18
    |
 LL | static FOO: () = FOO;
    |                  ^^^ evaluation of `FOO` failed here
 
 error[E0391]: cycle detected when evaluating initializer of static `A`
-  --> $DIR/recursive-zst-static.rs:13:16
+  --> $DIR/recursive-zst-static.rs:13:1
    |
 LL | static A: () = B;
-   |                ^
+   | ^^^^^^^^^^^^
    |
 note: ...which requires evaluating initializer of static `B`...
-  --> $DIR/recursive-zst-static.rs:14:16
+  --> $DIR/recursive-zst-static.rs:14:1
    |
 LL | static B: () = A;
-   |                ^
+   | ^^^^^^^^^^^^
    = note: ...which again requires evaluating initializer of static `A`, completing the cycle
    = note: cycle used when running analysis passes on this crate
    = 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
diff --git a/tests/ui/consts/refs-to-cell-in-final.rs b/tests/ui/consts/refs-to-cell-in-final.rs
index 844b140cff2..2bd0623d94b 100644
--- a/tests/ui/consts/refs-to-cell-in-final.rs
+++ b/tests/ui/consts/refs-to-cell-in-final.rs
@@ -11,9 +11,9 @@ unsafe impl<T> Sync for SyncPtr<T> {}
 // The resulting constant would pass all validation checks, so it is crucial that this gets rejected
 // by static const checks!
 static RAW_SYNC_S: SyncPtr<Cell<i32>> = SyncPtr { x: &Cell::new(42) };
-//~^ ERROR: cannot refer to interior mutable data
+//~^ ERROR: interior mutable shared borrows of temporaries
 const RAW_SYNC_C: SyncPtr<Cell<i32>> = SyncPtr { x: &Cell::new(42) };
-//~^ ERROR: cannot refer to interior mutable data
+//~^ ERROR: interior mutable shared borrows of temporaries
 
 // This one does not get promoted because of `Drop`, and then enters interesting codepaths because
 // as a value it has no interior mutability, but as a type it does. See
@@ -39,7 +39,7 @@ const NONE_EXPLICIT_PROMOTED: &'static Option<Cell<i32>> = {
 
 // Not okay, since we are borrowing something with interior mutability.
 const INTERIOR_MUT_VARIANT: &Option<UnsafeCell<bool>> = &{
-    //~^ERROR: cannot refer to interior mutable data
+    //~^ERROR: interior mutable shared borrows of temporaries
     let mut x = None;
     assert!(x.is_none());
     x = Some(UnsafeCell::new(false));
diff --git a/tests/ui/consts/refs-to-cell-in-final.stderr b/tests/ui/consts/refs-to-cell-in-final.stderr
index 8d82d94f412..ac866dbe721 100644
--- a/tests/ui/consts/refs-to-cell-in-final.stderr
+++ b/tests/ui/consts/refs-to-cell-in-final.stderr
@@ -1,18 +1,24 @@
-error[E0492]: statics cannot refer to interior mutable data
+error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/refs-to-cell-in-final.rs:13:54
    |
 LL | static RAW_SYNC_S: SyncPtr<Cell<i32>> = SyncPtr { x: &Cell::new(42) };
-   |                                                      ^^^^^^^^^^^^^^ this borrow of an interior mutable value may end up in the final value
+   |                                                      ^^^^^^^^^^^^^^ this borrow of an interior mutable value refers to such a temporary
    |
-   = help: to fix this, the value can be extracted to a separate `static` item and then referenced
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
-error[E0492]: constants cannot refer to interior mutable data
+error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/refs-to-cell-in-final.rs:15:53
    |
 LL | const RAW_SYNC_C: SyncPtr<Cell<i32>> = SyncPtr { x: &Cell::new(42) };
-   |                                                     ^^^^^^^^^^^^^^ this borrow of an interior mutable value may end up in the final value
+   |                                                     ^^^^^^^^^^^^^^ this borrow of an interior mutable value refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
-error[E0492]: constants cannot refer to interior mutable data
+error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/refs-to-cell-in-final.rs:41:57
    |
 LL |   const INTERIOR_MUT_VARIANT: &Option<UnsafeCell<bool>> = &{
@@ -23,7 +29,11 @@ LL | |     assert!(x.is_none());
 LL | |     x = Some(UnsafeCell::new(false));
 LL | |     x
 LL | | };
-   | |_^ this borrow of an interior mutable value may end up in the final value
+   | |_^ this borrow of an interior mutable value refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/consts/unsafe_cell_in_const.rs b/tests/ui/consts/unsafe_cell_in_const.rs
new file mode 100644
index 00000000000..b867ae1ba9f
--- /dev/null
+++ b/tests/ui/consts/unsafe_cell_in_const.rs
@@ -0,0 +1,15 @@
+//! Ensure we do not complain about zero-sized `UnsafeCell` in a const in any form.
+//! See <https://github.com/rust-lang/rust/issues/142948>.
+
+//@ check-pass
+use std::cell::UnsafeCell;
+
+const X1: &mut UnsafeCell<[i32; 0]> = UnsafeCell::from_mut(&mut []);
+
+const X2: &mut UnsafeCell<[i32]> = UnsafeCell::from_mut(&mut []);
+
+trait Trait {}
+impl Trait for [i32; 0] {}
+const X3: &mut UnsafeCell<dyn Trait> = UnsafeCell::from_mut(&mut []);
+
+fn main() {}
diff --git a/tests/ui/consts/unstable-const-fn-in-libcore.rs b/tests/ui/consts/unstable-const-fn-in-libcore.rs
index baeece40a52..f4b4c687bd2 100644
--- a/tests/ui/consts/unstable-const-fn-in-libcore.rs
+++ b/tests/ui/consts/unstable-const-fn-in-libcore.rs
@@ -16,7 +16,7 @@ enum Opt<T> {
 impl<T> Opt<T> {
     #[rustc_const_unstable(feature = "foo", issue = "none")]
     #[stable(feature = "rust1", since = "1.0.0")]
-    const fn unwrap_or_else<F: ~const FnOnce() -> T>(self, f: F) -> T {
+    const fn unwrap_or_else<F: [const] FnOnce() -> T>(self, f: F) -> T {
     //FIXME ~^ ERROR destructor of
     //FIXME ~| ERROR destructor of
         match self {
diff --git a/tests/ui/consts/unstable-const-fn-in-libcore.stderr b/tests/ui/consts/unstable-const-fn-in-libcore.stderr
index 32693edbfcb..b43fa1f7e6c 100644
--- a/tests/ui/consts/unstable-const-fn-in-libcore.stderr
+++ b/tests/ui/consts/unstable-const-fn-in-libcore.stderr
@@ -1,19 +1,19 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/unstable-const-fn-in-libcore.rs:19:32
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/unstable-const-fn-in-libcore.rs:19:30
    |
-LL |     const fn unwrap_or_else<F: ~const FnOnce() -> T>(self, f: F) -> T {
-   |                                ^^^^^^ can't be applied to `FnOnce`
+LL |     const fn unwrap_or_else<F: [const] FnOnce() -> T>(self, f: F) -> T {
+   |                              ^^^^^^^^^ can't be applied to `FnOnce`
    |
-note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/unstable-const-fn-in-libcore.rs:19:32
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/unstable-const-fn-in-libcore.rs:19:30
    |
-LL |     const fn unwrap_or_else<F: ~const FnOnce() -> T>(self, f: F) -> T {
-   |                                ^^^^^^ can't be applied to `FnOnce`
+LL |     const fn unwrap_or_else<F: [const] FnOnce() -> T>(self, f: F) -> T {
+   |                              ^^^^^^^^^ can't be applied to `FnOnce`
    |
-note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
@@ -26,19 +26,19 @@ LL |             Opt::None => f(),
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
 
 error[E0493]: destructor of `F` cannot be evaluated at compile-time
-  --> $DIR/unstable-const-fn-in-libcore.rs:19:60
+  --> $DIR/unstable-const-fn-in-libcore.rs:19:61
    |
-LL |     const fn unwrap_or_else<F: ~const FnOnce() -> T>(self, f: F) -> T {
-   |                                                            ^ the destructor for this type cannot be evaluated in constant functions
+LL |     const fn unwrap_or_else<F: [const] FnOnce() -> T>(self, f: F) -> T {
+   |                                                             ^ the destructor for this type cannot be evaluated in constant functions
 ...
 LL |     }
    |     - value is dropped here
 
 error[E0493]: destructor of `Opt<T>` cannot be evaluated at compile-time
-  --> $DIR/unstable-const-fn-in-libcore.rs:19:54
+  --> $DIR/unstable-const-fn-in-libcore.rs:19:55
    |
-LL |     const fn unwrap_or_else<F: ~const FnOnce() -> T>(self, f: F) -> T {
-   |                                                      ^^^^ the destructor for this type cannot be evaluated in constant functions
+LL |     const fn unwrap_or_else<F: [const] FnOnce() -> T>(self, f: F) -> T {
+   |                                                       ^^^^ the destructor for this type cannot be evaluated in constant functions
 ...
 LL |     }
    |     - value is dropped here
diff --git a/tests/ui/consts/write-to-static-mut-in-static.rs b/tests/ui/consts/write-to-static-mut-in-static.rs
index ce15d9e912b..016bfb06ccf 100644
--- a/tests/ui/consts/write-to-static-mut-in-static.rs
+++ b/tests/ui/consts/write-to-static-mut-in-static.rs
@@ -3,8 +3,9 @@ pub static mut B: () = unsafe { A = 1; };
 //~^ ERROR modifying a static's initial value
 
 pub static mut C: u32 = unsafe { C = 1; 0 };
+//~^ ERROR static that tried to access itself during initialization
 
 pub static D: u32 = D;
-//~^ ERROR static that tried to initialize itself with itself
+//~^ ERROR static that tried to access itself during initialization
 
 fn main() {}
diff --git a/tests/ui/consts/write-to-static-mut-in-static.stderr b/tests/ui/consts/write-to-static-mut-in-static.stderr
index bb5e217afb9..4180bb49339 100644
--- a/tests/ui/consts/write-to-static-mut-in-static.stderr
+++ b/tests/ui/consts/write-to-static-mut-in-static.stderr
@@ -4,12 +4,18 @@ error[E0080]: modifying a static's initial value from another static's initializ
 LL | pub static mut B: () = unsafe { A = 1; };
    |                                 ^^^^^ evaluation of `B` failed here
 
-error[E0080]: encountered static that tried to initialize itself with itself
-  --> $DIR/write-to-static-mut-in-static.rs:7:21
+error[E0080]: encountered static that tried to access itself during initialization
+  --> $DIR/write-to-static-mut-in-static.rs:5:34
+   |
+LL | pub static mut C: u32 = unsafe { C = 1; 0 };
+   |                                  ^^^^^ evaluation of `C` failed here
+
+error[E0080]: encountered static that tried to access itself during initialization
+  --> $DIR/write-to-static-mut-in-static.rs:8:21
    |
 LL | pub static D: u32 = D;
    |                     ^ evaluation of `D` failed here
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/write_to_static_via_mut_ref.rs b/tests/ui/consts/write_to_static_via_mut_ref.rs
index 82ac85bd250..dc8a7eed13d 100644
--- a/tests/ui/consts/write_to_static_via_mut_ref.rs
+++ b/tests/ui/consts/write_to_static_via_mut_ref.rs
@@ -1,4 +1,4 @@
-static OH_NO: &mut i32 = &mut 42; //~ ERROR mutable references are not allowed
+static OH_NO: &mut i32 = &mut 42; //~ ERROR mutable borrows of temporaries
 fn main() {
     assert_eq!(*OH_NO, 42);
     *OH_NO = 43; //~ ERROR cannot assign to `*OH_NO`, as `OH_NO` is an immutable static
diff --git a/tests/ui/consts/write_to_static_via_mut_ref.stderr b/tests/ui/consts/write_to_static_via_mut_ref.stderr
index 63ef788032f..1bcd7b81fe0 100644
--- a/tests/ui/consts/write_to_static_via_mut_ref.stderr
+++ b/tests/ui/consts/write_to_static_via_mut_ref.stderr
@@ -1,8 +1,12 @@
-error[E0764]: mutable references are not allowed in the final value of statics
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/write_to_static_via_mut_ref.rs:1:26
    |
 LL | static OH_NO: &mut i32 = &mut 42;
-   |                          ^^^^^^^
+   |                          ^^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error[E0594]: cannot assign to `*OH_NO`, as `OH_NO` is an immutable static item
   --> $DIR/write_to_static_via_mut_ref.rs:4:5
diff --git a/tests/ui/coroutine/auto-trait-regions.rs b/tests/ui/coroutine/auto-trait-regions.rs
index f115896a473..736555b31bb 100644
--- a/tests/ui/coroutine/auto-trait-regions.rs
+++ b/tests/ui/coroutine/auto-trait-regions.rs
@@ -23,31 +23,31 @@ fn assert_foo<T: Foo>(f: T) {}
 fn main() {
     // Make sure 'static is erased for coroutine interiors so we can't match it in trait selection
     let x: &'static _ = &OnlyFooIfStaticRef(No);
-    let gen = #[coroutine] move || {
+    let generator = #[coroutine] move || {
         let x = x;
         yield;
         assert_foo(x);
     };
-    assert_foo(gen);
+    assert_foo(generator);
     //~^ ERROR implementation of `Foo` is not general enough
 
     // Allow impls which matches any lifetime
     let x = &OnlyFooIfRef(No);
-    let gen = #[coroutine] move || {
+    let generator = #[coroutine] move || {
         let x = x;
         yield;
         assert_foo(x);
     };
-    assert_foo(gen); // ok
+    assert_foo(generator); // ok
 
     // Disallow impls which relates lifetimes in the coroutine interior
-    let gen = #[coroutine] move || {
+    let generator = #[coroutine] move || {
         let a = A(&mut true, &mut true, No);
         //~^ ERROR borrow may still be in use when coroutine yields
         //~| ERROR borrow may still be in use when coroutine yields
         yield;
         assert_foo(a);
     };
-    assert_foo(gen);
+    assert_foo(generator);
     //~^ ERROR not general enough
 }
diff --git a/tests/ui/coroutine/auto-trait-regions.stderr b/tests/ui/coroutine/auto-trait-regions.stderr
index 77b5f3ce57c..beb689d868d 100644
--- a/tests/ui/coroutine/auto-trait-regions.stderr
+++ b/tests/ui/coroutine/auto-trait-regions.stderr
@@ -1,8 +1,8 @@
 error[E0626]: borrow may still be in use when coroutine yields
   --> $DIR/auto-trait-regions.rs:45:19
    |
-LL |     let gen = #[coroutine] move || {
-   |                            ------- within this coroutine
+LL |     let generator = #[coroutine] move || {
+   |                                  ------- within this coroutine
 LL |         let a = A(&mut true, &mut true, No);
    |                   ^^^^^^^^^
 ...
@@ -11,14 +11,14 @@ LL |         yield;
    |
 help: add `static` to mark this coroutine as unmovable
    |
-LL |     let gen = #[coroutine] static move || {
-   |                            ++++++
+LL |     let generator = #[coroutine] static move || {
+   |                                  ++++++
 
 error[E0626]: borrow may still be in use when coroutine yields
   --> $DIR/auto-trait-regions.rs:45:30
    |
-LL |     let gen = #[coroutine] move || {
-   |                            ------- within this coroutine
+LL |     let generator = #[coroutine] move || {
+   |                                  ------- within this coroutine
 LL |         let a = A(&mut true, &mut true, No);
    |                              ^^^^^^^^^
 ...
@@ -27,14 +27,14 @@ LL |         yield;
    |
 help: add `static` to mark this coroutine as unmovable
    |
-LL |     let gen = #[coroutine] static move || {
-   |                            ++++++
+LL |     let generator = #[coroutine] static move || {
+   |                                  ++++++
 
 error: implementation of `Foo` is not general enough
   --> $DIR/auto-trait-regions.rs:31:5
    |
-LL |     assert_foo(gen);
-   |     ^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
+LL |     assert_foo(generator);
+   |     ^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
    |
    = note: `&'0 OnlyFooIfStaticRef` must implement `Foo`, for any lifetime `'0`...
    = note: ...but `Foo` is actually implemented for the type `&'static OnlyFooIfStaticRef`
@@ -42,8 +42,8 @@ LL |     assert_foo(gen);
 error: implementation of `Foo` is not general enough
   --> $DIR/auto-trait-regions.rs:51:5
    |
-LL |     assert_foo(gen);
-   |     ^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
+LL |     assert_foo(generator);
+   |     ^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
    |
    = note: `Foo` would have to be implemented for the type `A<'0, '1>`, for any two lifetimes `'0` and `'1`...
    = note: ...but `Foo` is actually implemented for the type `A<'_, '2>`, for some specific lifetime `'2`
diff --git a/tests/ui/coroutine/clone-impl-static.rs b/tests/ui/coroutine/clone-impl-static.rs
index f6fadff7faf..2f941d65591 100644
--- a/tests/ui/coroutine/clone-impl-static.rs
+++ b/tests/ui/coroutine/clone-impl-static.rs
@@ -7,13 +7,13 @@
 #![feature(coroutines, coroutine_clone, stmt_expr_attributes)]
 
 fn main() {
-    let gen = #[coroutine]
+    let generator = #[coroutine]
     static move || {
         yield;
     };
-    check_copy(&gen);
+    check_copy(&generator);
     //~^ ERROR Copy` is not satisfied
-    check_clone(&gen);
+    check_clone(&generator);
     //~^ ERROR Clone` is not satisfied
 }
 
diff --git a/tests/ui/coroutine/clone-impl-static.stderr b/tests/ui/coroutine/clone-impl-static.stderr
index db1d2770346..9fb71fd5fd0 100644
--- a/tests/ui/coroutine/clone-impl-static.stderr
+++ b/tests/ui/coroutine/clone-impl-static.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `{static coroutine@$DIR/clone-impl-static.rs:11:5: 11:19}: Copy` is not satisfied
   --> $DIR/clone-impl-static.rs:14:16
    |
-LL |     check_copy(&gen);
-   |     ---------- ^^^^ the trait `Copy` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:11:5: 11:19}`
+LL |     check_copy(&generator);
+   |     ---------- ^^^^^^^^^^ the trait `Copy` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:11:5: 11:19}`
    |     |
    |     required by a bound introduced by this call
    |
@@ -15,8 +15,8 @@ LL | fn check_copy<T: Copy>(_x: &T) {}
 error[E0277]: the trait bound `{static coroutine@$DIR/clone-impl-static.rs:11:5: 11:19}: Clone` is not satisfied
   --> $DIR/clone-impl-static.rs:16:17
    |
-LL |     check_clone(&gen);
-   |     ----------- ^^^^ the trait `Clone` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:11:5: 11:19}`
+LL |     check_clone(&generator);
+   |     ----------- ^^^^^^^^^^ the trait `Clone` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:11:5: 11:19}`
    |     |
    |     required by a bound introduced by this call
    |
diff --git a/tests/ui/defaults-well-formedness.rs b/tests/ui/defaults-well-formedness.rs
deleted file mode 100644
index e5e48edad88..00000000000
--- a/tests/ui/defaults-well-formedness.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-//@ run-pass
-
-#![allow(dead_code)]
-trait Trait<T> {}
-struct Foo<U, V=i32>(U, V) where U: Trait<V>;
-
-trait Marker {}
-struct TwoParams<T, U>(T, U);
-impl Marker for TwoParams<i32, i32> {}
-
-// Clauses with more than 1 param are not checked.
-struct IndividuallyBogus<T = i32, U = i32>(TwoParams<T, U>) where TwoParams<T, U>: Marker;
-struct BogusTogether<T = u32, U = i32>(T, U) where TwoParams<T, U>: Marker;
-// Clauses with non-defaulted params are not checked.
-struct NonDefaultedInClause<T, U = i32>(TwoParams<T, U>) where TwoParams<T, U>: Marker;
-struct DefaultedLhs<U, V=i32>(U, V) where V: Trait<U>;
-// Dependent defaults are not checked.
-struct Dependent<T, U = T>(T, U) where U: Copy;
-trait SelfBound<T: Copy=Self> {}
-// Not even for well-formedness.
-struct WellFormedProjection<A, T=<A as Iterator>::Item>(A, T);
-
-// Issue #49344, predicates with lifetimes should not be checked.
-trait Scope<'a> {}
-struct Request<'a, S: Scope<'a> = i32>(S, &'a ());
-
-fn main() {}
diff --git a/tests/ui/deprecation/deprecated-expr-precedence.rs b/tests/ui/deprecation/deprecated-expr-precedence.rs
new file mode 100644
index 00000000000..9636b46df20
--- /dev/null
+++ b/tests/ui/deprecation/deprecated-expr-precedence.rs
@@ -0,0 +1,8 @@
+//@ check-fail
+//@ compile-flags: --crate-type=lib
+
+// Regression test for issue 142649
+pub fn public() {
+    #[deprecated] 0
+    //~^ ERROR mismatched types
+}
diff --git a/tests/ui/deprecation/deprecated-expr-precedence.stderr b/tests/ui/deprecation/deprecated-expr-precedence.stderr
new file mode 100644
index 00000000000..3275f2e790a
--- /dev/null
+++ b/tests/ui/deprecation/deprecated-expr-precedence.stderr
@@ -0,0 +1,11 @@
+error[E0308]: mismatched types
+  --> $DIR/deprecated-expr-precedence.rs:6:19
+   |
+LL | pub fn public() {
+   |                - help: try adding a return type: `-> i32`
+LL |     #[deprecated] 0
+   |                   ^ expected `()`, found integer
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/deprecation-in-force-unstable.rs b/tests/ui/deprecation/deprecated_main_function.rs
index 6aaf29b069a..398046637d8 100644
--- a/tests/ui/deprecation-in-force-unstable.rs
+++ b/tests/ui/deprecation/deprecated_main_function.rs
@@ -2,4 +2,4 @@
 //@ compile-flags:-Zforce-unstable-if-unmarked
 
 #[deprecated] // should work even with -Zforce-unstable-if-unmarked
-fn main() { }
+fn main() {}
diff --git a/tests/ui/deprecation/deprecated_no_stack_check.rs b/tests/ui/deprecation/deprecated_no_stack_check.rs
index ef482098634..8e1f5bbf045 100644
--- a/tests/ui/deprecation/deprecated_no_stack_check.rs
+++ b/tests/ui/deprecation/deprecated_no_stack_check.rs
@@ -1,5 +1,3 @@
-//@ normalize-stderr: "you are using [0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?( \([^)]*\))?" -> "you are using $$RUSTC_VERSION"
-
 #![deny(warnings)]
 #![feature(no_stack_check)]
 //~^ ERROR: feature has been removed [E0557]
diff --git a/tests/ui/deprecation/deprecated_no_stack_check.stderr b/tests/ui/deprecation/deprecated_no_stack_check.stderr
index 2d08b1b8db5..33788661d73 100644
--- a/tests/ui/deprecation/deprecated_no_stack_check.stderr
+++ b/tests/ui/deprecation/deprecated_no_stack_check.stderr
@@ -1,10 +1,10 @@
 error[E0557]: feature has been removed
-  --> $DIR/deprecated_no_stack_check.rs:4:12
+  --> $DIR/deprecated_no_stack_check.rs:2:12
    |
 LL | #![feature(no_stack_check)]
    |            ^^^^^^^^^^^^^^ feature has been removed
    |
-   = note: removed in 1.0.0 (you are using $RUSTC_VERSION); see <https://github.com/rust-lang/rust/pull/40110> for more information
+   = note: removed in 1.0.0; see <https://github.com/rust-lang/rust/pull/40110> for more information
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/deref-rc.rs b/tests/ui/deref-rc.rs
deleted file mode 100644
index 92fdd900359..00000000000
--- a/tests/ui/deref-rc.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-//@ run-pass
-
-use std::rc::Rc;
-
-fn main() {
-    let x = Rc::new([1, 2, 3, 4]);
-    assert_eq!(*x, [1, 2, 3, 4]);
-}
diff --git a/tests/ui/deref.rs b/tests/ui/deref.rs
deleted file mode 100644
index 0a6f3cc81f6..00000000000
--- a/tests/ui/deref.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-//@ run-pass
-
-pub fn main() {
-    let x: Box<isize> = Box::new(10);
-    let _y: isize = *x;
-}
diff --git a/tests/ui/derive-uninhabited-enum-38885.rs b/tests/ui/derive-uninhabited-enum-38885.rs
deleted file mode 100644
index 2259a542706..00000000000
--- a/tests/ui/derive-uninhabited-enum-38885.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-//@ check-pass
-//@ compile-flags: -Wunused
-
-// ensure there are no special warnings about uninhabited types
-// when deriving Debug on an empty enum
-
-#[derive(Debug)]
-enum Void {}
-
-#[derive(Debug)]
-enum Foo {
-    Bar(#[allow(dead_code)] u8),
-    Void(Void), //~ WARN variant `Void` is never constructed
-}
-
-fn main() {
-    let x = Foo::Bar(42);
-    println!("{:?}", x);
-}
diff --git a/tests/ui/derives/clone-debug-dead-code.stderr b/tests/ui/derives/clone-debug-dead-code.stderr
index 34b7f929ec5..38be486e332 100644
--- a/tests/ui/derives/clone-debug-dead-code.stderr
+++ b/tests/ui/derives/clone-debug-dead-code.stderr
@@ -40,7 +40,7 @@ LL | struct D { f: () }
    |        |
    |        field in this struct
    |
-   = note: `D` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
+   = note: `D` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
 
 error: field `f` is never read
   --> $DIR/clone-debug-dead-code.rs:21:12
diff --git a/tests/ui/derives/derive-debug-uninhabited-enum.rs b/tests/ui/derives/derive-debug-uninhabited-enum.rs
new file mode 100644
index 00000000000..be7b3ab348d
--- /dev/null
+++ b/tests/ui/derives/derive-debug-uninhabited-enum.rs
@@ -0,0 +1,23 @@
+//! Regression test for `#[derive(Debug)]` on enums with uninhabited variants.
+//!
+//! Ensures there are no special warnings about uninhabited types when deriving
+//! Debug on an enum with uninhabited variants, only standard unused warnings.
+//!
+//! Issue: https://github.com/rust-lang/rust/issues/38885
+
+//@ check-pass
+//@ compile-flags: -Wunused
+
+#[derive(Debug)]
+enum Void {}
+
+#[derive(Debug)]
+enum Foo {
+    Bar(#[allow(dead_code)] u8),
+    Void(Void), //~ WARN variant `Void` is never constructed
+}
+
+fn main() {
+    let x = Foo::Bar(42);
+    println!("{:?}", x);
+}
diff --git a/tests/ui/derive-uninhabited-enum-38885.stderr b/tests/ui/derives/derive-debug-uninhabited-enum.stderr
index bcd8f6b7b53..4911b6b6cde 100644
--- a/tests/ui/derive-uninhabited-enum-38885.stderr
+++ b/tests/ui/derives/derive-debug-uninhabited-enum.stderr
@@ -1,5 +1,5 @@
 warning: variant `Void` is never constructed
-  --> $DIR/derive-uninhabited-enum-38885.rs:13:5
+  --> $DIR/derive-debug-uninhabited-enum.rs:17:5
    |
 LL | enum Foo {
    |      --- variant in this enum
diff --git a/tests/ui/derives/derives-span-Debug-enum-struct-variant.stderr b/tests/ui/derives/derives-span-Debug-enum-struct-variant.stderr
index a7f6d094681..147910b715f 100644
--- a/tests/ui/derives/derives-span-Debug-enum-struct-variant.stderr
+++ b/tests/ui/derives/derives-span-Debug-enum-struct-variant.stderr
@@ -5,9 +5,8 @@ LL | #[derive(Debug)]
    |          ----- in this derive macro expansion
 ...
 LL |      x: Error
-   |      ^^^^^^^^ `Error` cannot be formatted using `{:?}`
+   |      ^^^^^^^^ the trait `Debug` is not implemented for `Error`
    |
-   = help: the trait `Debug` is not implemented for `Error`
    = note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
 help: consider annotating `Error` with `#[derive(Debug)]`
    |
diff --git a/tests/ui/derives/derives-span-Debug-enum.stderr b/tests/ui/derives/derives-span-Debug-enum.stderr
index b3a58478159..6f97ceb02d3 100644
--- a/tests/ui/derives/derives-span-Debug-enum.stderr
+++ b/tests/ui/derives/derives-span-Debug-enum.stderr
@@ -5,9 +5,8 @@ LL | #[derive(Debug)]
    |          ----- in this derive macro expansion
 ...
 LL |      Error
-   |      ^^^^^ `Error` cannot be formatted using `{:?}`
+   |      ^^^^^ the trait `Debug` is not implemented for `Error`
    |
-   = help: the trait `Debug` is not implemented for `Error`
    = note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
 help: consider annotating `Error` with `#[derive(Debug)]`
    |
diff --git a/tests/ui/derives/derives-span-Debug-struct.stderr b/tests/ui/derives/derives-span-Debug-struct.stderr
index c8ad652716c..46d69a892f2 100644
--- a/tests/ui/derives/derives-span-Debug-struct.stderr
+++ b/tests/ui/derives/derives-span-Debug-struct.stderr
@@ -5,9 +5,8 @@ LL | #[derive(Debug)]
    |          ----- in this derive macro expansion
 LL | struct Struct {
 LL |     x: Error
-   |     ^^^^^^^^ `Error` cannot be formatted using `{:?}`
+   |     ^^^^^^^^ the trait `Debug` is not implemented for `Error`
    |
-   = help: the trait `Debug` is not implemented for `Error`
    = note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
 help: consider annotating `Error` with `#[derive(Debug)]`
    |
diff --git a/tests/ui/derives/derives-span-Debug-tuple-struct.stderr b/tests/ui/derives/derives-span-Debug-tuple-struct.stderr
index dbece4d2091..a3feeff6df3 100644
--- a/tests/ui/derives/derives-span-Debug-tuple-struct.stderr
+++ b/tests/ui/derives/derives-span-Debug-tuple-struct.stderr
@@ -5,9 +5,8 @@ LL | #[derive(Debug)]
    |          ----- in this derive macro expansion
 LL | struct Struct(
 LL |     Error
-   |     ^^^^^ `Error` cannot be formatted using `{:?}`
+   |     ^^^^^ the trait `Debug` is not implemented for `Error`
    |
-   = help: the trait `Debug` is not implemented for `Error`
    = note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
 help: consider annotating `Error` with `#[derive(Debug)]`
    |
diff --git a/tests/ui/derives/nonsense-input-to-debug.rs b/tests/ui/derives/nonsense-input-to-debug.rs
new file mode 100644
index 00000000000..7dfa3cd616a
--- /dev/null
+++ b/tests/ui/derives/nonsense-input-to-debug.rs
@@ -0,0 +1,12 @@
+// Issue: #32950
+// Ensure that using macros rather than a type doesn't break `derive`.
+
+#[derive(Debug)]
+struct Nonsense<T> {
+    //~^ ERROR type parameter `T` is never used
+    should_be_vec_t: vec![T],
+    //~^ ERROR `derive` cannot be used on items with type macros
+    //~| ERROR expected type, found `expr` metavariable
+}
+
+fn main() {}
diff --git a/tests/ui/derives/nonsense-input-to-debug.stderr b/tests/ui/derives/nonsense-input-to-debug.stderr
new file mode 100644
index 00000000000..7c97ca93cfc
--- /dev/null
+++ b/tests/ui/derives/nonsense-input-to-debug.stderr
@@ -0,0 +1,30 @@
+error: `derive` cannot be used on items with type macros
+  --> $DIR/nonsense-input-to-debug.rs:7:22
+   |
+LL |     should_be_vec_t: vec![T],
+   |                      ^^^^^^^
+
+error: expected type, found `expr` metavariable
+  --> $DIR/nonsense-input-to-debug.rs:7:22
+   |
+LL |     should_be_vec_t: vec![T],
+   |                      ^^^^^^^
+   |                      |
+   |                      expected type
+   |                      in this macro invocation
+   |                      this macro call doesn't expand to a type
+   |
+   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0392]: type parameter `T` is never used
+  --> $DIR/nonsense-input-to-debug.rs:5:17
+   |
+LL | struct Nonsense<T> {
+   |                 ^ unused type parameter
+   |
+   = 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: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0392`.
diff --git a/tests/ui/destructure-trait-ref.rs b/tests/ui/destructure-trait-ref.rs
deleted file mode 100644
index daa0ca30d68..00000000000
--- a/tests/ui/destructure-trait-ref.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-// The regression test for #15031 to make sure destructuring trait
-// reference work properly.
-
-//@ dont-require-annotations: NOTE
-
-#![feature(box_patterns)]
-
-trait T { fn foo(&self) {} }
-impl T for isize {}
-
-
-fn main() {
-    // For an expression of the form:
-    //
-    //      let &...&x = &..&SomeTrait;
-    //
-    // Say we have n `&` at the left hand and m `&` right hand, then:
-    // if n < m, we are golden;
-    // if n == m, it's a derefing non-derefable type error;
-    // if n > m, it's a type mismatch error.
-
-    // n < m
-    let &x = &(&1isize as &dyn T);
-    let &x = &&(&1isize as &dyn T);
-    let &&x = &&(&1isize as &dyn T);
-
-    // n == m
-    let &x = &1isize as &dyn T;      //~ ERROR type `&dyn T` cannot be dereferenced
-    let &&x = &(&1isize as &dyn T);  //~ ERROR type `&dyn T` cannot be dereferenced
-    let box x = Box::new(1isize) as Box<dyn T>;
-    //~^ ERROR type `Box<dyn T>` cannot be dereferenced
-
-    // n > m
-    let &&x = &1isize as &dyn T;
-    //~^ ERROR mismatched types
-    //~| NOTE expected trait object `dyn T`
-    //~| NOTE found reference `&_`
-    let &&&x = &(&1isize as &dyn T);
-    //~^ ERROR mismatched types
-    //~| NOTE expected trait object `dyn T`
-    //~| NOTE found reference `&_`
-    let box box x = Box::new(1isize) as Box<dyn T>;
-    //~^ ERROR mismatched types
-    //~| NOTE expected trait object `dyn T`
-    //~| NOTE found struct `Box<_>`
-}
diff --git a/tests/ui/did_you_mean/bad-assoc-ty.stderr b/tests/ui/did_you_mean/bad-assoc-ty.edition2015.stderr
index 7e34f4d35b4..fe1ce5ad18b 100644
--- a/tests/ui/did_you_mean/bad-assoc-ty.stderr
+++ b/tests/ui/did_you_mean/bad-assoc-ty.edition2015.stderr
@@ -1,5 +1,5 @@
 error: missing angle brackets in associated item path
-  --> $DIR/bad-assoc-ty.rs:1:10
+  --> $DIR/bad-assoc-ty.rs:5:10
    |
 LL | type A = [u8; 4]::AssocTy;
    |          ^^^^^^^
@@ -10,7 +10,7 @@ LL | type A = <[u8; 4]>::AssocTy;
    |          +       +
 
 error: missing angle brackets in associated item path
-  --> $DIR/bad-assoc-ty.rs:5:10
+  --> $DIR/bad-assoc-ty.rs:9:10
    |
 LL | type B = [u8]::AssocTy;
    |          ^^^^
@@ -21,7 +21,7 @@ LL | type B = <[u8]>::AssocTy;
    |          +    +
 
 error: missing angle brackets in associated item path
-  --> $DIR/bad-assoc-ty.rs:9:10
+  --> $DIR/bad-assoc-ty.rs:13:10
    |
 LL | type C = (u8)::AssocTy;
    |          ^^^^
@@ -32,7 +32,7 @@ LL | type C = <(u8)>::AssocTy;
    |          +    +
 
 error: missing angle brackets in associated item path
-  --> $DIR/bad-assoc-ty.rs:13:10
+  --> $DIR/bad-assoc-ty.rs:17:10
    |
 LL | type D = (u8, u8)::AssocTy;
    |          ^^^^^^^^
@@ -43,7 +43,7 @@ LL | type D = <(u8, u8)>::AssocTy;
    |          +        +
 
 error: missing angle brackets in associated item path
-  --> $DIR/bad-assoc-ty.rs:17:10
+  --> $DIR/bad-assoc-ty.rs:21:10
    |
 LL | type E = _::AssocTy;
    |          ^
@@ -54,7 +54,7 @@ LL | type E = <_>::AssocTy;
    |          + +
 
 error: missing angle brackets in associated item path
-  --> $DIR/bad-assoc-ty.rs:21:19
+  --> $DIR/bad-assoc-ty.rs:25:19
    |
 LL | type F = &'static (u8)::AssocTy;
    |                   ^^^^
@@ -65,7 +65,7 @@ LL | type F = &'static <(u8)>::AssocTy;
    |                   +    +
 
 error: missing angle brackets in associated item path
-  --> $DIR/bad-assoc-ty.rs:27:10
+  --> $DIR/bad-assoc-ty.rs:31:10
    |
 LL | type G = dyn 'static + (Send)::AssocTy;
    |          ^^^^^^^^^^^^^^^^^^^^
@@ -76,7 +76,7 @@ LL | type G = <dyn 'static + (Send)>::AssocTy;
    |          +                    +
 
 error: missing angle brackets in associated item path
-  --> $DIR/bad-assoc-ty.rs:46:10
+  --> $DIR/bad-assoc-ty.rs:51:10
    |
 LL | type I = ty!()::AssocTy;
    |          ^^^^^
@@ -87,7 +87,7 @@ LL | type I = <ty!()>::AssocTy;
    |          +     +
 
 error: missing angle brackets in associated item path
-  --> $DIR/bad-assoc-ty.rs:39:19
+  --> $DIR/bad-assoc-ty.rs:44:19
    |
 LL |     ($ty: ty) => ($ty::AssocTy);
    |                   ^^^
@@ -102,7 +102,7 @@ LL |     ($ty: ty) => (<$ty>::AssocTy);
    |                   +   +
 
 error[E0223]: ambiguous associated type
-  --> $DIR/bad-assoc-ty.rs:1:10
+  --> $DIR/bad-assoc-ty.rs:5:10
    |
 LL | type A = [u8; 4]::AssocTy;
    |          ^^^^^^^^^^^^^^^^
@@ -114,7 +114,7 @@ LL + type A = <[u8; 4] as Example>::AssocTy;
    |
 
 error[E0223]: ambiguous associated type
-  --> $DIR/bad-assoc-ty.rs:5:10
+  --> $DIR/bad-assoc-ty.rs:9:10
    |
 LL | type B = [u8]::AssocTy;
    |          ^^^^^^^^^^^^^
@@ -126,7 +126,7 @@ LL + type B = <[u8] as Example>::AssocTy;
    |
 
 error[E0223]: ambiguous associated type
-  --> $DIR/bad-assoc-ty.rs:9:10
+  --> $DIR/bad-assoc-ty.rs:13:10
    |
 LL | type C = (u8)::AssocTy;
    |          ^^^^^^^^^^^^^
@@ -138,7 +138,7 @@ LL + type C = <u8 as Example>::AssocTy;
    |
 
 error[E0223]: ambiguous associated type
-  --> $DIR/bad-assoc-ty.rs:13:10
+  --> $DIR/bad-assoc-ty.rs:17:10
    |
 LL | type D = (u8, u8)::AssocTy;
    |          ^^^^^^^^^^^^^^^^^
@@ -150,13 +150,13 @@ LL + type D = <(u8, u8) as Example>::AssocTy;
    |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
-  --> $DIR/bad-assoc-ty.rs:17:10
+  --> $DIR/bad-assoc-ty.rs:21:10
    |
 LL | type E = _::AssocTy;
    |          ^ not allowed in type signatures
 
 error[E0223]: ambiguous associated type
-  --> $DIR/bad-assoc-ty.rs:21:19
+  --> $DIR/bad-assoc-ty.rs:25:19
    |
 LL | type F = &'static (u8)::AssocTy;
    |                   ^^^^^^^^^^^^^
@@ -168,7 +168,7 @@ LL + type F = &'static <u8 as Example>::AssocTy;
    |
 
 error[E0223]: ambiguous associated type
-  --> $DIR/bad-assoc-ty.rs:27:10
+  --> $DIR/bad-assoc-ty.rs:31:10
    |
 LL | type G = dyn 'static + (Send)::AssocTy;
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -180,7 +180,7 @@ LL + type G = <(dyn Send + 'static) as Example>::AssocTy;
    |
 
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/bad-assoc-ty.rs:33:10
+  --> $DIR/bad-assoc-ty.rs:37:10
    |
 LL | type H = Fn(u8) -> (u8)::Output;
    |          ^^^^^^^^^^^^^^
@@ -194,7 +194,7 @@ LL | type H = <dyn Fn(u8) -> (u8)>::Output;
    |          ++++               +
 
 error[E0223]: ambiguous associated type
-  --> $DIR/bad-assoc-ty.rs:33:10
+  --> $DIR/bad-assoc-ty.rs:37:10
    |
 LL | type H = Fn(u8) -> (u8)::Output;
    |          ^^^^^^^^^^^^^^^^^^^^^^
@@ -209,7 +209,7 @@ LL + type H = <(dyn Fn(u8) -> u8 + 'static) as IntoFuture>::Output;
    |
 
 error[E0223]: ambiguous associated type
-  --> $DIR/bad-assoc-ty.rs:39:19
+  --> $DIR/bad-assoc-ty.rs:44:19
    |
 LL |     ($ty: ty) => ($ty::AssocTy);
    |                   ^^^^^^^^^^^^
@@ -225,7 +225,7 @@ LL +     ($ty: ty) => (<u8 as Example>::AssocTy);
    |
 
 error[E0223]: ambiguous associated type
-  --> $DIR/bad-assoc-ty.rs:46:10
+  --> $DIR/bad-assoc-ty.rs:51:10
    |
 LL | type I = ty!()::AssocTy;
    |          ^^^^^^^^^^^^^^
@@ -237,99 +237,55 @@ LL + type I = <u8 as Example>::AssocTy;
    |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/bad-assoc-ty.rs:51:13
+  --> $DIR/bad-assoc-ty.rs:56:13
    |
 LL | fn foo<X: K<_, _>>(x: X) {}
-   |             ^  ^ not allowed in type signatures
-   |             |
-   |             not allowed in type signatures
+   |             ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/bad-assoc-ty.rs:54:34
+  --> $DIR/bad-assoc-ty.rs:56:16
+   |
+LL | fn foo<X: K<_, _>>(x: X) {}
+   |                ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/bad-assoc-ty.rs:60:34
    |
 LL | fn bar<F>(_: F) where F: Fn() -> _ {}
    |                                  ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - fn bar<F>(_: F) where F: Fn() -> _ {}
-LL + fn bar<F, T>(_: F) where F: Fn() -> T {}
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/bad-assoc-ty.rs:57:19
+  --> $DIR/bad-assoc-ty.rs:63:19
    |
 LL | fn baz<F: Fn() -> _>(_: F) {}
    |                   ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - fn baz<F: Fn() -> _>(_: F) {}
-LL + fn baz<F: Fn() -> T, T>(_: F) {}
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
-  --> $DIR/bad-assoc-ty.rs:60:33
+  --> $DIR/bad-assoc-ty.rs:66:33
    |
 LL | struct L<F>(F) where F: Fn() -> _;
    |                                 ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - struct L<F>(F) where F: Fn() -> _;
-LL + struct L<F, T>(F) where F: Fn() -> T;
-   |
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/bad-assoc-ty.rs:82:38
-   |
-LL |     fn foo<F>(_: F) where F: Fn() -> _ {}
-   |                                      ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn foo<F>(_: F) where F: Fn() -> _ {}
-LL +     fn foo<F, T>(_: F) where F: Fn() -> T {}
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
-  --> $DIR/bad-assoc-ty.rs:62:30
+  --> $DIR/bad-assoc-ty.rs:68:30
    |
 LL | struct M<F> where F: Fn() -> _ {
    |                              ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - struct M<F> where F: Fn() -> _ {
-LL + struct M<F, T> where F: Fn() -> T {
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for enums
-  --> $DIR/bad-assoc-ty.rs:66:28
+  --> $DIR/bad-assoc-ty.rs:72:28
    |
 LL | enum N<F> where F: Fn() -> _ {
    |                            ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - enum N<F> where F: Fn() -> _ {
-LL + enum N<F, T> where F: Fn() -> T {
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for unions
-  --> $DIR/bad-assoc-ty.rs:71:29
+  --> $DIR/bad-assoc-ty.rs:77:29
    |
 LL | union O<F> where F: Fn() -> _ {
    |                             ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - union O<F> where F: Fn() -> _ {
-LL + union O<F, T> where F: Fn() -> T {
-   |
 
 error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/bad-assoc-ty.rs:73:5
+  --> $DIR/bad-assoc-ty.rs:79:5
    |
 LL |     foo: F,
    |     ^^^^^^
@@ -341,18 +297,18 @@ LL |     foo: std::mem::ManuallyDrop<F>,
    |          +++++++++++++++++++++++ +
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for traits
-  --> $DIR/bad-assoc-ty.rs:77:29
+  --> $DIR/bad-assoc-ty.rs:83:29
    |
 LL | trait P<F> where F: Fn() -> _ {
    |                             ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/bad-assoc-ty.rs:88:38
    |
-help: use type parameters instead
-   |
-LL - trait P<F> where F: Fn() -> _ {
-LL + trait P<F, T> where F: Fn() -> T {
-   |
+LL |     fn foo<F>(_: F) where F: Fn() -> _ {}
+   |                                      ^ not allowed in type signatures
 
-error: aborting due to 29 previous errors; 1 warning emitted
+error: aborting due to 30 previous errors; 1 warning emitted
 
 Some errors have detailed explanations: E0121, E0223, E0740.
 For more information about an error, try `rustc --explain E0121`.
diff --git a/tests/ui/did_you_mean/bad-assoc-ty.edition2021.stderr b/tests/ui/did_you_mean/bad-assoc-ty.edition2021.stderr
new file mode 100644
index 00000000000..2cf7a150aa2
--- /dev/null
+++ b/tests/ui/did_you_mean/bad-assoc-ty.edition2021.stderr
@@ -0,0 +1,296 @@
+error: missing angle brackets in associated item path
+  --> $DIR/bad-assoc-ty.rs:5:10
+   |
+LL | type A = [u8; 4]::AssocTy;
+   |          ^^^^^^^
+   |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+   |
+LL | type A = <[u8; 4]>::AssocTy;
+   |          +       +
+
+error: missing angle brackets in associated item path
+  --> $DIR/bad-assoc-ty.rs:9:10
+   |
+LL | type B = [u8]::AssocTy;
+   |          ^^^^
+   |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+   |
+LL | type B = <[u8]>::AssocTy;
+   |          +    +
+
+error: missing angle brackets in associated item path
+  --> $DIR/bad-assoc-ty.rs:13:10
+   |
+LL | type C = (u8)::AssocTy;
+   |          ^^^^
+   |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+   |
+LL | type C = <(u8)>::AssocTy;
+   |          +    +
+
+error: missing angle brackets in associated item path
+  --> $DIR/bad-assoc-ty.rs:17:10
+   |
+LL | type D = (u8, u8)::AssocTy;
+   |          ^^^^^^^^
+   |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+   |
+LL | type D = <(u8, u8)>::AssocTy;
+   |          +        +
+
+error: missing angle brackets in associated item path
+  --> $DIR/bad-assoc-ty.rs:21:10
+   |
+LL | type E = _::AssocTy;
+   |          ^
+   |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+   |
+LL | type E = <_>::AssocTy;
+   |          + +
+
+error: missing angle brackets in associated item path
+  --> $DIR/bad-assoc-ty.rs:25:19
+   |
+LL | type F = &'static (u8)::AssocTy;
+   |                   ^^^^
+   |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+   |
+LL | type F = &'static <(u8)>::AssocTy;
+   |                   +    +
+
+error: missing angle brackets in associated item path
+  --> $DIR/bad-assoc-ty.rs:31:10
+   |
+LL | type G = dyn 'static + (Send)::AssocTy;
+   |          ^^^^^^^^^^^^^^^^^^^^
+   |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+   |
+LL | type G = <dyn 'static + (Send)>::AssocTy;
+   |          +                    +
+
+error: missing angle brackets in associated item path
+  --> $DIR/bad-assoc-ty.rs:51:10
+   |
+LL | type I = ty!()::AssocTy;
+   |          ^^^^^
+   |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+   |
+LL | type I = <ty!()>::AssocTy;
+   |          +     +
+
+error: missing angle brackets in associated item path
+  --> $DIR/bad-assoc-ty.rs:44:19
+   |
+LL |     ($ty: ty) => ($ty::AssocTy);
+   |                   ^^^
+...
+LL | type J = ty!(u8);
+   |          ------- in this macro invocation
+   |
+   = note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+   |
+LL |     ($ty: ty) => (<$ty>::AssocTy);
+   |                   +   +
+
+error[E0223]: ambiguous associated type
+  --> $DIR/bad-assoc-ty.rs:5:10
+   |
+LL | type A = [u8; 4]::AssocTy;
+   |          ^^^^^^^^^^^^^^^^
+   |
+help: if there were a trait named `Example` with associated type `AssocTy` implemented for `[u8; 4]`, you could use the fully-qualified path
+   |
+LL - type A = [u8; 4]::AssocTy;
+LL + type A = <[u8; 4] as Example>::AssocTy;
+   |
+
+error[E0223]: ambiguous associated type
+  --> $DIR/bad-assoc-ty.rs:9:10
+   |
+LL | type B = [u8]::AssocTy;
+   |          ^^^^^^^^^^^^^
+   |
+help: if there were a trait named `Example` with associated type `AssocTy` implemented for `[u8]`, you could use the fully-qualified path
+   |
+LL - type B = [u8]::AssocTy;
+LL + type B = <[u8] as Example>::AssocTy;
+   |
+
+error[E0223]: ambiguous associated type
+  --> $DIR/bad-assoc-ty.rs:13:10
+   |
+LL | type C = (u8)::AssocTy;
+   |          ^^^^^^^^^^^^^
+   |
+help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
+   |
+LL - type C = (u8)::AssocTy;
+LL + type C = <u8 as Example>::AssocTy;
+   |
+
+error[E0223]: ambiguous associated type
+  --> $DIR/bad-assoc-ty.rs:17:10
+   |
+LL | type D = (u8, u8)::AssocTy;
+   |          ^^^^^^^^^^^^^^^^^
+   |
+help: if there were a trait named `Example` with associated type `AssocTy` implemented for `(u8, u8)`, you could use the fully-qualified path
+   |
+LL - type D = (u8, u8)::AssocTy;
+LL + type D = <(u8, u8) as Example>::AssocTy;
+   |
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
+  --> $DIR/bad-assoc-ty.rs:21:10
+   |
+LL | type E = _::AssocTy;
+   |          ^ not allowed in type signatures
+
+error[E0223]: ambiguous associated type
+  --> $DIR/bad-assoc-ty.rs:25:19
+   |
+LL | type F = &'static (u8)::AssocTy;
+   |                   ^^^^^^^^^^^^^
+   |
+help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
+   |
+LL - type F = &'static (u8)::AssocTy;
+LL + type F = &'static <u8 as Example>::AssocTy;
+   |
+
+error[E0223]: ambiguous associated type
+  --> $DIR/bad-assoc-ty.rs:31:10
+   |
+LL | type G = dyn 'static + (Send)::AssocTy;
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: if there were a trait named `Example` with associated type `AssocTy` implemented for `(dyn Send + 'static)`, you could use the fully-qualified path
+   |
+LL - type G = dyn 'static + (Send)::AssocTy;
+LL + type G = <(dyn Send + 'static) as Example>::AssocTy;
+   |
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/bad-assoc-ty.rs:37:10
+   |
+LL | type H = Fn(u8) -> (u8)::Output;
+   |          ^^^^^^^^^^^^^^
+   |
+help: you can add the `dyn` keyword if you want a trait object
+   |
+LL | type H = <dyn Fn(u8) -> (u8)>::Output;
+   |          ++++               +
+
+error[E0223]: ambiguous associated type
+  --> $DIR/bad-assoc-ty.rs:44:19
+   |
+LL |     ($ty: ty) => ($ty::AssocTy);
+   |                   ^^^^^^^^^^^^
+...
+LL | type J = ty!(u8);
+   |          ------- in this macro invocation
+   |
+   = note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
+   |
+LL -     ($ty: ty) => ($ty::AssocTy);
+LL +     ($ty: ty) => (<u8 as Example>::AssocTy);
+   |
+
+error[E0223]: ambiguous associated type
+  --> $DIR/bad-assoc-ty.rs:51:10
+   |
+LL | type I = ty!()::AssocTy;
+   |          ^^^^^^^^^^^^^^
+   |
+help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
+   |
+LL - type I = ty!()::AssocTy;
+LL + type I = <u8 as Example>::AssocTy;
+   |
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/bad-assoc-ty.rs:56:13
+   |
+LL | fn foo<X: K<_, _>>(x: X) {}
+   |             ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/bad-assoc-ty.rs:56:16
+   |
+LL | fn foo<X: K<_, _>>(x: X) {}
+   |                ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/bad-assoc-ty.rs:60:34
+   |
+LL | fn bar<F>(_: F) where F: Fn() -> _ {}
+   |                                  ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/bad-assoc-ty.rs:63:19
+   |
+LL | fn baz<F: Fn() -> _>(_: F) {}
+   |                   ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/bad-assoc-ty.rs:66:33
+   |
+LL | struct L<F>(F) where F: Fn() -> _;
+   |                                 ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/bad-assoc-ty.rs:68:30
+   |
+LL | struct M<F> where F: Fn() -> _ {
+   |                              ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for enums
+  --> $DIR/bad-assoc-ty.rs:72:28
+   |
+LL | enum N<F> where F: Fn() -> _ {
+   |                            ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for unions
+  --> $DIR/bad-assoc-ty.rs:77:29
+   |
+LL | union O<F> where F: Fn() -> _ {
+   |                             ^ not allowed in type signatures
+
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/bad-assoc-ty.rs:79:5
+   |
+LL |     foo: F,
+   |     ^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL |     foo: std::mem::ManuallyDrop<F>,
+   |          +++++++++++++++++++++++ +
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for traits
+  --> $DIR/bad-assoc-ty.rs:83:29
+   |
+LL | trait P<F> where F: Fn() -> _ {
+   |                             ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/bad-assoc-ty.rs:88:38
+   |
+LL |     fn foo<F>(_: F) where F: Fn() -> _ {}
+   |                                      ^ not allowed in type signatures
+
+error: aborting due to 30 previous errors
+
+Some errors have detailed explanations: E0121, E0223, E0740, E0782.
+For more information about an error, try `rustc --explain E0121`.
diff --git a/tests/ui/did_you_mean/bad-assoc-ty.rs b/tests/ui/did_you_mean/bad-assoc-ty.rs
index 5a559b01ea2..9abda4fd962 100644
--- a/tests/ui/did_you_mean/bad-assoc-ty.rs
+++ b/tests/ui/did_you_mean/bad-assoc-ty.rs
@@ -1,3 +1,7 @@
+//@revisions: edition2015 edition2021
+//@[edition2015] edition:2015
+//@[edition2021] edition:2021
+
 type A = [u8; 4]::AssocTy;
 //~^ ERROR missing angle brackets in associated item path
 //~| ERROR ambiguous associated type
@@ -31,9 +35,10 @@ type G = dyn 'static + (Send)::AssocTy;
 // This is actually a legal path with fn-like generic arguments in the middle!
 // Recovery should not apply in this context.
 type H = Fn(u8) -> (u8)::Output;
-//~^ ERROR ambiguous associated type
-//~| WARN trait objects without an explicit `dyn` are deprecated
-//~| WARN this is accepted in the current edition
+//[edition2015]~^ ERROR ambiguous associated type
+//[edition2015]~| WARN trait objects without an explicit `dyn` are deprecated
+//[edition2015]~| WARN this is accepted in the current edition
+//[edition2021]~^^^^ ERROR expected a type, found a trait
 
 macro_rules! ty {
     ($ty: ty) => ($ty::AssocTy);
@@ -50,6 +55,7 @@ type I = ty!()::AssocTy;
 trait K<A, B> {}
 fn foo<X: K<_, _>>(x: X) {}
 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
+//~| ERROR the placeholder `_` is not allowed within types on item signatures for functions
 
 fn bar<F>(_: F) where F: Fn() -> _ {}
 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
diff --git a/tests/ui/diverging-fallback-method-chain.rs b/tests/ui/diverging-fallback-method-chain.rs
deleted file mode 100644
index aa8eba1191b..00000000000
--- a/tests/ui/diverging-fallback-method-chain.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-//@ run-pass
-
-#![allow(unused_imports)]
-// Test a regression found when building compiler. The `produce()`
-// error type `T` winds up getting unified with result of `x.parse()`;
-// the type of the closure given to `unwrap_or_else` needs to be
-// inferred to `usize`.
-
-use std::num::ParseIntError;
-
-fn produce<T>() -> Result<&'static str, T> {
-    Ok("22")
-}
-
-fn main() {
-    let x: usize = produce()
-        .and_then(|x| x.parse())
-        .unwrap_or_else(|_| panic!());
-    println!("{}", x);
-}
diff --git a/tests/ui/diverging-fallback-option.rs b/tests/ui/diverging-fallback-option.rs
deleted file mode 100644
index aa793ebd017..00000000000
--- a/tests/ui/diverging-fallback-option.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-//@ run-pass
-
-#![allow(warnings)]
-
-// Here the type of `c` is `Option<?T>`, where `?T` is unconstrained.
-// Because there is data-flow from the `{ return; }` block, which
-// diverges and hence has type `!`, into `c`, we will default `?T` to
-// `!`, and hence this code compiles rather than failing and requiring
-// a type annotation.
-
-fn main() {
-    let c = Some({ return; });
-    c.unwrap();
-}
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 d8935be5609..8b4f3f52ee9 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
@@ -87,6 +87,11 @@ help: alternatively, consider constraining `g` so it does not apply to trait obj
    |
 LL | trait A { fn g(b: B) -> B where Self: Sized; }
    |                           +++++++++++++++++
+help: you might have meant to use `Self` to refer to the implementing type
+   |
+LL - trait B { fn f(a: A) -> A; }
+LL + trait B { fn f(a: Self) -> A; }
+   |
 
 warning: trait objects without an explicit `dyn` are deprecated
   --> $DIR/avoid-ice-on-warning-3.rs:14:19
@@ -124,6 +129,11 @@ help: alternatively, consider constraining `f` so it does not apply to trait obj
    |
 LL | trait B { fn f(a: A) -> A where Self: Sized; }
    |                           +++++++++++++++++
+help: you might have meant to use `Self` to refer to the implementing type
+   |
+LL - trait A { fn g(b: B) -> B; }
+LL + trait A { fn g(b: Self) -> B; }
+   |
 
 error: aborting due to 2 previous errors; 6 warnings emitted
 
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 2cf244185e6..83a0a77d842 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
@@ -139,9 +139,12 @@ error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:96:12
    |
 LL | fn bar(_: &'a Trait) {}
-   |       -    ^^ undeclared lifetime
-   |       |
-   |       help: consider introducing lifetime `'a` here: `<'a>`
+   |            ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | fn bar<'a>(_: &'a Trait) {}
+   |       ++++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:110:13
@@ -171,9 +174,12 @@ error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:122:17
    |
 LL | fn kitten() -> &'a Trait {
-   |          -      ^^ undeclared lifetime
-   |          |
-   |          help: consider introducing lifetime `'a` here: `<'a>`
+   |                 ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | fn kitten<'a>() -> &'a Trait {
+   |          ++++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs:133:16
diff --git a/tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs
index 9e5c1bfe416..b866dab9dba 100644
--- a/tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs
+++ b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs
@@ -8,8 +8,7 @@ trait GatTrait {
 
 trait SuperTrait<T>: for<'a> GatTrait<Gat<'a> = T> {
     fn c(&self) -> dyn SuperTrait<T>;
-    //~^ ERROR associated item referring to unboxed trait object for its own trait
-    //~| ERROR the trait `SuperTrait` is not dyn compatible
+    //~^ ERROR the trait `SuperTrait` is not dyn compatible
 }
 
 fn main() {}
diff --git a/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr
index 582cf1af054..ba4ce475399 100644
--- a/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr
+++ b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr
@@ -7,20 +7,6 @@ LL |         Self: 'a;
    |               ^^
    = help: consider adding an explicit lifetime bound `Self: 'a`...
 
-error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/supertrait-mentions-GAT.rs:10:20
-   |
-LL | trait SuperTrait<T>: for<'a> GatTrait<Gat<'a> = T> {
-   |       ---------- in this trait
-LL |     fn c(&self) -> dyn SuperTrait<T>;
-   |                    ^^^^^^^^^^^^^^^^^
-   |
-help: you might have meant to use `Self` to refer to the implementing type
-   |
-LL -     fn c(&self) -> dyn SuperTrait<T>;
-LL +     fn c(&self) -> Self;
-   |
-
 error[E0038]: the trait `SuperTrait` is not dyn compatible
   --> $DIR/supertrait-mentions-GAT.rs:10:20
    |
@@ -37,8 +23,13 @@ LL |     type Gat<'a>
 LL | trait SuperTrait<T>: for<'a> GatTrait<Gat<'a> = T> {
    |       ---------- this trait is not dyn compatible...
    = help: consider moving `Gat` to another trait
+help: you might have meant to use `Self` to refer to the implementing type
+   |
+LL -     fn c(&self) -> dyn SuperTrait<T>;
+LL +     fn c(&self) -> Self;
+   |
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0038, E0311.
 For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/error-codes/E0017.rs b/tests/ui/error-codes/E0017.rs
index 8c685aad030..0f00ddac579 100644
--- a/tests/ui/error-codes/E0017.rs
+++ b/tests/ui/error-codes/E0017.rs
@@ -5,12 +5,12 @@ static X: i32 = 1;
 const C: i32 = 2;
 static mut M: i32 = 3;
 
-const CR: &'static mut i32 = &mut C; //~ ERROR mutable references are not allowed
+const CR: &'static mut i32 = &mut C; //~ ERROR mutable borrows of temporaries
 //~| WARN taking a mutable
 
 static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR cannot borrow immutable static item `X` as mutable
 
-static CONST_REF: &'static mut i32 = &mut C; //~ ERROR mutable references are not allowed
+static CONST_REF: &'static mut i32 = &mut C; //~ ERROR mutable borrows of temporaries
 //~| WARN taking a mutable
 
 fn main() {}
diff --git a/tests/ui/error-codes/E0017.stderr b/tests/ui/error-codes/E0017.stderr
index 285d363592f..2039e556470 100644
--- a/tests/ui/error-codes/E0017.stderr
+++ b/tests/ui/error-codes/E0017.stderr
@@ -13,11 +13,15 @@ LL | const C: i32 = 2;
    | ^^^^^^^^^^^^
    = note: `#[warn(const_item_mutation)]` on by default
 
-error[E0764]: mutable references are not allowed in the final value of constants
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/E0017.rs:8:30
    |
 LL | const CR: &'static mut i32 = &mut C;
-   |                              ^^^^^^
+   |                              ^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error[E0596]: cannot borrow immutable static item `X` as mutable
   --> $DIR/E0017.rs:11:39
@@ -39,11 +43,15 @@ note: `const` item defined here
 LL | const C: i32 = 2;
    | ^^^^^^^^^^^^
 
-error[E0764]: mutable references are not allowed in the final value of statics
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/E0017.rs:13:38
    |
 LL | static CONST_REF: &'static mut i32 = &mut C;
-   |                                      ^^^^^^
+   |                                      ^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error: aborting due to 3 previous errors; 2 warnings emitted
 
diff --git a/tests/ui/error-codes/E0261.stderr b/tests/ui/error-codes/E0261.stderr
index 0eab2dc0ee0..9ca26dc8459 100644
--- a/tests/ui/error-codes/E0261.stderr
+++ b/tests/ui/error-codes/E0261.stderr
@@ -2,17 +2,23 @@ error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/E0261.rs:1:12
    |
 LL | fn foo(x: &'a str) { }
-   |       -    ^^ undeclared lifetime
-   |       |
-   |       help: consider introducing lifetime `'a` here: `<'a>`
+   |            ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | fn foo<'a>(x: &'a str) { }
+   |       ++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/E0261.rs:5:9
    |
-LL | struct Foo {
-   |           - help: consider introducing lifetime `'a` here: `<'a>`
 LL |     x: &'a str,
    |         ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | struct Foo<'a> {
+   |           ++++
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/error-codes/E0492.stderr b/tests/ui/error-codes/E0492.stderr
index 557c977e87d..43a3a872e4e 100644
--- a/tests/ui/error-codes/E0492.stderr
+++ b/tests/ui/error-codes/E0492.stderr
@@ -1,16 +1,22 @@
-error[E0492]: constants cannot refer to interior mutable data
+error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/E0492.rs:4:33
    |
 LL | const B: &'static AtomicUsize = &A;
-   |                                 ^^ this borrow of an interior mutable value may end up in the final value
+   |                                 ^^ this borrow of an interior mutable value refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
-error[E0492]: statics cannot refer to interior mutable data
+error[E0492]: interior mutable shared borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/E0492.rs:5:34
    |
 LL | static C: &'static AtomicUsize = &A;
-   |                                  ^^ this borrow of an interior mutable value may end up in the final value
+   |                                  ^^ this borrow of an interior mutable value refers to such a temporary
    |
-   = help: to fix this, the value can be extracted to a separate `static` item and then referenced
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/errors/remap-path-prefix-diagnostics.not-diag-in-deps.stderr b/tests/ui/errors/remap-path-prefix-diagnostics.not-diag-in-deps.stderr
index 3ddff11798d..229bfbe59e5 100644
--- a/tests/ui/errors/remap-path-prefix-diagnostics.not-diag-in-deps.stderr
+++ b/tests/ui/errors/remap-path-prefix-diagnostics.not-diag-in-deps.stderr
@@ -2,10 +2,8 @@ error[E0277]: `A` doesn't implement `std::fmt::Display`
   --> remapped/errors/remap-path-prefix-diagnostics.rs:LL:COL
    |
 LL | impl r#trait::Trait for A {}
-   |                         ^ `A` cannot be formatted with the default formatter
+   |                         ^ the trait `std::fmt::Display` is not implemented for `A`
    |
-   = help: the trait `std::fmt::Display` is not implemented for `A`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `Trait`
   --> $DIR/auxiliary/trait.rs:LL:COL
    |
diff --git a/tests/ui/errors/remap-path-prefix-diagnostics.only-debuginfo-in-deps.stderr b/tests/ui/errors/remap-path-prefix-diagnostics.only-debuginfo-in-deps.stderr
index 85c781425b1..a59af3b6a82 100644
--- a/tests/ui/errors/remap-path-prefix-diagnostics.only-debuginfo-in-deps.stderr
+++ b/tests/ui/errors/remap-path-prefix-diagnostics.only-debuginfo-in-deps.stderr
@@ -2,10 +2,8 @@ error[E0277]: `A` doesn't implement `std::fmt::Display`
   --> $DIR/remap-path-prefix-diagnostics.rs:LL:COL
    |
 LL | impl r#trait::Trait for A {}
-   |                         ^ `A` cannot be formatted with the default formatter
+   |                         ^ the trait `std::fmt::Display` is not implemented for `A`
    |
-   = help: the trait `std::fmt::Display` is not implemented for `A`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `Trait`
   --> $DIR/auxiliary/trait-debuginfo.rs:LL:COL
    |
diff --git a/tests/ui/errors/remap-path-prefix-diagnostics.only-diag-in-deps.stderr b/tests/ui/errors/remap-path-prefix-diagnostics.only-diag-in-deps.stderr
index 792ea7925ad..18fb9afcf39 100644
--- a/tests/ui/errors/remap-path-prefix-diagnostics.only-diag-in-deps.stderr
+++ b/tests/ui/errors/remap-path-prefix-diagnostics.only-diag-in-deps.stderr
@@ -2,10 +2,8 @@ error[E0277]: `A` doesn't implement `std::fmt::Display`
   --> $DIR/remap-path-prefix-diagnostics.rs:LL:COL
    |
 LL | impl r#trait::Trait for A {}
-   |                         ^ `A` cannot be formatted with the default formatter
+   |                         ^ the trait `std::fmt::Display` is not implemented for `A`
    |
-   = help: the trait `std::fmt::Display` is not implemented for `A`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `Trait`
   --> $DIR/auxiliary/trait-diag.rs:LL:COL
    |
diff --git a/tests/ui/errors/remap-path-prefix-diagnostics.only-macro-in-deps.stderr b/tests/ui/errors/remap-path-prefix-diagnostics.only-macro-in-deps.stderr
index d13333d2e48..9e770f07fba 100644
--- a/tests/ui/errors/remap-path-prefix-diagnostics.only-macro-in-deps.stderr
+++ b/tests/ui/errors/remap-path-prefix-diagnostics.only-macro-in-deps.stderr
@@ -2,10 +2,8 @@ error[E0277]: `A` doesn't implement `std::fmt::Display`
   --> $DIR/remap-path-prefix-diagnostics.rs:LL:COL
    |
 LL | impl r#trait::Trait for A {}
-   |                         ^ `A` cannot be formatted with the default formatter
+   |                         ^ the trait `std::fmt::Display` is not implemented for `A`
    |
-   = help: the trait `std::fmt::Display` is not implemented for `A`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `Trait`
   --> $DIR/auxiliary/trait-macro.rs:LL:COL
    |
diff --git a/tests/ui/errors/remap-path-prefix-diagnostics.with-debuginfo-in-deps.stderr b/tests/ui/errors/remap-path-prefix-diagnostics.with-debuginfo-in-deps.stderr
index 85c781425b1..a59af3b6a82 100644
--- a/tests/ui/errors/remap-path-prefix-diagnostics.with-debuginfo-in-deps.stderr
+++ b/tests/ui/errors/remap-path-prefix-diagnostics.with-debuginfo-in-deps.stderr
@@ -2,10 +2,8 @@ error[E0277]: `A` doesn't implement `std::fmt::Display`
   --> $DIR/remap-path-prefix-diagnostics.rs:LL:COL
    |
 LL | impl r#trait::Trait for A {}
-   |                         ^ `A` cannot be formatted with the default formatter
+   |                         ^ the trait `std::fmt::Display` is not implemented for `A`
    |
-   = help: the trait `std::fmt::Display` is not implemented for `A`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `Trait`
   --> $DIR/auxiliary/trait-debuginfo.rs:LL:COL
    |
diff --git a/tests/ui/errors/remap-path-prefix-diagnostics.with-diag-in-deps.stderr b/tests/ui/errors/remap-path-prefix-diagnostics.with-diag-in-deps.stderr
index 08f7fb2c736..ca6f2b1697a 100644
--- a/tests/ui/errors/remap-path-prefix-diagnostics.with-diag-in-deps.stderr
+++ b/tests/ui/errors/remap-path-prefix-diagnostics.with-diag-in-deps.stderr
@@ -2,10 +2,8 @@ error[E0277]: `A` doesn't implement `std::fmt::Display`
   --> remapped/errors/remap-path-prefix-diagnostics.rs:LL:COL
    |
 LL | impl r#trait::Trait for A {}
-   |                         ^ `A` cannot be formatted with the default formatter
+   |                         ^ the trait `std::fmt::Display` is not implemented for `A`
    |
-   = help: the trait `std::fmt::Display` is not implemented for `A`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `Trait`
   --> remapped/errors/auxiliary/trait-diag.rs:LL:COL
    |
diff --git a/tests/ui/errors/remap-path-prefix-diagnostics.with-macro-in-deps.stderr b/tests/ui/errors/remap-path-prefix-diagnostics.with-macro-in-deps.stderr
index d13333d2e48..9e770f07fba 100644
--- a/tests/ui/errors/remap-path-prefix-diagnostics.with-macro-in-deps.stderr
+++ b/tests/ui/errors/remap-path-prefix-diagnostics.with-macro-in-deps.stderr
@@ -2,10 +2,8 @@ error[E0277]: `A` doesn't implement `std::fmt::Display`
   --> $DIR/remap-path-prefix-diagnostics.rs:LL:COL
    |
 LL | impl r#trait::Trait for A {}
-   |                         ^ `A` cannot be formatted with the default formatter
+   |                         ^ the trait `std::fmt::Display` is not implemented for `A`
    |
-   = help: the trait `std::fmt::Display` is not implemented for `A`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `Trait`
   --> $DIR/auxiliary/trait-macro.rs:LL:COL
    |
diff --git a/tests/ui/expr/if/if-else-chain-missing-else.stderr b/tests/ui/expr/if/if-else-chain-missing-else.stderr
index 374c4927e30..6c437120d39 100644
--- a/tests/ui/expr/if/if-else-chain-missing-else.stderr
+++ b/tests/ui/expr/if/if-else-chain-missing-else.stderr
@@ -1,18 +1,15 @@
 error[E0308]: `if` and `else` have incompatible types
   --> $DIR/if-else-chain-missing-else.rs:12:12
    |
-LL |        let x = if let Ok(x) = res {
-   |  ______________-
-LL | |          x
-   | |          - expected because of this
-LL | |      } else if let Err(e) = res {
-   | | ____________^
-LL | ||         return Err(e);
-LL | ||     };
-   | ||     ^
-   | ||_____|
-   |  |_____`if` and `else` have incompatible types
-   |        expected `i32`, found `()`
+LL |       let x = if let Ok(x) = res {
+   |               ------------------ `if` and `else` have incompatible types
+LL |           x
+   |           - expected because of this
+LL |       } else if let Err(e) = res {
+   |  ____________^
+LL | |         return Err(e);
+LL | |     };
+   | |_____^ expected `i32`, found `()`
    |
    = note: `if` expressions without `else` evaluate to `()`
    = note: consider adding an `else` block that evaluates to the expected type
diff --git a/tests/ui/expr/if/if-else-type-mismatch.stderr b/tests/ui/expr/if/if-else-type-mismatch.stderr
index 1cf94c98800..56181267a31 100644
--- a/tests/ui/expr/if/if-else-type-mismatch.stderr
+++ b/tests/ui/expr/if/if-else-type-mismatch.stderr
@@ -92,13 +92,16 @@ LL | |     };
 error[E0308]: `if` and `else` have incompatible types
   --> $DIR/if-else-type-mismatch.rs:37:9
    |
-LL |       let _ = if true {
-   |  _____________________-
-LL | |
-LL | |     } else {
-   | |_____- expected because of this
-LL |           11u32
-   |           ^^^^^ expected `()`, found `u32`
+LL |        let _ = if true {
+   |  ______________-       -
+   | | _____________________|
+LL | ||
+LL | ||     } else {
+   | ||_____- expected because of this
+LL | |          11u32
+   | |          ^^^^^ expected `()`, found `u32`
+LL | |      };
+   | |______- `if` and `else` have incompatible types
 
 error[E0308]: `if` and `else` have incompatible types
   --> $DIR/if-else-type-mismatch.rs:42:12
diff --git a/tests/ui/extern-flag/auxiliary/panic_handler.rs b/tests/ui/extern-flag/auxiliary/panic_handler.rs
index 9140ceed229..9607f0ed013 100644
--- a/tests/ui/extern-flag/auxiliary/panic_handler.rs
+++ b/tests/ui/extern-flag/auxiliary/panic_handler.rs
@@ -12,4 +12,12 @@ pub fn begin_panic_handler(_info: &core::panic::PanicInfo<'_>) -> ! {
 }
 
 #[lang = "eh_personality"]
-extern "C" fn eh_personality() {}
+extern "C" fn eh_personality(
+    _version: i32,
+    _actions: i32,
+    _exception_class: u64,
+    _exception_object: *mut (),
+    _context: *mut (),
+) -> i32 {
+    loop {}
+}
diff --git a/tests/ui/feature-gates/feature-gate-abi-custom.rs b/tests/ui/feature-gates/feature-gate-abi-custom.rs
index 3ddce974dd7..312b6230b74 100644
--- a/tests/ui/feature-gates/feature-gate-abi-custom.rs
+++ b/tests/ui/feature-gates/feature-gate-abi-custom.rs
@@ -15,11 +15,11 @@ unsafe extern "custom" fn f7() {
 trait Tr {
     extern "custom" fn m7();
     //~^ ERROR "custom" ABI is experimental
-    //~| ERROR functions with the `"custom"` ABI must be unsafe
+    //~| ERROR functions with the "custom" ABI must be unsafe
     #[unsafe(naked)]
     extern "custom" fn dm7() {
         //~^ ERROR "custom" ABI is experimental
-        //~| ERROR functions with the `"custom"` ABI must be unsafe
+        //~| ERROR functions with the "custom" ABI must be unsafe
         naked_asm!("")
     }
 }
@@ -31,7 +31,7 @@ impl Tr for S {
     #[unsafe(naked)]
     extern "custom" fn m7() {
         //~^ ERROR "custom" ABI is experimental
-        //~| ERROR functions with the `"custom"` ABI must be unsafe
+        //~| ERROR functions with the "custom" ABI must be unsafe
         naked_asm!("")
     }
 }
@@ -41,7 +41,7 @@ impl S {
     #[unsafe(naked)]
     extern "custom" fn im7() {
         //~^ ERROR "custom" ABI is experimental
-        //~| ERROR functions with the `"custom"` ABI must be unsafe
+        //~| ERROR functions with the "custom" ABI must be unsafe
         naked_asm!("")
     }
 }
diff --git a/tests/ui/feature-gates/feature-gate-abi-custom.stderr b/tests/ui/feature-gates/feature-gate-abi-custom.stderr
index e6dce0126d6..e359dbb5ebe 100644
--- a/tests/ui/feature-gates/feature-gate-abi-custom.stderr
+++ b/tests/ui/feature-gates/feature-gate-abi-custom.stderr
@@ -1,4 +1,4 @@
-error: functions with the `"custom"` ABI must be unsafe
+error: functions with the "custom" ABI must be unsafe
   --> $DIR/feature-gate-abi-custom.rs:16:5
    |
 LL |     extern "custom" fn m7();
@@ -9,7 +9,7 @@ help: add the `unsafe` keyword to this definition
 LL |     unsafe extern "custom" fn m7();
    |     ++++++
 
-error: functions with the `"custom"` ABI must be unsafe
+error: functions with the "custom" ABI must be unsafe
   --> $DIR/feature-gate-abi-custom.rs:20:5
    |
 LL |     extern "custom" fn dm7() {
@@ -20,7 +20,7 @@ help: add the `unsafe` keyword to this definition
 LL |     unsafe extern "custom" fn dm7() {
    |     ++++++
 
-error: functions with the `"custom"` ABI must be unsafe
+error: functions with the "custom" ABI must be unsafe
   --> $DIR/feature-gate-abi-custom.rs:32:5
    |
 LL |     extern "custom" fn m7() {
@@ -31,7 +31,7 @@ help: add the `unsafe` keyword to this definition
 LL |     unsafe extern "custom" fn m7() {
    |     ++++++
 
-error: functions with the `"custom"` ABI must be unsafe
+error: functions with the "custom" ABI must be unsafe
   --> $DIR/feature-gate-abi-custom.rs:42:5
    |
 LL |     extern "custom" fn im7() {
diff --git a/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.AMDGPU.stderr b/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.AMDGPU.stderr
index fca32c5c1e6..4fa3fee942e 100644
--- a/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.AMDGPU.stderr
+++ b/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.AMDGPU.stderr
@@ -19,7 +19,7 @@ LL |     extern "gpu-kernel" fn m1(_: ());
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:23:12
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:24:12
    |
 LL |     extern "gpu-kernel" fn dm1(_: ()) {}
    |            ^^^^^^^^^^^^
@@ -29,7 +29,7 @@ LL |     extern "gpu-kernel" fn dm1(_: ()) {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:31:12
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:32:12
    |
 LL |     extern "gpu-kernel" fn m1(_: ()) {}
    |            ^^^^^^^^^^^^
@@ -39,7 +39,7 @@ LL |     extern "gpu-kernel" fn m1(_: ()) {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:37:12
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:38:12
    |
 LL |     extern "gpu-kernel" fn im1(_: ()) {}
    |            ^^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL |     extern "gpu-kernel" fn im1(_: ()) {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:42:18
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:43:18
    |
 LL | type A1 = extern "gpu-kernel" fn(_: ());
    |                  ^^^^^^^^^^^^
diff --git a/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.HOST.stderr b/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.HOST.stderr
index cc81289f6b7..88734bc9d22 100644
--- a/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.HOST.stderr
+++ b/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.HOST.stderr
@@ -1,3 +1,9 @@
+error[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:16:8
+   |
+LL | extern "gpu-kernel" fn f1(_: ()) {}
+   |        ^^^^^^^^^^^^
+
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
   --> $DIR/feature-gate-abi_gpu_kernel.rs:16:8
    |
@@ -8,6 +14,12 @@ LL | extern "gpu-kernel" fn f1(_: ()) {}
    = help: add `#![feature(abi_gpu_kernel)]` 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[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:21:12
+   |
+LL |     extern "gpu-kernel" fn m1(_: ());
+   |            ^^^^^^^^^^^^
+
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
   --> $DIR/feature-gate-abi_gpu_kernel.rs:21:12
    |
@@ -18,8 +30,14 @@ LL |     extern "gpu-kernel" fn m1(_: ());
    = help: add `#![feature(abi_gpu_kernel)]` 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[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:24:12
+   |
+LL |     extern "gpu-kernel" fn dm1(_: ()) {}
+   |            ^^^^^^^^^^^^
+
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:23:12
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:24:12
    |
 LL |     extern "gpu-kernel" fn dm1(_: ()) {}
    |            ^^^^^^^^^^^^
@@ -28,8 +46,14 @@ LL |     extern "gpu-kernel" fn dm1(_: ()) {}
    = help: add `#![feature(abi_gpu_kernel)]` 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[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:32:12
+   |
+LL |     extern "gpu-kernel" fn m1(_: ()) {}
+   |            ^^^^^^^^^^^^
+
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:31:12
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:32:12
    |
 LL |     extern "gpu-kernel" fn m1(_: ()) {}
    |            ^^^^^^^^^^^^
@@ -38,8 +62,14 @@ LL |     extern "gpu-kernel" fn m1(_: ()) {}
    = help: add `#![feature(abi_gpu_kernel)]` 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[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:38:12
+   |
+LL |     extern "gpu-kernel" fn im1(_: ()) {}
+   |            ^^^^^^^^^^^^
+
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:37:12
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:38:12
    |
 LL |     extern "gpu-kernel" fn im1(_: ()) {}
    |            ^^^^^^^^^^^^
@@ -48,8 +78,14 @@ LL |     extern "gpu-kernel" fn im1(_: ()) {}
    = help: add `#![feature(abi_gpu_kernel)]` 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[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:43:18
+   |
+LL | type A1 = extern "gpu-kernel" fn(_: ());
+   |                  ^^^^^^^^^^^^
+
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:42:18
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:43:18
    |
 LL | type A1 = extern "gpu-kernel" fn(_: ());
    |                  ^^^^^^^^^^^^
@@ -58,6 +94,12 @@ LL | type A1 = extern "gpu-kernel" fn(_: ());
    = help: add `#![feature(abi_gpu_kernel)]` 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[E0570]: "gpu-kernel" is not a supported ABI for the current target
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:47:8
+   |
+LL | extern "gpu-kernel" {}
+   |        ^^^^^^^^^^^^
+
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
   --> $DIR/feature-gate-abi_gpu_kernel.rs:47:8
    |
@@ -68,58 +110,7 @@ LL | extern "gpu-kernel" {}
    = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-warning: the calling convention "gpu-kernel" is not supported on this target
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:42:11
-   |
-LL | type A1 = extern "gpu-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]: `"gpu-kernel"` is not a supported ABI for the current target
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:47:1
-   |
-LL | extern "gpu-kernel" {}
-   | ^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:16:1
-   |
-LL | extern "gpu-kernel" fn f1(_: ()) {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:23:5
-   |
-LL |     extern "gpu-kernel" fn dm1(_: ()) {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:31:5
-   |
-LL |     extern "gpu-kernel" fn m1(_: ()) {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:37:5
-   |
-LL |     extern "gpu-kernel" fn im1(_: ()) {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 12 previous errors; 1 warning emitted
+error: aborting due to 14 previous errors
 
 Some errors have detailed explanations: E0570, E0658.
 For more information about an error, try `rustc --explain E0570`.
-Future incompatibility report: Future breakage diagnostic:
-warning: the calling convention "gpu-kernel" is not supported on this target
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:42:11
-   |
-LL | type A1 = extern "gpu-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
-
diff --git a/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.NVPTX.stderr b/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.NVPTX.stderr
index fca32c5c1e6..4fa3fee942e 100644
--- a/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.NVPTX.stderr
+++ b/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.NVPTX.stderr
@@ -19,7 +19,7 @@ LL |     extern "gpu-kernel" fn m1(_: ());
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:23:12
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:24:12
    |
 LL |     extern "gpu-kernel" fn dm1(_: ()) {}
    |            ^^^^^^^^^^^^
@@ -29,7 +29,7 @@ LL |     extern "gpu-kernel" fn dm1(_: ()) {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:31:12
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:32:12
    |
 LL |     extern "gpu-kernel" fn m1(_: ()) {}
    |            ^^^^^^^^^^^^
@@ -39,7 +39,7 @@ LL |     extern "gpu-kernel" fn m1(_: ()) {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:37:12
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:38:12
    |
 LL |     extern "gpu-kernel" fn im1(_: ()) {}
    |            ^^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL |     extern "gpu-kernel" fn im1(_: ()) {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-  --> $DIR/feature-gate-abi_gpu_kernel.rs:42:18
+  --> $DIR/feature-gate-abi_gpu_kernel.rs:43:18
    |
 LL | type A1 = extern "gpu-kernel" fn(_: ());
    |                  ^^^^^^^^^^^^
diff --git a/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs b/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs
index 7b1ee681dd7..988fbd83afc 100644
--- a/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs
+++ b/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs
@@ -19,6 +19,7 @@ extern "gpu-kernel" fn f1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental a
 // Methods in trait definition
 trait Tr {
     extern "gpu-kernel" fn m1(_: ()); //~ ERROR "gpu-kernel" ABI is experimental and subject to change
+    //[HOST]~^ ERROR is not a supported ABI
 
     extern "gpu-kernel" fn dm1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
     //[HOST]~^ ERROR is not a supported ABI
@@ -40,8 +41,7 @@ impl S {
 
 // Function pointer types
 type A1 = extern "gpu-kernel" fn(_: ()); //~ ERROR "gpu-kernel" ABI is experimental and subject to change
-//[HOST]~^ WARNING the calling convention "gpu-kernel" is not supported on this target [unsupported_fn_ptr_calling_conventions]
-//[HOST]~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+//[HOST]~^ ERROR is not a supported ABI
 
 // Foreign modules
 extern "gpu-kernel" {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
diff --git a/tests/ui/feature-gates/feature-gate-cfi_encoding.rs b/tests/ui/feature-gates/feature-gate-cfi_encoding.rs
index 3cef8156014..b6312dd7817 100644
--- a/tests/ui/feature-gates/feature-gate-cfi_encoding.rs
+++ b/tests/ui/feature-gates/feature-gate-cfi_encoding.rs
@@ -1,4 +1,4 @@
 #![crate_type = "lib"]
 
-#[cfi_encoding = "3Bar"] //~ERROR 3:1: 3:25: the `#[cfi_encoding]` attribute is an experimental feature [E0658]
+#[cfi_encoding = "3Bar"] //~ ERROR the `#[cfi_encoding]` attribute is an experimental feature [E0658]
 pub struct Foo(i32);
diff --git a/tests/ui/feature-gates/feature-gate-concat_idents.rs b/tests/ui/feature-gates/feature-gate-concat_idents.rs
deleted file mode 100644
index 4fc3b691597..00000000000
--- a/tests/ui/feature-gates/feature-gate-concat_idents.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-#![expect(deprecated)] // concat_idents is deprecated
-
-const XY_1: i32 = 10;
-
-fn main() {
-    const XY_2: i32 = 20;
-    let a = concat_idents!(X, Y_1); //~ ERROR `concat_idents` is not stable
-    let b = concat_idents!(X, Y_2); //~ ERROR `concat_idents` is not stable
-    assert_eq!(a, 10);
-    assert_eq!(b, 20);
-}
diff --git a/tests/ui/feature-gates/feature-gate-concat_idents.stderr b/tests/ui/feature-gates/feature-gate-concat_idents.stderr
deleted file mode 100644
index 6399424eecd..00000000000
--- a/tests/ui/feature-gates/feature-gate-concat_idents.stderr
+++ /dev/null
@@ -1,23 +0,0 @@
-error[E0658]: use of unstable library feature `concat_idents`: `concat_idents` is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-concat_idents.rs:7:13
-   |
-LL |     let a = concat_idents!(X, Y_1);
-   |             ^^^^^^^^^^^^^
-   |
-   = note: see issue #29599 <https://github.com/rust-lang/rust/issues/29599> for more information
-   = help: add `#![feature(concat_idents)]` 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 `concat_idents`: `concat_idents` is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-concat_idents.rs:8:13
-   |
-LL |     let b = concat_idents!(X, Y_2);
-   |             ^^^^^^^^^^^^^
-   |
-   = note: see issue #29599 <https://github.com/rust-lang/rust/issues/29599> for more information
-   = help: add `#![feature(concat_idents)]` 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-concat_idents2.rs b/tests/ui/feature-gates/feature-gate-concat_idents2.rs
deleted file mode 100644
index bc2b4f7cddf..00000000000
--- a/tests/ui/feature-gates/feature-gate-concat_idents2.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-#![expect(deprecated)] // concat_idents is deprecated
-
-fn main() {
-    concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough
-                          //~| ERROR cannot find value `ab` in this scope
-}
diff --git a/tests/ui/feature-gates/feature-gate-concat_idents2.stderr b/tests/ui/feature-gates/feature-gate-concat_idents2.stderr
deleted file mode 100644
index a770c1a348b..00000000000
--- a/tests/ui/feature-gates/feature-gate-concat_idents2.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0658]: use of unstable library feature `concat_idents`: `concat_idents` is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-concat_idents2.rs:4:5
-   |
-LL |     concat_idents!(a, b);
-   |     ^^^^^^^^^^^^^
-   |
-   = note: see issue #29599 <https://github.com/rust-lang/rust/issues/29599> for more information
-   = help: add `#![feature(concat_idents)]` 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[E0425]: cannot find value `ab` in this scope
-  --> $DIR/feature-gate-concat_idents2.rs:4:5
-   |
-LL |     concat_idents!(a, b);
-   |     ^^^^^^^^^^^^^^^^^^^^ not found in this scope
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0425, E0658.
-For more information about an error, try `rustc --explain E0425`.
diff --git a/tests/ui/feature-gates/feature-gate-concat_idents3.rs b/tests/ui/feature-gates/feature-gate-concat_idents3.rs
deleted file mode 100644
index d4a0d2e6bb0..00000000000
--- a/tests/ui/feature-gates/feature-gate-concat_idents3.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-#![expect(deprecated)] // concat_idents is deprecated
-
-const XY_1: i32 = 10;
-
-fn main() {
-    const XY_2: i32 = 20;
-    assert_eq!(10, concat_idents!(X, Y_1)); //~ ERROR `concat_idents` is not stable
-    assert_eq!(20, concat_idents!(X, Y_2)); //~ ERROR `concat_idents` is not stable
-}
diff --git a/tests/ui/feature-gates/feature-gate-concat_idents3.stderr b/tests/ui/feature-gates/feature-gate-concat_idents3.stderr
deleted file mode 100644
index 7d929322bc0..00000000000
--- a/tests/ui/feature-gates/feature-gate-concat_idents3.stderr
+++ /dev/null
@@ -1,23 +0,0 @@
-error[E0658]: use of unstable library feature `concat_idents`: `concat_idents` is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-concat_idents3.rs:7:20
-   |
-LL |     assert_eq!(10, concat_idents!(X, Y_1));
-   |                    ^^^^^^^^^^^^^
-   |
-   = note: see issue #29599 <https://github.com/rust-lang/rust/issues/29599> for more information
-   = help: add `#![feature(concat_idents)]` 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 `concat_idents`: `concat_idents` is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-concat_idents3.rs:8:20
-   |
-LL |     assert_eq!(20, concat_idents!(X, Y_2));
-   |                    ^^^^^^^^^^^^^
-   |
-   = note: see issue #29599 <https://github.com/rust-lang/rust/issues/29599> for more information
-   = help: add `#![feature(concat_idents)]` 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-coverage-attribute.rs b/tests/ui/feature-gates/feature-gate-coverage-attribute.rs
index 2cf4b76180e..0a463755f13 100644
--- a/tests/ui/feature-gates/feature-gate-coverage-attribute.rs
+++ b/tests/ui/feature-gates/feature-gate-coverage-attribute.rs
@@ -1,5 +1,3 @@
-//@ normalize-stderr: "you are using [0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?( \([^)]*\))?" -> "you are using $$RUSTC_VERSION"
-
 #![crate_type = "lib"]
 #![feature(no_coverage)] //~ ERROR feature has been removed [E0557]
 
diff --git a/tests/ui/feature-gates/feature-gate-coverage-attribute.stderr b/tests/ui/feature-gates/feature-gate-coverage-attribute.stderr
index 8c23544698d..68d0d9bc3c3 100644
--- a/tests/ui/feature-gates/feature-gate-coverage-attribute.stderr
+++ b/tests/ui/feature-gates/feature-gate-coverage-attribute.stderr
@@ -1,14 +1,14 @@
 error[E0557]: feature has been removed
-  --> $DIR/feature-gate-coverage-attribute.rs:4:12
+  --> $DIR/feature-gate-coverage-attribute.rs:2:12
    |
 LL | #![feature(no_coverage)]
    |            ^^^^^^^^^^^ feature has been removed
    |
-   = note: removed in 1.74.0 (you are using $RUSTC_VERSION); see <https://github.com/rust-lang/rust/pull/114656> for more information
+   = note: removed in 1.74.0; see <https://github.com/rust-lang/rust/pull/114656> for more information
    = note: renamed to `coverage_attribute`
 
 error[E0658]: the `#[coverage]` attribute is an experimental feature
-  --> $DIR/feature-gate-coverage-attribute.rs:12:1
+  --> $DIR/feature-gate-coverage-attribute.rs:10:1
    |
 LL | #[coverage(off)]
    | ^^^^^^^^^^^^^^^^
diff --git a/tests/ui/feature-gates/feature-gate-fn_align.stderr b/tests/ui/feature-gates/feature-gate-fn_align.stderr
index 93ef136dc73..921cf08435c 100644
--- a/tests/ui/feature-gates/feature-gate-fn_align.stderr
+++ b/tests/ui/feature-gates/feature-gate-fn_align.stderr
@@ -22,12 +22,10 @@ error[E0539]: malformed `align` attribute input
   --> $DIR/feature-gate-fn_align.rs:8:5
    |
 LL |     #[align]
-   |     ^^^^^^^^ expected this to be a list
-   |
-help: try changing it to one of the following valid forms of the attribute
-   |
-LL |     #[align(<alignment in bytes>)]
-   |            ++++++++++++++++++++++
+   |     ^^^^^^^^
+   |     |
+   |     expected this to be a list
+   |     help: must be of the form: `#[align(<alignment in bytes>)]`
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/feature-gates/feature-gate-loop-match.rs b/tests/ui/feature-gates/feature-gate-loop-match.rs
new file mode 100644
index 00000000000..399b20234f3
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-loop-match.rs
@@ -0,0 +1,30 @@
+// Test that `#[loop_match]` and `#[const_continue]` cannot be used without
+// `#![feature(loop_match)]`.
+
+enum State {
+    A,
+    B,
+    C,
+}
+
+fn main() {
+    let mut state = State::A;
+    #[loop_match] //~ ERROR the `#[loop_match]` attribute is an experimental feature
+    'a: loop {
+        state = 'blk: {
+            match state {
+                State::A => {
+                    #[const_continue]
+                    //~^ ERROR the `#[const_continue]` attribute is an experimental feature
+                    break 'blk State::B;
+                }
+                State::B => {
+                    #[const_continue]
+                    //~^ ERROR the `#[const_continue]` attribute is an experimental feature
+                    break 'blk State::C;
+                }
+                State::C => break 'a,
+            }
+        };
+    }
+}
diff --git a/tests/ui/feature-gates/feature-gate-loop-match.stderr b/tests/ui/feature-gates/feature-gate-loop-match.stderr
new file mode 100644
index 00000000000..9b12047cf4d
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-loop-match.stderr
@@ -0,0 +1,33 @@
+error[E0658]: the `#[loop_match]` attribute is an experimental feature
+  --> $DIR/feature-gate-loop-match.rs:12:5
+   |
+LL |     #[loop_match]
+   |     ^^^^^^^^^^^^^
+   |
+   = note: see issue #132306 <https://github.com/rust-lang/rust/issues/132306> for more information
+   = help: add `#![feature(loop_match)]` 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]: the `#[const_continue]` attribute is an experimental feature
+  --> $DIR/feature-gate-loop-match.rs:17:21
+   |
+LL |                     #[const_continue]
+   |                     ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #132306 <https://github.com/rust-lang/rust/issues/132306> for more information
+   = help: add `#![feature(loop_match)]` 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]: the `#[const_continue]` attribute is an experimental feature
+  --> $DIR/feature-gate-loop-match.rs:22:21
+   |
+LL |                     #[const_continue]
+   |                     ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #132306 <https://github.com/rust-lang/rust/issues/132306> for more information
+   = help: add `#![feature(loop_match)]` 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-naked_functions_target_feature.stderr b/tests/ui/feature-gates/feature-gate-naked_functions_target_feature.stderr
index 8e601a14753..e57ec9cc59b 100644
--- a/tests/ui/feature-gates/feature-gate-naked_functions_target_feature.stderr
+++ b/tests/ui/feature-gates/feature-gate-naked_functions_target_feature.stderr
@@ -1,8 +1,8 @@
 error[E0658]: `#[target_feature(/* ... */)]` is currently unstable on `#[naked]` functions
-  --> $DIR/feature-gate-naked_functions_target_feature.rs:7:1
+  --> $DIR/feature-gate-naked_functions_target_feature.rs:7:3
    |
 LL | #[target_feature(enable = "avx2")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |   ^^^^^^^^^^^^^^
    |
    = note: see issue #138568 <https://github.com/rust-lang/rust/issues/138568> for more information
    = help: add `#![feature(naked_functions_target_feature)]` to the crate attributes to enable
diff --git a/tests/ui/feature-gates/feature-gate-optimize_attribute.rs b/tests/ui/feature-gates/feature-gate-optimize_attribute.rs
index 77cc307c9f4..ed5a11270f8 100644
--- a/tests/ui/feature-gates/feature-gate-optimize_attribute.rs
+++ b/tests/ui/feature-gates/feature-gate-optimize_attribute.rs
@@ -11,5 +11,5 @@ fn none() {}
 
 #[optimize(banana)]
 //~^ ERROR the `#[optimize]` attribute is an experimental feature
-//~| ERROR E0722
+//~| ERROR malformed `optimize` attribute input [E0539]
 fn not_known() {}
diff --git a/tests/ui/feature-gates/feature-gate-optimize_attribute.stderr b/tests/ui/feature-gates/feature-gate-optimize_attribute.stderr
index 4e6e4ac2703..e7e62b4f989 100644
--- a/tests/ui/feature-gates/feature-gate-optimize_attribute.stderr
+++ b/tests/ui/feature-gates/feature-gate-optimize_attribute.stderr
@@ -38,13 +38,16 @@ LL | #[optimize(banana)]
    = help: add `#![feature(optimize_attribute)]` 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[E0722]: invalid argument
-  --> $DIR/feature-gate-optimize_attribute.rs:12:12
+error[E0539]: malformed `optimize` attribute input
+  --> $DIR/feature-gate-optimize_attribute.rs:12:1
    |
 LL | #[optimize(banana)]
-   |            ^^^^^^
+   | ^^^^^^^^^^^------^^
+   | |          |
+   | |          valid arguments are `size`, `speed` or `none`
+   | help: must be of the form: `#[optimize(size|speed|none)]`
 
 error: aborting due to 5 previous errors
 
-Some errors have detailed explanations: E0658, E0722.
-For more information about an error, try `rustc --explain E0658`.
+Some errors have detailed explanations: E0539, E0658.
+For more information about an error, try `rustc --explain E0539`.
diff --git a/tests/ui/feature-gates/feature-gate-pin_ergonomics.rs b/tests/ui/feature-gates/feature-gate-pin_ergonomics.rs
index 663a83a665c..7746654555d 100644
--- a/tests/ui/feature-gates/feature-gate-pin_ergonomics.rs
+++ b/tests/ui/feature-gates/feature-gate-pin_ergonomics.rs
@@ -17,6 +17,10 @@ fn foo(mut x: Pin<&mut Foo>) {
     let _y: &pin mut Foo = x; //~ ERROR pinned reference syntax is experimental
 }
 
+fn foo_const(x: Pin<&Foo>) {
+    let _y: &pin const Foo = x; //~ ERROR pinned reference syntax is experimental
+}
+
 fn foo_sugar(_: &pin mut Foo) {} //~ ERROR pinned reference syntax is experimental
 
 fn bar(x: Pin<&mut Foo>) {
@@ -31,6 +35,18 @@ fn baz(mut x: Pin<&mut Foo>) {
 
 fn baz_sugar(_: &pin const Foo) {} //~ ERROR pinned reference syntax is experimental
 
+fn borrows() {
+    let mut x: Pin<&mut _> = &pin mut Foo; //~ ERROR pinned reference syntax is experimental
+    foo(x.as_mut());
+    foo(x.as_mut());
+    foo_const(x.as_ref());
+
+    let x: Pin<&_> = &pin const Foo; //~ ERROR pinned reference syntax is experimental
+
+    foo_const(x);
+    foo_const(x);
+}
+
 #[cfg(any())]
 mod not_compiled {
     use std::pin::Pin;
@@ -63,6 +79,18 @@ mod not_compiled {
     }
 
     fn baz_sugar(_: &pin const Foo) {} //~ ERROR pinned reference syntax is experimental
+
+    fn borrows() {
+        let mut x: Pin<&mut _> = &pin mut Foo; //~ ERROR pinned reference syntax is experimental
+        foo(x.as_mut());
+        foo(x.as_mut());
+        foo_const(x.as_ref());
+
+        let x: Pin<&_> = &pin const Foo; //~ ERROR pinned reference syntax is experimental
+
+        foo_const(x);
+        foo_const(x);
+    }
 }
 
 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 8ed7543d86e..a8890254fac 100644
--- a/tests/ui/feature-gates/feature-gate-pin_ergonomics.stderr
+++ b/tests/ui/feature-gates/feature-gate-pin_ergonomics.stderr
@@ -29,7 +29,17 @@ LL |     let _y: &pin mut Foo = x;
    = 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:20:18
+  --> $DIR/feature-gate-pin_ergonomics.rs:21:14
+   |
+LL |     let _y: &pin const 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:24:18
    |
 LL | fn foo_sugar(_: &pin mut Foo) {}
    |                  ^^^
@@ -39,7 +49,7 @@ LL | fn foo_sugar(_: &pin mut Foo) {}
    = 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:32:18
+  --> $DIR/feature-gate-pin_ergonomics.rs:36:18
    |
 LL | fn baz_sugar(_: &pin const Foo) {}
    |                  ^^^
@@ -49,7 +59,27 @@ LL | fn baz_sugar(_: &pin const Foo) {}
    = 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:43:23
+  --> $DIR/feature-gate-pin_ergonomics.rs:39:31
+   |
+LL |     let mut x: Pin<&mut _> = &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:44:23
+   |
+LL |     let x: Pin<&_> = &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[E0658]: pinned reference syntax is experimental
+  --> $DIR/feature-gate-pin_ergonomics.rs:59:23
    |
 LL |         fn foo_sugar(&pin mut self) {}
    |                       ^^^
@@ -59,7 +89,7 @@ LL |         fn foo_sugar(&pin mut self) {}
    = 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:44:29
+  --> $DIR/feature-gate-pin_ergonomics.rs:60:29
    |
 LL |         fn foo_sugar_const(&pin const self) {}
    |                             ^^^
@@ -69,7 +99,7 @@ LL |         fn foo_sugar_const(&pin const self) {}
    = 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:50:18
+  --> $DIR/feature-gate-pin_ergonomics.rs:66:18
    |
 LL |         let _y: &pin mut Foo = x;
    |                  ^^^
@@ -79,7 +109,7 @@ LL |         let _y: &pin mut Foo = x;
    = 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:53:22
+  --> $DIR/feature-gate-pin_ergonomics.rs:69:22
    |
 LL |     fn foo_sugar(_: &pin mut Foo) {}
    |                      ^^^
@@ -89,7 +119,7 @@ LL |     fn foo_sugar(_: &pin mut Foo) {}
    = 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:65:22
+  --> $DIR/feature-gate-pin_ergonomics.rs:81:22
    |
 LL |     fn baz_sugar(_: &pin const Foo) {}
    |                      ^^^
@@ -98,8 +128,28 @@ LL |     fn baz_sugar(_: &pin const Foo) {}
    = 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:84:35
+   |
+LL |         let mut x: Pin<&mut _> = &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:89:27
+   |
+LL |         let x: Pin<&_> = &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:24:9
+  --> $DIR/feature-gate-pin_ergonomics.rs:28:9
    |
 LL | fn bar(x: Pin<&mut Foo>) {
    |        - move occurs because `x` has type `Pin<&mut Foo>`, which does not implement the `Copy` trait
@@ -117,7 +167,7 @@ LL | fn foo(mut x: Pin<&mut Foo>) {
    |    in this function
 
 error[E0382]: use of moved value: `x`
-  --> $DIR/feature-gate-pin_ergonomics.rs:29:5
+  --> $DIR/feature-gate-pin_ergonomics.rs:33: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
@@ -136,7 +186,7 @@ help: consider reborrowing the `Pin` instead of moving it
 LL |     x.as_mut().foo();
    |      +++++++++
 
-error: aborting due to 12 previous errors
+error: aborting due to 17 previous errors
 
 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-unsized_fn_params.stderr b/tests/ui/feature-gates/feature-gate-unsized_fn_params.edition2015.stderr
index 30f95851768..ac2d1ffa868 100644
--- a/tests/ui/feature-gates/feature-gate-unsized_fn_params.stderr
+++ b/tests/ui/feature-gates/feature-gate-unsized_fn_params.edition2015.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
-  --> $DIR/feature-gate-unsized_fn_params.rs:17:11
+  --> $DIR/feature-gate-unsized_fn_params.rs:20:11
    |
 LL | fn foo(x: dyn Foo) {
    |           ^^^^^^^ doesn't have a size known at compile-time
@@ -17,7 +17,7 @@ LL | fn foo(x: &dyn Foo) {
    |           +
 
 error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
-  --> $DIR/feature-gate-unsized_fn_params.rs:21:11
+  --> $DIR/feature-gate-unsized_fn_params.rs:24:11
    |
 LL | fn bar(x: Foo) {
    |           ^^^ doesn't have a size known at compile-time
@@ -34,7 +34,7 @@ LL | fn bar(x: &dyn Foo) {
    |           ++++
 
 error[E0277]: the size for values of type `[()]` cannot be known at compilation time
-  --> $DIR/feature-gate-unsized_fn_params.rs:25:11
+  --> $DIR/feature-gate-unsized_fn_params.rs:30:11
    |
 LL | fn qux(_: [()]) {}
    |           ^^^^ doesn't have a size known at compile-time
@@ -47,7 +47,7 @@ LL | fn qux(_: &[()]) {}
    |           +
 
 error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
-  --> $DIR/feature-gate-unsized_fn_params.rs:29:9
+  --> $DIR/feature-gate-unsized_fn_params.rs:34:9
    |
 LL |     foo(*x);
    |         ^^ doesn't have a size known at compile-time
diff --git a/tests/ui/feature-gates/feature-gate-unsized_fn_params.edition2021.stderr b/tests/ui/feature-gates/feature-gate-unsized_fn_params.edition2021.stderr
new file mode 100644
index 00000000000..12411f695f4
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-unsized_fn_params.edition2021.stderr
@@ -0,0 +1,65 @@
+error[E0782]: expected a type, found a trait
+  --> $DIR/feature-gate-unsized_fn_params.rs:24:11
+   |
+LL | fn bar(x: Foo) {
+   |           ^^^
+   |
+help: use a new generic type parameter, constrained by `Foo`
+   |
+LL - fn bar(x: Foo) {
+LL + fn bar<T: Foo>(x: T) {
+   |
+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 bar(x: impl Foo) {
+   |           ++++
+help: alternatively, use a trait object to accept any type that implements `Foo`, accessing its methods at runtime using dynamic dispatch
+   |
+LL | fn bar(x: &dyn Foo) {
+   |           ++++
+
+error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
+  --> $DIR/feature-gate-unsized_fn_params.rs:20:11
+   |
+LL | fn foo(x: dyn 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 foo(x: dyn Foo) {
+LL + fn foo(x: impl Foo) {
+   |
+help: function arguments must have a statically known size, borrowed types always have a known size
+   |
+LL | fn foo(x: &dyn Foo) {
+   |           +
+
+error[E0277]: the size for values of type `[()]` cannot be known at compilation time
+  --> $DIR/feature-gate-unsized_fn_params.rs:30:11
+   |
+LL | fn qux(_: [()]) {}
+   |           ^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `[()]`
+   = help: unsized fn params are gated as an unstable feature
+help: function arguments must have a statically known size, borrowed slices always have a known size
+   |
+LL | fn qux(_: &[()]) {}
+   |           +
+
+error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
+  --> $DIR/feature-gate-unsized_fn_params.rs:34:9
+   |
+LL |     foo(*x);
+   |         ^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)`
+   = note: all function arguments must have a statically known size
+   = help: unsized fn params are gated as an unstable feature
+
+error: aborting due to 4 previous errors
+
+Some errors have detailed explanations: E0277, E0782.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/feature-gates/feature-gate-unsized_fn_params.rs b/tests/ui/feature-gates/feature-gate-unsized_fn_params.rs
index c04e57843d4..3c5f932e891 100644
--- a/tests/ui/feature-gates/feature-gate-unsized_fn_params.rs
+++ b/tests/ui/feature-gates/feature-gate-unsized_fn_params.rs
@@ -1,3 +1,6 @@
+//@revisions: edition2015 edition2021
+//@[edition2015] edition:2015
+//@[edition2021] edition:2021
 #![allow(unused, bare_trait_objects)]
 #[repr(align(256))]
 struct A {
@@ -18,7 +21,9 @@ fn foo(x: dyn Foo) { //~ ERROR [E0277]
     x.foo()
 }
 
-fn bar(x: Foo) { //~ ERROR [E0277]
+fn bar(x: Foo) {
+//[edition2015]~^ ERROR [E0277]
+//[edition2021]~^^ ERROR expected a type, found a trait
     x.foo()
 }
 
diff --git a/tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.rs b/tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.rs
index b5fbcc9ccf8..c1469863792 100644
--- a/tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.rs
+++ b/tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.rs
@@ -1,4 +1,4 @@
 fn main() {
     let _ : &(dyn Send,) = &((),);
-    //~^ ERROR 2:28: 2:34: mismatched types [E0308]
+    //~^ ERROR mismatched types [E0308]
 }
diff --git a/tests/ui/feature-gates/gated-bad-feature.rs b/tests/ui/feature-gates/gated-bad-feature.rs
index 3114f661dc5..51f2db5556e 100644
--- a/tests/ui/feature-gates/gated-bad-feature.rs
+++ b/tests/ui/feature-gates/gated-bad-feature.rs
@@ -1,4 +1,3 @@
-//@ normalize-stderr: "you are using [0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?( \([^)]*\))?" -> "you are using $$RUSTC_VERSION"
 #![feature(foo_bar_baz, foo(bar), foo = "baz", foo)]
 //~^ ERROR malformed `feature`
 //~| ERROR malformed `feature`
diff --git a/tests/ui/feature-gates/gated-bad-feature.stderr b/tests/ui/feature-gates/gated-bad-feature.stderr
index 0e75dff14f8..e0e84d84235 100644
--- a/tests/ui/feature-gates/gated-bad-feature.stderr
+++ b/tests/ui/feature-gates/gated-bad-feature.stderr
@@ -1,43 +1,43 @@
 error[E0556]: malformed `feature` attribute input
-  --> $DIR/gated-bad-feature.rs:2:25
+  --> $DIR/gated-bad-feature.rs:1:25
    |
 LL | #![feature(foo_bar_baz, foo(bar), foo = "baz", foo)]
    |                         ^^^^^^^^ help: expected just one word: `foo`
 
 error[E0556]: malformed `feature` attribute input
-  --> $DIR/gated-bad-feature.rs:2:35
+  --> $DIR/gated-bad-feature.rs:1:35
    |
 LL | #![feature(foo_bar_baz, foo(bar), foo = "baz", foo)]
    |                                   ^^^^^^^^^^^ help: expected just one word: `foo`
 
 error[E0557]: feature has been removed
-  --> $DIR/gated-bad-feature.rs:9:12
+  --> $DIR/gated-bad-feature.rs:8:12
    |
 LL | #![feature(test_removed_feature)]
    |            ^^^^^^^^^^^^^^^^^^^^ feature has been removed
    |
-   = note: removed in 1.0.0 (you are using $RUSTC_VERSION)
+   = note: removed in 1.0.0
 
 error: malformed `feature` attribute input
-  --> $DIR/gated-bad-feature.rs:7:1
+  --> $DIR/gated-bad-feature.rs:6:1
    |
 LL | #![feature]
    | ^^^^^^^^^^^ help: must be of the form: `#![feature(name1, name2, ...)]`
 
 error: malformed `feature` attribute input
-  --> $DIR/gated-bad-feature.rs:8:1
+  --> $DIR/gated-bad-feature.rs:7:1
    |
 LL | #![feature = "foo"]
    | ^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![feature(name1, name2, ...)]`
 
 error[E0635]: unknown feature `foo_bar_baz`
-  --> $DIR/gated-bad-feature.rs:2:12
+  --> $DIR/gated-bad-feature.rs:1:12
    |
 LL | #![feature(foo_bar_baz, foo(bar), foo = "baz", foo)]
    |            ^^^^^^^^^^^
 
 error[E0635]: unknown feature `foo`
-  --> $DIR/gated-bad-feature.rs:2:48
+  --> $DIR/gated-bad-feature.rs:1:48
    |
 LL | #![feature(foo_bar_baz, foo(bar), foo = "baz", foo)]
    |                                                ^^^
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
index 1c6868dc95d..d2b1d71ab87 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
+++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
@@ -379,14 +379,6 @@ warning: `#[proc_macro_derive]` only has an effect on functions
 LL | #![proc_macro_derive()]
    | ^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: attribute should be applied to a function definition
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:62:1
-   |
-LL | #![cold]
-   | ^^^^^^^^ cannot be applied to crates
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-
 warning: attribute should be applied to an `extern` block with non-Rust ABI
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:64:1
    |
@@ -411,6 +403,14 @@ LL | #![link_section = "1800"]
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
+warning: attribute should be applied to a function definition
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:62:1
+   |
+LL | #![cold]
+   | ^^^^^^^^ cannot be applied to crates
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+
 warning: `#[must_use]` has no effect when applied to a module
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:72:1
    |
diff --git a/tests/ui/feature-gates/removed-features-note-version-and-pr-issue-141619.rs b/tests/ui/feature-gates/removed-features-note-version-and-pr-issue-141619.rs
index ec6adb471ba..d8c5f48f9fd 100644
--- a/tests/ui/feature-gates/removed-features-note-version-and-pr-issue-141619.rs
+++ b/tests/ui/feature-gates/removed-features-note-version-and-pr-issue-141619.rs
@@ -1,5 +1,3 @@
-//@ normalize-stderr: "you are using [0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?( \([^)]*\))?" -> "you are using $$RUSTC_VERSION"
-
 #![feature(external_doc)] //~ ERROR feature has been removed
 #![doc(include("README.md"))] //~ ERROR unknown `doc` attribute `include`
 
diff --git a/tests/ui/feature-gates/removed-features-note-version-and-pr-issue-141619.stderr b/tests/ui/feature-gates/removed-features-note-version-and-pr-issue-141619.stderr
index 43205c7360b..bd8c56c61c3 100644
--- a/tests/ui/feature-gates/removed-features-note-version-and-pr-issue-141619.stderr
+++ b/tests/ui/feature-gates/removed-features-note-version-and-pr-issue-141619.stderr
@@ -1,14 +1,14 @@
 error[E0557]: feature has been removed
-  --> $DIR/removed-features-note-version-and-pr-issue-141619.rs:3:12
+  --> $DIR/removed-features-note-version-and-pr-issue-141619.rs:1:12
    |
 LL | #![feature(external_doc)]
    |            ^^^^^^^^^^^^ feature has been removed
    |
-   = note: removed in 1.54.0 (you are using $RUSTC_VERSION); see <https://github.com/rust-lang/rust/pull/85457> for more information
+   = note: removed in 1.54.0; see <https://github.com/rust-lang/rust/pull/85457> for more information
    = note: use #[doc = include_str!("filename")] instead, which handles macro invocations
 
 error: unknown `doc` attribute `include`
-  --> $DIR/removed-features-note-version-and-pr-issue-141619.rs:4:8
+  --> $DIR/removed-features-note-version-and-pr-issue-141619.rs:2:8
    |
 LL | #![doc(include("README.md"))]
    |        ^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/fmt/format-args-argument-span.stderr b/tests/ui/fmt/format-args-argument-span.stderr
index 4e2702383d6..d46cfb438cf 100644
--- a/tests/ui/fmt/format-args-argument-span.stderr
+++ b/tests/ui/fmt/format-args-argument-span.stderr
@@ -12,7 +12,9 @@ error[E0277]: `Option<{integer}>` doesn't implement `std::fmt::Display`
   --> $DIR/format-args-argument-span.rs:15:37
    |
 LL |     println!("{x:?} {x} {x:?}", x = Some(1));
-   |                                     ^^^^^^^ `Option<{integer}>` cannot be formatted with the default formatter
+   |                     ---             ^^^^^^^ `Option<{integer}>` cannot be formatted with the default formatter
+   |                     |
+   |                     required by this formatting parameter
    |
    = help: the trait `std::fmt::Display` is not implemented for `Option<{integer}>`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
@@ -22,7 +24,7 @@ error[E0277]: `DisplayOnly` doesn't implement `Debug`
   --> $DIR/format-args-argument-span.rs:18:19
    |
 LL |     println!("{x} {x:?} {x}");
-   |                   ^^^^^ `DisplayOnly` cannot be formatted using `{:?}`
+   |                   ^^^^^ `DisplayOnly` cannot be formatted using `{:?}` because it doesn't implement `Debug`
    |
    = help: the trait `Debug` is not implemented for `DisplayOnly`
    = note: add `#[derive(Debug)]` to `DisplayOnly` or manually `impl Debug for DisplayOnly`
@@ -37,7 +39,9 @@ error[E0277]: `DisplayOnly` doesn't implement `Debug`
   --> $DIR/format-args-argument-span.rs:20:35
    |
 LL |     println!("{x} {x:?} {x}", x = DisplayOnly);
-   |                                   ^^^^^^^^^^^ `DisplayOnly` cannot be formatted using `{:?}`
+   |                   -----           ^^^^^^^^^^^ `DisplayOnly` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |                   |
+   |                   required by this formatting parameter
    |
    = help: the trait `Debug` is not implemented for `DisplayOnly`
    = note: add `#[derive(Debug)]` to `DisplayOnly` or manually `impl Debug for DisplayOnly`
diff --git a/tests/ui/fmt/ifmt-unimpl.stderr b/tests/ui/fmt/ifmt-unimpl.stderr
index b8d4425a4a7..5e80f892dcb 100644
--- a/tests/ui/fmt/ifmt-unimpl.stderr
+++ b/tests/ui/fmt/ifmt-unimpl.stderr
@@ -4,7 +4,7 @@ error[E0277]: the trait bound `str: UpperHex` is not satisfied
 LL |     format!("{:X}", "3");
    |              ----   ^^^ the trait `UpperHex` is not implemented for `str`
    |              |
-   |              required by a bound introduced by this call
+   |              required by this formatting parameter
    |
    = help: the following other types implement trait `UpperHex`:
              &T
@@ -17,8 +17,6 @@ LL |     format!("{:X}", "3");
              i32
            and 9 others
    = note: required for `&str` to implement `UpperHex`
-note: required by a bound in `core::fmt::rt::Argument::<'_>::new_upper_hex`
-  --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
    = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/fmt/non-source-literals.rs b/tests/ui/fmt/non-source-literals.rs
new file mode 100644
index 00000000000..e3ffdb40a6b
--- /dev/null
+++ b/tests/ui/fmt/non-source-literals.rs
@@ -0,0 +1,13 @@
+/// Do not point at the format string if it wasn't written in the source.
+//@ forbid-output: required by this formatting parameter
+
+#[derive(Debug)]
+pub struct NonDisplay;
+pub struct NonDebug;
+
+fn main() {
+    let _ = format!(concat!("{", "}"), NonDisplay); //~ ERROR
+    let _ = format!(concat!("{", "0", "}"), NonDisplay); //~ ERROR
+    let _ = format!(concat!("{:", "?}"), NonDebug); //~ ERROR
+    let _ = format!(concat!("{", "0", ":?}"), NonDebug); //~ ERROR
+}
diff --git a/tests/ui/fmt/non-source-literals.stderr b/tests/ui/fmt/non-source-literals.stderr
new file mode 100644
index 00000000000..5f8a6200dab
--- /dev/null
+++ b/tests/ui/fmt/non-source-literals.stderr
@@ -0,0 +1,53 @@
+error[E0277]: `NonDisplay` doesn't implement `std::fmt::Display`
+  --> $DIR/non-source-literals.rs:9:40
+   |
+LL |     let _ = format!(concat!("{", "}"), NonDisplay);
+   |                                        ^^^^^^^^^^ `NonDisplay` cannot be formatted with the default formatter
+   |
+   = help: the trait `std::fmt::Display` is not implemented for `NonDisplay`
+   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
+   = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0277]: `NonDisplay` doesn't implement `std::fmt::Display`
+  --> $DIR/non-source-literals.rs:10:45
+   |
+LL |     let _ = format!(concat!("{", "0", "}"), NonDisplay);
+   |                                             ^^^^^^^^^^ `NonDisplay` cannot be formatted with the default formatter
+   |
+   = help: the trait `std::fmt::Display` is not implemented for `NonDisplay`
+   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
+   = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0277]: `NonDebug` doesn't implement `Debug`
+  --> $DIR/non-source-literals.rs:11:42
+   |
+LL |     let _ = format!(concat!("{:", "?}"), NonDebug);
+   |                                          ^^^^^^^^ `NonDebug` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+   = help: the trait `Debug` is not implemented for `NonDebug`
+   = note: add `#[derive(Debug)]` to `NonDebug` or manually `impl Debug for NonDebug`
+   = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider annotating `NonDebug` with `#[derive(Debug)]`
+   |
+LL + #[derive(Debug)]
+LL | pub struct NonDebug;
+   |
+
+error[E0277]: `NonDebug` doesn't implement `Debug`
+  --> $DIR/non-source-literals.rs:12:47
+   |
+LL |     let _ = format!(concat!("{", "0", ":?}"), NonDebug);
+   |                                               ^^^^^^^^ `NonDebug` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+   = help: the trait `Debug` is not implemented for `NonDebug`
+   = note: add `#[derive(Debug)]` to `NonDebug` or manually `impl Debug for NonDebug`
+   = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider annotating `NonDebug` with `#[derive(Debug)]`
+   |
+LL + #[derive(Debug)]
+LL | pub struct NonDebug;
+   |
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/fn/error-recovery-mismatch.stderr b/tests/ui/fn/error-recovery-mismatch.stderr
index f281e77f13b..c046302cb91 100644
--- a/tests/ui/fn/error-recovery-mismatch.stderr
+++ b/tests/ui/fn/error-recovery-mismatch.stderr
@@ -34,12 +34,6 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
    |
 LL |     fn fold<T>(&self, _: T, &self._) {}
    |                                   ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn fold<T>(&self, _: T, &self._) {}
-LL +     fn fold<T, U>(&self, _: T, &self.U) {}
-   |
 
 error: aborting due to 4 previous errors; 1 warning emitted
 
diff --git a/tests/ui/generic-associated-types/generic-associated-types-where.stderr b/tests/ui/generic-associated-types/generic-associated-types-where.stderr
index 7dce34650d7..637f86f7bec 100644
--- a/tests/ui/generic-associated-types/generic-associated-types-where.stderr
+++ b/tests/ui/generic-associated-types/generic-associated-types-where.stderr
@@ -2,9 +2,8 @@ error[E0277]: `T` doesn't implement `std::fmt::Display`
   --> $DIR/generic-associated-types-where.rs:18:22
    |
 LL |     type Assoc2<T> = Vec<T>;
-   |                      ^^^^^^ `T` cannot be formatted with the default formatter
+   |                      ^^^^^^ the trait `std::fmt::Display` is not implemented for `T`
    |
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 help: consider restricting type parameter `T` with trait `Display`
    |
 LL |     type Assoc2<T: std::fmt::Display> = Vec<T>;
diff --git a/tests/ui/generic-const-items/assoc-const-AnonConst-ice-108220.rs b/tests/ui/generic-const-items/assoc-const-AnonConst-ice-108220.rs
deleted file mode 100644
index f5babb67b56..00000000000
--- a/tests/ui/generic-const-items/assoc-const-AnonConst-ice-108220.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// ICE assertion failed: matches!(self.def_kind(ct.def.did), DefKind :: AnonConst)
-// issue: rust-lang/rust#108220
-//@ check-pass
-
-#![feature(associated_const_equality)]
-#![allow(unused)]
-
-use std::marker::PhantomData;
-
-pub struct NoPin;
-
-pub trait SetAlternate<const A: u8> {}
-
-impl SetAlternate<0> for NoPin {}
-
-pub trait PinA<PER> {
-    const A: u8;
-}
-
-impl<PER> PinA<PER> for NoPin {
-    const A: u8 = 0;
-}
-
-pub trait Pins<USART> {}
-
-impl<USART, T, const TA: u8> Pins<USART> for T where
-    T: PinA<USART, A = { TA }> + SetAlternate<TA>
-{
-}
-
-struct Serial<USART>(PhantomData<USART>);
-
-impl<USART> Serial<USART> where NoPin: Pins<USART> {}
-
-fn main() {}
diff --git a/tests/ui/generics/default-type-params-well-formedness.rs b/tests/ui/generics/default-type-params-well-formedness.rs
new file mode 100644
index 00000000000..22b8f5011f7
--- /dev/null
+++ b/tests/ui/generics/default-type-params-well-formedness.rs
@@ -0,0 +1,50 @@
+//! Test for well-formedness checking of default type parameters.
+//!
+//! Regression Test for: https://github.com/rust-lang/rust/issues/49344
+
+//@ run-pass
+
+#![allow(dead_code)]
+
+trait Trait<T> {}
+struct Foo<U, V = i32>(U, V)
+where
+    U: Trait<V>;
+
+trait Marker {}
+struct TwoParams<T, U>(T, U);
+impl Marker for TwoParams<i32, i32> {}
+
+// Clauses with more than 1 param are not checked.
+struct IndividuallyBogus<T = i32, U = i32>(TwoParams<T, U>)
+where
+    TwoParams<T, U>: Marker;
+
+struct BogusTogether<T = u32, U = i32>(T, U)
+where
+    TwoParams<T, U>: Marker;
+
+// Clauses with non-defaulted params are not checked.
+struct NonDefaultedInClause<T, U = i32>(TwoParams<T, U>)
+where
+    TwoParams<T, U>: Marker;
+
+struct DefaultedLhs<U, V = i32>(U, V)
+where
+    V: Trait<U>;
+
+// Dependent defaults are not checked.
+struct Dependent<T, U = T>(T, U)
+where
+    U: Copy;
+
+trait SelfBound<T: Copy = Self> {}
+
+// Not even for well-formedness.
+struct WellFormedProjection<A, T = <A as Iterator>::Item>(A, T);
+
+// Issue #49344, predicates with lifetimes should not be checked.
+trait Scope<'a> {}
+struct Request<'a, S: Scope<'a> = i32>(S, &'a ());
+
+fn main() {}
diff --git a/tests/ui/generics/generic-extern-lifetime.stderr b/tests/ui/generics/generic-extern-lifetime.stderr
index 33332e760f5..6f9b496f1cd 100644
--- a/tests/ui/generics/generic-extern-lifetime.stderr
+++ b/tests/ui/generics/generic-extern-lifetime.stderr
@@ -2,9 +2,12 @@ error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/generic-extern-lifetime.rs:6:26
    |
 LL |     pub fn life2<'b>(x: &'a i32, y: &'b i32);
-   |                  -       ^^ undeclared lifetime
-   |                  |
-   |                  help: consider introducing lifetime `'a` here: `'a,`
+   |                          ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL |     pub fn life2<'a, 'b>(x: &'a i32, y: &'b i32);
+   |                  +++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/generic-extern-lifetime.rs:8:37
diff --git a/tests/ui/generics/impl-block-params-declared-in-wrong-spot-issue-113073.stderr b/tests/ui/generics/impl-block-params-declared-in-wrong-spot-issue-113073.stderr
index c60c4c72a21..33d0c9c9707 100644
--- a/tests/ui/generics/impl-block-params-declared-in-wrong-spot-issue-113073.stderr
+++ b/tests/ui/generics/impl-block-params-declared-in-wrong-spot-issue-113073.stderr
@@ -2,9 +2,12 @@ error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:7:13
    |
 LL | impl Foo<T: 'a + Default> for u8 {}
-   |     -       ^^ undeclared lifetime
-   |     |
-   |     help: consider introducing lifetime `'a` here: `<'a>`
+   |             ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | impl<'a> Foo<T: 'a + Default> for u8 {}
+   |     ++++
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:3:10
diff --git a/tests/ui/generics/overlapping-errors-span-issue-123861.stderr b/tests/ui/generics/overlapping-errors-span-issue-123861.stderr
index 9622dffda9f..7d08d8fed9f 100644
--- a/tests/ui/generics/overlapping-errors-span-issue-123861.stderr
+++ b/tests/ui/generics/overlapping-errors-span-issue-123861.stderr
@@ -30,12 +30,6 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
    |
 LL | fn mainIterator<_ = _> {}
    |                     ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - fn mainIterator<_ = _> {}
-LL + fn mainIterator<T = T> {}
-   |
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/hygiene/no_implicit_prelude.stderr b/tests/ui/hygiene/no_implicit_prelude.stderr
index 5de6e3db327..42049da23eb 100644
--- a/tests/ui/hygiene/no_implicit_prelude.stderr
+++ b/tests/ui/hygiene/no_implicit_prelude.stderr
@@ -23,8 +23,6 @@ LL |         ().clone()
    |            ^^^^^
    |
    = help: items from traits can only be used if the trait is in scope
-help: there is a method `clone_from` with a similar name, but with different arguments
-  --> $SRC_DIR/core/src/clone.rs:LL:COL
    = note: this error originates in the macro `::bar::m` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: trait `Clone` which provides `clone` is implemented but not in scope; perhaps you want to import it
    |
diff --git a/tests/ui/impl-header-lifetime-elision/assoc-type.rs b/tests/ui/impl-header-lifetime-elision/assoc-type.rs
index db3c416540f..14b2ea647f1 100644
--- a/tests/ui/impl-header-lifetime-elision/assoc-type.rs
+++ b/tests/ui/impl-header-lifetime-elision/assoc-type.rs
@@ -9,7 +9,7 @@ trait MyTrait {
 
 impl MyTrait for &i32 {
     type Output = &i32;
-    //~^ ERROR 11:19: 11:20: in the trait associated type is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
+    //~^ ERROR in the trait associated type is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
 }
 
 impl MyTrait for &u32 {
diff --git a/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.stderr b/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.edition2015.stderr
index a2d00edbb6d..68b4e2ed39f 100644
--- a/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.stderr
+++ b/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.edition2015.stderr
@@ -1,5 +1,5 @@
 error[E0700]: hidden type for `impl Sized + 'a` captures lifetime that does not appear in bounds
-  --> $DIR/rpit-hidden-erased-unsoundness.rs:16:5
+  --> $DIR/rpit-hidden-erased-unsoundness.rs:19:5
    |
 LL | fn step2<'a, 'b: 'a>() -> impl Sized + 'a {
    |              --           --------------- opaque type defined here
diff --git a/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.edition2024.stderr b/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.edition2024.stderr
new file mode 100644
index 00000000000..6c0c1789582
--- /dev/null
+++ b/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.edition2024.stderr
@@ -0,0 +1,10 @@
+error: lifetime may not live long enough
+  --> $DIR/rpit-hidden-erased-unsoundness.rs:24:5
+   |
+LL | fn step3<'a, 'b: 'a>() -> impl Send + 'a {
+   |              -- lifetime `'b` defined here
+LL |     step2::<'a, 'b>()
+   |     ^^^^^^^^^^^^^^^^^ returning this value requires that `'b` must outlive `'static`
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.rs b/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.rs
index 6863a3c73ba..3338063d8c6 100644
--- a/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.rs
+++ b/tests/ui/impl-trait/alias-liveness/rpit-hidden-erased-unsoundness.rs
@@ -1,3 +1,6 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
 // This test should never pass!
 
 #![feature(type_alias_impl_trait)]
@@ -14,11 +17,12 @@ fn step1<'a, 'b: 'a>() -> impl Sized + Captures<'b> + 'a {
 
 fn step2<'a, 'b: 'a>() -> impl Sized + 'a {
     step1::<'a, 'b>()
-    //~^ ERROR hidden type for `impl Sized + 'a` captures lifetime that does not appear in bounds
+    //[edition2015]~^ ERROR hidden type for `impl Sized + 'a` captures lifetime that does not appear in bounds
 }
 
 fn step3<'a, 'b: 'a>() -> impl Send + 'a {
     step2::<'a, 'b>()
+    //[edition2024]~^ ERROR lifetime may not live long enough
     // This should not be Send unless `'b: 'static`
 }
 
diff --git a/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.stderr b/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.edition2015.stderr
index a1e92e53384..769a878a45c 100644
--- a/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.stderr
+++ b/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.edition2015.stderr
@@ -1,5 +1,5 @@
 error[E0700]: hidden type for `impl Swap + 'a` captures lifetime that does not appear in bounds
-  --> $DIR/rpit-hide-lifetime-for-swap.rs:17:5
+  --> $DIR/rpit-hide-lifetime-for-swap.rs:20:5
    |
 LL | fn hide<'a, 'b: 'a, T: 'static>(x: Rc<RefCell<&'b T>>) -> impl Swap + 'a {
    |             --                                            -------------- opaque type defined here
diff --git a/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.edition2024.stderr b/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.edition2024.stderr
new file mode 100644
index 00000000000..6109184250b
--- /dev/null
+++ b/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.edition2024.stderr
@@ -0,0 +1,17 @@
+error[E0597]: `x` does not live long enough
+  --> $DIR/rpit-hide-lifetime-for-swap.rs:27:38
+   |
+LL |     let x = [1, 2, 3];
+   |         - binding `x` declared here
+LL |     let short = Rc::new(RefCell::new(&x));
+   |                                      ^^ borrowed value does not live long enough
+...
+LL |     let res: &'static [i32; 3] = *long.borrow();
+   |              ----------------- type annotation requires that `x` is borrowed for `'static`
+LL |     res
+LL | }
+   | - `x` dropped here while still borrowed
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.rs b/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.rs
index 4de2ffbb808..c4eaec478b8 100644
--- a/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.rs
+++ b/tests/ui/impl-trait/alias-liveness/rpit-hide-lifetime-for-swap.rs
@@ -1,3 +1,6 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
 // This test should never pass!
 
 use std::cell::RefCell;
@@ -15,13 +18,14 @@ impl<T> Swap for Rc<RefCell<T>> {
 
 fn hide<'a, 'b: 'a, T: 'static>(x: Rc<RefCell<&'b T>>) -> impl Swap + 'a {
     x
-    //~^ ERROR hidden type for `impl Swap + 'a` captures lifetime that does not appear in bounds
+    //[edition2015]~^ ERROR hidden type for `impl Swap + 'a` captures lifetime that does not appear in bounds
 }
 
 fn dangle() -> &'static [i32; 3] {
     let long = Rc::new(RefCell::new(&[4, 5, 6]));
     let x = [1, 2, 3];
     let short = Rc::new(RefCell::new(&x));
+    //[edition2024]~^ ERROR `x` does not live long enough
     hide(long.clone()).swap(hide(short));
     let res: &'static [i32; 3] = *long.borrow();
     res
diff --git a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.edition2015.stderr
index 304d7d43b78..64f0b201ca2 100644
--- a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr
+++ b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.edition2015.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:7:13
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:10:13
    |
 LL | fn fuz() -> (usize, Trait) { (42, Struct) }
    |             ^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -9,7 +9,7 @@ LL | fn fuz() -> (usize, Trait) { (42, Struct) }
    = note: the return type of a function must have a statically known size
 
 error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:11:13
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:15:13
    |
 LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
    |             ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -19,7 +19,7 @@ LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
    = note: the return type of a function must have a statically known size
 
 error[E0746]: return type cannot be a trait object without pointer indirection
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:15:13
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:19:13
    |
 LL | fn bap() -> Trait { Struct }
    |             ^^^^^ doesn't have a size known at compile-time
@@ -34,7 +34,7 @@ LL | fn bap() -> Box<dyn Trait> { Box::new(Struct) }
    |             +++++++      +   +++++++++      +
 
 error[E0746]: return type cannot be a trait object without pointer indirection
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:17:13
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:22:13
    |
 LL | fn ban() -> dyn Trait { Struct }
    |             ^^^^^^^^^ doesn't have a size known at compile-time
@@ -50,7 +50,7 @@ LL | fn ban() -> Box<dyn Trait> { Box::new(Struct) }
    |             ++++         +   +++++++++      +
 
 error[E0746]: return type cannot be a trait object without pointer indirection
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:19:13
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:24:13
    |
 LL | fn bak() -> dyn Trait { unimplemented!() }
    |             ^^^^^^^^^ doesn't have a size known at compile-time
@@ -66,7 +66,7 @@ LL | fn bak() -> Box<dyn Trait> { Box::new(unimplemented!()) }
    |             ++++         +   +++++++++                +
 
 error[E0746]: return type cannot be a trait object without pointer indirection
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:21:13
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:26:13
    |
 LL | fn bal() -> dyn Trait {
    |             ^^^^^^^^^ doesn't have a size known at compile-time
@@ -86,7 +86,7 @@ LL ~     Box::new(42)
    |
 
 error[E0746]: return type cannot be a trait object without pointer indirection
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:27:13
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:32:13
    |
 LL | fn bax() -> dyn Trait {
    |             ^^^^^^^^^ doesn't have a size known at compile-time
@@ -106,7 +106,7 @@ LL ~         Box::new(42)
    |
 
 error[E0746]: return type cannot be a trait object without pointer indirection
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:62:13
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:67:13
    |
 LL | fn bat() -> dyn Trait {
    |             ^^^^^^^^^ doesn't have a size known at compile-time
@@ -126,7 +126,7 @@ LL ~     Box::new(42)
    |
 
 error[E0746]: return type cannot be a trait object without pointer indirection
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:68:13
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:73:13
    |
 LL | fn bay() -> dyn Trait {
    |             ^^^^^^^^^ doesn't have a size known at compile-time
@@ -146,7 +146,7 @@ LL ~         Box::new(42)
    |
 
 error[E0308]: mismatched types
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:7:35
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:10:35
    |
 LL | fn fuz() -> (usize, Trait) { (42, Struct) }
    |                                   ^^^^^^ expected `dyn Trait`, found `Struct`
@@ -156,7 +156,7 @@ LL | fn fuz() -> (usize, Trait) { (42, Struct) }
    = help: `Struct` implements `Trait` so you could box the found value and coerce it to the trait object `Box<dyn Trait>`, you will have to change the expected type as well
 
 error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:7:30
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:10:30
    |
 LL | fn fuz() -> (usize, Trait) { (42, Struct) }
    |                              ^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -166,7 +166,7 @@ LL | fn fuz() -> (usize, Trait) { (42, Struct) }
    = note: tuples must have a statically known size to be initialized
 
 error[E0308]: mismatched types
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:11:39
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:15:39
    |
 LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
    |                                       ^^^^^^ expected `dyn Trait`, found `Struct`
@@ -176,7 +176,7 @@ LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
    = help: `Struct` implements `Trait` so you could box the found value and coerce it to the trait object `Box<dyn Trait>`, you will have to change the expected type as well
 
 error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:11:34
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:15:34
    |
 LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
    |                                  ^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -186,7 +186,7 @@ LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
    = note: tuples must have a statically known size to be initialized
 
 error[E0308]: mismatched types
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:36:16
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:41:16
    |
 LL | fn bam() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
@@ -203,7 +203,7 @@ LL |         return Box::new(Struct);
    |                +++++++++      +
 
 error[E0308]: mismatched types
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:38:5
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:43:5
    |
 LL | fn bam() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
@@ -220,7 +220,7 @@ LL |     Box::new(42)
    |     +++++++++  +
 
 error[E0308]: mismatched types
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:42:16
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:47:16
    |
 LL | fn baq() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
@@ -237,7 +237,7 @@ LL |         return Box::new(0);
    |                +++++++++ +
 
 error[E0308]: mismatched types
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:44:5
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:49:5
    |
 LL | fn baq() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
@@ -254,7 +254,7 @@ LL |     Box::new(42)
    |     +++++++++  +
 
 error[E0308]: mismatched types
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:48:9
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:53:9
    |
 LL | fn baz() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
@@ -271,7 +271,7 @@ LL |         Box::new(Struct)
    |         +++++++++      +
 
 error[E0308]: mismatched types
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:50:9
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:55:9
    |
 LL | fn baz() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
@@ -288,7 +288,7 @@ LL |         Box::new(42)
    |         +++++++++  +
 
 error[E0308]: mismatched types
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:55:9
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:60:9
    |
 LL | fn baw() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
@@ -305,7 +305,7 @@ LL |         Box::new(0)
    |         +++++++++ +
 
 error[E0308]: mismatched types
-  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:57:9
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:62:9
    |
 LL | fn baw() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
diff --git a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.edition2021.stderr b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.edition2021.stderr
new file mode 100644
index 00000000000..5811431b494
--- /dev/null
+++ b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.edition2021.stderr
@@ -0,0 +1,308 @@
+error[E0782]: expected a type, found a trait
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:10:21
+   |
+LL | fn fuz() -> (usize, Trait) { (42, Struct) }
+   |                     ^^^^^
+   |
+help: you can add the `dyn` keyword if you want a trait object
+   |
+LL | fn fuz() -> (usize, dyn Trait) { (42, Struct) }
+   |                     +++
+
+error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:15:13
+   |
+LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
+   |             ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`
+   = note: required because it appears within the type `(usize, (dyn Trait + 'static))`
+   = note: the return type of a function must have a statically known size
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:19:13
+   |
+LL | fn bap() -> Trait { Struct }
+   |             ^^^^^
+   |
+help: use `impl Trait` to return an opaque type, as long as you return a single underlying type
+   |
+LL | fn bap() -> impl Trait { Struct }
+   |             ++++
+help: alternatively, you can return an owned trait object
+   |
+LL | fn bap() -> Box<dyn Trait> { Struct }
+   |             +++++++      +
+
+error[E0746]: return type cannot be a trait object without pointer indirection
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:22:13
+   |
+LL | fn ban() -> dyn Trait { Struct }
+   |             ^^^^^^^^^ doesn't have a size known at compile-time
+   |
+help: consider returning an `impl Trait` instead of a `dyn Trait`
+   |
+LL - fn ban() -> dyn Trait { Struct }
+LL + fn ban() -> impl Trait { Struct }
+   |
+help: alternatively, box the return type, and wrap all of the returned values in `Box::new`
+   |
+LL | fn ban() -> Box<dyn Trait> { Box::new(Struct) }
+   |             ++++         +   +++++++++      +
+
+error[E0746]: return type cannot be a trait object without pointer indirection
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:24:13
+   |
+LL | fn bak() -> dyn Trait { unimplemented!() }
+   |             ^^^^^^^^^ doesn't have a size known at compile-time
+   |
+help: consider returning an `impl Trait` instead of a `dyn Trait`
+   |
+LL - fn bak() -> dyn Trait { unimplemented!() }
+LL + fn bak() -> impl Trait { unimplemented!() }
+   |
+help: alternatively, box the return type, and wrap all of the returned values in `Box::new`
+   |
+LL | fn bak() -> Box<dyn Trait> { Box::new(unimplemented!()) }
+   |             ++++         +   +++++++++                +
+
+error[E0746]: return type cannot be a trait object without pointer indirection
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:26:13
+   |
+LL | fn bal() -> dyn Trait {
+   |             ^^^^^^^^^ doesn't have a size known at compile-time
+   |
+help: consider returning an `impl Trait` instead of a `dyn Trait`
+   |
+LL - fn bal() -> dyn Trait {
+LL + fn bal() -> impl Trait {
+   |
+help: alternatively, box the return type, and wrap all of the returned values in `Box::new`
+   |
+LL ~ fn bal() -> Box<dyn Trait> {
+LL |     if true {
+LL ~         return Box::new(Struct);
+LL |     }
+LL ~     Box::new(42)
+   |
+
+error[E0746]: return type cannot be a trait object without pointer indirection
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:32:13
+   |
+LL | fn bax() -> dyn Trait {
+   |             ^^^^^^^^^ doesn't have a size known at compile-time
+   |
+help: consider returning an `impl Trait` instead of a `dyn Trait`
+   |
+LL - fn bax() -> dyn Trait {
+LL + fn bax() -> impl Trait {
+   |
+help: alternatively, box the return type, and wrap all of the returned values in `Box::new`
+   |
+LL ~ fn bax() -> Box<dyn Trait> {
+LL |     if true {
+LL ~         Box::new(Struct)
+LL |     } else {
+LL ~         Box::new(42)
+   |
+
+error[E0746]: return type cannot be a trait object without pointer indirection
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:67:13
+   |
+LL | fn bat() -> dyn Trait {
+   |             ^^^^^^^^^ doesn't have a size known at compile-time
+   |
+help: consider returning an `impl Trait` instead of a `dyn Trait`
+   |
+LL - fn bat() -> dyn Trait {
+LL + fn bat() -> impl Trait {
+   |
+help: alternatively, box the return type, and wrap all of the returned values in `Box::new`
+   |
+LL ~ fn bat() -> Box<dyn Trait> {
+LL |     if true {
+LL ~         return Box::new(0);
+LL |     }
+LL ~     Box::new(42)
+   |
+
+error[E0746]: return type cannot be a trait object without pointer indirection
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:73:13
+   |
+LL | fn bay() -> dyn Trait {
+   |             ^^^^^^^^^ doesn't have a size known at compile-time
+   |
+help: consider returning an `impl Trait` instead of a `dyn Trait`
+   |
+LL - fn bay() -> dyn Trait {
+LL + fn bay() -> impl Trait {
+   |
+help: alternatively, box the return type, and wrap all of the returned values in `Box::new`
+   |
+LL ~ fn bay() -> Box<dyn Trait> {
+LL |     if true {
+LL ~         Box::new(0)
+LL |     } else {
+LL ~         Box::new(42)
+   |
+
+error[E0308]: mismatched types
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:15:39
+   |
+LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
+   |                                       ^^^^^^ expected `dyn Trait`, found `Struct`
+   |
+   = note: expected trait object `(dyn Trait + 'static)`
+                    found struct `Struct`
+   = help: `Struct` implements `Trait` so you could box the found value and coerce it to the trait object `Box<dyn Trait>`, you will have to change the expected type as well
+
+error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:15:34
+   |
+LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
+   |                                  ^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`
+   = note: required because it appears within the type `(usize, (dyn Trait + 'static))`
+   = note: tuples must have a statically known size to be initialized
+
+error[E0308]: mismatched types
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:41:16
+   |
+LL | fn bam() -> Box<dyn Trait> {
+   |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
+LL |     if true {
+LL |         return Struct;
+   |                ^^^^^^ expected `Box<dyn Trait>`, found `Struct`
+   |
+   = note: expected struct `Box<(dyn Trait + 'static)>`
+              found struct `Struct`
+   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
+help: store this in the heap by calling `Box::new`
+   |
+LL |         return Box::new(Struct);
+   |                +++++++++      +
+
+error[E0308]: mismatched types
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:43:5
+   |
+LL | fn bam() -> Box<dyn Trait> {
+   |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
+...
+LL |     42
+   |     ^^ expected `Box<dyn Trait>`, found integer
+   |
+   = note: expected struct `Box<(dyn Trait + 'static)>`
+                found type `{integer}`
+   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
+help: store this in the heap by calling `Box::new`
+   |
+LL |     Box::new(42)
+   |     +++++++++  +
+
+error[E0308]: mismatched types
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:47:16
+   |
+LL | fn baq() -> Box<dyn Trait> {
+   |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
+LL |     if true {
+LL |         return 0;
+   |                ^ expected `Box<dyn Trait>`, found integer
+   |
+   = note: expected struct `Box<(dyn Trait + 'static)>`
+                found type `{integer}`
+   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
+help: store this in the heap by calling `Box::new`
+   |
+LL |         return Box::new(0);
+   |                +++++++++ +
+
+error[E0308]: mismatched types
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:49:5
+   |
+LL | fn baq() -> Box<dyn Trait> {
+   |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
+...
+LL |     42
+   |     ^^ expected `Box<dyn Trait>`, found integer
+   |
+   = note: expected struct `Box<(dyn Trait + 'static)>`
+                found type `{integer}`
+   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
+help: store this in the heap by calling `Box::new`
+   |
+LL |     Box::new(42)
+   |     +++++++++  +
+
+error[E0308]: mismatched types
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:53:9
+   |
+LL | fn baz() -> Box<dyn Trait> {
+   |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
+LL |     if true {
+LL |         Struct
+   |         ^^^^^^ expected `Box<dyn Trait>`, found `Struct`
+   |
+   = note: expected struct `Box<(dyn Trait + 'static)>`
+              found struct `Struct`
+   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
+help: store this in the heap by calling `Box::new`
+   |
+LL |         Box::new(Struct)
+   |         +++++++++      +
+
+error[E0308]: mismatched types
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:55:9
+   |
+LL | fn baz() -> Box<dyn Trait> {
+   |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
+...
+LL |         42
+   |         ^^ expected `Box<dyn Trait>`, found integer
+   |
+   = note: expected struct `Box<(dyn Trait + 'static)>`
+                found type `{integer}`
+   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
+help: store this in the heap by calling `Box::new`
+   |
+LL |         Box::new(42)
+   |         +++++++++  +
+
+error[E0308]: mismatched types
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:60:9
+   |
+LL | fn baw() -> Box<dyn Trait> {
+   |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
+LL |     if true {
+LL |         0
+   |         ^ expected `Box<dyn Trait>`, found integer
+   |
+   = note: expected struct `Box<(dyn Trait + 'static)>`
+                found type `{integer}`
+   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
+help: store this in the heap by calling `Box::new`
+   |
+LL |         Box::new(0)
+   |         +++++++++ +
+
+error[E0308]: mismatched types
+  --> $DIR/dyn-trait-return-should-be-impl-trait.rs:62:9
+   |
+LL | fn baw() -> Box<dyn Trait> {
+   |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
+...
+LL |         42
+   |         ^^ expected `Box<dyn Trait>`, found integer
+   |
+   = note: expected struct `Box<(dyn Trait + 'static)>`
+                found type `{integer}`
+   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
+help: store this in the heap by calling `Box::new`
+   |
+LL |         Box::new(42)
+   |         +++++++++  +
+
+error: aborting due to 19 previous errors
+
+Some errors have detailed explanations: E0277, E0308, E0746, E0782.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.rs b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.rs
index ccf0a1ad3d4..aa1f871d8ea 100644
--- a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.rs
+++ b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.rs
@@ -1,3 +1,6 @@
+//@revisions: edition2015 edition2021
+//@[edition2015] edition:2015
+//@[edition2021] edition:2021
 #![allow(bare_trait_objects)]
 struct Struct;
 trait Trait {}
@@ -5,15 +8,17 @@ impl Trait for Struct {}
 impl Trait for u32 {}
 
 fn fuz() -> (usize, Trait) { (42, Struct) }
-//~^ ERROR E0277
-//~| ERROR E0277
-//~| ERROR E0308
+//[edition2015]~^ ERROR E0277
+//[edition2015]~| ERROR E0277
+//[edition2015]~| ERROR E0308
+//[edition2021]~^^^^ ERROR expected a type, found a trait
 fn bar() -> (usize, dyn Trait) { (42, Struct) }
 //~^ ERROR E0277
 //~| ERROR E0277
 //~| ERROR E0308
 fn bap() -> Trait { Struct }
-//~^ ERROR E0746
+//[edition2015]~^ ERROR E0746
+//[edition2021]~^^ ERROR expected a type, found a trait
 fn ban() -> dyn Trait { Struct }
 //~^ ERROR E0746
 fn bak() -> dyn Trait { unimplemented!() } //~ ERROR E0746
diff --git a/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed b/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed
index 886fc1d0058..d8eceeff678 100644
--- a/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed
+++ b/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed
@@ -1,5 +1,6 @@
 //@ run-rustfix
 
+#![allow(dead_code)]
 struct S<T>(T);
 struct S2;
 
diff --git a/tests/ui/impl-trait/extra-impl-in-trait-impl.rs b/tests/ui/impl-trait/extra-impl-in-trait-impl.rs
index f3271993867..c2e511c0d05 100644
--- a/tests/ui/impl-trait/extra-impl-in-trait-impl.rs
+++ b/tests/ui/impl-trait/extra-impl-in-trait-impl.rs
@@ -1,5 +1,6 @@
 //@ run-rustfix
 
+#![allow(dead_code)]
 struct S<T>(T);
 struct S2;
 
diff --git a/tests/ui/impl-trait/extra-impl-in-trait-impl.stderr b/tests/ui/impl-trait/extra-impl-in-trait-impl.stderr
index 5aafc8b64d4..22e68463a8c 100644
--- a/tests/ui/impl-trait/extra-impl-in-trait-impl.stderr
+++ b/tests/ui/impl-trait/extra-impl-in-trait-impl.stderr
@@ -1,23 +1,23 @@
 error: unexpected `impl` keyword
-  --> $DIR/extra-impl-in-trait-impl.rs:6:18
+  --> $DIR/extra-impl-in-trait-impl.rs:7:18
    |
 LL | impl<T: Default> impl Default for S<T> {
    |                  ^^^^^ help: remove the extra `impl`
    |
 note: this is parsed as an `impl Trait` type, but a trait is expected at this position
-  --> $DIR/extra-impl-in-trait-impl.rs:6:18
+  --> $DIR/extra-impl-in-trait-impl.rs:7:18
    |
 LL | impl<T: Default> impl Default for S<T> {
    |                  ^^^^^^^^^^^^
 
 error: unexpected `impl` keyword
-  --> $DIR/extra-impl-in-trait-impl.rs:12:6
+  --> $DIR/extra-impl-in-trait-impl.rs:13:6
    |
 LL | impl impl Default for S2 {
    |      ^^^^^ help: remove the extra `impl`
    |
 note: this is parsed as an `impl Trait` type, but a trait is expected at this position
-  --> $DIR/extra-impl-in-trait-impl.rs:12:6
+  --> $DIR/extra-impl-in-trait-impl.rs:13:6
    |
 LL | impl impl Default for S2 {
    |      ^^^^^^^^^^^^
diff --git a/tests/ui/impl-trait/hidden-lifetimes.stderr b/tests/ui/impl-trait/hidden-lifetimes.edition2015.stderr
index 70d8c816ecb..b63115f7658 100644
--- a/tests/ui/impl-trait/hidden-lifetimes.stderr
+++ b/tests/ui/impl-trait/hidden-lifetimes.edition2015.stderr
@@ -1,5 +1,5 @@
 error[E0700]: hidden type for `impl Swap + 'a` captures lifetime that does not appear in bounds
-  --> $DIR/hidden-lifetimes.rs:29:5
+  --> $DIR/hidden-lifetimes.rs:33:5
    |
 LL | fn hide_ref<'a, 'b, T: 'static>(x: &'a mut &'b T) -> impl Swap + 'a {
    |                 --                                   -------------- opaque type defined here
@@ -14,7 +14,7 @@ LL | fn hide_ref<'a, 'b, T: 'static>(x: &'a mut &'b T) -> impl Swap + 'a + use<'
    |                                                                     ++++++++++++++++
 
 error[E0700]: hidden type for `impl Swap + 'a` captures lifetime that does not appear in bounds
-  --> $DIR/hidden-lifetimes.rs:46:5
+  --> $DIR/hidden-lifetimes.rs:50:5
    |
 LL | fn hide_rc_refcell<'a, 'b: 'a, T: 'static>(x: Rc<RefCell<&'b T>>) -> impl Swap + 'a {
    |                        --                                            -------------- opaque type defined here
diff --git a/tests/ui/impl-trait/hidden-lifetimes.edition2024.stderr b/tests/ui/impl-trait/hidden-lifetimes.edition2024.stderr
new file mode 100644
index 00000000000..d585bb50b13
--- /dev/null
+++ b/tests/ui/impl-trait/hidden-lifetimes.edition2024.stderr
@@ -0,0 +1,26 @@
+error[E0515]: cannot return value referencing local variable `x`
+  --> $DIR/hidden-lifetimes.rs:41:5
+   |
+LL |     hide_ref(&mut res).swap(hide_ref(&mut &x));
+   |                                           -- `x` is borrowed here
+LL |     res
+   |     ^^^ returns a value referencing data owned by the current function
+
+error[E0597]: `x` does not live long enough
+  --> $DIR/hidden-lifetimes.rs:57:38
+   |
+LL |     let x = [1, 2, 3];
+   |         - binding `x` declared here
+LL |     let short = Rc::new(RefCell::new(&x));
+   |                                      ^^ borrowed value does not live long enough
+LL |     hide_rc_refcell(long.clone()).swap(hide_rc_refcell(short));
+LL |     let res: &'static [i32; 3] = *long.borrow();
+   |              ----------------- type annotation requires that `x` is borrowed for `'static`
+LL |     res
+LL | }
+   | - `x` dropped here while still borrowed
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0515, E0597.
+For more information about an error, try `rustc --explain E0515`.
diff --git a/tests/ui/impl-trait/hidden-lifetimes.rs b/tests/ui/impl-trait/hidden-lifetimes.rs
index ae07c892768..b50c43bd3fa 100644
--- a/tests/ui/impl-trait/hidden-lifetimes.rs
+++ b/tests/ui/impl-trait/hidden-lifetimes.rs
@@ -1,3 +1,7 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
+
 // Test to show what happens if we were not careful and allowed invariant
 // lifetimes to escape though an impl trait.
 //
@@ -27,14 +31,14 @@ impl<T> Swap for Rc<RefCell<T>> {
 // `&'a mut &'l T` are the same type.
 fn hide_ref<'a, 'b, T: 'static>(x: &'a mut &'b T) -> impl Swap + 'a {
     x
-    //~^ ERROR hidden type
+    //[edition2015]~^ ERROR hidden type
 }
 
 fn dangle_ref() -> &'static [i32; 3] {
     let mut res = &[4, 5, 6];
     let x = [1, 2, 3];
     hide_ref(&mut res).swap(hide_ref(&mut &x));
-    res
+    res //[edition2024]~ ERROR cannot return value referencing local variable `x`
 }
 
 // Here we are hiding `'b` making the caller believe that `Rc<RefCell<&'s T>>`
@@ -44,13 +48,13 @@ fn dangle_ref() -> &'static [i32; 3] {
 // only has a single lifetime.
 fn hide_rc_refcell<'a, 'b: 'a, T: 'static>(x: Rc<RefCell<&'b T>>) -> impl Swap + 'a {
     x
-    //~^ ERROR hidden type
+    //[edition2015]~^ ERROR hidden type
 }
 
 fn dangle_rc_refcell() -> &'static [i32; 3] {
     let long = Rc::new(RefCell::new(&[4, 5, 6]));
     let x = [1, 2, 3];
-    let short = Rc::new(RefCell::new(&x));
+    let short = Rc::new(RefCell::new(&x)); //[edition2024]~ ERROR `x` does not live long enough
     hide_rc_refcell(long.clone()).swap(hide_rc_refcell(short));
     let res: &'static [i32; 3] = *long.borrow();
     res
diff --git a/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr b/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.edition2015.stderr
index 4e453c108d4..4ba59826231 100644
--- a/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr
+++ b/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.edition2015.stderr
@@ -1,5 +1,5 @@
 error[E0700]: hidden type for `impl Debug` captures lifetime that does not appear in bounds
-  --> $DIR/impl-fn-hrtb-bounds-2.rs:5:9
+  --> $DIR/impl-fn-hrtb-bounds-2.rs:8:9
    |
 LL | fn a() -> impl Fn(&u8) -> impl Debug {
    |                           ---------- opaque type defined here
diff --git a/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.edition2024.stderr b/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.edition2024.stderr
new file mode 100644
index 00000000000..c7aedfe96bb
--- /dev/null
+++ b/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.edition2024.stderr
@@ -0,0 +1,15 @@
+error[E0657]: `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
+  --> $DIR/impl-fn-hrtb-bounds-2.rs:7:27
+   |
+LL | fn a() -> impl Fn(&u8) -> impl Debug {
+   |                           ^^^^^^^^^^ `impl Trait` implicitly captures all lifetimes in scope
+   |
+note: lifetime declared here
+  --> $DIR/impl-fn-hrtb-bounds-2.rs:7:19
+   |
+LL | fn a() -> impl Fn(&u8) -> impl Debug {
+   |                   ^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0657`.
diff --git a/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.rs b/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.rs
index b0aeded0ef7..f4bfbdeb9f3 100644
--- a/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.rs
+++ b/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.rs
@@ -1,8 +1,11 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
 #![feature(impl_trait_in_fn_trait_return)]
 use std::fmt::Debug;
 
-fn a() -> impl Fn(&u8) -> impl Debug {
-    |x| x //~ ERROR hidden type for `impl Debug` captures lifetime that does not appear in bounds
+fn a() -> impl Fn(&u8) -> impl Debug { //[edition2024]~ ERROR `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
+    |x| x //[edition2015]~ ERROR hidden type for `impl Debug` captures lifetime that does not appear in bounds
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/impl-fn-predefined-lifetimes.stderr b/tests/ui/impl-trait/impl-fn-predefined-lifetimes.edition2015.stderr
index 6064b09ef09..94476bcfbe8 100644
--- a/tests/ui/impl-trait/impl-fn-predefined-lifetimes.stderr
+++ b/tests/ui/impl-trait/impl-fn-predefined-lifetimes.edition2015.stderr
@@ -1,5 +1,5 @@
 error[E0792]: expected generic lifetime parameter, found `'_`
-  --> $DIR/impl-fn-predefined-lifetimes.rs:5:9
+  --> $DIR/impl-fn-predefined-lifetimes.rs:8:9
    |
 LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
    |                                                -- this generic parameter must be used with a generic lifetime parameter
diff --git a/tests/ui/impl-trait/impl-fn-predefined-lifetimes.edition2024.stderr b/tests/ui/impl-trait/impl-fn-predefined-lifetimes.edition2024.stderr
new file mode 100644
index 00000000000..2f1eacb0c34
--- /dev/null
+++ b/tests/ui/impl-trait/impl-fn-predefined-lifetimes.edition2024.stderr
@@ -0,0 +1,11 @@
+error[E0792]: expected generic lifetime parameter, found `'_`
+  --> $DIR/impl-fn-predefined-lifetimes.rs:8:9
+   |
+LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
+   |      -- this generic parameter must be used with a generic lifetime parameter
+LL |     |x| x
+   |         ^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/impl-trait/impl-fn-predefined-lifetimes.rs b/tests/ui/impl-trait/impl-fn-predefined-lifetimes.rs
index 199cbbf4fcc..b2963cc10fa 100644
--- a/tests/ui/impl-trait/impl-fn-predefined-lifetimes.rs
+++ b/tests/ui/impl-trait/impl-fn-predefined-lifetimes.rs
@@ -1,3 +1,6 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
 #![feature(impl_trait_in_fn_trait_return)]
 use std::fmt::Debug;
 
diff --git a/tests/ui/impl-trait/in-bindings/lifetime-equality.rs b/tests/ui/impl-trait/in-bindings/lifetime-equality.rs
new file mode 100644
index 00000000000..6cf48dccc7d
--- /dev/null
+++ b/tests/ui/impl-trait/in-bindings/lifetime-equality.rs
@@ -0,0 +1,19 @@
+//@ check-pass
+
+#![feature(impl_trait_in_bindings)]
+
+// A test for #61773 which would have been difficult to support if we
+// were to represent `impl_trait_in_bindings` using opaque types.
+
+trait Trait<'a, 'b> { }
+impl<T> Trait<'_, '_> for T { }
+
+
+fn bar<'a, 'b>(data0: &'a u32, data1: &'b u32) {
+  let x: impl Trait<'_, '_> = (data0, data1);
+  force_equal(x);
+}
+
+fn force_equal<'a>(t: impl Trait<'a, 'a>) { }
+
+fn main() { }
diff --git a/tests/ui/impl-trait/in-bindings/region-lifetimes.rs b/tests/ui/impl-trait/in-bindings/region-lifetimes.rs
new file mode 100644
index 00000000000..189ab85a276
--- /dev/null
+++ b/tests/ui/impl-trait/in-bindings/region-lifetimes.rs
@@ -0,0 +1,17 @@
+//@ check-pass
+
+#![feature(impl_trait_in_bindings)]
+
+// A test for #61773 which would have been difficult to support if we
+// were to represent `impl_trait_in_bindings` using opaque types.
+
+trait Foo<'a> { }
+impl Foo<'_> for &u32 { }
+
+fn bar<'a>(data: &'a u32) {
+  let x: impl Foo<'_> = data;
+}
+
+fn main() {
+  let _: impl Foo<'_> = &44;
+}
diff --git a/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr b/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr
index 119195f17ff..df89ed9f3b5 100644
--- a/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr
+++ b/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr
@@ -2,10 +2,8 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
   --> $DIR/doesnt-satisfy.rs:6:17
    |
 LL |     fn bar() -> () {}
-   |                 ^^ `()` cannot be formatted with the default formatter
+   |                 ^^ the trait `std::fmt::Display` is not implemented for `()`
    |
-   = help: the trait `std::fmt::Display` is not implemented for `()`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `Foo::bar::{anon_assoc#0}`
   --> $DIR/doesnt-satisfy.rs:2:22
    |
diff --git a/tests/ui/impl-trait/in-trait/not-inferred-generic.stderr b/tests/ui/impl-trait/in-trait/not-inferred-generic.stderr
index 07f029d3bb7..c08fc511500 100644
--- a/tests/ui/impl-trait/in-trait/not-inferred-generic.stderr
+++ b/tests/ui/impl-trait/in-trait/not-inferred-generic.stderr
@@ -5,7 +5,7 @@ LL |     ().publish_typed();
    |        ^^^^^^^^^^^^^ cannot infer type of the type parameter `F` declared on the method `publish_typed`
    |
    = note: cannot satisfy `_: Clone`
-   = note: associated types cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
+   = note: opaque types cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
 note: required by a bound in `TypedClient::publish_typed::{anon_assoc#0}`
   --> $DIR/not-inferred-generic.rs:4:12
    |
diff --git a/tests/ui/impl-trait/in-trait/wf-bounds.stderr b/tests/ui/impl-trait/in-trait/wf-bounds.stderr
index 634557094ce..40a029cdc92 100644
--- a/tests/ui/impl-trait/in-trait/wf-bounds.stderr
+++ b/tests/ui/impl-trait/in-trait/wf-bounds.stderr
@@ -39,9 +39,8 @@ error[E0277]: `T` doesn't implement `std::fmt::Display`
   --> $DIR/wf-bounds.rs:21:26
    |
 LL |     fn nya4<T>() -> impl Wf<NeedsDisplay<T>>;
-   |                          ^^^^^^^^^^^^^^^^^^^ `T` cannot be formatted with the default formatter
+   |                          ^^^^^^^^^^^^^^^^^^^ the trait `std::fmt::Display` is not implemented for `T`
    |
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `NeedsDisplay`
   --> $DIR/wf-bounds.rs:9:24
    |
diff --git a/tests/ui/impl-trait/issues/issue-54895.stderr b/tests/ui/impl-trait/issues/issue-54895.edition2015.stderr
index 64b425328e3..27a3c6c8b7c 100644
--- a/tests/ui/impl-trait/issues/issue-54895.stderr
+++ b/tests/ui/impl-trait/issues/issue-54895.edition2015.stderr
@@ -1,11 +1,11 @@
 error[E0657]: `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
-  --> $DIR/issue-54895.rs:15:53
+  --> $DIR/issue-54895.rs:18:53
    |
 LL | fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> {
    |                                                     ^^
    |
 note: lifetime declared here
-  --> $DIR/issue-54895.rs:15:20
+  --> $DIR/issue-54895.rs:18:20
    |
 LL | fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> {
    |                    ^^
diff --git a/tests/ui/impl-trait/issues/issue-54895.edition2024.stderr b/tests/ui/impl-trait/issues/issue-54895.edition2024.stderr
new file mode 100644
index 00000000000..54aa29e62d8
--- /dev/null
+++ b/tests/ui/impl-trait/issues/issue-54895.edition2024.stderr
@@ -0,0 +1,27 @@
+error[E0657]: `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
+  --> $DIR/issue-54895.rs:18:40
+   |
+LL | fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> {
+   |                                        ^^^^^^^^^^^^^^^ `impl Trait` implicitly captures all lifetimes in scope
+   |
+note: lifetime declared here
+  --> $DIR/issue-54895.rs:18:20
+   |
+LL | fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> {
+   |                    ^^
+
+error[E0657]: `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
+  --> $DIR/issue-54895.rs:18:53
+   |
+LL | fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> {
+   |                                                     ^^
+   |
+note: lifetime declared here
+  --> $DIR/issue-54895.rs:18:20
+   |
+LL | fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> {
+   |                    ^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0657`.
diff --git a/tests/ui/impl-trait/issues/issue-54895.rs b/tests/ui/impl-trait/issues/issue-54895.rs
index 13c0038ce43..bc1841209e1 100644
--- a/tests/ui/impl-trait/issues/issue-54895.rs
+++ b/tests/ui/impl-trait/issues/issue-54895.rs
@@ -1,3 +1,6 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
 trait Trait<'a> {
     type Out;
     fn call(&'a self) -> Self::Out;
@@ -14,6 +17,7 @@ impl<'a> Trait<'a> for X {
 
 fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> {
     //~^ ERROR `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
+    //[edition2024]~^^ ERROR `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
     X(())
 }
 
diff --git a/tests/ui/impl-trait/issues/issue-79099.stderr b/tests/ui/impl-trait/issues/issue-79099.edition2015.stderr
index d7c0c494454..ee1a479310d 100644
--- a/tests/ui/impl-trait/issues/issue-79099.stderr
+++ b/tests/ui/impl-trait/issues/issue-79099.edition2015.stderr
@@ -1,5 +1,5 @@
 error: expected identifier, found `1`
-  --> $DIR/issue-79099.rs:3:65
+  --> $DIR/issue-79099.rs:6:65
    |
 LL |         let f: impl core::future::Future<Output = u8> = async { 1 };
    |                                                         -----   ^ expected identifier
@@ -10,7 +10,7 @@ LL |         let f: impl core::future::Future<Output = u8> = async { 1 };
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
 error[E0562]: `impl Trait` is not allowed in the type of variable bindings
-  --> $DIR/issue-79099.rs:3:16
+  --> $DIR/issue-79099.rs:6:16
    |
 LL |         let f: impl core::future::Future<Output = u8> = async { 1 };
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/impl-trait/issues/issue-79099.edition2024.stderr b/tests/ui/impl-trait/issues/issue-79099.edition2024.stderr
new file mode 100644
index 00000000000..3e422e25136
--- /dev/null
+++ b/tests/ui/impl-trait/issues/issue-79099.edition2024.stderr
@@ -0,0 +1,14 @@
+error[E0562]: `impl Trait` is not allowed in the type of variable bindings
+  --> $DIR/issue-79099.rs:6:16
+   |
+LL |         let f: impl core::future::Future<Output = u8> = async { 1 };
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
+   = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
+   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0562`.
diff --git a/tests/ui/impl-trait/issues/issue-79099.rs b/tests/ui/impl-trait/issues/issue-79099.rs
index c2bad59045b..8426298620f 100644
--- a/tests/ui/impl-trait/issues/issue-79099.rs
+++ b/tests/ui/impl-trait/issues/issue-79099.rs
@@ -1,8 +1,11 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
 struct Bug {
     V1: [(); {
         let f: impl core::future::Future<Output = u8> = async { 1 };
         //~^ ERROR `impl Trait` is not allowed in the type of variable bindings
-        //~| ERROR expected identifier
+        //[edition2015]~| ERROR expected identifier
         1
     }],
 }
diff --git a/tests/ui/impl-trait/name-mentioning-macro.rs b/tests/ui/impl-trait/name-mentioning-macro.rs
new file mode 100644
index 00000000000..8a81911c0bb
--- /dev/null
+++ b/tests/ui/impl-trait/name-mentioning-macro.rs
@@ -0,0 +1,12 @@
+trait Foo<T> {}
+
+macro_rules! bar {
+    () => { () }
+}
+
+fn foo(x: impl Foo<bar!()>) {
+    let () = x;
+    //~^ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/name-mentioning-macro.stderr b/tests/ui/impl-trait/name-mentioning-macro.stderr
new file mode 100644
index 00000000000..adb4c64f812
--- /dev/null
+++ b/tests/ui/impl-trait/name-mentioning-macro.stderr
@@ -0,0 +1,16 @@
+error[E0308]: mismatched types
+  --> $DIR/name-mentioning-macro.rs:8:9
+   |
+LL | fn foo(x: impl Foo<bar!()>) {
+   |           ---------------- expected this type parameter
+LL |     let () = x;
+   |         ^^   - this expression has type `impl Foo<bar!()>`
+   |         |
+   |         expected type parameter `impl Foo<bar!()>`, found `()`
+   |
+   = note: expected type parameter `impl Foo<bar!()>`
+                   found unit type `()`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/impl-trait/normalize-tait-in-const.rs b/tests/ui/impl-trait/normalize-tait-in-const.rs
index a735ef76673..0c7969c0e9e 100644
--- a/tests/ui/impl-trait/normalize-tait-in-const.rs
+++ b/tests/ui/impl-trait/normalize-tait-in-const.rs
@@ -24,7 +24,7 @@ mod foo {
 }
 use foo::*;
 
-const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
+const fn with_positive<F: for<'a> [const] Fn(&'a Alias<'a>) + [const] Destruct>(fun: F) {
     fun(filter_positive());
 }
 
diff --git a/tests/ui/impl-trait/normalize-tait-in-const.stderr b/tests/ui/impl-trait/normalize-tait-in-const.stderr
index 2b6825b1ac6..01427c78dd9 100644
--- a/tests/ui/impl-trait/normalize-tait-in-const.stderr
+++ b/tests/ui/impl-trait/normalize-tait-in-const.stderr
@@ -1,19 +1,19 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/normalize-tait-in-const.rs:27:35
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/normalize-tait-in-const.rs:27:33
    |
-LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
-   |                                   ^^^^^^ can't be applied to `Fn`
+LL | const fn with_positive<F: for<'a> [const] Fn(&'a Alias<'a>) + [const] Destruct>(fun: F) {
+   |                                 ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/normalize-tait-in-const.rs:27:35
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/normalize-tait-in-const.rs:27:33
    |
-LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
-   |                                   ^^^^^^ can't be applied to `Fn`
+LL | const fn with_positive<F: for<'a> [const] Fn(&'a Alias<'a>) + [const] Destruct>(fun: F) {
+   |                                 ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
diff --git a/tests/ui/impl-trait/precise-capturing/bad-lifetimes.stderr b/tests/ui/impl-trait/precise-capturing/bad-lifetimes.stderr
index 98f629f52cf..ddb09690faf 100644
--- a/tests/ui/impl-trait/precise-capturing/bad-lifetimes.stderr
+++ b/tests/ui/impl-trait/precise-capturing/bad-lifetimes.stderr
@@ -15,9 +15,12 @@ error[E0261]: use of undeclared lifetime name `'missing`
   --> $DIR/bad-lifetimes.rs:7:37
    |
 LL | fn missing_lt() -> impl Sized + use<'missing> {}
-   |              -                      ^^^^^^^^ undeclared lifetime
-   |              |
-   |              help: consider introducing lifetime `'missing` here: `<'missing>`
+   |                                     ^^^^^^^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'missing` here
+   |
+LL | fn missing_lt<'missing>() -> impl Sized + use<'missing> {}
+   |              ++++++++++
 
 error: expected lifetime parameter in `use<...>` precise captures list, found `'static`
   --> $DIR/bad-lifetimes.rs:4:36
diff --git a/tests/ui/impl-trait/precise-capturing/dyn-use.stderr b/tests/ui/impl-trait/precise-capturing/dyn-use.edition2015.stderr
index d8903fc4129..9951e9e0965 100644
--- a/tests/ui/impl-trait/precise-capturing/dyn-use.stderr
+++ b/tests/ui/impl-trait/precise-capturing/dyn-use.edition2015.stderr
@@ -1,5 +1,5 @@
 error: expected one of `!`, `(`, `::`, `<`, `where`, or `{`, found keyword `use`
-  --> $DIR/dyn-use.rs:1:26
+  --> $DIR/dyn-use.rs:4:26
    |
 LL | fn dyn() -> &'static dyn use<> { &() }
    |                          ^^^ expected one of `!`, `(`, `::`, `<`, `where`, or `{`
diff --git a/tests/ui/impl-trait/precise-capturing/dyn-use.edition2024.stderr b/tests/ui/impl-trait/precise-capturing/dyn-use.edition2024.stderr
new file mode 100644
index 00000000000..cb3fe4cb583
--- /dev/null
+++ b/tests/ui/impl-trait/precise-capturing/dyn-use.edition2024.stderr
@@ -0,0 +1,26 @@
+error: expected identifier, found keyword `dyn`
+  --> $DIR/dyn-use.rs:4:4
+   |
+LL | fn dyn() -> &'static dyn use<> { &() }
+   |    ^^^ expected identifier, found keyword
+   |
+help: escape `dyn` to use it as an identifier
+   |
+LL | fn r#dyn() -> &'static dyn use<> { &() }
+   |    ++
+
+error: `use<...>` precise capturing syntax not allowed in `dyn` trait object bounds
+  --> $DIR/dyn-use.rs:4:26
+   |
+LL | fn dyn() -> &'static dyn use<> { &() }
+   |                          ^^^^^
+
+error[E0224]: at least one trait is required for an object type
+  --> $DIR/dyn-use.rs:4:22
+   |
+LL | fn dyn() -> &'static dyn use<> { &() }
+   |                      ^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0224`.
diff --git a/tests/ui/impl-trait/precise-capturing/dyn-use.rs b/tests/ui/impl-trait/precise-capturing/dyn-use.rs
index fb2f83e2d21..0b6a9467ff7 100644
--- a/tests/ui/impl-trait/precise-capturing/dyn-use.rs
+++ b/tests/ui/impl-trait/precise-capturing/dyn-use.rs
@@ -1,2 +1,10 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
 fn dyn() -> &'static dyn use<> { &() }
-//~^ ERROR expected one of `!`, `(`, `::`, `<`, `where`, or `{`, found keyword `use`
+//[edition2015]~^ ERROR expected one of `!`, `(`, `::`, `<`, `where`, or `{`, found keyword `use`
+//[edition2024]~^^ ERROR expected identifier, found keyword `dyn`
+//[edition2024]~| ERROR `use<...>` precise capturing syntax not allowed in `dyn` trait object bounds
+//[edition2024]~| ERROR at least one trait is required for an object type
+
+fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.stderr b/tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.edition2015.stderr
index 0d8fa650df4..c16722bb80f 100644
--- a/tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.stderr
+++ b/tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.edition2015.stderr
@@ -1,5 +1,5 @@
 error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
-  --> $DIR/hidden-type-suggestion.rs:3:5
+  --> $DIR/hidden-type-suggestion.rs:6:5
    |
 LL | fn lifetime<'a, 'b>(x: &'a ()) -> impl Sized + use<'b> {
    |             --                    -------------------- opaque type defined here
@@ -15,7 +15,7 @@ LL | fn lifetime<'a, 'b>(x: &'a ()) -> impl Sized + use<'b, 'a> {
    |                                                      ++++
 
 error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
-  --> $DIR/hidden-type-suggestion.rs:9:5
+  --> $DIR/hidden-type-suggestion.rs:12:5
    |
 LL | fn param<'a, T>(x: &'a ()) -> impl Sized + use<T> {
    |          --                   ------------------- opaque type defined here
@@ -31,7 +31,7 @@ LL | fn param<'a, T>(x: &'a ()) -> impl Sized + use<'a, T> {
    |                                                +++
 
 error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
-  --> $DIR/hidden-type-suggestion.rs:15:5
+  --> $DIR/hidden-type-suggestion.rs:18:5
    |
 LL | fn empty<'a>(x: &'a ()) -> impl Sized + use<> {
    |          --                ------------------ opaque type defined here
@@ -47,7 +47,7 @@ LL | fn empty<'a>(x: &'a ()) -> impl Sized + use<'a> {
    |                                             ++
 
 error[E0700]: hidden type for `impl Captures<'captured>` captures lifetime that does not appear in bounds
-  --> $DIR/hidden-type-suggestion.rs:24:5
+  --> $DIR/hidden-type-suggestion.rs:27:5
    |
 LL | fn missing<'a, 'captured, 'not_captured, Captured>(x: &'a ()) -> impl Captures<'captured> {
    |            --                                                    ------------------------ opaque type defined here
@@ -63,7 +63,7 @@ LL | fn missing<'a, 'captured, 'not_captured, Captured>(x: &'a ()) -> impl Captu
    |                                                                                           ++++++++++++++++++++++++++++++
 
 error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
-  --> $DIR/hidden-type-suggestion.rs:30:5
+  --> $DIR/hidden-type-suggestion.rs:33:5
    |
 LL | fn no_params_yet(_: impl Sized, y: &()) -> impl Sized {
    |                                    ---     ---------- opaque type defined here
@@ -74,7 +74,7 @@ LL |     y
    |     ^
    |
 note: you could use a `use<...>` bound to explicitly capture `'_`, but argument-position `impl Trait`s are not nameable
-  --> $DIR/hidden-type-suggestion.rs:28:21
+  --> $DIR/hidden-type-suggestion.rs:31:21
    |
 LL | fn no_params_yet(_: impl Sized, y: &()) -> impl Sized {
    |                     ^^^^^^^^^^
@@ -85,7 +85,7 @@ LL + fn no_params_yet<T: Sized>(_: T, y: &()) -> impl Sized + use<'_, T> {
    |
 
 error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
-  --> $DIR/hidden-type-suggestion.rs:36:5
+  --> $DIR/hidden-type-suggestion.rs:39:5
    |
 LL | fn yes_params_yet<'a, T>(_: impl Sized, y: &'a ()) -> impl Sized {
    |                   --                                  ---------- opaque type defined here
@@ -96,7 +96,7 @@ LL |     y
    |     ^
    |
 note: you could use a `use<...>` bound to explicitly capture `'a`, but argument-position `impl Trait`s are not nameable
-  --> $DIR/hidden-type-suggestion.rs:34:29
+  --> $DIR/hidden-type-suggestion.rs:37:29
    |
 LL | fn yes_params_yet<'a, T>(_: impl Sized, y: &'a ()) -> impl Sized {
    |                             ^^^^^^^^^^
diff --git a/tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.edition2024.stderr b/tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.edition2024.stderr
new file mode 100644
index 00000000000..308dc9b00fc
--- /dev/null
+++ b/tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.edition2024.stderr
@@ -0,0 +1,51 @@
+error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
+  --> $DIR/hidden-type-suggestion.rs:6:5
+   |
+LL | fn lifetime<'a, 'b>(x: &'a ()) -> impl Sized + use<'b> {
+   |             --                    -------------------- opaque type defined here
+   |             |
+   |             hidden type `&'a ()` captures the lifetime `'a` as defined here
+LL |
+LL |     x
+   |     ^
+   |
+help: add `'a` to the `use<...>` bound to explicitly capture it
+   |
+LL | fn lifetime<'a, 'b>(x: &'a ()) -> impl Sized + use<'b, 'a> {
+   |                                                      ++++
+
+error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
+  --> $DIR/hidden-type-suggestion.rs:12:5
+   |
+LL | fn param<'a, T>(x: &'a ()) -> impl Sized + use<T> {
+   |          --                   ------------------- opaque type defined here
+   |          |
+   |          hidden type `&'a ()` captures the lifetime `'a` as defined here
+LL |
+LL |     x
+   |     ^
+   |
+help: add `'a` to the `use<...>` bound to explicitly capture it
+   |
+LL | fn param<'a, T>(x: &'a ()) -> impl Sized + use<'a, T> {
+   |                                                +++
+
+error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
+  --> $DIR/hidden-type-suggestion.rs:18:5
+   |
+LL | fn empty<'a>(x: &'a ()) -> impl Sized + use<> {
+   |          --                ------------------ opaque type defined here
+   |          |
+   |          hidden type `&'a ()` captures the lifetime `'a` as defined here
+LL |
+LL |     x
+   |     ^
+   |
+help: add `'a` to the `use<...>` bound to explicitly capture it
+   |
+LL | fn empty<'a>(x: &'a ()) -> impl Sized + use<'a> {
+   |                                             ++
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.rs b/tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.rs
index d34c6135596..9712eac859a 100644
--- a/tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.rs
+++ b/tests/ui/impl-trait/precise-capturing/hidden-type-suggestion.rs
@@ -1,3 +1,6 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
 fn lifetime<'a, 'b>(x: &'a ()) -> impl Sized + use<'b> {
 //~^ HELP add `'a` to the `use<...>` bound
     x
@@ -20,21 +23,21 @@ trait Captures<'a> {}
 impl<T> Captures<'_> for T {}
 
 fn missing<'a, 'captured, 'not_captured, Captured>(x: &'a ()) -> impl Captures<'captured> {
-//~^ HELP add a `use<...>` bound
+//[edition2015]~^ HELP add a `use<...>` bound
     x
-//~^ ERROR hidden type for
+//[edition2015]~^ ERROR hidden type for
 }
 
 fn no_params_yet(_: impl Sized, y: &()) -> impl Sized {
-//~^ HELP add a `use<...>` bound
+//[edition2015]~^ HELP add a `use<...>` bound
     y
-//~^ ERROR hidden type for
+//[edition2015]~^ ERROR hidden type for
 }
 
 fn yes_params_yet<'a, T>(_: impl Sized, y: &'a ()) -> impl Sized {
-//~^ HELP add a `use<...>` bound
+//[edition2015]~^ HELP add a `use<...>` bound
     y
-//~^ ERROR hidden type for
+//[edition2015]~^ ERROR hidden type for
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/struct-field-fragment-in-name.rs b/tests/ui/impl-trait/struct-field-fragment-in-name.rs
new file mode 100644
index 00000000000..b98cd864ccb
--- /dev/null
+++ b/tests/ui/impl-trait/struct-field-fragment-in-name.rs
@@ -0,0 +1,16 @@
+//@ check-pass
+
+trait Trait<T> {}
+
+fn a(_: impl Trait<
+    [(); {
+        struct D {
+            #[rustfmt::skip]
+            bar: (),
+        }
+        0
+    }],
+>) {
+}
+
+fn main() {}
diff --git a/tests/ui/imports/import-from-missing-star-2.stderr b/tests/ui/imports/import-from-missing-star-2.edition2015.stderr
index 9fe2bdbcfa2..cd1a9581d30 100644
--- a/tests/ui/imports/import-from-missing-star-2.stderr
+++ b/tests/ui/imports/import-from-missing-star-2.edition2015.stderr
@@ -1,5 +1,5 @@
 error[E0432]: unresolved import `spam`
-  --> $DIR/import-from-missing-star-2.rs:2:9
+  --> $DIR/import-from-missing-star-2.rs:6:9
    |
 LL |     use spam::*;
    |         ^^^^ use of unresolved module or unlinked crate `spam`
diff --git a/tests/ui/imports/import-from-missing-star-2.edition2024.stderr b/tests/ui/imports/import-from-missing-star-2.edition2024.stderr
new file mode 100644
index 00000000000..086b7a576b2
--- /dev/null
+++ b/tests/ui/imports/import-from-missing-star-2.edition2024.stderr
@@ -0,0 +1,11 @@
+error[E0432]: unresolved import `spam`
+  --> $DIR/import-from-missing-star-2.rs:6:9
+   |
+LL |     use spam::*;
+   |         ^^^^ use of unresolved module or unlinked crate `spam`
+   |
+   = help: you might be missing a crate named `spam`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/import-from-missing-star-2.rs b/tests/ui/imports/import-from-missing-star-2.rs
index cb341b0b0ca..9dad2d4886b 100644
--- a/tests/ui/imports/import-from-missing-star-2.rs
+++ b/tests/ui/imports/import-from-missing-star-2.rs
@@ -1,5 +1,10 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
 mod foo {
+//[edition2015]~^ HELP you might be missing a crate named `spam`, add it to your project and import it in your code
     use spam::*; //~ ERROR unresolved import `spam` [E0432]
+    //[edition2024]~^ HELP you might be missing a crate named `spam`
 }
 
 fn main() {
diff --git a/tests/ui/imports/issue-28134.rs b/tests/ui/imports/issue-28134.rs
index 70d3a327c1a..aef2fe8facd 100644
--- a/tests/ui/imports/issue-28134.rs
+++ b/tests/ui/imports/issue-28134.rs
@@ -2,4 +2,4 @@
 
 #![allow(soft_unstable)]
 #![test]
-//~^ ERROR 4:1: 4:9: `test` attribute cannot be used at crate level
+//~^ ERROR `test` attribute cannot be used at crate level
diff --git a/tests/ui/imports/multiple-extern-by-macro-for-underscore.stderr b/tests/ui/imports/multiple-extern-by-macro-for-underscore.ed2015.stderr
index 1da5aa87070..985cd654c39 100644
--- a/tests/ui/imports/multiple-extern-by-macro-for-underscore.stderr
+++ b/tests/ui/imports/multiple-extern-by-macro-for-underscore.ed2015.stderr
@@ -1,5 +1,5 @@
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/multiple-extern-by-macro-for-underscore.rs:16:11
+  --> $DIR/multiple-extern-by-macro-for-underscore.rs:18:11
    |
 LL |     use ::_;
    |           ^ expected identifier, found reserved identifier
diff --git a/tests/ui/imports/multiple-extern-by-macro-for-underscore.ed2021.stderr b/tests/ui/imports/multiple-extern-by-macro-for-underscore.ed2021.stderr
new file mode 100644
index 00000000000..985cd654c39
--- /dev/null
+++ b/tests/ui/imports/multiple-extern-by-macro-for-underscore.ed2021.stderr
@@ -0,0 +1,8 @@
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/multiple-extern-by-macro-for-underscore.rs:18:11
+   |
+LL |     use ::_;
+   |           ^ expected identifier, found reserved identifier
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/imports/multiple-extern-by-macro-for-underscore.rs b/tests/ui/imports/multiple-extern-by-macro-for-underscore.rs
index ddf735d8947..ab877e06246 100644
--- a/tests/ui/imports/multiple-extern-by-macro-for-underscore.rs
+++ b/tests/ui/imports/multiple-extern-by-macro-for-underscore.rs
@@ -1,4 +1,6 @@
-//@ edition: 2021
+//@ revisions: ed2015 ed2021
+//@[ed2015] edition: 2015
+//@[ed2021] edition: 2021
 
 // issue#128813
 
diff --git a/tests/ui/inference/deref-suggestion.stderr b/tests/ui/inference/deref-suggestion.stderr
index 096989db0b4..8ccd28198af 100644
--- a/tests/ui/inference/deref-suggestion.stderr
+++ b/tests/ui/inference/deref-suggestion.stderr
@@ -164,21 +164,18 @@ LL |         *b
 error[E0308]: `if` and `else` have incompatible types
   --> $DIR/deref-suggestion.rs:69:12
    |
-LL |        let val = if true {
-   |  ________________-
-LL | |          *a
-   | |          -- expected because of this
-LL | |      } else if true {
-   | | ____________^
-LL | ||
-LL | ||         b
-LL | ||     } else {
-LL | ||         &0
-LL | ||     };
-   | ||     ^
-   | ||_____|
-   |  |_____`if` and `else` have incompatible types
-   |        expected `i32`, found `&{integer}`
+LL |       let val = if true {
+   |                 ------- `if` and `else` have incompatible types
+LL |           *a
+   |           -- expected because of this
+LL |       } else if true {
+   |  ____________^
+LL | |
+LL | |         b
+LL | |     } else {
+LL | |         &0
+LL | |     };
+   | |_____^ expected `i32`, found `&{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:81:15
diff --git a/tests/ui/inference/hint-closure-signature-119266.rs b/tests/ui/inference/hint-closure-signature-119266.rs
index 35be600fd6a..6e136c57cca 100644
--- a/tests/ui/inference/hint-closure-signature-119266.rs
+++ b/tests/ui/inference/hint-closure-signature-119266.rs
@@ -3,7 +3,7 @@ fn main() {
     //~^ NOTE: the found closure
 
     let x: fn(i32) = x;
-    //~^ ERROR: 5:22: 5:23: mismatched types [E0308]
+    //~^ ERROR: mismatched types [E0308]
     //~| NOTE: incorrect number of function parameters
     //~| NOTE: expected due to this
     //~| NOTE: expected fn pointer `fn(i32)`
diff --git a/tests/ui/inference/ice-ifer-var-leaked-out-of-rollback-122098.stderr b/tests/ui/inference/ice-ifer-var-leaked-out-of-rollback-122098.stderr
index ce01e24770d..c2ebaee2441 100644
--- a/tests/ui/inference/ice-ifer-var-leaked-out-of-rollback-122098.stderr
+++ b/tests/ui/inference/ice-ifer-var-leaked-out-of-rollback-122098.stderr
@@ -23,9 +23,12 @@ error[E0261]: use of undeclared lifetime name `'q`
   --> $DIR/ice-ifer-var-leaked-out-of-rollback-122098.rs:14:21
    |
 LL | impl<'static> Query<'q> {
-   |      -              ^^ undeclared lifetime
-   |      |
-   |      help: consider introducing lifetime `'q` here: `'q,`
+   |                     ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'q` here
+   |
+LL | impl<'q, 'static> Query<'q> {
+   |      +++
 
 error[E0392]: lifetime parameter `'q` is never used
   --> $DIR/ice-ifer-var-leaked-out-of-rollback-122098.rs:11:14
diff --git a/tests/ui/inference/issue-107090.stderr b/tests/ui/inference/issue-107090.stderr
index e509e262fb1..0deafdfb931 100644
--- a/tests/ui/inference/issue-107090.stderr
+++ b/tests/ui/inference/issue-107090.stderr
@@ -33,15 +33,23 @@ error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/issue-107090.rs:11:47
    |
 LL | impl<'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> {
-   |      -                                        ^^ undeclared lifetime
-   |      |
-   |      help: consider introducing lifetime `'b` here: `'b,`
+   |                                               ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'b` here
+   |
+LL | impl<'b, 'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> {
+   |      +++
 
 error[E0261]: use of undeclared lifetime name `'out`
   --> $DIR/issue-107090.rs:11:67
    |
 LL | impl<'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> {
-   |      - help: consider introducing lifetime `'out` here: `'out,`   ^^^^ undeclared lifetime
+   |                                                                   ^^^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'out` here
+   |
+LL | impl<'out, 'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> {
+   |      +++++
 
 error[E0261]: use of undeclared lifetime name `'out`
   --> $DIR/issue-107090.rs:14:49
@@ -62,9 +70,12 @@ error[E0261]: use of undeclared lifetime name `'short`
   --> $DIR/issue-107090.rs:20:68
    |
 LL | fn badboi<'in_, 'out, T>(x: Foo<'in_, 'out, T>, sadness: &'in_ Foo<'short, 'out, T>) -> &'out T {
-   |           -                                                        ^^^^^^ undeclared lifetime
-   |           |
-   |           help: consider introducing lifetime `'short` here: `'short,`
+   |                                                                    ^^^^^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'short` here
+   |
+LL | fn badboi<'short, 'in_, 'out, T>(x: Foo<'in_, 'out, T>, sadness: &'in_ Foo<'short, 'out, T>) -> &'out T {
+   |           +++++++
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/integral-indexing.rs b/tests/ui/integral-indexing.rs
index f076dfcb0a4..e20553af8a2 100644
--- a/tests/ui/integral-indexing.rs
+++ b/tests/ui/integral-indexing.rs
@@ -3,14 +3,14 @@ pub fn main() {
     let s: String = "abcdef".to_string();
     v[3_usize];
     v[3];
-    v[3u8];  //~ERROR : the type `[isize]` cannot be indexed by `u8`
-    v[3i8];  //~ERROR : the type `[isize]` cannot be indexed by `i8`
-    v[3u32]; //~ERROR : the type `[isize]` cannot be indexed by `u32`
-    v[3i32]; //~ERROR : the type `[isize]` cannot be indexed by `i32`
+    v[3u8];  //~ ERROR the type `[isize]` cannot be indexed by `u8`
+    v[3i8];  //~ ERROR the type `[isize]` cannot be indexed by `i8`
+    v[3u32]; //~ ERROR the type `[isize]` cannot be indexed by `u32`
+    v[3i32]; //~ ERROR the type `[isize]` cannot be indexed by `i32`
     s.as_bytes()[3_usize];
     s.as_bytes()[3];
-    s.as_bytes()[3u8];  //~ERROR : the type `[u8]` cannot be indexed by `u8`
-    s.as_bytes()[3i8];  //~ERROR : the type `[u8]` cannot be indexed by `i8`
-    s.as_bytes()[3u32]; //~ERROR : the type `[u8]` cannot be indexed by `u32`
-    s.as_bytes()[3i32]; //~ERROR : the type `[u8]` cannot be indexed by `i32`
+    s.as_bytes()[3u8];  //~ ERROR the type `[u8]` cannot be indexed by `u8`
+    s.as_bytes()[3i8];  //~ ERROR the type `[u8]` cannot be indexed by `i8`
+    s.as_bytes()[3u32]; //~ ERROR the type `[u8]` cannot be indexed by `u32`
+    s.as_bytes()[3i32]; //~ ERROR the type `[u8]` cannot be indexed by `i32`
 }
diff --git a/tests/ui/issues/issue-32950.rs b/tests/ui/issues/issue-32950.rs
deleted file mode 100644
index b51ac296776..00000000000
--- a/tests/ui/issues/issue-32950.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![feature(concat_idents)]
-#![expect(deprecated)] // concat_idents is deprecated
-
-#[derive(Debug)]
-struct Baz<T>(
-    concat_idents!(Foo, Bar) //~ ERROR `derive` cannot be used on items with type macros
-                             //~^ ERROR cannot find type `FooBar` in this scope
-);
-
-fn main() {}
diff --git a/tests/ui/issues/issue-32950.stderr b/tests/ui/issues/issue-32950.stderr
deleted file mode 100644
index 38a82542f89..00000000000
--- a/tests/ui/issues/issue-32950.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error: `derive` cannot be used on items with type macros
-  --> $DIR/issue-32950.rs:6:5
-   |
-LL |     concat_idents!(Foo, Bar)
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0412]: cannot find type `FooBar` in this scope
-  --> $DIR/issue-32950.rs:6:5
-   |
-LL |     concat_idents!(Foo, Bar)
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/issues/issue-43988.stderr b/tests/ui/issues/issue-43988.stderr
index bd4eb8bbed3..fe61e136a51 100644
--- a/tests/ui/issues/issue-43988.stderr
+++ b/tests/ui/issues/issue-43988.stderr
@@ -38,7 +38,7 @@ LL |     #[repr]
    |     ^^^^^^^
    |     |
    |     expected this to be a list
-   |     help: must be of the form: `#[repr(C)]`
+   |     help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
 
 error[E0539]: malformed `inline` attribute input
   --> $DIR/issue-43988.rs:30:5
@@ -64,7 +64,7 @@ LL |     let _z = #[repr] 1;
    |              ^^^^^^^
    |              |
    |              expected this to be a list
-   |              help: must be of the form: `#[repr(C)]`
+   |              help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
 
 error[E0518]: attribute should be applied to function or closure
   --> $DIR/issue-43988.rs:5:5
diff --git a/tests/ui/issues/issue-46604.rs b/tests/ui/issues/issue-46604.rs
index 6ec6e7bdcb8..e15f0b52da2 100644
--- a/tests/ui/issues/issue-46604.rs
+++ b/tests/ui/issues/issue-46604.rs
@@ -1,4 +1,4 @@
-static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];   //~ ERROR mutable references are not allowed
+static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];   //~ ERROR mutable borrows of temporaries
 fn write<T: AsRef<[u8]>>(buffer: T) { }
 
 fn main() {
diff --git a/tests/ui/issues/issue-46604.stderr b/tests/ui/issues/issue-46604.stderr
index 7faa2d79ba4..d983674995e 100644
--- a/tests/ui/issues/issue-46604.stderr
+++ b/tests/ui/issues/issue-46604.stderr
@@ -1,8 +1,12 @@
-error[E0764]: mutable references are not allowed in the final value of statics
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/issue-46604.rs:1:25
    |
 LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];
-   |                         ^^^^^^^^^^^^^^^^^^^^
+   |                         ^^^^^^^^^^^^^^^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error[E0594]: cannot assign to `buf[_]`, as `buf` is an immutable static item
   --> $DIR/issue-46604.rs:6:5
diff --git a/tests/ui/issues/issue-50403.rs b/tests/ui/issues/issue-50403.rs
deleted file mode 100644
index f14958afc34..00000000000
--- a/tests/ui/issues/issue-50403.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-#![feature(concat_idents)]
-#![expect(deprecated)] // concat_idents is deprecated
-
-fn main() {
-    let x = concat_idents!(); //~ ERROR `concat_idents!()` takes 1 or more arguments
-}
diff --git a/tests/ui/issues/issue-50403.stderr b/tests/ui/issues/issue-50403.stderr
deleted file mode 100644
index e7dd05bb018..00000000000
--- a/tests/ui/issues/issue-50403.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: `concat_idents!()` takes 1 or more arguments
-  --> $DIR/issue-50403.rs:5:13
-   |
-LL |     let x = concat_idents!();
-   |             ^^^^^^^^^^^^^^^^
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/issues/issue-59488.stderr b/tests/ui/issues/issue-59488.stderr
index ac8862716c0..b6611ad63a8 100644
--- a/tests/ui/issues/issue-59488.stderr
+++ b/tests/ui/issues/issue-59488.stderr
@@ -87,18 +87,16 @@ error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
   --> $DIR/issue-59488.rs:30:5
    |
 LL |     assert_eq!(Foo::Bar, i);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
    |
-   = help: the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
    = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
   --> $DIR/issue-59488.rs:30:5
    |
 LL |     assert_eq!(Foo::Bar, i);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
    |
-   = help: the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
    = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 10 previous errors
diff --git a/tests/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr b/tests/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr
index b30bcfb776c..736002c9335 100644
--- a/tests/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr
+++ b/tests/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr
@@ -26,9 +26,8 @@ LL | fn a() -> i32 {
    |    - consider calling this function
 ...
 LL |     assert_eq!(a, 0);
-   |     ^^^^^^^^^^^^^^^^ `fn() -> i32 {a}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |     ^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `fn() -> i32 {a}`
    |
-   = help: the trait `Debug` is not implemented for fn item `fn() -> i32 {a}`
    = help: use parentheses to call this function: `a()`
    = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/issues/issue-92741.rs b/tests/ui/issues/issue-92741.rs
index f2e5fdafd9c..1c5d5810a57 100644
--- a/tests/ui/issues/issue-92741.rs
+++ b/tests/ui/issues/issue-92741.rs
@@ -1,17 +1,17 @@
 //@ run-rustfix
 fn main() {}
 fn _foo() -> bool {
-    &  //~ ERROR 4:5: 6:36: mismatched types [E0308]
+    &  //~ ERROR mismatched types [E0308]
     mut
     if true { true } else { false }
 }
 
 fn _bar() -> bool {
-    &  //~ ERROR 10:5: 11:40: mismatched types [E0308]
+    &  //~ ERROR mismatched types [E0308]
     mut if true { true } else { false }
 }
 
 fn _baz() -> bool {
-    & mut //~ ERROR 15:5: 16:36: mismatched types [E0308]
+    & mut //~ ERROR mismatched types [E0308]
     if true { true } else { false }
 }
diff --git a/tests/ui/lifetimes/issue-107988.stderr b/tests/ui/lifetimes/issue-107988.stderr
index c2d8c7050e9..7d93c1d2024 100644
--- a/tests/ui/lifetimes/issue-107988.stderr
+++ b/tests/ui/lifetimes/issue-107988.stderr
@@ -2,9 +2,12 @@ error[E0261]: use of undeclared lifetime name `'tcx`
   --> $DIR/issue-107988.rs:7:52
    |
 LL | impl<T: ?Sized + TraitEngine<'tcx>> TraitEngineExt<'tcx> for T {
-   |      -                                             ^^^^ undeclared lifetime
-   |      |
-   |      help: consider introducing lifetime `'tcx` here: `'tcx,`
+   |                                                    ^^^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'tcx` here
+   |
+LL | impl<'tcx, T: ?Sized + TraitEngine<'tcx>> TraitEngineExt<'tcx> for T {
+   |      +++++
 
 error[E0261]: use of undeclared lifetime name `'tcx`
   --> $DIR/issue-107988.rs:7:30
diff --git a/tests/ui/lifetimes/no_lending_iterators.rs b/tests/ui/lifetimes/no_lending_iterators.rs
index b3e8ad08ba1..88b8cda0898 100644
--- a/tests/ui/lifetimes/no_lending_iterators.rs
+++ b/tests/ui/lifetimes/no_lending_iterators.rs
@@ -2,7 +2,7 @@ struct Data(String);
 
 impl Iterator for Data {
     type Item = &str;
-    //~^ ERROR 4:17: 4:18: associated type `Iterator::Item` is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
+    //~^ ERROR associated type `Iterator::Item` is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
 
     fn next(&mut self) -> Option<Self::Item> {
         Some(&self.0)
@@ -16,7 +16,7 @@ trait Bar {
 
 impl Bar for usize {
     type Item = &usize;
-    //~^ ERROR 18:17: 18:18: in the trait associated type is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
+    //~^ ERROR in the trait associated type is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
 
     fn poke(&mut self, item: Self::Item) {
         self += *item;
@@ -25,7 +25,7 @@ impl Bar for usize {
 
 impl Bar for isize {
     type Item<'a> = &'a isize;
-    //~^ ERROR 27:14: 27:18: lifetime parameters or bounds on associated type `Item` do not match the trait declaration [E0195]
+    //~^ ERROR lifetime parameters or bounds on associated type `Item` do not match the trait declaration [E0195]
 
     fn poke(&mut self, item: Self::Item) {
         self += *item;
diff --git a/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr b/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr
index 0d6ade41511..f90133e9fb1 100644
--- a/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr
+++ b/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr
@@ -1,10 +1,13 @@
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:3:9
    |
-LL | struct Test {
-   |            - help: consider introducing lifetime `'b` here: `<'b>`
 LL |     a: &'b str,
    |         ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'b` here
+   |
+LL | struct Test<'b> {
+   |            ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:3:9
@@ -12,9 +15,13 @@ error[E0261]: use of undeclared lifetime name `'b`
 LL | #[derive(Eq, PartialEq)]
    |          -- lifetime `'b` is missing in item created through this procedural macro
 LL | struct Test {
-   |            - help: consider introducing lifetime `'b` here: `<'b>`
 LL |     a: &'b str,
    |         ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'b` here
+   |
+LL | struct Test<'b> {
+   |            ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/undeclared-lifetime-used-in-debug-macro-issue-70152.rs:13:13
diff --git a/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs b/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs
index 9babc20d1a1..9ccc9ce4fdb 100644
--- a/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs
+++ b/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.rs
@@ -11,7 +11,7 @@ extern crate minicore;
 
 #[link(name = "foo", kind = "raw-dylib")]
 extern "stdcall" {
-//~^ WARN: calling convention not supported on this target
+//~^ WARN: unsupported_calling_conventions
 //~| WARN: previously accepted
     fn f(x: i32);
     //~^ ERROR ABI not supported by `#[link(kind = "raw-dylib")]` on this architecture
diff --git a/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr b/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr
index 95ea9080486..91e42f2909e 100644
--- a/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr
+++ b/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr
@@ -1,4 +1,4 @@
-warning: use of calling convention not supported on this target
+warning: "stdcall" is not a supported ABI for the current target
   --> $DIR/unsupported-abi.rs:13:1
    |
 LL | / extern "stdcall" {
diff --git a/tests/ui/lint/dead-code/issue-41883.stderr b/tests/ui/lint/dead-code/issue-41883.stderr
index cf079e4dda3..47ccef9a530 100644
--- a/tests/ui/lint/dead-code/issue-41883.stderr
+++ b/tests/ui/lint/dead-code/issue-41883.stderr
@@ -29,8 +29,6 @@ error: struct `UnusedStruct` is never constructed
    |
 LL |     struct UnusedStruct;
    |            ^^^^^^^^^^^^
-   |
-   = note: `UnusedStruct` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/lint/dead-code/issue-59003.rs b/tests/ui/lint/dead-code/issue-59003.rs
index e3dcaca5778..319cf2db149 100644
--- a/tests/ui/lint/dead-code/issue-59003.rs
+++ b/tests/ui/lint/dead-code/issue-59003.rs
@@ -4,8 +4,8 @@
 
 #![deny(dead_code)]
 
+#[allow(dead_code)]
 struct Foo {
-    #[allow(dead_code)]
     inner: u32,
 }
 
diff --git a/tests/ui/lint/dead-code/lint-unused-adt-appeared-in-pattern.rs b/tests/ui/lint/dead-code/lint-unused-adt-appeared-in-pattern.rs
new file mode 100644
index 00000000000..25777438456
--- /dev/null
+++ b/tests/ui/lint/dead-code/lint-unused-adt-appeared-in-pattern.rs
@@ -0,0 +1,37 @@
+#![deny(dead_code)]
+
+struct Foo(u8); //~ ERROR struct `Foo` is never constructed
+
+enum Bar { //~ ERROR enum `Bar` is never used
+    Var1(u8),
+    Var2(u8),
+}
+
+pub trait Tr1 {
+    fn f1() -> Self;
+}
+
+impl Tr1 for Foo {
+    fn f1() -> Foo {
+        let f = Foo(0);
+        let Foo(tag) = f;
+        Foo(tag)
+    }
+}
+
+impl Tr1 for Bar {
+    fn f1() -> Bar {
+        let b = Bar::Var1(0);
+        let b = if let Bar::Var1(_) = b {
+            Bar::Var1(0)
+        } else {
+            Bar::Var2(0)
+        };
+        match b {
+            Bar::Var1(_) => Bar::Var2(0),
+            Bar::Var2(_) => Bar::Var1(0),
+        }
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/lint/dead-code/lint-unused-adt-appeared-in-pattern.stderr b/tests/ui/lint/dead-code/lint-unused-adt-appeared-in-pattern.stderr
new file mode 100644
index 00000000000..7c1a4b45977
--- /dev/null
+++ b/tests/ui/lint/dead-code/lint-unused-adt-appeared-in-pattern.stderr
@@ -0,0 +1,20 @@
+error: struct `Foo` is never constructed
+  --> $DIR/lint-unused-adt-appeared-in-pattern.rs:3:8
+   |
+LL | struct Foo(u8);
+   |        ^^^
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-adt-appeared-in-pattern.rs:1:9
+   |
+LL | #![deny(dead_code)]
+   |         ^^^^^^^^^
+
+error: enum `Bar` is never used
+  --> $DIR/lint-unused-adt-appeared-in-pattern.rs:5:6
+   |
+LL | enum Bar {
+   |      ^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr b/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
index b992005318f..25a7d96cb89 100644
--- a/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
+++ b/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
@@ -56,8 +56,6 @@ warning: struct `Foo` is never constructed
    |
 LL | struct Foo(usize, #[allow(unused)] usize);
    |        ^^^
-   |
-   = note: `Foo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
 
 error: aborting due to 2 previous errors; 2 warnings emitted
 
diff --git a/tests/ui/lint/dead-code/not-lint-adt-appeared-in-pattern-issue-120770.rs b/tests/ui/lint/dead-code/not-lint-adt-appeared-in-pattern-issue-120770.rs
new file mode 100644
index 00000000000..43a2e431904
--- /dev/null
+++ b/tests/ui/lint/dead-code/not-lint-adt-appeared-in-pattern-issue-120770.rs
@@ -0,0 +1,32 @@
+//@ check-pass
+
+#![deny(dead_code)]
+
+#[repr(u8)]
+#[derive(Copy, Clone, Debug)]
+pub enum RecordField {
+    Target = 1,
+    Level,
+    Module,
+    File,
+    Line,
+    NumArgs,
+}
+
+unsafe trait Pod {}
+
+#[repr(transparent)]
+struct RecordFieldWrapper(RecordField);
+
+unsafe impl Pod for RecordFieldWrapper {}
+
+fn try_read<T: Pod>(buf: &[u8]) -> T {
+    unsafe { std::ptr::read_unaligned(buf.as_ptr() as *const T) }
+}
+
+pub fn foo(buf: &[u8]) -> RecordField {
+    let RecordFieldWrapper(tag) = try_read(buf);
+    tag
+}
+
+fn main() {}
diff --git a/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.rs b/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.rs
index 5b755d62a05..415eb4138de 100644
--- a/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.rs
+++ b/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.rs
@@ -2,7 +2,7 @@
 
 struct T1; //~ ERROR struct `T1` is never constructed
 pub struct T2(i32); //~ ERROR field `0` is never read
-struct T3;
+struct T3; //~ ERROR struct `T3` is never constructed
 
 trait Trait1 { //~ ERROR trait `Trait1` is never used
     const UNUSED: i32;
diff --git a/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.stderr b/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.stderr
index 2441a3f868d..778dadee153 100644
--- a/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.stderr
+++ b/tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.stderr
@@ -20,11 +20,17 @@ LL | pub struct T2(i32);
    |
    = help: consider removing this field
 
+error: struct `T3` is never constructed
+  --> $DIR/unused-adt-impl-pub-trait-with-assoc-const.rs:5:8
+   |
+LL | struct T3;
+   |        ^^
+
 error: trait `Trait1` is never used
   --> $DIR/unused-adt-impl-pub-trait-with-assoc-const.rs:7:7
    |
 LL | trait Trait1 {
    |       ^^^^^^
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors
 
diff --git a/tests/ui/lint/dead-code/unused-struct-derive-default.rs b/tests/ui/lint/dead-code/unused-struct-derive-default.rs
index 330ad32dd57..f20b7cb66ee 100644
--- a/tests/ui/lint/dead-code/unused-struct-derive-default.rs
+++ b/tests/ui/lint/dead-code/unused-struct-derive-default.rs
@@ -22,4 +22,5 @@ pub struct T2 {
 
 fn main() {
     let _x: Used = Default::default();
+    let _e: E = Default::default();
 }
diff --git a/tests/ui/lint/dead-code/unused-struct-derive-default.stderr b/tests/ui/lint/dead-code/unused-struct-derive-default.stderr
index bbb0bd7be70..7422f9a39f3 100644
--- a/tests/ui/lint/dead-code/unused-struct-derive-default.stderr
+++ b/tests/ui/lint/dead-code/unused-struct-derive-default.stderr
@@ -4,7 +4,6 @@ error: struct `T` is never constructed
 LL | struct T;
    |        ^
    |
-   = note: `T` has a derived impl for the trait `Default`, but this is intentionally ignored during dead code analysis
 note: the lint level is defined here
   --> $DIR/unused-struct-derive-default.rs:1:9
    |
diff --git a/tests/ui/lint/lint-non-uppercase-usages.fixed b/tests/ui/lint/lint-non-uppercase-usages.fixed
new file mode 100644
index 00000000000..231991dcae0
--- /dev/null
+++ b/tests/ui/lint/lint-non-uppercase-usages.fixed
@@ -0,0 +1,44 @@
+// Checks that the `non_upper_case_globals` emits suggestions for usages as well
+// <https://github.com/rust-lang/rust/issues/124061>
+
+//@ check-pass
+//@ run-rustfix
+
+#![allow(dead_code)]
+
+use std::cell::Cell;
+
+const MY_STATIC: u32 = 0;
+//~^ WARN constant `my_static` should have an upper case name
+//~| SUGGESTION MY_STATIC
+
+const LOL: u32 = MY_STATIC + 0;
+//~^ SUGGESTION MY_STATIC
+
+mod my_mod {
+    const INSIDE_MOD: u32 = super::MY_STATIC + 0;
+    //~^ SUGGESTION MY_STATIC
+}
+
+thread_local! {
+    static FOO_FOO: Cell<usize> = unreachable!();
+    //~^ WARN constant `fooFOO` should have an upper case name
+    //~| SUGGESTION FOO_FOO
+}
+
+fn foo<const FOO: u32>() {
+    //~^ WARN const parameter `foo` should have an upper case name
+    //~| SUGGESTION FOO
+    let _a = FOO + 1;
+    //~^ SUGGESTION FOO
+}
+
+fn main() {
+    let _a = crate::MY_STATIC;
+    //~^ SUGGESTION MY_STATIC
+
+    FOO_FOO.set(9);
+    //~^ SUGGESTION FOO_FOO
+    println!("{}", FOO_FOO.get());
+    //~^ SUGGESTION FOO_FOO
+}
diff --git a/tests/ui/lint/lint-non-uppercase-usages.rs b/tests/ui/lint/lint-non-uppercase-usages.rs
new file mode 100644
index 00000000000..9cdf5e47003
--- /dev/null
+++ b/tests/ui/lint/lint-non-uppercase-usages.rs
@@ -0,0 +1,44 @@
+// Checks that the `non_upper_case_globals` emits suggestions for usages as well
+// <https://github.com/rust-lang/rust/issues/124061>
+
+//@ check-pass
+//@ run-rustfix
+
+#![allow(dead_code)]
+
+use std::cell::Cell;
+
+const my_static: u32 = 0;
+//~^ WARN constant `my_static` should have an upper case name
+//~| SUGGESTION MY_STATIC
+
+const LOL: u32 = my_static + 0;
+//~^ SUGGESTION MY_STATIC
+
+mod my_mod {
+    const INSIDE_MOD: u32 = super::my_static + 0;
+    //~^ SUGGESTION MY_STATIC
+}
+
+thread_local! {
+    static fooFOO: Cell<usize> = unreachable!();
+    //~^ WARN constant `fooFOO` should have an upper case name
+    //~| SUGGESTION FOO_FOO
+}
+
+fn foo<const foo: u32>() {
+    //~^ WARN const parameter `foo` should have an upper case name
+    //~| SUGGESTION FOO
+    let _a = foo + 1;
+    //~^ SUGGESTION FOO
+}
+
+fn main() {
+    let _a = crate::my_static;
+    //~^ SUGGESTION MY_STATIC
+
+    fooFOO.set(9);
+    //~^ SUGGESTION FOO_FOO
+    println!("{}", fooFOO.get());
+    //~^ SUGGESTION FOO_FOO
+}
diff --git a/tests/ui/lint/lint-non-uppercase-usages.stderr b/tests/ui/lint/lint-non-uppercase-usages.stderr
new file mode 100644
index 00000000000..7c7e573a88e
--- /dev/null
+++ b/tests/ui/lint/lint-non-uppercase-usages.stderr
@@ -0,0 +1,39 @@
+warning: constant `my_static` should have an upper case name
+  --> $DIR/lint-non-uppercase-usages.rs:11:7
+   |
+LL | const my_static: u32 = 0;
+   |       ^^^^^^^^^
+   |
+   = note: `#[warn(non_upper_case_globals)]` on by default
+help: convert the identifier to upper case
+   |
+LL - const my_static: u32 = 0;
+LL + const MY_STATIC: u32 = 0;
+   |
+
+warning: constant `fooFOO` should have an upper case name
+  --> $DIR/lint-non-uppercase-usages.rs:24:12
+   |
+LL |     static fooFOO: Cell<usize> = unreachable!();
+   |            ^^^^^^
+   |
+help: convert the identifier to upper case
+   |
+LL -     static fooFOO: Cell<usize> = unreachable!();
+LL +     static FOO_FOO: Cell<usize> = unreachable!();
+   |
+
+warning: const parameter `foo` should have an upper case name
+  --> $DIR/lint-non-uppercase-usages.rs:29:14
+   |
+LL | fn foo<const foo: u32>() {
+   |              ^^^
+   |
+help: convert the identifier to upper case (notice the capitalization difference)
+   |
+LL - fn foo<const foo: u32>() {
+LL + fn foo<const FOO: u32>() {
+   |
+
+warning: 3 warnings emitted
+
diff --git a/tests/ui/lint/unused/unused-attr-duplicate.stderr b/tests/ui/lint/unused/unused-attr-duplicate.stderr
index e1c45e832af..a18581192ea 100644
--- a/tests/ui/lint/unused/unused-attr-duplicate.stderr
+++ b/tests/ui/lint/unused/unused-attr-duplicate.stderr
@@ -66,19 +66,6 @@ LL | #[should_panic]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 error: unused attribute
-  --> $DIR/unused-attr-duplicate.rs:60:1
-   |
-LL | #[must_use = "some message"]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
-   |
-note: attribute also specified here
-  --> $DIR/unused-attr-duplicate.rs:59:1
-   |
-LL | #[must_use]
-   | ^^^^^^^^^^^
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-
-error: unused attribute
   --> $DIR/unused-attr-duplicate.rs:66:1
    |
 LL | #[non_exhaustive]
@@ -103,67 +90,6 @@ LL | #[automatically_derived]
    | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: unused attribute
-  --> $DIR/unused-attr-duplicate.rs:77:1
-   |
-LL | #[cold]
-   | ^^^^^^^ help: remove this attribute
-   |
-note: attribute also specified here
-  --> $DIR/unused-attr-duplicate.rs:76:1
-   |
-LL | #[cold]
-   | ^^^^^^^
-
-error: unused attribute
-  --> $DIR/unused-attr-duplicate.rs:79:1
-   |
-LL | #[track_caller]
-   | ^^^^^^^^^^^^^^^ help: remove this attribute
-   |
-note: attribute also specified here
-  --> $DIR/unused-attr-duplicate.rs:78:1
-   |
-LL | #[track_caller]
-   | ^^^^^^^^^^^^^^^
-
-error: unused attribute
-  --> $DIR/unused-attr-duplicate.rs:92:1
-   |
-LL | #[export_name = "exported_symbol_name"]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
-   |
-note: attribute also specified here
-  --> $DIR/unused-attr-duplicate.rs:94:1
-   |
-LL | #[export_name = "exported_symbol_name2"]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-
-error: unused attribute
-  --> $DIR/unused-attr-duplicate.rs:98:1
-   |
-LL | #[no_mangle]
-   | ^^^^^^^^^^^^ help: remove this attribute
-   |
-note: attribute also specified here
-  --> $DIR/unused-attr-duplicate.rs:97:1
-   |
-LL | #[no_mangle]
-   | ^^^^^^^^^^^^
-
-error: unused attribute
-  --> $DIR/unused-attr-duplicate.rs:102:1
-   |
-LL | #[used]
-   | ^^^^^^^ help: remove this attribute
-   |
-note: attribute also specified here
-  --> $DIR/unused-attr-duplicate.rs:101:1
-   |
-LL | #[used]
-   | ^^^^^^^
-
-error: unused attribute
   --> $DIR/unused-attr-duplicate.rs:86:5
    |
 LL |     #[link_name = "this_does_not_exist"]
@@ -277,6 +203,19 @@ LL |     #[macro_export]
    |     ^^^^^^^^^^^^^^^
 
 error: unused attribute
+  --> $DIR/unused-attr-duplicate.rs:60:1
+   |
+LL | #[must_use = "some message"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/unused-attr-duplicate.rs:59:1
+   |
+LL | #[must_use]
+   | ^^^^^^^^^^^
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+
+error: unused attribute
   --> $DIR/unused-attr-duplicate.rs:74:1
    |
 LL | #[inline(never)]
@@ -289,5 +228,66 @@ LL | #[inline(always)]
    | ^^^^^^^^^^^^^^^^^
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
+error: unused attribute
+  --> $DIR/unused-attr-duplicate.rs:77:1
+   |
+LL | #[cold]
+   | ^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/unused-attr-duplicate.rs:76:1
+   |
+LL | #[cold]
+   | ^^^^^^^
+
+error: unused attribute
+  --> $DIR/unused-attr-duplicate.rs:79:1
+   |
+LL | #[track_caller]
+   | ^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/unused-attr-duplicate.rs:78:1
+   |
+LL | #[track_caller]
+   | ^^^^^^^^^^^^^^^
+
+error: unused attribute
+  --> $DIR/unused-attr-duplicate.rs:92:1
+   |
+LL | #[export_name = "exported_symbol_name"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/unused-attr-duplicate.rs:94:1
+   |
+LL | #[export_name = "exported_symbol_name2"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+
+error: unused attribute
+  --> $DIR/unused-attr-duplicate.rs:98:1
+   |
+LL | #[no_mangle]
+   | ^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/unused-attr-duplicate.rs:97:1
+   |
+LL | #[no_mangle]
+   | ^^^^^^^^^^^^
+
+error: unused attribute
+  --> $DIR/unused-attr-duplicate.rs:102:1
+   |
+LL | #[used]
+   | ^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/unused-attr-duplicate.rs:101:1
+   |
+LL | #[used]
+   | ^^^^^^^
+
 error: aborting due to 23 previous errors
 
diff --git a/tests/ui/loop-match/break-to-block.rs b/tests/ui/loop-match/break-to-block.rs
new file mode 100644
index 00000000000..e7451a944c3
--- /dev/null
+++ b/tests/ui/loop-match/break-to-block.rs
@@ -0,0 +1,23 @@
+// Test that a `break` without `#[const_continue]` still works as expected.
+
+//@ run-pass
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+
+fn main() {
+    assert_eq!(helper(), 1);
+}
+
+fn helper() -> u8 {
+    let mut state = 0u8;
+    #[loop_match]
+    'a: loop {
+        state = 'blk: {
+            match state {
+                0 => break 'blk 1,
+                _ => break 'a state,
+            }
+        }
+    }
+}
diff --git a/tests/ui/loop-match/const-continue-to-block.rs b/tests/ui/loop-match/const-continue-to-block.rs
new file mode 100644
index 00000000000..fd7ebeefeb6
--- /dev/null
+++ b/tests/ui/loop-match/const-continue-to-block.rs
@@ -0,0 +1,26 @@
+// Test that a `#[const_continue]` that breaks to a normal labeled block (that
+// is not part of a `#[loop_match]`) produces an error.
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+#![crate_type = "lib"]
+
+fn const_continue_to_block() -> u8 {
+    let state = 0;
+    #[loop_match]
+    loop {
+        state = 'blk: {
+            match state {
+                0 => {
+                    #[const_continue]
+                    break 'blk 1;
+                }
+                _ => 'b: {
+                    #[const_continue]
+                    break 'b 2;
+                    //~^ ERROR `#[const_continue]` must break to a labeled block that participates in a `#[loop_match]`
+                }
+            }
+        }
+    }
+}
diff --git a/tests/ui/loop-match/const-continue-to-block.stderr b/tests/ui/loop-match/const-continue-to-block.stderr
new file mode 100644
index 00000000000..3a5339a0394
--- /dev/null
+++ b/tests/ui/loop-match/const-continue-to-block.stderr
@@ -0,0 +1,8 @@
+error: `#[const_continue]` must break to a labeled block that participates in a `#[loop_match]`
+  --> $DIR/const-continue-to-block.rs:20:27
+   |
+LL |                     break 'b 2;
+   |                           ^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/loop-match/const-continue-to-loop.rs b/tests/ui/loop-match/const-continue-to-loop.rs
new file mode 100644
index 00000000000..c363e617cfb
--- /dev/null
+++ b/tests/ui/loop-match/const-continue-to-loop.rs
@@ -0,0 +1,27 @@
+// Test that a `#[const_continue]` that breaks to the label of the loop itself
+// rather than to the label of the block within the `#[loop_match]` produces an
+// error.
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+#![crate_type = "lib"]
+
+fn const_continue_to_loop() -> u8 {
+    let mut state = 0;
+    #[loop_match]
+    'a: loop {
+        state = 'blk: {
+            match state {
+                0 => {
+                    #[const_continue]
+                    break 'blk 1;
+                }
+                _ => {
+                    #[const_continue]
+                    break 'a 2;
+                    //~^ ERROR `#[const_continue]` must break to a labeled block that participates in a `#[loop_match]`
+                }
+            }
+        }
+    }
+}
diff --git a/tests/ui/loop-match/const-continue-to-loop.stderr b/tests/ui/loop-match/const-continue-to-loop.stderr
new file mode 100644
index 00000000000..a217b3ac72c
--- /dev/null
+++ b/tests/ui/loop-match/const-continue-to-loop.stderr
@@ -0,0 +1,8 @@
+error: `#[const_continue]` must break to a labeled block that participates in a `#[loop_match]`
+  --> $DIR/const-continue-to-loop.rs:21:27
+   |
+LL |                     break 'a 2;
+   |                           ^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/loop-match/const-continue-to-polymorphic-const.rs b/tests/ui/loop-match/const-continue-to-polymorphic-const.rs
new file mode 100644
index 00000000000..9a91c977911
--- /dev/null
+++ b/tests/ui/loop-match/const-continue-to-polymorphic-const.rs
@@ -0,0 +1,29 @@
+// Test that a `#[const_continue]` that breaks on a polymorphic constant produces an error.
+// A polymorphic constant does not have a concrete value at MIR building time, and therefore the
+// `#[loop_match]~ desugaring can't handle such values.
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+#![crate_type = "lib"]
+
+trait Foo {
+    const TARGET: u8;
+
+    fn test_u8(mut state: u8) -> &'static str {
+        #[loop_match]
+        loop {
+            state = 'blk: {
+                match state {
+                    0 => {
+                        #[const_continue]
+                        break 'blk Self::TARGET;
+                        //~^ ERROR could not determine the target branch for this `#[const_continue]`
+                    }
+
+                    1 => return "bar",
+                    2 => return "baz",
+                    _ => unreachable!(),
+                }
+            }
+        }
+    }
+}
diff --git a/tests/ui/loop-match/const-continue-to-polymorphic-const.stderr b/tests/ui/loop-match/const-continue-to-polymorphic-const.stderr
new file mode 100644
index 00000000000..4d183a2fbeb
--- /dev/null
+++ b/tests/ui/loop-match/const-continue-to-polymorphic-const.stderr
@@ -0,0 +1,8 @@
+error: could not determine the target branch for this `#[const_continue]`
+  --> $DIR/const-continue-to-polymorphic-const.rs:18:36
+   |
+LL |                         break 'blk Self::TARGET;
+   |                                    ^^^^^^^^^^^^ this value is too generic
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/loop-match/drop-in-match-arm.rs b/tests/ui/loop-match/drop-in-match-arm.rs
new file mode 100644
index 00000000000..731af659012
--- /dev/null
+++ b/tests/ui/loop-match/drop-in-match-arm.rs
@@ -0,0 +1,47 @@
+// Test that dropping values works in match arms, which is nontrivial
+// because each match arm needs its own scope.
+
+//@ run-pass
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+
+use std::sync::atomic::{AtomicBool, Ordering};
+
+fn main() {
+    assert_eq!(helper(), 1);
+    assert!(DROPPED.load(Ordering::Relaxed));
+}
+
+static DROPPED: AtomicBool = AtomicBool::new(false);
+
+struct X;
+
+impl Drop for X {
+    fn drop(&mut self) {
+        DROPPED.store(true, Ordering::Relaxed);
+    }
+}
+
+#[no_mangle]
+#[inline(never)]
+fn helper() -> i32 {
+    let mut state = 0;
+    #[loop_match]
+    'a: loop {
+        state = 'blk: {
+            match state {
+                0 => match X {
+                    _ => {
+                        assert!(!DROPPED.load(Ordering::Relaxed));
+                        break 'blk 1;
+                    }
+                },
+                _ => {
+                    assert!(DROPPED.load(Ordering::Relaxed));
+                    break 'a state;
+                }
+            }
+        };
+    }
+}
diff --git a/tests/ui/loop-match/invalid-attribute.rs b/tests/ui/loop-match/invalid-attribute.rs
new file mode 100644
index 00000000000..d8d2f605eb4
--- /dev/null
+++ b/tests/ui/loop-match/invalid-attribute.rs
@@ -0,0 +1,43 @@
+// Test that the `#[loop_match]` and `#[const_continue]` attributes can only be
+// placed on expressions.
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+#![loop_match] //~ ERROR should be applied to a loop
+#![const_continue] //~ ERROR should be applied to a break expression
+
+extern "C" {
+    #[loop_match] //~ ERROR should be applied to a loop
+    #[const_continue] //~ ERROR should be applied to a break expression
+    fn f();
+}
+
+#[loop_match] //~ ERROR should be applied to a loop
+#[const_continue] //~ ERROR should be applied to a break expression
+#[repr(C)]
+struct S {
+    a: u32,
+    b: u32,
+}
+
+trait Invoke {
+    #[loop_match] //~ ERROR should be applied to a loop
+    #[const_continue] //~ ERROR should be applied to a break expression
+    extern "C" fn invoke(&self);
+}
+
+#[loop_match] //~ ERROR should be applied to a loop
+#[const_continue] //~ ERROR should be applied to a break expression
+extern "C" fn ok() {}
+
+fn main() {
+    #[loop_match] //~ ERROR should be applied to a loop
+    #[const_continue] //~ ERROR should be applied to a break expression
+    || {};
+
+    {
+        #[loop_match] //~ ERROR should be applied to a loop
+        #[const_continue] //~ ERROR should be applied to a break expression
+        5
+    };
+}
diff --git a/tests/ui/loop-match/invalid-attribute.stderr b/tests/ui/loop-match/invalid-attribute.stderr
new file mode 100644
index 00000000000..07015311f9c
--- /dev/null
+++ b/tests/ui/loop-match/invalid-attribute.stderr
@@ -0,0 +1,131 @@
+error: `#[const_continue]` should be applied to a break expression
+  --> $DIR/invalid-attribute.rs:16:1
+   |
+LL | #[const_continue]
+   | ^^^^^^^^^^^^^^^^^
+LL | #[repr(C)]
+LL | struct S {
+   | -------- not a break expression
+
+error: `#[loop_match]` should be applied to a loop
+  --> $DIR/invalid-attribute.rs:15:1
+   |
+LL | #[loop_match]
+   | ^^^^^^^^^^^^^
+...
+LL | struct S {
+   | -------- not a loop
+
+error: `#[const_continue]` should be applied to a break expression
+  --> $DIR/invalid-attribute.rs:30:1
+   |
+LL | #[const_continue]
+   | ^^^^^^^^^^^^^^^^^
+LL | extern "C" fn ok() {}
+   | ------------------ not a break expression
+
+error: `#[loop_match]` should be applied to a loop
+  --> $DIR/invalid-attribute.rs:29:1
+   |
+LL | #[loop_match]
+   | ^^^^^^^^^^^^^
+LL | #[const_continue]
+LL | extern "C" fn ok() {}
+   | ------------------ not a loop
+
+error: `#[const_continue]` should be applied to a break expression
+  --> $DIR/invalid-attribute.rs:35:5
+   |
+LL |     #[const_continue]
+   |     ^^^^^^^^^^^^^^^^^
+LL |     || {};
+   |     -- not a break expression
+
+error: `#[loop_match]` should be applied to a loop
+  --> $DIR/invalid-attribute.rs:34:5
+   |
+LL |     #[loop_match]
+   |     ^^^^^^^^^^^^^
+LL |     #[const_continue]
+LL |     || {};
+   |     -- not a loop
+
+error: `#[const_continue]` should be applied to a break expression
+  --> $DIR/invalid-attribute.rs:40:9
+   |
+LL |         #[const_continue]
+   |         ^^^^^^^^^^^^^^^^^
+LL |         5
+   |         - not a break expression
+
+error: `#[loop_match]` should be applied to a loop
+  --> $DIR/invalid-attribute.rs:39:9
+   |
+LL |         #[loop_match]
+   |         ^^^^^^^^^^^^^
+LL |         #[const_continue]
+LL |         5
+   |         - not a loop
+
+error: `#[const_continue]` should be applied to a break expression
+  --> $DIR/invalid-attribute.rs:25:5
+   |
+LL |     #[const_continue]
+   |     ^^^^^^^^^^^^^^^^^
+LL |     extern "C" fn invoke(&self);
+   |     ---------------------------- not a break expression
+
+error: `#[loop_match]` should be applied to a loop
+  --> $DIR/invalid-attribute.rs:24:5
+   |
+LL |     #[loop_match]
+   |     ^^^^^^^^^^^^^
+LL |     #[const_continue]
+LL |     extern "C" fn invoke(&self);
+   |     ---------------------------- not a loop
+
+error: `#[const_continue]` should be applied to a break expression
+  --> $DIR/invalid-attribute.rs:11:5
+   |
+LL |     #[const_continue]
+   |     ^^^^^^^^^^^^^^^^^
+LL |     fn f();
+   |     ------- not a break expression
+
+error: `#[loop_match]` should be applied to a loop
+  --> $DIR/invalid-attribute.rs:10:5
+   |
+LL |     #[loop_match]
+   |     ^^^^^^^^^^^^^
+LL |     #[const_continue]
+LL |     fn f();
+   |     ------- not a loop
+
+error: `#[const_continue]` should be applied to a break expression
+  --> $DIR/invalid-attribute.rs:7:1
+   |
+LL | / #![allow(incomplete_features)]
+LL | | #![feature(loop_match)]
+LL | | #![loop_match]
+LL | | #![const_continue]
+   | | ^^^^^^^^^^^^^^^^^^
+...  |
+LL | |     };
+LL | | }
+   | |_- not a break expression
+
+error: `#[loop_match]` should be applied to a loop
+  --> $DIR/invalid-attribute.rs:6:1
+   |
+LL | / #![allow(incomplete_features)]
+LL | | #![feature(loop_match)]
+LL | | #![loop_match]
+   | | ^^^^^^^^^^^^^^
+LL | | #![const_continue]
+...  |
+LL | |     };
+LL | | }
+   | |_- not a loop
+
+error: aborting due to 14 previous errors
+
diff --git a/tests/ui/loop-match/invalid.rs b/tests/ui/loop-match/invalid.rs
new file mode 100644
index 00000000000..2ddc19f4fc6
--- /dev/null
+++ b/tests/ui/loop-match/invalid.rs
@@ -0,0 +1,161 @@
+// Test that the correct error is emitted when `#[loop_match]` is applied to
+// syntax it does not support.
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+#![crate_type = "lib"]
+
+enum State {
+    A,
+    B,
+    C,
+}
+
+fn invalid_update() {
+    let mut fake = State::A;
+    let state = State::A;
+    #[loop_match]
+    loop {
+        fake = 'blk: {
+            //~^ ERROR invalid update of the `#[loop_match]` state
+            match state {
+                _ => State::B,
+            }
+        }
+    }
+}
+
+fn invalid_scrutinee() {
+    let mut state = State::A;
+    #[loop_match]
+    loop {
+        state = 'blk: {
+            match State::A {
+                //~^ ERROR invalid match on `#[loop_match]` state
+                _ => State::B,
+            }
+        }
+    }
+}
+
+fn bad_statements_1() {
+    let mut state = State::A;
+    #[loop_match]
+    loop {
+        1;
+        //~^ ERROR statements are not allowed in this position within a `#[loop_match]`
+        state = 'blk: {
+            match State::A {
+                _ => State::B,
+            }
+        }
+    }
+}
+
+fn bad_statements_2() {
+    let mut state = State::A;
+    #[loop_match]
+    loop {
+        state = 'blk: {
+            1;
+            //~^ ERROR statements are not allowed in this position within a `#[loop_match]`
+            match State::A {
+                _ => State::B,
+            }
+        }
+    }
+}
+
+fn bad_rhs_1() {
+    let mut state = State::A;
+    #[loop_match]
+    loop {
+        state = State::B
+        //~^ ERROR this expression must be a single `match` wrapped in a labeled block
+    }
+}
+
+fn bad_rhs_2() {
+    let mut state = State::A;
+    #[loop_match]
+    loop {
+        state = 'blk: {
+            State::B
+            //~^ ERROR this expression must be a single `match` wrapped in a labeled block
+        }
+    }
+}
+
+fn bad_rhs_3() {
+    let mut state = ();
+    #[loop_match]
+    loop {
+        state = 'blk: {
+            //~^ ERROR this expression must be a single `match` wrapped in a labeled block
+        }
+    }
+}
+
+fn missing_assignment() {
+    #[loop_match]
+    loop {
+        () //~ ERROR  expected a single assignment expression
+    }
+}
+
+fn empty_loop_body() {
+    #[loop_match]
+    loop {
+        //~^ ERROR  expected a single assignment expression
+    }
+}
+
+fn break_without_value() {
+    let mut state = State::A;
+    #[loop_match]
+    'a: loop {
+        state = 'blk: {
+            match state {
+                State::A => {
+                    #[const_continue]
+                    break 'blk;
+                    //~^ ERROR mismatched types
+                }
+                _ => break 'a,
+            }
+        }
+    }
+}
+
+fn break_without_value_unit() {
+    let mut state = ();
+    #[loop_match]
+    'a: loop {
+        state = 'blk: {
+            match state {
+                () => {
+                    #[const_continue]
+                    break 'blk;
+                    //~^ ERROR a `#[const_continue]` must break to a label with a value
+                }
+            }
+        }
+    }
+}
+
+fn arm_has_guard(cond: bool) {
+    let mut state = State::A;
+    #[loop_match]
+    'a: loop {
+        state = 'blk: {
+            match state {
+                State::A => {
+                    #[const_continue]
+                    break 'blk State::B;
+                }
+                State::B if cond => break 'a,
+                //~^ ERROR match arms that are part of a `#[loop_match]` cannot have guards
+                _ => break 'a,
+            }
+        }
+    }
+}
diff --git a/tests/ui/loop-match/invalid.stderr b/tests/ui/loop-match/invalid.stderr
new file mode 100644
index 00000000000..51fdd024c6f
--- /dev/null
+++ b/tests/ui/loop-match/invalid.stderr
@@ -0,0 +1,91 @@
+error[E0308]: mismatched types
+  --> $DIR/invalid.rs:120:21
+   |
+LL |                     break 'blk;
+   |                     ^^^^^^^^^^ expected `State`, found `()`
+   |
+help: give the `break` a value of the expected type
+   |
+LL |                     break 'blk /* value */;
+   |                                +++++++++++
+
+error: invalid update of the `#[loop_match]` state
+  --> $DIR/invalid.rs:18:9
+   |
+LL |         fake = 'blk: {
+   |         ^^^^
+LL |
+LL |             match state {
+   |                   ----- the assignment must update this variable
+
+error: invalid match on `#[loop_match]` state
+  --> $DIR/invalid.rs:32:19
+   |
+LL |             match State::A {
+   |                   ^^^^^^^^
+   |
+   = note: a local variable must be the scrutinee within a `#[loop_match]`
+
+error: statements are not allowed in this position within a `#[loop_match]`
+  --> $DIR/invalid.rs:44:9
+   |
+LL |         1;
+   |         ^^
+
+error: statements are not allowed in this position within a `#[loop_match]`
+  --> $DIR/invalid.rs:59:13
+   |
+LL |             1;
+   |             ^^
+
+error: this expression must be a single `match` wrapped in a labeled block
+  --> $DIR/invalid.rs:72:17
+   |
+LL |         state = State::B
+   |                 ^^^^^^^^
+
+error: this expression must be a single `match` wrapped in a labeled block
+  --> $DIR/invalid.rs:82:13
+   |
+LL |             State::B
+   |             ^^^^^^^^
+
+error: this expression must be a single `match` wrapped in a labeled block
+  --> $DIR/invalid.rs:92:17
+   |
+LL |           state = 'blk: {
+   |  _________________^
+LL | |
+LL | |         }
+   | |_________^
+
+error: expected a single assignment expression
+  --> $DIR/invalid.rs:101:9
+   |
+LL |         ()
+   |         ^^
+
+error: expected a single assignment expression
+  --> $DIR/invalid.rs:107:10
+   |
+LL |       loop {
+   |  __________^
+LL | |
+LL | |     }
+   | |_____^
+
+error: a `#[const_continue]` must break to a label with a value
+  --> $DIR/invalid.rs:137:21
+   |
+LL |                     break 'blk;
+   |                     ^^^^^^^^^^
+
+error: match arms that are part of a `#[loop_match]` cannot have guards
+  --> $DIR/invalid.rs:155:29
+   |
+LL |                 State::B if cond => break 'a,
+   |                             ^^^^
+
+error: aborting due to 12 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/loop-match/loop-match.rs b/tests/ui/loop-match/loop-match.rs
new file mode 100644
index 00000000000..f38bc01f333
--- /dev/null
+++ b/tests/ui/loop-match/loop-match.rs
@@ -0,0 +1,45 @@
+// Test that a basic correct example of `#[loop_match]` with `#[const_continue]`
+// works correctly.
+
+//@ run-pass
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+
+enum State {
+    A,
+    B,
+    C,
+}
+
+fn main() {
+    let mut state = State::A;
+    #[loop_match]
+    'a: loop {
+        state = 'blk: {
+            match state {
+                State::A => {
+                    #[const_continue]
+                    break 'blk State::B;
+                }
+                State::B => {
+                    // Without special logic, the compiler believes this is a
+                    // reassignment to an immutable variable because of the
+                    // `loop`. So this tests that local variables work.
+                    let _a = 0;
+
+                    if true {
+                        #[const_continue]
+                        break 'blk State::C;
+                    } else {
+                        #[const_continue]
+                        break 'blk State::A;
+                    }
+                }
+                State::C => break 'a,
+            }
+        };
+    }
+
+    assert!(matches!(state, State::C))
+}
diff --git a/tests/ui/loop-match/macro.rs b/tests/ui/loop-match/macro.rs
new file mode 100644
index 00000000000..98c98b9b627
--- /dev/null
+++ b/tests/ui/loop-match/macro.rs
@@ -0,0 +1,48 @@
+// Test that macros can be defined in the labeled block. This should not trigger an error about
+// statements not being allowed in that position, and should of course work as expected.
+
+//@ run-pass
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+
+enum State {
+    A,
+    B,
+    C,
+}
+
+fn main() {
+    let mut state = State::A;
+    #[loop_match]
+    'a: loop {
+        state = 'blk: {
+            macro_rules! const_continue {
+                ($e:expr) => {
+                    #[const_continue]
+                    break 'blk $e;
+                };
+            }
+            match state {
+                State::A => {
+                    const_continue!(State::B);
+                }
+                State::B => {
+                    // Without special logic, the compiler believes this is a
+                    // reassignment to an immutable variable because of the
+                    // `loop`. So this tests that local variables work.
+                    let _a = 0;
+
+                    if true {
+                        const_continue!(State::C);
+                    } else {
+                        const_continue!(State::A);
+                    }
+                }
+                State::C => break 'a,
+            }
+        };
+    }
+
+    assert!(matches!(state, State::C))
+}
diff --git a/tests/ui/loop-match/nested.rs b/tests/ui/loop-match/nested.rs
new file mode 100644
index 00000000000..aaddfae11de
--- /dev/null
+++ b/tests/ui/loop-match/nested.rs
@@ -0,0 +1,83 @@
+// Test that a nested `#[loop_match]` works as expected, and that e.g. a
+// `#[const_continue]` of the inner `#[loop_match]` does not interact with the
+// outer `#[loop_match]`.
+
+//@ run-pass
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+
+enum State1 {
+    A,
+    B,
+    C,
+}
+
+enum State2 {
+    X,
+    Y,
+    Z,
+}
+
+fn main() {
+    assert_eq!(run(), concat!("ab", "xyz", "xyz", "c"))
+}
+
+fn run() -> String {
+    let mut accum = String::new();
+
+    let mut state1 = State1::A;
+    let mut state2 = State2::X;
+
+    let mut first = true;
+
+    #[loop_match]
+    'a: loop {
+        state1 = 'blk1: {
+            match state1 {
+                State1::A => {
+                    accum.push('a');
+                    #[const_continue]
+                    break 'blk1 State1::B;
+                }
+                State1::B => {
+                    accum.push('b');
+                    #[loop_match]
+                    loop {
+                        state2 = 'blk2: {
+                            match state2 {
+                                State2::X => {
+                                    accum.push('x');
+                                    #[const_continue]
+                                    break 'blk2 State2::Y;
+                                }
+                                State2::Y => {
+                                    accum.push('y');
+                                    #[const_continue]
+                                    break 'blk2 State2::Z;
+                                }
+                                State2::Z => {
+                                    accum.push('z');
+                                    if first {
+                                        first = false;
+                                        #[const_continue]
+                                        break 'blk2 State2::X;
+                                    } else {
+                                        #[const_continue]
+                                        break 'blk1 State1::C;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+                State1::C => {
+                    accum.push('c');
+                    break 'a;
+                }
+            }
+        }
+    }
+
+    accum
+}
diff --git a/tests/ui/loop-match/or-patterns.rs b/tests/ui/loop-match/or-patterns.rs
new file mode 100644
index 00000000000..775243b9c62
--- /dev/null
+++ b/tests/ui/loop-match/or-patterns.rs
@@ -0,0 +1,54 @@
+// Test that `#[loop_match]` supports or-patterns.
+
+//@ run-pass
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+enum State {
+    A,
+    B,
+    C,
+    D,
+}
+
+fn main() {
+    let mut states = vec![];
+    let mut first = true;
+    let mut state = State::A;
+    #[loop_match]
+    'a: loop {
+        state = 'blk: {
+            match state {
+                State::A => {
+                    states.push(state);
+                    if first {
+                        #[const_continue]
+                        break 'blk State::B;
+                    } else {
+                        #[const_continue]
+                        break 'blk State::D;
+                    }
+                }
+                State::B | State::D => {
+                    states.push(state);
+                    if first {
+                        first = false;
+                        #[const_continue]
+                        break 'blk State::A;
+                    } else {
+                        #[const_continue]
+                        break 'blk State::C;
+                    }
+                }
+                State::C => {
+                    states.push(state);
+                    break 'a;
+                }
+            }
+        }
+    }
+
+    assert_eq!(states, [State::A, State::B, State::A, State::D, State::C]);
+}
diff --git a/tests/ui/loop-match/unsupported-type.rs b/tests/ui/loop-match/unsupported-type.rs
new file mode 100644
index 00000000000..9100a1103ab
--- /dev/null
+++ b/tests/ui/loop-match/unsupported-type.rs
@@ -0,0 +1,27 @@
+// Test that the right error is emitted when the `#[loop_match]` state is an
+// unsupported type.
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+#![crate_type = "lib"]
+
+fn unsupported_type() {
+    let mut state = Some(false);
+    #[loop_match]
+    'a: loop {
+        state = 'blk: {
+            //~^ ERROR this `#[loop_match]` state value has type `Option<bool>`, which is not supported
+            match state {
+                Some(false) => {
+                    #[const_continue]
+                    break 'blk Some(true);
+                }
+                Some(true) => {
+                    #[const_continue]
+                    break 'blk None;
+                }
+                None => break 'a,
+            }
+        }
+    }
+}
diff --git a/tests/ui/loop-match/unsupported-type.stderr b/tests/ui/loop-match/unsupported-type.stderr
new file mode 100644
index 00000000000..ede3d86796f
--- /dev/null
+++ b/tests/ui/loop-match/unsupported-type.stderr
@@ -0,0 +1,10 @@
+error: this `#[loop_match]` state value has type `Option<bool>`, which is not supported
+  --> $DIR/unsupported-type.rs:12:9
+   |
+LL |         state = 'blk: {
+   |         ^^^^^
+   |
+   = note: only integers, floats, bool, char, and enums without fields are supported
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/loop-match/unwind.rs b/tests/ui/loop-match/unwind.rs
new file mode 100644
index 00000000000..39e2e4537b1
--- /dev/null
+++ b/tests/ui/loop-match/unwind.rs
@@ -0,0 +1,53 @@
+// Test that `#[const_continue]` correctly emits cleanup paths for drops.
+//
+// Here, we first drop `DropBomb`, causing an unwind. Then `ExitOnDrop` should
+// be dropped, causing us to exit with `0` rather than with some non-zero value
+// due to the panic, which is what causes the test to pass.
+
+//@ run-pass
+//@ needs-unwind
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+
+enum State {
+    A,
+    B,
+}
+
+struct ExitOnDrop;
+
+impl Drop for ExitOnDrop {
+    fn drop(&mut self) {
+        std::process::exit(0);
+    }
+}
+
+struct DropBomb;
+
+impl Drop for DropBomb {
+    fn drop(&mut self) {
+        panic!("this must unwind");
+    }
+}
+
+fn main() {
+    let mut state = State::A;
+    #[loop_match]
+    'a: loop {
+        state = 'blk: {
+            match state {
+                State::A => {
+                    let _exit = ExitOnDrop;
+                    let _bomb = DropBomb;
+
+                    #[const_continue]
+                    break 'blk State::B;
+                }
+                State::B => break 'a,
+            }
+        };
+    }
+
+    unreachable!();
+}
diff --git a/tests/ui/loop-match/valid-patterns.rs b/tests/ui/loop-match/valid-patterns.rs
new file mode 100644
index 00000000000..4e0e4798a0b
--- /dev/null
+++ b/tests/ui/loop-match/valid-patterns.rs
@@ -0,0 +1,117 @@
+// Test that signed and unsigned integer patterns work with `#[loop_match]`.
+
+//@ run-pass
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+
+fn main() {
+    assert_eq!(integer(0), 2);
+    assert_eq!(integer(-1), 2);
+    assert_eq!(integer(2), 2);
+
+    assert_eq!(boolean(true), false);
+    assert_eq!(boolean(false), false);
+
+    assert_eq!(character('a'), 'b');
+    assert_eq!(character('b'), 'b');
+    assert_eq!(character('c'), 'd');
+    assert_eq!(character('d'), 'd');
+
+    assert_eq!(test_f32(1.0), core::f32::consts::PI);
+    assert_eq!(test_f32(2.5), core::f32::consts::PI);
+    assert_eq!(test_f32(4.0), 4.0);
+
+    assert_eq!(test_f64(1.0), core::f64::consts::PI);
+    assert_eq!(test_f64(2.5), core::f64::consts::PI);
+    assert_eq!(test_f64(4.0), 4.0);
+}
+
+fn integer(mut state: i32) -> i32 {
+    #[loop_match]
+    'a: loop {
+        state = 'blk: {
+            match state {
+                -1 => {
+                    #[const_continue]
+                    break 'blk 2;
+                }
+                0 => {
+                    #[const_continue]
+                    break 'blk -1;
+                }
+                2 => break 'a,
+                _ => unreachable!("weird value {:?}", state),
+            }
+        }
+    }
+
+    state
+}
+
+fn boolean(mut state: bool) -> bool {
+    #[loop_match]
+    loop {
+        state = 'blk: {
+            match state {
+                true => {
+                    #[const_continue]
+                    break 'blk false;
+                }
+                false => return state,
+            }
+        }
+    }
+}
+
+fn character(mut state: char) -> char {
+    #[loop_match]
+    loop {
+        state = 'blk: {
+            match state {
+                'a' => {
+                    #[const_continue]
+                    break 'blk 'b';
+                }
+                'b' => return state,
+                'c' => {
+                    #[const_continue]
+                    break 'blk 'd';
+                }
+                _ => return state,
+            }
+        }
+    }
+}
+
+fn test_f32(mut state: f32) -> f32 {
+    #[loop_match]
+    loop {
+        state = 'blk: {
+            match state {
+                1.0 => {
+                    #[const_continue]
+                    break 'blk 2.5;
+                }
+                2.0..3.0 => return core::f32::consts::PI,
+                _ => return state,
+            }
+        }
+    }
+}
+
+fn test_f64(mut state: f64) -> f64 {
+    #[loop_match]
+    loop {
+        state = 'blk: {
+            match state {
+                1.0 => {
+                    #[const_continue]
+                    break 'blk 2.5;
+                }
+                2.0..3.0 => return core::f64::consts::PI,
+                _ => return state,
+            }
+        }
+    }
+}
diff --git a/tests/ui/macros/concat-bytes-error.rs b/tests/ui/macros/concat-bytes-error.rs
index db5d3cab0bd..8130fc54d8d 100644
--- a/tests/ui/macros/concat-bytes-error.rs
+++ b/tests/ui/macros/concat-bytes-error.rs
@@ -1,20 +1,44 @@
+//@ edition: 2021
+// 2021 edition for C string literals
+
 #![feature(concat_bytes)]
 
 fn main() {
+    // Identifiers
     concat_bytes!(pie); //~ ERROR expected a byte literal
     concat_bytes!(pie, pie); //~ ERROR expected a byte literal
+
+    // String literals
     concat_bytes!("tnrsi", "tnri"); //~ ERROR cannot concatenate string literals
+    //~^ SUGGESTION b"tnrsi"
+    concat_bytes!(r"tnrsi", r"tnri"); //~ ERROR cannot concatenate string literals
+    //~^ SUGGESTION br"tnrsi"
+    concat_bytes!(r#"tnrsi"#, r###"tnri"###); //~ ERROR cannot concatenate string literals
+    //~^ SUGGESTION br#"tnrsi"#
+    concat_bytes!(c"tnrsi", c"tnri"); //~ ERROR cannot concatenate C string literals
+    //~^ SUGGESTION b"tnrsi\0"
+    concat_bytes!(cr"tnrsi", cr"tnri"); //~ ERROR cannot concatenate C string literals
+    concat_bytes!(cr#"tnrsi"#, cr###"tnri"###); //~ ERROR cannot concatenate C string literals
+
+    // Other literals
     concat_bytes!(2.8); //~ ERROR cannot concatenate float literals
     concat_bytes!(300); //~ ERROR cannot concatenate numeric literals
+    //~^ SUGGESTION [300]
     concat_bytes!('a'); //~ ERROR cannot concatenate character literals
+    //~^ SUGGESTION b'a'
     concat_bytes!(true, false); //~ ERROR cannot concatenate boolean literals
     concat_bytes!(42, b"va", b'l'); //~ ERROR cannot concatenate numeric literals
+    //~^ SUGGESTION [42]
     concat_bytes!(42, b"va", b'l', [1, 2]); //~ ERROR cannot concatenate numeric literals
+    //~^ SUGGESTION [42]
+
+    // Nested items
     concat_bytes!([
         "hi", //~ ERROR cannot concatenate string literals
     ]);
     concat_bytes!([
         'a', //~ ERROR cannot concatenate character literals
+        //~^ SUGGESTION b'a'
     ]);
     concat_bytes!([
         true, //~ ERROR cannot concatenate boolean literals
@@ -38,6 +62,7 @@ fn main() {
         [5, 6, 7], //~ ERROR cannot concatenate doubly nested array
     ]);
     concat_bytes!(5u16); //~ ERROR cannot concatenate numeric literals
+    //~^ SUGGESTION [5u16]
     concat_bytes!([5u16]); //~ ERROR numeric literal is not a `u8`
     concat_bytes!([3; ()]); //~ ERROR repeat count is not a positive number
     concat_bytes!([3; -2]); //~ ERROR repeat count is not a positive number
diff --git a/tests/ui/macros/concat-bytes-error.stderr b/tests/ui/macros/concat-bytes-error.stderr
index 3f2c64922e3..447d7a663fd 100644
--- a/tests/ui/macros/concat-bytes-error.stderr
+++ b/tests/ui/macros/concat-bytes-error.stderr
@@ -1,5 +1,5 @@
 error: expected a byte literal
-  --> $DIR/concat-bytes-error.rs:4:19
+  --> $DIR/concat-bytes-error.rs:8:19
    |
 LL |     concat_bytes!(pie);
    |                   ^^^
@@ -7,7 +7,7 @@ LL |     concat_bytes!(pie);
    = note: only byte literals (like `b"foo"`, `b's'` and `[3, 4, 5]`) can be passed to `concat_bytes!()`
 
 error: expected a byte literal
-  --> $DIR/concat-bytes-error.rs:5:19
+  --> $DIR/concat-bytes-error.rs:9:19
    |
 LL |     concat_bytes!(pie, pie);
    |                   ^^^  ^^^
@@ -15,85 +15,126 @@ LL |     concat_bytes!(pie, pie);
    = note: only byte literals (like `b"foo"`, `b's'` and `[3, 4, 5]`) can be passed to `concat_bytes!()`
 
 error: cannot concatenate string literals
-  --> $DIR/concat-bytes-error.rs:6:19
+  --> $DIR/concat-bytes-error.rs:12:19
    |
 LL |     concat_bytes!("tnrsi", "tnri");
    |                   ^^^^^^^ help: try using a byte string: `b"tnrsi"`
 
+error: cannot concatenate string literals
+  --> $DIR/concat-bytes-error.rs:14:19
+   |
+LL |     concat_bytes!(r"tnrsi", r"tnri");
+   |                   ^^^^^^^^ help: try using a byte string: `br"tnrsi"`
+
+error: cannot concatenate string literals
+  --> $DIR/concat-bytes-error.rs:16:19
+   |
+LL |     concat_bytes!(r#"tnrsi"#, r###"tnri"###);
+   |                   ^^^^^^^^^^ help: try using a byte string: `br#"tnrsi"#`
+
+error: cannot concatenate C string literals
+  --> $DIR/concat-bytes-error.rs:18:19
+   |
+LL |     concat_bytes!(c"tnrsi", c"tnri");
+   |                   ^^^^^^^^ help: try using a null-terminated byte string: `b"tnrsi\0"`
+   |
+note: concatenating C strings is ambiguous about including the '\0'
+  --> $DIR/concat-bytes-error.rs:18:19
+   |
+LL |     concat_bytes!(c"tnrsi", c"tnri");
+   |                   ^^^^^^^^
+   = note: concatenating C strings is ambiguous about including the '\0'
+
+error: cannot concatenate C string literals
+  --> $DIR/concat-bytes-error.rs:20:19
+   |
+LL |     concat_bytes!(cr"tnrsi", cr"tnri");
+   |                   ^^^^^^^^^
+   |
+   = note: concatenating C strings is ambiguous about including the '\0'
+
+error: cannot concatenate C string literals
+  --> $DIR/concat-bytes-error.rs:21:19
+   |
+LL |     concat_bytes!(cr#"tnrsi"#, cr###"tnri"###);
+   |                   ^^^^^^^^^^^
+   |
+   = note: concatenating C strings is ambiguous about including the '\0'
+
 error: cannot concatenate float literals
-  --> $DIR/concat-bytes-error.rs:7:19
+  --> $DIR/concat-bytes-error.rs:24:19
    |
 LL |     concat_bytes!(2.8);
    |                   ^^^
 
 error: cannot concatenate numeric literals
-  --> $DIR/concat-bytes-error.rs:8:19
+  --> $DIR/concat-bytes-error.rs:25:19
    |
 LL |     concat_bytes!(300);
    |                   ^^^ help: try wrapping the number in an array: `[300]`
 
 error: cannot concatenate character literals
-  --> $DIR/concat-bytes-error.rs:9:19
+  --> $DIR/concat-bytes-error.rs:27:19
    |
 LL |     concat_bytes!('a');
    |                   ^^^ help: try using a byte character: `b'a'`
 
 error: cannot concatenate boolean literals
-  --> $DIR/concat-bytes-error.rs:10:19
+  --> $DIR/concat-bytes-error.rs:29:19
    |
 LL |     concat_bytes!(true, false);
    |                   ^^^^
 
 error: cannot concatenate numeric literals
-  --> $DIR/concat-bytes-error.rs:11:19
+  --> $DIR/concat-bytes-error.rs:30:19
    |
 LL |     concat_bytes!(42, b"va", b'l');
    |                   ^^ help: try wrapping the number in an array: `[42]`
 
 error: cannot concatenate numeric literals
-  --> $DIR/concat-bytes-error.rs:12:19
+  --> $DIR/concat-bytes-error.rs:32:19
    |
 LL |     concat_bytes!(42, b"va", b'l', [1, 2]);
    |                   ^^ help: try wrapping the number in an array: `[42]`
 
 error: cannot concatenate string literals
-  --> $DIR/concat-bytes-error.rs:14:9
+  --> $DIR/concat-bytes-error.rs:37:9
    |
 LL |         "hi",
    |         ^^^^
 
 error: cannot concatenate character literals
-  --> $DIR/concat-bytes-error.rs:17:9
+  --> $DIR/concat-bytes-error.rs:40:9
    |
 LL |         'a',
    |         ^^^ help: try using a byte character: `b'a'`
 
 error: cannot concatenate boolean literals
-  --> $DIR/concat-bytes-error.rs:20:9
+  --> $DIR/concat-bytes-error.rs:44:9
    |
 LL |         true,
    |         ^^^^
 
 error: cannot concatenate boolean literals
-  --> $DIR/concat-bytes-error.rs:23:9
+  --> $DIR/concat-bytes-error.rs:47:9
    |
 LL |         false,
    |         ^^^^^
 
 error: cannot concatenate float literals
-  --> $DIR/concat-bytes-error.rs:26:9
+  --> $DIR/concat-bytes-error.rs:50:9
    |
 LL |         2.6,
    |         ^^^
 
 error: numeric literal is out of bounds
-  --> $DIR/concat-bytes-error.rs:29:9
+  --> $DIR/concat-bytes-error.rs:53:9
    |
 LL |         265,
    |         ^^^
 
 error: expected a byte literal
-  --> $DIR/concat-bytes-error.rs:32:9
+  --> $DIR/concat-bytes-error.rs:56:9
    |
 LL |         -33,
    |         ^^^
@@ -101,7 +142,7 @@ LL |         -33,
    = note: only byte literals (like `b"foo"`, `b's'` and `[3, 4, 5]`) can be passed to `concat_bytes!()`
 
 error: cannot concatenate doubly nested array
-  --> $DIR/concat-bytes-error.rs:35:9
+  --> $DIR/concat-bytes-error.rs:59:9
    |
 LL |         b"hi!",
    |         ^^^^^^
@@ -110,43 +151,43 @@ LL |         b"hi!",
    = help: try flattening the array
 
 error: cannot concatenate doubly nested array
-  --> $DIR/concat-bytes-error.rs:38:9
+  --> $DIR/concat-bytes-error.rs:62:9
    |
 LL |         [5, 6, 7],
    |         ^^^^^^^^^
 
 error: cannot concatenate numeric literals
-  --> $DIR/concat-bytes-error.rs:40:19
+  --> $DIR/concat-bytes-error.rs:64:19
    |
 LL |     concat_bytes!(5u16);
    |                   ^^^^ help: try wrapping the number in an array: `[5u16]`
 
 error: numeric literal is not a `u8`
-  --> $DIR/concat-bytes-error.rs:41:20
+  --> $DIR/concat-bytes-error.rs:66:20
    |
 LL |     concat_bytes!([5u16]);
    |                    ^^^^
 
 error: repeat count is not a positive number
-  --> $DIR/concat-bytes-error.rs:42:23
+  --> $DIR/concat-bytes-error.rs:67:23
    |
 LL |     concat_bytes!([3; ()]);
    |                       ^^
 
 error: repeat count is not a positive number
-  --> $DIR/concat-bytes-error.rs:43:23
+  --> $DIR/concat-bytes-error.rs:68:23
    |
 LL |     concat_bytes!([3; -2]);
    |                       ^^
 
 error: repeat count is not a positive number
-  --> $DIR/concat-bytes-error.rs:44:25
+  --> $DIR/concat-bytes-error.rs:69:25
    |
 LL |     concat_bytes!([pie; -2]);
    |                         ^^
 
 error: expected a byte literal
-  --> $DIR/concat-bytes-error.rs:45:20
+  --> $DIR/concat-bytes-error.rs:70:20
    |
 LL |     concat_bytes!([pie; 2]);
    |                    ^^^
@@ -154,28 +195,28 @@ LL |     concat_bytes!([pie; 2]);
    = note: only byte literals (like `b"foo"`, `b's'` and `[3, 4, 5]`) can be passed to `concat_bytes!()`
 
 error: cannot concatenate float literals
-  --> $DIR/concat-bytes-error.rs:46:20
+  --> $DIR/concat-bytes-error.rs:71:20
    |
 LL |     concat_bytes!([2.2; 0]);
    |                    ^^^
 
 error: repeat count is not a positive number
-  --> $DIR/concat-bytes-error.rs:47:25
+  --> $DIR/concat-bytes-error.rs:72:25
    |
 LL |     concat_bytes!([5.5; ()]);
    |                         ^^
 
 error: cannot concatenate doubly nested array
-  --> $DIR/concat-bytes-error.rs:48:20
+  --> $DIR/concat-bytes-error.rs:73:20
    |
 LL |     concat_bytes!([[1, 2, 3]; 3]);
    |                    ^^^^^^^^^
 
 error: cannot concatenate doubly nested array
-  --> $DIR/concat-bytes-error.rs:49:20
+  --> $DIR/concat-bytes-error.rs:74:20
    |
 LL |     concat_bytes!([[42; 2]; 3]);
    |                    ^^^^^^^
 
-error: aborting due to 28 previous errors
+error: aborting due to 33 previous errors
 
diff --git a/tests/ui/macros/issue-118048.rs b/tests/ui/macros/issue-118048.rs
index 15a834fa2df..3b3ab3b4fc9 100644
--- a/tests/ui/macros/issue-118048.rs
+++ b/tests/ui/macros/issue-118048.rs
@@ -6,5 +6,6 @@ macro_rules! foo {
 
 foo!(_);
 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
+//~| ERROR the placeholder `_` is not allowed within types on item signatures for functions
 
 fn main() {}
diff --git a/tests/ui/macros/issue-118048.stderr b/tests/ui/macros/issue-118048.stderr
index 4dc5ef71fec..f5468b341bc 100644
--- a/tests/ui/macros/issue-118048.stderr
+++ b/tests/ui/macros/issue-118048.stderr
@@ -2,20 +2,16 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/issue-118048.rs:7:6
    |
 LL | foo!(_);
-   |      ^
-   |      |
-   |      not allowed in type signatures
-   |      not allowed in type signatures
-   |
-help: use type parameters instead
+   |      ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/issue-118048.rs:7:6
    |
-LL ~         fn foo<T>(_: $ty, _: $ty) {}
-LL |     }
-LL | }
-LL |
-LL ~ foo!(T);
+LL | foo!(_);
+   |      ^ not allowed in type signatures
    |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 1 previous error
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/macros/macro-comma-support-rpass.rs b/tests/ui/macros/macro-comma-support-rpass.rs
index 5a4bac70b1c..ef6c1ff6fd0 100644
--- a/tests/ui/macros/macro-comma-support-rpass.rs
+++ b/tests/ui/macros/macro-comma-support-rpass.rs
@@ -15,7 +15,6 @@
 #![cfg_attr(core, no_std)]
 
 #![allow(deprecated)] // for deprecated `try!()` macro
-#![feature(concat_idents)]
 
 #[cfg(std)] use std::fmt;
 #[cfg(core)] use core::fmt;
@@ -80,17 +79,6 @@ fn concat() {
 }
 
 #[test]
-fn concat_idents() {
-    fn foo() {}
-    fn foobar() {}
-
-    concat_idents!(foo)();
-    concat_idents!(foo,)();
-    concat_idents!(foo, bar)();
-    concat_idents!(foo, bar,)();
-}
-
-#[test]
 fn debug_assert() {
     debug_assert!(true);
     debug_assert!(true, );
diff --git a/tests/ui/macros/macro-metavar-expr-concat/empty-input.rs b/tests/ui/macros/macro-metavar-expr-concat/empty-input.rs
new file mode 100644
index 00000000000..caad63c5f6b
--- /dev/null
+++ b/tests/ui/macros/macro-metavar-expr-concat/empty-input.rs
@@ -0,0 +1,12 @@
+// Issue 50403
+// Ensure that `concat` can't create empty identifiers
+// FIXME(macro_metavar_expr_concat): this error message could be improved
+
+macro_rules! empty {
+    () => { ${concat()} } //~ ERROR expected identifier or string literal
+                          //~^ERROR expected expression
+}
+
+fn main() {
+    let x = empty!();
+}
diff --git a/tests/ui/macros/macro-metavar-expr-concat/empty-input.stderr b/tests/ui/macros/macro-metavar-expr-concat/empty-input.stderr
new file mode 100644
index 00000000000..e95032dd247
--- /dev/null
+++ b/tests/ui/macros/macro-metavar-expr-concat/empty-input.stderr
@@ -0,0 +1,19 @@
+error: expected identifier or string literal
+  --> $DIR/empty-input.rs:6:14
+   |
+LL |     () => { ${concat()} }
+   |              ^^^^^^^^^^
+
+error: expected expression, found `$`
+  --> $DIR/empty-input.rs:6:13
+   |
+LL |     () => { ${concat()} }
+   |             ^ expected expression
+...
+LL |     let x = empty!();
+   |             -------- in this macro invocation
+   |
+   = note: this error originates in the macro `empty` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/macros/macro-reexport-removed.rs b/tests/ui/macros/macro-reexport-removed.rs
index c1267f14cd8..4a054686d77 100644
--- a/tests/ui/macros/macro-reexport-removed.rs
+++ b/tests/ui/macros/macro-reexport-removed.rs
@@ -1,5 +1,4 @@
 //@ aux-build:two_macros.rs
-//@ normalize-stderr: "you are using [0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?( \([^)]*\))?" -> "you are using $$RUSTC_VERSION"
 
 #![feature(macro_reexport)] //~ ERROR feature has been removed
 
diff --git a/tests/ui/macros/macro-reexport-removed.stderr b/tests/ui/macros/macro-reexport-removed.stderr
index d4940eeb775..8130fe0c4bd 100644
--- a/tests/ui/macros/macro-reexport-removed.stderr
+++ b/tests/ui/macros/macro-reexport-removed.stderr
@@ -1,14 +1,14 @@
 error[E0557]: feature has been removed
-  --> $DIR/macro-reexport-removed.rs:4:12
+  --> $DIR/macro-reexport-removed.rs:3:12
    |
 LL | #![feature(macro_reexport)]
    |            ^^^^^^^^^^^^^^ feature has been removed
    |
-   = note: removed in 1.0.0 (you are using $RUSTC_VERSION); see <https://github.com/rust-lang/rust/pull/49982> for more information
+   = note: removed in 1.0.0; see <https://github.com/rust-lang/rust/pull/49982> for more information
    = note: subsumed by `pub use`
 
 error: cannot find attribute `macro_reexport` in this scope
-  --> $DIR/macro-reexport-removed.rs:6:3
+  --> $DIR/macro-reexport-removed.rs:5:3
    |
 LL | #[macro_reexport(macro_one)]
    |   ^^^^^^^^^^^^^^ help: a built-in attribute with a similar name exists: `macro_export`
diff --git a/tests/ui/macros/macro-span-issue-116502.rs b/tests/ui/macros/macro-span-issue-116502.rs
index 4c254289ee6..b5ae383efca 100644
--- a/tests/ui/macros/macro-span-issue-116502.rs
+++ b/tests/ui/macros/macro-span-issue-116502.rs
@@ -5,6 +5,8 @@ fn bug() {
     macro_rules! m {
         () => {
             _ //~ ERROR the placeholder `_` is not allowed within types on item signatures for structs
+            //~^ ERROR the placeholder `_` is not allowed within types on item signatures for structs
+            //~| ERROR the placeholder `_` is not allowed within types on item signatures for structs
         };
     }
     struct S<T = m!()>(m!(), T)
diff --git a/tests/ui/macros/macro-span-issue-116502.stderr b/tests/ui/macros/macro-span-issue-116502.stderr
index 2a581f7031b..68f8874f5d6 100644
--- a/tests/ui/macros/macro-span-issue-116502.stderr
+++ b/tests/ui/macros/macro-span-issue-116502.stderr
@@ -2,22 +2,35 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/macro-span-issue-116502.rs:7:13
    |
 LL |             _
-   |             ^
-   |             |
-   |             not allowed in type signatures
-   |             not allowed in type signatures
-   |             not allowed in type signatures
+   |             ^ not allowed in type signatures
 ...
-LL |     struct S<T = m!()>(m!(), T)
-   |                  ----  ---- in this macro invocation
-   |                  |
-   |                  in this macro invocation
-LL |     where
 LL |         T: Trait<m!()>;
    |                  ---- in this macro invocation
    |
    = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 1 previous error
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/macro-span-issue-116502.rs:7:13
+   |
+LL |             _
+   |             ^ not allowed in type signatures
+...
+LL |     struct S<T = m!()>(m!(), T)
+   |                        ---- in this macro invocation
+   |
+   = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/macro-span-issue-116502.rs:7:13
+   |
+LL |             _
+   |             ^ not allowed in type signatures
+...
+LL |     struct S<T = m!()>(m!(), T)
+   |                  ---- in this macro invocation
+   |
+   = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/macros/macros-nonfatal-errors.rs b/tests/ui/macros/macros-nonfatal-errors.rs
index 091d64ea5d9..1349d741510 100644
--- a/tests/ui/macros/macros-nonfatal-errors.rs
+++ b/tests/ui/macros/macros-nonfatal-errors.rs
@@ -3,9 +3,8 @@
 // test that errors in a (selection) of macros don't kill compilation
 // immediately, so that we get more errors listed at a time.
 
-#![feature(trace_macros, concat_idents)]
+#![feature(trace_macros)]
 #![feature(stmt_expr_attributes)]
-#![expect(deprecated)] // concat_idents is deprecated
 
 use std::arch::asm;
 
@@ -105,8 +104,6 @@ fn main() {
     asm!(invalid); //~ ERROR
     llvm_asm!(invalid); //~ ERROR
 
-    concat_idents!("not", "idents"); //~ ERROR
-
     option_env!(invalid); //~ ERROR
     env!(invalid); //~ ERROR
     env!(foo, abr, baz); //~ ERROR
diff --git a/tests/ui/macros/macros-nonfatal-errors.stderr b/tests/ui/macros/macros-nonfatal-errors.stderr
index 2f990cb24e2..bc34bd1c8ec 100644
--- a/tests/ui/macros/macros-nonfatal-errors.stderr
+++ b/tests/ui/macros/macros-nonfatal-errors.stderr
@@ -1,5 +1,5 @@
 error: the `#[default]` attribute may only be used on unit enum variants
-  --> $DIR/macros-nonfatal-errors.rs:14:5
+  --> $DIR/macros-nonfatal-errors.rs:13:5
    |
 LL |     #[default]
    |     ^^^^^^^^^^
@@ -7,7 +7,7 @@ LL |     #[default]
    = help: consider a manual implementation of `Default`
 
 error: the `#[default]` attribute may only be used on unit enum variants
-  --> $DIR/macros-nonfatal-errors.rs:19:36
+  --> $DIR/macros-nonfatal-errors.rs:18:36
    |
 LL | struct DefaultInnerAttrTupleStruct(#[default] ());
    |                                    ^^^^^^^^^^
@@ -15,7 +15,7 @@ LL | struct DefaultInnerAttrTupleStruct(#[default] ());
    = help: consider a manual implementation of `Default`
 
 error: the `#[default]` attribute may only be used on unit enum variants
-  --> $DIR/macros-nonfatal-errors.rs:23:1
+  --> $DIR/macros-nonfatal-errors.rs:22:1
    |
 LL | #[default]
    | ^^^^^^^^^^
@@ -23,7 +23,7 @@ LL | #[default]
    = help: consider a manual implementation of `Default`
 
 error: the `#[default]` attribute may only be used on unit enum variants
-  --> $DIR/macros-nonfatal-errors.rs:27:1
+  --> $DIR/macros-nonfatal-errors.rs:26:1
    |
 LL | #[default]
    | ^^^^^^^^^^
@@ -31,7 +31,7 @@ LL | #[default]
    = help: consider a manual implementation of `Default`
 
 error: the `#[default]` attribute may only be used on unit enum variants
-  --> $DIR/macros-nonfatal-errors.rs:37:11
+  --> $DIR/macros-nonfatal-errors.rs:36:11
    |
 LL |     Foo = #[default] 0,
    |           ^^^^^^^^^^
@@ -39,7 +39,7 @@ LL |     Foo = #[default] 0,
    = help: consider a manual implementation of `Default`
 
 error: the `#[default]` attribute may only be used on unit enum variants
-  --> $DIR/macros-nonfatal-errors.rs:38:14
+  --> $DIR/macros-nonfatal-errors.rs:37:14
    |
 LL |     Bar([u8; #[default] 1]),
    |              ^^^^^^^^^^
@@ -47,7 +47,7 @@ LL |     Bar([u8; #[default] 1]),
    = help: consider a manual implementation of `Default`
 
 error[E0665]: `#[derive(Default)]` on enum with no `#[default]`
-  --> $DIR/macros-nonfatal-errors.rs:43:10
+  --> $DIR/macros-nonfatal-errors.rs:42:10
    |
 LL |   #[derive(Default)]
    |            ^^^^^^^
@@ -67,7 +67,7 @@ LL |     #[default] Bar,
    |     ++++++++++
 
 error[E0665]: `#[derive(Default)]` on enum with no `#[default]`
-  --> $DIR/macros-nonfatal-errors.rs:49:10
+  --> $DIR/macros-nonfatal-errors.rs:48:10
    |
 LL |   #[derive(Default)]
    |            ^^^^^^^
@@ -78,7 +78,7 @@ LL | | }
    | |_- this enum needs a unit variant marked with `#[default]`
 
 error: multiple declared defaults
-  --> $DIR/macros-nonfatal-errors.rs:55:10
+  --> $DIR/macros-nonfatal-errors.rs:54:10
    |
 LL | #[derive(Default)]
    |          ^^^^^^^
@@ -95,7 +95,7 @@ LL |     Baz,
    = note: only one variant can be default
 
 error: `#[default]` attribute does not accept a value
-  --> $DIR/macros-nonfatal-errors.rs:67:5
+  --> $DIR/macros-nonfatal-errors.rs:66:5
    |
 LL |     #[default = 1]
    |     ^^^^^^^^^^^^^^
@@ -103,7 +103,7 @@ LL |     #[default = 1]
    = help: try using `#[default]`
 
 error: multiple `#[default]` attributes
-  --> $DIR/macros-nonfatal-errors.rs:75:5
+  --> $DIR/macros-nonfatal-errors.rs:74:5
    |
 LL |     #[default]
    |     ---------- `#[default]` used here
@@ -114,13 +114,13 @@ LL |     Foo,
    |
    = note: only one `#[default]` attribute is needed
 help: try removing this
-  --> $DIR/macros-nonfatal-errors.rs:74:5
+  --> $DIR/macros-nonfatal-errors.rs:73:5
    |
 LL |     #[default]
    |     ^^^^^^^^^^
 
 error: multiple `#[default]` attributes
-  --> $DIR/macros-nonfatal-errors.rs:85:5
+  --> $DIR/macros-nonfatal-errors.rs:84:5
    |
 LL |     #[default]
    |     ---------- `#[default]` used here
@@ -132,7 +132,7 @@ LL |     Foo,
    |
    = note: only one `#[default]` attribute is needed
 help: try removing these
-  --> $DIR/macros-nonfatal-errors.rs:82:5
+  --> $DIR/macros-nonfatal-errors.rs:81:5
    |
 LL |     #[default]
    |     ^^^^^^^^^^
@@ -142,7 +142,7 @@ LL |     #[default]
    |     ^^^^^^^^^^
 
 error: the `#[default]` attribute may only be used on unit enum variants
-  --> $DIR/macros-nonfatal-errors.rs:92:5
+  --> $DIR/macros-nonfatal-errors.rs:91:5
    |
 LL |     Foo {},
    |     ^^^
@@ -150,7 +150,7 @@ LL |     Foo {},
    = help: consider a manual implementation of `Default`
 
 error: default variant must be exhaustive
-  --> $DIR/macros-nonfatal-errors.rs:100:5
+  --> $DIR/macros-nonfatal-errors.rs:99:5
    |
 LL |     #[non_exhaustive]
    |     ----------------- declared `#[non_exhaustive]` here
@@ -160,37 +160,31 @@ LL |     Foo,
    = help: consider a manual implementation of `Default`
 
 error: asm template must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:105:10
+  --> $DIR/macros-nonfatal-errors.rs:104:10
    |
 LL |     asm!(invalid);
    |          ^^^^^^^
 
-error: `concat_idents!()` requires ident args
-  --> $DIR/macros-nonfatal-errors.rs:108:5
-   |
-LL |     concat_idents!("not", "idents");
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
 error: argument must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:110:17
+  --> $DIR/macros-nonfatal-errors.rs:107:17
    |
 LL |     option_env!(invalid);
    |                 ^^^^^^^
 
 error: expected string literal
-  --> $DIR/macros-nonfatal-errors.rs:111:10
+  --> $DIR/macros-nonfatal-errors.rs:108:10
    |
 LL |     env!(invalid);
    |          ^^^^^^^
 
 error: `env!()` takes 1 or 2 arguments
-  --> $DIR/macros-nonfatal-errors.rs:112:5
+  --> $DIR/macros-nonfatal-errors.rs:109:5
    |
 LL |     env!(foo, abr, baz);
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: environment variable `RUST_HOPEFULLY_THIS_DOESNT_EXIST` not defined at compile time
-  --> $DIR/macros-nonfatal-errors.rs:113:5
+  --> $DIR/macros-nonfatal-errors.rs:110:5
    |
 LL |     env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -198,7 +192,7 @@ LL |     env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST");
    = help: use `std::env::var("RUST_HOPEFULLY_THIS_DOESNT_EXIST")` to read the variable at run time
 
 error: format argument must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:115:13
+  --> $DIR/macros-nonfatal-errors.rs:112:13
    |
 LL |     format!(invalid);
    |             ^^^^^^^
@@ -209,43 +203,43 @@ LL |     format!("{}", invalid);
    |             +++++
 
 error: argument must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:117:14
+  --> $DIR/macros-nonfatal-errors.rs:114:14
    |
 LL |     include!(invalid);
    |              ^^^^^^^
 
 error: argument must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:119:18
+  --> $DIR/macros-nonfatal-errors.rs:116:18
    |
 LL |     include_str!(invalid);
    |                  ^^^^^^^
 
 error: couldn't read `$DIR/i'd be quite surprised if a file with this name existed`: $FILE_NOT_FOUND_MSG
-  --> $DIR/macros-nonfatal-errors.rs:120:5
+  --> $DIR/macros-nonfatal-errors.rs:117:5
    |
 LL |     include_str!("i'd be quite surprised if a file with this name existed");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: argument must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:121:20
+  --> $DIR/macros-nonfatal-errors.rs:118:20
    |
 LL |     include_bytes!(invalid);
    |                    ^^^^^^^
 
 error: couldn't read `$DIR/i'd be quite surprised if a file with this name existed`: $FILE_NOT_FOUND_MSG
-  --> $DIR/macros-nonfatal-errors.rs:122:5
+  --> $DIR/macros-nonfatal-errors.rs:119:5
    |
 LL |     include_bytes!("i'd be quite surprised if a file with this name existed");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: trace_macros! accepts only `true` or `false`
-  --> $DIR/macros-nonfatal-errors.rs:124:5
+  --> $DIR/macros-nonfatal-errors.rs:121:5
    |
 LL |     trace_macros!(invalid);
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: default variant must be exhaustive
-  --> $DIR/macros-nonfatal-errors.rs:134:9
+  --> $DIR/macros-nonfatal-errors.rs:131:9
    |
 LL |         #[non_exhaustive]
    |         ----------------- declared `#[non_exhaustive]` here
@@ -255,11 +249,11 @@ LL |         Foo,
    = help: consider a manual implementation of `Default`
 
 error: cannot find macro `llvm_asm` in this scope
-  --> $DIR/macros-nonfatal-errors.rs:106:5
+  --> $DIR/macros-nonfatal-errors.rs:105:5
    |
 LL |     llvm_asm!(invalid);
    |     ^^^^^^^^
 
-error: aborting due to 29 previous errors
+error: aborting due to 28 previous errors
 
 For more information about this error, try `rustc --explain E0665`.
diff --git a/tests/ui/macros/missing-writer-issue-139830.rs b/tests/ui/macros/missing-writer-issue-139830.rs
new file mode 100644
index 00000000000..da4608776c3
--- /dev/null
+++ b/tests/ui/macros/missing-writer-issue-139830.rs
@@ -0,0 +1,9 @@
+// Make sure we don't suggest a method change inside the `write!` macro.
+//
+// See <https://github.com/rust-lang/rust/issues/139830>
+
+fn main() {
+    let mut buf = String::new();
+    let _ = write!(buf, "foo");
+    //~^ ERROR cannot write into `String`
+}
diff --git a/tests/ui/macros/missing-writer-issue-139830.stderr b/tests/ui/macros/missing-writer-issue-139830.stderr
new file mode 100644
index 00000000000..34dd61328e0
--- /dev/null
+++ b/tests/ui/macros/missing-writer-issue-139830.stderr
@@ -0,0 +1,23 @@
+error[E0599]: cannot write into `String`
+  --> $DIR/missing-writer-issue-139830.rs:7:20
+   |
+LL |     let _ = write!(buf, "foo");
+   |                    ^^^
+  --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
+   |
+   = note: the method is available for `String` here
+   |
+note: must implement `io::Write`, `fmt::Write`, or have a `write_fmt` method
+  --> $DIR/missing-writer-issue-139830.rs:7:20
+   |
+LL |     let _ = write!(buf, "foo");
+   |                    ^^^
+   = help: items from traits can only be used if the trait is in scope
+help: trait `Write` which provides `write_fmt` is implemented but not in scope; perhaps you want to import it
+   |
+LL + use std::fmt::Write;
+   |
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/macros/stringify.rs b/tests/ui/macros/stringify.rs
index 3f3d9252adb..c858051a7eb 100644
--- a/tests/ui/macros/stringify.rs
+++ b/tests/ui/macros/stringify.rs
@@ -483,7 +483,6 @@ fn test_item() {
     c1!(item, [ impl<T> Struct<T> {} ], "impl<T> Struct<T> {}");
     c1!(item, [ pub impl Trait for Struct {} ], "pub impl Trait for Struct {}");
     c1!(item, [ impl<T> const Trait for T {} ], "impl<T> const Trait for T {}");
-    c1!(item, [ impl ~const Struct {} ], "impl ~const Struct {}");
 
     // ItemKind::MacCall
     c1!(item, [ mac!(); ], "mac!();");
@@ -730,7 +729,7 @@ fn test_ty() {
     c1!(ty, [ dyn Send + 'a ], "dyn Send + 'a");
     c1!(ty, [ dyn 'a + Send ], "dyn 'a + Send");
     c1!(ty, [ dyn ?Sized ], "dyn ?Sized");
-    c1!(ty, [ dyn ~const Clone ], "dyn ~const Clone");
+    c1!(ty, [ dyn [const] Clone ], "dyn [const] Clone");
     c1!(ty, [ dyn for<'a> Send ], "dyn for<'a> Send");
 
     // TyKind::ImplTrait
@@ -738,7 +737,7 @@ fn test_ty() {
     c1!(ty, [ impl Send + 'a ], "impl Send + 'a");
     c1!(ty, [ impl 'a + Send ], "impl 'a + Send");
     c1!(ty, [ impl ?Sized ], "impl ?Sized");
-    c1!(ty, [ impl ~const Clone ], "impl ~const Clone");
+    c1!(ty, [ impl [const] Clone ], "impl [const] Clone");
     c1!(ty, [ impl for<'a> Send ], "impl for<'a> Send");
 
     // TyKind::Paren
diff --git a/tests/ui/methods/dont-ice-on-object-lookup-w-error-region.stderr b/tests/ui/methods/dont-ice-on-object-lookup-w-error-region.stderr
index 2c33941be43..00267ce359a 100644
--- a/tests/ui/methods/dont-ice-on-object-lookup-w-error-region.stderr
+++ b/tests/ui/methods/dont-ice-on-object-lookup-w-error-region.stderr
@@ -2,9 +2,12 @@ error[E0261]: use of undeclared lifetime name `'missing`
   --> $DIR/dont-ice-on-object-lookup-w-error-region.rs:6:20
    |
 LL | fn project(x: Pin<&'missing mut dyn Future<Output = ()>>) {
-   |           -        ^^^^^^^^ undeclared lifetime
-   |           |
-   |           help: consider introducing lifetime `'missing` here: `<'missing>`
+   |                    ^^^^^^^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'missing` here
+   |
+LL | fn project<'missing>(x: Pin<&'missing mut dyn Future<Output = ()>>) {
+   |           ++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/methods/method-call-lifetime-args-unresolved.stderr b/tests/ui/methods/method-call-lifetime-args-unresolved.stderr
index c72e7e0cdc3..d3bd74a49fb 100644
--- a/tests/ui/methods/method-call-lifetime-args-unresolved.stderr
+++ b/tests/ui/methods/method-call-lifetime-args-unresolved.stderr
@@ -1,10 +1,13 @@
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/method-call-lifetime-args-unresolved.rs:2:15
    |
-LL | fn main() {
-   |        - help: consider introducing lifetime `'a` here: `<'a>`
 LL |     0.clone::<'a>();
    |               ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | fn main<'a>() {
+   |        ++++
 
 warning: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
   --> $DIR/method-call-lifetime-args-unresolved.rs:2:15
diff --git a/tests/ui/methods/suggest-convert-ptr-to-ref.stderr b/tests/ui/methods/suggest-convert-ptr-to-ref.stderr
index 7d52b20121e..8cb97ea458b 100644
--- a/tests/ui/methods/suggest-convert-ptr-to-ref.stderr
+++ b/tests/ui/methods/suggest-convert-ptr-to-ref.stderr
@@ -2,7 +2,7 @@ error[E0599]: `*const u8` doesn't implement `std::fmt::Display`
   --> $DIR/suggest-convert-ptr-to-ref.rs:5:22
    |
 LL |     println!("{}", z.to_string());
-   |                      ^^^^^^^^^ `*const u8` cannot be formatted with the default formatter
+   |                      ^^^^^^^^^ method cannot be called on `*const u8` due to unsatisfied trait bounds
    |
 note: the method `to_string` exists on the type `&u8`
   --> $SRC_DIR/alloc/src/string.rs:LL:COL
@@ -11,13 +11,12 @@ note: the method `to_string` exists on the type `&u8`
    = note: the following trait bounds were not satisfied:
            `*const u8: std::fmt::Display`
            which is required by `*const u8: ToString`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 
 error[E0599]: `*mut u8` doesn't implement `std::fmt::Display`
   --> $DIR/suggest-convert-ptr-to-ref.rs:8:22
    |
 LL |     println!("{}", t.to_string());
-   |                      ^^^^^^^^^ `*mut u8` cannot be formatted with the default formatter
+   |                      ^^^^^^^^^ method cannot be called on `*mut u8` due to unsatisfied trait bounds
    |
 note: the method `to_string` exists on the type `&&mut u8`
   --> $SRC_DIR/alloc/src/string.rs:LL:COL
@@ -26,7 +25,6 @@ note: the method `to_string` exists on the type `&&mut u8`
    = note: the following trait bounds were not satisfied:
            `*mut u8: std::fmt::Display`
            which is required by `*mut u8: ToString`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 
 error[E0599]: no method named `make_ascii_lowercase` found for raw pointer `*mut u8` in the current scope
   --> $DIR/suggest-convert-ptr-to-ref.rs:9:7
diff --git a/tests/ui/mir/unreachable-loop-jump-threading.rs b/tests/ui/mir/unreachable-loop-jump-threading.rs
new file mode 100644
index 00000000000..8403906bb5c
--- /dev/null
+++ b/tests/ui/mir/unreachable-loop-jump-threading.rs
@@ -0,0 +1,10 @@
+//@ build-pass
+//@ needs-rustc-debug-assertions
+//@ compile-flags: -Zmir-enable-passes=+GVN -Zmir-enable-passes=+JumpThreading --crate-type=lib
+
+pub fn fun(terminate: bool) {
+    while true {}
+    //~^ WARN denote infinite loops with `loop { ... }`
+
+    while !terminate {}
+}
diff --git a/tests/ui/mir/unreachable-loop-jump-threading.stderr b/tests/ui/mir/unreachable-loop-jump-threading.stderr
new file mode 100644
index 00000000000..21b174c8021
--- /dev/null
+++ b/tests/ui/mir/unreachable-loop-jump-threading.stderr
@@ -0,0 +1,10 @@
+warning: denote infinite loops with `loop { ... }`
+  --> $DIR/unreachable-loop-jump-threading.rs:6:5
+   |
+LL |     while true {}
+   |     ^^^^^^^^^^ help: use `loop`
+   |
+   = note: `#[warn(while_true)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr b/tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr
index be3a3e2abf1..23bc9dc0f84 100644
--- a/tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr
+++ b/tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr
@@ -2,9 +2,8 @@ error[E0277]: `Foo` doesn't implement `Debug`
   --> $DIR/method-help-unsatisfied-bound.rs:5:7
    |
 LL |     a.unwrap();
-   |       ^^^^^^ `Foo` cannot be formatted using `{:?}`
+   |       ^^^^^^ the trait `Debug` is not implemented for `Foo`
    |
-   = help: the trait `Debug` is not implemented for `Foo`
    = note: add `#[derive(Debug)]` to `Foo` or manually `impl Debug for Foo`
 note: required by a bound in `Result::<T, E>::unwrap`
   --> $SRC_DIR/core/src/result.rs:LL:COL
diff --git a/tests/ui/mismatched_types/transforming-option-ref-issue-127545.rs b/tests/ui/mismatched_types/transforming-option-ref-issue-127545.rs
index f589e88f68e..0632b822c55 100644
--- a/tests/ui/mismatched_types/transforming-option-ref-issue-127545.rs
+++ b/tests/ui/mismatched_types/transforming-option-ref-issue-127545.rs
@@ -2,17 +2,17 @@
 #![crate_type = "lib"]
 
 pub fn foo(arg: Option<&Vec<i32>>) -> Option<&[i32]> {
-    arg //~ ERROR 5:5: 5:8: mismatched types [E0308]
+    arg //~ ERROR mismatched types [E0308]
 }
 
 pub fn bar(arg: Option<&Vec<i32>>) -> &[i32] {
-    arg.unwrap_or(&[]) //~ ERROR 9:19: 9:22: mismatched types [E0308]
+    arg.unwrap_or(&[]) //~ ERROR mismatched types [E0308]
 }
 
 pub fn barzz<'a>(arg: Option<&'a Vec<i32>>, v: &'a [i32]) -> &'a [i32] {
-    arg.unwrap_or(v) //~ ERROR 13:19: 13:20: mismatched types [E0308]
+    arg.unwrap_or(v) //~ ERROR mismatched types [E0308]
 }
 
 pub fn convert_result(arg: Result<&Vec<i32>, ()>) -> &[i32] {
-    arg.unwrap_or(&[]) //~ ERROR 17:19: 17:22: mismatched types [E0308]
+    arg.unwrap_or(&[]) //~ ERROR mismatched types [E0308]
 }
diff --git a/tests/ui/modules/issue-107649.stderr b/tests/ui/modules/issue-107649.stderr
index 0d203c1aacb..802ac669a10 100644
--- a/tests/ui/modules/issue-107649.stderr
+++ b/tests/ui/modules/issue-107649.stderr
@@ -2,11 +2,10 @@ error[E0277]: `Dummy` doesn't implement `Debug`
    --> $DIR/issue-107649.rs:105:5
     |
 105 |     dbg!(lib::Dummy);
-    |     ^^^^^^^^^^^^^^^^ `Dummy` cannot be formatted using `{:?}`
+    |     ^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `Dummy`
     |
-    = help: the trait `Debug` is not implemented for `Dummy`
     = note: add `#[derive(Debug)]` to `Dummy` or manually `impl Debug for Dummy`
-    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: this error originates in the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Dummy` with `#[derive(Debug)]`
    --> $DIR/auxiliary/dummy_lib.rs:2:1
     |
diff --git a/tests/ui/modules/module_suggestion_when_module_not_found/submodule/mod.rs b/tests/ui/modules/module_suggestion_when_module_not_found/submodule/mod.rs
new file mode 100644
index 00000000000..cb924172efe
--- /dev/null
+++ b/tests/ui/modules/module_suggestion_when_module_not_found/submodule/mod.rs
@@ -0,0 +1 @@
+//@ ignore-auxiliary
diff --git a/tests/ui/modules/module_suggestion_when_module_not_found/submodule2.rs b/tests/ui/modules/module_suggestion_when_module_not_found/submodule2.rs
new file mode 100644
index 00000000000..cb924172efe
--- /dev/null
+++ b/tests/ui/modules/module_suggestion_when_module_not_found/submodule2.rs
@@ -0,0 +1 @@
+//@ ignore-auxiliary
diff --git a/tests/ui/modules/module_suggestion_when_module_not_found/success.rs b/tests/ui/modules/module_suggestion_when_module_not_found/success.rs
new file mode 100644
index 00000000000..888e6ab3f19
--- /dev/null
+++ b/tests/ui/modules/module_suggestion_when_module_not_found/success.rs
@@ -0,0 +1,4 @@
+//@ ignore-auxiliary
+
+use submodule3::ferris; // these modules are unresolved.
+use submodule4::error;
diff --git a/tests/ui/modules/module_suggestion_when_module_not_found/success/compiletest-ignore-dir b/tests/ui/modules/module_suggestion_when_module_not_found/success/compiletest-ignore-dir
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/ui/modules/module_suggestion_when_module_not_found/success/compiletest-ignore-dir
diff --git a/tests/ui/modules/module_suggestion_when_module_not_found/success/submodule3/mod.rs b/tests/ui/modules/module_suggestion_when_module_not_found/success/submodule3/mod.rs
new file mode 100644
index 00000000000..8337712ea57
--- /dev/null
+++ b/tests/ui/modules/module_suggestion_when_module_not_found/success/submodule3/mod.rs
@@ -0,0 +1 @@
+//
diff --git a/tests/ui/modules/module_suggestion_when_module_not_found/success/submodule4.rs b/tests/ui/modules/module_suggestion_when_module_not_found/success/submodule4.rs
new file mode 100644
index 00000000000..8337712ea57
--- /dev/null
+++ b/tests/ui/modules/module_suggestion_when_module_not_found/success/submodule4.rs
@@ -0,0 +1 @@
+//
diff --git a/tests/ui/modules/module_suggestion_when_module_not_found/suggestion.rs b/tests/ui/modules/module_suggestion_when_module_not_found/suggestion.rs
new file mode 100644
index 00000000000..f4c24bff228
--- /dev/null
+++ b/tests/ui/modules/module_suggestion_when_module_not_found/suggestion.rs
@@ -0,0 +1,7 @@
+//@ edition:2024
+use submodule::cat; //~ ERROR unresolved import `submodule`
+use submodule2::help; //~ ERROR unresolved import `submodule2`
+mod success;
+fn main() {}
+//~? ERROR unresolved import `submodule3`
+//~? ERROR unresolved import `submodule4`
diff --git a/tests/ui/modules/module_suggestion_when_module_not_found/suggestion.stderr b/tests/ui/modules/module_suggestion_when_module_not_found/suggestion.stderr
new file mode 100644
index 00000000000..6375d71c280
--- /dev/null
+++ b/tests/ui/modules/module_suggestion_when_module_not_found/suggestion.stderr
@@ -0,0 +1,49 @@
+error[E0432]: unresolved import `submodule`
+  --> $DIR/suggestion.rs:2:5
+   |
+LL | use submodule::cat;
+   |     ^^^^^^^^^ use of unresolved module or unlinked crate `submodule`
+   |
+help: to make use of source file $DIR/submodule/mod.rs, use `mod submodule` in this file to declare the module
+   |
+LL + mod submodule;
+   |
+
+error[E0432]: unresolved import `submodule2`
+  --> $DIR/suggestion.rs:3:5
+   |
+LL | use submodule2::help;
+   |     ^^^^^^^^^^ use of unresolved module or unlinked crate `submodule2`
+   |
+help: to make use of source file $DIR/submodule2.rs, use `mod submodule2` in this file to declare the module
+   |
+LL + mod submodule2;
+   |
+
+error[E0432]: unresolved import `submodule3`
+  --> $DIR/success.rs:3:5
+   |
+LL | use submodule3::ferris; // these modules are unresolved.
+   |     ^^^^^^^^^^ use of unresolved module or unlinked crate `submodule3`
+   |
+help: to make use of source file $DIR/success/submodule3/mod.rs, use `mod submodule3` in this file to declare the module
+  --> $DIR/suggestion.rs:2:1
+   |
+LL + mod submodule3;
+   |
+
+error[E0432]: unresolved import `submodule4`
+  --> $DIR/success.rs:4:5
+   |
+LL | use submodule4::error;
+   |     ^^^^^^^^^^ use of unresolved module or unlinked crate `submodule4`
+   |
+help: to make use of source file $DIR/success/submodule4.rs, use `mod submodule4` in this file to declare the module
+  --> $DIR/suggestion.rs:2:1
+   |
+LL + mod submodule4;
+   |
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/modules_and_files_visibility/mod_file_disambig.stderr b/tests/ui/modules_and_files_visibility/mod_file_disambig.stderr
index f82d613015f..e71a6de2fb9 100644
--- a/tests/ui/modules_and_files_visibility/mod_file_disambig.stderr
+++ b/tests/ui/modules_and_files_visibility/mod_file_disambig.stderr
@@ -12,7 +12,10 @@ error[E0433]: failed to resolve: use of unresolved module or unlinked crate `mod
 LL |     assert_eq!(mod_file_aux::bar(), 10);
    |                ^^^^^^^^^^^^ use of unresolved module or unlinked crate `mod_file_aux`
    |
-   = help: you might be missing a crate named `mod_file_aux`
+help: to make use of source file $DIR/mod_file_aux.rs, use `mod mod_file_aux` in this file to declare the module
+   |
+LL + mod mod_file_aux;
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/moves/moves-based-on-type-capture-clause-bad.fixed b/tests/ui/moves/moves-based-on-type-capture-clause-bad.fixed
new file mode 100644
index 00000000000..04a183ca96b
--- /dev/null
+++ b/tests/ui/moves/moves-based-on-type-capture-clause-bad.fixed
@@ -0,0 +1,11 @@
+//@ run-rustfix
+use std::thread;
+
+fn main() {
+    let x = "Hello world!".to_string();
+    let value = x.clone();
+    thread::spawn(move || {
+        println!("{}", value);
+    });
+    println!("{}", x); //~ ERROR borrow of moved value
+}
diff --git a/tests/ui/moves/moves-based-on-type-capture-clause-bad.rs b/tests/ui/moves/moves-based-on-type-capture-clause-bad.rs
index 9d7277c1c24..c9a7f2c8ed8 100644
--- a/tests/ui/moves/moves-based-on-type-capture-clause-bad.rs
+++ b/tests/ui/moves/moves-based-on-type-capture-clause-bad.rs
@@ -1,3 +1,4 @@
+//@ run-rustfix
 use std::thread;
 
 fn main() {
diff --git a/tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr b/tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr
index c2b9aeab237..17049fe6731 100644
--- a/tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr
+++ b/tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr
@@ -1,5 +1,5 @@
 error[E0382]: borrow of moved value: `x`
-  --> $DIR/moves-based-on-type-capture-clause-bad.rs:8:20
+  --> $DIR/moves-based-on-type-capture-clause-bad.rs:9:20
    |
 LL |     let x = "Hello world!".to_string();
    |         - move occurs because `x` has type `String`, which does not implement the `Copy` trait
@@ -12,6 +12,12 @@ LL |     println!("{}", x);
    |                    ^ value borrowed here after move
    |
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider cloning the value before moving it into the closure
+   |
+LL ~     let value = x.clone();
+LL ~     thread::spawn(move || {
+LL ~         println!("{}", value);
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/no-capture-arc.rs b/tests/ui/moves/no-capture-arc.rs
index 9c957a4e01b..9c957a4e01b 100644
--- a/tests/ui/no-capture-arc.rs
+++ b/tests/ui/moves/no-capture-arc.rs
diff --git a/tests/ui/no-capture-arc.stderr b/tests/ui/moves/no-capture-arc.stderr
index 9c1f5c65066..6d4a867fa88 100644
--- a/tests/ui/no-capture-arc.stderr
+++ b/tests/ui/moves/no-capture-arc.stderr
@@ -13,6 +13,12 @@ LL |     assert_eq!((*arc_v)[2], 3);
    |                  ^^^^^ value borrowed here after move
    |
    = note: borrow occurs due to deref coercion to `Vec<i32>`
+help: consider cloning the value before moving it into the closure
+   |
+LL ~     let value = arc_v.clone();
+LL ~     thread::spawn(move|| {
+LL ~         assert_eq!((*value)[3], 4);
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/moves/no-reuse-move-arc.fixed b/tests/ui/moves/no-reuse-move-arc.fixed
new file mode 100644
index 00000000000..a5dac8cc14b
--- /dev/null
+++ b/tests/ui/moves/no-reuse-move-arc.fixed
@@ -0,0 +1,17 @@
+//@ run-rustfix
+use std::sync::Arc;
+use std::thread;
+
+fn main() {
+    let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+    let arc_v = Arc::new(v);
+
+    let value = arc_v.clone();
+    thread::spawn(move|| {
+        assert_eq!((*value)[3], 4);
+    });
+
+    assert_eq!((*arc_v)[2], 3); //~ ERROR borrow of moved value: `arc_v`
+
+    println!("{:?}", *arc_v);
+}
diff --git a/tests/ui/no-reuse-move-arc.rs b/tests/ui/moves/no-reuse-move-arc.rs
index 9c957a4e01b..0d67aa56489 100644
--- a/tests/ui/no-reuse-move-arc.rs
+++ b/tests/ui/moves/no-reuse-move-arc.rs
@@ -1,3 +1,4 @@
+//@ run-rustfix
 use std::sync::Arc;
 use std::thread;
 
diff --git a/tests/ui/no-reuse-move-arc.stderr b/tests/ui/moves/no-reuse-move-arc.stderr
index 61f4837dc0e..aff979af905 100644
--- a/tests/ui/no-reuse-move-arc.stderr
+++ b/tests/ui/moves/no-reuse-move-arc.stderr
@@ -1,5 +1,5 @@
 error[E0382]: borrow of moved value: `arc_v`
-  --> $DIR/no-reuse-move-arc.rs:12:18
+  --> $DIR/no-reuse-move-arc.rs:13:18
    |
 LL |     let arc_v = Arc::new(v);
    |         ----- move occurs because `arc_v` has type `Arc<Vec<i32>>`, which does not implement the `Copy` trait
@@ -13,6 +13,12 @@ LL |     assert_eq!((*arc_v)[2], 3);
    |                  ^^^^^ value borrowed here after move
    |
    = note: borrow occurs due to deref coercion to `Vec<i32>`
+help: consider cloning the value before moving it into the closure
+   |
+LL ~     let value = arc_v.clone();
+LL ~     thread::spawn(move|| {
+LL ~         assert_eq!((*value)[3], 4);
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/never_type/never-type-fallback-option.rs b/tests/ui/never_type/never-type-fallback-option.rs
new file mode 100644
index 00000000000..9c8103aa0a4
--- /dev/null
+++ b/tests/ui/never_type/never-type-fallback-option.rs
@@ -0,0 +1,22 @@
+//@ run-pass
+
+#![allow(warnings)]
+
+//! Tests type inference fallback to `!` (never type) in `Option` context.
+//!
+//! Regression test for issues:
+//! - https://github.com/rust-lang/rust/issues/39808
+//! - https://github.com/rust-lang/rust/issues/39984
+//!
+//! Here the type of `c` is `Option<?T>`, where `?T` is unconstrained.
+//! Because there is data-flow from the `{ return; }` block, which
+//! diverges and hence has type `!`, into `c`, we will default `?T` to
+//! `!`, and hence this code compiles rather than failing and requiring
+//! a type annotation.
+
+fn main() {
+    let c = Some({
+        return;
+    });
+    c.unwrap();
+}
diff --git a/tests/ui/nll/user-annotations/region-error-ice-109072.stderr b/tests/ui/nll/user-annotations/region-error-ice-109072.stderr
index d90971bed25..42551b87f62 100644
--- a/tests/ui/nll/user-annotations/region-error-ice-109072.stderr
+++ b/tests/ui/nll/user-annotations/region-error-ice-109072.stderr
@@ -2,9 +2,12 @@ error[E0261]: use of undeclared lifetime name `'missing`
   --> $DIR/region-error-ice-109072.rs:8:9
    |
 LL | impl Lt<'missing> for () {
-   |     -   ^^^^^^^^ undeclared lifetime
-   |     |
-   |     help: consider introducing lifetime `'missing` here: `<'missing>`
+   |         ^^^^^^^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'missing` here
+   |
+LL | impl<'missing> Lt<'missing> for () {
+   |     ++++++++++
 
 error[E0261]: use of undeclared lifetime name `'missing`
   --> $DIR/region-error-ice-109072.rs:9:15
diff --git a/tests/ui/no_std/simple-runs.rs b/tests/ui/no_std/simple-runs.rs
index 8931ac7ed11..af44dfec311 100644
--- a/tests/ui/no_std/simple-runs.rs
+++ b/tests/ui/no_std/simple-runs.rs
@@ -4,6 +4,7 @@
 //@ compile-flags: -Cpanic=abort
 //@ ignore-wasm different `main` convention
 
+#![feature(lang_items)]
 #![no_std]
 #![no_main]
 
@@ -35,6 +36,17 @@ fn panic_handler(_info: &PanicInfo<'_>) -> ! {
     loop {}
 }
 
+#[lang = "eh_personality"]
+extern "C" fn rust_eh_personality(
+    _version: i32,
+    _actions: i32,
+    _exception_class: u64,
+    _exception_object: *mut (),
+    _context: *mut (),
+) -> i32 {
+    loop {}
+}
+
 #[no_mangle]
 extern "C" fn main(_argc: c_int, _argv: *const *const c_char) -> c_int {
     0
diff --git a/tests/ui/on-unimplemented/no-debug.stderr b/tests/ui/on-unimplemented/no-debug.stderr
index 97d67dbd82e..5b0b060d40e 100644
--- a/tests/ui/on-unimplemented/no-debug.stderr
+++ b/tests/ui/on-unimplemented/no-debug.stderr
@@ -2,7 +2,9 @@ error[E0277]: `Foo` doesn't implement `Debug`
   --> $DIR/no-debug.rs:10:27
    |
 LL |     println!("{:?} {:?}", Foo, Bar);
-   |                           ^^^ `Foo` cannot be formatted using `{:?}`
+   |               ----        ^^^ `Foo` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               |
+   |               required by this formatting parameter
    |
    = help: the trait `Debug` is not implemented for `Foo`
    = note: add `#[derive(Debug)]` to `Foo` or manually `impl Debug for Foo`
@@ -17,7 +19,9 @@ error[E0277]: `Bar` doesn't implement `Debug`
   --> $DIR/no-debug.rs:10:32
    |
 LL |     println!("{:?} {:?}", Foo, Bar);
-   |                                ^^^ `Bar` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |                    ----        ^^^ `Bar` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |                    |
+   |                    required by this formatting parameter
    |
    = help: the trait `Debug` is not implemented for `Bar`
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -26,7 +30,9 @@ error[E0277]: `Foo` doesn't implement `std::fmt::Display`
   --> $DIR/no-debug.rs:11:23
    |
 LL |     println!("{} {}", Foo, Bar);
-   |                       ^^^ `Foo` cannot be formatted with the default formatter
+   |               --      ^^^ `Foo` cannot be formatted with the default formatter
+   |               |
+   |               required by this formatting parameter
    |
    = help: the trait `std::fmt::Display` is not implemented for `Foo`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
@@ -36,7 +42,9 @@ error[E0277]: `Bar` doesn't implement `std::fmt::Display`
   --> $DIR/no-debug.rs:11:28
    |
 LL |     println!("{} {}", Foo, Bar);
-   |                            ^^^ `Bar` cannot be formatted with the default formatter
+   |                  --        ^^^ `Bar` cannot be formatted with the default formatter
+   |                  |
+   |                  required by this formatting parameter
    |
    = help: the trait `std::fmt::Display` is not implemented for `Bar`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
diff --git a/tests/ui/panic-runtime/auxiliary/depends.rs b/tests/ui/panic-runtime/auxiliary/depends.rs
deleted file mode 100644
index 7a35619b681..00000000000
--- a/tests/ui/panic-runtime/auxiliary/depends.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-//@ no-prefer-dynamic
-
-#![feature(panic_runtime)]
-#![crate_type = "rlib"]
-#![panic_runtime]
-#![no_std]
-
-extern crate needs_panic_runtime;
diff --git a/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs b/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs
deleted file mode 100644
index fbafee0c241..00000000000
--- a/tests/ui/panic-runtime/auxiliary/needs-panic-runtime.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-//@ no-prefer-dynamic
-
-#![feature(needs_panic_runtime)]
-#![crate_type = "rlib"]
-#![needs_panic_runtime]
-#![no_std]
diff --git a/tests/ui/panic-runtime/incompatible-type.rs b/tests/ui/panic-runtime/incompatible-type.rs
index 4cbcfec11c9..f82c23d68c2 100644
--- a/tests/ui/panic-runtime/incompatible-type.rs
+++ b/tests/ui/panic-runtime/incompatible-type.rs
@@ -21,4 +21,12 @@ pub fn test(_: DropMe) {
 }
 
 #[rustc_std_internal_symbol]
-pub unsafe extern "C" fn rust_eh_personality() {}
+pub unsafe extern "C" fn rust_eh_personality(
+    _version: i32,
+    _actions: i32,
+    _exception_class: u64,
+    _exception_object: *mut (),
+    _context: *mut (),
+) -> i32 {
+    loop {}
+}
diff --git a/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs b/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs
deleted file mode 100644
index eb00c071702..00000000000
--- a/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-//@ dont-check-compiler-stderr
-//@ aux-build:needs-panic-runtime.rs
-//@ aux-build:depends.rs
-
-extern crate depends;
-
-fn main() {}
-
-//~? ERROR the crate `depends` cannot depend on a crate that needs a panic runtime, but it depends on `needs_panic_runtime`
diff --git a/tests/ui/parser/bad-lit-suffixes.rs b/tests/ui/parser/bad-lit-suffixes.rs
index f29dc53d322..4e8edf4d46e 100644
--- a/tests/ui/parser/bad-lit-suffixes.rs
+++ b/tests/ui/parser/bad-lit-suffixes.rs
@@ -33,7 +33,6 @@ fn f() {}
 
 #[must_use = "string"suffix]
 //~^ ERROR suffixes on string literals are invalid
-//~| ERROR malformed `must_use` attribute input
 fn g() {}
 
 #[link(name = "string"suffix)]
diff --git a/tests/ui/parser/bad-lit-suffixes.stderr b/tests/ui/parser/bad-lit-suffixes.stderr
index 86ef35bf783..416143e496a 100644
--- a/tests/ui/parser/bad-lit-suffixes.stderr
+++ b/tests/ui/parser/bad-lit-suffixes.stderr
@@ -22,29 +22,14 @@ error: suffixes on string literals are invalid
 LL | #[must_use = "string"suffix]
    |              ^^^^^^^^^^^^^^ invalid suffix `suffix`
 
-error: malformed `must_use` attribute input
-  --> $DIR/bad-lit-suffixes.rs:34:1
-   |
-LL | #[must_use = "string"suffix]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: the following are the possible correct uses
-   |
-LL - #[must_use = "string"suffix]
-LL + #[must_use = "reason"]
-   |
-LL - #[must_use = "string"suffix]
-LL + #[must_use]
-   |
-
 error: suffixes on string literals are invalid
-  --> $DIR/bad-lit-suffixes.rs:39:15
+  --> $DIR/bad-lit-suffixes.rs:38:15
    |
 LL | #[link(name = "string"suffix)]
    |               ^^^^^^^^^^^^^^ invalid suffix `suffix`
 
 error: invalid suffix `suffix` for number literal
-  --> $DIR/bad-lit-suffixes.rs:43:41
+  --> $DIR/bad-lit-suffixes.rs:42:41
    |
 LL | #[rustc_layout_scalar_valid_range_start(0suffix)]
    |                                         ^^^^^^^ invalid suffix `suffix`
@@ -165,5 +150,5 @@ LL |     1.0e10suffix;
    |
    = help: valid suffixes are `f32` and `f64`
 
-error: aborting due to 21 previous errors; 2 warnings emitted
+error: aborting due to 20 previous errors; 2 warnings emitted
 
diff --git a/tests/ui/parser/bounds-type.rs b/tests/ui/parser/bounds-type.rs
index ec0e83c314e..1bd67bbba6b 100644
--- a/tests/ui/parser/bounds-type.rs
+++ b/tests/ui/parser/bounds-type.rs
@@ -10,10 +10,10 @@ struct S<
     T: Tr +, // OK
     T: ?'a, //~ ERROR `?` may only modify trait bounds, not lifetime bounds
 
-    T: ~const Tr, // OK
-    T: ~const ?Tr, //~ ERROR `~const` trait not allowed with `?` trait polarity modifier
-    T: ~const Tr + 'a, // OK
-    T: ~const 'a, //~ ERROR `~const` may only modify trait bounds, not lifetime bounds
+    T: [const] Tr, // OK
+    T: [const] ?Tr, //~ ERROR `[const]` trait not allowed with `?` trait polarity modifier
+    T: [const] Tr + 'a, // OK
+    T: [const] 'a, //~ ERROR `[const]` may only modify trait bounds, not lifetime bounds
     T: const 'a, //~ ERROR `const` may only modify trait bounds, not lifetime bounds
 
     T: async Tr, // OK
diff --git a/tests/ui/parser/bounds-type.stderr b/tests/ui/parser/bounds-type.stderr
index 09c35c12b00..0d929c76f02 100644
--- a/tests/ui/parser/bounds-type.stderr
+++ b/tests/ui/parser/bounds-type.stderr
@@ -12,19 +12,19 @@ error: `?` may only modify trait bounds, not lifetime bounds
 LL |     T: ?'a,
    |        ^
 
-error: `~const` trait not allowed with `?` trait polarity modifier
-  --> $DIR/bounds-type.rs:14:15
+error: `[const]` trait not allowed with `?` trait polarity modifier
+  --> $DIR/bounds-type.rs:14:16
    |
-LL |     T: ~const ?Tr,
-   |        ------ ^
+LL |     T: [const] ?Tr,
+   |        ------- ^
    |        |
-   |        there is not a well-defined meaning for a `~const ?` trait
+   |        there is not a well-defined meaning for a `[const] ?` trait
 
-error: `~const` may only modify trait bounds, not lifetime bounds
-  --> $DIR/bounds-type.rs:16:8
+error: `[const]` may only modify trait bounds, not lifetime bounds
+  --> $DIR/bounds-type.rs:16:6
    |
-LL |     T: ~const 'a,
-   |        ^^^^^^
+LL |     T: [const] 'a,
+   |      ^^^^^^^^^
 
 error: `const` may only modify trait bounds, not lifetime bounds
   --> $DIR/bounds-type.rs:17:8
diff --git a/tests/ui/parser/issues/issue-105366.fixed b/tests/ui/parser/issues/issue-105366.fixed
index 7157b647524..95419dc07f2 100644
--- a/tests/ui/parser/issues/issue-105366.fixed
+++ b/tests/ui/parser/issues/issue-105366.fixed
@@ -1,5 +1,6 @@
 //@ run-rustfix
 
+#[allow(dead_code)]
 struct Foo;
 
 impl From<i32> for Foo {
diff --git a/tests/ui/parser/issues/issue-105366.rs b/tests/ui/parser/issues/issue-105366.rs
index dc3cb8b343d..3278b737991 100644
--- a/tests/ui/parser/issues/issue-105366.rs
+++ b/tests/ui/parser/issues/issue-105366.rs
@@ -1,5 +1,6 @@
 //@ run-rustfix
 
+#[allow(dead_code)]
 struct Foo;
 
 fn From<i32> for Foo {
diff --git a/tests/ui/parser/issues/issue-105366.stderr b/tests/ui/parser/issues/issue-105366.stderr
index d8c79a0e0ea..225e436b4aa 100644
--- a/tests/ui/parser/issues/issue-105366.stderr
+++ b/tests/ui/parser/issues/issue-105366.stderr
@@ -1,5 +1,5 @@
 error: you might have meant to write `impl` instead of `fn`
-  --> $DIR/issue-105366.rs:5:1
+  --> $DIR/issue-105366.rs:6:1
    |
 LL | fn From<i32> for Foo {
    | ^^
diff --git a/tests/ui/parser/recover/recover-field-semi.rs b/tests/ui/parser/recover/recover-field-semi.rs
index b703578860e..b6f235f8ad1 100644
--- a/tests/ui/parser/recover/recover-field-semi.rs
+++ b/tests/ui/parser/recover/recover-field-semi.rs
@@ -3,7 +3,7 @@ struct Foo {
     //~^ ERROR struct fields are separated by `,`
 }
 
-union Bar { //~ ERROR
+union Bar {
     foo: i32;
     //~^ ERROR union fields are separated by `,`
 }
@@ -13,4 +13,6 @@ enum Baz {
     //~^ ERROR struct fields are separated by `,`
 }
 
-fn main() {}
+fn main() {
+    let _ = Foo { foo: "" }; //~ ERROR mismatched types
+}
diff --git a/tests/ui/parser/recover/recover-field-semi.stderr b/tests/ui/parser/recover/recover-field-semi.stderr
index 3cf4847488c..9b1a34e134b 100644
--- a/tests/ui/parser/recover/recover-field-semi.stderr
+++ b/tests/ui/parser/recover/recover-field-semi.stderr
@@ -22,14 +22,12 @@ LL |     Qux { foo: i32; }
    |     |
    |     while parsing this struct
 
-error: unions cannot have zero fields
-  --> $DIR/recover-field-semi.rs:6:1
+error[E0308]: mismatched types
+  --> $DIR/recover-field-semi.rs:17:24
    |
-LL | / union Bar {
-LL | |     foo: i32;
-LL | |
-LL | | }
-   | |_^
+LL |     let _ = Foo { foo: "" };
+   |                        ^^ expected `i32`, found `&str`
 
 error: aborting due to 4 previous errors
 
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/parser/trait-object-delimiters.rs b/tests/ui/parser/trait-object-delimiters.rs
index 8f6221c1b94..1cbd2ff1bdf 100644
--- a/tests/ui/parser/trait-object-delimiters.rs
+++ b/tests/ui/parser/trait-object-delimiters.rs
@@ -8,7 +8,7 @@ fn foo2(_: &dyn (Drop + AsRef<str>)) {} //~ ERROR incorrect parentheses around t
 fn foo2_no_space(_: &dyn(Drop + AsRef<str>)) {} //~ ERROR incorrect parentheses around trait bounds
 
 fn foo3(_: &dyn {Drop + AsRef<str>}) {} //~ ERROR expected parameter name, found `{`
-//~^ ERROR expected one of `!`, `(`, `)`, `*`, `,`, `?`, `async`, `const`, `for`, `use`, `~`, lifetime, or path, found `{`
+//~^ ERROR expected one of `!`, `(`, `)`, `*`, `,`, `?`, `[`, `async`, `const`, `for`, `use`, `~`, lifetime, or path, found `{`
 //~| ERROR at least one trait is required for an object type
 
 fn foo4(_: &dyn <Drop + AsRef<str>>) {} //~ ERROR expected identifier, found `<`
diff --git a/tests/ui/parser/trait-object-delimiters.stderr b/tests/ui/parser/trait-object-delimiters.stderr
index be130ac7ab2..16d5392eec8 100644
--- a/tests/ui/parser/trait-object-delimiters.stderr
+++ b/tests/ui/parser/trait-object-delimiters.stderr
@@ -39,11 +39,11 @@ error: expected parameter name, found `{`
 LL | fn foo3(_: &dyn {Drop + AsRef<str>}) {}
    |                 ^ expected parameter name
 
-error: expected one of `!`, `(`, `)`, `*`, `,`, `?`, `async`, `const`, `for`, `use`, `~`, lifetime, or path, found `{`
+error: expected one of `!`, `(`, `)`, `*`, `,`, `?`, `[`, `async`, `const`, `for`, `use`, `~`, lifetime, or path, found `{`
   --> $DIR/trait-object-delimiters.rs:10:17
    |
 LL | fn foo3(_: &dyn {Drop + AsRef<str>}) {}
-   |                -^ expected one of 13 possible tokens
+   |                -^ expected one of 14 possible tokens
    |                |
    |                help: missing `,`
 
diff --git a/tests/ui/pin-ergonomics/borrow-unpin.pinned.stderr b/tests/ui/pin-ergonomics/borrow-unpin.pinned.stderr
new file mode 100644
index 00000000000..cc438461a5d
--- /dev/null
+++ b/tests/ui/pin-ergonomics/borrow-unpin.pinned.stderr
@@ -0,0 +1,238 @@
+error[E0382]: use of moved value: `foo`
+  --> $DIR/borrow-unpin.rs:39:14
+   |
+LL |     let foo = Foo::default();
+   |         --- move occurs because `foo` has type `Foo`, which does not implement the `Copy` trait
+LL |     foo_pin_mut(&pin mut foo);
+   |                          --- value moved here
+LL |     foo_move(foo);
+   |              ^^^ value used here after move
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:16:1
+   |
+LL | struct Foo(PhantomPinned);
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     foo_pin_mut(&pin mut foo);
+   |                          --- you could clone this value
+
+error[E0382]: use of moved value: `foo`
+  --> $DIR/borrow-unpin.rs:43:14
+   |
+LL |     let foo = Foo::default();
+   |         --- move occurs because `foo` has type `Foo`, which does not implement the `Copy` trait
+LL |     let x = &pin mut foo;
+   |                      --- value moved here
+LL |     foo_move(foo);
+   |              ^^^ value used here after move
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:16:1
+   |
+LL | struct Foo(PhantomPinned);
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     let x = &pin mut foo;
+   |                      --- you could clone this value
+
+error[E0382]: use of moved value: `foo`
+  --> $DIR/borrow-unpin.rs:52:14
+   |
+LL |     let mut foo = Foo::default();
+   |         ------- move occurs because `foo` has type `Foo`, which does not implement the `Copy` trait
+LL |     foo_pin_mut(&pin mut foo); // ok
+   |                          --- value moved here
+LL |     foo_move(foo);
+   |              ^^^ value used here after move
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:16:1
+   |
+LL | struct Foo(PhantomPinned);
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     foo_pin_mut(&pin mut foo); // ok
+   |                          --- you could clone this value
+
+error[E0382]: use of moved value: `foo`
+  --> $DIR/borrow-unpin.rs:56:14
+   |
+LL |     let mut foo = Foo::default();
+   |         ------- move occurs because `foo` has type `Foo`, which does not implement the `Copy` trait
+LL |     let x = &pin mut foo; // ok
+   |                      --- value moved here
+LL |     foo_move(foo);
+   |              ^^^ value used here after move
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:16:1
+   |
+LL | struct Foo(PhantomPinned);
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     let x = &pin mut foo; // ok
+   |                      --- you could clone this value
+
+error[E0505]: cannot move out of `foo` because it is borrowed
+  --> $DIR/borrow-unpin.rs:68:14
+   |
+LL |     let foo = Foo::default();
+   |         --- binding `foo` declared here
+LL |     let x = &pin const foo; // ok
+   |             -------------- borrow of `foo` occurs here
+LL |     foo_move(foo);
+   |              ^^^ move out of `foo` occurs here
+LL |
+LL |     foo_pin_ref(x);
+   |                 - borrow later used here
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:16:1
+   |
+LL | struct Foo(PhantomPinned);
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     let x = &pin const foo; // ok
+   |                        --- you could clone this value
+
+error[E0382]: borrow of moved value: `foo`
+  --> $DIR/borrow-unpin.rs:76:13
+   |
+LL |     let mut foo = Foo::default();
+   |         ------- move occurs because `foo` has type `Foo`, which does not implement the `Copy` trait
+LL |     foo_pin_mut(&pin mut foo); // ok
+   |                          --- value moved here
+LL |     foo_ref(&foo);
+   |             ^^^^ value borrowed here after move
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:16:1
+   |
+LL | struct Foo(PhantomPinned);
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     foo_pin_mut(&pin mut foo); // ok
+   |                          --- you could clone this value
+
+error[E0382]: borrow of moved value: `foo`
+  --> $DIR/borrow-unpin.rs:80:13
+   |
+LL |     let mut foo = Foo::default();
+   |         ------- move occurs because `foo` has type `Foo`, which does not implement the `Copy` trait
+LL |     let x = &pin mut foo; // ok
+   |                      --- value moved here
+LL |     foo_ref(&foo);
+   |             ^^^^ value borrowed here after move
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:16:1
+   |
+LL | struct Foo(PhantomPinned);
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     let x = &pin mut foo; // ok
+   |                      --- you could clone this value
+
+error[E0382]: use of moved value: `foo`
+  --> $DIR/borrow-unpin.rs:99:26
+   |
+LL |     let mut foo = Foo::default();
+   |         ------- move occurs because `foo` has type `Foo`, which does not implement the `Copy` trait
+LL |     foo_pin_mut(&pin mut foo); // ok
+   |                          --- value moved here
+LL |     foo_pin_mut(&pin mut foo);
+   |                          ^^^ value used here after move
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:16:1
+   |
+LL | struct Foo(PhantomPinned);
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     foo_pin_mut(&pin mut foo); // ok
+   |                          --- you could clone this value
+
+error[E0382]: use of moved value: `foo`
+  --> $DIR/borrow-unpin.rs:103:26
+   |
+LL |     let mut foo = Foo::default();
+   |         ------- move occurs because `foo` has type `Foo`, which does not implement the `Copy` trait
+LL |     let x = &pin mut foo; // ok
+   |                      --- value moved here
+LL |     foo_pin_mut(&pin mut foo);
+   |                          ^^^ value used here after move
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:16:1
+   |
+LL | struct Foo(PhantomPinned);
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     let x = &pin mut foo; // ok
+   |                      --- you could clone this value
+
+error[E0505]: cannot move out of `foo` because it is borrowed
+  --> $DIR/borrow-unpin.rs:115:26
+   |
+LL |     let mut foo = Foo::default();
+   |         ------- binding `foo` declared here
+LL |     let x = &pin const foo; // ok
+   |             -------------- borrow of `foo` occurs here
+LL |     foo_pin_mut(&pin mut foo);
+   |                          ^^^ move out of `foo` occurs here
+LL |
+LL |     foo_pin_ref(x);
+   |                 - borrow later used here
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:16:1
+   |
+LL | struct Foo(PhantomPinned);
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     let x = &pin const foo; // ok
+   |                        --- you could clone this value
+
+error[E0382]: borrow of moved value: `foo`
+  --> $DIR/borrow-unpin.rs:123:17
+   |
+LL |     let mut foo = Foo::default();
+   |         ------- move occurs because `foo` has type `Foo`, which does not implement the `Copy` trait
+LL |     foo_pin_mut(&pin mut foo); // ok
+   |                          --- value moved here
+LL |     foo_pin_ref(&pin const foo);
+   |                 ^^^^^^^^^^^^^^ value borrowed here after move
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:16:1
+   |
+LL | struct Foo(PhantomPinned);
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     foo_pin_mut(&pin mut foo); // ok
+   |                          --- you could clone this value
+
+error[E0382]: borrow of moved value: `foo`
+  --> $DIR/borrow-unpin.rs:127:17
+   |
+LL |     let mut foo = Foo::default();
+   |         ------- move occurs because `foo` has type `Foo`, which does not implement the `Copy` trait
+LL |     let x = &pin mut foo; // ok
+   |                      --- value moved here
+LL |     foo_pin_ref(&pin const foo);
+   |                 ^^^^^^^^^^^^^^ value borrowed here after move
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:16:1
+   |
+LL | struct Foo(PhantomPinned);
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     let x = &pin mut foo; // ok
+   |                      --- you could clone this value
+
+error: aborting due to 12 previous errors
+
+Some errors have detailed explanations: E0382, E0505.
+For more information about an error, try `rustc --explain E0382`.
diff --git a/tests/ui/pin-ergonomics/borrow-unpin.rs b/tests/ui/pin-ergonomics/borrow-unpin.rs
new file mode 100644
index 00000000000..61e69bab12b
--- /dev/null
+++ b/tests/ui/pin-ergonomics/borrow-unpin.rs
@@ -0,0 +1,143 @@
+//@ revisions: unpin pinned
+#![feature(pin_ergonomics)]
+#![allow(dead_code, incomplete_features)]
+
+// For now, in order to ensure soundness, we move the place in `&pin mut place`
+// if `place` is not `Unpin`.
+// In the next step, we borrow the place instead of moving it, after that we
+// have to makes sure `&pin mut place` and `&pin const place` cannot violate
+// the mut-xor-share rules.
+
+use std::pin::Pin;
+use std::marker::PhantomPinned;
+
+#[cfg(pinned)]
+#[derive(Default)]
+struct Foo(PhantomPinned);
+
+#[cfg(unpin)]
+#[derive(Default)]
+struct Foo;
+
+fn foo_mut(_: &mut Foo) {
+}
+
+fn foo_ref(_: &Foo) {
+}
+
+fn foo_pin_mut(_: Pin<&mut Foo>) {
+}
+
+fn foo_pin_ref(_: Pin<&Foo>) {
+}
+
+fn foo_move(_: Foo) {}
+
+fn immutable_pin_mut_then_move() {
+    let foo = Foo::default();
+    foo_pin_mut(&pin mut foo); //[unpin]~ ERROR cannot borrow `foo` as mutable, as it is not declared as mutable
+    foo_move(foo); //[pinned]~ ERROR use of moved value: `foo`
+
+    let foo = Foo::default();
+    let x = &pin mut foo; //[unpin]~ ERROR cannot borrow `foo` as mutable, as it is not declared as mutable
+    foo_move(foo); //[pinned]~ ERROR use of moved value: `foo`
+    //[unpin]~^ ERROR cannot move out of `foo` because it is borrowed
+    foo_pin_mut(x); //
+}
+
+
+fn pin_mut_then_move() {
+    let mut foo = Foo::default();
+    foo_pin_mut(&pin mut foo); // ok
+    foo_move(foo); //[pinned]~ ERROR use of moved value: `foo`
+
+    let mut foo = Foo::default();
+    let x = &pin mut foo; // ok
+    foo_move(foo); //[pinned]~ ERROR use of moved value: `foo`
+    //[unpin]~^ ERROR cannot move out of `foo` because it is borrowed
+    foo_pin_mut(x); //
+}
+
+fn pin_ref_then_move() {
+    let foo = Foo::default();
+    foo_pin_ref(&pin const foo); // ok
+    foo_move(foo); // ok
+
+    let foo = Foo::default();
+    let x = &pin const foo; // ok
+    foo_move(foo); //[pinned]~ ERROR cannot move out of `foo` because it is borrowed
+    //[unpin]~^ ERROR cannot move out of `foo` because it is borrowed
+    foo_pin_ref(x);
+}
+
+fn pin_mut_then_ref() {
+    let mut foo = Foo::default();
+    foo_pin_mut(&pin mut foo); // ok
+    foo_ref(&foo); //[pinned]~ ERROR borrow of moved value: `foo`
+
+    let mut foo = Foo::default();
+    let x = &pin mut foo; // ok
+    foo_ref(&foo); //[pinned]~ ERROR borrow of moved value: `foo`
+    //[unpin]~^ ERROR cannot borrow `foo` as immutable because it is also borrowed as mutable
+    foo_pin_mut(x);
+}
+
+fn pin_ref_then_ref() {
+    let mut foo = Foo::default();
+    foo_pin_ref(&pin const foo); // ok
+    foo_ref(&foo); // ok
+
+    let mut foo = Foo::default();
+    let x = &pin const foo; // ok
+    foo_ref(&foo); // ok
+    foo_pin_ref(x);
+}
+
+fn pin_mut_then_pin_mut() {
+    let mut foo = Foo::default();
+    foo_pin_mut(&pin mut foo); // ok
+    foo_pin_mut(&pin mut foo); //[pinned]~ ERROR use of moved value: `foo`
+
+    let mut foo = Foo::default();
+    let x = &pin mut foo; // ok
+    foo_pin_mut(&pin mut foo); //[pinned]~ ERROR use of moved value: `foo`
+    //[unpin]~^ ERROR cannot borrow `foo` as mutable more than once at a time
+    foo_pin_mut(x);
+}
+
+fn pin_ref_then_pin_mut() {
+    let mut foo = Foo::default();
+    foo_pin_ref(&pin const foo); // ok
+    foo_pin_mut(&pin mut foo); // ok
+
+    let mut foo = Foo::default();
+    let x = &pin const foo; // ok
+    foo_pin_mut(&pin mut foo); //[pinned]~ ERROR cannot move out of `foo` because it is borrowed
+    //[unpin]~^ ERROR cannot borrow `foo` as mutable because it is also borrowed as immutable
+    foo_pin_ref(x);
+}
+
+fn pin_mut_then_pin_ref() {
+    let mut foo = Foo::default();
+    foo_pin_mut(&pin mut foo); // ok
+    foo_pin_ref(&pin const foo); //[pinned]~ ERROR borrow of moved value: `foo`
+
+    let mut foo = Foo::default();
+    let x = &pin mut foo; // ok
+    foo_pin_ref(&pin const foo); //[pinned]~ ERROR borrow of moved value: `foo`
+    //[unpin]~^ ERROR cannot borrow `foo` as immutable because it is also borrowed as mutable
+    foo_pin_mut(x);
+}
+
+fn pin_ref_then_pin_ref() {
+    let mut foo = Foo::default();
+    foo_pin_ref(&pin const foo); // ok
+    foo_pin_ref(&pin const foo); // ok
+
+    let mut foo = Foo::default();
+    let x = &pin const foo; // ok
+    foo_pin_ref(&pin const foo); // ok
+    foo_pin_ref(x);
+}
+
+fn main() {}
diff --git a/tests/ui/pin-ergonomics/borrow-unpin.unpin.stderr b/tests/ui/pin-ergonomics/borrow-unpin.unpin.stderr
new file mode 100644
index 00000000000..bf9921343ee
--- /dev/null
+++ b/tests/ui/pin-ergonomics/borrow-unpin.unpin.stderr
@@ -0,0 +1,136 @@
+error[E0596]: cannot borrow `foo` as mutable, as it is not declared as mutable
+  --> $DIR/borrow-unpin.rs:38:17
+   |
+LL |     foo_pin_mut(&pin mut foo);
+   |                 ^^^^^^^^^^^^ cannot borrow as mutable
+   |
+help: consider changing this to be mutable
+   |
+LL |     let mut foo = Foo::default();
+   |         +++
+
+error[E0596]: cannot borrow `foo` as mutable, as it is not declared as mutable
+  --> $DIR/borrow-unpin.rs:42:13
+   |
+LL |     let x = &pin mut foo;
+   |             ^^^^^^^^^^^^ cannot borrow as mutable
+   |
+help: consider changing this to be mutable
+   |
+LL |     let mut foo = Foo::default();
+   |         +++
+
+error[E0505]: cannot move out of `foo` because it is borrowed
+  --> $DIR/borrow-unpin.rs:43:14
+   |
+LL |     let foo = Foo::default();
+   |         --- binding `foo` declared here
+LL |     let x = &pin mut foo;
+   |             ------------ borrow of `foo` occurs here
+LL |     foo_move(foo);
+   |              ^^^ move out of `foo` occurs here
+LL |
+LL |     foo_pin_mut(x); //
+   |                 - borrow later used here
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:20:1
+   |
+LL | struct Foo;
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     let x = &pin mut foo;
+   |                      --- you could clone this value
+
+error[E0505]: cannot move out of `foo` because it is borrowed
+  --> $DIR/borrow-unpin.rs:56:14
+   |
+LL |     let mut foo = Foo::default();
+   |         ------- binding `foo` declared here
+LL |     let x = &pin mut foo; // ok
+   |             ------------ borrow of `foo` occurs here
+LL |     foo_move(foo);
+   |              ^^^ move out of `foo` occurs here
+LL |
+LL |     foo_pin_mut(x); //
+   |                 - borrow later used here
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:20:1
+   |
+LL | struct Foo;
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     let x = &pin mut foo; // ok
+   |                      --- you could clone this value
+
+error[E0505]: cannot move out of `foo` because it is borrowed
+  --> $DIR/borrow-unpin.rs:68:14
+   |
+LL |     let foo = Foo::default();
+   |         --- binding `foo` declared here
+LL |     let x = &pin const foo; // ok
+   |             -------------- borrow of `foo` occurs here
+LL |     foo_move(foo);
+   |              ^^^ move out of `foo` occurs here
+LL |
+LL |     foo_pin_ref(x);
+   |                 - borrow later used here
+   |
+note: if `Foo` implemented `Clone`, you could clone the value
+  --> $DIR/borrow-unpin.rs:20:1
+   |
+LL | struct Foo;
+   | ^^^^^^^^^^ consider implementing `Clone` for this type
+...
+LL |     let x = &pin const foo; // ok
+   |                        --- you could clone this value
+
+error[E0502]: cannot borrow `foo` as immutable because it is also borrowed as mutable
+  --> $DIR/borrow-unpin.rs:80:13
+   |
+LL |     let x = &pin mut foo; // ok
+   |             ------------ mutable borrow occurs here
+LL |     foo_ref(&foo);
+   |             ^^^^ immutable borrow occurs here
+LL |
+LL |     foo_pin_mut(x);
+   |                 - mutable borrow later used here
+
+error[E0499]: cannot borrow `foo` as mutable more than once at a time
+  --> $DIR/borrow-unpin.rs:103:17
+   |
+LL |     let x = &pin mut foo; // ok
+   |             ------------ first mutable borrow occurs here
+LL |     foo_pin_mut(&pin mut foo);
+   |                 ^^^^^^^^^^^^ second mutable borrow occurs here
+LL |
+LL |     foo_pin_mut(x);
+   |                 - first borrow later used here
+
+error[E0502]: cannot borrow `foo` as mutable because it is also borrowed as immutable
+  --> $DIR/borrow-unpin.rs:115:17
+   |
+LL |     let x = &pin const foo; // ok
+   |             -------------- immutable borrow occurs here
+LL |     foo_pin_mut(&pin mut foo);
+   |                 ^^^^^^^^^^^^ mutable borrow occurs here
+LL |
+LL |     foo_pin_ref(x);
+   |                 - immutable borrow later used here
+
+error[E0502]: cannot borrow `foo` as immutable because it is also borrowed as mutable
+  --> $DIR/borrow-unpin.rs:127:17
+   |
+LL |     let x = &pin mut foo; // ok
+   |             ------------ mutable borrow occurs here
+LL |     foo_pin_ref(&pin const foo);
+   |                 ^^^^^^^^^^^^^^ immutable borrow occurs here
+LL |
+LL |     foo_pin_mut(x);
+   |                 - mutable borrow later used here
+
+error: aborting due to 9 previous errors
+
+Some errors have detailed explanations: E0499, E0502, E0505, E0596.
+For more information about an error, try `rustc --explain E0499`.
diff --git a/tests/ui/pin-ergonomics/borrow.rs b/tests/ui/pin-ergonomics/borrow.rs
new file mode 100644
index 00000000000..f221165848b
--- /dev/null
+++ b/tests/ui/pin-ergonomics/borrow.rs
@@ -0,0 +1,38 @@
+//@ check-pass
+#![feature(pin_ergonomics)]
+#![allow(dead_code, incomplete_features)]
+
+// Makes sure we can handle `&pin mut place` and `&pin const place` as sugar for
+// `std::pin::pin!(place)` and `Pin::new(&place)`.
+
+use std::pin::Pin;
+
+struct Foo;
+
+fn foo_pin_mut(_: Pin<&mut Foo>) {
+}
+
+fn foo_pin_ref(_: Pin<&Foo>) {
+}
+
+fn bar() {
+    let mut x: Pin<&mut _> = &pin mut Foo;
+    foo_pin_mut(x.as_mut());
+    foo_pin_mut(x.as_mut());
+    foo_pin_ref(x);
+
+    let x: Pin<&_> = &pin const Foo;
+
+    foo_pin_ref(x);
+    foo_pin_ref(x);
+}
+
+fn baz(mut x: Foo, y: Foo) {
+    let _x = &pin mut x;
+    let _x = x; // ok because `Foo: Unpin` and thus `&pin mut x` doesn't move `x`
+
+    let _y = &pin const y;
+    let _y = y; // ok because `&pin const y` dosn't move `y`
+}
+
+fn main() {}
diff --git a/tests/ui/async-await/pin-ergonomics/coerce-non-pointer-pin.rs b/tests/ui/pin-ergonomics/coerce-non-pointer-pin.rs
index a95665f126d..a95665f126d 100644
--- a/tests/ui/async-await/pin-ergonomics/coerce-non-pointer-pin.rs
+++ b/tests/ui/pin-ergonomics/coerce-non-pointer-pin.rs
diff --git a/tests/ui/async-await/pin-ergonomics/coerce-non-pointer-pin.stderr b/tests/ui/pin-ergonomics/coerce-non-pointer-pin.stderr
index 2deb5b09884..2deb5b09884 100644
--- a/tests/ui/async-await/pin-ergonomics/coerce-non-pointer-pin.stderr
+++ b/tests/ui/pin-ergonomics/coerce-non-pointer-pin.stderr
diff --git a/tests/ui/async-await/pin-ergonomics/reborrow-arg.rs b/tests/ui/pin-ergonomics/reborrow-arg.rs
index 2008bd1f52d..2008bd1f52d 100644
--- a/tests/ui/async-await/pin-ergonomics/reborrow-arg.rs
+++ b/tests/ui/pin-ergonomics/reborrow-arg.rs
diff --git a/tests/ui/async-await/pin-ergonomics/reborrow-const-as-mut.rs b/tests/ui/pin-ergonomics/reborrow-const-as-mut.rs
index 27c70a7b4df..27c70a7b4df 100644
--- a/tests/ui/async-await/pin-ergonomics/reborrow-const-as-mut.rs
+++ b/tests/ui/pin-ergonomics/reborrow-const-as-mut.rs
diff --git a/tests/ui/async-await/pin-ergonomics/reborrow-const-as-mut.stderr b/tests/ui/pin-ergonomics/reborrow-const-as-mut.stderr
index 36bbf1c493a..36bbf1c493a 100644
--- a/tests/ui/async-await/pin-ergonomics/reborrow-const-as-mut.stderr
+++ b/tests/ui/pin-ergonomics/reborrow-const-as-mut.stderr
diff --git a/tests/ui/async-await/pin-ergonomics/reborrow-once.rs b/tests/ui/pin-ergonomics/reborrow-once.rs
index 241efadef7d..241efadef7d 100644
--- a/tests/ui/async-await/pin-ergonomics/reborrow-once.rs
+++ b/tests/ui/pin-ergonomics/reborrow-once.rs
diff --git a/tests/ui/async-await/pin-ergonomics/reborrow-once.stderr b/tests/ui/pin-ergonomics/reborrow-once.stderr
index dc8e424ad2a..dc8e424ad2a 100644
--- a/tests/ui/async-await/pin-ergonomics/reborrow-once.stderr
+++ b/tests/ui/pin-ergonomics/reborrow-once.stderr
diff --git a/tests/ui/async-await/pin-ergonomics/reborrow-self.rs b/tests/ui/pin-ergonomics/reborrow-self.rs
index ee617617da0..ee617617da0 100644
--- a/tests/ui/async-await/pin-ergonomics/reborrow-self.rs
+++ b/tests/ui/pin-ergonomics/reborrow-self.rs
diff --git a/tests/ui/async-await/pin-ergonomics/reborrow-shorter.rs b/tests/ui/pin-ergonomics/reborrow-shorter.rs
index 06c266e0035..06c266e0035 100644
--- a/tests/ui/async-await/pin-ergonomics/reborrow-shorter.rs
+++ b/tests/ui/pin-ergonomics/reborrow-shorter.rs
diff --git a/tests/ui/async-await/pin-ergonomics/sugar-ambiguity.rs b/tests/ui/pin-ergonomics/sugar-ambiguity.rs
index d183000931e..d183000931e 100644
--- a/tests/ui/async-await/pin-ergonomics/sugar-ambiguity.rs
+++ b/tests/ui/pin-ergonomics/sugar-ambiguity.rs
diff --git a/tests/ui/async-await/pin-ergonomics/sugar-no-const.rs b/tests/ui/pin-ergonomics/sugar-no-const.rs
index dd6456b6034..dd6456b6034 100644
--- a/tests/ui/async-await/pin-ergonomics/sugar-no-const.rs
+++ b/tests/ui/pin-ergonomics/sugar-no-const.rs
diff --git a/tests/ui/async-await/pin-ergonomics/sugar-no-const.stderr b/tests/ui/pin-ergonomics/sugar-no-const.stderr
index 062b6d3f487..062b6d3f487 100644
--- a/tests/ui/async-await/pin-ergonomics/sugar-no-const.stderr
+++ b/tests/ui/pin-ergonomics/sugar-no-const.stderr
diff --git a/tests/ui/async-await/pin-ergonomics/sugar-self.rs b/tests/ui/pin-ergonomics/sugar-self.rs
index 3d71b54b1ae..3d71b54b1ae 100644
--- a/tests/ui/async-await/pin-ergonomics/sugar-self.rs
+++ b/tests/ui/pin-ergonomics/sugar-self.rs
diff --git a/tests/ui/async-await/pin-ergonomics/sugar.rs b/tests/ui/pin-ergonomics/sugar.rs
index 8dbdec418b1..8dbdec418b1 100644
--- a/tests/ui/async-await/pin-ergonomics/sugar.rs
+++ b/tests/ui/pin-ergonomics/sugar.rs
diff --git a/tests/ui/print-calling-conventions.stdout b/tests/ui/print-calling-conventions.stdout
index 7b5ae495660..b8b939e1c04 100644
--- a/tests/ui/print-calling-conventions.stdout
+++ b/tests/ui/print-calling-conventions.stdout
@@ -1,6 +1,4 @@
 C
-C-cmse-nonsecure-call
-C-cmse-nonsecure-entry
 C-unwind
 Rust
 aapcs
@@ -9,6 +7,8 @@ avr-interrupt
 avr-non-blocking-interrupt
 cdecl
 cdecl-unwind
+cmse-nonsecure-call
+cmse-nonsecure-entry
 custom
 efiapi
 fastcall
@@ -20,6 +20,7 @@ riscv-interrupt-m
 riscv-interrupt-s
 rust-call
 rust-cold
+rust-invalid
 stdcall
 stdcall-unwind
 system
diff --git a/tests/ui/range/range-1.stderr b/tests/ui/range/range-1.stderr
index 37669dd3f47..8878ba14309 100644
--- a/tests/ui/range/range-1.stderr
+++ b/tests/ui/range/range-1.stderr
@@ -10,16 +10,6 @@ error[E0277]: the trait bound `bool: Step` is not satisfied
 LL |     for i in false..true {}
    |              ^^^^^^^^^^^ the trait `Step` is not implemented for `bool`
    |
-   = help: the following other types implement trait `Step`:
-             Char
-             Ipv4Addr
-             Ipv6Addr
-             char
-             i128
-             i16
-             i32
-             i64
-           and 8 others
    = note: required for `std::ops::Range<bool>` to implement `Iterator`
    = note: required for `std::ops::Range<bool>` to implement `IntoIterator`
 
diff --git a/tests/ui/recursion/recursive-static-definition.rs b/tests/ui/recursion/recursive-static-definition.rs
index 55db6a86bf1..4f0624eb162 100644
--- a/tests/ui/recursion/recursive-static-definition.rs
+++ b/tests/ui/recursion/recursive-static-definition.rs
@@ -1,5 +1,5 @@
 pub static FOO: u32 = FOO;
-//~^ ERROR encountered static that tried to initialize itself with itself
+//~^ ERROR encountered static that tried to access itself during initialization
 
 #[derive(Copy, Clone)]
 pub union Foo {
@@ -7,6 +7,6 @@ pub union Foo {
 }
 
 pub static BAR: Foo = BAR;
-//~^ ERROR encountered static that tried to initialize itself with itself
+//~^ ERROR encountered static that tried to access itself during initialization
 
 fn main() {}
diff --git a/tests/ui/recursion/recursive-static-definition.stderr b/tests/ui/recursion/recursive-static-definition.stderr
index ce93c41bc67..1e4005832cb 100644
--- a/tests/ui/recursion/recursive-static-definition.stderr
+++ b/tests/ui/recursion/recursive-static-definition.stderr
@@ -1,10 +1,10 @@
-error[E0080]: encountered static that tried to initialize itself with itself
+error[E0080]: encountered static that tried to access itself during initialization
   --> $DIR/recursive-static-definition.rs:1:23
    |
 LL | pub static FOO: u32 = FOO;
    |                       ^^^ evaluation of `FOO` failed here
 
-error[E0080]: encountered static that tried to initialize itself with itself
+error[E0080]: encountered static that tried to access itself during initialization
   --> $DIR/recursive-static-definition.rs:9:23
    |
 LL | pub static BAR: Foo = BAR;
diff --git a/tests/ui/regions/regions-in-enums.stderr b/tests/ui/regions/regions-in-enums.stderr
index 66537653291..449763e8b59 100644
--- a/tests/ui/regions/regions-in-enums.stderr
+++ b/tests/ui/regions/regions-in-enums.stderr
@@ -1,18 +1,24 @@
 error[E0261]: use of undeclared lifetime name `'foo`
   --> $DIR/regions-in-enums.rs:13:9
    |
-LL | enum No0 {
-   |         - help: consider introducing lifetime `'foo` here: `<'foo>`
 LL |     X5(&'foo usize)
    |         ^^^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'foo` here
+   |
+LL | enum No0<'foo> {
+   |         ++++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/regions-in-enums.rs:17:9
    |
-LL | enum No1 {
-   |         - help: consider introducing lifetime `'a` here: `<'a>`
 LL |     X6(&'a usize)
    |         ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | enum No1<'a> {
+   |         ++++
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/regions/regions-in-structs.stderr b/tests/ui/regions/regions-in-structs.stderr
index 5dfdc2ee93b..c34b1ffca64 100644
--- a/tests/ui/regions/regions-in-structs.stderr
+++ b/tests/ui/regions/regions-in-structs.stderr
@@ -1,19 +1,24 @@
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/regions-in-structs.rs:10:9
    |
-LL | struct StructDecl {
-   |                  - help: consider introducing lifetime `'a` here: `<'a>`
 LL |     a: &'a isize,
    |         ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | struct StructDecl<'a> {
+   |                  ++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/regions-in-structs.rs:11:9
    |
-LL | struct StructDecl {
-   |                  - help: consider introducing lifetime `'a` here: `<'a>`
-LL |     a: &'a isize,
 LL |     b: &'a isize,
    |         ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | struct StructDecl<'a> {
+   |                  ++++
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/regions/regions-name-undeclared.stderr b/tests/ui/regions/regions-name-undeclared.stderr
index 532603de5f7..06e6f4299de 100644
--- a/tests/ui/regions/regions-name-undeclared.stderr
+++ b/tests/ui/regions/regions-name-undeclared.stderr
@@ -50,9 +50,12 @@ LL | fn bar<'a>(x: &'a isize) {
    |        -- lifetime parameter from outer item
 ...
 LL |     type X = Option<&'a isize>;
-   |           -          ^^ use of generic parameter from outer item
-   |           |
-   |           help: consider introducing lifetime `'a` here: `<'a>`
+   |                      ^^ use of generic parameter from outer item
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL |     type X<'a> = Option<&'a isize>;
+   |           ++++
 
 error[E0401]: can't use generic parameters from outer item
   --> $DIR/regions-name-undeclared.rs:28:13
@@ -60,10 +63,13 @@ error[E0401]: can't use generic parameters from outer item
 LL | fn bar<'a>(x: &'a isize) {
    |        -- lifetime parameter from outer item
 ...
-LL |     enum E {
-   |           - help: consider introducing lifetime `'a` here: `<'a>`
 LL |         E1(&'a isize)
    |             ^^ use of generic parameter from outer item
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL |     enum E<'a> {
+   |           ++++
 
 error[E0401]: can't use generic parameters from outer item
   --> $DIR/regions-name-undeclared.rs:31:13
@@ -71,10 +77,13 @@ error[E0401]: can't use generic parameters from outer item
 LL | fn bar<'a>(x: &'a isize) {
    |        -- lifetime parameter from outer item
 ...
-LL |     struct S {
-   |             - help: consider introducing lifetime `'a` here: `<'a>`
 LL |         f: &'a isize
    |             ^^ use of generic parameter from outer item
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL |     struct S<'a> {
+   |             ++++
 
 error[E0401]: can't use generic parameters from outer item
   --> $DIR/regions-name-undeclared.rs:33:14
@@ -83,17 +92,23 @@ LL | fn bar<'a>(x: &'a isize) {
    |        -- lifetime parameter from outer item
 ...
 LL |     fn f(a: &'a isize) { }
-   |         -    ^^ use of generic parameter from outer item
-   |         |
-   |         help: consider introducing lifetime `'a` here: `<'a>`
+   |              ^^ use of generic parameter from outer item
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL |     fn f<'a>(a: &'a isize) { }
+   |         ++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/regions-name-undeclared.rs:41:17
    |
 LL | fn fn_types(a: &'a isize,
-   |            -    ^^ undeclared lifetime
-   |            |
-   |            help: consider introducing lifetime `'a` here: `<'a>`
+   |                 ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | fn fn_types<'a>(a: &'a isize,
+   |            ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/regions-name-undeclared.rs:43:36
@@ -129,11 +144,13 @@ LL | fn fn_types<'b>(a: &'a isize,
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/regions-name-undeclared.rs:47:17
    |
-LL | fn fn_types(a: &'a isize,
-   |            - help: consider introducing lifetime `'a` here: `<'a>`
-...
 LL |             c: &'a isize)
    |                 ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | fn fn_types<'a>(a: &'a isize,
+   |            ++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/regions-name-undeclared.rs:53:31
diff --git a/tests/ui/regions/regions-undeclared.stderr b/tests/ui/regions/regions-undeclared.stderr
index 6bfde5524ac..2bc0f184803 100644
--- a/tests/ui/regions/regions-undeclared.stderr
+++ b/tests/ui/regions/regions-undeclared.stderr
@@ -7,35 +7,46 @@ LL | static c_x: &'blk isize = &22;
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/regions-undeclared.rs:4:10
    |
-LL | enum EnumDecl {
-   |              - help: consider introducing lifetime `'a` here: `<'a>`
 LL |     Foo(&'a isize),
    |          ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | enum EnumDecl<'a> {
+   |              ++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/regions-undeclared.rs:5:10
    |
-LL | enum EnumDecl {
-   |              - help: consider introducing lifetime `'a` here: `<'a>`
-LL |     Foo(&'a isize),
 LL |     Bar(&'a isize),
    |          ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | enum EnumDecl<'a> {
+   |              ++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/regions-undeclared.rs:8:15
    |
 LL | fn fnDecl(x: &'a isize,
-   |          -    ^^ undeclared lifetime
-   |          |
-   |          help: consider introducing lifetime `'a` here: `<'a>`
+   |               ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | fn fnDecl<'a>(x: &'a isize,
+   |          ++++
 
 error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/regions-undeclared.rs:9:15
    |
-LL | fn fnDecl(x: &'a isize,
-   |          - help: consider introducing lifetime `'a` here: `<'a>`
 LL |           y: &'a isize)
    |               ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | fn fnDecl<'a>(x: &'a isize,
+   |          ++++
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/repr/repr.stderr b/tests/ui/repr/repr.stderr
index f3b11398eaa..9e581332278 100644
--- a/tests/ui/repr/repr.stderr
+++ b/tests/ui/repr/repr.stderr
@@ -5,7 +5,7 @@ LL | #[repr]
    | ^^^^^^^
    | |
    | expected this to be a list
-   | help: must be of the form: `#[repr(C)]`
+   | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
 
 error[E0539]: malformed `repr` attribute input
   --> $DIR/repr.rs:4:1
@@ -14,7 +14,7 @@ LL | #[repr = "B"]
    | ^^^^^^^^^^^^^
    | |
    | expected this to be a list
-   | help: must be of the form: `#[repr(C)]`
+   | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
 
 error[E0539]: malformed `repr` attribute input
   --> $DIR/repr.rs:7:1
@@ -23,7 +23,7 @@ LL | #[repr = "C"]
    | ^^^^^^^^^^^^^
    | |
    | expected this to be a list
-   | help: must be of the form: `#[repr(C)]`
+   | help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/rfcs/rfc-2091-track-caller/error-odd-syntax.stderr b/tests/ui/rfcs/rfc-2091-track-caller/error-odd-syntax.stderr
index e22d812c8b0..6088945b829 100644
--- a/tests/ui/rfcs/rfc-2091-track-caller/error-odd-syntax.stderr
+++ b/tests/ui/rfcs/rfc-2091-track-caller/error-odd-syntax.stderr
@@ -1,8 +1,12 @@
-error: malformed `track_caller` attribute input
+error[E0565]: malformed `track_caller` attribute input
   --> $DIR/error-odd-syntax.rs:1:1
    |
 LL | #[track_caller(1)]
-   | ^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[track_caller]`
+   | ^^^^^^^^^^^^^^---^
+   | |             |
+   | |             didn't expect any arguments here
+   | help: must be of the form: `#[track_caller]`
 
 error: aborting due to 1 previous error
 
+For more information about this error, try `rustc --explain E0565`.
diff --git a/tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.stderr b/tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.stderr
index d3cafbc6350..30360806138 100644
--- a/tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.stderr
+++ b/tests/ui/rfcs/rfc-2091-track-caller/error-with-naked.stderr
@@ -1,17 +1,17 @@
 error[E0736]: attribute incompatible with `#[unsafe(naked)]`
-  --> $DIR/error-with-naked.rs:5:1
+  --> $DIR/error-with-naked.rs:5:3
    |
 LL | #[track_caller]
-   | ^^^^^^^^^^^^^^^ the `track_caller` attribute is incompatible with `#[unsafe(naked)]`
+   |   ^^^^^^^^^^^^ the `track_caller` attribute is incompatible with `#[unsafe(naked)]`
 LL |
 LL | #[unsafe(naked)]
    | ---------------- function marked with `#[unsafe(naked)]` here
 
 error[E0736]: attribute incompatible with `#[unsafe(naked)]`
-  --> $DIR/error-with-naked.rs:17:5
+  --> $DIR/error-with-naked.rs:17:7
    |
 LL |     #[track_caller]
-   |     ^^^^^^^^^^^^^^^ the `track_caller` attribute is incompatible with `#[unsafe(naked)]`
+   |       ^^^^^^^^^^^^ the `track_caller` attribute is incompatible with `#[unsafe(naked)]`
 LL |
 LL |     #[unsafe(naked)]
    |     ---------------- function marked with `#[unsafe(naked)]` here
diff --git a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-ref-impl.rs b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-ref-impl.rs
new file mode 100644
index 00000000000..c6e38c0758d
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-ref-impl.rs
@@ -0,0 +1,17 @@
+/// Check that only `&X: Debug` is required, not `X: Debug`
+//@check-pass
+
+use std::fmt::Debug;
+use std::fmt::Formatter;
+
+struct X;
+
+impl Debug for &X {
+    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), std::fmt::Error> {
+        f.write_str("X")
+    }
+}
+
+fn main() {
+    dbg!(X);
+}
diff --git a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs
index f2fb62d76f3..fe71f106fdf 100644
--- a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs
+++ b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs
@@ -1,4 +1,7 @@
 // Test ensuring that `dbg!(expr)` requires the passed type to implement `Debug`.
+//
+// `dbg!` shouldn't tell the user about format literal syntax; the user didn't write one.
+//@ forbid-output: cannot be formatted using
 
 struct NotDebug;
 
diff --git a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr
index 7ec018a95cc..4e0ae918415 100644
--- a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr
+++ b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr
@@ -1,12 +1,11 @@
 error[E0277]: `NotDebug` doesn't implement `Debug`
-  --> $DIR/dbg-macro-requires-debug.rs:6:23
+  --> $DIR/dbg-macro-requires-debug.rs:9:23
    |
 LL |     let _: NotDebug = dbg!(NotDebug);
-   |                       ^^^^^^^^^^^^^^ `NotDebug` cannot be formatted using `{:?}`
+   |                       ^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `NotDebug`
    |
-   = help: the trait `Debug` is not implemented for `NotDebug`
    = note: add `#[derive(Debug)]` to `NotDebug` or manually `impl Debug for NotDebug`
-   = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: this error originates in the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `NotDebug` with `#[derive(Debug)]`
    |
 LL + #[derive(Debug)]
diff --git a/tests/ui/rustdoc/renamed-features-rustdoc_internals.rs b/tests/ui/rustdoc/renamed-features-rustdoc_internals.rs
index 2257130280d..739c624d0c6 100644
--- a/tests/ui/rustdoc/renamed-features-rustdoc_internals.rs
+++ b/tests/ui/rustdoc/renamed-features-rustdoc_internals.rs
@@ -1,5 +1,3 @@
-//@ normalize-stderr: "you are using [0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?( \([^)]*\))?" -> "you are using $$RUSTC_VERSION"
-
 #![feature(doc_keyword)] //~ ERROR
 #![feature(doc_primitive)] //~ ERROR
 #![crate_type = "lib"]
diff --git a/tests/ui/rustdoc/renamed-features-rustdoc_internals.stderr b/tests/ui/rustdoc/renamed-features-rustdoc_internals.stderr
index 9c664da8ee6..0608a8b58a2 100644
--- a/tests/ui/rustdoc/renamed-features-rustdoc_internals.stderr
+++ b/tests/ui/rustdoc/renamed-features-rustdoc_internals.stderr
@@ -1,19 +1,19 @@
 error[E0557]: feature has been removed
-  --> $DIR/renamed-features-rustdoc_internals.rs:3:12
+  --> $DIR/renamed-features-rustdoc_internals.rs:1:12
    |
 LL | #![feature(doc_keyword)]
    |            ^^^^^^^^^^^ feature has been removed
    |
-   = note: removed in 1.58.0 (you are using $RUSTC_VERSION); see <https://github.com/rust-lang/rust/pull/90420> for more information
+   = note: removed in 1.58.0; see <https://github.com/rust-lang/rust/pull/90420> for more information
    = note: merged into `#![feature(rustdoc_internals)]`
 
 error[E0557]: feature has been removed
-  --> $DIR/renamed-features-rustdoc_internals.rs:4:12
+  --> $DIR/renamed-features-rustdoc_internals.rs:2:12
    |
 LL | #![feature(doc_primitive)]
    |            ^^^^^^^^^^^^^ feature has been removed
    |
-   = note: removed in 1.58.0 (you are using $RUSTC_VERSION); see <https://github.com/rust-lang/rust/pull/90420> for more information
+   = note: removed in 1.58.0; see <https://github.com/rust-lang/rust/pull/90420> for more information
    = note: merged into `#![feature(rustdoc_internals)]`
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/sanitizer/cfi/invalid-attr-encoding.rs b/tests/ui/sanitizer/cfi/invalid-attr-encoding.rs
index 7ef6bd2f0ac..23ffabad62f 100644
--- a/tests/ui/sanitizer/cfi/invalid-attr-encoding.rs
+++ b/tests/ui/sanitizer/cfi/invalid-attr-encoding.rs
@@ -7,5 +7,5 @@
 #![no_core]
 #![no_main]
 
-#[cfi_encoding] //~ERROR 10:1: 10:16: malformed `cfi_encoding` attribute input
+#[cfi_encoding] //~ ERROR malformed `cfi_encoding` attribute input
 pub struct Type1(i32);
diff --git a/tests/ui/self/self-infer.stderr b/tests/ui/self/self-infer.stderr
index c6bdff22b69..f9db559390f 100644
--- a/tests/ui/self/self-infer.stderr
+++ b/tests/ui/self/self-infer.stderr
@@ -3,24 +3,12 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
    |
 LL |     fn f(self: _) {}
    |                ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn f(self: _) {}
-LL +     fn f<T>(self: T) {}
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/self-infer.rs:5:17
    |
 LL |     fn g(self: &_) {}
    |                 ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn g(self: &_) {}
-LL +     fn g<T>(self: &T) {}
-   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/sized-hierarchy/reject-dyn-pointeesized.rs b/tests/ui/sized-hierarchy/reject-dyn-pointeesized.rs
new file mode 100644
index 00000000000..ece1702679d
--- /dev/null
+++ b/tests/ui/sized-hierarchy/reject-dyn-pointeesized.rs
@@ -0,0 +1,16 @@
+#![feature(sized_hierarchy)]
+
+use std::marker::PointeeSized;
+
+type Foo = dyn PointeeSized;
+//~^ ERROR `PointeeSized` cannot be used with trait objects
+
+fn foo(f: &Foo) {}
+
+fn main() {
+    foo(&());
+
+    let x = main;
+    let y: Box<dyn PointeeSized> = x;
+//~^ ERROR `PointeeSized` cannot be used with trait objects
+}
diff --git a/tests/ui/sized-hierarchy/reject-dyn-pointeesized.stderr b/tests/ui/sized-hierarchy/reject-dyn-pointeesized.stderr
new file mode 100644
index 00000000000..a833c6952fd
--- /dev/null
+++ b/tests/ui/sized-hierarchy/reject-dyn-pointeesized.stderr
@@ -0,0 +1,14 @@
+error: `PointeeSized` cannot be used with trait objects
+  --> $DIR/reject-dyn-pointeesized.rs:5:12
+   |
+LL | type Foo = dyn PointeeSized;
+   |            ^^^^^^^^^^^^^^^^
+
+error: `PointeeSized` cannot be used with trait objects
+  --> $DIR/reject-dyn-pointeesized.rs:14:16
+   |
+LL |     let y: Box<dyn PointeeSized> = x;
+   |                ^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/span/issue-71363.stderr b/tests/ui/span/issue-71363.stderr
index 90b623e89cf..31069914daa 100644
--- a/tests/ui/span/issue-71363.stderr
+++ b/tests/ui/span/issue-71363.stderr
@@ -2,10 +2,8 @@ error[E0277]: `MyError` doesn't implement `std::fmt::Display`
  --> $DIR/issue-71363.rs:4:28
   |
 4 | impl std::error::Error for MyError {}
-  |                            ^^^^^^^ `MyError` cannot be formatted with the default formatter
+  |                            ^^^^^^^ the trait `std::fmt::Display` is not implemented for `MyError`
   |
-  = help: the trait `std::fmt::Display` is not implemented for `MyError`
-  = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `std::error::Error`
  --> $SRC_DIR/core/src/error.rs:LL:COL
 
@@ -13,9 +11,8 @@ error[E0277]: `MyError` doesn't implement `Debug`
  --> $DIR/issue-71363.rs:4:28
   |
 4 | impl std::error::Error for MyError {}
-  |                            ^^^^^^^ `MyError` cannot be formatted using `{:?}`
+  |                            ^^^^^^^ the trait `Debug` is not implemented for `MyError`
   |
-  = help: the trait `Debug` is not implemented for `MyError`
   = note: add `#[derive(Debug)]` to `MyError` or manually `impl Debug for MyError`
 note: required by a bound in `std::error::Error`
  --> $SRC_DIR/core/src/error.rs:LL:COL
diff --git a/tests/ui/specialization/const_trait_impl.rs b/tests/ui/specialization/const_trait_impl.rs
index d842601a6b7..2df92dfad3b 100644
--- a/tests/ui/specialization/const_trait_impl.rs
+++ b/tests/ui/specialization/const_trait_impl.rs
@@ -10,7 +10,7 @@ pub unsafe trait Sup {
 
 #[rustc_specialization_trait]
 #[const_trait]
-pub unsafe trait Sub: ~const Sup {}
+pub unsafe trait Sub: [const] Sup {}
 
 unsafe impl const Sup for u8 {
     default fn foo() -> u32 {
@@ -31,19 +31,19 @@ pub trait A {
     fn a() -> u32;
 }
 
-impl<T: ~const Default> const A for T {
+impl<T: [const] Default> const A for T {
     default fn a() -> u32 {
         2
     }
 }
 
-impl<T: ~const Default + ~const Sup> const A for T {
+impl<T: [const] Default + [const] Sup> const A for T {
     default fn a() -> u32 {
         3
     }
 }
 
-impl<T: ~const Default + ~const Sub> const A for T {
+impl<T: [const] Default + [const] Sub> const A for T {
     fn a() -> u32 {
         T::foo()
     }
diff --git a/tests/ui/specialization/const_trait_impl.stderr b/tests/ui/specialization/const_trait_impl.stderr
index 3e1260ff09c..d36a0a1c2dc 100644
--- a/tests/ui/specialization/const_trait_impl.stderr
+++ b/tests/ui/specialization/const_trait_impl.stderr
@@ -1,57 +1,57 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const_trait_impl.rs:34:9
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const_trait_impl.rs:34:7
    |
-LL | impl<T: ~const Default> const A for T {
-   |         ^^^^^^ can't be applied to `Default`
+LL | impl<T: [const] Default> const A for T {
+   |       ^^^^^^^^^ can't be applied to `Default`
    |
-note: `Default` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/default.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const_trait_impl.rs:40:9
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const_trait_impl.rs:40:7
    |
-LL | impl<T: ~const Default + ~const Sup> const A for T {
-   |         ^^^^^^ can't be applied to `Default`
+LL | impl<T: [const] Default + [const] Sup> const A for T {
+   |       ^^^^^^^^^ can't be applied to `Default`
    |
-note: `Default` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/default.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const_trait_impl.rs:46:9
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const_trait_impl.rs:46:7
    |
-LL | impl<T: ~const Default + ~const Sub> const A for T {
-   |         ^^^^^^ can't be applied to `Default`
+LL | impl<T: [const] Default + [const] Sub> const A for T {
+   |       ^^^^^^^^^ can't be applied to `Default`
    |
-note: `Default` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/default.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const_trait_impl.rs:40:9
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const_trait_impl.rs:40:7
    |
-LL | impl<T: ~const Default + ~const Sup> const A for T {
-   |         ^^^^^^ can't be applied to `Default`
+LL | impl<T: [const] Default + [const] Sup> const A for T {
+   |       ^^^^^^^^^ can't be applied to `Default`
    |
-note: `Default` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/default.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const_trait_impl.rs:34:9
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const_trait_impl.rs:34:7
    |
-LL | impl<T: ~const Default> const A for T {
-   |         ^^^^^^ can't be applied to `Default`
+LL | impl<T: [const] Default> const A for T {
+   |       ^^^^^^^^^ can't be applied to `Default`
    |
-note: `Default` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/default.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const_trait_impl.rs:46:9
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const_trait_impl.rs:46:7
    |
-LL | impl<T: ~const Default + ~const Sub> const A for T {
-   |         ^^^^^^ can't be applied to `Default`
+LL | impl<T: [const] Default + [const] Sub> const A for T {
+   |       ^^^^^^^^^ can't be applied to `Default`
    |
-note: `Default` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Default` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/default.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
diff --git a/tests/ui/statics/check-immutable-mut-slices.rs b/tests/ui/statics/check-immutable-mut-slices.rs
index 8f9680778aa..19545a1c925 100644
--- a/tests/ui/statics/check-immutable-mut-slices.rs
+++ b/tests/ui/statics/check-immutable-mut-slices.rs
@@ -1,6 +1,6 @@
 // Checks that immutable static items can't have mutable slices
 
 static TEST: &'static mut [isize] = &mut [];
-//~^ ERROR mutable references are not allowed
+//~^ ERROR mutable borrows of temporaries
 
 pub fn main() { }
diff --git a/tests/ui/statics/check-immutable-mut-slices.stderr b/tests/ui/statics/check-immutable-mut-slices.stderr
index 5cb35a7c21e..a9486fc9d78 100644
--- a/tests/ui/statics/check-immutable-mut-slices.stderr
+++ b/tests/ui/statics/check-immutable-mut-slices.stderr
@@ -1,8 +1,12 @@
-error[E0764]: mutable references are not allowed in the final value of statics
+error[E0764]: mutable borrows of temporaries that have their lifetime extended until the end of the program are not allowed
   --> $DIR/check-immutable-mut-slices.rs:3:37
    |
 LL | static TEST: &'static mut [isize] = &mut [];
-   |                                     ^^^^^^^
+   |                                     ^^^^^^^ this mutable borrow refers to such a temporary
+   |
+   = note: Temporaries in constants and statics can have their lifetime extended until the end of the program
+   = note: To avoid accidentally creating global mutable state, such temporaries must be immutable
+   = help: If you really want global mutable state, try replacing the temporary by an interior mutable `static` or a `static mut`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/statics/missing_lifetime.stderr b/tests/ui/statics/missing_lifetime.stderr
index e23b27f7a6a..102670c3642 100644
--- a/tests/ui/statics/missing_lifetime.stderr
+++ b/tests/ui/statics/missing_lifetime.stderr
@@ -2,9 +2,12 @@ error[E0261]: use of undeclared lifetime name `'reborrow`
   --> $DIR/missing_lifetime.rs:4:15
    |
 LL | struct Slice(&'reborrow [&'static [u8]]);
-   |             - ^^^^^^^^^ undeclared lifetime
-   |             |
-   |             help: consider introducing lifetime `'reborrow` here: `<'reborrow>`
+   |               ^^^^^^^^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'reborrow` here
+   |
+LL | struct Slice<'reborrow>(&'reborrow [&'static [u8]]);
+   |             +++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/statics/read_before_init.rs b/tests/ui/statics/read_before_init.rs
new file mode 100644
index 00000000000..32cc2554e1a
--- /dev/null
+++ b/tests/ui/statics/read_before_init.rs
@@ -0,0 +1,24 @@
+//! This test checks the one code path that does not go through
+//! the regular CTFE memory access (as an optimization). We forgot
+//! to duplicate the static item self-initialization check, allowing
+//! reading from the uninitialized static memory before it was
+//! initialized at the end of the static initializer.
+//!
+//! https://github.com/rust-lang/rust/issues/142532
+
+use std::mem::MaybeUninit;
+
+pub static X: (i32, MaybeUninit<i32>) = (1, foo(&X.0, 1));
+//~^ ERROR: encountered static that tried to access itself during initialization
+pub static Y: (i32, MaybeUninit<i32>) = (1, foo(&Y.0, 0));
+//~^ ERROR: encountered static that tried to access itself during initialization
+
+const fn foo(x: &i32, num: usize) -> MaybeUninit<i32> {
+    let mut temp = MaybeUninit::<i32>::uninit();
+    unsafe {
+        std::ptr::copy(x, temp.as_mut_ptr(), num);
+    }
+    temp
+}
+
+fn main() {}
diff --git a/tests/ui/statics/read_before_init.stderr b/tests/ui/statics/read_before_init.stderr
new file mode 100644
index 00000000000..239568c1205
--- /dev/null
+++ b/tests/ui/statics/read_before_init.stderr
@@ -0,0 +1,31 @@
+error[E0080]: encountered static that tried to access itself during initialization
+  --> $DIR/read_before_init.rs:11:45
+   |
+LL | pub static X: (i32, MaybeUninit<i32>) = (1, foo(&X.0, 1));
+   |                                             ^^^^^^^^^^^^ evaluation of `X` failed inside this call
+   |
+note: inside `foo`
+  --> $DIR/read_before_init.rs:19:9
+   |
+LL |         std::ptr::copy(x, temp.as_mut_ptr(), num);
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: inside `std::ptr::copy::<i32>`
+  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+
+error[E0080]: encountered static that tried to access itself during initialization
+  --> $DIR/read_before_init.rs:13:45
+   |
+LL | pub static Y: (i32, MaybeUninit<i32>) = (1, foo(&Y.0, 0));
+   |                                             ^^^^^^^^^^^^ evaluation of `Y` failed inside this call
+   |
+note: inside `foo`
+  --> $DIR/read_before_init.rs:19:9
+   |
+LL |         std::ptr::copy(x, temp.as_mut_ptr(), num);
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: inside `std::ptr::copy::<i32>`
+  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/stats/input-stats.rs b/tests/ui/stats/input-stats.rs
index e760e2894e3..4e8e25eb736 100644
--- a/tests/ui/stats/input-stats.rs
+++ b/tests/ui/stats/input-stats.rs
@@ -1,6 +1,7 @@
 //@ check-pass
 //@ compile-flags: -Zinput-stats
 //@ only-64bit
+//@ needs-asm-support
 // layout randomization affects the hir stat output
 //@ needs-deterministic-layouts
 //
@@ -49,5 +50,7 @@ fn main() {
         _ => {}
     }
 
-    unsafe { asm!("mov rdi, 1"); }
+    // NOTE(workingjubilee): do GPUs support NOPs? remove this cfg if they do
+    #[cfg(not(any(target_arch = "nvptx64", target_arch = "amdgpu")))]
+    unsafe { asm!("nop"); }
 }
diff --git a/tests/ui/stats/input-stats.stderr b/tests/ui/stats/input-stats.stderr
index 88f91bef30b..eb038bbcaf1 100644
--- a/tests/ui/stats/input-stats.stderr
+++ b/tests/ui/stats/input-stats.stderr
@@ -1,52 +1,7 @@
-ast-stats POST EXPANSION AST STATS
+ast-stats ================================================================
+ast-stats POST EXPANSION AST STATS: input_stats
 ast-stats Name                Accumulated Size         Count     Item Size
 ast-stats ----------------------------------------------------------------
-ast-stats Crate                     40 (NN.N%)             1            40
-ast-stats GenericArgs               40 (NN.N%)             1            40
-ast-stats - AngleBracketed            40 (NN.N%)             1
-ast-stats ExprField                 48 (NN.N%)             1            48
-ast-stats WherePredicate            72 (NN.N%)             1            72
-ast-stats - BoundPredicate            72 (NN.N%)             1
-ast-stats ForeignItem               80 (NN.N%)             1            80
-ast-stats - Fn                        80 (NN.N%)             1
-ast-stats Arm                       96 (NN.N%)             2            48
-ast-stats Local                     96 (NN.N%)             1            96
-ast-stats FnDecl                   120 (NN.N%)             5            24
-ast-stats InlineAsm                120 (NN.N%)             1           120
-ast-stats Attribute                128 (NN.N%)             4            32
-ast-stats - DocComment                32 (NN.N%)             1
-ast-stats - Normal                    96 (NN.N%)             3
-ast-stats Param                    160 (NN.N%)             4            40
-ast-stats Stmt                     160 (NN.N%)             5            32
-ast-stats - Let                       32 (NN.N%)             1
-ast-stats - Semi                      32 (NN.N%)             1
-ast-stats - Expr                      96 (NN.N%)             3
-ast-stats Block                    192 (NN.N%)             6            32
-ast-stats FieldDef                 208 (NN.N%)             2           104
-ast-stats Variant                  208 (NN.N%)             2           104
-ast-stats AssocItem                320 (NN.N%)             4            80
-ast-stats - Fn                       160 (NN.N%)             2
-ast-stats - Type                     160 (NN.N%)             2
-ast-stats GenericBound             352 (NN.N%)             4            88
-ast-stats - Trait                    352 (NN.N%)             4
-ast-stats GenericParam             480 (NN.N%)             5            96
-ast-stats Pat                      504 (NN.N%)             7            72
-ast-stats - Struct                    72 (NN.N%)             1
-ast-stats - Wild                      72 (NN.N%)             1
-ast-stats - Ident                    360 (NN.N%)             5
-ast-stats Expr                     648 (NN.N%)             9            72
-ast-stats - InlineAsm                 72 (NN.N%)             1
-ast-stats - Match                     72 (NN.N%)             1
-ast-stats - Path                      72 (NN.N%)             1
-ast-stats - Struct                    72 (NN.N%)             1
-ast-stats - Lit                      144 (NN.N%)             2
-ast-stats - Block                    216 (NN.N%)             3
-ast-stats PathSegment              864 (NN.N%)            36            24
-ast-stats Ty                       896 (NN.N%)            14            64
-ast-stats - Ptr                       64 (NN.N%)             1
-ast-stats - Ref                       64 (NN.N%)             1
-ast-stats - ImplicitSelf             128 (NN.N%)             2
-ast-stats - Path                     640 (NN.N%)            10
 ast-stats Item                   1_584 (NN.N%)            11           144
 ast-stats - Enum                     144 (NN.N%)             1
 ast-stats - ExternCrate              144 (NN.N%)             1
@@ -55,57 +10,61 @@ ast-stats - Impl                     144 (NN.N%)             1
 ast-stats - Trait                    144 (NN.N%)             1
 ast-stats - Fn                       288 (NN.N%)             2
 ast-stats - Use                      576 (NN.N%)             4
+ast-stats Ty                       896 (NN.N%)            14            64
+ast-stats - Ptr                       64 (NN.N%)             1
+ast-stats - Ref                       64 (NN.N%)             1
+ast-stats - ImplicitSelf             128 (NN.N%)             2
+ast-stats - Path                     640 (NN.N%)            10
+ast-stats PathSegment              888 (NN.N%)            37            24
+ast-stats Expr                     648 (NN.N%)             9            72
+ast-stats - InlineAsm                 72 (NN.N%)             1
+ast-stats - Match                     72 (NN.N%)             1
+ast-stats - Path                      72 (NN.N%)             1
+ast-stats - Struct                    72 (NN.N%)             1
+ast-stats - Lit                      144 (NN.N%)             2
+ast-stats - Block                    216 (NN.N%)             3
+ast-stats Pat                      504 (NN.N%)             7            72
+ast-stats - Struct                    72 (NN.N%)             1
+ast-stats - Wild                      72 (NN.N%)             1
+ast-stats - Ident                    360 (NN.N%)             5
+ast-stats GenericParam             480 (NN.N%)             5            96
+ast-stats GenericBound             352 (NN.N%)             4            88
+ast-stats - Trait                    352 (NN.N%)             4
+ast-stats AssocItem                320 (NN.N%)             4            80
+ast-stats - Fn                       160 (NN.N%)             2
+ast-stats - Type                     160 (NN.N%)             2
+ast-stats Variant                  208 (NN.N%)             2           104
+ast-stats FieldDef                 208 (NN.N%)             2           104
+ast-stats Block                    192 (NN.N%)             6            32
+ast-stats Stmt                     160 (NN.N%)             5            32
+ast-stats - Let                       32 (NN.N%)             1
+ast-stats - Semi                      32 (NN.N%)             1
+ast-stats - Expr                      96 (NN.N%)             3
+ast-stats Param                    160 (NN.N%)             4            40
+ast-stats Attribute                160 (NN.N%)             5            32
+ast-stats - DocComment                32 (NN.N%)             1
+ast-stats - Normal                   128 (NN.N%)             4
+ast-stats InlineAsm                120 (NN.N%)             1           120
+ast-stats FnDecl                   120 (NN.N%)             5            24
+ast-stats Local                     96 (NN.N%)             1            96
+ast-stats Arm                       96 (NN.N%)             2            48
+ast-stats ForeignItem               80 (NN.N%)             1            80
+ast-stats - Fn                        80 (NN.N%)             1
+ast-stats WherePredicate            72 (NN.N%)             1            72
+ast-stats - BoundPredicate            72 (NN.N%)             1
+ast-stats ExprField                 48 (NN.N%)             1            48
+ast-stats GenericArgs               40 (NN.N%)             1            40
+ast-stats - AngleBracketed            40 (NN.N%)             1
+ast-stats Crate                     40 (NN.N%)             1            40
 ast-stats ----------------------------------------------------------------
-ast-stats Total                  7_416                   127
-ast-stats
-hir-stats HIR STATS
+ast-stats Total                  7_472                   129
+ast-stats ================================================================
+hir-stats ================================================================
+hir-stats HIR STATS: input_stats
 hir-stats Name                Accumulated Size         Count     Item Size
 hir-stats ----------------------------------------------------------------
-hir-stats ForeignItemRef            24 (NN.N%)             1            24
-hir-stats Lifetime                  28 (NN.N%)             1            28
-hir-stats Mod                       32 (NN.N%)             1            32
-hir-stats ExprField                 40 (NN.N%)             1            40
-hir-stats TraitItemRef              56 (NN.N%)             2            28
-hir-stats GenericArg                64 (NN.N%)             4            16
-hir-stats - Type                      16 (NN.N%)             1
-hir-stats - Lifetime                  48 (NN.N%)             3
-hir-stats Param                     64 (NN.N%)             2            32
-hir-stats Body                      72 (NN.N%)             3            24
-hir-stats ImplItemRef               72 (NN.N%)             2            36
-hir-stats InlineAsm                 72 (NN.N%)             1            72
-hir-stats Local                     72 (NN.N%)             1            72
-hir-stats WherePredicate            72 (NN.N%)             3            24
-hir-stats - BoundPredicate            72 (NN.N%)             3
-hir-stats Arm                       80 (NN.N%)             2            40
-hir-stats Stmt                      96 (NN.N%)             3            32
-hir-stats - Expr                      32 (NN.N%)             1
-hir-stats - Let                       32 (NN.N%)             1
-hir-stats - Semi                      32 (NN.N%)             1
-hir-stats FnDecl                   120 (NN.N%)             3            40
-hir-stats FieldDef                 128 (NN.N%)             2            64
-hir-stats GenericArgs              144 (NN.N%)             3            48
-hir-stats Variant                  144 (NN.N%)             2            72
-hir-stats Attribute                160 (NN.N%)             4            40
-hir-stats GenericBound             256 (NN.N%)             4            64
-hir-stats - Trait                    256 (NN.N%)             4
-hir-stats Block                    288 (NN.N%)             6            48
-hir-stats Pat                      360 (NN.N%)             5            72
-hir-stats - Struct                    72 (NN.N%)             1
-hir-stats - Wild                      72 (NN.N%)             1
-hir-stats - Binding                  216 (NN.N%)             3
-hir-stats GenericParam             400 (NN.N%)             5            80
-hir-stats Generics                 560 (NN.N%)            10            56
-hir-stats Ty                       720 (NN.N%)            15            48
-hir-stats - Ptr                       48 (NN.N%)             1
-hir-stats - Ref                       48 (NN.N%)             1
-hir-stats - Path                     624 (NN.N%)            13
-hir-stats Expr                     768 (NN.N%)            12            64
-hir-stats - InlineAsm                 64 (NN.N%)             1
-hir-stats - Match                     64 (NN.N%)             1
-hir-stats - Path                      64 (NN.N%)             1
-hir-stats - Struct                    64 (NN.N%)             1
-hir-stats - Lit                      128 (NN.N%)             2
-hir-stats - Block                    384 (NN.N%)             6
+hir-stats PathSegment            1_776 (NN.N%)            37            48
+hir-stats Path                   1_040 (NN.N%)            26            40
 hir-stats Item                     968 (NN.N%)            11            88
 hir-stats - Enum                      88 (NN.N%)             1
 hir-stats - ExternCrate               88 (NN.N%)             1
@@ -114,8 +73,51 @@ hir-stats - Impl                      88 (NN.N%)             1
 hir-stats - Trait                     88 (NN.N%)             1
 hir-stats - Fn                       176 (NN.N%)             2
 hir-stats - Use                      352 (NN.N%)             4
-hir-stats Path                   1_040 (NN.N%)            26            40
-hir-stats PathSegment            1_776 (NN.N%)            37            48
+hir-stats Expr                     768 (NN.N%)            12            64
+hir-stats - InlineAsm                 64 (NN.N%)             1
+hir-stats - Match                     64 (NN.N%)             1
+hir-stats - Path                      64 (NN.N%)             1
+hir-stats - Struct                    64 (NN.N%)             1
+hir-stats - Lit                      128 (NN.N%)             2
+hir-stats - Block                    384 (NN.N%)             6
+hir-stats Ty                       720 (NN.N%)            15            48
+hir-stats - Ptr                       48 (NN.N%)             1
+hir-stats - Ref                       48 (NN.N%)             1
+hir-stats - Path                     624 (NN.N%)            13
+hir-stats Generics                 560 (NN.N%)            10            56
+hir-stats GenericParam             400 (NN.N%)             5            80
+hir-stats Pat                      360 (NN.N%)             5            72
+hir-stats - Struct                    72 (NN.N%)             1
+hir-stats - Wild                      72 (NN.N%)             1
+hir-stats - Binding                  216 (NN.N%)             3
+hir-stats Block                    288 (NN.N%)             6            48
+hir-stats GenericBound             256 (NN.N%)             4            64
+hir-stats - Trait                    256 (NN.N%)             4
+hir-stats Attribute                200 (NN.N%)             5            40
+hir-stats Variant                  144 (NN.N%)             2            72
+hir-stats GenericArgs              144 (NN.N%)             3            48
+hir-stats FieldDef                 128 (NN.N%)             2            64
+hir-stats FnDecl                   120 (NN.N%)             3            40
+hir-stats Stmt                      96 (NN.N%)             3            32
+hir-stats - Expr                      32 (NN.N%)             1
+hir-stats - Let                       32 (NN.N%)             1
+hir-stats - Semi                      32 (NN.N%)             1
+hir-stats Arm                       80 (NN.N%)             2            40
+hir-stats WherePredicate            72 (NN.N%)             3            24
+hir-stats - BoundPredicate            72 (NN.N%)             3
+hir-stats Local                     72 (NN.N%)             1            72
+hir-stats InlineAsm                 72 (NN.N%)             1            72
+hir-stats ImplItemRef               72 (NN.N%)             2            36
+hir-stats Body                      72 (NN.N%)             3            24
+hir-stats Param                     64 (NN.N%)             2            32
+hir-stats GenericArg                64 (NN.N%)             4            16
+hir-stats - Type                      16 (NN.N%)             1
+hir-stats - Lifetime                  48 (NN.N%)             3
+hir-stats TraitItemRef              56 (NN.N%)             2            28
+hir-stats ExprField                 40 (NN.N%)             1            40
+hir-stats Mod                       32 (NN.N%)             1            32
+hir-stats Lifetime                  28 (NN.N%)             1            28
+hir-stats ForeignItemRef            24 (NN.N%)             1            24
 hir-stats ----------------------------------------------------------------
-hir-stats Total                  8_676                   172
-hir-stats
+hir-stats Total                  8_716                   173
+hir-stats ================================================================
diff --git a/tests/ui/stats/macro-stats.stderr b/tests/ui/stats/macro-stats.stderr
index f87e34622b9..00c6b55c6a2 100644
--- a/tests/ui/stats/macro-stats.stderr
+++ b/tests/ui/stats/macro-stats.stderr
@@ -2,25 +2,25 @@ macro-stats ====================================================================
 macro-stats MACRO EXPANSION STATS: macro_stats
 macro-stats Macro Name                         Uses      Lines  Avg Lines      Bytes  Avg Bytes
 macro-stats -----------------------------------------------------------------------------------
-macro-stats #[derive(Clone)]                      8         56        7.0      1_660      207.5
-macro-stats #[derive(PartialOrd)]                 1         16       16.0        654      654.0
-macro-stats #[derive(Hash)]                       2         15        7.5        547      273.5
-macro-stats #[derive(Ord)]                        1         14       14.0        489      489.0
-macro-stats q!                                    1         24       24.0        435      435.0
-macro-stats #[derive(Default)]                    2         14        7.0        367      183.5
-macro-stats #[derive(Eq)]                         1         10       10.0        312      312.0
-macro-stats #[derive(Debug)]                      1          7        7.0        261      261.0
-macro-stats #[derive(PartialEq)]                  1          8        8.0        247      247.0
-macro-stats #[derive(Copy)]                       1          1        1.0         46       46.0
-macro-stats p!                                    1          2        2.0         28       28.0
-macro-stats trait_impl_tys!                       1          1        1.0         11       11.0
-macro-stats foreign_item!                         1          0        0.0          6        6.0
-macro-stats impl_const!                           1          0        0.0          4        4.0
-macro-stats trait_tys!                            1          1        1.0          3        3.0
-macro-stats u32!                                  1          0        0.0         -3       -3.0
-macro-stats none!                                 1          0        0.0         -3       -3.0
-macro-stats n99!                                  2          0        0.0         -8       -4.0
+macro-stats #[derive(Clone)]                      8         64        8.0      1_788      223.5
+macro-stats #[derive(PartialOrd)]                 1         17       17.0        675      675.0
+macro-stats #[derive(Hash)]                       2         17        8.5        577      288.5
+macro-stats q!                                    1         26       26.0        519      519.0
+macro-stats #[derive(Ord)]                        1         15       15.0        503      503.0
+macro-stats #[derive(Default)]                    2         16        8.0        403      201.5
+macro-stats #[derive(Eq)]                         1         11       11.0        325      325.0
+macro-stats #[derive(Debug)]                      1          8        8.0        277      277.0
+macro-stats #[derive(PartialEq)]                  1          9        9.0        267      267.0
+macro-stats #[derive(Copy)]                       1          2        2.0         61       61.0
+macro-stats p!                                    1          3        3.0         32       32.0
+macro-stats trait_impl_tys!                       1          2        2.0         28       28.0
+macro-stats foreign_item!                         1          1        1.0         21       21.0
 macro-stats this_is_a_really_really_long_macro_name!
-macro-stats                                       1          0        0.0        -30      -30.0
-macro-stats #[test]                               1         -6       -6.0       -158     -158.0
+macro-stats                                       1          1        1.0         18       18.0
+macro-stats impl_const!                           1          1        1.0         17       17.0
+macro-stats trait_tys!                            1          2        2.0         15       15.0
+macro-stats n99!                                  2          2        1.0          4        2.0
+macro-stats none!                                 1          1        1.0          4        4.0
+macro-stats u32!                                  1          1        1.0          3        3.0
+macro-stats #[test]                               1          1        1.0          0        0.0
 macro-stats ===================================================================================
diff --git a/tests/ui/structs-enums/recover-enum-with-bad-where.rs b/tests/ui/structs-enums/recover-enum-with-bad-where.rs
new file mode 100644
index 00000000000..cf7747d710b
--- /dev/null
+++ b/tests/ui/structs-enums/recover-enum-with-bad-where.rs
@@ -0,0 +1,8 @@
+pub enum Foo<T>
+where:
+//~^ ERROR unexpected colon after `where`
+    T: Missing, {}
+//~^ ERROR cannot find trait `Missing` in this scope
+// (evidence that we continue parsing after the erroneous colon)
+
+fn main() {}
diff --git a/tests/ui/structs-enums/recover-enum-with-bad-where.stderr b/tests/ui/structs-enums/recover-enum-with-bad-where.stderr
new file mode 100644
index 00000000000..30b73f59e8c
--- /dev/null
+++ b/tests/ui/structs-enums/recover-enum-with-bad-where.stderr
@@ -0,0 +1,15 @@
+error: unexpected colon after `where`
+  --> $DIR/recover-enum-with-bad-where.rs:2:6
+   |
+LL | where:
+   |      ^ help: remove the colon
+
+error[E0405]: cannot find trait `Missing` in this scope
+  --> $DIR/recover-enum-with-bad-where.rs:4:8
+   |
+LL |     T: Missing, {}
+   |        ^^^^^^^ not found in this scope
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0405`.
diff --git a/tests/ui/suggestions/bad-infer-in-trait-impl.stderr b/tests/ui/suggestions/bad-infer-in-trait-impl.stderr
index 68d8f5402e4..8b7d67ac041 100644
--- a/tests/ui/suggestions/bad-infer-in-trait-impl.stderr
+++ b/tests/ui/suggestions/bad-infer-in-trait-impl.stderr
@@ -3,12 +3,6 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
    |
 LL |     fn bar(s: _) {}
    |               ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn bar(s: _) {}
-LL +     fn bar<T>(s: T) {}
-   |
 
 error[E0050]: method `bar` has 1 parameter but the declaration in trait `Foo::bar` has 0
   --> $DIR/bad-infer-in-trait-impl.rs:6:15
diff --git a/tests/ui/suggestions/bound-suggestions.stderr b/tests/ui/suggestions/bound-suggestions.stderr
index f23e086afe4..ec1d23fac45 100644
--- a/tests/ui/suggestions/bound-suggestions.stderr
+++ b/tests/ui/suggestions/bound-suggestions.stderr
@@ -2,7 +2,9 @@ error[E0277]: `impl Sized` doesn't implement `Debug`
   --> $DIR/bound-suggestions.rs:9:22
    |
 LL |     println!("{:?}", t);
-   |                      ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               ----   ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               |
+   |               required by this formatting parameter
    |
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider restricting opaque type `impl Sized` with trait `Debug`
@@ -14,7 +16,9 @@ error[E0277]: `T` doesn't implement `Debug`
   --> $DIR/bound-suggestions.rs:15:22
    |
 LL |     println!("{:?}", t);
-   |                      ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               ----   ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               |
+   |               required by this formatting parameter
    |
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider restricting type parameter `T` with trait `Debug`
@@ -26,7 +30,9 @@ error[E0277]: `T` doesn't implement `Debug`
   --> $DIR/bound-suggestions.rs:21:22
    |
 LL |     println!("{:?}", t);
-   |                      ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               ----   ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               |
+   |               required by this formatting parameter
    |
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider further restricting type parameter `T` with trait `Debug`
@@ -38,7 +44,9 @@ error[E0277]: `Y` doesn't implement `Debug`
   --> $DIR/bound-suggestions.rs:27:30
    |
 LL |     println!("{:?} {:?}", x, y);
-   |                              ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |                    ----      ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |                    |
+   |                    required by this formatting parameter
    |
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider further restricting type parameter `Y` with trait `Debug`
@@ -50,7 +58,9 @@ error[E0277]: `X` doesn't implement `Debug`
   --> $DIR/bound-suggestions.rs:33:22
    |
 LL |     println!("{:?}", x);
-   |                      ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               ----   ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               |
+   |               required by this formatting parameter
    |
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider further restricting type parameter `X` with trait `Debug`
@@ -62,7 +72,9 @@ error[E0277]: `X` doesn't implement `Debug`
   --> $DIR/bound-suggestions.rs:39:22
    |
 LL |     println!("{:?}", x);
-   |                      ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               ----   ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               |
+   |               required by this formatting parameter
    |
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider further restricting type parameter `X` with trait `Debug`
diff --git a/tests/ui/suggestions/derive-macro-missing-bounds.stderr b/tests/ui/suggestions/derive-macro-missing-bounds.stderr
index 68c8204d1e1..b28f39ced54 100644
--- a/tests/ui/suggestions/derive-macro-missing-bounds.stderr
+++ b/tests/ui/suggestions/derive-macro-missing-bounds.stderr
@@ -4,9 +4,8 @@ error[E0277]: `a::Inner<T>` doesn't implement `Debug`
 LL |     #[derive(Debug)]
    |              ----- in this derive macro expansion
 LL |     struct Outer<T>(Inner<T>);
-   |                     ^^^^^^^^ `a::Inner<T>` cannot be formatted using `{:?}`
+   |                     ^^^^^^^^ the trait `Debug` is not implemented for `a::Inner<T>`
    |
-   = help: the trait `Debug` is not implemented for `a::Inner<T>`
    = note: add `#[derive(Debug)]` to `a::Inner<T>` or manually `impl Debug for a::Inner<T>`
 help: consider annotating `a::Inner<T>` with `#[derive(Debug)]`
    |
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 10b4781eb04..97a0e005f86 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
@@ -4,19 +4,16 @@ trait A: Sized {
     fn f(a: A) -> A;
     //~^ ERROR expected a type, found a trait
     //~| ERROR expected a type, found a trait
-    //~| ERROR associated item referring to unboxed trait object for its own trait
 }
 trait B {
     fn f(b: B) -> B;
     //~^ ERROR expected a type, found a trait
     //~| ERROR expected a type, found a trait
-    //~| ERROR associated item referring to unboxed trait object for its own trait
 }
 trait C {
     fn f(&self, c: C) -> C;
     //~^ ERROR expected a type, found a trait
     //~| ERROR expected a type, found a trait
-    //~| ERROR associated item referring to unboxed trait object for its own trait
 }
 
 fn main() {}
diff --git a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.stderr
index e189012d15c..c4dab4691f4 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
@@ -26,22 +26,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: associated item referring to unboxed trait object for its own trait
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:4:13
-   |
-LL | trait A: Sized {
-   |       - in this trait
-LL |     fn f(a: A) -> A;
-   |             ^     ^
-   |
-help: you might have meant to use `Self` to refer to the implementing type
-   |
-LL -     fn f(a: A) -> A;
-LL +     fn f(a: Self) -> Self;
-   |
-
 error[E0782]: expected a type, found a trait
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:10:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:9:13
    |
 LL |     fn f(b: B) -> B;
    |             ^
@@ -58,7 +44,7 @@ LL |     fn f(b: impl B) -> B;
    |             ++++
 
 error[E0782]: expected a type, found a trait
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:10:19
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:9:19
    |
 LL |     fn f(b: B) -> B;
    |                   ^
@@ -68,22 +54,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: associated item referring to unboxed trait object for its own trait
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:10:13
-   |
-LL | trait B {
-   |       - in this trait
-LL |     fn f(b: B) -> B;
-   |             ^     ^
-   |
-help: you might have meant to use `Self` to refer to the implementing type
-   |
-LL -     fn f(b: B) -> B;
-LL +     fn f(b: Self) -> Self;
-   |
-
 error[E0782]: expected a type, found a trait
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:16:20
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:14:20
    |
 LL |     fn f(&self, c: C) -> C;
    |                    ^
@@ -100,7 +72,7 @@ LL |     fn f(&self, c: impl C) -> C;
    |                    ++++
 
 error[E0782]: expected a type, found a trait
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:16:26
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:14:26
    |
 LL |     fn f(&self, c: C) -> C;
    |                          ^
@@ -110,20 +82,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: associated item referring to unboxed trait object for its own trait
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:16:20
-   |
-LL | trait C {
-   |       - in this trait
-LL |     fn f(&self, c: C) -> C;
-   |                    ^     ^
-   |
-help: you might have meant to use `Self` to refer to the implementing type
-   |
-LL -     fn f(&self, c: C) -> C;
-LL +     fn f(&self, c: Self) -> Self;
-   |
-
-error: aborting due to 9 previous errors
+error: aborting due to 6 previous errors
 
 For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.rs b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.rs
index 747926c400a..a798b1bd578 100644
--- a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.rs
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.rs
@@ -2,13 +2,11 @@
 #![allow(bare_trait_objects)]
 trait A: Sized {
     fn f(a: dyn A) -> dyn A;
-    //~^ ERROR associated item referring to unboxed trait object for its own trait
-    //~| ERROR the trait `A` is not dyn compatible
+    //~^ ERROR the trait `A` is not dyn compatible
 }
 trait B {
     fn f(a: dyn B) -> dyn B;
-    //~^ ERROR associated item referring to unboxed trait object for its own trait
-    //~| ERROR the trait `B` is not dyn compatible
+    //~^ ERROR the trait `B` is not dyn compatible
 }
 trait C {
     fn f(&self, a: dyn C) -> dyn C;
diff --git a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr
index 2e3919db1b7..4ccf65b68bf 100644
--- a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr
@@ -1,17 +1,3 @@
-error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:4:13
-   |
-LL | trait A: Sized {
-   |       - in this trait
-LL |     fn f(a: dyn A) -> dyn A;
-   |             ^^^^^     ^^^^^
-   |
-help: you might have meant to use `Self` to refer to the implementing type
-   |
-LL -     fn f(a: dyn A) -> dyn A;
-LL +     fn f(a: Self) -> Self;
-   |
-
 error[E0038]: the trait `A` is not dyn compatible
   --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:4:13
    |
@@ -26,30 +12,21 @@ LL | trait A: Sized {
    |       -  ^^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait is not dyn compatible...
-
-error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:9:13
-   |
-LL | trait B {
-   |       - in this trait
-LL |     fn f(a: dyn B) -> dyn B;
-   |             ^^^^^     ^^^^^
-   |
 help: you might have meant to use `Self` to refer to the implementing type
    |
-LL -     fn f(a: dyn B) -> dyn B;
-LL +     fn f(a: Self) -> Self;
+LL -     fn f(a: dyn A) -> dyn A;
+LL +     fn f(a: Self) -> dyn A;
    |
 
 error[E0038]: the trait `B` is not dyn compatible
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:9:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:8:13
    |
 LL |     fn f(a: dyn B) -> dyn B;
    |             ^^^^^ `B` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:9:8
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:8:8
    |
 LL | trait B {
    |       - this trait is not dyn compatible...
@@ -63,7 +40,12 @@ help: alternatively, consider constraining `f` so it does not apply to trait obj
    |
 LL |     fn f(a: dyn B) -> dyn B where Self: Sized;
    |                             +++++++++++++++++
+help: you might have meant to use `Self` to refer to the implementing type
+   |
+LL -     fn f(a: dyn B) -> dyn B;
+LL +     fn f(a: Self) -> dyn B;
+   |
 
-error: aborting due to 4 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.rs b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.rs
index 63fe5ebaea4..d8e9d381dbd 100644
--- a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.rs
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.rs
@@ -1,12 +1,10 @@
 trait A: Sized {
     fn f(a: dyn A) -> dyn A;
-    //~^ ERROR associated item referring to unboxed trait object for its own trait
-    //~| ERROR the trait `A` is not dyn compatible
+    //~^ ERROR the trait `A` is not dyn compatible
 }
 trait B {
     fn f(a: dyn B) -> dyn B;
-    //~^ ERROR associated item referring to unboxed trait object for its own trait
-    //~| ERROR the trait `B` is not dyn compatible
+    //~^ ERROR the trait `B` is not dyn compatible
 }
 trait C {
     fn f(&self, a: dyn C) -> dyn C;
diff --git a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr
index e8384afed7a..bda1d01e23f 100644
--- a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr
@@ -1,17 +1,3 @@
-error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/dyn-incompatible-trait-should-use-self.rs:2:13
-   |
-LL | trait A: Sized {
-   |       - in this trait
-LL |     fn f(a: dyn A) -> dyn A;
-   |             ^^^^^     ^^^^^
-   |
-help: you might have meant to use `Self` to refer to the implementing type
-   |
-LL -     fn f(a: dyn A) -> dyn A;
-LL +     fn f(a: Self) -> Self;
-   |
-
 error[E0038]: the trait `A` is not dyn compatible
   --> $DIR/dyn-incompatible-trait-should-use-self.rs:2:13
    |
@@ -26,30 +12,21 @@ LL | trait A: Sized {
    |       -  ^^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait is not dyn compatible...
-
-error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/dyn-incompatible-trait-should-use-self.rs:7:13
-   |
-LL | trait B {
-   |       - in this trait
-LL |     fn f(a: dyn B) -> dyn B;
-   |             ^^^^^     ^^^^^
-   |
 help: you might have meant to use `Self` to refer to the implementing type
    |
-LL -     fn f(a: dyn B) -> dyn B;
-LL +     fn f(a: Self) -> Self;
+LL -     fn f(a: dyn A) -> dyn A;
+LL +     fn f(a: Self) -> dyn A;
    |
 
 error[E0038]: the trait `B` is not dyn compatible
-  --> $DIR/dyn-incompatible-trait-should-use-self.rs:7:13
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:6:13
    |
 LL |     fn f(a: dyn B) -> dyn B;
    |             ^^^^^ `B` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/dyn-incompatible-trait-should-use-self.rs:7:8
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:6:8
    |
 LL | trait B {
    |       - this trait is not dyn compatible...
@@ -63,7 +40,12 @@ help: alternatively, consider constraining `f` so it does not apply to trait obj
    |
 LL |     fn f(a: dyn B) -> dyn B where Self: Sized;
    |                             +++++++++++++++++
+help: you might have meant to use `Self` to refer to the implementing type
+   |
+LL -     fn f(a: dyn B) -> dyn B;
+LL +     fn f(a: Self) -> dyn B;
+   |
 
-error: aborting due to 4 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/suggestions/impl-trait-with-missing-bounds.stderr b/tests/ui/suggestions/impl-trait-with-missing-bounds.stderr
index d0ce7c9ed4e..b3f1865dd30 100644
--- a/tests/ui/suggestions/impl-trait-with-missing-bounds.stderr
+++ b/tests/ui/suggestions/impl-trait-with-missing-bounds.stderr
@@ -2,11 +2,10 @@ error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
   --> $DIR/impl-trait-with-missing-bounds.rs:6:13
    |
 LL |         qux(constraint);
-   |         --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |         --- ^^^^^^^^^^ the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
    |         |
    |         required by a bound introduced by this call
    |
-   = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
 note: required by a bound in `qux`
   --> $DIR/impl-trait-with-missing-bounds.rs:50:16
    |
@@ -22,11 +21,10 @@ error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
   --> $DIR/impl-trait-with-missing-bounds.rs:14:13
    |
 LL |         qux(constraint);
-   |         --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |         --- ^^^^^^^^^^ the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
    |         |
    |         required by a bound introduced by this call
    |
-   = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
 note: required by a bound in `qux`
   --> $DIR/impl-trait-with-missing-bounds.rs:50:16
    |
@@ -42,11 +40,10 @@ error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
   --> $DIR/impl-trait-with-missing-bounds.rs:22:13
    |
 LL |         qux(constraint);
-   |         --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |         --- ^^^^^^^^^^ the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
    |         |
    |         required by a bound introduced by this call
    |
-   = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
 note: required by a bound in `qux`
   --> $DIR/impl-trait-with-missing-bounds.rs:50:16
    |
@@ -62,11 +59,10 @@ error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
   --> $DIR/impl-trait-with-missing-bounds.rs:30:13
    |
 LL |         qux(constraint);
-   |         --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |         --- ^^^^^^^^^^ the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
    |         |
    |         required by a bound introduced by this call
    |
-   = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
 note: required by a bound in `qux`
   --> $DIR/impl-trait-with-missing-bounds.rs:50:16
    |
@@ -82,11 +78,10 @@ error[E0277]: `<impl Iterator + std::fmt::Debug as Iterator>::Item` doesn't impl
   --> $DIR/impl-trait-with-missing-bounds.rs:37:13
    |
 LL |         qux(constraint);
-   |         --- ^^^^^^^^^^ `<impl Iterator + std::fmt::Debug as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |         --- ^^^^^^^^^^ the trait `Debug` is not implemented for `<impl Iterator + std::fmt::Debug as Iterator>::Item`
    |         |
    |         required by a bound introduced by this call
    |
-   = help: the trait `Debug` is not implemented for `<impl Iterator + std::fmt::Debug as Iterator>::Item`
 note: required by a bound in `qux`
   --> $DIR/impl-trait-with-missing-bounds.rs:50:16
    |
@@ -102,11 +97,10 @@ error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
   --> $DIR/impl-trait-with-missing-bounds.rs:45:13
    |
 LL |         qux(constraint);
-   |         --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |         --- ^^^^^^^^^^ the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
    |         |
    |         required by a bound introduced by this call
    |
-   = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
 note: required by a bound in `qux`
   --> $DIR/impl-trait-with-missing-bounds.rs:50:16
    |
diff --git a/tests/ui/suggestions/issue-105645.rs b/tests/ui/suggestions/issue-105645.rs
index 681ce1c6e37..f3ca8ccbb3c 100644
--- a/tests/ui/suggestions/issue-105645.rs
+++ b/tests/ui/suggestions/issue-105645.rs
@@ -2,7 +2,7 @@ fn main() {
     let mut buf = [0u8; 50];
     let mut bref = buf.as_slice();
     foo(&mut bref);
-    //~^ ERROR 4:9: 4:18: the trait bound `&[u8]: std::io::Write` is not satisfied [E0277]
+    //~^ ERROR the trait bound `&[u8]: std::io::Write` is not satisfied [E0277]
 }
 
 fn foo(_: &mut impl std::io::Write) {}
diff --git a/tests/ui/suggestions/issue-116434-2015.rs b/tests/ui/suggestions/issue-116434-2015.rs
index bad9d02321c..e0438cdef25 100644
--- a/tests/ui/suggestions/issue-116434-2015.rs
+++ b/tests/ui/suggestions/issue-116434-2015.rs
@@ -11,6 +11,7 @@ trait Foo {
     //~| HELP if this is a dyn-compatible trait, use `dyn`
     //~| ERROR the trait `Clone` is not dyn compatible [E0038]
     //~| HELP there is an associated type with the same name
+    //~| HELP use `Self` to refer to the implementing type
 }
 
 trait DbHandle: Sized {}
@@ -26,6 +27,7 @@ trait DbInterface {
     //~| HELP if this is a dyn-compatible trait, use `dyn`
     //~| ERROR the trait `DbHandle` is not dyn compatible [E0038]
     //~| HELP there is an associated type with the same name
+    //~| HELP use `Self` to refer to the implementing type
 }
 
 fn main() {}
diff --git a/tests/ui/suggestions/issue-116434-2015.stderr b/tests/ui/suggestions/issue-116434-2015.stderr
index a0a99cc560d..cad5812da66 100644
--- a/tests/ui/suggestions/issue-116434-2015.stderr
+++ b/tests/ui/suggestions/issue-116434-2015.stderr
@@ -35,13 +35,18 @@ LL |     fn foo() -> Clone;
    = note: the trait is not dyn compatible because it requires `Self: Sized`
    = note: for a trait to be dyn compatible it needs to allow building a vtable
            for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+help: you might have meant to use `Self` to refer to the implementing type
+   |
+LL -     fn foo() -> Clone;
+LL +     fn foo() -> Self;
+   |
 help: there is an associated type with the same name
    |
 LL |     fn foo() -> Self::Clone;
    |                 ++++++
 
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/issue-116434-2015.rs:20:20
+  --> $DIR/issue-116434-2015.rs:21:20
    |
 LL |     fn handle() -> DbHandle;
    |                    ^^^^^^^^
@@ -54,7 +59,7 @@ LL |     fn handle() -> dyn DbHandle;
    |                    +++
 
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/issue-116434-2015.rs:20:20
+  --> $DIR/issue-116434-2015.rs:21:20
    |
 LL |     fn handle() -> DbHandle;
    |                    ^^^^^^^^
@@ -68,19 +73,24 @@ LL |     fn handle() -> dyn DbHandle;
    |                    +++
 
 error[E0038]: the trait `DbHandle` is not dyn compatible
-  --> $DIR/issue-116434-2015.rs:20:20
+  --> $DIR/issue-116434-2015.rs:21:20
    |
 LL |     fn handle() -> DbHandle;
    |                    ^^^^^^^^ `DbHandle` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/issue-116434-2015.rs:16:17
+  --> $DIR/issue-116434-2015.rs:17:17
    |
 LL | trait DbHandle: Sized {}
    |       --------  ^^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait is not dyn compatible...
+help: you might have meant to use `Self` to refer to the implementing type
+   |
+LL -     fn handle() -> DbHandle;
+LL +     fn handle() -> Self;
+   |
 help: there is an associated type with the same name
    |
 LL |     fn handle() -> Self::DbHandle;
diff --git a/tests/ui/suggestions/issue-81098.stderr b/tests/ui/suggestions/issue-81098.stderr
index 4dc47a20282..36948469a31 100644
--- a/tests/ui/suggestions/issue-81098.stderr
+++ b/tests/ui/suggestions/issue-81098.stderr
@@ -2,23 +2,17 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
   --> $DIR/issue-81098.rs:3:13
    |
 LL | fn wat() -> impl core::fmt::Display {
-   |             ^^^^^^^^^^^^^^^^^^^^^^^ `()` cannot be formatted with the default formatter
-   |
-   = help: the trait `std::fmt::Display` is not implemented for `()`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
+   |             ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::fmt::Display` is not implemented for `()`
 
 error[E0277]: `()` doesn't implement `std::fmt::Display`
   --> $DIR/issue-81098.rs:9:12
    |
 LL | fn ok() -> impl core::fmt::Display {
-   |            ^^^^^^^^^^^^^^^^^^^^^^^ `()` cannot be formatted with the default formatter
+   |            ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::fmt::Display` is not implemented for `()`
 LL |     1;
    |     -- help: remove this semicolon
    |     |
    |     this expression has type `{integer}`, which implements `std::fmt::Display`
-   |
-   = help: the trait `std::fmt::Display` is not implemented for `()`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/suggestions/issue-97760.stderr b/tests/ui/suggestions/issue-97760.stderr
index ddd143b967c..1084ea7c9e0 100644
--- a/tests/ui/suggestions/issue-97760.stderr
+++ b/tests/ui/suggestions/issue-97760.stderr
@@ -2,7 +2,10 @@ error[E0277]: `<impl IntoIterator as IntoIterator>::Item` doesn't implement `std
   --> $DIR/issue-97760.rs:4:20
    |
 LL |         println!("{x}");
-   |                    ^ `<impl IntoIterator as IntoIterator>::Item` cannot be formatted with the default formatter
+   |                   -^-
+   |                   ||
+   |                   |`<impl IntoIterator as IntoIterator>::Item` cannot be formatted with the default formatter
+   |                   required by this formatting parameter
    |
    = help: the trait `std::fmt::Display` is not implemented for `<impl IntoIterator as IntoIterator>::Item`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
diff --git a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature.stderr b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature.stderr
index 0aa33d3b6fb..ab067f2439c 100644
--- a/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature.stderr
+++ b/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature.stderr
@@ -2,9 +2,12 @@ error[E0261]: use of undeclared lifetime name `'a`
   --> $DIR/missing-lifetimes-in-signature.rs:37:11
    |
 LL | fn baz<G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
-   |        -  ^^ undeclared lifetime
-   |        |
-   |        help: consider introducing lifetime `'a` here: `'a,`
+   |           ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'a` here
+   |
+LL | fn baz<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
+   |        +++
 
 error[E0700]: hidden type for `impl FnOnce()` captures lifetime that does not appear in bounds
   --> $DIR/missing-lifetimes-in-signature.rs:19:5
diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr
index 3f8b6f93e1f..e3375b67c86 100644
--- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr
+++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr
@@ -21,7 +21,7 @@ error[E0277]: `K` doesn't implement `Debug`
   --> $DIR/missing-bound-in-derive-copy-impl-3.rs:12:14
    |
 LL |     pub loc: Vector2<K>,
-   |              ^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |              ^^^^^^^^^^ the trait `Debug` is not implemented for `K`
    |
 note: required by a bound in `Vector2`
   --> $DIR/missing-bound-in-derive-copy-impl-3.rs:5:23
@@ -40,7 +40,7 @@ LL | #[derive(Debug, Copy, Clone)]
    |                       ----- in this derive macro expansion
 LL | pub struct AABB<K: Copy>{
 LL |     pub loc: Vector2<K>,
-   |     ^^^^^^^^^^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |     ^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `K`
    |
 help: consider further restricting type parameter `K` with trait `Debug`
    |
@@ -54,7 +54,7 @@ LL | #[derive(Debug, Copy, Clone)]
    |                       ----- in this derive macro expansion
 ...
 LL |     pub size: Vector2<K>
-   |     ^^^^^^^^^^^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |     ^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `K`
    |
 help: consider further restricting type parameter `K` with trait `Debug`
    |
diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr
index 3766e3e2c7b..645d6ebb396 100644
--- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr
+++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr
@@ -21,7 +21,7 @@ error[E0277]: `K` doesn't implement `Debug`
   --> $DIR/missing-bound-in-derive-copy-impl.rs:11:14
    |
 LL |     pub loc: Vector2<K>,
-   |              ^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |              ^^^^^^^^^^ the trait `Debug` is not implemented for `K`
    |
 note: required by a bound in `Vector2`
   --> $DIR/missing-bound-in-derive-copy-impl.rs:4:23
@@ -78,7 +78,7 @@ LL | #[derive(Debug, Copy, Clone)]
    |                       ----- in this derive macro expansion
 LL | pub struct AABB<K> {
 LL |     pub loc: Vector2<K>,
-   |     ^^^^^^^^^^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |     ^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `K`
    |
 help: consider restricting type parameter `K` with trait `Debug`
    |
@@ -111,7 +111,7 @@ LL | #[derive(Debug, Copy, Clone)]
    |                       ----- in this derive macro expansion
 ...
 LL |     pub size: Vector2<K>,
-   |     ^^^^^^^^^^^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |     ^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `K`
    |
 help: consider restricting type parameter `K` with trait `Debug`
    |
diff --git a/tests/ui/suggestions/option-content-move3.stderr b/tests/ui/suggestions/option-content-move3.stderr
index a20dcce1ee3..faaf8a9df9d 100644
--- a/tests/ui/suggestions/option-content-move3.stderr
+++ b/tests/ui/suggestions/option-content-move3.stderr
@@ -79,7 +79,7 @@ LL |             let x = var;
    |                     variable moved due to use in closure
    |                     move occurs because `var` has type `NotCopyableButCloneable`, which does not implement the `Copy` trait
    |
-help: clone the value before moving it into the closure
+help: consider cloning the value before moving it into the closure
    |
 LL ~         {
 LL +         let value = var.clone();
diff --git a/tests/ui/suggestions/path-display.stderr b/tests/ui/suggestions/path-display.stderr
index 46d0b35825b..0c7271b3c1c 100644
--- a/tests/ui/suggestions/path-display.stderr
+++ b/tests/ui/suggestions/path-display.stderr
@@ -2,18 +2,23 @@ error[E0277]: `Path` doesn't implement `std::fmt::Display`
   --> $DIR/path-display.rs:5:20
    |
 LL |     println!("{}", path);
-   |                    ^^^^ `Path` cannot be formatted with the default formatter; call `.display()` on it
+   |               --   ^^^^ `Path` cannot be formatted with the default formatter; call `.display()` on it
+   |               |
+   |               required by this formatting parameter
    |
    = help: the trait `std::fmt::Display` is not implemented for `Path`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: call `.display()` or `.to_string_lossy()` to safely print paths, as they may contain non-Unicode data
+   = note: required for `&Path` to implement `std::fmt::Display`
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0277]: `PathBuf` doesn't implement `std::fmt::Display`
   --> $DIR/path-display.rs:9:20
    |
 LL |     println!("{}", path);
-   |                    ^^^^ `PathBuf` cannot be formatted with the default formatter; call `.display()` on it
+   |               --   ^^^^ `PathBuf` cannot be formatted with the default formatter; call `.display()` on it
+   |               |
+   |               required by this formatting parameter
    |
    = help: the trait `std::fmt::Display` is not implemented for `PathBuf`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
diff --git a/tests/ui/suggestions/return-bindings.stderr b/tests/ui/suggestions/return-bindings.stderr
index 8e396d17dc0..651998043e1 100644
--- a/tests/ui/suggestions/return-bindings.stderr
+++ b/tests/ui/suggestions/return-bindings.stderr
@@ -62,12 +62,16 @@ LL ~
 error[E0308]: `if` and `else` have incompatible types
   --> $DIR/return-bindings.rs:30:9
    |
-LL |       let s = if let Some(s) = opt_str {
-   |  ______________________________________-
-LL | |     } else {
-   | |_____- expected because of this
-LL |           String::new()
-   |           ^^^^^^^^^^^^^ expected `()`, found `String`
+LL |        let s = if let Some(s) = opt_str {
+   |  ______________-                        -
+   | | ______________________________________|
+LL | ||     } else {
+   | ||_____- expected because of this
+LL | |          String::new()
+   | |          ^^^^^^^^^^^^^ expected `()`, found `String`
+LL | |
+LL | |      };
+   | |______- `if` and `else` have incompatible types
    |
 help: consider returning the local binding `s`
    |
diff --git a/tests/ui/suggestions/suggest-full-enum-variant-for-local-module.rs b/tests/ui/suggestions/suggest-full-enum-variant-for-local-module.rs
index 1dfc0786668..807fba0ab7e 100644
--- a/tests/ui/suggestions/suggest-full-enum-variant-for-local-module.rs
+++ b/tests/ui/suggestions/suggest-full-enum-variant-for-local-module.rs
@@ -6,5 +6,5 @@ mod option {
 }
 
 fn main() {
-    let _: option::O<()> = (); //~ ERROR 9:28: 9:30: mismatched types [E0308]
+    let _: option::O<()> = (); //~ ERROR mismatched types [E0308]
 }
diff --git a/tests/ui/syntax-extension-minor.rs b/tests/ui/syntax-extension-minor.rs
deleted file mode 100644
index 826990a89a5..00000000000
--- a/tests/ui/syntax-extension-minor.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-//@ run-pass
-
-#![feature(concat_idents)]
-#![expect(deprecated)] // concat_idents is deprecated
-
-pub fn main() {
-    struct Foo;
-    let _: concat_idents!(F, oo) = Foo; // Test that `concat_idents!` can be used in type positions
-
-    let asdf_fdsa = "<.<".to_string();
-    // concat_idents should have call-site hygiene.
-    assert!(concat_idents!(asd, f_f, dsa) == "<.<".to_string());
-
-    assert_eq!(stringify!(use_mention_distinction), "use_mention_distinction");
-}
diff --git a/tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.riscv.stderr b/tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.riscv.stderr
index 2dca0c22033..0b2d71f97d0 100644
--- a/tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.riscv.stderr
+++ b/tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.riscv.stderr
@@ -7,13 +7,5 @@ warning: unstable feature specified for `-Ctarget-feature`: `d`
    |
    = note: this feature is not stably supported; its behavior can change in the future
 
-warning: unstable feature specified for `-Ctarget-feature`: `f`
-   |
-   = note: this feature is not stably supported; its behavior can change in the future
-
-warning: unstable feature specified for `-Ctarget-feature`: `zicsr`
-   |
-   = note: this feature is not stably supported; its behavior can change in the future
-
-warning: 4 warnings emitted
+warning: 2 warnings emitted
 
diff --git a/tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.rs b/tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.rs
index 302cceccf69..1006b078bab 100644
--- a/tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.rs
+++ b/tests/ui/target-feature/abi-incompatible-target-feature-flag-enable.rs
@@ -24,5 +24,3 @@ pub trait Freeze {}
 
 //~? WARN must be disabled to ensure that the ABI of the current target can be implemented correctly
 //~? WARN unstable feature specified for `-Ctarget-feature`
-//[riscv]~? WARN unstable feature specified for `-Ctarget-feature`
-//[riscv]~? WARN unstable feature specified for `-Ctarget-feature`
diff --git a/tests/ui/target-feature/retpoline-target-feature-flag.by_feature1.stderr b/tests/ui/target-feature/retpoline-target-feature-flag.by_feature1.stderr
index 2a0f5f01aef..79e89823c51 100644
--- a/tests/ui/target-feature/retpoline-target-feature-flag.by_feature1.stderr
+++ b/tests/ui/target-feature/retpoline-target-feature-flag.by_feature1.stderr
@@ -1,4 +1,4 @@
-warning: target feature `retpoline-external-thunk` cannot be enabled with `-Ctarget-feature`: use `retpoline-external-thunk` target modifier flag instead
+warning: target feature `retpoline-external-thunk` cannot be enabled with `-Ctarget-feature`: use `-Zretpoline-external-thunk` compiler flag instead
    |
    = note: 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 #116344 <https://github.com/rust-lang/rust/issues/116344>
diff --git a/tests/ui/target-feature/retpoline-target-feature-flag.by_feature2.stderr b/tests/ui/target-feature/retpoline-target-feature-flag.by_feature2.stderr
index f7b6cb16447..f5ff15df632 100644
--- a/tests/ui/target-feature/retpoline-target-feature-flag.by_feature2.stderr
+++ b/tests/ui/target-feature/retpoline-target-feature-flag.by_feature2.stderr
@@ -1,4 +1,4 @@
-warning: target feature `retpoline-indirect-branches` cannot be enabled with `-Ctarget-feature`: use `retpoline` target modifier flag instead
+warning: target feature `retpoline-indirect-branches` cannot be enabled with `-Ctarget-feature`: use `-Zretpoline` compiler flag instead
    |
    = note: 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 #116344 <https://github.com/rust-lang/rust/issues/116344>
diff --git a/tests/ui/target-feature/retpoline-target-feature-flag.by_feature3.stderr b/tests/ui/target-feature/retpoline-target-feature-flag.by_feature3.stderr
index 4f2cd1d1a52..158cca08a76 100644
--- a/tests/ui/target-feature/retpoline-target-feature-flag.by_feature3.stderr
+++ b/tests/ui/target-feature/retpoline-target-feature-flag.by_feature3.stderr
@@ -1,4 +1,4 @@
-warning: target feature `retpoline-indirect-calls` cannot be enabled with `-Ctarget-feature`: use `retpoline` target modifier flag instead
+warning: target feature `retpoline-indirect-calls` cannot be enabled with `-Ctarget-feature`: use `-Zretpoline` compiler flag instead
    |
    = note: 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 #116344 <https://github.com/rust-lang/rust/issues/116344>
diff --git a/tests/ui/target-feature/retpoline-target-feature-flag.rs b/tests/ui/target-feature/retpoline-target-feature-flag.rs
index de3c44c3ed0..05c85860385 100644
--- a/tests/ui/target-feature/retpoline-target-feature-flag.rs
+++ b/tests/ui/target-feature/retpoline-target-feature-flag.rs
@@ -16,6 +16,6 @@
 #![no_core]
 extern crate minicore;
 
-//[by_feature1]~? WARN target feature `retpoline-external-thunk` cannot be enabled with `-Ctarget-feature`: use `retpoline-external-thunk` target modifier flag instead
-//[by_feature2]~? WARN target feature `retpoline-indirect-branches` cannot be enabled with `-Ctarget-feature`: use `retpoline` target modifier flag instead
-//[by_feature3]~? WARN target feature `retpoline-indirect-calls` cannot be enabled with `-Ctarget-feature`: use `retpoline` target modifier flag instead
+//[by_feature1]~? WARN target feature `retpoline-external-thunk` cannot be enabled with `-Ctarget-feature`
+//[by_feature2]~? WARN target feature `retpoline-indirect-branches` cannot be enabled with `-Ctarget-feature`
+//[by_feature3]~? WARN target feature `retpoline-indirect-calls` cannot be enabled with `-Ctarget-feature`
diff --git a/tests/ui/thir-print/thir-tree-loop-match.rs b/tests/ui/thir-print/thir-tree-loop-match.rs
new file mode 100644
index 00000000000..8c5f2244d54
--- /dev/null
+++ b/tests/ui/thir-print/thir-tree-loop-match.rs
@@ -0,0 +1,22 @@
+//@ check-pass
+//@ compile-flags: -Zunpretty=thir-tree
+
+#![allow(incomplete_features)]
+#![feature(loop_match)]
+
+fn boolean(mut state: bool) -> bool {
+    #[loop_match]
+    loop {
+        state = 'blk: {
+            match state {
+                true => {
+                    #[const_continue]
+                    break 'blk false;
+                }
+                false => return state,
+            }
+        }
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/thir-print/thir-tree-loop-match.stdout b/tests/ui/thir-print/thir-tree-loop-match.stdout
new file mode 100644
index 00000000000..828b93da6be
--- /dev/null
+++ b/tests/ui/thir-print/thir-tree-loop-match.stdout
@@ -0,0 +1,301 @@
+DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean):
+params: [
+    Param {
+        ty: bool
+        ty_span: Some($DIR/thir-tree-loop-match.rs:7:23: 7:27 (#0))
+        self_kind: None
+        hir_id: Some(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).1))
+        param: Some( 
+            Pat: {
+                ty: bool
+                span: $DIR/thir-tree-loop-match.rs:7:12: 7:21 (#0)
+                kind: PatKind {
+                    Binding {
+                        name: "state"
+                        mode: BindingMode(No, Mut)
+                        var: LocalVarId(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).2))
+                        ty: bool
+                        is_primary: true
+                        subpattern: None
+                    }
+                }
+            }
+        )
+    }
+]
+body:
+    Expr {
+        ty: bool
+        temp_lifetime: TempLifetime { temp_lifetime: Some(Node(28)), backwards_incompatible: None }
+        span: $DIR/thir-tree-loop-match.rs:7:37: 20:2 (#0)
+        kind: 
+            Scope {
+                region_scope: Node(28)
+                lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).28))
+                value:
+                    Expr {
+                        ty: bool
+                        temp_lifetime: TempLifetime { temp_lifetime: Some(Node(28)), backwards_incompatible: None }
+                        span: $DIR/thir-tree-loop-match.rs:7:37: 20:2 (#0)
+                        kind: 
+                            Block {
+                                targeted_by_break: false
+                                span: $DIR/thir-tree-loop-match.rs:7:37: 20:2 (#0)
+                                region_scope: Node(3)
+                                safety_mode: Safe
+                                stmts: []
+                                expr:
+                                    Expr {
+                                        ty: bool
+                                        temp_lifetime: TempLifetime { temp_lifetime: Some(Node(28)), backwards_incompatible: None }
+                                        span: $DIR/thir-tree-loop-match.rs:9:5: 19:6 (#0)
+                                        kind: 
+                                            Scope {
+                                                region_scope: Node(4)
+                                                lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).4))
+                                                value:
+                                                    Expr {
+                                                        ty: bool
+                                                        temp_lifetime: TempLifetime { temp_lifetime: Some(Node(28)), backwards_incompatible: None }
+                                                        span: $DIR/thir-tree-loop-match.rs:9:5: 19:6 (#0)
+                                                        kind: 
+                                                            NeverToAny {
+                                                                source:
+                                                                    Expr {
+                                                                        ty: !
+                                                                        temp_lifetime: TempLifetime { temp_lifetime: Some(Node(28)), backwards_incompatible: None }
+                                                                        span: $DIR/thir-tree-loop-match.rs:9:5: 19:6 (#0)
+                                                                        kind: 
+                                                                            LoopMatch {
+                                                                                state:
+                                                                                    Expr {
+                                                                                        ty: bool
+                                                                                        temp_lifetime: TempLifetime { temp_lifetime: Some(Node(5)), backwards_incompatible: None }
+                                                                                        span: $DIR/thir-tree-loop-match.rs:10:9: 10:14 (#0)
+                                                                                        kind: 
+                                                                                            Scope {
+                                                                                                region_scope: Node(7)
+                                                                                                lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).7))
+                                                                                                value:
+                                                                                                    Expr {
+                                                                                                        ty: bool
+                                                                                                        temp_lifetime: TempLifetime { temp_lifetime: Some(Node(5)), backwards_incompatible: None }
+                                                                                                        span: $DIR/thir-tree-loop-match.rs:10:9: 10:14 (#0)
+                                                                                                        kind: 
+                                                                                                            VarRef {
+                                                                                                                id: LocalVarId(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).2))
+                                                                                                            }
+                                                                                                    }
+                                                                                            }
+                                                                                    }
+                                                                                region_scope: Node(10)
+                                                                                match_span: $DIR/thir-tree-loop-match.rs:11:13: 17:14 (#0)
+                                                                                arms: [
+                                                                                    Arm {
+                                                                                        pattern: 
+                                                                                            Pat: {
+                                                                                                ty: bool
+                                                                                                span: $DIR/thir-tree-loop-match.rs:12:17: 12:21 (#0)
+                                                                                                kind: PatKind {
+                                                                                                    Constant {
+                                                                                                        value: Ty(bool, true)
+                                                                                                    }
+                                                                                                }
+                                                                                            }
+                                                                                        guard: None
+                                                                                        body: 
+                                                                                            Expr {
+                                                                                                ty: bool
+                                                                                                temp_lifetime: TempLifetime { temp_lifetime: Some(Node(16)), backwards_incompatible: None }
+                                                                                                span: $DIR/thir-tree-loop-match.rs:12:25: 15:18 (#0)
+                                                                                                kind: 
+                                                                                                    Scope {
+                                                                                                        region_scope: Node(17)
+                                                                                                        lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).17))
+                                                                                                        value:
+                                                                                                            Expr {
+                                                                                                                ty: bool
+                                                                                                                temp_lifetime: TempLifetime { temp_lifetime: Some(Node(16)), backwards_incompatible: None }
+                                                                                                                span: $DIR/thir-tree-loop-match.rs:12:25: 15:18 (#0)
+                                                                                                                kind: 
+                                                                                                                    NeverToAny {
+                                                                                                                        source:
+                                                                                                                            Expr {
+                                                                                                                                ty: !
+                                                                                                                                temp_lifetime: TempLifetime { temp_lifetime: Some(Node(16)), backwards_incompatible: None }
+                                                                                                                                span: $DIR/thir-tree-loop-match.rs:12:25: 15:18 (#0)
+                                                                                                                                kind: 
+                                                                                                                                    Block {
+                                                                                                                                        targeted_by_break: false
+                                                                                                                                        span: $DIR/thir-tree-loop-match.rs:12:25: 15:18 (#0)
+                                                                                                                                        region_scope: Node(18)
+                                                                                                                                        safety_mode: Safe
+                                                                                                                                        stmts: [
+                                                                                                                                            Stmt {
+                                                                                                                                                kind: Expr {
+                                                                                                                                                    scope: Node(21)
+                                                                                                                                                    expr:
+                                                                                                                                                        Expr {
+                                                                                                                                                            ty: !
+                                                                                                                                                            temp_lifetime: TempLifetime { temp_lifetime: Some(Node(21)), backwards_incompatible: None }
+                                                                                                                                                            span: $DIR/thir-tree-loop-match.rs:14:21: 14:37 (#0)
+                                                                                                                                                            kind: 
+                                                                                                                                                                Scope {
+                                                                                                                                                                    region_scope: Node(19)
+                                                                                                                                                                    lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).19))
+                                                                                                                                                                    value:
+                                                                                                                                                                        Expr {
+                                                                                                                                                                            ty: !
+                                                                                                                                                                            temp_lifetime: TempLifetime { temp_lifetime: Some(Node(21)), backwards_incompatible: None }
+                                                                                                                                                                            span: $DIR/thir-tree-loop-match.rs:14:21: 14:37 (#0)
+                                                                                                                                                                            kind: 
+                                                                                                                                                                                ConstContinue (
+                                                                                                                                                                                    label: Node(10)
+                                                                                                                                                                                    value:
+                                                                                                                                                                                        Expr {
+                                                                                                                                                                                            ty: bool
+                                                                                                                                                                                            temp_lifetime: TempLifetime { temp_lifetime: Some(Node(21)), backwards_incompatible: None }
+                                                                                                                                                                                            span: $DIR/thir-tree-loop-match.rs:14:32: 14:37 (#0)
+                                                                                                                                                                                            kind: 
+                                                                                                                                                                                                Scope {
+                                                                                                                                                                                                    region_scope: Node(20)
+                                                                                                                                                                                                    lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).20))
+                                                                                                                                                                                                    value:
+                                                                                                                                                                                                        Expr {
+                                                                                                                                                                                                            ty: bool
+                                                                                                                                                                                                            temp_lifetime: TempLifetime { temp_lifetime: Some(Node(21)), backwards_incompatible: None }
+                                                                                                                                                                                                            span: $DIR/thir-tree-loop-match.rs:14:32: 14:37 (#0)
+                                                                                                                                                                                                            kind: 
+                                                                                                                                                                                                                Literal( lit: Spanned { node: Bool(false), span: $DIR/thir-tree-loop-match.rs:14:32: 14:37 (#0) }, neg: false)
+
+                                                                                                                                                                                                        }
+                                                                                                                                                                                                }
+                                                                                                                                                                                        }
+                                                                                                                                                                                )
+                                                                                                                                                                        }
+                                                                                                                                                                }
+                                                                                                                                                        }
+                                                                                                                                                }
+                                                                                                                                            }
+                                                                                                                                        ]
+                                                                                                                                        expr: []
+                                                                                                                                    }
+                                                                                                                            }
+                                                                                                                    }
+                                                                                                            }
+                                                                                                    }
+                                                                                            }
+                                                                                        lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).16))
+                                                                                        scope: Node(16)
+                                                                                        span: $DIR/thir-tree-loop-match.rs:12:17: 15:18 (#0)
+                                                                                    }
+                                                                                    Arm {
+                                                                                        pattern: 
+                                                                                            Pat: {
+                                                                                                ty: bool
+                                                                                                span: $DIR/thir-tree-loop-match.rs:16:17: 16:22 (#0)
+                                                                                                kind: PatKind {
+                                                                                                    Constant {
+                                                                                                        value: Ty(bool, false)
+                                                                                                    }
+                                                                                                }
+                                                                                            }
+                                                                                        guard: None
+                                                                                        body: 
+                                                                                            Expr {
+                                                                                                ty: bool
+                                                                                                temp_lifetime: TempLifetime { temp_lifetime: Some(Node(24)), backwards_incompatible: None }
+                                                                                                span: $DIR/thir-tree-loop-match.rs:16:26: 16:38 (#0)
+                                                                                                kind: 
+                                                                                                    Scope {
+                                                                                                        region_scope: Node(25)
+                                                                                                        lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).25))
+                                                                                                        value:
+                                                                                                            Expr {
+                                                                                                                ty: bool
+                                                                                                                temp_lifetime: TempLifetime { temp_lifetime: Some(Node(24)), backwards_incompatible: None }
+                                                                                                                span: $DIR/thir-tree-loop-match.rs:16:26: 16:38 (#0)
+                                                                                                                kind: 
+                                                                                                                    NeverToAny {
+                                                                                                                        source:
+                                                                                                                            Expr {
+                                                                                                                                ty: !
+                                                                                                                                temp_lifetime: TempLifetime { temp_lifetime: Some(Node(24)), backwards_incompatible: None }
+                                                                                                                                span: $DIR/thir-tree-loop-match.rs:16:26: 16:38 (#0)
+                                                                                                                                kind: 
+                                                                                                                                    Return {
+                                                                                                                                        value:
+                                                                                                                                            Expr {
+                                                                                                                                                ty: bool
+                                                                                                                                                temp_lifetime: TempLifetime { temp_lifetime: Some(Node(24)), backwards_incompatible: None }
+                                                                                                                                                span: $DIR/thir-tree-loop-match.rs:16:33: 16:38 (#0)
+                                                                                                                                                kind: 
+                                                                                                                                                    Scope {
+                                                                                                                                                        region_scope: Node(26)
+                                                                                                                                                        lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).26))
+                                                                                                                                                        value:
+                                                                                                                                                            Expr {
+                                                                                                                                                                ty: bool
+                                                                                                                                                                temp_lifetime: TempLifetime { temp_lifetime: Some(Node(24)), backwards_incompatible: None }
+                                                                                                                                                                span: $DIR/thir-tree-loop-match.rs:16:33: 16:38 (#0)
+                                                                                                                                                                kind: 
+                                                                                                                                                                    VarRef {
+                                                                                                                                                                        id: LocalVarId(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).2))
+                                                                                                                                                                    }
+                                                                                                                                                            }
+                                                                                                                                                    }
+                                                                                                                                            }
+                                                                                                                                    }
+                                                                                                                            }
+                                                                                                                    }
+                                                                                                            }
+                                                                                                    }
+                                                                                            }
+                                                                                        lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree_loop_match[3c53]::boolean).24))
+                                                                                        scope: Node(24)
+                                                                                        span: $DIR/thir-tree-loop-match.rs:16:17: 16:38 (#0)
+                                                                                    }
+                                                                                ]
+                                                                            }
+                                                                    }
+                                                            }
+                                                    }
+                                            }
+                                    }
+                            }
+                    }
+            }
+    }
+
+
+DefId(0:4 ~ thir_tree_loop_match[3c53]::main):
+params: [
+]
+body:
+    Expr {
+        ty: ()
+        temp_lifetime: TempLifetime { temp_lifetime: Some(Node(2)), backwards_incompatible: None }
+        span: $DIR/thir-tree-loop-match.rs:22:11: 22:13 (#0)
+        kind: 
+            Scope {
+                region_scope: Node(2)
+                lint_level: Explicit(HirId(DefId(0:4 ~ thir_tree_loop_match[3c53]::main).2))
+                value:
+                    Expr {
+                        ty: ()
+                        temp_lifetime: TempLifetime { temp_lifetime: Some(Node(2)), backwards_incompatible: None }
+                        span: $DIR/thir-tree-loop-match.rs:22:11: 22:13 (#0)
+                        kind: 
+                            Block {
+                                targeted_by_break: false
+                                span: $DIR/thir-tree-loop-match.rs:22:11: 22:13 (#0)
+                                region_scope: Node(1)
+                                safety_mode: Safe
+                                stmts: []
+                                expr: []
+                            }
+                    }
+            }
+    }
+
+
diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs
index 9141d327aee..ff1ce949f09 100644
--- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs
+++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs
@@ -6,15 +6,15 @@
 
 #[const_trait]
 trait Trait {
-    type Assoc: ~const Trait;
+    type Assoc: [const] Trait;
     fn func() -> i32;
 }
 
-const fn unqualified<T: ~const Trait>() -> i32 {
+const fn unqualified<T: [const] Trait>() -> i32 {
     T::Assoc::func()
 }
 
-const fn qualified<T: ~const Trait>() -> i32 {
+const fn qualified<T: [const] Trait>() -> i32 {
     <T as Trait>::Assoc::func()
 }
 
diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs
index 19e86b50d33..5773f2281c3 100644
--- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs
+++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs
@@ -5,7 +5,7 @@
 
 #[const_trait]
 trait Trait {
-    type Assoc: ~const Trait;
+    type Assoc: [const] Trait;
     fn func() -> i32;
 }
 
diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.current.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.current.stderr
index 4cd87002e49..a0474e65efe 100644
--- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.current.stderr
+++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.current.stderr
@@ -1,10 +1,10 @@
-error[E0277]: the trait bound `U: ~const Other` is not satisfied
+error[E0277]: the trait bound `U: [const] Other` is not satisfied
   --> $DIR/assoc-type-const-bound-usage-fail-2.rs:24:5
    |
 LL |     T::Assoc::<U>::func();
    |     ^^^^^^^^^^^^^
 
-error[E0277]: the trait bound `U: ~const Other` is not satisfied
+error[E0277]: the trait bound `U: [const] Other` is not satisfied
   --> $DIR/assoc-type-const-bound-usage-fail-2.rs:26:5
    |
 LL |     <T as Trait>::Assoc::<U>::func();
diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.next.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.next.stderr
index 4cd87002e49..a0474e65efe 100644
--- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.next.stderr
+++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.next.stderr
@@ -1,10 +1,10 @@
-error[E0277]: the trait bound `U: ~const Other` is not satisfied
+error[E0277]: the trait bound `U: [const] Other` is not satisfied
   --> $DIR/assoc-type-const-bound-usage-fail-2.rs:24:5
    |
 LL |     T::Assoc::<U>::func();
    |     ^^^^^^^^^^^^^
 
-error[E0277]: the trait bound `U: ~const Other` is not satisfied
+error[E0277]: the trait bound `U: [const] Other` is not satisfied
   --> $DIR/assoc-type-const-bound-usage-fail-2.rs:26:5
    |
 LL |     <T as Trait>::Assoc::<U>::func();
diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs
index e1c30b53611..5338c27bedc 100644
--- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs
+++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.rs
@@ -1,7 +1,7 @@
 //@ revisions: current next
 //@[next] compile-flags: -Znext-solver
 
-// Check that `~const` item bounds only hold if the where clauses on the
+// Check that `[const]` item bounds only hold if the where clauses on the
 // associated type are also const.
 // i.e. check that we validate the const conditions for the associated type
 // when considering one of implied const bounds.
@@ -10,9 +10,9 @@
 
 #[const_trait]
 trait Trait {
-    type Assoc<U>: ~const Trait
+    type Assoc<U>: [const] Trait
     where
-        U: ~const Other;
+        U: [const] Other;
 
     fn func();
 }
@@ -20,14 +20,14 @@ trait Trait {
 #[const_trait]
 trait Other {}
 
-const fn fails<T: ~const Trait, U: Other>() {
+const fn fails<T: [const] Trait, U: Other>() {
     T::Assoc::<U>::func();
-    //~^ ERROR the trait bound `U: ~const Other` is not satisfied
+    //~^ ERROR the trait bound `U: [const] Other` is not satisfied
     <T as Trait>::Assoc::<U>::func();
-    //~^ ERROR the trait bound `U: ~const Other` is not satisfied
+    //~^ ERROR the trait bound `U: [const] Other` is not satisfied
 }
 
-const fn works<T: ~const Trait, U: ~const Other>() {
+const fn works<T: [const] Trait, U: [const] Other>() {
     T::Assoc::<U>::func();
     <T as Trait>::Assoc::<U>::func();
 }
diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.current.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.current.stderr
index 9c29a894749..20b01d06e8d 100644
--- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.current.stderr
+++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.current.stderr
@@ -1,10 +1,10 @@
-error[E0277]: the trait bound `T: ~const Trait` is not satisfied
+error[E0277]: the trait bound `T: [const] Trait` is not satisfied
   --> $DIR/assoc-type-const-bound-usage-fail.rs:17:5
    |
 LL |     T::Assoc::func();
    |     ^^^^^^^^
 
-error[E0277]: the trait bound `T: ~const Trait` is not satisfied
+error[E0277]: the trait bound `T: [const] Trait` is not satisfied
   --> $DIR/assoc-type-const-bound-usage-fail.rs:19:5
    |
 LL |     <T as Trait>::Assoc::func();
diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.next.stderr b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.next.stderr
index 9c29a894749..20b01d06e8d 100644
--- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.next.stderr
+++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.next.stderr
@@ -1,10 +1,10 @@
-error[E0277]: the trait bound `T: ~const Trait` is not satisfied
+error[E0277]: the trait bound `T: [const] Trait` is not satisfied
   --> $DIR/assoc-type-const-bound-usage-fail.rs:17:5
    |
 LL |     T::Assoc::func();
    |     ^^^^^^^^
 
-error[E0277]: the trait bound `T: ~const Trait` is not satisfied
+error[E0277]: the trait bound `T: [const] Trait` is not satisfied
   --> $DIR/assoc-type-const-bound-usage-fail.rs:19:5
    |
 LL |     <T as Trait>::Assoc::func();
diff --git a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs
index 3761fea1968..4940b3a1aa6 100644
--- a/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs
+++ b/tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs
@@ -1,7 +1,7 @@
 //@ revisions: current next
 //@[next] compile-flags: -Znext-solver
 
-// Check that `~const` item bounds only hold if the parent trait is `~const`.
+// Check that `[const]` item bounds only hold if the parent trait is `[const]`.
 // i.e. check that we validate the const conditions for the associated type
 // when considering one of implied const bounds.
 
@@ -9,18 +9,18 @@
 
 #[const_trait]
 trait Trait {
-    type Assoc: ~const Trait;
+    type Assoc: [const] Trait;
     fn func();
 }
 
 const fn unqualified<T: Trait>() {
     T::Assoc::func();
-    //~^ ERROR the trait bound `T: ~const Trait` is not satisfied
+    //~^ ERROR the trait bound `T: [const] Trait` is not satisfied
     <T as Trait>::Assoc::func();
-    //~^ ERROR the trait bound `T: ~const Trait` is not satisfied
+    //~^ ERROR the trait bound `T: [const] Trait` is not satisfied
 }
 
-const fn works<T: ~const Trait>() {
+const fn works<T: [const] Trait>() {
     T::Assoc::func();
     <T as Trait>::Assoc::func();
 }
diff --git a/tests/ui/traits/const-traits/assoc-type.current.stderr b/tests/ui/traits/const-traits/assoc-type.current.stderr
index 7526369194b..1e58efeedee 100644
--- a/tests/ui/traits/const-traits/assoc-type.current.stderr
+++ b/tests/ui/traits/const-traits/assoc-type.current.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `NonConstAdd: ~const Add` is not satisfied
+error[E0277]: the trait bound `NonConstAdd: [const] Add` is not satisfied
   --> $DIR/assoc-type.rs:37:16
    |
 LL |     type Bar = NonConstAdd;
@@ -7,8 +7,8 @@ LL |     type Bar = NonConstAdd;
 note: required by a bound in `Foo::Bar`
   --> $DIR/assoc-type.rs:33:15
    |
-LL |     type Bar: ~const Add;
-   |               ^^^^^^^^^^ required by this bound in `Foo::Bar`
+LL |     type Bar: [const] Add;
+   |               ^^^^^^^^^^^ required by this bound in `Foo::Bar`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/const-traits/assoc-type.next.stderr b/tests/ui/traits/const-traits/assoc-type.next.stderr
index 7526369194b..1e58efeedee 100644
--- a/tests/ui/traits/const-traits/assoc-type.next.stderr
+++ b/tests/ui/traits/const-traits/assoc-type.next.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `NonConstAdd: ~const Add` is not satisfied
+error[E0277]: the trait bound `NonConstAdd: [const] Add` is not satisfied
   --> $DIR/assoc-type.rs:37:16
    |
 LL |     type Bar = NonConstAdd;
@@ -7,8 +7,8 @@ LL |     type Bar = NonConstAdd;
 note: required by a bound in `Foo::Bar`
   --> $DIR/assoc-type.rs:33:15
    |
-LL |     type Bar: ~const Add;
-   |               ^^^^^^^^^^ required by this bound in `Foo::Bar`
+LL |     type Bar: [const] Add;
+   |               ^^^^^^^^^^^ required by this bound in `Foo::Bar`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/const-traits/assoc-type.rs b/tests/ui/traits/const-traits/assoc-type.rs
index a169b61994c..1faef1b0a32 100644
--- a/tests/ui/traits/const-traits/assoc-type.rs
+++ b/tests/ui/traits/const-traits/assoc-type.rs
@@ -30,12 +30,12 @@ impl Add for NonConstAdd {
 
 #[const_trait]
 trait Foo {
-    type Bar: ~const Add;
+    type Bar: [const] Add;
 }
 
 impl const Foo for NonConstAdd {
     type Bar = NonConstAdd;
-    //~^ ERROR the trait bound `NonConstAdd: ~const Add` is not satisfied
+    //~^ ERROR the trait bound `NonConstAdd: [const] Add` is not satisfied
 }
 
 #[const_trait]
diff --git a/tests/ui/traits/const-traits/auxiliary/minicore.rs b/tests/ui/traits/const-traits/auxiliary/minicore.rs
index 073337b2ac6..d2133bbbcae 100644
--- a/tests/ui/traits/const-traits/auxiliary/minicore.rs
+++ b/tests/ui/traits/const-traits/auxiliary/minicore.rs
@@ -86,14 +86,14 @@ enum ControlFlow<B, C = ()> {
 #[const_trait]
 #[lang = "fn"]
 #[rustc_paren_sugar]
-pub trait Fn<Args: Tuple>: ~const FnMut<Args> {
+pub trait Fn<Args: Tuple>: [const] FnMut<Args> {
     extern "rust-call" fn call(&self, args: Args) -> Self::Output;
 }
 
 #[const_trait]
 #[lang = "fn_mut"]
 #[rustc_paren_sugar]
-pub trait FnMut<Args: Tuple>: ~const FnOnce<Args> {
+pub trait FnMut<Args: Tuple>: [const] FnOnce<Args> {
     extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output;
 }
 
@@ -142,7 +142,7 @@ pub trait Drop {
 
 #[const_trait]
 pub trait Residual<O> {
-    type TryType: ~const Try<Output = O, Residual = Self> + Try<Output = O, Residual = Self>;
+    type TryType: [const] Try<Output = O, Residual = Self> + Try<Output = O, Residual = Self>;
 }
 
 const fn size_of<T>() -> usize {
@@ -183,7 +183,7 @@ pub unsafe trait SliceIndex<T: PointeeSized> {
 
 impl<T, I> const Index<I> for [T]
 where
-    I: ~const SliceIndex<[T]>,
+    I: [const] SliceIndex<[T]>,
 {
     type Output = I::Output;
 
@@ -195,7 +195,7 @@ where
 
 impl<T, I, const N: usize> const Index<I> for [T; N]
 where
-    [T]: ~const Index<I>,
+    [T]: [const] Index<I>,
 {
     type Output = <[T] as Index<I>>::Output;
 
@@ -265,7 +265,7 @@ use Option::*;
 
 const fn as_deref<T>(opt: &Option<T>) -> Option<&T::Target>
 where
-    T: ~const Deref,
+    T: [const] Deref,
 {
     match opt {
         Option::Some(t) => Option::Some(t.deref()),
@@ -285,7 +285,7 @@ pub trait From<T>: Sized {
 
 impl<T, U> const Into<U> for T
 where
-    U: ~const From<T>,
+    U: [const] From<T>,
 {
     fn into(self) -> U {
         U::from(self)
@@ -323,7 +323,7 @@ pub trait PartialEq<Rhs: PointeeSized = Self>: PointeeSized {
 
 impl<A: PointeeSized, B: PointeeSized> const PartialEq<&B> for &A
 where
-    A: ~const PartialEq<B>,
+    A: [const] PartialEq<B>,
 {
     fn eq(&self, other: &&B) -> bool {
         PartialEq::eq(*self, *other)
@@ -373,7 +373,7 @@ impl<'a, T: PointeeSized> Pin<&'a T> {
 impl<P: Deref> Pin<P> {
     const fn as_ref(&self) -> Pin<&P::Target>
     where
-        P: ~const Deref,
+        P: [const] Deref,
     {
         unsafe { Pin::new_unchecked(&*self.pointer) }
     }
@@ -403,7 +403,7 @@ impl<T> Option<T> {
     }
 }
 
-impl<P: ~const Deref> const Deref for Pin<P> {
+impl<P: [const] Deref> const Deref for Pin<P> {
     type Target = P::Target;
     fn deref(&self) -> &P::Target {
         Pin::get_ref(Pin::as_ref(self))
@@ -467,7 +467,7 @@ pub trait Clone: Sized {
     fn clone(&self) -> Self;
     fn clone_from(&mut self, source: &Self)
     where
-        Self: ~const Destruct,
+        Self: [const] Destruct,
     {
         *self = source.clone()
     }
@@ -476,7 +476,7 @@ pub trait Clone: Sized {
 #[lang = "structural_peq"]
 pub trait StructuralPartialEq {}
 
-pub const fn drop<T: ~const Destruct>(_: T) {}
+pub const fn drop<T: [const] Destruct>(_: T) {}
 
 #[rustc_intrinsic]
 const fn const_eval_select<ARG: Tuple, F, G, RET>(
diff --git a/tests/ui/traits/const-traits/call-const-closure.rs b/tests/ui/traits/const-traits/call-const-closure.rs
index 21f4374b8d5..70dfaf724c9 100644
--- a/tests/ui/traits/const-traits/call-const-closure.rs
+++ b/tests/ui/traits/const-traits/call-const-closure.rs
@@ -15,7 +15,7 @@ impl Bar for () {
 
 const FOO: () = {
     (const || ().foo())();
-    //~^ ERROR the trait bound `(): ~const Bar` is not satisfied
+    //~^ ERROR the trait bound `(): [const] Bar` is not satisfied
     // FIXME(const_trait_impl): The constness environment for const closures is wrong.
 };
 
diff --git a/tests/ui/traits/const-traits/call-const-closure.stderr b/tests/ui/traits/const-traits/call-const-closure.stderr
index fe7c115aaab..4bb8b2e9777 100644
--- a/tests/ui/traits/const-traits/call-const-closure.stderr
+++ b/tests/ui/traits/const-traits/call-const-closure.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `(): ~const Bar` is not satisfied
+error[E0277]: the trait bound `(): [const] Bar` is not satisfied
   --> $DIR/call-const-closure.rs:17:18
    |
 LL |     (const || ().foo())();
diff --git a/tests/ui/traits/const-traits/call-const-in-tilde-const.rs b/tests/ui/traits/const-traits/call-const-in-conditionally-const.rs
index b6d1517499d..4e8c2cd171e 100644
--- a/tests/ui/traits/const-traits/call-const-in-tilde-const.rs
+++ b/tests/ui/traits/const-traits/call-const-in-conditionally-const.rs
@@ -5,7 +5,7 @@
     fn foo();
 }
 
-const fn foo<T: ~const Foo>() {
+const fn foo<T: [const] Foo>() {
     const { T::foo() }
     //~^ ERROR the trait bound `T: const Foo` is not satisfied
 }
diff --git a/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr b/tests/ui/traits/const-traits/call-const-in-conditionally-const.stderr
index b9dabceb5de..f14b640ca31 100644
--- a/tests/ui/traits/const-traits/call-const-in-tilde-const.stderr
+++ b/tests/ui/traits/const-traits/call-const-in-conditionally-const.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `T: const Foo` is not satisfied
-  --> $DIR/call-const-in-tilde-const.rs:9:13
+  --> $DIR/call-const-in-conditionally-const.rs:9:13
    |
 LL |     const { T::foo() }
    |             ^
diff --git a/tests/ui/traits/const-traits/call-const-trait-method-fail.rs b/tests/ui/traits/const-traits/call-const-trait-method-fail.rs
index e06d04db804..c03d3e950b0 100644
--- a/tests/ui/traits/const-traits/call-const-trait-method-fail.rs
+++ b/tests/ui/traits/const-traits/call-const-trait-method-fail.rs
@@ -24,7 +24,7 @@ pub const fn add_i32(a: i32, b: i32) -> i32 {
 
 pub const fn add_u32(a: u32, b: u32) -> u32 {
     a.plus(b)
-    //~^ ERROR the trait bound `u32: ~const Plus`
+    //~^ ERROR the trait bound `u32: [const] Plus`
 }
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr b/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr
index 64850335c2a..4aaf53344c9 100644
--- a/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr
+++ b/tests/ui/traits/const-traits/call-const-trait-method-fail.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `u32: ~const Plus` is not satisfied
+error[E0277]: the trait bound `u32: [const] Plus` is not satisfied
   --> $DIR/call-const-trait-method-fail.rs:26:5
    |
 LL |     a.plus(b)
diff --git a/tests/ui/traits/const-traits/call-const-trait-method-pass.rs b/tests/ui/traits/const-traits/call-const-trait-method-pass.rs
index 3004647ede0..d66a11490c5 100644
--- a/tests/ui/traits/const-traits/call-const-trait-method-pass.rs
+++ b/tests/ui/traits/const-traits/call-const-trait-method-pass.rs
@@ -1,6 +1,5 @@
-//@ known-bug: #110395
-
 #![feature(const_trait_impl, const_ops)]
+//@ check-pass
 
 struct Int(i32);
 
diff --git a/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr b/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr
deleted file mode 100644
index 7746f103ac3..00000000000
--- a/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
-  --> $DIR/call-const-trait-method-pass.rs:15:12
-   |
-LL | impl const PartialEq for Int {
-   |            ^^^^^^^^^ this trait is not `const`
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error[E0015]: cannot call non-const method `<Int as PartialEq>::eq` in constant functions
-  --> $DIR/call-const-trait-method-pass.rs:20:15
-   |
-LL |         !self.eq(other)
-   |               ^^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/call-generic-in-impl.rs b/tests/ui/traits/const-traits/call-generic-in-impl.rs
index 6149dc3d126..f38590fa3c0 100644
--- a/tests/ui/traits/const-traits/call-generic-in-impl.rs
+++ b/tests/ui/traits/const-traits/call-generic-in-impl.rs
@@ -1,5 +1,4 @@
-//@ known-bug: #110395
-// FIXME(const_trait_impl) check-pass
+//@ check-pass
 #![feature(const_trait_impl)]
 
 #[const_trait]
@@ -7,7 +6,7 @@ trait MyPartialEq {
     fn eq(&self, other: &Self) -> bool;
 }
 
-impl<T: ~const PartialEq> const MyPartialEq for T {
+impl<T: [const] PartialEq> const MyPartialEq for T {
     fn eq(&self, other: &Self) -> bool {
         PartialEq::eq(self, other)
     }
diff --git a/tests/ui/traits/const-traits/call-generic-in-impl.stderr b/tests/ui/traits/const-traits/call-generic-in-impl.stderr
deleted file mode 100644
index a45dfd95b4a..00000000000
--- a/tests/ui/traits/const-traits/call-generic-in-impl.stderr
+++ /dev/null
@@ -1,30 +0,0 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/call-generic-in-impl.rs:10:9
-   |
-LL | impl<T: ~const PartialEq> const MyPartialEq for T {
-   |         ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/call-generic-in-impl.rs:10:9
-   |
-LL | impl<T: ~const PartialEq> const MyPartialEq for T {
-   |         ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0015]: cannot call non-const method `<T as PartialEq>::eq` in constant functions
-  --> $DIR/call-generic-in-impl.rs:12:9
-   |
-LL |         PartialEq::eq(self, other)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/call-generic-method-chain.rs b/tests/ui/traits/const-traits/call-generic-method-chain.rs
index 74beab71208..1ad71c424a3 100644
--- a/tests/ui/traits/const-traits/call-generic-method-chain.rs
+++ b/tests/ui/traits/const-traits/call-generic-method-chain.rs
@@ -1,8 +1,7 @@
 //! Basic test for calling methods on generic type parameters in `const fn`.
 
-//@ known-bug: #110395
 //@ compile-flags: -Znext-solver
-// FIXME(const_trait_impl) check-pass
+//@ check-pass
 
 #![feature(const_trait_impl)]
 
@@ -17,11 +16,11 @@ impl const PartialEq for S {
     }
 }
 
-const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
+const fn equals_self<T: [const] PartialEq>(t: &T) -> bool {
     *t == *t
 }
 
-const fn equals_self_wrapper<T: ~const PartialEq>(t: &T) -> bool {
+const fn equals_self_wrapper<T: [const] PartialEq>(t: &T) -> bool {
     equals_self(t)
 }
 
diff --git a/tests/ui/traits/const-traits/call-generic-method-chain.stderr b/tests/ui/traits/const-traits/call-generic-method-chain.stderr
deleted file mode 100644
index 40b4f14733f..00000000000
--- a/tests/ui/traits/const-traits/call-generic-method-chain.stderr
+++ /dev/null
@@ -1,66 +0,0 @@
-error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
-  --> $DIR/call-generic-method-chain.rs:11:12
-   |
-LL | impl const PartialEq for S {
-   |            ^^^^^^^^^ this trait is not `const`
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/call-generic-method-chain.rs:20:25
-   |
-LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
-   |                         ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/call-generic-method-chain.rs:20:25
-   |
-LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
-   |                         ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/call-generic-method-chain.rs:24:33
-   |
-LL | const fn equals_self_wrapper<T: ~const PartialEq>(t: &T) -> bool {
-   |                                 ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/call-generic-method-chain.rs:24:33
-   |
-LL | const fn equals_self_wrapper<T: ~const PartialEq>(t: &T) -> bool {
-   |                                 ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/call-generic-method-chain.rs:21:5
-   |
-LL |     *t == *t
-   |     ^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error[E0015]: cannot call non-const method `<S as PartialEq>::eq` in constant functions
-  --> $DIR/call-generic-method-chain.rs:16:15
-   |
-LL |         !self.eq(other)
-   |               ^^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error: aborting due to 7 previous errors
-
-For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs b/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs
index ec615d8484c..58f293b5ac5 100644
--- a/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs
+++ b/tests/ui/traits/const-traits/call-generic-method-dup-bound.rs
@@ -1,6 +1,5 @@
 //@ compile-flags: -Znext-solver
-//@ known-bug: #110395
-// FIXME(const_trait_impl) check-pass
+//@ check-pass
 
 #![feature(const_trait_impl)]
 
@@ -15,16 +14,16 @@ impl const PartialEq for S {
     }
 }
 
-// This duplicate bound should not result in ambiguities. It should be equivalent to a single ~const
-// bound.
-const fn equals_self<T: PartialEq + ~const PartialEq>(t: &T) -> bool {
+// This duplicate bound should not result in ambiguities.
+// It should be equivalent to a single [const] bound.
+const fn equals_self<T: PartialEq + [const] PartialEq>(t: &T) -> bool {
     *t == *t
 }
 
 trait A: PartialEq {}
 impl<T: PartialEq> A for T {}
 
-const fn equals_self2<T: A + ~const PartialEq>(t: &T) -> bool {
+const fn equals_self2<T: A + [const] PartialEq>(t: &T) -> bool {
     *t == *t
 }
 
diff --git a/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr b/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr
deleted file mode 100644
index c74f5cf786c..00000000000
--- a/tests/ui/traits/const-traits/call-generic-method-dup-bound.stderr
+++ /dev/null
@@ -1,74 +0,0 @@
-error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
-  --> $DIR/call-generic-method-dup-bound.rs:9:12
-   |
-LL | impl const PartialEq for S {
-   |            ^^^^^^^^^ this trait is not `const`
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/call-generic-method-dup-bound.rs:20:37
-   |
-LL | const fn equals_self<T: PartialEq + ~const PartialEq>(t: &T) -> bool {
-   |                                     ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/call-generic-method-dup-bound.rs:20:37
-   |
-LL | const fn equals_self<T: PartialEq + ~const PartialEq>(t: &T) -> bool {
-   |                                     ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/call-generic-method-dup-bound.rs:27:30
-   |
-LL | const fn equals_self2<T: A + ~const PartialEq>(t: &T) -> bool {
-   |                              ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/call-generic-method-dup-bound.rs:27:30
-   |
-LL | const fn equals_self2<T: A + ~const PartialEq>(t: &T) -> bool {
-   |                              ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/call-generic-method-dup-bound.rs:21:5
-   |
-LL |     *t == *t
-   |     ^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error[E0015]: cannot call non-const method `<S as PartialEq>::eq` in constant functions
-  --> $DIR/call-generic-method-dup-bound.rs:14:15
-   |
-LL |         !self.eq(other)
-   |               ^^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/call-generic-method-dup-bound.rs:28:5
-   |
-LL |     *t == *t
-   |     ^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error: aborting due to 8 previous errors
-
-For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/call-generic-method-fail.rs b/tests/ui/traits/const-traits/call-generic-method-fail.rs
index 66881334a29..4528f3b122f 100644
--- a/tests/ui/traits/const-traits/call-generic-method-fail.rs
+++ b/tests/ui/traits/const-traits/call-generic-method-fail.rs
@@ -3,7 +3,7 @@
 
 pub const fn equals_self<T: PartialEq>(t: &T) -> bool {
     *t == *t
-    //~^ ERROR cannot call non-const operator in constant functions
+    //~^ ERROR the trait bound `T: [const] PartialEq` is not satisfied
 }
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/call-generic-method-fail.stderr b/tests/ui/traits/const-traits/call-generic-method-fail.stderr
index 6bacb986fef..a2fba141f7b 100644
--- a/tests/ui/traits/const-traits/call-generic-method-fail.stderr
+++ b/tests/ui/traits/const-traits/call-generic-method-fail.stderr
@@ -1,11 +1,9 @@
-error[E0015]: cannot call non-const operator in constant functions
+error[E0277]: the trait bound `T: [const] PartialEq` is not satisfied
   --> $DIR/call-generic-method-fail.rs:5:5
    |
 LL |     *t == *t
    |     ^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
 
 error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0015`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/call-generic-method-nonconst.rs b/tests/ui/traits/const-traits/call-generic-method-nonconst.rs
index 446a74eb7b7..0efc8a954de 100644
--- a/tests/ui/traits/const-traits/call-generic-method-nonconst.rs
+++ b/tests/ui/traits/const-traits/call-generic-method-nonconst.rs
@@ -14,7 +14,7 @@ impl Foo for S {
     }
 }
 
-const fn equals_self<T: ~const Foo>(t: &T) -> bool {
+const fn equals_self<T: [const] Foo>(t: &T) -> bool {
     true
 }
 
diff --git a/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr b/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr
index 11bbe8bbb40..9c1e0fee9e7 100644
--- a/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr
+++ b/tests/ui/traits/const-traits/call-generic-method-nonconst.stderr
@@ -9,8 +9,8 @@ LL | pub const EQ: bool = equals_self(&S);
 note: required by a bound in `equals_self`
   --> $DIR/call-generic-method-nonconst.rs:17:25
    |
-LL | const fn equals_self<T: ~const Foo>(t: &T) -> bool {
-   |                         ^^^^^^^^^^ required by this bound in `equals_self`
+LL | const fn equals_self<T: [const] Foo>(t: &T) -> bool {
+   |                         ^^^^^^^^^^^ required by this bound in `equals_self`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/const-traits/call-generic-method-pass.rs b/tests/ui/traits/const-traits/call-generic-method-pass.rs
index af793b8da03..aa52a7b9e47 100644
--- a/tests/ui/traits/const-traits/call-generic-method-pass.rs
+++ b/tests/ui/traits/const-traits/call-generic-method-pass.rs
@@ -1,8 +1,7 @@
 //! Basic test for calling methods on generic type parameters in `const fn`.
 
 //@ compile-flags: -Znext-solver
-//@ known-bug: #110395
-// FIXME(const_trait_impl) check-pass
+//@ check-pass
 
 #![feature(const_trait_impl)]
 
@@ -17,7 +16,7 @@ impl const PartialEq for S {
     }
 }
 
-const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
+const fn equals_self<T: [const] PartialEq>(t: &T) -> bool {
     *t == *t
 }
 
diff --git a/tests/ui/traits/const-traits/call-generic-method-pass.stderr b/tests/ui/traits/const-traits/call-generic-method-pass.stderr
deleted file mode 100644
index 1a33ff5ab45..00000000000
--- a/tests/ui/traits/const-traits/call-generic-method-pass.stderr
+++ /dev/null
@@ -1,47 +0,0 @@
-error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
-  --> $DIR/call-generic-method-pass.rs:11:12
-   |
-LL | impl const PartialEq for S {
-   |            ^^^^^^^^^ this trait is not `const`
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/call-generic-method-pass.rs:20:25
-   |
-LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
-   |                         ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/call-generic-method-pass.rs:20:25
-   |
-LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
-   |                         ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/call-generic-method-pass.rs:21:5
-   |
-LL |     *t == *t
-   |     ^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error[E0015]: cannot call non-const method `<S as PartialEq>::eq` in constant functions
-  --> $DIR/call-generic-method-pass.rs:16:15
-   |
-LL |         !self.eq(other)
-   |               ^^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error: aborting due to 5 previous errors
-
-For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/tilde-const-and-const-params.rs b/tests/ui/traits/const-traits/conditionally-const-and-const-params.rs
index 428223d92c0..29553884b21 100644
--- a/tests/ui/traits/const-traits/tilde-const-and-const-params.rs
+++ b/tests/ui/traits/const-traits/conditionally-const-and-const-params.rs
@@ -5,8 +5,8 @@
 struct Foo<const N: usize>;
 
 impl<const N: usize> Foo<N> {
-    fn add<A: ~const Add42>(self) -> Foo<{ A::add(N) }> {
-        //~^ ERROR `~const` is not allowed here
+    fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
+        //~^ ERROR `[const]` is not allowed here
         //~| ERROR the trait bound `A: const Add42` is not satisfied
         Foo
     }
@@ -23,8 +23,8 @@ impl const Add42 for () {
     }
 }
 
-fn bar<A: ~const Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
-    //~^ ERROR `~const` is not allowed here
+fn bar<A: [const] Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
+    //~^ ERROR `[const]` is not allowed here
     //~| ERROR the trait bound `A: const Add42` is not satisfied
     Foo
 }
diff --git a/tests/ui/traits/const-traits/conditionally-const-and-const-params.stderr b/tests/ui/traits/const-traits/conditionally-const-and-const-params.stderr
new file mode 100644
index 00000000000..f450bc6c9ab
--- /dev/null
+++ b/tests/ui/traits/const-traits/conditionally-const-and-const-params.stderr
@@ -0,0 +1,39 @@
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-and-const-params.rs:8:13
+   |
+LL |     fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
+   |             ^^^^^^^^^
+   |
+note: this function is not `const`, so it cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-and-const-params.rs:8:8
+   |
+LL |     fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
+   |        ^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-and-const-params.rs:26:9
+   |
+LL | fn bar<A: [const] Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
+   |         ^^^^^^^^^
+   |
+note: this function is not `const`, so it cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-and-const-params.rs:26:4
+   |
+LL | fn bar<A: [const] Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
+   |    ^^^
+
+error[E0277]: the trait bound `A: const Add42` is not satisfied
+  --> $DIR/conditionally-const-and-const-params.rs:26:62
+   |
+LL | fn bar<A: [const] Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
+   |                                                              ^
+
+error[E0277]: the trait bound `A: const Add42` is not satisfied
+  --> $DIR/conditionally-const-and-const-params.rs:8:45
+   |
+LL |     fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
+   |                                             ^
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs b/tests/ui/traits/const-traits/conditionally-const-assoc-fn-in-trait-impl.rs
index 73b2bdc4e3f..7f01c0b7a5c 100644
--- a/tests/ui/traits/const-traits/tilde-const-assoc-fn-in-trait-impl.rs
+++ b/tests/ui/traits/const-traits/conditionally-const-assoc-fn-in-trait-impl.rs
@@ -5,11 +5,11 @@
 
 #[const_trait]
 trait Main {
-    fn compute<T: ~const Aux>() -> u32;
+    fn compute<T: [const] Aux>() -> u32;
 }
 
 impl const Main for () {
-    fn compute<T: ~const Aux>() -> u32 {
+    fn compute<T: [const] Aux>() -> u32 {
         T::generate()
     }
 }
diff --git a/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs b/tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs
index e7ec3d31eb9..0c644694585 100644
--- a/tests/ui/traits/const-traits/tilde-const-in-struct-args.rs
+++ b/tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs
@@ -11,7 +11,7 @@ trait Trait<const N: u32> {}
 const fn f<
     T: Trait<
         {
-            struct I<U: ~const Trait<0>>(U);
+            struct I<U: [const] Trait<0>>(U);
             0
         },
     >,
diff --git a/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs b/tests/ui/traits/const-traits/conditionally-const-inherent-assoc-const-fn.rs
index 0e010695587..56478a6674b 100644
--- a/tests/ui/traits/const-traits/tilde-const-inherent-assoc-const-fn.rs
+++ b/tests/ui/traits/const-traits/conditionally-const-inherent-assoc-const-fn.rs
@@ -10,7 +10,7 @@ trait Foo {
 struct Bar<T>(T);
 
 impl<T> Bar<T> {
-    const fn foo(&self) where T: ~const Foo {
+    const fn foo(&self) where T: [const] Foo {
         self.0.foo()
     }
 }
diff --git a/tests/ui/traits/const-traits/conditionally-const-invalid-places.rs b/tests/ui/traits/const-traits/conditionally-const-invalid-places.rs
new file mode 100644
index 00000000000..52627004fb2
--- /dev/null
+++ b/tests/ui/traits/const-traits/conditionally-const-invalid-places.rs
@@ -0,0 +1,61 @@
+#![feature(const_trait_impl)]
+
+#[const_trait]
+trait Trait {}
+
+// Regression test for issue #90052.
+fn non_const_function<T: [const] Trait>() {} //~ ERROR `[const]` is not allowed
+
+struct Struct<T: [const] Trait> { field: T } //~ ERROR `[const]` is not allowed here
+struct TupleStruct<T: [const] Trait>(T); //~ ERROR `[const]` is not allowed here
+struct UnitStruct<T: [const] Trait>; //~ ERROR `[const]` is not allowed here
+//~^ ERROR  parameter `T` is never used
+
+enum Enum<T: [const] Trait> { Variant(T) } //~ ERROR `[const]` is not allowed here
+
+union Union<T: [const] Trait> { field: T } //~ ERROR `[const]` is not allowed here
+//~^ ERROR field must implement `Copy`
+
+type Type<T: [const] Trait> = T; //~ ERROR `[const]` is not allowed here
+
+const CONSTANT<T: [const] Trait>: () = (); //~ ERROR `[const]` is not allowed here
+//~^ ERROR generic const items are experimental
+
+trait NonConstTrait {
+    type Type<T: [const] Trait>: [const] Trait;
+    //~^ ERROR `[const]` is not allowed
+    //~| ERROR `[const]` is not allowed
+    fn non_const_function<T: [const] Trait>(); //~ ERROR `[const]` is not allowed
+    const CONSTANT<T: [const] Trait>: (); //~ ERROR `[const]` is not allowed
+    //~^ ERROR generic const items are experimental
+}
+
+impl NonConstTrait for () {
+    type Type<T: [const] Trait> = (); //~ ERROR `[const]` is not allowed
+    //~^ ERROR overflow evaluating the requirement `(): Trait`
+    fn non_const_function<T: [const] Trait>() {} //~ ERROR `[const]` is not allowed
+    const CONSTANT<T: [const] Trait>: () = (); //~ ERROR `[const]` is not allowed
+    //~^ ERROR generic const items are experimental
+}
+
+struct Implementor;
+
+impl Implementor {
+    type Type<T: [const] Trait> = (); //~ ERROR `[const]` is not allowed
+    //~^ ERROR inherent associated types are unstable
+    fn non_const_function<T: [const] Trait>() {} //~ ERROR `[const]` is not allowed
+    const CONSTANT<T: [const] Trait>: () = (); //~ ERROR `[const]` is not allowed
+    //~^ ERROR generic const items are experimental
+}
+
+// non-const traits
+trait Child0: [const] Trait {} //~ ERROR `[const]` is not allowed
+trait Child1 where Self: [const] Trait {} //~ ERROR `[const]` is not allowed
+
+// non-const impl
+impl<T: [const] Trait> Trait for T {} //~ ERROR `[const]` is not allowed
+
+// inherent impl (regression test for issue #117004)
+impl<T: [const] Trait> Struct<T> {} //~ ERROR `[const]` is not allowed
+
+fn main() {}
diff --git a/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr b/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr
new file mode 100644
index 00000000000..62319689861
--- /dev/null
+++ b/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr
@@ -0,0 +1,310 @@
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:7:24
+   |
+LL | fn non_const_function<T: [const] Trait>() {}
+   |                        ^^^^^^^^^
+   |
+note: this function is not `const`, so it cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:7:4
+   |
+LL | fn non_const_function<T: [const] Trait>() {}
+   |    ^^^^^^^^^^^^^^^^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:9:16
+   |
+LL | struct Struct<T: [const] Trait> { field: T }
+   |                ^^^^^^^^^
+   |
+   = note: this item cannot have `[const]` trait bounds
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:10:21
+   |
+LL | struct TupleStruct<T: [const] Trait>(T);
+   |                     ^^^^^^^^^
+   |
+   = note: this item cannot have `[const]` trait bounds
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:11:20
+   |
+LL | struct UnitStruct<T: [const] Trait>;
+   |                    ^^^^^^^^^
+   |
+   = note: this item cannot have `[const]` trait bounds
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:14:12
+   |
+LL | enum Enum<T: [const] Trait> { Variant(T) }
+   |            ^^^^^^^^^
+   |
+   = note: this item cannot have `[const]` trait bounds
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:16:14
+   |
+LL | union Union<T: [const] Trait> { field: T }
+   |              ^^^^^^^^^
+   |
+   = note: this item cannot have `[const]` trait bounds
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:19:12
+   |
+LL | type Type<T: [const] Trait> = T;
+   |            ^^^^^^^^^
+   |
+   = note: this item cannot have `[const]` trait bounds
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:21:17
+   |
+LL | const CONSTANT<T: [const] Trait>: () = ();
+   |                 ^^^^^^^^^
+   |
+   = note: this item cannot have `[const]` trait bounds
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:25:16
+   |
+LL |     type Type<T: [const] Trait>: [const] Trait;
+   |                ^^^^^^^^^
+   |
+note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:25:5
+   |
+LL |     type Type<T: [const] Trait>: [const] Trait;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:25:32
+   |
+LL |     type Type<T: [const] Trait>: [const] Trait;
+   |                                ^^^^^^^^^
+   |
+note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:25:5
+   |
+LL |     type Type<T: [const] Trait>: [const] Trait;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:28:28
+   |
+LL |     fn non_const_function<T: [const] Trait>();
+   |                            ^^^^^^^^^
+   |
+note: this function is not `const`, so it cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:28:8
+   |
+LL |     fn non_const_function<T: [const] Trait>();
+   |        ^^^^^^^^^^^^^^^^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:29:21
+   |
+LL |     const CONSTANT<T: [const] Trait>: ();
+   |                     ^^^^^^^^^
+   |
+   = note: this item cannot have `[const]` trait bounds
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:34:16
+   |
+LL |     type Type<T: [const] Trait> = ();
+   |                ^^^^^^^^^
+   |
+note: associated types in non-const impls cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:34:5
+   |
+LL |     type Type<T: [const] Trait> = ();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:36:28
+   |
+LL |     fn non_const_function<T: [const] Trait>() {}
+   |                            ^^^^^^^^^
+   |
+note: this function is not `const`, so it cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:36:8
+   |
+LL |     fn non_const_function<T: [const] Trait>() {}
+   |        ^^^^^^^^^^^^^^^^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:37:21
+   |
+LL |     const CONSTANT<T: [const] Trait>: () = ();
+   |                     ^^^^^^^^^
+   |
+   = note: this item cannot have `[const]` trait bounds
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:44:16
+   |
+LL |     type Type<T: [const] Trait> = ();
+   |                ^^^^^^^^^
+   |
+note: inherent associated types cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:44:5
+   |
+LL |     type Type<T: [const] Trait> = ();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:46:28
+   |
+LL |     fn non_const_function<T: [const] Trait>() {}
+   |                            ^^^^^^^^^
+   |
+note: this function is not `const`, so it cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:46:8
+   |
+LL |     fn non_const_function<T: [const] Trait>() {}
+   |        ^^^^^^^^^^^^^^^^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:47:21
+   |
+LL |     const CONSTANT<T: [const] Trait>: () = ();
+   |                     ^^^^^^^^^
+   |
+   = note: this item cannot have `[const]` trait bounds
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:52:13
+   |
+LL | trait Child0: [const] Trait {}
+   |             ^^^^^^^^^
+   |
+note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:52:1
+   |
+LL | trait Child0: [const] Trait {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:53:24
+   |
+LL | trait Child1 where Self: [const] Trait {}
+   |                        ^^^^^^^^^
+   |
+note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:53:1
+   |
+LL | trait Child1 where Self: [const] Trait {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:56:7
+   |
+LL | impl<T: [const] Trait> Trait for T {}
+   |       ^^^^^^^^^
+   |
+note: this impl is not `const`, so it cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:56:1
+   |
+LL | impl<T: [const] Trait> Trait for T {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `[const]` is not allowed here
+  --> $DIR/conditionally-const-invalid-places.rs:59:7
+   |
+LL | impl<T: [const] Trait> Struct<T> {}
+   |       ^^^^^^^^^
+   |
+note: inherent impls cannot have `[const]` trait bounds
+  --> $DIR/conditionally-const-invalid-places.rs:59:1
+   |
+LL | impl<T: [const] Trait> Struct<T> {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0658]: generic const items are experimental
+  --> $DIR/conditionally-const-invalid-places.rs:21:15
+   |
+LL | const CONSTANT<T: [const] Trait>: () = ();
+   |               ^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
+   = help: add `#![feature(generic_const_items)]` 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]: generic const items are experimental
+  --> $DIR/conditionally-const-invalid-places.rs:29:19
+   |
+LL |     const CONSTANT<T: [const] Trait>: ();
+   |                   ^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
+   = help: add `#![feature(generic_const_items)]` 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]: generic const items are experimental
+  --> $DIR/conditionally-const-invalid-places.rs:37:19
+   |
+LL |     const CONSTANT<T: [const] Trait>: () = ();
+   |                   ^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
+   = help: add `#![feature(generic_const_items)]` 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]: generic const items are experimental
+  --> $DIR/conditionally-const-invalid-places.rs:47:19
+   |
+LL |     const CONSTANT<T: [const] Trait>: () = ();
+   |                   ^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
+   = help: add `#![feature(generic_const_items)]` 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[E0392]: type parameter `T` is never used
+  --> $DIR/conditionally-const-invalid-places.rs:11:19
+   |
+LL | struct UnitStruct<T: [const] Trait>;
+   |                   ^ unused type parameter
+   |
+   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
+
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/conditionally-const-invalid-places.rs:16:33
+   |
+LL | union Union<T: [const] Trait> { field: T }
+   |                                 ^^^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL | union Union<T: [const] Trait> { field: std::mem::ManuallyDrop<T> }
+   |                                        +++++++++++++++++++++++ +
+
+error[E0275]: overflow evaluating the requirement `(): Trait`
+  --> $DIR/conditionally-const-invalid-places.rs:34:35
+   |
+LL |     type Type<T: [const] Trait> = ();
+   |                                   ^^
+   |
+note: required by a bound in `NonConstTrait::Type`
+  --> $DIR/conditionally-const-invalid-places.rs:25:34
+   |
+LL |     type Type<T: [const] Trait>: [const] Trait;
+   |                                  ^^^^^^^^^^^^^ required by this bound in `NonConstTrait::Type`
+
+error[E0658]: inherent associated types are unstable
+  --> $DIR/conditionally-const-invalid-places.rs:44:5
+   |
+LL |     type Type<T: [const] Trait> = ();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
+   = help: add `#![feature(inherent_associated_types)]` 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 30 previous errors
+
+Some errors have detailed explanations: E0275, E0392, E0658, E0740.
+For more information about an error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs b/tests/ui/traits/const-traits/conditionally-const-trait-bound-assoc-tys.rs
index 53ddb5c0cdf..b0bd8466f66 100644
--- a/tests/ui/traits/const-traits/tilde-const-trait-assoc-tys.rs
+++ b/tests/ui/traits/const-traits/conditionally-const-trait-bound-assoc-tys.rs
@@ -4,11 +4,11 @@
 
 #[const_trait]
 trait Trait {
-    type Assoc<T: ~const Bound>;
+    type Assoc<T: [const] Bound>;
 }
 
 impl const Trait for () {
-    type Assoc<T: ~const Bound> = T;
+    type Assoc<T: [const] Bound> = T;
 }
 
 #[const_trait]
diff --git a/tests/ui/traits/const-traits/conditionally-const-trait-bound-syntax.rs b/tests/ui/traits/const-traits/conditionally-const-trait-bound-syntax.rs
new file mode 100644
index 00000000000..89950c65ef6
--- /dev/null
+++ b/tests/ui/traits/const-traits/conditionally-const-trait-bound-syntax.rs
@@ -0,0 +1,9 @@
+//@ compile-flags: -Z parse-crate-root-only
+//@ check-pass
+
+#![feature(const_trait_impl)]
+
+struct S<
+    T: for<'a> [const] Tr<'a> + 'static + [const] std::ops::Add,
+    T: for<'a: 'b> [const] m::Trait<'a>,
+>;
diff --git a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs
index c735f855bce..94111272708 100644
--- a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs
+++ b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.rs
@@ -8,8 +8,8 @@ trait MyTrait {
 }
 
 trait OtherTrait {
-    fn do_something_else() where Self: ~const MyTrait;
-    //~^ ERROR `~const` is not allowed here
+    fn do_something_else() where Self: [const] MyTrait;
+    //~^ ERROR `[const]` is not allowed here
 }
 
 struct MyStruct<T>(T);
@@ -19,8 +19,8 @@ impl const MyTrait for u32 {
 }
 
 impl<T> MyStruct<T> {
-    pub fn foo(&self) where T: ~const MyTrait {
-        //~^ ERROR `~const` is not allowed here
+    pub fn foo(&self) where T: [const] MyTrait {
+        //~^ ERROR `[const]` is not allowed here
         self.0.do_something();
     }
 }
diff --git a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr
index 50ab52ade49..c0af644d3de 100644
--- a/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr
+++ b/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr
@@ -1,25 +1,25 @@
-error: `~const` is not allowed here
-  --> $DIR/const-bound-on-not-const-associated-fn.rs:11:40
+error: `[const]` is not allowed here
+  --> $DIR/const-bound-on-not-const-associated-fn.rs:11:38
    |
-LL |     fn do_something_else() where Self: ~const MyTrait;
-   |                                        ^^^^^^
+LL |     fn do_something_else() where Self: [const] MyTrait;
+   |                                      ^^^^^^^^^
    |
-note: this function is not `const`, so it cannot have `~const` trait bounds
+note: this function is not `const`, so it cannot have `[const]` trait bounds
   --> $DIR/const-bound-on-not-const-associated-fn.rs:11:8
    |
-LL |     fn do_something_else() where Self: ~const MyTrait;
+LL |     fn do_something_else() where Self: [const] MyTrait;
    |        ^^^^^^^^^^^^^^^^^
 
-error: `~const` is not allowed here
-  --> $DIR/const-bound-on-not-const-associated-fn.rs:22:32
+error: `[const]` is not allowed here
+  --> $DIR/const-bound-on-not-const-associated-fn.rs:22:30
    |
-LL |     pub fn foo(&self) where T: ~const MyTrait {
-   |                                ^^^^^^
+LL |     pub fn foo(&self) where T: [const] MyTrait {
+   |                              ^^^^^^^^^
    |
-note: this function is not `const`, so it cannot have `~const` trait bounds
+note: this function is not `const`, so it cannot have `[const]` trait bounds
   --> $DIR/const-bound-on-not-const-associated-fn.rs:22:12
    |
-LL |     pub fn foo(&self) where T: ~const MyTrait {
+LL |     pub fn foo(&self) where T: [const] MyTrait {
    |            ^^^
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs b/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs
index e446eb15481..ae31d9ae0ac 100644
--- a/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs
+++ b/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs
@@ -3,9 +3,9 @@
 
 trait NonConst {}
 
-const fn perform<T: ~const NonConst>() {}
-//~^ ERROR `~const` can only be applied to `#[const_trait]` traits
-//~| ERROR `~const` can only be applied to `#[const_trait]` traits
+const fn perform<T: [const] NonConst>() {}
+//~^ ERROR `[const]` can only be applied to `#[const_trait]` traits
+//~| ERROR `[const]` can only be applied to `#[const_trait]` traits
 
 fn operate<T: const NonConst>() {}
 //~^ ERROR `const` can only be applied to `#[const_trait]` traits
diff --git a/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr b/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr
index f97d3a9181e..2ff5fb74031 100644
--- a/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr
+++ b/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr
@@ -1,19 +1,19 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-bounds-non-const-trait.rs:6:21
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-bounds-non-const-trait.rs:6:19
    |
-LL | const fn perform<T: ~const NonConst>() {}
-   |                     ^^^^^^ can't be applied to `NonConst`
+LL | const fn perform<T: [const] NonConst>() {}
+   |                   ^^^^^^^^^ can't be applied to `NonConst`
    |
 help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait NonConst {}
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-bounds-non-const-trait.rs:6:21
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-bounds-non-const-trait.rs:6:19
    |
-LL | const fn perform<T: ~const NonConst>() {}
-   |                     ^^^^^^ can't be applied to `NonConst`
+LL | const fn perform<T: [const] NonConst>() {}
+   |                   ^^^^^^^^^ can't be applied to `NonConst`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
diff --git a/tests/ui/traits/const-traits/const-closure-parse-not-item.rs b/tests/ui/traits/const-traits/const-closure-parse-not-item.rs
index b1b0e68b90d..35127eda5c0 100644
--- a/tests/ui/traits/const-traits/const-closure-parse-not-item.rs
+++ b/tests/ui/traits/const-traits/const-closure-parse-not-item.rs
@@ -4,7 +4,7 @@
 #![feature(const_trait_impl, const_closures)]
 #![allow(incomplete_features)]
 
-const fn test() -> impl ~const Fn() {
+const fn test() -> impl [const] Fn() {
     const move || {}
 }
 
diff --git a/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr b/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr
index 57afa2257b7..cc9d9bd6022 100644
--- a/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr
+++ b/tests/ui/traits/const-traits/const-closure-parse-not-item.stderr
@@ -1,29 +1,29 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closure-parse-not-item.rs:7:25
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closure-parse-not-item.rs:7:20
    |
-LL | const fn test() -> impl ~const Fn() {
-   |                         ^^^^^^ can't be applied to `Fn`
+LL | const fn test() -> impl [const] Fn() {
+   |                    ^^^^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closure-parse-not-item.rs:7:25
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closure-parse-not-item.rs:7:20
    |
-LL | const fn test() -> impl ~const Fn() {
-   |                         ^^^^^^ can't be applied to `Fn`
+LL | const fn test() -> impl [const] Fn() {
+   |                    ^^^^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closure-parse-not-item.rs:7:25
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closure-parse-not-item.rs:7:20
    |
-LL | const fn test() -> impl ~const Fn() {
-   |                         ^^^^^^ can't be applied to `Fn`
+LL | const fn test() -> impl [const] Fn() {
+   |                    ^^^^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
diff --git a/tests/ui/traits/const-traits/const-closure-trait-method-fail.rs b/tests/ui/traits/const-traits/const-closure-trait-method-fail.rs
index 8c6286426d3..cbcc4aa7c3c 100644
--- a/tests/ui/traits/const-traits/const-closure-trait-method-fail.rs
+++ b/tests/ui/traits/const-traits/const-closure-trait-method-fail.rs
@@ -11,7 +11,7 @@ impl Tr for () {
     fn a(self) -> i32 { 42 }
 }
 
-const fn need_const_closure<T: ~const FnOnce(()) -> i32>(x: T) -> i32 {
+const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
     x(())
 }
 
diff --git a/tests/ui/traits/const-traits/const-closure-trait-method-fail.stderr b/tests/ui/traits/const-traits/const-closure-trait-method-fail.stderr
index 2a97846ccb4..7a146b9d8a1 100644
--- a/tests/ui/traits/const-traits/const-closure-trait-method-fail.stderr
+++ b/tests/ui/traits/const-traits/const-closure-trait-method-fail.stderr
@@ -1,19 +1,19 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closure-trait-method-fail.rs:14:32
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closure-trait-method-fail.rs:14:30
    |
-LL | const fn need_const_closure<T: ~const FnOnce(()) -> i32>(x: T) -> i32 {
-   |                                ^^^^^^ can't be applied to `FnOnce`
+LL | const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
+   |                              ^^^^^^^^^ can't be applied to `FnOnce`
    |
-note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closure-trait-method-fail.rs:14:32
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closure-trait-method-fail.rs:14:30
    |
-LL | const fn need_const_closure<T: ~const FnOnce(()) -> i32>(x: T) -> i32 {
-   |                                ^^^^^^ can't be applied to `FnOnce`
+LL | const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
+   |                              ^^^^^^^^^ can't be applied to `FnOnce`
    |
-note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
diff --git a/tests/ui/traits/const-traits/const-closure-trait-method.rs b/tests/ui/traits/const-traits/const-closure-trait-method.rs
index ebee4daefbe..831d6e27946 100644
--- a/tests/ui/traits/const-traits/const-closure-trait-method.rs
+++ b/tests/ui/traits/const-traits/const-closure-trait-method.rs
@@ -11,7 +11,7 @@ impl const Tr for () {
     fn a(self) -> i32 { 42 }
 }
 
-const fn need_const_closure<T: ~const FnOnce(()) -> i32>(x: T) -> i32 {
+const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
     x(())
 }
 
diff --git a/tests/ui/traits/const-traits/const-closure-trait-method.stderr b/tests/ui/traits/const-traits/const-closure-trait-method.stderr
index 9c63b7e63a6..6c003f87ada 100644
--- a/tests/ui/traits/const-traits/const-closure-trait-method.stderr
+++ b/tests/ui/traits/const-traits/const-closure-trait-method.stderr
@@ -1,19 +1,19 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closure-trait-method.rs:14:32
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closure-trait-method.rs:14:30
    |
-LL | const fn need_const_closure<T: ~const FnOnce(()) -> i32>(x: T) -> i32 {
-   |                                ^^^^^^ can't be applied to `FnOnce`
+LL | const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
+   |                              ^^^^^^^^^ can't be applied to `FnOnce`
    |
-note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closure-trait-method.rs:14:32
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closure-trait-method.rs:14:30
    |
-LL | const fn need_const_closure<T: ~const FnOnce(()) -> i32>(x: T) -> i32 {
-   |                                ^^^^^^ can't be applied to `FnOnce`
+LL | const fn need_const_closure<T: [const] FnOnce(()) -> i32>(x: T) -> i32 {
+   |                              ^^^^^^^^^ can't be applied to `FnOnce`
    |
-note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
diff --git a/tests/ui/traits/const-traits/const-closures.rs b/tests/ui/traits/const-traits/const-closures.rs
index 98f8d039cd6..2f6f4dc4ba3 100644
--- a/tests/ui/traits/const-traits/const-closures.rs
+++ b/tests/ui/traits/const-traits/const-closures.rs
@@ -5,9 +5,9 @@
 
 const fn answer_p1<F>(f: &F) -> u8
     where
-        F: ~const FnOnce() -> u8,
-        F: ~const FnMut() -> u8,
-        F: ~const Fn() -> u8,
+        F: [const] FnOnce() -> u8,
+        F: [const] FnMut() -> u8,
+        F: [const] Fn() -> u8,
 {
     f() * 7
 }
@@ -20,7 +20,7 @@ const fn answer_p2() -> u8 {
     answer_p1(&three)
 }
 
-const fn answer<F: ~const Fn() -> u8>(f: &F) -> u8 {
+const fn answer<F: [const] Fn() -> u8>(f: &F) -> u8 {
     f() + f()
 }
 
diff --git a/tests/ui/traits/const-traits/const-closures.stderr b/tests/ui/traits/const-traits/const-closures.stderr
index 92f3ba20820..c76a73418a5 100644
--- a/tests/ui/traits/const-traits/const-closures.stderr
+++ b/tests/ui/traits/const-traits/const-closures.stderr
@@ -1,76 +1,76 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closures.rs:8:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closures.rs:8:10
    |
-LL |         F: ~const FnOnce() -> u8,
-   |            ^^^^^^ can't be applied to `FnOnce`
+LL |         F: [const] FnOnce() -> u8,
+   |          ^^^^^^^^^ can't be applied to `FnOnce`
    |
-note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closures.rs:9:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closures.rs:9:10
    |
-LL |         F: ~const FnMut() -> u8,
-   |            ^^^^^^ can't be applied to `FnMut`
+LL |         F: [const] FnMut() -> u8,
+   |          ^^^^^^^^^ can't be applied to `FnMut`
    |
-note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closures.rs:10:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closures.rs:10:10
    |
-LL |         F: ~const Fn() -> u8,
-   |            ^^^^^^ can't be applied to `Fn`
+LL |         F: [const] Fn() -> u8,
+   |          ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closures.rs:8:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closures.rs:8:10
    |
-LL |         F: ~const FnOnce() -> u8,
-   |            ^^^^^^ can't be applied to `FnOnce`
+LL |         F: [const] FnOnce() -> u8,
+   |          ^^^^^^^^^ can't be applied to `FnOnce`
    |
-note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnOnce` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closures.rs:9:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closures.rs:9:10
    |
-LL |         F: ~const FnMut() -> u8,
-   |            ^^^^^^ can't be applied to `FnMut`
+LL |         F: [const] FnMut() -> u8,
+   |          ^^^^^^^^^ can't be applied to `FnMut`
    |
-note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `FnMut` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closures.rs:10:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closures.rs:10:10
    |
-LL |         F: ~const Fn() -> u8,
-   |            ^^^^^^ can't be applied to `Fn`
+LL |         F: [const] Fn() -> u8,
+   |          ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closures.rs:23:20
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closures.rs:23:18
    |
-LL | const fn answer<F: ~const Fn() -> u8>(f: &F) -> u8 {
-   |                    ^^^^^^ can't be applied to `Fn`
+LL | const fn answer<F: [const] Fn() -> u8>(f: &F) -> u8 {
+   |                  ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-closures.rs:23:20
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/const-closures.rs:23:18
    |
-LL | const fn answer<F: ~const Fn() -> u8>(f: &F) -> u8 {
-   |                    ^^^^^^ can't be applied to `Fn`
+LL | const fn answer<F: [const] Fn() -> u8>(f: &F) -> u8 {
+   |                  ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
diff --git a/tests/ui/traits/const-traits/const-cond-for-rpitit.rs b/tests/ui/traits/const-traits/const-cond-for-rpitit.rs
index 50bf93f9a03..da83e054dd9 100644
--- a/tests/ui/traits/const-traits/const-cond-for-rpitit.rs
+++ b/tests/ui/traits/const-traits/const-cond-for-rpitit.rs
@@ -6,15 +6,15 @@
 
 #[const_trait]
 pub trait Foo {
-    fn method(self) -> impl ~const Bar;
+    fn method(self) -> impl [const] Bar;
 }
 
 #[const_trait]
 pub trait Bar {}
 
 struct A<T>(T);
-impl<T> const Foo for A<T> where A<T>: ~const Bar {
-    fn method(self) -> impl ~const Bar {
+impl<T> const Foo for A<T> where A<T>: [const] Bar {
+    fn method(self) -> impl [const] Bar {
         self
     }
 }
diff --git a/tests/ui/traits/const-traits/const-default-method-bodies.rs b/tests/ui/traits/const-traits/const-default-method-bodies.rs
index 0ef11a7f0c9..27e828c7ab9 100644
--- a/tests/ui/traits/const-traits/const-default-method-bodies.rs
+++ b/tests/ui/traits/const-traits/const-default-method-bodies.rs
@@ -23,7 +23,7 @@ impl const ConstDefaultFn for ConstImpl {
 
 const fn test() {
     NonConstImpl.a();
-    //~^ ERROR the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satisfied
+    //~^ ERROR the trait bound `NonConstImpl: [const] ConstDefaultFn` is not satisfied
     ConstImpl.a();
 }
 
diff --git a/tests/ui/traits/const-traits/const-default-method-bodies.stderr b/tests/ui/traits/const-traits/const-default-method-bodies.stderr
index 903f7d37f9d..03ca6f1d511 100644
--- a/tests/ui/traits/const-traits/const-default-method-bodies.stderr
+++ b/tests/ui/traits/const-traits/const-default-method-bodies.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satisfied
+error[E0277]: the trait bound `NonConstImpl: [const] ConstDefaultFn` is not satisfied
   --> $DIR/const-default-method-bodies.rs:25:18
    |
 LL |     NonConstImpl.a();
diff --git a/tests/ui/traits/const-traits/const-drop-bound.rs b/tests/ui/traits/const-traits/const-drop-bound.rs
index 4819da7c3a4..7fa9b10fa04 100644
--- a/tests/ui/traits/const-traits/const-drop-bound.rs
+++ b/tests/ui/traits/const-traits/const-drop-bound.rs
@@ -5,7 +5,7 @@
 
 use std::marker::Destruct;
 
-const fn foo<T, E>(res: Result<T, E>) -> Option<T> where E: ~const Destruct {
+const fn foo<T, E>(res: Result<T, E>) -> Option<T> where E: [const] Destruct {
     match res {
         Ok(t) => Some(t),
         Err(_e) => None,
@@ -16,8 +16,8 @@ pub struct Foo<T>(T);
 
 const fn baz<T, E>(res: Result<Foo<T>, Foo<E>>) -> Option<Foo<T>>
 where
-    T: ~const Destruct,
-    E: ~const Destruct,
+    T: [const] Destruct,
+    E: [const] Destruct,
 {
     foo(res)
 }
diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr
index 76207ea0939..c2309ea6e12 100644
--- a/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr
+++ b/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr
@@ -5,17 +5,17 @@ LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `const Drop`
-  --> $DIR/const-drop-fail-2.rs:25:25
+  --> $DIR/const-drop-fail-2.rs:25:26
    |
-LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
-   |         --------        ^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | impl<T: [const] A> const Drop for ConstDropImplWithBounds<T> {
+   |         ---------        ^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |         |
    |         unsatisfied trait bound introduced here
 note: required by a bound in `check`
   --> $DIR/const-drop-fail-2.rs:21:19
    |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^^^^^^^^^^ required by this bound in `check`
+LL | const fn check<T: [const] Destruct>(_: T) {}
+   |                   ^^^^^^^^^^^^^^^^ required by this bound in `check`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.rs b/tests/ui/traits/const-traits/const-drop-fail-2.rs
index 1bcc87e9070..3f98a9f715e 100644
--- a/tests/ui/traits/const-traits/const-drop-fail-2.rs
+++ b/tests/ui/traits/const-traits/const-drop-fail-2.rs
@@ -18,11 +18,11 @@ trait A { fn a() { } }
 
 impl A for NonTrivialDrop {}
 
-const fn check<T: ~const Destruct>(_: T) {}
+const fn check<T: [const] Destruct>(_: T) {}
 
 struct ConstDropImplWithBounds<T: A>(PhantomData<T>);
 
-impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
+impl<T: [const] A> const Drop for ConstDropImplWithBounds<T> {
     fn drop(&mut self) {
         T::a();
     }
@@ -35,7 +35,7 @@ const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
 
 struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);
 
-impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
+impl<T: [const] A> const Drop for ConstDropImplWithNonConstBounds<T> {
     fn drop(&mut self) {
         T::a();
     }
diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr
index 76207ea0939..c2309ea6e12 100644
--- a/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr
+++ b/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr
@@ -5,17 +5,17 @@ LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `const Drop`
-  --> $DIR/const-drop-fail-2.rs:25:25
+  --> $DIR/const-drop-fail-2.rs:25:26
    |
-LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
-   |         --------        ^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | impl<T: [const] A> const Drop for ConstDropImplWithBounds<T> {
+   |         ---------        ^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |         |
    |         unsatisfied trait bound introduced here
 note: required by a bound in `check`
   --> $DIR/const-drop-fail-2.rs:21:19
    |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^^^^^^^^^^ required by this bound in `check`
+LL | const fn check<T: [const] Destruct>(_: T) {}
+   |                   ^^^^^^^^^^^^^^^^ required by this bound in `check`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr b/tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr
index f38e642bb63..9c49ee56b0f 100644
--- a/tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr
+++ b/tests/ui/traits/const-traits/const-drop-fail.new_precise.stderr
@@ -10,8 +10,8 @@ LL |     NonTrivialDrop,
 note: required by a bound in `check`
   --> $DIR/const-drop-fail.rs:24:19
    |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^^^^^^^^^^ required by this bound in `check`
+LL | const fn check<T: [const] Destruct>(_: T) {}
+   |                   ^^^^^^^^^^^^^^^^ required by this bound in `check`
 
 error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
   --> $DIR/const-drop-fail.rs:35:5
@@ -25,8 +25,8 @@ LL |     ConstImplWithDropGlue(NonTrivialDrop),
 note: required by a bound in `check`
   --> $DIR/const-drop-fail.rs:24:19
    |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^^^^^^^^^^ required by this bound in `check`
+LL | const fn check<T: [const] Destruct>(_: T) {}
+   |                   ^^^^^^^^^^^^^^^^ required by this bound in `check`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr b/tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr
index f38e642bb63..9c49ee56b0f 100644
--- a/tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr
+++ b/tests/ui/traits/const-traits/const-drop-fail.new_stock.stderr
@@ -10,8 +10,8 @@ LL |     NonTrivialDrop,
 note: required by a bound in `check`
   --> $DIR/const-drop-fail.rs:24:19
    |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^^^^^^^^^^ required by this bound in `check`
+LL | const fn check<T: [const] Destruct>(_: T) {}
+   |                   ^^^^^^^^^^^^^^^^ required by this bound in `check`
 
 error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
   --> $DIR/const-drop-fail.rs:35:5
@@ -25,8 +25,8 @@ LL |     ConstImplWithDropGlue(NonTrivialDrop),
 note: required by a bound in `check`
   --> $DIR/const-drop-fail.rs:24:19
    |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^^^^^^^^^^ required by this bound in `check`
+LL | const fn check<T: [const] Destruct>(_: T) {}
+   |                   ^^^^^^^^^^^^^^^^ required by this bound in `check`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr b/tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr
index f38e642bb63..9c49ee56b0f 100644
--- a/tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr
+++ b/tests/ui/traits/const-traits/const-drop-fail.old_precise.stderr
@@ -10,8 +10,8 @@ LL |     NonTrivialDrop,
 note: required by a bound in `check`
   --> $DIR/const-drop-fail.rs:24:19
    |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^^^^^^^^^^ required by this bound in `check`
+LL | const fn check<T: [const] Destruct>(_: T) {}
+   |                   ^^^^^^^^^^^^^^^^ required by this bound in `check`
 
 error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
   --> $DIR/const-drop-fail.rs:35:5
@@ -25,8 +25,8 @@ LL |     ConstImplWithDropGlue(NonTrivialDrop),
 note: required by a bound in `check`
   --> $DIR/const-drop-fail.rs:24:19
    |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^^^^^^^^^^ required by this bound in `check`
+LL | const fn check<T: [const] Destruct>(_: T) {}
+   |                   ^^^^^^^^^^^^^^^^ required by this bound in `check`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr b/tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr
index f38e642bb63..9c49ee56b0f 100644
--- a/tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr
+++ b/tests/ui/traits/const-traits/const-drop-fail.old_stock.stderr
@@ -10,8 +10,8 @@ LL |     NonTrivialDrop,
 note: required by a bound in `check`
   --> $DIR/const-drop-fail.rs:24:19
    |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^^^^^^^^^^ required by this bound in `check`
+LL | const fn check<T: [const] Destruct>(_: T) {}
+   |                   ^^^^^^^^^^^^^^^^ required by this bound in `check`
 
 error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
   --> $DIR/const-drop-fail.rs:35:5
@@ -25,8 +25,8 @@ LL |     ConstImplWithDropGlue(NonTrivialDrop),
 note: required by a bound in `check`
   --> $DIR/const-drop-fail.rs:24:19
    |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^^^^^^^^^^ required by this bound in `check`
+LL | const fn check<T: [const] Destruct>(_: T) {}
+   |                   ^^^^^^^^^^^^^^^^ required by this bound in `check`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/traits/const-traits/const-drop-fail.rs b/tests/ui/traits/const-traits/const-drop-fail.rs
index a7f3d5654de..4513d71f613 100644
--- a/tests/ui/traits/const-traits/const-drop-fail.rs
+++ b/tests/ui/traits/const-traits/const-drop-fail.rs
@@ -21,7 +21,7 @@ impl const Drop for ConstImplWithDropGlue {
     fn drop(&mut self) {}
 }
 
-const fn check<T: ~const Destruct>(_: T) {}
+const fn check<T: [const] Destruct>(_: T) {}
 
 macro_rules! check_all {
     ($($exp:expr),*$(,)?) => {$(
diff --git a/tests/ui/traits/const-traits/const-drop.rs b/tests/ui/traits/const-traits/const-drop.rs
index e2d87aeff47..5df3a77f73a 100644
--- a/tests/ui/traits/const-traits/const-drop.rs
+++ b/tests/ui/traits/const-traits/const-drop.rs
@@ -16,7 +16,7 @@ impl<'a> const Drop for S<'a> {
     }
 }
 
-const fn a<T: ~const Destruct>(_: T) {}
+const fn a<T: [const] Destruct>(_: T) {}
 //FIXME ~^ ERROR destructor of
 
 const fn b() -> u8 {
@@ -108,7 +108,7 @@ fn main() {
         }
     }
 
-    // These types should pass because ~const in a non-const context should have no effect.
+    // These types should pass because [const] in a non-const context should have no effect.
     a(HasDropGlue(Box::new(0)));
     a(HasDropImpl);
 
diff --git a/tests/ui/traits/const-traits/const-impl-trait.rs b/tests/ui/traits/const-traits/const-impl-trait.rs
index d7fe43ef37c..dc960422a4a 100644
--- a/tests/ui/traits/const-traits/const-impl-trait.rs
+++ b/tests/ui/traits/const-traits/const-impl-trait.rs
@@ -8,23 +8,23 @@
 
 use std::marker::Destruct;
 
-const fn cmp(a: &impl ~const PartialEq) -> bool {
+const fn cmp(a: &impl [const] PartialEq) -> bool {
     a == a
 }
 
 const fn wrap(
-    x: impl ~const PartialEq + ~const Destruct,
-) -> impl ~const PartialEq + ~const Destruct {
+    x: impl [const] PartialEq + [const] Destruct,
+) -> impl [const] PartialEq + [const] Destruct {
     x
 }
 
 #[const_trait]
 trait Foo {
-    fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
+    fn huh() -> impl [const] PartialEq + [const] Destruct + Copy;
 }
 
 impl const Foo for () {
-    fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
+    fn huh() -> impl [const] PartialEq + [const] Destruct + Copy {
         123
     }
 }
@@ -43,16 +43,16 @@ trait T {}
 struct S;
 impl const T for S {}
 
-const fn rpit() -> impl ~const T {
+const fn rpit() -> impl [const] T {
     S
 }
 
-const fn apit(_: impl ~const T + ~const Destruct) {}
+const fn apit(_: impl [const] T + [const] Destruct) {}
 
-const fn rpit_assoc_bound() -> impl IntoIterator<Item: ~const T> {
+const fn rpit_assoc_bound() -> impl IntoIterator<Item: [const] T> {
     Some(S)
 }
 
-const fn apit_assoc_bound(_: impl IntoIterator<Item: ~const T> + ~const Destruct) {}
+const fn apit_assoc_bound(_: impl IntoIterator<Item: [const] T> + [const] Destruct) {}
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/const-impl-trait.stderr b/tests/ui/traits/const-traits/const-impl-trait.stderr
index 6783cec3960..cbb68d8c983 100644
--- a/tests/ui/traits/const-traits/const-impl-trait.stderr
+++ b/tests/ui/traits/const-traits/const-impl-trait.stderr
@@ -1,197 +1,17 @@
-error[E0635]: unknown feature `const_cmp`
-  --> $DIR/const-impl-trait.rs:7:30
+error[E0277]: the trait bound `(): const PartialEq` is not satisfied
+  --> $DIR/const-impl-trait.rs:34:17
    |
-LL | #![feature(const_trait_impl, const_cmp, const_destruct)]
-   |                              ^^^^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:11:23
+LL |     assert!(cmp(&()));
+   |             --- ^^^
+   |             |
+   |             required by a bound introduced by this call
    |
-LL | const fn cmp(a: &impl ~const PartialEq) -> bool {
-   |                       ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-
-error: `~const` can only be applied to `#[const_trait]` traits
+note: required by a bound in `cmp`
   --> $DIR/const-impl-trait.rs:11:23
    |
-LL | const fn cmp(a: &impl ~const PartialEq) -> bool {
-   |                       ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:16:13
-   |
-LL |     x: impl ~const PartialEq + ~const Destruct,
-   |             ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:16:13
-   |
-LL |     x: impl ~const PartialEq + ~const Destruct,
-   |             ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:17:11
-   |
-LL | ) -> impl ~const PartialEq + ~const Destruct {
-   |           ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:17:11
-   |
-LL | ) -> impl ~const PartialEq + ~const Destruct {
-   |           ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:23:22
-   |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
-   |                      ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:27:22
-   |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
-   |                      ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:17:11
-   |
-LL | ) -> impl ~const PartialEq + ~const Destruct {
-   |           ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:27:22
-   |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
-   |                      ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:27:22
-   |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
-   |                      ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:23:22
-   |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
-   |                      ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:23:22
-   |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
-   |                      ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:23:22
-   |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
-   |                      ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:23:22
-   |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
-   |                      ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-impl-trait.rs:23:22
-   |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
-   |                      ^^^^^^ can't be applied to `PartialEq`
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0015]: cannot call non-const operator in constants
-  --> $DIR/const-impl-trait.rs:35:13
-   |
-LL |     assert!(wrap(123) == wrap(123));
-   |             ^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-
-error[E0015]: cannot call non-const operator in constants
-  --> $DIR/const-impl-trait.rs:36:13
-   |
-LL |     assert!(wrap(123) != wrap(456));
-   |             ^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-
-error[E0015]: cannot call non-const operator in constants
-  --> $DIR/const-impl-trait.rs:38:13
-   |
-LL |     assert!(x == x);
-   |             ^^^^^^
-   |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/const-impl-trait.rs:12:5
-   |
-LL |     a == a
-   |     ^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
+LL | const fn cmp(a: &impl [const] PartialEq) -> bool {
+   |                       ^^^^^^^^^^^^^^^^^ required by this bound in `cmp`
 
-error: aborting due to 21 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0015, E0635.
-For more information about an error, try `rustc --explain E0015`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/const-in-closure.rs b/tests/ui/traits/const-traits/const-in-closure.rs
index ebc17a50c86..0657c5af588 100644
--- a/tests/ui/traits/const-traits/const-in-closure.rs
+++ b/tests/ui/traits/const-traits/const-in-closure.rs
@@ -3,13 +3,14 @@
 
 #![feature(const_trait_impl)]
 
-#[const_trait] trait Trait {
+#[const_trait]
+trait Trait {
     fn method();
 }
 
 const fn foo<T: Trait>() {
     let _ = || {
-        // Make sure this doesn't enforce `T: ~const Trait`
+        // Make sure this doesn't enforce `T: [const] Trait`
         T::method();
     };
 }
@@ -17,7 +18,9 @@ const fn foo<T: Trait>() {
 fn bar<T: const Trait>() {
     let _ = || {
         // Make sure unconditionally const bounds propagate from parent.
-        const { T::method(); };
+        const {
+            T::method();
+        };
     };
 }
 
diff --git a/tests/ui/traits/const-traits/const-opaque.no.stderr b/tests/ui/traits/const-traits/const-opaque.no.stderr
index 47e692936e0..acf19ba96ab 100644
--- a/tests/ui/traits/const-traits/const-opaque.no.stderr
+++ b/tests/ui/traits/const-traits/const-opaque.no.stderr
@@ -9,8 +9,8 @@ LL |     let opaque = bar(());
 note: required by a bound in `bar`
   --> $DIR/const-opaque.rs:26:17
    |
-LL | const fn bar<T: ~const Foo>(t: T) -> impl ~const Foo {
-   |                 ^^^^^^^^^^ required by this bound in `bar`
+LL | const fn bar<T: [const] Foo>(t: T) -> impl [const] Foo {
+   |                 ^^^^^^^^^^^ required by this bound in `bar`
 
 error[E0277]: the trait bound `(): const Foo` is not satisfied
   --> $DIR/const-opaque.rs:33:12
diff --git a/tests/ui/traits/const-traits/const-opaque.rs b/tests/ui/traits/const-traits/const-opaque.rs
index 96cdd7d9f26..56ebf0aefcc 100644
--- a/tests/ui/traits/const-traits/const-opaque.rs
+++ b/tests/ui/traits/const-traits/const-opaque.rs
@@ -9,7 +9,7 @@ trait Foo {
     fn method(&self);
 }
 
-impl<T: ~const Foo> const Foo for (T,) {
+impl<T: [const] Foo> const Foo for (T,) {
     fn method(&self) {}
 }
 
@@ -23,7 +23,7 @@ impl Foo for () {
     fn method(&self) {}
 }
 
-const fn bar<T: ~const Foo>(t: T) -> impl ~const Foo {
+const fn bar<T: [const] Foo>(t: T) -> impl [const] Foo {
     (t,)
 }
 
diff --git a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs
index 2dac1970835..ece87529c3e 100644
--- a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs
+++ b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs
@@ -7,12 +7,12 @@ trait Trait {}
 
 fn main() {
     let _: &dyn const Trait; //~ ERROR const trait bounds are not allowed in trait object types
-    let _: &dyn ~const Trait; //~ ERROR `~const` is not allowed here
+    let _: &dyn [const] Trait; //~ ERROR `[const]` is not allowed here
 }
 
 // Regression test for issue #119525.
 trait NonConst {}
 const fn handle(_: &dyn const NonConst) {}
 //~^ ERROR const trait bounds are not allowed in trait object types
-const fn take(_: &dyn ~const NonConst) {}
-//~^ ERROR `~const` is not allowed here
+const fn take(_: &dyn [const] NonConst) {}
+//~^ ERROR `[const]` is not allowed here
diff --git a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr
index bd29b4b860b..c58e2765168 100644
--- a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr
+++ b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr
@@ -4,13 +4,13 @@ error: const trait bounds are not allowed in trait object types
 LL |     let _: &dyn const Trait;
    |                 ^^^^^^^^^^^
 
-error: `~const` is not allowed here
-  --> $DIR/const-trait-bounds-trait-objects.rs:10:17
+error: `[const]` is not allowed here
+  --> $DIR/const-trait-bounds-trait-objects.rs:10:13
    |
-LL |     let _: &dyn ~const Trait;
-   |                 ^^^^^^
+LL |     let _: &dyn [const] Trait;
+   |             ^^^^^^^^^^^
    |
-   = note: trait objects cannot have `~const` trait bounds
+   = note: trait objects cannot have `[const]` trait bounds
 
 error: const trait bounds are not allowed in trait object types
   --> $DIR/const-trait-bounds-trait-objects.rs:15:25
@@ -18,13 +18,13 @@ error: const trait bounds are not allowed in trait object types
 LL | const fn handle(_: &dyn const NonConst) {}
    |                         ^^^^^^^^^^^^^^
 
-error: `~const` is not allowed here
-  --> $DIR/const-trait-bounds-trait-objects.rs:17:23
+error: `[const]` is not allowed here
+  --> $DIR/const-trait-bounds-trait-objects.rs:17:19
    |
-LL | const fn take(_: &dyn ~const NonConst) {}
-   |                       ^^^^^^
+LL | const fn take(_: &dyn [const] NonConst) {}
+   |                   ^^^^^^^^^^^
    |
-   = note: trait objects cannot have `~const` trait bounds
+   = note: trait objects cannot have `[const]` trait bounds
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.rs b/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.rs
index b563b78f78a..5376baf15e0 100644
--- a/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.rs
+++ b/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.rs
@@ -6,14 +6,13 @@
 // Regression test for issue #125877.
 
 //@ compile-flags: -Znext-solver
-//@ normalize-stderr: "you are using [0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?( \([^)]*\))?" -> "you are using $$RUSTC_VERSION"
 
 #![feature(const_trait_impl, effects)]
 //~^ ERROR feature has been removed
 
 #[const_trait]
 trait Main {
-    fn compute<T: ~const Aux>() -> u32;
+    fn compute<T: [const] Aux>() -> u32;
 }
 
 impl const Main for () {
diff --git a/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.stderr b/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.stderr
index a04f98e68a6..736fde33ce3 100644
--- a/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.stderr
+++ b/tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.stderr
@@ -1,16 +1,16 @@
 error[E0557]: feature has been removed
-  --> $DIR/const-trait-impl-parameter-mismatch.rs:11:30
+  --> $DIR/const-trait-impl-parameter-mismatch.rs:10:30
    |
 LL | #![feature(const_trait_impl, effects)]
    |                              ^^^^^^^ feature has been removed
    |
-   = note: removed in 1.84.0 (you are using $RUSTC_VERSION); see <https://github.com/rust-lang/rust/pull/132479> for more information
+   = note: removed in 1.84.0; see <https://github.com/rust-lang/rust/pull/132479> for more information
    = note: removed, redundant with `#![feature(const_trait_impl)]`
 
 error[E0049]: associated function `compute` has 0 type parameters but its trait declaration has 1 type parameter
-  --> $DIR/const-trait-impl-parameter-mismatch.rs:20:16
+  --> $DIR/const-trait-impl-parameter-mismatch.rs:19:16
    |
-LL |     fn compute<T: ~const Aux>() -> u32;
+LL |     fn compute<T: [const] Aux>() -> u32;
    |                - expected 1 type parameter
 ...
 LL |     fn compute<'x>() -> u32 {
diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr
index 8297911a3f3..ce61eb9a1ab 100644
--- a/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr
+++ b/tests/ui/traits/const-traits/const_derives/derive-const-use.stderr
@@ -1,9 +1,3 @@
-error[E0635]: unknown feature `const_cmp`
-  --> $DIR/derive-const-use.rs:3:30
-   |
-LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const)]
-   |                              ^^^^^^^^^
-
 error[E0635]: unknown feature `const_default_impls`
   --> $DIR/derive-const-use.rs:3:41
    |
@@ -28,23 +22,13 @@ LL | #[derive_const(Default, PartialEq)]
    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change
 
-error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
-  --> $DIR/derive-const-use.rs:11:12
-   |
-LL | impl const PartialEq for A {
-   |            ^^^^^^^^^ this trait is not `const`
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
-  --> $DIR/derive-const-use.rs:15:25
+error[E0277]: the trait bound `(): [const] PartialEq` is not satisfied
+  --> $DIR/derive-const-use.rs:16:14
    |
 LL | #[derive_const(Default, PartialEq)]
-   |                         ^^^^^^^^^ this trait is not `const`
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
+   |                         --------- in this derive macro expansion
+LL | pub struct S((), A);
+   |              ^^
 
 error[E0015]: cannot call non-const associated function `<S as Default>::default` in constants
   --> $DIR/derive-const-use.rs:18:35
@@ -54,14 +38,6 @@ LL | const _: () = assert!(S((), A) == S::default());
    |
    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
 
-error[E0015]: cannot call non-const operator in constants
-  --> $DIR/derive-const-use.rs:18:23
-   |
-LL | const _: () = assert!(S((), A) == S::default());
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-
 error[E0015]: cannot call non-const associated function `<() as Default>::default` in constant functions
   --> $DIR/derive-const-use.rs:16:14
    |
@@ -82,27 +58,7 @@ LL | pub struct S((), A);
    |
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
 
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/derive-const-use.rs:16:14
-   |
-LL | #[derive_const(Default, PartialEq)]
-   |                         --------- in this derive macro expansion
-LL | pub struct S((), A);
-   |              ^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/derive-const-use.rs:16:18
-   |
-LL | #[derive_const(Default, PartialEq)]
-   |                         --------- in this derive macro expansion
-LL | pub struct S((), A);
-   |                  ^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error: aborting due to 12 previous errors
+error: aborting due to 7 previous errors
 
-Some errors have detailed explanations: E0015, E0635.
+Some errors have detailed explanations: E0015, E0277, E0635.
 For more information about an error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs
index 18b224af278..b39f97b5938 100644
--- a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs
+++ b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.rs
@@ -1,5 +1,4 @@
-//@ known-bug: #110395
-// FIXME(const_trait_impl) check-pass
+//@ check-pass
 
 #![feature(derive_const)]
 #![feature(const_trait_impl)]
diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr
deleted file mode 100644
index d1dbf62d566..00000000000
--- a/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr
+++ /dev/null
@@ -1,35 +0,0 @@
-error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
-  --> $DIR/derive-const-with-params.rs:7:16
-   |
-LL | #[derive_const(PartialEq)]
-   |                ^^^^^^^^^ this trait is not `const`
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: `~const` can only be applied to `#[const_trait]` traits
-   |
-note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/derive-const-with-params.rs:8:23
-   |
-LL | #[derive_const(PartialEq)]
-   |                --------- in this derive macro expansion
-LL | pub struct Reverse<T>(T);
-   |                       ^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/derive-const-with-params.rs:11:5
-   |
-LL |     a == b
-   |     ^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/cross-crate.gatednc.stderr b/tests/ui/traits/const-traits/cross-crate.gatednc.stderr
index 4d5abf643a8..1da51915118 100644
--- a/tests/ui/traits/const-traits/cross-crate.gatednc.stderr
+++ b/tests/ui/traits/const-traits/cross-crate.gatednc.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `cross_crate::NonConst: ~const cross_crate::MyTrait` is not satisfied
+error[E0277]: the trait bound `cross_crate::NonConst: [const] cross_crate::MyTrait` is not satisfied
   --> $DIR/cross-crate.rs:19:14
    |
 LL |     NonConst.func();
diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.rs b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.rs
index 96acdc300e0..ea97f755d55 100644
--- a/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.rs
+++ b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.rs
@@ -4,13 +4,13 @@
 trait Tr {}
 impl Tr for () {}
 
-const fn foo<T>() where T: ~const Tr {}
+const fn foo<T>() where T: [const] Tr {}
 
 #[const_trait]
 pub trait Foo {
     fn foo() {
         foo::<()>();
-        //~^ ERROR the trait bound `(): ~const Tr` is not satisfied
+        //~^ ERROR the trait bound `(): [const] Tr` is not satisfied
     }
 }
 
diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr
index b3017523b27..2e236cecfb4 100644
--- a/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr
+++ b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `(): ~const Tr` is not satisfied
+error[E0277]: the trait bound `(): [const] Tr` is not satisfied
   --> $DIR/default-method-body-is-const-body-checking.rs:12:15
    |
 LL |         foo::<()>();
@@ -7,8 +7,8 @@ LL |         foo::<()>();
 note: required by a bound in `foo`
   --> $DIR/default-method-body-is-const-body-checking.rs:7:28
    |
-LL | const fn foo<T>() where T: ~const Tr {}
-   |                            ^^^^^^^^^ required by this bound in `foo`
+LL | const fn foo<T>() where T: [const] Tr {}
+   |                            ^^^^^^^^^^ required by this bound in `foo`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs
index b3beba08237..eb2c472e3bf 100644
--- a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs
+++ b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs
@@ -7,7 +7,7 @@ pub trait Tr {
 
     fn b(&self) {
         ().a()
-        //~^ ERROR the trait bound `(): ~const Tr` is not satisfied
+        //~^ ERROR the trait bound `(): [const] Tr` is not satisfied
     }
 }
 
diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr
index 2bd71c940e7..2dc2d484617 100644
--- a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr
+++ b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `(): ~const Tr` is not satisfied
+error[E0277]: the trait bound `(): [const] Tr` is not satisfied
   --> $DIR/default-method-body-is-const-same-trait-ck.rs:9:12
    |
 LL |         ().a()
diff --git a/tests/ui/traits/const-traits/dont-ice-on-const-pred-for-bounds.rs b/tests/ui/traits/const-traits/dont-ice-on-const-pred-for-bounds.rs
index 2295c2c3857..d39e661ed92 100644
--- a/tests/ui/traits/const-traits/dont-ice-on-const-pred-for-bounds.rs
+++ b/tests/ui/traits/const-traits/dont-ice-on-const-pred-for-bounds.rs
@@ -13,7 +13,7 @@ trait Trait {
     type Assoc: const Trait;
 }
 
-const fn needs_trait<T: ~const Trait>() {}
+const fn needs_trait<T: [const] Trait>() {}
 
 fn test<T: Trait>() {
     const { needs_trait::<T::Assoc>() };
diff --git a/tests/ui/traits/const-traits/dont-prefer-param-env-for-infer-self-ty.rs b/tests/ui/traits/const-traits/dont-prefer-param-env-for-infer-self-ty.rs
index 08dcd7d80b3..f1fc98d72a5 100644
--- a/tests/ui/traits/const-traits/dont-prefer-param-env-for-infer-self-ty.rs
+++ b/tests/ui/traits/const-traits/dont-prefer-param-env-for-infer-self-ty.rs
@@ -5,11 +5,11 @@
 #[const_trait]
 trait Foo {}
 
-impl<T> const Foo for (T,) where T: ~const Foo {}
+impl<T> const Foo for (T,) where T: [const] Foo {}
 
-const fn needs_const_foo(_: impl ~const Foo + Copy) {}
+const fn needs_const_foo(_: impl [const] Foo + Copy) {}
 
-const fn test<T: ~const Foo + Copy>(t: T) {
+const fn test<T: [const] Foo + Copy>(t: T) {
     needs_const_foo((t,));
 }
 
diff --git a/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.rs b/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.rs
index f4b01efe959..414b80ca0da 100644
--- a/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.rs
+++ b/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.rs
@@ -7,7 +7,7 @@ trait Trait {
   type Out;
 }
 
-const fn needs_const<T: ~const Trait>(_: &T) {}
+const fn needs_const<T: [const] Trait>(_: &T) {}
 
 const IN_CONST: () = {
   needs_const(&());
diff --git a/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.stderr b/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.stderr
index cd68cdaf8a2..740a05be06b 100644
--- a/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.stderr
+++ b/tests/ui/traits/const-traits/double-error-for-unimplemented-trait.stderr
@@ -14,8 +14,8 @@ LL | trait Trait {
 note: required by a bound in `needs_const`
   --> $DIR/double-error-for-unimplemented-trait.rs:10:25
    |
-LL | const fn needs_const<T: ~const Trait>(_: &T) {}
-   |                         ^^^^^^^^^^^^ required by this bound in `needs_const`
+LL | const fn needs_const<T: [const] Trait>(_: &T) {}
+   |                         ^^^^^^^^^^^^^ required by this bound in `needs_const`
 
 error[E0277]: the trait bound `(): Trait` is not satisfied
   --> $DIR/double-error-for-unimplemented-trait.rs:18:15
@@ -33,8 +33,8 @@ LL | trait Trait {
 note: required by a bound in `needs_const`
   --> $DIR/double-error-for-unimplemented-trait.rs:10:25
    |
-LL | const fn needs_const<T: ~const Trait>(_: &T) {}
-   |                         ^^^^^^^^^^^^ required by this bound in `needs_const`
+LL | const fn needs_const<T: [const] Trait>(_: &T) {}
+   |                         ^^^^^^^^^^^^^ required by this bound in `needs_const`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/traits/const-traits/tilde-twice.rs b/tests/ui/traits/const-traits/duplicate-constness.rs
index d341513b8a8..4b13abe3cf2 100644
--- a/tests/ui/traits/const-traits/tilde-twice.rs
+++ b/tests/ui/traits/const-traits/duplicate-constness.rs
@@ -2,5 +2,5 @@
 
 #![feature(const_trait_impl)]
 
-struct S<T: ~const ~const Tr>;
-//~^ ERROR expected identifier, found `~`
+struct S<T: [const] [const] Tr>;
+//~^ ERROR expected identifier, found `]`
diff --git a/tests/ui/traits/const-traits/duplicate-constness.stderr b/tests/ui/traits/const-traits/duplicate-constness.stderr
new file mode 100644
index 00000000000..27f69cd2386
--- /dev/null
+++ b/tests/ui/traits/const-traits/duplicate-constness.stderr
@@ -0,0 +1,8 @@
+error: expected identifier, found `]`
+  --> $DIR/duplicate-constness.rs:5:27
+   |
+LL | struct S<T: [const] [const] Tr>;
+   |                           ^ expected identifier
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/traits/const-traits/eval-bad-signature.rs b/tests/ui/traits/const-traits/eval-bad-signature.rs
index 97c573ea652..66e296d4388 100644
--- a/tests/ui/traits/const-traits/eval-bad-signature.rs
+++ b/tests/ui/traits/const-traits/eval-bad-signature.rs
@@ -7,7 +7,7 @@ trait Value {
     fn value() -> u32;
 }
 
-const fn get_value<T: ~const Value>() -> u32 {
+const fn get_value<T: [const] Value>() -> u32 {
     T::value()
 }
 
diff --git a/tests/ui/traits/const-traits/feature-gate.rs b/tests/ui/traits/const-traits/feature-gate.rs
index 921dfb054e3..5ad56ddcd33 100644
--- a/tests/ui/traits/const-traits/feature-gate.rs
+++ b/tests/ui/traits/const-traits/feature-gate.rs
@@ -10,12 +10,12 @@ trait T {}
 impl const T for S {}
 //[stock]~^ ERROR const trait impls are experimental
 
-const fn f<A: ~const T>() {} //[stock]~ ERROR const trait impls are experimental
+const fn f<A: [const] T>() {} //[stock]~ ERROR const trait impls are experimental
 fn g<A: const T>() {} //[stock]~ ERROR const trait impls are experimental
 
 macro_rules! discard { ($ty:ty) => {} }
 
-discard! { impl ~const T } //[stock]~ ERROR const trait impls are experimental
+discard! { impl [const] T } //[stock]~ ERROR const trait impls are experimental
 discard! { impl const T } //[stock]~ ERROR const trait impls are experimental
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/feature-gate.stock.stderr b/tests/ui/traits/const-traits/feature-gate.stock.stderr
index 78157d57056..37d76e7f387 100644
--- a/tests/ui/traits/const-traits/feature-gate.stock.stderr
+++ b/tests/ui/traits/const-traits/feature-gate.stock.stderr
@@ -9,10 +9,10 @@ LL | impl const T for S {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: const trait impls are experimental
-  --> $DIR/feature-gate.rs:13:15
+  --> $DIR/feature-gate.rs:13:13
    |
-LL | const fn f<A: ~const T>() {}
-   |               ^^^^^^
+LL | const fn f<A: [const] T>() {}
+   |             ^^^^^^^^^
    |
    = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
@@ -29,10 +29,10 @@ LL | fn g<A: const T>() {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: const trait impls are experimental
-  --> $DIR/feature-gate.rs:18:17
+  --> $DIR/feature-gate.rs:18:12
    |
-LL | discard! { impl ~const T }
-   |                 ^^^^^^
+LL | discard! { impl [const] T }
+   |            ^^^^^^^^^^^^
    |
    = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
diff --git a/tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs b/tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs
index 61826e9977e..8acd195e546 100644
--- a/tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs
+++ b/tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs
@@ -6,7 +6,7 @@ pub trait Test {}
 
 impl Test for () {}
 
-pub const fn test<T: ~const Test>() {}
+pub const fn test<T: [const] Test>() {}
 
 pub const fn min_by_i32() -> fn() {
     test::<()>
diff --git a/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.rs b/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.rs
index 4cb013b9323..026f2c0d603 100644
--- a/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.rs
+++ b/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.rs
@@ -1,9 +1,9 @@
 #![feature(const_trait_impl)]
 
-const fn test() -> impl ~const Fn() {
-    //~^ ERROR `~const` can only be applied to `#[const_trait]` traits
-    //~| ERROR `~const` can only be applied to `#[const_trait]` traits
-    //~| ERROR `~const` can only be applied to `#[const_trait]` traits
+const fn test() -> impl [const] Fn() {
+    //~^ ERROR `[const]` can only be applied to `#[const_trait]` traits
+    //~| ERROR `[const]` can only be applied to `#[const_trait]` traits
+    //~| ERROR `[const]` can only be applied to `#[const_trait]` traits
     const move || { //~ ERROR const closures are experimental
         let sl: &[u8] = b"foo";
 
@@ -11,7 +11,6 @@ const fn test() -> impl ~const Fn() {
             [first, remainder @ ..] => {
                 assert_eq!(first, &b'f');
                 //~^ ERROR cannot call non-const function
-                //~| ERROR cannot call non-const operator
             }
             [] => panic!(),
         }
diff --git a/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.stderr b/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.stderr
index 8d9371bf9f6..f340eaab0e3 100644
--- a/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.stderr
+++ b/tests/ui/traits/const-traits/ice-112822-expected-type-for-param.stderr
@@ -8,44 +8,35 @@ LL |     const move || {
    = help: add `#![feature(const_closures)]` 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: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/ice-112822-expected-type-for-param.rs:3:25
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/ice-112822-expected-type-for-param.rs:3:20
    |
-LL | const fn test() -> impl ~const Fn() {
-   |                         ^^^^^^ can't be applied to `Fn`
+LL | const fn test() -> impl [const] Fn() {
+   |                    ^^^^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/ice-112822-expected-type-for-param.rs:3:25
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/ice-112822-expected-type-for-param.rs:3:20
    |
-LL | const fn test() -> impl ~const Fn() {
-   |                         ^^^^^^ can't be applied to `Fn`
+LL | const fn test() -> impl [const] Fn() {
+   |                    ^^^^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/ice-112822-expected-type-for-param.rs:3:25
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/ice-112822-expected-type-for-param.rs:3:20
    |
-LL | const fn test() -> impl ~const Fn() {
-   |                         ^^^^^^ can't be applied to `Fn`
+LL | const fn test() -> impl [const] Fn() {
+   |                    ^^^^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0015]: cannot call non-const operator in constant functions
-  --> $DIR/ice-112822-expected-type-for-param.rs:12:17
-   |
-LL |                 assert_eq!(first, &b'f');
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-   = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
-
 error[E0015]: cannot call non-const function `core::panicking::assert_failed::<&u8, &u8>` in constant functions
   --> $DIR/ice-112822-expected-type-for-param.rs:12:17
    |
@@ -55,7 +46,7 @@ LL |                 assert_eq!(first, &b'f');
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
    = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 6 previous errors
+error: aborting due to 5 previous errors
 
 Some errors have detailed explanations: E0015, E0658.
 For more information about an error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs b/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs
index fadcaa39816..f1dbd947161 100644
--- a/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs
+++ b/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs
@@ -1,8 +1,8 @@
 #![allow(incomplete_features)]
 #![feature(generic_const_exprs, const_trait_impl)]
 
-const fn with_positive<F: ~const Fn()>() {}
-//~^ ERROR `~const` can only be applied to `#[const_trait]` traits
-//~| ERROR `~const` can only be applied to `#[const_trait]` traits
+const fn with_positive<F: [const] Fn()>() {}
+//~^ ERROR `[const]` can only be applied to `#[const_trait]` traits
+//~| ERROR `[const]` can only be applied to `#[const_trait]` traits
 
 pub fn main() {}
diff --git a/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.stderr b/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.stderr
index 821b257af88..d8d73173ec4 100644
--- a/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.stderr
+++ b/tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.stderr
@@ -1,19 +1,19 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/ice-123664-unexpected-bound-var.rs:4:27
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/ice-123664-unexpected-bound-var.rs:4:25
    |
-LL | const fn with_positive<F: ~const Fn()>() {}
-   |                           ^^^^^^ can't be applied to `Fn`
+LL | const fn with_positive<F: [const] Fn()>() {}
+   |                         ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/ice-123664-unexpected-bound-var.rs:4:27
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/ice-123664-unexpected-bound-var.rs:4:25
    |
-LL | const fn with_positive<F: ~const Fn()>() {}
-   |                           ^^^^^^ can't be applied to `Fn`
+LL | const fn with_positive<F: [const] Fn()>() {}
+   |                         ^^^^^^^^^ can't be applied to `Fn`
    |
-note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `Fn` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
diff --git a/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs
index d6df1714314..ea4db0515cd 100644
--- a/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs
+++ b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.rs
@@ -7,7 +7,7 @@ trait Foo {}
 
 impl const Foo for i32 {}
 
-impl<T> const Foo for T where T: ~const Foo {}
+impl<T> const Foo for T where T: [const] Foo {}
 //~^ ERROR conflicting implementations of trait `Foo` for type `i32`
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr
index 183c2c2cdf4..5b417dcfe2c 100644
--- a/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr
+++ b/tests/ui/traits/const-traits/ice-124857-combine-effect-const-infer-vars.stderr
@@ -4,8 +4,8 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i32`
 LL | impl const Foo for i32 {}
    | ---------------------- first implementation here
 LL |
-LL | impl<T> const Foo for T where T: ~const Foo {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
+LL | impl<T> const Foo for T where T: [const] Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/const-traits/impl-conditionally-const-trait.rs b/tests/ui/traits/const-traits/impl-conditionally-const-trait.rs
new file mode 100644
index 00000000000..f3783c9e69b
--- /dev/null
+++ b/tests/ui/traits/const-traits/impl-conditionally-const-trait.rs
@@ -0,0 +1,12 @@
+//! This test ensures that we can only implement `const Trait` for a type
+//! and not have the conditionally const syntax in that position.
+
+#![feature(const_trait_impl)]
+
+struct S;
+trait T {}
+
+impl [const] T for S {}
+//~^ ERROR expected identifier, found `]`
+
+fn main() {}
diff --git a/tests/ui/traits/const-traits/impl-conditionally-const-trait.stderr b/tests/ui/traits/const-traits/impl-conditionally-const-trait.stderr
new file mode 100644
index 00000000000..fc8db61b940
--- /dev/null
+++ b/tests/ui/traits/const-traits/impl-conditionally-const-trait.stderr
@@ -0,0 +1,8 @@
+error: expected identifier, found `]`
+  --> $DIR/impl-conditionally-const-trait.rs:9:12
+   |
+LL | impl [const] T for S {}
+   |            ^ expected identifier
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/traits/const-traits/impl-tilde-const-trait.rs b/tests/ui/traits/const-traits/impl-tilde-const-trait.rs
deleted file mode 100644
index 05b26465c5b..00000000000
--- a/tests/ui/traits/const-traits/impl-tilde-const-trait.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-#![feature(const_trait_impl)]
-
-struct S;
-trait T {}
-
-impl ~const T for S {}
-//~^ ERROR expected a trait, found type
-
-fn main() {}
diff --git a/tests/ui/traits/const-traits/impl-tilde-const-trait.stderr b/tests/ui/traits/const-traits/impl-tilde-const-trait.stderr
deleted file mode 100644
index 4695728f8ca..00000000000
--- a/tests/ui/traits/const-traits/impl-tilde-const-trait.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: expected a trait, found type
-  --> $DIR/impl-tilde-const-trait.rs:6:6
-   |
-LL | impl ~const T for S {}
-   |      ^^^^^^^^
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/traits/const-traits/inherent-impl-const-bounds.rs b/tests/ui/traits/const-traits/inherent-impl-const-bounds.rs
index 5ead1353bcd..941f0542803 100644
--- a/tests/ui/traits/const-traits/inherent-impl-const-bounds.rs
+++ b/tests/ui/traits/const-traits/inherent-impl-const-bounds.rs
@@ -12,7 +12,7 @@ impl const A for S {}
 impl const B for S {}
 
 impl S {
-    const fn a<T: ~const A>() where T: ~const B {
+    const fn a<T: [const] A>() where T: [const] B {
 
     }
 }
diff --git a/tests/ui/traits/const-traits/issue-100222.rs b/tests/ui/traits/const-traits/issue-100222.rs
index 55722d35075..4c93272b224 100644
--- a/tests/ui/traits/const-traits/issue-100222.rs
+++ b/tests/ui/traits/const-traits/issue-100222.rs
@@ -11,21 +11,28 @@ pub trait Index {
 }
 
 #[cfg_attr(any(ny, yy), const_trait)]
-pub trait IndexMut where Self: Index {
+pub trait IndexMut
+where
+    Self: Index,
+{
     const C: <Self as Index>::Output;
     type Assoc = <Self as Index>::Output;
     fn foo(&mut self, x: <Self as Index>::Output) -> <Self as Index>::Output;
 }
 
-impl Index for () { type Output = (); }
+impl Index for () {
+    type Output = ();
+}
 
 #[cfg(not(any(nn, yn)))]
 impl const IndexMut for <() as Index>::Output {
     const C: <Self as Index>::Output = ();
     type Assoc = <Self as Index>::Output;
     fn foo(&mut self, x: <Self as Index>::Output) -> <Self as Index>::Output
-        where <Self as Index>::Output:,
-    {}
+    where
+        <Self as Index>::Output:,
+    {
+    }
 }
 
 #[cfg(any(nn, yn))]
@@ -33,8 +40,10 @@ impl IndexMut for <() as Index>::Output {
     const C: <Self as Index>::Output = ();
     type Assoc = <Self as Index>::Output;
     fn foo(&mut self, x: <Self as Index>::Output) -> <Self as Index>::Output
-        where <Self as Index>::Output:,
-    {}
+    where
+        <Self as Index>::Output:,
+    {
+    }
 }
 
 const C: <() as Index>::Output = ();
diff --git a/tests/ui/traits/const-traits/issue-92111.rs b/tests/ui/traits/const-traits/issue-92111.rs
index c8db5cc9e7a..2450136793e 100644
--- a/tests/ui/traits/const-traits/issue-92111.rs
+++ b/tests/ui/traits/const-traits/issue-92111.rs
@@ -14,7 +14,7 @@ pub struct S(i32);
 
 impl Tr for S {}
 
-const fn a<T: ~const Destruct>(t: T) {}
+const fn a<T: [const] Destruct>(t: T) {}
 
 fn main() {
     a(S(0));
diff --git a/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs b/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs
index a3edc5ff8b1..0eb7f54d596 100644
--- a/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs
+++ b/tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs
@@ -10,7 +10,7 @@ pub trait Super {}
 #[const_trait]
 pub trait Sub: Super {}
 
-impl<A> const Super for &A where A: ~const Super {}
-impl<A> const Sub for &A where A: ~const Sub {}
+impl<A> const Super for &A where A: [const] Super {}
+impl<A> const Sub for &A where A: [const] Sub {}
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/item-bound-entailment-fails.rs b/tests/ui/traits/const-traits/item-bound-entailment-fails.rs
index f4bfcbda0ac..029597ea1f0 100644
--- a/tests/ui/traits/const-traits/item-bound-entailment-fails.rs
+++ b/tests/ui/traits/const-traits/item-bound-entailment-fails.rs
@@ -2,27 +2,27 @@
 #![feature(const_trait_impl)]
 
 #[const_trait] trait Foo {
-    type Assoc<T>: ~const Bar
+    type Assoc<T>: [const] Bar
     where
-        T: ~const Bar;
+        T: [const] Bar;
 }
 
 #[const_trait] trait Bar {}
 struct N<T>(T);
 impl<T> Bar for N<T> where T: Bar {}
 struct C<T>(T);
-impl<T> const Bar for C<T> where T: ~const Bar {}
+impl<T> const Bar for C<T> where T: [const] Bar {}
 
 impl const Foo for u32 {
     type Assoc<T> = N<T>
-    //~^ ERROR the trait bound `N<T>: ~const Bar` is not satisfied
+    //~^ ERROR the trait bound `N<T>: [const] Bar` is not satisfied
     where
-        T: ~const Bar;
+        T: [const] Bar;
 }
 
 impl const Foo for i32 {
     type Assoc<T> = C<T>
-    //~^ ERROR the trait bound `T: ~const Bar` is not satisfied
+    //~^ ERROR the trait bound `T: [const] Bar` is not satisfied
     where
         T: Bar;
 }
diff --git a/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr b/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr
index 7e72dc9abaa..8e5894a3296 100644
--- a/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr
+++ b/tests/ui/traits/const-traits/item-bound-entailment-fails.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `N<T>: ~const Bar` is not satisfied
+error[E0277]: the trait bound `N<T>: [const] Bar` is not satisfied
   --> $DIR/item-bound-entailment-fails.rs:17:21
    |
 LL |     type Assoc<T> = N<T>
@@ -7,25 +7,25 @@ LL |     type Assoc<T> = N<T>
 note: required by a bound in `Foo::Assoc`
   --> $DIR/item-bound-entailment-fails.rs:5:20
    |
-LL |     type Assoc<T>: ~const Bar
-   |                    ^^^^^^^^^^ required by this bound in `Foo::Assoc`
+LL |     type Assoc<T>: [const] Bar
+   |                    ^^^^^^^^^^^ required by this bound in `Foo::Assoc`
 
-error[E0277]: the trait bound `T: ~const Bar` is not satisfied
+error[E0277]: the trait bound `T: [const] Bar` is not satisfied
   --> $DIR/item-bound-entailment-fails.rs:24:21
    |
 LL |     type Assoc<T> = C<T>
    |                     ^^^^
    |
-note: required for `C<T>` to implement `~const Bar`
+note: required for `C<T>` to implement `[const] Bar`
   --> $DIR/item-bound-entailment-fails.rs:14:15
    |
-LL | impl<T> const Bar for C<T> where T: ~const Bar {}
-   |               ^^^     ^^^^          ---------- unsatisfied trait bound introduced here
+LL | impl<T> const Bar for C<T> where T: [const] Bar {}
+   |               ^^^     ^^^^          ----------- unsatisfied trait bound introduced here
 note: required by a bound in `Foo::Assoc`
   --> $DIR/item-bound-entailment-fails.rs:5:20
    |
-LL |     type Assoc<T>: ~const Bar
-   |                    ^^^^^^^^^^ required by this bound in `Foo::Assoc`
+LL |     type Assoc<T>: [const] Bar
+   |                    ^^^^^^^^^^^ required by this bound in `Foo::Assoc`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/traits/const-traits/item-bound-entailment.rs b/tests/ui/traits/const-traits/item-bound-entailment.rs
index 11db57be815..6e053adb385 100644
--- a/tests/ui/traits/const-traits/item-bound-entailment.rs
+++ b/tests/ui/traits/const-traits/item-bound-entailment.rs
@@ -4,16 +4,16 @@
 #![feature(const_trait_impl)]
 
 #[const_trait] trait Foo {
-    type Assoc<T>: ~const Bar
+    type Assoc<T>: [const] Bar
     where
-        T: ~const Bar;
+        T: [const] Bar;
 }
 
 #[const_trait] trait Bar {}
 struct N<T>(T);
 impl<T> Bar for N<T> where T: Bar {}
 struct C<T>(T);
-impl<T> const Bar for C<T> where T: ~const Bar {}
+impl<T> const Bar for C<T> where T: [const] Bar {}
 
 impl Foo for u32 {
     type Assoc<T> = N<T>
@@ -24,7 +24,7 @@ impl Foo for u32 {
 impl const Foo for i32 {
     type Assoc<T> = C<T>
     where
-        T: ~const Bar;
+        T: [const] Bar;
 }
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.rs b/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.rs
index 820d3d63b62..a5f6ae198f6 100644
--- a/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.rs
+++ b/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.rs
@@ -1,20 +1,24 @@
-// Ensure that we don't consider `const Trait` and `~const Trait` to
+// Ensure that we don't consider `const Trait` to
 // match the macro fragment specifier `ty` as that would be a breaking
 // change theoretically speaking. Syntactically trait object types can
 // be "bare", i.e., lack the prefix `dyn`.
 // By contrast, `?Trait` *does* match `ty` and therefore an arm like
 // `?$Trait:path` would never be reached.
 // See `parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs`.
-
-//@ check-pass
+// `[const] Trait` is already an error for a `ty` fragment,
+// so we do not need to prevent that.
 
 macro_rules! check {
-    ($Type:ty) => { compile_error!("ty"); };
+    ($Type:ty) => {
+        compile_error!("ty");
+    };
     (const $Trait:path) => {};
-    (~const $Trait:path) => {};
+    ([const] $Trait:path) => {};
 }
 
 check! { const Trait }
-check! { ~const Trait }
+check! { [const] Trait }
+//~^ ERROR: expected identifier, found `]`
+//~| ERROR: const trait impls are experimental
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.stderr b/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.stderr
new file mode 100644
index 00000000000..56dad5301a4
--- /dev/null
+++ b/tests/ui/traits/const-traits/mbe-bare-trait-objects-const-trait-bounds.stderr
@@ -0,0 +1,22 @@
+error: expected identifier, found `]`
+  --> $DIR/mbe-bare-trait-objects-const-trait-bounds.rs:20:16
+   |
+LL |     ($Type:ty) => {
+   |      -------- while parsing argument for this `ty` macro fragment
+...
+LL | check! { [const] Trait }
+   |                ^ expected identifier
+
+error[E0658]: const trait impls are experimental
+  --> $DIR/mbe-bare-trait-objects-const-trait-bounds.rs:20:11
+   |
+LL | check! { [const] Trait }
+   |           ^^^^^
+   |
+   = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
+   = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/traits/const-traits/minicore-deref-fail.rs b/tests/ui/traits/const-traits/minicore-deref-fail.rs
index f4a7678a009..d9b33fa040a 100644
--- a/tests/ui/traits/const-traits/minicore-deref-fail.rs
+++ b/tests/ui/traits/const-traits/minicore-deref-fail.rs
@@ -11,10 +11,12 @@ use minicore::*;
 struct Ty;
 impl Deref for Ty {
     type Target = ();
-    fn deref(&self) -> &Self::Target { &() }
+    fn deref(&self) -> &Self::Target {
+        &()
+    }
 }
 
 const fn foo() {
     *Ty;
-    //~^ ERROR the trait bound `Ty: ~const minicore::Deref` is not satisfied
+    //~^ ERROR the trait bound `Ty: [const] minicore::Deref` is not satisfied
 }
diff --git a/tests/ui/traits/const-traits/minicore-deref-fail.stderr b/tests/ui/traits/const-traits/minicore-deref-fail.stderr
index a1f840114fc..4329b235756 100644
--- a/tests/ui/traits/const-traits/minicore-deref-fail.stderr
+++ b/tests/ui/traits/const-traits/minicore-deref-fail.stderr
@@ -1,5 +1,5 @@
-error[E0277]: the trait bound `Ty: ~const minicore::Deref` is not satisfied
-  --> $DIR/minicore-deref-fail.rs:18:5
+error[E0277]: the trait bound `Ty: [const] minicore::Deref` is not satisfied
+  --> $DIR/minicore-deref-fail.rs:20:5
    |
 LL |     *Ty;
    |     ^^^
diff --git a/tests/ui/traits/const-traits/minicore-drop-fail.rs b/tests/ui/traits/const-traits/minicore-drop-fail.rs
index 274e5db21c4..f3e7c7df4d4 100644
--- a/tests/ui/traits/const-traits/minicore-drop-fail.rs
+++ b/tests/ui/traits/const-traits/minicore-drop-fail.rs
@@ -19,7 +19,7 @@ impl Drop for NotDropImpl {
 impl Foo for () {}
 
 struct Conditional<T: Foo>(T);
-impl<T> const Drop for Conditional<T> where T: ~const Foo {
+impl<T> const Drop for Conditional<T> where T: [const] Foo {
     fn drop(&mut self) {}
 }
 
diff --git a/tests/ui/traits/const-traits/minicore-fn-fail.rs b/tests/ui/traits/const-traits/minicore-fn-fail.rs
index ae1cbc6ca58..d4cd41a51ca 100644
--- a/tests/ui/traits/const-traits/minicore-fn-fail.rs
+++ b/tests/ui/traits/const-traits/minicore-fn-fail.rs
@@ -8,14 +8,14 @@
 extern crate minicore;
 use minicore::*;
 
-const fn call_indirect<T: ~const Fn()>(t: &T) { t() }
+const fn call_indirect<T: [const] Fn()>(t: &T) { t() }
 
 #[const_trait]
 trait Foo {}
 impl Foo for () {}
-const fn foo<T: ~const Foo>() {}
+const fn foo<T: [const] Foo>() {}
 
 const fn test() {
     call_indirect(&foo::<()>);
-    //~^ ERROR the trait bound `(): ~const Foo` is not satisfied
+    //~^ ERROR the trait bound `(): [const] Foo` is not satisfied
 }
diff --git a/tests/ui/traits/const-traits/minicore-fn-fail.stderr b/tests/ui/traits/const-traits/minicore-fn-fail.stderr
index 03c7ade87c0..c02a067774b 100644
--- a/tests/ui/traits/const-traits/minicore-fn-fail.stderr
+++ b/tests/ui/traits/const-traits/minicore-fn-fail.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `(): ~const Foo` is not satisfied
+error[E0277]: the trait bound `(): [const] Foo` is not satisfied
   --> $DIR/minicore-fn-fail.rs:19:19
    |
 LL |     call_indirect(&foo::<()>);
@@ -9,8 +9,8 @@ LL |     call_indirect(&foo::<()>);
 note: required by a bound in `call_indirect`
   --> $DIR/minicore-fn-fail.rs:11:27
    |
-LL | const fn call_indirect<T: ~const Fn()>(t: &T) { t() }
-   |                           ^^^^^^^^^^^ required by this bound in `call_indirect`
+LL | const fn call_indirect<T: [const] Fn()>(t: &T) { t() }
+   |                           ^^^^^^^^^^^^ required by this bound in `call_indirect`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/const-traits/minicore-works.rs b/tests/ui/traits/const-traits/minicore-works.rs
index c79b4fc07df..ef08e84c02b 100644
--- a/tests/ui/traits/const-traits/minicore-works.rs
+++ b/tests/ui/traits/const-traits/minicore-works.rs
@@ -21,7 +21,9 @@ const fn test_op() {
     let _y = Custom + Custom;
 }
 
-const fn call_indirect<T: ~const Fn()>(t: &T) { t() }
+const fn call_indirect<T: [const] Fn()>(t: &T) {
+    t()
+}
 
 const fn call() {
     call_indirect(&call);
diff --git a/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.rs b/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.rs
index aaab8e819a3..5f47778a140 100644
--- a/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.rs
+++ b/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.rs
@@ -1,13 +1,13 @@
 #![feature(const_trait_impl)]
 
-const fn maybe_const_maybe<T: ~const ?Sized>() {}
-//~^ ERROR `~const` trait not allowed with `?` trait polarity modifier
+const fn maybe_const_maybe<T: [const] ?Sized>() {}
+//~^ ERROR `[const]` trait not allowed with `?` trait polarity modifier
 
 fn const_maybe<T: const ?Sized>() {}
 //~^ ERROR `const` trait not allowed with `?` trait polarity modifier
 
-const fn maybe_const_negative<T: ~const !Trait>() {}
-//~^ ERROR `~const` trait not allowed with `!` trait polarity modifier
+const fn maybe_const_negative<T: [const] !Trait>() {}
+//~^ ERROR `[const]` trait not allowed with `!` trait polarity modifier
 //~| ERROR negative bounds are not supported
 
 fn const_negative<T: const !Trait>() {}
diff --git a/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.stderr b/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.stderr
index 18e4d160f5f..429131f905f 100644
--- a/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.stderr
+++ b/tests/ui/traits/const-traits/mutually-exclusive-trait-bound-modifiers.stderr
@@ -1,10 +1,10 @@
-error: `~const` trait not allowed with `?` trait polarity modifier
-  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:3:38
+error: `[const]` trait not allowed with `?` trait polarity modifier
+  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:3:39
    |
-LL | const fn maybe_const_maybe<T: ~const ?Sized>() {}
-   |                               ------ ^
+LL | const fn maybe_const_maybe<T: [const] ?Sized>() {}
+   |                               ------- ^
    |                               |
-   |                               there is not a well-defined meaning for a `~const ?` trait
+   |                               there is not a well-defined meaning for a `[const] ?` trait
 
 error: `const` trait not allowed with `?` trait polarity modifier
   --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:6:25
@@ -14,13 +14,13 @@ LL | fn const_maybe<T: const ?Sized>() {}
    |                   |
    |                   there is not a well-defined meaning for a `const ?` trait
 
-error: `~const` trait not allowed with `!` trait polarity modifier
-  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:9:41
+error: `[const]` trait not allowed with `!` trait polarity modifier
+  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:9:42
    |
-LL | const fn maybe_const_negative<T: ~const !Trait>() {}
-   |                                  ------ ^
+LL | const fn maybe_const_negative<T: [const] !Trait>() {}
+   |                                  ------- ^
    |                                  |
-   |                                  there is not a well-defined meaning for a `~const !` trait
+   |                                  there is not a well-defined meaning for a `[const] !` trait
 
 error: `const` trait not allowed with `!` trait polarity modifier
   --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:13:28
@@ -31,10 +31,10 @@ LL | fn const_negative<T: const !Trait>() {}
    |                      there is not a well-defined meaning for a `const !` trait
 
 error: negative bounds are not supported
-  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:9:41
+  --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:9:42
    |
-LL | const fn maybe_const_negative<T: ~const !Trait>() {}
-   |                                         ^
+LL | const fn maybe_const_negative<T: [const] !Trait>() {}
+   |                                          ^
 
 error: negative bounds are not supported
   --> $DIR/mutually-exclusive-trait-bound-modifiers.rs:13:28
diff --git a/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs b/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs
index 8f11c8a6e55..86e3e5f769f 100644
--- a/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs
+++ b/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs
@@ -7,7 +7,7 @@ trait Convert<T> {
     fn to(self) -> T;
 }
 
-impl<A, B> const Convert<B> for A where B: ~const From<A> {
+impl<A, B> const Convert<B> for A where B: [const] From<A> {
     fn to(self) -> B {
         B::from(self)
     }
diff --git a/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.stderr b/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.stderr
index 190af5e7c2d..8211b2b49bf 100644
--- a/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.stderr
+++ b/tests/ui/traits/const-traits/non-const-op-in-closure-in-const.stderr
@@ -1,19 +1,19 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/non-const-op-in-closure-in-const.rs:10:44
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/non-const-op-in-closure-in-const.rs:10:42
    |
-LL | impl<A, B> const Convert<B> for A where B: ~const From<A> {
-   |                                            ^^^^^^ can't be applied to `From`
+LL | impl<A, B> const Convert<B> for A where B: [const] From<A> {
+   |                                          ^^^^^^^^^ can't be applied to `From`
    |
-note: `From` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `From` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/non-const-op-in-closure-in-const.rs:10:44
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/non-const-op-in-closure-in-const.rs:10:42
    |
-LL | impl<A, B> const Convert<B> for A where B: ~const From<A> {
-   |                                            ^^^^^^ can't be applied to `From`
+LL | impl<A, B> const Convert<B> for A where B: [const] From<A> {
+   |                                          ^^^^^^^^^ can't be applied to `From`
    |
-note: `From` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+note: `From` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
   --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
diff --git a/tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr b/tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr
index bd822970ad1..ed671bee63a 100644
--- a/tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr
+++ b/tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr
@@ -3,8 +3,8 @@ error[E0119]: conflicting implementations of trait `Foo` for type `(_,)`
    |
 LL | / impl<T> const Foo for T
 LL | | where
-LL | |     T: ~const Bar,
-   | |__________________- first implementation here
+LL | |     T: [const] Bar,
+   | |___________________- first implementation here
 ...
 LL |   impl<T> Foo for (T,) {
    |   ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_,)`
diff --git a/tests/ui/traits/const-traits/overlap-const-with-nonconst.rs b/tests/ui/traits/const-traits/overlap-const-with-nonconst.rs
index eb66d03faa6..f45690b2f78 100644
--- a/tests/ui/traits/const-traits/overlap-const-with-nonconst.rs
+++ b/tests/ui/traits/const-traits/overlap-const-with-nonconst.rs
@@ -15,7 +15,7 @@ trait Foo {
 }
 impl<T> const Foo for T
 where
-    T: ~const Bar,
+    T: [const] Bar,
 {
     default fn method(&self) {}
 }
@@ -27,7 +27,7 @@ impl<T> Foo for (T,) {
     }
 }
 
-const fn dispatch<T: ~const Bar + Copy>(t: T) {
+const fn dispatch<T: [const] Bar + Copy>(t: T) {
     t.method();
 }
 
diff --git a/tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr b/tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr
index cbdcb45f6be..35f4d9184cf 100644
--- a/tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr
+++ b/tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr
@@ -13,8 +13,8 @@ error[E0119]: conflicting implementations of trait `Foo` for type `(_,)`
    |
 LL | / impl<T> const Foo for T
 LL | | where
-LL | |     T: ~const Bar,
-   | |__________________- first implementation here
+LL | |     T: [const] Bar,
+   | |___________________- first implementation here
 ...
 LL |   impl<T> Foo for (T,) {
    |   ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_,)`
diff --git a/tests/ui/traits/const-traits/predicate-entailment-fails.rs b/tests/ui/traits/const-traits/predicate-entailment-fails.rs
index 266a49f9e38..0e6c277fd82 100644
--- a/tests/ui/traits/const-traits/predicate-entailment-fails.rs
+++ b/tests/ui/traits/const-traits/predicate-entailment-fails.rs
@@ -6,9 +6,9 @@ impl const Bar for () {}
 
 
 #[const_trait] trait TildeConst {
-    type Bar<T> where T: ~const Bar;
+    type Bar<T> where T: [const] Bar;
 
-    fn foo<T>() where T: ~const Bar;
+    fn foo<T>() where T: [const] Bar;
 }
 impl TildeConst for () {
     type Bar<T> = () where T: const Bar;
@@ -32,10 +32,10 @@ impl NeverConst for i32 {
     //~^ ERROR impl has stricter requirements than trait
 }
 impl const NeverConst for u32 {
-    type Bar<T> = () where T: ~const Bar;
+    type Bar<T> = () where T: [const] Bar;
     //~^ ERROR impl has stricter requirements than trait
 
-    fn foo<T>() where T: ~const Bar {}
+    fn foo<T>() where T: [const] Bar {}
     //~^ ERROR impl has stricter requirements than trait
 }
 
diff --git a/tests/ui/traits/const-traits/predicate-entailment-fails.stderr b/tests/ui/traits/const-traits/predicate-entailment-fails.stderr
index dfdc4d23250..cba7c979a42 100644
--- a/tests/ui/traits/const-traits/predicate-entailment-fails.stderr
+++ b/tests/ui/traits/const-traits/predicate-entailment-fails.stderr
@@ -1,7 +1,7 @@
 error[E0276]: impl has stricter requirements than trait
   --> $DIR/predicate-entailment-fails.rs:14:31
    |
-LL |     type Bar<T> where T: ~const Bar;
+LL |     type Bar<T> where T: [const] Bar;
    |     ----------- definition of `Bar` from trait
 ...
 LL |     type Bar<T> = () where T: const Bar;
@@ -10,8 +10,8 @@ LL |     type Bar<T> = () where T: const Bar;
 error[E0276]: impl has stricter requirements than trait
   --> $DIR/predicate-entailment-fails.rs:17:26
    |
-LL |     fn foo<T>() where T: ~const Bar;
-   |     -------------------------------- definition of `foo` from trait
+LL |     fn foo<T>() where T: [const] Bar;
+   |     --------------------------------- definition of `foo` from trait
 ...
 LL |     fn foo<T>() where T: const Bar {}
    |                          ^^^^^^^^^ impl has extra requirement `T: const Bar`
@@ -40,8 +40,8 @@ error[E0276]: impl has stricter requirements than trait
 LL |     type Bar<T> where T: Bar;
    |     ----------- definition of `Bar` from trait
 ...
-LL |     type Bar<T> = () where T: ~const Bar;
-   |                               ^^^^^^^^^^ impl has extra requirement `T: ~const Bar`
+LL |     type Bar<T> = () where T: [const] Bar;
+   |                               ^^^^^^^^^^^ impl has extra requirement `T: [const] Bar`
 
 error[E0276]: impl has stricter requirements than trait
   --> $DIR/predicate-entailment-fails.rs:38:26
@@ -49,8 +49,8 @@ error[E0276]: impl has stricter requirements than trait
 LL |     fn foo<T>() where T: Bar;
    |     ------------------------- definition of `foo` from trait
 ...
-LL |     fn foo<T>() where T: ~const Bar {}
-   |                          ^^^^^^^^^^ impl has extra requirement `T: ~const Bar`
+LL |     fn foo<T>() where T: [const] Bar {}
+   |                          ^^^^^^^^^^^ impl has extra requirement `T: [const] Bar`
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/traits/const-traits/predicate-entailment-passes.rs b/tests/ui/traits/const-traits/predicate-entailment-passes.rs
index 28ae21891f3..fe871483186 100644
--- a/tests/ui/traits/const-traits/predicate-entailment-passes.rs
+++ b/tests/ui/traits/const-traits/predicate-entailment-passes.rs
@@ -7,7 +7,7 @@
 impl const Bar for () {}
 
 #[const_trait] trait TildeConst {
-    fn foo<T>() where T: ~const Bar;
+    fn foo<T>() where T: [const] Bar;
 }
 impl TildeConst for () {
     fn foo<T>() where T: Bar {}
@@ -21,7 +21,7 @@ impl AlwaysConst for i32 {
     fn foo<T>() where T: Bar {}
 }
 impl const AlwaysConst for u32 {
-    fn foo<T>() where T: ~const Bar {}
+    fn foo<T>() where T: [const] Bar {}
 }
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs b/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs
index 5af9ee8614f..212d869d94d 100644
--- a/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs
+++ b/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.rs
@@ -1,5 +1,5 @@
-// Tests that trait bounds on specializing trait impls must be `~const` if the
-// same bound is present on the default impl and is `~const` there.
+// Tests that trait bounds on specializing trait impls must be `[const]` if the
+// same bound is present on the default impl and is `[const]` there.
 //@ known-bug: #110395
 // FIXME(const_trait_impl) ^ should error
 
@@ -20,14 +20,14 @@ trait Bar {
 
 impl<T> const Bar for T
 where
-    T: ~const Foo,
+    T: [const] Foo,
 {
     default fn bar() {}
 }
 
 impl<T> Bar for T
 where
-    T: Foo, //FIXME ~ ERROR missing `~const` qualifier
+    T: Foo, //FIXME ~ ERROR missing `[const]` qualifier
     T: Specialize,
 {
     fn bar() {}
@@ -40,7 +40,7 @@ trait Baz {
 
 impl<T> const Baz for T
 where
-    T: ~const Foo,
+    T: [const] Foo,
 {
     default fn baz() {}
 }
diff --git a/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.stderr b/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.stderr
index 9166b8ca5d2..074e6237cc2 100644
--- a/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.stderr
+++ b/tests/ui/traits/const-traits/specialization/const-default-bound-non-const-specialized-bound.stderr
@@ -3,12 +3,12 @@ error[E0119]: conflicting implementations of trait `Bar`
    |
 LL | / impl<T> const Bar for T
 LL | | where
-LL | |     T: ~const Foo,
-   | |__________________- first implementation here
+LL | |     T: [const] Foo,
+   | |___________________- first implementation here
 ...
 LL | / impl<T> Bar for T
 LL | | where
-LL | |     T: Foo, //FIXME ~ ERROR missing `~const` qualifier
+LL | |     T: Foo, //FIXME ~ ERROR missing `[const]` qualifier
 LL | |     T: Specialize,
    | |__________________^ conflicting implementation
 
@@ -17,8 +17,8 @@ error[E0119]: conflicting implementations of trait `Baz`
    |
 LL | / impl<T> const Baz for T
 LL | | where
-LL | |     T: ~const Foo,
-   | |__________________- first implementation here
+LL | |     T: [const] Foo,
+   | |___________________- first implementation here
 ...
 LL | / impl<T> const Baz for T //FIXME ~ ERROR conflicting implementations of trait `Baz`
 LL | | where
diff --git a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs
index 89ad61c3c31..6991b7deda3 100644
--- a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs
+++ b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs
@@ -11,7 +11,7 @@ trait Value {
     fn value() -> u32;
 }
 
-const fn get_value<T: ~const Value>() -> u32 {
+const fn get_value<T: [const] Value>() -> u32 {
     T::value()
 }
 
diff --git a/tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs b/tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs
index d97469edaf9..754f1c6d09d 100644
--- a/tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs
+++ b/tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs
@@ -1,4 +1,4 @@
-// Tests that `T: ~const Foo` in a specializing impl is treated as equivalent to
+// Tests that `T: [const] Foo` in a specializing impl is treated as equivalent to
 // `T: Foo` in the default impl for the purposes of specialization (i.e., it
 // does not think that the user is attempting to specialize on trait `Foo`).
 
@@ -28,7 +28,7 @@ where
 
 impl<T> const Bar for T
 where
-    T: ~const Foo,
+    T: [const] Foo,
     T: Specialize,
 {
     fn bar() {}
@@ -48,7 +48,7 @@ where
 
 impl<T> const Baz for T
 where
-    T: ~const Foo,
+    T: [const] Foo,
     T: Specialize,
 {
     fn baz() {}
diff --git a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs
index e9b494bc2c0..b1a1b4a2399 100644
--- a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs
+++ b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs
@@ -11,7 +11,7 @@ trait Value {
     fn value() -> u32;
 }
 
-const fn get_value<T: ~const Value>() -> u32 {
+const fn get_value<T: [const] Value>() -> u32 {
     T::value()
 }
 
diff --git a/tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs b/tests/ui/traits/const-traits/specialization/specialize-on-conditionally-const.rs
index d80370aee82..0106bb13875 100644
--- a/tests/ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs
+++ b/tests/ui/traits/const-traits/specialization/specialize-on-conditionally-const.rs
@@ -1,4 +1,5 @@
-// Tests that `~const` trait bounds can be used to specialize const trait impls.
+// Tests that `[const]` trait bounds can be used to specialize const trait impls.
+// cc #95186
 
 //@ check-pass
 
@@ -21,7 +22,7 @@ impl<T> const Foo for T {
 
 impl<T> const Foo for T
 where
-    T: ~const Specialize,
+    T: [const] Specialize,
 {
     fn foo() {}
 }
@@ -33,15 +34,15 @@ trait Bar {
 
 impl<T> const Bar for T
 where
-    T: ~const Foo,
+    T: [const] Foo,
 {
     default fn bar() {}
 }
 
 impl<T> const Bar for T
 where
-    T: ~const Foo,
-    T: ~const Specialize,
+    T: [const] Foo,
+    T: [const] Specialize,
 {
     fn bar() {}
 }
diff --git a/tests/ui/traits/const-traits/specializing-constness-2.rs b/tests/ui/traits/const-traits/specializing-constness-2.rs
index c1fe42b9751..86c2cee9fed 100644
--- a/tests/ui/traits/const-traits/specializing-constness-2.rs
+++ b/tests/ui/traits/const-traits/specializing-constness-2.rs
@@ -17,7 +17,7 @@ impl<T: Default> A for T {
     }
 }
 
-impl<T: Default + ~const Sup> const A for T {
+impl<T: Default + [const] Sup> const A for T {
     fn a() -> u32 {
         3
     }
@@ -25,7 +25,7 @@ impl<T: Default + ~const Sup> const A for T {
 
 const fn generic<T: Default>() {
     <T as A>::a();
-    //FIXME ~^ ERROR: the trait bound `T: ~const Sup` is not satisfied
+    //FIXME ~^ ERROR: the trait bound `T: [const] Sup` is not satisfied
 }
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/specializing-constness-2.stderr b/tests/ui/traits/const-traits/specializing-constness-2.stderr
index edba836aac3..850e6939dae 100644
--- a/tests/ui/traits/const-traits/specializing-constness-2.stderr
+++ b/tests/ui/traits/const-traits/specializing-constness-2.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `T: ~const A` is not satisfied
+error[E0277]: the trait bound `T: [const] A` is not satisfied
   --> $DIR/specializing-constness-2.rs:27:6
    |
 LL |     <T as A>::a();
diff --git a/tests/ui/traits/const-traits/specializing-constness.rs b/tests/ui/traits/const-traits/specializing-constness.rs
index 94b6da7124d..b64d8b21b24 100644
--- a/tests/ui/traits/const-traits/specializing-constness.rs
+++ b/tests/ui/traits/const-traits/specializing-constness.rs
@@ -14,7 +14,7 @@ pub trait A {
 #[const_trait]
 pub trait Spec {}
 
-impl<T: ~const Spec> const A for T {
+impl<T: [const] Spec> const A for T {
     default fn a() -> u32 {
         2
     }
diff --git a/tests/ui/traits/const-traits/specializing-constness.stderr b/tests/ui/traits/const-traits/specializing-constness.stderr
index 2ca70b53e4e..f411ebcdfca 100644
--- a/tests/ui/traits/const-traits/specializing-constness.stderr
+++ b/tests/ui/traits/const-traits/specializing-constness.stderr
@@ -1,8 +1,8 @@
 error[E0119]: conflicting implementations of trait `A`
   --> $DIR/specializing-constness.rs:23:1
    |
-LL | impl<T: ~const Spec> const A for T {
-   | ---------------------------------- first implementation here
+LL | impl<T: [const] Spec> const A for T {
+   | ----------------------------------- first implementation here
 ...
 LL | impl<T: Spec + Sup> A for T {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
diff --git a/tests/ui/traits/const-traits/staged-api.rs b/tests/ui/traits/const-traits/staged-api.rs
index bf09a5f7803..d24b26be569 100644
--- a/tests/ui/traits/const-traits/staged-api.rs
+++ b/tests/ui/traits/const-traits/staged-api.rs
@@ -23,7 +23,7 @@ impl const MyTrait for Foo {
 }
 
 #[rustc_allow_const_fn_unstable(const_trait_impl, unstable)]
-const fn conditionally_const<T: ~const MyTrait>() {
+const fn conditionally_const<T: [const] MyTrait>() {
     T::func();
 }
 
diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr
index 8f88e3aa8bc..11f73cbf0c9 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr
@@ -1,31 +1,31 @@
-error: `~const` is not allowed here
-  --> $DIR/super-traits-fail-2.rs:11:12
+error: `[const]` is not allowed here
+  --> $DIR/super-traits-fail-2.rs:11:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
   --> $DIR/super-traits-fail-2.rs:11:1
    |
-LL | trait Bar: ~const Foo {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | trait Bar: [const] Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-2.rs:11:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-2.rs:11:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-2.rs:11:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-2.rs:11:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -33,11 +33,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-2.rs:11:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-2.rs:11:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr
index 087e80de788..1767672e180 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr
@@ -1,19 +1,19 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-2.rs:11:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-2.rs:11:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-2.rs:11:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-2.rs:11:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -21,11 +21,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-2.rs:11:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-2.rs:11:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -33,11 +33,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-2.rs:11:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-2.rs:11:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -45,11 +45,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-2.rs:11:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-2.rs:11:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.rs b/tests/ui/traits/const-traits/super-traits-fail-2.rs
index 6cc9d739476..781dacb81a1 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-2.rs
+++ b/tests/ui/traits/const-traits/super-traits-fail-2.rs
@@ -8,17 +8,17 @@ trait Foo {
 }
 
 #[cfg_attr(any(yy, ny), const_trait)]
-trait Bar: ~const Foo {}
-//[ny,nn]~^ ERROR: `~const` can only be applied to `#[const_trait]`
-//[ny,nn]~| ERROR: `~const` can only be applied to `#[const_trait]`
-//[ny,nn]~| ERROR: `~const` can only be applied to `#[const_trait]`
-//[ny]~| ERROR: `~const` can only be applied to `#[const_trait]`
-//[ny]~| ERROR: `~const` can only be applied to `#[const_trait]`
-//[yn,nn]~^^^^^^ ERROR: `~const` is not allowed here
+trait Bar: [const] Foo {}
+//[ny,nn]~^ ERROR: `[const]` can only be applied to `#[const_trait]`
+//[ny,nn]~| ERROR: `[const]` can only be applied to `#[const_trait]`
+//[ny,nn]~| ERROR: `[const]` can only be applied to `#[const_trait]`
+//[ny]~| ERROR: `[const]` can only be applied to `#[const_trait]`
+//[ny]~| ERROR: `[const]` can only be applied to `#[const_trait]`
+//[yn,nn]~^^^^^^ ERROR: `[const]` is not allowed here
 
 const fn foo<T: Bar>(x: &T) {
     x.a();
-    //[yy,yn]~^ ERROR the trait bound `T: ~const Foo`
+    //[yy,yn]~^ ERROR the trait bound `T: [const] Foo`
     //[nn,ny]~^^ ERROR cannot call non-const method `<T as Foo>::a` in constant functions
 }
 
diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr
index ee49810bace..63c33a00234 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr
@@ -1,16 +1,16 @@
-error: `~const` is not allowed here
-  --> $DIR/super-traits-fail-2.rs:11:12
+error: `[const]` is not allowed here
+  --> $DIR/super-traits-fail-2.rs:11:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
   --> $DIR/super-traits-fail-2.rs:11:1
    |
-LL | trait Bar: ~const Foo {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | trait Bar: [const] Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0277]: the trait bound `T: ~const Foo` is not satisfied
+error[E0277]: the trait bound `T: [const] Foo` is not satisfied
   --> $DIR/super-traits-fail-2.rs:20:7
    |
 LL |     x.a();
diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr
index a213273c1c7..4ae4bbde99b 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-2.yy.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `T: ~const Foo` is not satisfied
+error[E0277]: the trait bound `T: [const] Foo` is not satisfied
   --> $DIR/super-traits-fail-2.rs:20:7
    |
 LL |     x.a();
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr
index a5ef716a62a..c6a06d074c9 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr
@@ -1,51 +1,51 @@
-error: `~const` is not allowed here
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` is not allowed here
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
   --> $DIR/super-traits-fail-3.rs:23:1
    |
-LL | trait Bar: ~const Foo {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | trait Bar: [const] Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0658]: const trait impls are experimental
-  --> $DIR/super-traits-fail-3.rs:23:12
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^
    |
    = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: const trait impls are experimental
-  --> $DIR/super-traits-fail-3.rs:32:17
+  --> $DIR/super-traits-fail-3.rs:32:15
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |               ^^^^^^^^^
    |
    = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
 help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -53,11 +53,11 @@ help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -65,27 +65,27 @@ help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:32:17
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:32:15
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^ can't be applied to `Bar`
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |               ^^^^^^^^^ can't be applied to `Bar`
    |
 help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
    |
-LL | #[const_trait] trait Bar: ~const Foo {}
+LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:32:17
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:32:15
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^ can't be applied to `Bar`
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |               ^^^^^^^^^ can't be applied to `Bar`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
    |
-LL | #[const_trait] trait Bar: ~const Foo {}
+LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
 error[E0015]: cannot call non-const method `<T as Foo>::a` in constant functions
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr
index a5ef716a62a..c6a06d074c9 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr
@@ -1,51 +1,51 @@
-error: `~const` is not allowed here
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` is not allowed here
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
   --> $DIR/super-traits-fail-3.rs:23:1
    |
-LL | trait Bar: ~const Foo {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | trait Bar: [const] Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0658]: const trait impls are experimental
-  --> $DIR/super-traits-fail-3.rs:23:12
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^
    |
    = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: const trait impls are experimental
-  --> $DIR/super-traits-fail-3.rs:32:17
+  --> $DIR/super-traits-fail-3.rs:32:15
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |               ^^^^^^^^^
    |
    = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
 help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -53,11 +53,11 @@ help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -65,27 +65,27 @@ help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:32:17
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:32:15
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^ can't be applied to `Bar`
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |               ^^^^^^^^^ can't be applied to `Bar`
    |
 help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
    |
-LL | #[const_trait] trait Bar: ~const Foo {}
+LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:32:17
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:32:15
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^ can't be applied to `Bar`
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |               ^^^^^^^^^ can't be applied to `Bar`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
    |
-LL | #[const_trait] trait Bar: ~const Foo {}
+LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
 error[E0015]: cannot call non-const method `<T as Foo>::a` in constant functions
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr
index 024db4b6d68..feca029aa6c 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.nyn.stderr
@@ -1,18 +1,18 @@
 error[E0658]: const trait impls are experimental
-  --> $DIR/super-traits-fail-3.rs:23:12
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^
    |
    = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: const trait impls are experimental
-  --> $DIR/super-traits-fail-3.rs:32:17
+  --> $DIR/super-traits-fail-3.rs:32:15
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |               ^^^^^^^^^
    |
    = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr
index 024db4b6d68..feca029aa6c 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.nyy.stderr
@@ -1,18 +1,18 @@
 error[E0658]: const trait impls are experimental
-  --> $DIR/super-traits-fail-3.rs:23:12
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^
    |
    = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: const trait impls are experimental
-  --> $DIR/super-traits-fail-3.rs:32:17
+  --> $DIR/super-traits-fail-3.rs:32:15
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |               ^^^^^^^^^
    |
    = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.rs b/tests/ui/traits/const-traits/super-traits-fail-3.rs
index d7e0cdc26ed..5370f607dec 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.rs
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.rs
@@ -20,21 +20,21 @@ trait Foo {
 
 #[cfg_attr(any(yyy, yny, nyy, nyn), const_trait)]
 //[nyy,nyn]~^ ERROR: `const_trait` is a temporary placeholder for marking a trait that is suitable for `const` `impls` and all default bodies as `const`, which may be removed or renamed in the future
-trait Bar: ~const Foo {}
-//[yny,ynn,nny,nnn]~^ ERROR: `~const` can only be applied to `#[const_trait]`
-//[yny,ynn,nny,nnn]~| ERROR: `~const` can only be applied to `#[const_trait]`
-//[yny,ynn,nny,nnn]~| ERROR: `~const` can only be applied to `#[const_trait]`
-//[yny]~^^^^ ERROR: `~const` can only be applied to `#[const_trait]`
-//[yny]~| ERROR: `~const` can only be applied to `#[const_trait]`
-//[yyn,ynn,nny,nnn]~^^^^^^ ERROR: `~const` is not allowed here
+trait Bar: [const] Foo {}
+//[yny,ynn,nny,nnn]~^ ERROR: `[const]` can only be applied to `#[const_trait]`
+//[yny,ynn,nny,nnn]~| ERROR: `[const]` can only be applied to `#[const_trait]`
+//[yny,ynn,nny,nnn]~| ERROR: `[const]` can only be applied to `#[const_trait]`
+//[yny]~^^^^ ERROR: `[const]` can only be applied to `#[const_trait]`
+//[yny]~| ERROR: `[const]` can only be applied to `#[const_trait]`
+//[yyn,ynn,nny,nnn]~^^^^^^ ERROR: `[const]` is not allowed here
 //[nyy,nyn,nny,nnn]~^^^^^^^ ERROR: const trait impls are experimental
 
-const fn foo<T: ~const Bar>(x: &T) {
-    //[yyn,ynn,nny,nnn]~^ ERROR: `~const` can only be applied to `#[const_trait]`
-    //[yyn,ynn,nny,nnn]~| ERROR: `~const` can only be applied to `#[const_trait]`
+const fn foo<T: [const] Bar>(x: &T) {
+    //[yyn,ynn,nny,nnn]~^ ERROR: `[const]` can only be applied to `#[const_trait]`
+    //[yyn,ynn,nny,nnn]~| ERROR: `[const]` can only be applied to `#[const_trait]`
     //[nyy,nyn,nny,nnn]~^^^ ERROR: const trait impls are experimental
     x.a();
-    //[yyn]~^ ERROR: the trait bound `T: ~const Foo` is not satisfied
+    //[yyn]~^ ERROR: the trait bound `T: [const] Foo` is not satisfied
     //[ynn,yny,nny,nnn]~^^ ERROR: cannot call non-const method `<T as Foo>::a` in constant functions
     //[nyy,nyn]~^^^ ERROR: cannot call conditionally-const method `<T as Foo>::a` in constant functions
 }
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr
index f22bdd472e5..d9112c91776 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr
@@ -1,31 +1,31 @@
-error: `~const` is not allowed here
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` is not allowed here
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
   --> $DIR/super-traits-fail-3.rs:23:1
    |
-LL | trait Bar: ~const Foo {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | trait Bar: [const] Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -33,11 +33,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -45,27 +45,27 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:32:17
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:32:15
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^ can't be applied to `Bar`
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |               ^^^^^^^^^ can't be applied to `Bar`
    |
 help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
    |
-LL | #[const_trait] trait Bar: ~const Foo {}
+LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:32:17
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:32:15
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^ can't be applied to `Bar`
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |               ^^^^^^^^^ can't be applied to `Bar`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
    |
-LL | #[const_trait] trait Bar: ~const Foo {}
+LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
 error[E0015]: cannot call non-const method `<T as Foo>::a` in constant functions
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr
index 14b50815b8e..3520b61a81c 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr
@@ -1,19 +1,19 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -21,11 +21,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -33,11 +33,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
@@ -45,11 +45,11 @@ help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^ can't be applied to `Foo`
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr
index 3270611dace..d714118df62 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr
@@ -1,39 +1,39 @@
-error: `~const` is not allowed here
-  --> $DIR/super-traits-fail-3.rs:23:12
+error: `[const]` is not allowed here
+  --> $DIR/super-traits-fail-3.rs:23:10
    |
-LL | trait Bar: ~const Foo {}
-   |            ^^^^^^
+LL | trait Bar: [const] Foo {}
+   |          ^^^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
+note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
   --> $DIR/super-traits-fail-3.rs:23:1
    |
-LL | trait Bar: ~const Foo {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
+LL | trait Bar: [const] Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:32:17
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:32:15
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^ can't be applied to `Bar`
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |               ^^^^^^^^^ can't be applied to `Bar`
    |
 help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
    |
-LL | #[const_trait] trait Bar: ~const Foo {}
+LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:32:17
+error: `[const]` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:32:15
    |
-LL | const fn foo<T: ~const Bar>(x: &T) {
-   |                 ^^^^^^ can't be applied to `Bar`
+LL | const fn foo<T: [const] Bar>(x: &T) {
+   |               ^^^^^^^^^ can't be applied to `Bar`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
    |
-LL | #[const_trait] trait Bar: ~const Foo {}
+LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
-error[E0277]: the trait bound `T: ~const Foo` is not satisfied
+error[E0277]: the trait bound `T: [const] Foo` is not satisfied
   --> $DIR/super-traits-fail-3.rs:36:7
    |
 LL |     x.a();
diff --git a/tests/ui/traits/const-traits/super-traits-fail.rs b/tests/ui/traits/const-traits/super-traits-fail.rs
index 9fd6263118b..15e05be4d86 100644
--- a/tests/ui/traits/const-traits/super-traits-fail.rs
+++ b/tests/ui/traits/const-traits/super-traits-fail.rs
@@ -7,7 +7,7 @@ trait Foo {
     fn a(&self);
 }
 #[const_trait]
-trait Bar: ~const Foo {}
+trait Bar: [const] Foo {}
 
 struct S;
 impl Foo for S {
diff --git a/tests/ui/traits/const-traits/super-traits-fail.stderr b/tests/ui/traits/const-traits/super-traits-fail.stderr
index 1f453edf035..e19aa30cf95 100644
--- a/tests/ui/traits/const-traits/super-traits-fail.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `S: ~const Foo` is not satisfied
+error[E0277]: the trait bound `S: [const] Foo` is not satisfied
   --> $DIR/super-traits-fail.rs:17:20
    |
 LL | impl const Bar for S {}
diff --git a/tests/ui/traits/const-traits/super-traits.rs b/tests/ui/traits/const-traits/super-traits.rs
index 73ddc037cd7..b5fd985ae43 100644
--- a/tests/ui/traits/const-traits/super-traits.rs
+++ b/tests/ui/traits/const-traits/super-traits.rs
@@ -8,7 +8,7 @@ trait Foo {
 }
 
 #[const_trait]
-trait Bar: ~const Foo {}
+trait Bar: [const] Foo {}
 
 struct S;
 impl const Foo for S {
@@ -17,7 +17,7 @@ impl const Foo for S {
 
 impl const Bar for S {}
 
-const fn foo<T: ~const Bar>(t: &T) {
+const fn foo<T: [const] Bar>(t: &T) {
     t.a();
 }
 
diff --git a/tests/ui/traits/const-traits/syntactical-unstable.rs b/tests/ui/traits/const-traits/syntactical-unstable.rs
index e192e80fabd..5c542d327f1 100644
--- a/tests/ui/traits/const-traits/syntactical-unstable.rs
+++ b/tests/ui/traits/const-traits/syntactical-unstable.rs
@@ -1,6 +1,6 @@
 //@ aux-build:staged-api.rs
 
-// Ensure that we enforce const stability of traits in `~const`/`const` bounds.
+// Ensure that we enforce const stability of traits in `[const]`/`const` bounds.
 
 #![feature(const_trait_impl)]
 
@@ -10,19 +10,19 @@ extern crate staged_api;
 use staged_api::MyTrait;
 
 #[const_trait]
-trait Foo: ~const MyTrait {
+trait Foo: [const] MyTrait {
     //~^ ERROR use of unstable const library feature `unstable`
-    type Item: ~const MyTrait;
+    type Item: [const] MyTrait;
     //~^ ERROR use of unstable const library feature `unstable`
 }
 
-const fn where_clause<T>() where T: ~const MyTrait {}
+const fn where_clause<T>() where T: [const] MyTrait {}
 //~^ ERROR use of unstable const library feature `unstable`
 
-const fn nested<T>() where T: Deref<Target: ~const MyTrait> {}
+const fn nested<T>() where T: Deref<Target: [const] MyTrait> {}
 //~^ ERROR use of unstable const library feature `unstable`
 
-const fn rpit() -> impl ~const MyTrait { Local }
+const fn rpit() -> impl [const] MyTrait { Local }
 //~^ ERROR use of unstable const library feature `unstable`
 
 struct Local;
diff --git a/tests/ui/traits/const-traits/syntactical-unstable.stderr b/tests/ui/traits/const-traits/syntactical-unstable.stderr
index a2ce2f2b6e9..657773d9121 100644
--- a/tests/ui/traits/const-traits/syntactical-unstable.stderr
+++ b/tests/ui/traits/const-traits/syntactical-unstable.stderr
@@ -1,43 +1,43 @@
 error[E0658]: use of unstable const library feature `unstable`
-  --> $DIR/syntactical-unstable.rs:13:19
+  --> $DIR/syntactical-unstable.rs:13:20
    |
-LL | trait Foo: ~const MyTrait {
-   |            ------ ^^^^^^^
-   |            |
-   |            trait is not stable as const yet
+LL | trait Foo: [const] MyTrait {
+   |          --------- ^^^^^^^
+   |          |
+   |          trait is not stable as const yet
    |
    = help: add `#![feature(unstable)]` 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 const library feature `unstable`
-  --> $DIR/syntactical-unstable.rs:19:44
+  --> $DIR/syntactical-unstable.rs:19:45
    |
-LL | const fn where_clause<T>() where T: ~const MyTrait {}
-   |                                     ------ ^^^^^^^
-   |                                     |
-   |                                     trait is not stable as const yet
+LL | const fn where_clause<T>() where T: [const] MyTrait {}
+   |                                   --------- ^^^^^^^
+   |                                   |
+   |                                   trait is not stable as const yet
    |
    = help: add `#![feature(unstable)]` 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 const library feature `unstable`
-  --> $DIR/syntactical-unstable.rs:22:52
+  --> $DIR/syntactical-unstable.rs:22:53
    |
-LL | const fn nested<T>() where T: Deref<Target: ~const MyTrait> {}
-   |                                             ------ ^^^^^^^
-   |                                             |
-   |                                             trait is not stable as const yet
+LL | const fn nested<T>() where T: Deref<Target: [const] MyTrait> {}
+   |                                           --------- ^^^^^^^
+   |                                           |
+   |                                           trait is not stable as const yet
    |
    = help: add `#![feature(unstable)]` 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 const library feature `unstable`
-  --> $DIR/syntactical-unstable.rs:25:32
+  --> $DIR/syntactical-unstable.rs:25:33
    |
-LL | const fn rpit() -> impl ~const MyTrait { Local }
-   |                         ------ ^^^^^^^
-   |                         |
-   |                         trait is not stable as const yet
+LL | const fn rpit() -> impl [const] MyTrait { Local }
+   |                    ------------ ^^^^^^^
+   |                    |
+   |                    trait is not stable as const yet
    |
    = help: add `#![feature(unstable)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
@@ -52,12 +52,12 @@ LL | impl const MyTrait for Local {
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: use of unstable const library feature `unstable`
-  --> $DIR/syntactical-unstable.rs:15:23
+  --> $DIR/syntactical-unstable.rs:15:24
    |
-LL |     type Item: ~const MyTrait;
-   |                ------ ^^^^^^^
-   |                |
-   |                trait is not stable as const yet
+LL |     type Item: [const] MyTrait;
+   |              --------- ^^^^^^^
+   |              |
+   |              trait is not stable as const yet
    |
    = help: add `#![feature(unstable)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
diff --git a/tests/ui/traits/const-traits/syntax.rs b/tests/ui/traits/const-traits/syntax.rs
index cfac6e0a93e..b8e0f46e4f8 100644
--- a/tests/ui/traits/const-traits/syntax.rs
+++ b/tests/ui/traits/const-traits/syntax.rs
@@ -1,8 +1,9 @@
 //@ compile-flags: -Z parse-crate-root-only
-//@ check-pass
 
-#![feature(const_trait_bound_opt_out)]
 #![feature(const_trait_impl)]
 
-// For now, this parses since an error does not occur until AST lowering.
-impl ~const T {}
+// This is going down the slice/array parsing route
+impl [const] T {}
+//~^ ERROR: expected identifier, found `]`
+
+impl const T {}
diff --git a/tests/ui/traits/const-traits/syntax.stderr b/tests/ui/traits/const-traits/syntax.stderr
new file mode 100644
index 00000000000..2e9807866b0
--- /dev/null
+++ b/tests/ui/traits/const-traits/syntax.stderr
@@ -0,0 +1,8 @@
+error: expected identifier, found `]`
+  --> $DIR/syntax.rs:6:12
+   |
+LL | impl [const] T {}
+   |            ^ expected identifier
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/traits/const-traits/tilde-const-and-const-params.stderr b/tests/ui/traits/const-traits/tilde-const-and-const-params.stderr
deleted file mode 100644
index 95e684bd0c4..00000000000
--- a/tests/ui/traits/const-traits/tilde-const-and-const-params.stderr
+++ /dev/null
@@ -1,39 +0,0 @@
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-and-const-params.rs:8:15
-   |
-LL |     fn add<A: ~const Add42>(self) -> Foo<{ A::add(N) }> {
-   |               ^^^^^^
-   |
-note: this function is not `const`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-and-const-params.rs:8:8
-   |
-LL |     fn add<A: ~const Add42>(self) -> Foo<{ A::add(N) }> {
-   |        ^^^
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-and-const-params.rs:26:11
-   |
-LL | fn bar<A: ~const Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
-   |           ^^^^^^
-   |
-note: this function is not `const`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-and-const-params.rs:26:4
-   |
-LL | fn bar<A: ~const Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
-   |    ^^^
-
-error[E0277]: the trait bound `A: const Add42` is not satisfied
-  --> $DIR/tilde-const-and-const-params.rs:26:61
-   |
-LL | fn bar<A: ~const Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
-   |                                                             ^
-
-error[E0277]: the trait bound `A: const Add42` is not satisfied
-  --> $DIR/tilde-const-and-const-params.rs:8:44
-   |
-LL |     fn add<A: ~const Add42>(self) -> Foo<{ A::add(N) }> {
-   |                                            ^
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/tilde-const-invalid-places.rs b/tests/ui/traits/const-traits/tilde-const-invalid-places.rs
deleted file mode 100644
index 9d220686771..00000000000
--- a/tests/ui/traits/const-traits/tilde-const-invalid-places.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-#![feature(const_trait_impl)]
-
-#[const_trait]
-trait Trait {}
-
-// Regression test for issue #90052.
-fn non_const_function<T: ~const Trait>() {} //~ ERROR `~const` is not allowed
-
-struct Struct<T: ~const Trait> { field: T } //~ ERROR `~const` is not allowed here
-struct TupleStruct<T: ~const Trait>(T); //~ ERROR `~const` is not allowed here
-struct UnitStruct<T: ~const Trait>; //~ ERROR `~const` is not allowed here
-//~^ ERROR  parameter `T` is never used
-
-enum Enum<T: ~const Trait> { Variant(T) } //~ ERROR `~const` is not allowed here
-
-union Union<T: ~const Trait> { field: T } //~ ERROR `~const` is not allowed here
-//~^ ERROR field must implement `Copy`
-
-type Type<T: ~const Trait> = T; //~ ERROR `~const` is not allowed here
-
-const CONSTANT<T: ~const Trait>: () = (); //~ ERROR `~const` is not allowed here
-//~^ ERROR generic const items are experimental
-
-trait NonConstTrait {
-    type Type<T: ~const Trait>: ~const Trait;
-    //~^ ERROR `~const` is not allowed
-    //~| ERROR `~const` is not allowed
-    fn non_const_function<T: ~const Trait>(); //~ ERROR `~const` is not allowed
-    const CONSTANT<T: ~const Trait>: (); //~ ERROR `~const` is not allowed
-    //~^ ERROR generic const items are experimental
-}
-
-impl NonConstTrait for () {
-    type Type<T: ~const Trait> = (); //~ ERROR `~const` is not allowed
-    //~^ ERROR overflow evaluating the requirement `(): Trait`
-    fn non_const_function<T: ~const Trait>() {} //~ ERROR `~const` is not allowed
-    const CONSTANT<T: ~const Trait>: () = (); //~ ERROR `~const` is not allowed
-    //~^ ERROR generic const items are experimental
-}
-
-struct Implementor;
-
-impl Implementor {
-    type Type<T: ~const Trait> = (); //~ ERROR `~const` is not allowed
-    //~^ ERROR inherent associated types are unstable
-    fn non_const_function<T: ~const Trait>() {} //~ ERROR `~const` is not allowed
-    const CONSTANT<T: ~const Trait>: () = (); //~ ERROR `~const` is not allowed
-    //~^ ERROR generic const items are experimental
-}
-
-// non-const traits
-trait Child0: ~const Trait {} //~ ERROR `~const` is not allowed
-trait Child1 where Self: ~const Trait {} //~ ERROR `~const` is not allowed
-
-// non-const impl
-impl<T: ~const Trait> Trait for T {} //~ ERROR `~const` is not allowed
-
-// inherent impl (regression test for issue #117004)
-impl<T: ~const Trait> Struct<T> {} //~ ERROR `~const` is not allowed
-
-fn main() {}
diff --git a/tests/ui/traits/const-traits/tilde-const-invalid-places.stderr b/tests/ui/traits/const-traits/tilde-const-invalid-places.stderr
deleted file mode 100644
index 8151b9aaa23..00000000000
--- a/tests/ui/traits/const-traits/tilde-const-invalid-places.stderr
+++ /dev/null
@@ -1,310 +0,0 @@
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:7:26
-   |
-LL | fn non_const_function<T: ~const Trait>() {}
-   |                          ^^^^^^
-   |
-note: this function is not `const`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:7:4
-   |
-LL | fn non_const_function<T: ~const Trait>() {}
-   |    ^^^^^^^^^^^^^^^^^^
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:9:18
-   |
-LL | struct Struct<T: ~const Trait> { field: T }
-   |                  ^^^^^^
-   |
-   = note: this item cannot have `~const` trait bounds
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:10:23
-   |
-LL | struct TupleStruct<T: ~const Trait>(T);
-   |                       ^^^^^^
-   |
-   = note: this item cannot have `~const` trait bounds
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:11:22
-   |
-LL | struct UnitStruct<T: ~const Trait>;
-   |                      ^^^^^^
-   |
-   = note: this item cannot have `~const` trait bounds
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:14:14
-   |
-LL | enum Enum<T: ~const Trait> { Variant(T) }
-   |              ^^^^^^
-   |
-   = note: this item cannot have `~const` trait bounds
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:16:16
-   |
-LL | union Union<T: ~const Trait> { field: T }
-   |                ^^^^^^
-   |
-   = note: this item cannot have `~const` trait bounds
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:19:14
-   |
-LL | type Type<T: ~const Trait> = T;
-   |              ^^^^^^
-   |
-   = note: this item cannot have `~const` trait bounds
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:21:19
-   |
-LL | const CONSTANT<T: ~const Trait>: () = ();
-   |                   ^^^^^^
-   |
-   = note: this item cannot have `~const` trait bounds
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:25:18
-   |
-LL |     type Type<T: ~const Trait>: ~const Trait;
-   |                  ^^^^^^
-   |
-note: associated types in non-`#[const_trait]` traits cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:25:5
-   |
-LL |     type Type<T: ~const Trait>: ~const Trait;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:25:33
-   |
-LL |     type Type<T: ~const Trait>: ~const Trait;
-   |                                 ^^^^^^
-   |
-note: associated types in non-`#[const_trait]` traits cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:25:5
-   |
-LL |     type Type<T: ~const Trait>: ~const Trait;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:28:30
-   |
-LL |     fn non_const_function<T: ~const Trait>();
-   |                              ^^^^^^
-   |
-note: this function is not `const`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:28:8
-   |
-LL |     fn non_const_function<T: ~const Trait>();
-   |        ^^^^^^^^^^^^^^^^^^
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:29:23
-   |
-LL |     const CONSTANT<T: ~const Trait>: ();
-   |                       ^^^^^^
-   |
-   = note: this item cannot have `~const` trait bounds
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:34:18
-   |
-LL |     type Type<T: ~const Trait> = ();
-   |                  ^^^^^^
-   |
-note: associated types in non-const impls cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:34:5
-   |
-LL |     type Type<T: ~const Trait> = ();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:36:30
-   |
-LL |     fn non_const_function<T: ~const Trait>() {}
-   |                              ^^^^^^
-   |
-note: this function is not `const`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:36:8
-   |
-LL |     fn non_const_function<T: ~const Trait>() {}
-   |        ^^^^^^^^^^^^^^^^^^
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:37:23
-   |
-LL |     const CONSTANT<T: ~const Trait>: () = ();
-   |                       ^^^^^^
-   |
-   = note: this item cannot have `~const` trait bounds
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:44:18
-   |
-LL |     type Type<T: ~const Trait> = ();
-   |                  ^^^^^^
-   |
-note: inherent associated types cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:44:5
-   |
-LL |     type Type<T: ~const Trait> = ();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:46:30
-   |
-LL |     fn non_const_function<T: ~const Trait>() {}
-   |                              ^^^^^^
-   |
-note: this function is not `const`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:46:8
-   |
-LL |     fn non_const_function<T: ~const Trait>() {}
-   |        ^^^^^^^^^^^^^^^^^^
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:47:23
-   |
-LL |     const CONSTANT<T: ~const Trait>: () = ();
-   |                       ^^^^^^
-   |
-   = note: this item cannot have `~const` trait bounds
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:52:15
-   |
-LL | trait Child0: ~const Trait {}
-   |               ^^^^^^
-   |
-note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:52:1
-   |
-LL | trait Child0: ~const Trait {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:53:26
-   |
-LL | trait Child1 where Self: ~const Trait {}
-   |                          ^^^^^^
-   |
-note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:53:1
-   |
-LL | trait Child1 where Self: ~const Trait {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:56:9
-   |
-LL | impl<T: ~const Trait> Trait for T {}
-   |         ^^^^^^
-   |
-note: this impl is not `const`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:56:1
-   |
-LL | impl<T: ~const Trait> Trait for T {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:59:9
-   |
-LL | impl<T: ~const Trait> Struct<T> {}
-   |         ^^^^^^
-   |
-note: inherent impls cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:59:1
-   |
-LL | impl<T: ~const Trait> Struct<T> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0658]: generic const items are experimental
-  --> $DIR/tilde-const-invalid-places.rs:21:15
-   |
-LL | const CONSTANT<T: ~const Trait>: () = ();
-   |               ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
-   = help: add `#![feature(generic_const_items)]` 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]: generic const items are experimental
-  --> $DIR/tilde-const-invalid-places.rs:29:19
-   |
-LL |     const CONSTANT<T: ~const Trait>: ();
-   |                   ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
-   = help: add `#![feature(generic_const_items)]` 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]: generic const items are experimental
-  --> $DIR/tilde-const-invalid-places.rs:37:19
-   |
-LL |     const CONSTANT<T: ~const Trait>: () = ();
-   |                   ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
-   = help: add `#![feature(generic_const_items)]` 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]: generic const items are experimental
-  --> $DIR/tilde-const-invalid-places.rs:47:19
-   |
-LL |     const CONSTANT<T: ~const Trait>: () = ();
-   |                   ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #113521 <https://github.com/rust-lang/rust/issues/113521> for more information
-   = help: add `#![feature(generic_const_items)]` 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[E0392]: type parameter `T` is never used
-  --> $DIR/tilde-const-invalid-places.rs:11:19
-   |
-LL | struct UnitStruct<T: ~const Trait>;
-   |                   ^ unused type parameter
-   |
-   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
-
-error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/tilde-const-invalid-places.rs:16:32
-   |
-LL | union Union<T: ~const Trait> { field: T }
-   |                                ^^^^^^^^
-   |
-   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
-help: wrap the field type in `ManuallyDrop<...>`
-   |
-LL | union Union<T: ~const Trait> { field: std::mem::ManuallyDrop<T> }
-   |                                       +++++++++++++++++++++++ +
-
-error[E0275]: overflow evaluating the requirement `(): Trait`
-  --> $DIR/tilde-const-invalid-places.rs:34:34
-   |
-LL |     type Type<T: ~const Trait> = ();
-   |                                  ^^
-   |
-note: required by a bound in `NonConstTrait::Type`
-  --> $DIR/tilde-const-invalid-places.rs:25:33
-   |
-LL |     type Type<T: ~const Trait>: ~const Trait;
-   |                                 ^^^^^^^^^^^^ required by this bound in `NonConstTrait::Type`
-
-error[E0658]: inherent associated types are unstable
-  --> $DIR/tilde-const-invalid-places.rs:44:5
-   |
-LL |     type Type<T: ~const Trait> = ();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
-   = help: add `#![feature(inherent_associated_types)]` 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 30 previous errors
-
-Some errors have detailed explanations: E0275, E0392, E0658, E0740.
-For more information about an error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/const-traits/tilde-const-syntax.rs b/tests/ui/traits/const-traits/tilde-const-syntax.rs
deleted file mode 100644
index f9944c426cc..00000000000
--- a/tests/ui/traits/const-traits/tilde-const-syntax.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-//@ compile-flags: -Z parse-crate-root-only
-//@ check-pass
-
-#![feature(const_trait_impl)]
-
-struct S<
-    T: for<'a> ~const Tr<'a> + 'static + ~const std::ops::Add,
-    T: for<'a: 'b> ~const m::Trait<'a>,
->;
diff --git a/tests/ui/traits/const-traits/tilde-twice.stderr b/tests/ui/traits/const-traits/tilde-twice.stderr
deleted file mode 100644
index a809736a4f8..00000000000
--- a/tests/ui/traits/const-traits/tilde-twice.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: expected identifier, found `~`
-  --> $DIR/tilde-twice.rs:5:20
-   |
-LL | struct S<T: ~const ~const Tr>;
-   |                    ^ expected identifier
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/traits/const-traits/trait-where-clause-const.rs b/tests/ui/traits/const-traits/trait-where-clause-const.rs
index 6f281ca5718..ccb514086cc 100644
--- a/tests/ui/traits/const-traits/trait-where-clause-const.rs
+++ b/tests/ui/traits/const-traits/trait-where-clause-const.rs
@@ -12,11 +12,11 @@ trait Bar {}
 #[const_trait]
 trait Foo {
     fn a();
-    fn b() where Self: ~const Bar;
-    fn c<T: ~const Bar>();
+    fn b() where Self: [const] Bar;
+    fn c<T: [const] Bar>();
 }
 
-const fn test1<T: ~const Foo + Bar>() {
+const fn test1<T: [const] Foo + Bar>() {
     T::a();
     T::b();
     //~^ ERROR the trait bound
@@ -24,7 +24,7 @@ const fn test1<T: ~const Foo + Bar>() {
     //~^ ERROR the trait bound
 }
 
-const fn test2<T: ~const Foo + ~const Bar>() {
+const fn test2<T: [const] Foo + [const] Bar>() {
     T::a();
     T::b();
     T::c::<T>();
diff --git a/tests/ui/traits/const-traits/trait-where-clause-const.stderr b/tests/ui/traits/const-traits/trait-where-clause-const.stderr
index 4ebd7b9757f..71f9bdff878 100644
--- a/tests/ui/traits/const-traits/trait-where-clause-const.stderr
+++ b/tests/ui/traits/const-traits/trait-where-clause-const.stderr
@@ -1,4 +1,4 @@
-error[E0277]: the trait bound `T: ~const Bar` is not satisfied
+error[E0277]: the trait bound `T: [const] Bar` is not satisfied
   --> $DIR/trait-where-clause-const.rs:21:5
    |
 LL |     T::b();
@@ -7,10 +7,10 @@ LL |     T::b();
 note: required by a bound in `Foo::b`
   --> $DIR/trait-where-clause-const.rs:15:24
    |
-LL |     fn b() where Self: ~const Bar;
-   |                        ^^^^^^^^^^ required by this bound in `Foo::b`
+LL |     fn b() where Self: [const] Bar;
+   |                        ^^^^^^^^^^^ required by this bound in `Foo::b`
 
-error[E0277]: the trait bound `T: ~const Bar` is not satisfied
+error[E0277]: the trait bound `T: [const] Bar` is not satisfied
   --> $DIR/trait-where-clause-const.rs:23:12
    |
 LL |     T::c::<T>();
@@ -19,8 +19,8 @@ LL |     T::c::<T>();
 note: required by a bound in `Foo::c`
   --> $DIR/trait-where-clause-const.rs:16:13
    |
-LL |     fn c<T: ~const Bar>();
-   |             ^^^^^^^^^^ required by this bound in `Foo::c`
+LL |     fn c<T: [const] Bar>();
+   |             ^^^^^^^^^^^ required by this bound in `Foo::c`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/traits/const-traits/trait-where-clause-run.rs b/tests/ui/traits/const-traits/trait-where-clause-run.rs
index 2582a69acab..c40f071f457 100644
--- a/tests/ui/traits/const-traits/trait-where-clause-run.rs
+++ b/tests/ui/traits/const-traits/trait-where-clause-run.rs
@@ -10,7 +10,7 @@ trait Bar {
 
 #[const_trait]
 trait Foo {
-    fn foo() -> u8 where Self: ~const Bar {
+    fn foo() -> u8 where Self: [const] Bar {
         <Self as Bar>::bar() * 6
     }
 }
diff --git a/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs b/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs
index b6ac574a4fc..3a5350cd4ea 100644
--- a/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs
+++ b/tests/ui/traits/const-traits/trait-where-clause-self-referential.rs
@@ -4,7 +4,7 @@
 
 #[const_trait]
 trait Foo {
-    fn bar() where Self: ~const Foo;
+    fn bar() where Self: [const] Foo;
 }
 
 struct S;
@@ -17,7 +17,7 @@ fn baz<T: Foo>() {
     T::bar();
 }
 
-const fn qux<T: ~const Foo>() {
+const fn qux<T: [const] Foo>() {
     T::bar();
 }
 
diff --git a/tests/ui/traits/const-traits/trait-where-clause.rs b/tests/ui/traits/const-traits/trait-where-clause.rs
index 11f353f3f8a..6aebab79090 100644
--- a/tests/ui/traits/const-traits/trait-where-clause.rs
+++ b/tests/ui/traits/const-traits/trait-where-clause.rs
@@ -5,10 +5,10 @@ trait Bar {}
 
 trait Foo {
     fn a();
-    fn b() where Self: ~const Bar;
-    //~^ ERROR `~const` is not allowed here
-    fn c<T: ~const Bar>();
-    //~^ ERROR `~const` is not allowed here
+    fn b() where Self: [const] Bar;
+    //~^ ERROR `[const]` is not allowed here
+    fn c<T: [const] Bar>();
+    //~^ ERROR `[const]` is not allowed here
 }
 
 fn test1<T: Foo>() {
diff --git a/tests/ui/traits/const-traits/trait-where-clause.stderr b/tests/ui/traits/const-traits/trait-where-clause.stderr
index 3a15cc63f32..04c67903ef5 100644
--- a/tests/ui/traits/const-traits/trait-where-clause.stderr
+++ b/tests/ui/traits/const-traits/trait-where-clause.stderr
@@ -1,25 +1,25 @@
-error: `~const` is not allowed here
-  --> $DIR/trait-where-clause.rs:8:24
+error: `[const]` is not allowed here
+  --> $DIR/trait-where-clause.rs:8:22
    |
-LL |     fn b() where Self: ~const Bar;
-   |                        ^^^^^^
+LL |     fn b() where Self: [const] Bar;
+   |                      ^^^^^^^^^
    |
-note: this function is not `const`, so it cannot have `~const` trait bounds
+note: this function is not `const`, so it cannot have `[const]` trait bounds
   --> $DIR/trait-where-clause.rs:8:8
    |
-LL |     fn b() where Self: ~const Bar;
+LL |     fn b() where Self: [const] Bar;
    |        ^
 
-error: `~const` is not allowed here
-  --> $DIR/trait-where-clause.rs:10:13
+error: `[const]` is not allowed here
+  --> $DIR/trait-where-clause.rs:10:11
    |
-LL |     fn c<T: ~const Bar>();
-   |             ^^^^^^
+LL |     fn c<T: [const] Bar>();
+   |           ^^^^^^^^^
    |
-note: this function is not `const`, so it cannot have `~const` trait bounds
+note: this function is not `const`, so it cannot have `[const]` trait bounds
   --> $DIR/trait-where-clause.rs:10:8
    |
-LL |     fn c<T: ~const Bar>();
+LL |     fn c<T: [const] Bar>();
    |        ^
 
 error[E0277]: the trait bound `T: Bar` is not satisfied
@@ -31,8 +31,8 @@ LL |     T::b();
 note: required by a bound in `Foo::b`
   --> $DIR/trait-where-clause.rs:8:24
    |
-LL |     fn b() where Self: ~const Bar;
-   |                        ^^^^^^^^^^ required by this bound in `Foo::b`
+LL |     fn b() where Self: [const] Bar;
+   |                        ^^^^^^^^^^^ required by this bound in `Foo::b`
 help: consider further restricting type parameter `T` with trait `Bar`
    |
 LL | fn test1<T: Foo + Bar>() {
@@ -47,8 +47,8 @@ LL |     T::c::<T>();
 note: required by a bound in `Foo::c`
   --> $DIR/trait-where-clause.rs:10:13
    |
-LL |     fn c<T: ~const Bar>();
-   |             ^^^^^^^^^^ required by this bound in `Foo::c`
+LL |     fn c<T: [const] Bar>();
+   |             ^^^^^^^^^^^ required by this bound in `Foo::c`
 help: consider further restricting type parameter `T` with trait `Bar`
    |
 LL | fn test1<T: Foo + Bar>() {
diff --git a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs
index 6d19ef771af..c82b4427500 100644
--- a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs
+++ b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.rs
@@ -29,5 +29,5 @@ struct Container<const N: u32>;
 fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
 
 // FIXME(const_trait_impl): Instead of suggesting `+ const Trait`, suggest
-//                 changing `~const Trait` to `const Trait`.
-const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
+//                 changing `[const] Trait` to `const Trait`.
+const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
diff --git a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr
index 03e26615d7e..3ed6dc69d0b 100644
--- a/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr
+++ b/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr
@@ -64,74 +64,74 @@ LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
    |                                   ^^^^^^^^^^^^^
    = note: ...which again requires evaluating type-level constant, completing the cycle
 note: cycle used when checking that `accept0` is well-formed
-  --> $DIR/unsatisfied-const-trait-bound.rs:29:1
+  --> $DIR/unsatisfied-const-trait-bound.rs:29:35
    |
 LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                   ^^^^^^^^^^^^^
    = 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[E0391]: cycle detected when caching mir of `accept1::{constant#0}` for CTFE
-  --> $DIR/unsatisfied-const-trait-bound.rs:33:48
+  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
    |
-LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                ^^^^^^^^^^^^^
+LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
+   |                                                 ^^^^^^^^^^^^^
    |
 note: ...which requires elaborating drops for `accept1::{constant#0}`...
-  --> $DIR/unsatisfied-const-trait-bound.rs:33:48
+  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
    |
-LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                ^^^^^^^^^^^^^
+LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
+   |                                                 ^^^^^^^^^^^^^
 note: ...which requires borrow-checking `accept1::{constant#0}`...
-  --> $DIR/unsatisfied-const-trait-bound.rs:33:48
+  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
    |
-LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                ^^^^^^^^^^^^^
+LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
+   |                                                 ^^^^^^^^^^^^^
 note: ...which requires promoting constants in MIR for `accept1::{constant#0}`...
-  --> $DIR/unsatisfied-const-trait-bound.rs:33:48
+  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
    |
-LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                ^^^^^^^^^^^^^
+LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
+   |                                                 ^^^^^^^^^^^^^
 note: ...which requires const checking `accept1::{constant#0}`...
-  --> $DIR/unsatisfied-const-trait-bound.rs:33:48
+  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
    |
-LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                ^^^^^^^^^^^^^
+LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
+   |                                                 ^^^^^^^^^^^^^
 note: ...which requires building MIR for `accept1::{constant#0}`...
-  --> $DIR/unsatisfied-const-trait-bound.rs:33:48
+  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
    |
-LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                ^^^^^^^^^^^^^
+LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
+   |                                                 ^^^^^^^^^^^^^
 note: ...which requires building an abstract representation for `accept1::{constant#0}`...
-  --> $DIR/unsatisfied-const-trait-bound.rs:33:48
+  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
    |
-LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                ^^^^^^^^^^^^^
+LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
+   |                                                 ^^^^^^^^^^^^^
 note: ...which requires building THIR for `accept1::{constant#0}`...
-  --> $DIR/unsatisfied-const-trait-bound.rs:33:48
+  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
    |
-LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                ^^^^^^^^^^^^^
+LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
+   |                                                 ^^^^^^^^^^^^^
 note: ...which requires type-checking `accept1::{constant#0}`...
-  --> $DIR/unsatisfied-const-trait-bound.rs:33:48
+  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
    |
-LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                ^^^^^^^^^^^^^
+LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
+   |                                                 ^^^^^^^^^^^^^
 note: ...which requires evaluating type-level constant...
-  --> $DIR/unsatisfied-const-trait-bound.rs:33:48
+  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
    |
-LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                ^^^^^^^^^^^^^
+LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
+   |                                                 ^^^^^^^^^^^^^
 note: ...which requires const-evaluating + checking `accept1::{constant#0}`...
-  --> $DIR/unsatisfied-const-trait-bound.rs:33:48
+  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
    |
-LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                ^^^^^^^^^^^^^
+LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
+   |                                                 ^^^^^^^^^^^^^
    = note: ...which again requires caching mir of `accept1::{constant#0}` for CTFE, completing the cycle
 note: cycle used when const-evaluating + checking `accept1::{constant#0}`
-  --> $DIR/unsatisfied-const-trait-bound.rs:33:48
+  --> $DIR/unsatisfied-const-trait-bound.rs:33:49
    |
-LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                ^^^^^^^^^^^^^
+LL | const fn accept1<T: [const] Trait>(_: Container<{ T::make() }>) {}
+   |                                                 ^^^^^^^^^^^^^
    = 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: aborting due to 3 previous errors
diff --git a/tests/ui/traits/next-solver/coherence/coherence-fulfill-overflow.rs b/tests/ui/traits/next-solver/coherence/coherence-fulfill-overflow.rs
index ff577da32c2..3fd22c7dbf0 100644
--- a/tests/ui/traits/next-solver/coherence/coherence-fulfill-overflow.rs
+++ b/tests/ui/traits/next-solver/coherence/coherence-fulfill-overflow.rs
@@ -1,15 +1,17 @@
 //@ compile-flags: -Znext-solver=coherence
 
+#![feature(rustc_attrs)]
+#![rustc_no_implicit_bounds]
 #![recursion_limit = "10"]
 
 trait Trait {}
 
-struct W<T: ?Sized>(*const T);
+struct W<T>(*const T);
 trait TwoW {}
-impl<T: ?Sized + TwoW> TwoW for W<W<T>> {}
+impl<T: TwoW> TwoW for W<W<T>> {}
 
-impl<T: ?Sized + TwoW> Trait for W<T> {}
-impl<T: ?Sized + TwoW> Trait for T {}
+impl<T: TwoW> Trait for W<T> {}
+impl<T: TwoW> Trait for T {}
 //~^ ERROR conflicting implementations of trait `Trait` for type `W
 
 fn main() {}
diff --git a/tests/ui/traits/next-solver/coherence/coherence-fulfill-overflow.stderr b/tests/ui/traits/next-solver/coherence/coherence-fulfill-overflow.stderr
index 7d39c82d22f..1827533a84d 100644
--- a/tests/ui/traits/next-solver/coherence/coherence-fulfill-overflow.stderr
+++ b/tests/ui/traits/next-solver/coherence/coherence-fulfill-overflow.stderr
@@ -1,10 +1,10 @@
 error[E0119]: conflicting implementations of trait `Trait` for type `W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<_>>>>>>>>>>>>>>>>>>>>>>>`
-  --> $DIR/coherence-fulfill-overflow.rs:12:1
+  --> $DIR/coherence-fulfill-overflow.rs:14:1
    |
-LL | impl<T: ?Sized + TwoW> Trait for W<T> {}
-   | ------------------------------------- first implementation here
-LL | impl<T: ?Sized + TwoW> Trait for T {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<_>>>>>>>>>>>>>>>>>>>>>>>`
+LL | impl<T: TwoW> Trait for W<T> {}
+   | ---------------------------- first implementation here
+LL | impl<T: TwoW> Trait for T {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<_>>>>>>>>>>>>>>>>>>>>>>>`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs
index 920f8add507..9da79f7ac83 100644
--- a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs
+++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs
@@ -1,6 +1,7 @@
 //@ revisions: with without
 //@ compile-flags: -Znext-solver
 #![feature(rustc_attrs)]
+#![rustc_no_implicit_bounds]
 
 // This test is incredibly subtle. At its core the goal is to get a coinductive cycle,
 // which, depending on its root goal, either holds or errors. We achieve this by getting
@@ -17,20 +18,20 @@
 // test for that.
 
 #[rustc_coinductive]
-trait Trait<T: ?Sized, V: ?Sized, D: ?Sized> {}
-struct A<T: ?Sized>(*const T);
-struct B<T: ?Sized>(*const T);
+trait Trait<T, V, D> {}
+struct A<T>(*const T);
+struct B<T>(*const T);
 
-trait IncompleteGuidance<T: ?Sized, V: ?Sized> {}
-impl<T: ?Sized, U: ?Sized + 'static> IncompleteGuidance<U, u8> for T {}
-impl<T: ?Sized, U: ?Sized + 'static> IncompleteGuidance<U, i8> for T {}
-impl<T: ?Sized, U: ?Sized + 'static> IncompleteGuidance<U, i16> for T {}
+trait IncompleteGuidance<T, V> {}
+impl<T, U: 'static> IncompleteGuidance<U, u8> for T {}
+impl<T, U: 'static> IncompleteGuidance<U, i8> for T {}
+impl<T, U: 'static> IncompleteGuidance<U, i16> for T {}
 
-trait ImplGuidance<T: ?Sized, V: ?Sized> {}
-impl<T: ?Sized> ImplGuidance<u32, u8> for T {}
-impl<T: ?Sized> ImplGuidance<i32, i8> for T {}
+trait ImplGuidance<T, V> {}
+impl<T> ImplGuidance<u32, u8> for T {}
+impl<T> ImplGuidance<i32, i8> for T {}
 
-impl<T: ?Sized, U: ?Sized, V: ?Sized, D: ?Sized> Trait<U, V, D> for A<T>
+impl<T, U, V, D> Trait<U, V, D> for A<T>
 where
     T: IncompleteGuidance<U, V>,
     A<T>: Trait<U, D, V>,
@@ -39,17 +40,17 @@ where
 {
 }
 
-trait ToU8<T: ?Sized> {}
+trait ToU8<T> {}
 impl ToU8<u8> for () {}
 
-impl<T: ?Sized, U: ?Sized, V: ?Sized, D: ?Sized> Trait<U, V, D> for B<T>
+impl<T, U, V, D> Trait<U, V, D> for B<T>
 where
     T: ImplGuidance<U, V>,
     A<T>: Trait<U, V, D>,
 {
 }
 
-fn impls_trait<T: ?Sized + Trait<U, V, D>, U: ?Sized, V: ?Sized, D: ?Sized>() {}
+fn impls_trait<T: Trait<U, V, D>, U, V, D>() {}
 
 fn with_bound<X>()
 where
diff --git a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.with.stderr b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.with.stderr
index 9114bcadac0..d27104de541 100644
--- a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.with.stderr
+++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.with.stderr
@@ -1,25 +1,25 @@
 error[E0277]: the trait bound `A<X>: Trait<_, _, _>` is not satisfied
-  --> $DIR/incompleteness-unstable-result.rs:65:19
+  --> $DIR/incompleteness-unstable-result.rs:66:19
    |
 LL |     impls_trait::<A<X>, _, _, _>();
    |                   ^^^^ the trait `Trait<_, _, _>` is not implemented for `A<X>`
    |
    = help: the trait `Trait<U, V, D>` is implemented for `A<T>`
 note: required for `A<X>` to implement `Trait<_, _, _>`
-  --> $DIR/incompleteness-unstable-result.rs:33:50
+  --> $DIR/incompleteness-unstable-result.rs:34:18
    |
-LL | impl<T: ?Sized, U: ?Sized, V: ?Sized, D: ?Sized> Trait<U, V, D> for A<T>
-   |                                                  ^^^^^^^^^^^^^^     ^^^^
+LL | impl<T, U, V, D> Trait<U, V, D> for A<T>
+   |                  ^^^^^^^^^^^^^^     ^^^^
 ...
 LL |     A<T>: Trait<U, D, V>,
    |           -------------- unsatisfied trait bound introduced here
    = note: 8 redundant requirements hidden
    = note: required for `A<X>` to implement `Trait<_, _, _>`
 note: required by a bound in `impls_trait`
-  --> $DIR/incompleteness-unstable-result.rs:52:28
+  --> $DIR/incompleteness-unstable-result.rs:53:19
    |
-LL | fn impls_trait<T: ?Sized + Trait<U, V, D>, U: ?Sized, V: ?Sized, D: ?Sized>() {}
-   |                            ^^^^^^^^^^^^^^ required by this bound in `impls_trait`
+LL | fn impls_trait<T: Trait<U, V, D>, U, V, D>() {}
+   |                   ^^^^^^^^^^^^^^ required by this bound in `impls_trait`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.without.stderr b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.without.stderr
index 9114bcadac0..d27104de541 100644
--- a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.without.stderr
+++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.without.stderr
@@ -1,25 +1,25 @@
 error[E0277]: the trait bound `A<X>: Trait<_, _, _>` is not satisfied
-  --> $DIR/incompleteness-unstable-result.rs:65:19
+  --> $DIR/incompleteness-unstable-result.rs:66:19
    |
 LL |     impls_trait::<A<X>, _, _, _>();
    |                   ^^^^ the trait `Trait<_, _, _>` is not implemented for `A<X>`
    |
    = help: the trait `Trait<U, V, D>` is implemented for `A<T>`
 note: required for `A<X>` to implement `Trait<_, _, _>`
-  --> $DIR/incompleteness-unstable-result.rs:33:50
+  --> $DIR/incompleteness-unstable-result.rs:34:18
    |
-LL | impl<T: ?Sized, U: ?Sized, V: ?Sized, D: ?Sized> Trait<U, V, D> for A<T>
-   |                                                  ^^^^^^^^^^^^^^     ^^^^
+LL | impl<T, U, V, D> Trait<U, V, D> for A<T>
+   |                  ^^^^^^^^^^^^^^     ^^^^
 ...
 LL |     A<T>: Trait<U, D, V>,
    |           -------------- unsatisfied trait bound introduced here
    = note: 8 redundant requirements hidden
    = note: required for `A<X>` to implement `Trait<_, _, _>`
 note: required by a bound in `impls_trait`
-  --> $DIR/incompleteness-unstable-result.rs:52:28
+  --> $DIR/incompleteness-unstable-result.rs:53:19
    |
-LL | fn impls_trait<T: ?Sized + Trait<U, V, D>, U: ?Sized, V: ?Sized, D: ?Sized>() {}
-   |                            ^^^^^^^^^^^^^^ required by this bound in `impls_trait`
+LL | fn impls_trait<T: Trait<U, V, D>, U, V, D>() {}
+   |                   ^^^^^^^^^^^^^^ required by this bound in `impls_trait`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs
index f7ed0e100c4..326d888a55f 100644
--- a/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs
+++ b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs
@@ -1,23 +1,24 @@
 //@ compile-flags: -Znext-solver
 #![feature(rustc_attrs)]
+#![rustc_no_implicit_bounds]
 
 // Check that we correctly rerun the trait solver for heads of cycles,
 // even if they are not the root.
 
-struct A<T: ?Sized>(*const T);
-struct B<T: ?Sized>(*const T);
-struct C<T: ?Sized>(*const T);
+struct A<T>(*const T);
+struct B<T>(*const T);
+struct C<T>(*const T);
 
 #[rustc_coinductive]
 trait Trait<'a, 'b> {}
 trait NotImplemented {}
 
-impl<'a, 'b, T: ?Sized> Trait<'a, 'b> for A<T> where B<T>: Trait<'a, 'b> {}
+impl<'a, 'b, T> Trait<'a, 'b> for A<T> where B<T>: Trait<'a, 'b> {}
 
 // With this the root of `B<T>` is `A<T>`, even if the other impl does
 // not have a cycle with `A<T>`. This candidate never applies because of
 // the `A<T>: NotImplemented` bound.
-impl<'a, 'b, T: ?Sized> Trait<'a, 'b> for B<T>
+impl<'a, 'b, T> Trait<'a, 'b> for B<T>
 where
     A<T>: Trait<'a, 'b>,
     A<T>: NotImplemented,
@@ -31,7 +32,7 @@ where
 // use the impl itself to prove that adds region constraints as we uniquified the
 // regions in the `A<T>: Trait<'a, 'b>` where-bound. As both the impl above
 // and the impl below now apply with some constraints, we failed with ambiguity.
-impl<'a, 'b, T: ?Sized> Trait<'a, 'b> for B<T>
+impl<'a, 'b, T> Trait<'a, 'b> for B<T>
 where
     A<T>: NotImplemented,
 {}
@@ -40,7 +41,7 @@ where
 //
 // Because of the coinductive cycle through `C<T>` it also requires
 // 'a to be 'static.
-impl<'a, T: ?Sized> Trait<'a, 'static> for B<T>
+impl<'a, T> Trait<'a, 'static> for B<T>
 where
     C<T>: Trait<'a, 'a>,
 {}
@@ -48,14 +49,14 @@ where
 // In the first iteration of `B<T>: Trait<'a, 'b>` we don't add any
 // constraints here, only after setting the provisional result to require
 // `'b == 'static` do we also add that constraint for `'a`.
-impl<'a, 'b, T: ?Sized> Trait<'a, 'b> for C<T>
+impl<'a, 'b, T> Trait<'a, 'b> for C<T>
 where
     B<T>: Trait<'a, 'b>,
 {}
 
-fn impls_trait<'a, 'b, T: Trait<'a, 'b> + ?Sized>() {}
+fn impls_trait<'a, 'b, T: Trait<'a, 'b>>() {}
 
-fn check<'a, T: ?Sized>() {
+fn check<'a, T>() {
     impls_trait::<'a, 'static, A<T>>();
     //~^ ERROR lifetime may not live long enough
 }
diff --git a/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr
index 0cbd9654044..c88081736f3 100644
--- a/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr
+++ b/tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.stderr
@@ -1,7 +1,7 @@
 error: lifetime may not live long enough
-  --> $DIR/fixpoint-rerun-all-cycle-heads.rs:59:5
+  --> $DIR/fixpoint-rerun-all-cycle-heads.rs:60:5
    |
-LL | fn check<'a, T: ?Sized>() {
+LL | fn check<'a, T>() {
    |          -- lifetime `'a` defined here
 LL |     impls_trait::<'a, 'static, A<T>>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
diff --git a/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs
index 9cbcc5a3cdf..12feb1e2771 100644
--- a/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs
+++ b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.rs
@@ -1,4 +1,6 @@
 //@ compile-flags: -Znext-solver
+#![feature(rustc_attrs)]
+#![rustc_no_implicit_bounds]
 
 // This currently hangs if we do not erase constraints from
 // overflow.
@@ -17,9 +19,9 @@
 // the solver to hang without hitting the recursion limit.
 trait Trait {}
 
-struct W<T: ?Sized>(*const T);
+struct W<T>(*const T);
 
-impl<T: ?Sized> Trait for W<W<T>>
+impl<T> Trait for W<W<T>>
 where
     W<T>: Trait,
     W<T>: Trait,
diff --git a/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr
index a2a5c028cf8..5ba3c511c17 100644
--- a/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr
+++ b/tests/ui/traits/next-solver/cycles/inductive-fixpoint-hang.stderr
@@ -1,11 +1,11 @@
 error[E0275]: overflow evaluating the requirement `W<_>: Trait`
-  --> $DIR/inductive-fixpoint-hang.rs:31:19
+  --> $DIR/inductive-fixpoint-hang.rs:33:19
    |
 LL |     impls_trait::<W<_>>();
    |                   ^^^^
    |
 note: required by a bound in `impls_trait`
-  --> $DIR/inductive-fixpoint-hang.rs:28:19
+  --> $DIR/inductive-fixpoint-hang.rs:30:19
    |
 LL | fn impls_trait<T: Trait>() {}
    |                   ^^^^^ required by this bound in `impls_trait`
diff --git a/tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs b/tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs
index b005b909aed..88a1196b7e5 100644
--- a/tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs
+++ b/tests/ui/traits/next-solver/cycles/provisional-cache-impacts-behavior.rs
@@ -1,6 +1,7 @@
 //@ compile-flags: -Znext-solver
 //@ check-pass
 #![feature(rustc_attrs)]
+#![rustc_no_implicit_bounds]
 
 // A test showcasing that using a provisional cache can differ
 // from only tracking stack entries.
@@ -59,9 +60,9 @@ trait B {}
 #[rustc_coinductive]
 trait C {}
 
-impl<T: ?Sized + B + C> A for T {}
-impl<T: ?Sized + A + C> B for T {}
-impl<T: ?Sized + B> C for T {}
+impl<T: B + C> A for T {}
+impl<T: A + C> B for T {}
+impl<T: B> C for T {}
 
 fn impls_a<T: A>() {}
 
diff --git a/tests/ui/traits/next-solver/dont-canonicalize-re-error.rs b/tests/ui/traits/next-solver/dont-canonicalize-re-error.rs
index 57f814bc81e..a2ed73b2c86 100644
--- a/tests/ui/traits/next-solver/dont-canonicalize-re-error.rs
+++ b/tests/ui/traits/next-solver/dont-canonicalize-re-error.rs
@@ -1,4 +1,6 @@
 //@ compile-flags: -Znext-solver
+#![feature(rustc_attrs)]
+#![rustc_no_implicit_bounds]
 
 trait Tr<'a> {}
 
@@ -16,9 +18,9 @@ trait Tr<'a> {}
 // Then, when we recompute the goal `W<?0>: Constrain<'error>`, when
 // collecting ambiguities and overflows, we end up assembling a default
 // error candidate w/o ambiguity, which causes the goal to pass, and ICE.
-impl<'a, A: ?Sized> Tr<'a> for W<A> {}
-struct W<A: ?Sized>(A);
-impl<'a, A: ?Sized> Tr<'a> for A where A: Constrain<'a> {}
+impl<'a, A> Tr<'a> for W<A> {}
+struct W<A>(A);
+impl<'a, A> Tr<'a> for A where A: Constrain<'a> {}
 //~^ ERROR conflicting implementations of trait `Tr<'_>` for type `W<_>`
 
 trait Constrain<'a> {}
diff --git a/tests/ui/traits/next-solver/dont-canonicalize-re-error.stderr b/tests/ui/traits/next-solver/dont-canonicalize-re-error.stderr
index cf85c52fb42..867efd4a0e7 100644
--- a/tests/ui/traits/next-solver/dont-canonicalize-re-error.stderr
+++ b/tests/ui/traits/next-solver/dont-canonicalize-re-error.stderr
@@ -1,19 +1,22 @@
 error[E0261]: use of undeclared lifetime name `'missing`
-  --> $DIR/dont-canonicalize-re-error.rs:25:26
+  --> $DIR/dont-canonicalize-re-error.rs:27:26
    |
 LL | impl<A: Sized> Constrain<'missing> for W<A> {}
-   |      -                   ^^^^^^^^ undeclared lifetime
-   |      |
-   |      help: consider introducing lifetime `'missing` here: `'missing,`
+   |                          ^^^^^^^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'missing` here
+   |
+LL | impl<'missing, A: Sized> Constrain<'missing> for W<A> {}
+   |      +++++++++
 
 error[E0119]: conflicting implementations of trait `Tr<'_>` for type `W<_>`
-  --> $DIR/dont-canonicalize-re-error.rs:21:1
+  --> $DIR/dont-canonicalize-re-error.rs:23:1
    |
-LL | impl<'a, A: ?Sized> Tr<'a> for W<A> {}
-   | ----------------------------------- first implementation here
-LL | struct W<A: ?Sized>(A);
-LL | impl<'a, A: ?Sized> Tr<'a> for A where A: Constrain<'a> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `W<_>`
+LL | impl<'a, A> Tr<'a> for W<A> {}
+   | --------------------------- first implementation here
+LL | struct W<A>(A);
+LL | impl<'a, A> Tr<'a> for A where A: Constrain<'a> {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `W<_>`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/traits/next-solver/normalize/normalize-region-obligations.rs b/tests/ui/traits/next-solver/normalize/normalize-region-obligations.rs
index c4c2e695a1d..e1ffa4e29d6 100644
--- a/tests/ui/traits/next-solver/normalize/normalize-region-obligations.rs
+++ b/tests/ui/traits/next-solver/normalize/normalize-region-obligations.rs
@@ -1,6 +1,8 @@
 //@ revisions: normalize_param_env normalize_obligation hrtb
 //@ check-pass
 //@ compile-flags: -Znext-solver
+#![feature(rustc_attrs)]
+#![rustc_no_implicit_bounds]
 
 trait Foo {
     #[cfg(normalize_param_env)]
@@ -11,11 +13,11 @@ trait Foo {
     type Gat<'b> where for<'a> <Self as MirrorRegion<'a>>::Assoc: 'b;
 }
 
-trait Mirror { type Assoc: ?Sized; }
-impl<T: ?Sized> Mirror for T { type Assoc = T; }
+trait Mirror { type Assoc; }
+impl<T> Mirror for T { type Assoc = T; }
 
-trait MirrorRegion<'a> { type Assoc: ?Sized; }
-impl<'a, T: ?Sized> MirrorRegion<'a> for T { type Assoc = T; }
+trait MirrorRegion<'a> { type Assoc; }
+impl<'a, T> MirrorRegion<'a> for T { type Assoc = T; }
 
 impl<T> Foo for T {
     #[cfg(normalize_param_env)]
diff --git a/tests/ui/traits/next-solver/overflow/coherence-alias-hang.rs b/tests/ui/traits/next-solver/overflow/coherence-alias-hang.rs
index f88f74680b9..4874e2e1f99 100644
--- a/tests/ui/traits/next-solver/overflow/coherence-alias-hang.rs
+++ b/tests/ui/traits/next-solver/overflow/coherence-alias-hang.rs
@@ -4,16 +4,18 @@
 // Regression test for nalgebra hang <https://github.com/rust-lang/rust/issues/130056>.
 
 #![feature(lazy_type_alias)]
+#![feature(rustc_attrs)]
+#![rustc_no_implicit_bounds]
 #![allow(incomplete_features)]
 
-type Id<T: ?Sized> = T;
+type Id<T> = T;
 trait NotImplemented {}
 
-struct W<T: ?Sized, U: ?Sized>(*const T, *const U);
+struct W<T, U>(*const T, *const U);
 trait Trait {
-    type Assoc: ?Sized;
+    type Assoc;
 }
-impl<T: ?Sized + Trait> Trait for W<T, T> {
+impl<T: Trait> Trait for W<T, T> {
     #[cfg(ai)]
     type Assoc = W<T::Assoc, Id<T::Assoc>>;
     #[cfg(ia)]
@@ -22,8 +24,8 @@ impl<T: ?Sized + Trait> Trait for W<T, T> {
     type Assoc = W<Id<T::Assoc>, Id<T::Assoc>>;
 }
 
-trait Overlap<T: ?Sized> {}
-impl<T: ?Sized> Overlap<T> for W<T, T> {}
-impl<T: ?Sized + Trait + NotImplemented> Overlap<T::Assoc> for T {}
+trait Overlap<T> {}
+impl<T> Overlap<T> for W<T, T> {}
+impl<T: Trait + NotImplemented> Overlap<T::Assoc> for T {}
 
 fn main() {}
diff --git a/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs b/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs
index dee5500aadd..e5a57a44d49 100644
--- a/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs
+++ b/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs
@@ -1,5 +1,7 @@
 //@ compile-flags: -Znext-solver=coherence
 //@ check-pass
+#![feature(rustc_attrs)]
+#![rustc_no_implicit_bounds]
 
 // A regression test for trait-system-refactor-initiative#70.
 
@@ -7,8 +9,8 @@ trait Trait {
     type Assoc;
 }
 
-struct W<T: ?Sized>(*mut T);
-impl<T: ?Sized> Trait for W<W<T>>
+struct W<T>(*mut T);
+impl<T> Trait for W<W<T>>
 where
     W<T>: Trait,
 {
@@ -20,6 +22,6 @@ impl<T: Trait<Assoc = u32>> NoOverlap for T {}
 // `Projection(<W<_> as Trait>::Assoc, u32)` should result in error even
 // though applying the impl results in overflow. This is necessary to match
 // the behavior of the old solver.
-impl<T: ?Sized> NoOverlap for W<T> {}
+impl<T> NoOverlap for W<T> {}
 
 fn main() {}
diff --git a/tests/ui/traits/next-solver/supertrait-alias-1.rs b/tests/ui/traits/next-solver/supertrait-alias-1.rs
index 579a44677c2..2671eed7fce 100644
--- a/tests/ui/traits/next-solver/supertrait-alias-1.rs
+++ b/tests/ui/traits/next-solver/supertrait-alias-1.rs
@@ -1,5 +1,7 @@
 //@ compile-flags: -Znext-solver
 //@ check-pass
+#![feature(rustc_attrs)]
+#![rustc_no_implicit_bounds]
 
 // Regression test for <https://github.com/rust-lang/trait-system-refactor-initiative/issues/171>.
 // Tests that we don't try to replace `<V as Super>::Output` when replacing projections in the
@@ -13,9 +15,9 @@ pub trait Super {
     type Output;
 }
 
-fn bound<T: Trait + ?Sized>() {}
+fn bound<T: Trait>() {}
 
-fn visit_simd_operator<V: Super + ?Sized>() {
+fn visit_simd_operator<V: Super>() {
     bound::<dyn Trait<Output = <V as Super>::Output>>();
 }
 
diff --git a/tests/ui/traits/on_unimplemented_long_types.stderr b/tests/ui/traits/on_unimplemented_long_types.stderr
index 1628466e081..f32d99a42b1 100644
--- a/tests/ui/traits/on_unimplemented_long_types.stderr
+++ b/tests/ui/traits/on_unimplemented_long_types.stderr
@@ -2,7 +2,7 @@ error[E0277]: `Option<Option<Option<...>>>` doesn't implement `std::fmt::Display
   --> $DIR/on_unimplemented_long_types.rs:3:17
    |
 LL |   pub fn foo() -> impl std::fmt::Display {
-   |                   ^^^^^^^^^^^^^^^^^^^^^^ `Option<Option<Option<...>>>` cannot be formatted with the default formatter
+   |                   ^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
 LL |
 LL | /     Some(Some(Some(Some(Some(Some(Some(Some(Some(S...
 LL | |         Some(Some(Some(Some(Some(Some(Some(Some(So...
@@ -14,7 +14,6 @@ LL | |     )))))))))))
    | |_______________- return type was inferred to be `Option<Option<Option<...>>>` here
    |
    = help: the trait `std::fmt::Display` is not implemented for `Option<Option<Option<...>>>`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: the full name for the type has been written to '$TEST_BUILD_DIR/on_unimplemented_long_types.long-type-$LONG_TYPE_HASH.txt'
    = note: consider using `--verbose` to print the full type name to the console
 
diff --git a/tests/ui/traits/overflow-computing-ambiguity.rs b/tests/ui/traits/overflow-computing-ambiguity.rs
index b8f11efeda2..88eeca56cdd 100644
--- a/tests/ui/traits/overflow-computing-ambiguity.rs
+++ b/tests/ui/traits/overflow-computing-ambiguity.rs
@@ -1,12 +1,15 @@
+#![feature(rustc_attrs)]
+#![rustc_no_implicit_bounds]
+
 trait Hello {}
 
-struct Foo<'a, T: ?Sized>(&'a T);
+struct Foo<'a, T>(&'a T);
 
-impl<'a, T: ?Sized> Hello for Foo<'a, &'a T> where Foo<'a, T>: Hello {}
+impl<'a, T> Hello for Foo<'a, &'a T> where Foo<'a, T>: Hello {}
 
 impl Hello for Foo<'static, i32> {}
 
-fn hello<T: ?Sized + Hello>() {}
+fn hello<T: Hello>() {}
 
 fn main() {
     hello();
diff --git a/tests/ui/traits/overflow-computing-ambiguity.stderr b/tests/ui/traits/overflow-computing-ambiguity.stderr
index a2e255865bf..f3e91a29a9c 100644
--- a/tests/ui/traits/overflow-computing-ambiguity.stderr
+++ b/tests/ui/traits/overflow-computing-ambiguity.stderr
@@ -1,5 +1,5 @@
 error[E0283]: type annotations needed
-  --> $DIR/overflow-computing-ambiguity.rs:12:5
+  --> $DIR/overflow-computing-ambiguity.rs:15:5
    |
 LL |     hello();
    |     ^^^^^ cannot infer type of the type parameter `T` declared on the function `hello`
@@ -9,10 +9,10 @@ LL |     hello();
              Foo<'a, &'a T>
              Foo<'static, i32>
 note: required by a bound in `hello`
-  --> $DIR/overflow-computing-ambiguity.rs:9:22
+  --> $DIR/overflow-computing-ambiguity.rs:12:13
    |
-LL | fn hello<T: ?Sized + Hello>() {}
-   |                      ^^^^^ required by this bound in `hello`
+LL | fn hello<T: Hello>() {}
+   |             ^^^^^ required by this bound in `hello`
 help: consider specifying the generic argument
    |
 LL |     hello::<T>();
diff --git a/tests/ui/traits/span-bug-issue-121414.stderr b/tests/ui/traits/span-bug-issue-121414.stderr
index 744806a3415..2eeda00d9cb 100644
--- a/tests/ui/traits/span-bug-issue-121414.stderr
+++ b/tests/ui/traits/span-bug-issue-121414.stderr
@@ -2,9 +2,12 @@ error[E0261]: use of undeclared lifetime name `'f`
   --> $DIR/span-bug-issue-121414.rs:5:22
    |
 LL | impl<'a> Bar for Foo<'f> {
-   |      -               ^^ undeclared lifetime
-   |      |
-   |      help: consider introducing lifetime `'f` here: `'f,`
+   |                      ^^ undeclared lifetime
+   |
+help: consider introducing lifetime `'f` here
+   |
+LL | impl<'f, 'a> Bar for Foo<'f> {
+   |      +++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/suggest-remove-deref-issue-140166.stderr b/tests/ui/traits/suggest-remove-deref-issue-140166.stderr
index 90f24d86d53..7c61f957fdc 100644
--- a/tests/ui/traits/suggest-remove-deref-issue-140166.stderr
+++ b/tests/ui/traits/suggest-remove-deref-issue-140166.stderr
@@ -4,7 +4,7 @@ error[E0277]: the trait bound `&Chars: Trait` is not satisfied
 LL |     format_args!("{:?}", FlatMap(&Chars));
    |                   ----   ^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `&Chars`
    |                   |
-   |                   required by a bound introduced by this call
+   |                   required by this formatting parameter
    |
    = help: the trait `Trait` is implemented for `Chars`
 note: required for `FlatMap<&Chars>` to implement `Debug`
@@ -14,8 +14,6 @@ LL | impl<T: Trait> std::fmt::Debug for FlatMap<T> {
    |         -----  ^^^^^^^^^^^^^^^     ^^^^^^^^^^
    |         |
    |         unsatisfied trait bound introduced here
-note: required by a bound in `core::fmt::rt::Argument::<'_>::new_debug`
-  --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/trait-object-destructure.rs b/tests/ui/traits/trait-object-destructure.rs
new file mode 100644
index 00000000000..6c091677c8c
--- /dev/null
+++ b/tests/ui/traits/trait-object-destructure.rs
@@ -0,0 +1,29 @@
+//! Regression test for destructuring trait references (`&dyn T`/`Box<dyn T>`).
+//! Checks cases where number of `&`/`Box` patterns (n) matches/doesn't match references (m).
+//!
+//! Issue: https://github.com/rust-lang/rust/issues/15031
+
+#![feature(box_patterns)]
+
+trait T {
+    fn foo(&self) {}
+}
+
+impl T for isize {}
+
+fn main() {
+    // Valid cases: n < m (can dereference)
+    let &x = &(&1isize as &dyn T);
+    let &x = &&(&1isize as &dyn T);
+    let &&x = &&(&1isize as &dyn T);
+
+    // Error cases: n == m (cannot dereference trait object)
+    let &x = &1isize as &dyn T; //~ ERROR type `&dyn T` cannot be dereferenced
+    let &&x = &(&1isize as &dyn T); //~ ERROR type `&dyn T` cannot be dereferenced
+    let box x = Box::new(1isize) as Box<dyn T>; //~ ERROR type `Box<dyn T>` cannot be dereferenced
+
+    // Error cases: n > m (type mismatch)
+    let &&x = &1isize as &dyn T; //~ ERROR mismatched types
+    let &&&x = &(&1isize as &dyn T); //~ ERROR mismatched types
+    let box box x = Box::new(1isize) as Box<dyn T>; //~ ERROR mismatched types
+}
diff --git a/tests/ui/destructure-trait-ref.stderr b/tests/ui/traits/trait-object-destructure.stderr
index 0b5ea551a57..c7c832dc40a 100644
--- a/tests/ui/destructure-trait-ref.stderr
+++ b/tests/ui/traits/trait-object-destructure.stderr
@@ -1,23 +1,23 @@
 error[E0033]: type `&dyn T` cannot be dereferenced
-  --> $DIR/destructure-trait-ref.rs:28:9
+  --> $DIR/trait-object-destructure.rs:21:9
    |
 LL |     let &x = &1isize as &dyn T;
    |         ^^ type `&dyn T` cannot be dereferenced
 
 error[E0033]: type `&dyn T` cannot be dereferenced
-  --> $DIR/destructure-trait-ref.rs:29:10
+  --> $DIR/trait-object-destructure.rs:22:10
    |
 LL |     let &&x = &(&1isize as &dyn T);
    |          ^^ type `&dyn T` cannot be dereferenced
 
 error[E0033]: type `Box<dyn T>` cannot be dereferenced
-  --> $DIR/destructure-trait-ref.rs:30:9
+  --> $DIR/trait-object-destructure.rs:23:9
    |
 LL |     let box x = Box::new(1isize) as Box<dyn T>;
    |         ^^^^^ type `Box<dyn T>` cannot be dereferenced
 
 error[E0308]: mismatched types
-  --> $DIR/destructure-trait-ref.rs:34:10
+  --> $DIR/trait-object-destructure.rs:26:10
    |
 LL |     let &&x = &1isize as &dyn T;
    |          ^^   ----------------- this expression has type `&dyn T`
@@ -33,7 +33,7 @@ LL +     let &x = &1isize as &dyn T;
    |
 
 error[E0308]: mismatched types
-  --> $DIR/destructure-trait-ref.rs:38:11
+  --> $DIR/trait-object-destructure.rs:27:11
    |
 LL |     let &&&x = &(&1isize as &dyn T);
    |           ^^   -------------------- this expression has type `&&dyn T`
@@ -49,7 +49,7 @@ LL +     let &&x = &(&1isize as &dyn T);
    |
 
 error[E0308]: mismatched types
-  --> $DIR/destructure-trait-ref.rs:42:13
+  --> $DIR/trait-object-destructure.rs:28:13
    |
 LL |     let box box x = Box::new(1isize) as Box<dyn T>;
    |             ^^^^^   ------------------------------ this expression has type `Box<dyn T>`
diff --git a/tests/ui/type-alias-impl-trait/bounds-are-checked3.stderr b/tests/ui/type-alias-impl-trait/bounds-are-checked3.stderr
index c0f6d678097..01d24cabf48 100644
--- a/tests/ui/type-alias-impl-trait/bounds-are-checked3.stderr
+++ b/tests/ui/type-alias-impl-trait/bounds-are-checked3.stderr
@@ -2,9 +2,8 @@ error[E0277]: `T` doesn't implement `std::fmt::Display`
   --> $DIR/bounds-are-checked3.rs:9:35
    |
 LL | type Foo<T: Debug> = (impl Debug, Struct<T>);
-   |                                   ^^^^^^^^^ `T` cannot be formatted with the default formatter
+   |                                   ^^^^^^^^^ the trait `std::fmt::Display` is not implemented for `T`
    |
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `Struct`
   --> $DIR/bounds-are-checked3.rs:5:18
    |
diff --git a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr
index ef0e73f1481..193f0c92c9d 100644
--- a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr
@@ -2,7 +2,7 @@ error[E0277]: `T` doesn't implement `Debug`
   --> $DIR/generic_duplicate_param_use2.rs:12:5
    |
 LL |     t
-   |     ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |     ^ the trait `Debug` is not implemented for `T`
    |
 note: required by a bound in an opaque type
   --> $DIR/generic_duplicate_param_use2.rs:8:23
diff --git a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr
index 0932c72ff93..f0d1e93b0b7 100644
--- a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr
@@ -2,7 +2,7 @@ error[E0277]: `U` doesn't implement `Debug`
   --> $DIR/generic_duplicate_param_use4.rs:12:5
    |
 LL |     u
-   |     ^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |     ^ the trait `Debug` is not implemented for `U`
    |
 note: required by a bound in an opaque type
   --> $DIR/generic_duplicate_param_use4.rs:8:23
diff --git a/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr b/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr
index 429c3b9175a..1e3c454a5bc 100644
--- a/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr
@@ -2,7 +2,7 @@ error[E0277]: `U` doesn't implement `Debug`
   --> $DIR/generic_underconstrained2.rs:9:33
    |
 LL | fn underconstrained<U>(_: U) -> Underconstrained<U> {
-   |                                 ^^^^^^^^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |                                 ^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `U`
    |
 note: required by a bound on the type alias `Underconstrained`
   --> $DIR/generic_underconstrained2.rs:5:26
@@ -18,7 +18,7 @@ error[E0277]: `V` doesn't implement `Debug`
   --> $DIR/generic_underconstrained2.rs:19:43
    |
 LL | fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
-   |                                           ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |                                           ^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `V`
    |
 note: required by a bound on the type alias `Underconstrained2`
   --> $DIR/generic_underconstrained2.rs:15:27
@@ -34,7 +34,7 @@ error[E0277]: `U` doesn't implement `Debug`
   --> $DIR/generic_underconstrained2.rs:9:33
    |
 LL | fn underconstrained<U>(_: U) -> Underconstrained<U> {
-   |                                 ^^^^^^^^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |                                 ^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `U`
    |
 note: required by a bound on the type alias `Underconstrained`
   --> $DIR/generic_underconstrained2.rs:5:26
@@ -51,7 +51,7 @@ error[E0277]: `V` doesn't implement `Debug`
   --> $DIR/generic_underconstrained2.rs:19:43
    |
 LL | fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
-   |                                           ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |                                           ^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `V`
    |
 note: required by a bound on the type alias `Underconstrained2`
   --> $DIR/generic_underconstrained2.rs:15:27
diff --git a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.stderr b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.edition2015.stderr
index 0bf9dccfad8..4f1e769bc6c 100644
--- a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.stderr
+++ b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.edition2015.stderr
@@ -1,5 +1,5 @@
 error[E0700]: hidden type for `impl PlusOne` captures lifetime that does not appear in bounds
-  --> $DIR/imply_bounds_from_bounds_param.rs:26:5
+  --> $DIR/imply_bounds_from_bounds_param.rs:29:5
    |
 LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne {
    |         --                     ------------ opaque type defined here
diff --git a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.edition2024.stderr b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.edition2024.stderr
new file mode 100644
index 00000000000..a7135e8f05f
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.edition2024.stderr
@@ -0,0 +1,91 @@
+error[E0499]: cannot borrow `z` as mutable more than once at a time
+  --> $DIR/imply_bounds_from_bounds_param.rs:36:27
+   |
+LL |     let mut thing = test(&mut z);
+   |                          ------ first mutable borrow occurs here
+LL |     let mut thing2 = test(&mut z);
+   |                           ^^^^^^ second mutable borrow occurs here
+LL |     thing.plus_one();
+   |     ----- first borrow later used here
+   |
+note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
+  --> $DIR/imply_bounds_from_bounds_param.rs:35:21
+   |
+LL |     let mut thing = test(&mut z);
+   |                     ^^^^^^^^^^^^
+help: use the precise capturing `use<...>` syntax to make the captures explicit
+   |
+LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne + use<> {
+   |                                             +++++++
+
+error[E0502]: cannot borrow `z` as immutable because it is also borrowed as mutable
+  --> $DIR/imply_bounds_from_bounds_param.rs:38:5
+   |
+LL |     let mut thing = test(&mut z);
+   |                          ------ mutable borrow occurs here
+...
+LL |     assert_eq!(z, 43);
+   |     ^^^^^^^^^^^^^^^^^ immutable borrow occurs here
+...
+LL |     thing.plus_one();
+   |     ----- mutable borrow later used here
+   |
+note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
+  --> $DIR/imply_bounds_from_bounds_param.rs:35:21
+   |
+LL |     let mut thing = test(&mut z);
+   |                     ^^^^^^^^^^^^
+   = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: use the precise capturing `use<...>` syntax to make the captures explicit
+   |
+LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne + use<> {
+   |                                             +++++++
+
+error[E0502]: cannot borrow `z` as immutable because it is also borrowed as mutable
+  --> $DIR/imply_bounds_from_bounds_param.rs:40:5
+   |
+LL |     let mut thing = test(&mut z);
+   |                          ------ mutable borrow occurs here
+...
+LL |     assert_eq!(z, 44);
+   |     ^^^^^^^^^^^^^^^^^ immutable borrow occurs here
+LL |     thing.plus_one();
+   |     ----- mutable borrow later used here
+   |
+note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
+  --> $DIR/imply_bounds_from_bounds_param.rs:35:21
+   |
+LL |     let mut thing = test(&mut z);
+   |                     ^^^^^^^^^^^^
+   = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: use the precise capturing `use<...>` syntax to make the captures explicit
+   |
+LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne + use<> {
+   |                                             +++++++
+
+error[E0502]: cannot borrow `z` as immutable because it is also borrowed as mutable
+  --> $DIR/imply_bounds_from_bounds_param.rs:42:5
+   |
+LL |     let mut thing = test(&mut z);
+   |                          ------ mutable borrow occurs here
+...
+LL |     assert_eq!(z, 45);
+   |     ^^^^^^^^^^^^^^^^^ immutable borrow occurs here
+LL | }
+   | - mutable borrow might be used here, when `thing` is dropped and runs the destructor for type `impl PlusOne`
+   |
+note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
+  --> $DIR/imply_bounds_from_bounds_param.rs:35:21
+   |
+LL |     let mut thing = test(&mut z);
+   |                     ^^^^^^^^^^^^
+   = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: use the precise capturing `use<...>` syntax to make the captures explicit
+   |
+LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne + use<> {
+   |                                             +++++++
+
+error: aborting due to 4 previous errors
+
+Some errors have detailed explanations: E0499, E0502.
+For more information about an error, try `rustc --explain E0499`.
diff --git a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.rs b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.rs
index 5d5645077c2..672019ba73a 100644
--- a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.rs
+++ b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.rs
@@ -1,3 +1,6 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
 #![feature(impl_trait_in_assoc_type)]
 
 trait Callable {
@@ -24,17 +27,17 @@ impl<T: PlusOne> Callable for T {
 
 fn test<'a>(y: &'a mut i32) -> impl PlusOne {
     <&'a mut i32 as Callable>::call(y)
-    //~^ ERROR hidden type for `impl PlusOne` captures lifetime that does not appear in bounds
+    //[edition2015]~^ ERROR hidden type for `impl PlusOne` captures lifetime that does not appear in bounds
 }
 
 fn main() {
     let mut z = 42;
     let mut thing = test(&mut z);
-    let mut thing2 = test(&mut z);
+    let mut thing2 = test(&mut z); //[edition2024]~ ERROR cannot borrow `z` as mutable more than once
     thing.plus_one();
-    assert_eq!(z, 43);
+    assert_eq!(z, 43); //[edition2024]~ ERROR cannot borrow `z` as immutable
     thing2.plus_one();
-    assert_eq!(z, 44);
+    assert_eq!(z, 44); //[edition2024]~ ERROR cannot borrow `z` as immutable
     thing.plus_one();
-    assert_eq!(z, 45);
+    assert_eq!(z, 45); //[edition2024]~ ERROR cannot borrow `z` as immutable
 }
diff --git a/tests/ui/type-alias-impl-trait/nested.stderr b/tests/ui/type-alias-impl-trait/nested.stderr
index 59911f65a23..f72830b864d 100644
--- a/tests/ui/type-alias-impl-trait/nested.stderr
+++ b/tests/ui/type-alias-impl-trait/nested.stderr
@@ -15,7 +15,9 @@ error[E0277]: `Bar` doesn't implement `Debug`
   --> $DIR/nested.rs:17:22
    |
 LL |     println!("{:?}", bar());
-   |                      ^^^^^ `Bar` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               ----   ^^^^^ `Bar` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |               |
+   |               required by this formatting parameter
    |
    = help: the trait `Debug` is not implemented for `Bar`
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/type/binding-assigned-block-without-tail-expression.stderr b/tests/ui/type/binding-assigned-block-without-tail-expression.stderr
index 3e96d7f317b..ff34facf389 100644
--- a/tests/ui/type/binding-assigned-block-without-tail-expression.stderr
+++ b/tests/ui/type/binding-assigned-block-without-tail-expression.stderr
@@ -5,7 +5,9 @@ LL |         42;
    |           - help: remove this semicolon
 ...
 LL |     println!("{}", x);
-   |                    ^ `()` cannot be formatted with the default formatter
+   |               --   ^ `()` cannot be formatted with the default formatter
+   |               |
+   |               required by this formatting parameter
    |
    = help: the trait `std::fmt::Display` is not implemented for `()`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
@@ -18,7 +20,9 @@ LL |     let y = {};
    |             -- this empty block is missing a tail expression
 ...
 LL |     println!("{}", y);
-   |                    ^ `()` cannot be formatted with the default formatter
+   |               --   ^ `()` cannot be formatted with the default formatter
+   |               |
+   |               required by this formatting parameter
    |
    = help: the trait `std::fmt::Display` is not implemented for `()`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
@@ -31,7 +35,9 @@ LL |         "hi";
    |             - help: remove this semicolon
 ...
 LL |     println!("{}", z);
-   |                    ^ `()` cannot be formatted with the default formatter
+   |               --   ^ `()` cannot be formatted with the default formatter
+   |               |
+   |               required by this formatting parameter
    |
    = help: the trait `std::fmt::Display` is not implemented for `()`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
@@ -47,7 +53,9 @@ LL | |     };
    | |_____- this block is missing a tail expression
 ...
 LL |       println!("{}", s);
-   |                      ^ `()` cannot be formatted with the default formatter
+   |                 --   ^ `()` cannot be formatted with the default formatter
+   |                 |
+   |                 required by this formatting parameter
    |
    = help: the trait `std::fmt::Display` is not implemented for `()`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
diff --git a/tests/ui/type/option-ref-advice.rs b/tests/ui/type/option-ref-advice.rs
index 2dcee5a2eb9..435b15d01e3 100644
--- a/tests/ui/type/option-ref-advice.rs
+++ b/tests/ui/type/option-ref-advice.rs
@@ -3,9 +3,9 @@
 fn takes_option(_arg: Option<&String>) {}
 
 fn main() {
-    takes_option(&None); //~ ERROR 6:18: 6:23: mismatched types [E0308]
+    takes_option(&None); //~ ERROR mismatched types [E0308]
 
     let x = String::from("x");
     let res = Some(x);
-    takes_option(&res); //~ ERROR 10:18: 10:22: mismatched types [E0308]
+    takes_option(&res); //~ ERROR mismatched types [E0308]
 }
diff --git a/tests/ui/type/pattern_types/derives_fail.stderr b/tests/ui/type/pattern_types/derives_fail.stderr
index 78bef726341..6b2e27494f0 100644
--- a/tests/ui/type/pattern_types/derives_fail.stderr
+++ b/tests/ui/type/pattern_types/derives_fail.stderr
@@ -26,9 +26,7 @@ LL | #[derive(Clone, Copy, PartialEq, Eq, Debug, Ord, PartialOrd, Hash, Default)
    |                                      ----- in this derive macro expansion
 LL | #[repr(transparent)]
 LL | struct Nanoseconds(NanoI32);
-   |                    ^^^^^^^ `(i32) is 0..=999999999` cannot be formatted using `{:?}` because it doesn't implement `Debug`
-   |
-   = help: the trait `Debug` is not implemented for `(i32) is 0..=999999999`
+   |                    ^^^^^^^ the trait `Debug` is not implemented for `(i32) is 0..=999999999`
 
 error[E0277]: the trait bound `(i32) is 0..=999999999: Ord` is not satisfied
   --> $DIR/derives_fail.rs:11:20
diff --git a/tests/ui/typeck/consider-borrowing-141810-1.stderr b/tests/ui/typeck/consider-borrowing-141810-1.stderr
index 9291721ac71..35ca6793eee 100644
--- a/tests/ui/typeck/consider-borrowing-141810-1.stderr
+++ b/tests/ui/typeck/consider-borrowing-141810-1.stderr
@@ -1,20 +1,17 @@
 error[E0308]: `if` and `else` have incompatible types
   --> $DIR/consider-borrowing-141810-1.rs:4:12
    |
-LL |        let x = if true {
-   |  ______________-
-LL | |          &true
-   | |          ----- expected because of this
-LL | |      } else if false {
-   | | ____________^
-LL | ||         true
-LL | ||     } else {
-LL | ||         true
-LL | ||     };
-   | ||     ^
-   | ||_____|
-   |  |_____`if` and `else` have incompatible types
-   |        expected `&bool`, found `bool`
+LL |       let x = if true {
+   |               ------- `if` and `else` have incompatible types
+LL |           &true
+   |           ----- expected because of this
+LL |       } else if false {
+   |  ____________^
+LL | |         true
+LL | |     } else {
+LL | |         true
+LL | |     };
+   | |_____^ expected `&bool`, found `bool`
    |
 help: consider borrowing here
    |
diff --git a/tests/ui/typeck/consider-borrowing-141810-2.stderr b/tests/ui/typeck/consider-borrowing-141810-2.stderr
index dd229897283..44ecb5a4a94 100644
--- a/tests/ui/typeck/consider-borrowing-141810-2.stderr
+++ b/tests/ui/typeck/consider-borrowing-141810-2.stderr
@@ -1,18 +1,15 @@
 error[E0308]: `if` and `else` have incompatible types
   --> $DIR/consider-borrowing-141810-2.rs:4:12
    |
-LL |        let x = if true {
-   |  ______________-
-LL | |          &()
-   | |          --- expected because of this
-LL | |      } else if false {
-   | | ____________^
-LL | ||     } else {
-LL | ||     };
-   | ||     ^
-   | ||_____|
-   |  |_____`if` and `else` have incompatible types
-   |        expected `&()`, found `()`
+LL |       let x = if true {
+   |               ------- `if` and `else` have incompatible types
+LL |           &()
+   |           --- expected because of this
+LL |       } else if false {
+   |  ____________^
+LL | |     } else {
+LL | |     };
+   | |_____^ expected `&()`, found `()`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/typeck/consider-borrowing-141810-3.stderr b/tests/ui/typeck/consider-borrowing-141810-3.stderr
index 0b0c5f191a0..3adf8ba1a89 100644
--- a/tests/ui/typeck/consider-borrowing-141810-3.stderr
+++ b/tests/ui/typeck/consider-borrowing-141810-3.stderr
@@ -1,18 +1,15 @@
 error[E0308]: `if` and `else` have incompatible types
   --> $DIR/consider-borrowing-141810-3.rs:4:12
    |
-LL |        let x = if true {
-   |  ______________-
-LL | |          &()
-   | |          --- expected because of this
-LL | |      } else if false {
-   | | ____________^
-LL | ||
-LL | ||     };
-   | ||     ^
-   | ||_____|
-   |  |_____`if` and `else` have incompatible types
-   |        expected `&()`, found `()`
+LL |       let x = if true {
+   |               ------- `if` and `else` have incompatible types
+LL |           &()
+   |           --- expected because of this
+LL |       } else if false {
+   |  ____________^
+LL | |
+LL | |     };
+   | |_____^ expected `&()`, found `()`
    |
    = note: `if` expressions without `else` evaluate to `()`
    = note: consider adding an `else` block that evaluates to the expected type
diff --git a/tests/ui/typeck/inference-method-chain-diverging-fallback.rs b/tests/ui/typeck/inference-method-chain-diverging-fallback.rs
new file mode 100644
index 00000000000..8f549b7d9d6
--- /dev/null
+++ b/tests/ui/typeck/inference-method-chain-diverging-fallback.rs
@@ -0,0 +1,19 @@
+//! Test type inference in method chains with diverging fallback.
+//! Verifies that closure type in `unwrap_or_else` is properly inferred
+//! when chained with other combinators and contains a diverging path.
+
+//@ run-pass
+
+fn produce<T>() -> Result<&'static str, T> {
+    Ok("22")
+}
+
+fn main() {
+    // The closure's error type `T` must unify with `ParseIntError`,
+    // while the success type must be `usize` (from parse())
+    let x: usize = produce()
+        .and_then(|x| x.parse::<usize>()) // Explicit turbofish for clarity
+        .unwrap_or_else(|_| panic!()); // Diverging fallback
+
+    assert_eq!(x, 22);
+}
diff --git a/tests/ui/typeck/issue-100246.rs b/tests/ui/typeck/issue-100246.rs
index 8f0b34bab0c..e05bb2a1362 100644
--- a/tests/ui/typeck/issue-100246.rs
+++ b/tests/ui/typeck/issue-100246.rs
@@ -25,6 +25,6 @@ fn downcast<'a, W: ?Sized>() -> std::io::Result<&'a W> {
 struct Other;
 
 fn main() -> std::io::Result<()> {
-    let other: Other = downcast()?;//~ERROR 28:24: 28:35: `?` operator has incompatible types
+    let other: Other = downcast()?; //~ ERROR `?` operator has incompatible types
     Ok(())
 }
diff --git a/tests/ui/typeck/issue-74086.rs b/tests/ui/typeck/issue-74086.rs
index 9b7c0d7cc6e..1993cc7db35 100644
--- a/tests/ui/typeck/issue-74086.rs
+++ b/tests/ui/typeck/issue-74086.rs
@@ -1,5 +1,4 @@
 fn main() {
     static BUG: fn(_) -> u8 = |_| 8;
-    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions [E0121]
-    //~| ERROR the placeholder `_` is not allowed within types on item signatures for static items
+    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static items
 }
diff --git a/tests/ui/typeck/issue-74086.stderr b/tests/ui/typeck/issue-74086.stderr
index 95ebf9a906c..25f454ac0c3 100644
--- a/tests/ui/typeck/issue-74086.stderr
+++ b/tests/ui/typeck/issue-74086.stderr
@@ -1,15 +1,9 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/issue-74086.rs:2:20
-   |
-LL |     static BUG: fn(_) -> u8 = |_| 8;
-   |                    ^ not allowed in type signatures
-
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for static items
   --> $DIR/issue-74086.rs:2:20
    |
 LL |     static BUG: fn(_) -> u8 = |_| 8;
    |                    ^ not allowed in type signatures
 
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/typeck/issue-81885.rs b/tests/ui/typeck/issue-81885.rs
index fb3949478a4..d73c77b8f3a 100644
--- a/tests/ui/typeck/issue-81885.rs
+++ b/tests/ui/typeck/issue-81885.rs
@@ -1,9 +1,7 @@
 const TEST4: fn() -> _ = 42;
-                  //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-                  //~| ERROR the placeholder `_` is not allowed within types on item signatures for constant items
+//~^ ERROR the placeholder `_` is not allowed within types on item signatures for constant items
 
 fn main() {
     const TEST5: fn() -> _ = 42;
-                      //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-                      //~| ERROR the placeholder `_` is not allowed within types on item signatures for constant items
+    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constant items
 }
diff --git a/tests/ui/typeck/issue-81885.stderr b/tests/ui/typeck/issue-81885.stderr
index 91c08bd8235..25a6bb632ef 100644
--- a/tests/ui/typeck/issue-81885.stderr
+++ b/tests/ui/typeck/issue-81885.stderr
@@ -1,27 +1,15 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/issue-81885.rs:1:22
-   |
-LL | const TEST4: fn() -> _ = 42;
-   |                      ^ not allowed in type signatures
-
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constant items
   --> $DIR/issue-81885.rs:1:22
    |
 LL | const TEST4: fn() -> _ = 42;
    |                      ^ not allowed in type signatures
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/issue-81885.rs:6:26
-   |
-LL |     const TEST5: fn() -> _ = 42;
-   |                          ^ not allowed in type signatures
-
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constant items
-  --> $DIR/issue-81885.rs:6:26
+  --> $DIR/issue-81885.rs:5:26
    |
 LL |     const TEST5: fn() -> _ = 42;
    |                          ^ not allowed in type signatures
 
-error: aborting due to 4 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/typeck/issue-89275.rs b/tests/ui/typeck/issue-89275.rs
index b91c0017548..6e4211de185 100644
--- a/tests/ui/typeck/issue-89275.rs
+++ b/tests/ui/typeck/issue-89275.rs
@@ -25,5 +25,5 @@ fn downcast<'a, W: ?Sized>() -> &'a W {
 struct Other;
 
 fn main() {
-    let other: &mut Other = downcast();//~ERROR 28:29: 28:39: mismatched types [E0308]
+    let other: &mut Other = downcast();//~ ERROR mismatched types [E0308]
 }
diff --git a/tests/ui/typeck/point-at-type-param-in-path-expr.stderr b/tests/ui/typeck/point-at-type-param-in-path-expr.stderr
index 14642b25c99..3701b3e3798 100644
--- a/tests/ui/typeck/point-at-type-param-in-path-expr.stderr
+++ b/tests/ui/typeck/point-at-type-param-in-path-expr.stderr
@@ -2,10 +2,8 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
   --> $DIR/point-at-type-param-in-path-expr.rs:4:19
    |
 LL |     let x = foo::<()>;
-   |                   ^^ `()` cannot be formatted with the default formatter
+   |                   ^^ the trait `std::fmt::Display` is not implemented for `()`
    |
-   = help: the trait `std::fmt::Display` is not implemented for `()`
-   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `foo`
   --> $DIR/point-at-type-param-in-path-expr.rs:1:11
    |
diff --git a/tests/ui/typeck/type-placeholder-fn-in-const.rs b/tests/ui/typeck/type-placeholder-fn-in-const.rs
index bbb95a5798a..1600534dd4f 100644
--- a/tests/ui/typeck/type-placeholder-fn-in-const.rs
+++ b/tests/ui/typeck/type-placeholder-fn-in-const.rs
@@ -2,14 +2,12 @@ struct MyStruct;
 
 trait Test {
     const TEST: fn() -> _;
-    //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for functions [E0121]
-    //~| ERROR: the placeholder `_` is not allowed within types on item signatures for associated constants [E0121]
+    //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for associated constants [E0121]
 }
 
 impl Test for MyStruct {
     const TEST: fn() -> _ = 42;
-    //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for functions [E0121]
-    //~| ERROR: the placeholder `_` is not allowed within types on item signatures for associated constants [E0121]
+    //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for associated constants [E0121]
 }
 
 fn main() {}
diff --git a/tests/ui/typeck/type-placeholder-fn-in-const.stderr b/tests/ui/typeck/type-placeholder-fn-in-const.stderr
index 92b47bd4781..a29752948fe 100644
--- a/tests/ui/typeck/type-placeholder-fn-in-const.stderr
+++ b/tests/ui/typeck/type-placeholder-fn-in-const.stderr
@@ -1,17 +1,5 @@
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/type-placeholder-fn-in-const.rs:10:25
-   |
-LL |     const TEST: fn() -> _ = 42;
-   |                         ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/type-placeholder-fn-in-const.rs:4:25
-   |
-LL |     const TEST: fn() -> _;
-   |                         ^ not allowed in type signatures
-
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
-  --> $DIR/type-placeholder-fn-in-const.rs:10:25
+  --> $DIR/type-placeholder-fn-in-const.rs:9:25
    |
 LL |     const TEST: fn() -> _ = 42;
    |                         ^ not allowed in type signatures
@@ -22,6 +10,6 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
 LL |     const TEST: fn() -> _;
    |                         ^ not allowed in type signatures
 
-error: aborting due to 4 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/typeck/typeck_type_placeholder_item.rs b/tests/ui/typeck/typeck_type_placeholder_item.rs
index d7351f2e51a..dc790361919 100644
--- a/tests/ui/typeck/typeck_type_placeholder_item.rs
+++ b/tests/ui/typeck/typeck_type_placeholder_item.rs
@@ -33,7 +33,6 @@ fn test7(x: _) { let _x: usize = x; }
 
 fn test8(_f: fn() -> _) { }
 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-//~^^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
 
 struct Test9;
 
@@ -67,6 +66,8 @@ struct Test10 {
     a: _,
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for structs
     b: (_, _),
+    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for structs
+    //~| ERROR the placeholder `_` is not allowed within types on item signatures for structs
 }
 
 pub fn main() {
@@ -99,7 +100,6 @@ pub fn main() {
 
     fn fn_test8(_f: fn() -> _) { }
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-    //~^^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
 
     struct FnTest9;
 
@@ -123,6 +123,8 @@ pub fn main() {
         a: _,
         //~^ ERROR the placeholder `_` is not allowed within types on item signatures for structs
         b: (_, _),
+        //~^ ERROR the placeholder `_` is not allowed within types on item signatures for structs
+        //~| ERROR the placeholder `_` is not allowed within types on item signatures for structs
     }
 
     fn fn_test11(_: _) -> (_, _) { panic!() }
@@ -141,12 +143,14 @@ trait T {
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
     fn method_test2(&self, x: _) -> _;
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
+    //~| ERROR the placeholder `_` is not allowed within types on item signatures for functions
     fn method_test3(&self) -> _;
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
     fn assoc_fn_test1(x: _);
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
     fn assoc_fn_test2(x: _) -> _;
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
+    //~| ERROR the placeholder `_` is not allowed within types on item signatures for functions
     fn assoc_fn_test3() -> _;
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
 }
@@ -158,9 +162,11 @@ trait BadTrait<_> {}
 //~^ ERROR expected identifier, found reserved identifier `_`
 impl BadTrait<_> for BadStruct<_> {}
 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for implementations
+//~| ERROR the placeholder `_` is not allowed within types on item signatures for implementations
 
 fn impl_trait() -> impl BadTrait<_> {
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
+//~^ ERROR the placeholder `_` is not allowed within types on item signatures for opaque types
+//~| ERROR the placeholder `_` is not allowed within types on item signatures for opaque types
     unimplemented!()
 }
 
@@ -180,7 +186,8 @@ struct Struct;
 trait Trait<T> {}
 impl Trait<usize> for Struct {}
 type Y = impl Trait<_>;
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for type aliases
+//~^ ERROR the placeholder `_` is not allowed within types on item signatures for opaque types
+//~| ERROR the placeholder `_` is not allowed within types on item signatures for opaque types
 #[define_opaque(Y)]
 fn foo() -> Y {
     Struct
@@ -197,6 +204,7 @@ trait Qux {
     // type E: _; // FIXME: make the parser propagate the existence of `B`
     type F: std::ops::Fn(_);
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
+    //~| ERROR the placeholder `_` is not allowed within types on item signatures for associated types
 }
 impl Qux for Struct {
     //~^ ERROR not all trait items implemented, missing: `F`
diff --git a/tests/ui/typeck/typeck_type_placeholder_item.stderr b/tests/ui/typeck/typeck_type_placeholder_item.stderr
index 7184244f5dc..53476f6c807 100644
--- a/tests/ui/typeck/typeck_type_placeholder_item.stderr
+++ b/tests/ui/typeck/typeck_type_placeholder_item.stderr
@@ -1,35 +1,35 @@
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/typeck_type_placeholder_item.rs:154:18
+  --> $DIR/typeck_type_placeholder_item.rs:158:18
    |
 LL | struct BadStruct<_>(_);
    |                  ^ expected identifier, found reserved identifier
 
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/typeck_type_placeholder_item.rs:157:16
+  --> $DIR/typeck_type_placeholder_item.rs:161:16
    |
 LL | trait BadTrait<_> {}
    |                ^ expected identifier, found reserved identifier
 
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/typeck_type_placeholder_item.rs:167:19
+  --> $DIR/typeck_type_placeholder_item.rs:173:19
    |
 LL | struct BadStruct1<_, _>(_);
    |                   ^ expected identifier, found reserved identifier
 
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/typeck_type_placeholder_item.rs:167:22
+  --> $DIR/typeck_type_placeholder_item.rs:173:22
    |
 LL | struct BadStruct1<_, _>(_);
    |                      ^ expected identifier, found reserved identifier
 
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/typeck_type_placeholder_item.rs:172:19
+  --> $DIR/typeck_type_placeholder_item.rs:178:19
    |
 LL | struct BadStruct2<_, T>(_, T);
    |                   ^ expected identifier, found reserved identifier
 
 error: associated constant in `impl` without body
-  --> $DIR/typeck_type_placeholder_item.rs:207:5
+  --> $DIR/typeck_type_placeholder_item.rs:215:5
    |
 LL |     const C: _;
    |     ^^^^^^^^^^-
@@ -37,7 +37,7 @@ LL |     const C: _;
    |               help: provide a definition for the constant: `= <expr>;`
 
 error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters
-  --> $DIR/typeck_type_placeholder_item.rs:167:22
+  --> $DIR/typeck_type_placeholder_item.rs:173:22
    |
 LL | struct BadStruct1<_, _>(_);
    |                   -  ^ already used
@@ -106,72 +106,87 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
    |
 LL | fn test6(_: _) { }
    |             ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - fn test6(_: _) { }
-LL + fn test6<T>(_: T) { }
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:25:18
    |
 LL | fn test6_b<T>(_: _, _: T) { }
    |                  ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - fn test6_b<T>(_: _, _: T) { }
-LL + fn test6_b<T, U>(_: U, _: T) { }
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:28:30
    |
 LL | fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
    |                              ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
-LL + fn test6_c<T, K, L, A, B, U>(_: U, _: (T, K, L, A, B)) { }
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:31:13
    |
 LL | fn test7(x: _) { let _x: usize = x; }
    |             ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - fn test7(x: _) { let _x: usize = x; }
-LL + fn test7<T>(x: T) { let _x: usize = x; }
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:34:22
    |
 LL | fn test8(_f: fn() -> _) { }
-   |                      ^
-   |                      |
-   |                      not allowed in type signatures
-   |                      help: use type parameters instead: `T`
+   |                      ^ not allowed in type signatures
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:34:22
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:66:8
    |
-LL | fn test8(_f: fn() -> _) { }
-   |                      ^ not allowed in type signatures
+LL |     a: _,
+   |        ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:68:9
    |
-help: use type parameters instead
+LL |     b: (_, _),
+   |         ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:68:12
+   |
+LL |     b: (_, _),
+   |            ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:123:12
+   |
+LL |         a: _,
+   |            ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:125:13
+   |
+LL |         b: (_, _),
+   |             ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:125:16
+   |
+LL |         b: (_, _),
+   |                ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:158:21
+   |
+LL | struct BadStruct<_>(_);
+   |                     ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:173:25
    |
-LL - fn test8(_f: fn() -> _) { }
-LL + fn test8<T>(_f: fn() -> T) { }
+LL | struct BadStruct1<_, _>(_);
+   |                         ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
+  --> $DIR/typeck_type_placeholder_item.rs:178:25
    |
+LL | struct BadStruct2<_, T>(_, T);
+   |                         ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/typeck_type_placeholder_item.rs:48:26
+  --> $DIR/typeck_type_placeholder_item.rs:47:26
    |
 LL | fn test11(x: &usize) -> &_ {
    |                         -^
@@ -180,7 +195,7 @@ LL | fn test11(x: &usize) -> &_ {
    |                         help: replace with the correct return type: `&&usize`
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/typeck_type_placeholder_item.rs:53:52
+  --> $DIR/typeck_type_placeholder_item.rs:52:52
    |
 LL | unsafe fn test12(x: *const usize) -> *const *const _ {
    |                                      --------------^
@@ -189,7 +204,7 @@ LL | unsafe fn test12(x: *const usize) -> *const *const _ {
    |                                      help: replace with the correct return type: `*const *const usize`
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:59:24
+  --> $DIR/typeck_type_placeholder_item.rs:58:24
    |
 LL |     fn clone(&self) -> _ { Test9 }
    |                        ^ not allowed in type signatures
@@ -201,7 +216,7 @@ LL +     fn clone(&self) -> Test9 { Test9 }
    |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:62:37
+  --> $DIR/typeck_type_placeholder_item.rs:61:37
    |
 LL |     fn clone_from(&mut self, other: _) { *self = Test9; }
    |                                     ^ not allowed in type signatures
@@ -212,33 +227,14 @@ LL -     fn clone_from(&mut self, other: _) { *self = Test9; }
 LL +     fn clone_from(&mut self, other: &Test9) { *self = Test9; }
    |
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
-  --> $DIR/typeck_type_placeholder_item.rs:67:8
-   |
-LL |     a: _,
-   |        ^ not allowed in type signatures
-LL |
-LL |     b: (_, _),
-   |         ^  ^ not allowed in type signatures
-   |         |
-   |         not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL ~ struct Test10<T> {
-LL ~     a: T,
-LL |
-LL ~     b: (T, T),
-   |
-
 error: missing type for `static` item
-  --> $DIR/typeck_type_placeholder_item.rs:73:13
+  --> $DIR/typeck_type_placeholder_item.rs:74:13
    |
 LL |     static A = 42;
    |             ^ help: provide a type for the static variable: `: i32`
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
-  --> $DIR/typeck_type_placeholder_item.rs:75:15
+  --> $DIR/typeck_type_placeholder_item.rs:76:15
    |
 LL |     static B: _ = 42;
    |               ^ not allowed in type signatures
@@ -250,7 +246,7 @@ LL +     static B: i32 = 42;
    |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
-  --> $DIR/typeck_type_placeholder_item.rs:77:22
+  --> $DIR/typeck_type_placeholder_item.rs:78:22
    |
 LL |     static C: Option<_> = Some(42);
    |                      ^ not allowed in type signatures
@@ -262,7 +258,7 @@ LL +     static C: Option<i32> = Some(42);
    |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/typeck_type_placeholder_item.rs:79:21
+  --> $DIR/typeck_type_placeholder_item.rs:80:21
    |
 LL |     fn fn_test() -> _ { 5 }
    |                     ^
@@ -271,7 +267,7 @@ LL |     fn fn_test() -> _ { 5 }
    |                     help: replace with the correct return type: `i32`
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/typeck_type_placeholder_item.rs:82:23
+  --> $DIR/typeck_type_placeholder_item.rs:83:23
    |
 LL |     fn fn_test2() -> (_, _) { (5, 5) }
    |                      -^--^-
@@ -281,7 +277,7 @@ LL |     fn fn_test2() -> (_, _) { (5, 5) }
    |                      help: replace with the correct return type: `(i32, i32)`
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
-  --> $DIR/typeck_type_placeholder_item.rs:85:22
+  --> $DIR/typeck_type_placeholder_item.rs:86:22
    |
 LL |     static FN_TEST3: _ = "test";
    |                      ^ not allowed in type signatures
@@ -293,7 +289,7 @@ LL +     static FN_TEST3: &str = "test";
    |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
-  --> $DIR/typeck_type_placeholder_item.rs:88:22
+  --> $DIR/typeck_type_placeholder_item.rs:89:22
    |
 LL |     static FN_TEST4: _ = 145;
    |                      ^ not allowed in type signatures
@@ -305,7 +301,7 @@ LL +     static FN_TEST4: i32 = 145;
    |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
-  --> $DIR/typeck_type_placeholder_item.rs:91:23
+  --> $DIR/typeck_type_placeholder_item.rs:92:23
    |
 LL |     static FN_TEST5: (_, _) = (1, 2);
    |                       ^  ^ not allowed in type signatures
@@ -319,49 +315,22 @@ LL +     static FN_TEST5: (i32, i32) = (1, 2);
    |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:94:20
+  --> $DIR/typeck_type_placeholder_item.rs:95:20
    |
 LL |     fn fn_test6(_: _) { }
    |                    ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn fn_test6(_: _) { }
-LL +     fn fn_test6<T>(_: T) { }
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:97:20
+  --> $DIR/typeck_type_placeholder_item.rs:98:20
    |
 LL |     fn fn_test7(x: _) { let _x: usize = x; }
    |                    ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn fn_test7(x: _) { let _x: usize = x; }
-LL +     fn fn_test7<T>(x: T) { let _x: usize = x; }
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:100:29
-   |
-LL |     fn fn_test8(_f: fn() -> _) { }
-   |                             ^
-   |                             |
-   |                             not allowed in type signatures
-   |                             help: use type parameters instead: `T`
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:100:29
+  --> $DIR/typeck_type_placeholder_item.rs:101:29
    |
 LL |     fn fn_test8(_f: fn() -> _) { }
    |                             ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn fn_test8(_f: fn() -> _) { }
-LL +     fn fn_test8<T>(_f: fn() -> T) { }
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
   --> $DIR/typeck_type_placeholder_item.rs:115:28
@@ -387,33 +356,14 @@ LL -         fn clone_from(&mut self, other: _) { *self = FnTest9; }
 LL +         fn clone_from(&mut self, other: &FnTest9) { *self = FnTest9; }
    |
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
-  --> $DIR/typeck_type_placeholder_item.rs:123:12
-   |
-LL |         a: _,
-   |            ^ not allowed in type signatures
-LL |
-LL |         b: (_, _),
-   |             ^  ^ not allowed in type signatures
-   |             |
-   |             not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL ~     struct FnTest10<T> {
-LL ~         a: T,
-LL |
-LL ~         b: (T, T),
-   |
-
 error[E0282]: type annotations needed
-  --> $DIR/typeck_type_placeholder_item.rs:128:21
+  --> $DIR/typeck_type_placeholder_item.rs:130:21
    |
 LL |     fn fn_test11(_: _) -> (_, _) { panic!() }
    |                     ^ cannot infer type
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/typeck_type_placeholder_item.rs:128:28
+  --> $DIR/typeck_type_placeholder_item.rs:130:28
    |
 LL |     fn fn_test11(_: _) -> (_, _) { panic!() }
    |                            ^  ^ not allowed in type signatures
@@ -421,7 +371,7 @@ LL |     fn fn_test11(_: _) -> (_, _) { panic!() }
    |                            not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/typeck_type_placeholder_item.rs:132:30
+  --> $DIR/typeck_type_placeholder_item.rs:134:30
    |
 LL |     fn fn_test12(x: i32) -> (_, _) { (x, x) }
    |                             -^--^-
@@ -431,7 +381,7 @@ LL |     fn fn_test12(x: i32) -> (_, _) { (x, x) }
    |                             help: replace with the correct return type: `(i32, i32)`
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/typeck_type_placeholder_item.rs:135:33
+  --> $DIR/typeck_type_placeholder_item.rs:137:33
    |
 LL |     fn fn_test13(x: _) -> (i32, _) { (x, x) }
    |                           ------^-
@@ -439,152 +389,116 @@ LL |     fn fn_test13(x: _) -> (i32, _) { (x, x) }
    |                           |     not allowed in type signatures
    |                           help: replace with the correct return type: `(i32, i32)`
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
-  --> $DIR/typeck_type_placeholder_item.rs:154:21
-   |
-LL | struct BadStruct<_>(_);
-   |                     ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - struct BadStruct<_>(_);
-LL + struct BadStruct<T>(T);
-   |
-
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:140:31
+  --> $DIR/typeck_type_placeholder_item.rs:142:31
    |
 LL |     fn method_test1(&self, x: _);
    |                               ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn method_test1(&self, x: _);
-LL +     fn method_test1<T>(&self, x: T);
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:142:31
+  --> $DIR/typeck_type_placeholder_item.rs:144:31
    |
 LL |     fn method_test2(&self, x: _) -> _;
-   |                               ^     ^ not allowed in type signatures
-   |                               |
-   |                               not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn method_test2(&self, x: _) -> _;
-LL +     fn method_test2<T>(&self, x: T) -> T;
+   |                               ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:144:37
    |
+LL |     fn method_test2(&self, x: _) -> _;
+   |                                     ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:144:31
+  --> $DIR/typeck_type_placeholder_item.rs:147:31
    |
 LL |     fn method_test3(&self) -> _;
    |                               ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn method_test3(&self) -> _;
-LL +     fn method_test3<T>(&self) -> T;
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:146:26
+  --> $DIR/typeck_type_placeholder_item.rs:149:26
    |
 LL |     fn assoc_fn_test1(x: _);
    |                          ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn assoc_fn_test1(x: _);
-LL +     fn assoc_fn_test1<T>(x: T);
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:148:26
+  --> $DIR/typeck_type_placeholder_item.rs:151:26
    |
 LL |     fn assoc_fn_test2(x: _) -> _;
-   |                          ^     ^ not allowed in type signatures
-   |                          |
-   |                          not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn assoc_fn_test2(x: _) -> _;
-LL +     fn assoc_fn_test2<T>(x: T) -> T;
+   |                          ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
+  --> $DIR/typeck_type_placeholder_item.rs:151:32
    |
+LL |     fn assoc_fn_test2(x: _) -> _;
+   |                                ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:150:28
+  --> $DIR/typeck_type_placeholder_item.rs:154:28
    |
 LL |     fn assoc_fn_test3() -> _;
    |                            ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
+  --> $DIR/typeck_type_placeholder_item.rs:163:32
    |
-help: use type parameters instead
-   |
-LL -     fn assoc_fn_test3() -> _;
-LL +     fn assoc_fn_test3<T>() -> T;
-   |
+LL | impl BadTrait<_> for BadStruct<_> {}
+   |                                ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
-  --> $DIR/typeck_type_placeholder_item.rs:159:15
+  --> $DIR/typeck_type_placeholder_item.rs:163:15
    |
 LL | impl BadTrait<_> for BadStruct<_> {}
-   |               ^                ^ not allowed in type signatures
-   |               |
-   |               not allowed in type signatures
+   |               ^ not allowed in type signatures
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:162:34
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
+  --> $DIR/typeck_type_placeholder_item.rs:167:34
    |
 LL | fn impl_trait() -> impl BadTrait<_> {
    |                                  ^ not allowed in type signatures
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
-  --> $DIR/typeck_type_placeholder_item.rs:167:25
-   |
-LL | struct BadStruct1<_, _>(_);
-   |                         ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL - struct BadStruct1<_, _>(_);
-LL + struct BadStruct1<T, _>(T);
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
+  --> $DIR/typeck_type_placeholder_item.rs:182:14
    |
+LL | type X = Box<_>;
+   |              ^ not allowed in type signatures
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
-  --> $DIR/typeck_type_placeholder_item.rs:172:25
-   |
-LL | struct BadStruct2<_, T>(_, T);
-   |                         ^ not allowed in type signatures
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
+  --> $DIR/typeck_type_placeholder_item.rs:188:21
    |
-help: use type parameters instead
+LL | type Y = impl Trait<_>;
+   |                     ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
+  --> $DIR/typeck_type_placeholder_item.rs:198:14
    |
-LL - struct BadStruct2<_, T>(_, T);
-LL + struct BadStruct2<U, T>(U, T);
+LL |     type B = _;
+   |              ^ not allowed in type signatures
+
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
+  --> $DIR/typeck_type_placeholder_item.rs:211:14
    |
+LL |     type A = _;
+   |              ^ not allowed in type signatures
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
-  --> $DIR/typeck_type_placeholder_item.rs:176:14
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
+  --> $DIR/typeck_type_placeholder_item.rs:213:14
    |
-LL | type X = Box<_>;
+LL |     type B = _;
    |              ^ not allowed in type signatures
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
-  --> $DIR/typeck_type_placeholder_item.rs:182:21
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
+  --> $DIR/typeck_type_placeholder_item.rs:200:14
    |
-LL | type Y = impl Trait<_>;
-   |                     ^ not allowed in type signatures
+LL |     const C: _;
+   |              ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
-  --> $DIR/typeck_type_placeholder_item.rs:207:14
+  --> $DIR/typeck_type_placeholder_item.rs:215:14
    |
 LL |     const C: _;
    |              ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
-  --> $DIR/typeck_type_placeholder_item.rs:195:14
+  --> $DIR/typeck_type_placeholder_item.rs:202:14
    |
 LL |     const D: _ = 42;
    |              ^ not allowed in type signatures
@@ -596,13 +510,13 @@ LL +     const D: i32 = 42;
    |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
-  --> $DIR/typeck_type_placeholder_item.rs:210:14
+  --> $DIR/typeck_type_placeholder_item.rs:218:14
    |
 LL |     const D: _ = 42;
    |              ^ not allowed in type signatures
 
 error[E0046]: not all trait items implemented, missing: `F`
-  --> $DIR/typeck_type_placeholder_item.rs:201:1
+  --> $DIR/typeck_type_placeholder_item.rs:209:1
    |
 LL |     type F: std::ops::Fn(_);
    |     ----------------------- `F` from trait
@@ -611,7 +525,7 @@ LL | impl Qux for Struct {
    | ^^^^^^^^^^^^^^^^^^^ missing `F` in implementation
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/typeck_type_placeholder_item.rs:218:31
+  --> $DIR/typeck_type_placeholder_item.rs:226:31
    |
 LL | fn value() -> Option<&'static _> {
    |               ----------------^-
@@ -620,7 +534,7 @@ LL | fn value() -> Option<&'static _> {
    |               help: replace with the correct return type: `Option<&'static u8>`
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
-  --> $DIR/typeck_type_placeholder_item.rs:223:17
+  --> $DIR/typeck_type_placeholder_item.rs:231:17
    |
 LL | const _: Option<_> = map(value);
    |                 ^ not allowed in type signatures
@@ -632,7 +546,7 @@ LL + const _: Option<u8> = map(value);
    |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/typeck_type_placeholder_item.rs:227:31
+  --> $DIR/typeck_type_placeholder_item.rs:235:31
    |
 LL | fn evens_squared(n: usize) -> _ {
    |                               ^
@@ -641,19 +555,19 @@ LL | fn evens_squared(n: usize) -> _ {
    |                               help: replace with an appropriate return type: `impl Iterator<Item = usize>`
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
-  --> $DIR/typeck_type_placeholder_item.rs:232:10
+  --> $DIR/typeck_type_placeholder_item.rs:240:10
    |
 LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
    |          ^ not allowed in type signatures
    |
-note: however, the inferred type `Map<Filter<Range<i32>, {closure@typeck_type_placeholder_item.rs:232:29}>, {closure@typeck_type_placeholder_item.rs:232:49}>` cannot be named
-  --> $DIR/typeck_type_placeholder_item.rs:232:14
+note: however, the inferred type `Map<Filter<Range<i32>, {closure@typeck_type_placeholder_item.rs:240:29}>, {closure@typeck_type_placeholder_item.rs:240:49}>` cannot be named
+  --> $DIR/typeck_type_placeholder_item.rs:240:14
    |
 LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/typeck_type_placeholder_item.rs:41:24
+  --> $DIR/typeck_type_placeholder_item.rs:40:24
    |
 LL |     fn test9(&self) -> _ { () }
    |                        ^
@@ -662,16 +576,10 @@ LL |     fn test9(&self) -> _ { () }
    |                        help: replace with the correct return type: `()`
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item.rs:44:27
+  --> $DIR/typeck_type_placeholder_item.rs:43:27
    |
 LL |     fn test10(&self, _x : _) { }
    |                           ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -     fn test10(&self, _x : _) { }
-LL +     fn test10<T>(&self, _x : T) { }
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
   --> $DIR/typeck_type_placeholder_item.rs:107:31
@@ -687,68 +595,62 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
    |
 LL |         fn fn_test10(&self, _x : _) { }
    |                                  ^ not allowed in type signatures
-   |
-help: use type parameters instead
-   |
-LL -         fn fn_test10(&self, _x : _) { }
-LL +         fn fn_test10<T>(&self, _x : T) { }
-   |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
-  --> $DIR/typeck_type_placeholder_item.rs:203:14
+  --> $DIR/typeck_type_placeholder_item.rs:205:26
    |
-LL |     type A = _;
-   |              ^ not allowed in type signatures
+LL |     type F: std::ops::Fn(_);
+   |                          ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
-  --> $DIR/typeck_type_placeholder_item.rs:205:14
+  --> $DIR/typeck_type_placeholder_item.rs:205:26
    |
-LL |     type B = _;
-   |              ^ not allowed in type signatures
-
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
-  --> $DIR/typeck_type_placeholder_item.rs:191:14
+LL |     type F: std::ops::Fn(_);
+   |                          ^ not allowed in type signatures
    |
-LL |     type B = _;
-   |              ^ not allowed in type signatures
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
-  --> $DIR/typeck_type_placeholder_item.rs:193:14
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
+  --> $DIR/typeck_type_placeholder_item.rs:167:34
    |
-LL |     const C: _;
-   |              ^ not allowed in type signatures
+LL | fn impl_trait() -> impl BadTrait<_> {
+   |                                  ^ not allowed in type signatures
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
-  --> $DIR/typeck_type_placeholder_item.rs:198:26
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
+  --> $DIR/typeck_type_placeholder_item.rs:188:21
    |
-LL |     type F: std::ops::Fn(_);
-   |                          ^ not allowed in type signatures
+LL | type Y = impl Trait<_>;
+   |                     ^ not allowed in type signatures
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0015]: cannot call non-const function `map::<u8>` in constants
-  --> $DIR/typeck_type_placeholder_item.rs:223:22
+  --> $DIR/typeck_type_placeholder_item.rs:231:22
    |
 LL | const _: Option<_> = map(value);
    |                      ^^^^^^^^^^
    |
    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
 
-error[E0015]: cannot call non-const method `<std::ops::Range<i32> as Iterator>::filter::<{closure@$DIR/typeck_type_placeholder_item.rs:232:29: 232:32}>` in constants
-  --> $DIR/typeck_type_placeholder_item.rs:232:22
+error[E0015]: cannot call non-const method `<std::ops::Range<i32> as Iterator>::filter::<{closure@$DIR/typeck_type_placeholder_item.rs:240:29: 240:32}>` in constants
+  --> $DIR/typeck_type_placeholder_item.rs:240:22
    |
 LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
    |                      ^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
 
-error[E0015]: cannot call non-const method `<Filter<std::ops::Range<i32>, {closure@$DIR/typeck_type_placeholder_item.rs:232:29: 232:32}> as Iterator>::map::<i32, {closure@$DIR/typeck_type_placeholder_item.rs:232:49: 232:52}>` in constants
-  --> $DIR/typeck_type_placeholder_item.rs:232:45
+error[E0015]: cannot call non-const method `<Filter<std::ops::Range<i32>, {closure@$DIR/typeck_type_placeholder_item.rs:240:29: 240:32}> as Iterator>::map::<i32, {closure@$DIR/typeck_type_placeholder_item.rs:240:49: 240:52}>` in constants
+  --> $DIR/typeck_type_placeholder_item.rs:240:45
    |
 LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
    |                                             ^^^^^^^^^^^^^^
    |
    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
 
-error: aborting due to 75 previous errors
+error: aborting due to 83 previous errors
 
 Some errors have detailed explanations: E0015, E0046, E0121, E0282, E0403.
 For more information about an error, try `rustc --explain E0015`.
diff --git a/tests/ui/typeck/typeck_type_placeholder_item_help.rs b/tests/ui/typeck/typeck_type_placeholder_item_help.rs
index ff6182588c7..ab433aaaf16 100644
--- a/tests/ui/typeck/typeck_type_placeholder_item_help.rs
+++ b/tests/ui/typeck/typeck_type_placeholder_item_help.rs
@@ -11,8 +11,7 @@ const TEST3: _ = Some(42);
 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
 
 const TEST4: fn() -> _ = 42;
-//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
-//~| ERROR the placeholder `_` is not allowed within types on item signatures for constant items
+//~^ ERROR the placeholder `_` is not allowed within types on item signatures for constant items
 
 trait Test5 {
     const TEST5: _ = 42;
diff --git a/tests/ui/typeck/typeck_type_placeholder_item_help.stderr b/tests/ui/typeck/typeck_type_placeholder_item_help.stderr
index afdd58e0a03..5066e2eaa52 100644
--- a/tests/ui/typeck/typeck_type_placeholder_item_help.stderr
+++ b/tests/ui/typeck/typeck_type_placeholder_item_help.stderr
@@ -31,12 +31,6 @@ LL - const TEST3: _ = Some(42);
 LL + const TEST3: Option<i32> = Some(42);
    |
 
-error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/typeck_type_placeholder_item_help.rs:13:22
-   |
-LL | const TEST4: fn() -> _ = 42;
-   |                      ^ not allowed in type signatures
-
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constant items
   --> $DIR/typeck_type_placeholder_item_help.rs:13:22
    |
@@ -44,7 +38,7 @@ LL | const TEST4: fn() -> _ = 42;
    |                      ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
-  --> $DIR/typeck_type_placeholder_item_help.rs:25:18
+  --> $DIR/typeck_type_placeholder_item_help.rs:24:18
    |
 LL |     const TEST6: _ = 13;
    |                  ^ not allowed in type signatures
@@ -56,7 +50,7 @@ LL +     const TEST6: i32 = 13;
    |
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
-  --> $DIR/typeck_type_placeholder_item_help.rs:18:18
+  --> $DIR/typeck_type_placeholder_item_help.rs:17:18
    |
 LL |     const TEST5: _ = 42;
    |                  ^ not allowed in type signatures
@@ -68,7 +62,7 @@ LL +     const TEST5: i32 = 42;
    |
 
 error[E0308]: mismatched types
-  --> $DIR/typeck_type_placeholder_item_help.rs:30:28
+  --> $DIR/typeck_type_placeholder_item_help.rs:29:28
    |
 LL |     let _: Option<usize> = test1();
    |            -------------   ^^^^^^^ expected `Option<usize>`, found `Option<i32>`
@@ -79,7 +73,7 @@ LL |     let _: Option<usize> = test1();
               found enum `Option<i32>`
 
 error[E0308]: mismatched types
-  --> $DIR/typeck_type_placeholder_item_help.rs:31:18
+  --> $DIR/typeck_type_placeholder_item_help.rs:30:18
    |
 LL |     let _: f64 = test1();
    |            ---   ^^^^^^^ expected `f64`, found `Option<i32>`
@@ -89,7 +83,7 @@ LL |     let _: f64 = test1();
    = note: expected type `f64`
               found enum `Option<i32>`
 
-error: aborting due to 9 previous errors
+error: aborting due to 8 previous errors
 
 Some errors have detailed explanations: E0121, E0308.
 For more information about an error, try `rustc --explain E0121`.
diff --git a/tests/ui/underscore-imports/issue-110164.stderr b/tests/ui/underscore-imports/issue-110164.ed2015.stderr
index d8a4b6bbb75..f34b5ab5dde 100644
--- a/tests/ui/underscore-imports/issue-110164.stderr
+++ b/tests/ui/underscore-imports/issue-110164.ed2015.stderr
@@ -1,17 +1,17 @@
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/issue-110164.rs:5:5
+  --> $DIR/issue-110164.rs:8:5
    |
 LL | use _::a;
    |     ^ expected identifier, found reserved identifier
 
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/issue-110164.rs:8:5
+  --> $DIR/issue-110164.rs:10:5
    |
 LL | use _::*;
    |     ^ expected identifier, found reserved identifier
 
 error: expected identifier, found reserved identifier `_`
-  --> $DIR/issue-110164.rs:13:9
+  --> $DIR/issue-110164.rs:14:9
    |
 LL |     use _::a;
    |         ^ expected identifier, found reserved identifier
@@ -23,41 +23,17 @@ LL |     use _::*;
    |         ^ expected identifier, found reserved identifier
 
 error[E0432]: unresolved import `self::*`
-  --> $DIR/issue-110164.rs:1:5
+  --> $DIR/issue-110164.rs:4:5
    |
 LL | use self::*;
    |     ^^^^^^^ cannot glob-import a module into itself
 
 error[E0432]: unresolved import `crate::*`
-  --> $DIR/issue-110164.rs:3:5
+  --> $DIR/issue-110164.rs:6:5
    |
 LL | use crate::*;
    |     ^^^^^^^^ cannot glob-import a module into itself
 
-error[E0432]: unresolved import `_`
-  --> $DIR/issue-110164.rs:8:5
-   |
-LL | use _::*;
-   |     ^ `_` is not a valid crate or module name
-
-error[E0432]: unresolved import `_`
-  --> $DIR/issue-110164.rs:5:5
-   |
-LL | use _::a;
-   |     ^ `_` is not a valid crate or module name
-
-error[E0432]: unresolved import `_`
-  --> $DIR/issue-110164.rs:13:9
-   |
-LL |     use _::a;
-   |         ^ `_` is not a valid crate or module name
-
-error[E0432]: unresolved import `_`
-  --> $DIR/issue-110164.rs:16:9
-   |
-LL |     use _::*;
-   |         ^ `_` is not a valid crate or module name
-
-error: aborting due to 10 previous errors
+error: aborting due to 6 previous errors
 
 For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/underscore-imports/issue-110164.ed2021.stderr b/tests/ui/underscore-imports/issue-110164.ed2021.stderr
new file mode 100644
index 00000000000..f34b5ab5dde
--- /dev/null
+++ b/tests/ui/underscore-imports/issue-110164.ed2021.stderr
@@ -0,0 +1,39 @@
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/issue-110164.rs:8:5
+   |
+LL | use _::a;
+   |     ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/issue-110164.rs:10:5
+   |
+LL | use _::*;
+   |     ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/issue-110164.rs:14:9
+   |
+LL |     use _::a;
+   |         ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/issue-110164.rs:16:9
+   |
+LL |     use _::*;
+   |         ^ expected identifier, found reserved identifier
+
+error[E0432]: unresolved import `self::*`
+  --> $DIR/issue-110164.rs:4:5
+   |
+LL | use self::*;
+   |     ^^^^^^^ cannot glob-import a module into itself
+
+error[E0432]: unresolved import `crate::*`
+  --> $DIR/issue-110164.rs:6:5
+   |
+LL | use crate::*;
+   |     ^^^^^^^^ cannot glob-import a module into itself
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/underscore-imports/issue-110164.rs b/tests/ui/underscore-imports/issue-110164.rs
index 6fd13414500..bb080c5e471 100644
--- a/tests/ui/underscore-imports/issue-110164.rs
+++ b/tests/ui/underscore-imports/issue-110164.rs
@@ -1,19 +1,18 @@
+//@ revisions: ed2015 ed2021
+//@[ed2015] edition: 2015
+//@[ed2021] edition: 2021
 use self::*;
 //~^ ERROR unresolved import `self::*`
 use crate::*;
 //~^ ERROR unresolved import `crate::*`
 use _::a;
 //~^ ERROR expected identifier, found reserved identifier `_`
-//~| ERROR unresolved import `_`
 use _::*;
 //~^ ERROR expected identifier, found reserved identifier `_`
-//~| ERROR unresolved import `_`
 
 fn main() {
     use _::a;
     //~^ ERROR expected identifier, found reserved identifier `_`
-    //~| ERROR unresolved import `_`
     use _::*;
     //~^ ERROR expected identifier, found reserved identifier `_`
-    //~| ERROR unresolved import `_`
 }
diff --git a/tests/ui/underscore-imports/multiple-uses.ed2015.stderr b/tests/ui/underscore-imports/multiple-uses.ed2015.stderr
new file mode 100644
index 00000000000..a295586fa16
--- /dev/null
+++ b/tests/ui/underscore-imports/multiple-uses.ed2015.stderr
@@ -0,0 +1,49 @@
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/multiple-uses.rs:4:9
+   |
+LL | pub use _::{a, b};
+   |         ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/multiple-uses.rs:6:18
+   |
+LL | pub use std::{a, _};
+   |                  ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/multiple-uses.rs:9:18
+   |
+LL | pub use std::{b, _, c};
+   |                  ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/multiple-uses.rs:12:15
+   |
+LL | pub use std::{_, d};
+   |               ^ expected identifier, found reserved identifier
+
+error[E0432]: unresolved import `std::a`
+  --> $DIR/multiple-uses.rs:6:15
+   |
+LL | pub use std::{a, _};
+   |               ^ no `a` in the root
+
+error[E0432]: unresolved imports `std::b`, `std::c`
+  --> $DIR/multiple-uses.rs:9:15
+   |
+LL | pub use std::{b, _, c};
+   |               ^     ^
+   |               |     |
+   |               |     no `c` in the root
+   |               |     help: a similar name exists in the module: `rc`
+   |               no `b` in the root
+
+error[E0432]: unresolved import `std::d`
+  --> $DIR/multiple-uses.rs:12:18
+   |
+LL | pub use std::{_, d};
+   |                  ^ no `d` in the root
+
+error: aborting due to 7 previous errors
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/underscore-imports/multiple-uses.ed2021.stderr b/tests/ui/underscore-imports/multiple-uses.ed2021.stderr
new file mode 100644
index 00000000000..a295586fa16
--- /dev/null
+++ b/tests/ui/underscore-imports/multiple-uses.ed2021.stderr
@@ -0,0 +1,49 @@
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/multiple-uses.rs:4:9
+   |
+LL | pub use _::{a, b};
+   |         ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/multiple-uses.rs:6:18
+   |
+LL | pub use std::{a, _};
+   |                  ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/multiple-uses.rs:9:18
+   |
+LL | pub use std::{b, _, c};
+   |                  ^ expected identifier, found reserved identifier
+
+error: expected identifier, found reserved identifier `_`
+  --> $DIR/multiple-uses.rs:12:15
+   |
+LL | pub use std::{_, d};
+   |               ^ expected identifier, found reserved identifier
+
+error[E0432]: unresolved import `std::a`
+  --> $DIR/multiple-uses.rs:6:15
+   |
+LL | pub use std::{a, _};
+   |               ^ no `a` in the root
+
+error[E0432]: unresolved imports `std::b`, `std::c`
+  --> $DIR/multiple-uses.rs:9:15
+   |
+LL | pub use std::{b, _, c};
+   |               ^     ^
+   |               |     |
+   |               |     no `c` in the root
+   |               |     help: a similar name exists in the module: `rc`
+   |               no `b` in the root
+
+error[E0432]: unresolved import `std::d`
+  --> $DIR/multiple-uses.rs:12:18
+   |
+LL | pub use std::{_, d};
+   |                  ^ no `d` in the root
+
+error: aborting due to 7 previous errors
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/underscore-imports/multiple-uses.rs b/tests/ui/underscore-imports/multiple-uses.rs
new file mode 100644
index 00000000000..31dd1862429
--- /dev/null
+++ b/tests/ui/underscore-imports/multiple-uses.rs
@@ -0,0 +1,16 @@
+//@ revisions: ed2015 ed2021
+//@[ed2015] edition: 2015
+//@[ed2021] edition: 2021
+pub use _::{a, b};
+//~^ ERROR expected identifier, found reserved identifier `_`
+pub use std::{a, _};
+//~^ ERROR expected identifier, found reserved identifier `_`
+//~| ERROR unresolved import `std::a`
+pub use std::{b, _, c};
+//~^ ERROR expected identifier, found reserved identifier `_`
+//~| ERROR unresolved imports `std::b`, `std::c`
+pub use std::{_, d};
+//~^ ERROR expected identifier, found reserved identifier `_`
+//~| ERROR unresolved import `std::d`
+
+fn main() {}
diff --git a/tests/ui/unpretty/ast-const-trait-bound.rs b/tests/ui/unpretty/ast-const-trait-bound.rs
index f4de86bb0d0..761bff87a62 100644
--- a/tests/ui/unpretty/ast-const-trait-bound.rs
+++ b/tests/ui/unpretty/ast-const-trait-bound.rs
@@ -1,4 +1,4 @@
 //@ compile-flags: -Zunpretty=normal
 //@ check-pass
 
-fn foo() where T: ~const Bar {}
+fn foo() where T: [const] Bar {}
diff --git a/tests/ui/unpretty/ast-const-trait-bound.stdout b/tests/ui/unpretty/ast-const-trait-bound.stdout
index f4de86bb0d0..761bff87a62 100644
--- a/tests/ui/unpretty/ast-const-trait-bound.stdout
+++ b/tests/ui/unpretty/ast-const-trait-bound.stdout
@@ -1,4 +1,4 @@
 //@ compile-flags: -Zunpretty=normal
 //@ check-pass
 
-fn foo() where T: ~const Bar {}
+fn foo() where T: [const] Bar {}
diff --git a/tests/ui/unpretty/deprecated-attr.rs b/tests/ui/unpretty/deprecated-attr.rs
index 0c80203e965..e2ab5efb5d8 100644
--- a/tests/ui/unpretty/deprecated-attr.rs
+++ b/tests/ui/unpretty/deprecated-attr.rs
@@ -16,3 +16,8 @@ pub struct SinceAndNote;
 
 #[deprecated(note = "here's why this is deprecated", since = "1.2.3")]
 pub struct FlippedOrder;
+
+pub fn f() {
+    // Attribute is ignored here (with a warning), but still preserved in HIR
+    #[deprecated] 0
+}
diff --git a/tests/ui/unpretty/deprecated-attr.stdout b/tests/ui/unpretty/deprecated-attr.stdout
index 97d863b2e94..a2b645d00d0 100644
--- a/tests/ui/unpretty/deprecated-attr.stdout
+++ b/tests/ui/unpretty/deprecated-attr.stdout
@@ -24,3 +24,12 @@ struct SinceAndNote;
 #[attr = Deprecation {deprecation: Deprecation {since: NonStandard("1.2.3"),
 note: "here's why this is deprecated"}}]
 struct FlippedOrder;
+
+fn f() {
+
+    // Attribute is ignored here (with a warning), but still preserved in HIR
+    #[attr = Deprecation {deprecation:
+    Deprecation {since:
+    Unspecified}}]
+    0
+}
diff --git a/tests/ui/unpretty/diagnostic-attr.stdout b/tests/ui/unpretty/diagnostic-attr.stdout
index 81d71b91d81..3b15a845d68 100644
--- a/tests/ui/unpretty/diagnostic-attr.stdout
+++ b/tests/ui/unpretty/diagnostic-attr.stdout
@@ -12,6 +12,4 @@ extern crate std;
 trait ImportantTrait<A> { }
 
 #[diagnostic::do_not_recommend]
-impl <T> ImportantTrait<T> for T where T: Clone
-    {#![diagnostic::do_not_recommend]
-}
+impl <T> ImportantTrait<T> for T where T: Clone { }
diff --git a/tests/ui/unpretty/exhaustive-asm.hir.stdout b/tests/ui/unpretty/exhaustive-asm.hir.stdout
index 810db69bff1..ec9bda57331 100644
--- a/tests/ui/unpretty/exhaustive-asm.hir.stdout
+++ b/tests/ui/unpretty/exhaustive-asm.hir.stdout
@@ -26,7 +26,7 @@ mod expressions {
 
 mod items {
     /// ItemKind::GlobalAsm
-    mod item_global_asm {/// ItemKind::GlobalAsm
+    mod item_global_asm {
         global_asm! (".globl my_asm_func");
     }
 }
diff --git a/tests/ui/unpretty/exhaustive.expanded.stdout b/tests/ui/unpretty/exhaustive.expanded.stdout
index cd1a5d0af08..9df027b69b2 100644
--- a/tests/ui/unpretty/exhaustive.expanded.stdout
+++ b/tests/ui/unpretty/exhaustive.expanded.stdout
@@ -12,7 +12,6 @@
 #![feature(auto_traits)]
 #![feature(box_patterns)]
 #![feature(builtin_syntax)]
-#![feature(concat_idents)]
 #![feature(const_trait_impl)]
 #![feature(decl_macro)]
 #![feature(deref_patterns)]
@@ -309,7 +308,6 @@ mod expressions {
 
 
 
-        // concat_idents is deprecated
 
 
 
@@ -606,7 +604,7 @@ mod types {
         let _: impl Send + 'static;
         let _: impl 'static + Send;
         let _: impl ?Sized;
-        let _: impl ~const Clone;
+        let _: impl [const] Clone;
         let _: impl for<'a> Send;
     }
     /// TyKind::Paren
@@ -622,8 +620,12 @@ mod types {
         /*! there is no syntax for this */
     }
     /// TyKind::MacCall
-    #[expect(deprecated)]
-    fn ty_mac_call() { let _: T; let _: T; let _: T; }
+    fn ty_mac_call() {
+        macro_rules! ty { ($ty:ty) => { $ty } }
+        let _: T;
+        let _: T;
+        let _: T;
+    }
     /// TyKind::CVarArgs
     fn ty_c_var_args() {
         /*! FIXME: todo */
diff --git a/tests/ui/unpretty/exhaustive.hir.stderr b/tests/ui/unpretty/exhaustive.hir.stderr
index 58f7ff0f598..ac8079ae089 100644
--- a/tests/ui/unpretty/exhaustive.hir.stderr
+++ b/tests/ui/unpretty/exhaustive.hir.stderr
@@ -1,17 +1,17 @@
 error[E0697]: closures cannot be static
-  --> $DIR/exhaustive.rs:211:9
+  --> $DIR/exhaustive.rs:210:9
    |
 LL |         static || value;
    |         ^^^^^^^^^
 
 error[E0697]: closures cannot be static
-  --> $DIR/exhaustive.rs:212:9
+  --> $DIR/exhaustive.rs:211:9
    |
 LL |         static move || value;
    |         ^^^^^^^^^^^^^^
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/exhaustive.rs:241:13
+  --> $DIR/exhaustive.rs:240:13
    |
 LL |     fn expr_await() {
    |     --------------- this is not `async`
@@ -20,19 +20,19 @@ LL |         fut.await;
    |             ^^^^^ only allowed inside `async` functions and blocks
 
 error: in expressions, `_` can only be used on the left-hand side of an assignment
-  --> $DIR/exhaustive.rs:290:9
+  --> $DIR/exhaustive.rs:289:9
    |
 LL |         _;
    |         ^ `_` not allowed here
 
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/exhaustive.rs:300:9
+  --> $DIR/exhaustive.rs:299:9
    |
 LL |         x::();
    |         ^^^^^ only `Fn` traits may use parentheses
 
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/exhaustive.rs:301:9
+  --> $DIR/exhaustive.rs:300:9
    |
 LL |         x::(T, T) -> T;
    |         ^^^^^^^^^^^^^^ only `Fn` traits may use parentheses
@@ -44,31 +44,31 @@ LL +         x::<T, T> -> T;
    |
 
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/exhaustive.rs:302:9
+  --> $DIR/exhaustive.rs:301:9
    |
 LL |         crate::() -> ()::expressions::() -> ()::expr_path;
    |         ^^^^^^^^^^^^^^^ only `Fn` traits may use parentheses
 
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/exhaustive.rs:302:26
+  --> $DIR/exhaustive.rs:301:26
    |
 LL |         crate::() -> ()::expressions::() -> ()::expr_path;
    |                          ^^^^^^^^^^^^^^^^^^^^^ only `Fn` traits may use parentheses
 
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/exhaustive.rs:305:9
+  --> $DIR/exhaustive.rs:304:9
    |
 LL |         core::()::marker::()::PhantomData;
    |         ^^^^^^^^ only `Fn` traits may use parentheses
 
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/exhaustive.rs:305:19
+  --> $DIR/exhaustive.rs:304:19
    |
 LL |         core::()::marker::()::PhantomData;
    |                   ^^^^^^^^^^ only `Fn` traits may use parentheses
 
 error: `yield` can only be used in `#[coroutine]` closures, or `gen` blocks
-  --> $DIR/exhaustive.rs:392:9
+  --> $DIR/exhaustive.rs:391:9
    |
 LL |         yield;
    |         ^^^^^
@@ -79,7 +79,7 @@ LL |     #[coroutine] fn expr_yield() {
    |     ++++++++++++
 
 error[E0703]: invalid ABI: found `C++`
-  --> $DIR/exhaustive.rs:472:23
+  --> $DIR/exhaustive.rs:471:23
    |
 LL |         unsafe extern "C++" {}
    |                       ^^^^^ invalid ABI
@@ -87,7 +87,7 @@ LL |         unsafe extern "C++" {}
    = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
 
 error: `..` patterns are not allowed here
-  --> $DIR/exhaustive.rs:679:13
+  --> $DIR/exhaustive.rs:678:13
    |
 LL |         let ..;
    |             ^^
@@ -95,13 +95,13 @@ LL |         let ..;
    = note: only allowed in tuple, tuple struct, and slice patterns
 
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/exhaustive.rs:794:16
+  --> $DIR/exhaustive.rs:793:16
    |
 LL |         let _: T() -> !;
    |                ^^^^^^^^ only `Fn` traits may use parentheses
 
 error[E0562]: `impl Trait` is not allowed in the type of variable bindings
-  --> $DIR/exhaustive.rs:809:16
+  --> $DIR/exhaustive.rs:808:16
    |
 LL |         let _: impl Send;
    |                ^^^^^^^^^
@@ -112,7 +112,7 @@ LL |         let _: impl Send;
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0562]: `impl Trait` is not allowed in the type of variable bindings
-  --> $DIR/exhaustive.rs:810:16
+  --> $DIR/exhaustive.rs:809:16
    |
 LL |         let _: impl Send + 'static;
    |                ^^^^^^^^^^^^^^^^^^^
@@ -123,7 +123,7 @@ LL |         let _: impl Send + 'static;
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0562]: `impl Trait` is not allowed in the type of variable bindings
-  --> $DIR/exhaustive.rs:811:16
+  --> $DIR/exhaustive.rs:810:16
    |
 LL |         let _: impl 'static + Send;
    |                ^^^^^^^^^^^^^^^^^^^
@@ -134,7 +134,7 @@ LL |         let _: impl 'static + Send;
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0562]: `impl Trait` is not allowed in the type of variable bindings
-  --> $DIR/exhaustive.rs:812:16
+  --> $DIR/exhaustive.rs:811:16
    |
 LL |         let _: impl ?Sized;
    |                ^^^^^^^^^^^
@@ -145,10 +145,10 @@ LL |         let _: impl ?Sized;
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0562]: `impl Trait` is not allowed in the type of variable bindings
-  --> $DIR/exhaustive.rs:813:16
+  --> $DIR/exhaustive.rs:812:16
    |
-LL |         let _: impl ~const Clone;
-   |                ^^^^^^^^^^^^^^^^^
+LL |         let _: impl [const] Clone;
+   |                ^^^^^^^^^^^^^^^^^^
    |
    = note: `impl Trait` is only allowed in arguments and return types of functions and methods
    = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
@@ -156,7 +156,7 @@ LL |         let _: impl ~const Clone;
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0562]: `impl Trait` is not allowed in the type of variable bindings
-  --> $DIR/exhaustive.rs:814:16
+  --> $DIR/exhaustive.rs:813:16
    |
 LL |         let _: impl for<'a> Send;
    |                ^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/unpretty/exhaustive.hir.stdout b/tests/ui/unpretty/exhaustive.hir.stdout
index 5d6e3907d75..2d347ec6e88 100644
--- a/tests/ui/unpretty/exhaustive.hir.stdout
+++ b/tests/ui/unpretty/exhaustive.hir.stdout
@@ -11,7 +11,6 @@
 #![feature(auto_traits)]
 #![feature(box_patterns)]
 #![feature(builtin_syntax)]
-#![feature(concat_idents)]
 #![feature(const_trait_impl)]
 #![feature(decl_macro)]
 #![feature(deref_patterns)]
@@ -50,20 +49,14 @@ mod prelude {
     }
 }
 
-//! inner single-line doc comment
-/*!
+/// inner single-line doc comment
+/**
      * inner multi-line doc comment
      */
 #[doc = "inner doc attribute"]
 #[allow(dead_code, unused_variables)]
 #[no_std]
-mod attributes {//! inner single-line doc comment
-    /*!
-     * inner multi-line doc comment
-     */
-    #![doc = "inner doc attribute"]
-    #![allow(dead_code, unused_variables)]
-    #![no_std]
+mod attributes {
 
     /// outer single-line doc comment
     /**
@@ -349,7 +342,6 @@ mod expressions {
 
 
 
-        // concat_idents is deprecated
 
 
 
@@ -413,25 +405,25 @@ mod expressions {
 }
 mod items {
     /// ItemKind::ExternCrate
-    mod item_extern_crate {/// ItemKind::ExternCrate
+    mod item_extern_crate {
         extern crate core;
         extern crate self as unpretty;
         extern crate core as _;
     }
     /// ItemKind::Use
-    mod item_use {/// ItemKind::Use
+    mod item_use {
         use ::{};
         use crate::expressions;
         use crate::items::item_use;
         use core::*;
     }
     /// ItemKind::Static
-    mod item_static {/// ItemKind::Static
+    mod item_static {
         static A: () = { };
         static mut B: () = { };
     }
     /// ItemKind::Const
-    mod item_const {/// ItemKind::Const
+    mod item_const {
         const A: () = { };
         trait TraitItems {
             const
@@ -445,7 +437,7 @@ mod items {
         }
     }
     /// ItemKind::Fn
-    mod item_fn {/// ItemKind::Fn
+    mod item_fn {
         const unsafe extern "C" fn f() { }
         async unsafe extern "C" fn g()
             ->
@@ -460,21 +452,19 @@ mod items {
         }
     }
     /// ItemKind::Mod
-    mod item_mod {/// ItemKind::Mod
-    }
+    mod item_mod { }
     /// ItemKind::ForeignMod
-    mod item_foreign_mod {/// ItemKind::ForeignMod
+    mod item_foreign_mod {
         extern "Rust" { }
         extern "C" { }
     }
     /// ItemKind::GlobalAsm: see exhaustive-asm.rs
     /// ItemKind::TyAlias
-    mod item_ty_alias {/// ItemKind::GlobalAsm: see exhaustive-asm.rs
-        /// ItemKind::TyAlias
+    mod item_ty_alias {
         type Type<'a> where T: 'a = T;
     }
     /// ItemKind::Enum
-    mod item_enum {/// ItemKind::Enum
+    mod item_enum {
         enum Void { }
         enum Empty {
             Unit,
@@ -490,7 +480,7 @@ mod items {
         }
     }
     /// ItemKind::Struct
-    mod item_struct {/// ItemKind::Struct
+    mod item_struct {
         struct Unit;
         struct Tuple();
         struct Newtype(Unit);
@@ -501,45 +491,40 @@ mod items {
         }
     }
     /// ItemKind::Union
-    mod item_union {/// ItemKind::Union
+    mod item_union {
         union Generic<'a, T> where T: 'a {
             t: T,
         }
     }
     /// ItemKind::Trait
-    mod item_trait {/// ItemKind::Trait
+    mod item_trait {
         auto unsafe trait Send { }
         trait Trait<'a>: Sized where Self: 'a { }
     }
     /// ItemKind::TraitAlias
-    mod item_trait_alias {/// ItemKind::TraitAlias
+    mod item_trait_alias {
         trait Trait<T> = Sized where for<'a> T: 'a;
     }
     /// ItemKind::Impl
-    mod item_impl {/// ItemKind::Impl
+    mod item_impl {
         impl () { }
         impl <T> () { }
         impl Default for () { }
         impl const <T> Default for () { }
     }
     /// ItemKind::MacCall
-    mod item_mac_call {/// ItemKind::MacCall
-    }
+    mod item_mac_call { }
     /// ItemKind::MacroDef
-    mod item_macro_def {/// ItemKind::MacroDef
+    mod item_macro_def {
         macro_rules! mac { () => {...}; }
         macro stringify { () => {} }
     }
     /// ItemKind::Delegation
-    /*! FIXME: todo */
-    mod item_delegation {/// ItemKind::Delegation
-        /*! FIXME: todo */
-    }
+    /** FIXME: todo */
+    mod item_delegation { }
     /// ItemKind::DelegationMac
-    /*! FIXME: todo */
-    mod item_delegation_mac {/// ItemKind::DelegationMac
-        /*! FIXME: todo */
-    }
+    /** FIXME: todo */
+    mod item_delegation_mac { }
 }
 mod patterns {
     /// PatKind::Missing
@@ -690,29 +675,33 @@ mod types {
     /// TyKind::Paren
     fn ty_paren() { let _: T; }
     /// TyKind::Typeof
-    /*! unused for now */
+    /** unused for now */
     fn ty_typeof() { }
     /// TyKind::Infer
     fn ty_infer() { let _: _; }
     /// TyKind::ImplicitSelf
-    /*! there is no syntax for this */
+    /** there is no syntax for this */
     fn ty_implicit_self() { }
     /// TyKind::MacCall
-    #[expect(deprecated)]
-    fn ty_mac_call() { let _: T; let _: T; let _: T; }
+    fn ty_mac_call() {
+        macro_rules! ty { ($ty:ty) => { $ty } }
+        let _: T;
+        let _: T;
+        let _: T;
+    }
     /// TyKind::CVarArgs
-    /*! FIXME: todo */
+    /** FIXME: todo */
     fn ty_c_var_args() { }
     /// TyKind::Pat
     fn ty_pat() { let _: u32 is 1..=RangeMax; }
 }
 mod visibilities {
     /// VisibilityKind::Public
-    mod visibility_public {/// VisibilityKind::Public
+    mod visibility_public {
         struct Pub;
     }
     /// VisibilityKind::Restricted
-    mod visibility_restricted {/// VisibilityKind::Restricted
+    mod visibility_restricted {
         struct PubCrate;
         struct PubSelf;
         struct PubSuper;
diff --git a/tests/ui/unpretty/exhaustive.rs b/tests/ui/unpretty/exhaustive.rs
index 60ad3564689..5bf1118058c 100644
--- a/tests/ui/unpretty/exhaustive.rs
+++ b/tests/ui/unpretty/exhaustive.rs
@@ -11,7 +11,6 @@
 #![feature(auto_traits)]
 #![feature(box_patterns)]
 #![feature(builtin_syntax)]
-#![feature(concat_idents)]
 #![feature(const_trait_impl)]
 #![feature(decl_macro)]
 #![feature(deref_patterns)]
@@ -810,7 +809,7 @@ mod types {
         let _: impl Send + 'static;     //[hir]~ ERROR `impl Trait` is not allowed
         let _: impl 'static + Send;     //[hir]~ ERROR `impl Trait` is not allowed
         let _: impl ?Sized;             //[hir]~ ERROR `impl Trait` is not allowed
-        let _: impl ~const Clone;       //[hir]~ ERROR `impl Trait` is not allowed
+        let _: impl [const] Clone;       //[hir]~ ERROR `impl Trait` is not allowed
         let _: impl for<'a> Send;       //[hir]~ ERROR `impl Trait` is not allowed
     }
 
@@ -835,11 +834,13 @@ mod types {
     }
 
     /// TyKind::MacCall
-    #[expect(deprecated)] // concat_idents is deprecated
     fn ty_mac_call() {
-        let _: concat_idents!(T);
-        let _: concat_idents![T];
-        let _: concat_idents! { T };
+        macro_rules! ty {
+            ($ty:ty) => { $ty }
+        }
+        let _: ty!(T);
+        let _: ty![T];
+        let _: ty! { T };
     }
 
     /// TyKind::CVarArgs
diff --git a/tests/ui/unsized-locals/yote.rs b/tests/ui/unsized-locals/yote.rs
index aa5b68a3078..1de75a6ce61 100644
--- a/tests/ui/unsized-locals/yote.rs
+++ b/tests/ui/unsized-locals/yote.rs
@@ -1,4 +1,2 @@
-//@ normalize-stderr: "you are using [0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?( \([^)]*\))?" -> "you are using $$RUSTC_VERSION"
-
 #![feature(unsized_locals)] //~ERROR feature has been removed
 #![crate_type = "lib"]
diff --git a/tests/ui/unsized-locals/yote.stderr b/tests/ui/unsized-locals/yote.stderr
index 655aad5360c..8e7da64038a 100644
--- a/tests/ui/unsized-locals/yote.stderr
+++ b/tests/ui/unsized-locals/yote.stderr
@@ -1,10 +1,10 @@
 error[E0557]: feature has been removed
-  --> $DIR/yote.rs:3:12
+  --> $DIR/yote.rs:1:12
    |
 LL | #![feature(unsized_locals)]
    |            ^^^^^^^^^^^^^^ feature has been removed
    |
-   = note: removed in CURRENT_RUSTC_VERSION (you are using $RUSTC_VERSION)
+   = note: removed in CURRENT_RUSTC_VERSION
    = note: removed due to implementation concerns; see https://github.com/rust-lang/rust/issues/111942
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs
index 53f07a94fd1..ad7d972879f 100644
--- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs
+++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs
@@ -5,7 +5,6 @@ trait Trait<const N: dyn Trait = bar> {
         //~^ ERROR the name `N` is already used for a generic parameter in this item's generic parameters
         //~| ERROR expected value, found builtin type `u32`
         //~| ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-        //~| ERROR associated item referring to unboxed trait object for its own trait
         bar
         //~^ ERROR cannot find value `bar` in this scope
     }
diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr
index a085dd6ac57..e10bb98c134 100644
--- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr
+++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr
@@ -20,7 +20,7 @@ LL |     fn fnc<const N: dyn Trait = u32>(&self) -> dyn Trait {
    |                                 ^^^ not a value
 
 error[E0425]: cannot find value `bar` in this scope
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:9:9
+  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:8:9
    |
 LL |         bar
    |         ^^^ not found in this scope
@@ -45,22 +45,7 @@ error: defaults for const parameters are only allowed in `struct`, `enum`, `type
 LL |     fn fnc<const N: dyn Trait = u32>(&self) -> dyn Trait {
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:4:48
-   |
-LL | trait Trait<const N: dyn Trait = bar> {
-   |       ----- in this trait
-...
-LL |     fn fnc<const N: dyn Trait = u32>(&self) -> dyn Trait {
-   |                                                ^^^^^^^^^
-   |
-help: you might have meant to use `Self` to refer to the implementing type
-   |
-LL -     fn fnc<const N: dyn Trait = u32>(&self) -> dyn Trait {
-LL +     fn fnc<const N: dyn Trait = u32>(&self) -> Self {
-   |
-
-error: aborting due to 7 previous errors
+error: aborting due to 6 previous errors
 
 Some errors have detailed explanations: E0391, E0403, E0423, E0425.
 For more information about an error, try `rustc --explain E0391`.
diff --git a/tests/ui/wf/issue-87495.stderr b/tests/ui/wf/issue-87495.stderr
index 0c293e3576d..bf79535df11 100644
--- a/tests/ui/wf/issue-87495.stderr
+++ b/tests/ui/wf/issue-87495.stderr
@@ -13,6 +13,11 @@ LL | trait T {
 LL |     const CONST: (bool, dyn T);
    |           ^^^^^ ...because it contains this associated `const`
    = help: consider moving `CONST` to another trait
+help: you might have meant to use `Self` to refer to the implementing type
+   |
+LL -     const CONST: (bool, dyn T);
+LL +     const CONST: (bool, Self);
+   |
 
 error: aborting due to 1 previous error