about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/abi/homogenous-floats-target-feature-mixup.rs2
-rw-r--r--tests/ui/abi/simd-abi-checks-avx.rs1
-rw-r--r--tests/ui/abi/simd-abi-checks-avx.stderr24
-rw-r--r--tests/ui/abi/sysv64-zst.stderr4
-rw-r--r--tests/ui/allocator/auxiliary/helper.rs2
-rw-r--r--tests/ui/array-slice-vec/array_const_index-0.rs3
-rw-r--r--tests/ui/array-slice-vec/array_const_index-0.stderr4
-rw-r--r--tests/ui/array-slice-vec/array_const_index-1.rs3
-rw-r--r--tests/ui/array-slice-vec/array_const_index-1.stderr4
-rw-r--r--tests/ui/asm/aarch64/parse-error.rs109
-rw-r--r--tests/ui/asm/aarch64/parse-error.stderr382
-rw-r--r--tests/ui/asm/cfg-parse-error.rs57
-rw-r--r--tests/ui/asm/cfg-parse-error.stderr39
-rw-r--r--tests/ui/asm/cfg.rs125
-rw-r--r--tests/ui/asm/fail-const-eval-issue-121099.stderr8
-rw-r--r--tests/ui/asm/naked-functions-ffi.rs1
-rw-r--r--tests/ui/asm/naked-functions-ffi.stderr10
-rw-r--r--tests/ui/asm/parse-error.rs6
-rw-r--r--tests/ui/asm/parse-error.stderr70
-rw-r--r--tests/ui/asm/x86_64/evex512-implicit-feature.rs1
-rw-r--r--tests/ui/asm/x86_64/target-feature-attr.rs2
-rw-r--r--tests/ui/asm/x86_64/target-feature-attr.stderr8
-rw-r--r--tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr18
-rw-r--r--tests/ui/associated-consts/defaults-not-assumed-fail.rs2
-rw-r--r--tests/ui/associated-consts/defaults-not-assumed-fail.stderr4
-rw-r--r--tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr8
-rw-r--r--tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr7
-rw-r--r--tests/ui/associated-item/associated-item-duplicate-names-3.stderr8
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/path-missing.stderr4
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/path-no-qself.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/path-non-param-qself.stderr17
-rw-r--r--tests/ui/associated-types/associated-type-tuple-struct-construction.rs24
-rw-r--r--tests/ui/associated-types/associated-type-tuple-struct-construction.stderr19
-rw-r--r--tests/ui/associated-types/associated-types-in-ambiguous-context.stderr16
-rw-r--r--tests/ui/associated-types/issue-43924.stderr2
-rw-r--r--tests/ui/associated-types/tuple-struct-expr-pat.fixed48
-rw-r--r--tests/ui/associated-types/tuple-struct-expr-pat.rs48
-rw-r--r--tests/ui/associated-types/tuple-struct-expr-pat.stderr97
-rw-r--r--tests/ui/async-await/async-closures/async-fn-mut-impl-fn-once.rs15
-rw-r--r--tests/ui/async-await/async-closures/promote-in-body.rs13
-rw-r--r--tests/ui/async-await/async-drop/dependency-dropped.rs5
-rw-r--r--tests/ui/async-await/async-drop/dependency-dropped.with_feature.run.stdout (renamed from tests/ui/async-await/async-drop/dependency-dropped.run.stdout)0
-rw-r--r--tests/ui/async-await/async-drop/dependency-dropped.without_feature.run.stdout1
-rw-r--r--tests/ui/async-await/async-drop/dependency-dropped.without_feature.stderr10
-rw-r--r--tests/ui/async-await/async-drop/deref-later-projection.rs26
-rw-r--r--tests/ui/async-await/async-drop/elaborate-index-out-of-bounds.rs17
-rw-r--r--tests/ui/async-await/async-drop/elaborate-index-out-of-bounds.stderr11
-rw-r--r--tests/ui/async-await/async-drop/open-drop-error2.rs21
-rw-r--r--tests/ui/async-await/async-drop/open-drop-error2.stderr19
-rw-r--r--tests/ui/async-await/async-drop/type-parameter.rs16
-rw-r--r--tests/ui/async-await/async-drop/type-parameter.stderr11
-rw-r--r--tests/ui/async-await/async-drop/unexpected-sort.rs18
-rw-r--r--tests/ui/async-await/async-drop/unexpected-sort.stderr32
-rw-r--r--tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs1
-rw-r--r--tests/ui/async-await/async-fn/edition-2015.rs1
-rw-r--r--tests/ui/async-await/async-fn/edition-2015.stderr8
-rw-r--r--tests/ui/async-await/await-keyword/2015-edition-error-various-positions.rs1
-rw-r--r--tests/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr22
-rw-r--r--tests/ui/async-await/await-keyword/2015-edition-warning.fixed1
-rw-r--r--tests/ui/async-await/await-keyword/2015-edition-warning.rs1
-rw-r--r--tests/ui/async-await/await-keyword/2015-edition-warning.stderr14
-rw-r--r--tests/ui/async-await/dyn/mut-is-pointer-like.stderr50
-rw-r--r--tests/ui/async-await/dyn/works.stderr58
-rw-r--r--tests/ui/async-await/dyn/wrong-size.stderr24
-rw-r--r--tests/ui/async-await/for-await-2015.rs1
-rw-r--r--tests/ui/async-await/format-await-send.rs24
-rw-r--r--tests/ui/async-await/in-trait/dyn-compatibility.stderr4
-rw-r--r--tests/ui/async-await/issue-65634-raw-ident-suggestion.edition2015.stderr6
-rw-r--r--tests/ui/async-await/issue-65634-raw-ident-suggestion.edition2018.stderr6
-rw-r--r--tests/ui/async-await/issue-65634-raw-ident-suggestion.rs1
-rw-r--r--tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs1
-rw-r--r--tests/ui/async-await/suggest-switching-edition-on-await-cargo.stderr8
-rw-r--r--tests/ui/async-await/suggest-switching-edition-on-await.rs1
-rw-r--r--tests/ui/async-await/suggest-switching-edition-on-await.stderr8
-rw-r--r--tests/ui/attributes/auxiliary/external-macro-use.rs7
-rw-r--r--tests/ui/attributes/auxiliary/use-doc-alias-name-extern.rs24
-rw-r--r--tests/ui/attributes/illegal-macro-use.rs15
-rw-r--r--tests/ui/attributes/illegal-macro-use.stderr27
-rw-r--r--tests/ui/attributes/rustc_confusables.stderr6
-rw-r--r--tests/ui/attributes/use-doc-alias-name.rs67
-rw-r--r--tests/ui/attributes/use-doc-alias-name.stderr150
-rw-r--r--tests/ui/attributes/use-extern-crate-named-macro-use.rs11
-rw-r--r--tests/ui/autoderef-full-lval.rs25
-rw-r--r--tests/ui/autodiff/autodiff_illegal.rs60
-rw-r--r--tests/ui/autodiff/autodiff_illegal.stderr83
-rw-r--r--tests/ui/autodiff/auxiliary/my_macro.rs2
-rw-r--r--tests/ui/autodiff/visibility.rs9
-rw-r--r--tests/ui/autodiff/visibility.std_autodiff.stderr26
-rw-r--r--tests/ui/autoref-autoderef/autoderef-box-no-add.rs35
-rw-r--r--tests/ui/autoref-autoderef/autoderef-box-no-add.stderr (renamed from tests/ui/autoderef-full-lval.stderr)4
-rw-r--r--tests/ui/autoref-autoderef/autoderef-privacy.rs16
-rw-r--r--tests/ui/autoref-autoderef/autoderef-vec-to-slice-by-value.rs18
-rw-r--r--tests/ui/auxiliary/crate-method-reexport-grrrrrrr2.rs2
-rw-r--r--tests/ui/auxiliary/delegate_macro.rs6
-rw-r--r--tests/ui/auxiliary/pub-and-stability.rs8
-rw-r--r--tests/ui/bogus-tag.rs10
-rw-r--r--tests/ui/borrow-by-val-method-receiver.rs14
-rw-r--r--tests/ui/borrowck/issue-81899.rs2
-rw-r--r--tests/ui/borrowck/issue-81899.stderr4
-rw-r--r--tests/ui/borrowck/issue-88434-minimal-example.rs4
-rw-r--r--tests/ui/borrowck/issue-88434-minimal-example.stderr4
-rw-r--r--tests/ui/borrowck/issue-88434-removal-index-should-be-less.rs4
-rw-r--r--tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr4
-rw-r--r--tests/ui/borrowck/unconstrained-closure-lifetime-generic.rs22
-rw-r--r--tests/ui/borrowck/unconstrained-closure-lifetime-generic.stderr119
-rw-r--r--tests/ui/borrowck/unconstrained-closure-lifetime-trait-object.rs11
-rw-r--r--tests/ui/borrowck/unconstrained-closure-lifetime-trait-object.stderr17
-rw-r--r--tests/ui/cast/func-pointer-issue-140491.rs7
-rw-r--r--tests/ui/cast/func-pointer-issue-140491.stderr11
-rw-r--r--tests/ui/cfg/cfg-version/cfg-version-expand.rs30
-rw-r--r--tests/ui/cfg/cfg-version/cfg-version-expand.stderr17
-rw-r--r--tests/ui/cfg/cfg-version/syntax.rs152
-rw-r--r--tests/ui/cfg/cfg-version/syntax.stderr188
-rw-r--r--tests/ui/cfg/diagnostics-reexport-2.rs61
-rw-r--r--tests/ui/cfg/diagnostics-reexport-2.stderr88
-rw-r--r--tests/ui/check-cfg/target_feature.stderr12
-rw-r--r--tests/ui/check-cfg/wrong-version-syntax.fixed14
-rw-r--r--tests/ui/check-cfg/wrong-version-syntax.rs14
-rw-r--r--tests/ui/check-cfg/wrong-version-syntax.stderr17
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs4
-rw-r--r--tests/ui/coercion/issue-73886.stderr2
-rw-r--r--tests/ui/coercion/retslot-cast.rs8
-rw-r--r--tests/ui/coercion/retslot-cast.stderr4
-rw-r--r--tests/ui/coherence/coherence_inherent.rs6
-rw-r--r--tests/ui/coherence/const-errs-dont-conflict-103369.stderr8
-rw-r--r--tests/ui/const-generics/associated_const_equality/equality_bound_with_infer.rs24
-rw-r--r--tests/ui/const-generics/associated_const_equality/equality_bound_with_infer.stderr17
-rw-r--r--tests/ui/const-generics/associated_const_equality/unconstrained_impl_param.rs26
-rw-r--r--tests/ui/const-generics/associated_const_equality/unconstrained_impl_param.stderr39
-rw-r--r--tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr4
-rw-r--r--tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr4
-rw-r--r--tests/ui/const-generics/defaults/default-param-wf-concrete.rs2
-rw-r--r--tests/ui/const-generics/defaults/wfness.rs2
-rw-r--r--tests/ui/const-generics/defaults/wfness.stderr4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/auxiliary/cross-crate-2.rs13
-rw-r--r--tests/ui/const-generics/generic_const_exprs/cross-crate-2.rs10
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr6
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dependence_lint.gce.stderr19
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dependence_lint.rs3
-rw-r--r--tests/ui/const-generics/generic_const_exprs/different-fn.stderr4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.rs2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr21
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.rs1
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr19
-rw-r--r--tests/ui/const-generics/generic_const_exprs/from-sig-fail.rs2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/from-sig-fail.stderr4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/serializing_error_guaranteed.rs16
-rw-r--r--tests/ui/const-generics/generic_const_exprs/simple_fail.rs4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/simple_fail.stderr8
-rw-r--r--tests/ui/const-generics/issues/issue-100313.rs2
-rw-r--r--tests/ui/const-generics/issues/issue-100313.stderr4
-rw-r--r--tests/ui/const-generics/issues/issue-71202.rs4
-rw-r--r--tests/ui/const-generics/issues/issue-71202.stderr46
-rw-r--r--tests/ui/const-generics/issues/issue-83765.rs16
-rw-r--r--tests/ui/const-generics/issues/issue-83765.stderr174
-rw-r--r--tests/ui/const-generics/mgca/projection-error.rs17
-rw-r--r--tests/ui/const-generics/mgca/projection-error.stderr39
-rw-r--r--tests/ui/const-generics/min_const_generics/invalid-patterns.32bit.stderr22
-rw-r--r--tests/ui/const-generics/min_const_generics/invalid-patterns.64bit.stderr22
-rw-r--r--tests/ui/const-generics/min_const_generics/invalid-patterns.rs10
-rw-r--r--tests/ui/const-ptr/allowed_slices.rs2
-rw-r--r--tests/ui/const-ptr/forbidden_slices.rs36
-rw-r--r--tests/ui/const-ptr/forbidden_slices.stderr101
-rw-r--r--tests/ui/const-ptr/out_of_bounds_read.rs6
-rw-r--r--tests/ui/const-ptr/out_of_bounds_read.stderr25
-rw-r--r--tests/ui/consts/assert-type-intrinsics.rs6
-rw-r--r--tests/ui/consts/assert-type-intrinsics.stderr12
-rw-r--r--tests/ui/consts/assoc_const_generic_impl.rs2
-rw-r--r--tests/ui/consts/assoc_const_generic_impl.stderr8
-rw-r--r--tests/ui/consts/const-array-oob.rs6
-rw-r--r--tests/ui/consts/const-array-oob.stderr10
-rw-r--r--tests/ui/consts/const-assert-unchecked-ub.rs2
-rw-r--r--tests/ui/consts/const-assert-unchecked-ub.stderr4
-rw-r--r--tests/ui/consts/const-blocks/migrate-fail.rs2
-rw-r--r--tests/ui/consts/const-blocks/migrate-pass.rs4
-rw-r--r--tests/ui/consts/const-blocks/nll-fail.rs2
-rw-r--r--tests/ui/consts/const-blocks/nll-pass.rs4
-rw-r--r--tests/ui/consts/const-compare-bytes-ub.rs16
-rw-r--r--tests/ui/consts/const-compare-bytes-ub.stderr32
-rw-r--r--tests/ui/consts/const-deref-ptr.rs5
-rw-r--r--tests/ui/consts/const-deref-ptr.stderr8
-rw-r--r--tests/ui/consts/const-err-early.rs10
-rw-r--r--tests/ui/consts/const-err-early.stderr20
-rw-r--r--tests/ui/consts/const-err-enum-discriminant.rs3
-rw-r--r--tests/ui/consts/const-err-enum-discriminant.stderr4
-rw-r--r--tests/ui/consts/const-err-late.rs4
-rw-r--r--tests/ui/consts/const-err-late.stderr8
-rw-r--r--tests/ui/consts/const-err-multi.rs4
-rw-r--r--tests/ui/consts/const-err-multi.stderr4
-rw-r--r--tests/ui/consts/const-eval-fail-too-big.rs2
-rw-r--r--tests/ui/consts/const-eval-fail-too-big.stderr4
-rw-r--r--tests/ui/consts/const-eval/assign-to-static-within-other-static.rs2
-rw-r--r--tests/ui/consts/const-eval/assign-to-static-within-other-static.stderr4
-rw-r--r--tests/ui/consts/const-eval/conditional_array_execution.rs2
-rw-r--r--tests/ui/consts/const-eval/conditional_array_execution.stderr4
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow-2.rs2
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow-2.stderr4
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow-3.rs2
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow-3.stderr4
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow-4.rs2
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow-4.stderr4
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow2.rs16
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow2.stderr32
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow2b.rs16
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow2b.stderr32
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow2c.rs16
-rw-r--r--tests/ui/consts/const-eval/const-eval-overflow2c.stderr32
-rw-r--r--tests/ui/consts/const-eval/const-eval-query-stack.rs2
-rw-r--r--tests/ui/consts/const-eval/const-eval-query-stack.stderr4
-rw-r--r--tests/ui/consts/const-eval/const-pointer-values-in-various-types.64bit.stderr162
-rw-r--r--tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs60
-rw-r--r--tests/ui/consts/const-eval/const_fn_ptr_fail2.rs8
-rw-r--r--tests/ui/consts/const-eval/const_fn_ptr_fail2.stderr8
-rw-r--r--tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.rs2
-rw-r--r--tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.stderr4
-rw-r--r--tests/ui/consts/const-eval/const_panic.rs24
-rw-r--r--tests/ui/consts/const-eval/const_panic.stderr48
-rw-r--r--tests/ui/consts/const-eval/const_panic_2021.rs20
-rw-r--r--tests/ui/consts/const-eval/const_panic_2021.stderr40
-rw-r--r--tests/ui/consts/const-eval/const_panic_libcore_bin.rs6
-rw-r--r--tests/ui/consts/const-eval/const_panic_libcore_bin.stderr12
-rw-r--r--tests/ui/consts/const-eval/const_panic_track_caller.rs4
-rw-r--r--tests/ui/consts/const-eval/const_panic_track_caller.stderr4
-rw-r--r--tests/ui/consts/const-eval/const_raw_ptr_ops2.rs6
-rw-r--r--tests/ui/consts/const-eval/const_raw_ptr_ops2.stderr10
-rw-r--r--tests/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr7
-rw-r--r--tests/ui/consts/const-eval/float_methods.rs46
-rw-r--r--tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.rs2
-rw-r--r--tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.stderr4
-rw-r--r--tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr4
-rw-r--r--tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr4
-rw-r--r--tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs2
-rw-r--r--tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs4
-rw-r--r--tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr8
-rw-r--r--tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.rs2
-rw-r--r--tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr4
-rw-r--r--tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.rs8
-rw-r--r--tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.stderr16
-rw-r--r--tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs2
-rw-r--r--tests/ui/consts/const-eval/index-out-of-bounds-never-type.stderr4
-rw-r--r--tests/ui/consts/const-eval/index_out_of_bounds.stderr4
-rw-r--r--tests/ui/consts/const-eval/issue-43197.rs4
-rw-r--r--tests/ui/consts/const-eval/issue-43197.stderr8
-rw-r--r--tests/ui/consts/const-eval/issue-44578.rs2
-rw-r--r--tests/ui/consts/const-eval/issue-44578.stderr4
-rw-r--r--tests/ui/consts/const-eval/issue-49296.rs2
-rw-r--r--tests/ui/consts/const-eval/issue-49296.stderr4
-rw-r--r--tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr4
-rw-r--r--tests/ui/consts/const-eval/issue-50814-2.normal.stderr4
-rw-r--r--tests/ui/consts/const-eval/issue-50814-2.rs2
-rw-r--r--tests/ui/consts/const-eval/issue-50814.rs4
-rw-r--r--tests/ui/consts/const-eval/issue-50814.stderr8
-rw-r--r--tests/ui/consts/const-eval/issue-85155.rs2
-rw-r--r--tests/ui/consts/const-eval/issue-85155.stderr4
-rw-r--r--tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs3
-rw-r--r--tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr4
-rw-r--r--tests/ui/consts/const-eval/mod-static-with-const-fn.rs2
-rw-r--r--tests/ui/consts/const-eval/mod-static-with-const-fn.stderr4
-rw-r--r--tests/ui/consts/const-eval/nonnull_as_ref_ub.rs2
-rw-r--r--tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr4
-rw-r--r--tests/ui/consts/const-eval/panic-assoc-never-type.rs2
-rw-r--r--tests/ui/consts/const-eval/panic-assoc-never-type.stderr4
-rw-r--r--tests/ui/consts/const-eval/panic-never-type.rs2
-rw-r--r--tests/ui/consts/const-eval/panic-never-type.stderr4
-rw-r--r--tests/ui/consts/const-eval/parse_ints.rs4
-rw-r--r--tests/ui/consts/const-eval/parse_ints.stderr8
-rw-r--r--tests/ui/consts/const-eval/partial_ptr_overwrite.rs3
-rw-r--r--tests/ui/consts/const-eval/partial_ptr_overwrite.stderr4
-rw-r--r--tests/ui/consts/const-eval/ptr-to-int-transmute-in-consts-issue-87525.rs25
-rw-r--r--tests/ui/consts/const-eval/ptr-to-int-transmute-in-consts-issue-87525.stderr40
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.32bit.stderr296
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.64bit.stderr296
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.rs116
-rw-r--r--tests/ui/consts/const-eval/raw-pointer-ub.rs23
-rw-r--r--tests/ui/consts/const-eval/raw-pointer-ub.stderr30
-rw-r--r--tests/ui/consts/const-eval/ref_to_int_match.32bit.stderr4
-rw-r--r--tests/ui/consts/const-eval/ref_to_int_match.64bit.stderr4
-rw-r--r--tests/ui/consts/const-eval/ref_to_int_match.rs12
-rw-r--r--tests/ui/consts/const-eval/shift_overflow.stderr4
-rw-r--r--tests/ui/consts/const-eval/transmute-const.rs2
-rw-r--r--tests/ui/consts/const-eval/transmute-const.stderr4
-rw-r--r--tests/ui/consts/const-eval/transmute-size-mismatch.rs8
-rw-r--r--tests/ui/consts/const-eval/transmute-size-mismatch.stderr8
-rw-r--r--tests/ui/consts/const-eval/ub-enum-overwrite.rs3
-rw-r--r--tests/ui/consts/const-eval/ub-enum-overwrite.stderr4
-rw-r--r--tests/ui/consts/const-eval/ub-enum.rs38
-rw-r--r--tests/ui/consts/const-eval/ub-enum.stderr76
-rw-r--r--tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr34
-rw-r--r--tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr34
-rw-r--r--tests/ui/consts/const-eval/ub-incorrect-vtable.rs18
-rw-r--r--tests/ui/consts/const-eval/ub-int-array.rs9
-rw-r--r--tests/ui/consts/const-eval/ub-int-array.stderr16
-rw-r--r--tests/ui/consts/const-eval/ub-invalid-values.rs4
-rw-r--r--tests/ui/consts/const-eval/ub-invalid-values.stderr4
-rw-r--r--tests/ui/consts/const-eval/ub-nonnull.rs17
-rw-r--r--tests/ui/consts/const-eval/ub-nonnull.stderr38
-rw-r--r--tests/ui/consts/const-eval/ub-ref-ptr.rs34
-rw-r--r--tests/ui/consts/const-eval/ub-ref-ptr.stderr97
-rw-r--r--tests/ui/consts/const-eval/ub-uninhabit.rs17
-rw-r--r--tests/ui/consts/const-eval/ub-uninhabit.stderr24
-rw-r--r--tests/ui/consts/const-eval/ub-upvars.32bit.stderr4
-rw-r--r--tests/ui/consts/const-eval/ub-upvars.64bit.stderr4
-rw-r--r--tests/ui/consts/const-eval/ub-upvars.rs2
-rw-r--r--tests/ui/consts/const-eval/ub-wide-ptr.rs75
-rw-r--r--tests/ui/consts/const-eval/ub-wide-ptr.stderr164
-rw-r--r--tests/ui/consts/const-eval/ub-write-through-immutable.rs8
-rw-r--r--tests/ui/consts/const-eval/ub-write-through-immutable.stderr10
-rw-r--r--tests/ui/consts/const-eval/union-const-eval-field.rs3
-rw-r--r--tests/ui/consts/const-eval/union-const-eval-field.stderr8
-rw-r--r--tests/ui/consts/const-eval/union-ice.rs12
-rw-r--r--tests/ui/consts/const-eval/union-ice.stderr16
-rw-r--r--tests/ui/consts/const-eval/union-ub.32bit.stderr12
-rw-r--r--tests/ui/consts/const-eval/union-ub.64bit.stderr12
-rw-r--r--tests/ui/consts/const-eval/union-ub.rs10
-rw-r--r--tests/ui/consts/const-eval/unused-broken-const.rs2
-rw-r--r--tests/ui/consts/const-eval/unused-broken-const.stderr4
-rw-r--r--tests/ui/consts/const-eval/unwind-abort.rs2
-rw-r--r--tests/ui/consts/const-eval/unwind-abort.stderr4
-rw-r--r--tests/ui/consts/const-eval/validate_uninhabited_zsts.rs4
-rw-r--r--tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr8
-rw-r--r--tests/ui/consts/const-eval/validation-ice-extern-type-field.rs2
-rw-r--r--tests/ui/consts/const-eval/validation-ice-extern-type-field.stderr4
-rw-r--r--tests/ui/consts/const-external-macro-const-err.rs2
-rw-r--r--tests/ui/consts/const-external-macro-const-err.stderr4
-rw-r--r--tests/ui/consts/const-int-unchecked.rs99
-rw-r--r--tests/ui/consts/const-int-unchecked.stderr294
-rw-r--r--tests/ui/consts/const-len-underflow-separate-spans.next.stderr4
-rw-r--r--tests/ui/consts/const-len-underflow-separate-spans.old.stderr4
-rw-r--r--tests/ui/consts/const-len-underflow-separate-spans.rs6
-rw-r--r--tests/ui/consts/const-len-underflow-subspans.rs3
-rw-r--r--tests/ui/consts/const-len-underflow-subspans.stderr4
-rw-r--r--tests/ui/consts/const-mut-refs/mut_ref_in_final.rs3
-rw-r--r--tests/ui/consts/const-mut-refs/mut_ref_in_final.stderr18
-rw-r--r--tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs13
-rw-r--r--tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr28
-rw-r--r--tests/ui/consts/const-ptr-is-null.rs2
-rw-r--r--tests/ui/consts/const-ptr-is-null.stderr4
-rw-r--r--tests/ui/consts/const-size_of_val-align_of_val-extern-type.rs4
-rw-r--r--tests/ui/consts/const-size_of_val-align_of_val-extern-type.stderr8
-rw-r--r--tests/ui/consts/const-slice-oob.rs5
-rw-r--r--tests/ui/consts/const-slice-oob.stderr4
-rw-r--r--tests/ui/consts/const-unstable-intrinsic.stderr21
-rw-r--r--tests/ui/consts/const-unwrap.rs6
-rw-r--r--tests/ui/consts/const-unwrap.stderr10
-rw-r--r--tests/ui/consts/const_refs_to_static_fail.rs9
-rw-r--r--tests/ui/consts/const_refs_to_static_fail.stderr12
-rw-r--r--tests/ui/consts/const_refs_to_static_fail_invalid.rs9
-rw-r--r--tests/ui/consts/const_refs_to_static_fail_invalid.stderr16
-rw-r--r--tests/ui/consts/const_unsafe_unreachable_ub.rs9
-rw-r--r--tests/ui/consts/const_unsafe_unreachable_ub.stderr10
-rw-r--r--tests/ui/consts/control-flow/assert.rs2
-rw-r--r--tests/ui/consts/control-flow/assert.stderr4
-rw-r--r--tests/ui/consts/copy-intrinsic.rs35
-rw-r--r--tests/ui/consts/copy-intrinsic.stderr24
-rw-r--r--tests/ui/consts/dangling-alloc-id-ice.rs2
-rw-r--r--tests/ui/consts/dangling-alloc-id-ice.stderr4
-rw-r--r--tests/ui/consts/dangling-zst-ice-issue-126393.rs2
-rw-r--r--tests/ui/consts/dangling-zst-ice-issue-126393.stderr4
-rw-r--r--tests/ui/consts/eval-enum.rs10
-rw-r--r--tests/ui/consts/eval-enum.stderr14
-rw-r--r--tests/ui/consts/extra-const-ub/detect-extra-ub.rs24
-rw-r--r--tests/ui/consts/extra-const-ub/detect-extra-ub.with_flag.stderr46
-rw-r--r--tests/ui/consts/interior-mut-const-via-union.32bit.stderr4
-rw-r--r--tests/ui/consts/interior-mut-const-via-union.64bit.stderr4
-rw-r--r--tests/ui/consts/interior-mut-const-via-union.rs4
-rw-r--r--tests/ui/consts/issue-17718-const-bad-values.rs3
-rw-r--r--tests/ui/consts/issue-17718-const-bad-values.stderr4
-rw-r--r--tests/ui/consts/issue-32829.rs2
-rw-r--r--tests/ui/consts/issue-32829.stderr4
-rw-r--r--tests/ui/consts/issue-63952.32bit.stderr4
-rw-r--r--tests/ui/consts/issue-63952.64bit.stderr4
-rw-r--r--tests/ui/consts/issue-63952.rs2
-rw-r--r--tests/ui/consts/issue-64506.rs2
-rw-r--r--tests/ui/consts/issue-64506.stderr4
-rw-r--r--tests/ui/consts/issue-66693-panic-in-array-len.rs2
-rw-r--r--tests/ui/consts/issue-66693-panic-in-array-len.stderr4
-rw-r--r--tests/ui/consts/issue-66693.rs4
-rw-r--r--tests/ui/consts/issue-66693.stderr8
-rw-r--r--tests/ui/consts/issue-76064.rs2
-rw-r--r--tests/ui/consts/issue-76064.stderr4
-rw-r--r--tests/ui/consts/issue-79690.64bit.stderr4
-rw-r--r--tests/ui/consts/issue-79690.rs2
-rw-r--r--tests/ui/consts/issue-miri-1910.rs2
-rw-r--r--tests/ui/consts/issue-miri-1910.stderr8
-rw-r--r--tests/ui/consts/large_const_alloc.rs4
-rw-r--r--tests/ui/consts/large_const_alloc.stderr8
-rw-r--r--tests/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr49
-rw-r--r--tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr21
-rw-r--r--tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr21
-rw-r--r--tests/ui/consts/min_const_fn/recursive_const_stab_unmarked_crate_imports.stderr7
-rw-r--r--tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.stderr14
-rw-r--r--tests/ui/consts/miri_unleashed/abi-mismatch.rs4
-rw-r--r--tests/ui/consts/miri_unleashed/abi-mismatch.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/assoc_const.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/assoc_const_2.rs2
-rw-r--r--tests/ui/consts/miri_unleashed/assoc_const_2.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/box.rs3
-rw-r--r--tests/ui/consts/miri_unleashed/box.stderr4
-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.stderr16
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs16
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.stderr24
-rw-r--r--tests/ui/consts/miri_unleashed/drop.rs4
-rw-r--r--tests/ui/consts/miri_unleashed/drop.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/extern-static.rs6
-rw-r--r--tests/ui/consts/miri_unleashed/extern-static.stderr10
-rw-r--r--tests/ui/consts/miri_unleashed/inline_asm.rs3
-rw-r--r--tests/ui/consts/miri_unleashed/inline_asm.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/mutable_references.rs30
-rw-r--r--tests/ui/consts/miri_unleashed/mutable_references.stderr98
-rw-r--r--tests/ui/consts/miri_unleashed/mutating_global.rs3
-rw-r--r--tests/ui/consts/miri_unleashed/mutating_global.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/non_const_fn.rs3
-rw-r--r--tests/ui/consts/miri_unleashed/non_const_fn.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/ptr_arith.rs6
-rw-r--r--tests/ui/consts/miri_unleashed/ptr_arith.stderr10
-rw-r--r--tests/ui/consts/miri_unleashed/static-no-inner-mut.32bit.stderr16
-rw-r--r--tests/ui/consts/miri_unleashed/static-no-inner-mut.64bit.stderr16
-rw-r--r--tests/ui/consts/miri_unleashed/static-no-inner-mut.rs8
-rw-r--r--tests/ui/consts/miri_unleashed/tls.rs6
-rw-r--r--tests/ui/consts/miri_unleashed/tls.stderr12
-rw-r--r--tests/ui/consts/missing_span_in_backtrace.rs2
-rw-r--r--tests/ui/consts/missing_span_in_backtrace.stderr15
-rw-r--r--tests/ui/consts/mono-reachable-invalid-const.rs3
-rw-r--r--tests/ui/consts/mono-reachable-invalid-const.stderr6
-rw-r--r--tests/ui/consts/no-ice-from-static-in-const-issue-52060.rs3
-rw-r--r--tests/ui/consts/no-ice-from-static-in-const-issue-52060.stderr4
-rw-r--r--tests/ui/consts/offset_from_ub.rs53
-rw-r--r--tests/ui/consts/offset_from_ub.stderr82
-rw-r--r--tests/ui/consts/offset_ub.stderr77
-rw-r--r--tests/ui/consts/overflowing-consts.noopt.stderr1024
-rw-r--r--tests/ui/consts/overflowing-consts.opt.stderr1024
-rw-r--r--tests/ui/consts/overflowing-consts.opt_with_overflow_checks.stderr1024
-rw-r--r--tests/ui/consts/overflowing-consts.rs348
-rw-r--r--tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs3
-rw-r--r--tests/ui/consts/promoted_running_out_of_memory_issue-130687.stderr4
-rw-r--r--tests/ui/consts/promoted_size_overflow.rs3
-rw-r--r--tests/ui/consts/promoted_size_overflow.stderr4
-rw-r--r--tests/ui/consts/qualif-indirect-mutation-fail.rs4
-rw-r--r--tests/ui/consts/qualif-indirect-mutation-fail.stderr8
-rw-r--r--tests/ui/consts/recursive-zst-static.default.stderr4
-rw-r--r--tests/ui/consts/recursive-zst-static.rs2
-rw-r--r--tests/ui/consts/recursive-zst-static.unleash.stderr4
-rw-r--r--tests/ui/consts/recursive.rs2
-rw-r--r--tests/ui/consts/recursive.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-called-fn.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-called-fn.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-called-fn.rs2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-closure.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-closure.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-closure.rs2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-drop.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-drop.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-drop.rs2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.rs2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.rs2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.rs2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fn.rs2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.rs2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fnptr.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fnptr.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-fnptr.rs2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-move.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-move.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-move.rs2
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-vtable.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-vtable.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-dead-vtable.rs2
-rw-r--r--tests/ui/consts/required-consts/collect-in-promoted-const.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/collect-in-promoted-const.opt.stderr8
-rw-r--r--tests/ui/consts/required-consts/collect-in-promoted-const.rs4
-rw-r--r--tests/ui/consts/required-consts/interpret-in-const-called-fn.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/interpret-in-const-called-fn.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/interpret-in-const-called-fn.rs2
-rw-r--r--tests/ui/consts/required-consts/interpret-in-promoted.noopt.stderr8
-rw-r--r--tests/ui/consts/required-consts/interpret-in-promoted.opt.stderr8
-rw-r--r--tests/ui/consts/required-consts/interpret-in-promoted.rs2
-rw-r--r--tests/ui/consts/required-consts/interpret-in-static.noopt.stderr4
-rw-r--r--tests/ui/consts/required-consts/interpret-in-static.opt.stderr4
-rw-r--r--tests/ui/consts/required-consts/interpret-in-static.rs2
-rw-r--r--tests/ui/consts/slice-index-overflow-issue-130284.rs3
-rw-r--r--tests/ui/consts/slice-index-overflow-issue-130284.stderr4
-rw-r--r--tests/ui/consts/static_mut_containing_mut_ref2.rs2
-rw-r--r--tests/ui/consts/static_mut_containing_mut_ref2.stderr4
-rw-r--r--tests/ui/consts/static_mut_containing_mut_ref3.rs2
-rw-r--r--tests/ui/consts/static_mut_containing_mut_ref3.stderr4
-rw-r--r--tests/ui/consts/uninhabited-const-issue-61744.rs2
-rw-r--r--tests/ui/consts/uninhabited-const-issue-61744.stderr4
-rw-r--r--tests/ui/consts/validate_never_arrays.rs6
-rw-r--r--tests/ui/consts/validate_never_arrays.stderr12
-rw-r--r--tests/ui/consts/write-to-static-mut-in-static.rs4
-rw-r--r--tests/ui/consts/write-to-static-mut-in-static.stderr8
-rw-r--r--tests/ui/coroutine/auxiliary/xcrate.rs2
-rw-r--r--tests/ui/coroutine/const_gen_fn.rs2
-rw-r--r--tests/ui/coroutine/const_gen_fn.stderr16
-rw-r--r--tests/ui/coroutine/gen_block.none.stderr4
-rw-r--r--tests/ui/cross-crate/auxiliary/static_priv_by_default.rs10
-rw-r--r--tests/ui/delegation/bad-resolve.stderr4
-rw-r--r--tests/ui/delegation/glob-non-fn.stderr4
-rw-r--r--tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs4
-rw-r--r--tests/ui/dep-graph/dep-graph-caller-callee.rs4
-rw-r--r--tests/ui/dep-graph/dep-graph-struct-signature.rs4
-rw-r--r--tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs6
-rw-r--r--tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs6
-rw-r--r--tests/ui/dep-graph/dep-graph-trait-impl.rs6
-rw-r--r--tests/ui/deprecation/deprecation-lint.rs4
-rw-r--r--tests/ui/derived-errors/issue-31997.rs2
-rw-r--r--tests/ui/derived-errors/issue-31997.stderr6
-rw-r--r--tests/ui/derives/clone-debug-dead-code.stderr2
-rw-r--r--tests/ui/deriving/deriving-all-codegen.rs30
-rw-r--r--tests/ui/deriving/deriving-all-codegen.stdout165
-rw-r--r--tests/ui/deriving/deriving-in-macro.rs3
-rw-r--r--tests/ui/destructuring-assignment/bad-let-in-destructure.rs13
-rw-r--r--tests/ui/destructuring-assignment/bad-let-in-destructure.stderr10
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs6
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr63
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs6
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr48
-rw-r--r--tests/ui/did_you_mean/E0178.rs1
-rw-r--r--tests/ui/did_you_mean/E0178.stderr8
-rw-r--r--tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs2
-rw-r--r--tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr20
-rw-r--r--tests/ui/drop/drop-order-comparisons.e2021.fixed41
-rw-r--r--tests/ui/drop/drop-order-comparisons.e2021.stderr96
-rw-r--r--tests/ui/drop/drop-order-comparisons.rs41
-rw-r--r--tests/ui/drop/issue-23338-ensure-param-drop-order.rs2
-rw-r--r--tests/ui/drop/issue-23611-enum-swap-in-drop.rs2
-rw-r--r--tests/ui/dropck/dropck_trait_cycle_checked.rs2
-rw-r--r--tests/ui/dyn-compatibility/almost-supertrait-associated-type.rs1
-rw-r--r--tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr30
-rw-r--r--tests/ui/dyn-compatibility/associated-consts.rs1
-rw-r--r--tests/ui/dyn-compatibility/associated-consts.stderr19
-rw-r--r--tests/ui/dyn-compatibility/generics.rs2
-rw-r--r--tests/ui/dyn-compatibility/generics.stderr42
-rw-r--r--tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.rs1
-rw-r--r--tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr25
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self.rs2
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self.stderr38
-rw-r--r--tests/ui/dyn-compatibility/no-static.rs1
-rw-r--r--tests/ui/dyn-compatibility/no-static.stderr31
-rw-r--r--tests/ui/dyn-compatibility/sized-2.rs1
-rw-r--r--tests/ui/dyn-compatibility/sized-2.stderr18
-rw-r--r--tests/ui/dyn-compatibility/sized.rs1
-rw-r--r--tests/ui/dyn-compatibility/sized.stderr18
-rw-r--r--tests/ui/dyn-compatibility/taint-const-eval.rs1
-rw-r--r--tests/ui/dyn-compatibility/taint-const-eval.stderr26
-rw-r--r--tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs1
-rw-r--r--tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr20
-rw-r--r--tests/ui/dyn-drop/dyn-drop.rs3
-rw-r--r--tests/ui/dyn-drop/dyn-drop.stderr14
-rw-r--r--tests/ui/editions/async-block-2015.rs1
-rw-r--r--tests/ui/editions/async-block-2015.stderr8
-rw-r--r--tests/ui/editions/edition-extern-crate-allowed.stderr6
-rw-r--r--tests/ui/empty/empty-struct-braces-expr.stderr4
-rw-r--r--tests/ui/enum-discriminant/discriminant_size.rs3
-rw-r--r--tests/ui/enum-discriminant/discriminant_size.stderr11
-rw-r--r--tests/ui/enum-discriminant/eval-error.rs2
-rw-r--r--tests/ui/enum-discriminant/eval-error.stderr4
-rw-r--r--tests/ui/enum-discriminant/issue-43398.stderr11
-rw-r--r--tests/ui/enum-discriminant/issue-70509-partial_eq.rs2
-rw-r--r--tests/ui/enum-discriminant/issue-70509-partial_eq.stderr11
-rw-r--r--tests/ui/enum-discriminant/repr128-get-discriminant-issue-43398.rs (renamed from tests/ui/enum-discriminant/issue-43398.rs)2
-rw-r--r--tests/ui/enum-discriminant/repr128.rs3
-rw-r--r--tests/ui/enum-discriminant/repr128.stderr11
-rw-r--r--tests/ui/ergonomic-clones/async/edition-2015.rs1
-rw-r--r--tests/ui/ergonomic-clones/async/edition-2015.stderr2
-rw-r--r--tests/ui/error-codes/E0038.rs2
-rw-r--r--tests/ui/error-codes/E0038.stderr31
-rw-r--r--tests/ui/error-codes/E0080.rs9
-rw-r--r--tests/ui/error-codes/E0080.stderr12
-rw-r--r--tests/ui/error-codes/E0223.stderr8
-rw-r--r--tests/ui/error-codes/E0657.rs4
-rw-r--r--tests/ui/error-codes/E0657.stderr24
-rw-r--r--tests/ui/error-codes/E0658.rs5
-rw-r--r--tests/ui/error-codes/E0658.stderr11
-rw-r--r--tests/ui/error-codes/E0659.rs4
-rw-r--r--tests/ui/error-codes/E0659.stderr8
-rw-r--r--tests/ui/error-emitter/multiline-removal-suggestion.svg10
-rw-r--r--tests/ui/errors/dynless-turbofish-e0191-issue-91997.rs1
-rw-r--r--tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr4
-rw-r--r--tests/ui/explicit-tail-calls/ctfe-id-unlimited.return.stderr4
-rw-r--r--tests/ui/explicit-tail-calls/ctfe-id-unlimited.rs2
-rw-r--r--tests/ui/explicit-tail-calls/ctfe-tail-call-panic.rs4
-rw-r--r--tests/ui/explicit-tail-calls/ctfe-tail-call-panic.stderr4
-rw-r--r--tests/ui/explore-issue-38412.stderr8
-rw-r--r--tests/ui/expr/scope.rs1
-rw-r--r--tests/ui/extern/extern-empty-string-issue-140884.rs3
-rw-r--r--tests/ui/extern/extern-empty-string-issue-140884.stderr15
-rw-r--r--tests/ui/extern/issue-28324.rs2
-rw-r--r--tests/ui/extern/issue-28324.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-asm_cfg.rs48
-rw-r--r--tests/ui/feature-gates/feature-gate-asm_cfg.stderr57
-rw-r--r--tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.stderr34
-rw-r--r--tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr8
-rw-r--r--tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr12
-rw-r--r--tests/ui/feature-gates/feature-gate-autodiff-use.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-autodiff.has_support.stderr8
-rw-r--r--tests/ui/feature-gates/feature-gate-autodiff.no_support.stderr8
-rw-r--r--tests/ui/feature-gates/feature-gate-autodiff.rs6
-rw-r--r--tests/ui/feature-gates/feature-gate-cfg-version.rs49
-rw-r--r--tests/ui/feature-gates/feature-gate-cfg-version.stderr204
-rw-r--r--tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr8
-rw-r--r--tests/ui/feature-gates/feature-gate-coroutines.none.stderr8
-rw-r--r--tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs1
-rw-r--r--tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr26
-rw-r--r--tests/ui/feature-gates/feature-gate-guard-patterns.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-guard-patterns.stderr31
-rw-r--r--tests/ui/feature-gates/feature-gate-repr128.rs6
-rw-r--r--tests/ui/feature-gates/feature-gate-repr128.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-yield-expr.stderr2
-rw-r--r--tests/ui/feature-gates/version_check.rs17
-rw-r--r--tests/ui/fn/coerce-suggestion-infer-region.rs26
-rw-r--r--tests/ui/fn/coerce-suggestion-infer-region.stderr12
-rw-r--r--tests/ui/functions-closures/bare-fn-implements-fn-mut.rs (renamed from tests/ui/bare-fn-implements-fn-mut.rs)4
-rw-r--r--tests/ui/functions-closures/fn-help-with-err.stderr2
-rw-r--r--tests/ui/generic-associated-types/gat-in-trait-path.rs1
-rw-r--r--tests/ui/generic-associated-types/gat-in-trait-path.stderr19
-rw-r--r--tests/ui/generic-associated-types/issue-71176.rs1
-rw-r--r--tests/ui/generic-associated-types/issue-71176.stderr20
-rw-r--r--tests/ui/generic-associated-types/issue-76535.rs1
-rw-r--r--tests/ui/generic-associated-types/issue-76535.stderr25
-rw-r--r--tests/ui/generic-associated-types/issue-78671.stderr4
-rw-r--r--tests/ui/generic-associated-types/issue-79422.rs14
-rw-r--r--tests/ui/generic-associated-types/issue-79422.stderr29
-rw-r--r--tests/ui/generic-associated-types/trait-objects.rs2
-rw-r--r--tests/ui/generic-associated-types/trait-objects.stderr34
-rw-r--r--tests/ui/generic-const-items/def-site-eval.fail.stderr6
-rw-r--r--tests/ui/generic-const-items/def-site-eval.rs7
-rw-r--r--tests/ui/generic-const-items/def-site-predicates-wf.rs9
-rw-r--r--tests/ui/generic-const-items/def-site-predicates-wf.stderr13
-rw-r--r--tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs2
-rw-r--r--tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr4
-rw-r--r--tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.rs2
-rw-r--r--tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr4
-rw-r--r--tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.rs2
-rw-r--r--tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr4
-rw-r--r--tests/ui/generics/post_monomorphization_error_backtrace.rs9
-rw-r--r--tests/ui/generics/post_monomorphization_error_backtrace.stderr8
-rw-r--r--tests/ui/higher-ranked/higher-ranked-invalid-bounds.rs (renamed from tests/ui/bounds-lifetime.rs)2
-rw-r--r--tests/ui/higher-ranked/higher-ranked-invalid-bounds.stderr (renamed from tests/ui/bounds-lifetime.stderr)10
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-1.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.rs2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.stderr41
-rw-r--r--tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.rs6
-rw-r--r--tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr28
-rw-r--r--tests/ui/impl-trait/in-trait/dyn-compatibility.rs3
-rw-r--r--tests/ui/impl-trait/in-trait/dyn-compatibility.stderr58
-rw-r--r--tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr4
-rw-r--r--tests/ui/impl-trait/in-trait/not-inferred-generic.rs13
-rw-r--r--tests/ui/impl-trait/in-trait/not-inferred-generic.stderr21
-rw-r--r--tests/ui/impl-trait/issues/issue-100075-2.stderr15
-rw-r--r--tests/ui/impl-trait/issues/issue-100075.stderr5
-rw-r--r--tests/ui/impl-trait/issues/issue-103599.rs5
-rw-r--r--tests/ui/impl-trait/issues/issue-103599.stderr13
-rw-r--r--tests/ui/impl-trait/issues/issue-87450.rs4
-rw-r--r--tests/ui/impl-trait/issues/issue-87450.stderr18
-rw-r--r--tests/ui/impl-trait/no-method-suggested-traits.stderr16
-rw-r--r--tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr73
-rw-r--r--tests/ui/impl-trait/recursive-in-exhaustiveness.current.stderr53
-rw-r--r--tests/ui/impl-trait/recursive-in-exhaustiveness.next.stderr18
-rw-r--r--tests/ui/impl-trait/recursive-in-exhaustiveness.rs6
-rw-r--r--tests/ui/imports/duplicate.rs18
-rw-r--r--tests/ui/imports/duplicate.stderr24
-rw-r--r--tests/ui/imports/export-glob-imports-target.rs2
-rw-r--r--tests/ui/imports/extern-crate-used.stderr7
-rw-r--r--tests/ui/imports/glob-cycles.rs6
-rw-r--r--tests/ui/imports/glob-shadowing.rs6
-rw-r--r--tests/ui/imports/glob-shadowing.stderr12
-rw-r--r--tests/ui/imports/import-glob-1.rs2
-rw-r--r--tests/ui/imports/import-glob-circular.rs6
-rw-r--r--tests/ui/imports/import-glob-crate.rs1
-rw-r--r--tests/ui/imports/import-loop-2.rs4
-rw-r--r--tests/ui/imports/import-loop-2.stderr6
-rw-r--r--tests/ui/imports/import-loop.rs2
-rw-r--r--tests/ui/imports/import-loop.stderr6
-rw-r--r--tests/ui/imports/import-rpass.rs4
-rw-r--r--tests/ui/imports/import4.rs4
-rw-r--r--tests/ui/imports/import4.stderr6
-rw-r--r--tests/ui/imports/import5.rs2
-rw-r--r--tests/ui/imports/import6.rs2
-rw-r--r--tests/ui/imports/imports.rs21
-rw-r--r--tests/ui/imports/issue-18083.rs4
-rw-r--r--tests/ui/imports/issue-19498.rs2
-rw-r--r--tests/ui/imports/issue-19498.stderr8
-rw-r--r--tests/ui/imports/issue-32222.rs2
-rw-r--r--tests/ui/imports/issue-4366-2.rs4
-rw-r--r--tests/ui/imports/issue-4366.rs4
-rw-r--r--tests/ui/imports/issue-4865-1.rs8
-rw-r--r--tests/ui/imports/issue-4865-2.rs2
-rw-r--r--tests/ui/imports/issue-4865-3.rs4
-rw-r--r--tests/ui/imports/issue-8208.rs2
-rw-r--r--tests/ui/imports/issue-8208.stderr6
-rw-r--r--tests/ui/imports/issue-8640.rs2
-rw-r--r--tests/ui/imports/issue-8640.stderr8
-rw-r--r--tests/ui/imports/issue-99695-b.fixed2
-rw-r--r--tests/ui/imports/issue-99695-b.stderr2
-rw-r--r--tests/ui/imports/issue-99695.edition_2015.fixed (renamed from tests/ui/imports/issue-99695.fixed)6
-rw-r--r--tests/ui/imports/issue-99695.edition_2015.stderr (renamed from tests/ui/imports/issue-99695.stderr)4
-rw-r--r--tests/ui/imports/issue-99695.edition_2018.fixed21
-rw-r--r--tests/ui/imports/issue-99695.edition_2018.stderr16
-rw-r--r--tests/ui/imports/issue-99695.rs4
-rw-r--r--tests/ui/imports/local-modularized-tricky-fail-2.rs4
-rw-r--r--tests/ui/imports/local-modularized-tricky-fail-2.stderr8
-rw-r--r--tests/ui/imports/macros.rs4
-rw-r--r--tests/ui/imports/macros.stderr4
-rw-r--r--tests/ui/imports/reexport-star.rs2
-rw-r--r--tests/ui/imports/reexports.rs4
-rw-r--r--tests/ui/imports/reexports.stderr12
-rw-r--r--tests/ui/imports/shadow_builtin_macros.rs10
-rw-r--r--tests/ui/imports/shadow_builtin_macros.stderr12
-rw-r--r--tests/ui/infinite/infinite-recursion-const-fn.rs2
-rw-r--r--tests/ui/infinite/infinite-recursion-const-fn.stderr4
-rw-r--r--tests/ui/inline-const/const-expr-generic-err.stderr8
-rw-r--r--tests/ui/inline-const/required-const.stderr4
-rw-r--r--tests/ui/instrument-xray/platform-support.rs27
-rw-r--r--tests/ui/instrument-xray/platform-support.unsupported.stderr (renamed from tests/ui/instrument-xray/target-not-supported.stderr)0
-rw-r--r--tests/ui/instrument-xray/target-not-supported.rs10
-rw-r--r--tests/ui/intrinsics/const-eval-select-stability.stderr7
-rw-r--r--tests/ui/intrinsics/intrinsic-alignment.rs20
-rw-r--r--tests/ui/intrinsics/intrinsic-atomics.rs6
-rw-r--r--tests/ui/intrinsics/intrinsic-raw_eq-const-bad.rs9
-rw-r--r--tests/ui/intrinsics/intrinsic-raw_eq-const-bad.stderr16
-rw-r--r--tests/ui/intrinsics/non-integer-atomic.rs18
-rw-r--r--tests/ui/intrinsics/non-integer-atomic.stderr24
-rw-r--r--tests/ui/issues/auxiliary/issue-11224.rs2
-rw-r--r--tests/ui/issues/auxiliary/issue-13507.rs2
-rw-r--r--tests/ui/issues/auxiliary/issue-17662.rs6
-rw-r--r--tests/ui/issues/auxiliary/issue-2380.rs4
-rw-r--r--tests/ui/issues/auxiliary/issue-25467.rs2
-rw-r--r--tests/ui/issues/auxiliary/issue-34796-aux.rs2
-rw-r--r--tests/ui/issues/auxiliary/issue-38226-aux.rs2
-rw-r--r--tests/ui/issues/auxiliary/issue-8401.rs4
-rw-r--r--tests/ui/issues/issue-18959.rs3
-rw-r--r--tests/ui/issues/issue-18959.stderr29
-rw-r--r--tests/ui/issues/issue-19380.rs1
-rw-r--r--tests/ui/issues/issue-19380.stderr27
-rw-r--r--tests/ui/issues/issue-30123.stderr2
-rw-r--r--tests/ui/issues/issue-34373.rs2
-rw-r--r--tests/ui/issues/issue-34373.stderr14
-rw-r--r--tests/ui/issues/issue-41880.stderr2
-rw-r--r--tests/ui/issues/issue-50781.rs1
-rw-r--r--tests/ui/issues/issue-50781.stderr24
-rw-r--r--tests/ui/issues/issue-58734.rs3
-rw-r--r--tests/ui/issues/issue-58734.stderr11
-rw-r--r--tests/ui/issues/issue-76191.rs2
-rw-r--r--tests/ui/issues/issue-76191.stderr4
-rw-r--r--tests/ui/iterators/generator.rs24
-rw-r--r--tests/ui/iterators/generator_args.rs24
-rw-r--r--tests/ui/iterators/generator_capture.rs27
-rw-r--r--tests/ui/iterators/generator_capture_.rs26
-rw-r--r--tests/ui/iterators/generator_capture_.stderr25
-rw-r--r--tests/ui/iterators/generator_capture_fail.rs25
-rw-r--r--tests/ui/iterators/generator_capture_fail.stderr20
-rw-r--r--tests/ui/iterators/generator_capture_fnonce.rs32
-rw-r--r--tests/ui/iterators/generator_capture_no_lend.rs30
-rw-r--r--tests/ui/iterators/generator_returned_from_fn.rs63
-rw-r--r--tests/ui/iterators/generator_returned_from_fn.stderr70
-rw-r--r--tests/ui/iterators/iter-macro-not-async-closure-simplified.narrow.stderr18
-rw-r--r--tests/ui/iterators/iter-macro-not-async-closure-simplified.rs29
-rw-r--r--tests/ui/iterators/iter-macro-not-async-closure-simplified.wide.stderr17
-rw-r--r--tests/ui/iterators/iter-macro-not-async-closure.narrow.stderr72
-rw-r--r--tests/ui/iterators/iter-macro-not-async-closure.rs32
-rw-r--r--tests/ui/iterators/iter-macro-not-async-closure.stderr67
-rw-r--r--tests/ui/kindck/kindck-inherited-copy-bound.rs1
-rw-r--r--tests/ui/kindck/kindck-inherited-copy-bound.stderr22
-rw-r--r--tests/ui/label/continue-pointing-to-block-ice-113379.rs12
-rw-r--r--tests/ui/label/continue-pointing-to-block-ice-113379.stderr43
-rw-r--r--tests/ui/label/continue-pointing-to-block-ice-121623.rs11
-rw-r--r--tests/ui/label/continue-pointing-to-block-ice-121623.stderr14
-rw-r--r--tests/ui/lang-items/lang-item-generic-requirements.rs2
-rw-r--r--tests/ui/lang-items/lang-item-generic-requirements.stderr20
-rw-r--r--tests/ui/layout/invalid-unsized-const-eval.rs2
-rw-r--r--tests/ui/layout/invalid-unsized-const-eval.stderr4
-rw-r--r--tests/ui/layout/invalid-unsized-in-always-sized-tail.rs3
-rw-r--r--tests/ui/layout/invalid-unsized-in-always-sized-tail.stderr4
-rw-r--r--tests/ui/layout/issue-unsized-tail-restatic-ice-122488.rs2
-rw-r--r--tests/ui/layout/issue-unsized-tail-restatic-ice-122488.stderr4
-rw-r--r--tests/ui/layout/uncomputable-due-to-trivial-bounds-ice-135138.rs2
-rw-r--r--tests/ui/layout/uncomputable-due-to-trivial-bounds-ice-135138.stderr4
-rw-r--r--tests/ui/layout/unknown-when-no-type-parameter.rs10
-rw-r--r--tests/ui/layout/unknown-when-no-type-parameter.stderr6
-rw-r--r--tests/ui/layout/unknown-when-ptr-metadata-is-DST.rs2
-rw-r--r--tests/ui/layout/unknown-when-ptr-metadata-is-DST.stderr4
-rw-r--r--tests/ui/lazy-type-alias/def-site-param-defaults-wf.rs4
-rw-r--r--tests/ui/lazy-type-alias/def-site-param-defaults-wf.stderr10
-rw-r--r--tests/ui/lifetimes/auxiliary/lifetime_bound_will_change_warning_lib.rs5
-rw-r--r--tests/ui/limits/huge-static.rs11
-rw-r--r--tests/ui/limits/huge-static.stderr12
-rw-r--r--tests/ui/limits/issue-55878.rs2
-rw-r--r--tests/ui/limits/issue-55878.stderr4
-rw-r--r--tests/ui/lint/bare-trait-objects-path.stderr8
-rw-r--r--tests/ui/lint/dead-code/alias-type-used-as-generic-arg-in-impl.rs19
-rw-r--r--tests/ui/lint/dead-code/issue-41883.stderr2
-rw-r--r--tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr2
-rw-r--r--tests/ui/lint/dead-code/trait-only-used-as-type-bound.rs31
-rw-r--r--tests/ui/lint/lint-ctypes-enum.rs12
-rw-r--r--tests/ui/lint/lint-ctypes-enum.stderr124
-rw-r--r--tests/ui/lint/lint-ctypes-fn.rs15
-rw-r--r--tests/ui/lint/lint-ctypes-fn.stderr48
-rw-r--r--tests/ui/lint/lint-ctypes.rs12
-rw-r--r--tests/ui/lint/lint-ctypes.stderr70
-rw-r--r--tests/ui/lint/overflowing-literals-valid.rs (renamed from tests/ui/big-literals.rs)4
-rw-r--r--tests/ui/lint/unnecessary-extern-crate.stderr41
-rw-r--r--tests/ui/lint/unused/lint-unused-extern-crate.stderr15
-rw-r--r--tests/ui/lint/unused/unused-braces-attrs-issue-141549.fixed15
-rw-r--r--tests/ui/lint/unused/unused-braces-attrs-issue-141549.rs15
-rw-r--r--tests/ui/lint/unused/unused-braces-attrs-issue-141549.stderr19
-rw-r--r--tests/ui/lint/wide_pointer_comparisons.stderr150
-rw-r--r--tests/ui/macros/auxiliary/borrowck-error-in-macro.rs10
-rw-r--r--tests/ui/macros/borrowck-error-in-macro.rs8
-rw-r--r--tests/ui/macros/borrowck-error-in-macro.stderr19
-rw-r--r--tests/ui/macros/ice-in-tokenstream-for-contracts-issue-140683.rs13
-rw-r--r--tests/ui/macros/ice-in-tokenstream-for-contracts-issue-140683.stderr34
-rw-r--r--tests/ui/macros/missing-writer.stderr4
-rw-r--r--tests/ui/macros/no-close-delim-issue-139248.rs5
-rw-r--r--tests/ui/macros/no-close-delim-issue-139248.stderr16
-rw-r--r--tests/ui/methods/issue-19521.stderr2
-rw-r--r--tests/ui/methods/method-not-found-generic-arg-elision.stderr2
-rw-r--r--tests/ui/methods/receiver-equality.stderr2
-rw-r--r--tests/ui/methods/untrimmed-path-type.rs11
-rw-r--r--tests/ui/methods/untrimmed-path-type.stderr9
-rw-r--r--tests/ui/methods/vec-autoderef-autoref.rs (renamed from tests/ui/auto-ref-slice-plus-ref.rs)7
-rw-r--r--tests/ui/methods/vec-autoderef-autoref.stderr (renamed from tests/ui/auto-ref-slice-plus-ref.stderr)16
-rw-r--r--tests/ui/mir/mir_match_guard_let_chains_drop_order.rs110
-rw-r--r--tests/ui/mismatched_types/hr-projection-mismatch.current.stderr12
-rw-r--r--tests/ui/mismatched_types/hr-projection-mismatch.next.stderr20
-rw-r--r--tests/ui/mismatched_types/hr-projection-mismatch.rs25
-rw-r--r--tests/ui/mismatched_types/issue-36053-2.stderr2
-rw-r--r--tests/ui/namespace/namespace-mix.stderr4
-rw-r--r--tests/ui/nll/issue-57362-2.stderr2
-rw-r--r--tests/ui/nll/issue-57642-higher-ranked-subtype.stderr4
-rw-r--r--tests/ui/nll/user-annotations/normalizing-user-annotation.rs31
-rw-r--r--tests/ui/not-enough-arguments.rs52
-rw-r--r--tests/ui/not-enough-arguments.stderr94
-rw-r--r--tests/ui/numbers-arithmetic/bitwise-ops-platform.rs (renamed from tests/ui/bitwise.rs)2
-rw-r--r--tests/ui/object-pointer-types.stderr2
-rw-r--r--tests/ui/on-unimplemented/bad-annotation.rs12
-rw-r--r--tests/ui/on-unimplemented/bad-annotation.stderr14
-rw-r--r--tests/ui/on-unimplemented/on-trait.rs2
-rw-r--r--tests/ui/panics/location-detail-unwrap-multiline.rs12
-rw-r--r--tests/ui/parser/bounds-obj-parens.rs4
-rw-r--r--tests/ui/parser/macro/auxiliary/unicode-control.rs19
-rw-r--r--tests/ui/parser/macro/unicode-control-codepoints-macros.rs49
-rw-r--r--tests/ui/parser/macro/unicode-control-codepoints-macros.stderr57
-rw-r--r--tests/ui/parser/match-arm-comma-typo-issue-140991.fixed24
-rw-r--r--tests/ui/parser/match-arm-comma-typo-issue-140991.rs24
-rw-r--r--tests/ui/parser/match-arm-comma-typo-issue-140991.stderr26
-rw-r--r--tests/ui/parser/trailing-plus-in-bounds.rs4
-rw-r--r--tests/ui/parser/unicode-control-codepoints.rs2
-rw-r--r--tests/ui/parser/unicode-control-codepoints.stderr34
-rw-r--r--tests/ui/pattern/pattern-match-arc-move.rs (renamed from tests/ui/bind-by-move.rs)2
-rw-r--r--tests/ui/pattern/pattern-match-invalid-variant.rs19
-rw-r--r--tests/ui/pattern/pattern-match-invalid-variant.stderr (renamed from tests/ui/bogus-tag.stderr)6
-rw-r--r--tests/ui/pattern/rfc-3637-guard-patterns/name-resolution.rs81
-rw-r--r--tests/ui/pattern/rfc-3637-guard-patterns/name-resolution.stderr133
-rw-r--r--tests/ui/pattern/rfc-3637-guard-patterns/only-gather-locals-once.rs15
-rw-r--r--tests/ui/pattern/rfc-3637-guard-patterns/only-resolve-top-level-guard-expr-once-ice-141265.rs12
-rw-r--r--tests/ui/pattern/rfc-3637-guard-patterns/only-resolve-top-level-guard-expr-once-ice-141265.stderr48
-rw-r--r--tests/ui/pattern/unused-parameters-const-pattern.rs19
-rw-r--r--tests/ui/print-request/emit-warning-print-link-info-without-staticlib.rs5
-rw-r--r--tests/ui/print-request/emit-warning-print-link-info-without-staticlib.stderr6
-rw-r--r--tests/ui/print-request/emit-warning-while-exe-and-print-link-info.rs3
-rw-r--r--tests/ui/print-request/emit-warning-while-exe-and-print-link-info.stderr4
-rw-r--r--tests/ui/print-request/stability.rs1
-rw-r--r--tests/ui/print_type_sizes/niche-filling.rs9
-rw-r--r--tests/ui/print_type_sizes/niche-filling.stdout4
-rw-r--r--tests/ui/proc-macro/no-macro-use-attr.stderr6
-rw-r--r--tests/ui/qualified/qualified-path-params-2.stderr2
-rw-r--r--tests/ui/recursion/recursive-static-definition.rs4
-rw-r--r--tests/ui/recursion/recursive-static-definition.stderr8
-rw-r--r--tests/ui/regions/region-object-lifetime-1.rs2
-rw-r--r--tests/ui/regions/region-object-lifetime-3.rs2
-rw-r--r--tests/ui/repeat-expr/copy-check-const-element-uninferred-count.rs72
-rw-r--r--tests/ui/repeat-expr/copy-check-const-element-uninferred-count.stderr15
-rw-r--r--tests/ui/repeat-expr/copy-check-deferred-after-fallback.rs64
-rw-r--r--tests/ui/repeat-expr/copy-check-deferred-after-fallback.stderr12
-rw-r--r--tests/ui/repeat-expr/copy-check-deferred-before-fallback.rs65
-rw-r--r--tests/ui/repeat-expr/copy-check-inference-side-effects.rs34
-rw-r--r--tests/ui/repeat-expr/copy-check-inference-side-effects.stderr28
-rw-r--r--tests/ui/repeat-expr/copy-check-when-count-inferred-later.rs11
-rw-r--r--tests/ui/repeat-expr/copy-check-when-count-inferred-later.stderr14
-rw-r--r--tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.rs9
-rw-r--r--tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr17
-rw-r--r--tests/ui/resolve/extern-crate-lint-issue-141785.rs11
-rw-r--r--tests/ui/resolve/suggestions/sugg-field-in-format-string-issue-141136.rs15
-rw-r--r--tests/ui/resolve/suggestions/sugg-field-in-format-string-issue-141136.stderr48
-rw-r--r--tests/ui/resolve/tuple-struct-alias.stderr15
-rw-r--r--tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr12
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/temporary-early-drop.rs29
-rw-r--r--tests/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr6
-rw-r--r--tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs2
-rw-r--r--tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr12
-rw-r--r--tests/ui/rust-2018/remove-extern-crate.stderr7
-rw-r--r--tests/ui/rust-2018/removing-extern-crate-malformed-cfg.fixed15
-rw-r--r--tests/ui/rust-2018/removing-extern-crate-malformed-cfg.rs17
-rw-r--r--tests/ui/rust-2018/removing-extern-crate-malformed-cfg.stderr76
-rw-r--r--tests/ui/rust-2018/removing-extern-crate.stderr31
-rw-r--r--tests/ui/self/arbitrary-self-types-dyn-incompatible.rs1
-rw-r--r--tests/ui/self/arbitrary-self-types-dyn-incompatible.stderr26
-rw-r--r--tests/ui/self/dispatch-dyn-incompatible-that-does-not-deref.rs18
-rw-r--r--tests/ui/self/dispatch-dyn-incompatible-that-does-not-deref.stderr49
-rw-r--r--tests/ui/self/self-impl.stderr16
-rw-r--r--tests/ui/simd/const-err-trumps-simd-err.rs3
-rw-r--r--tests/ui/simd/const-err-trumps-simd-err.stderr6
-rw-r--r--tests/ui/simd/target-feature-mixup.rs1
-rw-r--r--tests/ui/sized/stack-overflow-trait-infer-98842.32bit.stderr4
-rw-r--r--tests/ui/sized/stack-overflow-trait-infer-98842.64bit.stderr4
-rw-r--r--tests/ui/sized/stack-overflow-trait-infer-98842.rs2
-rw-r--r--tests/ui/statics/issue-14227.rs2
-rw-r--r--tests/ui/statics/issue-14227.stderr4
-rw-r--r--tests/ui/statics/mutable_memory_validation.rs2
-rw-r--r--tests/ui/statics/mutable_memory_validation.stderr4
-rw-r--r--tests/ui/statics/uninhabited-static.rs4
-rw-r--r--tests/ui/statics/uninhabited-static.stderr8
-rw-r--r--tests/ui/statics/unsizing-wfcheck-issue-127299.rs1
-rw-r--r--tests/ui/statics/unsizing-wfcheck-issue-127299.stderr26
-rw-r--r--tests/ui/stats/input-stats.rs4
-rw-r--r--tests/ui/stats/input-stats.stderr289
-rw-r--r--tests/ui/str/str-static-literal.rs (renamed from tests/ui/bare-static-string.rs)2
-rw-r--r--tests/ui/structs/default-field-values/invalid-const.rs4
-rw-r--r--tests/ui/structs/default-field-values/invalid-const.stderr8
-rw-r--r--tests/ui/structs/default-field-values/post-mono.direct.stderr4
-rw-r--r--tests/ui/structs/default-field-values/post-mono.indirect.stderr4
-rw-r--r--tests/ui/structs/default-field-values/post-mono.rs2
-rw-r--r--tests/ui/structs/struct-path-associated-type.stderr24
-rw-r--r--tests/ui/suggestions/mut-borrow-needed-by-trait.stderr4
-rw-r--r--tests/ui/suggestions/suggest-using-chars.stderr4
-rw-r--r--tests/ui/suggestions/unnamable-types.rs2
-rw-r--r--tests/ui/target-feature/abi-incompatible-target-feature-attribute-fcw.rs14
-rw-r--r--tests/ui/target-feature/abi-incompatible-target-feature-attribute-fcw.stderr31
-rw-r--r--tests/ui/target-feature/auxiliary/using-target-feature-unstable.rs4
-rw-r--r--tests/ui/target-feature/gate.rs3
-rw-r--r--tests/ui/target-feature/gate.stderr10
-rw-r--r--tests/ui/target-feature/unstable-feature.rs4
-rw-r--r--tests/ui/target-feature/unstable-feature.stderr2
-rw-r--r--tests/ui/threads-sendsync/tls-dont-move-after-init.rs37
-rw-r--r--tests/ui/traits/const-traits/staged-api.stderr133
-rw-r--r--tests/ui/traits/issue-20692.rs1
-rw-r--r--tests/ui/traits/issue-20692.stderr23
-rw-r--r--tests/ui/traits/issue-38604.rs2
-rw-r--r--tests/ui/traits/issue-38604.stderr23
-rw-r--r--tests/ui/traits/item-privacy.rs4
-rw-r--r--tests/ui/traits/item-privacy.stderr70
-rw-r--r--tests/ui/traits/next-solver/assembly/better_any-backcompat.rs33
-rw-r--r--tests/ui/traits/next-solver/coercion/coerce-ambig-alias-to-rigid-alias.rs (renamed from tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs)0
-rw-r--r--tests/ui/traits/next-solver/coercion/coerce-depth.rs (renamed from tests/ui/traits/next-solver/coerce-depth.rs)0
-rw-r--r--tests/ui/traits/next-solver/coercion/fn-def-coerce-nested-obligations.rs16
-rw-r--r--tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs (renamed from tests/ui/traits/next-solver/non-wf-in-coerce-pointers.rs)0
-rw-r--r--tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.stderr (renamed from tests/ui/traits/next-solver/non-wf-in-coerce-pointers.stderr)0
-rw-r--r--tests/ui/traits/next-solver/coercion/trait-upcast-lhs-needs-normalization.rs (renamed from tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs)0
-rw-r--r--tests/ui/traits/next-solver/coercion/upcast-right-substs.rs (renamed from tests/ui/traits/next-solver/upcast-right-substs.rs)0
-rw-r--r--tests/ui/traits/next-solver/coercion/upcast-wrong-substs.rs (renamed from tests/ui/traits/next-solver/upcast-wrong-substs.rs)0
-rw-r--r--tests/ui/traits/next-solver/coercion/upcast-wrong-substs.stderr (renamed from tests/ui/traits/next-solver/upcast-wrong-substs.stderr)0
-rw-r--r--tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env-2.rs29
-rw-r--r--tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env.rs17
-rw-r--r--tests/ui/traits/next-solver/no-param-env-const-fold.rs10
-rw-r--r--tests/ui/traits/next-solver/normalize/normalize-place-elem.rs32
-rw-r--r--tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.rs2
-rw-r--r--tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr39
-rw-r--r--tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.rs2
-rw-r--r--tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.stderr48
-rw-r--r--tests/ui/traits/object/macro-matcher.stderr16
-rw-r--r--tests/ui/traits/object/safety.rs1
-rw-r--r--tests/ui/traits/object/safety.stderr31
-rw-r--r--tests/ui/traits/test-2.rs2
-rw-r--r--tests/ui/traits/test-2.stderr53
-rw-r--r--tests/ui/transmutability/enums/repr/should_handle_all.rs3
-rw-r--r--tests/ui/transmutability/uninhabited.rs6
-rw-r--r--tests/ui/transmutability/uninhabited.stderr12
-rw-r--r--tests/ui/transmute/unnecessary-transmutation.fixed30
-rw-r--r--tests/ui/transmute/unnecessary-transmutation.rs24
-rw-r--r--tests/ui/transmute/unnecessary-transmutation.stderr293
-rw-r--r--tests/ui/treat-err-as-bug/err.rs2
-rw-r--r--tests/ui/treat-err-as-bug/err.stderr4
-rw-r--r--tests/ui/type-alias-impl-trait/in-where-clause.stderr5
-rw-r--r--tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr6
-rw-r--r--tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/match-upvar-discriminant-of-opaque.rs12
-rw-r--r--tests/ui/type-alias-impl-trait/match-upvar-discriminant-of-opaque.stderr9
-rw-r--r--tests/ui/type-alias-impl-trait/recursive-fn-tait.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr11
-rw-r--r--tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.stderr9
-rw-r--r--tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.stderr11
-rw-r--r--tests/ui/type/pattern_types/literals.rs10
-rw-r--r--tests/ui/type/pattern_types/literals.stderr20
-rw-r--r--tests/ui/type/pattern_types/range_patterns.rs2
-rw-r--r--tests/ui/type/pattern_types/range_patterns.stderr4
-rw-r--r--tests/ui/type/pattern_types/reverse_range.rs3
-rw-r--r--tests/ui/type/pattern_types/reverse_range.stderr4
-rw-r--r--tests/ui/type/pattern_types/validity.rs16
-rw-r--r--tests/ui/type/pattern_types/validity.stderr32
-rw-r--r--tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.rs1
-rw-r--r--tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr21
-rw-r--r--tests/ui/typeck/closure-ty-mismatch-issue-128561.rs10
-rw-r--r--tests/ui/typeck/closure-ty-mismatch-issue-128561.stderr28
-rw-r--r--tests/ui/typeck/consider-borrowing-141810-1.rs9
-rw-r--r--tests/ui/typeck/consider-borrowing-141810-1.stderr28
-rw-r--r--tests/ui/typeck/consider-borrowing-141810-2.rs8
-rw-r--r--tests/ui/typeck/consider-borrowing-141810-2.stderr19
-rw-r--r--tests/ui/typeck/consider-borrowing-141810-3.rs7
-rw-r--r--tests/ui/typeck/consider-borrowing-141810-3.stderr22
-rw-r--r--tests/ui/typeck/consider-borrowing-141810-4.rs11
-rw-r--r--tests/ui/typeck/consider-borrowing-141810-4.stderr14
-rw-r--r--tests/ui/typeck/ice-unexpected-region-123863.stderr2
-rw-r--r--tests/ui/typeck/issue-107087.stderr8
-rw-r--r--tests/ui/typeck/issue-31173.stderr2
-rw-r--r--tests/ui/ufcs/ufcs-partially-resolved.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr2
-rw-r--r--tests/ui/unsafe-binders/cat-projection.rs24
-rw-r--r--tests/ui/unsafe-binders/non-strucutral-type-diag.rs17
-rw-r--r--tests/ui/unsafe-binders/non-strucutral-type-diag.stderr13
-rw-r--r--tests/ui/unsafe-binders/unused-lifetimes-2.fixed20
-rw-r--r--tests/ui/unsafe-binders/unused-lifetimes-2.rs20
-rw-r--r--tests/ui/unsafe-binders/unused-lifetimes-2.stderr16
-rw-r--r--tests/ui/unsafe-binders/unused-lifetimes.fixed20
-rw-r--r--tests/ui/unsafe-binders/unused-lifetimes.rs20
-rw-r--r--tests/ui/unsafe-binders/unused-lifetimes.stderr14
-rw-r--r--tests/ui/unsafe/move-out-of-non-copy.rs15
-rw-r--r--tests/ui/unsafe/move-out-of-non-copy.stderr14
-rw-r--r--tests/ui/wf/wf-dyn-incompatible.stderr4
1035 files changed, 11793 insertions, 8517 deletions
diff --git a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs
index 22b9b029a40..2c78b794a8d 100644
--- a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs
+++ b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs
@@ -7,8 +7,6 @@
 //@ run-pass
 //@ needs-subprocess
 
-#![feature(avx512_target_feature)]
-
 #![allow(overflowing_literals)]
 #![allow(unused_variables)]
 
diff --git a/tests/ui/abi/simd-abi-checks-avx.rs b/tests/ui/abi/simd-abi-checks-avx.rs
index 772512702ec..7432381d15b 100644
--- a/tests/ui/abi/simd-abi-checks-avx.rs
+++ b/tests/ui/abi/simd-abi-checks-avx.rs
@@ -2,7 +2,6 @@
 //@ build-fail
 //@ compile-flags: -C target-feature=-avx
 
-#![feature(avx512_target_feature)]
 #![feature(portable_simd)]
 #![feature(simd_ffi)]
 #![allow(improper_ctypes_definitions)]
diff --git a/tests/ui/abi/simd-abi-checks-avx.stderr b/tests/ui/abi/simd-abi-checks-avx.stderr
index 48db30bf453..7489ca01946 100644
--- a/tests/ui/abi/simd-abi-checks-avx.stderr
+++ b/tests/ui/abi/simd-abi-checks-avx.stderr
@@ -1,5 +1,5 @@
 error: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
-  --> $DIR/simd-abi-checks-avx.rs:60:11
+  --> $DIR/simd-abi-checks-avx.rs:59:11
    |
 LL |         f(g());
    |           ^^^ function called here
@@ -7,7 +7,7 @@ LL |         f(g());
    = help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
 
 error: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
-  --> $DIR/simd-abi-checks-avx.rs:60:9
+  --> $DIR/simd-abi-checks-avx.rs:59:9
    |
 LL |         f(g());
    |         ^^^^^^ function called here
@@ -15,7 +15,7 @@ LL |         f(g());
    = help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
 
 error: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
-  --> $DIR/simd-abi-checks-avx.rs:66:14
+  --> $DIR/simd-abi-checks-avx.rs:65:14
    |
 LL |         gavx(favx());
    |              ^^^^^^ function called here
@@ -23,7 +23,7 @@ LL |         gavx(favx());
    = help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
 
 error: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
-  --> $DIR/simd-abi-checks-avx.rs:66:9
+  --> $DIR/simd-abi-checks-avx.rs:65:9
    |
 LL |         gavx(favx());
    |         ^^^^^^^^^^^^ function called here
@@ -31,7 +31,7 @@ LL |         gavx(favx());
    = help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
 
 error: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
-  --> $DIR/simd-abi-checks-avx.rs:76:19
+  --> $DIR/simd-abi-checks-avx.rs:75:19
    |
 LL |         w(Wrapper(g()));
    |                   ^^^ function called here
@@ -39,7 +39,7 @@ LL |         w(Wrapper(g()));
    = help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
 
 error: this function call uses SIMD vector type `Wrapper` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
-  --> $DIR/simd-abi-checks-avx.rs:76:9
+  --> $DIR/simd-abi-checks-avx.rs:75:9
    |
 LL |         w(Wrapper(g()));
    |         ^^^^^^^^^^^^^^^ function called here
@@ -47,7 +47,7 @@ LL |         w(Wrapper(g()));
    = help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
 
 error: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
-  --> $DIR/simd-abi-checks-avx.rs:90:9
+  --> $DIR/simd-abi-checks-avx.rs:89:9
    |
 LL |         some_extern();
    |         ^^^^^^^^^^^^^ function called here
@@ -55,7 +55,7 @@ LL |         some_extern();
    = help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
 
 error: this function definition uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled
-  --> $DIR/simd-abi-checks-avx.rs:25:1
+  --> $DIR/simd-abi-checks-avx.rs:24:1
    |
 LL | unsafe extern "C" fn g() -> __m256 {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@@ -63,7 +63,7 @@ LL | unsafe extern "C" fn g() -> __m256 {
    = help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
 
 error: this function definition uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled
-  --> $DIR/simd-abi-checks-avx.rs:20:1
+  --> $DIR/simd-abi-checks-avx.rs:19:1
    |
 LL | unsafe extern "C" fn f(_: __m256) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@@ -71,7 +71,7 @@ LL | unsafe extern "C" fn f(_: __m256) {
    = help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
 
 error: this function definition uses SIMD vector type `Wrapper` which (with the chosen ABI) requires the `avx` target feature, which is not enabled
-  --> $DIR/simd-abi-checks-avx.rs:15:1
+  --> $DIR/simd-abi-checks-avx.rs:14:1
    |
 LL | unsafe extern "C" fn w(_: Wrapper) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
@@ -79,7 +79,7 @@ LL | unsafe extern "C" fn w(_: Wrapper) {
    = help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
 
 error: this function call uses SIMD vector type `std::arch::x86_64::__m256` which (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
-  --> $DIR/simd-abi-checks-avx.rs:54:8
+  --> $DIR/simd-abi-checks-avx.rs:53:8
    |
 LL |     || g()
    |        ^^^ function called here
@@ -87,7 +87,7 @@ LL |     || g()
    = help: consider enabling it globally (`-C target-feature=+avx`) or locally (`#[target_feature(enable="avx")]`)
 
 note: the above error was encountered while instantiating `fn in_closure::{closure#0}`
-  --> $DIR/simd-abi-checks-avx.rs:82:9
+  --> $DIR/simd-abi-checks-avx.rs:81:9
    |
 LL |         in_closure()();
    |         ^^^^^^^^^^^^^^
diff --git a/tests/ui/abi/sysv64-zst.stderr b/tests/ui/abi/sysv64-zst.stderr
index 59d7b004417..f91d1b5fa63 100644
--- a/tests/ui/abi/sysv64-zst.stderr
+++ b/tests/ui/abi/sysv64-zst.stderr
@@ -59,7 +59,9 @@ error: fn_abi_of(pass_zst) = FnAbi {
            },
            c_variadic: false,
            fixed_count: 1,
-           conv: X86_64SysV,
+           conv: X86(
+               SysV64,
+           ),
            can_unwind: false,
        }
   --> $DIR/sysv64-zst.rs:8:1
diff --git a/tests/ui/allocator/auxiliary/helper.rs b/tests/ui/allocator/auxiliary/helper.rs
index c638546a947..4267b901ca0 100644
--- a/tests/ui/allocator/auxiliary/helper.rs
+++ b/tests/ui/allocator/auxiliary/helper.rs
@@ -6,6 +6,6 @@
 extern crate alloc;
 use alloc::fmt;
 
-pub fn work_with(p: &fmt::Debug) {
+pub fn work_with(p: &dyn fmt::Debug) {
     drop(p);
 }
diff --git a/tests/ui/array-slice-vec/array_const_index-0.rs b/tests/ui/array-slice-vec/array_const_index-0.rs
index f4fe89a50c2..aef07d952fa 100644
--- a/tests/ui/array-slice-vec/array_const_index-0.rs
+++ b/tests/ui/array-slice-vec/array_const_index-0.rs
@@ -1,7 +1,6 @@
 const A: &'static [i32] = &[];
 const B: i32 = (&A)[1];
-//~^ NOTE index out of bounds: the length is 0 but the index is 1
-//~| ERROR evaluation of constant value failed
+//~^ ERROR index out of bounds: the length is 0 but the index is 1
 
 fn main() {
     let _ = B;
diff --git a/tests/ui/array-slice-vec/array_const_index-0.stderr b/tests/ui/array-slice-vec/array_const_index-0.stderr
index d16e8d50dfd..1080705713b 100644
--- a/tests/ui/array-slice-vec/array_const_index-0.stderr
+++ b/tests/ui/array-slice-vec/array_const_index-0.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: index out of bounds: the length is 0 but the index is 1
   --> $DIR/array_const_index-0.rs:2:16
    |
 LL | const B: i32 = (&A)[1];
-   |                ^^^^^^^ index out of bounds: the length is 0 but the index is 1
+   |                ^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/array-slice-vec/array_const_index-1.rs b/tests/ui/array-slice-vec/array_const_index-1.rs
index 0d4de137a6e..4adbd157ed0 100644
--- a/tests/ui/array-slice-vec/array_const_index-1.rs
+++ b/tests/ui/array-slice-vec/array_const_index-1.rs
@@ -1,7 +1,6 @@
 const A: [i32; 0] = [];
 const B: i32 = A[1];
-//~^ NOTE index out of bounds: the length is 0 but the index is 1
-//~| ERROR evaluation of constant value failed
+//~^ ERROR index out of bounds: the length is 0 but the index is 1
 
 fn main() {
     let _ = B;
diff --git a/tests/ui/array-slice-vec/array_const_index-1.stderr b/tests/ui/array-slice-vec/array_const_index-1.stderr
index f9ba2f13911..56299848d92 100644
--- a/tests/ui/array-slice-vec/array_const_index-1.stderr
+++ b/tests/ui/array-slice-vec/array_const_index-1.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: index out of bounds: the length is 0 but the index is 1
   --> $DIR/array_const_index-1.rs:2:16
    |
 LL | const B: i32 = A[1];
-   |                ^^^^ index out of bounds: the length is 0 but the index is 1
+   |                ^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/asm/aarch64/parse-error.rs b/tests/ui/asm/aarch64/parse-error.rs
index aa731c35dda..622f99aa1b1 100644
--- a/tests/ui/asm/aarch64/parse-error.rs
+++ b/tests/ui/asm/aarch64/parse-error.rs
@@ -1,57 +1,11 @@
 //@ only-aarch64
 
-use std::arch::{asm, global_asm};
+use std::arch::asm;
 
 fn main() {
     let mut foo = 0;
     let mut bar = 0;
     unsafe {
-        asm!();
-        //~^ ERROR requires at least a template string argument
-        asm!(foo);
-        //~^ ERROR asm template must be a string literal
-        asm!("{}" foo);
-        //~^ ERROR expected token: `,`
-        asm!("{}", foo);
-        //~^ ERROR expected operand, clobber_abi, options, or additional template string
-        asm!("{}", in foo);
-        //~^ ERROR expected `(`, found `foo`
-        asm!("{}", in(reg foo));
-        //~^ ERROR expected `)`, found `foo`
-        asm!("{}", in(reg));
-        //~^ ERROR expected expression, found end of macro arguments
-        asm!("{}", inout(=) foo => bar);
-        //~^ ERROR expected register class or explicit register
-        asm!("{}", inout(reg) foo =>);
-        //~^ ERROR expected expression, found end of macro arguments
-        asm!("{}", in(reg) foo => bar);
-        //~^ ERROR expected one of `!`, `,`, `.`, `::`, `?`, `{`, or an operator, found `=>`
-        asm!("{}", sym foo + bar);
-        //~^ ERROR expected a path for argument to `sym`
-        asm!("", options(foo));
-        //~^ ERROR expected one of
-        asm!("", options(nomem foo));
-        //~^ ERROR expected one of
-        asm!("", options(nomem, foo));
-        //~^ ERROR expected one of
-        asm!("{}", options(), const foo);
-        //~^ ERROR attempt to use a non-constant value in a constant
-        asm!("", clobber_abi(foo));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi("C" foo));
-        //~^ ERROR expected one of `)` or `,`, found `foo`
-        asm!("", clobber_abi("C", foo));
-        //~^ ERROR expected string literal
-        asm!("{}", clobber_abi("C"), const foo);
-        //~^ ERROR attempt to use a non-constant value in a constant
-        asm!("", options(), clobber_abi("C"));
-        asm!("{}", options(), clobber_abi("C"), const foo);
-        //~^ ERROR attempt to use a non-constant value in a constant
-        asm!("{a}", a = const foo, a = const bar);
-        //~^ ERROR duplicate argument named `a`
-        //~^^ ERROR argument never used
-        //~^^^ ERROR attempt to use a non-constant value in a constant
-        //~^^^^ ERROR attempt to use a non-constant value in a constant
         asm!("", a = in("x0") foo);
         //~^ ERROR explicit register arguments cannot have names
         asm!("{a}", in("x0") foo, a = const bar);
@@ -61,66 +15,5 @@ fn main() {
         asm!("{1}", in("x0") foo, const bar);
         //~^ ERROR positional arguments cannot follow named arguments or explicit register arguments
         //~^^ ERROR attempt to use a non-constant value in a constant
-        asm!("", options(), "");
-        //~^ ERROR expected one of
-        asm!("{}", in(reg) foo, "{}", out(reg) foo);
-        //~^ ERROR expected one of
-        asm!(format!("{{{}}}", 0), in(reg) foo);
-        //~^ ERROR asm template must be a string literal
-        asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
-        //~^ ERROR asm template must be a string literal
-        asm!("{}", in(reg) _);
-        //~^ ERROR _ cannot be used for input operands
-        asm!("{}", inout(reg) _);
-        //~^ ERROR _ cannot be used for input operands
-        asm!("{}", inlateout(reg) _);
-        //~^ ERROR _ cannot be used for input operands
     }
 }
-
-const FOO: i32 = 1;
-const BAR: i32 = 2;
-global_asm!();
-//~^ ERROR requires at least a template string argument
-global_asm!(FOO);
-//~^ ERROR asm template must be a string literal
-global_asm!("{}" FOO);
-//~^ ERROR expected token: `,`
-global_asm!("{}", FOO);
-//~^ ERROR expected operand, options, or additional template string
-global_asm!("{}", const);
-//~^ ERROR expected expression, found end of macro arguments
-global_asm!("{}", const(reg) FOO);
-//~^ ERROR expected one of
-global_asm!("", options(FOO));
-//~^ ERROR expected one of
-global_asm!("", options(nomem FOO));
-//~^ ERROR expected one of
-//~| ERROR the `nomem` option cannot be used with `global_asm!`
-global_asm!("", options(nomem, FOO));
-//~^ ERROR expected one of
-//~| ERROR the `nomem` option cannot be used with `global_asm!`
-global_asm!("{}", options(), const FOO);
-global_asm!("", clobber_abi(FOO));
-//~^ ERROR expected string literal
-global_asm!("", clobber_abi("C" FOO));
-//~^ ERROR expected one of `)` or `,`, found `FOO`
-global_asm!("", clobber_abi("C", FOO));
-//~^ ERROR expected string literal
-global_asm!("{}", clobber_abi("C"), const FOO);
-//~^ ERROR `clobber_abi` cannot be used with `global_asm!`
-global_asm!("", options(), clobber_abi("C"));
-//~^ ERROR `clobber_abi` cannot be used with `global_asm!`
-global_asm!("{}", options(), clobber_abi("C"), const FOO);
-//~^ ERROR `clobber_abi` cannot be used with `global_asm!`
-global_asm!("{a}", a = const FOO, a = const BAR);
-//~^ ERROR duplicate argument named `a`
-//~^^ ERROR argument never used
-global_asm!("", options(), "");
-//~^ ERROR expected one of
-global_asm!("{}", const FOO, "{}", const FOO);
-//~^ ERROR expected one of
-global_asm!(format!("{{{}}}", 0), const FOO);
-//~^ ERROR asm template must be a string literal
-global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
-//~^ ERROR asm template must be a string literal
diff --git a/tests/ui/asm/aarch64/parse-error.stderr b/tests/ui/asm/aarch64/parse-error.stderr
index b5e1169e5f6..ca21311f87f 100644
--- a/tests/ui/asm/aarch64/parse-error.stderr
+++ b/tests/ui/asm/aarch64/parse-error.stderr
@@ -1,389 +1,19 @@
-error: requires at least a template string argument
-  --> $DIR/parse-error.rs:9:9
-   |
-LL |         asm!();
-   |         ^^^^^^
-
-error: asm template must be a string literal
-  --> $DIR/parse-error.rs:11:14
-   |
-LL |         asm!(foo);
-   |              ^^^
-
-error: expected token: `,`
-  --> $DIR/parse-error.rs:13:19
-   |
-LL |         asm!("{}" foo);
-   |                   ^^^ expected `,`
-
-error: expected operand, clobber_abi, options, or additional template string
-  --> $DIR/parse-error.rs:15:20
-   |
-LL |         asm!("{}", foo);
-   |                    ^^^ expected operand, clobber_abi, options, or additional template string
-
-error: expected `(`, found `foo`
-  --> $DIR/parse-error.rs:17:23
-   |
-LL |         asm!("{}", in foo);
-   |                       ^^^ expected `(`
-
-error: expected `)`, found `foo`
-  --> $DIR/parse-error.rs:19:27
-   |
-LL |         asm!("{}", in(reg foo));
-   |                           ^^^ expected `)`
-
-error: expected expression, found end of macro arguments
-  --> $DIR/parse-error.rs:21:27
-   |
-LL |         asm!("{}", in(reg));
-   |                           ^ expected expression
-
-error: expected register class or explicit register
-  --> $DIR/parse-error.rs:23:26
-   |
-LL |         asm!("{}", inout(=) foo => bar);
-   |                          ^
-
-error: expected expression, found end of macro arguments
-  --> $DIR/parse-error.rs:25:37
-   |
-LL |         asm!("{}", inout(reg) foo =>);
-   |                                     ^ expected expression
-
-error: expected one of `!`, `,`, `.`, `::`, `?`, `{`, or an operator, found `=>`
-  --> $DIR/parse-error.rs:27:32
-   |
-LL |         asm!("{}", in(reg) foo => bar);
-   |                                ^^ expected one of 7 possible tokens
-
-error: expected a path for argument to `sym`
-  --> $DIR/parse-error.rs:29:24
-   |
-LL |         asm!("{}", sym foo + bar);
-   |                        ^^^^^^^^^
-
-error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo`
-  --> $DIR/parse-error.rs:31:26
-   |
-LL |         asm!("", options(foo));
-   |                          ^^^ expected one of 10 possible tokens
-
-error: expected one of `)` or `,`, found `foo`
-  --> $DIR/parse-error.rs:33:32
-   |
-LL |         asm!("", options(nomem foo));
-   |                                ^^^ expected one of `)` or `,`
-
-error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo`
-  --> $DIR/parse-error.rs:35:33
-   |
-LL |         asm!("", options(nomem, foo));
-   |                                 ^^^ expected one of 10 possible tokens
-
-error: expected string literal
-  --> $DIR/parse-error.rs:39:30
-   |
-LL |         asm!("", clobber_abi(foo));
-   |                              ^^^ not a string literal
-
-error: expected one of `)` or `,`, found `foo`
-  --> $DIR/parse-error.rs:41:34
-   |
-LL |         asm!("", clobber_abi("C" foo));
-   |                                  ^^^ expected one of `)` or `,`
-
-error: expected string literal
-  --> $DIR/parse-error.rs:43:35
-   |
-LL |         asm!("", clobber_abi("C", foo));
-   |                                   ^^^ not a string literal
-
-error: duplicate argument named `a`
-  --> $DIR/parse-error.rs:50:36
-   |
-LL |         asm!("{a}", a = const foo, a = const bar);
-   |                     -------------  ^^^^^^^^^^^^^ duplicate argument
-   |                     |
-   |                     previously here
-
-error: argument never used
-  --> $DIR/parse-error.rs:50:36
-   |
-LL |         asm!("{a}", a = const foo, a = const bar);
-   |                                    ^^^^^^^^^^^^^ argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
-
 error: explicit register arguments cannot have names
-  --> $DIR/parse-error.rs:55:18
+  --> $DIR/parse-error.rs:9:18
    |
 LL |         asm!("", a = in("x0") foo);
    |                  ^^^^^^^^^^^^^^^^
 
 error: positional arguments cannot follow named arguments or explicit register arguments
-  --> $DIR/parse-error.rs:61:35
+  --> $DIR/parse-error.rs:15:35
    |
 LL |         asm!("{1}", in("x0") foo, const bar);
    |                     ------------  ^^^^^^^^^ positional argument
    |                     |
    |                     explicit register argument
 
-error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""`
-  --> $DIR/parse-error.rs:64:29
-   |
-LL |         asm!("", options(), "");
-   |                             ^^ expected one of 10 possible tokens
-
-error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `"{}"`
-  --> $DIR/parse-error.rs:66:33
-   |
-LL |         asm!("{}", in(reg) foo, "{}", out(reg) foo);
-   |                                 ^^^^ expected one of 10 possible tokens
-
-error: asm template must be a string literal
-  --> $DIR/parse-error.rs:68:14
-   |
-LL |         asm!(format!("{{{}}}", 0), in(reg) foo);
-   |              ^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: asm template must be a string literal
-  --> $DIR/parse-error.rs:70:21
-   |
-LL |         asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
-   |                     ^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: _ cannot be used for input operands
-  --> $DIR/parse-error.rs:72:28
-   |
-LL |         asm!("{}", in(reg) _);
-   |                            ^
-
-error: _ cannot be used for input operands
-  --> $DIR/parse-error.rs:74:31
-   |
-LL |         asm!("{}", inout(reg) _);
-   |                               ^
-
-error: _ cannot be used for input operands
-  --> $DIR/parse-error.rs:76:35
-   |
-LL |         asm!("{}", inlateout(reg) _);
-   |                                   ^
-
-error: requires at least a template string argument
-  --> $DIR/parse-error.rs:83:1
-   |
-LL | global_asm!();
-   | ^^^^^^^^^^^^^
-
-error: asm template must be a string literal
-  --> $DIR/parse-error.rs:85:13
-   |
-LL | global_asm!(FOO);
-   |             ^^^
-
-error: expected token: `,`
-  --> $DIR/parse-error.rs:87:18
-   |
-LL | global_asm!("{}" FOO);
-   |                  ^^^ expected `,`
-
-error: expected operand, options, or additional template string
-  --> $DIR/parse-error.rs:89:19
-   |
-LL | global_asm!("{}", FOO);
-   |                   ^^^ expected operand, options, or additional template string
-
-error: expected expression, found end of macro arguments
-  --> $DIR/parse-error.rs:91:24
-   |
-LL | global_asm!("{}", const);
-   |                        ^ expected expression
-
-error: expected one of `,`, `.`, `?`, or an operator, found `FOO`
-  --> $DIR/parse-error.rs:93:30
-   |
-LL | global_asm!("{}", const(reg) FOO);
-   |                              ^^^ expected one of `,`, `.`, `?`, or an operator
-
-error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
-  --> $DIR/parse-error.rs:95:25
-   |
-LL | global_asm!("", options(FOO));
-   |                         ^^^ expected one of `)`, `att_syntax`, or `raw`
-
-error: the `nomem` option cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:97:25
-   |
-LL | global_asm!("", options(nomem FOO));
-   |                         ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
-
-error: expected one of `)` or `,`, found `FOO`
-  --> $DIR/parse-error.rs:97:31
-   |
-LL | global_asm!("", options(nomem FOO));
-   |                               ^^^ expected one of `)` or `,`
-
-error: the `nomem` option cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:100:25
-   |
-LL | global_asm!("", options(nomem, FOO));
-   |                         ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
-
-error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
-  --> $DIR/parse-error.rs:100:32
-   |
-LL | global_asm!("", options(nomem, FOO));
-   |                                ^^^ expected one of `)`, `att_syntax`, or `raw`
-
-error: expected string literal
-  --> $DIR/parse-error.rs:104:29
-   |
-LL | global_asm!("", clobber_abi(FOO));
-   |                             ^^^ not a string literal
-
-error: expected one of `)` or `,`, found `FOO`
-  --> $DIR/parse-error.rs:106:33
-   |
-LL | global_asm!("", clobber_abi("C" FOO));
-   |                                 ^^^ expected one of `)` or `,`
-
-error: expected string literal
-  --> $DIR/parse-error.rs:108:34
-   |
-LL | global_asm!("", clobber_abi("C", FOO));
-   |                                  ^^^ not a string literal
-
-error: `clobber_abi` cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:110:19
-   |
-LL | global_asm!("{}", clobber_abi("C"), const FOO);
-   |                   ^^^^^^^^^^^^^^^^
-
-error: `clobber_abi` cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:112:28
-   |
-LL | global_asm!("", options(), clobber_abi("C"));
-   |                            ^^^^^^^^^^^^^^^^
-
-error: `clobber_abi` cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:114:30
-   |
-LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
-   |                              ^^^^^^^^^^^^^^^^
-
-error: duplicate argument named `a`
-  --> $DIR/parse-error.rs:116:35
-   |
-LL | global_asm!("{a}", a = const FOO, a = const BAR);
-   |                    -------------  ^^^^^^^^^^^^^ duplicate argument
-   |                    |
-   |                    previously here
-
-error: argument never used
-  --> $DIR/parse-error.rs:116:35
-   |
-LL | global_asm!("{a}", a = const FOO, a = const BAR);
-   |                                   ^^^^^^^^^^^^^ argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
-
-error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `""`
-  --> $DIR/parse-error.rs:119:28
-   |
-LL | global_asm!("", options(), "");
-   |                            ^^ expected one of `clobber_abi`, `const`, `options`, or `sym`
-
-error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `"{}"`
-  --> $DIR/parse-error.rs:121:30
-   |
-LL | global_asm!("{}", const FOO, "{}", const FOO);
-   |                              ^^^^ expected one of `clobber_abi`, `const`, `options`, or `sym`
-
-error: asm template must be a string literal
-  --> $DIR/parse-error.rs:123:13
-   |
-LL | global_asm!(format!("{{{}}}", 0), const FOO);
-   |             ^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: asm template must be a string literal
-  --> $DIR/parse-error.rs:125:20
-   |
-LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
-   |                    ^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:37:37
-   |
-LL |         asm!("{}", options(), const foo);
-   |                                     ^^^ non-constant value
-   |
-help: consider using `const` instead of `let`
-   |
-LL -     let mut foo = 0;
-LL +     const foo: /* Type */ = 0;
-   |
-
-error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:45:44
-   |
-LL |         asm!("{}", clobber_abi("C"), const foo);
-   |                                            ^^^ non-constant value
-   |
-help: consider using `const` instead of `let`
-   |
-LL -     let mut foo = 0;
-LL +     const foo: /* Type */ = 0;
-   |
-
-error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:48:55
-   |
-LL |         asm!("{}", options(), clobber_abi("C"), const foo);
-   |                                                       ^^^ non-constant value
-   |
-help: consider using `const` instead of `let`
-   |
-LL -     let mut foo = 0;
-LL +     const foo: /* Type */ = 0;
-   |
-
-error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:50:31
-   |
-LL |         asm!("{a}", a = const foo, a = const bar);
-   |                               ^^^ non-constant value
-   |
-help: consider using `const` instead of `let`
-   |
-LL -     let mut foo = 0;
-LL +     const foo: /* Type */ = 0;
-   |
-
-error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:50:46
-   |
-LL |         asm!("{a}", a = const foo, a = const bar);
-   |                                              ^^^ non-constant value
-   |
-help: consider using `const` instead of `let`
-   |
-LL -     let mut bar = 0;
-LL +     const bar: /* Type */ = 0;
-   |
-
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:57:45
+  --> $DIR/parse-error.rs:11:45
    |
 LL |         asm!("{a}", in("x0") foo, a = const bar);
    |                                             ^^^ non-constant value
@@ -395,7 +25,7 @@ LL +     const bar: /* Type */ = 0;
    |
 
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:59:45
+  --> $DIR/parse-error.rs:13:45
    |
 LL |         asm!("{a}", in("x0") foo, a = const bar);
    |                                             ^^^ non-constant value
@@ -407,7 +37,7 @@ LL +     const bar: /* Type */ = 0;
    |
 
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:61:41
+  --> $DIR/parse-error.rs:15:41
    |
 LL |         asm!("{1}", in("x0") foo, const bar);
    |                                         ^^^ non-constant value
@@ -418,6 +48,6 @@ LL -     let mut bar = 0;
 LL +     const bar: /* Type */ = 0;
    |
 
-error: aborting due to 59 previous errors
+error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/asm/cfg-parse-error.rs b/tests/ui/asm/cfg-parse-error.rs
new file mode 100644
index 00000000000..9b79d16a76d
--- /dev/null
+++ b/tests/ui/asm/cfg-parse-error.rs
@@ -0,0 +1,57 @@
+//@ needs-asm-support
+#![feature(asm_cfg)]
+
+use std::arch::asm;
+
+fn main() {
+    unsafe {
+        asm!(
+            "",
+            #[cfg(false)]
+            clobber_abi("C"),
+            #[cfg(false)]
+            options(att_syntax),
+            #[cfg(false)]
+            a = out(reg) x,
+            "",
+            //~^ ERROR expected one of `#`, `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""`
+        );
+        asm!(
+            #[cfg(false)]
+            "",
+            #[cfg(false)]
+            const {
+                5
+            },
+            "",
+            //~^ ERROR expected one of `#`, `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""`
+        );
+
+        asm!(
+            #[cfg_attr(true, cfg(false))]
+            const {
+                5
+            },
+            "",
+        );
+
+        // This is not accepted because `a = out(reg) x` is not a valid expression.
+        asm!(
+            #[cfg(false)]
+            a = out(reg) x, //~ ERROR expected token: `,`
+            "",
+        );
+
+        // For now, any non-cfg attributes are rejected
+        asm!(
+            #[rustfmt::skip] //~ ERROR this attribute is not supported on assembly
+            "",
+        );
+
+        // For now, any non-cfg attributes are rejected
+        asm!(
+            #![rustfmt::skip] //~ ERROR an inner attribute is not permitted in this context
+            "",
+        );
+    }
+}
diff --git a/tests/ui/asm/cfg-parse-error.stderr b/tests/ui/asm/cfg-parse-error.stderr
new file mode 100644
index 00000000000..8a70d39a43d
--- /dev/null
+++ b/tests/ui/asm/cfg-parse-error.stderr
@@ -0,0 +1,39 @@
+error: expected one of `#`, `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""`
+  --> $DIR/cfg-parse-error.rs:16:13
+   |
+LL |             a = out(reg) x,
+   |                            - expected one of 11 possible tokens
+LL |             "",
+   |             ^^ unexpected token
+
+error: expected one of `#`, `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""`
+  --> $DIR/cfg-parse-error.rs:26:13
+   |
+LL |             },
+   |               - expected one of 11 possible tokens
+LL |             "",
+   |             ^^ unexpected token
+
+error: expected token: `,`
+  --> $DIR/cfg-parse-error.rs:41:26
+   |
+LL |             a = out(reg) x,
+   |                          ^ expected `,`
+
+error: this attribute is not supported on assembly
+  --> $DIR/cfg-parse-error.rs:47:13
+   |
+LL |             #[rustfmt::skip]
+   |             ^^^^^^^^^^^^^^^^
+
+error: an inner attribute is not permitted in this context
+  --> $DIR/cfg-parse-error.rs:53:13
+   |
+LL |             #![rustfmt::skip]
+   |             ^^^^^^^^^^^^^^^^^
+   |
+   = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
+   = note: outer attributes, like `#[test]`, annotate the item following them
+
+error: aborting due to 5 previous errors
+
diff --git a/tests/ui/asm/cfg.rs b/tests/ui/asm/cfg.rs
new file mode 100644
index 00000000000..bcf86340b9d
--- /dev/null
+++ b/tests/ui/asm/cfg.rs
@@ -0,0 +1,125 @@
+// Check that `cfg` and `cfg_attr` work as expected.
+//
+//@ revisions: reva revb
+//@ only-x86_64
+//@ run-pass
+#![feature(asm_cfg, cfg_select)]
+
+use std::arch::{asm, naked_asm};
+
+#[unsafe(naked)]
+extern "C" fn ignore_const_operand() -> u64 {
+    naked_asm!(
+        "mov rax, 5",
+        #[cfg(revb)]
+        "mov rax, {a}",
+        "ret",
+        #[cfg(revb)]
+        a = const 10,
+    )
+}
+
+#[unsafe(naked)]
+extern "C" fn ignore_const_operand_cfg_attr() -> u64 {
+    naked_asm!(
+        "mov rax, 5",
+        #[cfg_attr(true, cfg(revb))]
+        "mov rax, {a}",
+        "ret",
+        #[cfg_attr(true, cfg(revb))]
+        a = const 10,
+    )
+}
+
+#[unsafe(naked)]
+extern "C" fn const_operand() -> u64 {
+    naked_asm!(
+        "mov rax, {a}",
+        "ret",
+        #[cfg(reva)]
+        a = const 5,
+        #[cfg(revb)]
+        a = const 10,
+    )
+}
+
+fn options() {
+    // Without the cfg, this throws an error that the `att_syntax` option is provided twice.
+    unsafe {
+        asm!(
+            "nop",
+            #[cfg(false)]
+            options(att_syntax),
+            options(att_syntax)
+        )
+    }
+}
+
+fn clobber_abi() {
+    // Without the cfg, this throws an error that the "C" abi is provided twice.
+    unsafe {
+        asm!(
+            "nop",
+            #[cfg(false)]
+            clobber_abi("C"),
+            clobber_abi("C"),
+        );
+    }
+}
+
+#[unsafe(naked)]
+extern "C" fn first_template() -> u64 {
+    naked_asm!(
+        #[cfg(reva)]
+        "mov rax, 5",
+        #[cfg(revb)]
+        "mov rax, 10",
+        "ret",
+    )
+}
+
+#[unsafe(naked)]
+extern "C" fn true_and_false() -> u64 {
+    naked_asm!(
+        "mov rax, 5",
+        #[cfg(true)]
+        #[cfg(false)]
+        "mov rax, 10",
+        "ret",
+    )
+}
+
+#[unsafe(naked)]
+extern "C" fn false_and_true() -> u64 {
+    naked_asm!(
+        "mov rax, 5",
+        #[cfg(false)]
+        #[cfg(true)]
+        "mov rax, 10",
+        "ret",
+    )
+}
+
+pub fn main() {
+    std::cfg_select! {
+        reva => {
+            assert_eq!(const_operand(), 5);
+            assert_eq!(ignore_const_operand_cfg_attr(), 5);
+            assert_eq!(ignore_const_operand(), 5);
+            assert_eq!(first_template(), 5);
+
+        }
+        revb => {
+            assert_eq!(const_operand(), 10);
+            assert_eq!(ignore_const_operand_cfg_attr(), 10);
+            assert_eq!(ignore_const_operand(), 10);
+            assert_eq!(first_template(), 10);
+
+        }
+    }
+    options();
+    clobber_abi();
+
+    assert_eq!(true_and_false(), 5);
+    assert_eq!(false_and_true(), 5);
+}
diff --git a/tests/ui/asm/fail-const-eval-issue-121099.stderr b/tests/ui/asm/fail-const-eval-issue-121099.stderr
index eb662dadffb..7e2718c9eac 100644
--- a/tests/ui/asm/fail-const-eval-issue-121099.stderr
+++ b/tests/ui/asm/fail-const-eval-issue-121099.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of `{global_asm#0}::{constant#0}` failed
+error[E0080]: attempt to shift left by `500_i32`, which would overflow
   --> $DIR/fail-const-eval-issue-121099.rs:8:31
    |
 LL | global_asm!("/* {} */", const 1 << 500);
-   |                               ^^^^^^^^ attempt to shift left by `500_i32`, which would overflow
+   |                               ^^^^^^^^ evaluation of `{global_asm#0}::{constant#0}` failed here
 
-error[E0080]: evaluation of `{global_asm#1}::{constant#0}` failed
+error[E0080]: attempt to divide `1_i32` by zero
   --> $DIR/fail-const-eval-issue-121099.rs:10:31
    |
 LL | global_asm!("/* {} */", const 1 / 0);
-   |                               ^^^^^ attempt to divide `1_i32` by zero
+   |                               ^^^^^ evaluation of `{global_asm#1}::{constant#0}` failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/asm/naked-functions-ffi.rs b/tests/ui/asm/naked-functions-ffi.rs
index 565c440022d..4ba5ccc57f6 100644
--- a/tests/ui/asm/naked-functions-ffi.rs
+++ b/tests/ui/asm/naked-functions-ffi.rs
@@ -7,6 +7,5 @@ use std::arch::naked_asm;
 #[unsafe(naked)]
 pub extern "C" fn naked(p: char) -> u128 {
     //~^ WARN uses type `char`
-    //~| WARN uses type `u128`
     naked_asm!("")
 }
diff --git a/tests/ui/asm/naked-functions-ffi.stderr b/tests/ui/asm/naked-functions-ffi.stderr
index 9df6185498e..f7893a3b8de 100644
--- a/tests/ui/asm/naked-functions-ffi.stderr
+++ b/tests/ui/asm/naked-functions-ffi.stderr
@@ -8,13 +8,5 @@ LL | pub extern "C" fn naked(p: char) -> u128 {
    = note: the `char` type has no C equivalent
    = note: `#[warn(improper_ctypes_definitions)]` on by default
 
-warning: `extern` fn uses type `u128`, which is not FFI-safe
-  --> $DIR/naked-functions-ffi.rs:8:37
-   |
-LL | pub extern "C" fn naked(p: char) -> u128 {
-   |                                     ^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
-warning: 2 warnings emitted
+warning: 1 warning emitted
 
diff --git a/tests/ui/asm/parse-error.rs b/tests/ui/asm/parse-error.rs
index 4d7b522f5fc..d135ccae128 100644
--- a/tests/ui/asm/parse-error.rs
+++ b/tests/ui/asm/parse-error.rs
@@ -113,11 +113,9 @@ global_asm!("", options(FOO));
 global_asm!("", options(FOO,));
 //~^ ERROR expected one of `)`, `att_syntax`, or `raw`, found `FOO`
 global_asm!("", options(nomem FOO));
-//~^ ERROR the `nomem` option cannot be used with `global_asm!`
-//~| ERROR expected one of `)` or `,`, found `FOO`
+//~^ ERROR expected one of `)` or `,`, found `FOO`
 global_asm!("", options(nomem, FOO));
-//~^ ERROR the `nomem` option cannot be used with `global_asm!`
-//~| ERROR expected one of `)`, `att_syntax`, or `raw`, found `FOO`
+//~^ ERROR expected one of `)`, `att_syntax`, or `raw`, found `FOO`
 global_asm!("{}", options(), const FOO);
 global_asm!("", clobber_abi(FOO));
 //~^ ERROR expected string literal
diff --git a/tests/ui/asm/parse-error.stderr b/tests/ui/asm/parse-error.stderr
index 74647372a35..dff85a601b7 100644
--- a/tests/ui/asm/parse-error.stderr
+++ b/tests/ui/asm/parse-error.stderr
@@ -176,17 +176,17 @@ LL |         asm!("{a}", a = const foo, a = const bar);
    |
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
 
-error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""`
+error: expected one of `#`, `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""`
   --> $DIR/parse-error.rs:80:29
    |
 LL |         asm!("", options(), "");
-   |                             ^^ expected one of 10 possible tokens
+   |                             ^^ expected one of 11 possible tokens
 
-error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `"{}"`
+error: expected one of `#`, `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `"{}"`
   --> $DIR/parse-error.rs:82:33
    |
 LL |         asm!("{}", in(reg) foo, "{}", out(reg) foo);
-   |                                 ^^^^ expected one of 10 possible tokens
+   |                                 ^^^^ expected one of 11 possible tokens
 
 error: asm template must be a string literal
   --> $DIR/parse-error.rs:84:14
@@ -270,74 +270,62 @@ error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
 LL | global_asm!("", options(FOO,));
    |                         ^^^ expected one of `)`, `att_syntax`, or `raw`
 
-error: the `nomem` option cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:115:25
-   |
-LL | global_asm!("", options(nomem FOO));
-   |                         ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
-
 error: expected one of `)` or `,`, found `FOO`
   --> $DIR/parse-error.rs:115:31
    |
 LL | global_asm!("", options(nomem FOO));
    |                               ^^^ expected one of `)` or `,`
 
-error: the `nomem` option cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:118:25
-   |
-LL | global_asm!("", options(nomem, FOO));
-   |                         ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
-
 error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
-  --> $DIR/parse-error.rs:118:32
+  --> $DIR/parse-error.rs:117:32
    |
 LL | global_asm!("", options(nomem, FOO));
    |                                ^^^ expected one of `)`, `att_syntax`, or `raw`
 
 error: expected string literal
-  --> $DIR/parse-error.rs:122:29
+  --> $DIR/parse-error.rs:120:29
    |
 LL | global_asm!("", clobber_abi(FOO));
    |                             ^^^ not a string literal
 
 error: expected one of `)` or `,`, found `FOO`
-  --> $DIR/parse-error.rs:124:33
+  --> $DIR/parse-error.rs:122:33
    |
 LL | global_asm!("", clobber_abi("C" FOO));
    |                                 ^^^ expected one of `)` or `,`
 
 error: expected string literal
-  --> $DIR/parse-error.rs:126:34
+  --> $DIR/parse-error.rs:124:34
    |
 LL | global_asm!("", clobber_abi("C", FOO));
    |                                  ^^^ not a string literal
 
 error: `clobber_abi` cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:128:19
+  --> $DIR/parse-error.rs:126:19
    |
 LL | global_asm!("{}", clobber_abi("C"), const FOO);
    |                   ^^^^^^^^^^^^^^^^
 
 error: `clobber_abi` cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:130:28
+  --> $DIR/parse-error.rs:128:28
    |
 LL | global_asm!("", options(), clobber_abi("C"));
    |                            ^^^^^^^^^^^^^^^^
 
 error: `clobber_abi` cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:132:30
+  --> $DIR/parse-error.rs:130:30
    |
 LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
    |                              ^^^^^^^^^^^^^^^^
 
 error: `clobber_abi` cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:134:17
+  --> $DIR/parse-error.rs:132:17
    |
 LL | global_asm!("", clobber_abi("C"), clobber_abi("C"));
    |                 ^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^
 
 error: duplicate argument named `a`
-  --> $DIR/parse-error.rs:136:35
+  --> $DIR/parse-error.rs:134:35
    |
 LL | global_asm!("{a}", a = const FOO, a = const BAR);
    |                    -------------  ^^^^^^^^^^^^^ duplicate argument
@@ -345,27 +333,27 @@ LL | global_asm!("{a}", a = const FOO, a = const BAR);
    |                    previously here
 
 error: argument never used
-  --> $DIR/parse-error.rs:136:35
+  --> $DIR/parse-error.rs:134:35
    |
 LL | global_asm!("{a}", a = const FOO, a = const BAR);
    |                                   ^^^^^^^^^^^^^ argument never used
    |
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
 
-error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `""`
-  --> $DIR/parse-error.rs:139:28
+error: expected one of `#`, `clobber_abi`, `const`, `options`, or `sym`, found `""`
+  --> $DIR/parse-error.rs:137:28
    |
 LL | global_asm!("", options(), "");
-   |                            ^^ expected one of `clobber_abi`, `const`, `options`, or `sym`
+   |                            ^^ expected one of `#`, `clobber_abi`, `const`, `options`, or `sym`
 
-error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `"{}"`
-  --> $DIR/parse-error.rs:141:30
+error: expected one of `#`, `clobber_abi`, `const`, `options`, or `sym`, found `"{}"`
+  --> $DIR/parse-error.rs:139:30
    |
 LL | global_asm!("{}", const FOO, "{}", const FOO);
-   |                              ^^^^ expected one of `clobber_abi`, `const`, `options`, or `sym`
+   |                              ^^^^ expected one of `#`, `clobber_abi`, `const`, `options`, or `sym`
 
 error: asm template must be a string literal
-  --> $DIR/parse-error.rs:143:13
+  --> $DIR/parse-error.rs:141:13
    |
 LL | global_asm!(format!("{{{}}}", 0), const FOO);
    |             ^^^^^^^^^^^^^^^^^^^^
@@ -373,7 +361,7 @@ LL | global_asm!(format!("{{{}}}", 0), const FOO);
    = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: asm template must be a string literal
-  --> $DIR/parse-error.rs:145:20
+  --> $DIR/parse-error.rs:143:20
    |
 LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
    |                    ^^^^^^^^^^^^^^^^^^^^
@@ -381,37 +369,37 @@ LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
    = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: the `in` operand cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:148:19
+  --> $DIR/parse-error.rs:146:19
    |
 LL | global_asm!("{}", in(reg));
    |                   ^^ the `in` operand is not meaningful for global-scoped inline assembly, remove it
 
 error: the `out` operand cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:150:19
+  --> $DIR/parse-error.rs:148:19
    |
 LL | global_asm!("{}", out(reg));
    |                   ^^^ the `out` operand is not meaningful for global-scoped inline assembly, remove it
 
 error: the `lateout` operand cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:152:19
+  --> $DIR/parse-error.rs:150:19
    |
 LL | global_asm!("{}", lateout(reg));
    |                   ^^^^^^^ the `lateout` operand is not meaningful for global-scoped inline assembly, remove it
 
 error: the `inout` operand cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:154:19
+  --> $DIR/parse-error.rs:152:19
    |
 LL | global_asm!("{}", inout(reg));
    |                   ^^^^^ the `inout` operand is not meaningful for global-scoped inline assembly, remove it
 
 error: the `inlateout` operand cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:156:19
+  --> $DIR/parse-error.rs:154:19
    |
 LL | global_asm!("{}", inlateout(reg));
    |                   ^^^^^^^^^ the `inlateout` operand is not meaningful for global-scoped inline assembly, remove it
 
 error: the `label` operand cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:158:19
+  --> $DIR/parse-error.rs:156:19
    |
 LL | global_asm!("{}", label(reg));
    |                   ^^^^^ the `label` operand is not meaningful for global-scoped inline assembly, remove it
@@ -476,6 +464,6 @@ LL -     let mut bar = 0;
 LL +     const bar: /* Type */ = 0;
    |
 
-error: aborting due to 72 previous errors
+error: aborting due to 70 previous errors
 
 For more information about this error, try `rustc --explain E0435`.
diff --git a/tests/ui/asm/x86_64/evex512-implicit-feature.rs b/tests/ui/asm/x86_64/evex512-implicit-feature.rs
index ea2acd424e2..ec5da7c7fa4 100644
--- a/tests/ui/asm/x86_64/evex512-implicit-feature.rs
+++ b/tests/ui/asm/x86_64/evex512-implicit-feature.rs
@@ -2,7 +2,6 @@
 //@ only-x86_64
 //@ compile-flags: --crate-type=lib -C target-cpu=skylake
 
-#![feature(avx512_target_feature)]
 #![feature(stdarch_x86_avx512)]
 
 use std::arch::x86_64::*;
diff --git a/tests/ui/asm/x86_64/target-feature-attr.rs b/tests/ui/asm/x86_64/target-feature-attr.rs
index 6bb277ac165..2193117caeb 100644
--- a/tests/ui/asm/x86_64/target-feature-attr.rs
+++ b/tests/ui/asm/x86_64/target-feature-attr.rs
@@ -2,8 +2,6 @@
 // Set the base cpu explicitly, in case the default has been changed.
 //@ compile-flags: -C target-cpu=x86-64
 
-#![feature(avx512_target_feature)]
-
 use std::arch::asm;
 
 #[target_feature(enable = "avx")]
diff --git a/tests/ui/asm/x86_64/target-feature-attr.stderr b/tests/ui/asm/x86_64/target-feature-attr.stderr
index 0cd571ac8cc..c852726ee7f 100644
--- a/tests/ui/asm/x86_64/target-feature-attr.stderr
+++ b/tests/ui/asm/x86_64/target-feature-attr.stderr
@@ -1,23 +1,23 @@
 error: register class `ymm_reg` requires the `avx` target feature
-  --> $DIR/target-feature-attr.rs:20:40
+  --> $DIR/target-feature-attr.rs:18:40
    |
 LL |     asm!("vaddps {2:y}, {0:y}, {1:y}", in(ymm_reg) x, in(ymm_reg) y, lateout(ymm_reg) x);
    |                                        ^^^^^^^^^^^^^
 
 error: register class `ymm_reg` requires the `avx` target feature
-  --> $DIR/target-feature-attr.rs:20:55
+  --> $DIR/target-feature-attr.rs:18:55
    |
 LL |     asm!("vaddps {2:y}, {0:y}, {1:y}", in(ymm_reg) x, in(ymm_reg) y, lateout(ymm_reg) x);
    |                                                       ^^^^^^^^^^^^^
 
 error: register class `ymm_reg` requires the `avx` target feature
-  --> $DIR/target-feature-attr.rs:20:70
+  --> $DIR/target-feature-attr.rs:18:70
    |
 LL |     asm!("vaddps {2:y}, {0:y}, {1:y}", in(ymm_reg) x, in(ymm_reg) y, lateout(ymm_reg) x);
    |                                                                      ^^^^^^^^^^^^^^^^^^
 
 error: register class `kreg` requires at least one of the following target features: avx512bw, avx512f
-  --> $DIR/target-feature-attr.rs:35:23
+  --> $DIR/target-feature-attr.rs:33:23
    |
 LL |     asm!("/* {0} */", in(kreg) x);
    |                       ^^^^^^^^^^
diff --git a/tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr b/tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr
index a8256f775a6..19b63a041d6 100644
--- a/tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr
+++ b/tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr
@@ -27,7 +27,7 @@ LL |         B::X => println!("B::X"),
    |         ^^^^ `const` depends on a generic parameter
 
 error[E0158]: constant pattern cannot depend on generic parameters
-  --> $DIR/associated-const-type-parameter-pattern.rs:30:9
+  --> $DIR/associated-const-type-parameter-pattern.rs:28:48
    |
 LL | pub trait Foo {
    | -------------
@@ -35,13 +35,12 @@ LL |     const X: EFoo;
    |     ------------- constant defined here
 ...
 LL | pub fn test_let_pat<A: Foo, B: Foo>(arg: EFoo, A::X: EFoo) {
-   |                     - constant depends on this generic parameter
-LL |
-LL |     let A::X = arg;
-   |         ^^^^ `const` depends on a generic parameter
+   |                     -                          ^^^^ `const` depends on a generic parameter
+   |                     |
+   |                     constant depends on this generic parameter
 
 error[E0158]: constant pattern cannot depend on generic parameters
-  --> $DIR/associated-const-type-parameter-pattern.rs:28:48
+  --> $DIR/associated-const-type-parameter-pattern.rs:30:9
    |
 LL | pub trait Foo {
    | -------------
@@ -49,9 +48,10 @@ LL |     const X: EFoo;
    |     ------------- constant defined here
 ...
 LL | pub fn test_let_pat<A: Foo, B: Foo>(arg: EFoo, A::X: EFoo) {
-   |                     -                          ^^^^ `const` depends on a generic parameter
-   |                     |
-   |                     constant depends on this generic parameter
+   |                     - constant depends on this generic parameter
+LL |
+LL |     let A::X = arg;
+   |         ^^^^ `const` depends on a generic parameter
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/associated-consts/defaults-not-assumed-fail.rs b/tests/ui/associated-consts/defaults-not-assumed-fail.rs
index 830fd4ab0e9..e63424e13e3 100644
--- a/tests/ui/associated-consts/defaults-not-assumed-fail.rs
+++ b/tests/ui/associated-consts/defaults-not-assumed-fail.rs
@@ -7,7 +7,7 @@ trait Tr {
     // This should not be a constant evaluation error (overflow). The value of
     // `Self::A` must not be assumed to hold inside the trait.
     const B: u8 = Self::A + 1;
-    //~^ ERROR evaluation of `<() as Tr>::B` failed
+    //~^ ERROR overflow
 }
 
 // An impl that doesn't override any constant will NOT cause a const eval error
diff --git a/tests/ui/associated-consts/defaults-not-assumed-fail.stderr b/tests/ui/associated-consts/defaults-not-assumed-fail.stderr
index 3386e81dc98..40f5f889f36 100644
--- a/tests/ui/associated-consts/defaults-not-assumed-fail.stderr
+++ b/tests/ui/associated-consts/defaults-not-assumed-fail.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `<() as Tr>::B` failed
+error[E0080]: attempt to compute `u8::MAX + 1_u8`, which would overflow
   --> $DIR/defaults-not-assumed-fail.rs:9:19
    |
 LL |     const B: u8 = Self::A + 1;
-   |                   ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
+   |                   ^^^^^^^^^^^ evaluation of `<() as Tr>::B` failed here
 
 note: erroneous constant encountered
   --> $DIR/defaults-not-assumed-fail.rs:34:16
diff --git a/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr b/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr
index 978305c2ce3..3e914e0538d 100644
--- a/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr
+++ b/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr
@@ -2,7 +2,13 @@ error[E0223]: ambiguous associated type
   --> $DIR/not-found-self-type-differs-shadowing-trait-item.rs:28:12
    |
 LL |     let _: S::<bool>::Pr = ();
-   |            ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<S<bool> as Tr>::Pr`
+   |            ^^^^^^^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -     let _: S::<bool>::Pr = ();
+LL +     let _: <S<bool> as Tr>::Pr = ();
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr b/tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr
index 9e1dd739807..fcf6b4c3e73 100644
--- a/tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr
+++ b/tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr
@@ -2,7 +2,12 @@ error[E0223]: ambiguous associated type
   --> $DIR/ambiguous-associated-type-with-generics.rs:13:13
    |
 LL |     let _x: <dyn Trait<i32>>::Ty;
-   |             ^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<dyn Trait<i32> as Assoc>::Ty`
+   |             ^^^^^^^^^^^^^^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL |     let _x: <dyn Trait<i32> as Assoc>::Ty;
+   |                             ++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/associated-item/associated-item-duplicate-names-3.stderr b/tests/ui/associated-item/associated-item-duplicate-names-3.stderr
index a2346e292ac..84a9da09988 100644
--- a/tests/ui/associated-item/associated-item-duplicate-names-3.stderr
+++ b/tests/ui/associated-item/associated-item-duplicate-names-3.stderr
@@ -13,7 +13,13 @@ error[E0223]: ambiguous associated type
   --> $DIR/associated-item-duplicate-names-3.rs:18:12
    |
 LL |     let x: Baz::Bar = 5;
-   |            ^^^^^^^^ help: use fully-qualified syntax: `<Baz as Foo>::Bar`
+   |            ^^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -     let x: Baz::Bar = 5;
+LL +     let x: <Baz as Foo>::Bar = 5;
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/associated-type-bounds/return-type-notation/path-missing.stderr b/tests/ui/associated-type-bounds/return-type-notation/path-missing.stderr
index edac09db89d..677fc0e10bb 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/path-missing.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/path-missing.stderr
@@ -8,9 +8,7 @@ error[E0575]: expected method or associated constant, found associated type `A::
   --> $DIR/path-missing.rs:12:5
    |
 LL |     <T as A>::bad(..): Send,
-   |     ^^^^^^^^^^^^^^^^^
-   |
-   = note: can't use a type alias as a constructor
+   |     ^^^^^^^^^^^^^^^^^ not a method or associated constant
 
 error[E0220]: associated function `method` not found for `T`
   --> $DIR/path-missing.rs:19:8
diff --git a/tests/ui/associated-type-bounds/return-type-notation/path-no-qself.stderr b/tests/ui/associated-type-bounds/return-type-notation/path-no-qself.stderr
index aad6dfc496b..a13fdbda1bf 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/path-no-qself.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/path-no-qself.stderr
@@ -7,7 +7,7 @@ LL |     Trait::method(..): Send,
 help: if there were a type named `Example` that implemented `Trait`, you could use the fully-qualified path
    |
 LL -     Trait::method(..): Send,
-LL +     <Example as Trait>::method: Send,
+LL +     <Example as Trait>::method(..): Send,
    |
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/associated-type-bounds/return-type-notation/path-non-param-qself.stderr b/tests/ui/associated-type-bounds/return-type-notation/path-non-param-qself.stderr
index 38202bdbf07..4c4c2c24079 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/path-non-param-qself.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/path-non-param-qself.stderr
@@ -3,18 +3,35 @@ error[E0223]: ambiguous associated function
    |
 LL |     <()>::method(..): Send,
    |     ^^^^^^^^^^^^^^^^
+   |
+help: if there were a trait named `Example` with associated function `method` implemented for `()`, you could use the fully-qualified path
+   |
+LL |     <() as Example>::method(..): Send,
+   |         ++++++++++
 
 error[E0223]: ambiguous associated function
   --> $DIR/path-non-param-qself.rs:13:5
    |
 LL |     i32::method(..): Send,
    |     ^^^^^^^^^^^^^^^
+   |
+help: if there were a trait named `Example` with associated function `method` implemented for `i32`, you could use the fully-qualified path
+   |
+LL -     i32::method(..): Send,
+LL +     <i32 as Example>::method(..): Send,
+   |
 
 error[E0223]: ambiguous associated function
   --> $DIR/path-non-param-qself.rs:15:5
    |
 LL |     Adt::method(..): Send,
    |     ^^^^^^^^^^^^^^^
+   |
+help: if there were a trait named `Example` with associated function `method` implemented for `Adt`, you could use the fully-qualified path
+   |
+LL -     Adt::method(..): Send,
+LL +     <Adt as Example>::method(..): Send,
+   |
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/associated-types/associated-type-tuple-struct-construction.rs b/tests/ui/associated-types/associated-type-tuple-struct-construction.rs
deleted file mode 100644
index d5809ecd55d..00000000000
--- a/tests/ui/associated-types/associated-type-tuple-struct-construction.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Users cannot yet construct structs through associated types
-// in both expressions and patterns
-
-#![feature(more_qualified_paths)]
-
-fn main() {
-    let <Foo as A>::Assoc(n) = <Foo as A>::Assoc(2);
-    //~^ ERROR expected method or associated constant, found associated type
-    //~| ERROR expected method or associated constant, found associated type
-    assert!(n == 2);
-}
-
-struct TupleStruct(i8);
-
-struct Foo;
-
-
-trait A {
-    type Assoc;
-}
-
-impl A for Foo {
-    type Assoc = TupleStruct;
-}
diff --git a/tests/ui/associated-types/associated-type-tuple-struct-construction.stderr b/tests/ui/associated-types/associated-type-tuple-struct-construction.stderr
deleted file mode 100644
index bca7deeb512..00000000000
--- a/tests/ui/associated-types/associated-type-tuple-struct-construction.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0575]: expected method or associated constant, found associated type `A::Assoc`
-  --> $DIR/associated-type-tuple-struct-construction.rs:7:32
-   |
-LL |     let <Foo as A>::Assoc(n) = <Foo as A>::Assoc(2);
-   |                                ^^^^^^^^^^^^^^^^^
-   |
-   = note: can't use a type alias as a constructor
-
-error[E0575]: expected method or associated constant, found associated type `A::Assoc`
-  --> $DIR/associated-type-tuple-struct-construction.rs:7:9
-   |
-LL |     let <Foo as A>::Assoc(n) = <Foo as A>::Assoc(2);
-   |         ^^^^^^^^^^^^^^^^^
-   |
-   = note: can't use a type alias as a constructor
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0575`.
diff --git a/tests/ui/associated-types/associated-types-in-ambiguous-context.stderr b/tests/ui/associated-types/associated-types-in-ambiguous-context.stderr
index 1be8db5ddf4..a7647cf26aa 100644
--- a/tests/ui/associated-types/associated-types-in-ambiguous-context.stderr
+++ b/tests/ui/associated-types/associated-types-in-ambiguous-context.stderr
@@ -14,7 +14,13 @@ error[E0223]: ambiguous associated type
   --> $DIR/associated-types-in-ambiguous-context.rs:22:17
    |
 LL | trait Foo where Foo::Assoc: Bar {
-   |                 ^^^^^^^^^^ help: use fully-qualified syntax: `<Self as Foo>::Assoc`
+   |                 ^^^^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL - trait Foo where Foo::Assoc: Bar {
+LL + trait Foo where <Self as Foo>::Assoc: Bar {
+   |
 
 error[E0223]: ambiguous associated type
   --> $DIR/associated-types-in-ambiguous-context.rs:27:10
@@ -42,7 +48,13 @@ error[E0223]: ambiguous associated type
   --> $DIR/associated-types-in-ambiguous-context.rs:13:23
    |
 LL |     fn grab(&self) -> Grab::Value;
-   |                       ^^^^^^^^^^^ help: use fully-qualified syntax: `<Self as Grab>::Value`
+   |                       ^^^^^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -     fn grab(&self) -> Grab::Value;
+LL +     fn grab(&self) -> <Self as Grab>::Value;
+   |
 
 error[E0223]: ambiguous associated type
   --> $DIR/associated-types-in-ambiguous-context.rs:16:22
diff --git a/tests/ui/associated-types/issue-43924.stderr b/tests/ui/associated-types/issue-43924.stderr
index ab1a9511ec6..526f425b21e 100644
--- a/tests/ui/associated-types/issue-43924.stderr
+++ b/tests/ui/associated-types/issue-43924.stderr
@@ -14,7 +14,7 @@ error[E0599]: no function or associated item named `default` found for trait obj
   --> $DIR/issue-43924.rs:14:39
    |
 LL |     assert_eq!(<() as Foo<u32>>::Out::default().to_string(), "false");
-   |                                       ^^^^^^^ function or associated item not found in `dyn ToString`
+   |                                       ^^^^^^^ function or associated item not found in `(dyn ToString + 'static)`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/associated-types/tuple-struct-expr-pat.fixed b/tests/ui/associated-types/tuple-struct-expr-pat.fixed
new file mode 100644
index 00000000000..d6e2385f821
--- /dev/null
+++ b/tests/ui/associated-types/tuple-struct-expr-pat.fixed
@@ -0,0 +1,48 @@
+// Check that fully qualified syntax can **not** be used in tuple struct expressions (calls) and
+// patterns. Both tuple struct expressions and patterns are resolved in value namespace and thus
+// can't be resolved through associated *types*.
+//
+//@ run-rustfix
+
+#![feature(more_qualified_paths)]
+
+fn main() {
+    let <T<0> as Trait>::Assoc {} = <T<0> as Trait>::Assoc {};
+    //~^ error: expected method or associated constant, found associated type
+    //~| error: expected tuple struct or tuple variant, found associated type
+    let <T<1> as Trait>::Assoc { 0: _a } = <T<1> as Trait>::Assoc { 0: 0 };
+    //~^ error: expected method or associated constant, found associated type
+    //~| error: expected tuple struct or tuple variant, found associated type
+    let <T<2> as Trait>::Assoc { 0: _a, 1: _b } = <T<2> as Trait>::Assoc { 0: 0, 1: 1 };
+    //~^ error: expected method or associated constant, found associated type
+    //~| error: expected tuple struct or tuple variant, found associated type
+    let <T<3> as Trait>::Assoc { 0: ref _a, 1: ref mut _b, 2: mut _c } = <T<3> as Trait>::Assoc { 0: 0, 1: 1, 2: 2 };
+    //~^ error: expected method or associated constant, found associated type
+    //~| error: expected tuple struct or tuple variant, found associated type
+}
+
+
+struct T<const N: usize>;
+
+struct T0();
+struct T1(u8);
+struct T2(u8, u8);
+struct T3(u8, u8, u8);
+
+trait Trait {
+    type Assoc;
+}
+
+impl Trait for T<0> {
+    type Assoc = T0;
+}
+
+impl Trait for T<1> {
+    type Assoc = T1;
+}
+impl Trait for T<2> {
+    type Assoc = T2;
+}
+impl Trait for T<3> {
+    type Assoc = T3;
+}
diff --git a/tests/ui/associated-types/tuple-struct-expr-pat.rs b/tests/ui/associated-types/tuple-struct-expr-pat.rs
new file mode 100644
index 00000000000..f27a5fe1753
--- /dev/null
+++ b/tests/ui/associated-types/tuple-struct-expr-pat.rs
@@ -0,0 +1,48 @@
+// Check that fully qualified syntax can **not** be used in tuple struct expressions (calls) and
+// patterns. Both tuple struct expressions and patterns are resolved in value namespace and thus
+// can't be resolved through associated *types*.
+//
+//@ run-rustfix
+
+#![feature(more_qualified_paths)]
+
+fn main() {
+    let <T<0> as Trait>::Assoc() = <T<0> as Trait>::Assoc();
+    //~^ error: expected method or associated constant, found associated type
+    //~| error: expected tuple struct or tuple variant, found associated type
+    let <T<1> as Trait>::Assoc(_a) = <T<1> as Trait>::Assoc(0);
+    //~^ error: expected method or associated constant, found associated type
+    //~| error: expected tuple struct or tuple variant, found associated type
+    let <T<2> as Trait>::Assoc(_a, _b) = <T<2> as Trait>::Assoc(0, 1);
+    //~^ error: expected method or associated constant, found associated type
+    //~| error: expected tuple struct or tuple variant, found associated type
+    let <T<3> as Trait>::Assoc(ref _a, ref mut _b, mut _c) = <T<3> as Trait>::Assoc(0, 1, 2);
+    //~^ error: expected method or associated constant, found associated type
+    //~| error: expected tuple struct or tuple variant, found associated type
+}
+
+
+struct T<const N: usize>;
+
+struct T0();
+struct T1(u8);
+struct T2(u8, u8);
+struct T3(u8, u8, u8);
+
+trait Trait {
+    type Assoc;
+}
+
+impl Trait for T<0> {
+    type Assoc = T0;
+}
+
+impl Trait for T<1> {
+    type Assoc = T1;
+}
+impl Trait for T<2> {
+    type Assoc = T2;
+}
+impl Trait for T<3> {
+    type Assoc = T3;
+}
diff --git a/tests/ui/associated-types/tuple-struct-expr-pat.stderr b/tests/ui/associated-types/tuple-struct-expr-pat.stderr
new file mode 100644
index 00000000000..135dfcb3447
--- /dev/null
+++ b/tests/ui/associated-types/tuple-struct-expr-pat.stderr
@@ -0,0 +1,97 @@
+error[E0575]: expected method or associated constant, found associated type `Trait::Assoc`
+  --> $DIR/tuple-struct-expr-pat.rs:10:36
+   |
+LL |     let <T<0> as Trait>::Assoc() = <T<0> as Trait>::Assoc();
+   |                                    ^^^^^^^^^^^^^^^^^^^^^^-- help: use struct expression instead: `{}`
+   |
+   = note: can't use a type alias as a constructor
+
+error[E0575]: expected tuple struct or tuple variant, found associated type `Trait::Assoc`
+  --> $DIR/tuple-struct-expr-pat.rs:10:9
+   |
+LL |     let <T<0> as Trait>::Assoc() = <T<0> as Trait>::Assoc();
+   |         ^^^^^^^^^^^^^^^^^^^^^^-- help: use struct pattern instead: `{}`
+   |
+   = note: can't use a type alias as tuple pattern
+
+error[E0575]: expected method or associated constant, found associated type `Trait::Assoc`
+  --> $DIR/tuple-struct-expr-pat.rs:13:38
+   |
+LL |     let <T<1> as Trait>::Assoc(_a) = <T<1> as Trait>::Assoc(0);
+   |                                      ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: can't use a type alias as a constructor
+help: use struct expression instead
+   |
+LL -     let <T<1> as Trait>::Assoc(_a) = <T<1> as Trait>::Assoc(0);
+LL +     let <T<1> as Trait>::Assoc(_a) = <T<1> as Trait>::Assoc { 0: 0 };
+   |
+
+error[E0575]: expected tuple struct or tuple variant, found associated type `Trait::Assoc`
+  --> $DIR/tuple-struct-expr-pat.rs:13:9
+   |
+LL |     let <T<1> as Trait>::Assoc(_a) = <T<1> as Trait>::Assoc(0);
+   |         ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: can't use a type alias as tuple pattern
+help: use struct pattern instead
+   |
+LL -     let <T<1> as Trait>::Assoc(_a) = <T<1> as Trait>::Assoc(0);
+LL +     let <T<1> as Trait>::Assoc { 0: _a } = <T<1> as Trait>::Assoc(0);
+   |
+
+error[E0575]: expected method or associated constant, found associated type `Trait::Assoc`
+  --> $DIR/tuple-struct-expr-pat.rs:16:42
+   |
+LL |     let <T<2> as Trait>::Assoc(_a, _b) = <T<2> as Trait>::Assoc(0, 1);
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: can't use a type alias as a constructor
+help: use struct expression instead
+   |
+LL -     let <T<2> as Trait>::Assoc(_a, _b) = <T<2> as Trait>::Assoc(0, 1);
+LL +     let <T<2> as Trait>::Assoc(_a, _b) = <T<2> as Trait>::Assoc { 0: 0, 1: 1 };
+   |
+
+error[E0575]: expected tuple struct or tuple variant, found associated type `Trait::Assoc`
+  --> $DIR/tuple-struct-expr-pat.rs:16:9
+   |
+LL |     let <T<2> as Trait>::Assoc(_a, _b) = <T<2> as Trait>::Assoc(0, 1);
+   |         ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: can't use a type alias as tuple pattern
+help: use struct pattern instead
+   |
+LL -     let <T<2> as Trait>::Assoc(_a, _b) = <T<2> as Trait>::Assoc(0, 1);
+LL +     let <T<2> as Trait>::Assoc { 0: _a, 1: _b } = <T<2> as Trait>::Assoc(0, 1);
+   |
+
+error[E0575]: expected method or associated constant, found associated type `Trait::Assoc`
+  --> $DIR/tuple-struct-expr-pat.rs:19:62
+   |
+LL |     let <T<3> as Trait>::Assoc(ref _a, ref mut _b, mut _c) = <T<3> as Trait>::Assoc(0, 1, 2);
+   |                                                              ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: can't use a type alias as a constructor
+help: use struct expression instead
+   |
+LL -     let <T<3> as Trait>::Assoc(ref _a, ref mut _b, mut _c) = <T<3> as Trait>::Assoc(0, 1, 2);
+LL +     let <T<3> as Trait>::Assoc(ref _a, ref mut _b, mut _c) = <T<3> as Trait>::Assoc { 0: 0, 1: 1, 2: 2 };
+   |
+
+error[E0575]: expected tuple struct or tuple variant, found associated type `Trait::Assoc`
+  --> $DIR/tuple-struct-expr-pat.rs:19:9
+   |
+LL |     let <T<3> as Trait>::Assoc(ref _a, ref mut _b, mut _c) = <T<3> as Trait>::Assoc(0, 1, 2);
+   |         ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: can't use a type alias as tuple pattern
+help: use struct pattern instead
+   |
+LL -     let <T<3> as Trait>::Assoc(ref _a, ref mut _b, mut _c) = <T<3> as Trait>::Assoc(0, 1, 2);
+LL +     let <T<3> as Trait>::Assoc { 0: ref _a, 1: ref mut _b, 2: mut _c } = <T<3> as Trait>::Assoc(0, 1, 2);
+   |
+
+error: aborting due to 8 previous errors
+
+For more information about this error, try `rustc --explain E0575`.
diff --git a/tests/ui/async-await/async-closures/async-fn-mut-impl-fn-once.rs b/tests/ui/async-await/async-closures/async-fn-mut-impl-fn-once.rs
new file mode 100644
index 00000000000..59d034953d7
--- /dev/null
+++ b/tests/ui/async-await/async-closures/async-fn-mut-impl-fn-once.rs
@@ -0,0 +1,15 @@
+//@ edition:2021
+//@ check-pass
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
+fn call_once<F>(_: impl FnOnce() -> F) {}
+
+fn main() {
+    let mut i = 0;
+    let c = async || {
+        i += 1;
+    };
+    call_once(c);
+}
diff --git a/tests/ui/async-await/async-closures/promote-in-body.rs b/tests/ui/async-await/async-closures/promote-in-body.rs
new file mode 100644
index 00000000000..ea95d680987
--- /dev/null
+++ b/tests/ui/async-await/async-closures/promote-in-body.rs
@@ -0,0 +1,13 @@
+//@ build-pass
+//@ compile-flags: --crate-type=lib
+//@ edition: 2024
+
+union U {
+    f: i32,
+}
+
+fn foo() {
+    async || {
+        &U { f: 1 }
+    };
+}
diff --git a/tests/ui/async-await/async-drop/dependency-dropped.rs b/tests/ui/async-await/async-drop/dependency-dropped.rs
index f763bb32b17..d7f415e19aa 100644
--- a/tests/ui/async-await/async-drop/dependency-dropped.rs
+++ b/tests/ui/async-await/async-drop/dependency-dropped.rs
@@ -1,9 +1,12 @@
 //@ run-pass
 //@ check-run-results
+//@ revisions: with_feature without_feature
 //@ aux-build:async-drop-dep.rs
 //@ edition:2021
 
-#![feature(async_drop)]
+#![cfg_attr(with_feature, feature(async_drop))]
+//[without_feature]~^ WARN found async drop types in dependency `async_drop_dep`, but async_drop feature is disabled for `dependency_dropped`
+
 #![allow(incomplete_features)]
 
 extern crate async_drop_dep;
diff --git a/tests/ui/async-await/async-drop/dependency-dropped.run.stdout b/tests/ui/async-await/async-drop/dependency-dropped.with_feature.run.stdout
index 7aaf70c12d6..7aaf70c12d6 100644
--- a/tests/ui/async-await/async-drop/dependency-dropped.run.stdout
+++ b/tests/ui/async-await/async-drop/dependency-dropped.with_feature.run.stdout
diff --git a/tests/ui/async-await/async-drop/dependency-dropped.without_feature.run.stdout b/tests/ui/async-await/async-drop/dependency-dropped.without_feature.run.stdout
new file mode 100644
index 00000000000..80eeeefc222
--- /dev/null
+++ b/tests/ui/async-await/async-drop/dependency-dropped.without_feature.run.stdout
@@ -0,0 +1 @@
+Sync drop
diff --git a/tests/ui/async-await/async-drop/dependency-dropped.without_feature.stderr b/tests/ui/async-await/async-drop/dependency-dropped.without_feature.stderr
new file mode 100644
index 00000000000..96a4572055c
--- /dev/null
+++ b/tests/ui/async-await/async-drop/dependency-dropped.without_feature.stderr
@@ -0,0 +1,10 @@
+warning: found async drop types in dependency `async_drop_dep`, but async_drop feature is disabled for `dependency_dropped`
+  --> $DIR/dependency-dropped.rs:7:1
+   |
+LL | #![cfg_attr(with_feature, feature(async_drop))]
+   | ^
+   |
+   = help: if async drop type will be dropped in a crate without `feature(async_drop)`, sync Drop will be used
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/async-await/async-drop/deref-later-projection.rs b/tests/ui/async-await/async-drop/deref-later-projection.rs
new file mode 100644
index 00000000000..baf81daf766
--- /dev/null
+++ b/tests/ui/async-await/async-drop/deref-later-projection.rs
@@ -0,0 +1,26 @@
+// Ex-ICE: #140975
+//@ compile-flags: -Zvalidate-mir
+//@ build-pass
+//@ edition:2021
+#![crate_type = "lib"]
+#![feature(async_drop)]
+#![allow(incomplete_features)]
+
+use std::{future::AsyncDrop, pin::Pin};
+
+struct HasAsyncDrop ;
+impl Drop for HasAsyncDrop {
+    fn drop(&mut self) {}
+}
+impl AsyncDrop for HasAsyncDrop {
+    async fn drop(self: Pin<&mut Self>) {}
+}
+
+struct Holder {
+    inner: HasAsyncDrop,
+}
+async fn bar() {
+    Holder {
+        inner: HasAsyncDrop
+   };
+}
diff --git a/tests/ui/async-await/async-drop/elaborate-index-out-of-bounds.rs b/tests/ui/async-await/async-drop/elaborate-index-out-of-bounds.rs
new file mode 100644
index 00000000000..bd0a95eb1e4
--- /dev/null
+++ b/tests/ui/async-await/async-drop/elaborate-index-out-of-bounds.rs
@@ -0,0 +1,17 @@
+//@ edition: 2024
+// Ex-ICE: #140974
+#![crate_type = "lib"]
+#![allow(incomplete_features)]
+#![feature(async_drop)]
+use core::future::AsyncDrop;
+
+async fn fun(_: HasIncompleteAsyncDrop) {}
+
+struct HasIncompleteAsyncDrop;
+impl Drop for HasIncompleteAsyncDrop {
+    fn drop(&mut self) {}
+}
+impl AsyncDrop for HasIncompleteAsyncDrop {
+    //~^ ERROR: not all trait items implemented, missing: `drop` [E0046]
+    // not implemented yet..
+}
diff --git a/tests/ui/async-await/async-drop/elaborate-index-out-of-bounds.stderr b/tests/ui/async-await/async-drop/elaborate-index-out-of-bounds.stderr
new file mode 100644
index 00000000000..d8582398c79
--- /dev/null
+++ b/tests/ui/async-await/async-drop/elaborate-index-out-of-bounds.stderr
@@ -0,0 +1,11 @@
+error[E0046]: not all trait items implemented, missing: `drop`
+  --> $DIR/elaborate-index-out-of-bounds.rs:14:1
+   |
+LL | impl AsyncDrop for HasIncompleteAsyncDrop {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `drop` in implementation
+   |
+   = help: implement the missing item: `async fn drop(self: Pin<&mut Self>) { todo!() }`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/async-await/async-drop/open-drop-error2.rs b/tests/ui/async-await/async-drop/open-drop-error2.rs
new file mode 100644
index 00000000000..b2a7b68190e
--- /dev/null
+++ b/tests/ui/async-await/async-drop/open-drop-error2.rs
@@ -0,0 +1,21 @@
+//@compile-flags: -Zvalidate-mir -Zinline-mir=yes --crate-type=lib
+
+#![feature(async_drop)]
+#![allow(incomplete_features)]
+
+use std::{
+    future::{Future, async_drop_in_place},
+    pin::pin,
+    task::Context,
+};
+
+fn wrong() -> impl Sized {
+    //~^ ERROR: the size for values of type `str` cannot be known at compilation time
+    *"abc" // Doesn't implement Sized
+}
+fn weird(context: &mut Context<'_>) {
+    let mut e = wrong();
+    let h = unsafe { async_drop_in_place(&raw mut e) };
+    let i = pin!(h);
+    i.poll(context);
+}
diff --git a/tests/ui/async-await/async-drop/open-drop-error2.stderr b/tests/ui/async-await/async-drop/open-drop-error2.stderr
new file mode 100644
index 00000000000..e849829b1c7
--- /dev/null
+++ b/tests/ui/async-await/async-drop/open-drop-error2.stderr
@@ -0,0 +1,19 @@
+error[E0277]: the size for values of type `str` cannot be known at compilation time
+  --> $DIR/open-drop-error2.rs:12:15
+   |
+LL | fn wrong() -> impl Sized {
+   |               ^^^^^^^^^^ doesn't have a size known at compile-time
+LL |
+LL |     *"abc" // Doesn't implement Sized
+   |     ------ return type was inferred to be `str` here
+   |
+   = help: the trait `Sized` is not implemented for `str`
+help: references are always `Sized`, even if they point to unsized data; consider not dereferencing the expression
+   |
+LL -     *"abc" // Doesn't implement Sized
+LL +     "abc" // Doesn't implement Sized
+   |
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/async-drop/type-parameter.rs b/tests/ui/async-await/async-drop/type-parameter.rs
new file mode 100644
index 00000000000..dde5f9f8e64
--- /dev/null
+++ b/tests/ui/async-await/async-drop/type-parameter.rs
@@ -0,0 +1,16 @@
+//@ edition: 2024
+// ex-ice: #140500
+#![crate_type = "lib"]
+#![feature(async_drop)]
+#![expect(incomplete_features)]
+use std::future::AsyncDrop;
+struct A;
+impl Drop for A {
+    fn drop(&mut self) {}
+}
+impl AsyncDrop for A {
+    fn drop(_wrong: impl Sized) {} //~ ERROR: method `drop` has a `self: Pin<&mut Self>` declaration in the trait, but not in the impl
+}
+async fn bar() {
+    A;
+}
diff --git a/tests/ui/async-await/async-drop/type-parameter.stderr b/tests/ui/async-await/async-drop/type-parameter.stderr
new file mode 100644
index 00000000000..841576b839e
--- /dev/null
+++ b/tests/ui/async-await/async-drop/type-parameter.stderr
@@ -0,0 +1,11 @@
+error[E0186]: method `drop` has a `self: Pin<&mut Self>` declaration in the trait, but not in the impl
+  --> $DIR/type-parameter.rs:12:5
+   |
+LL |     fn drop(_wrong: impl Sized) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `self: Pin<&mut Self>` in impl
+   |
+   = note: `drop` from trait: `fn(Pin<&mut Self>) -> impl Future<Output = ()>`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0186`.
diff --git a/tests/ui/async-await/async-drop/unexpected-sort.rs b/tests/ui/async-await/async-drop/unexpected-sort.rs
new file mode 100644
index 00000000000..659e21eb241
--- /dev/null
+++ b/tests/ui/async-await/async-drop/unexpected-sort.rs
@@ -0,0 +1,18 @@
+// Ex-ice: #140484
+//@ edition: 2024
+#![crate_type = "lib"]
+#![allow(incomplete_features)]
+#![allow(non_camel_case_types)]
+#![feature(async_drop)]
+use std::future::AsyncDrop;
+struct a;
+impl Drop for a { //~ ERROR: not all trait items implemented, missing: `drop`
+    fn b() {} //~ ERROR: method `b` is not a member of trait `Drop`
+}
+impl AsyncDrop for a { //~ ERROR: not all trait items implemented, missing: `drop`
+    type c = ();
+    //~^ ERROR: type `c` is not a member of trait `AsyncDrop`
+}
+async fn bar() {
+    a;
+}
diff --git a/tests/ui/async-await/async-drop/unexpected-sort.stderr b/tests/ui/async-await/async-drop/unexpected-sort.stderr
new file mode 100644
index 00000000000..a6e4f9fd573
--- /dev/null
+++ b/tests/ui/async-await/async-drop/unexpected-sort.stderr
@@ -0,0 +1,32 @@
+error[E0407]: method `b` is not a member of trait `Drop`
+  --> $DIR/unexpected-sort.rs:10:5
+   |
+LL |     fn b() {}
+   |     ^^^^^^^^^ not a member of trait `Drop`
+
+error[E0437]: type `c` is not a member of trait `AsyncDrop`
+  --> $DIR/unexpected-sort.rs:13:5
+   |
+LL |     type c = ();
+   |     ^^^^^^^^^^^^ not a member of trait `AsyncDrop`
+
+error[E0046]: not all trait items implemented, missing: `drop`
+  --> $DIR/unexpected-sort.rs:9:1
+   |
+LL | impl Drop for a {
+   | ^^^^^^^^^^^^^^^ missing `drop` in implementation
+   |
+   = help: implement the missing item: `fn drop(&mut self) { todo!() }`
+
+error[E0046]: not all trait items implemented, missing: `drop`
+  --> $DIR/unexpected-sort.rs:12:1
+   |
+LL | impl AsyncDrop for a {
+   | ^^^^^^^^^^^^^^^^^^^^ missing `drop` in implementation
+   |
+   = help: implement the missing item: `async fn drop(self: Pin<&mut Self>) { todo!() }`
+
+error: aborting due to 4 previous errors
+
+Some errors have detailed explanations: E0046, E0407, E0437.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs b/tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs
index d222ddc081e..60a7dff7d49 100644
--- a/tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs
+++ b/tests/ui/async-await/async-fn/edition-2015-not-async-bound.rs
@@ -1,3 +1,4 @@
+//@ edition:2015
 //@ check-pass
 // Make sure that we don't eagerly recover `async ::Bound` in edition 2015.
 
diff --git a/tests/ui/async-await/async-fn/edition-2015.rs b/tests/ui/async-await/async-fn/edition-2015.rs
index 341b9b10e67..5a81df3a4e4 100644
--- a/tests/ui/async-await/async-fn/edition-2015.rs
+++ b/tests/ui/async-await/async-fn/edition-2015.rs
@@ -1,3 +1,4 @@
+//@ edition:2015
 fn foo(x: impl async Fn()) -> impl async Fn() { x }
 //~^ ERROR `async` trait bounds are only allowed in Rust 2018 or later
 //~| ERROR `async` trait bounds are only allowed in Rust 2018 or later
diff --git a/tests/ui/async-await/async-fn/edition-2015.stderr b/tests/ui/async-await/async-fn/edition-2015.stderr
index ca9e64cd1bb..0bec00c162c 100644
--- a/tests/ui/async-await/async-fn/edition-2015.stderr
+++ b/tests/ui/async-await/async-fn/edition-2015.stderr
@@ -1,5 +1,5 @@
 error: `async` trait bounds are only allowed in Rust 2018 or later
-  --> $DIR/edition-2015.rs:1:16
+  --> $DIR/edition-2015.rs:2:16
    |
 LL | fn foo(x: impl async Fn()) -> impl async Fn() { x }
    |                ^^^^^
@@ -8,7 +8,7 @@ LL | fn foo(x: impl async Fn()) -> impl async Fn() { x }
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
 error: `async` trait bounds are only allowed in Rust 2018 or later
-  --> $DIR/edition-2015.rs:1:36
+  --> $DIR/edition-2015.rs:2:36
    |
 LL | fn foo(x: impl async Fn()) -> impl async Fn() { x }
    |                                    ^^^^^
@@ -17,7 +17,7 @@ LL | fn foo(x: impl async Fn()) -> impl async Fn() { x }
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
 error[E0658]: `async` trait bounds are unstable
-  --> $DIR/edition-2015.rs:1:16
+  --> $DIR/edition-2015.rs:2:16
    |
 LL | fn foo(x: impl async Fn()) -> impl async Fn() { x }
    |                ^^^^^
@@ -28,7 +28,7 @@ LL | fn foo(x: impl async Fn()) -> impl async Fn() { x }
    = help: use the desugared name of the async trait, such as `AsyncFn`
 
 error[E0658]: `async` trait bounds are unstable
-  --> $DIR/edition-2015.rs:1:36
+  --> $DIR/edition-2015.rs:2:36
    |
 LL | fn foo(x: impl async Fn()) -> impl async Fn() { x }
    |                                    ^^^^^
diff --git a/tests/ui/async-await/await-keyword/2015-edition-error-various-positions.rs b/tests/ui/async-await/await-keyword/2015-edition-error-various-positions.rs
index 50c1639996e..714a3328ecf 100644
--- a/tests/ui/async-await/await-keyword/2015-edition-error-various-positions.rs
+++ b/tests/ui/async-await/await-keyword/2015-edition-error-various-positions.rs
@@ -1,3 +1,4 @@
+//@ edition:2015
 #![allow(non_camel_case_types)]
 #![deny(keyword_idents)]
 
diff --git a/tests/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr b/tests/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr
index 8cea73f8651..70900e612f4 100644
--- a/tests/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr
+++ b/tests/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr
@@ -1,5 +1,5 @@
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-error-various-positions.rs:5:13
+  --> $DIR/2015-edition-error-various-positions.rs:6:13
    |
 LL |     pub mod await {
    |             ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -7,14 +7,14 @@ LL |     pub mod await {
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 note: the lint level is defined here
-  --> $DIR/2015-edition-error-various-positions.rs:2:9
+  --> $DIR/2015-edition-error-various-positions.rs:3:9
    |
 LL | #![deny(keyword_idents)]
    |         ^^^^^^^^^^^^^^
    = note: `#[deny(keyword_idents_2018)]` implied by `#[deny(keyword_idents)]`
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-error-various-positions.rs:7:20
+  --> $DIR/2015-edition-error-various-positions.rs:8:20
    |
 LL |         pub struct await;
    |                    ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -23,7 +23,7 @@ LL |         pub struct await;
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-error-various-positions.rs:11:16
+  --> $DIR/2015-edition-error-various-positions.rs:12:16
    |
 LL | use outer_mod::await::await;
    |                ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -32,7 +32,7 @@ LL | use outer_mod::await::await;
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-error-various-positions.rs:11:23
+  --> $DIR/2015-edition-error-various-positions.rs:12:23
    |
 LL | use outer_mod::await::await;
    |                       ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -41,7 +41,7 @@ LL | use outer_mod::await::await;
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-error-various-positions.rs:16:14
+  --> $DIR/2015-edition-error-various-positions.rs:17:14
    |
 LL | struct Foo { await: () }
    |              ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -50,7 +50,7 @@ LL | struct Foo { await: () }
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-error-various-positions.rs:20:15
+  --> $DIR/2015-edition-error-various-positions.rs:21:15
    |
 LL | impl Foo { fn await() {} }
    |               ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -59,7 +59,7 @@ LL | impl Foo { fn await() {} }
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-error-various-positions.rs:24:14
+  --> $DIR/2015-edition-error-various-positions.rs:25:14
    |
 LL | macro_rules! await {
    |              ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -68,7 +68,7 @@ LL | macro_rules! await {
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-error-various-positions.rs:31:5
+  --> $DIR/2015-edition-error-various-positions.rs:32:5
    |
 LL |     await!();
    |     ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -77,7 +77,7 @@ LL |     await!();
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-error-various-positions.rs:34:11
+  --> $DIR/2015-edition-error-various-positions.rs:35:11
    |
 LL |     match await { await => {} }
    |           ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -86,7 +86,7 @@ LL |     match await { await => {} }
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-error-various-positions.rs:34:19
+  --> $DIR/2015-edition-error-various-positions.rs:35:19
    |
 LL |     match await { await => {} }
    |                   ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
diff --git a/tests/ui/async-await/await-keyword/2015-edition-warning.fixed b/tests/ui/async-await/await-keyword/2015-edition-warning.fixed
index 4cb8017c7ee..45758cb1039 100644
--- a/tests/ui/async-await/await-keyword/2015-edition-warning.fixed
+++ b/tests/ui/async-await/await-keyword/2015-edition-warning.fixed
@@ -1,3 +1,4 @@
+//@ edition:2015
 //@ run-rustfix
 
 #![allow(non_camel_case_types)]
diff --git a/tests/ui/async-await/await-keyword/2015-edition-warning.rs b/tests/ui/async-await/await-keyword/2015-edition-warning.rs
index d591a5af821..ea26abe072b 100644
--- a/tests/ui/async-await/await-keyword/2015-edition-warning.rs
+++ b/tests/ui/async-await/await-keyword/2015-edition-warning.rs
@@ -1,3 +1,4 @@
+//@ edition:2015
 //@ run-rustfix
 
 #![allow(non_camel_case_types)]
diff --git a/tests/ui/async-await/await-keyword/2015-edition-warning.stderr b/tests/ui/async-await/await-keyword/2015-edition-warning.stderr
index 70b7fa52a19..9d19a09092b 100644
--- a/tests/ui/async-await/await-keyword/2015-edition-warning.stderr
+++ b/tests/ui/async-await/await-keyword/2015-edition-warning.stderr
@@ -1,5 +1,5 @@
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-warning.rs:7:13
+  --> $DIR/2015-edition-warning.rs:8:13
    |
 LL |     pub mod await {
    |             ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -7,14 +7,14 @@ LL |     pub mod await {
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 note: the lint level is defined here
-  --> $DIR/2015-edition-warning.rs:4:9
+  --> $DIR/2015-edition-warning.rs:5:9
    |
 LL | #![deny(keyword_idents)]
    |         ^^^^^^^^^^^^^^
    = note: `#[deny(keyword_idents_2018)]` implied by `#[deny(keyword_idents)]`
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-warning.rs:10:20
+  --> $DIR/2015-edition-warning.rs:11:20
    |
 LL |         pub struct await;
    |                    ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -23,7 +23,7 @@ LL |         pub struct await;
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-warning.rs:15:16
+  --> $DIR/2015-edition-warning.rs:16:16
    |
 LL | use outer_mod::await::await;
    |                ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -32,7 +32,7 @@ LL | use outer_mod::await::await;
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-warning.rs:15:23
+  --> $DIR/2015-edition-warning.rs:16:23
    |
 LL | use outer_mod::await::await;
    |                       ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -41,7 +41,7 @@ LL | use outer_mod::await::await;
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-warning.rs:22:11
+  --> $DIR/2015-edition-warning.rs:23:11
    |
 LL |     match await { await => {} }
    |           ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -50,7 +50,7 @@ LL |     match await { await => {} }
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 
 error: `await` is a keyword in the 2018 edition
-  --> $DIR/2015-edition-warning.rs:22:19
+  --> $DIR/2015-edition-warning.rs:23:19
    |
 LL |     match await { await => {} }
    |                   ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
diff --git a/tests/ui/async-await/dyn/mut-is-pointer-like.stderr b/tests/ui/async-await/dyn/mut-is-pointer-like.stderr
index bf20473924b..6689539ff45 100644
--- a/tests/ui/async-await/dyn/mut-is-pointer-like.stderr
+++ b/tests/ui/async-await/dyn/mut-is-pointer-like.stderr
@@ -8,10 +8,10 @@ LL | #![feature(async_fn_in_dyn_trait)]
    = note: `#[warn(incomplete_features)]` on by default
 
 error[E0038]: the trait `AsyncTrait` is not dyn compatible
-  --> $DIR/mut-is-pointer-like.rs:35:16
+  --> $DIR/mut-is-pointer-like.rs:35:29
    |
 LL |         let x: Pin<&mut dyn AsyncTrait<Output = ()>> = f;
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `AsyncTrait` is not dyn compatible
+   |                             ^^^^^^^^^^^^^^^^^^^^^^^ `AsyncTrait` 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>
@@ -24,48 +24,6 @@ LL |     async fn async_dispatch(self: Pin<&mut Self>) -> Self::Output;
    |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
    = help: consider moving `async_dispatch` to another trait
 
-error[E0038]: the trait `AsyncTrait` is not dyn compatible
-  --> $DIR/mut-is-pointer-like.rs:35:56
-   |
-LL |         let x: Pin<&mut dyn AsyncTrait<Output = ()>> = f;
-   |                                                        ^ `AsyncTrait` 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/mut-is-pointer-like.rs:16:14
-   |
-LL | trait AsyncTrait {
-   |       ---------- this trait is not dyn compatible...
-...
-LL |     async fn async_dispatch(self: Pin<&mut Self>) -> Self::Output;
-   |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
-   = help: consider moving `async_dispatch` to another trait
-   = note: required for the cast from `Pin<&mut {async block@$DIR/mut-is-pointer-like.rs:32:32: 32:37}>` to `Pin<&mut dyn AsyncTrait<Output = ()>>`
-
-error[E0277]: the trait bound `dyn AsyncTrait<Output = ()>: AsyncTrait` is not satisfied
-  --> $DIR/mut-is-pointer-like.rs:36:11
-   |
-LL |         x.async_dispatch().await;
-   |           ^^^^^^^^^^^^^^ the trait `AsyncTrait` is not implemented for `dyn AsyncTrait<Output = ()>`
-
-error[E0038]: the trait `AsyncTrait` is not dyn compatible
-  --> $DIR/mut-is-pointer-like.rs:36:9
-   |
-LL |         x.async_dispatch().await;
-   |         ^^^^^^^^^^^^^^^^^^ `AsyncTrait` 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/mut-is-pointer-like.rs:16:14
-   |
-LL | trait AsyncTrait {
-   |       ---------- this trait is not dyn compatible...
-...
-LL |     async fn async_dispatch(self: Pin<&mut Self>) -> Self::Output;
-   |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
-   = help: consider moving `async_dispatch` to another trait
-
-error: aborting due to 4 previous errors; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
 
-Some errors have detailed explanations: E0038, E0277.
-For more information about an error, try `rustc --explain E0038`.
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/async-await/dyn/works.stderr b/tests/ui/async-await/dyn/works.stderr
index 47abeab5aac..338479d8b70 100644
--- a/tests/ui/async-await/dyn/works.stderr
+++ b/tests/ui/async-await/dyn/works.stderr
@@ -8,10 +8,10 @@ LL | #![feature(async_fn_in_dyn_trait)]
    = note: `#[warn(incomplete_features)]` on by default
 
 error[E0038]: the trait `AsyncTrait` is not dyn compatible
-  --> $DIR/works.rs:27:34
+  --> $DIR/works.rs:27:21
    |
 LL |         let x: &dyn AsyncTrait = &"hello, world!";
-   |                                  ^^^^^^^^^^^^^^^^ `AsyncTrait` is not dyn compatible
+   |                     ^^^^^^^^^^ `AsyncTrait` 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>
@@ -23,59 +23,7 @@ LL |     async fn async_dispatch(&self);
    |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
    = help: consider moving `async_dispatch` to another trait
    = help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead.
-   = note: required for the cast from `&&'static str` to `&dyn AsyncTrait`
 
-error[E0038]: the trait `AsyncTrait` is not dyn compatible
-  --> $DIR/works.rs:27:16
-   |
-LL |         let x: &dyn AsyncTrait = &"hello, world!";
-   |                ^^^^^^^^^^^^^^^ `AsyncTrait` 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/works.rs:14:14
-   |
-LL | trait AsyncTrait {
-   |       ---------- this trait is not dyn compatible...
-LL |     async fn async_dispatch(&self);
-   |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
-   = help: consider moving `async_dispatch` to another trait
-   = help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead.
-
-error[E0038]: the trait `AsyncTrait` is not dyn compatible
-  --> $DIR/works.rs:28:11
-   |
-LL |         x.async_dispatch().await;
-   |           ^^^^^^^^^^^^^^ `AsyncTrait` 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/works.rs:14:14
-   |
-LL | trait AsyncTrait {
-   |       ---------- this trait is not dyn compatible...
-LL |     async fn async_dispatch(&self);
-   |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
-   = help: consider moving `async_dispatch` to another trait
-   = help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead.
-
-error[E0038]: the trait `AsyncTrait` is not dyn compatible
-  --> $DIR/works.rs:28:9
-   |
-LL |         x.async_dispatch().await;
-   |         ^^^^^^^^^^^^^^^^^^ `AsyncTrait` 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/works.rs:14:14
-   |
-LL | trait AsyncTrait {
-   |       ---------- this trait is not dyn compatible...
-LL |     async fn async_dispatch(&self);
-   |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
-   = help: consider moving `async_dispatch` to another trait
-   = help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead.
-
-error: aborting due to 4 previous errors; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/async-await/dyn/wrong-size.stderr b/tests/ui/async-await/dyn/wrong-size.stderr
index b4684f4fc17..a465f91f62a 100644
--- a/tests/ui/async-await/dyn/wrong-size.stderr
+++ b/tests/ui/async-await/dyn/wrong-size.stderr
@@ -8,10 +8,10 @@ LL | #![feature(async_fn_in_dyn_trait)]
    = note: `#[warn(incomplete_features)]` on by default
 
 error[E0038]: the trait `AsyncTrait` is not dyn compatible
-  --> $DIR/wrong-size.rs:21:30
+  --> $DIR/wrong-size.rs:21:17
    |
 LL |     let x: &dyn AsyncTrait = &"hello, world!";
-   |                              ^^^^^^^^^^^^^^^^ `AsyncTrait` is not dyn compatible
+   |                 ^^^^^^^^^^ `AsyncTrait` 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>
@@ -23,25 +23,7 @@ LL |     async fn async_dispatch(&self);
    |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
    = help: consider moving `async_dispatch` to another trait
    = help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead.
-   = note: required for the cast from `&&'static str` to `&dyn AsyncTrait`
 
-error[E0038]: the trait `AsyncTrait` is not dyn compatible
-  --> $DIR/wrong-size.rs:21:12
-   |
-LL |     let x: &dyn AsyncTrait = &"hello, world!";
-   |            ^^^^^^^^^^^^^^^ `AsyncTrait` 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/wrong-size.rs:9:14
-   |
-LL | trait AsyncTrait {
-   |       ---------- this trait is not dyn compatible...
-LL |     async fn async_dispatch(&self);
-   |              ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
-   = help: consider moving `async_dispatch` to another trait
-   = help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead.
-
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/async-await/for-await-2015.rs b/tests/ui/async-await/for-await-2015.rs
index 89ff256da1d..c2bd39c8446 100644
--- a/tests/ui/async-await/for-await-2015.rs
+++ b/tests/ui/async-await/for-await-2015.rs
@@ -1,3 +1,4 @@
+//@ edition:2015
 //@ check-pass
 
 #![feature(async_for_loop)]
diff --git a/tests/ui/async-await/format-await-send.rs b/tests/ui/async-await/format-await-send.rs
new file mode 100644
index 00000000000..13ae7233fd6
--- /dev/null
+++ b/tests/ui/async-await/format-await-send.rs
@@ -0,0 +1,24 @@
+// regression test for <https://github.com/rust-lang/rust/issues/101650>
+// assert that Future which has format!() with an async function is Send
+
+#![allow(unused)]
+
+//@ check-pass
+//@ edition: 2018
+
+use core::future::Future;
+use core::pin::Pin;
+
+fn build_string() -> Pin<Box<dyn Future<Output = String> + Send>> {
+    Box::pin(async move {
+        let mut string_builder = String::new();
+        string_builder += &format!("Hello {}", helper().await);
+        string_builder
+    })
+}
+
+async fn helper() -> String {
+    "World".to_string()
+}
+
+fn main() {}
diff --git a/tests/ui/async-await/in-trait/dyn-compatibility.stderr b/tests/ui/async-await/in-trait/dyn-compatibility.stderr
index 553bcbf89d5..f0c5dc53478 100644
--- a/tests/ui/async-await/in-trait/dyn-compatibility.stderr
+++ b/tests/ui/async-await/in-trait/dyn-compatibility.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/dyn-compatibility.rs:9:12
+  --> $DIR/dyn-compatibility.rs:9:17
    |
 LL |     let x: &dyn Foo = todo!();
-   |            ^^^^^^^^ `Foo` is not dyn compatible
+   |                 ^^^ `Foo` 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>
diff --git a/tests/ui/async-await/issue-65634-raw-ident-suggestion.edition2015.stderr b/tests/ui/async-await/issue-65634-raw-ident-suggestion.edition2015.stderr
index 2bdc1347c81..8ce4d4ea06a 100644
--- a/tests/ui/async-await/issue-65634-raw-ident-suggestion.edition2015.stderr
+++ b/tests/ui/async-await/issue-65634-raw-ident-suggestion.edition2015.stderr
@@ -1,16 +1,16 @@
 error[E0034]: multiple applicable items in scope
-  --> $DIR/issue-65634-raw-ident-suggestion.rs:24:13
+  --> $DIR/issue-65634-raw-ident-suggestion.rs:25:13
    |
 LL |     r#fn {}.r#struct();
    |             ^^^^^^^^ multiple `r#struct` found
    |
 note: candidate #1 is defined in an impl of the trait `async` for the type `r#fn`
-  --> $DIR/issue-65634-raw-ident-suggestion.rs:7:5
+  --> $DIR/issue-65634-raw-ident-suggestion.rs:8:5
    |
 LL |     fn r#struct(&self) {
    |     ^^^^^^^^^^^^^^^^^^
 note: candidate #2 is defined in an impl of the trait `await` for the type `r#fn`
-  --> $DIR/issue-65634-raw-ident-suggestion.rs:13:5
+  --> $DIR/issue-65634-raw-ident-suggestion.rs:14:5
    |
 LL |     fn r#struct(&self) {
    |     ^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/async-await/issue-65634-raw-ident-suggestion.edition2018.stderr b/tests/ui/async-await/issue-65634-raw-ident-suggestion.edition2018.stderr
index ab10ab749fe..d910ef9872c 100644
--- a/tests/ui/async-await/issue-65634-raw-ident-suggestion.edition2018.stderr
+++ b/tests/ui/async-await/issue-65634-raw-ident-suggestion.edition2018.stderr
@@ -1,16 +1,16 @@
 error[E0034]: multiple applicable items in scope
-  --> $DIR/issue-65634-raw-ident-suggestion.rs:24:13
+  --> $DIR/issue-65634-raw-ident-suggestion.rs:25:13
    |
 LL |     r#fn {}.r#struct();
    |             ^^^^^^^^ multiple `r#struct` found
    |
 note: candidate #1 is defined in an impl of the trait `r#async` for the type `r#fn`
-  --> $DIR/issue-65634-raw-ident-suggestion.rs:7:5
+  --> $DIR/issue-65634-raw-ident-suggestion.rs:8:5
    |
 LL |     fn r#struct(&self) {
    |     ^^^^^^^^^^^^^^^^^^
 note: candidate #2 is defined in an impl of the trait `r#await` for the type `r#fn`
-  --> $DIR/issue-65634-raw-ident-suggestion.rs:13:5
+  --> $DIR/issue-65634-raw-ident-suggestion.rs:14:5
    |
 LL |     fn r#struct(&self) {
    |     ^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/async-await/issue-65634-raw-ident-suggestion.rs b/tests/ui/async-await/issue-65634-raw-ident-suggestion.rs
index ef5760f4846..98f5b6dd9f9 100644
--- a/tests/ui/async-await/issue-65634-raw-ident-suggestion.rs
+++ b/tests/ui/async-await/issue-65634-raw-ident-suggestion.rs
@@ -1,4 +1,5 @@
 //@ revisions: edition2015 edition2018
+//@[edition2015]edition:2015
 //@[edition2018]edition:2018
 
 #![allow(non_camel_case_types)]
diff --git a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs
index bcb5cb94b77..555b0110521 100644
--- a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs
+++ b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.rs
@@ -1,3 +1,4 @@
+//@ edition:2015
 //@ rustc-env:CARGO_CRATE_NAME=foo
 
 use std::pin::Pin;
diff --git a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.stderr b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.stderr
index 11f5825c232..c5f1793731e 100644
--- a/tests/ui/async-await/suggest-switching-edition-on-await-cargo.stderr
+++ b/tests/ui/async-await/suggest-switching-edition-on-await-cargo.stderr
@@ -1,5 +1,5 @@
 error[E0609]: no field `await` on type `await_on_struct_missing::S`
-  --> $DIR/suggest-switching-edition-on-await-cargo.rs:11:7
+  --> $DIR/suggest-switching-edition-on-await-cargo.rs:12:7
    |
 LL |     x.await;
    |       ^^^^^ unknown field
@@ -9,7 +9,7 @@ LL |     x.await;
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
 error[E0609]: no field `await` on type `await_on_struct_similar::S`
-  --> $DIR/suggest-switching-edition-on-await-cargo.rs:24:7
+  --> $DIR/suggest-switching-edition-on-await-cargo.rs:25:7
    |
 LL |     x.await;
    |       ^^^^^ unknown field
@@ -24,7 +24,7 @@ LL +     x.awai;
    |
 
 error[E0609]: no field `await` on type `Pin<&mut dyn Future<Output = ()>>`
-  --> $DIR/suggest-switching-edition-on-await-cargo.rs:34:7
+  --> $DIR/suggest-switching-edition-on-await-cargo.rs:35:7
    |
 LL |     x.await;
    |       ^^^^^ unknown field
@@ -34,7 +34,7 @@ LL |     x.await;
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
 error[E0609]: no field `await` on type `impl Future<Output = ()>`
-  --> $DIR/suggest-switching-edition-on-await-cargo.rs:43:7
+  --> $DIR/suggest-switching-edition-on-await-cargo.rs:44:7
    |
 LL |     x.await;
    |       ^^^^^ unknown field
diff --git a/tests/ui/async-await/suggest-switching-edition-on-await.rs b/tests/ui/async-await/suggest-switching-edition-on-await.rs
index 0907a87e02c..6b639fa0b4e 100644
--- a/tests/ui/async-await/suggest-switching-edition-on-await.rs
+++ b/tests/ui/async-await/suggest-switching-edition-on-await.rs
@@ -1,3 +1,4 @@
+//@ edition:2015
 use std::pin::Pin;
 use std::future::Future;
 
diff --git a/tests/ui/async-await/suggest-switching-edition-on-await.stderr b/tests/ui/async-await/suggest-switching-edition-on-await.stderr
index 2ede8d5b7f4..bf03016222e 100644
--- a/tests/ui/async-await/suggest-switching-edition-on-await.stderr
+++ b/tests/ui/async-await/suggest-switching-edition-on-await.stderr
@@ -1,5 +1,5 @@
 error[E0609]: no field `await` on type `await_on_struct_missing::S`
-  --> $DIR/suggest-switching-edition-on-await.rs:9:7
+  --> $DIR/suggest-switching-edition-on-await.rs:10:7
    |
 LL |     x.await;
    |       ^^^^^ unknown field
@@ -9,7 +9,7 @@ LL |     x.await;
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
 error[E0609]: no field `await` on type `await_on_struct_similar::S`
-  --> $DIR/suggest-switching-edition-on-await.rs:22:7
+  --> $DIR/suggest-switching-edition-on-await.rs:23:7
    |
 LL |     x.await;
    |       ^^^^^ unknown field
@@ -24,7 +24,7 @@ LL +     x.awai;
    |
 
 error[E0609]: no field `await` on type `Pin<&mut dyn Future<Output = ()>>`
-  --> $DIR/suggest-switching-edition-on-await.rs:32:7
+  --> $DIR/suggest-switching-edition-on-await.rs:33:7
    |
 LL |     x.await;
    |       ^^^^^ unknown field
@@ -34,7 +34,7 @@ LL |     x.await;
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
 error[E0609]: no field `await` on type `impl Future<Output = ()>`
-  --> $DIR/suggest-switching-edition-on-await.rs:41:7
+  --> $DIR/suggest-switching-edition-on-await.rs:42:7
    |
 LL |     x.await;
    |       ^^^^^ unknown field
diff --git a/tests/ui/attributes/auxiliary/external-macro-use.rs b/tests/ui/attributes/auxiliary/external-macro-use.rs
new file mode 100644
index 00000000000..beeb7fe689c
--- /dev/null
+++ b/tests/ui/attributes/auxiliary/external-macro-use.rs
@@ -0,0 +1,7 @@
+extern crate proc_macro;
+use proc_macro::*;
+
+#[proc_macro_attribute]
+pub fn a(_: TokenStream, input: TokenStream) -> TokenStream {
+   input
+}
diff --git a/tests/ui/attributes/auxiliary/use-doc-alias-name-extern.rs b/tests/ui/attributes/auxiliary/use-doc-alias-name-extern.rs
new file mode 100644
index 00000000000..4c06d0fdfe3
--- /dev/null
+++ b/tests/ui/attributes/auxiliary/use-doc-alias-name-extern.rs
@@ -0,0 +1,24 @@
+#[doc(alias="DocAliasS1")]
+pub struct S1;
+
+#[doc(alias="DocAliasS2")]
+#[doc(alias("DocAliasS3", "DocAliasS4"))]
+pub struct S2;
+
+#[doc(alias("doc_alias_f1", "doc_alias_f2"))]
+pub fn f() {}
+
+pub mod m {
+    #[doc(alias="DocAliasS5")]
+    pub struct S5;
+
+    pub mod n {
+        #[doc(alias("DocAliasX"))]
+        pub mod x {
+            pub mod y {
+                #[doc(alias="DocAliasS6")]
+                pub struct S6;
+            }
+        }
+    }
+}
diff --git a/tests/ui/attributes/illegal-macro-use.rs b/tests/ui/attributes/illegal-macro-use.rs
new file mode 100644
index 00000000000..5a567107a6e
--- /dev/null
+++ b/tests/ui/attributes/illegal-macro-use.rs
@@ -0,0 +1,15 @@
+// issue#140255
+
+#[macro_use::a]       //~ ERROR failed to resolve: use of unresolved module or unlinked crate `macro_use`
+fn f0() {}
+
+#[macro_use::a::b]    //~ ERROR failed to resolve: use of unresolved module or unlinked crate `macro_use`
+fn f1() {}
+
+#[macro_escape::a]    //~ ERROR failed to resolve: use of unresolved module or unlinked crate `macro_escape`
+fn f2() {}
+
+#[macro_escape::a::b] //~ ERROR failed to resolve: use of unresolved module or unlinked crate `macro_escape`
+fn f3() {}
+
+fn main() {}
diff --git a/tests/ui/attributes/illegal-macro-use.stderr b/tests/ui/attributes/illegal-macro-use.stderr
new file mode 100644
index 00000000000..fa6bb83d588
--- /dev/null
+++ b/tests/ui/attributes/illegal-macro-use.stderr
@@ -0,0 +1,27 @@
+error[E0433]: failed to resolve: use of unresolved module or unlinked crate `macro_escape`
+  --> $DIR/illegal-macro-use.rs:12:3
+   |
+LL | #[macro_escape::a::b]
+   |   ^^^^^^^^^^^^ use of unresolved module or unlinked crate `macro_escape`
+
+error[E0433]: failed to resolve: use of unresolved module or unlinked crate `macro_escape`
+  --> $DIR/illegal-macro-use.rs:9:3
+   |
+LL | #[macro_escape::a]
+   |   ^^^^^^^^^^^^ use of unresolved module or unlinked crate `macro_escape`
+
+error[E0433]: failed to resolve: use of unresolved module or unlinked crate `macro_use`
+  --> $DIR/illegal-macro-use.rs:6:3
+   |
+LL | #[macro_use::a::b]
+   |   ^^^^^^^^^ use of unresolved module or unlinked crate `macro_use`
+
+error[E0433]: failed to resolve: use of unresolved module or unlinked crate `macro_use`
+  --> $DIR/illegal-macro-use.rs:3:3
+   |
+LL | #[macro_use::a]
+   |   ^^^^^^^^^ use of unresolved module or unlinked crate `macro_use`
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/attributes/rustc_confusables.stderr b/tests/ui/attributes/rustc_confusables.stderr
index 55c9219a08a..aba384ff8ac 100644
--- a/tests/ui/attributes/rustc_confusables.stderr
+++ b/tests/ui/attributes/rustc_confusables.stderr
@@ -42,13 +42,13 @@ error[E0599]: no method named `foo` found for struct `rustc_confusables_across_c
   --> $DIR/rustc_confusables.rs:15:7
    |
 LL |     x.foo();
-   |       ^^^ method not found in `BTreeSet`
+   |       ^^^ method not found in `rustc_confusables_across_crate::BTreeSet`
 
 error[E0599]: no method named `push` found for struct `rustc_confusables_across_crate::BTreeSet` in the current scope
   --> $DIR/rustc_confusables.rs:17:7
    |
 LL |     x.push();
-   |       ^^^^ method not found in `BTreeSet`
+   |       ^^^^ method not found in `rustc_confusables_across_crate::BTreeSet`
    |
 help: you might have meant to use `insert`
    |
@@ -60,7 +60,7 @@ error[E0599]: no method named `test` found for struct `rustc_confusables_across_
   --> $DIR/rustc_confusables.rs:20:7
    |
 LL |     x.test();
-   |       ^^^^ method not found in `BTreeSet`
+   |       ^^^^ method not found in `rustc_confusables_across_crate::BTreeSet`
 
 error[E0599]: no method named `pulled` found for struct `rustc_confusables_across_crate::BTreeSet` in the current scope
   --> $DIR/rustc_confusables.rs:22:7
diff --git a/tests/ui/attributes/use-doc-alias-name.rs b/tests/ui/attributes/use-doc-alias-name.rs
new file mode 100644
index 00000000000..1fc9199b6e3
--- /dev/null
+++ b/tests/ui/attributes/use-doc-alias-name.rs
@@ -0,0 +1,67 @@
+//@ aux-build: use-doc-alias-name-extern.rs
+
+// issue#124273
+
+extern crate use_doc_alias_name_extern;
+
+use use_doc_alias_name_extern::*;
+
+#[doc(alias="LocalDocAliasS")]
+struct S;
+
+fn main() {
+    LocalDocAliasS; // don't show help in local crate
+    //~^ ERROR: cannot find value `LocalDocAliasS` in this scope
+
+    DocAliasS1;
+    //~^ ERROR: cannot find value `DocAliasS1` in this scope
+    //~| HELP: `S1` has a name defined in the doc alias attribute as `DocAliasS1`
+
+    DocAliasS2;
+    //~^ ERROR: cannot find value `DocAliasS2` in this scope
+    //~| HELP: `S2` has a name defined in the doc alias attribute as `DocAliasS2`
+
+    DocAliasS3;
+    //~^ ERROR: cannot find value `DocAliasS3` in this scope
+    //~| HELP: `S2` has a name defined in the doc alias attribute as `DocAliasS3`
+
+    DocAliasS4;
+    //~^ ERROR: cannot find value `DocAliasS4` in this scope
+    //~| HELP: `S2` has a name defined in the doc alias attribute as `DocAliasS4`
+
+    doc_alias_f1();
+    //~^ ERROR: cannot find function `doc_alias_f1` in this scope
+    //~| HELP: `f` has a name defined in the doc alias attribute as `doc_alias_f1`
+
+    doc_alias_f2();
+    //~^ ERROR: cannot find function `doc_alias_f2` in this scope
+    //~| HELP: `f` has a name defined in the doc alias attribute as `doc_alias_f2`
+
+    m::DocAliasS5;
+    //~^ ERROR: cannot find value `DocAliasS5` in module `m`
+    //~| HELP: `S5` has a name defined in the doc alias attribute as `DocAliasS5`
+
+    not_exist_module::DocAliasS1;
+    //~^ ERROR: use of unresolved module or unlinked crate `not_exist_module`
+    //~| HELP: you might be missing a crate named `not_exist_module`
+
+    use_doc_alias_name_extern::DocAliasS1;
+    //~^ ERROR: cannot find value `DocAliasS1` in crate `use_doc_alias_name_extern
+    //~| HELP: `S1` has a name defined in the doc alias attribute as `DocAliasS1`
+
+    m::n::DocAliasX::y::S6;
+    //~^ ERROR: could not find `DocAliasX` in `n`
+    //~| HELP: `x` has a name defined in the doc alias attribute as `DocAliasX`
+
+    m::n::x::y::DocAliasS6;
+    //~^ ERROR: cannot find value `DocAliasS6` in module `m::n::x::y`
+    //~| HELP: `S6` has a name defined in the doc alias attribute as `DocAliasS6`
+}
+
+trait T {
+    fn f() {
+        DocAliasS1;
+        //~^ ERROR: cannot find value `DocAliasS1` in this scope
+        //~| HELP: `S1` has a name defined in the doc alias attribute as `DocAliasS1`
+    }
+}
diff --git a/tests/ui/attributes/use-doc-alias-name.stderr b/tests/ui/attributes/use-doc-alias-name.stderr
new file mode 100644
index 00000000000..07f4865e415
--- /dev/null
+++ b/tests/ui/attributes/use-doc-alias-name.stderr
@@ -0,0 +1,150 @@
+error[E0433]: failed to resolve: could not find `DocAliasX` in `n`
+  --> $DIR/use-doc-alias-name.rs:52:11
+   |
+LL |     m::n::DocAliasX::y::S6;
+   |           ^^^^^^^^^ could not find `DocAliasX` in `n`
+   |
+help: `x` has a name defined in the doc alias attribute as `DocAliasX`
+   |
+LL -     m::n::DocAliasX::y::S6;
+LL +     m::n::x::y::S6;
+   |
+
+error[E0425]: cannot find value `LocalDocAliasS` in this scope
+  --> $DIR/use-doc-alias-name.rs:13:5
+   |
+LL |     LocalDocAliasS; // don't show help in local crate
+   |     ^^^^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find value `DocAliasS1` in this scope
+  --> $DIR/use-doc-alias-name.rs:16:5
+   |
+LL |     DocAliasS1;
+   |     ^^^^^^^^^^
+   |
+help: `S1` has a name defined in the doc alias attribute as `DocAliasS1`
+   |
+LL -     DocAliasS1;
+LL +     S1;
+   |
+
+error[E0425]: cannot find value `DocAliasS2` in this scope
+  --> $DIR/use-doc-alias-name.rs:20:5
+   |
+LL |     DocAliasS2;
+   |     ^^^^^^^^^^
+   |
+help: `S2` has a name defined in the doc alias attribute as `DocAliasS2`
+   |
+LL -     DocAliasS2;
+LL +     S2;
+   |
+
+error[E0425]: cannot find value `DocAliasS3` in this scope
+  --> $DIR/use-doc-alias-name.rs:24:5
+   |
+LL |     DocAliasS3;
+   |     ^^^^^^^^^^
+   |
+help: `S2` has a name defined in the doc alias attribute as `DocAliasS3`
+   |
+LL -     DocAliasS3;
+LL +     S2;
+   |
+
+error[E0425]: cannot find value `DocAliasS4` in this scope
+  --> $DIR/use-doc-alias-name.rs:28:5
+   |
+LL |     DocAliasS4;
+   |     ^^^^^^^^^^
+   |
+help: `S2` has a name defined in the doc alias attribute as `DocAliasS4`
+   |
+LL -     DocAliasS4;
+LL +     S2;
+   |
+
+error[E0425]: cannot find value `DocAliasS5` in module `m`
+  --> $DIR/use-doc-alias-name.rs:40:8
+   |
+LL |     m::DocAliasS5;
+   |        ^^^^^^^^^^
+   |
+help: `S5` has a name defined in the doc alias attribute as `DocAliasS5`
+   |
+LL -     m::DocAliasS5;
+LL +     m::S5;
+   |
+
+error[E0425]: cannot find value `DocAliasS1` in crate `use_doc_alias_name_extern`
+  --> $DIR/use-doc-alias-name.rs:48:32
+   |
+LL |     use_doc_alias_name_extern::DocAliasS1;
+   |                                ^^^^^^^^^^
+   |
+help: `S1` has a name defined in the doc alias attribute as `DocAliasS1`
+   |
+LL -     use_doc_alias_name_extern::DocAliasS1;
+LL +     use_doc_alias_name_extern::S1;
+   |
+
+error[E0425]: cannot find value `DocAliasS6` in module `m::n::x::y`
+  --> $DIR/use-doc-alias-name.rs:56:17
+   |
+LL |     m::n::x::y::DocAliasS6;
+   |                 ^^^^^^^^^^
+   |
+help: `S6` has a name defined in the doc alias attribute as `DocAliasS6`
+   |
+LL -     m::n::x::y::DocAliasS6;
+LL +     m::n::x::y::S6;
+   |
+
+error[E0425]: cannot find value `DocAliasS1` in this scope
+  --> $DIR/use-doc-alias-name.rs:63:9
+   |
+LL |         DocAliasS1;
+   |         ^^^^^^^^^^
+   |
+help: `S1` has a name defined in the doc alias attribute as `DocAliasS1`
+   |
+LL -         DocAliasS1;
+LL +         S1;
+   |
+
+error[E0425]: cannot find function `doc_alias_f1` in this scope
+  --> $DIR/use-doc-alias-name.rs:32:5
+   |
+LL |     doc_alias_f1();
+   |     ^^^^^^^^^^^^
+   |
+help: `f` has a name defined in the doc alias attribute as `doc_alias_f1`
+   |
+LL -     doc_alias_f1();
+LL +     f();
+   |
+
+error[E0425]: cannot find function `doc_alias_f2` in this scope
+  --> $DIR/use-doc-alias-name.rs:36:5
+   |
+LL |     doc_alias_f2();
+   |     ^^^^^^^^^^^^
+   |
+help: `f` has a name defined in the doc alias attribute as `doc_alias_f2`
+   |
+LL -     doc_alias_f2();
+LL +     f();
+   |
+
+error[E0433]: failed to resolve: use of unresolved module or unlinked crate `not_exist_module`
+  --> $DIR/use-doc-alias-name.rs:44:5
+   |
+LL |     not_exist_module::DocAliasS1;
+   |     ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `not_exist_module`
+   |
+   = help: you might be missing a crate named `not_exist_module`
+
+error: aborting due to 13 previous errors
+
+Some errors have detailed explanations: E0425, E0433.
+For more information about an error, try `rustc --explain E0425`.
diff --git a/tests/ui/attributes/use-extern-crate-named-macro-use.rs b/tests/ui/attributes/use-extern-crate-named-macro-use.rs
new file mode 100644
index 00000000000..5b322ccfaf7
--- /dev/null
+++ b/tests/ui/attributes/use-extern-crate-named-macro-use.rs
@@ -0,0 +1,11 @@
+//@ check-pass
+//@ proc-macro: external-macro-use.rs
+
+// issue#140255
+
+extern crate external_macro_use as macro_use;
+
+#[macro_use::a]
+fn f() {}
+
+fn main() {}
diff --git a/tests/ui/autoderef-full-lval.rs b/tests/ui/autoderef-full-lval.rs
deleted file mode 100644
index 0fadc5c9827..00000000000
--- a/tests/ui/autoderef-full-lval.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-struct Clam {
-    x: Box<isize>,
-    y: Box<isize>,
-}
-
-
-
-struct Fish {
-    a: Box<isize>,
-}
-
-fn main() {
-    let a: Clam = Clam{ x: Box::new(1), y: Box::new(2) };
-    let b: Clam = Clam{ x: Box::new(10), y: Box::new(20) };
-    let z: isize = a.x + b.y;
-    //~^ ERROR cannot add `Box<isize>` to `Box<isize>`
-    println!("{}", z);
-    assert_eq!(z, 21);
-    let forty: Fish = Fish{ a: Box::new(40) };
-    let two: Fish = Fish{ a: Box::new(2) };
-    let answer: isize = forty.a + two.a;
-    //~^ ERROR cannot add `Box<isize>` to `Box<isize>`
-    println!("{}", answer);
-    assert_eq!(answer, 42);
-}
diff --git a/tests/ui/autodiff/autodiff_illegal.rs b/tests/ui/autodiff/autodiff_illegal.rs
index a916bd8b857..a53b6d5e589 100644
--- a/tests/ui/autodiff/autodiff_illegal.rs
+++ b/tests/ui/autodiff/autodiff_illegal.rs
@@ -7,38 +7,38 @@
 
 // Test that invalid ad macros give nice errors and don't ICE.
 
-use std::autodiff::autodiff;
+use std::autodiff::{autodiff_forward, autodiff_reverse};
 
 // We can't use Duplicated on scalars
-#[autodiff(df1, Reverse, Duplicated)]
+#[autodiff_reverse(df1, Duplicated)]
 pub fn f1(x: f64) {
     //~^ ERROR     Duplicated can not be used for this type
     unimplemented!()
 }
 
 // Too many activities
-#[autodiff(df3, Reverse, Duplicated, Const)]
+#[autodiff_reverse(df3, Duplicated, Const)]
 pub fn f3(x: f64) {
     //~^^ ERROR     expected 1 activities, but found 2
     unimplemented!()
 }
 
 // To few activities
-#[autodiff(df4, Reverse)]
+#[autodiff_reverse(df4)]
 pub fn f4(x: f64) {
     //~^^ ERROR     expected 1 activities, but found 0
     unimplemented!()
 }
 
 // We can't use Dual in Reverse mode
-#[autodiff(df5, Reverse, Dual)]
+#[autodiff_reverse(df5, Dual)]
 pub fn f5(x: f64) {
     //~^^ ERROR     Dual can not be used in Reverse Mode
     unimplemented!()
 }
 
 // We can't use Duplicated in Forward mode
-#[autodiff(df6, Forward, Duplicated)]
+#[autodiff_forward(df6, Duplicated)]
 pub fn f6(x: f64) {
     //~^^ ERROR Duplicated can not be used in Forward Mode
     //~^^ ERROR Duplicated can not be used for this type
@@ -46,36 +46,36 @@ pub fn f6(x: f64) {
 }
 
 fn dummy() {
-    #[autodiff(df7, Forward, Dual)]
+    #[autodiff_forward(df7, Dual)]
     let mut x = 5;
     //~^ ERROR autodiff must be applied to function
 
-    #[autodiff(df7, Forward, Dual)]
+    #[autodiff_forward(df7, Dual)]
     x = x + 3;
     //~^^ ERROR attributes on expressions are experimental [E0658]
     //~^^ ERROR autodiff must be applied to function
 
-    #[autodiff(df7, Forward, Dual)]
+    #[autodiff_forward(df7, Dual)]
     let add_one_v2 = |x: u32| -> u32 { x + 1 };
     //~^ ERROR autodiff must be applied to function
 }
 
 // Malformed, where args?
-#[autodiff]
+#[autodiff_forward]
 pub fn f7(x: f64) {
     //~^ ERROR autodiff requires at least a name and mode
     unimplemented!()
 }
 
 // Malformed, where args?
-#[autodiff()]
+#[autodiff_forward()]
 pub fn f8(x: f64) {
     //~^ ERROR autodiff requires at least a name and mode
     unimplemented!()
 }
 
 // Invalid attribute syntax
-#[autodiff = ""]
+#[autodiff_forward = ""]
 pub fn f9(x: f64) {
     //~^ ERROR autodiff requires at least a name and mode
     unimplemented!()
@@ -84,29 +84,15 @@ pub fn f9(x: f64) {
 fn fn_exists() {}
 
 // We colide with an already existing function
-#[autodiff(fn_exists, Reverse, Active)]
+#[autodiff_reverse(fn_exists, Active)]
 pub fn f10(x: f64) {
     //~^^ ERROR the name `fn_exists` is defined multiple times [E0428]
     unimplemented!()
 }
 
-// Malformed, missing a mode
-#[autodiff(df11)]
-pub fn f11() {
-    //~^ ERROR autodiff requires at least a name and mode
-    unimplemented!()
-}
-
-// Invalid Mode
-#[autodiff(df12, Debug)]
-pub fn f12() {
-    //~^^ ERROR unknown Mode: `Debug`. Use `Forward` or `Reverse`
-    unimplemented!()
-}
-
 // Invalid, please pick one Mode
 // or use two autodiff macros.
-#[autodiff(df13, Forward, Reverse)]
+#[autodiff_reverse(df13, Reverse)]
 pub fn f13() {
     //~^^ ERROR did not recognize Activity: `Reverse`
     unimplemented!()
@@ -117,7 +103,7 @@ struct Foo {}
 // We can't handle Active structs, because that would mean (in the general case), that we would
 // need to allocate and initialize arbitrary user types. We have Duplicated/Dual input args for
 // that. FIXME: Give a nicer error and suggest to the user to have a `&mut Foo` input instead.
-#[autodiff(df14, Reverse, Active, Active)]
+#[autodiff_reverse(df14, Active, Active)]
 fn f14(x: f32) -> Foo {
     unimplemented!()
 }
@@ -127,14 +113,14 @@ type MyFloat = f32;
 // We would like to support type alias to f32/f64 in argument type in the future,
 // but that requires us to implement our checks at a later stage
 // like THIR which has type information available.
-#[autodiff(df15, Reverse, Active, Active)]
+#[autodiff_reverse(df15, Active, Active)]
 fn f15(x: MyFloat) -> f32 {
     //~^^ ERROR failed to resolve: use of undeclared type `MyFloat` [E0433]
     unimplemented!()
 }
 
 // We would like to support type alias to f32/f64 in return type in the future
-#[autodiff(df16, Reverse, Active, Active)]
+#[autodiff_reverse(df16, Active, Active)]
 fn f16(x: f32) -> MyFloat {
     unimplemented!()
 }
@@ -145,40 +131,40 @@ struct F64Trans {
 }
 
 // We would like to support `#[repr(transparent)]` f32/f64 wrapper in return type in the future
-#[autodiff(df17, Reverse, Active, Active)]
+#[autodiff_reverse(df17, Active, Active)]
 fn f17(x: f64) -> F64Trans {
     unimplemented!()
 }
 
 // We would like to support `#[repr(transparent)]` f32/f64 wrapper in argument type in the future
-#[autodiff(df18, Reverse, Active, Active)]
+#[autodiff_reverse(df18, Active, Active)]
 fn f18(x: F64Trans) -> f64 {
     //~^^ ERROR failed to resolve: use of undeclared type `F64Trans` [E0433]
     unimplemented!()
 }
 
 // Invalid return activity
-#[autodiff(df19, Forward, Dual, Active)]
+#[autodiff_forward(df19, Dual, Active)]
 fn f19(x: f32) -> f32 {
     //~^^ ERROR invalid return activity Active in Forward Mode
     unimplemented!()
 }
 
-#[autodiff(df20, Reverse, Active, Dual)]
+#[autodiff_reverse(df20, Active, Dual)]
 fn f20(x: f32) -> f32 {
     //~^^ ERROR invalid return activity Dual in Reverse Mode
     unimplemented!()
 }
 
 // Duplicated cannot be used as return activity
-#[autodiff(df21, Reverse, Active, Duplicated)]
+#[autodiff_reverse(df21, Active, Duplicated)]
 fn f21(x: f32) -> f32 {
     //~^^ ERROR invalid return activity Duplicated in Reverse Mode
     unimplemented!()
 }
 
 struct DoesNotImplDefault;
-#[autodiff(df22, Forward, Dual)]
+#[autodiff_forward(df22, Dual)]
 pub fn f22() -> DoesNotImplDefault {
     //~^^ ERROR the function or associated item `default` exists for tuple `(DoesNotImplDefault, DoesNotImplDefault)`, but its trait bounds were not satisfied
     unimplemented!()
diff --git a/tests/ui/autodiff/autodiff_illegal.stderr b/tests/ui/autodiff/autodiff_illegal.stderr
index b119f61b8ae..ad6f10af467 100644
--- a/tests/ui/autodiff/autodiff_illegal.stderr
+++ b/tests/ui/autodiff/autodiff_illegal.stderr
@@ -1,8 +1,8 @@
 error[E0658]: attributes on expressions are experimental
   --> $DIR/autodiff_illegal.rs:53:5
    |
-LL |     #[autodiff(df7, Forward, Dual)]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     #[autodiff_forward(df7, Dual)]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
@@ -17,26 +17,26 @@ LL | pub fn f1(x: f64) {
 error: expected 1 activities, but found 2
   --> $DIR/autodiff_illegal.rs:20:1
    |
-LL | #[autodiff(df3, Reverse, Duplicated, Const)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[autodiff_reverse(df3, Duplicated, Const)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected 1 activities, but found 0
   --> $DIR/autodiff_illegal.rs:27:1
    |
-LL | #[autodiff(df4, Reverse)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[autodiff_reverse(df4)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: Dual can not be used in Reverse Mode
   --> $DIR/autodiff_illegal.rs:34:1
    |
-LL | #[autodiff(df5, Reverse, Dual)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[autodiff_reverse(df5, Dual)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: Duplicated can not be used in Forward Mode
   --> $DIR/autodiff_illegal.rs:41:1
    |
-LL | #[autodiff(df6, Forward, Duplicated)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[autodiff_forward(df6, Duplicated)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: Duplicated can not be used for this type
   --> $DIR/autodiff_illegal.rs:42:14
@@ -95,69 +95,54 @@ error[E0428]: the name `fn_exists` is defined multiple times
 LL | fn fn_exists() {}
    | -------------- previous definition of the value `fn_exists` here
 ...
-LL | #[autodiff(fn_exists, Reverse, Active)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `fn_exists` redefined here
+LL | #[autodiff_reverse(fn_exists, Active)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `fn_exists` redefined here
    |
    = note: `fn_exists` must be defined only once in the value namespace of this module
 
-error: autodiff requires at least a name and mode
-  --> $DIR/autodiff_illegal.rs:95:1
-   |
-LL | / pub fn f11() {
-LL | |
-LL | |     unimplemented!()
-LL | | }
-   | |_^
-
-error: unknown Mode: `Debug`. Use `Forward` or `Reverse`
-  --> $DIR/autodiff_illegal.rs:101:18
-   |
-LL | #[autodiff(df12, Debug)]
-   |                  ^^^^^
-
 error: did not recognize Activity: `Reverse`
-  --> $DIR/autodiff_illegal.rs:109:27
+  --> $DIR/autodiff_illegal.rs:95:26
    |
-LL | #[autodiff(df13, Forward, Reverse)]
-   |                           ^^^^^^^
+LL | #[autodiff_reverse(df13, Reverse)]
+   |                          ^^^^^^^
 
 error: invalid return activity Active in Forward Mode
-  --> $DIR/autodiff_illegal.rs:161:1
+  --> $DIR/autodiff_illegal.rs:147:1
    |
-LL | #[autodiff(df19, Forward, Dual, Active)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[autodiff_forward(df19, Dual, Active)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: invalid return activity Dual in Reverse Mode
-  --> $DIR/autodiff_illegal.rs:167:1
+  --> $DIR/autodiff_illegal.rs:153:1
    |
-LL | #[autodiff(df20, Reverse, Active, Dual)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[autodiff_reverse(df20, Active, Dual)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: invalid return activity Duplicated in Reverse Mode
-  --> $DIR/autodiff_illegal.rs:174:1
+  --> $DIR/autodiff_illegal.rs:160:1
    |
-LL | #[autodiff(df21, Reverse, Active, Duplicated)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[autodiff_reverse(df21, Active, Duplicated)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0433]: failed to resolve: use of undeclared type `MyFloat`
-  --> $DIR/autodiff_illegal.rs:130:1
+  --> $DIR/autodiff_illegal.rs:116:1
    |
-LL | #[autodiff(df15, Reverse, Active, Active)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `MyFloat`
+LL | #[autodiff_reverse(df15, Active, Active)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `MyFloat`
 
 error[E0433]: failed to resolve: use of undeclared type `F64Trans`
-  --> $DIR/autodiff_illegal.rs:154:1
+  --> $DIR/autodiff_illegal.rs:140:1
    |
-LL | #[autodiff(df18, Reverse, Active, Active)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `F64Trans`
+LL | #[autodiff_reverse(df18, Active, Active)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `F64Trans`
 
 error[E0599]: the function or associated item `default` exists for tuple `(DoesNotImplDefault, DoesNotImplDefault)`, but its trait bounds were not satisfied
-  --> $DIR/autodiff_illegal.rs:181:1
+  --> $DIR/autodiff_illegal.rs:167:1
    |
 LL | struct DoesNotImplDefault;
    | ------------------------- doesn't satisfy `DoesNotImplDefault: Default`
-LL | #[autodiff(df22, Forward, Dual)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item cannot be called on `(DoesNotImplDefault, DoesNotImplDefault)` due to unsatisfied trait bounds
+LL | #[autodiff_forward(df22, Dual)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item cannot be called on `(DoesNotImplDefault, DoesNotImplDefault)` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DoesNotImplDefault: Default`
@@ -168,7 +153,7 @@ LL + #[derive(Default)]
 LL | struct DoesNotImplDefault;
    |
 
-error: aborting due to 23 previous errors
+error: aborting due to 21 previous errors
 
 Some errors have detailed explanations: E0428, E0433, E0599, E0658.
 For more information about an error, try `rustc --explain E0428`.
diff --git a/tests/ui/autodiff/auxiliary/my_macro.rs b/tests/ui/autodiff/auxiliary/my_macro.rs
index 217631a33c9..1d5a6de1454 100644
--- a/tests/ui/autodiff/auxiliary/my_macro.rs
+++ b/tests/ui/autodiff/auxiliary/my_macro.rs
@@ -3,6 +3,6 @@ use proc_macro::TokenStream;
 
 #[proc_macro_attribute]
 #[macro_use]
-pub fn autodiff(_attr: TokenStream, item: TokenStream) -> TokenStream {
+pub fn autodiff_forward(_attr: TokenStream, item: TokenStream) -> TokenStream {
     item // identity proc-macro
 }
diff --git a/tests/ui/autodiff/visibility.rs b/tests/ui/autodiff/visibility.rs
index dfaec03aef0..a84df75e799 100644
--- a/tests/ui/autodiff/visibility.rs
+++ b/tests/ui/autodiff/visibility.rs
@@ -6,12 +6,11 @@
 #![feature(autodiff)]
 
 #[cfg(std_autodiff)]
-use std::autodiff::autodiff;
-
+use std::autodiff::autodiff_forward;
 extern crate my_macro;
-use my_macro::autodiff; // bring `autodiff` in scope
+use my_macro::autodiff_forward; // bring `autodiff_forward` in scope
 
-#[autodiff]
-//[std_autodiff]~^^^ ERROR the name `autodiff` is defined multiple times
+#[autodiff_forward(dfoo)]
+//[std_autodiff]~^^^ ERROR the name `autodiff_forward` is defined multiple times
 //[std_autodiff]~^^ ERROR this rustc version does not support autodiff
 fn foo() {}
diff --git a/tests/ui/autodiff/visibility.std_autodiff.stderr b/tests/ui/autodiff/visibility.std_autodiff.stderr
index 720c9a00170..e45f1139012 100644
--- a/tests/ui/autodiff/visibility.std_autodiff.stderr
+++ b/tests/ui/autodiff/visibility.std_autodiff.stderr
@@ -1,23 +1,23 @@
-error[E0252]: the name `autodiff` is defined multiple times
-  --> $DIR/visibility.rs:12:5
+error[E0252]: the name `autodiff_forward` is defined multiple times
+  --> $DIR/visibility.rs:11:5
    |
-LL | use std::autodiff::autodiff;
-   |     ----------------------- previous import of the macro `autodiff` here
-...
-LL | use my_macro::autodiff; // bring `autodiff` in scope
-   |     ^^^^^^^^^^^^^^^^^^ `autodiff` reimported here
+LL | use std::autodiff::autodiff_forward;
+   |     ------------------------------- previous import of the macro `autodiff_forward` here
+LL | extern crate my_macro;
+LL | use my_macro::autodiff_forward; // bring `autodiff_forward` in scope
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ `autodiff_forward` reimported here
    |
-   = note: `autodiff` must be defined only once in the macro namespace of this module
+   = note: `autodiff_forward` must be defined only once in the macro namespace of this module
 help: you can use `as` to change the binding name of the import
    |
-LL | use my_macro::autodiff as other_autodiff; // bring `autodiff` in scope
-   |                        +++++++++++++++++
+LL | use my_macro::autodiff_forward as other_autodiff_forward; // bring `autodiff_forward` in scope
+   |                                +++++++++++++++++++++++++
 
 error: this rustc version does not support autodiff
-  --> $DIR/visibility.rs:14:1
+  --> $DIR/visibility.rs:13:1
    |
-LL | #[autodiff]
-   | ^^^^^^^^^^^
+LL | #[autodiff_forward(dfoo)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/autoref-autoderef/autoderef-box-no-add.rs b/tests/ui/autoref-autoderef/autoderef-box-no-add.rs
new file mode 100644
index 00000000000..f8085c1ae96
--- /dev/null
+++ b/tests/ui/autoref-autoderef/autoderef-box-no-add.rs
@@ -0,0 +1,35 @@
+//! Tests that auto-dereferencing does not allow addition of `Box<isize>` values.
+//!
+//! This test ensures that `Box<isize>` fields in structs (`Clam` and `Fish`) are not
+//! automatically dereferenced to `isize` during addition operations, as `Box<isize>`
+//! does not implement the `Add` trait.
+
+struct Clam {
+    x: Box<isize>,
+    y: Box<isize>,
+}
+
+struct Fish {
+    a: Box<isize>,
+}
+
+fn main() {
+    let a: Clam = Clam {
+        x: Box::new(1),
+        y: Box::new(2),
+    };
+    let b: Clam = Clam {
+        x: Box::new(10),
+        y: Box::new(20),
+    };
+    let z: isize = a.x + b.y;
+    //~^ ERROR cannot add `Box<isize>` to `Box<isize>`
+    println!("{}", z);
+    assert_eq!(z, 21);
+    let forty: Fish = Fish { a: Box::new(40) };
+    let two: Fish = Fish { a: Box::new(2) };
+    let answer: isize = forty.a + two.a;
+    //~^ ERROR cannot add `Box<isize>` to `Box<isize>`
+    println!("{}", answer);
+    assert_eq!(answer, 42);
+}
diff --git a/tests/ui/autoderef-full-lval.stderr b/tests/ui/autoref-autoderef/autoderef-box-no-add.stderr
index d90238a7fb2..20ef3352831 100644
--- a/tests/ui/autoderef-full-lval.stderr
+++ b/tests/ui/autoref-autoderef/autoderef-box-no-add.stderr
@@ -1,5 +1,5 @@
 error[E0369]: cannot add `Box<isize>` to `Box<isize>`
-  --> $DIR/autoderef-full-lval.rs:15:24
+  --> $DIR/autoderef-box-no-add.rs:25:24
    |
 LL |     let z: isize = a.x + b.y;
    |                    --- ^ --- Box<isize>
@@ -13,7 +13,7 @@ note: the foreign item type `Box<isize>` doesn't implement `Add`
    = note: not implement `Add`
 
 error[E0369]: cannot add `Box<isize>` to `Box<isize>`
-  --> $DIR/autoderef-full-lval.rs:21:33
+  --> $DIR/autoderef-box-no-add.rs:31:33
    |
 LL |     let answer: isize = forty.a + two.a;
    |                         ------- ^ ----- Box<isize>
diff --git a/tests/ui/autoref-autoderef/autoderef-privacy.rs b/tests/ui/autoref-autoderef/autoderef-privacy.rs
index d2a217257e5..5fa28750f73 100644
--- a/tests/ui/autoref-autoderef/autoderef-privacy.rs
+++ b/tests/ui/autoref-autoderef/autoderef-privacy.rs
@@ -14,28 +14,28 @@ impl Bar2 {
 
 mod foo {
     #[derive(Default)]
-    pub struct Bar { i: ::Bar2 }
+    pub struct Bar { i: crate::Bar2 }
     #[derive(Default)]
-    pub struct Baz(::Baz2);
+    pub struct Baz(crate::Baz2);
 
     impl Bar {
         fn f(&self) -> bool { false }
     }
 
     impl ::std::ops::Deref for Bar {
-        type Target = ::Bar2;
-        fn deref(&self) -> &::Bar2 { &self.i }
+        type Target = crate::Bar2;
+        fn deref(&self) -> &crate::Bar2 { &self.i }
     }
 
     impl ::std::ops::Deref for Baz {
-        type Target = ::Baz2;
-        fn deref(&self) -> &::Baz2 { &self.0 }
+        type Target = crate::Baz2;
+        fn deref(&self) -> &crate::Baz2 { &self.0 }
     }
 
     pub fn f(bar: &Bar, baz: &Baz) {
         // Since the private fields and methods are visible here, there should be no autoderefs.
-        let _: &::Bar2 = &bar.i;
-        let _: &::Baz2 = &baz.0;
+        let _: &crate::Bar2 = &bar.i;
+        let _: &crate::Baz2 = &baz.0;
         assert!(!bar.f());
     }
 }
diff --git a/tests/ui/autoref-autoderef/autoderef-vec-to-slice-by-value.rs b/tests/ui/autoref-autoderef/autoderef-vec-to-slice-by-value.rs
new file mode 100644
index 00000000000..4d67c3a6733
--- /dev/null
+++ b/tests/ui/autoref-autoderef/autoderef-vec-to-slice-by-value.rs
@@ -0,0 +1,18 @@
+//! Tests that a `Vec<isize>` can call a method defined in a trait (`Foo`)
+//! implemented for `&[isize]` with a by-value receiver (`self`), relying on auto-dereferencing
+//! from `Vec` to `&[isize]` during method resolution.
+
+//@ run-pass
+
+trait Foo {
+    fn foo(self);
+}
+
+impl<'a> Foo for &'a [isize] {
+    fn foo(self) {}
+}
+
+pub fn main() {
+    let items = vec![ 3, 5, 1, 2, 4 ];
+    items.foo();
+}
diff --git a/tests/ui/auxiliary/crate-method-reexport-grrrrrrr2.rs b/tests/ui/auxiliary/crate-method-reexport-grrrrrrr2.rs
index d08504005a5..06413e13526 100644
--- a/tests/ui/auxiliary/crate-method-reexport-grrrrrrr2.rs
+++ b/tests/ui/auxiliary/crate-method-reexport-grrrrrrr2.rs
@@ -16,7 +16,7 @@ pub mod name_pool {
 }
 
 pub mod rust {
-    pub use name_pool::add;
+    pub use crate::name_pool::add;
 
     pub type rt = Box<()>;
 
diff --git a/tests/ui/auxiliary/delegate_macro.rs b/tests/ui/auxiliary/delegate_macro.rs
new file mode 100644
index 00000000000..0d752e12039
--- /dev/null
+++ b/tests/ui/auxiliary/delegate_macro.rs
@@ -0,0 +1,6 @@
+#[macro_export]
+macro_rules! delegate {
+    ($method:ident) => {
+        <Self>::$method(8)
+    };
+}
diff --git a/tests/ui/auxiliary/pub-and-stability.rs b/tests/ui/auxiliary/pub-and-stability.rs
index d2d07f99398..8866233b61e 100644
--- a/tests/ui/auxiliary/pub-and-stability.rs
+++ b/tests/ui/auxiliary/pub-and-stability.rs
@@ -44,7 +44,7 @@ mod m {
         #[unstable(feature = "unstable_undeclared", issue = "38412")] // SILLY
         pub(crate) b_crate: i32,
         #[unstable(feature = "unstable_declared", issue = "38412")] // SILLY
-        pub(in m) c_mod: i32,
+        pub(in crate::m) c_mod: i32,
         #[stable(feature = "unit_test", since = "1.0.0")] // SILLY
         d_priv: i32
     }
@@ -60,7 +60,7 @@ mod m {
         pub i32,
 
         pub(crate) i32,
-        pub(in m) i32,
+        pub(in crate::m) i32,
         i32);
 
     impl Record {
@@ -113,7 +113,7 @@ mod m {
         #[unstable(feature = "unstable_undeclared", issue = "38412")] // SILLY
         pub(crate) fn pub_crate(&self) -> i32 { self.d_priv }
         #[unstable(feature = "unstable_declared", issue = "38412")] // SILLY
-        pub(in m) fn pub_mod(&self) -> i32 { self.d_priv }
+        pub(in crate::m) fn pub_mod(&self) -> i32 { self.d_priv }
         #[stable(feature = "unit_test", since = "1.0.0")] // SILLY
         fn private(&self) -> i32 { self.d_priv }
     }
@@ -127,7 +127,7 @@ mod m {
         pub fn stable(&self) -> i32 { self.0 }
 
         pub(crate) fn pub_crate(&self) -> i32 { self.0 }
-        pub(in m) fn pub_mod(&self) -> i32 { self.0 }
+        pub(in crate::m) fn pub_mod(&self) -> i32 { self.0 }
         fn private(&self) -> i32 { self.0 }
     }
 }
diff --git a/tests/ui/bogus-tag.rs b/tests/ui/bogus-tag.rs
deleted file mode 100644
index c594385eec2..00000000000
--- a/tests/ui/bogus-tag.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-enum Color { Rgb(isize, isize, isize), Rgba(isize, isize, isize, isize), }
-
-fn main() {
-    let red: Color = Color::Rgb(255, 0, 0);
-    match red {
-        Color::Rgb(r, g, b) => { println!("rgb"); }
-        Color::Hsl(h, s, l) => { println!("hsl"); }
-        //~^ ERROR no variant
-    }
-}
diff --git a/tests/ui/borrow-by-val-method-receiver.rs b/tests/ui/borrow-by-val-method-receiver.rs
deleted file mode 100644
index aee1108d96d..00000000000
--- a/tests/ui/borrow-by-val-method-receiver.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-//@ run-pass
-
-trait Foo {
-    fn foo(self);
-}
-
-impl<'a> Foo for &'a [isize] {
-    fn foo(self) {}
-}
-
-pub fn main() {
-    let items = vec![ 3, 5, 1, 2, 4 ];
-    items.foo();
-}
diff --git a/tests/ui/borrowck/issue-81899.rs b/tests/ui/borrowck/issue-81899.rs
index 11755620d86..03d9b8cb6c6 100644
--- a/tests/ui/borrowck/issue-81899.rs
+++ b/tests/ui/borrowck/issue-81899.rs
@@ -3,7 +3,7 @@
 
 //@ dont-require-annotations: NOTE
 
-const _CONST: &[u8] = &f(&[], |_| {}); //~ ERROR evaluation of constant value failed
+const _CONST: &[u8] = &f(&[], |_| {}); //~ ERROR explicit panic
 //~^ NOTE constant
 
 const fn f<F>(_: &[u8], _: F) -> &[u8]
diff --git a/tests/ui/borrowck/issue-81899.stderr b/tests/ui/borrowck/issue-81899.stderr
index 97d463cb6a7..d236a17e0aa 100644
--- a/tests/ui/borrowck/issue-81899.stderr
+++ b/tests/ui/borrowck/issue-81899.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/issue-81899.rs:6:24
    |
 LL | const _CONST: &[u8] = &f(&[], |_| {});
-   |                        ^^^^^^^^^^^^^^ evaluation panicked: explicit panic
+   |                        ^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `f::<{closure@$DIR/issue-81899.rs:6:31: 6:34}>`
   --> $DIR/issue-81899.rs:13:5
diff --git a/tests/ui/borrowck/issue-88434-minimal-example.rs b/tests/ui/borrowck/issue-88434-minimal-example.rs
index 7482b3fd612..901e0142c36 100644
--- a/tests/ui/borrowck/issue-88434-minimal-example.rs
+++ b/tests/ui/borrowck/issue-88434-minimal-example.rs
@@ -2,7 +2,7 @@
 
 //@ dont-require-annotations: NOTE
 
-const _CONST: &() = &f(&|_| {}); //~ ERROR evaluation of constant value failed
+const _CONST: &() = &f(&|_| {}); //~ ERROR explicit panic
 //~^ NOTE constant
 
 const fn f<F>(_: &F)
@@ -12,4 +12,4 @@ where
     panic!() //~ NOTE inside `f
 }
 
-fn main() { }
+fn main() {}
diff --git a/tests/ui/borrowck/issue-88434-minimal-example.stderr b/tests/ui/borrowck/issue-88434-minimal-example.stderr
index 4c525b9ea2c..3d9cc966047 100644
--- a/tests/ui/borrowck/issue-88434-minimal-example.stderr
+++ b/tests/ui/borrowck/issue-88434-minimal-example.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/issue-88434-minimal-example.rs:5:22
    |
 LL | const _CONST: &() = &f(&|_| {});
-   |                      ^^^^^^^^^^ evaluation panicked: explicit panic
+   |                      ^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `f::<{closure@$DIR/issue-88434-minimal-example.rs:5:25: 5:28}>`
   --> $DIR/issue-88434-minimal-example.rs:12:5
diff --git a/tests/ui/borrowck/issue-88434-removal-index-should-be-less.rs b/tests/ui/borrowck/issue-88434-removal-index-should-be-less.rs
index 09b1f59c449..cce59124ade 100644
--- a/tests/ui/borrowck/issue-88434-removal-index-should-be-less.rs
+++ b/tests/ui/borrowck/issue-88434-removal-index-should-be-less.rs
@@ -2,7 +2,7 @@
 
 //@ dont-require-annotations: NOTE
 
-const _CONST: &[u8] = &f(&[], |_| {}); //~ ERROR evaluation of constant value failed
+const _CONST: &[u8] = &f(&[], |_| {}); //~ ERROR explicit panic
 //~^ NOTE constant
 
 const fn f<F>(_: &[u8], _: F) -> &[u8]
@@ -12,4 +12,4 @@ where
     panic!() //~ NOTE inside `f
 }
 
-fn main() { }
+fn main() {}
diff --git a/tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr b/tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
index a22621c9c1b..90d7f36938e 100644
--- a/tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
+++ b/tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/issue-88434-removal-index-should-be-less.rs:5:24
    |
 LL | const _CONST: &[u8] = &f(&[], |_| {});
-   |                        ^^^^^^^^^^^^^^ evaluation panicked: explicit panic
+   |                        ^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:5:31: 5:34}>`
   --> $DIR/issue-88434-removal-index-should-be-less.rs:12:5
diff --git a/tests/ui/borrowck/unconstrained-closure-lifetime-generic.rs b/tests/ui/borrowck/unconstrained-closure-lifetime-generic.rs
new file mode 100644
index 00000000000..4fdf5470fea
--- /dev/null
+++ b/tests/ui/borrowck/unconstrained-closure-lifetime-generic.rs
@@ -0,0 +1,22 @@
+// Regression test for #122704
+use std::any::Any;
+
+pub struct Foo {
+    bar: Box<dyn for<'a> Fn(&'a usize) -> Box<dyn Any + 'a>>,
+}
+
+impl Foo {
+    pub fn ack<I>(&mut self, f: impl for<'a> Fn(&'a usize) -> Box<I>) {
+        self.bar = Box::new(|baz| Box::new(f(baz)));
+        //~^ ERROR the parameter type `impl for<'a> Fn(&'a usize) -> Box<I>` may not live long enough
+        //~| ERROR the parameter type `impl for<'a> Fn(&'a usize) -> Box<I>` may not live long enough
+        //~| ERROR the parameter type `impl for<'a> Fn(&'a usize) -> Box<I>` may not live long enough
+        //~| ERROR the parameter type `impl for<'a> Fn(&'a usize) -> Box<I>` may not live long enough
+        //~| ERROR the parameter type `I` may not live long enough
+        //~| ERROR the parameter type `I` may not live long enough
+        //~| ERROR the parameter type `I` may not live long enough
+        //~| ERROR `f` does not live long enough
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/unconstrained-closure-lifetime-generic.stderr b/tests/ui/borrowck/unconstrained-closure-lifetime-generic.stderr
new file mode 100644
index 00000000000..df86ce79f09
--- /dev/null
+++ b/tests/ui/borrowck/unconstrained-closure-lifetime-generic.stderr
@@ -0,0 +1,119 @@
+error[E0310]: the parameter type `impl for<'a> Fn(&'a usize) -> Box<I>` may not live long enough
+  --> $DIR/unconstrained-closure-lifetime-generic.rs:10:9
+   |
+LL |         self.bar = Box::new(|baz| Box::new(f(baz)));
+   |         ^^^^^^^^
+   |         |
+   |         the parameter type `impl for<'a> Fn(&'a usize) -> Box<I>` must be valid for the static lifetime...
+   |         ...so that the type `impl for<'a> Fn(&'a usize) -> Box<I>` will meet its required lifetime bounds
+   |
+help: consider adding an explicit lifetime bound
+   |
+LL |     pub fn ack<I>(&mut self, f: impl for<'a> Fn(&'a usize) -> Box<I> + 'static) {
+   |                                                                      +++++++++
+
+error[E0310]: the parameter type `impl for<'a> Fn(&'a usize) -> Box<I>` may not live long enough
+  --> $DIR/unconstrained-closure-lifetime-generic.rs:10:9
+   |
+LL |         self.bar = Box::new(|baz| Box::new(f(baz)));
+   |         ^^^^^^^^
+   |         |
+   |         the parameter type `impl for<'a> Fn(&'a usize) -> Box<I>` must be valid for the static lifetime...
+   |         ...so that the type `impl for<'a> Fn(&'a usize) -> Box<I>` will meet its required lifetime bounds
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: consider adding an explicit lifetime bound
+   |
+LL |     pub fn ack<I>(&mut self, f: impl for<'a> Fn(&'a usize) -> Box<I> + 'static) {
+   |                                                                      +++++++++
+
+error[E0310]: the parameter type `impl for<'a> Fn(&'a usize) -> Box<I>` may not live long enough
+  --> $DIR/unconstrained-closure-lifetime-generic.rs:10:20
+   |
+LL |         self.bar = Box::new(|baz| Box::new(f(baz)));
+   |                    ^^^^^^^^
+   |                    |
+   |                    the parameter type `impl for<'a> Fn(&'a usize) -> Box<I>` must be valid for the static lifetime...
+   |                    ...so that the type `impl for<'a> Fn(&'a usize) -> Box<I>` will meet its required lifetime bounds
+   |
+help: consider adding an explicit lifetime bound
+   |
+LL |     pub fn ack<I>(&mut self, f: impl for<'a> Fn(&'a usize) -> Box<I> + 'static) {
+   |                                                                      +++++++++
+
+error[E0310]: the parameter type `impl for<'a> Fn(&'a usize) -> Box<I>` may not live long enough
+  --> $DIR/unconstrained-closure-lifetime-generic.rs:10:20
+   |
+LL |         self.bar = Box::new(|baz| Box::new(f(baz)));
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                    |
+   |                    the parameter type `impl for<'a> Fn(&'a usize) -> Box<I>` must be valid for the static lifetime...
+   |                    ...so that the type `impl for<'a> Fn(&'a usize) -> Box<I>` will meet its required lifetime bounds
+   |
+help: consider adding an explicit lifetime bound
+   |
+LL |     pub fn ack<I>(&mut self, f: impl for<'a> Fn(&'a usize) -> Box<I> + 'static) {
+   |                                                                      +++++++++
+
+error[E0310]: the parameter type `I` may not live long enough
+  --> $DIR/unconstrained-closure-lifetime-generic.rs:10:35
+   |
+LL |         self.bar = Box::new(|baz| Box::new(f(baz)));
+   |                                   ^^^^^^^^^^^^^^^^
+   |                                   |
+   |                                   the parameter type `I` must be valid for the static lifetime...
+   |                                   ...so that the type `I` will meet its required lifetime bounds
+   |
+help: consider adding an explicit lifetime bound
+   |
+LL |     pub fn ack<I: 'static>(&mut self, f: impl for<'a> Fn(&'a usize) -> Box<I>) {
+   |                 +++++++++
+
+error[E0310]: the parameter type `I` may not live long enough
+  --> $DIR/unconstrained-closure-lifetime-generic.rs:10:35
+   |
+LL |         self.bar = Box::new(|baz| Box::new(f(baz)));
+   |                                   ^^^^^^^^^^^^^^^^
+   |                                   |
+   |                                   the parameter type `I` must be valid for the static lifetime...
+   |                                   ...so that the type `I` will meet its required lifetime bounds
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: consider adding an explicit lifetime bound
+   |
+LL |     pub fn ack<I: 'static>(&mut self, f: impl for<'a> Fn(&'a usize) -> Box<I>) {
+   |                 +++++++++
+
+error[E0311]: the parameter type `I` may not live long enough
+  --> $DIR/unconstrained-closure-lifetime-generic.rs:10:35
+   |
+LL |     pub fn ack<I>(&mut self, f: impl for<'a> Fn(&'a usize) -> Box<I>) {
+   |                   --------- the parameter type `I` must be valid for the anonymous lifetime defined here...
+LL |         self.bar = Box::new(|baz| Box::new(f(baz)));
+   |                                   ^^^^^^^^^^^^^^^^ ...so that the type `I` will meet its required lifetime bounds
+   |
+help: consider adding an explicit lifetime bound
+   |
+LL |     pub fn ack<'a, I: 'a>(&'a mut self, f: impl for<'a> Fn(&'a usize) -> Box<I>) {
+   |                +++  ++++   ++
+
+error[E0597]: `f` does not live long enough
+  --> $DIR/unconstrained-closure-lifetime-generic.rs:10:44
+   |
+LL |     pub fn ack<I>(&mut self, f: impl for<'a> Fn(&'a usize) -> Box<I>) {
+   |                              - binding `f` declared here
+LL |         self.bar = Box::new(|baz| Box::new(f(baz)));
+   |         --------            -----          ^ borrowed value does not live long enough
+   |         |                   |
+   |         |                   value captured here
+   |         coercion requires that `f` is borrowed for `'static`
+...
+LL |     }
+   |     - `f` dropped here while still borrowed
+   |
+   = note: due to object lifetime defaults, `Box<dyn for<'a> Fn(&'a usize) -> Box<(dyn Any + 'a)>>` actually means `Box<(dyn for<'a> Fn(&'a usize) -> Box<(dyn Any + 'a)> + 'static)>`
+
+error: aborting due to 8 previous errors
+
+Some errors have detailed explanations: E0310, E0311, E0597.
+For more information about an error, try `rustc --explain E0310`.
diff --git a/tests/ui/borrowck/unconstrained-closure-lifetime-trait-object.rs b/tests/ui/borrowck/unconstrained-closure-lifetime-trait-object.rs
new file mode 100644
index 00000000000..3eee98d9bdb
--- /dev/null
+++ b/tests/ui/borrowck/unconstrained-closure-lifetime-trait-object.rs
@@ -0,0 +1,11 @@
+// Regression test for #139004
+use std::any::Any;
+
+type B = Box<dyn for<'a> Fn(&(dyn Any + 'a)) -> Box<dyn Any + 'a>>;
+
+fn foo<E>() -> B {
+    Box::new(|e| Box::new(e.is::<E>()))
+    //~^ ERROR the parameter type `E` may not live long enough
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/unconstrained-closure-lifetime-trait-object.stderr b/tests/ui/borrowck/unconstrained-closure-lifetime-trait-object.stderr
new file mode 100644
index 00000000000..c9d5f78828d
--- /dev/null
+++ b/tests/ui/borrowck/unconstrained-closure-lifetime-trait-object.stderr
@@ -0,0 +1,17 @@
+error[E0310]: the parameter type `E` may not live long enough
+  --> $DIR/unconstrained-closure-lifetime-trait-object.rs:7:29
+   |
+LL |     Box::new(|e| Box::new(e.is::<E>()))
+   |                             ^^
+   |                             |
+   |                             the parameter type `E` must be valid for the static lifetime...
+   |                             ...so that the type `E` will meet its required lifetime bounds
+   |
+help: consider adding an explicit lifetime bound
+   |
+LL | fn foo<E: 'static>() -> B {
+   |         +++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/cast/func-pointer-issue-140491.rs b/tests/ui/cast/func-pointer-issue-140491.rs
new file mode 100644
index 00000000000..d5d86a66f5a
--- /dev/null
+++ b/tests/ui/cast/func-pointer-issue-140491.rs
@@ -0,0 +1,7 @@
+fn my_fn(event: &Event<'_>) {}
+
+struct Event<'a>(&'a ());
+
+fn main() {
+    const ptr: &fn(&Event<'_>) = &my_fn as _; //~ ERROR non-primitive cast: `&for<'a, 'b> fn(&'a Event<'b>) {my_fn}` as `&for<'a, 'b> fn(&'a Event<'b>)` [E0605]
+}
diff --git a/tests/ui/cast/func-pointer-issue-140491.stderr b/tests/ui/cast/func-pointer-issue-140491.stderr
new file mode 100644
index 00000000000..e1c07010e69
--- /dev/null
+++ b/tests/ui/cast/func-pointer-issue-140491.stderr
@@ -0,0 +1,11 @@
+error[E0605]: non-primitive cast: `&for<'a, 'b> fn(&'a Event<'b>) {my_fn}` as `&for<'a, 'b> fn(&'a Event<'b>)`
+  --> $DIR/func-pointer-issue-140491.rs:6:34
+   |
+LL | ..._>) = &my_fn as _;
+   |          ^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
+   |
+   = note: casting reference expression `&my_fn` because `&` binds tighter than `as`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/cfg/cfg-version/cfg-version-expand.rs b/tests/ui/cfg/cfg-version/cfg-version-expand.rs
new file mode 100644
index 00000000000..8c426b4a41f
--- /dev/null
+++ b/tests/ui/cfg/cfg-version/cfg-version-expand.rs
@@ -0,0 +1,30 @@
+//@ run-pass
+//@ rustc-env:RUSTC_OVERRIDE_VERSION_STRING=1.50.3
+
+#![feature(cfg_version)]
+
+#[cfg(version("1.49.0"))]
+const ON_1_49_0: bool = true;
+#[cfg(version("1.50"))]
+const ON_1_50_0: bool = true;
+#[cfg(not(version("1.51")))]
+const ON_1_51_0: bool = false;
+
+// This one uses the wrong syntax, so doesn't eval to true
+#[warn(unexpected_cfgs)]
+#[cfg(not(version = "1.48.0"))] //~ WARN unexpected `cfg` condition name: `version`
+const ON_1_48_0: bool = false;
+
+fn main() {
+    assert!(!ON_1_48_0);
+    assert!(ON_1_49_0);
+    assert!(ON_1_50_0);
+    assert!(!ON_1_51_0);
+    assert!(cfg!(version("1.1")));
+    assert!(cfg!(version("1.49")));
+    assert!(cfg!(version("1.50.0")));
+    assert!(cfg!(version("1.50.3")));
+    assert!(!cfg!(version("1.50.4")));
+    assert!(!cfg!(version("1.51")));
+    assert!(!cfg!(version("1.100")));
+}
diff --git a/tests/ui/cfg/cfg-version/cfg-version-expand.stderr b/tests/ui/cfg/cfg-version/cfg-version-expand.stderr
new file mode 100644
index 00000000000..a9a8d86c0fa
--- /dev/null
+++ b/tests/ui/cfg/cfg-version/cfg-version-expand.stderr
@@ -0,0 +1,17 @@
+warning: unexpected `cfg` condition name: `version`
+  --> $DIR/cfg-version-expand.rs:15:11
+   |
+LL | #[cfg(not(version = "1.48.0"))]
+   |           ^^^^^^^^^^^^^^^^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(version, values("1.48.0"))`
+   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
+   = note: `#[warn(unexpected_cfgs)]` on by default
+help: there is a similar config predicate: `version("..")`
+   |
+LL - #[cfg(not(version = "1.48.0"))]
+LL + #[cfg(not(version("1.48.0")))]
+   |
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/cfg/cfg-version/syntax.rs b/tests/ui/cfg/cfg-version/syntax.rs
new file mode 100644
index 00000000000..22aab47e1ec
--- /dev/null
+++ b/tests/ui/cfg/cfg-version/syntax.rs
@@ -0,0 +1,152 @@
+//! Check `#[cfg(version(..))]` parsing.
+
+#![feature(cfg_version)]
+
+// Overall grammar
+// ===============
+//
+// `#[cfg(version(..))]` accepts only the `version(VERSION_STRING_LITERAL)` predicate form, where
+// only a single string literal is permitted.
+
+#[cfg(version(42))]
+//~^ ERROR expected a version literal
+fn not_a_string_literal_simple() {}
+
+#[cfg(version(1.20))]
+//~^ ERROR expected a version literal
+fn not_a_string_literal_semver_like() {}
+
+#[cfg(version(false))]
+//~^ ERROR expected a version literal
+fn not_a_string_literal_other() {}
+
+#[cfg(version("1.43", "1.44", "1.45"))]
+//~^ ERROR expected single version literal
+fn multiple_version_literals() {}
+
+// The key-value form `cfg(version = "..")` is not considered a valid `cfg(version(..))` usage, but
+// it will only trigger the `unexpected_cfgs` lint and not a hard error.
+
+#[cfg(version = "1.43")]
+//~^ WARN unexpected `cfg` condition name: `version`
+fn key_value_form() {}
+
+// Additional version string literal constraints
+// =============================================
+//
+// The `VERSION_STRING_LITERAL` ("version literal") has additional constraints on its syntactical
+// well-formedness.
+
+// 1. A valid version literal can only constitute of numbers and periods (a "simple" semver version
+// string). Non-semver strings or "complex" semver strings (such as build metadata) are not
+// considered valid version literals, and will emit a non-lint warning "unknown version literal
+// format".
+
+#[cfg(version("1.43.0"))]
+fn valid_major_minor_patch() {}
+
+#[cfg(version("0.0.0"))]
+fn valid_zero_zero_zero_major_minor_patch() {}
+
+#[cfg(version("foo"))]
+//~^ WARN unknown version literal format, assuming it refers to a future version
+fn not_numbers_or_periods() {}
+
+#[cfg(version("1.20.0-stable"))]
+//~^ WARN unknown version literal format, assuming it refers to a future version
+fn complex_semver_with_metadata() {}
+
+// 2. "Shortened" version strings are permitted but *only* for the omission of the patch number.
+
+#[cfg(version("1.0"))]
+fn valid_major_minor_1() {}
+
+#[cfg(version("1.43"))]
+fn valid_major_minor_2() {}
+
+#[cfg(not(version("1.44")))]
+fn valid_major_minor_negated_smoke_test() {}
+
+#[cfg(version("0.0"))]
+fn valid_zero_zero_major_minor() {}
+
+#[cfg(version("0.7"))]
+fn valid_zero_major_minor() {}
+
+// 3. Major-only, or other non-Semver-like strings are not permitted.
+
+#[cfg(version("1"))]
+//~^ WARN unknown version literal format, assuming it refers to a future version
+fn invalid_major_only() {}
+
+#[cfg(version("0"))]
+//~^ WARN unknown version literal format, assuming it refers to a future version
+fn invalid_major_only_zero() {}
+
+#[cfg(version(".7"))]
+//~^ WARN unknown version literal format, assuming it refers to a future version
+fn invalid_decimal_like() {}
+
+// Misc parsing overflow/underflow edge cases
+// ==========================================
+//
+// Check that we report "unknown version literal format" user-facing warnings and not ICEs.
+
+#[cfg(version("-1"))]
+//~^ WARN unknown version literal format, assuming it refers to a future version
+fn invalid_major_only_negative() {}
+
+// Implementation detail: we store rustc version as `{ major: u16, minor: u16, patch: u16 }`.
+
+#[cfg(version("65536"))]
+//~^ WARN unknown version literal format, assuming it refers to a future version
+fn exceed_u16_major() {}
+
+#[cfg(version("1.65536.0"))]
+//~^ WARN unknown version literal format, assuming it refers to a future version
+fn exceed_u16_minor() {}
+
+#[cfg(version("1.0.65536"))]
+//~^ WARN unknown version literal format, assuming it refers to a future version
+fn exceed_u16_patch() {}
+
+#[cfg(version("65536.0.65536"))]
+//~^ WARN unknown version literal format, assuming it refers to a future version
+fn exceed_u16_mixed() {}
+
+// Usage as `cfg!()`
+// =================
+
+fn cfg_usage() {
+    assert!(cfg!(version("1.0")));
+    assert!(cfg!(version("1.43")));
+    assert!(cfg!(version("1.43.0")));
+
+    assert!(cfg!(version("foo")));
+    //~^ WARN unknown version literal format, assuming it refers to a future version
+    assert!(cfg!(version("1.20.0-stable")));
+    //~^ WARN unknown version literal format, assuming it refers to a future version
+
+    assert!(cfg!(version = "1.43"));
+    //~^ WARN unexpected `cfg` condition name: `version`
+}
+
+fn main() {
+    cfg_usage();
+
+    // `cfg(version = "..")` is not a valid `cfg_version` form, but it only triggers
+    // `unexpected_cfgs` lint, and `cfg(version = "..")` eval to `false`.
+    key_value_form(); //~ ERROR cannot find function
+
+    // Invalid version literal formats within valid `cfg(version(..))` form should also cause
+    // `cfg(version(..))` eval to `false`.
+    not_numbers_or_periods(); //~ ERROR cannot find function
+    complex_semver_with_metadata(); //~ ERROR cannot find function
+    invalid_major_only(); //~ ERROR cannot find function
+    invalid_major_only_zero(); //~ ERROR cannot find function
+    invalid_major_only_negative(); //~ ERROR cannot find function
+    exceed_u16_major(); //~ ERROR cannot find function
+    exceed_u16_minor(); //~ ERROR cannot find function
+    exceed_u16_patch(); //~ ERROR cannot find function
+    exceed_u16_mixed(); //~ ERROR cannot find function
+}
diff --git a/tests/ui/cfg/cfg-version/syntax.stderr b/tests/ui/cfg/cfg-version/syntax.stderr
new file mode 100644
index 00000000000..2facd960763
--- /dev/null
+++ b/tests/ui/cfg/cfg-version/syntax.stderr
@@ -0,0 +1,188 @@
+error: expected a version literal
+  --> $DIR/syntax.rs:11:15
+   |
+LL | #[cfg(version(42))]
+   |               ^^
+
+error: expected a version literal
+  --> $DIR/syntax.rs:15:15
+   |
+LL | #[cfg(version(1.20))]
+   |               ^^^^
+
+error: expected a version literal
+  --> $DIR/syntax.rs:19:15
+   |
+LL | #[cfg(version(false))]
+   |               ^^^^^
+
+error: expected single version literal
+  --> $DIR/syntax.rs:23:7
+   |
+LL | #[cfg(version("1.43", "1.44", "1.45"))]
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unknown version literal format, assuming it refers to a future version
+  --> $DIR/syntax.rs:51:15
+   |
+LL | #[cfg(version("foo"))]
+   |               ^^^^^
+
+warning: unknown version literal format, assuming it refers to a future version
+  --> $DIR/syntax.rs:55:15
+   |
+LL | #[cfg(version("1.20.0-stable"))]
+   |               ^^^^^^^^^^^^^^^
+
+warning: unknown version literal format, assuming it refers to a future version
+  --> $DIR/syntax.rs:78:15
+   |
+LL | #[cfg(version("1"))]
+   |               ^^^
+
+warning: unknown version literal format, assuming it refers to a future version
+  --> $DIR/syntax.rs:82:15
+   |
+LL | #[cfg(version("0"))]
+   |               ^^^
+
+warning: unknown version literal format, assuming it refers to a future version
+  --> $DIR/syntax.rs:86:15
+   |
+LL | #[cfg(version(".7"))]
+   |               ^^^^
+
+warning: unknown version literal format, assuming it refers to a future version
+  --> $DIR/syntax.rs:95:15
+   |
+LL | #[cfg(version("-1"))]
+   |               ^^^^
+
+warning: unknown version literal format, assuming it refers to a future version
+  --> $DIR/syntax.rs:101:15
+   |
+LL | #[cfg(version("65536"))]
+   |               ^^^^^^^
+
+warning: unknown version literal format, assuming it refers to a future version
+  --> $DIR/syntax.rs:105:15
+   |
+LL | #[cfg(version("1.65536.0"))]
+   |               ^^^^^^^^^^^
+
+warning: unknown version literal format, assuming it refers to a future version
+  --> $DIR/syntax.rs:109:15
+   |
+LL | #[cfg(version("1.0.65536"))]
+   |               ^^^^^^^^^^^
+
+warning: unknown version literal format, assuming it refers to a future version
+  --> $DIR/syntax.rs:113:15
+   |
+LL | #[cfg(version("65536.0.65536"))]
+   |               ^^^^^^^^^^^^^^^
+
+warning: unknown version literal format, assuming it refers to a future version
+  --> $DIR/syntax.rs:125:26
+   |
+LL |     assert!(cfg!(version("foo")));
+   |                          ^^^^^
+
+warning: unknown version literal format, assuming it refers to a future version
+  --> $DIR/syntax.rs:127:26
+   |
+LL |     assert!(cfg!(version("1.20.0-stable")));
+   |                          ^^^^^^^^^^^^^^^
+
+warning: unexpected `cfg` condition name: `version`
+  --> $DIR/syntax.rs:30:7
+   |
+LL | #[cfg(version = "1.43")]
+   |       ^^^^^^^^^^^^^^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(version, values("1.43"))`
+   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
+   = note: `#[warn(unexpected_cfgs)]` on by default
+help: there is a similar config predicate: `version("..")`
+   |
+LL - #[cfg(version = "1.43")]
+LL + #[cfg(version("1.43"))]
+   |
+
+warning: unexpected `cfg` condition name: `version`
+  --> $DIR/syntax.rs:130:18
+   |
+LL |     assert!(cfg!(version = "1.43"));
+   |                  ^^^^^^^^^^^^^^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(version, values("1.43"))`
+   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
+help: there is a similar config predicate: `version("..")`
+   |
+LL -     assert!(cfg!(version = "1.43"));
+LL +     assert!(cfg!(version("1.43")));
+   |
+
+error[E0425]: cannot find function `key_value_form` in this scope
+  --> $DIR/syntax.rs:139:5
+   |
+LL |     key_value_form();
+   |     ^^^^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find function `not_numbers_or_periods` in this scope
+  --> $DIR/syntax.rs:143:5
+   |
+LL |     not_numbers_or_periods();
+   |     ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find function `complex_semver_with_metadata` in this scope
+  --> $DIR/syntax.rs:144:5
+   |
+LL |     complex_semver_with_metadata();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find function `invalid_major_only` in this scope
+  --> $DIR/syntax.rs:145:5
+   |
+LL |     invalid_major_only();
+   |     ^^^^^^^^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find function `invalid_major_only_zero` in this scope
+  --> $DIR/syntax.rs:146:5
+   |
+LL |     invalid_major_only_zero();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find function `invalid_major_only_negative` in this scope
+  --> $DIR/syntax.rs:147:5
+   |
+LL |     invalid_major_only_negative();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find function `exceed_u16_major` in this scope
+  --> $DIR/syntax.rs:148:5
+   |
+LL |     exceed_u16_major();
+   |     ^^^^^^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find function `exceed_u16_minor` in this scope
+  --> $DIR/syntax.rs:149:5
+   |
+LL |     exceed_u16_minor();
+   |     ^^^^^^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find function `exceed_u16_patch` in this scope
+  --> $DIR/syntax.rs:150:5
+   |
+LL |     exceed_u16_patch();
+   |     ^^^^^^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find function `exceed_u16_mixed` in this scope
+  --> $DIR/syntax.rs:151:5
+   |
+LL |     exceed_u16_mixed();
+   |     ^^^^^^^^^^^^^^^^ not found in this scope
+
+error: aborting due to 14 previous errors; 14 warnings emitted
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/cfg/diagnostics-reexport-2.rs b/tests/ui/cfg/diagnostics-reexport-2.rs
new file mode 100644
index 00000000000..f66b9ed99ee
--- /dev/null
+++ b/tests/ui/cfg/diagnostics-reexport-2.rs
@@ -0,0 +1,61 @@
+// issue#141256
+
+mod original {
+    #[cfg(false)]
+    //~^ NOTE the item is gated here
+    //~| NOTE the item is gated here
+    //~| NOTE the item is gated here
+    //~| NOTE the item is gated here
+    //~| NOTE the item is gated here
+    pub mod gated {
+    //~^ NOTE found an item that was configured out
+    //~| NOTE found an item that was configured out
+    //~| NOTE found an item that was configured out
+    //~| NOTE found an item that was configured out
+    //~| NOTE found an item that was configured out
+        pub fn foo() {}
+    }
+}
+
+mod reexport {
+    pub use super::original::*;
+}
+
+mod reexport2 {
+    pub use super::reexport::*;
+}
+
+mod reexport30 {
+    pub use super::original::*;
+    pub use super::reexport31::*;
+}
+
+mod reexport31 {
+    pub use super::reexport30::*;
+}
+
+mod reexport32 {
+    pub use super::reexport30::*;
+}
+
+fn main() {
+    reexport::gated::foo();
+    //~^ ERROR failed to resolve: could not find `gated` in `reexport`
+    //~| NOTE  could not find `gated` in `reexport`
+
+    reexport2::gated::foo();
+    //~^ ERROR failed to resolve: could not find `gated` in `reexport2`
+    //~| NOTE  could not find `gated` in `reexport2`
+
+    reexport30::gated::foo();
+    //~^ ERROR failed to resolve: could not find `gated` in `reexport30`
+    //~| NOTE  could not find `gated` in `reexport30`
+
+    reexport31::gated::foo();
+    //~^ ERROR failed to resolve: could not find `gated` in `reexport31`
+    //~| NOTE  could not find `gated` in `reexport31`
+
+    reexport32::gated::foo();
+    //~^ ERROR failed to resolve: could not find `gated` in `reexport32`
+    //~| NOTE  could not find `gated` in `reexport32`
+}
diff --git a/tests/ui/cfg/diagnostics-reexport-2.stderr b/tests/ui/cfg/diagnostics-reexport-2.stderr
new file mode 100644
index 00000000000..95ac5a19b0b
--- /dev/null
+++ b/tests/ui/cfg/diagnostics-reexport-2.stderr
@@ -0,0 +1,88 @@
+error[E0433]: failed to resolve: could not find `gated` in `reexport`
+  --> $DIR/diagnostics-reexport-2.rs:42:15
+   |
+LL |     reexport::gated::foo();
+   |               ^^^^^ could not find `gated` in `reexport`
+   |
+note: found an item that was configured out
+  --> $DIR/diagnostics-reexport-2.rs:10:13
+   |
+LL |     pub mod gated {
+   |             ^^^^^
+note: the item is gated here
+  --> $DIR/diagnostics-reexport-2.rs:4:5
+   |
+LL |     #[cfg(false)]
+   |     ^^^^^^^^^^^^^
+
+error[E0433]: failed to resolve: could not find `gated` in `reexport2`
+  --> $DIR/diagnostics-reexport-2.rs:46:16
+   |
+LL |     reexport2::gated::foo();
+   |                ^^^^^ could not find `gated` in `reexport2`
+   |
+note: found an item that was configured out
+  --> $DIR/diagnostics-reexport-2.rs:10:13
+   |
+LL |     pub mod gated {
+   |             ^^^^^
+note: the item is gated here
+  --> $DIR/diagnostics-reexport-2.rs:4:5
+   |
+LL |     #[cfg(false)]
+   |     ^^^^^^^^^^^^^
+
+error[E0433]: failed to resolve: could not find `gated` in `reexport30`
+  --> $DIR/diagnostics-reexport-2.rs:50:17
+   |
+LL |     reexport30::gated::foo();
+   |                 ^^^^^ could not find `gated` in `reexport30`
+   |
+note: found an item that was configured out
+  --> $DIR/diagnostics-reexport-2.rs:10:13
+   |
+LL |     pub mod gated {
+   |             ^^^^^
+note: the item is gated here
+  --> $DIR/diagnostics-reexport-2.rs:4:5
+   |
+LL |     #[cfg(false)]
+   |     ^^^^^^^^^^^^^
+
+error[E0433]: failed to resolve: could not find `gated` in `reexport31`
+  --> $DIR/diagnostics-reexport-2.rs:54:17
+   |
+LL |     reexport31::gated::foo();
+   |                 ^^^^^ could not find `gated` in `reexport31`
+   |
+note: found an item that was configured out
+  --> $DIR/diagnostics-reexport-2.rs:10:13
+   |
+LL |     pub mod gated {
+   |             ^^^^^
+note: the item is gated here
+  --> $DIR/diagnostics-reexport-2.rs:4:5
+   |
+LL |     #[cfg(false)]
+   |     ^^^^^^^^^^^^^
+
+error[E0433]: failed to resolve: could not find `gated` in `reexport32`
+  --> $DIR/diagnostics-reexport-2.rs:58:17
+   |
+LL |     reexport32::gated::foo();
+   |                 ^^^^^ could not find `gated` in `reexport32`
+   |
+note: found an item that was configured out
+  --> $DIR/diagnostics-reexport-2.rs:10:13
+   |
+LL |     pub mod gated {
+   |             ^^^^^
+note: the item is gated here
+  --> $DIR/diagnostics-reexport-2.rs:4:5
+   |
+LL |     #[cfg(false)]
+   |     ^^^^^^^^^^^^^
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/check-cfg/target_feature.stderr b/tests/ui/check-cfg/target_feature.stderr
index eb66633f9dd..ec81ba2e3d8 100644
--- a/tests/ui/check-cfg/target_feature.stderr
+++ b/tests/ui/check-cfg/target_feature.stderr
@@ -62,6 +62,7 @@ LL |     cfg!(target_feature = "_UNEXPECTED_VALUE");
 `c`
 `cache`
 `cmpxchg16b`
+`concurrent-functions`
 `crc`
 `crt-static`
 `cssc`
@@ -159,6 +160,15 @@ LL |     cfg!(target_feature = "_UNEXPECTED_VALUE");
 `lzcnt`
 `m`
 `mclass`
+`message-security-assist-extension12`
+`message-security-assist-extension3`
+`message-security-assist-extension4`
+`message-security-assist-extension5`
+`message-security-assist-extension8`
+`message-security-assist-extension9`
+`miscellaneous-extensions-2`
+`miscellaneous-extensions-3`
+`miscellaneous-extensions-4`
 `mops`
 `movbe`
 `movrs`
@@ -287,9 +297,11 @@ LL |     cfg!(target_feature = "_UNEXPECTED_VALUE");
 `vector`
 `vector-enhancements-1`
 `vector-enhancements-2`
+`vector-enhancements-3`
 `vector-packed-decimal`
 `vector-packed-decimal-enhancement`
 `vector-packed-decimal-enhancement-2`
+`vector-packed-decimal-enhancement-3`
 `vfp2`
 `vfp3`
 `vfp4`
diff --git a/tests/ui/check-cfg/wrong-version-syntax.fixed b/tests/ui/check-cfg/wrong-version-syntax.fixed
new file mode 100644
index 00000000000..efbe2ed1bd8
--- /dev/null
+++ b/tests/ui/check-cfg/wrong-version-syntax.fixed
@@ -0,0 +1,14 @@
+// Check warning for wrong `cfg(version("1.27"))` syntax
+//
+//@ check-pass
+//@ no-auto-check-cfg
+//@ compile-flags: --check-cfg=cfg()
+//@ run-rustfix
+
+#![feature(cfg_version)]
+
+#[cfg(not(version("1.48.0")))]
+//~^ WARNING unexpected `cfg` condition name: `version`
+pub fn g() {}
+
+pub fn main() {}
diff --git a/tests/ui/check-cfg/wrong-version-syntax.rs b/tests/ui/check-cfg/wrong-version-syntax.rs
new file mode 100644
index 00000000000..221ecf4cae8
--- /dev/null
+++ b/tests/ui/check-cfg/wrong-version-syntax.rs
@@ -0,0 +1,14 @@
+// Check warning for wrong `cfg(version("1.27"))` syntax
+//
+//@ check-pass
+//@ no-auto-check-cfg
+//@ compile-flags: --check-cfg=cfg()
+//@ run-rustfix
+
+#![feature(cfg_version)]
+
+#[cfg(not(version = "1.48.0"))]
+//~^ WARNING unexpected `cfg` condition name: `version`
+pub fn g() {}
+
+pub fn main() {}
diff --git a/tests/ui/check-cfg/wrong-version-syntax.stderr b/tests/ui/check-cfg/wrong-version-syntax.stderr
new file mode 100644
index 00000000000..97157a0c02b
--- /dev/null
+++ b/tests/ui/check-cfg/wrong-version-syntax.stderr
@@ -0,0 +1,17 @@
+warning: unexpected `cfg` condition name: `version`
+  --> $DIR/wrong-version-syntax.rs:10:11
+   |
+LL | #[cfg(not(version = "1.48.0"))]
+   |           ^^^^^^^^^^^^^^^^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(version, values("1.48.0"))`
+   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
+   = note: `#[warn(unexpected_cfgs)]` on by default
+help: there is a similar config predicate: `version("..")`
+   |
+LL - #[cfg(not(version = "1.48.0"))]
+LL + #[cfg(not(version("1.48.0")))]
+   |
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs b/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs
index 7a4d7d9a81e..afb16cf58e8 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs
@@ -14,14 +14,14 @@ fn main() {
     map.insert("c", ());
 
     {
-        let mut it = map.extract_if(|_, _| true);
+        let mut it = map.extract_if(.., |_, _| true);
         catch_unwind(AssertUnwindSafe(|| while it.next().is_some() {})).unwrap_err();
         let result = catch_unwind(AssertUnwindSafe(|| it.next()));
         assert!(matches!(result, Ok(None)));
     }
 
     {
-        let mut it = map.extract_if(|_, _| true);
+        let mut it = map.extract_if(.., |_, _| true);
         catch_unwind(AssertUnwindSafe(|| while let Some(_) = it.next() {})).unwrap_err();
         let result = catch_unwind(AssertUnwindSafe(|| it.next()));
         assert!(matches!(result, Ok(None)));
diff --git a/tests/ui/coercion/issue-73886.stderr b/tests/ui/coercion/issue-73886.stderr
index 0d4c90017cf..a287aa29e11 100644
--- a/tests/ui/coercion/issue-73886.stderr
+++ b/tests/ui/coercion/issue-73886.stderr
@@ -3,6 +3,8 @@ error[E0605]: non-primitive cast: `&&[i32; 1]` as `&[_]`
    |
 LL |     let _ = &&[0] as &[_];
    |             ^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
+   |
+   = note: casting reference expression `&&[0]` because `&` binds tighter than `as`
 
 error[E0605]: non-primitive cast: `u32` as `Option<_>`
   --> $DIR/issue-73886.rs:4:13
diff --git a/tests/ui/coercion/retslot-cast.rs b/tests/ui/coercion/retslot-cast.rs
index ae500cb15df..a87ac35a8e1 100644
--- a/tests/ui/coercion/retslot-cast.rs
+++ b/tests/ui/coercion/retslot-cast.rs
@@ -1,7 +1,7 @@
 #![allow(warnings)]
 
-pub fn fail(x: Option<&(Iterator<Item=()>+Send)>)
-            -> Option<&Iterator<Item=()>> {
+pub fn fail(x: Option<&(dyn Iterator<Item=()>+Send)>)
+            -> Option<&dyn Iterator<Item=()>> {
     // This call used to trigger an LLVM assertion because the return
     // slot had type "Option<&Iterator>"* instead of
     // "Option<&(Iterator+Send)>"* -- but this now yields a
@@ -13,8 +13,8 @@ pub fn fail(x: Option<&(Iterator<Item=()>+Send)>)
     inner(x) //~ ERROR mismatched types
 }
 
-pub fn inner(x: Option<&(Iterator<Item=()>+Send)>)
-             -> Option<&(Iterator<Item=()>+Send)> {
+pub fn inner(x: Option<&(dyn Iterator<Item=()>+Send)>)
+             -> Option<&(dyn Iterator<Item=()>+Send)> {
     x
 }
 
diff --git a/tests/ui/coercion/retslot-cast.stderr b/tests/ui/coercion/retslot-cast.stderr
index dac21a7f25b..a5242c13edd 100644
--- a/tests/ui/coercion/retslot-cast.stderr
+++ b/tests/ui/coercion/retslot-cast.stderr
@@ -1,8 +1,8 @@
 error[E0308]: mismatched types
   --> $DIR/retslot-cast.rs:13:5
    |
-LL |             -> Option<&Iterator<Item=()>> {
-   |                -------------------------- expected `Option<&dyn Iterator<Item = ()>>` because of return type
+LL |             -> Option<&dyn Iterator<Item=()>> {
+   |                ------------------------------ expected `Option<&dyn Iterator<Item = ()>>` because of return type
 ...
 LL |     inner(x)
    |     ^^^^^^^^ expected trait `Iterator<Item = ()>`, found trait `Iterator<Item = ()> + Send`
diff --git a/tests/ui/coherence/coherence_inherent.rs b/tests/ui/coherence/coherence_inherent.rs
index f3ebf000386..b2007e3437d 100644
--- a/tests/ui/coherence/coherence_inherent.rs
+++ b/tests/ui/coherence/coherence_inherent.rs
@@ -15,8 +15,8 @@ mod Lib {
 
 mod Import {
     // Trait is in scope here:
-    use Lib::TheStruct;
-    use Lib::TheTrait;
+    use crate::Lib::TheStruct;
+    use crate::Lib::TheTrait;
 
     fn call_the_fn(s: &TheStruct) {
         s.the_fn();
@@ -25,7 +25,7 @@ mod Import {
 
 mod NoImport {
     // Trait is not in scope here:
-    use Lib::TheStruct;
+    use crate::Lib::TheStruct;
 
     fn call_the_fn(s: &TheStruct) {
         s.the_fn();
diff --git a/tests/ui/coherence/const-errs-dont-conflict-103369.stderr b/tests/ui/coherence/const-errs-dont-conflict-103369.stderr
index b2104299f65..e577a36cc10 100644
--- a/tests/ui/coherence/const-errs-dont-conflict-103369.stderr
+++ b/tests/ui/coherence/const-errs-dont-conflict-103369.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: Some error occurred
   --> $DIR/const-errs-dont-conflict-103369.rs:5:25
    |
 LL | impl ConstGenericTrait<{my_fn(1)}> for () {}
-   |                         ^^^^^^^^ evaluation panicked: Some error occurred
+   |                         ^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `my_fn`
   --> $DIR/const-errs-dont-conflict-103369.rs:10:5
@@ -10,11 +10,11 @@ note: inside `my_fn`
 LL |     panic!("Some error occurred");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the failure occurred here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: Some error occurred
   --> $DIR/const-errs-dont-conflict-103369.rs:7:25
    |
 LL | impl ConstGenericTrait<{my_fn(2)}> for () {}
-   |                         ^^^^^^^^ evaluation panicked: Some error occurred
+   |                         ^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `my_fn`
   --> $DIR/const-errs-dont-conflict-103369.rs:10:5
diff --git a/tests/ui/const-generics/associated_const_equality/equality_bound_with_infer.rs b/tests/ui/const-generics/associated_const_equality/equality_bound_with_infer.rs
new file mode 100644
index 00000000000..f45b7c3268b
--- /dev/null
+++ b/tests/ui/const-generics/associated_const_equality/equality_bound_with_infer.rs
@@ -0,0 +1,24 @@
+#![feature(generic_arg_infer, associated_const_equality, generic_const_items)]
+#![expect(incomplete_features)]
+
+// Regression test for #133066 where we would try to evaluate `<() as Foo>::ASSOC<_>` even
+// though it contained inference variables, which would cause ICEs.
+
+trait Foo {
+    const ASSOC<const N: u32>: u32;
+}
+
+impl Foo for () {
+    const ASSOC<const N: u32>: u32 = N;
+}
+
+fn bar<const N: u32, T: Foo<ASSOC<N> = 10>>() {}
+
+fn main() {
+    bar::<_, ()>();
+    //~^ ERROR: type mismatch resolving `<() as Foo>::ASSOC<_> == 10`
+
+    // FIXME(mgca):
+    // FIXME(associated_const_equality):
+    // This ought to start compiling once const items are aliases rather than bodies
+}
diff --git a/tests/ui/const-generics/associated_const_equality/equality_bound_with_infer.stderr b/tests/ui/const-generics/associated_const_equality/equality_bound_with_infer.stderr
new file mode 100644
index 00000000000..00741c901e4
--- /dev/null
+++ b/tests/ui/const-generics/associated_const_equality/equality_bound_with_infer.stderr
@@ -0,0 +1,17 @@
+error[E0271]: type mismatch resolving `<() as Foo>::ASSOC<_> == 10`
+  --> $DIR/equality_bound_with_infer.rs:18:14
+   |
+LL |     bar::<_, ()>();
+   |              ^^ expected `10`, found `<() as Foo>::ASSOC::<_>`
+   |
+   = note: expected constant `10`
+              found constant `<() as Foo>::ASSOC::<_>`
+note: required by a bound in `bar`
+  --> $DIR/equality_bound_with_infer.rs:15:29
+   |
+LL | fn bar<const N: u32, T: Foo<ASSOC<N> = 10>>() {}
+   |                             ^^^^^^^^^^^^^ required by this bound in `bar`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/const-generics/associated_const_equality/unconstrained_impl_param.rs b/tests/ui/const-generics/associated_const_equality/unconstrained_impl_param.rs
new file mode 100644
index 00000000000..99318ef7598
--- /dev/null
+++ b/tests/ui/const-generics/associated_const_equality/unconstrained_impl_param.rs
@@ -0,0 +1,26 @@
+// regression test for #137813 where we would assume all constants in the type system
+// cannot contain inference variables, even though associated const equality syntax
+// was still lowered without the feature gate enabled.
+
+trait AssocConst {
+    const A: u8;
+}
+
+impl<T> AssocConst for (T,) {
+    const A: u8 = 0;
+}
+
+trait Trait {}
+
+impl<U> Trait for () where (U,): AssocConst<A = { 0 }> {}
+//~^ ERROR associated const equality is incomplete
+//~| ERROR the type parameter `U` is not constrained by the impl trait
+
+fn foo()
+where
+    (): Trait,
+    //~^ ERROR type mismatch resolving
+{
+}
+
+fn main() {}
diff --git a/tests/ui/const-generics/associated_const_equality/unconstrained_impl_param.stderr b/tests/ui/const-generics/associated_const_equality/unconstrained_impl_param.stderr
new file mode 100644
index 00000000000..e6799ec5c3a
--- /dev/null
+++ b/tests/ui/const-generics/associated_const_equality/unconstrained_impl_param.stderr
@@ -0,0 +1,39 @@
+error[E0658]: associated const equality is incomplete
+  --> $DIR/unconstrained_impl_param.rs:15:45
+   |
+LL | impl<U> Trait for () where (U,): AssocConst<A = { 0 }> {}
+   |                                             ^^^^^^^^^
+   |
+   = note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
+   = help: add `#![feature(associated_const_equality)]` 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[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/unconstrained_impl_param.rs:15:6
+   |
+LL | impl<U> Trait for () where (U,): AssocConst<A = { 0 }> {}
+   |      ^ unconstrained type parameter
+
+error[E0271]: type mismatch resolving `<(_,) as AssocConst>::A == 0`
+  --> $DIR/unconstrained_impl_param.rs:21:5
+   |
+LL |     (): Trait,
+   |     ^^^^^^^^^ expected `0`, found `<(_,) as AssocConst>::A`
+   |
+   = note: expected constant `0`
+              found constant `<(_,) as AssocConst>::A`
+note: required for `()` to implement `Trait`
+  --> $DIR/unconstrained_impl_param.rs:15:9
+   |
+LL | impl<U> Trait for () where (U,): AssocConst<A = { 0 }> {}
+   |         ^^^^^     ^^                        --------- unsatisfied trait bound introduced here
+   = help: see issue #48214
+help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
+   |
+LL + #![feature(trivial_bounds)]
+   |
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0207, E0271, E0658.
+For more information about an error, try `rustc --explain E0207`.
diff --git a/tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr b/tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr
index 35aae462443..3299c27a0e7 100644
--- a/tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr
+++ b/tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `u8::MAX + 1_u8`, which would overflow
   --> $DIR/default-param-wf-concrete.rs:4:28
    |
 LL | struct Foo<const N: u8 = { 255 + 1 }>;
-   |                            ^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
+   |                            ^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr b/tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr
index 35aae462443..3299c27a0e7 100644
--- a/tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr
+++ b/tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `u8::MAX + 1_u8`, which would overflow
   --> $DIR/default-param-wf-concrete.rs:4:28
    |
 LL | struct Foo<const N: u8 = { 255 + 1 }>;
-   |                            ^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
+   |                            ^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/const-generics/defaults/default-param-wf-concrete.rs b/tests/ui/const-generics/defaults/default-param-wf-concrete.rs
index f181f582332..0385e55e3b2 100644
--- a/tests/ui/const-generics/defaults/default-param-wf-concrete.rs
+++ b/tests/ui/const-generics/defaults/default-param-wf-concrete.rs
@@ -2,5 +2,5 @@
 //@[next] compile-flags: -Znext-solver
 
 struct Foo<const N: u8 = { 255 + 1 }>;
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflow
 fn main() {}
diff --git a/tests/ui/const-generics/defaults/wfness.rs b/tests/ui/const-generics/defaults/wfness.rs
index a93f670815a..99e9452b46a 100644
--- a/tests/ui/const-generics/defaults/wfness.rs
+++ b/tests/ui/const-generics/defaults/wfness.rs
@@ -1,5 +1,5 @@
 struct Ooopsies<const N: u8 = { u8::MAX + 1 }>;
-//~^ error: evaluation of constant value failed
+//~^ error: overflow
 
 trait Trait<const N: u8> {}
 impl Trait<3> for () {}
diff --git a/tests/ui/const-generics/defaults/wfness.stderr b/tests/ui/const-generics/defaults/wfness.stderr
index 290a80bd32f..ef5167cfc00 100644
--- a/tests/ui/const-generics/defaults/wfness.stderr
+++ b/tests/ui/const-generics/defaults/wfness.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `u8::MAX + 1_u8`, which would overflow
   --> $DIR/wfness.rs:1:33
    |
 LL | struct Ooopsies<const N: u8 = { u8::MAX + 1 }>;
-   |                                 ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
+   |                                 ^^^^^^^^^^^ evaluation of constant value failed here
 
 error[E0277]: the trait bound `(): Trait<2>` is not satisfied
   --> $DIR/wfness.rs:8:9
diff --git a/tests/ui/const-generics/generic_const_exprs/auxiliary/cross-crate-2.rs b/tests/ui/const-generics/generic_const_exprs/auxiliary/cross-crate-2.rs
new file mode 100644
index 00000000000..a8bda14f4bd
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/auxiliary/cross-crate-2.rs
@@ -0,0 +1,13 @@
+#![allow(incomplete_features)]
+#![feature(generic_const_exprs)]
+
+pub struct Foo<const N: usize>;
+
+impl<const N: usize> Foo<N>
+where
+    [u8; N.div_ceil(8)]: Sized,
+{
+    pub fn new() -> Self {
+        todo!()
+    }
+}
diff --git a/tests/ui/const-generics/generic_const_exprs/cross-crate-2.rs b/tests/ui/const-generics/generic_const_exprs/cross-crate-2.rs
new file mode 100644
index 00000000000..77998c7ec0a
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/cross-crate-2.rs
@@ -0,0 +1,10 @@
+//@ check-pass
+//@ aux-build: cross-crate-2.rs
+
+extern crate cross_crate_2;
+
+use cross_crate_2::Foo;
+
+fn main() {
+    Foo::<7>::new();
+}
diff --git a/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr b/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr
index f454ff4e6c0..6b095f3818a 100644
--- a/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr
@@ -1,5 +1,5 @@
 error: generic parameters may not be used in const operations
-  --> $DIR/dependence_lint.rs:14:32
+  --> $DIR/dependence_lint.rs:15:32
    |
 LL |     let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce
    |                                ^ cannot perform const operation using `T`
@@ -8,7 +8,7 @@ LL |     let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce
    = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error: generic parameters may not be used in const operations
-  --> $DIR/dependence_lint.rs:21:37
+  --> $DIR/dependence_lint.rs:22:37
    |
 LL |     let _: [u8; if true { size_of::<T>() } else { 3 }]; // error on stable, error with gce
    |                                     ^ cannot perform const operation using `T`
@@ -27,7 +27,7 @@ LL |     [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_
    = note: `#[warn(const_evaluatable_unchecked)]` on by default
 
 warning: cannot use constants which depend on generic parameters in types
-  --> $DIR/dependence_lint.rs:17:9
+  --> $DIR/dependence_lint.rs:18:9
    |
 LL |     [0; if false { size_of::<T>() } else { 3 }]; // lint on stable, error with gce
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/const-generics/generic_const_exprs/dependence_lint.gce.stderr b/tests/ui/const-generics/generic_const_exprs/dependence_lint.gce.stderr
index f6119c17bf4..12ac980c975 100644
--- a/tests/ui/const-generics/generic_const_exprs/dependence_lint.gce.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/dependence_lint.gce.stderr
@@ -9,8 +9,19 @@ help: try adding a `where` bound
 LL | fn foo<T>() where [(); size_of::<*mut T>()]: {
    |             ++++++++++++++++++++++++++++++++
 
+error: unconstrained generic constant
+  --> $DIR/dependence_lint.rs:10:5
+   |
+LL |     [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_exprs`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: try adding a `where` bound
+   |
+LL | fn foo<T>() where [(); size_of::<*mut T>()]: {
+   |             ++++++++++++++++++++++++++++++++
+
 error: overly complex generic constant
-  --> $DIR/dependence_lint.rs:17:9
+  --> $DIR/dependence_lint.rs:18:9
    |
 LL |     [0; if false { size_of::<T>() } else { 3 }]; // lint on stable, error with gce
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants
@@ -18,7 +29,7 @@ LL |     [0; if false { size_of::<T>() } else { 3 }]; // lint on stable, error w
    = help: consider moving this anonymous constant into a `const` function
 
 error: unconstrained generic constant
-  --> $DIR/dependence_lint.rs:14:12
+  --> $DIR/dependence_lint.rs:15:12
    |
 LL |     let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -29,12 +40,12 @@ LL | fn foo<T>() where [(); size_of::<*mut T>()]: {
    |             ++++++++++++++++++++++++++++++++
 
 error: overly complex generic constant
-  --> $DIR/dependence_lint.rs:21:17
+  --> $DIR/dependence_lint.rs:22:17
    |
 LL |     let _: [u8; if true { size_of::<T>() } else { 3 }]; // error on stable, error with gce
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants
    |
    = help: consider moving this anonymous constant into a `const` function
 
-error: aborting due to 4 previous errors
+error: aborting due to 5 previous errors
 
diff --git a/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs b/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs
index 107466cd1d9..6b3c8f84be3 100644
--- a/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs
+++ b/tests/ui/const-generics/generic_const_exprs/dependence_lint.rs
@@ -9,7 +9,8 @@ use std::mem::size_of;
 fn foo<T>() {
     [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_exprs`
     //[gce]~^ ERROR unconstrained
-    //[full]~^^ WARNING cannot use constants
+    //[gce]~| ERROR unconstrained generic constant
+    //[full]~^^^ WARNING cannot use constants
     //[full]~| WARNING this was previously accepted
     let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce
     //[full]~^ ERROR generic parameters may not be used
diff --git a/tests/ui/const-generics/generic_const_exprs/different-fn.stderr b/tests/ui/const-generics/generic_const_exprs/different-fn.stderr
index ac80463480d..52917df0da1 100644
--- a/tests/ui/const-generics/generic_const_exprs/different-fn.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/different-fn.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/different-fn.rs:10:5
    |
 LL |     [0; size_of::<Foo<T>>()]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ expected `size_of::<T>()`, found `0`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ expected `size_of::<T>()`, found `size_of::<Foo<T>>()`
    |
    = note: expected constant `size_of::<T>()`
-              found constant `0`
+              found constant `size_of::<Foo<T>>()`
 
 error: unconstrained generic constant
   --> $DIR/different-fn.rs:10:9
diff --git a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.rs b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.rs
index 9ab715d01f7..da9a75b50ef 100644
--- a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.rs
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.rs
@@ -15,7 +15,7 @@ impl Foo for () {
 }
 
 fn use_dyn(v: &dyn Foo) { //~ERROR the trait `Foo` is not dyn compatible
-    v.test(); //~ERROR the trait `Foo` is not dyn compatible
+    v.test();
 }
 
 fn main() {}
diff --git a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr
index 8bc6ef093d0..120ee435e25 100644
--- a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr
@@ -17,25 +17,6 @@ LL |     fn test(&self) -> [u8; bar::<Self>()];
    = help: consider moving `test` to another trait
    = help: only type `()` implements `Foo`; consider using it directly instead.
 
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/dyn-compatibility-err-ret.rs:18:5
-   |
-LL |     v.test();
-   |     ^^^^^^^^ `Foo` 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-compatibility-err-ret.rs:8:8
-   |
-LL | trait Foo {
-   |       --- this trait is not dyn compatible...
-LL |     fn test(&self) -> [u8; bar::<Self>()];
-   |        ^^^^           ^^^^^^^^^^^^^^^^^^^ ...because method `test` references the `Self` type in its return type
-   |        |
-   |        ...because method `test` references the `Self` type in its `where` clause
-   = help: consider moving `test` to another trait
-   = help: only type `()` implements `Foo`; consider using it directly instead.
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.rs b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.rs
index a7b771cd4f8..8b735188f32 100644
--- a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.rs
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.rs
@@ -15,7 +15,6 @@ impl Foo for () {
 fn use_dyn(v: &dyn Foo) {
     //~^ ERROR the trait `Foo` is not dyn compatible
     v.test();
-    //~^ ERROR the trait `Foo` is not dyn compatible
 }
 
 fn main() {}
diff --git a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr
index f5eaaa37916..c2ad4d14988 100644
--- a/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr
@@ -15,23 +15,6 @@ LL |     fn test(&self) where [u8; bar::<Self>()]: Sized;
    = help: consider moving `test` to another trait
    = help: only type `()` implements `Foo`; consider using it directly instead.
 
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/dyn-compatibility-err-where-bounds.rs:17:5
-   |
-LL |     v.test();
-   |     ^^^^^^^^ `Foo` 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-compatibility-err-where-bounds.rs:8:8
-   |
-LL | trait Foo {
-   |       --- this trait is not dyn compatible...
-LL |     fn test(&self) where [u8; bar::<Self>()]: Sized;
-   |        ^^^^ ...because method `test` references the `Self` type in its `where` clause
-   = help: consider moving `test` to another trait
-   = help: only type `()` implements `Foo`; consider using it directly instead.
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/const-generics/generic_const_exprs/from-sig-fail.rs b/tests/ui/const-generics/generic_const_exprs/from-sig-fail.rs
index b8f9827ec91..16753749702 100644
--- a/tests/ui/const-generics/generic_const_exprs/from-sig-fail.rs
+++ b/tests/ui/const-generics/generic_const_exprs/from-sig-fail.rs
@@ -2,7 +2,7 @@
 #![allow(incomplete_features)]
 
 fn test<const N: usize>() -> [u8; N - 1] {
-    //~^ ERROR evaluation of `test::<0>::{constant#0}` failed
+    //~^ ERROR overflow
     todo!()
 }
 
diff --git a/tests/ui/const-generics/generic_const_exprs/from-sig-fail.stderr b/tests/ui/const-generics/generic_const_exprs/from-sig-fail.stderr
index 080e920258d..72f2dac8fa2 100644
--- a/tests/ui/const-generics/generic_const_exprs/from-sig-fail.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/from-sig-fail.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `test::<0>::{constant#0}` failed
+error[E0080]: attempt to compute `0_usize - 1_usize`, which would overflow
   --> $DIR/from-sig-fail.rs:4:35
    |
 LL | fn test<const N: usize>() -> [u8; N - 1] {
-   |                                   ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
+   |                                   ^^^^^ evaluation of `test::<0>::{constant#0}` failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/const-generics/generic_const_exprs/serializing_error_guaranteed.rs b/tests/ui/const-generics/generic_const_exprs/serializing_error_guaranteed.rs
new file mode 100644
index 00000000000..83b73350f83
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/serializing_error_guaranteed.rs
@@ -0,0 +1,16 @@
+//@ check-pass
+
+// regression test for #136894.
+// I (BoxyUwU) don't know what the underlying cause was here
+
+#![feature(generic_const_exprs)]
+#![crate_type = "lib"]
+#![allow(incomplete_features, dead_code)]
+
+struct X<T>([(); f::<T>()])
+where
+    [(); f::<T>()]:;
+
+const fn f<T>() -> usize {
+    panic!()
+}
diff --git a/tests/ui/const-generics/generic_const_exprs/simple_fail.rs b/tests/ui/const-generics/generic_const_exprs/simple_fail.rs
index cae54df4c12..e89b5707fe2 100644
--- a/tests/ui/const-generics/generic_const_exprs/simple_fail.rs
+++ b/tests/ui/const-generics/generic_const_exprs/simple_fail.rs
@@ -2,12 +2,12 @@
 #![allow(incomplete_features)]
 
 type Arr<const N: usize> = [u8; N - 1];
-//~^ ERROR evaluation of `Arr::<0>::{constant#0}` failed
+//~^ ERROR overflow
 
 fn test<const N: usize>() -> Arr<N>
 where
     [u8; N - 1]: Sized,
-    //~^ ERROR evaluation of `test::<0>::{constant#0}` failed
+    //~^ ERROR overflow
 {
     todo!()
 }
diff --git a/tests/ui/const-generics/generic_const_exprs/simple_fail.stderr b/tests/ui/const-generics/generic_const_exprs/simple_fail.stderr
index a25fa56b7d4..94a91159e95 100644
--- a/tests/ui/const-generics/generic_const_exprs/simple_fail.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/simple_fail.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of `test::<0>::{constant#0}` failed
+error[E0080]: attempt to compute `0_usize - 1_usize`, which would overflow
   --> $DIR/simple_fail.rs:9:10
    |
 LL |     [u8; N - 1]: Sized,
-   |          ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
+   |          ^^^^^ evaluation of `test::<0>::{constant#0}` failed here
 
-error[E0080]: evaluation of `Arr::<0>::{constant#0}` failed
+error[E0080]: attempt to compute `0_usize - 1_usize`, which would overflow
   --> $DIR/simple_fail.rs:4:33
    |
 LL | type Arr<const N: usize> = [u8; N - 1];
-   |                                 ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
+   |                                 ^^^^^ evaluation of `Arr::<0>::{constant#0}` failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/const-generics/issues/issue-100313.rs b/tests/ui/const-generics/issues/issue-100313.rs
index 7d43d7bee34..1f61356162c 100644
--- a/tests/ui/const-generics/issues/issue-100313.rs
+++ b/tests/ui/const-generics/issues/issue-100313.rs
@@ -15,7 +15,7 @@ impl<const B: &'static bool> T<B> {
 
 const _: () = {
     let x = T::<{ &true }>;
-    x.set_false(); //~ ERROR evaluation of constant value failed [E0080]
+    x.set_false(); //~ ERROR writing to ALLOC0 which is read-only
 };
 
 fn main() {}
diff --git a/tests/ui/const-generics/issues/issue-100313.stderr b/tests/ui/const-generics/issues/issue-100313.stderr
index 98c3ec5379b..2ae4c30e15f 100644
--- a/tests/ui/const-generics/issues/issue-100313.stderr
+++ b/tests/ui/const-generics/issues/issue-100313.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: writing to ALLOC0 which is read-only
   --> $DIR/issue-100313.rs:18:5
    |
 LL |     x.set_false();
-   |     ^^^^^^^^^^^^^ writing to ALLOC0 which is read-only
+   |     ^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `T::<&true>::set_false`
   --> $DIR/issue-100313.rs:11:13
diff --git a/tests/ui/const-generics/issues/issue-71202.rs b/tests/ui/const-generics/issues/issue-71202.rs
index 0f955414d84..8ff49b55e6f 100644
--- a/tests/ui/const-generics/issues/issue-71202.rs
+++ b/tests/ui/const-generics/issues/issue-71202.rs
@@ -25,7 +25,9 @@ impl<T: Copy> DataHolder<T> {
         }
 
         <IsCopy<T>>::VALUE
-    } as usize] = []; //~ ERROR unconstrained generic constant
+    } as usize] = [];
+    //~^ ERROR unconstrained generic constant
+    //~^^ ERROR mismatched types
 }
 
 fn main() {}
diff --git a/tests/ui/const-generics/issues/issue-71202.stderr b/tests/ui/const-generics/issues/issue-71202.stderr
index cc3603d1145..b7c3db494a5 100644
--- a/tests/ui/const-generics/issues/issue-71202.stderr
+++ b/tests/ui/const-generics/issues/issue-71202.stderr
@@ -59,5 +59,49 @@ LL +         <IsCopy<T>>::VALUE
 LL ~     } as usize]: = [];
    |
 
-error: aborting due to 2 previous errors
+error[E0308]: mismatched types
+  --> $DIR/issue-71202.rs:28:19
+   |
+LL |     } as usize] = [];
+   |                   ^^ expected `1 - {
+        trait NotCopy {
+            const VALUE: bool = false;
+        }
+
+        impl<__Type: ?Sized> NotCopy for __Type {}
+
+        struct IsCopy<__Type: ?Sized>(PhantomData<__Type>);
+
+        impl<__Type> IsCopy<__Type>
+        where
+            __Type: Sized + Copy,
+        {
+            const VALUE: bool = true;
+        }
+
+        <IsCopy<T>>::VALUE
+    } as usize`, found `0`
+   |
+   = note: expected constant `1 - {
+                   trait NotCopy {
+                       const VALUE: bool = false;
+                   }
+           
+                   impl<__Type: ?Sized> NotCopy for __Type {}
+           
+                   struct IsCopy<__Type: ?Sized>(PhantomData<__Type>);
+           
+                   impl<__Type> IsCopy<__Type>
+                   where
+                       __Type: Sized + Copy,
+                   {
+                       const VALUE: bool = true;
+                   }
+           
+                   <IsCopy<T>>::VALUE
+               } as usize`
+              found constant `0`
+
+error: aborting due to 3 previous errors
 
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/issues/issue-83765.rs b/tests/ui/const-generics/issues/issue-83765.rs
index 0959f771c22..f31c61408e9 100644
--- a/tests/ui/const-generics/issues/issue-83765.rs
+++ b/tests/ui/const-generics/issues/issue-83765.rs
@@ -3,10 +3,6 @@
 
 trait TensorDimension {
     const DIM: usize;
-    //~^ ERROR cycle detected when resolving instance
-    //~| ERROR cycle detected when resolving instance
-    // FIXME Given the current state of the compiler its expected that we cycle here,
-    // but the cycle is still wrong.
     const ISSCALAR: bool = Self::DIM == 0;
     fn is_scalar(&self) -> bool {
         Self::ISSCALAR
@@ -49,6 +45,7 @@ impl<'a, T: Broadcastable, const DIM: usize> TensorDimension for LazyUpdim<'a, T
 
 impl<'a, T: Broadcastable, const DIM: usize> TensorSize for LazyUpdim<'a, T, { T::DIM }, DIM> {
     fn size(&self) -> [usize; DIM] {
+        //~^ ERROR: method not compatible with trait
         self.size
     }
 }
@@ -56,12 +53,17 @@ impl<'a, T: Broadcastable, const DIM: usize> TensorSize for LazyUpdim<'a, T, { T
 impl<'a, T: Broadcastable, const DIM: usize> Broadcastable for LazyUpdim<'a, T, { T::DIM }, DIM> {
     type Element = T::Element;
     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
+        //~^ ERROR: method not compatible with trait
         assert!(DIM >= T::DIM);
         if !self.inbounds(index) {
+            //~^ ERROR: unconstrained generic constant
+            //~| ERROR: mismatched types
             return None;
         }
         let size = self.size();
+        //~^ ERROR: unconstrained generic constant
         let newindex: [usize; T::DIM] = Default::default();
+        //~^ ERROR: the trait bound
         self.reference.bget(newindex)
     }
 }
@@ -82,6 +84,8 @@ impl<'a, R, T: Broadcastable, F: Fn(T::Element) -> R, const DIM: usize> TensorSi
     fn size(&self) -> [usize; DIM] {
         //~^ ERROR: method not compatible with trait
         self.reference.size()
+        //~^ ERROR: unconstrained generic constant
+        //~| ERROR: mismatched types
     }
 }
 
@@ -92,6 +96,8 @@ impl<'a, R, T: Broadcastable, F: Fn(T::Element) -> R, const DIM: usize> Broadcas
     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
         //~^ ERROR: method not compatible with trait
         self.reference.bget(index).map(&self.closure)
+        //~^ ERROR: unconstrained generic constant
+        //~| ERROR: mismatched types
     }
 }
 
@@ -100,12 +106,14 @@ impl<T> TensorDimension for Vec<T> {
 }
 impl<T> TensorSize for Vec<T> {
     fn size(&self) -> [usize; 1] {
+        //~^ ERROR: method not compatible with trait
         [self.len()]
     }
 }
 impl<T: Clone> Broadcastable for Vec<T> {
     type Element = T;
     fn bget(&self, index: [usize; 1]) -> Option<T> {
+        //~^ ERROR: method not compatible with trait
         self.get(index[0]).cloned()
     }
 }
diff --git a/tests/ui/const-generics/issues/issue-83765.stderr b/tests/ui/const-generics/issues/issue-83765.stderr
index 6b62012c14f..5a06ee7ddbc 100644
--- a/tests/ui/const-generics/issues/issue-83765.stderr
+++ b/tests/ui/const-generics/issues/issue-83765.stderr
@@ -1,43 +1,23 @@
-error[E0391]: cycle detected when resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`
-  --> $DIR/issue-83765.rs:5:5
-   |
-LL |     const DIM: usize;
-   |     ^^^^^^^^^^^^^^^^
-   |
-note: ...which requires computing candidate for `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>`...
-  --> $DIR/issue-83765.rs:4:1
-   |
-LL | trait TensorDimension {
-   | ^^^^^^^^^^^^^^^^^^^^^
-   = note: ...which again requires resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`, completing the cycle
-note: cycle used when checking assoc item `<impl at $DIR/issue-83765.rs:50:1: 50:94>::size` is compatible with trait definition
-  --> $DIR/issue-83765.rs:51:5
+error[E0308]: method not compatible with trait
+  --> $DIR/issue-83765.rs:47:5
    |
 LL |     fn size(&self) -> [usize; DIM] {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = 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 resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`
-  --> $DIR/issue-83765.rs:5:5
-   |
-LL |     const DIM: usize;
-   |     ^^^^^^^^^^^^^^^^
-   |
-note: ...which requires computing candidate for `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>`...
-  --> $DIR/issue-83765.rs:4:1
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
    |
-LL | trait TensorDimension {
-   | ^^^^^^^^^^^^^^^^^^^^^
-   = note: ...which again requires resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`, completing the cycle
-note: cycle used when checking assoc item `<impl at $DIR/issue-83765.rs:56:1: 56:97>::bget` is compatible with trait definition
-  --> $DIR/issue-83765.rs:58:5
+   = note: expected constant `Self::DIM`
+              found constant `DIM`
+
+error[E0308]: method not compatible with trait
+  --> $DIR/issue-83765.rs:55:5
    |
 LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = 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
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
+   |
+   = note: expected constant `Self::DIM`
+              found constant `DIM`
 
 error[E0308]: method not compatible with trait
-  --> $DIR/issue-83765.rs:82:5
+  --> $DIR/issue-83765.rs:84:5
    |
 LL |     fn size(&self) -> [usize; DIM] {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
@@ -46,7 +26,7 @@ LL |     fn size(&self) -> [usize; DIM] {
               found constant `DIM`
 
 error[E0308]: method not compatible with trait
-  --> $DIR/issue-83765.rs:92:5
+  --> $DIR/issue-83765.rs:96:5
    |
 LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
@@ -54,7 +34,127 @@ LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
    = note: expected constant `Self::DIM`
               found constant `DIM`
 
-error: aborting due to 4 previous errors
+error[E0308]: method not compatible with trait
+  --> $DIR/issue-83765.rs:108:5
+   |
+LL |     fn size(&self) -> [usize; 1] {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `1`
+   |
+   = note: expected constant `Self::DIM`
+              found constant `1`
+
+error[E0308]: method not compatible with trait
+  --> $DIR/issue-83765.rs:115:5
+   |
+LL |     fn bget(&self, index: [usize; 1]) -> Option<T> {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `1`
+   |
+   = note: expected constant `Self::DIM`
+              found constant `1`
+
+error: unconstrained generic constant
+  --> $DIR/issue-83765.rs:58:13
+   |
+LL |         if !self.inbounds(index) {
+   |             ^^^^
+   |
+note: required by a bound in `TensorSize::inbounds`
+  --> $DIR/issue-83765.rs:14:39
+   |
+LL |     fn inbounds(&self, index: [usize; Self::DIM]) -> bool {
+   |                                       ^^^^^^^^^ required by this bound in `TensorSize::inbounds`
+help: try adding a `where` bound
+   |
+LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> where [(); Self::DIM]: {
+   |                                                                  ++++++++++++++++++++++
+
+error[E0308]: mismatched types
+  --> $DIR/issue-83765.rs:58:27
+   |
+LL |         if !self.inbounds(index) {
+   |                           ^^^^^ expected `Self::DIM`, found `DIM`
+   |
+   = note: expected constant `Self::DIM`
+              found constant `DIM`
+
+error: unconstrained generic constant
+  --> $DIR/issue-83765.rs:63:25
+   |
+LL |         let size = self.size();
+   |                         ^^^^
+   |
+note: required by a bound in `TensorSize::size`
+  --> $DIR/issue-83765.rs:13:31
+   |
+LL |     fn size(&self) -> [usize; Self::DIM];
+   |                               ^^^^^^^^^ required by this bound in `TensorSize::size`
+help: try adding a `where` bound
+   |
+LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> where [(); Self::DIM]: {
+   |                                                                  ++++++++++++++++++++++
+
+error[E0277]: the trait bound `[usize; T::DIM]: Default` is not satisfied
+  --> $DIR/issue-83765.rs:65:41
+   |
+LL |         let newindex: [usize; T::DIM] = Default::default();
+   |                                         ^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `[usize; T::DIM]`
+   |
+help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
+   |
+LL | impl<'a, T: Broadcastable, const DIM: usize> Broadcastable for LazyUpdim<'a, T, { T::DIM }, DIM> where [usize; T::DIM]: Default {
+   |                                                                                                  ++++++++++++++++++++++++++++++
+
+error: unconstrained generic constant
+  --> $DIR/issue-83765.rs:86:24
+   |
+LL |         self.reference.size()
+   |                        ^^^^
+   |
+note: required by a bound in `TensorSize::size`
+  --> $DIR/issue-83765.rs:13:31
+   |
+LL |     fn size(&self) -> [usize; Self::DIM];
+   |                               ^^^^^^^^^ required by this bound in `TensorSize::size`
+help: try adding a `where` bound
+   |
+LL |     fn size(&self) -> [usize; DIM] where [(); Self::DIM]: {
+   |                                    ++++++++++++++++++++++
+
+error[E0308]: mismatched types
+  --> $DIR/issue-83765.rs:86:9
+   |
+LL |         self.reference.size()
+   |         ^^^^^^^^^^^^^^^^^^^^^ expected `DIM`, found `Self::DIM`
+   |
+   = note: expected constant `DIM`
+              found constant `Self::DIM`
+
+error: unconstrained generic constant
+  --> $DIR/issue-83765.rs:98:9
+   |
+LL |         self.reference.bget(index).map(&self.closure)
+   |         ^^^^^^^^^^^^^^
+   |
+note: required by a bound in `Broadcastable::bget`
+  --> $DIR/issue-83765.rs:21:35
+   |
+LL |     fn bget(&self, index: [usize; Self::DIM]) -> Option<Self::Element>;
+   |                                   ^^^^^^^^^ required by this bound in `Broadcastable::bget`
+help: try adding a `where` bound
+   |
+LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> where [(); Self::DIM]: {
+   |                                                                  ++++++++++++++++++++++
+
+error[E0308]: mismatched types
+  --> $DIR/issue-83765.rs:98:29
+   |
+LL |         self.reference.bget(index).map(&self.closure)
+   |                             ^^^^^ expected `Self::DIM`, found `DIM`
+   |
+   = note: expected constant `Self::DIM`
+              found constant `DIM`
+
+error: aborting due to 14 previous errors
 
-Some errors have detailed explanations: E0308, E0391.
-For more information about an error, try `rustc --explain E0308`.
+Some errors have detailed explanations: E0277, E0308.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/mgca/projection-error.rs b/tests/ui/const-generics/mgca/projection-error.rs
new file mode 100644
index 00000000000..d1c4fa8a492
--- /dev/null
+++ b/tests/ui/const-generics/mgca/projection-error.rs
@@ -0,0 +1,17 @@
+#![feature(min_generic_const_args)]
+#![expect(incomplete_features)]
+
+// Regression test for #140642. Test that normalizing const aliases
+// containing erroneous types normalizes to a const error instead of
+// a type error.
+
+
+pub trait Tr<A> {
+    const SIZE: usize;
+}
+
+fn mk_array(_x: T) -> [(); <T as Tr<bool>>::SIZE] {}
+//~^ ERROR: cannot find type `T` in this scope
+//~| ERROR: cannot find type `T` in this scope
+
+fn main() {}
diff --git a/tests/ui/const-generics/mgca/projection-error.stderr b/tests/ui/const-generics/mgca/projection-error.stderr
new file mode 100644
index 00000000000..e6888351da1
--- /dev/null
+++ b/tests/ui/const-generics/mgca/projection-error.stderr
@@ -0,0 +1,39 @@
+error[E0412]: cannot find type `T` in this scope
+  --> $DIR/projection-error.rs:13:17
+   |
+LL | pub trait Tr<A> {
+   | --------------- similarly named trait `Tr` defined here
+...
+LL | fn mk_array(_x: T) -> [(); <T as Tr<bool>>::SIZE] {}
+   |                 ^
+   |
+help: a trait with a similar name exists
+   |
+LL | fn mk_array(_x: Tr) -> [(); <T as Tr<bool>>::SIZE] {}
+   |                  +
+help: you might be missing a type parameter
+   |
+LL | fn mk_array<T>(_x: T) -> [(); <T as Tr<bool>>::SIZE] {}
+   |            +++
+
+error[E0412]: cannot find type `T` in this scope
+  --> $DIR/projection-error.rs:13:29
+   |
+LL | pub trait Tr<A> {
+   | --------------- similarly named trait `Tr` defined here
+...
+LL | fn mk_array(_x: T) -> [(); <T as Tr<bool>>::SIZE] {}
+   |                             ^
+   |
+help: a trait with a similar name exists
+   |
+LL | fn mk_array(_x: T) -> [(); <Tr as Tr<bool>>::SIZE] {}
+   |                              +
+help: you might be missing a type parameter
+   |
+LL | fn mk_array<T>(_x: T) -> [(); <T as Tr<bool>>::SIZE] {}
+   |            +++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/const-generics/min_const_generics/invalid-patterns.32bit.stderr b/tests/ui/const-generics/min_const_generics/invalid-patterns.32bit.stderr
index d1f3b08dd36..172fd37fa69 100644
--- a/tests/ui/const-generics/min_const_generics/invalid-patterns.32bit.stderr
+++ b/tests/ui/const-generics/min_const_generics/invalid-patterns.32bit.stderr
@@ -1,36 +1,36 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/invalid-patterns.rs:40:32
    |
 LL |   get_flag::<false, { unsafe { char_raw.character } }>();
-   |                                ^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                                ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/invalid-patterns.rs:43:14
+error[E0080]: constructing invalid value: encountered 0x42, but expected a boolean
+  --> $DIR/invalid-patterns.rs:42:14
    |
 LL |   get_flag::<{ unsafe { bool_raw.boolean } }, 'z'>();
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x42, but expected a boolean
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
                42                                              │ B
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/invalid-patterns.rs:45:14
+error[E0080]: constructing invalid value: encountered 0x42, but expected a boolean
+  --> $DIR/invalid-patterns.rs:44:14
    |
 LL |   get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x42, but expected a boolean
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
                42                                              │ B
            }
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/invalid-patterns.rs:45:58
+error[E0080]: using uninitialized data, but this operation requires initialized memory
+  --> $DIR/invalid-patterns.rs:44:58
    |
 LL |   get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
-   |                                                          ^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                                                          ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error[E0308]: mismatched types
   --> $DIR/invalid-patterns.rs:31:21
diff --git a/tests/ui/const-generics/min_const_generics/invalid-patterns.64bit.stderr b/tests/ui/const-generics/min_const_generics/invalid-patterns.64bit.stderr
index d1f3b08dd36..172fd37fa69 100644
--- a/tests/ui/const-generics/min_const_generics/invalid-patterns.64bit.stderr
+++ b/tests/ui/const-generics/min_const_generics/invalid-patterns.64bit.stderr
@@ -1,36 +1,36 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/invalid-patterns.rs:40:32
    |
 LL |   get_flag::<false, { unsafe { char_raw.character } }>();
-   |                                ^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                                ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/invalid-patterns.rs:43:14
+error[E0080]: constructing invalid value: encountered 0x42, but expected a boolean
+  --> $DIR/invalid-patterns.rs:42:14
    |
 LL |   get_flag::<{ unsafe { bool_raw.boolean } }, 'z'>();
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x42, but expected a boolean
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
                42                                              │ B
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/invalid-patterns.rs:45:14
+error[E0080]: constructing invalid value: encountered 0x42, but expected a boolean
+  --> $DIR/invalid-patterns.rs:44:14
    |
 LL |   get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x42, but expected a boolean
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
                42                                              │ B
            }
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/invalid-patterns.rs:45:58
+error[E0080]: using uninitialized data, but this operation requires initialized memory
+  --> $DIR/invalid-patterns.rs:44:58
    |
 LL |   get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
-   |                                                          ^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                                                          ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error[E0308]: mismatched types
   --> $DIR/invalid-patterns.rs:31:21
diff --git a/tests/ui/const-generics/min_const_generics/invalid-patterns.rs b/tests/ui/const-generics/min_const_generics/invalid-patterns.rs
index 10b0d742a0a..85f019adf66 100644
--- a/tests/ui/const-generics/min_const_generics/invalid-patterns.rs
+++ b/tests/ui/const-generics/min_const_generics/invalid-patterns.rs
@@ -38,12 +38,10 @@ fn main() {
 
 
   get_flag::<false, { unsafe { char_raw.character } }>();
-  //~^ ERROR evaluation of constant value failed
-  //~| NOTE uninitialized
+  //~^ ERROR uninitialized
   get_flag::<{ unsafe { bool_raw.boolean } }, 'z'>();
-  //~^ ERROR it is undefined behavior
+  //~^ ERROR 0x42, but expected a boolean
   get_flag::<{ unsafe { bool_raw.boolean } }, { unsafe { char_raw.character } }>();
-  //~^ ERROR evaluation of constant value failed
-  //~| NOTE uninitialized
-  //~| ERROR it is undefined behavior
+  //~^ ERROR uninitialized
+  //~| ERROR 0x42, but expected a boolean
 }
diff --git a/tests/ui/const-ptr/allowed_slices.rs b/tests/ui/const-ptr/allowed_slices.rs
index e5b9966c609..23f63ff5feb 100644
--- a/tests/ui/const-ptr/allowed_slices.rs
+++ b/tests/ui/const-ptr/allowed_slices.rs
@@ -26,7 +26,7 @@ pub static S5: &[MaybeUninit<u8>] = unsafe { from_raw_parts((&D1) as *const _ as
 // is valid as [bool; 4], so this is not UB (it's basically a transmute)
 pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
 
-// Structs are considered single allocated objects,
+// Structs are considered single allocations,
 // as long as you don't reinterpret padding as initialized
 // data everything is ok.
 pub static S7: &[u16] = unsafe {
diff --git a/tests/ui/const-ptr/forbidden_slices.rs b/tests/ui/const-ptr/forbidden_slices.rs
index 001cfd66ad1..fcb0dccf750 100644
--- a/tests/ui/const-ptr/forbidden_slices.rs
+++ b/tests/ui/const-ptr/forbidden_slices.rs
@@ -14,24 +14,24 @@ use std::{
 
 // Null is never valid for references
 pub static S0: &[u32] = unsafe { from_raw_parts(ptr::null(), 0) };
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: null reference
 pub static S1: &[()] = unsafe { from_raw_parts(ptr::null(), 0) };
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: null reference
 
 // Out of bounds
 pub static S2: &[u32] = unsafe { from_raw_parts(&D0, 2) };
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: dangling reference (going beyond the bounds of its allocation)
 
 // Reading uninitialized  data
-pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) }; //~ ERROR: it is undefined behavior to use this value
+pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) }; //~ ERROR: uninitialized memory
 // Reinterpret pointers as integers (UB in CTFE.)
-pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, size_of::<&u32>()) }; //~ ERROR: it is undefined behavior to use this value
+pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, size_of::<&u32>()) }; //~ ERROR: pointer, but expected an integer
 // Layout mismatch
-pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) }; //~ ERROR: it is undefined behavior to use this value
+pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) }; //~ ERROR: 0x11, but expected a boolean
 
 // Reading padding is not ok
 pub static S7: &[u16] = unsafe {
-    //~^ ERROR: it is undefined behavior to use this value
+    //~^ ERROR: uninitialized memory
     let ptr = (&D2 as *const Struct as *const u16).add(1);
 
     from_raw_parts(ptr, 4)
@@ -39,53 +39,53 @@ pub static S7: &[u16] = unsafe {
 
 // Unaligned read
 pub static S8: &[u64] = unsafe {
-    //~^ ERROR: it is undefined behavior to use this value
+    //~^ ERROR: dangling reference (going beyond the bounds of its allocation)
     let ptr = (&D4 as *const [u32; 2] as *const u32).byte_add(1).cast::<u64>();
 
     from_raw_parts(ptr, 1)
 };
 
 pub static R0: &[u32] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR encountered a null reference
 pub static R1: &[()] = unsafe { from_ptr_range(ptr::null()..ptr::null()) }; // errors inside libcore
-//~^ ERROR could not evaluate static initializer
+//~^ ERROR 0 < pointee_size && pointee_size <= isize::MAX as usize
 pub static R2: &[u32] = unsafe {
     let ptr = &D0 as *const u32;
     from_ptr_range(ptr..ptr.add(2)) // errors inside libcore
-    //~^ ERROR could not evaluate static initializer
+    //~^ ERROR in-bounds pointer arithmetic failed
 };
 pub static R4: &[u8] = unsafe {
-    //~^ ERROR: it is undefined behavior to use this value
+    //~^ ERROR: encountered uninitialized memory, but expected an integer
     let ptr = (&D1) as *const MaybeUninit<&u32> as *const u8;
     from_ptr_range(ptr..ptr.add(1))
 };
 pub static R5: &[u8] = unsafe {
-    //~^ ERROR: it is undefined behavior to use this value
+    //~^ ERROR: encountered a pointer, but expected an integer
     let ptr = &D3 as *const &u32;
     from_ptr_range(ptr.cast()..ptr.add(1).cast())
 };
 pub static R6: &[bool] = unsafe {
-    //~^ ERROR: it is undefined behavior to use this value
+    //~^ ERROR: 0x11, but expected a boolean
     let ptr = &D0 as *const u32 as *const bool;
     from_ptr_range(ptr..ptr.add(4))
 };
 pub static R7: &[u16] = unsafe {
-    //~^ ERROR: it is undefined behavior to use this value
+    //~^ ERROR: unaligned reference (required 2 byte alignment but found 1)
     let ptr = (&D2 as *const Struct as *const u16).byte_add(1);
     from_ptr_range(ptr..ptr.add(4))
 };
 pub static R8: &[u64] = unsafe {
     let ptr = (&D4 as *const [u32; 2] as *const u32).byte_add(1).cast::<u64>();
     from_ptr_range(ptr..ptr.add(1))
-    //~^ ERROR could not evaluate static initializer
+    //~^ ERROR in-bounds pointer arithmetic failed
 };
 
 // This is sneaky: &D0 and &D0 point to different objects
 // (even if at runtime they have the same address)
 pub static R9: &[u32] = unsafe { from_ptr_range(&D0..(&D0 as *const u32).add(1)) };
-//~^ ERROR could not evaluate static initializer
+//~^ ERROR not both derived from the same allocation
 pub static R10: &[u32] = unsafe { from_ptr_range(&D0..&D0) };
-//~^ ERROR could not evaluate static initializer
+//~^ ERROR not both derived from the same allocation
 
 const D0: u32 = 0x11111111; // Constant chosen for endianness-independent behavior.
 const D1: MaybeUninit<&u32> = MaybeUninit::uninit();
diff --git a/tests/ui/const-ptr/forbidden_slices.stderr b/tests/ui/const-ptr/forbidden_slices.stderr
index c73d2ca938c..d4dcc6e66b1 100644
--- a/tests/ui/const-ptr/forbidden_slices.stderr
+++ b/tests/ui/const-ptr/forbidden_slices.stderr
@@ -1,200 +1,179 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered a null reference
   --> $DIR/forbidden_slices.rs:16:1
    |
 LL | pub static S0: &[u32] = unsafe { from_raw_parts(ptr::null(), 0) };
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
+   | ^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered a null reference
   --> $DIR/forbidden_slices.rs:18:1
    |
 LL | pub static S1: &[()] = unsafe { from_raw_parts(ptr::null(), 0) };
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
+   | ^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
   --> $DIR/forbidden_slices.rs:22:1
    |
 LL | pub static S2: &[u32] = unsafe { from_raw_parts(&D0, 2) };
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
   --> $DIR/forbidden_slices.rs:26:1
    |
 LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
   --> $DIR/forbidden_slices.rs:28:1
    |
 LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, size_of::<&u32>()) };
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
    |
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
    = 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
            }
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
   --> $DIR/forbidden_slices.rs:30:1
    |
 LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>[1]: encountered uninitialized memory, but expected an integer
   --> $DIR/forbidden_slices.rs:33:1
    |
 LL | pub static S7: &[u16] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[1]: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
   --> $DIR/forbidden_slices.rs:41:1
    |
 LL | pub static S8: &[u64] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered a null reference
   --> $DIR/forbidden_slices.rs:48:1
    |
 LL | pub static R0: &[u32] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
+   | ^^^^^^^^^^^^^^^^^^^^^ 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]: could not evaluate static initializer
+error[E0080]: evaluation panicked: assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize
   --> $DIR/forbidden_slices.rs:50:33
    |
 LL | pub static R1: &[()] = unsafe { from_ptr_range(ptr::null()..ptr::null()) }; // errors inside libcore
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize
-   |
-note: inside `from_ptr_range::<'_, ()>`
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
-note: inside `std::ptr::const_ptr::<impl *const ()>::offset_from_unsigned`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
-error[E0080]: could not evaluate static initializer
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by 8 bytes, but got ALLOC10 which is only 4 bytes from the end of the allocation
   --> $DIR/forbidden_slices.rs:54:25
    |
 LL |     from_ptr_range(ptr..ptr.add(2)) // errors inside libcore
-   |                         ^^^^^^^^^^ in-bounds pointer arithmetic failed: attempting to offset pointer by 8 bytes, but got ALLOC10 which is only 4 bytes from the end of the allocation
-   |
-note: inside `std::ptr::const_ptr::<impl *const u32>::add`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                         ^^^^^^^^^^ evaluation of static initializer failed here
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
   --> $DIR/forbidden_slices.rs:57:1
    |
 LL | pub static R4: &[u8] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
   --> $DIR/forbidden_slices.rs:62:1
    |
 LL | pub static R5: &[u8] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
    |
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
    = 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
            }
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
   --> $DIR/forbidden_slices.rs:67:1
    |
 LL | pub static R6: &[bool] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
   --> $DIR/forbidden_slices.rs:72:1
    |
 LL | pub static R7: &[u16] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+   | ^^^^^^^^^^^^^^^^^^^^^ 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]: could not evaluate static initializer
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by 8 bytes, but got ALLOC11+0x1 which is only 7 bytes from the end of the allocation
   --> $DIR/forbidden_slices.rs:79:25
    |
 LL |     from_ptr_range(ptr..ptr.add(1))
-   |                         ^^^^^^^^^^ in-bounds pointer arithmetic failed: attempting to offset pointer by 8 bytes, but got ALLOC11+0x1 which is only 7 bytes from the end of the allocation
-   |
-note: inside `std::ptr::const_ptr::<impl *const u64>::add`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                         ^^^^^^^^^^ evaluation of static initializer failed here
 
-error[E0080]: could not evaluate static initializer
+error[E0080]: `ptr_offset_from_unsigned` called on two different pointers that are not both derived from the same allocation
   --> $DIR/forbidden_slices.rs:85:34
    |
 LL | pub static R9: &[u32] = unsafe { from_ptr_range(&D0..(&D0 as *const u32).add(1)) };
-   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called on two different pointers that are not both derived from the same allocation
-   |
-note: inside `from_ptr_range::<'_, u32>`
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
-note: inside `std::ptr::const_ptr::<impl *const u32>::offset_from_unsigned`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
-error[E0080]: could not evaluate static initializer
+error[E0080]: `ptr_offset_from_unsigned` called on two different pointers that are not both derived from the same allocation
   --> $DIR/forbidden_slices.rs:87:35
    |
 LL | pub static R10: &[u32] = unsafe { from_ptr_range(&D0..&D0) };
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called on two different pointers that are not both derived from the same allocation
-   |
-note: inside `from_ptr_range::<'_, u32>`
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
-note: inside `std::ptr::const_ptr::<impl *const u32>::offset_from_unsigned`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 18 previous errors
 
diff --git a/tests/ui/const-ptr/out_of_bounds_read.rs b/tests/ui/const-ptr/out_of_bounds_read.rs
index ccf45bf324a..b09978badde 100644
--- a/tests/ui/const-ptr/out_of_bounds_read.rs
+++ b/tests/ui/const-ptr/out_of_bounds_read.rs
@@ -6,9 +6,9 @@ fn main() {
     const PAST_END_PTR: *const u32 = unsafe { DATA.as_ptr().add(1) };
 
     const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR at or beyond the end of the allocation
     const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR at or beyond the end of the allocation
     const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR at or beyond the end of the allocation
 }
diff --git a/tests/ui/const-ptr/out_of_bounds_read.stderr b/tests/ui/const-ptr/out_of_bounds_read.stderr
index 1d625a26b78..e921a5f4987 100644
--- a/tests/ui/const-ptr/out_of_bounds_read.stderr
+++ b/tests/ui/const-ptr/out_of_bounds_read.stderr
@@ -1,33 +1,20 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: memory access failed: attempting to access 4 bytes, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
   --> $DIR/out_of_bounds_read.rs:8:33
    |
 LL |     const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 4 bytes, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
-   |
-note: inside `std::ptr::read::<u32>`
-  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+   |                                 ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: memory access failed: attempting to access 4 bytes, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
   --> $DIR/out_of_bounds_read.rs:10:39
    |
 LL |     const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
-   |                                       ^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 4 bytes, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
-   |
-note: inside `std::ptr::const_ptr::<impl *const u32>::read`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
-note: inside `std::ptr::read::<u32>`
-  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+   |                                       ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: memory access failed: attempting to access 4 bytes, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
   --> $DIR/out_of_bounds_read.rs:12:37
    |
 LL |     const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() };
-   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 4 bytes, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
-   |
-note: inside `std::ptr::mut_ptr::<impl *mut u32>::read`
-  --> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
-note: inside `std::ptr::read::<u32>`
-  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/consts/assert-type-intrinsics.rs b/tests/ui/consts/assert-type-intrinsics.rs
index 32b5f5c92c5..91c8dd00e89 100644
--- a/tests/ui/consts/assert-type-intrinsics.rs
+++ b/tests/ui/consts/assert-type-intrinsics.rs
@@ -9,14 +9,14 @@ fn main() {
 
     const _BAD1: () = unsafe {
         MaybeUninit::<!>::uninit().assume_init();
-        //~^ERROR: evaluation of constant value failed
+        //~^ERROR: uninhabited
     };
     const _BAD2: () = {
         intrinsics::assert_mem_uninitialized_valid::<&'static i32>();
-        //~^ERROR: evaluation of constant value failed
+        //~^ERROR: uninitialized
     };
     const _BAD3: () = {
         intrinsics::assert_zero_valid::<&'static i32>();
-        //~^ERROR: evaluation of constant value failed
+        //~^ERROR: zero-initialize type `&i32`
     };
 }
diff --git a/tests/ui/consts/assert-type-intrinsics.stderr b/tests/ui/consts/assert-type-intrinsics.stderr
index 92c0610a248..90f003716d1 100644
--- a/tests/ui/consts/assert-type-intrinsics.stderr
+++ b/tests/ui/consts/assert-type-intrinsics.stderr
@@ -1,20 +1,20 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: aborted execution: attempted to instantiate uninhabited type `!`
   --> $DIR/assert-type-intrinsics.rs:11:9
    |
 LL |         MaybeUninit::<!>::uninit().assume_init();
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: aborted execution: attempted to instantiate uninhabited type `!`
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: aborted execution: attempted to leave type `&i32` uninitialized, which is invalid
   --> $DIR/assert-type-intrinsics.rs:15:9
    |
 LL |         intrinsics::assert_mem_uninitialized_valid::<&'static i32>();
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: aborted execution: attempted to leave type `&i32` uninitialized, which is invalid
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: aborted execution: attempted to zero-initialize type `&i32`, which is invalid
   --> $DIR/assert-type-intrinsics.rs:19:9
    |
 LL |         intrinsics::assert_zero_valid::<&'static i32>();
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: aborted execution: attempted to zero-initialize type `&i32`, which is invalid
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/consts/assoc_const_generic_impl.rs b/tests/ui/consts/assoc_const_generic_impl.rs
index 5820a724d07..a4904795254 100644
--- a/tests/ui/consts/assoc_const_generic_impl.rs
+++ b/tests/ui/consts/assoc_const_generic_impl.rs
@@ -6,7 +6,7 @@ trait ZeroSized: Sized {
 }
 
 impl<T: Sized> ZeroSized for T {
-    const I_AM_ZERO_SIZED: ()  = [()][std::mem::size_of::<Self>()]; //~ ERROR evaluation of `<u32 as ZeroSized>::I_AM_ZERO_SIZED` failed
+    const I_AM_ZERO_SIZED: () = [()][std::mem::size_of::<Self>()]; //~ ERROR index out of bounds: the length is 1 but the index is 4
     fn requires_zero_size(self) {
         Self::I_AM_ZERO_SIZED;
         println!("requires_zero_size called");
diff --git a/tests/ui/consts/assoc_const_generic_impl.stderr b/tests/ui/consts/assoc_const_generic_impl.stderr
index 45219508396..fc8986a34c5 100644
--- a/tests/ui/consts/assoc_const_generic_impl.stderr
+++ b/tests/ui/consts/assoc_const_generic_impl.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `<u32 as ZeroSized>::I_AM_ZERO_SIZED` failed
-  --> $DIR/assoc_const_generic_impl.rs:9:34
+error[E0080]: index out of bounds: the length is 1 but the index is 4
+  --> $DIR/assoc_const_generic_impl.rs:9:33
    |
-LL |     const I_AM_ZERO_SIZED: ()  = [()][std::mem::size_of::<Self>()];
-   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 4
+LL |     const I_AM_ZERO_SIZED: () = [()][std::mem::size_of::<Self>()];
+   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `<u32 as ZeroSized>::I_AM_ZERO_SIZED` failed here
 
 note: erroneous constant encountered
   --> $DIR/assoc_const_generic_impl.rs:11:9
diff --git a/tests/ui/consts/const-array-oob.rs b/tests/ui/consts/const-array-oob.rs
index 4b457d1c23c..dc713b74d7f 100644
--- a/tests/ui/consts/const-array-oob.rs
+++ b/tests/ui/consts/const-array-oob.rs
@@ -1,11 +1,9 @@
 const FOO: [usize; 3] = [1, 2, 3];
 const BAR: usize = FOO[5];
-//~^ ERROR: evaluation of constant value failed
-//~| NOTE index out of bounds: the length is 3 but the index is 5
+//~^ ERROR: index out of bounds: the length is 3 but the index is 5
 
 const BLUB: [u32; FOO[4]] = [5, 6];
-//~^ ERROR evaluation of constant value failed [E0080]
-//~| NOTE index out of bounds: the length is 3 but the index is 4
+//~^ ERROR index out of bounds: the length is 3 but the index is 4
 
 fn main() {
     let _ = BAR;
diff --git a/tests/ui/consts/const-array-oob.stderr b/tests/ui/consts/const-array-oob.stderr
index 89427c051e7..d4a02664490 100644
--- a/tests/ui/consts/const-array-oob.stderr
+++ b/tests/ui/consts/const-array-oob.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-array-oob.rs:6:19
+error[E0080]: index out of bounds: the length is 3 but the index is 4
+  --> $DIR/const-array-oob.rs:5:19
    |
 LL | const BLUB: [u32; FOO[4]] = [5, 6];
-   |                   ^^^^^^ index out of bounds: the length is 3 but the index is 4
+   |                   ^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: index out of bounds: the length is 3 but the index is 5
   --> $DIR/const-array-oob.rs:2:20
    |
 LL | const BAR: usize = FOO[5];
-   |                    ^^^^^^ index out of bounds: the length is 3 but the index is 5
+   |                    ^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const-assert-unchecked-ub.rs b/tests/ui/consts/const-assert-unchecked-ub.rs
index ffc02eedcb7..a62abcf12d6 100644
--- a/tests/ui/consts/const-assert-unchecked-ub.rs
+++ b/tests/ui/consts/const-assert-unchecked-ub.rs
@@ -1,6 +1,6 @@
 const _: () = unsafe {
     let n = u32::MAX.count_ones();
-    std::hint::assert_unchecked(n < 32); //~ ERROR evaluation of constant value failed
+    std::hint::assert_unchecked(n < 32); //~ ERROR `assume` called with `false`
 };
 
 fn main() {}
diff --git a/tests/ui/consts/const-assert-unchecked-ub.stderr b/tests/ui/consts/const-assert-unchecked-ub.stderr
index 468f15f3472..0a785942cf4 100644
--- a/tests/ui/consts/const-assert-unchecked-ub.stderr
+++ b/tests/ui/consts/const-assert-unchecked-ub.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: `assume` called with `false`
   --> $DIR/const-assert-unchecked-ub.rs:3:5
    |
 LL |     std::hint::assert_unchecked(n < 32);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `assume` called with `false`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-blocks/migrate-fail.rs b/tests/ui/consts/const-blocks/migrate-fail.rs
index fddbfbb9d32..e7dbb68d920 100644
--- a/tests/ui/consts/const-blocks/migrate-fail.rs
+++ b/tests/ui/consts/const-blocks/migrate-fail.rs
@@ -4,7 +4,7 @@
 struct Bar;
 
 mod non_constants {
-    use Bar;
+    use crate::Bar;
 
     fn no_impl_copy_empty_value_multiple_elements() {
         let x = None;
diff --git a/tests/ui/consts/const-blocks/migrate-pass.rs b/tests/ui/consts/const-blocks/migrate-pass.rs
index 308834bd646..629d4db0dc6 100644
--- a/tests/ui/consts/const-blocks/migrate-pass.rs
+++ b/tests/ui/consts/const-blocks/migrate-pass.rs
@@ -5,7 +5,7 @@
 struct Bar;
 
 mod constants {
-    use Bar;
+    use crate::Bar;
 
     fn no_impl_copy_empty_value_no_elements() {
         const FOO: Option<Bar> = None;
@@ -69,7 +69,7 @@ mod constants {
 }
 
 mod non_constants {
-    use Bar;
+    use crate::Bar;
 
     fn no_impl_copy_empty_value_no_elements() {
         let x = None;
diff --git a/tests/ui/consts/const-blocks/nll-fail.rs b/tests/ui/consts/const-blocks/nll-fail.rs
index fddbfbb9d32..e7dbb68d920 100644
--- a/tests/ui/consts/const-blocks/nll-fail.rs
+++ b/tests/ui/consts/const-blocks/nll-fail.rs
@@ -4,7 +4,7 @@
 struct Bar;
 
 mod non_constants {
-    use Bar;
+    use crate::Bar;
 
     fn no_impl_copy_empty_value_multiple_elements() {
         let x = None;
diff --git a/tests/ui/consts/const-blocks/nll-pass.rs b/tests/ui/consts/const-blocks/nll-pass.rs
index 308834bd646..629d4db0dc6 100644
--- a/tests/ui/consts/const-blocks/nll-pass.rs
+++ b/tests/ui/consts/const-blocks/nll-pass.rs
@@ -5,7 +5,7 @@
 struct Bar;
 
 mod constants {
-    use Bar;
+    use crate::Bar;
 
     fn no_impl_copy_empty_value_no_elements() {
         const FOO: Option<Bar> = None;
@@ -69,7 +69,7 @@ mod constants {
 }
 
 mod non_constants {
-    use Bar;
+    use crate::Bar;
 
     fn no_impl_copy_empty_value_no_elements() {
         let x = None;
diff --git a/tests/ui/consts/const-compare-bytes-ub.rs b/tests/ui/consts/const-compare-bytes-ub.rs
index 9dafae1efd1..0bc8585a4ee 100644
--- a/tests/ui/consts/const-compare-bytes-ub.rs
+++ b/tests/ui/consts/const-compare-bytes-ub.rs
@@ -7,34 +7,34 @@ use std::mem::MaybeUninit;
 fn main() {
     const LHS_NULL: i32 = unsafe {
         compare_bytes(0 as *const u8, 2 as *const u8, 1)
-        //~^ ERROR evaluation of constant value failed
+        //~^ ERROR memory access failed
     };
     const RHS_NULL: i32 = unsafe {
         compare_bytes(1 as *const u8, 0 as *const u8, 1)
-        //~^ ERROR evaluation of constant value failed
+        //~^ ERROR memory access failed
     };
     const DANGLING_PTR_NON_ZERO_LENGTH: i32 = unsafe {
         compare_bytes(1 as *const u8, 2 as *const u8, 1)
-        //~^ ERROR evaluation of constant value failed
+        //~^ ERROR memory access failed
     };
     const LHS_OUT_OF_BOUNDS: i32 = unsafe {
         compare_bytes([1, 2, 3].as_ptr(), [1, 2, 3, 4].as_ptr(), 4)
-        //~^ ERROR evaluation of constant value failed
+        //~^ ERROR memory access failed
     };
     const RHS_OUT_OF_BOUNDS: i32 = unsafe {
         compare_bytes([1, 2, 3, 4].as_ptr(), [1, 2, 3].as_ptr(), 4)
-        //~^ ERROR evaluation of constant value failed
+        //~^ ERROR memory access failed
     };
     const LHS_UNINIT: i32 = unsafe {
         compare_bytes(MaybeUninit::uninit().as_ptr(), [1].as_ptr(), 1)
-        //~^ ERROR evaluation of constant value failed
+        //~^ ERROR memory is uninitialized
     };
     const RHS_UNINIT: i32 = unsafe {
         compare_bytes([1].as_ptr(), MaybeUninit::uninit().as_ptr(), 1)
-        //~^ ERROR evaluation of constant value failed
+        //~^ ERROR memory is uninitialized
     };
     const WITH_PROVENANCE: i32 = unsafe {
         compare_bytes([&1].as_ptr().cast(), [&2].as_ptr().cast(), std::mem::size_of::<usize>())
-        //~^ ERROR evaluation of constant value failed
+        //~^ ERROR unable to turn pointer into integer
     };
 }
diff --git a/tests/ui/consts/const-compare-bytes-ub.stderr b/tests/ui/consts/const-compare-bytes-ub.stderr
index 0e77310c6ba..1b3824f22d0 100644
--- a/tests/ui/consts/const-compare-bytes-ub.stderr
+++ b/tests/ui/consts/const-compare-bytes-ub.stderr
@@ -1,50 +1,50 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: memory access failed: attempting to access 1 byte, but got null pointer
   --> $DIR/const-compare-bytes-ub.rs:9:9
    |
 LL |         compare_bytes(0 as *const u8, 2 as *const u8, 1)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 1 byte, but got null pointer
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: memory access failed: attempting to access 1 byte, but got 0x1[noalloc] which is a dangling pointer (it has no provenance)
   --> $DIR/const-compare-bytes-ub.rs:13:9
    |
 LL |         compare_bytes(1 as *const u8, 0 as *const u8, 1)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 1 byte, but got 0x1[noalloc] which is a dangling pointer (it has no provenance)
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: memory access failed: attempting to access 1 byte, but got 0x1[noalloc] which is a dangling pointer (it has no provenance)
   --> $DIR/const-compare-bytes-ub.rs:17:9
    |
 LL |         compare_bytes(1 as *const u8, 2 as *const u8, 1)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 1 byte, but got 0x1[noalloc] which is a dangling pointer (it has no provenance)
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: memory access failed: attempting to access 4 bytes, but got ALLOC0 which is only 3 bytes from the end of the allocation
   --> $DIR/const-compare-bytes-ub.rs:21:9
    |
 LL |         compare_bytes([1, 2, 3].as_ptr(), [1, 2, 3, 4].as_ptr(), 4)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 4 bytes, but got ALLOC0 which is only 3 bytes from the end of the allocation
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: memory access failed: attempting to access 4 bytes, but got ALLOC1 which is only 3 bytes from the end of the allocation
   --> $DIR/const-compare-bytes-ub.rs:25:9
    |
 LL |         compare_bytes([1, 2, 3, 4].as_ptr(), [1, 2, 3].as_ptr(), 4)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 4 bytes, but got ALLOC1 which is only 3 bytes from the end of the allocation
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: reading memory at ALLOC2[0x0..0x1], but memory is uninitialized at [0x0..0x1], and this operation requires initialized memory
   --> $DIR/const-compare-bytes-ub.rs:29:9
    |
 LL |         compare_bytes(MaybeUninit::uninit().as_ptr(), [1].as_ptr(), 1)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at ALLOC2[0x0..0x1], but memory is uninitialized at [0x0..0x1], and this operation requires initialized memory
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: reading memory at ALLOC3[0x0..0x1], but memory is uninitialized at [0x0..0x1], and this operation requires initialized memory
   --> $DIR/const-compare-bytes-ub.rs:33:9
    |
 LL |         compare_bytes([1].as_ptr(), MaybeUninit::uninit().as_ptr(), 1)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at ALLOC3[0x0..0x1], but memory is uninitialized at [0x0..0x1], and this operation requires initialized memory
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/const-compare-bytes-ub.rs:37:9
    |
 LL |         compare_bytes([&1].as_ptr().cast(), [&2].as_ptr().cast(), std::mem::size_of::<usize>())
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
diff --git a/tests/ui/consts/const-deref-ptr.rs b/tests/ui/consts/const-deref-ptr.rs
index c80cb95ea93..ae928f55ebd 100644
--- a/tests/ui/consts/const-deref-ptr.rs
+++ b/tests/ui/consts/const-deref-ptr.rs
@@ -1,8 +1,7 @@
 // Check that you can't dereference invalid raw pointers in constants.
 
 fn main() {
-    static C: u64 = unsafe {*(0xdeadbeef as *const u64)};
-    //~^ ERROR could not evaluate static initializer
-    //~| NOTE dangling pointer
+    static C: u64 = unsafe { *(0xdeadbeef as *const u64) };
+    //~^ ERROR dangling pointer
     println!("{}", C);
 }
diff --git a/tests/ui/consts/const-deref-ptr.stderr b/tests/ui/consts/const-deref-ptr.stderr
index 37502864947..f233b7d94bd 100644
--- a/tests/ui/consts/const-deref-ptr.stderr
+++ b/tests/ui/consts/const-deref-ptr.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
-  --> $DIR/const-deref-ptr.rs:4:29
+error[E0080]: memory access failed: attempting to access 8 bytes, but got 0xdeadbeef[noalloc] which is a dangling pointer (it has no provenance)
+  --> $DIR/const-deref-ptr.rs:4:30
    |
-LL |     static C: u64 = unsafe {*(0xdeadbeef as *const u64)};
-   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 8 bytes, but got 0xdeadbeef[noalloc] which is a dangling pointer (it has no provenance)
+LL |     static C: u64 = unsafe { *(0xdeadbeef as *const u64) };
+   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-err-early.rs b/tests/ui/consts/const-err-early.rs
index a3105b4fc4a..998ac951ea9 100644
--- a/tests/ui/consts/const-err-early.rs
+++ b/tests/ui/consts/const-err-early.rs
@@ -1,8 +1,8 @@
-pub const A: i8 = -i8::MIN; //~ ERROR constant
-pub const B: u8 = 200u8 + 200u8; //~ ERROR constant
-pub const C: u8 = 200u8 * 4; //~ ERROR constant
-pub const D: u8 = 42u8 - (42u8 + 1); //~ ERROR constant
-pub const E: u8 = [5u8][1]; //~ ERROR constant
+pub const A: i8 = -i8::MIN; //~ ERROR overflow
+pub const B: u8 = 200u8 + 200u8; //~ ERROR overflow
+pub const C: u8 = 200u8 * 4; //~ ERROR overflow
+pub const D: u8 = 42u8 - (42u8 + 1); //~ ERROR overflow
+pub const E: u8 = [5u8][1]; //~ ERROR index out of bounds
 
 fn main() {
     let _a = A;
diff --git a/tests/ui/consts/const-err-early.stderr b/tests/ui/consts/const-err-early.stderr
index 59bf637b7ad..98f9b4fbd2a 100644
--- a/tests/ui/consts/const-err-early.stderr
+++ b/tests/ui/consts/const-err-early.stderr
@@ -1,32 +1,32 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to negate `i8::MIN`, which would overflow
   --> $DIR/const-err-early.rs:1:19
    |
 LL | pub const A: i8 = -i8::MIN;
-   |                   ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
+   |                   ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `200_u8 + 200_u8`, which would overflow
   --> $DIR/const-err-early.rs:2:19
    |
 LL | pub const B: u8 = 200u8 + 200u8;
-   |                   ^^^^^^^^^^^^^ attempt to compute `200_u8 + 200_u8`, which would overflow
+   |                   ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `200_u8 * 4_u8`, which would overflow
   --> $DIR/const-err-early.rs:3:19
    |
 LL | pub const C: u8 = 200u8 * 4;
-   |                   ^^^^^^^^^ attempt to compute `200_u8 * 4_u8`, which would overflow
+   |                   ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `42_u8 - 43_u8`, which would overflow
   --> $DIR/const-err-early.rs:4:19
    |
 LL | pub const D: u8 = 42u8 - (42u8 + 1);
-   |                   ^^^^^^^^^^^^^^^^^ attempt to compute `42_u8 - 43_u8`, which would overflow
+   |                   ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: index out of bounds: the length is 1 but the index is 1
   --> $DIR/const-err-early.rs:5:19
    |
 LL | pub const E: u8 = [5u8][1];
-   |                   ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
+   |                   ^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/consts/const-err-enum-discriminant.rs b/tests/ui/consts/const-err-enum-discriminant.rs
index 42165ff5346..190ef47f436 100644
--- a/tests/ui/consts/const-err-enum-discriminant.rs
+++ b/tests/ui/consts/const-err-enum-discriminant.rs
@@ -6,8 +6,7 @@ union Foo {
 
 enum Bar {
     Boo = [unsafe { Foo { b: () }.a }; 4][3],
-    //~^ ERROR evaluation of constant value failed
-    //~| NOTE uninitialized
+    //~^ ERROR uninitialized
 }
 
 fn main() {
diff --git a/tests/ui/consts/const-err-enum-discriminant.stderr b/tests/ui/consts/const-err-enum-discriminant.stderr
index 7cf34595dc9..702d85b2f93 100644
--- a/tests/ui/consts/const-err-enum-discriminant.stderr
+++ b/tests/ui/consts/const-err-enum-discriminant.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/const-err-enum-discriminant.rs:8:21
    |
 LL |     Boo = [unsafe { Foo { b: () }.a }; 4][3],
-   |                     ^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                     ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-err-late.rs b/tests/ui/consts/const-err-late.rs
index f8bea388109..9cc2196a954 100644
--- a/tests/ui/consts/const-err-late.rs
+++ b/tests/ui/consts/const-err-late.rs
@@ -12,8 +12,8 @@ struct S<T>(T);
 
 impl<T> S<T> {
     const FOO: u8 = [5u8][1];
-    //~^ ERROR evaluation of `S::<i32>::FOO` failed
-    //~| ERROR evaluation of `S::<u32>::FOO` failed
+    //~^ ERROR index out of bounds: the length is 1 but the index is 1
+    //~| ERROR index out of bounds: the length is 1 but the index is 1
 }
 
 fn main() {
diff --git a/tests/ui/consts/const-err-late.stderr b/tests/ui/consts/const-err-late.stderr
index 0c021e8761e..02be7bbe10c 100644
--- a/tests/ui/consts/const-err-late.stderr
+++ b/tests/ui/consts/const-err-late.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `S::<i32>::FOO` failed
+error[E0080]: index out of bounds: the length is 1 but the index is 1
   --> $DIR/const-err-late.rs:14:21
    |
 LL |     const FOO: u8 = [5u8][1];
-   |                     ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
+   |                     ^^^^^^^^ evaluation of `S::<i32>::FOO` failed here
 
 note: erroneous constant encountered
   --> $DIR/const-err-late.rs:20:16
@@ -10,11 +10,11 @@ note: erroneous constant encountered
 LL |     black_box((S::<i32>::FOO, S::<u32>::FOO));
    |                ^^^^^^^^^^^^^
 
-error[E0080]: evaluation of `S::<u32>::FOO` failed
+error[E0080]: index out of bounds: the length is 1 but the index is 1
   --> $DIR/const-err-late.rs:14:21
    |
 LL |     const FOO: u8 = [5u8][1];
-   |                     ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
+   |                     ^^^^^^^^ evaluation of `S::<u32>::FOO` failed here
 
 note: erroneous constant encountered
   --> $DIR/const-err-late.rs:20:31
diff --git a/tests/ui/consts/const-err-multi.rs b/tests/ui/consts/const-err-multi.rs
index f21cc97345c..2fb0d291245 100644
--- a/tests/ui/consts/const-err-multi.rs
+++ b/tests/ui/consts/const-err-multi.rs
@@ -1,6 +1,6 @@
 pub const A: i8 = -i8::MIN;
-//~^ ERROR constant
-//~| NOTE attempt to negate `i8::MIN`, which would overflow
+//~^ NOTE constant
+//~| ERROR attempt to negate `i8::MIN`, which would overflow
 pub const B: i8 = A;
 //~^ NOTE constant
 pub const C: u8 = A as u8;
diff --git a/tests/ui/consts/const-err-multi.stderr b/tests/ui/consts/const-err-multi.stderr
index c60be59b87d..9e1554eb265 100644
--- a/tests/ui/consts/const-err-multi.stderr
+++ b/tests/ui/consts/const-err-multi.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to negate `i8::MIN`, which would overflow
   --> $DIR/const-err-multi.rs:1:19
    |
 LL | pub const A: i8 = -i8::MIN;
-   |                   ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
+   |                   ^^^^^^^^ evaluation of constant value failed here
 
 note: erroneous constant encountered
   --> $DIR/const-err-multi.rs:4:19
diff --git a/tests/ui/consts/const-eval-fail-too-big.rs b/tests/ui/consts/const-eval-fail-too-big.rs
index 4b5dbc1d7a4..b14505135fb 100644
--- a/tests/ui/consts/const-eval-fail-too-big.rs
+++ b/tests/ui/consts/const-eval-fail-too-big.rs
@@ -2,7 +2,7 @@
 struct B<
     A: Sized = [(); {
                    let x = [0u8; !0usize];
-                   //~^ ERROR evaluation of constant value failed
+                   //~^ ERROR too big for the target architecture
                    1
                }],
 > {
diff --git a/tests/ui/consts/const-eval-fail-too-big.stderr b/tests/ui/consts/const-eval-fail-too-big.stderr
index ae666483233..3bc20ded5bf 100644
--- a/tests/ui/consts/const-eval-fail-too-big.stderr
+++ b/tests/ui/consts/const-eval-fail-too-big.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: values of the type `[u8; usize::MAX]` are too big for the target architecture
   --> $DIR/const-eval-fail-too-big.rs:4:28
    |
 LL |                    let x = [0u8; !0usize];
-   |                            ^^^^^^^^^^^^^^ values of the type `[u8; usize::MAX]` are too big for the target architecture
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/assign-to-static-within-other-static.rs b/tests/ui/consts/const-eval/assign-to-static-within-other-static.rs
index 30e40bd8be1..7a7a2566940 100644
--- a/tests/ui/consts/const-eval/assign-to-static-within-other-static.rs
+++ b/tests/ui/consts/const-eval/assign-to-static-within-other-static.rs
@@ -6,7 +6,7 @@ use std::cell::UnsafeCell;
 static mut FOO: u32 = 42;
 static BOO: () = unsafe {
     FOO = 5;
-    //~^ ERROR could not evaluate static initializer [E0080]
+    //~^ ERROR modifying a static's initial value
 };
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/assign-to-static-within-other-static.stderr b/tests/ui/consts/const-eval/assign-to-static-within-other-static.stderr
index 5300111a6b6..b19d0eaa116 100644
--- a/tests/ui/consts/const-eval/assign-to-static-within-other-static.stderr
+++ b/tests/ui/consts/const-eval/assign-to-static-within-other-static.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: modifying a static's initial value from another static's initializer
   --> $DIR/assign-to-static-within-other-static.rs:8:5
    |
 LL |     FOO = 5;
-   |     ^^^^^^^ modifying a static's initial value from another static's initializer
+   |     ^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/conditional_array_execution.rs b/tests/ui/consts/const-eval/conditional_array_execution.rs
index 27d5383d6d4..1473efa7428 100644
--- a/tests/ui/consts/const-eval/conditional_array_execution.rs
+++ b/tests/ui/consts/const-eval/conditional_array_execution.rs
@@ -1,7 +1,7 @@
 const X: u32 = 5;
 const Y: u32 = 6;
 const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
-//~^ ERROR constant
+//~^ ERROR overflow
 
 fn main() {
     println!("{}", FOO);
diff --git a/tests/ui/consts/const-eval/conditional_array_execution.stderr b/tests/ui/consts/const-eval/conditional_array_execution.stderr
index 30034378079..65ae9a9fb8a 100644
--- a/tests/ui/consts/const-eval/conditional_array_execution.stderr
+++ b/tests/ui/consts/const-eval/conditional_array_execution.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `5_u32 - 6_u32`, which would overflow
   --> $DIR/conditional_array_execution.rs:3:19
    |
 LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
-   |                   ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow
+   |                   ^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/const-eval-overflow-2.rs b/tests/ui/consts/const-eval/const-eval-overflow-2.rs
index bae8a7ce243..71ac655435b 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow-2.rs
+++ b/tests/ui/consts/const-eval/const-eval-overflow-2.rs
@@ -8,7 +8,7 @@ use std::{i8, i16, i32, i64, isize};
 use std::{u8, u16, u32, u64, usize};
 
 const NEG_128: i8 = -128;
-const NEG_NEG_128: i8 = -NEG_128; //~ ERROR constant
+const NEG_NEG_128: i8 = -NEG_128; //~ ERROR overflow
 
 fn main() {
     match -128i8 {
diff --git a/tests/ui/consts/const-eval/const-eval-overflow-2.stderr b/tests/ui/consts/const-eval/const-eval-overflow-2.stderr
index 5599ff931e8..90b94600aed 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow-2.stderr
+++ b/tests/ui/consts/const-eval/const-eval-overflow-2.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to negate `i8::MIN`, which would overflow
   --> $DIR/const-eval-overflow-2.rs:11:25
    |
 LL | const NEG_NEG_128: i8 = -NEG_128;
-   |                         ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
+   |                         ^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/const-eval-overflow-3.rs b/tests/ui/consts/const-eval/const-eval-overflow-3.rs
index bcc966dc962..bf7e791483a 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow-3.rs
+++ b/tests/ui/consts/const-eval/const-eval-overflow-3.rs
@@ -16,7 +16,7 @@ use std::fmt;
 const A_I8_I
     : [u32; (i8::MAX as usize) + 1]
     = [0; (i8::MAX + 1) as usize];
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflow
 
 fn main() {
     foo(&A_I8_I[..]);
diff --git a/tests/ui/consts/const-eval/const-eval-overflow-3.stderr b/tests/ui/consts/const-eval/const-eval-overflow-3.stderr
index 0437cd3adb4..5ad7d08bdb3 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow-3.stderr
+++ b/tests/ui/consts/const-eval/const-eval-overflow-3.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i8::MAX + 1_i8`, which would overflow
   --> $DIR/const-eval-overflow-3.rs:18:11
    |
 LL |     = [0; (i8::MAX + 1) as usize];
-   |           ^^^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
+   |           ^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/const-eval-overflow-4.rs b/tests/ui/consts/const-eval/const-eval-overflow-4.rs
index 762c7a968a8..d42c29249af 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow-4.rs
+++ b/tests/ui/consts/const-eval/const-eval-overflow-4.rs
@@ -9,7 +9,7 @@ use std::fmt;
 
 const A_I8_T
     : [u32; (i8::MAX as i8 + 1i8) as usize]
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR overflow
     = [0; (i8::MAX as usize) + 1];
 
 fn main() {
diff --git a/tests/ui/consts/const-eval/const-eval-overflow-4.stderr b/tests/ui/consts/const-eval/const-eval-overflow-4.stderr
index ce5e59901c1..c14a880849f 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow-4.stderr
+++ b/tests/ui/consts/const-eval/const-eval-overflow-4.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i8::MAX + 1_i8`, which would overflow
   --> $DIR/const-eval-overflow-4.rs:11:13
    |
 LL |     : [u32; (i8::MAX as i8 + 1i8) as usize]
-   |             ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
+   |             ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/const-eval-overflow2.rs b/tests/ui/consts/const-eval/const-eval-overflow2.rs
index 1676f7c2af6..348c8e06f66 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow2.rs
+++ b/tests/ui/consts/const-eval/const-eval-overflow2.rs
@@ -11,47 +11,47 @@ const VALS_I8: (i8,) =
     (
      i8::MIN - 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_I16: (i16,) =
     (
      i16::MIN - 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_I32: (i32,) =
     (
      i32::MIN - 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_I64: (i64,) =
     (
      i64::MIN - 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_U8: (u8,) =
     (
      u8::MIN - 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_U16: (u16,) = (
      u16::MIN - 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_U32: (u32,) = (
      u32::MIN - 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_U64: (u64,) =
     (
      u64::MIN - 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 fn main() {
     foo(VALS_I8);
diff --git a/tests/ui/consts/const-eval/const-eval-overflow2.stderr b/tests/ui/consts/const-eval/const-eval-overflow2.stderr
index 341c15daf65..a705604e383 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow2.stderr
+++ b/tests/ui/consts/const-eval/const-eval-overflow2.stderr
@@ -1,50 +1,50 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i8::MIN - 1_i8`, which would overflow
   --> $DIR/const-eval-overflow2.rs:12:6
    |
 LL |      i8::MIN - 1,
-   |      ^^^^^^^^^^^ attempt to compute `i8::MIN - 1_i8`, which would overflow
+   |      ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i16::MIN - 1_i16`, which would overflow
   --> $DIR/const-eval-overflow2.rs:18:6
    |
 LL |      i16::MIN - 1,
-   |      ^^^^^^^^^^^^ attempt to compute `i16::MIN - 1_i16`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i32::MIN - 1_i32`, which would overflow
   --> $DIR/const-eval-overflow2.rs:24:6
    |
 LL |      i32::MIN - 1,
-   |      ^^^^^^^^^^^^ attempt to compute `i32::MIN - 1_i32`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i64::MIN - 1_i64`, which would overflow
   --> $DIR/const-eval-overflow2.rs:30:6
    |
 LL |      i64::MIN - 1,
-   |      ^^^^^^^^^^^^ attempt to compute `i64::MIN - 1_i64`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `0_u8 - 1_u8`, which would overflow
   --> $DIR/const-eval-overflow2.rs:36:6
    |
 LL |      u8::MIN - 1,
-   |      ^^^^^^^^^^^ attempt to compute `0_u8 - 1_u8`, which would overflow
+   |      ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `0_u16 - 1_u16`, which would overflow
   --> $DIR/const-eval-overflow2.rs:41:6
    |
 LL |      u16::MIN - 1,
-   |      ^^^^^^^^^^^^ attempt to compute `0_u16 - 1_u16`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `0_u32 - 1_u32`, which would overflow
   --> $DIR/const-eval-overflow2.rs:46:6
    |
 LL |      u32::MIN - 1,
-   |      ^^^^^^^^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `0_u64 - 1_u64`, which would overflow
   --> $DIR/const-eval-overflow2.rs:52:6
    |
 LL |      u64::MIN - 1,
-   |      ^^^^^^^^^^^^ attempt to compute `0_u64 - 1_u64`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/consts/const-eval/const-eval-overflow2b.rs b/tests/ui/consts/const-eval/const-eval-overflow2b.rs
index 59d1df5680d..b05b0b11105 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow2b.rs
+++ b/tests/ui/consts/const-eval/const-eval-overflow2b.rs
@@ -11,47 +11,47 @@ const VALS_I8: (i8,) =
     (
      i8::MAX + 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_I16: (i16,) =
     (
      i16::MAX + 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_I32: (i32,) =
     (
      i32::MAX + 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_I64: (i64,) =
     (
      i64::MAX + 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_U8: (u8,) =
     (
      u8::MAX + 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_U16: (u16,) = (
      u16::MAX + 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_U32: (u32,) = (
      u32::MAX + 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_U64: (u64,) =
     (
      u64::MAX + 1,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 fn main() {
     foo(VALS_I8);
diff --git a/tests/ui/consts/const-eval/const-eval-overflow2b.stderr b/tests/ui/consts/const-eval/const-eval-overflow2b.stderr
index e661836b4b9..33de4b6ed32 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow2b.stderr
+++ b/tests/ui/consts/const-eval/const-eval-overflow2b.stderr
@@ -1,50 +1,50 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i8::MAX + 1_i8`, which would overflow
   --> $DIR/const-eval-overflow2b.rs:12:6
    |
 LL |      i8::MAX + 1,
-   |      ^^^^^^^^^^^ attempt to compute `i8::MAX + 1_i8`, which would overflow
+   |      ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i16::MAX + 1_i16`, which would overflow
   --> $DIR/const-eval-overflow2b.rs:18:6
    |
 LL |      i16::MAX + 1,
-   |      ^^^^^^^^^^^^ attempt to compute `i16::MAX + 1_i16`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i32::MAX + 1_i32`, which would overflow
   --> $DIR/const-eval-overflow2b.rs:24:6
    |
 LL |      i32::MAX + 1,
-   |      ^^^^^^^^^^^^ attempt to compute `i32::MAX + 1_i32`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i64::MAX + 1_i64`, which would overflow
   --> $DIR/const-eval-overflow2b.rs:30:6
    |
 LL |      i64::MAX + 1,
-   |      ^^^^^^^^^^^^ attempt to compute `i64::MAX + 1_i64`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `u8::MAX + 1_u8`, which would overflow
   --> $DIR/const-eval-overflow2b.rs:36:6
    |
 LL |      u8::MAX + 1,
-   |      ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
+   |      ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `u16::MAX + 1_u16`, which would overflow
   --> $DIR/const-eval-overflow2b.rs:41:6
    |
 LL |      u16::MAX + 1,
-   |      ^^^^^^^^^^^^ attempt to compute `u16::MAX + 1_u16`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `u32::MAX + 1_u32`, which would overflow
   --> $DIR/const-eval-overflow2b.rs:46:6
    |
 LL |      u32::MAX + 1,
-   |      ^^^^^^^^^^^^ attempt to compute `u32::MAX + 1_u32`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `u64::MAX + 1_u64`, which would overflow
   --> $DIR/const-eval-overflow2b.rs:52:6
    |
 LL |      u64::MAX + 1,
-   |      ^^^^^^^^^^^^ attempt to compute `u64::MAX + 1_u64`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/consts/const-eval/const-eval-overflow2c.rs b/tests/ui/consts/const-eval/const-eval-overflow2c.rs
index 33b89260115..ec87f5e066c 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow2c.rs
+++ b/tests/ui/consts/const-eval/const-eval-overflow2c.rs
@@ -11,47 +11,47 @@ const VALS_I8: (i8,) =
     (
      i8::MIN * 2,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_I16: (i16,) =
     (
      i16::MIN * 2,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_I32: (i32,) =
     (
      i32::MIN * 2,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_I64: (i64,) =
     (
      i64::MIN * 2,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_U8: (u8,) =
     (
      u8::MAX * 2,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_U16: (u16,) = (
      u16::MAX * 2,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_U32: (u32,) = (
      u32::MAX * 2,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 const VALS_U64: (u64,) =
     (
      u64::MAX * 2,
      );
- //~^^ ERROR evaluation of constant value failed
+ //~^^ ERROR overflow
 
 fn main() {
     foo(VALS_I8);
diff --git a/tests/ui/consts/const-eval/const-eval-overflow2c.stderr b/tests/ui/consts/const-eval/const-eval-overflow2c.stderr
index 1fad15492fb..69949b57904 100644
--- a/tests/ui/consts/const-eval/const-eval-overflow2c.stderr
+++ b/tests/ui/consts/const-eval/const-eval-overflow2c.stderr
@@ -1,50 +1,50 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i8::MIN * 2_i8`, which would overflow
   --> $DIR/const-eval-overflow2c.rs:12:6
    |
 LL |      i8::MIN * 2,
-   |      ^^^^^^^^^^^ attempt to compute `i8::MIN * 2_i8`, which would overflow
+   |      ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i16::MIN * 2_i16`, which would overflow
   --> $DIR/const-eval-overflow2c.rs:18:6
    |
 LL |      i16::MIN * 2,
-   |      ^^^^^^^^^^^^ attempt to compute `i16::MIN * 2_i16`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i32::MIN * 2_i32`, which would overflow
   --> $DIR/const-eval-overflow2c.rs:24:6
    |
 LL |      i32::MIN * 2,
-   |      ^^^^^^^^^^^^ attempt to compute `i32::MIN * 2_i32`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `i64::MIN * 2_i64`, which would overflow
   --> $DIR/const-eval-overflow2c.rs:30:6
    |
 LL |      i64::MIN * 2,
-   |      ^^^^^^^^^^^^ attempt to compute `i64::MIN * 2_i64`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `u8::MAX * 2_u8`, which would overflow
   --> $DIR/const-eval-overflow2c.rs:36:6
    |
 LL |      u8::MAX * 2,
-   |      ^^^^^^^^^^^ attempt to compute `u8::MAX * 2_u8`, which would overflow
+   |      ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `u16::MAX * 2_u16`, which would overflow
   --> $DIR/const-eval-overflow2c.rs:41:6
    |
 LL |      u16::MAX * 2,
-   |      ^^^^^^^^^^^^ attempt to compute `u16::MAX * 2_u16`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `u32::MAX * 2_u32`, which would overflow
   --> $DIR/const-eval-overflow2c.rs:46:6
    |
 LL |      u32::MAX * 2,
-   |      ^^^^^^^^^^^^ attempt to compute `u32::MAX * 2_u32`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `u64::MAX * 2_u64`, which would overflow
   --> $DIR/const-eval-overflow2c.rs:52:6
    |
 LL |      u64::MAX * 2,
-   |      ^^^^^^^^^^^^ attempt to compute `u64::MAX * 2_u64`, which would overflow
+   |      ^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/consts/const-eval/const-eval-query-stack.rs b/tests/ui/consts/const-eval/const-eval-query-stack.rs
index 8de398787b4..3728e2071d3 100644
--- a/tests/ui/consts/const-eval/const-eval-query-stack.rs
+++ b/tests/ui/consts/const-eval/const-eval-query-stack.rs
@@ -13,7 +13,7 @@
 //@ normalize-stderr: ".*omitted \d{1,} frame.*\n" -> ""
 #![allow(unconditional_panic)]
 
-const X: i32 = 1 / 0; //~ERROR constant
+const X: i32 = 1 / 0; //~ERROR attempt to divide `1_i32` by zero
 
 fn main() {
     let x: &'static i32 = &X;
diff --git a/tests/ui/consts/const-eval/const-eval-query-stack.stderr b/tests/ui/consts/const-eval/const-eval-query-stack.stderr
index 5a71c770fdc..d5b7e67724d 100644
--- a/tests/ui/consts/const-eval/const-eval-query-stack.stderr
+++ b/tests/ui/consts/const-eval/const-eval-query-stack.stderr
@@ -1,8 +1,8 @@
-error: internal compiler error[E0080]: evaluation of constant value failed
+error: internal compiler error[E0080]: attempt to divide `1_i32` by zero
   --> $DIR/const-eval-query-stack.rs:16:16
    |
 LL | const X: i32 = 1 / 0;
-   |                ^^^^^ attempt to divide `1_i32` by zero
+   |                ^^^^^ evaluation of constant value failed here
 
 
 note: please make sure that you have updated to the latest nightly
diff --git a/tests/ui/consts/const-eval/const-pointer-values-in-various-types.64bit.stderr b/tests/ui/consts/const-eval/const-pointer-values-in-various-types.64bit.stderr
index 3eccd596274..3a1e8c734d4 100644
--- a/tests/ui/consts/const-eval/const-pointer-values-in-various-types.64bit.stderr
+++ b/tests/ui/consts/const-eval/const-pointer-values-in-various-types.64bit.stderr
@@ -1,254 +1,254 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/const-pointer-values-in-various-types.rs:27:49
    |
 LL |     const I32_REF_USIZE_UNION: usize = unsafe { Nonsense { int_32_ref: &3 }.u };
-   |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/const-pointer-values-in-various-types.rs:30:43
    |
 LL |     const I32_REF_U8_UNION: u8 = unsafe { Nonsense { int_32_ref: &3 }.uint_8 };
-   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/const-pointer-values-in-various-types.rs:33:45
    |
 LL |     const I32_REF_U16_UNION: u16 = unsafe { Nonsense { int_32_ref: &3 }.uint_16 };
-   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/const-pointer-values-in-various-types.rs:36:45
    |
 LL |     const I32_REF_U32_UNION: u32 = unsafe { Nonsense { int_32_ref: &3 }.uint_32 };
-   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/const-pointer-values-in-various-types.rs:39:45
    |
 LL |     const I32_REF_U64_UNION: u64 = unsafe { Nonsense { int_32_ref: &3 }.uint_64 };
-   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/const-pointer-values-in-various-types.rs:42:47
    |
 LL |     const I32_REF_U128_UNION: u128 = unsafe { Nonsense { int_32_ref: &3 }.uint_128 };
-   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:46:43
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:45:43
    |
 LL |     const I32_REF_I8_UNION: i8 = unsafe { Nonsense { int_32_ref: &3 }.int_8 };
-   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:49:45
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:48:45
    |
 LL |     const I32_REF_I16_UNION: i16 = unsafe { Nonsense { int_32_ref: &3 }.int_16 };
-   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:52:45
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:51:45
    |
 LL |     const I32_REF_I32_UNION: i32 = unsafe { Nonsense { int_32_ref: &3 }.int_32 };
-   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:55:45
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:54:45
    |
 LL |     const I32_REF_I64_UNION: i64 = unsafe { Nonsense { int_32_ref: &3 }.int_64 };
-   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:58:47
+error[E0080]: using uninitialized data, but this operation requires initialized memory
+  --> $DIR/const-pointer-values-in-various-types.rs:57:47
    |
 LL |     const I32_REF_I128_UNION: i128 = unsafe { Nonsense { int_32_ref: &3 }.int_128 };
-   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:62:45
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:60:45
    |
 LL |     const I32_REF_F32_UNION: f32 = unsafe { Nonsense { int_32_ref: &3 }.float_32 };
-   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:65:45
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:63:45
    |
 LL |     const I32_REF_F64_UNION: f64 = unsafe { Nonsense { int_32_ref: &3 }.float_64 };
-   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:68:47
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:66:47
    |
 LL |     const I32_REF_BOOL_UNION: bool = unsafe { Nonsense { int_32_ref: &3 }.truthy_falsey };
-   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:71:47
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:69:47
    |
 LL |     const I32_REF_CHAR_UNION: char = unsafe { Nonsense { int_32_ref: &3 }.character };
-   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:74:39
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:72:39
    |
 LL |     const STR_U8_UNION: u8 = unsafe { Nonsense { stringy: "3" }.uint_8 };
-   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:77:41
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:75:41
    |
 LL |     const STR_U16_UNION: u16 = unsafe { Nonsense { stringy: "3" }.uint_16 };
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:80:41
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:78:41
    |
 LL |     const STR_U32_UNION: u32 = unsafe { Nonsense { stringy: "3" }.uint_32 };
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:83:41
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:81:41
    |
 LL |     const STR_U64_UNION: u64 = unsafe { Nonsense { stringy: "3" }.uint_64 };
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:86:43
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:84:43
    |
 LL |     const STR_U128_UNION: u128 = unsafe { Nonsense { stringy: "3" }.uint_128 };
-   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:89:39
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:87:39
    |
 LL |     const STR_I8_UNION: i8 = unsafe { Nonsense { stringy: "3" }.int_8 };
-   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:92:41
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:90:41
    |
 LL |     const STR_I16_UNION: i16 = unsafe { Nonsense { stringy: "3" }.int_16 };
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:95:41
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:93:41
    |
 LL |     const STR_I32_UNION: i32 = unsafe { Nonsense { stringy: "3" }.int_32 };
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:98:41
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:96:41
    |
 LL |     const STR_I64_UNION: i64 = unsafe { Nonsense { stringy: "3" }.int_64 };
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:101:43
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:99:43
    |
 LL |     const STR_I128_UNION: i128 = unsafe { Nonsense { stringy: "3" }.int_128 };
-   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:104:41
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:102:41
    |
 LL |     const STR_F32_UNION: f32 = unsafe { Nonsense { stringy: "3" }.float_32 };
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:107:41
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:105:41
    |
 LL |     const STR_F64_UNION: f64 = unsafe { Nonsense { stringy: "3" }.float_64 };
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:110:43
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:108:43
    |
 LL |     const STR_BOOL_UNION: bool = unsafe { Nonsense { stringy: "3" }.truthy_falsey };
-   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-pointer-values-in-various-types.rs:113:43
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/const-pointer-values-in-various-types.rs:111:43
    |
 LL |     const STR_CHAR_UNION: char = unsafe { Nonsense { stringy: "3" }.character };
-   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
diff --git a/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs b/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs
index ce7380cd155..5720d6ea91e 100644
--- a/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs
+++ b/tests/ui/consts/const-eval/const-pointer-values-in-various-types.rs
@@ -25,91 +25,89 @@ union Nonsense {
 
 fn main() {
     const I32_REF_USIZE_UNION: usize = unsafe { Nonsense { int_32_ref: &3 }.u };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const I32_REF_U8_UNION: u8 = unsafe { Nonsense { int_32_ref: &3 }.uint_8 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const I32_REF_U16_UNION: u16 = unsafe { Nonsense { int_32_ref: &3 }.uint_16 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const I32_REF_U32_UNION: u32 = unsafe { Nonsense { int_32_ref: &3 }.uint_32 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const I32_REF_U64_UNION: u64 = unsafe { Nonsense { int_32_ref: &3 }.uint_64 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const I32_REF_U128_UNION: u128 = unsafe { Nonsense { int_32_ref: &3 }.uint_128 };
-    //~^ ERROR evaluation of constant value failed
-    //~| NOTE uninitialized
+    //~^ ERROR uninitialized
 
     const I32_REF_I8_UNION: i8 = unsafe { Nonsense { int_32_ref: &3 }.int_8 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const I32_REF_I16_UNION: i16 = unsafe { Nonsense { int_32_ref: &3 }.int_16 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const I32_REF_I32_UNION: i32 = unsafe { Nonsense { int_32_ref: &3 }.int_32 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const I32_REF_I64_UNION: i64 = unsafe { Nonsense { int_32_ref: &3 }.int_64 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const I32_REF_I128_UNION: i128 = unsafe { Nonsense { int_32_ref: &3 }.int_128 };
-    //~^ ERROR evaluation of constant value failed
-    //~| NOTE uninitialized
+    //~^ ERROR uninitialized
 
     const I32_REF_F32_UNION: f32 = unsafe { Nonsense { int_32_ref: &3 }.float_32 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const I32_REF_F64_UNION: f64 = unsafe { Nonsense { int_32_ref: &3 }.float_64 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const I32_REF_BOOL_UNION: bool = unsafe { Nonsense { int_32_ref: &3 }.truthy_falsey };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const I32_REF_CHAR_UNION: char = unsafe { Nonsense { int_32_ref: &3 }.character };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_U8_UNION: u8 = unsafe { Nonsense { stringy: "3" }.uint_8 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_U16_UNION: u16 = unsafe { Nonsense { stringy: "3" }.uint_16 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_U32_UNION: u32 = unsafe { Nonsense { stringy: "3" }.uint_32 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_U64_UNION: u64 = unsafe { Nonsense { stringy: "3" }.uint_64 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_U128_UNION: u128 = unsafe { Nonsense { stringy: "3" }.uint_128 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_I8_UNION: i8 = unsafe { Nonsense { stringy: "3" }.int_8 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_I16_UNION: i16 = unsafe { Nonsense { stringy: "3" }.int_16 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_I32_UNION: i32 = unsafe { Nonsense { stringy: "3" }.int_32 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_I64_UNION: i64 = unsafe { Nonsense { stringy: "3" }.int_64 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_I128_UNION: i128 = unsafe { Nonsense { stringy: "3" }.int_128 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_F32_UNION: f32 = unsafe { Nonsense { stringy: "3" }.float_32 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_F64_UNION: f64 = unsafe { Nonsense { stringy: "3" }.float_64 };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_BOOL_UNION: bool = unsafe { Nonsense { stringy: "3" }.truthy_falsey };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 
     const STR_CHAR_UNION: char = unsafe { Nonsense { stringy: "3" }.character };
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 }
diff --git a/tests/ui/consts/const-eval/const_fn_ptr_fail2.rs b/tests/ui/consts/const-eval/const_fn_ptr_fail2.rs
index c6ae3af4427..03976a05b75 100644
--- a/tests/ui/consts/const-eval/const_fn_ptr_fail2.rs
+++ b/tests/ui/consts/const-eval/const_fn_ptr_fail2.rs
@@ -14,11 +14,11 @@ const fn bar(x: fn(usize) -> usize, y: usize) -> usize {
 }
 
 const Y: usize = bar(X, 2); // FIXME: should fail to typeck someday
-//~^ ERROR evaluation of constant value failed
-//~| NOTE calling non-const function `double`
+//~^ NOTE evaluation of constant value failed
+//~| ERROR calling non-const function `double`
 const Z: usize = bar(double, 2); // FIXME: should fail to typeck someday
-//~^ ERROR evaluation of constant value failed
-//~| NOTE calling non-const function `double`
+//~^ NOTE evaluation of constant value failed
+//~| ERROR calling non-const function `double`
 
 fn main() {
     assert_eq!(Y, 4);
diff --git a/tests/ui/consts/const-eval/const_fn_ptr_fail2.stderr b/tests/ui/consts/const-eval/const_fn_ptr_fail2.stderr
index a4d2e26c3af..6eddb72bae8 100644
--- a/tests/ui/consts/const-eval/const_fn_ptr_fail2.stderr
+++ b/tests/ui/consts/const-eval/const_fn_ptr_fail2.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: calling non-const function `double`
   --> $DIR/const_fn_ptr_fail2.rs:16:18
    |
 LL | const Y: usize = bar(X, 2); // FIXME: should fail to typeck someday
-   |                  ^^^^^^^^^ calling non-const function `double`
+   |                  ^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `bar`
   --> $DIR/const_fn_ptr_fail2.rs:9:5
@@ -10,11 +10,11 @@ note: inside `bar`
 LL |     x(y)
    |     ^^^^ the failure occurred here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: calling non-const function `double`
   --> $DIR/const_fn_ptr_fail2.rs:19:18
    |
 LL | const Z: usize = bar(double, 2); // FIXME: should fail to typeck someday
-   |                  ^^^^^^^^^^^^^^ calling non-const function `double`
+   |                  ^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `bar`
   --> $DIR/const_fn_ptr_fail2.rs:9:5
diff --git a/tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.rs b/tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.rs
index 0bf2f0e6669..45298df0243 100644
--- a/tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.rs
+++ b/tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.rs
@@ -1,5 +1,5 @@
 #![crate_type = "lib"]
 
 struct Bug([u8; panic!{"\t"}]);
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 //~| NOTE: in this expansion of panic!
diff --git a/tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.stderr b/tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.stderr
index fae971c09f2..6e5e0e727fb 100644
--- a/tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.stderr
+++ b/tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked:     
   --> $DIR/const_panic-normalize-tabs-115498.rs:3:17
    |
 LL | struct Bug([u8; panic!{"\t"}]);
-   |                 ^^^^^^^^^^^^ evaluation panicked:     
+   |                 ^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/const_panic.rs b/tests/ui/consts/const-eval/const_panic.rs
index 5b9a8f8e2a2..367396bab94 100644
--- a/tests/ui/consts/const-eval/const_panic.rs
+++ b/tests/ui/consts/const-eval/const_panic.rs
@@ -4,37 +4,37 @@
 const MSG: &str = "hello";
 
 const Z: () = std::panic!("cheese");
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const Z2: () = std::panic!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const Y: () = std::unreachable!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const X: () = std::unimplemented!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const W: () = std::panic!(MSG);
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const W2: () = std::panic!("{}", MSG);
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const Z_CORE: () = core::panic!("cheese");
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const Z2_CORE: () = core::panic!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const Y_CORE: () = core::unreachable!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const X_CORE: () = core::unimplemented!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const W_CORE: () = core::panic!(MSG);
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const W2_CORE: () = core::panic!("{}", MSG);
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
diff --git a/tests/ui/consts/const-eval/const_panic.stderr b/tests/ui/consts/const-eval/const_panic.stderr
index 0874224e5f2..1b5421276c3 100644
--- a/tests/ui/consts/const-eval/const_panic.stderr
+++ b/tests/ui/consts/const-eval/const_panic.stderr
@@ -1,78 +1,78 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: cheese
   --> $DIR/const_panic.rs:6:15
    |
 LL | const Z: () = std::panic!("cheese");
-   |               ^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: cheese
+   |               ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/const_panic.rs:9:16
    |
 LL | const Z2: () = std::panic!();
-   |                ^^^^^^^^^^^^^ evaluation panicked: explicit panic
+   |                ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: internal error: entered unreachable code
   --> $DIR/const_panic.rs:12:15
    |
 LL | const Y: () = std::unreachable!();
-   |               ^^^^^^^^^^^^^^^^^^^ evaluation panicked: internal error: entered unreachable code
+   |               ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: not implemented
   --> $DIR/const_panic.rs:15:15
    |
 LL | const X: () = std::unimplemented!();
-   |               ^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: not implemented
+   |               ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = note: this error originates in the macro `std::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: hello
   --> $DIR/const_panic.rs:18:15
    |
 LL | const W: () = std::panic!(MSG);
-   |               ^^^^^^^^^^^^^^^^ evaluation panicked: hello
+   |               ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: hello
   --> $DIR/const_panic.rs:21:16
    |
 LL | const W2: () = std::panic!("{}", MSG);
-   |                ^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: hello
+   |                ^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: cheese
   --> $DIR/const_panic.rs:24:20
    |
 LL | const Z_CORE: () = core::panic!("cheese");
-   |                    ^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: cheese
+   |                    ^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/const_panic.rs:27:21
    |
 LL | const Z2_CORE: () = core::panic!();
-   |                     ^^^^^^^^^^^^^^ evaluation panicked: explicit panic
+   |                     ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: internal error: entered unreachable code
   --> $DIR/const_panic.rs:30:20
    |
 LL | const Y_CORE: () = core::unreachable!();
-   |                    ^^^^^^^^^^^^^^^^^^^^ evaluation panicked: internal error: entered unreachable code
+   |                    ^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: not implemented
   --> $DIR/const_panic.rs:33:20
    |
 LL | const X_CORE: () = core::unimplemented!();
-   |                    ^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: not implemented
+   |                    ^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = note: this error originates in the macro `core::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: hello
   --> $DIR/const_panic.rs:36:20
    |
 LL | const W_CORE: () = core::panic!(MSG);
-   |                    ^^^^^^^^^^^^^^^^^ evaluation panicked: hello
+   |                    ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: hello
   --> $DIR/const_panic.rs:39:21
    |
 LL | const W2_CORE: () = core::panic!("{}", MSG);
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: hello
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 12 previous errors
 
diff --git a/tests/ui/consts/const-eval/const_panic_2021.rs b/tests/ui/consts/const-eval/const_panic_2021.rs
index 31a80e71b7c..845f78beef9 100644
--- a/tests/ui/consts/const-eval/const_panic_2021.rs
+++ b/tests/ui/consts/const-eval/const_panic_2021.rs
@@ -4,31 +4,31 @@
 const MSG: &str = "hello";
 
 const A: () = std::panic!("blåhaj");
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const B: () = std::panic!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const C: () = std::unreachable!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const D: () = std::unimplemented!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const E: () = std::panic!("{}", MSG);
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const A_CORE: () = core::panic!("shark");
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const B_CORE: () = core::panic!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const C_CORE: () = core::unreachable!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const D_CORE: () = core::unimplemented!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const E_CORE: () = core::panic!("{}", MSG);
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
diff --git a/tests/ui/consts/const-eval/const_panic_2021.stderr b/tests/ui/consts/const-eval/const_panic_2021.stderr
index 1496df4445a..15b173f9400 100644
--- a/tests/ui/consts/const-eval/const_panic_2021.stderr
+++ b/tests/ui/consts/const-eval/const_panic_2021.stderr
@@ -1,66 +1,66 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: blåhaj
   --> $DIR/const_panic_2021.rs:6:15
    |
 LL | const A: () = std::panic!("blåhaj");
-   |               ^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: blåhaj
+   |               ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/const_panic_2021.rs:9:15
    |
 LL | const B: () = std::panic!();
-   |               ^^^^^^^^^^^^^ evaluation panicked: explicit panic
+   |               ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: internal error: entered unreachable code
   --> $DIR/const_panic_2021.rs:12:15
    |
 LL | const C: () = std::unreachable!();
-   |               ^^^^^^^^^^^^^^^^^^^ evaluation panicked: internal error: entered unreachable code
+   |               ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: not implemented
   --> $DIR/const_panic_2021.rs:15:15
    |
 LL | const D: () = std::unimplemented!();
-   |               ^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: not implemented
+   |               ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = note: this error originates in the macro `std::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: hello
   --> $DIR/const_panic_2021.rs:18:15
    |
 LL | const E: () = std::panic!("{}", MSG);
-   |               ^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: hello
+   |               ^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: shark
   --> $DIR/const_panic_2021.rs:21:20
    |
 LL | const A_CORE: () = core::panic!("shark");
-   |                    ^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: shark
+   |                    ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/const_panic_2021.rs:24:20
    |
 LL | const B_CORE: () = core::panic!();
-   |                    ^^^^^^^^^^^^^^ evaluation panicked: explicit panic
+   |                    ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: internal error: entered unreachable code
   --> $DIR/const_panic_2021.rs:27:20
    |
 LL | const C_CORE: () = core::unreachable!();
-   |                    ^^^^^^^^^^^^^^^^^^^^ evaluation panicked: internal error: entered unreachable code
+   |                    ^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: not implemented
   --> $DIR/const_panic_2021.rs:30:20
    |
 LL | const D_CORE: () = core::unimplemented!();
-   |                    ^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: not implemented
+   |                    ^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = note: this error originates in the macro `core::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: hello
   --> $DIR/const_panic_2021.rs:33:20
    |
 LL | const E_CORE: () = core::panic!("{}", MSG);
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: hello
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 10 previous errors
 
diff --git a/tests/ui/consts/const-eval/const_panic_libcore_bin.rs b/tests/ui/consts/const-eval/const_panic_libcore_bin.rs
index d4dc1a51d73..90ae5165d23 100644
--- a/tests/ui/consts/const-eval/const_panic_libcore_bin.rs
+++ b/tests/ui/consts/const-eval/const_panic_libcore_bin.rs
@@ -6,13 +6,13 @@
 use core::panic::PanicInfo;
 
 const Z: () = panic!("cheese");
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const Y: () = unreachable!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 const X: () = unimplemented!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked
 
 #[lang = "eh_personality"]
 fn eh() {}
diff --git a/tests/ui/consts/const-eval/const_panic_libcore_bin.stderr b/tests/ui/consts/const-eval/const_panic_libcore_bin.stderr
index 2acab711290..3c308e38850 100644
--- a/tests/ui/consts/const-eval/const_panic_libcore_bin.stderr
+++ b/tests/ui/consts/const-eval/const_panic_libcore_bin.stderr
@@ -1,20 +1,20 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: cheese
   --> $DIR/const_panic_libcore_bin.rs:8:15
    |
 LL | const Z: () = panic!("cheese");
-   |               ^^^^^^^^^^^^^^^^ evaluation panicked: cheese
+   |               ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: internal error: entered unreachable code
   --> $DIR/const_panic_libcore_bin.rs:11:15
    |
 LL | const Y: () = unreachable!();
-   |               ^^^^^^^^^^^^^^ evaluation panicked: internal error: entered unreachable code
+   |               ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: not implemented
   --> $DIR/const_panic_libcore_bin.rs:14:15
    |
 LL | const X: () = unimplemented!();
-   |               ^^^^^^^^^^^^^^^^ evaluation panicked: not implemented
+   |               ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = note: this error originates in the macro `unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/consts/const-eval/const_panic_track_caller.rs b/tests/ui/consts/const-eval/const_panic_track_caller.rs
index 799a59d16ca..5f5d853eb97 100644
--- a/tests/ui/consts/const-eval/const_panic_track_caller.rs
+++ b/tests/ui/consts/const-eval/const_panic_track_caller.rs
@@ -17,5 +17,5 @@ const fn c() -> u32 {
 }
 
 const X: u32 = c();
-//~^ ERROR evaluation of constant value failed
-//~| NOTE hey
+//~^ NOTE evaluation of constant value failed
+//~| ERROR hey
diff --git a/tests/ui/consts/const-eval/const_panic_track_caller.stderr b/tests/ui/consts/const-eval/const_panic_track_caller.stderr
index 8736a8c9409..b4017ccf8da 100644
--- a/tests/ui/consts/const-eval/const_panic_track_caller.stderr
+++ b/tests/ui/consts/const-eval/const_panic_track_caller.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: hey
   --> $DIR/const_panic_track_caller.rs:19:16
    |
 LL | const X: u32 = c();
-   |                ^^^ evaluation panicked: hey
+   |                ^^^ evaluation of constant value failed here
    |
 note: inside `c`
   --> $DIR/const_panic_track_caller.rs:15:5
diff --git a/tests/ui/consts/const-eval/const_raw_ptr_ops2.rs b/tests/ui/consts/const-eval/const_raw_ptr_ops2.rs
index 0e88aa80c79..47998cf408c 100644
--- a/tests/ui/consts/const-eval/const_raw_ptr_ops2.rs
+++ b/tests/ui/consts/const-eval/const_raw_ptr_ops2.rs
@@ -4,7 +4,5 @@ fn main() {}
 const Z: i32 = unsafe { *(&1 as *const i32) };
 
 // bad, will thus error in miri
-const Z2: i32 = unsafe { *(42 as *const i32) }; //~ ERROR evaluation of constant value failed
-//~| NOTE dangling pointer
-const Z3: i32 = unsafe { *(44 as *const i32) }; //~ ERROR evaluation of constant value failed
-//~| NOTE dangling pointer
+const Z2: i32 = unsafe { *(42 as *const i32) }; //~ ERROR dangling pointer
+const Z3: i32 = unsafe { *(44 as *const i32) }; //~ ERROR dangling pointer
diff --git a/tests/ui/consts/const-eval/const_raw_ptr_ops2.stderr b/tests/ui/consts/const-eval/const_raw_ptr_ops2.stderr
index a8a5560ccb9..6f096ee5ce7 100644
--- a/tests/ui/consts/const-eval/const_raw_ptr_ops2.stderr
+++ b/tests/ui/consts/const-eval/const_raw_ptr_ops2.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: memory access failed: attempting to access 4 bytes, but got 0x2a[noalloc] which is a dangling pointer (it has no provenance)
   --> $DIR/const_raw_ptr_ops2.rs:7:26
    |
 LL | const Z2: i32 = unsafe { *(42 as *const i32) };
-   |                          ^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 4 bytes, but got 0x2a[noalloc] which is a dangling pointer (it has no provenance)
+   |                          ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const_raw_ptr_ops2.rs:9:26
+error[E0080]: memory access failed: attempting to access 4 bytes, but got 0x2c[noalloc] which is a dangling pointer (it has no provenance)
+  --> $DIR/const_raw_ptr_ops2.rs:8:26
    |
 LL | const Z3: i32 = unsafe { *(44 as *const i32) };
-   |                          ^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 4 bytes, but got 0x2c[noalloc] which is a dangling pointer (it has no provenance)
+   |                          ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr b/tests/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr
index a506f2a282b..b505b76a6ab 100644
--- a/tests/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr
+++ b/tests/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr
@@ -5,16 +5,11 @@ LL | const fn bar() -> u32 { foo() }
    |                         ^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn bar() -> u32 { foo() }
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(foo)]
-LL | const fn bar() -> u32 { foo() }
-   |
 
 error[E0716]: temporary value dropped while borrowed
   --> $DIR/dont_promote_unstable_const_fn.rs:17:28
diff --git a/tests/ui/consts/const-eval/float_methods.rs b/tests/ui/consts/const-eval/float_methods.rs
deleted file mode 100644
index 853f75825ac..00000000000
--- a/tests/ui/consts/const-eval/float_methods.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-//@ run-pass
-//! Tests the float intrinsics: min, max, abs, copysign
-
-#![feature(f16, f128)]
-
-const F16_MIN: f16 = 1.0_f16.min(0.5_f16);
-const F16_MAX: f16 = 1.0_f16.max(0.5_f16);
-const F16_ABS: f16 = (-1.0_f16).abs();
-const F16_COPYSIGN: f16 = 1.0_f16.copysign(-2.0_f16);
-
-const F32_MIN: f32 = 1.0_f32.min(0.5_f32);
-const F32_MAX: f32 = 1.0_f32.max(0.5_f32);
-const F32_ABS: f32 = (-1.0_f32).abs();
-const F32_COPYSIGN: f32 = 1.0_f32.copysign(-2.0_f32);
-
-const F64_MIN: f64 = 1.0_f64.min(0.5_f64);
-const F64_MAX: f64 = 1.0_f64.max(0.5_f64);
-const F64_ABS: f64 = (-1.0_f64).abs();
-const F64_COPYSIGN: f64 = 1.0_f64.copysign(-2.0_f64);
-
-const F128_MIN: f128 = 1.0_f128.min(0.5_f128);
-const F128_MAX: f128 = 1.0_f128.max(0.5_f128);
-const F128_ABS: f128 = (-1.0_f128).abs();
-const F128_COPYSIGN: f128 = 1.0_f128.copysign(-2.0_f128);
-
-fn main() {
-    assert_eq!(F16_MIN, 0.5);
-    assert_eq!(F16_MAX, 1.0);
-    assert_eq!(F16_ABS, 1.0);
-    assert_eq!(F16_COPYSIGN, -1.0);
-
-    assert_eq!(F32_MIN, 0.5);
-    assert_eq!(F32_MAX, 1.0);
-    assert_eq!(F32_ABS, 1.0);
-    assert_eq!(F32_COPYSIGN, -1.0);
-
-    assert_eq!(F64_MIN, 0.5);
-    assert_eq!(F64_MAX, 1.0);
-    assert_eq!(F64_ABS, 1.0);
-    assert_eq!(F64_COPYSIGN, -1.0);
-
-    assert_eq!(F128_MIN, 0.5);
-    assert_eq!(F128_MAX, 1.0);
-    assert_eq!(F128_ABS, 1.0);
-    assert_eq!(F128_COPYSIGN, -1.0);
-}
diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.rs b/tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.rs
index b47e2b3c1ed..d6e5a69671b 100644
--- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.rs
+++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.rs
@@ -4,7 +4,7 @@
 #![feature(const_heap)]
 use std::intrinsics;
 
-const FOO: i32 = foo(); //~ ERROR evaluation of constant value failed
+const FOO: i32 = foo(); //~ ERROR 3 is not a power of 2
 const fn foo() -> i32 {
     unsafe {
         let _ = intrinsics::const_allocate(4, 3) as *mut i32; //~ NOTE inside `foo`
diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.stderr b/tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.stderr
index 9f7546df3a2..9132c7e9cd4 100644
--- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.stderr
+++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_errors.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: invalid align passed to `const_allocate`: 3 is not a power of 2
   --> $DIR/alloc_intrinsic_errors.rs:7:18
    |
 LL | const FOO: i32 = foo();
-   |                  ^^^^^ invalid align passed to `const_allocate`: 3 is not a power of 2
+   |                  ^^^^^ evaluation of constant value failed here
    |
 note: inside `foo`
   --> $DIR/alloc_intrinsic_errors.rs:10:17
diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr
index 271c8611091..11ed0841a00 100644
--- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr
+++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>: encountered uninitialized memory, but expected an integer
   --> $DIR/alloc_intrinsic_uninit.rs:7:1
    |
 LL | const BAR: &i32 = unsafe { &*(intrinsics::const_allocate(4, 4) as *mut i32) };
-   | ^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^ 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: 4, align: 4) {
diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr
index ec7cc7d4140..691bde87d2f 100644
--- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr
+++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>: encountered uninitialized memory, but expected an integer
   --> $DIR/alloc_intrinsic_uninit.rs:7:1
    |
 LL | const BAR: &i32 = unsafe { &*(intrinsics::const_allocate(4, 4) as *mut i32) };
-   | ^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^ 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: 8, align: 8) {
diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs
index c283a5fae7d..ffc35ca1ddc 100644
--- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs
+++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.rs
@@ -5,5 +5,5 @@
 use std::intrinsics;
 
 const BAR: &i32 = unsafe { &*(intrinsics::const_allocate(4, 4) as *mut i32) };
-//~^ error: it is undefined behavior to use this value
+//~^ ERROR: uninitialized memory
 fn main() {}
diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs
index 509c872f609..de9fc5d0921 100644
--- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs
+++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs
@@ -9,7 +9,7 @@
 use std::intrinsics;
 
 const _X: &'static u8 = unsafe {
-    //~^ error: it is undefined behavior to use this value
+    //~^ ERROR: dangling reference (use-after-free)
     let ptr = intrinsics::const_allocate(4, 4);
     intrinsics::const_deallocate(ptr, 4, 4);
     &*ptr
@@ -20,7 +20,7 @@ const _Y: u8 = unsafe {
     let reference = &*ptr;
     intrinsics::const_deallocate(ptr, 4, 4);
     *reference
-    //~^ error: evaluation of constant value failed
+    //~^ ERROR: has been freed, so this pointer is dangling
 };
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr
index 0b0d2676dd3..cb419f2f739 100644
--- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr
+++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr
@@ -1,19 +1,19 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered a dangling reference (use-after-free)
   --> $DIR/dealloc_intrinsic_dangling.rs:11:1
    |
 LL | const _X: &'static u8 = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (use-after-free)
+   | ^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
+error[E0080]: memory access failed: ALLOC1 has been freed, so this pointer is dangling
   --> $DIR/dealloc_intrinsic_dangling.rs:22:5
    |
 LL |     *reference
-   |     ^^^^^^^^^^ memory access failed: ALLOC1 has been freed, so this pointer is dangling
+   |     ^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.rs b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.rs
index 4010b476990..5b7cd039b9b 100644
--- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.rs
+++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.rs
@@ -7,7 +7,7 @@ const _X: () = unsafe {
     let ptr = intrinsics::const_allocate(4, 4);
     intrinsics::const_deallocate(ptr, 4, 4);
     intrinsics::const_deallocate(ptr, 4, 4);
-    //~^ error: evaluation of constant value failed
+    //~^ ERROR: dangling
 };
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr
index d2d323e5a51..3038d60f202 100644
--- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr
+++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: memory access failed: ALLOC0 has been freed, so this pointer is dangling
   --> $DIR/dealloc_intrinsic_duplicate.rs:9:5
    |
 LL |     intrinsics::const_deallocate(ptr, 4, 4);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: ALLOC0 has been freed, so this pointer is dangling
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.rs b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.rs
index 031d70fdc88..75c3601f216 100644
--- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.rs
+++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.rs
@@ -6,24 +6,24 @@ use std::intrinsics;
 const _X: () = unsafe {
     let ptr = intrinsics::const_allocate(4, 4);
     intrinsics::const_deallocate(ptr, 4, 2);
-    //~^ error: evaluation of constant value failed
+    //~^ error: incorrect layout on deallocation
 };
 const _Y: () = unsafe {
     let ptr = intrinsics::const_allocate(4, 4);
     intrinsics::const_deallocate(ptr, 2, 4);
-    //~^ error: evaluation of constant value failed
+    //~^ error: incorrect layout on deallocation
 };
 
 const _Z: () = unsafe {
     let ptr = intrinsics::const_allocate(4, 4);
     intrinsics::const_deallocate(ptr, 3, 4);
-    //~^ error: evaluation of constant value failed
+    //~^ error: incorrect layout on deallocation
 };
 
 const _W: () = unsafe {
     let ptr = intrinsics::const_allocate(4, 4);
     intrinsics::const_deallocate(ptr, 4, 3);
-    //~^ error: evaluation of constant value failed
+    //~^ error: invalid align
 };
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.stderr b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.stderr
index 4b1f0f686ca..dea55c6086e 100644
--- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.stderr
+++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.stderr
@@ -1,26 +1,26 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: incorrect layout on deallocation: ALLOC0 has size 4 and alignment 4, but gave size 4 and alignment 2
   --> $DIR/dealloc_intrinsic_incorrect_layout.rs:8:5
    |
 LL |     intrinsics::const_deallocate(ptr, 4, 2);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: ALLOC0 has size 4 and alignment 4, but gave size 4 and alignment 2
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: incorrect layout on deallocation: ALLOC1 has size 4 and alignment 4, but gave size 2 and alignment 4
   --> $DIR/dealloc_intrinsic_incorrect_layout.rs:13:5
    |
 LL |     intrinsics::const_deallocate(ptr, 2, 4);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: ALLOC1 has size 4 and alignment 4, but gave size 2 and alignment 4
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: incorrect layout on deallocation: ALLOC2 has size 4 and alignment 4, but gave size 3 and alignment 4
   --> $DIR/dealloc_intrinsic_incorrect_layout.rs:19:5
    |
 LL |     intrinsics::const_deallocate(ptr, 3, 4);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: ALLOC2 has size 4 and alignment 4, but gave size 3 and alignment 4
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: invalid align passed to `const_deallocate`: 3 is not a power of 2
   --> $DIR/dealloc_intrinsic_incorrect_layout.rs:25:5
    |
 LL |     intrinsics::const_deallocate(ptr, 4, 3);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid align passed to `const_deallocate`: 3 is not a power of 2
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs b/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs
index 25ffc9cbdba..6777bee050a 100644
--- a/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs
+++ b/tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs
@@ -8,7 +8,7 @@ struct PrintName<T>(T);
 
 impl<T> PrintName<T> {
     const VOID: ! = { let x = 0 * std::mem::size_of::<T>(); [][x] };
-    //~^ ERROR evaluation of `PrintName::<()>::VOID` failed
+    //~^ ERROR index out of bounds: the length is 0 but the index is 0
 
 }
 
diff --git a/tests/ui/consts/const-eval/index-out-of-bounds-never-type.stderr b/tests/ui/consts/const-eval/index-out-of-bounds-never-type.stderr
index 7facb2d1a5c..7e57e16aa4f 100644
--- a/tests/ui/consts/const-eval/index-out-of-bounds-never-type.stderr
+++ b/tests/ui/consts/const-eval/index-out-of-bounds-never-type.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `PrintName::<()>::VOID` failed
+error[E0080]: index out of bounds: the length is 0 but the index is 0
   --> $DIR/index-out-of-bounds-never-type.rs:10:61
    |
 LL |     const VOID: ! = { let x = 0 * std::mem::size_of::<T>(); [][x] };
-   |                                                             ^^^^^ index out of bounds: the length is 0 but the index is 0
+   |                                                             ^^^^^ evaluation of `PrintName::<()>::VOID` failed here
 
 note: erroneous constant encountered
   --> $DIR/index-out-of-bounds-never-type.rs:16:13
diff --git a/tests/ui/consts/const-eval/index_out_of_bounds.stderr b/tests/ui/consts/const-eval/index_out_of_bounds.stderr
index d8df74fa010..f4ec4c516fd 100644
--- a/tests/ui/consts/const-eval/index_out_of_bounds.stderr
+++ b/tests/ui/consts/const-eval/index_out_of_bounds.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: index out of bounds: the length is 0 but the index is 0
   --> $DIR/index_out_of_bounds.rs:1:19
    |
 LL | static FOO: i32 = [][0];
-   |                   ^^^^^ index out of bounds: the length is 0 but the index is 0
+   |                   ^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/issue-43197.rs b/tests/ui/consts/const-eval/issue-43197.rs
index 145463f0ae2..778a66facb8 100644
--- a/tests/ui/consts/const-eval/issue-43197.rs
+++ b/tests/ui/consts/const-eval/issue-43197.rs
@@ -4,8 +4,8 @@ const fn foo(x: u32) -> u32 {
 
 fn main() {
     const X: u32 = 0 - 1;
-    //~^ ERROR constant
+    //~^ ERROR overflow
     const Y: u32 = foo(0 - 1);
-    //~^ ERROR constant
+    //~^ ERROR overflow
     println!("{} {}", X, Y);
 }
diff --git a/tests/ui/consts/const-eval/issue-43197.stderr b/tests/ui/consts/const-eval/issue-43197.stderr
index c59f13e4888..cad23becff7 100644
--- a/tests/ui/consts/const-eval/issue-43197.stderr
+++ b/tests/ui/consts/const-eval/issue-43197.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `0_u32 - 1_u32`, which would overflow
   --> $DIR/issue-43197.rs:6:20
    |
 LL |     const X: u32 = 0 - 1;
-   |                    ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
+   |                    ^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `0_u32 - 1_u32`, which would overflow
   --> $DIR/issue-43197.rs:8:24
    |
 LL |     const Y: u32 = foo(0 - 1);
-   |                        ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
+   |                        ^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const-eval/issue-44578.rs b/tests/ui/consts/const-eval/issue-44578.rs
index 565e1d3825b..ebd54f4079c 100644
--- a/tests/ui/consts/const-eval/issue-44578.rs
+++ b/tests/ui/consts/const-eval/issue-44578.rs
@@ -11,7 +11,7 @@ enum Bar<A, B> {
 }
 
 impl<A: Foo, B: Foo> Foo for Bar<A, B> {
-    const AMT: usize = [A::AMT][(A::AMT > B::AMT) as usize]; //~ERROR evaluation of `<Bar<u16, u8> as Foo>::AMT` failed
+    const AMT: usize = [A::AMT][(A::AMT > B::AMT) as usize]; //~ERROR the length is 1 but the index is 1
 }
 
 impl Foo for u8 {
diff --git a/tests/ui/consts/const-eval/issue-44578.stderr b/tests/ui/consts/const-eval/issue-44578.stderr
index 5093cec81c7..fd0b9ae1e17 100644
--- a/tests/ui/consts/const-eval/issue-44578.stderr
+++ b/tests/ui/consts/const-eval/issue-44578.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `<Bar<u16, u8> as Foo>::AMT` failed
+error[E0080]: index out of bounds: the length is 1 but the index is 1
   --> $DIR/issue-44578.rs:14:24
    |
 LL |     const AMT: usize = [A::AMT][(A::AMT > B::AMT) as usize];
-   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 1
+   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `<Bar<u16, u8> as Foo>::AMT` failed here
 
 note: erroneous constant encountered
   --> $DIR/issue-44578.rs:26:20
diff --git a/tests/ui/consts/const-eval/issue-49296.rs b/tests/ui/consts/const-eval/issue-49296.rs
index 917777a32ff..a427b642899 100644
--- a/tests/ui/consts/const-eval/issue-49296.rs
+++ b/tests/ui/consts/const-eval/issue-49296.rs
@@ -7,7 +7,7 @@ const fn wat(x: u64) -> &'static u64 {
 }
 
 const X: u64 = *wat(42);
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR dangling
 
 fn main() {
     println!("{}", X);
diff --git a/tests/ui/consts/const-eval/issue-49296.stderr b/tests/ui/consts/const-eval/issue-49296.stderr
index 485a11d1f3c..4a66ec6c940 100644
--- a/tests/ui/consts/const-eval/issue-49296.stderr
+++ b/tests/ui/consts/const-eval/issue-49296.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: memory access failed: ALLOC0 has been freed, so this pointer is dangling
   --> $DIR/issue-49296.rs:9:16
    |
 LL | const X: u64 = *wat(42);
-   |                ^^^^^^^^ memory access failed: ALLOC0 has been freed, so this pointer is dangling
+   |                ^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr b/tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr
index 1f4f217b175..6c0d6cf8b21 100644
--- a/tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr
+++ b/tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `<A<()> as Foo<()>>::BAR` failed
+error[E0080]: index out of bounds: the length is 3 but the index is 42
   --> $DIR/issue-50814-2.rs:17:24
    |
 LL |     const BAR: usize = [5, 6, 7][T::BOO];
-   |                        ^^^^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 42
+   |                        ^^^^^^^^^^^^^^^^^ evaluation of `<A<()> as Foo<()>>::BAR` failed here
 
 note: erroneous constant encountered
   --> $DIR/issue-50814-2.rs:21:6
diff --git a/tests/ui/consts/const-eval/issue-50814-2.normal.stderr b/tests/ui/consts/const-eval/issue-50814-2.normal.stderr
index f790862aef1..749c9dde1ce 100644
--- a/tests/ui/consts/const-eval/issue-50814-2.normal.stderr
+++ b/tests/ui/consts/const-eval/issue-50814-2.normal.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `<A<()> as Foo<()>>::BAR` failed
+error[E0080]: index out of bounds: the length is 3 but the index is 42
   --> $DIR/issue-50814-2.rs:17:24
    |
 LL |     const BAR: usize = [5, 6, 7][T::BOO];
-   |                        ^^^^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 42
+   |                        ^^^^^^^^^^^^^^^^^ evaluation of `<A<()> as Foo<()>>::BAR` failed here
 
 note: erroneous constant encountered
   --> $DIR/issue-50814-2.rs:21:6
diff --git a/tests/ui/consts/const-eval/issue-50814-2.rs b/tests/ui/consts/const-eval/issue-50814-2.rs
index 261dcd3aa4c..1b917a0916d 100644
--- a/tests/ui/consts/const-eval/issue-50814-2.rs
+++ b/tests/ui/consts/const-eval/issue-50814-2.rs
@@ -14,7 +14,7 @@ trait Foo<T> {
 struct A<T>(T);
 
 impl<T: C> Foo<T> for A<T> {
-    const BAR: usize = [5, 6, 7][T::BOO]; //~ ERROR evaluation of `<A<()> as Foo<()>>::BAR` failed
+    const BAR: usize = [5, 6, 7][T::BOO]; //~ ERROR index out of bounds: the length is 3 but the index is 42
 }
 
 fn foo<T: C>() -> &'static usize {
diff --git a/tests/ui/consts/const-eval/issue-50814.rs b/tests/ui/consts/const-eval/issue-50814.rs
index 5495fb43bba..011f065ad81 100644
--- a/tests/ui/consts/const-eval/issue-50814.rs
+++ b/tests/ui/consts/const-eval/issue-50814.rs
@@ -14,8 +14,8 @@ struct Sum<A, B>(A, B);
 
 impl<A: Unsigned, B: Unsigned> Unsigned for Sum<A, B> {
     const MAX: u8 = A::MAX + B::MAX;
-    //~^ ERROR evaluation of `<Sum<U8, U8> as Unsigned>::MAX` failed
-    //~| ERROR evaluation of `<Sum<U8, U8> as Unsigned>::MAX` failed
+    //~^ ERROR attempt to compute `u8::MAX + u8::MAX`, which would overflow
+    //~| ERROR attempt to compute `u8::MAX + u8::MAX`, which would overflow
 }
 
 fn foo<T>(_: T) -> &'static u8 {
diff --git a/tests/ui/consts/const-eval/issue-50814.stderr b/tests/ui/consts/const-eval/issue-50814.stderr
index 5b23c48e450..1287c83ae0f 100644
--- a/tests/ui/consts/const-eval/issue-50814.stderr
+++ b/tests/ui/consts/const-eval/issue-50814.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `<Sum<U8, U8> as Unsigned>::MAX` failed
+error[E0080]: attempt to compute `u8::MAX + u8::MAX`, which would overflow
   --> $DIR/issue-50814.rs:16:21
    |
 LL |     const MAX: u8 = A::MAX + B::MAX;
-   |                     ^^^^^^^^^^^^^^^ attempt to compute `u8::MAX + u8::MAX`, which would overflow
+   |                     ^^^^^^^^^^^^^^^ evaluation of `<Sum<U8, U8> as Unsigned>::MAX` failed here
 
 note: erroneous constant encountered
   --> $DIR/issue-50814.rs:22:6
@@ -10,11 +10,11 @@ note: erroneous constant encountered
 LL |     &Sum::<U8, U8>::MAX
    |      ^^^^^^^^^^^^^^^^^^
 
-error[E0080]: evaluation of `<Sum<U8, U8> as Unsigned>::MAX` failed
+error[E0080]: attempt to compute `u8::MAX + u8::MAX`, which would overflow
   --> $DIR/issue-50814.rs:16:21
    |
 LL |     const MAX: u8 = A::MAX + B::MAX;
-   |                     ^^^^^^^^^^^^^^^ attempt to compute `u8::MAX + u8::MAX`, which would overflow
+   |                     ^^^^^^^^^^^^^^^ evaluation of `<Sum<U8, U8> as Unsigned>::MAX` failed here
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
diff --git a/tests/ui/consts/const-eval/issue-85155.rs b/tests/ui/consts/const-eval/issue-85155.rs
index cb5b3a08375..c47101d04c2 100644
--- a/tests/ui/consts/const-eval/issue-85155.rs
+++ b/tests/ui/consts/const-eval/issue-85155.rs
@@ -20,5 +20,5 @@ fn main() {
     //~^ NOTE the above error was encountered while instantiating
 }
 
-//~? ERROR evaluation of `post_monomorphization_error::ValidateConstImm::<2, 0, 1>::VALID` failed
+//~? ERROR attempt to divide `1_usize` by zero
 //~? NOTE erroneous constant encountered
diff --git a/tests/ui/consts/const-eval/issue-85155.stderr b/tests/ui/consts/const-eval/issue-85155.stderr
index 99836a3fac6..f7777bfac02 100644
--- a/tests/ui/consts/const-eval/issue-85155.stderr
+++ b/tests/ui/consts/const-eval/issue-85155.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `post_monomorphization_error::ValidateConstImm::<2, 0, 1>::VALID` failed
+error[E0080]: attempt to divide `1_usize` by zero
   --> $DIR/auxiliary/post_monomorphization_error.rs:7:17
    |
 LL |         let _ = 1 / ((IMM >= MIN && IMM <= MAX) as usize);
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to divide `1_usize` by zero
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `post_monomorphization_error::ValidateConstImm::<2, 0, 1>::VALID` failed here
 
 note: erroneous constant encountered
   --> $DIR/auxiliary/post_monomorphization_error.rs:19:5
diff --git a/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs b/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs
index 3a932343ddd..12effde1a9b 100644
--- a/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs
+++ b/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs
@@ -36,8 +36,7 @@ const OFFSET: () = unsafe {
     // This needs to compute the field offset, but we don't know the type's alignment, so this
     // fails.
     let field = &x.a;
-    //~^ ERROR: evaluation of constant value failed
-    //~| NOTE does not have a known offset
+    //~^ ERROR: does not have a known offset
 };
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr b/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr
index 54d45ee8ffb..ffff7594e3d 100644
--- a/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr
+++ b/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: `extern type` field does not have a known offset
   --> $DIR/issue-91827-extern-types-field-offset.rs:38:17
    |
 LL |     let field = &x.a;
-   |                 ^^^^ `extern type` field does not have a known offset
+   |                 ^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/mod-static-with-const-fn.rs b/tests/ui/consts/const-eval/mod-static-with-const-fn.rs
index 7de9d44305d..ce2ecaa2638 100644
--- a/tests/ui/consts/const-eval/mod-static-with-const-fn.rs
+++ b/tests/ui/consts/const-eval/mod-static-with-const-fn.rs
@@ -12,7 +12,7 @@ static FOO: Foo = Foo(UnsafeCell::new(42));
 
 static BAR: () = unsafe {
     *FOO.0.get() = 5;
-    //~^ ERROR could not evaluate static initializer
+    //~^ ERROR modifying a static's initial value
 };
 
 fn main() {
diff --git a/tests/ui/consts/const-eval/mod-static-with-const-fn.stderr b/tests/ui/consts/const-eval/mod-static-with-const-fn.stderr
index 47bfc235a1a..f8cf6096095 100644
--- a/tests/ui/consts/const-eval/mod-static-with-const-fn.stderr
+++ b/tests/ui/consts/const-eval/mod-static-with-const-fn.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: modifying a static's initial value from another static's initializer
   --> $DIR/mod-static-with-const-fn.rs:14:5
    |
 LL |     *FOO.0.get() = 5;
-   |     ^^^^^^^^^^^^^^^^ modifying a static's initial value from another static's initializer
+   |     ^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/nonnull_as_ref_ub.rs b/tests/ui/consts/const-eval/nonnull_as_ref_ub.rs
index 19ab5239986..908833e6514 100644
--- a/tests/ui/consts/const-eval/nonnull_as_ref_ub.rs
+++ b/tests/ui/consts/const-eval/nonnull_as_ref_ub.rs
@@ -1,6 +1,6 @@
 use std::ptr::NonNull;
 
 const NON_NULL: NonNull<u8> = unsafe { NonNull::dangling() };
-const _: () = assert!(42 == *unsafe { NON_NULL.as_ref() }); //~ERROR: evaluation of constant value failed
+const _: () = assert!(42 == *unsafe { NON_NULL.as_ref() }); //~ERROR: dangling pointer (it has no provenance)
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr b/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr
index 1996cd2721e..32ae9475560 100644
--- a/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr
+++ b/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: memory access failed: attempting to access 1 byte, but got 0x1[noalloc] which is a dangling pointer (it has no provenance)
   --> $DIR/nonnull_as_ref_ub.rs:4:29
    |
 LL | const _: () = assert!(42 == *unsafe { NON_NULL.as_ref() });
-   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 1 byte, but got 0x1[noalloc] which is a dangling pointer (it has no provenance)
+   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/panic-assoc-never-type.rs b/tests/ui/consts/const-eval/panic-assoc-never-type.rs
index 79b5dafaf15..a0a5ba36bfe 100644
--- a/tests/ui/consts/const-eval/panic-assoc-never-type.rs
+++ b/tests/ui/consts/const-eval/panic-assoc-never-type.rs
@@ -8,7 +8,7 @@ struct PrintName;
 
 impl PrintName {
     const VOID: ! = panic!();
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR explicit panic
 }
 
 fn main() {
diff --git a/tests/ui/consts/const-eval/panic-assoc-never-type.stderr b/tests/ui/consts/const-eval/panic-assoc-never-type.stderr
index 03413f46b20..64c9f92d5ee 100644
--- a/tests/ui/consts/const-eval/panic-assoc-never-type.stderr
+++ b/tests/ui/consts/const-eval/panic-assoc-never-type.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/panic-assoc-never-type.rs:10:21
    |
 LL |     const VOID: ! = panic!();
-   |                     ^^^^^^^^ evaluation panicked: explicit panic
+   |                     ^^^^^^^^ evaluation of constant value failed here
 
 note: erroneous constant encountered
   --> $DIR/panic-assoc-never-type.rs:15:13
diff --git a/tests/ui/consts/const-eval/panic-never-type.rs b/tests/ui/consts/const-eval/panic-never-type.rs
index a9e9026d9bc..d9b46e70b35 100644
--- a/tests/ui/consts/const-eval/panic-never-type.rs
+++ b/tests/ui/consts/const-eval/panic-never-type.rs
@@ -2,7 +2,7 @@
 #![feature(never_type)]
 
 const VOID: ! = panic!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR explicit panic
 
 fn main() {
     let _ = VOID;
diff --git a/tests/ui/consts/const-eval/panic-never-type.stderr b/tests/ui/consts/const-eval/panic-never-type.stderr
index 1d9bba9aea2..cacce93babe 100644
--- a/tests/ui/consts/const-eval/panic-never-type.stderr
+++ b/tests/ui/consts/const-eval/panic-never-type.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/panic-never-type.rs:4:17
    |
 LL | const VOID: ! = panic!();
-   |                 ^^^^^^^^ evaluation panicked: explicit panic
+   |                 ^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/parse_ints.rs b/tests/ui/consts/const-eval/parse_ints.rs
index 309b7ee5d27..409fae9e51d 100644
--- a/tests/ui/consts/const-eval/parse_ints.rs
+++ b/tests/ui/consts/const-eval/parse_ints.rs
@@ -2,7 +2,7 @@ const _OK: () = match i32::from_str_radix("-1234", 10) {
     Ok(x) => assert!(x == -1234),
     Err(_) => panic!(),
 };
-const _TOO_LOW: () = { u64::from_str_radix("12345ABCD", 1); }; //~ ERROR evaluation of constant value failed
-const _TOO_HIGH: () = { u64::from_str_radix("12345ABCD", 37); }; //~ ERROR evaluation of constant value failed
+const _TOO_LOW: () = { u64::from_str_radix("12345ABCD", 1); }; //~ ERROR radix must lie in the range `[2, 36]`
+const _TOO_HIGH: () = { u64::from_str_radix("12345ABCD", 37); }; //~ ERROR radix must lie in the range `[2, 36]`
 
 fn main () {}
diff --git a/tests/ui/consts/const-eval/parse_ints.stderr b/tests/ui/consts/const-eval/parse_ints.stderr
index 7a855bb9e5c..99aad805a2d 100644
--- a/tests/ui/consts/const-eval/parse_ints.stderr
+++ b/tests/ui/consts/const-eval/parse_ints.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: from_ascii_radix: radix must lie in the range `[2, 36]`
   --> $DIR/parse_ints.rs:5:24
    |
 LL | const _TOO_LOW: () = { u64::from_str_radix("12345ABCD", 1); };
-   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: from_ascii_radix: radix must lie in the range `[2, 36]`
+   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `core::num::<impl u64>::from_str_radix`
   --> $SRC_DIR/core/src/num/mod.rs:LL:COL
@@ -10,11 +10,11 @@ note: inside `core::num::<impl u64>::from_ascii_radix`
   --> $SRC_DIR/core/src/num/mod.rs:LL:COL
    = note: this error originates in the macro `from_str_int_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: from_ascii_radix: radix must lie in the range `[2, 36]`
   --> $DIR/parse_ints.rs:6:25
    |
 LL | const _TOO_HIGH: () = { u64::from_str_radix("12345ABCD", 37); };
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: from_ascii_radix: radix must lie in the range `[2, 36]`
+   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `core::num::<impl u64>::from_str_radix`
   --> $SRC_DIR/core/src/num/mod.rs:LL:COL
diff --git a/tests/ui/consts/const-eval/partial_ptr_overwrite.rs b/tests/ui/consts/const-eval/partial_ptr_overwrite.rs
index 9438de5e3fe..bd97bec0f71 100644
--- a/tests/ui/consts/const-eval/partial_ptr_overwrite.rs
+++ b/tests/ui/consts/const-eval/partial_ptr_overwrite.rs
@@ -4,8 +4,7 @@ const PARTIAL_OVERWRITE: () = {
     let mut p = &42;
     unsafe {
         let ptr: *mut _ = &mut p;
-        *(ptr as *mut u8) = 123; //~ ERROR constant
-        //~| NOTE unable to overwrite parts of a pointer
+        *(ptr as *mut u8) = 123; //~ ERROR unable to overwrite parts of a pointer
     }
     let x = *p;
 };
diff --git a/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr b/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr
index 1443d353848..4d514495e73 100644
--- a/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr
+++ b/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to overwrite parts of a pointer in memory at ALLOC0
   --> $DIR/partial_ptr_overwrite.rs:7:9
    |
 LL |         *(ptr as *mut u8) = 123;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^ unable to overwrite parts of a pointer in memory at ALLOC0
+   |         ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
diff --git a/tests/ui/consts/const-eval/ptr-to-int-transmute-in-consts-issue-87525.rs b/tests/ui/consts/const-eval/ptr-to-int-transmute-in-consts-issue-87525.rs
index 19c78f019aa..5fab075785a 100644
--- a/tests/ui/consts/const-eval/ptr-to-int-transmute-in-consts-issue-87525.rs
+++ b/tests/ui/consts/const-eval/ptr-to-int-transmute-in-consts-issue-87525.rs
@@ -1,7 +1,9 @@
+#![deny(ptr_to_integer_transmute_in_consts)]
+
 const fn foo(ptr: *const u8) -> usize {
     unsafe {
         std::mem::transmute(ptr)
-        //~^ WARN pointers cannot be transmuted to integers
+        //~^ ERROR pointers cannot be transmuted to integers
     }
 }
 
@@ -11,7 +13,7 @@ trait Human {
         let ptr: *const usize = &value;
         unsafe {
             std::mem::transmute(ptr)
-            //~^ WARN pointers cannot be transmuted to integers
+            //~^ ERROR pointers cannot be transmuted to integers
         }
     };
 
@@ -28,7 +30,7 @@ impl<T> Type<T> {
         let ptr: *const usize = &value;
         unsafe {
             std::mem::transmute(ptr)
-            //~^ WARN pointers cannot be transmuted to integers
+            //~^ ERROR pointers cannot be transmuted to integers
         }
     };
 
@@ -38,9 +40,7 @@ impl<T> Type<T> {
 }
 
 fn control(ptr: *const u8) -> usize {
-    unsafe {
-        std::mem::transmute(ptr)
-    }
+    unsafe { std::mem::transmute(ptr) }
 }
 
 struct ControlStruct;
@@ -49,22 +49,15 @@ impl ControlStruct {
     fn new() -> usize {
         let value = 10;
         let ptr: *const i32 = &value;
-        unsafe {
-            std::mem::transmute(ptr)
-        }
+        unsafe { std::mem::transmute(ptr) }
     }
 }
 
-
 const fn zoom(ptr: *const u8) -> usize {
     unsafe {
         std::mem::transmute(ptr)
-        //~^ WARN pointers cannot be transmuted to integers
+        //~^ ERROR pointers cannot be transmuted to integers
     }
 }
 
-fn main() {
-    const a: u8 = 10;
-    const value: usize = zoom(&a);
-    //~^ ERROR evaluation of constant value failed
-}
+fn main() {}
diff --git a/tests/ui/consts/const-eval/ptr-to-int-transmute-in-consts-issue-87525.stderr b/tests/ui/consts/const-eval/ptr-to-int-transmute-in-consts-issue-87525.stderr
index ca6ad9408ab..2a9d9b5cb96 100644
--- a/tests/ui/consts/const-eval/ptr-to-int-transmute-in-consts-issue-87525.stderr
+++ b/tests/ui/consts/const-eval/ptr-to-int-transmute-in-consts-issue-87525.stderr
@@ -1,5 +1,5 @@
-warning: pointers cannot be transmuted to integers during const eval
-  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:61:9
+error: pointers cannot be transmuted to integers during const eval
+  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:5:9
    |
 LL |         std::mem::transmute(ptr)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -7,29 +7,24 @@ LL |         std::mem::transmute(ptr)
    = note: at compile-time, pointers do not have an integer value
    = note: avoiding this restriction via `union` or raw pointers leads to compile-time undefined behavior
    = help: for more information, see https://doc.rust-lang.org/std/mem/fn.transmute.html
-   = note: `#[warn(ptr_to_integer_transmute_in_consts)]` on by default
-
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:68:26
-   |
-LL |     const value: usize = zoom(&a);
-   |                          ^^^^^^^^ unable to turn pointer into integer
+note: the lint level is defined here
+  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:1:9
    |
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
+LL | #![deny(ptr_to_integer_transmute_in_consts)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: pointers cannot be transmuted to integers during const eval
-  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:3:9
+error: pointers cannot be transmuted to integers during const eval
+  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:15:13
    |
-LL |         std::mem::transmute(ptr)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^
+LL |             std::mem::transmute(ptr)
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: at compile-time, pointers do not have an integer value
    = note: avoiding this restriction via `union` or raw pointers leads to compile-time undefined behavior
    = help: for more information, see https://doc.rust-lang.org/std/mem/fn.transmute.html
 
-warning: pointers cannot be transmuted to integers during const eval
-  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:13:13
+error: pointers cannot be transmuted to integers during const eval
+  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:32:13
    |
 LL |             std::mem::transmute(ptr)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -38,16 +33,15 @@ LL |             std::mem::transmute(ptr)
    = note: avoiding this restriction via `union` or raw pointers leads to compile-time undefined behavior
    = help: for more information, see https://doc.rust-lang.org/std/mem/fn.transmute.html
 
-warning: pointers cannot be transmuted to integers during const eval
-  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:30:13
+error: pointers cannot be transmuted to integers during const eval
+  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:58:9
    |
-LL |             std::mem::transmute(ptr)
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         std::mem::transmute(ptr)
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: at compile-time, pointers do not have an integer value
    = note: avoiding this restriction via `union` or raw pointers leads to compile-time undefined behavior
    = help: for more information, see https://doc.rust-lang.org/std/mem/fn.transmute.html
 
-error: aborting due to 1 previous error; 4 warnings emitted
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
index 120a08acc33..36183e28921 100644
--- a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
+++ b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
@@ -1,340 +1,340 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-tag>: encountered 0x00000001, but expected a valid enum tag
   --> $DIR/raw-bytes.rs:23:1
    |
 LL | const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x00000001, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                01 00 00 00                                     │ ....
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-tag>: encountered 0x00000000, but expected a valid enum tag
   --> $DIR/raw-bytes.rs:31:1
    |
 LL | const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x00000000, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                00 00 00 00                                     │ ....
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
   --> $DIR/raw-bytes.rs:45:1
    |
 LL | const BAD_UNINHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute(1u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
                01                                              │ .
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
   --> $DIR/raw-bytes.rs:47:1
    |
 LL | const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
                03                                              │ .
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-variant(Some)>.0.1: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
   --> $DIR/raw-bytes.rs:53:1
    |
 LL | const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::transmute(!0u32) }));
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0.1: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                78 00 00 00 ff ff ff ff                         │ x.......
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 0, but expected something greater or equal to 1
   --> $DIR/raw-bytes.rs:58:1
    |
 LL | const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                00 00 00 00                                     │ ....
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
   --> $DIR/raw-bytes.rs:61:1
    |
 LL | const NULL_U8: NonZero<u8> = unsafe { mem::transmute(0u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
                00                                              │ .
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
   --> $DIR/raw-bytes.rs:63:1
    |
 LL | const NULL_USIZE: NonZero<usize> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                00 00 00 00                                     │ ....
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 42, but expected something in the range 10..=30
   --> $DIR/raw-bytes.rs:69:1
    |
 LL | const BAD_RANGE1: RestrictedRange1 = unsafe { RestrictedRange1(42) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 42, but expected something in the range 10..=30
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                2a 00 00 00                                     │ *...
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 20, but expected something less or equal to 10, or greater or equal to 30
   --> $DIR/raw-bytes.rs:75:1
    |
 LL | const BAD_RANGE2: RestrictedRange2 = unsafe { RestrictedRange2(20) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 20, but expected something less or equal to 10, or greater or equal to 30
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                14 00 00 00                                     │ ....
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 0, but expected something greater or equal to 1
   --> $DIR/raw-bytes.rs:78:1
    |
 LL | const NULL_FAT_PTR: NonNull<dyn Send> = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                00 00 00 00 ╾ALLOC_ID╼                         │ ....╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:86:1
+error[E0080]: constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+  --> $DIR/raw-bytes.rs:85:1
    |
 LL | const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+   | ^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                ╾ALLOC_ID╼                                     │ ╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:90:1
+error[E0080]: constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
+  --> $DIR/raw-bytes.rs:88:1
    |
 LL | const UNALIGNED_BOX: Box<u16> = unsafe { mem::transmute(&[0u8; 4]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                ╾ALLOC_ID╼                                     │ ╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:94:1
+error[E0080]: constructing invalid value: encountered a null reference
+  --> $DIR/raw-bytes.rs:91:1
    |
 LL | const NULL: &u16 = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
+   | ^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                00 00 00 00                                     │ ....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:97:1
+error[E0080]: constructing invalid value: encountered a null box
+  --> $DIR/raw-bytes.rs:94:1
    |
 LL | const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null box
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                00 00 00 00                                     │ ....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:100:1
+error[E0080]: constructing invalid value: encountered a dangling reference (0x539[noalloc] has no provenance)
+  --> $DIR/raw-bytes.rs:97:1
    |
 LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (0x539[noalloc] has no provenance)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                39 05 00 00                                     │ 9...
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:103:1
+error[E0080]: constructing invalid value: encountered a dangling box (0x539[noalloc] has no provenance)
+  --> $DIR/raw-bytes.rs:100:1
    |
 LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (0x539[noalloc] has no provenance)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                39 05 00 00                                     │ 9...
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:106:1
+error[E0080]: constructing invalid value: encountered null pointer, but expected a function pointer
+  --> $DIR/raw-bytes.rs:103:1
    |
 LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                00 00 00 00                                     │ ....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:108:1
+error[E0080]: constructing invalid value: encountered 0xd[noalloc], but expected a function pointer
+  --> $DIR/raw-bytes.rs:105:1
    |
 LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0xd[noalloc], but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                0d 00 00 00                                     │ ....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:110:1
+error[E0080]: constructing invalid value: encountered ALLOC3<imm>, but expected a function pointer
+  --> $DIR/raw-bytes.rs:107:1
    |
 LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3<imm>, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                ╾ALLOC_ID╼                                     │ ╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:116:1
+error[E0080]: constructing invalid value: encountered a reference pointing to uninhabited type Bar
+  --> $DIR/raw-bytes.rs:113:1
    |
 LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type Bar
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                01 00 00 00                                     │ ....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:141:1
+error[E0080]: constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+  --> $DIR/raw-bytes.rs:137:1
    |
 LL | const STR_TOO_LONG: &str = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ e7 03 00 00                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:143:1
+error[E0080]: constructing invalid value at .0: encountered invalid reference metadata: slice is bigger than largest supported object
+  --> $DIR/raw-bytes.rs:139:1
    |
 LL | const NESTED_STR_MUCH_TOO_LONG: (&str,) = (unsafe { mem::transmute((&42, usize::MAX)) },);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ ff ff ff ff                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:145:1
+error[E0080]: constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+  --> $DIR/raw-bytes.rs:141:1
    |
 LL | const MY_STR_MUCH_TOO_LONG: &MyStr = unsafe { mem::transmute((&42u8, usize::MAX)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ ff ff ff ff                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:148:1
+error[E0080]: constructing invalid value at .<deref>: encountered uninitialized memory, but expected a string
+  --> $DIR/raw-bytes.rs:144:1
    |
 LL | const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized memory, but expected a string
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ 01 00 00 00                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:150:1
+error[E0080]: constructing invalid value at .<deref>.0: encountered uninitialized memory, but expected a string
+  --> $DIR/raw-bytes.rs:146:1
    |
 LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered uninitialized memory, but expected a string
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ 01 00 00 00                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:152:1
+error[E0080]: constructing invalid value at .<deref>.0: encountered a pointer, but expected a string
+  --> $DIR/raw-bytes.rs:148:1
    |
 LL | const MYSTR_NO_INIT_ISSUE83182: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered a pointer, but expected a string
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
    |
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
    = 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: 8, align: 4) {
                ╾ALLOC_ID╼ 01 00 00 00                         │ ╾──╼....
            }
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:156:1
+error[E0080]: constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+  --> $DIR/raw-bytes.rs:152:1
    |
 LL | const SLICE_TOO_LONG: &[u8] = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ e7 03 00 00                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:158:1
+error[E0080]: constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+  --> $DIR/raw-bytes.rs:154:1
    |
 LL | const SLICE_TOO_LONG_OVERFLOW: &[u32] = unsafe { mem::transmute((&42u32, isize::MAX)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ ff ff ff 7f                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:161:1
+error[E0080]: constructing invalid value: encountered a dangling box (going beyond the bounds of its allocation)
+  --> $DIR/raw-bytes.rs:157:1
    |
 LL | const SLICE_TOO_LONG_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ e7 03 00 00                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:164:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
+  --> $DIR/raw-bytes.rs:160:1
    |
 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
@@ -342,16 +342,16 @@ LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
            }
 
 note: erroneous constant encountered
-  --> $DIR/raw-bytes.rs:164:40
+  --> $DIR/raw-bytes.rs:160:40
    |
 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:170:1
+error[E0080]: constructing invalid value at .<deref>.0: encountered 0x03, but expected a boolean
+  --> $DIR/raw-bytes.rs:164:1
    |
 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
@@ -359,16 +359,16 @@ LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3
            }
 
 note: erroneous constant encountered
-  --> $DIR/raw-bytes.rs:170:42
+  --> $DIR/raw-bytes.rs:164:42
    |
 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:174:1
+error[E0080]: constructing invalid value at .<deref>.1[0]: encountered 0x03, but expected a boolean
+  --> $DIR/raw-bytes.rs:167:1
    |
 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.1[0]: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
@@ -376,196 +376,196 @@ LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::tran
            }
 
 note: erroneous constant encountered
-  --> $DIR/raw-bytes.rs:174:42
+  --> $DIR/raw-bytes.rs:167:42
    |
 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:179:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC17<imm>, but expected a vtable pointer
+  --> $DIR/raw-bytes.rs:171:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC17<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ ╾ALLOC_ID╼                         │ ╾──╼╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:183:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC19<imm>, but expected a vtable pointer
+  --> $DIR/raw-bytes.rs:174:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC19<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ ╾ALLOC_ID╼                         │ ╾──╼╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:187:1
+error[E0080]: constructing invalid value at .0: encountered 0x4[noalloc], but expected a vtable pointer
+  --> $DIR/raw-bytes.rs:177:1
    |
 LL | const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, 4usize))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0x4[noalloc], but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ 04 00 00 00                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:190:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC22<imm>, but expected a vtable pointer
+  --> $DIR/raw-bytes.rs:179:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC22<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ ╾ALLOC_ID╼                         │ ╾──╼╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:194:1
+error[E0080]: constructing invalid value at .<deref>.<dyn-downcast>: encountered 0x03, but expected a boolean
+  --> $DIR/raw-bytes.rs:182:1
    |
 LL | const TRAIT_OBJ_CONTENT_INVALID: &dyn Trait = unsafe { mem::transmute::<_, &bool>(&3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ ╾ALLOC_ID╼                         │ ╾──╼╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:198:1
+error[E0080]: constructing invalid value: encountered null pointer, but expected a vtable pointer
+  --> $DIR/raw-bytes.rs:185:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute((&92u8, 0usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ 00 00 00 00                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:201:1
+error[E0080]: constructing invalid value: encountered ALLOC27<imm>, but expected a vtable pointer
+  --> $DIR/raw-bytes.rs:187:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC27<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ ╾ALLOC_ID╼                         │ ╾──╼╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:206:1
+error[E0080]: constructing invalid value: encountered a reference pointing to uninhabited type [!; 1]
+  --> $DIR/raw-bytes.rs:191:1
    |
 LL | const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) };
-   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type [!; 1]
+   | ^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                01 00 00 00                                     │ ....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:207:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+  --> $DIR/raw-bytes.rs:192:1
    |
 LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) };
-   | ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+   | ^^^^^^^^^^^^^ 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: 8, align: 4) {
                01 00 00 00 01 00 00 00                         │ ........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:208:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+  --> $DIR/raw-bytes.rs:193:1
    |
 LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) };
-   | ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+   | ^^^^^^^^^^^^^ 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: 8, align: 4) {
                01 00 00 00 2a 00 00 00                         │ ....*...
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:212:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
+  --> $DIR/raw-bytes.rs:196:1
    |
 LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ 01 00 00 00                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:215:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
+  --> $DIR/raw-bytes.rs:199:1
    |
 LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, mem::size_of::<&u32>()) };
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
    |
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
    = 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: 8, align: 4) {
                ╾ALLOC_ID╼ 04 00 00 00                         │ ╾──╼....
            }
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:218:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+  --> $DIR/raw-bytes.rs:202:1
    |
 LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ 04 00 00 00                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:222:1
+error[E0080]: constructing invalid value at .<deref>[1]: encountered uninitialized memory, but expected an integer
+  --> $DIR/raw-bytes.rs:206:1
    |
 LL | pub static S7: &[u16] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[1]: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID+0x2╼ 04 00 00 00                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:229:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
+  --> $DIR/raw-bytes.rs:213:1
    |
 LL | pub static R4: &[u8] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC_ID╼ 01 00 00 00                         │ ╾──╼....
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:234:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
+  --> $DIR/raw-bytes.rs:218:1
    |
 LL | pub static R5: &[u8] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
    |
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
    = 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: 8, align: 4) {
                ╾ALLOC_ID╼ 04 00 00 00                         │ ╾──╼....
            }
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:239:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+  --> $DIR/raw-bytes.rs:223:1
    |
 LL | pub static R6: &[bool] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
diff --git a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
index d54ad7c8546..c53326534fd 100644
--- a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
+++ b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
@@ -1,340 +1,340 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-tag>: encountered 0x0000000000000001, but expected a valid enum tag
   --> $DIR/raw-bytes.rs:23:1
    |
 LL | const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x0000000000000001, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                01 00 00 00 00 00 00 00                         │ ........
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-tag>: encountered 0x0000000000000000, but expected a valid enum tag
   --> $DIR/raw-bytes.rs:31:1
    |
 LL | const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x0000000000000000, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                00 00 00 00 00 00 00 00                         │ ........
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
   --> $DIR/raw-bytes.rs:45:1
    |
 LL | const BAD_UNINHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute(1u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
                01                                              │ .
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
   --> $DIR/raw-bytes.rs:47:1
    |
 LL | const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
                03                                              │ .
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-variant(Some)>.0.1: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
   --> $DIR/raw-bytes.rs:53:1
    |
 LL | const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::transmute(!0u32) }));
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0.1: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                78 00 00 00 ff ff ff ff                         │ x.......
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 0, but expected something greater or equal to 1
   --> $DIR/raw-bytes.rs:58:1
    |
 LL | const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                00 00 00 00 00 00 00 00                         │ ........
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
   --> $DIR/raw-bytes.rs:61:1
    |
 LL | const NULL_U8: NonZero<u8> = unsafe { mem::transmute(0u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
                00                                              │ .
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
   --> $DIR/raw-bytes.rs:63:1
    |
 LL | const NULL_USIZE: NonZero<usize> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                00 00 00 00 00 00 00 00                         │ ........
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 42, but expected something in the range 10..=30
   --> $DIR/raw-bytes.rs:69:1
    |
 LL | const BAD_RANGE1: RestrictedRange1 = unsafe { RestrictedRange1(42) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 42, but expected something in the range 10..=30
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                2a 00 00 00                                     │ *...
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 20, but expected something less or equal to 10, or greater or equal to 30
   --> $DIR/raw-bytes.rs:75:1
    |
 LL | const BAD_RANGE2: RestrictedRange2 = unsafe { RestrictedRange2(20) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 20, but expected something less or equal to 10, or greater or equal to 30
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                14 00 00 00                                     │ ....
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 0, but expected something greater or equal to 1
   --> $DIR/raw-bytes.rs:78:1
    |
 LL | const NULL_FAT_PTR: NonNull<dyn Send> = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                00 00 00 00 00 00 00 00 ╾ALLOC_ID╼ │ ........╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:86:1
+error[E0080]: constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+  --> $DIR/raw-bytes.rs:85:1
    |
 LL | const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+   | ^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                ╾ALLOC_ID╼                         │ ╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:90:1
+error[E0080]: constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
+  --> $DIR/raw-bytes.rs:88:1
    |
 LL | const UNALIGNED_BOX: Box<u16> = unsafe { mem::transmute(&[0u8; 4]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                ╾ALLOC_ID╼                         │ ╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:94:1
+error[E0080]: constructing invalid value: encountered a null reference
+  --> $DIR/raw-bytes.rs:91:1
    |
 LL | const NULL: &u16 = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
+   | ^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                00 00 00 00 00 00 00 00                         │ ........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:97:1
+error[E0080]: constructing invalid value: encountered a null box
+  --> $DIR/raw-bytes.rs:94:1
    |
 LL | const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null box
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                00 00 00 00 00 00 00 00                         │ ........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:100:1
+error[E0080]: constructing invalid value: encountered a dangling reference (0x539[noalloc] has no provenance)
+  --> $DIR/raw-bytes.rs:97:1
    |
 LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (0x539[noalloc] has no provenance)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                39 05 00 00 00 00 00 00                         │ 9.......
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:103:1
+error[E0080]: constructing invalid value: encountered a dangling box (0x539[noalloc] has no provenance)
+  --> $DIR/raw-bytes.rs:100:1
    |
 LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (0x539[noalloc] has no provenance)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                39 05 00 00 00 00 00 00                         │ 9.......
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:106:1
+error[E0080]: constructing invalid value: encountered null pointer, but expected a function pointer
+  --> $DIR/raw-bytes.rs:103:1
    |
 LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                00 00 00 00 00 00 00 00                         │ ........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:108:1
+error[E0080]: constructing invalid value: encountered 0xd[noalloc], but expected a function pointer
+  --> $DIR/raw-bytes.rs:105:1
    |
 LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0xd[noalloc], but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                0d 00 00 00 00 00 00 00                         │ ........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:110:1
+error[E0080]: constructing invalid value: encountered ALLOC3<imm>, but expected a function pointer
+  --> $DIR/raw-bytes.rs:107:1
    |
 LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3<imm>, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                ╾ALLOC_ID╼                         │ ╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:116:1
+error[E0080]: constructing invalid value: encountered a reference pointing to uninhabited type Bar
+  --> $DIR/raw-bytes.rs:113:1
    |
 LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type Bar
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                01 00 00 00 00 00 00 00                         │ ........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:141:1
+error[E0080]: constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+  --> $DIR/raw-bytes.rs:137:1
    |
 LL | const STR_TOO_LONG: &str = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ e7 03 00 00 00 00 00 00 │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:143:1
+error[E0080]: constructing invalid value at .0: encountered invalid reference metadata: slice is bigger than largest supported object
+  --> $DIR/raw-bytes.rs:139:1
    |
 LL | const NESTED_STR_MUCH_TOO_LONG: (&str,) = (unsafe { mem::transmute((&42, usize::MAX)) },);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ ff ff ff ff ff ff ff ff │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:145:1
+error[E0080]: constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+  --> $DIR/raw-bytes.rs:141:1
    |
 LL | const MY_STR_MUCH_TOO_LONG: &MyStr = unsafe { mem::transmute((&42u8, usize::MAX)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ ff ff ff ff ff ff ff ff │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:148:1
+error[E0080]: constructing invalid value at .<deref>: encountered uninitialized memory, but expected a string
+  --> $DIR/raw-bytes.rs:144:1
    |
 LL | const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized memory, but expected a string
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ 01 00 00 00 00 00 00 00 │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:150:1
+error[E0080]: constructing invalid value at .<deref>.0: encountered uninitialized memory, but expected a string
+  --> $DIR/raw-bytes.rs:146:1
    |
 LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered uninitialized memory, but expected a string
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ 01 00 00 00 00 00 00 00 │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:152:1
+error[E0080]: constructing invalid value at .<deref>.0: encountered a pointer, but expected a string
+  --> $DIR/raw-bytes.rs:148:1
    |
 LL | const MYSTR_NO_INIT_ISSUE83182: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered a pointer, but expected a string
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
    |
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
    = 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: 16, align: 8) {
                ╾ALLOC_ID╼ 01 00 00 00 00 00 00 00 │ ╾──────╼........
            }
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:156:1
+error[E0080]: constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+  --> $DIR/raw-bytes.rs:152:1
    |
 LL | const SLICE_TOO_LONG: &[u8] = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ e7 03 00 00 00 00 00 00 │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:158:1
+error[E0080]: constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+  --> $DIR/raw-bytes.rs:154:1
    |
 LL | const SLICE_TOO_LONG_OVERFLOW: &[u32] = unsafe { mem::transmute((&42u32, isize::MAX)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ ff ff ff ff ff ff ff 7f │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:161:1
+error[E0080]: constructing invalid value: encountered a dangling box (going beyond the bounds of its allocation)
+  --> $DIR/raw-bytes.rs:157:1
    |
 LL | const SLICE_TOO_LONG_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ e7 03 00 00 00 00 00 00 │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:164:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
+  --> $DIR/raw-bytes.rs:160:1
    |
 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
@@ -342,16 +342,16 @@ LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
            }
 
 note: erroneous constant encountered
-  --> $DIR/raw-bytes.rs:164:40
+  --> $DIR/raw-bytes.rs:160:40
    |
 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:170:1
+error[E0080]: constructing invalid value at .<deref>.0: encountered 0x03, but expected a boolean
+  --> $DIR/raw-bytes.rs:164:1
    |
 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
@@ -359,16 +359,16 @@ LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3
            }
 
 note: erroneous constant encountered
-  --> $DIR/raw-bytes.rs:170:42
+  --> $DIR/raw-bytes.rs:164:42
    |
 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:174:1
+error[E0080]: constructing invalid value at .<deref>.1[0]: encountered 0x03, but expected a boolean
+  --> $DIR/raw-bytes.rs:167:1
    |
 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.1[0]: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
@@ -376,196 +376,196 @@ LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::tran
            }
 
 note: erroneous constant encountered
-  --> $DIR/raw-bytes.rs:174:42
+  --> $DIR/raw-bytes.rs:167:42
    |
 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:179:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC17<imm>, but expected a vtable pointer
+  --> $DIR/raw-bytes.rs:171:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC17<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ ╾ALLOC_ID╼ │ ╾──────╼╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:183:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC19<imm>, but expected a vtable pointer
+  --> $DIR/raw-bytes.rs:174:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC19<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ ╾ALLOC_ID╼ │ ╾──────╼╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:187:1
+error[E0080]: constructing invalid value at .0: encountered 0x4[noalloc], but expected a vtable pointer
+  --> $DIR/raw-bytes.rs:177:1
    |
 LL | const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, 4usize))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0x4[noalloc], but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:190:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC22<imm>, but expected a vtable pointer
+  --> $DIR/raw-bytes.rs:179:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC22<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ ╾ALLOC_ID╼ │ ╾──────╼╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:194:1
+error[E0080]: constructing invalid value at .<deref>.<dyn-downcast>: encountered 0x03, but expected a boolean
+  --> $DIR/raw-bytes.rs:182:1
    |
 LL | const TRAIT_OBJ_CONTENT_INVALID: &dyn Trait = unsafe { mem::transmute::<_, &bool>(&3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ ╾ALLOC_ID╼ │ ╾──────╼╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:198:1
+error[E0080]: constructing invalid value: encountered null pointer, but expected a vtable pointer
+  --> $DIR/raw-bytes.rs:185:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute((&92u8, 0usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ 00 00 00 00 00 00 00 00 │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:201:1
+error[E0080]: constructing invalid value: encountered ALLOC27<imm>, but expected a vtable pointer
+  --> $DIR/raw-bytes.rs:187:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC27<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ ╾ALLOC_ID╼ │ ╾──────╼╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:206:1
+error[E0080]: constructing invalid value: encountered a reference pointing to uninhabited type [!; 1]
+  --> $DIR/raw-bytes.rs:191:1
    |
 LL | const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) };
-   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type [!; 1]
+   | ^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                01 00 00 00 00 00 00 00                         │ ........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:207:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+  --> $DIR/raw-bytes.rs:192:1
    |
 LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) };
-   | ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+   | ^^^^^^^^^^^^^ 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: 16, align: 8) {
                01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 │ ................
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:208:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+  --> $DIR/raw-bytes.rs:193:1
    |
 LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) };
-   | ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+   | ^^^^^^^^^^^^^ 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: 16, align: 8) {
                01 00 00 00 00 00 00 00 2a 00 00 00 00 00 00 00 │ ........*.......
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:212:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
+  --> $DIR/raw-bytes.rs:196:1
    |
 LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ 01 00 00 00 00 00 00 00 │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:215:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
+  --> $DIR/raw-bytes.rs:199:1
    |
 LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, mem::size_of::<&u32>()) };
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
    |
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
    = 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: 16, align: 8) {
                ╾ALLOC_ID╼ 08 00 00 00 00 00 00 00 │ ╾──────╼........
            }
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:218:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+  --> $DIR/raw-bytes.rs:202:1
    |
 LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:222:1
+error[E0080]: constructing invalid value at .<deref>[1]: encountered uninitialized memory, but expected an integer
+  --> $DIR/raw-bytes.rs:206:1
    |
 LL | pub static S7: &[u16] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[1]: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID+0x2╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:229:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
+  --> $DIR/raw-bytes.rs:213:1
    |
 LL | pub static R4: &[u8] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC_ID╼ 01 00 00 00 00 00 00 00 │ ╾──────╼........
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:234:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
+  --> $DIR/raw-bytes.rs:218:1
    |
 LL | pub static R5: &[u8] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^ it is undefined behavior to use this value
    |
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
    = 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: 16, align: 8) {
                ╾ALLOC_ID╼ 08 00 00 00 00 00 00 00 │ ╾──────╼........
            }
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/raw-bytes.rs:239:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+  --> $DIR/raw-bytes.rs:223:1
    |
 LL | pub static R6: &[bool] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
diff --git a/tests/ui/consts/const-eval/raw-bytes.rs b/tests/ui/consts/const-eval/raw-bytes.rs
index 1a585d55a5f..58ae763e017 100644
--- a/tests/ui/consts/const-eval/raw-bytes.rs
+++ b/tests/ui/consts/const-eval/raw-bytes.rs
@@ -21,7 +21,7 @@ enum Enum {
     A = 0,
 }
 const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
-//~^ ERROR is undefined behavior
+//~^ ERROR constructing invalid value
 
 #[repr(usize)]
 #[derive(Copy, Clone)]
@@ -29,7 +29,7 @@ enum Enum2 {
     A = 2,
 }
 const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
-//~^ ERROR is undefined behavior
+//~^ ERROR constructing invalid value
 
 #[derive(Copy, Clone)]
 enum Never {}
@@ -43,79 +43,75 @@ enum UninhDiscriminant {
     D(Never),
 }
 const BAD_UNINHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute(1u8) };
-//~^ ERROR is undefined behavior
+//~^ ERROR constructing invalid value
 const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8) };
-//~^ ERROR is undefined behavior
+//~^ ERROR constructing invalid value
 
 // Invalid enum field content (mostly to test printing of paths for enum tuple
 // variants and tuples).
 // Need to create something which does not clash with enum layout optimizations.
 const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::transmute(!0u32) }));
-//~^ ERROR is undefined behavior
+//~^ ERROR constructing invalid value
 
 // # Bad pointers and references
 
 const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 
 const NULL_U8: NonZero<u8> = unsafe { mem::transmute(0u8) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 const NULL_USIZE: NonZero<usize> = unsafe { mem::transmute(0usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 
 #[rustc_layout_scalar_valid_range_start(10)]
 #[rustc_layout_scalar_valid_range_end(30)]
 struct RestrictedRange1(u32);
 const BAD_RANGE1: RestrictedRange1 = unsafe { RestrictedRange1(42) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 
 #[rustc_layout_scalar_valid_range_start(30)]
 #[rustc_layout_scalar_valid_range_end(10)]
 struct RestrictedRange2(u32);
 const BAD_RANGE2: RestrictedRange2 = unsafe { RestrictedRange2(20) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 
 const NULL_FAT_PTR: NonNull<dyn Send> = unsafe {
-//~^ ERROR it is undefined behavior to use this value
+    //~^ ERROR constructing invalid value
     let x: &dyn Send = &42;
     let meta = std::ptr::metadata(x);
     mem::transmute((0_usize, meta))
 };
 
-
 const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+//~^ ERROR constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
 
 const UNALIGNED_BOX: Box<u16> = unsafe { mem::transmute(&[0u8; 4]) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
+//~^ ERROR constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
 
 const NULL: &u16 = unsafe { mem::transmute(0usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 
 const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 
 const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 
 const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 
 const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 
 #[derive(Copy, Clone)]
 enum Bar {}
 
 const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
-//~^ ERROR it is undefined behavior to use this value
-
+//~^ ERROR constructing invalid value
 
 /// A newtype wrapper to prevent MIR generation from inserting reborrows that would affect the error
 /// message.
@@ -139,105 +135,93 @@ struct MySlice<T: ?Sized>(bool, T);
 type MySliceBool = MySlice<[bool]>;
 
 const STR_TOO_LONG: &str = unsafe { mem::transmute((&42u8, 999usize)) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 const NESTED_STR_MUCH_TOO_LONG: (&str,) = (unsafe { mem::transmute((&42, usize::MAX)) },);
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 const MY_STR_MUCH_TOO_LONG: &MyStr = unsafe { mem::transmute((&42u8, usize::MAX)) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 
 const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 const MYSTR_NO_INIT_ISSUE83182: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: constructing invalid value
 
 // # slice
 const SLICE_TOO_LONG: &[u8] = unsafe { mem::transmute((&42u8, 999usize)) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 const SLICE_TOO_LONG_OVERFLOW: &[u32] = unsafe { mem::transmute((&42u32, isize::MAX)) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 // bad slice box: length too big
 const SLICE_TOO_LONG_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, 999usize)) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR constructing invalid value
 // bad data *inside* the slice
 const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE constant
-
+//~^ ERROR encountered 0x03, but expected a boolean
 
 // bad: sized field is not okay
 const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE constant
+//~^ ERROR encountered 0x03, but expected a boolean
 // bad: unsized part is not okay
 const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE constant
+//~^ ERROR encountered 0x03, but expected a boolean
 
 // bad trait object
 const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE expected a vtable
+//~^ ERROR expected a vtable
 // bad trait object
 const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE expected a vtable
+//~^ ERROR expected a vtable
 // bad trait object
 const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, 4usize))) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE expected a vtable
+//~^ ERROR expected a vtable
 const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE expected a vtable
+//~^ ERROR expected a vtable
 // bad data *inside* the trait object
 const TRAIT_OBJ_CONTENT_INVALID: &dyn Trait = unsafe { mem::transmute::<_, &bool>(&3u8) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE expected a boolean
+//~^ ERROR expected a boolean
 
 const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute((&92u8, 0usize)) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE null pointer
+//~^ ERROR null pointer
 const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE vtable
+//~^ ERROR vtable
 
 // Uninhabited types
-const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior
-const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior
-const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) }; //~ ERROR undefined behavior
-
+const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR constructing invalid value
+const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR constructing invalid value
+const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) }; //~ ERROR constructing invalid value
 
 // Reading uninitialized  data
 pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: constructing invalid value
 // Reinterpret pointers as integers (UB in CTFE.)
 pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, mem::size_of::<&u32>()) };
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: constructing invalid value
 // Layout mismatch
 pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: constructing invalid value
 
 // Reading padding is not ok
 pub static S7: &[u16] = unsafe {
-    //~^ ERROR: it is undefined behavior to use this value
+    //~^ ERROR: constructing invalid value
     let ptr = (&D2 as *const Struct as *const u16).add(1);
 
     from_raw_parts(ptr, 4)
 };
 
 pub static R4: &[u8] = unsafe {
-    //~^ ERROR: it is undefined behavior to use this value
+    //~^ ERROR: constructing invalid value
     let ptr = (&D1) as *const mem::MaybeUninit<&u32> as *const u8;
     from_ptr_range(ptr..ptr.add(1))
 };
 pub static R5: &[u8] = unsafe {
-    //~^ ERROR: it is undefined behavior to use this value
+    //~^ ERROR: constructing invalid value
     let ptr = &D3 as *const &u32;
     from_ptr_range(ptr.cast()..ptr.add(1).cast())
 };
 pub static R6: &[bool] = unsafe {
-    //~^ ERROR: it is undefined behavior to use this value
+    //~^ ERROR: constructing invalid value
     let ptr = &D0 as *const u32 as *const bool;
     from_ptr_range(ptr..ptr.add(4))
 };
diff --git a/tests/ui/consts/const-eval/raw-pointer-ub.rs b/tests/ui/consts/const-eval/raw-pointer-ub.rs
index 13a95f9b78f..c8d1e36e88b 100644
--- a/tests/ui/consts/const-eval/raw-pointer-ub.rs
+++ b/tests/ui/consts/const-eval/raw-pointer-ub.rs
@@ -1,15 +1,15 @@
 const MISALIGNED_LOAD: () = unsafe {
     let mem = [0u32; 8];
     let ptr = mem.as_ptr().byte_add(1);
-    let _val = *ptr; //~ERROR: evaluation of constant value failed
-    //~^NOTE: based on pointer with alignment 1, but alignment 4 is required
+    let _val = *ptr; //~NOTE: evaluation of constant value failed
+    //~^ERROR: based on pointer with alignment 1, but alignment 4 is required
 };
 
 const MISALIGNED_STORE: () = unsafe {
     let mut mem = [0u32; 8];
     let ptr = mem.as_mut_ptr().byte_add(1);
-    *ptr = 0; //~ERROR: evaluation of constant value failed
-    //~^NOTE: based on pointer with alignment 1, but alignment 4 is required
+    *ptr = 0; //~NOTE: evaluation of constant value failed
+    //~^ERROR: based on pointer with alignment 1, but alignment 4 is required
 };
 
 const MISALIGNED_COPY: () = unsafe {
@@ -17,10 +17,9 @@ const MISALIGNED_COPY: () = unsafe {
     let y = x.as_ptr().cast::<u32>();
     let mut z = 123;
     y.copy_to_nonoverlapping(&mut z, 1);
-    //~^ ERROR evaluation of constant value failed
-    //~| NOTE inside `std::ptr::const_ptr
-    //~| NOTE inside `copy_nonoverlapping::<u32>`
-    //~| NOTE accessing memory with alignment 1, but alignment 4 is required
+    //~^ NOTE evaluation of constant value failed
+    //~| NOTE inside `std::ptr::copy_nonoverlapping::<u32>`
+    //~| ERROR accessing memory with alignment 1, but alignment 4 is required
     // The actual error points into the implementation of `copy_to_nonoverlapping`.
 };
 
@@ -31,15 +30,15 @@ const MISALIGNED_FIELD: () = unsafe {
     let mem = [0f32; 8];
     let ptr = mem.as_ptr().cast::<Aligned>();
     // Accessing an f32 field but we still require the alignment of the pointer type.
-    let _val = (*ptr).0; //~ERROR: evaluation of constant value failed
-    //~^NOTE: based on pointer with alignment 4, but alignment 16 is required
+    let _val = (*ptr).0; //~NOTE: evaluation of constant value failed
+    //~^ERROR: based on pointer with alignment 4, but alignment 16 is required
 };
 
 const OOB: () = unsafe {
     let mem = [0u32; 1];
     let ptr = mem.as_ptr().cast::<u64>();
-    let _val = *ptr; //~ERROR: evaluation of constant value failed
-    //~^NOTE: is only 4 bytes from the end of the allocation
+    let _val = *ptr; //~NOTE: evaluation of constant value failed
+    //~^ERROR: is only 4 bytes from the end of the allocation
 };
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/raw-pointer-ub.stderr b/tests/ui/consts/const-eval/raw-pointer-ub.stderr
index ed5793c84c5..e424924e14b 100644
--- a/tests/ui/consts/const-eval/raw-pointer-ub.stderr
+++ b/tests/ui/consts/const-eval/raw-pointer-ub.stderr
@@ -1,37 +1,35 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: accessing memory based on pointer with alignment 1, but alignment 4 is required
   --> $DIR/raw-pointer-ub.rs:4:16
    |
 LL |     let _val = *ptr;
-   |                ^^^^ accessing memory based on pointer with alignment 1, but alignment 4 is required
+   |                ^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: accessing memory based on pointer with alignment 1, but alignment 4 is required
   --> $DIR/raw-pointer-ub.rs:11:5
    |
 LL |     *ptr = 0;
-   |     ^^^^^^^^ accessing memory based on pointer with alignment 1, but alignment 4 is required
+   |     ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: accessing memory with alignment 1, but alignment 4 is required
   --> $DIR/raw-pointer-ub.rs:19:5
    |
 LL |     y.copy_to_nonoverlapping(&mut z, 1);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing memory with alignment 1, but alignment 4 is required
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
-note: inside `std::ptr::const_ptr::<impl *const u32>::copy_to_nonoverlapping`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
-note: inside `copy_nonoverlapping::<u32>`
-  --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL
+note: inside `std::ptr::copy_nonoverlapping::<u32>`
+  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/raw-pointer-ub.rs:34:16
+error[E0080]: accessing memory based on pointer with alignment 4, but alignment 16 is required
+  --> $DIR/raw-pointer-ub.rs:33:16
    |
 LL |     let _val = (*ptr).0;
-   |                ^^^^^^^^ accessing memory based on pointer with alignment 4, but alignment 16 is required
+   |                ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/raw-pointer-ub.rs:41:16
+error[E0080]: memory access failed: attempting to access 8 bytes, but got ALLOC0 which is only 4 bytes from the end of the allocation
+  --> $DIR/raw-pointer-ub.rs:40:16
    |
 LL |     let _val = *ptr;
-   |                ^^^^ memory access failed: attempting to access 8 bytes, but got ALLOC0 which is only 4 bytes from the end of the allocation
+   |                ^^^^ evaluation of constant value failed here
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/consts/const-eval/ref_to_int_match.32bit.stderr b/tests/ui/consts/const-eval/ref_to_int_match.32bit.stderr
index 18935626af1..be86541434b 100644
--- a/tests/ui/consts/const-eval/ref_to_int_match.32bit.stderr
+++ b/tests/ui/consts/const-eval/ref_to_int_match.32bit.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/ref_to_int_match.rs:24:27
    |
 LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
-   |                           ^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                           ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
diff --git a/tests/ui/consts/const-eval/ref_to_int_match.64bit.stderr b/tests/ui/consts/const-eval/ref_to_int_match.64bit.stderr
index 18935626af1..be86541434b 100644
--- a/tests/ui/consts/const-eval/ref_to_int_match.64bit.stderr
+++ b/tests/ui/consts/const-eval/ref_to_int_match.64bit.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/ref_to_int_match.rs:24:27
    |
 LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
-   |                           ^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                           ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
diff --git a/tests/ui/consts/const-eval/ref_to_int_match.rs b/tests/ui/consts/const-eval/ref_to_int_match.rs
index be9420e0215..062df685f74 100644
--- a/tests/ui/consts/const-eval/ref_to_int_match.rs
+++ b/tests/ui/consts/const-eval/ref_to_int_match.rs
@@ -3,9 +3,9 @@
 fn main() {
     let n: Int = 40;
     match n {
-        0..=10 => {},
-        10..=BAR => {}, // ok, `const` error already emitted
-        _ => {},
+        0..=10 => {}
+        10..=BAR => {} // ok, `const` error already emitted
+        _ => {}
     }
 }
 
@@ -15,11 +15,11 @@ union Foo {
     r: &'static u32,
 }
 
-#[cfg(target_pointer_width="64")]
+#[cfg(target_pointer_width = "64")]
 type Int = u64;
 
-#[cfg(target_pointer_width="32")]
+#[cfg(target_pointer_width = "32")]
 type Int = u32;
 
 const BAR: Int = unsafe { Foo { r: &42 }.f };
-//~^ ERROR constant
+//~^ ERROR unable to turn pointer into integer
diff --git a/tests/ui/consts/const-eval/shift_overflow.stderr b/tests/ui/consts/const-eval/shift_overflow.stderr
index 901bfa10ee8..e5703fb1d77 100644
--- a/tests/ui/consts/const-eval/shift_overflow.stderr
+++ b/tests/ui/consts/const-eval/shift_overflow.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to shift left by `4294967296_u64`, which would overflow
   --> $DIR/shift_overflow.rs:3:9
    |
 LL |     X = 1 << ((u32::MAX as u64) + 1),
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to shift left by `4294967296_u64`, which would overflow
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/transmute-const.rs b/tests/ui/consts/const-eval/transmute-const.rs
index fb6cb77675f..e67406a6563 100644
--- a/tests/ui/consts/const-eval/transmute-const.rs
+++ b/tests/ui/consts/const-eval/transmute-const.rs
@@ -2,6 +2,6 @@
 use std::mem;
 
 static FOO: bool = unsafe { mem::transmute(3u8) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR 0x03, but expected a bool
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/transmute-const.stderr b/tests/ui/consts/const-eval/transmute-const.stderr
index 35a5cabaa67..ed3b3df70dd 100644
--- a/tests/ui/consts/const-eval/transmute-const.stderr
+++ b/tests/ui/consts/const-eval/transmute-const.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 0x03, but expected a boolean
   --> $DIR/transmute-const.rs:4:1
    |
 LL | static FOO: bool = unsafe { mem::transmute(3u8) };
-   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
diff --git a/tests/ui/consts/const-eval/transmute-size-mismatch.rs b/tests/ui/consts/const-eval/transmute-size-mismatch.rs
index 8a7fd8257b0..ea5cdceda88 100644
--- a/tests/ui/consts/const-eval/transmute-size-mismatch.rs
+++ b/tests/ui/consts/const-eval/transmute-size-mismatch.rs
@@ -19,10 +19,10 @@ const unsafe fn mir_transmute<T, U>(x: T) -> U {
     }
 }
 
-const FROM_BIGGER: u16 = unsafe { mir_transmute(123_i32) }; //~ ERROR evaluation of constant value failed
-//~^ NOTE transmuting from 4-byte type to 2-byte type: `i32` -> `u16`
+const FROM_BIGGER: u16 = unsafe { mir_transmute(123_i32) }; //~ NOTE evaluation of constant value failed
+//~^ ERROR transmuting from 4-byte type to 2-byte type: `i32` -> `u16`
 
-const FROM_SMALLER: u32 = unsafe { mir_transmute(123_i16) }; //~ ERROR evaluation of constant value failed
-//~^ NOTE transmuting from 2-byte type to 4-byte type: `i16` -> `u32`
+const FROM_SMALLER: u32 = unsafe { mir_transmute(123_i16) }; //~ NOTE evaluation of constant value failed
+//~^ ERROR transmuting from 2-byte type to 4-byte type: `i16` -> `u32`
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/transmute-size-mismatch.stderr b/tests/ui/consts/const-eval/transmute-size-mismatch.stderr
index 888df16ec4e..92088a4749a 100644
--- a/tests/ui/consts/const-eval/transmute-size-mismatch.stderr
+++ b/tests/ui/consts/const-eval/transmute-size-mismatch.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: transmuting from 4-byte type to 2-byte type: `i32` -> `u16`
   --> $DIR/transmute-size-mismatch.rs:22:35
    |
 LL | const FROM_BIGGER: u16 = unsafe { mir_transmute(123_i32) };
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^ transmuting from 4-byte type to 2-byte type: `i32` -> `u16`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `mir_transmute::<i32, u16>`
   --> $DIR/transmute-size-mismatch.rs:12:13
@@ -10,11 +10,11 @@ note: inside `mir_transmute::<i32, u16>`
 LL |             RET = CastTransmute(x);
    |             ^^^^^^^^^^^^^^^^^^^^^^ the failure occurred here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: transmuting from 2-byte type to 4-byte type: `i16` -> `u32`
   --> $DIR/transmute-size-mismatch.rs:25:36
    |
 LL | const FROM_SMALLER: u32 = unsafe { mir_transmute(123_i16) };
-   |                                    ^^^^^^^^^^^^^^^^^^^^^^ transmuting from 2-byte type to 4-byte type: `i16` -> `u32`
+   |                                    ^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `mir_transmute::<i16, u32>`
   --> $DIR/transmute-size-mismatch.rs:12:13
diff --git a/tests/ui/consts/const-eval/ub-enum-overwrite.rs b/tests/ui/consts/const-eval/ub-enum-overwrite.rs
index e37c25718f8..005f3c78c1d 100644
--- a/tests/ui/consts/const-eval/ub-enum-overwrite.rs
+++ b/tests/ui/consts/const-eval/ub-enum-overwrite.rs
@@ -9,8 +9,7 @@ const _: u8 = {
     // Make sure overwriting `e` uninitializes other bytes
     e = E::B;
     unsafe { *p }
-    //~^ ERROR evaluation of constant value failed
-    //~| NOTE uninitialized
+    //~^ ERROR uninitialized
 };
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/ub-enum-overwrite.stderr b/tests/ui/consts/const-eval/ub-enum-overwrite.stderr
index 315e865df93..0c1a606904c 100644
--- a/tests/ui/consts/const-eval/ub-enum-overwrite.stderr
+++ b/tests/ui/consts/const-eval/ub-enum-overwrite.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/ub-enum-overwrite.rs:11:14
    |
 LL |     unsafe { *p }
-   |              ^^ using uninitialized data, but this operation requires initialized memory
+   |              ^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/ub-enum.rs b/tests/ui/consts/const-eval/ub-enum.rs
index ac543430da9..52fc9945068 100644
--- a/tests/ui/consts/const-eval/ub-enum.rs
+++ b/tests/ui/consts/const-eval/ub-enum.rs
@@ -27,13 +27,13 @@ enum Enum {
 const GOOD_ENUM: Enum = unsafe { mem::transmute(0usize) };
 
 const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
-//~^ ERROR is undefined behavior
+//~^ ERROR expected a valid enum tag
 
 const BAD_ENUM_PTR: Enum = unsafe { mem::transmute(&1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR unable to turn pointer into integer
 
 const BAD_ENUM_WRAPPED: Wrap<Enum> = unsafe { mem::transmute(&1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR unable to turn pointer into integer
 
 // # simple enum with discriminant 2
 
@@ -45,12 +45,12 @@ enum Enum2 {
 }
 
 const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
-//~^ ERROR is undefined behavior
+//~^ ERROR expected a valid enum tag
 const BAD_ENUM2_PTR: Enum2 = unsafe { mem::transmute(&0) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR unable to turn pointer into integer
 // something wrapping the enum so that we test layout first, not enum
 const BAD_ENUM2_WRAPPED: Wrap<Enum2> = unsafe { mem::transmute(&0) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR unable to turn pointer into integer
 
 // Undef enum discriminant.
 #[repr(C)]
@@ -58,13 +58,12 @@ union MaybeUninit<T: Copy> {
     uninit: (),
     init: T,
 }
-const BAD_ENUM2_UNDEF : Enum2 = unsafe { MaybeUninit { uninit: () }.init };
-//~^ ERROR evaluation of constant value failed
-//~| NOTE uninitialized
+const BAD_ENUM2_UNDEF: Enum2 = unsafe { MaybeUninit { uninit: () }.init };
+//~^ ERROR uninitialized
 
 // Pointer value in an enum with a niche that is not just 0.
 const BAD_ENUM2_OPTION_PTR: Option<Enum2> = unsafe { mem::transmute(&0) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR unable to turn pointer into integer
 
 // # valid discriminant for uninhabited variant
 
@@ -81,9 +80,9 @@ const GOOD_INHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute(0u8)
 const GOOD_INHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(2u8) }; // variant C
 
 const BAD_UNINHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute(1u8) };
-//~^ ERROR is undefined behavior
+//~^ ERROR uninhabited enum variant
 const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8) };
-//~^ ERROR is undefined behavior
+//~^ ERROR uninhabited enum variant
 
 // # other
 
@@ -91,20 +90,21 @@ const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8)
 // variants and tuples).
 // Need to create something which does not clash with enum layout optimizations.
 const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::transmute(!0u32) }));
-//~^ ERROR is undefined behavior
+//~^ ERROR expected a valid unicode scalar
 
 // All variants are uninhabited but also have data.
 // Use `0` as constant to make behavior endianness-independent.
 const BAD_UNINHABITED_WITH_DATA1: Result<(i32, Never), (i32, !)> = unsafe { mem::transmute(0u64) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR uninhabited enum variant
 const BAD_UNINHABITED_WITH_DATA2: Result<(i32, !), (i32, Never)> = unsafe { mem::transmute(0u64) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR uninhabited enum variant
 
 const TEST_ICE_89765: () = {
     // This is a regression test for https://github.com/rust-lang/rust/issues/89765.
-    unsafe { std::mem::discriminant(&*(&() as *const () as *const Never)); };
-    //~^ ERROR evaluation of constant value failed
+    unsafe {
+        std::mem::discriminant(&*(&() as *const () as *const Never));
+        //~^ ERROR uninhabited enum variant
+    };
 };
 
-fn main() {
-}
+fn main() {}
diff --git a/tests/ui/consts/const-eval/ub-enum.stderr b/tests/ui/consts/const-eval/ub-enum.stderr
index faec412b004..7015102a50a 100644
--- a/tests/ui/consts/const-eval/ub-enum.stderr
+++ b/tests/ui/consts/const-eval/ub-enum.stderr
@@ -1,126 +1,126 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-tag>: encountered 0x01, but expected a valid enum tag
   --> $DIR/ub-enum.rs:29:1
    |
 LL | const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x01, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/ub-enum.rs:32:1
    |
 LL | const BAD_ENUM_PTR: Enum = unsafe { mem::transmute(&1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/ub-enum.rs:35:1
    |
 LL | const BAD_ENUM_WRAPPED: Wrap<Enum> = unsafe { mem::transmute(&1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-tag>: encountered 0x0, but expected a valid enum tag
   --> $DIR/ub-enum.rs:47:1
    |
 LL | const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x0, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/ub-enum.rs:49:1
    |
 LL | const BAD_ENUM2_PTR: Enum2 = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/ub-enum.rs:52:1
    |
 LL | const BAD_ENUM2_WRAPPED: Wrap<Enum2> = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:61:42
+error[E0080]: using uninitialized data, but this operation requires initialized memory
+  --> $DIR/ub-enum.rs:61:41
    |
-LL | const BAD_ENUM2_UNDEF : Enum2 = unsafe { MaybeUninit { uninit: () }.init };
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+LL | const BAD_ENUM2_UNDEF: Enum2 = unsafe { MaybeUninit { uninit: () }.init };
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:66:1
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/ub-enum.rs:65:1
    |
 LL | const BAD_ENUM2_OPTION_PTR: Option<Enum2> = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-enum.rs:83:1
+error[E0080]: constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+  --> $DIR/ub-enum.rs:82:1
    |
 LL | const BAD_UNINHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute(1u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-enum.rs:85:1
+error[E0080]: constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+  --> $DIR/ub-enum.rs:84:1
    |
 LL | const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-enum.rs:93:1
+error[E0080]: constructing invalid value at .<enum-variant(Some)>.0.1: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
+  --> $DIR/ub-enum.rs:92:1
    |
 LL | const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::transmute(!0u32) }));
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0.1: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:98:77
+error[E0080]: constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+  --> $DIR/ub-enum.rs:97:77
    |
 LL | const BAD_UNINHABITED_WITH_DATA1: Result<(i32, Never), (i32, !)> = unsafe { mem::transmute(0u64) };
-   |                                                                             ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+   |                                                                             ^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:100:77
+error[E0080]: constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+  --> $DIR/ub-enum.rs:99:77
    |
 LL | const BAD_UNINHABITED_WITH_DATA2: Result<(i32, !), (i32, Never)> = unsafe { mem::transmute(0u64) };
-   |                                                                             ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+   |                                                                             ^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:105:14
+error[E0080]: read discriminant of an uninhabited enum variant
+  --> $DIR/ub-enum.rs:105:9
    |
-LL |     unsafe { std::mem::discriminant(&*(&() as *const () as *const Never)); };
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ read discriminant of an uninhabited enum variant
+LL |         std::mem::discriminant(&*(&() as *const () as *const Never));
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `discriminant::<Never>`
   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
diff --git a/tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr b/tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr
index 5c47cbfdf3b..86d6f8c52bc 100644
--- a/tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr
+++ b/tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr
@@ -1,63 +1,63 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered ALLOC1<imm>, but expected a vtable pointer
   --> $DIR/ub-incorrect-vtable.rs:18:1
    |
 LL | const INVALID_VTABLE_ALIGNMENT: &dyn Trait =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC1<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC0<imm>╼ ╾ALLOC1<imm>╼                         │ ╾──╼╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-incorrect-vtable.rs:23:1
+error[E0080]: constructing invalid value: encountered ALLOC3<imm>, but expected a vtable pointer
+  --> $DIR/ub-incorrect-vtable.rs:22:1
    |
 LL | const INVALID_VTABLE_SIZE: &dyn Trait =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC2<imm>╼ ╾ALLOC3<imm>╼                         │ ╾──╼╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-incorrect-vtable.rs:33:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC5<imm>, but expected a vtable pointer
+  --> $DIR/ub-incorrect-vtable.rs:31:1
    |
 LL | const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC5<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC4<imm>╼ ╾ALLOC5<imm>╼                         │ ╾──╼╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-incorrect-vtable.rs:38:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC7<imm>, but expected a vtable pointer
+  --> $DIR/ub-incorrect-vtable.rs:35:1
    |
 LL | const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC7<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC6<imm>╼ ╾ALLOC7<imm>╼                         │ ╾──╼╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-incorrect-vtable.rs:44:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC9<imm>, but expected a vtable pointer
+  --> $DIR/ub-incorrect-vtable.rs:40:1
    |
 LL | const INVALID_VTABLE_UB: W<&dyn Trait> =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC9<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                ╾ALLOC8<imm>╼ ╾ALLOC9<imm>╼                         │ ╾──╼╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-incorrect-vtable.rs:91:1
+error[E0080]: constructing invalid value at .1: encountered a dangling reference (going beyond the bounds of its allocation)
+  --> $DIR/ub-incorrect-vtable.rs:86:1
    |
 LL | const G: Wide = unsafe { Transmute { t: FOO }.u };
-   | ^^^^^^^^^^^^^ constructing invalid value at .1: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^ 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: 8, align: 4) {
diff --git a/tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr b/tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr
index f400073aca2..a9518216dbd 100644
--- a/tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr
+++ b/tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr
@@ -1,63 +1,63 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered ALLOC1<imm>, but expected a vtable pointer
   --> $DIR/ub-incorrect-vtable.rs:18:1
    |
 LL | const INVALID_VTABLE_ALIGNMENT: &dyn Trait =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC1<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC0<imm>╼ ╾ALLOC1<imm>╼ │ ╾──────╼╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-incorrect-vtable.rs:23:1
+error[E0080]: constructing invalid value: encountered ALLOC3<imm>, but expected a vtable pointer
+  --> $DIR/ub-incorrect-vtable.rs:22:1
    |
 LL | const INVALID_VTABLE_SIZE: &dyn Trait =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC2<imm>╼ ╾ALLOC3<imm>╼ │ ╾──────╼╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-incorrect-vtable.rs:33:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC5<imm>, but expected a vtable pointer
+  --> $DIR/ub-incorrect-vtable.rs:31:1
    |
 LL | const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC5<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC4<imm>╼ ╾ALLOC5<imm>╼ │ ╾──────╼╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-incorrect-vtable.rs:38:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC7<imm>, but expected a vtable pointer
+  --> $DIR/ub-incorrect-vtable.rs:35:1
    |
 LL | const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC7<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC6<imm>╼ ╾ALLOC7<imm>╼ │ ╾──────╼╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-incorrect-vtable.rs:44:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC9<imm>, but expected a vtable pointer
+  --> $DIR/ub-incorrect-vtable.rs:40:1
    |
 LL | const INVALID_VTABLE_UB: W<&dyn Trait> =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC9<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
                ╾ALLOC8<imm>╼ ╾ALLOC9<imm>╼ │ ╾──────╼╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-incorrect-vtable.rs:91:1
+error[E0080]: constructing invalid value at .1: encountered a dangling reference (going beyond the bounds of its allocation)
+  --> $DIR/ub-incorrect-vtable.rs:86:1
    |
 LL | const G: Wide = unsafe { Transmute { t: FOO }.u };
-   | ^^^^^^^^^^^^^ constructing invalid value at .1: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^ 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: 16, align: 8) {
diff --git a/tests/ui/consts/const-eval/ub-incorrect-vtable.rs b/tests/ui/consts/const-eval/ub-incorrect-vtable.rs
index 30c0ae3bb5a..4185b0261b2 100644
--- a/tests/ui/consts/const-eval/ub-incorrect-vtable.rs
+++ b/tests/ui/consts/const-eval/ub-incorrect-vtable.rs
@@ -17,13 +17,11 @@ trait Trait {}
 
 const INVALID_VTABLE_ALIGNMENT: &dyn Trait =
     unsafe { std::mem::transmute((&92u8, &[0usize, 1usize, 1000usize])) };
-//~^^ ERROR it is undefined behavior to use this value
-//~| NOTE vtable
+//~^^ ERROR vtable
 
 const INVALID_VTABLE_SIZE: &dyn Trait =
     unsafe { std::mem::transmute((&92u8, &[1usize, usize::MAX, 1usize])) };
-//~^^ ERROR it is undefined behavior to use this value
-//~| NOTE vtable
+//~^^ ERROR vtable
 
 #[repr(transparent)]
 struct W<T>(T);
@@ -32,19 +30,16 @@ fn drop_me(_: *mut usize) {}
 
 const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
     unsafe { std::mem::transmute((&92u8, &(drop_me as fn(*mut usize), 1usize, 1000usize))) };
-//~^^ ERROR it is undefined behavior to use this value
-//~| NOTE expected a vtable pointer
+//~^^ ERROR expected a vtable pointer
 
 const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
     unsafe { std::mem::transmute((&92u8, &(drop_me as fn(*mut usize), usize::MAX, 1usize))) };
-//~^^ ERROR it is undefined behavior to use this value
-//~| NOTE expected a vtable pointer
+//~^^ ERROR expected a vtable pointer
 
 // Even if the vtable has a fn ptr and a reasonable size+align, it still does not work.
 const INVALID_VTABLE_UB: W<&dyn Trait> =
     unsafe { std::mem::transmute((&92u8, &(drop_me as fn(*mut usize), 1usize, 1usize))) };
-//~^^ ERROR it is undefined behavior to use this value
-//~| NOTE expected a vtable pointer
+//~^^ ERROR expected a vtable pointer
 
 // Trying to access the data in a vtable does not work, either.
 
@@ -89,8 +84,7 @@ union Transmute<T: Copy, U: Copy> {
 
 const FOO: &dyn Bar = &Foo { foo: 128, bar: false };
 const G: Wide = unsafe { Transmute { t: FOO }.u };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE encountered a dangling reference
+//~^ ERROR encountered a dangling reference
 // (it is dangling because vtables do not contain memory that can be dereferenced)
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/ub-int-array.rs b/tests/ui/consts/const-eval/ub-int-array.rs
index 169ac7f1519..eebbccaa7c1 100644
--- a/tests/ui/consts/const-eval/ub-int-array.rs
+++ b/tests/ui/consts/const-eval/ub-int-array.rs
@@ -18,8 +18,7 @@ impl<T: Copy> MaybeUninit<T> {
 }
 
 const UNINIT_INT_0: [u32; 3] = unsafe {
-    //~^ ERROR it is undefined behavior to use this value
-    //~| NOTE invalid value at [0]
+    //~^ ERROR invalid value at [0]
     mem::transmute([
         MaybeUninit { uninit: () },
         // Constants chosen to achieve endianness-independent hex dump.
@@ -28,8 +27,7 @@ const UNINIT_INT_0: [u32; 3] = unsafe {
     ])
 };
 const UNINIT_INT_1: [u32; 3] = unsafe {
-    //~^ ERROR it is undefined behavior to use this value
-    //~| NOTE invalid value at [1]
+    //~^ ERROR invalid value at [1]
     mem::transmute([
         MaybeUninit::new(0u8),
         MaybeUninit::new(0u8),
@@ -46,8 +44,7 @@ const UNINIT_INT_1: [u32; 3] = unsafe {
     ])
 };
 const UNINIT_INT_2: [u32; 3] = unsafe {
-    //~^ ERROR it is undefined behavior to use this value
-    //~| NOTE invalid value at [2]
+    //~^ ERROR invalid value at [2]
     mem::transmute([
         MaybeUninit::new(0u8),
         MaybeUninit::new(0u8),
diff --git a/tests/ui/consts/const-eval/ub-int-array.stderr b/tests/ui/consts/const-eval/ub-int-array.stderr
index d6ef9bcfeba..10eb7c46c92 100644
--- a/tests/ui/consts/const-eval/ub-int-array.stderr
+++ b/tests/ui/consts/const-eval/ub-int-array.stderr
@@ -1,30 +1,30 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at [0]: encountered uninitialized memory, but expected an integer
   --> $DIR/ub-int-array.rs:20:1
    |
 LL | const UNINIT_INT_0: [u32; 3] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 12, align: 4) {
                __ __ __ __ 11 11 11 11 22 22 22 22             │ ░░░░....""""
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-int-array.rs:30:1
+error[E0080]: constructing invalid value at [1]: encountered uninitialized memory, but expected an integer
+  --> $DIR/ub-int-array.rs:29:1
    |
 LL | const UNINIT_INT_1: [u32; 3] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [1]: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 12, align: 4) {
                00 00 00 00 01 __ 01 01 02 02 __ 02             │ .....░....░.
            }
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-int-array.rs:48:1
+error[E0080]: constructing invalid value at [2]: encountered uninitialized memory, but expected an integer
+  --> $DIR/ub-int-array.rs:46:1
    |
 LL | const UNINIT_INT_2: [u32; 3] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [2]: encountered uninitialized memory, but expected an integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 12, align: 4) {
diff --git a/tests/ui/consts/const-eval/ub-invalid-values.rs b/tests/ui/consts/const-eval/ub-invalid-values.rs
index c0b68d7619a..e5d387fa7cc 100644
--- a/tests/ui/consts/const-eval/ub-invalid-values.rs
+++ b/tests/ui/consts/const-eval/ub-invalid-values.rs
@@ -5,8 +5,8 @@ const fn bool_cast(ptr: *const bool) { unsafe {
 
 const _: () = {
     let v = 3_u8;
-    bool_cast(&v as *const u8 as *const bool); //~ ERROR: evaluation of constant value failed
-    //~^ NOTE interpreting an invalid 8-bit value as a bool
+    bool_cast(&v as *const u8 as *const bool); //~ NOTE: evaluation of constant value failed
+    //~^ ERROR interpreting an invalid 8-bit value as a bool
 };
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/ub-invalid-values.stderr b/tests/ui/consts/const-eval/ub-invalid-values.stderr
index 76952c1f1a3..83879eeb716 100644
--- a/tests/ui/consts/const-eval/ub-invalid-values.stderr
+++ b/tests/ui/consts/const-eval/ub-invalid-values.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: interpreting an invalid 8-bit value as a bool: 0x03
   --> $DIR/ub-invalid-values.rs:8:5
    |
 LL |     bool_cast(&v as *const u8 as *const bool);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ interpreting an invalid 8-bit value as a bool: 0x03
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `bool_cast`
   --> $DIR/ub-invalid-values.rs:2:16
diff --git a/tests/ui/consts/const-eval/ub-nonnull.rs b/tests/ui/consts/const-eval/ub-nonnull.rs
index 8ae913db1e4..91646842624 100644
--- a/tests/ui/consts/const-eval/ub-nonnull.rs
+++ b/tests/ui/consts/const-eval/ub-nonnull.rs
@@ -14,19 +14,19 @@ const NON_NULL: NonNull<u8> = unsafe { mem::transmute(1usize) };
 const NON_NULL_PTR: NonNull<u8> = unsafe { mem::transmute(&1) };
 
 const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
 
 const OUT_OF_BOUNDS_PTR: NonNull<u8> = { unsafe {
     let ptr: &[u8; 256] = mem::transmute(&0u8); // &0 gets promoted so it does not dangle
     // Use address-of-element for pointer arithmetic. This could wrap around to null!
-    let out_of_bounds_ptr = &ptr[255]; //~ ERROR evaluation of constant value failed
+    let out_of_bounds_ptr = &ptr[255]; //~ ERROR in-bounds pointer arithmetic failed
     mem::transmute(out_of_bounds_ptr)
 } };
 
 const NULL_U8: NonZero<u8> = unsafe { mem::transmute(0u8) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
 const NULL_USIZE: NonZero<usize> = unsafe { mem::transmute(0usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
 
 #[repr(C)]
 union MaybeUninit<T: Copy> {
@@ -34,8 +34,7 @@ union MaybeUninit<T: Copy> {
     init: T,
 }
 const UNINIT: NonZero<u8> = unsafe { MaybeUninit { uninit: () }.init };
-//~^ ERROR evaluation of constant value failed
-//~| NOTE uninitialized
+//~^ ERROR uninitialized
 
 // Also test other uses of rustc_layout_scalar_valid_range_start
 
@@ -43,16 +42,16 @@ const UNINIT: NonZero<u8> = unsafe { MaybeUninit { uninit: () }.init };
 #[rustc_layout_scalar_valid_range_end(30)]
 struct RestrictedRange1(u32);
 const BAD_RANGE1: RestrictedRange1 = unsafe { RestrictedRange1(42) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
 
 #[rustc_layout_scalar_valid_range_start(30)]
 #[rustc_layout_scalar_valid_range_end(10)]
 struct RestrictedRange2(u32);
 const BAD_RANGE2: RestrictedRange2 = unsafe { RestrictedRange2(20) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
 
 const NULL_FAT_PTR: NonNull<dyn Send> = unsafe {
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
     let x: &dyn Send = &42;
     let meta = std::ptr::metadata(x);
     mem::transmute((0_usize, meta))
diff --git a/tests/ui/consts/const-eval/ub-nonnull.stderr b/tests/ui/consts/const-eval/ub-nonnull.stderr
index 75dd0443ca4..0a02dbb16bf 100644
--- a/tests/ui/consts/const-eval/ub-nonnull.stderr
+++ b/tests/ui/consts/const-eval/ub-nonnull.stderr
@@ -1,75 +1,75 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 0, but expected something greater or equal to 1
   --> $DIR/ub-nonnull.rs:16:1
    |
 LL | const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by 255 bytes, but got ALLOC1 which is only 1 byte from the end of the allocation
   --> $DIR/ub-nonnull.rs:22:29
    |
 LL |     let out_of_bounds_ptr = &ptr[255];
-   |                             ^^^^^^^^^ in-bounds pointer arithmetic failed: attempting to offset pointer by 255 bytes, but got ALLOC1 which is only 1 byte from the end of the allocation
+   |                             ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
   --> $DIR/ub-nonnull.rs:26:1
    |
 LL | const NULL_U8: NonZero<u8> = unsafe { mem::transmute(0u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
   --> $DIR/ub-nonnull.rs:28:1
    |
 LL | const NULL_USIZE: NonZero<usize> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/ub-nonnull.rs:36:38
    |
 LL | const UNINIT: NonZero<u8> = unsafe { MaybeUninit { uninit: () }.init };
-   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-nonnull.rs:45:1
+error[E0080]: constructing invalid value: encountered 42, but expected something in the range 10..=30
+  --> $DIR/ub-nonnull.rs:44:1
    |
 LL | const BAD_RANGE1: RestrictedRange1 = unsafe { RestrictedRange1(42) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 42, but expected something in the range 10..=30
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-nonnull.rs:51:1
+error[E0080]: constructing invalid value: encountered 20, but expected something less or equal to 10, or greater or equal to 30
+  --> $DIR/ub-nonnull.rs:50:1
    |
 LL | const BAD_RANGE2: RestrictedRange2 = unsafe { RestrictedRange2(20) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 20, but expected something less or equal to 10, or greater or equal to 30
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-nonnull.rs:54:1
+error[E0080]: constructing invalid value: encountered 0, but expected something greater or equal to 1
+  --> $DIR/ub-nonnull.rs:53:1
    |
 LL | const NULL_FAT_PTR: NonNull<dyn Send> = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {
diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.rs b/tests/ui/consts/const-eval/ub-ref-ptr.rs
index 988e6c62e34..64b48939be6 100644
--- a/tests/ui/consts/const-eval/ub-ref-ptr.rs
+++ b/tests/ui/consts/const-eval/ub-ref-ptr.rs
@@ -15,57 +15,53 @@ union MaybeUninit<T: Copy> {
 }
 
 const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+//~^ ERROR constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
 
 const UNALIGNED_BOX: Box<u16> = unsafe { mem::transmute(&[0u8; 4]) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
+//~^ ERROR constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
 
 const NULL: &u16 = unsafe { mem::transmute(0usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
 
 const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
 
 
 // It is very important that we reject this: We do promote `&(4 * REF_AS_USIZE)`,
 // but that would fail to compile; so we ended up breaking user code that would
 // have worked fine had we not promoted.
 const REF_AS_USIZE: usize = unsafe { mem::transmute(&0) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR unable to turn pointer into integer
 
 const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR unable to turn pointer into integer
 
 const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR unable to turn pointer into integer
 
 const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
 
 const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
 
 const UNINIT_PTR: *const i32 = unsafe { MaybeUninit { uninit: () }.init };
-//~^ ERROR evaluation of constant value failed
-//~| NOTE uninitialized
+//~^ ERROR uninitialized
 
 const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
 const UNINIT_FN_PTR: fn() = unsafe { MaybeUninit { uninit: () }.init };
-//~^ ERROR evaluation of constant value failed
-//~| NOTE uninitialized
+//~^ ERROR uninitialized
 const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
 const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR invalid value
 
 
 const UNALIGNED_READ: () = unsafe {
     let x = &[0u8; 4];
     let ptr = x.as_ptr().cast::<u32>();
-    ptr.read(); //~ ERROR evaluation of constant value failed
+    ptr.read(); //~ ERROR accessing memory
 };
 
 
diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.stderr b/tests/ui/consts/const-eval/ub-ref-ptr.stderr
index de5e721c3f7..e10f21b02af 100644
--- a/tests/ui/consts/const-eval/ub-ref-ptr.stderr
+++ b/tests/ui/consts/const-eval/ub-ref-ptr.stderr
@@ -1,163 +1,158 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
   --> $DIR/ub-ref-ptr.rs:17:1
    |
 LL | const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
+   | ^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:21:1
+error[E0080]: constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
+  --> $DIR/ub-ref-ptr.rs:20:1
    |
 LL | const UNALIGNED_BOX: Box<u16> = unsafe { mem::transmute(&[0u8; 4]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:25:1
+error[E0080]: constructing invalid value: encountered a null reference
+  --> $DIR/ub-ref-ptr.rs:23:1
    |
 LL | const NULL: &u16 = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
+   | ^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:28:1
+error[E0080]: constructing invalid value: encountered a null box
+  --> $DIR/ub-ref-ptr.rs:26:1
    |
 LL | const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null box
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
-  --> $DIR/ub-ref-ptr.rs:35:1
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/ub-ref-ptr.rs:33:1
    |
 LL | const REF_AS_USIZE: usize = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-ref-ptr.rs:38:39
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/ub-ref-ptr.rs:36:39
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
-   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
 note: erroneous constant encountered
-  --> $DIR/ub-ref-ptr.rs:38:38
+  --> $DIR/ub-ref-ptr.rs:36:38
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-ref-ptr.rs:41:86
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/ub-ref-ptr.rs:39:86
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
-   |                                                                                      ^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |                                                                                      ^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
 note: erroneous constant encountered
-  --> $DIR/ub-ref-ptr.rs:41:85
+  --> $DIR/ub-ref-ptr.rs:39:85
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
    |                                                                                     ^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:44:1
+error[E0080]: constructing invalid value: encountered a dangling reference (0x539[noalloc] has no provenance)
+  --> $DIR/ub-ref-ptr.rs:42:1
    |
 LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (0x539[noalloc] has no provenance)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:47:1
+error[E0080]: constructing invalid value: encountered a dangling box (0x539[noalloc] has no provenance)
+  --> $DIR/ub-ref-ptr.rs:45:1
    |
 LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (0x539[noalloc] has no provenance)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
-  --> $DIR/ub-ref-ptr.rs:50:41
+error[E0080]: using uninitialized data, but this operation requires initialized memory
+  --> $DIR/ub-ref-ptr.rs:48:41
    |
 LL | const UNINIT_PTR: *const i32 = unsafe { MaybeUninit { uninit: () }.init };
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:54:1
+error[E0080]: constructing invalid value: encountered null pointer, but expected a function pointer
+  --> $DIR/ub-ref-ptr.rs:51:1
    |
 LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
-  --> $DIR/ub-ref-ptr.rs:56:38
+error[E0080]: using uninitialized data, but this operation requires initialized memory
+  --> $DIR/ub-ref-ptr.rs:53:38
    |
 LL | const UNINIT_FN_PTR: fn() = unsafe { MaybeUninit { uninit: () }.init };
-   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:59:1
+error[E0080]: constructing invalid value: encountered 0xd[noalloc], but expected a function pointer
+  --> $DIR/ub-ref-ptr.rs:55:1
    |
 LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0xd[noalloc], but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:61:1
+error[E0080]: constructing invalid value: encountered ALLOC2<imm>, but expected a function pointer
+  --> $DIR/ub-ref-ptr.rs:57:1
    |
 LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC2<imm>, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
-  --> $DIR/ub-ref-ptr.rs:68:5
+error[E0080]: accessing memory based on pointer with alignment 1, but alignment 4 is required
+  --> $DIR/ub-ref-ptr.rs:64:5
    |
 LL |     ptr.read();
-   |     ^^^^^^^^^^ accessing memory based on pointer with alignment 1, but alignment 4 is required
-   |
-note: inside `std::ptr::const_ptr::<impl *const u32>::read`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
-note: inside `std::ptr::read::<u32>`
-  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+   |     ^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 15 previous errors
 
diff --git a/tests/ui/consts/const-eval/ub-uninhabit.rs b/tests/ui/consts/const-eval/ub-uninhabit.rs
index 3a5e291d5df..188ad768a0e 100644
--- a/tests/ui/consts/const-eval/ub-uninhabit.rs
+++ b/tests/ui/consts/const-eval/ub-uninhabit.rs
@@ -6,8 +6,7 @@
 #![feature(core_intrinsics)]
 #![feature(never_type)]
 
-use std::intrinsics;
-use std::mem;
+use std::{intrinsics, mem};
 
 #[derive(Copy, Clone)]
 enum Bar {}
@@ -19,25 +18,19 @@ union MaybeUninit<T: Copy> {
 }
 
 const BAD_BAD_BAD: Bar = unsafe { MaybeUninit { uninit: () }.init };
-//~^ ERROR evaluation of constant value failed
-//~| NOTE constructing invalid value
+//~^ ERROR constructing invalid value
 
 const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE constructing invalid value
+//~^ ERROR constructing invalid value
 
 const BAD_BAD_ARRAY: [Bar; 1] = unsafe { MaybeUninit { uninit: () }.init };
-//~^ ERROR evaluation of constant value failed
-//~| NOTE constructing invalid value
-
+//~^ ERROR constructing invalid value
 
 const READ_NEVER: () = unsafe {
     let mem = [0u32; 8];
     let ptr = mem.as_ptr().cast::<!>();
     let _val = intrinsics::read_via_copy(ptr);
-    //~^ ERROR evaluation of constant value failed
-    //~| NOTE constructing invalid value
+    //~^ ERROR constructing invalid value
 };
 
-
 fn main() {}
diff --git a/tests/ui/consts/const-eval/ub-uninhabit.stderr b/tests/ui/consts/const-eval/ub-uninhabit.stderr
index 9d3f93279e5..582a7a07be9 100644
--- a/tests/ui/consts/const-eval/ub-uninhabit.stderr
+++ b/tests/ui/consts/const-eval/ub-uninhabit.stderr
@@ -1,31 +1,31 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-uninhabit.rs:21:35
+error[E0080]: constructing invalid value: encountered a value of uninhabited type `Bar`
+  --> $DIR/ub-uninhabit.rs:20:35
    |
 LL | const BAD_BAD_BAD: Bar = unsafe { MaybeUninit { uninit: () }.init };
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of uninhabited type `Bar`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-uninhabit.rs:25:1
+error[E0080]: constructing invalid value: encountered a reference pointing to uninhabited type Bar
+  --> $DIR/ub-uninhabit.rs:23:1
    |
 LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type Bar
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
-  --> $DIR/ub-uninhabit.rs:29:42
+error[E0080]: constructing invalid value at [0]: encountered a value of uninhabited type `Bar`
+  --> $DIR/ub-uninhabit.rs:26:42
    |
 LL | const BAD_BAD_ARRAY: [Bar; 1] = unsafe { MaybeUninit { uninit: () }.init };
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered a value of uninhabited type `Bar`
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-uninhabit.rs:37:16
+error[E0080]: constructing invalid value: encountered a value of the never type `!`
+  --> $DIR/ub-uninhabit.rs:32:16
    |
 LL |     let _val = intrinsics::read_via_copy(ptr);
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of the never type `!`
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/consts/const-eval/ub-upvars.32bit.stderr b/tests/ui/consts/const-eval/ub-upvars.32bit.stderr
index 5342fea66bd..ecd1c768c28 100644
--- a/tests/ui/consts/const-eval/ub-upvars.32bit.stderr
+++ b/tests/ui/consts/const-eval/ub-upvars.32bit.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>.<dyn-downcast>.<captured-var(bad_ref)>: encountered a null reference
   --> $DIR/ub-upvars.rs:6:1
    |
 LL | const BAD_UPVAR: &dyn FnOnce() = &{
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>.<captured-var(bad_ref)>: encountered a null reference
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
diff --git a/tests/ui/consts/const-eval/ub-upvars.64bit.stderr b/tests/ui/consts/const-eval/ub-upvars.64bit.stderr
index a2496dfc287..108dfe6b27b 100644
--- a/tests/ui/consts/const-eval/ub-upvars.64bit.stderr
+++ b/tests/ui/consts/const-eval/ub-upvars.64bit.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>.<dyn-downcast>.<captured-var(bad_ref)>: encountered a null reference
   --> $DIR/ub-upvars.rs:6:1
    |
 LL | const BAD_UPVAR: &dyn FnOnce() = &{
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>.<captured-var(bad_ref)>: encountered a null reference
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
diff --git a/tests/ui/consts/const-eval/ub-upvars.rs b/tests/ui/consts/const-eval/ub-upvars.rs
index 817511180be..19722282984 100644
--- a/tests/ui/consts/const-eval/ub-upvars.rs
+++ b/tests/ui/consts/const-eval/ub-upvars.rs
@@ -3,7 +3,7 @@
 
 use std::mem;
 
-const BAD_UPVAR: &dyn FnOnce() = &{ //~ ERROR it is undefined behavior to use this value
+const BAD_UPVAR: &dyn FnOnce() = &{ //~ ERROR null reference
     let bad_ref: &'static u16 = unsafe { mem::transmute(0usize) };
     let another_var = 13;
     move || { let _ = bad_ref; let _ = another_var; }
diff --git a/tests/ui/consts/const-eval/ub-wide-ptr.rs b/tests/ui/consts/const-eval/ub-wide-ptr.rs
index 4b9bbb8066d..86235897e7e 100644
--- a/tests/ui/consts/const-eval/ub-wide-ptr.rs
+++ b/tests/ui/consts/const-eval/ub-wide-ptr.rs
@@ -37,74 +37,69 @@ type MySliceBool = MySlice<[bool]>;
 const STR_VALID: &str = unsafe { mem::transmute((&42u8, 1usize)) };
 // bad str
 const STR_TOO_LONG: &str = unsafe { mem::transmute((&42u8, 999usize)) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR encountered a dangling reference (going beyond the bounds of its allocation)
 const NESTED_STR_MUCH_TOO_LONG: (&str,) = (unsafe { mem::transmute((&42, usize::MAX)) },);
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR slice is bigger than largest supported object
 // bad str
 const STR_LENGTH_PTR: &str = unsafe { mem::transmute((&42u8, &3)) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR unable to turn pointer into integer
 // bad str in user-defined unsized type
 const MY_STR_LENGTH_PTR: &MyStr = unsafe { mem::transmute((&42u8, &3)) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR unable to turn pointer into integer
 const MY_STR_MUCH_TOO_LONG: &MyStr = unsafe { mem::transmute((&42u8, usize::MAX)) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR slice is bigger than largest supported object
 
 // uninitialized byte
 const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR uninitialized memory, but expected a string
 // uninitialized byte in user-defined str-like
 const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR uninitialized memory, but expected a string
 
 // # slice
 // OK
 const SLICE_VALID: &[u8] = unsafe { mem::transmute((&42u8, 1usize)) };
 // bad slice: length uninit
 const SLICE_LENGTH_UNINIT: &[u8] = unsafe {
-//~^ ERROR evaluation of constant value failed
-//~| NOTE uninitialized
+//~^ ERROR uninitialized
     let uninit_len = MaybeUninit::<usize> { uninit: () };
     mem::transmute((42, uninit_len))
 };
 // bad slice: length too big
 const SLICE_TOO_LONG: &[u8] = unsafe { mem::transmute((&42u8, 999usize)) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR dangling reference (going beyond the bounds of its allocation)
 // bad slice: length computation overflows
 const SLICE_TOO_LONG_OVERFLOW: &[u32] = unsafe { mem::transmute((&42u32, isize::MAX)) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR slice is bigger than largest supported object
 // bad slice: length not an int
 const SLICE_LENGTH_PTR: &[u8] = unsafe { mem::transmute((&42u8, &3)) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR unable to turn pointer into integer
 // bad slice box: length too big
 const SLICE_TOO_LONG_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, 999usize)) };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR dangling box (going beyond the bounds of its allocation)
 // bad slice box: length not an int
 const SLICE_LENGTH_PTR_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, &3)) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR unable to turn pointer into integer
 
 // bad data *inside* the slice
 const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE constant
+//~^ ERROR 0x03, but expected a boolean
 
 // good MySliceBool
 const MYSLICE_GOOD: &MySliceBool = &MySlice(true, [false]);
 // bad: sized field is not okay
 const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE constant
+//~^ ERROR 0x03, but expected a boolean
 // bad: unsized part is not okay
 const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE constant
+//~^ ERROR 0x03, but expected a boolean
 
 // # raw slice
 const RAW_SLICE_VALID: *const [u8] = unsafe { mem::transmute((&42u8, 1usize)) }; // ok
 const RAW_SLICE_TOO_LONG: *const [u8] = unsafe { mem::transmute((&42u8, 999usize)) }; // ok because raw
 const RAW_SLICE_MUCH_TOO_LONG: *const [u8] = unsafe { mem::transmute((&42u8, usize::MAX)) }; // ok because raw
 const RAW_SLICE_LENGTH_UNINIT: *const [u8] = unsafe {
-//~^ ERROR evaluation of constant value failed
-//~| NOTE uninitialized
+//~^ ERROR uninitialized
     let uninit_len = MaybeUninit::<usize> { uninit: () };
     mem::transmute((42, uninit_len))
 };
@@ -112,41 +107,31 @@ const RAW_SLICE_LENGTH_UNINIT: *const [u8] = unsafe {
 // # trait object
 // bad trait object
 const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE vtable
+//~^ ERROR vtable
 // bad trait object
 const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE vtable
+//~^ ERROR vtable
 // bad trait object
 const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, 4usize))) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE vtable
+//~^ ERROR vtable
 const TRAIT_OBJ_UNALIGNED_VTABLE: &dyn Trait = unsafe { mem::transmute((&92u8, &[0u8; 128])) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE vtable
+//~^ ERROR vtable
 const TRAIT_OBJ_BAD_DROP_FN_NULL: &dyn Trait = unsafe { mem::transmute((&92u8, &[0usize; 8])) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE vtable
+//~^ ERROR vtable
 const TRAIT_OBJ_BAD_DROP_FN_INT: &dyn Trait = unsafe { mem::transmute((&92u8, &[1usize; 8])) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE vtable
+//~^ ERROR vtable
 const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE vtable
+//~^ ERROR vtable
 
 // bad data *inside* the trait object
 const TRAIT_OBJ_CONTENT_INVALID: &dyn Trait = unsafe { mem::transmute::<_, &bool>(&3u8) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE expected a boolean
+//~^ ERROR expected a boolean
 
 // # raw trait object
 const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute((&92u8, 0usize)) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE null pointer
+//~^ ERROR null pointer
 const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE vtable
+//~^ ERROR vtable
 const RAW_TRAIT_OBJ_CONTENT_INVALID: *const dyn Trait = unsafe { mem::transmute::<_, &bool>(&3u8) } as *const dyn Trait; // ok because raw
 // Officially blessed way to get the vtable
 const DYN_METADATA: ptr::DynMetadata<dyn Send> = ptr::metadata::<dyn Send>(ptr::null::<i32>());
@@ -154,13 +139,11 @@ const DYN_METADATA: ptr::DynMetadata<dyn Send> = ptr::metadata::<dyn Send>(ptr::
 
 static mut RAW_TRAIT_OBJ_VTABLE_NULL_THROUGH_REF: *const dyn Trait = unsafe {
     mem::transmute::<_, &dyn Trait>((&92u8, 0usize))
-    //~^^ ERROR it is undefined behavior to use this value
-    //~| NOTE null pointer
+    //~^^ ERROR null pointer
 };
 static mut RAW_TRAIT_OBJ_VTABLE_INVALID_THROUGH_REF: *const dyn Trait = unsafe {
     mem::transmute::<_, &dyn Trait>((&92u8, &3u64))
-    //~^^ ERROR it is undefined behavior to use this value
-    //~| NOTE vtable
+    //~^^ ERROR vtable
 };
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/ub-wide-ptr.stderr b/tests/ui/consts/const-eval/ub-wide-ptr.stderr
index 92f0029a5b3..a586f154ca1 100644
--- a/tests/ui/consts/const-eval/ub-wide-ptr.stderr
+++ b/tests/ui/consts/const-eval/ub-wide-ptr.stderr
@@ -1,138 +1,138 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
   --> $DIR/ub-wide-ptr.rs:39:1
    |
 LL | const STR_TOO_LONG: &str = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .0: encountered invalid reference metadata: slice is bigger than largest supported object
   --> $DIR/ub-wide-ptr.rs:41:1
    |
 LL | const NESTED_STR_MUCH_TOO_LONG: (&str,) = (unsafe { mem::transmute((&42, usize::MAX)) },);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/ub-wide-ptr.rs:44:1
    |
 LL | const STR_LENGTH_PTR: &str = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/ub-wide-ptr.rs:47:1
    |
 LL | const MY_STR_LENGTH_PTR: &MyStr = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
   --> $DIR/ub-wide-ptr.rs:49:1
    |
 LL | const MY_STR_MUCH_TOO_LONG: &MyStr = unsafe { mem::transmute((&42u8, usize::MAX)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>: encountered uninitialized memory, but expected a string
   --> $DIR/ub-wide-ptr.rs:53:1
    |
 LL | const STR_NO_INIT: &str = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered uninitialized memory, but expected a string
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>.0: encountered uninitialized memory, but expected a string
   --> $DIR/ub-wide-ptr.rs:56:1
    |
 LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[MaybeUninit::<u8> { uninit: () }]) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered uninitialized memory, but expected a string
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/ub-wide-ptr.rs:63:1
    |
 LL | const SLICE_LENGTH_UNINIT: &[u8] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:70:1
+error[E0080]: constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+  --> $DIR/ub-wide-ptr.rs:69:1
    |
 LL | const SLICE_TOO_LONG: &[u8] = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:73:1
+error[E0080]: constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+  --> $DIR/ub-wide-ptr.rs:72:1
    |
 LL | const SLICE_TOO_LONG_OVERFLOW: &[u32] = unsafe { mem::transmute((&42u32, isize::MAX)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
-  --> $DIR/ub-wide-ptr.rs:76:1
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/ub-wide-ptr.rs:75:1
    |
 LL | const SLICE_LENGTH_PTR: &[u8] = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:79:1
+error[E0080]: constructing invalid value: encountered a dangling box (going beyond the bounds of its allocation)
+  --> $DIR/ub-wide-ptr.rs:78:1
    |
 LL | const SLICE_TOO_LONG_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, 999usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
-  --> $DIR/ub-wide-ptr.rs:82:1
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/ub-wide-ptr.rs:81:1
    |
 LL | const SLICE_LENGTH_PTR_BOX: Box<[u8]> = unsafe { mem::transmute((&42u8, &3)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:86:1
+error[E0080]: constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
+  --> $DIR/ub-wide-ptr.rs:85:1
    |
 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {
@@ -140,16 +140,16 @@ LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
            }
 
 note: erroneous constant encountered
-  --> $DIR/ub-wide-ptr.rs:86:40
+  --> $DIR/ub-wide-ptr.rs:85:40
    |
 LL | const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }];
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:93:1
+error[E0080]: constructing invalid value at .<deref>.0: encountered 0x03, but expected a boolean
+  --> $DIR/ub-wide-ptr.rs:91:1
    |
 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.0: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {
@@ -157,16 +157,16 @@ LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3
            }
 
 note: erroneous constant encountered
-  --> $DIR/ub-wide-ptr.rs:93:42
+  --> $DIR/ub-wide-ptr.rs:91:42
    |
 LL | const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]);
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:97:1
+error[E0080]: constructing invalid value at .<deref>.1[0]: encountered 0x03, but expected a boolean
+  --> $DIR/ub-wide-ptr.rs:94:1
    |
 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.1[0]: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {
@@ -174,143 +174,143 @@ LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::tran
            }
 
 note: erroneous constant encountered
-  --> $DIR/ub-wide-ptr.rs:97:42
+  --> $DIR/ub-wide-ptr.rs:94:42
    |
 LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]);
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-wide-ptr.rs:105:1
+error[E0080]: using uninitialized data, but this operation requires initialized memory
+  --> $DIR/ub-wide-ptr.rs:101:1
    |
 LL | const RAW_SLICE_LENGTH_UNINIT: *const [u8] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:114:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC12<imm>, but expected a vtable pointer
+  --> $DIR/ub-wide-ptr.rs:109:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC12<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:118:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC14<imm>, but expected a vtable pointer
+  --> $DIR/ub-wide-ptr.rs:112:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC14<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:122:1
+error[E0080]: constructing invalid value at .0: encountered 0x4[noalloc], but expected a vtable pointer
+  --> $DIR/ub-wide-ptr.rs:115:1
    |
 LL | const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, 4usize))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0x4[noalloc], but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:125:1
+error[E0080]: constructing invalid value: encountered ALLOC17<imm>, but expected a vtable pointer
+  --> $DIR/ub-wide-ptr.rs:117:1
    |
 LL | const TRAIT_OBJ_UNALIGNED_VTABLE: &dyn Trait = unsafe { mem::transmute((&92u8, &[0u8; 128])) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC17<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:128:1
+error[E0080]: constructing invalid value: encountered ALLOC19<imm>, but expected a vtable pointer
+  --> $DIR/ub-wide-ptr.rs:119:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_NULL: &dyn Trait = unsafe { mem::transmute((&92u8, &[0usize; 8])) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC19<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:131:1
+error[E0080]: constructing invalid value: encountered ALLOC21<imm>, but expected a vtable pointer
+  --> $DIR/ub-wide-ptr.rs:121:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_INT: &dyn Trait = unsafe { mem::transmute((&92u8, &[1usize; 8])) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC21<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:134:1
+error[E0080]: constructing invalid value at .0: encountered ALLOC23<imm>, but expected a vtable pointer
+  --> $DIR/ub-wide-ptr.rs:123:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC23<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:139:1
+error[E0080]: constructing invalid value at .<deref>.<dyn-downcast>: encountered 0x03, but expected a boolean
+  --> $DIR/ub-wide-ptr.rs:127:1
    |
 LL | const TRAIT_OBJ_CONTENT_INVALID: &dyn Trait = unsafe { mem::transmute::<_, &bool>(&3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>: encountered 0x03, but expected a boolean
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:144:1
+error[E0080]: constructing invalid value: encountered null pointer, but expected a vtable pointer
+  --> $DIR/ub-wide-ptr.rs:131:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_NULL: *const dyn Trait = unsafe { mem::transmute((&92u8, 0usize)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:147:1
+error[E0080]: constructing invalid value: encountered ALLOC28<imm>, but expected a vtable pointer
+  --> $DIR/ub-wide-ptr.rs:133:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC28<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:155:1
+error[E0080]: constructing invalid value: encountered null pointer, but expected a vtable pointer
+  --> $DIR/ub-wide-ptr.rs:140:1
    |
 LL | static mut RAW_TRAIT_OBJ_VTABLE_NULL_THROUGH_REF: *const dyn Trait = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/ub-wide-ptr.rs:160:1
+error[E0080]: constructing invalid value: encountered ALLOC31<imm>, but expected a vtable pointer
+  --> $DIR/ub-wide-ptr.rs:144:1
    |
 LL | static mut RAW_TRAIT_OBJ_VTABLE_INVALID_THROUGH_REF: *const dyn Trait = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC31<imm>, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {
diff --git a/tests/ui/consts/const-eval/ub-write-through-immutable.rs b/tests/ui/consts/const-eval/ub-write-through-immutable.rs
index 795ac602a1c..28c7a617a4d 100644
--- a/tests/ui/consts/const-eval/ub-write-through-immutable.rs
+++ b/tests/ui/consts/const-eval/ub-write-through-immutable.rs
@@ -1,21 +1,19 @@
 //! Ensure we catch UB due to writing through a shared reference.
 #![allow(invalid_reference_casting)]
 
-use std::mem;
 use std::cell::UnsafeCell;
+use std::mem;
 
 const WRITE_AFTER_CAST: () = unsafe {
     let mut x = 0;
     let ptr = &x as *const i32 as *mut i32;
-    *ptr = 0; //~ERROR: evaluation of constant value failed
-    //~| NOTE immutable
+    *ptr = 0; //~ERROR: immutable
 };
 
 const WRITE_AFTER_TRANSMUTE: () = unsafe {
     let mut x = 0;
     let ptr: *mut i32 = mem::transmute(&x);
-    *ptr = 0; //~ERROR: evaluation of constant value failed
-    //~| NOTE immutable
+    *ptr = 0; //~ERROR: immutable
 };
 
 // it's okay when there is interior mutability;
diff --git a/tests/ui/consts/const-eval/ub-write-through-immutable.stderr b/tests/ui/consts/const-eval/ub-write-through-immutable.stderr
index d30df33bc55..dbcd07110cc 100644
--- a/tests/ui/consts/const-eval/ub-write-through-immutable.stderr
+++ b/tests/ui/consts/const-eval/ub-write-through-immutable.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: writing through a pointer that was derived from a shared (immutable) reference
   --> $DIR/ub-write-through-immutable.rs:10:5
    |
 LL |     *ptr = 0;
-   |     ^^^^^^^^ writing through a pointer that was derived from a shared (immutable) reference
+   |     ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-write-through-immutable.rs:17:5
+error[E0080]: writing through a pointer that was derived from a shared (immutable) reference
+  --> $DIR/ub-write-through-immutable.rs:16:5
    |
 LL |     *ptr = 0;
-   |     ^^^^^^^^ writing through a pointer that was derived from a shared (immutable) reference
+   |     ^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const-eval/union-const-eval-field.rs b/tests/ui/consts/const-eval/union-const-eval-field.rs
index 55e9abe72e0..0ad94eee7f4 100644
--- a/tests/ui/consts/const-eval/union-const-eval-field.rs
+++ b/tests/ui/consts/const-eval/union-const-eval-field.rs
@@ -26,8 +26,7 @@ const fn read_field2() -> Field2 {
 
 const fn read_field3() -> Field3 {
     const FIELD3: Field3 = unsafe { UNION.field3 };
-    //~^ ERROR evaluation of constant value failed
-    //~| NOTE uninitialized
+    //~^ ERROR uninitialized
     FIELD3
 }
 
diff --git a/tests/ui/consts/const-eval/union-const-eval-field.stderr b/tests/ui/consts/const-eval/union-const-eval-field.stderr
index 4fd6b80381c..eb3906a4ecc 100644
--- a/tests/ui/consts/const-eval/union-const-eval-field.stderr
+++ b/tests/ui/consts/const-eval/union-const-eval-field.stderr
@@ -1,17 +1,17 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/union-const-eval-field.rs:28:37
    |
 LL |     const FIELD3: Field3 = unsafe { UNION.field3 };
-   |                                     ^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                                     ^^^^^^^^^^^^ evaluation of constant value failed here
 
 note: erroneous constant encountered
-  --> $DIR/union-const-eval-field.rs:31:5
+  --> $DIR/union-const-eval-field.rs:30:5
    |
 LL |     FIELD3
    |     ^^^^^^
 
 note: erroneous constant encountered
-  --> $DIR/union-const-eval-field.rs:31:5
+  --> $DIR/union-const-eval-field.rs:30:5
    |
 LL |     FIELD3
    |     ^^^^^^
diff --git a/tests/ui/consts/const-eval/union-ice.rs b/tests/ui/consts/const-eval/union-ice.rs
index 8ce5f6d89a8..7a4909e8ce2 100644
--- a/tests/ui/consts/const-eval/union-ice.rs
+++ b/tests/ui/consts/const-eval/union-ice.rs
@@ -12,14 +12,12 @@ union DummyUnion {
 const UNION: DummyUnion = DummyUnion { field1: 1065353216 };
 
 const FIELD3: Field3 = unsafe { UNION.field3 };
-//~^ ERROR evaluation of constant value failed
-//~| NOTE uninitialized
+//~^ ERROR uninitialized
 
 const FIELD_PATH: Struct = Struct {
     a: 42,
     b: unsafe { UNION.field3 },
-    //~^ ERROR evaluation of constant value failed
-    //~| NOTE uninitialized
+    //~^ ERROR uninitialized
 };
 
 struct Struct {
@@ -31,8 +29,7 @@ const FIELD_PATH2: Struct2 = Struct2 {
     b: [
         21,
         unsafe { UNION.field3 },
-        //~^ ERROR evaluation of constant value failed
-        //~| NOTE uninitialized
+        //~^ ERROR uninitialized
         23,
         24,
     ],
@@ -44,5 +41,4 @@ struct Struct2 {
     a: u8,
 }
 
-fn main() {
-}
+fn main() {}
diff --git a/tests/ui/consts/const-eval/union-ice.stderr b/tests/ui/consts/const-eval/union-ice.stderr
index bd39a05510b..86c42713095 100644
--- a/tests/ui/consts/const-eval/union-ice.stderr
+++ b/tests/ui/consts/const-eval/union-ice.stderr
@@ -1,20 +1,20 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/union-ice.rs:14:33
    |
 LL | const FIELD3: Field3 = unsafe { UNION.field3 };
-   |                                 ^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                                 ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/union-ice.rs:20:17
+error[E0080]: using uninitialized data, but this operation requires initialized memory
+  --> $DIR/union-ice.rs:19:17
    |
 LL |     b: unsafe { UNION.field3 },
-   |                 ^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                 ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/union-ice.rs:33:18
+error[E0080]: using uninitialized data, but this operation requires initialized memory
+  --> $DIR/union-ice.rs:31:18
    |
 LL |         unsafe { UNION.field3 },
-   |                  ^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   |                  ^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/consts/const-eval/union-ub.32bit.stderr b/tests/ui/consts/const-eval/union-ub.32bit.stderr
index 38ded4d65cf..7b263c20d33 100644
--- a/tests/ui/consts/const-eval/union-ub.32bit.stderr
+++ b/tests/ui/consts/const-eval/union-ub.32bit.stderr
@@ -1,19 +1,19 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 0x2a, but expected a boolean
   --> $DIR/union-ub.rs:33:1
    |
-LL | const BAD_BOOL: bool = unsafe { DummyUnion { u8: 42 }.bool};
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x2a, but expected a boolean
+LL | const BAD_BOOL: bool = unsafe { DummyUnion { u8: 42 }.bool };
+   | ^^^^^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
                2a                                              │ *
            }
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/union-ub.rs:35:36
    |
-LL | const UNINIT_BOOL: bool = unsafe { DummyUnion { unit: () }.bool};
-   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+LL | const UNINIT_BOOL: bool = unsafe { DummyUnion { unit: () }.bool };
+   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const-eval/union-ub.64bit.stderr b/tests/ui/consts/const-eval/union-ub.64bit.stderr
index 38ded4d65cf..7b263c20d33 100644
--- a/tests/ui/consts/const-eval/union-ub.64bit.stderr
+++ b/tests/ui/consts/const-eval/union-ub.64bit.stderr
@@ -1,19 +1,19 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 0x2a, but expected a boolean
   --> $DIR/union-ub.rs:33:1
    |
-LL | const BAD_BOOL: bool = unsafe { DummyUnion { u8: 42 }.bool};
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x2a, but expected a boolean
+LL | const BAD_BOOL: bool = unsafe { DummyUnion { u8: 42 }.bool };
+   | ^^^^^^^^^^^^^^^^^^^^ 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: 1, align: 1) {
                2a                                              │ *
            }
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/union-ub.rs:35:36
    |
-LL | const UNINIT_BOOL: bool = unsafe { DummyUnion { unit: () }.bool};
-   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+LL | const UNINIT_BOOL: bool = unsafe { DummyUnion { unit: () }.bool };
+   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const-eval/union-ub.rs b/tests/ui/consts/const-eval/union-ub.rs
index 7d8fd7446a0..0fa5d312856 100644
--- a/tests/ui/consts/const-eval/union-ub.rs
+++ b/tests/ui/consts/const-eval/union-ub.rs
@@ -30,15 +30,13 @@ union Bar {
 }
 
 // the value is not valid for bools
-const BAD_BOOL: bool = unsafe { DummyUnion { u8: 42 }.bool};
-//~^ ERROR it is undefined behavior to use this value
-const UNINIT_BOOL: bool = unsafe { DummyUnion { unit: () }.bool};
-//~^ ERROR evaluation of constant value failed
-//~| NOTE uninitialized
+const BAD_BOOL: bool = unsafe { DummyUnion { u8: 42 }.bool };
+//~^ ERROR invalid value
+const UNINIT_BOOL: bool = unsafe { DummyUnion { unit: () }.bool };
+//~^ ERROR uninitialized
 
 // The value is not valid for any union variant, but that's fine
 // unions are just a convenient way to transmute bits around
 const BAD_UNION: Foo = unsafe { Bar { u8: 42 }.foo };
 
-
 fn main() {}
diff --git a/tests/ui/consts/const-eval/unused-broken-const.rs b/tests/ui/consts/const-eval/unused-broken-const.rs
index f7e229aa980..60206362665 100644
--- a/tests/ui/consts/const-eval/unused-broken-const.rs
+++ b/tests/ui/consts/const-eval/unused-broken-const.rs
@@ -3,6 +3,6 @@
 //@ compile-flags: --emit=dep-info,metadata
 
 const FOO: i32 = [][0];
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR index out of bounds
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/unused-broken-const.stderr b/tests/ui/consts/const-eval/unused-broken-const.stderr
index fd0ee316fe2..5745539cb56 100644
--- a/tests/ui/consts/const-eval/unused-broken-const.stderr
+++ b/tests/ui/consts/const-eval/unused-broken-const.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: index out of bounds: the length is 0 but the index is 0
   --> $DIR/unused-broken-const.rs:5:18
    |
 LL | const FOO: i32 = [][0];
-   |                  ^^^^^ index out of bounds: the length is 0 but the index is 0
+   |                  ^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/unwind-abort.rs b/tests/ui/consts/const-eval/unwind-abort.rs
index b239dba0239..688bb085356 100644
--- a/tests/ui/consts/const-eval/unwind-abort.rs
+++ b/tests/ui/consts/const-eval/unwind-abort.rs
@@ -4,7 +4,7 @@ const extern "C" fn foo() {
     panic!() //~ NOTE inside `foo`
 }
 
-const _: () = foo(); //~ ERROR evaluation of constant value failed
+const _: () = foo(); //~ ERROR explicit panic
 // Ensure that the CTFE engine handles calls to `extern "C"` aborting gracefully
 
 fn main() {
diff --git a/tests/ui/consts/const-eval/unwind-abort.stderr b/tests/ui/consts/const-eval/unwind-abort.stderr
index 5ed7467e84b..94cf3acec45 100644
--- a/tests/ui/consts/const-eval/unwind-abort.stderr
+++ b/tests/ui/consts/const-eval/unwind-abort.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/unwind-abort.rs:7:15
    |
 LL | const _: () = foo();
-   |               ^^^^^ evaluation panicked: explicit panic
+   |               ^^^^^ evaluation of constant value failed here
    |
 note: inside `foo`
   --> $DIR/unwind-abort.rs:4:5
diff --git a/tests/ui/consts/const-eval/validate_uninhabited_zsts.rs b/tests/ui/consts/const-eval/validate_uninhabited_zsts.rs
index 5f1d27b0de0..dbb165c64d9 100644
--- a/tests/ui/consts/const-eval/validate_uninhabited_zsts.rs
+++ b/tests/ui/consts/const-eval/validate_uninhabited_zsts.rs
@@ -15,10 +15,10 @@ pub mod empty {
 }
 
 const FOO: [empty::Empty; 3] = [foo(); 3];
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR value of the never type
 
 const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3];
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR value of uninhabited type
 
 fn main() {
     FOO;
diff --git a/tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr b/tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr
index 0407ae5c323..4557b392907 100644
--- a/tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr
+++ b/tests/ui/consts/const-eval/validate_uninhabited_zsts.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: constructing invalid value: encountered a value of the never type `!`
   --> $DIR/validate_uninhabited_zsts.rs:17:33
    |
 LL | const FOO: [empty::Empty; 3] = [foo(); 3];
-   |                                 ^^^^^ constructing invalid value: encountered a value of the never type `!`
+   |                                 ^^^^^ evaluation of constant value failed here
    |
 note: inside `foo`
   --> $DIR/validate_uninhabited_zsts.rs:4:14
@@ -10,11 +10,11 @@ note: inside `foo`
 LL |     unsafe { std::mem::transmute(()) }
    |              ^^^^^^^^^^^^^^^^^^^^^^^ the failure occurred here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: constructing invalid value at .0: encountered a value of uninhabited type `Void`
   --> $DIR/validate_uninhabited_zsts.rs:20:42
    |
 LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3];
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered a value of uninhabited type `Void`
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const-eval/validation-ice-extern-type-field.rs b/tests/ui/consts/const-eval/validation-ice-extern-type-field.rs
index 8a32b170c40..3081689ee90 100644
--- a/tests/ui/consts/const-eval/validation-ice-extern-type-field.rs
+++ b/tests/ui/consts/const-eval/validation-ice-extern-type-field.rs
@@ -10,6 +10,6 @@ struct ThinDst {
 }
 
 const C1: &ThinDst = unsafe { std::mem::transmute(b"d".as_ptr()) };
-//~^ERROR: evaluation of constant value failed
+//~^ERROR: `extern type` field does not have a known offset
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/validation-ice-extern-type-field.stderr b/tests/ui/consts/const-eval/validation-ice-extern-type-field.stderr
index 1ec36abc2ec..08d791f4953 100644
--- a/tests/ui/consts/const-eval/validation-ice-extern-type-field.stderr
+++ b/tests/ui/consts/const-eval/validation-ice-extern-type-field.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: `extern type` field does not have a known offset
   --> $DIR/validation-ice-extern-type-field.rs:12:1
    |
 LL | const C1: &ThinDst = unsafe { std::mem::transmute(b"d".as_ptr()) };
-   | ^^^^^^^^^^^^^^^^^^ `extern type` field does not have a known offset
+   | ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-external-macro-const-err.rs b/tests/ui/consts/const-external-macro-const-err.rs
index 3cb83823f1a..60cbe36071d 100644
--- a/tests/ui/consts/const-external-macro-const-err.rs
+++ b/tests/ui/consts/const-external-macro-const-err.rs
@@ -9,5 +9,5 @@ extern crate external_macro;
 use external_macro::static_assert;
 
 fn main() {
-    static_assert!(2 + 2 == 5); //~ ERROR constant
+    static_assert!(2 + 2 == 5); //~ ERROR index out of bounds: the length is 1 but the index is 1
 }
diff --git a/tests/ui/consts/const-external-macro-const-err.stderr b/tests/ui/consts/const-external-macro-const-err.stderr
index 63f81ea18bc..7cd646b1c45 100644
--- a/tests/ui/consts/const-external-macro-const-err.stderr
+++ b/tests/ui/consts/const-external-macro-const-err.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: index out of bounds: the length is 1 but the index is 1
   --> $DIR/const-external-macro-const-err.rs:12:5
    |
 LL |     static_assert!(2 + 2 == 5);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 1
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = note: this error originates in the macro `static_assert` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/consts/const-int-unchecked.rs b/tests/ui/consts/const-int-unchecked.rs
index 8de28aa2bb1..3fc58720cf1 100644
--- a/tests/ui/consts/const-int-unchecked.rs
+++ b/tests/ui/consts/const-int-unchecked.rs
@@ -1,6 +1,5 @@
 #![feature(core_intrinsics)]
 
-
 use std::intrinsics;
 
 // The documentation of `unchecked_shl` states that it:
@@ -13,137 +12,137 @@ use std::intrinsics;
 // unsigned types:
 
 const SHL_U8: u8 = unsafe { intrinsics::unchecked_shl(5_u8, 8) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_U16: u16 = unsafe { intrinsics::unchecked_shl(5_u16, 16) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_U32: u32 = unsafe { intrinsics::unchecked_shl(5_u32, 32) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_U64: u64 = unsafe { intrinsics::unchecked_shl(5_u64, 64) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_U128: u128 = unsafe { intrinsics::unchecked_shl(5_u128, 128) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 
 // signed types:
 
 const SHL_I8: i8 = unsafe { intrinsics::unchecked_shl(5_i8, 8) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_I16: i16 = unsafe { intrinsics::unchecked_shl(5_i16, 16) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_I32: i32 = unsafe { intrinsics::unchecked_shl(5_i32, 32) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_I64: i64 = unsafe { intrinsics::unchecked_shl(5_i64, 64) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_I128: i128 = unsafe { intrinsics::unchecked_shl(5_i128, 128) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 
 // and make sure we capture y < 0:
 
 const SHL_I8_NEG: i8 = unsafe { intrinsics::unchecked_shl(5_i8, -1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_I16_NEG: i16 = unsafe { intrinsics::unchecked_shl(5_i16, -1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_I32_NEG: i32 = unsafe { intrinsics::unchecked_shl(5_i32, -1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_I64_NEG: i64 = unsafe { intrinsics::unchecked_shl(5_i64, -1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_I128_NEG: i128 = unsafe { intrinsics::unchecked_shl(5_i128, -1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 
 // and that there's no special relation to the value -1 by picking some
 // negative values at random:
 
 const SHL_I8_NEG_RANDOM: i8 = unsafe { intrinsics::unchecked_shl(5_i8, -6) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_I16_NEG_RANDOM: i16 = unsafe { intrinsics::unchecked_shl(5_i16, -13) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_I32_NEG_RANDOM: i32 = unsafe { intrinsics::unchecked_shl(5_i32, -25) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_I64_NEG_RANDOM: i64 = unsafe { intrinsics::unchecked_shl(5_i64, -30) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHL_I128_NEG_RANDOM: i128 = unsafe { intrinsics::unchecked_shl(5_i128, -93) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 
 // Repeat it all over for `unchecked_shr`
 
 // unsigned types:
 
 const SHR_U8: u8 = unsafe { intrinsics::unchecked_shr(5_u8, 8) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_U16: u16 = unsafe { intrinsics::unchecked_shr(5_u16, 16) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_U32: u32 = unsafe { intrinsics::unchecked_shr(5_u32, 32) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_U64: u64 = unsafe { intrinsics::unchecked_shr(5_u64, 64) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_U128: u128 = unsafe { intrinsics::unchecked_shr(5_u128, 128) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 
 // signed types:
 
 const SHR_I8: i8 = unsafe { intrinsics::unchecked_shr(5_i8, 8) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_I16: i16 = unsafe { intrinsics::unchecked_shr(5_i16, 16) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_I32: i32 = unsafe { intrinsics::unchecked_shr(5_i32, 32) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_I64: i64 = unsafe { intrinsics::unchecked_shr(5_i64, 64) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_I128: i128 = unsafe { intrinsics::unchecked_shr(5_i128, 128) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 
 // and make sure we capture y < 0:
 
 const SHR_I8_NEG: i8 = unsafe { intrinsics::unchecked_shr(5_i8, -1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_I16_NEG: i16 = unsafe { intrinsics::unchecked_shr(5_i16, -1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_I32_NEG: i32 = unsafe { intrinsics::unchecked_shr(5_i32, -1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_I64_NEG: i64 = unsafe { intrinsics::unchecked_shr(5_i64, -1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_I128_NEG: i128 = unsafe { intrinsics::unchecked_shr(5_i128, -1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 
 // and that there's no special relation to the value -1 by picking some
 // negative values at random:
 
 const SHR_I8_NEG_RANDOM: i8 = unsafe { intrinsics::unchecked_shr(5_i8, -6) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_I16_NEG_RANDOM: i16 = unsafe { intrinsics::unchecked_shr(5_i16, -13) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_I32_NEG_RANDOM: i32 = unsafe { intrinsics::unchecked_shr(5_i32, -25) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_I64_NEG_RANDOM: i64 = unsafe { intrinsics::unchecked_shr(5_i64, -30) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 const SHR_I128_NEG_RANDOM: i128 = unsafe { intrinsics::unchecked_shr(5_i128, -93) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflowing shift
 
 // Other arithmetic functions:
 
 const _: u16 = unsafe { std::intrinsics::unchecked_add(40000u16, 30000) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR arithmetic overflow
 
 const _: u32 = unsafe { std::intrinsics::unchecked_sub(14u32, 22) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR arithmetic overflow
 
 const _: u16 = unsafe { std::intrinsics::unchecked_mul(300u16, 250u16) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR arithmetic overflow
 
 const _: i32 = unsafe { std::intrinsics::unchecked_div(1, 0) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR dividing by zero
 const _: i32 = unsafe { std::intrinsics::unchecked_div(i32::MIN, -1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflow in signed division (dividing MIN by -1)
 
 const _: i32 = unsafe { std::intrinsics::unchecked_rem(1, 0) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR calculating the remainder with a divisor of zero
 const _: i32 = unsafe { std::intrinsics::unchecked_rem(i32::MIN, -1) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR overflow in signed remainder (dividing MIN by -1)
 
 // capture fault with zero value
 
 const _: u32 = unsafe { std::intrinsics::ctlz_nonzero(0) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR `ctlz_nonzero` called on 0
 const _: u32 = unsafe { std::intrinsics::cttz_nonzero(0) };
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR `cttz_nonzero` called on 0
 
 fn main() {}
diff --git a/tests/ui/consts/const-int-unchecked.stderr b/tests/ui/consts/const-int-unchecked.stderr
index 3130603231e..20c109b9265 100644
--- a/tests/ui/consts/const-int-unchecked.stderr
+++ b/tests/ui/consts/const-int-unchecked.stderr
@@ -1,296 +1,296 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:15:29
+error[E0080]: overflowing shift by 8 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:14:29
    |
 LL | const SHL_U8: u8 = unsafe { intrinsics::unchecked_shl(5_u8, 8) };
-   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 8 in `unchecked_shl`
+   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:17:31
+error[E0080]: overflowing shift by 16 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:16:31
    |
 LL | const SHL_U16: u16 = unsafe { intrinsics::unchecked_shl(5_u16, 16) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 16 in `unchecked_shl`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:19:31
+error[E0080]: overflowing shift by 32 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:18:31
    |
 LL | const SHL_U32: u32 = unsafe { intrinsics::unchecked_shl(5_u32, 32) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 32 in `unchecked_shl`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:21:31
+error[E0080]: overflowing shift by 64 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:20:31
    |
 LL | const SHL_U64: u64 = unsafe { intrinsics::unchecked_shl(5_u64, 64) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 64 in `unchecked_shl`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:23:33
+error[E0080]: overflowing shift by 128 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:22:33
    |
 LL | const SHL_U128: u128 = unsafe { intrinsics::unchecked_shl(5_u128, 128) };
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 128 in `unchecked_shl`
+   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:28:29
+error[E0080]: overflowing shift by 8 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:27:29
    |
 LL | const SHL_I8: i8 = unsafe { intrinsics::unchecked_shl(5_i8, 8) };
-   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 8 in `unchecked_shl`
+   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:30:31
+error[E0080]: overflowing shift by 16 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:29:31
    |
 LL | const SHL_I16: i16 = unsafe { intrinsics::unchecked_shl(5_i16, 16) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 16 in `unchecked_shl`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:32:31
+error[E0080]: overflowing shift by 32 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:31:31
    |
 LL | const SHL_I32: i32 = unsafe { intrinsics::unchecked_shl(5_i32, 32) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 32 in `unchecked_shl`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:34:31
+error[E0080]: overflowing shift by 64 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:33:31
    |
 LL | const SHL_I64: i64 = unsafe { intrinsics::unchecked_shl(5_i64, 64) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 64 in `unchecked_shl`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:36:33
+error[E0080]: overflowing shift by 128 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:35:33
    |
 LL | const SHL_I128: i128 = unsafe { intrinsics::unchecked_shl(5_i128, 128) };
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 128 in `unchecked_shl`
+   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:41:33
+error[E0080]: overflowing shift by -1 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:40:33
    |
 LL | const SHL_I8_NEG: i8 = unsafe { intrinsics::unchecked_shl(5_i8, -1) };
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shl`
+   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:43:35
+error[E0080]: overflowing shift by -1 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:42:35
    |
 LL | const SHL_I16_NEG: i16 = unsafe { intrinsics::unchecked_shl(5_i16, -1) };
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shl`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:45:35
+error[E0080]: overflowing shift by -1 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:44:35
    |
 LL | const SHL_I32_NEG: i32 = unsafe { intrinsics::unchecked_shl(5_i32, -1) };
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shl`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:47:35
+error[E0080]: overflowing shift by -1 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:46:35
    |
 LL | const SHL_I64_NEG: i64 = unsafe { intrinsics::unchecked_shl(5_i64, -1) };
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shl`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:49:37
+error[E0080]: overflowing shift by -1 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:48:37
    |
 LL | const SHL_I128_NEG: i128 = unsafe { intrinsics::unchecked_shl(5_i128, -1) };
-   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shl`
+   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:55:40
+error[E0080]: overflowing shift by -6 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:54:40
    |
 LL | const SHL_I8_NEG_RANDOM: i8 = unsafe { intrinsics::unchecked_shl(5_i8, -6) };
-   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -6 in `unchecked_shl`
+   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:57:42
+error[E0080]: overflowing shift by -13 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:56:42
    |
 LL | const SHL_I16_NEG_RANDOM: i16 = unsafe { intrinsics::unchecked_shl(5_i16, -13) };
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -13 in `unchecked_shl`
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:59:42
+error[E0080]: overflowing shift by -25 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:58:42
    |
 LL | const SHL_I32_NEG_RANDOM: i32 = unsafe { intrinsics::unchecked_shl(5_i32, -25) };
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -25 in `unchecked_shl`
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:61:42
+error[E0080]: overflowing shift by -30 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:60:42
    |
 LL | const SHL_I64_NEG_RANDOM: i64 = unsafe { intrinsics::unchecked_shl(5_i64, -30) };
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -30 in `unchecked_shl`
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:63:44
+error[E0080]: overflowing shift by -93 in `unchecked_shl`
+  --> $DIR/const-int-unchecked.rs:62:44
    |
 LL | const SHL_I128_NEG_RANDOM: i128 = unsafe { intrinsics::unchecked_shl(5_i128, -93) };
-   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -93 in `unchecked_shl`
+   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:70:29
+error[E0080]: overflowing shift by 8 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:69:29
    |
 LL | const SHR_U8: u8 = unsafe { intrinsics::unchecked_shr(5_u8, 8) };
-   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 8 in `unchecked_shr`
+   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:72:31
+error[E0080]: overflowing shift by 16 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:71:31
    |
 LL | const SHR_U16: u16 = unsafe { intrinsics::unchecked_shr(5_u16, 16) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 16 in `unchecked_shr`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:74:31
+error[E0080]: overflowing shift by 32 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:73:31
    |
 LL | const SHR_U32: u32 = unsafe { intrinsics::unchecked_shr(5_u32, 32) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 32 in `unchecked_shr`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:76:31
+error[E0080]: overflowing shift by 64 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:75:31
    |
 LL | const SHR_U64: u64 = unsafe { intrinsics::unchecked_shr(5_u64, 64) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 64 in `unchecked_shr`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:78:33
+error[E0080]: overflowing shift by 128 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:77:33
    |
 LL | const SHR_U128: u128 = unsafe { intrinsics::unchecked_shr(5_u128, 128) };
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 128 in `unchecked_shr`
+   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:83:29
+error[E0080]: overflowing shift by 8 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:82:29
    |
 LL | const SHR_I8: i8 = unsafe { intrinsics::unchecked_shr(5_i8, 8) };
-   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 8 in `unchecked_shr`
+   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:85:31
+error[E0080]: overflowing shift by 16 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:84:31
    |
 LL | const SHR_I16: i16 = unsafe { intrinsics::unchecked_shr(5_i16, 16) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 16 in `unchecked_shr`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:87:31
+error[E0080]: overflowing shift by 32 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:86:31
    |
 LL | const SHR_I32: i32 = unsafe { intrinsics::unchecked_shr(5_i32, 32) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 32 in `unchecked_shr`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:89:31
+error[E0080]: overflowing shift by 64 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:88:31
    |
 LL | const SHR_I64: i64 = unsafe { intrinsics::unchecked_shr(5_i64, 64) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 64 in `unchecked_shr`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:91:33
+error[E0080]: overflowing shift by 128 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:90:33
    |
 LL | const SHR_I128: i128 = unsafe { intrinsics::unchecked_shr(5_i128, 128) };
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 128 in `unchecked_shr`
+   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:96:33
+error[E0080]: overflowing shift by -1 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:95:33
    |
 LL | const SHR_I8_NEG: i8 = unsafe { intrinsics::unchecked_shr(5_i8, -1) };
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shr`
+   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:98:35
+error[E0080]: overflowing shift by -1 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:97:35
    |
 LL | const SHR_I16_NEG: i16 = unsafe { intrinsics::unchecked_shr(5_i16, -1) };
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shr`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:100:35
+error[E0080]: overflowing shift by -1 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:99:35
    |
 LL | const SHR_I32_NEG: i32 = unsafe { intrinsics::unchecked_shr(5_i32, -1) };
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shr`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:102:35
+error[E0080]: overflowing shift by -1 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:101:35
    |
 LL | const SHR_I64_NEG: i64 = unsafe { intrinsics::unchecked_shr(5_i64, -1) };
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shr`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:104:37
+error[E0080]: overflowing shift by -1 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:103:37
    |
 LL | const SHR_I128_NEG: i128 = unsafe { intrinsics::unchecked_shr(5_i128, -1) };
-   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shr`
+   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:110:40
+error[E0080]: overflowing shift by -6 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:109:40
    |
 LL | const SHR_I8_NEG_RANDOM: i8 = unsafe { intrinsics::unchecked_shr(5_i8, -6) };
-   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -6 in `unchecked_shr`
+   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:112:42
+error[E0080]: overflowing shift by -13 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:111:42
    |
 LL | const SHR_I16_NEG_RANDOM: i16 = unsafe { intrinsics::unchecked_shr(5_i16, -13) };
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -13 in `unchecked_shr`
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:114:42
+error[E0080]: overflowing shift by -25 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:113:42
    |
 LL | const SHR_I32_NEG_RANDOM: i32 = unsafe { intrinsics::unchecked_shr(5_i32, -25) };
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -25 in `unchecked_shr`
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:116:42
+error[E0080]: overflowing shift by -30 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:115:42
    |
 LL | const SHR_I64_NEG_RANDOM: i64 = unsafe { intrinsics::unchecked_shr(5_i64, -30) };
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -30 in `unchecked_shr`
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:118:44
+error[E0080]: overflowing shift by -93 in `unchecked_shr`
+  --> $DIR/const-int-unchecked.rs:117:44
    |
 LL | const SHR_I128_NEG_RANDOM: i128 = unsafe { intrinsics::unchecked_shr(5_i128, -93) };
-   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -93 in `unchecked_shr`
+   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:123:25
+error[E0080]: arithmetic overflow in `unchecked_add`
+  --> $DIR/const-int-unchecked.rs:122:25
    |
 LL | const _: u16 = unsafe { std::intrinsics::unchecked_add(40000u16, 30000) };
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ arithmetic overflow in `unchecked_add`
+   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:126:25
+error[E0080]: arithmetic overflow in `unchecked_sub`
+  --> $DIR/const-int-unchecked.rs:125:25
    |
 LL | const _: u32 = unsafe { std::intrinsics::unchecked_sub(14u32, 22) };
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ arithmetic overflow in `unchecked_sub`
+   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:129:25
+error[E0080]: arithmetic overflow in `unchecked_mul`
+  --> $DIR/const-int-unchecked.rs:128:25
    |
 LL | const _: u16 = unsafe { std::intrinsics::unchecked_mul(300u16, 250u16) };
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ arithmetic overflow in `unchecked_mul`
+   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:132:25
+error[E0080]: dividing by zero
+  --> $DIR/const-int-unchecked.rs:131:25
    |
 LL | const _: i32 = unsafe { std::intrinsics::unchecked_div(1, 0) };
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dividing by zero
+   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:134:25
+error[E0080]: overflow in signed division (dividing MIN by -1)
+  --> $DIR/const-int-unchecked.rs:133:25
    |
 LL | const _: i32 = unsafe { std::intrinsics::unchecked_div(i32::MIN, -1) };
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow in signed division (dividing MIN by -1)
+   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:137:25
+error[E0080]: calculating the remainder with a divisor of zero
+  --> $DIR/const-int-unchecked.rs:136:25
    |
 LL | const _: i32 = unsafe { std::intrinsics::unchecked_rem(1, 0) };
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calculating the remainder with a divisor of zero
+   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:139:25
+error[E0080]: overflow in signed remainder (dividing MIN by -1)
+  --> $DIR/const-int-unchecked.rs:138:25
    |
 LL | const _: i32 = unsafe { std::intrinsics::unchecked_rem(i32::MIN, -1) };
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow in signed remainder (dividing MIN by -1)
+   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:144:25
+error[E0080]: `ctlz_nonzero` called on 0
+  --> $DIR/const-int-unchecked.rs:143:25
    |
 LL | const _: u32 = unsafe { std::intrinsics::ctlz_nonzero(0) };
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ctlz_nonzero` called on 0
+   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-int-unchecked.rs:146:25
+error[E0080]: `cttz_nonzero` called on 0
+  --> $DIR/const-int-unchecked.rs:145:25
    |
 LL | const _: u32 = unsafe { std::intrinsics::cttz_nonzero(0) };
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `cttz_nonzero` called on 0
+   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 49 previous errors
 
diff --git a/tests/ui/consts/const-len-underflow-separate-spans.next.stderr b/tests/ui/consts/const-len-underflow-separate-spans.next.stderr
index aacd74635e9..510b9cdc406 100644
--- a/tests/ui/consts/const-len-underflow-separate-spans.next.stderr
+++ b/tests/ui/consts/const-len-underflow-separate-spans.next.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `1_usize - 2_usize`, which would overflow
   --> $DIR/const-len-underflow-separate-spans.rs:10:20
    |
 LL | const LEN: usize = ONE - TWO;
-   |                    ^^^^^^^^^ attempt to compute `1_usize - 2_usize`, which would overflow
+   |                    ^^^^^^^^^ evaluation of constant value failed here
 
 note: erroneous constant encountered
   --> $DIR/const-len-underflow-separate-spans.rs:15:17
diff --git a/tests/ui/consts/const-len-underflow-separate-spans.old.stderr b/tests/ui/consts/const-len-underflow-separate-spans.old.stderr
index aacd74635e9..510b9cdc406 100644
--- a/tests/ui/consts/const-len-underflow-separate-spans.old.stderr
+++ b/tests/ui/consts/const-len-underflow-separate-spans.old.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `1_usize - 2_usize`, which would overflow
   --> $DIR/const-len-underflow-separate-spans.rs:10:20
    |
 LL | const LEN: usize = ONE - TWO;
-   |                    ^^^^^^^^^ attempt to compute `1_usize - 2_usize`, which would overflow
+   |                    ^^^^^^^^^ evaluation of constant value failed here
 
 note: erroneous constant encountered
   --> $DIR/const-len-underflow-separate-spans.rs:15:17
diff --git a/tests/ui/consts/const-len-underflow-separate-spans.rs b/tests/ui/consts/const-len-underflow-separate-spans.rs
index 14eb88b1427..a815ecaef70 100644
--- a/tests/ui/consts/const-len-underflow-separate-spans.rs
+++ b/tests/ui/consts/const-len-underflow-separate-spans.rs
@@ -8,10 +8,10 @@
 const ONE: usize = 1;
 const TWO: usize = 2;
 const LEN: usize = ONE - TWO;
-//~^ ERROR constant
-//~| NOTE attempt to compute `1_usize - 2_usize`, which would overflow
+//~^ NOTE constant
+//~| ERROR attempt to compute `1_usize - 2_usize`, which would overflow
 
 fn main() {
     let a: [i8; LEN] = unimplemented!();
-//~^ NOTE constant
+    //~^ NOTE constant
 }
diff --git a/tests/ui/consts/const-len-underflow-subspans.rs b/tests/ui/consts/const-len-underflow-subspans.rs
index 5afb1bf89d0..1540bffa0ad 100644
--- a/tests/ui/consts/const-len-underflow-subspans.rs
+++ b/tests/ui/consts/const-len-underflow-subspans.rs
@@ -6,6 +6,5 @@ const TWO: usize = 2;
 
 fn main() {
     let a: [i8; ONE - TWO] = unimplemented!();
-    //~^ ERROR evaluation of constant value failed
-    //~| NOTE attempt to compute `1_usize - 2_usize`, which would overflow
+    //~^ ERROR attempt to compute `1_usize - 2_usize`, which would overflow
 }
diff --git a/tests/ui/consts/const-len-underflow-subspans.stderr b/tests/ui/consts/const-len-underflow-subspans.stderr
index bfec056cc8a..42d744147d6 100644
--- a/tests/ui/consts/const-len-underflow-subspans.stderr
+++ b/tests/ui/consts/const-len-underflow-subspans.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to compute `1_usize - 2_usize`, which would overflow
   --> $DIR/const-len-underflow-subspans.rs:8:17
    |
 LL |     let a: [i8; ONE - TWO] = unimplemented!();
-   |                 ^^^^^^^^^ attempt to compute `1_usize - 2_usize`, which would overflow
+   |                 ^^^^^^^^^ evaluation of constant value failed here
 
 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 bc534be6832..29474c76320 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
@@ -25,8 +25,7 @@ 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 undefined behavior to use this value
-//~| NOTE pointing to read-only memory
+//~^ ERROR pointing to read-only memory
 
 // Ok, because no references to mutable data exist here, since the `{}` moves
 // its value and then takes a reference to that.
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 1f49f08c401..834ea3410f6 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
@@ -24,11 +24,11 @@ LL | const B4: Option<&mut i32> = helper(&mut 42);
    |                              |           creates a temporary value which is freed while still in use
    |                              using this value as a constant requires that borrow lasts for `'static`
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered mutable reference or box pointing to read-only memory
   --> $DIR/mut_ref_in_final.rs:27:1
    |
 LL | const IMMUT_MUT_REF: &mut u16 = unsafe { mem::transmute(&13) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference or box pointing to read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {
@@ -36,7 +36,7 @@ LL | const IMMUT_MUT_REF: &mut u16 = unsafe { mem::transmute(&13) };
            }
 
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/mut_ref_in_final.rs:51:65
+  --> $DIR/mut_ref_in_final.rs:50:65
    |
 LL | const FOO: NotAMutex<&mut i32> = NotAMutex(UnsafeCell::new(&mut 42));
    |                                  -------------------------------^^--
@@ -46,7 +46,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:54:67
+  --> $DIR/mut_ref_in_final.rs:53:67
    |
 LL | static FOO2: NotAMutex<&mut i32> = NotAMutex(UnsafeCell::new(&mut 42));
    |                                    -------------------------------^^--
@@ -56,7 +56,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:57:71
+  --> $DIR/mut_ref_in_final.rs:56:71
    |
 LL | static mut FOO3: NotAMutex<&mut i32> = NotAMutex(UnsafeCell::new(&mut 42));
    |                                        -------------------------------^^--
@@ -66,25 +66,25 @@ LL | static mut FOO3: NotAMutex<&mut i32> = NotAMutex(UnsafeCell::new(&mut 42));
    |                                        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:70:53
+  --> $DIR/mut_ref_in_final.rs:69:53
    |
 LL | static RAW_MUT_CAST_S: SyncPtr<i32> = SyncPtr { x : &mut 42 as *mut _ as *const _ };
    |                                                     ^^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of statics
-  --> $DIR/mut_ref_in_final.rs:72:54
+  --> $DIR/mut_ref_in_final.rs:71:54
    |
 LL | static RAW_MUT_COERCE_S: SyncPtr<i32> = SyncPtr { x: &mut 0 };
    |                                                      ^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of constants
-  --> $DIR/mut_ref_in_final.rs:74:52
+  --> $DIR/mut_ref_in_final.rs:73:52
    |
 LL | const RAW_MUT_CAST_C: SyncPtr<i32> = SyncPtr { x : &mut 42 as *mut _ as *const _ };
    |                                                    ^^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of constants
-  --> $DIR/mut_ref_in_final.rs:76:53
+  --> $DIR/mut_ref_in_final.rs:75:53
    |
 LL | const RAW_MUT_COERCE_C: SyncPtr<i32> = SyncPtr { x: &mut 0 };
    |                                                     ^^^^^^
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 a58c4437e15..2707e8a14ec 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,24 +16,21 @@ 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 it is undefined behavior to use this value
-//~^ NOTE encountered reference to mutable
+const MUT: Option<&mut i32> = helper(); //~ ERROR encountered reference to mutable
 
 const fn helper_int2ptr() -> Option<&'static mut i32> { unsafe {
     // Undefined behaviour (integer as pointer), who doesn't love tests like this.
     Some(&mut *(42 as *mut i32))
 } }
-const INT2PTR: Option<&mut i32> = helper_int2ptr(); //~ ERROR it is undefined behavior to use this value
-//~^ NOTE encountered a dangling reference
-static INT2PTR_STATIC: Option<&mut i32> = helper_int2ptr(); //~ ERROR it is undefined behavior to use this value
-//~^ NOTE encountered a dangling reference
+const INT2PTR: Option<&mut i32> = helper_int2ptr(); //~ ERROR encountered a dangling reference
+static INT2PTR_STATIC: Option<&mut i32> = helper_int2ptr(); //~ ERROR encountered a dangling reference
 
 const fn helper_dangling() -> Option<&'static mut i32> { unsafe {
     // Undefined behaviour (dangling pointer), who doesn't love tests like this.
     Some(&mut *(&mut 42 as *mut i32))
 } }
-const DANGLING: Option<&mut i32> = helper_dangling(); //~ ERROR it is undefined behavior to use this value
-static DANGLING_STATIC: Option<&mut i32> = helper_dangling(); //~ ERROR it is undefined behavior to use this value
+const DANGLING: Option<&mut i32> = helper_dangling(); //~ ERROR dangling reference
+static DANGLING_STATIC: Option<&mut i32> = helper_dangling(); //~ ERROR dangling reference
 
 // These are fine! Just statics pointing to mutable statics, nothing fundamentally wrong with this.
 static MUT_STATIC: Option<&mut i32> = helper();
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 4ea6fa62475..6456587b77a 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,52 +1,52 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<enum-variant(Some)>.0: encountered reference to mutable memory in `const`
   --> $DIR/mut_ref_in_final_dynamic_check.rs:19:1
    |
 LL | const MUT: Option<&mut i32> = helper();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered reference to mutable memory in `const`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/mut_ref_in_final_dynamic_check.rs:26:1
+error[E0080]: constructing invalid value at .<enum-variant(Some)>.0: encountered a dangling reference (0x2a[noalloc] has no provenance)
+  --> $DIR/mut_ref_in_final_dynamic_check.rs:25:1
    |
 LL | const INT2PTR: Option<&mut i32> = helper_int2ptr();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered a dangling reference (0x2a[noalloc] has no provenance)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/mut_ref_in_final_dynamic_check.rs:28:1
+error[E0080]: constructing invalid value at .<enum-variant(Some)>.0: encountered a dangling reference (0x2a[noalloc] has no provenance)
+  --> $DIR/mut_ref_in_final_dynamic_check.rs:26:1
    |
 LL | static INT2PTR_STATIC: Option<&mut i32> = helper_int2ptr();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered a dangling reference (0x2a[noalloc] has no provenance)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/mut_ref_in_final_dynamic_check.rs:35:1
+error[E0080]: constructing invalid value at .<enum-variant(Some)>.0: encountered a dangling reference (use-after-free)
+  --> $DIR/mut_ref_in_final_dynamic_check.rs:32:1
    |
 LL | const DANGLING: Option<&mut i32> = helper_dangling();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered a dangling reference (use-after-free)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/mut_ref_in_final_dynamic_check.rs:36:1
+error[E0080]: constructing invalid value at .<enum-variant(Some)>.0: encountered a dangling reference (use-after-free)
+  --> $DIR/mut_ref_in_final_dynamic_check.rs:33:1
    |
 LL | static DANGLING_STATIC: Option<&mut i32> = helper_dangling();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered a dangling reference (use-after-free)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {
diff --git a/tests/ui/consts/const-ptr-is-null.rs b/tests/ui/consts/const-ptr-is-null.rs
index 319f6b1a62b..7e7b74c3520 100644
--- a/tests/ui/consts/const-ptr-is-null.rs
+++ b/tests/ui/consts/const-ptr-is-null.rs
@@ -19,7 +19,7 @@ const MAYBE_NULL: () = {
     assert!(!ptr.wrapping_byte_sub(1).is_null());
     // ... but once we shift outside the allocation, with an offset divisible by 4,
     // we might become null.
-    assert!(!ptr.wrapping_sub(512).is_null()); //~ ERROR evaluation of constant value failed
+    assert!(!ptr.wrapping_sub(512).is_null()); //~ ERROR null-ness of this pointer cannot be determined
 };
 
 fn main() {}
diff --git a/tests/ui/consts/const-ptr-is-null.stderr b/tests/ui/consts/const-ptr-is-null.stderr
index 1a2be3b3cb1..9d83f8d51a7 100644
--- a/tests/ui/consts/const-ptr-is-null.stderr
+++ b/tests/ui/consts/const-ptr-is-null.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: null-ness of this pointer cannot be determined in const context
   --> $DIR/const-ptr-is-null.rs:22:14
    |
 LL |     assert!(!ptr.wrapping_sub(512).is_null());
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: null-ness of this pointer cannot be determined in const context
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `std::ptr::const_ptr::<impl *const i32>::is_null`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
diff --git a/tests/ui/consts/const-size_of_val-align_of_val-extern-type.rs b/tests/ui/consts/const-size_of_val-align_of_val-extern-type.rs
index 598904d3c44..14cdf6bb7c6 100644
--- a/tests/ui/consts/const-size_of_val-align_of_val-extern-type.rs
+++ b/tests/ui/consts/const-size_of_val-align_of_val-extern-type.rs
@@ -7,7 +7,7 @@ extern "C" {
     type Opaque;
 }
 
-const _SIZE: usize = unsafe { size_of_val(&4 as *const i32 as *const Opaque) }; //~ ERROR constant
-const _ALIGN: usize = unsafe { min_align_of_val(&4 as *const i32 as *const Opaque) }; //~ ERROR constant
+const _SIZE: usize = unsafe { size_of_val(&4 as *const i32 as *const Opaque) }; //~ ERROR layout
+const _ALIGN: usize = unsafe { min_align_of_val(&4 as *const i32 as *const Opaque) }; //~ ERROR layout
 
 fn main() {}
diff --git a/tests/ui/consts/const-size_of_val-align_of_val-extern-type.stderr b/tests/ui/consts/const-size_of_val-align_of_val-extern-type.stderr
index 4c0252123a4..714d85bb394 100644
--- a/tests/ui/consts/const-size_of_val-align_of_val-extern-type.stderr
+++ b/tests/ui/consts/const-size_of_val-align_of_val-extern-type.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: `extern type` does not have known layout
   --> $DIR/const-size_of_val-align_of_val-extern-type.rs:10:31
    |
 LL | const _SIZE: usize = unsafe { size_of_val(&4 as *const i32 as *const Opaque) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `extern type` does not have known layout
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: `extern type` does not have known layout
   --> $DIR/const-size_of_val-align_of_val-extern-type.rs:11:32
    |
 LL | const _ALIGN: usize = unsafe { min_align_of_val(&4 as *const i32 as *const Opaque) };
-   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `extern type` does not have known layout
+   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const-slice-oob.rs b/tests/ui/consts/const-slice-oob.rs
index 09202df72c0..6682c234eaf 100644
--- a/tests/ui/consts/const-slice-oob.rs
+++ b/tests/ui/consts/const-slice-oob.rs
@@ -1,7 +1,6 @@
-const FOO: &'static[u32] = &[1, 2, 3];
+const FOO: &'static [u32] = &[1, 2, 3];
 const BAR: u32 = FOO[5];
-//~^ NOTE index out of bounds: the length is 3 but the index is 5
-//~| ERROR evaluation of constant value failed
+//~^ ERROR index out of bounds: the length is 3 but the index is 5
 
 fn main() {
     let _ = BAR;
diff --git a/tests/ui/consts/const-slice-oob.stderr b/tests/ui/consts/const-slice-oob.stderr
index 30ec340d2a2..d93c4783e27 100644
--- a/tests/ui/consts/const-slice-oob.stderr
+++ b/tests/ui/consts/const-slice-oob.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: index out of bounds: the length is 3 but the index is 5
   --> $DIR/const-slice-oob.rs:2:18
    |
 LL | const BAR: u32 = FOO[5];
-   |                  ^^^^^^ index out of bounds: the length is 3 but the index is 5
+   |                  ^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-unstable-intrinsic.stderr b/tests/ui/consts/const-unstable-intrinsic.stderr
index 308b02386f5..7e7ba966cee 100644
--- a/tests/ui/consts/const-unstable-intrinsic.stderr
+++ b/tests/ui/consts/const-unstable-intrinsic.stderr
@@ -46,16 +46,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |         size_of_val(&x);
    |         ^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn const_main() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(local)]
-LL | const fn const_main() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local)]`
   --> $DIR/const-unstable-intrinsic.rs:26:9
@@ -63,16 +58,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |         min_align_of_val(&x);
    |         ^^^^^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn const_main() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(local)]
-LL | const fn const_main() {
-   |
 
 error: intrinsic `copy::copy` cannot be (indirectly) exposed to stable
   --> $DIR/const-unstable-intrinsic.rs:48:14
@@ -88,16 +78,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |         super::size_of_val(src);
    |         ^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL +     #[rustc_const_unstable(feature = "...", issue = "...")]
 LL |     const unsafe fn copy<T>(src: *const T, _dst: *mut T, _count: usize) {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL +     #[rustc_allow_const_fn_unstable(local)]
-LL |     const unsafe fn copy<T>(src: *const T, _dst: *mut T, _count: usize) {
-   |
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/consts/const-unwrap.rs b/tests/ui/consts/const-unwrap.rs
index d48078a0834..38ebd5dd230 100644
--- a/tests/ui/consts/const-unwrap.rs
+++ b/tests/ui/consts/const-unwrap.rs
@@ -4,12 +4,10 @@
 const FOO: i32 = Some(42i32).unwrap();
 
 const BAR: i32 = Option::<i32>::None.unwrap();
-//~^ ERROR: evaluation of constant value failed
-//~| NOTE: called `Option::unwrap()` on a `None` value
+//~^ ERROR: called `Option::unwrap()` on a `None` value
 
 const BAZ: i32 = Option::<i32>::None.expect("absolutely not!");
-//~^ ERROR: evaluation of constant value failed
-//~| NOTE: absolutely not!
+//~^ ERROR: absolutely not!
 
 fn main() {
     println!("{}", FOO);
diff --git a/tests/ui/consts/const-unwrap.stderr b/tests/ui/consts/const-unwrap.stderr
index 832c95992c8..88c9185eeb6 100644
--- a/tests/ui/consts/const-unwrap.stderr
+++ b/tests/ui/consts/const-unwrap.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: called `Option::unwrap()` on a `None` value
   --> $DIR/const-unwrap.rs:6:18
    |
 LL | const BAR: i32 = Option::<i32>::None.unwrap();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: called `Option::unwrap()` on a `None` value
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-unwrap.rs:10:18
+error[E0080]: evaluation panicked: absolutely not!
+  --> $DIR/const-unwrap.rs:9:18
    |
 LL | const BAZ: i32 = Option::<i32>::None.expect("absolutely not!");
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: absolutely not!
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const_refs_to_static_fail.rs b/tests/ui/consts/const_refs_to_static_fail.rs
index e1f2262ba29..b8bab91e005 100644
--- a/tests/ui/consts/const_refs_to_static_fail.rs
+++ b/tests/ui/consts/const_refs_to_static_fail.rs
@@ -9,16 +9,13 @@ use std::cell::SyncUnsafeCell;
 static S: SyncUnsafeCell<i32> = SyncUnsafeCell::new(0);
 static mut S_MUT: i32 = 0;
 
-const C1: &SyncUnsafeCell<i32> = &S; //~ERROR undefined behavior
-//~| NOTE encountered reference to mutable memory
+const C1: &SyncUnsafeCell<i32> = &S; //~ERROR encountered reference to mutable memory
 const C1_READ: () = unsafe {
     assert!(*C1.get() == 0);
 };
 const C2: *const i32 = unsafe { std::ptr::addr_of!(S_MUT) };
 const C2_READ: () = unsafe {
-    assert!(*C2 == 0); //~ERROR evaluation of constant value failed
-    //~^ NOTE constant accesses mutable global memory
+    assert!(*C2 == 0); //~ERROR constant accesses mutable global memory
 };
 
-fn main() {
-}
+fn main() {}
diff --git a/tests/ui/consts/const_refs_to_static_fail.stderr b/tests/ui/consts/const_refs_to_static_fail.stderr
index 245806da5c6..96a6593279d 100644
--- a/tests/ui/consts/const_refs_to_static_fail.stderr
+++ b/tests/ui/consts/const_refs_to_static_fail.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+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;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {
@@ -10,16 +10,16 @@ LL | const C1: &SyncUnsafeCell<i32> = &S;
            }
 
 note: erroneous constant encountered
-  --> $DIR/const_refs_to_static_fail.rs:15:14
+  --> $DIR/const_refs_to_static_fail.rs:14:14
    |
 LL |     assert!(*C1.get() == 0);
    |              ^^
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const_refs_to_static_fail.rs:19:13
+error[E0080]: constant accesses mutable global memory
+  --> $DIR/const_refs_to_static_fail.rs:18:13
    |
 LL |     assert!(*C2 == 0);
-   |             ^^^ constant accesses mutable global memory
+   |             ^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
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 f6ccfbfc52f..34ed8540f3f 100644
--- a/tests/ui/consts/const_refs_to_static_fail_invalid.rs
+++ b/tests/ui/consts/const_refs_to_static_fail_invalid.rs
@@ -8,8 +8,7 @@ fn invalid() {
     static S: i8 = 10;
 
     const C: &bool = unsafe { std::mem::transmute(&S) };
-    //~^ERROR: undefined behavior
-    //~| NOTE expected a boolean
+    //~^ERROR: expected a boolean
 
     // This must be rejected here (or earlier), since it's not a valid `&bool`.
     match &true {
@@ -24,8 +23,7 @@ fn extern_() {
     }
 
     const C: &i8 = unsafe { &S };
-    //~^ERROR: undefined behavior
-    //~| NOTE `extern` static
+    //~^ERROR: `extern` static
 
     // This must be rejected here (or earlier), since the pattern cannot be read.
     match &0 {
@@ -38,8 +36,7 @@ fn mutable() {
     static mut S_MUT: i32 = 0;
 
     const C: &i32 = unsafe { &S_MUT };
-    //~^ERROR: undefined behavior
-    //~| NOTE encountered reference to mutable memory
+    //~^ERROR: encountered reference to mutable memory
 
     // This *must not build*, the constant we are matching against
     // could change its value!
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 e0086e07af7..8a034aa00bc 100644
--- a/tests/ui/consts/const_refs_to_static_fail_invalid.stderr
+++ b/tests/ui/consts/const_refs_to_static_fail_invalid.stderr
@@ -1,30 +1,30 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>: encountered 0x0a, but expected a boolean
   --> $DIR/const_refs_to_static_fail_invalid.rs:10:5
    |
 LL |     const C: &bool = unsafe { std::mem::transmute(&S) };
-   |     ^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered 0x0a, but expected a boolean
+   |     ^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/const_refs_to_static_fail_invalid.rs:26:5
+error[E0080]: constructing invalid value: encountered reference to `extern` static in `const`
+  --> $DIR/const_refs_to_static_fail_invalid.rs:25:5
    |
 LL |     const C: &i8 = unsafe { &S };
-   |     ^^^^^^^^^^^^ constructing invalid value: encountered reference to `extern` static in `const`
+   |     ^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/const_refs_to_static_fail_invalid.rs:40:5
+error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
+  --> $DIR/const_refs_to_static_fail_invalid.rs:38:5
    |
 LL |     const C: &i32 = unsafe { &S_MUT };
-   |     ^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const`
+   |     ^^^^^^^^^^^^^ 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) {
diff --git a/tests/ui/consts/const_unsafe_unreachable_ub.rs b/tests/ui/consts/const_unsafe_unreachable_ub.rs
index a3f7fd46a75..7c6c7a608b8 100644
--- a/tests/ui/consts/const_unsafe_unreachable_ub.rs
+++ b/tests/ui/consts/const_unsafe_unreachable_ub.rs
@@ -1,14 +1,15 @@
 const unsafe fn foo(x: bool) -> bool {
     match x {
         true => true,
-        false => std::hint::unreachable_unchecked(), //~ NOTE inside `foo`
+        false => std::hint::unreachable_unchecked(),
+        //~^ NOTE inside `foo`
+        //~| NOTE the failure occurred here
     }
 }
 
 const BAR: bool = unsafe { foo(false) };
-//~^ ERROR evaluation of constant value failed
-//~| NOTE entering unreachable code
-//~| NOTE inside `unreachable_unchecked`
+//~^ NOTE evaluation of constant value failed
+//~| ERROR entering unreachable code
 
 fn main() {
     assert_eq!(BAR, true);
diff --git a/tests/ui/consts/const_unsafe_unreachable_ub.stderr b/tests/ui/consts/const_unsafe_unreachable_ub.stderr
index 079ed77b219..6d9f8c1d73b 100644
--- a/tests/ui/consts/const_unsafe_unreachable_ub.stderr
+++ b/tests/ui/consts/const_unsafe_unreachable_ub.stderr
@@ -1,16 +1,14 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const_unsafe_unreachable_ub.rs:8:28
+error[E0080]: entering unreachable code
+  --> $DIR/const_unsafe_unreachable_ub.rs:10:28
    |
 LL | const BAR: bool = unsafe { foo(false) };
-   |                            ^^^^^^^^^^ entering unreachable code
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `foo`
   --> $DIR/const_unsafe_unreachable_ub.rs:4:18
    |
 LL |         false => std::hint::unreachable_unchecked(),
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: inside `unreachable_unchecked`
-  --> $SRC_DIR/core/src/hint.rs:LL:COL
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the failure occurred here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/control-flow/assert.rs b/tests/ui/consts/control-flow/assert.rs
index 9d17f65b93c..2c372075137 100644
--- a/tests/ui/consts/control-flow/assert.rs
+++ b/tests/ui/consts/control-flow/assert.rs
@@ -3,6 +3,6 @@
 const _: () = assert!(true);
 
 const _: () = assert!(false);
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR assertion failed
 
 fn main() {}
diff --git a/tests/ui/consts/control-flow/assert.stderr b/tests/ui/consts/control-flow/assert.stderr
index 3fa98b74bf6..6b68f706f90 100644
--- a/tests/ui/consts/control-flow/assert.stderr
+++ b/tests/ui/consts/control-flow/assert.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: assertion failed: false
   --> $DIR/assert.rs:5:15
    |
 LL | const _: () = assert!(false);
-   |               ^^^^^^^^^^^^^^ evaluation panicked: assertion failed: false
+   |               ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/copy-intrinsic.rs b/tests/ui/consts/copy-intrinsic.rs
index da483d671f9..480f1c5f460 100644
--- a/tests/ui/consts/copy-intrinsic.rs
+++ b/tests/ui/consts/copy-intrinsic.rs
@@ -1,22 +1,8 @@
-#![stable(feature = "dummy", since = "1.0.0")]
-
 // ignore-tidy-linelength
-#![feature(intrinsics, staged_api, rustc_attrs)]
-use std::mem;
+#![feature(core_intrinsics)]
 
-#[stable(feature = "dummy", since = "1.0.0")]
-#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
-#[rustc_intrinsic]
-const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize) {
-    unimplemented!()
-}
-
-#[stable(feature = "dummy", since = "1.0.0")]
-#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
-#[rustc_intrinsic]
-const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
-    unimplemented!()
-}
+use std::intrinsics::{copy, copy_nonoverlapping};
+use std::mem;
 
 const COPY_ZERO: () = unsafe {
     // Since we are not copying anything, this should be allowed.
@@ -31,8 +17,7 @@ const COPY_OOB_1: () = unsafe {
     // Zero-sized copy is fine.
     copy_nonoverlapping(0x100 as *const i32, dangle, 0);
     // Non-zero-sized copy is not.
-    copy_nonoverlapping(0x100 as *const i32, dangle, 1); //~ ERROR evaluation of constant value failed [E0080]
-    //~| NOTE which is a dangling pointer
+    copy_nonoverlapping(0x100 as *const i32, dangle, 1); //~ ERROR which is a dangling pointer
 };
 const COPY_OOB_2: () = unsafe {
     let x = 0i32;
@@ -40,22 +25,18 @@ const COPY_OOB_2: () = unsafe {
     // Zero-sized copy is fine.
     copy_nonoverlapping(dangle, 0x100 as *mut i32, 0);
     // Non-zero-sized copy is not.
-    copy_nonoverlapping(dangle, 0x100 as *mut i32, 1); //~ ERROR evaluation of constant value failed [E0080]
-    //~| NOTE is at or beyond the end of the allocation of size 4 bytes
+    copy_nonoverlapping(dangle, 0x100 as *mut i32, 1); //~ ERROR is at or beyond the end of the allocation of size 4 bytes
 };
 
 const COPY_SIZE_OVERFLOW: () = unsafe {
     let x = 0;
     let mut y = 0;
-    copy(&x, &mut y, 1usize << (mem::size_of::<usize>() * 8 - 1)); //~ ERROR evaluation of constant value failed [E0080]
-    //~| NOTE overflow computing total size of `copy`
+    copy(&x, &mut y, 1usize << (mem::size_of::<usize>() * 8 - 1)); //~ ERROR overflow computing total size of `copy`
 };
 const COPY_NONOVERLAPPING_SIZE_OVERFLOW: () = unsafe {
     let x = 0;
     let mut y = 0;
-    copy_nonoverlapping(&x, &mut y, 1usize << (mem::size_of::<usize>() * 8 - 1)); //~ ERROR evaluation of constant value failed [E0080]
-    //~| NOTE overflow computing total size of `copy_nonoverlapping`
+    copy_nonoverlapping(&x, &mut y, 1usize << (mem::size_of::<usize>() * 8 - 1)); //~ ERROR overflow computing total size of `copy_nonoverlapping`
 };
 
-fn main() {
-}
+fn main() {}
diff --git a/tests/ui/consts/copy-intrinsic.stderr b/tests/ui/consts/copy-intrinsic.stderr
index 13321b5703a..b9d89cf78ba 100644
--- a/tests/ui/consts/copy-intrinsic.stderr
+++ b/tests/ui/consts/copy-intrinsic.stderr
@@ -1,26 +1,26 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/copy-intrinsic.rs:34:5
+error[E0080]: memory access failed: attempting to access 4 bytes, but got 0x100[noalloc] which is a dangling pointer (it has no provenance)
+  --> $DIR/copy-intrinsic.rs:20:5
    |
 LL |     copy_nonoverlapping(0x100 as *const i32, dangle, 1);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 4 bytes, but got 0x100[noalloc] which is a dangling pointer (it has no provenance)
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/copy-intrinsic.rs:43:5
+error[E0080]: memory access failed: attempting to access 4 bytes, but got ALLOC0+0x28 which is at or beyond the end of the allocation of size 4 bytes
+  --> $DIR/copy-intrinsic.rs:28:5
    |
 LL |     copy_nonoverlapping(dangle, 0x100 as *mut i32, 1);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 4 bytes, but got ALLOC0+0x28 which is at or beyond the end of the allocation of size 4 bytes
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/copy-intrinsic.rs:50:5
+error[E0080]: overflow computing total size of `copy`
+  --> $DIR/copy-intrinsic.rs:34:5
    |
 LL |     copy(&x, &mut y, 1usize << (mem::size_of::<usize>() * 8 - 1));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow computing total size of `copy`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/copy-intrinsic.rs:56:5
+error[E0080]: overflow computing total size of `copy_nonoverlapping`
+  --> $DIR/copy-intrinsic.rs:39:5
    |
 LL |     copy_nonoverlapping(&x, &mut y, 1usize << (mem::size_of::<usize>() * 8 - 1));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow computing total size of `copy_nonoverlapping`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/consts/dangling-alloc-id-ice.rs b/tests/ui/consts/dangling-alloc-id-ice.rs
index 8e9493c8d28..b77c5971b2b 100644
--- a/tests/ui/consts/dangling-alloc-id-ice.rs
+++ b/tests/ui/consts/dangling-alloc-id-ice.rs
@@ -10,7 +10,7 @@ union Foo<'a> {
 }
 
 const FOO: &() = {
-    //~^ ERROR it is undefined behavior to use this value
+    //~^ ERROR dangling reference
     let y = ();
     unsafe { Foo { y: &y }.long_live_the_unit }
 };
diff --git a/tests/ui/consts/dangling-alloc-id-ice.stderr b/tests/ui/consts/dangling-alloc-id-ice.stderr
index 881c0b162ed..65a46b62dae 100644
--- a/tests/ui/consts/dangling-alloc-id-ice.stderr
+++ b/tests/ui/consts/dangling-alloc-id-ice.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered a dangling reference (use-after-free)
   --> $DIR/dangling-alloc-id-ice.rs:12:1
    |
 LL | const FOO: &() = {
-   | ^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (use-after-free)
+   | ^^^^^^^^^^^^^^ 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) {
diff --git a/tests/ui/consts/dangling-zst-ice-issue-126393.rs b/tests/ui/consts/dangling-zst-ice-issue-126393.rs
index 4beee913a97..6b667fdfd35 100644
--- a/tests/ui/consts/dangling-zst-ice-issue-126393.rs
+++ b/tests/ui/consts/dangling-zst-ice-issue-126393.rs
@@ -5,7 +5,7 @@
 
 pub struct Wrapper;
 pub static MAGIC_FFI_REF: &'static Wrapper = unsafe {
-//~^ERROR: it is undefined behavior to use this value
+    //~^ ERROR: dangling reference
     std::mem::transmute(&{
         let y = 42;
         y
diff --git a/tests/ui/consts/dangling-zst-ice-issue-126393.stderr b/tests/ui/consts/dangling-zst-ice-issue-126393.stderr
index d32b427f14e..2f600e494c4 100644
--- a/tests/ui/consts/dangling-zst-ice-issue-126393.stderr
+++ b/tests/ui/consts/dangling-zst-ice-issue-126393.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered a dangling reference (use-after-free)
   --> $DIR/dangling-zst-ice-issue-126393.rs:7:1
    |
 LL | pub static MAGIC_FFI_REF: &'static Wrapper = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (use-after-free)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {
diff --git a/tests/ui/consts/eval-enum.rs b/tests/ui/consts/eval-enum.rs
index fa9ad6736e2..ae0296bd4c0 100644
--- a/tests/ui/consts/eval-enum.rs
+++ b/tests/ui/consts/eval-enum.rs
@@ -1,10 +1,8 @@
 enum Test {
-    DivZero = 1/0,
-    //~^ NOTE attempt to divide `1_isize` by zero
-    //~| ERROR evaluation of constant value failed
-    RemZero = 1%0,
-    //~^ NOTE attempt to calculate the remainder of `1_isize` with a divisor of zero
-    //~| ERROR evaluation of constant value failed
+    DivZero = 1 / 0,
+    //~^ ERROR attempt to divide `1_isize` by zero
+    RemZero = 1 % 0,
+    //~^ ERROR attempt to calculate the remainder of `1_isize` with a divisor of zero
 }
 
 fn main() {}
diff --git a/tests/ui/consts/eval-enum.stderr b/tests/ui/consts/eval-enum.stderr
index fb4d903489f..adfb7c79fea 100644
--- a/tests/ui/consts/eval-enum.stderr
+++ b/tests/ui/consts/eval-enum.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to divide `1_isize` by zero
   --> $DIR/eval-enum.rs:2:15
    |
-LL |     DivZero = 1/0,
-   |               ^^^ attempt to divide `1_isize` by zero
+LL |     DivZero = 1 / 0,
+   |               ^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/eval-enum.rs:5:15
+error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero
+  --> $DIR/eval-enum.rs:4:15
    |
-LL |     RemZero = 1%0,
-   |               ^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero
+LL |     RemZero = 1 % 0,
+   |               ^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/extra-const-ub/detect-extra-ub.rs b/tests/ui/consts/extra-const-ub/detect-extra-ub.rs
index c3bd8301d5c..e17bac603b4 100644
--- a/tests/ui/consts/extra-const-ub/detect-extra-ub.rs
+++ b/tests/ui/consts/extra-const-ub/detect-extra-ub.rs
@@ -28,41 +28,35 @@ enum UninhDiscriminant {
 
 const INVALID_BOOL: () = unsafe {
     let _x: bool = transmute(3u8);
-    //[with_flag]~^ ERROR: evaluation of constant value failed
-    //[with_flag]~| NOTE invalid value
+    //[with_flag]~^ ERROR: invalid value
 };
 
 const INVALID_PTR_IN_INT: () = unsafe {
     let _x: usize = transmute(&3u8);
-    //[with_flag]~^ ERROR: evaluation of constant value failed
-    //[with_flag]~| NOTE invalid value
+    //[with_flag]~^ ERROR: invalid value
 };
 
 const INVALID_PTR_IN_ENUM: () = unsafe {
     let _x: PtrSizedEnum = transmute(&3u8);
-    //[with_flag]~^ ERROR: evaluation of constant value failed
-    //[with_flag]~| NOTE invalid value
+    //[with_flag]~^ ERROR: invalid value
 };
 
 const INVALID_SLICE_TO_USIZE_TRANSMUTE: () = unsafe {
     let x: &[u8] = &[0; 32];
     let _x: (usize, usize) = transmute(x);
-    //[with_flag]~^ ERROR: evaluation of constant value failed
-    //[with_flag]~| NOTE invalid value
+    //[with_flag]~^ ERROR: invalid value
 };
 
 const UNALIGNED_PTR: () = unsafe {
     let _x: &u32 = transmute(&[0u8; 4]);
-    //[with_flag]~^ ERROR: evaluation of constant value failed
-    //[with_flag]~| NOTE invalid value
+    //[with_flag]~^ ERROR: invalid value
 };
 
 const UNINHABITED_VARIANT: () = unsafe {
     let data = [1u8];
     // Not using transmute, we want to hit the ImmTy code path.
     let v = *addr_of!(data).cast::<UninhDiscriminant>();
-    //[with_flag]~^ ERROR: evaluation of constant value failed
-    //[with_flag]~| NOTE invalid value
+    //[with_flag]~^ ERROR: invalid value
 };
 
 const PARTIAL_POINTER: () = unsafe {
@@ -81,8 +75,7 @@ const PARTIAL_POINTER: () = unsafe {
     let mem = Packed { pad1: 0, ptr: &0u8 as *const u8, pad2: [0; 7] };
     let mem = Align { p: mem, align: 0 };
     let _val = *(&mem as *const Align as *const [*const u8; 2]);
-    //[with_flag]~^ ERROR: evaluation of constant value failed
-    //[with_flag]~| NOTE invalid value
+    //[with_flag]~^ ERROR: invalid value
 };
 
 // Regression tests for an ICE (related to <https://github.com/rust-lang/rust/issues/113988>).
@@ -96,8 +89,7 @@ const VALID_ARRAY: [Option<i32>; 0] = { let e = [None; 0]; e };
 const OVERSIZED_REF: () = { unsafe {
     let slice: *const [u8] = transmute((1usize, usize::MAX));
     let _val = &*slice;
-    //[with_flag]~^ ERROR: evaluation of constant value failed
-    //[with_flag]~| NOTE slice is bigger than largest supported object
+    //[with_flag]~^ ERROR: slice is bigger than largest supported object
 } };
 
 fn main() {}
diff --git a/tests/ui/consts/extra-const-ub/detect-extra-ub.with_flag.stderr b/tests/ui/consts/extra-const-ub/detect-extra-ub.with_flag.stderr
index ea3b0e70b82..0d8fd5aece9 100644
--- a/tests/ui/consts/extra-const-ub/detect-extra-ub.with_flag.stderr
+++ b/tests/ui/consts/extra-const-ub/detect-extra-ub.with_flag.stderr
@@ -1,62 +1,62 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: constructing invalid value: encountered 0x03, but expected a boolean
   --> $DIR/detect-extra-ub.rs:30:20
    |
 LL |     let _x: bool = transmute(3u8);
-   |                    ^^^^^^^^^^^^^^ constructing invalid value: encountered 0x03, but expected a boolean
+   |                    ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/detect-extra-ub.rs:36:21
+error[E0080]: constructing invalid value: encountered a pointer, but expected an integer
+  --> $DIR/detect-extra-ub.rs:35:21
    |
 LL |     let _x: usize = transmute(&3u8);
-   |                     ^^^^^^^^^^^^^^^ constructing invalid value: encountered a pointer, but expected an integer
+   |                     ^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/detect-extra-ub.rs:42:28
+error[E0080]: constructing invalid value at .<enum-tag>: encountered a pointer, but expected an integer
+  --> $DIR/detect-extra-ub.rs:40:28
    |
 LL |     let _x: PtrSizedEnum = transmute(&3u8);
-   |                            ^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered a pointer, but expected an integer
+   |                            ^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/detect-extra-ub.rs:49:30
+error[E0080]: constructing invalid value at .0: encountered a pointer, but expected an integer
+  --> $DIR/detect-extra-ub.rs:46:30
    |
 LL |     let _x: (usize, usize) = transmute(x);
-   |                              ^^^^^^^^^^^^ constructing invalid value at .0: encountered a pointer, but expected an integer
+   |                              ^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/detect-extra-ub.rs:55:20
+error[E0080]: constructing invalid value: encountered an unaligned reference (required 4 byte alignment but found 1)
+  --> $DIR/detect-extra-ub.rs:51:20
    |
 LL |     let _x: &u32 = transmute(&[0u8; 4]);
-   |                    ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 4 byte alignment but found 1)
+   |                    ^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/detect-extra-ub.rs:63:13
+error[E0080]: constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+  --> $DIR/detect-extra-ub.rs:58:13
    |
 LL |     let v = *addr_of!(data).cast::<UninhDiscriminant>();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/detect-extra-ub.rs:83:16
+error[E0080]: constructing invalid value at [0]: encountered a partial pointer or a mix of pointers
+  --> $DIR/detect-extra-ub.rs:77:16
    |
 LL |     let _val = *(&mem as *const Align as *const [*const u8; 2]);
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered a partial pointer or a mix of pointers
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/detect-extra-ub.rs:98:16
+error[E0080]: constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+  --> $DIR/detect-extra-ub.rs:91:16
    |
 LL |     let _val = &*slice;
-   |                ^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   |                ^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/consts/interior-mut-const-via-union.32bit.stderr b/tests/ui/consts/interior-mut-const-via-union.32bit.stderr
index fb06643df85..47bb2e5e879 100644
--- a/tests/ui/consts/interior-mut-const-via-union.32bit.stderr
+++ b/tests/ui/consts/interior-mut-const-via-union.32bit.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>.y.<enum-variant(B)>.0: encountered `UnsafeCell` in read-only memory
   --> $DIR/interior-mut-const-via-union.rs:34:1
    |
 LL | fn main() {
-   | ^^^^^^^^^ constructing invalid value at .<deref>.y.<enum-variant(B)>.0: encountered `UnsafeCell` in read-only memory
+   | ^^^^^^^^^ 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: 4, align: 4) {
diff --git a/tests/ui/consts/interior-mut-const-via-union.64bit.stderr b/tests/ui/consts/interior-mut-const-via-union.64bit.stderr
index f39ebe0afbd..b4c9a4bd47e 100644
--- a/tests/ui/consts/interior-mut-const-via-union.64bit.stderr
+++ b/tests/ui/consts/interior-mut-const-via-union.64bit.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>.y.<enum-variant(B)>.0: encountered `UnsafeCell` in read-only memory
   --> $DIR/interior-mut-const-via-union.rs:34:1
    |
 LL | fn main() {
-   | ^^^^^^^^^ constructing invalid value at .<deref>.y.<enum-variant(B)>.0: encountered `UnsafeCell` in read-only memory
+   | ^^^^^^^^^ 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: 8, align: 8) {
diff --git a/tests/ui/consts/interior-mut-const-via-union.rs b/tests/ui/consts/interior-mut-const-via-union.rs
index 6d40a9ba850..5e624671aee 100644
--- a/tests/ui/consts/interior-mut-const-via-union.rs
+++ b/tests/ui/consts/interior-mut-const-via-union.rs
@@ -31,7 +31,7 @@ const C: S = {
     s
 };
 
-fn main() { //~ ERROR it is undefined behavior to use this value
-    // FIXME the span here is wrong, sould be pointing at the line below, not above.
+fn main() { //~ ERROR encountered `UnsafeCell` in read-only memory
+    // FIXME the span here is wrong, should be pointing at the line below, not above.
     let _: &'static _ = &C;
 }
diff --git a/tests/ui/consts/issue-17718-const-bad-values.rs b/tests/ui/consts/issue-17718-const-bad-values.rs
index 286972365d5..40fc02cf644 100644
--- a/tests/ui/consts/issue-17718-const-bad-values.rs
+++ b/tests/ui/consts/issue-17718-const-bad-values.rs
@@ -9,7 +9,6 @@ const C1: &'static mut [usize] = &mut [];
 
 static mut S: i32 = 3;
 const C2: &'static mut i32 = unsafe { &mut S };
-//~^ ERROR: it is undefined behavior to use this value
-//~| NOTE reference to mutable memory
+//~^ ERROR: reference to mutable memory
 
 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 102491e90ba..effb614b15b 100644
--- a/tests/ui/consts/issue-17718-const-bad-values.stderr
+++ b/tests/ui/consts/issue-17718-const-bad-values.stderr
@@ -4,11 +4,11 @@ error[E0764]: mutable references are not allowed in the final value of constants
 LL | const C1: &'static mut [usize] = &mut [];
    |                                  ^^^^^^^
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
   --> $DIR/issue-17718-const-bad-values.rs:11:1
    |
 LL | const C2: &'static mut i32 = unsafe { &mut S };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: $PTR, align: $PTR) {
diff --git a/tests/ui/consts/issue-32829.rs b/tests/ui/consts/issue-32829.rs
index 25f323b9803..e02db69c686 100644
--- a/tests/ui/consts/issue-32829.rs
+++ b/tests/ui/consts/issue-32829.rs
@@ -1,5 +1,5 @@
 static S : u64 = { { panic!("foo"); 0 } };
-//~^ ERROR could not evaluate static initializer
+//~^ ERROR evaluation panicked: foo
 
 fn main() {
     println!("{:?}", S);
diff --git a/tests/ui/consts/issue-32829.stderr b/tests/ui/consts/issue-32829.stderr
index 542dce19151..0a04c66df96 100644
--- a/tests/ui/consts/issue-32829.stderr
+++ b/tests/ui/consts/issue-32829.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: evaluation panicked: foo
   --> $DIR/issue-32829.rs:1:22
    |
 LL | static S : u64 = { { panic!("foo"); 0 } };
-   |                      ^^^^^^^^^^^^^ evaluation panicked: foo
+   |                      ^^^^^^^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/issue-63952.32bit.stderr b/tests/ui/consts/issue-63952.32bit.stderr
index f562f9104e3..e5340788167 100644
--- a/tests/ui/consts/issue-63952.32bit.stderr
+++ b/tests/ui/consts/issue-63952.32bit.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
   --> $DIR/issue-63952.rs:17:1
    |
 LL | const SLICE_WAY_TOO_LONG: &[u8] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
diff --git a/tests/ui/consts/issue-63952.64bit.stderr b/tests/ui/consts/issue-63952.64bit.stderr
index fe66bec13a1..27e74833fc5 100644
--- a/tests/ui/consts/issue-63952.64bit.stderr
+++ b/tests/ui/consts/issue-63952.64bit.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
   --> $DIR/issue-63952.rs:17:1
    |
 LL | const SLICE_WAY_TOO_LONG: &[u8] = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 16, align: 8) {
diff --git a/tests/ui/consts/issue-63952.rs b/tests/ui/consts/issue-63952.rs
index aee06f8eb04..fce6013b4d3 100644
--- a/tests/ui/consts/issue-63952.rs
+++ b/tests/ui/consts/issue-63952.rs
@@ -14,7 +14,7 @@ union SliceTransmute {
 }
 
 // bad slice: length too big to even exist anywhere
-const SLICE_WAY_TOO_LONG: &[u8] = unsafe { //~ ERROR: it is undefined behavior to use this value
+const SLICE_WAY_TOO_LONG: &[u8] = unsafe { //~ ERROR: slice is bigger than largest supported object
     SliceTransmute {
         repr: SliceRepr {
             ptr: &42,
diff --git a/tests/ui/consts/issue-64506.rs b/tests/ui/consts/issue-64506.rs
index 096d29cbe49..8511c1edb30 100644
--- a/tests/ui/consts/issue-64506.rs
+++ b/tests/ui/consts/issue-64506.rs
@@ -14,7 +14,7 @@ const FOO: () = {
         b: (),
     }
     let x = unsafe { Foo { b: () }.a };
-    //~^ ERROR: evaluation of constant value failed
+    //~^ ERROR: value of uninhabited type
     let x = &x.inner;
 };
 
diff --git a/tests/ui/consts/issue-64506.stderr b/tests/ui/consts/issue-64506.stderr
index 4cc2b713741..dfb2c454031 100644
--- a/tests/ui/consts/issue-64506.stderr
+++ b/tests/ui/consts/issue-64506.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: constructing invalid value at .inner: encountered a value of uninhabited type `AnonPipe`
   --> $DIR/issue-64506.rs:16:22
    |
 LL |     let x = unsafe { Foo { b: () }.a };
-   |                      ^^^^^^^^^^^^^^^ constructing invalid value at .inner: encountered a value of uninhabited type `AnonPipe`
+   |                      ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/issue-66693-panic-in-array-len.rs b/tests/ui/consts/issue-66693-panic-in-array-len.rs
index fc0dcd7a44d..2256970e337 100644
--- a/tests/ui/consts/issue-66693-panic-in-array-len.rs
+++ b/tests/ui/consts/issue-66693-panic-in-array-len.rs
@@ -8,7 +8,7 @@ fn main() {
 
     // ensure that conforming panics are handled correctly
     let _ = [false; panic!()];
-    //~^ ERROR: evaluation of constant value failed
+    //~^ ERROR: explicit panic
 
     // typechecking halts before getting to this one
     let _ = ['a', panic!("panic in array len")];
diff --git a/tests/ui/consts/issue-66693-panic-in-array-len.stderr b/tests/ui/consts/issue-66693-panic-in-array-len.stderr
index fdef515b6d4..e0db2138d74 100644
--- a/tests/ui/consts/issue-66693-panic-in-array-len.stderr
+++ b/tests/ui/consts/issue-66693-panic-in-array-len.stderr
@@ -4,11 +4,11 @@ error: argument to `panic!()` in a const context must have type `&str`
 LL |     let _ = [0i32; panic!(2f32)];
    |                    ^^^^^^^^^^^^
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/issue-66693-panic-in-array-len.rs:10:21
    |
 LL |     let _ = [false; panic!()];
-   |                     ^^^^^^^^ evaluation panicked: explicit panic
+   |                     ^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/issue-66693.rs b/tests/ui/consts/issue-66693.rs
index 416bd8ec72a..9d82d5a42bd 100644
--- a/tests/ui/consts/issue-66693.rs
+++ b/tests/ui/consts/issue-66693.rs
@@ -14,9 +14,9 @@ const fn _foo() {
 
 // ensure that conforming panics don't cause an error beyond the failure to const eval
 const _: () = panic!();
-//~^ ERROR: evaluation of constant value failed
+//~^ ERROR: explicit panic
 static _BAR: () = panic!("panic in static");
-//~^ ERROR could not evaluate static initializer
+//~^ ERROR panic in static
 
 const fn _bar() {
     panic!("panic in const fn");
diff --git a/tests/ui/consts/issue-66693.stderr b/tests/ui/consts/issue-66693.stderr
index ea657ec34bd..6d6edf8a513 100644
--- a/tests/ui/consts/issue-66693.stderr
+++ b/tests/ui/consts/issue-66693.stderr
@@ -10,17 +10,17 @@ error: argument to `panic!()` in a const context must have type `&str`
 LL | static _FOO: () = panic!(true);
    |                   ^^^^^^^^^^^^
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/issue-66693.rs:16:15
    |
 LL | const _: () = panic!();
-   |               ^^^^^^^^ evaluation panicked: explicit panic
+   |               ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: could not evaluate static initializer
+error[E0080]: evaluation panicked: panic in static
   --> $DIR/issue-66693.rs:18:19
    |
 LL | static _BAR: () = panic!("panic in static");
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: panic in static
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
 error: argument to `panic!()` in a const context must have type `&str`
   --> $DIR/issue-66693.rs:11:5
diff --git a/tests/ui/consts/issue-76064.rs b/tests/ui/consts/issue-76064.rs
index 3c153ad726e..b878629138c 100644
--- a/tests/ui/consts/issue-76064.rs
+++ b/tests/ui/consts/issue-76064.rs
@@ -1,3 +1,3 @@
-struct Bug([u8; panic!("panic")]); //~ ERROR evaluation of constant value failed
+struct Bug([u8; panic!("panic")]); //~ ERROR panic
 
 fn main() {}
diff --git a/tests/ui/consts/issue-76064.stderr b/tests/ui/consts/issue-76064.stderr
index 786d4213f1e..97225178ee0 100644
--- a/tests/ui/consts/issue-76064.stderr
+++ b/tests/ui/consts/issue-76064.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: panic
   --> $DIR/issue-76064.rs:1:17
    |
 LL | struct Bug([u8; panic!("panic")]);
-   |                 ^^^^^^^^^^^^^^^ evaluation panicked: panic
+   |                 ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/issue-79690.64bit.stderr b/tests/ui/consts/issue-79690.64bit.stderr
index d603a1dc291..7488f7b7752 100644
--- a/tests/ui/consts/issue-79690.64bit.stderr
+++ b/tests/ui/consts/issue-79690.64bit.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .1: encountered a dangling reference (going beyond the bounds of its allocation)
   --> $DIR/issue-79690.rs:30:1
    |
 LL | const G: Fat = unsafe { Transmute { t: FOO }.u };
-   | ^^^^^^^^^^^^ constructing invalid value at .1: encountered a dangling reference (going beyond the bounds of its allocation)
+   | ^^^^^^^^^^^^ 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: 16, align: 8) {
diff --git a/tests/ui/consts/issue-79690.rs b/tests/ui/consts/issue-79690.rs
index 3da4cb73f11..24e3220155d 100644
--- a/tests/ui/consts/issue-79690.rs
+++ b/tests/ui/consts/issue-79690.rs
@@ -28,6 +28,6 @@ const FOO: &dyn Bar = &Foo {
     bar: false,
 };
 const G: Fat = unsafe { Transmute { t: FOO }.u };
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR dangling reference
 
 fn main() {}
diff --git a/tests/ui/consts/issue-miri-1910.rs b/tests/ui/consts/issue-miri-1910.rs
index d194dd3c78b..6eae885ea8a 100644
--- a/tests/ui/consts/issue-miri-1910.rs
+++ b/tests/ui/consts/issue-miri-1910.rs
@@ -5,7 +5,7 @@ const C: () = unsafe {
     let foo = Some(&42 as *const i32);
     let one_and_a_half_pointers = std::mem::size_of::<*const i32>()/2*3;
     (&foo as *const _ as *const u8).add(one_and_a_half_pointers).read();
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR unable to turn pointer into integer
 };
 
 fn main() {
diff --git a/tests/ui/consts/issue-miri-1910.stderr b/tests/ui/consts/issue-miri-1910.stderr
index 59cbccc13a7..8166b68d2e0 100644
--- a/tests/ui/consts/issue-miri-1910.stderr
+++ b/tests/ui/consts/issue-miri-1910.stderr
@@ -1,13 +1,9 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/issue-miri-1910.rs:7:5
    |
 LL |     (&foo as *const _ as *const u8).add(one_and_a_half_pointers).read();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
-note: inside `std::ptr::const_ptr::<impl *const u8>::read`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
-note: inside `std::ptr::read::<u8>`
-  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
diff --git a/tests/ui/consts/large_const_alloc.rs b/tests/ui/consts/large_const_alloc.rs
index 3573a018630..c5b19dbc17f 100644
--- a/tests/ui/consts/large_const_alloc.rs
+++ b/tests/ui/consts/large_const_alloc.rs
@@ -9,12 +9,12 @@
 const FOO: () = {
     // 128 TiB, unlikely anyone has that much RAM
     let x = [0_u8; (1 << 47) - 1];
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR tried to allocate more memory than available to compiler
 };
 
 static FOO2: () = {
     let x = [0_u8; (1 << 47) - 1];
-    //~^ ERROR could not evaluate static initializer
+    //~^ ERROR tried to allocate more memory than available to compiler
 };
 
 fn main() {
diff --git a/tests/ui/consts/large_const_alloc.stderr b/tests/ui/consts/large_const_alloc.stderr
index f3f3de7af63..8f19def22e7 100644
--- a/tests/ui/consts/large_const_alloc.stderr
+++ b/tests/ui/consts/large_const_alloc.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: tried to allocate more memory than available to compiler
   --> $DIR/large_const_alloc.rs:11:13
    |
 LL |     let x = [0_u8; (1 << 47) - 1];
-   |             ^^^^^^^^^^^^^^^^^^^^^ tried to allocate more memory than available to compiler
+   |             ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: could not evaluate static initializer
+error[E0080]: tried to allocate more memory than available to compiler
   --> $DIR/large_const_alloc.rs:16:13
    |
 LL |     let x = [0_u8; (1 << 47) - 1];
-   |             ^^^^^^^^^^^^^^^^^^^^^ tried to allocate more memory than available to compiler
+   |             ^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr b/tests/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr
index 26dedc49a39..9efc252ce6b 100644
--- a/tests/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr
+++ b/tests/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr
@@ -5,16 +5,11 @@ LL | const fn bar() -> u32 { foo() }
    |                         ^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn bar() -> u32 { foo() }
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(foo)]
-LL | const fn bar() -> u32 { foo() }
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(foo2)]`
   --> $DIR/min_const_fn_libstd_stability.rs:26:26
@@ -23,16 +18,11 @@ LL | const fn bar2() -> u32 { foo2() }
    |                          ^^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn bar2() -> u32 { foo2() }
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(foo2)]
-LL | const fn bar2() -> u32 { foo2() }
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(const_async_blocks)]`
   --> $DIR/min_const_fn_libstd_stability.rs:32:13
@@ -40,16 +30,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     let x = async { 13 };
    |             ^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn bar3() -> u32 {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_async_blocks)]
-LL | const fn bar3() -> u32 {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(foo)]`
   --> $DIR/min_const_fn_libstd_stability.rs:34:5
@@ -58,16 +43,11 @@ LL |     foo()
    |     ^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn bar3() -> u32 {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(foo)]
-LL | const fn bar3() -> u32 {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(foo2)]`
   --> $DIR/min_const_fn_libstd_stability.rs:46:32
@@ -76,16 +56,11 @@ LL | const fn bar2_gated() -> u32 { foo2_gated() }
    |                                ^^^^^^^^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn bar2_gated() -> u32 { foo2_gated() }
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(foo2)]
-LL | const fn bar2_gated() -> u32 { foo2_gated() }
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(foo2)]`
   --> $DIR/min_const_fn_libstd_stability.rs:53:63
@@ -94,16 +69,11 @@ LL |     pub(crate) const fn bar2_gated_stable_indirect() -> u32 { super::foo2_g
    |                                                               ^^^^^^^^^^^^^^^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL +     #[rustc_const_unstable(feature = "...", issue = "...")]
 LL |     pub(crate) const fn bar2_gated_stable_indirect() -> u32 { super::foo2_gated() }
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL +     #[rustc_allow_const_fn_unstable(foo2)]
-LL |     pub(crate) const fn bar2_gated_stable_indirect() -> u32 { super::foo2_gated() }
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(foo2)]`
   --> $DIR/min_const_fn_libstd_stability.rs:59:37
@@ -112,16 +82,11 @@ LL | const fn stable_indirect() -> u32 { foo2_gated() }
    |                                     ^^^^^^^^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn stable_indirect() -> u32 { foo2_gated() }
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(foo2)]
-LL | const fn stable_indirect() -> u32 { foo2_gated() }
-   |
 
 error: aborting due to 7 previous errors
 
diff --git a/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr b/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr
index b61f7db6f43..0712a790955 100644
--- a/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr
+++ b/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr
@@ -5,16 +5,11 @@ LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
    |                                         ^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(foo)]
-LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(foo2)]`
   --> $DIR/min_const_unsafe_fn_libstd_stability.rs:25:42
@@ -23,16 +18,11 @@ LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
    |                                          ^^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(foo2)]
-LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(foo2)]`
   --> $DIR/min_const_unsafe_fn_libstd_stability.rs:35:48
@@ -41,16 +31,11 @@ LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
    |                                                ^^^^^^^^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(foo2)]
-LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
-   |
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr b/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr
index fad8e396e9a..618b9a16dd4 100644
--- a/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr
+++ b/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr
@@ -5,16 +5,11 @@ LL | const unsafe fn bar() -> u32 { foo() }
    |                                ^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const unsafe fn bar() -> u32 { foo() }
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(foo)]
-LL | const unsafe fn bar() -> u32 { foo() }
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(foo2)]`
   --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:25:33
@@ -23,16 +18,11 @@ LL | const unsafe fn bar2() -> u32 { foo2() }
    |                                 ^^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const unsafe fn bar2() -> u32 { foo2() }
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(foo2)]
-LL | const unsafe fn bar2() -> u32 { foo2() }
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(foo2)]`
   --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:35:39
@@ -41,16 +31,11 @@ LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }
    |                                       ^^^^^^^^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(foo2)]
-LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }
-   |
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/consts/min_const_fn/recursive_const_stab_unmarked_crate_imports.stderr b/tests/ui/consts/min_const_fn/recursive_const_stab_unmarked_crate_imports.stderr
index bbe749f5958..04804cb6d33 100644
--- a/tests/ui/consts/min_const_fn/recursive_const_stab_unmarked_crate_imports.stderr
+++ b/tests/ui/consts/min_const_fn/recursive_const_stab_unmarked_crate_imports.stderr
@@ -5,16 +5,11 @@ LL |     unstable_if_unmarked_const_fn_crate::not_stably_const();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn stable_fn() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(rustc_private)]
-LL | const fn stable_fn() {
-   |
 
 error: `just_a_fn` cannot be (indirectly) exposed to stable
   --> $DIR/recursive_const_stab_unmarked_crate_imports.rs:17:5
diff --git a/tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.stderr b/tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.stderr
index 9d7b81c822b..14940ae93f8 100644
--- a/tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.stderr
+++ b/tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.stderr
@@ -5,16 +5,11 @@ LL |     not_stably_const();
    |     ^^^^^^^^^^^^^^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | pub const fn expose_on_stable() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(rustc_private)]
-LL | pub const fn expose_on_stable() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(const_async_blocks)]`
   --> $DIR/recursive_const_stab_unstable_if_unmarked.rs:18:14
@@ -22,16 +17,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     let _x = async { 15 };
    |              ^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | pub const fn expose_on_stable() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_async_blocks)]
-LL | pub const fn expose_on_stable() {
-   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/miri_unleashed/abi-mismatch.rs b/tests/ui/consts/miri_unleashed/abi-mismatch.rs
index 6a46079b39b..91115f8511d 100644
--- a/tests/ui/consts/miri_unleashed/abi-mismatch.rs
+++ b/tests/ui/consts/miri_unleashed/abi-mismatch.rs
@@ -9,8 +9,8 @@ const fn call_rust_fn(my_fn: extern "Rust" fn()) {
 }
 
 static VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) });
-//~^ ERROR could not evaluate static initializer
-//~| NOTE calling a function with calling convention "C" using calling convention "Rust"
+//~^ NOTE evaluation of static initializer failed here
+//~| ERROR calling a function with calling convention "C" using calling convention "Rust"
 
 fn main() {}
 
diff --git a/tests/ui/consts/miri_unleashed/abi-mismatch.stderr b/tests/ui/consts/miri_unleashed/abi-mismatch.stderr
index 7d1fdcce526..6cd2a0b4bc5 100644
--- a/tests/ui/consts/miri_unleashed/abi-mismatch.stderr
+++ b/tests/ui/consts/miri_unleashed/abi-mismatch.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: calling a function with calling convention "C" using calling convention "Rust"
   --> $DIR/abi-mismatch.rs:11:18
    |
 LL | static VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) });
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling a function with calling convention "C" using calling convention "Rust"
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
    |
 note: inside `call_rust_fn`
   --> $DIR/abi-mismatch.rs:7:5
diff --git a/tests/ui/consts/miri_unleashed/assoc_const.stderr b/tests/ui/consts/miri_unleashed/assoc_const.stderr
index 758f1a25339..b6dcb86f360 100644
--- a/tests/ui/consts/miri_unleashed/assoc_const.stderr
+++ b/tests/ui/consts/miri_unleashed/assoc_const.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `drop_in_place::<Vec<u32>> - shim(Some(Vec<u32>))` failed
+error[E0080]: calling non-const function `<Vec<u32> as Drop>::drop`
   --> $DIR/assoc_const.rs:12:31
    |
 LL |     const F: u32 = (U::X, 42).1;
-   |                               ^ calling non-const function `<Vec<u32> as Drop>::drop`
+   |                               ^ evaluation of `drop_in_place::<Vec<u32>> - shim(Some(Vec<u32>))` failed here
    |
 note: inside `drop_in_place::<(Vec<u32>, u32)> - shim(Some((Vec<u32>, u32)))`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
diff --git a/tests/ui/consts/miri_unleashed/assoc_const_2.rs b/tests/ui/consts/miri_unleashed/assoc_const_2.rs
index 1d8ed2065a4..fa8ed682d98 100644
--- a/tests/ui/consts/miri_unleashed/assoc_const_2.rs
+++ b/tests/ui/consts/miri_unleashed/assoc_const_2.rs
@@ -8,7 +8,7 @@ trait Foo {
 }
 
 trait Bar<U: Foo> {
-    const F: u32 = 100 / U::X; //~ ERROR evaluation of `<std::string::String as Bar<std::string::String>>::F` failed
+    const F: u32 = 100 / U::X; //~ ERROR attempt to divide `100_u32` by zero
 }
 
 impl Foo for () {
diff --git a/tests/ui/consts/miri_unleashed/assoc_const_2.stderr b/tests/ui/consts/miri_unleashed/assoc_const_2.stderr
index 5503f8e56f0..a38fe346da6 100644
--- a/tests/ui/consts/miri_unleashed/assoc_const_2.stderr
+++ b/tests/ui/consts/miri_unleashed/assoc_const_2.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `<std::string::String as Bar<std::string::String>>::F` failed
+error[E0080]: attempt to divide `100_u32` by zero
   --> $DIR/assoc_const_2.rs:11:20
    |
 LL |     const F: u32 = 100 / U::X;
-   |                    ^^^^^^^^^^ attempt to divide `100_u32` by zero
+   |                    ^^^^^^^^^^ evaluation of `<std::string::String as Bar<std::string::String>>::F` failed here
 
 note: erroneous constant encountered
   --> $DIR/assoc_const_2.rs:28:13
diff --git a/tests/ui/consts/miri_unleashed/box.rs b/tests/ui/consts/miri_unleashed/box.rs
index 1539083f09c..d361870b58a 100644
--- a/tests/ui/consts/miri_unleashed/box.rs
+++ b/tests/ui/consts/miri_unleashed/box.rs
@@ -6,8 +6,7 @@ fn main() {}
 
 static TEST_BAD: &mut i32 = {
     &mut *(Box::new(0))
-    //~^ ERROR could not evaluate static initializer
-    //~| NOTE calling non-const function `Box::<i32>::new`
+    //~^ ERROR calling non-const function `Box::<i32>::new`
 };
 
 //~? WARN skipping const checks
diff --git a/tests/ui/consts/miri_unleashed/box.stderr b/tests/ui/consts/miri_unleashed/box.stderr
index 25cefa036eb..d6ceeebf87f 100644
--- a/tests/ui/consts/miri_unleashed/box.stderr
+++ b/tests/ui/consts/miri_unleashed/box.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: calling non-const function `Box::<i32>::new`
   --> $DIR/box.rs:8:11
    |
 LL |     &mut *(Box::new(0))
-   |           ^^^^^^^^^^^^^ calling non-const function `Box::<i32>::new`
+   |           ^^^^^^^^^^^^^ evaluation of static initializer failed here
 
 warning: skipping const checks
    |
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 c66aaec8c56..6cc67094346 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static.rs
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.rs
@@ -8,20 +8,19 @@ use std::sync::atomic::Ordering;
 
 const MUTATE_INTERIOR_MUT: usize = {
     static FOO: AtomicUsize = AtomicUsize::new(0);
-    FOO.fetch_add(1, Ordering::Relaxed) //~ERROR evaluation of constant value failed
+    FOO.fetch_add(1, Ordering::Relaxed) //~ERROR calling non-const function `AtomicUsize::fetch_add`
 };
 
 const READ_INTERIOR_MUT: usize = {
     static FOO: AtomicUsize = AtomicUsize::new(0);
-    unsafe { *(&FOO as *const _ as *const usize) } //~ERROR evaluation of constant value failed
+    unsafe { *(&FOO as *const _ as *const usize) } //~ERROR constant accesses mutable global memory
 };
 
 static mut MUTABLE: u32 = 0;
-const READ_MUT: u32 = unsafe { MUTABLE }; //~ERROR evaluation of constant value failed
+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 undefined behavior
-    //~| NOTE encountered reference to mutable memory
+const REF_INTERIOR_MUT: &usize = { //~ ERROR encountered reference to mutable memory
     static FOO: AtomicUsize = AtomicUsize::new(0);
     unsafe { &*(&FOO as *const _ as *const usize) }
 };
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 f647107094d..f0161988b76 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.stderr
@@ -1,26 +1,26 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: calling non-const function `AtomicUsize::fetch_add`
   --> $DIR/const_refers_to_static.rs:11:5
    |
 LL |     FOO.fetch_add(1, Ordering::Relaxed)
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `AtomicUsize::fetch_add`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: constant accesses mutable global memory
   --> $DIR/const_refers_to_static.rs:16:14
    |
 LL |     unsafe { *(&FOO as *const _ as *const usize) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: constant accesses mutable global memory
   --> $DIR/const_refers_to_static.rs:20:32
    |
 LL | const READ_MUT: u32 = unsafe { MUTABLE };
-   |                                ^^^^^^^ constant accesses mutable global memory
+   |                                ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
   --> $DIR/const_refers_to_static.rs:23:1
    |
 LL | const REF_INTERIOR_MUT: &usize = {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {
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 86d23d44bff..6c7e7835661 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
@@ -2,7 +2,6 @@
 //@ aux-build:static_cross_crate.rs
 //@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
 //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
-//@ dont-require-annotations: NOTE
 
 #![feature(half_open_range_patterns_in_slices)]
 #![allow(static_mut_refs)]
@@ -11,26 +10,25 @@ 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 undefined behavior
-    //~| NOTE encountered reference to mutable memory
+const SLICE_MUT: &[u8; 1] = {
+    //~^ ERROR encountered reference to mutable memory
     unsafe { &static_cross_crate::ZERO }
 };
 
-const U8_MUT: &u8 = { //~ ERROR undefined behavior
-    //~| NOTE encountered reference to mutable memory
+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 undefined behavior
-    //~| NOTE encountered reference to mutable memory
+const U8_MUT2: &u8 = {
+    //~^ ERROR encountered reference to mutable memory
     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
 };
 const U8_MUT3: &u8 = {
     unsafe {
         match static_cross_crate::OPT_ZERO {
-            //~^ ERROR evaluation of constant value failed
-            //~| NOTE constant accesses mutable global memory
+            //~^ ERROR constant accesses mutable global memory
             Some(ref u) => u,
             None => panic!(),
         }
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 4e5052ed470..8c176d562ee 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,41 @@
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/const_refers_to_static_cross_crate.rs:14:1
+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] = {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/const_refers_to_static_cross_crate.rs:19:1
+error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
+  --> $DIR/const_refers_to_static_cross_crate.rs:18:1
    |
 LL | const U8_MUT: &u8 = {
-   | ^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const`
+   | ^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/const_refers_to_static_cross_crate.rs:25:1
+error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
+  --> $DIR/const_refers_to_static_cross_crate.rs:24:1
    |
 LL | const U8_MUT2: &u8 = {
-   | ^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const`
+   | ^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
-  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
+error[E0080]: constant accesses mutable global memory
+  --> $DIR/const_refers_to_static_cross_crate.rs:30:15
    |
 LL |         match static_cross_crate::OPT_ZERO {
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses mutable global memory
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/consts/miri_unleashed/drop.rs b/tests/ui/consts/miri_unleashed/drop.rs
index ff9281358d4..6921ffa4f94 100644
--- a/tests/ui/consts/miri_unleashed/drop.rs
+++ b/tests/ui/consts/miri_unleashed/drop.rs
@@ -13,8 +13,8 @@ static TEST_OK: () = {
 // The actual error is tested by the error-pattern above.
 static TEST_BAD: () = {
     let _v: Vec<i32> = Vec::new();
-}; //~ ERROR could not evaluate static initializer
-   //~| NOTE calling non-const function `<Vec<i32> as Drop>::drop`
+}; //~ NOTE evaluation of static initializer failed here
+   //~| ERROR calling non-const function `<Vec<i32> as Drop>::drop`
    //~| NOTE inside `drop_in_place::<Vec<i32>> - shim(Some(Vec<i32>))`
 
 //~? WARN skipping const checks
diff --git a/tests/ui/consts/miri_unleashed/drop.stderr b/tests/ui/consts/miri_unleashed/drop.stderr
index 0286c431279..f0a776d8702 100644
--- a/tests/ui/consts/miri_unleashed/drop.stderr
+++ b/tests/ui/consts/miri_unleashed/drop.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: calling non-const function `<Vec<i32> as Drop>::drop`
   --> $DIR/drop.rs:16:1
    |
 LL | };
-   | ^ calling non-const function `<Vec<i32> as Drop>::drop`
+   | ^ evaluation of static initializer failed here
    |
 note: inside `drop_in_place::<Vec<i32>> - shim(Some(Vec<i32>))`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
diff --git a/tests/ui/consts/miri_unleashed/extern-static.rs b/tests/ui/consts/miri_unleashed/extern-static.rs
index c9d9397518e..e5d3b806487 100644
--- a/tests/ui/consts/miri_unleashed/extern-static.rs
+++ b/tests/ui/consts/miri_unleashed/extern-static.rs
@@ -9,13 +9,11 @@ extern "C" {
 // Make sure we catch accessing extern static.
 static TEST_READ: () = {
     unsafe { let _val = DATA; }
-    //~^ ERROR could not evaluate static initializer
-    //~| NOTE cannot access extern static
+    //~^ ERROR cannot access extern static
 };
 static TEST_WRITE: () = {
     unsafe { DATA = 0; }
-    //~^ ERROR could not evaluate static initializer
-    //~| NOTE cannot access extern static
+    //~^ ERROR cannot access extern static
 };
 
 // Just creating a reference is fine, as long as we are not reading or writing.
diff --git a/tests/ui/consts/miri_unleashed/extern-static.stderr b/tests/ui/consts/miri_unleashed/extern-static.stderr
index 4dbabbe44a2..a1e4be5bd9c 100644
--- a/tests/ui/consts/miri_unleashed/extern-static.stderr
+++ b/tests/ui/consts/miri_unleashed/extern-static.stderr
@@ -1,14 +1,14 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: cannot access extern static `DATA`
   --> $DIR/extern-static.rs:11:25
    |
 LL |     unsafe { let _val = DATA; }
-   |                         ^^^^ cannot access extern static `DATA`
+   |                         ^^^^ evaluation of static initializer failed here
 
-error[E0080]: could not evaluate static initializer
-  --> $DIR/extern-static.rs:16:14
+error[E0080]: cannot access extern static `DATA`
+  --> $DIR/extern-static.rs:15:14
    |
 LL |     unsafe { DATA = 0; }
-   |              ^^^^^^^^ cannot access extern static `DATA`
+   |              ^^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/miri_unleashed/inline_asm.rs b/tests/ui/consts/miri_unleashed/inline_asm.rs
index f1ce613b16e..51297aa6361 100644
--- a/tests/ui/consts/miri_unleashed/inline_asm.rs
+++ b/tests/ui/consts/miri_unleashed/inline_asm.rs
@@ -8,8 +8,7 @@ fn main() {}
 // Make sure we catch executing inline assembly.
 static TEST_BAD: () = {
     unsafe { asm!("nop"); }
-    //~^ ERROR could not evaluate static initializer
-    //~| NOTE inline assembly is not supported
+    //~^ ERROR inline assembly is not supported
 };
 
 //~? WARN skipping const checks
diff --git a/tests/ui/consts/miri_unleashed/inline_asm.stderr b/tests/ui/consts/miri_unleashed/inline_asm.stderr
index e9643f02840..2f9d2dc2143 100644
--- a/tests/ui/consts/miri_unleashed/inline_asm.stderr
+++ b/tests/ui/consts/miri_unleashed/inline_asm.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: inline assembly is not supported
   --> $DIR/inline_asm.rs:10:14
    |
 LL |     unsafe { asm!("nop"); }
-   |              ^^^^^^^^^^^ inline assembly is not supported
+   |              ^^^^^^^^^^^ evaluation of static initializer failed here
 
 warning: skipping const checks
    |
diff --git a/tests/ui/consts/miri_unleashed/mutable_references.rs b/tests/ui/consts/miri_unleashed/mutable_references.rs
index 02a35487e8a..63d243f892c 100644
--- a/tests/ui/consts/miri_unleashed/mutable_references.rs
+++ b/tests/ui/consts/miri_unleashed/mutable_references.rs
@@ -11,11 +11,9 @@ use std::sync::atomic::*;
 
 // This requires walking nested statics.
 static FOO: &&mut u32 = &&mut 42;
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE pointing to read-only memory
+//~^ ERROR pointing to read-only memory
 static OH_YES: &mut i32 = &mut 42;
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE pointing to read-only memory
+//~^ ERROR pointing to read-only memory
 static BAR: &mut () = &mut ();
 //~^ ERROR encountered mutable pointer in final value of static
 
@@ -25,12 +23,10 @@ static BOO: &mut Foo<()> = &mut Foo(());
 //~^ ERROR encountered mutable pointer in final value of static
 
 const BLUNT: &mut i32 = &mut 42;
-//~^ ERROR: it is undefined behavior to use this value
-//~| NOTE pointing to read-only memory
+//~^ ERROR: pointing to read-only memory
 
 const SUBTLE: &mut i32 = unsafe {
-    //~^ ERROR: it is undefined behavior to use this value
-    //~| NOTE constructing invalid value: encountered reference to mutable memory in `const`
+    //~^ ERROR: constructing invalid value: encountered reference to mutable memory in `const`
     static mut STATIC: i32 = 0;
     &mut STATIC
 };
@@ -42,14 +38,12 @@ struct Meh {
 }
 unsafe impl Sync for Meh {}
 static MEH: Meh = Meh { x: &UnsafeCell::new(42) };
-//~^ ERROR it is undefined behavior to use this value
-//~| NOTE `UnsafeCell` in read-only memory
+//~^ ERROR `UnsafeCell` in read-only memory
 // Same with a const:
 // the following will never be ok! no interior mut behind consts, because
 // all allocs interned here will be marked immutable.
 const MUH: Meh = Meh {
-    //~^ ERROR it is undefined behavior to use this value
-    //~| NOTE `UnsafeCell` in read-only memory
+    //~^ ERROR `UnsafeCell` in read-only memory
     x: &UnsafeCell::new(42),
 };
 
@@ -60,25 +54,21 @@ unsafe impl Sync for Synced {}
 
 // Make sure we also catch this behind a type-erased `dyn Trait` reference.
 const SNEAKY: &dyn Sync = &Synced { x: UnsafeCell::new(42) };
-//~^ ERROR: it is undefined behavior to use this value
-//~| NOTE `UnsafeCell` in read-only memory
+//~^ ERROR: `UnsafeCell` in read-only memory
 
 // # Check for mutable references to read-only memory
 
 static READONLY: i32 = 0;
 static mut MUT_TO_READONLY: &mut i32 = unsafe { &mut *(&READONLY as *const _ as *mut _) };
-//~^ ERROR: it is undefined behavior to use this value
-//~| NOTE pointing to read-only memory
+//~^ ERROR: pointing to read-only memory
 
 // # Check for consts pointing to mutable memory
 
 static mut MUTABLE: i32 = 42;
-const POINTS_TO_MUTABLE: &i32 = unsafe { &MUTABLE }; //~ ERROR undefined behavior
-//~| NOTE encountered reference to mutable memory
+const POINTS_TO_MUTABLE: &i32 = unsafe { &MUTABLE }; //~ ERROR encountered reference to mutable memory
 static mut MUTABLE_REF: &mut i32 = &mut 42;
 const POINTS_TO_MUTABLE2: &i32 = unsafe { &*MUTABLE_REF };
-//~^ ERROR evaluation of constant value failed
-//~| NOTE accesses mutable global memory
+//~^ ERROR accesses mutable global memory
 
 const POINTS_TO_MUTABLE_INNER: *const i32 = &mut 42 as *mut _ as *const _;
 //~^ ERROR mutable pointer in final value
diff --git a/tests/ui/consts/miri_unleashed/mutable_references.stderr b/tests/ui/consts/miri_unleashed/mutable_references.stderr
index 3049be80adc..aaea7bda332 100644
--- a/tests/ui/consts/miri_unleashed/mutable_references.stderr
+++ b/tests/ui/consts/miri_unleashed/mutable_references.stderr
@@ -1,19 +1,19 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>: encountered mutable reference or box pointing to read-only memory
   --> $DIR/mutable_references.rs:13:1
    |
 LL | static FOO: &&mut u32 = &&mut 42;
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered mutable reference or box pointing to read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/mutable_references.rs:16:1
+error[E0080]: constructing invalid value: encountered mutable reference or box pointing to read-only memory
+  --> $DIR/mutable_references.rs:15:1
    |
 LL | static OH_YES: &mut i32 = &mut 42;
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference or box pointing to read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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) {
@@ -21,126 +21,126 @@ LL | static OH_YES: &mut i32 = &mut 42;
            }
 
 error: encountered mutable pointer in final value of static
-  --> $DIR/mutable_references.rs:19:1
+  --> $DIR/mutable_references.rs:17:1
    |
 LL | static BAR: &mut () = &mut ();
    | ^^^^^^^^^^^^^^^^^^^
 
 error: encountered mutable pointer in final value of static
-  --> $DIR/mutable_references.rs:24:1
+  --> $DIR/mutable_references.rs:22:1
    |
 LL | static BOO: &mut Foo<()> = &mut Foo(());
    | ^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/mutable_references.rs:27:1
+error[E0080]: constructing invalid value: encountered mutable reference or box pointing to read-only memory
+  --> $DIR/mutable_references.rs:25:1
    |
 LL | const BLUNT: &mut i32 = &mut 42;
-   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference or box pointing to read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/mutable_references.rs:31:1
+error[E0080]: constructing invalid value: encountered reference to mutable memory in `const`
+  --> $DIR/mutable_references.rs:28:1
    |
 LL | const SUBTLE: &mut i32 = unsafe {
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const`
+   | ^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/mutable_references.rs:44:1
+error[E0080]: constructing invalid value at .x.<deref>: encountered `UnsafeCell` in read-only memory
+  --> $DIR/mutable_references.rs:40:1
    |
 LL | static MEH: Meh = Meh { x: &UnsafeCell::new(42) };
-   | ^^^^^^^^^^^^^^^ constructing invalid value at .x.<deref>: encountered `UnsafeCell` in read-only memory
+   | ^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/mutable_references.rs:50:1
+error[E0080]: constructing invalid value at .x.<deref>: encountered `UnsafeCell` in read-only memory
+  --> $DIR/mutable_references.rs:45:1
    |
 LL | const MUH: Meh = Meh {
-   | ^^^^^^^^^^^^^^ constructing invalid value at .x.<deref>: encountered `UnsafeCell` in read-only memory
+   | ^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/mutable_references.rs:62:1
+error[E0080]: constructing invalid value at .<deref>.<dyn-downcast>.x: encountered `UnsafeCell` in read-only memory
+  --> $DIR/mutable_references.rs:56:1
    |
 LL | const SNEAKY: &dyn Sync = &Synced { x: UnsafeCell::new(42) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.<dyn-downcast>.x: encountered `UnsafeCell` in read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/mutable_references.rs:69:1
+error[E0080]: constructing invalid value: encountered mutable reference or box pointing to read-only memory
+  --> $DIR/mutable_references.rs:62:1
    |
 LL | static mut MUT_TO_READONLY: &mut i32 = unsafe { &mut *(&READONLY as *const _ as *mut _) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference or box pointing to read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
-  --> $DIR/mutable_references.rs:76:1
+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 };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered reference to mutable memory in `const`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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]: evaluation of constant value failed
-  --> $DIR/mutable_references.rs:79:43
+error[E0080]: constant accesses mutable global memory
+  --> $DIR/mutable_references.rs:70:43
    |
 LL | const POINTS_TO_MUTABLE2: &i32 = unsafe { &*MUTABLE_REF };
-   |                                           ^^^^^^^^^^^^^ constant accesses mutable global memory
+   |                                           ^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: encountered mutable pointer in final value of constant
-  --> $DIR/mutable_references.rs:83:1
+  --> $DIR/mutable_references.rs:73: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:86:1
+  --> $DIR/mutable_references.rs:76: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:106:1
+  --> $DIR/mutable_references.rs:96: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:109:1
+  --> $DIR/mutable_references.rs:99: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:116:5
+  --> $DIR/mutable_references.rs:106:5
    |
 LL |     *OH_YES = 99;
    |     ^^^^^^^^^^^^ cannot assign
@@ -153,67 +153,67 @@ help: skipping check that does not even have a feature gate
 LL | static FOO: &&mut u32 = &&mut 42;
    |                          ^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:16:27
+  --> $DIR/mutable_references.rs:15:27
    |
 LL | static OH_YES: &mut i32 = &mut 42;
    |                           ^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:19:23
+  --> $DIR/mutable_references.rs:17:23
    |
 LL | static BAR: &mut () = &mut ();
    |                       ^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:24:28
+  --> $DIR/mutable_references.rs:22:28
    |
 LL | static BOO: &mut Foo<()> = &mut Foo(());
    |                            ^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:27:25
+  --> $DIR/mutable_references.rs:25:25
    |
 LL | const BLUNT: &mut i32 = &mut 42;
    |                         ^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:44:28
+  --> $DIR/mutable_references.rs:40:28
    |
 LL | static MEH: Meh = Meh { x: &UnsafeCell::new(42) };
    |                            ^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:53:8
+  --> $DIR/mutable_references.rs:47:8
    |
 LL |     x: &UnsafeCell::new(42),
    |        ^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/mutable_references.rs:62:27
+  --> $DIR/mutable_references.rs:56:27
    |
 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:83:45
+  --> $DIR/mutable_references.rs:73: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:86:46
+  --> $DIR/mutable_references.rs:76: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:91:47
+  --> $DIR/mutable_references.rs:81: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:103:51
+  --> $DIR/mutable_references.rs:93: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:106:49
+  --> $DIR/mutable_references.rs:96: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:109:51
+  --> $DIR/mutable_references.rs:99:51
    |
 LL | const RAW_MUT_COERCE: SyncPtr<i32> = SyncPtr { x: &mut 0 };
    |                                                   ^^^^^^
diff --git a/tests/ui/consts/miri_unleashed/mutating_global.rs b/tests/ui/consts/miri_unleashed/mutating_global.rs
index 77781360374..9a88f584a58 100644
--- a/tests/ui/consts/miri_unleashed/mutating_global.rs
+++ b/tests/ui/consts/miri_unleashed/mutating_global.rs
@@ -7,8 +7,7 @@ static mut GLOBAL: i32 = 0;
 static MUTATING_GLOBAL: () = {
     unsafe {
         GLOBAL = 99
-        //~^ ERROR could not evaluate static initializer
-        //~| NOTE modifying a static's initial value
+        //~^ ERROR modifying a static's initial value
     }
 };
 
diff --git a/tests/ui/consts/miri_unleashed/mutating_global.stderr b/tests/ui/consts/miri_unleashed/mutating_global.stderr
index c38e2d44d89..706bc8e5d23 100644
--- a/tests/ui/consts/miri_unleashed/mutating_global.stderr
+++ b/tests/ui/consts/miri_unleashed/mutating_global.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: modifying a static's initial value from another static's initializer
   --> $DIR/mutating_global.rs:9:9
    |
 LL |         GLOBAL = 99
-   |         ^^^^^^^^^^^ modifying a static's initial value from another static's initializer
+   |         ^^^^^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/miri_unleashed/non_const_fn.rs b/tests/ui/consts/miri_unleashed/non_const_fn.rs
index 201647ac8d8..18bee124db4 100644
--- a/tests/ui/consts/miri_unleashed/non_const_fn.rs
+++ b/tests/ui/consts/miri_unleashed/non_const_fn.rs
@@ -5,8 +5,7 @@
 fn foo() {}
 
 static C: () = foo();
-//~^ ERROR could not evaluate static initializer
-//~| NOTE calling non-const function `foo`
+//~^ ERROR calling non-const function `foo`
 
 fn main() {}
 
diff --git a/tests/ui/consts/miri_unleashed/non_const_fn.stderr b/tests/ui/consts/miri_unleashed/non_const_fn.stderr
index cc893896ecf..f490e51f546 100644
--- a/tests/ui/consts/miri_unleashed/non_const_fn.stderr
+++ b/tests/ui/consts/miri_unleashed/non_const_fn.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: calling non-const function `foo`
   --> $DIR/non_const_fn.rs:7:16
    |
 LL | static C: () = foo();
-   |                ^^^^^ calling non-const function `foo`
+   |                ^^^^^ evaluation of static initializer failed here
 
 warning: skipping const checks
    |
diff --git a/tests/ui/consts/miri_unleashed/ptr_arith.rs b/tests/ui/consts/miri_unleashed/ptr_arith.rs
index 408aa5db24d..3f34102833b 100644
--- a/tests/ui/consts/miri_unleashed/ptr_arith.rs
+++ b/tests/ui/consts/miri_unleashed/ptr_arith.rs
@@ -5,16 +5,14 @@
 
 static PTR_INT_CAST: () = {
     let x = &0 as *const _ as usize;
-    //~^ ERROR could not evaluate static initializer
-    //~| NOTE exposing pointers
+    //~^ ERROR exposing pointers
     let _v = x == x;
 };
 
 static PTR_INT_TRANSMUTE: () = unsafe {
     let x: usize = std::mem::transmute(&0);
     let _v = x + 0;
-    //~^ ERROR could not evaluate static initializer
-    //~| NOTE unable to turn pointer into integer
+    //~^ ERROR unable to turn pointer into integer
 };
 
 // I'd love to test pointer comparison, but that is not possible since
diff --git a/tests/ui/consts/miri_unleashed/ptr_arith.stderr b/tests/ui/consts/miri_unleashed/ptr_arith.stderr
index 213966f90b8..280c76c42c1 100644
--- a/tests/ui/consts/miri_unleashed/ptr_arith.stderr
+++ b/tests/ui/consts/miri_unleashed/ptr_arith.stderr
@@ -1,14 +1,14 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: exposing pointers is not possible at compile-time
   --> $DIR/ptr_arith.rs:7:13
    |
 LL |     let x = &0 as *const _ as usize;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^ exposing pointers is not possible at compile-time
+   |             ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
-error[E0080]: could not evaluate static initializer
-  --> $DIR/ptr_arith.rs:15:14
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/ptr_arith.rs:14:14
    |
 LL |     let _v = x + 0;
-   |              ^ unable to turn pointer into integer
+   |              ^ evaluation of static initializer failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
diff --git a/tests/ui/consts/miri_unleashed/static-no-inner-mut.32bit.stderr b/tests/ui/consts/miri_unleashed/static-no-inner-mut.32bit.stderr
index 88a734bc241..1ef20689985 100644
--- a/tests/ui/consts/miri_unleashed/static-no-inner-mut.32bit.stderr
+++ b/tests/ui/consts/miri_unleashed/static-no-inner-mut.32bit.stderr
@@ -1,41 +1,41 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>.v: encountered `UnsafeCell` in read-only memory
   --> $DIR/static-no-inner-mut.rs:8:1
    |
 LL | static REF: &AtomicI32 = &AtomicI32::new(42);
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.v: encountered `UnsafeCell` in read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                ╾ALLOC0╼                                     │ ╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered mutable reference or box pointing to read-only memory
   --> $DIR/static-no-inner-mut.rs:11:1
    |
 LL | static REFMUT: &mut i32 = &mut 0;
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference or box pointing to read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                ╾ALLOC1╼                                     │ ╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>.v: encountered `UnsafeCell` in read-only memory
   --> $DIR/static-no-inner-mut.rs:15:1
    |
 LL | static REF2: &AtomicI32 = {let x = AtomicI32::new(42); &{x}};
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.v: encountered `UnsafeCell` in read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                ╾ALLOC2╼                                     │ ╾──╼
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered mutable reference or box pointing to read-only memory
   --> $DIR/static-no-inner-mut.rs:17:1
    |
 LL | static REFMUT2: &mut i32 = {let mut x = 0; &mut {x}};
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference or box pointing to read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
diff --git a/tests/ui/consts/miri_unleashed/static-no-inner-mut.64bit.stderr b/tests/ui/consts/miri_unleashed/static-no-inner-mut.64bit.stderr
index c4f3903e143..06f78e679b1 100644
--- a/tests/ui/consts/miri_unleashed/static-no-inner-mut.64bit.stderr
+++ b/tests/ui/consts/miri_unleashed/static-no-inner-mut.64bit.stderr
@@ -1,41 +1,41 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>.v: encountered `UnsafeCell` in read-only memory
   --> $DIR/static-no-inner-mut.rs:8:1
    |
 LL | static REF: &AtomicI32 = &AtomicI32::new(42);
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.v: encountered `UnsafeCell` in read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                ╾ALLOC0╼                         │ ╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered mutable reference or box pointing to read-only memory
   --> $DIR/static-no-inner-mut.rs:11:1
    |
 LL | static REFMUT: &mut i32 = &mut 0;
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference or box pointing to read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                ╾ALLOC1╼                         │ ╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>.v: encountered `UnsafeCell` in read-only memory
   --> $DIR/static-no-inner-mut.rs:15:1
    |
 LL | static REF2: &AtomicI32 = {let x = AtomicI32::new(42); &{x}};
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.v: encountered `UnsafeCell` in read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
                ╾ALLOC2╼                         │ ╾──────╼
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered mutable reference or box pointing to read-only memory
   --> $DIR/static-no-inner-mut.rs:17:1
    |
 LL | static REFMUT2: &mut i32 = {let mut x = 0; &mut {x}};
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference or box pointing to read-only memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
diff --git a/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs b/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs
index 7fa173d8d9d..0e87442f6a6 100644
--- a/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs
+++ b/tests/ui/consts/miri_unleashed/static-no-inner-mut.rs
@@ -6,16 +6,16 @@
 use std::sync::atomic::*;
 
 static REF: &AtomicI32 = &AtomicI32::new(42);
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR `UnsafeCell` in read-only memory
 
 static REFMUT: &mut i32 = &mut 0;
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR mutable reference or box pointing to read-only memory
 
 // Different way of writing this that avoids promotion.
 static REF2: &AtomicI32 = {let x = AtomicI32::new(42); &{x}};
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR `UnsafeCell` in read-only memory
 static REFMUT2: &mut i32 = {let mut x = 0; &mut {x}};
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR mutable reference or box pointing to read-only memory
 
 // This one is obvious, since it is non-Sync. (It also suppresses the other errors, so it is
 // commented out.)
diff --git a/tests/ui/consts/miri_unleashed/tls.rs b/tests/ui/consts/miri_unleashed/tls.rs
index ab23a524998..8f8a1bd9618 100644
--- a/tests/ui/consts/miri_unleashed/tls.rs
+++ b/tests/ui/consts/miri_unleashed/tls.rs
@@ -9,8 +9,7 @@ static A: u8 = 0;
 // Make sure we catch accessing thread-local storage.
 static TEST_BAD: () = {
     unsafe { let _val = A; }
-    //~^ ERROR could not evaluate static initializer
-    //~| NOTE cannot access thread local static
+    //~^ ERROR cannot access thread local static
 };
 
 // Make sure we catch taking a reference to thread-local storage.
@@ -18,8 +17,7 @@ static TEST_BAD: () = {
 // sense at compile-time.
 static TEST_BAD_REF: () = {
     unsafe { let _val = &A; }
-    //~^ ERROR could not evaluate static initializer
-    //~| NOTE cannot access thread local static
+    //~^ ERROR cannot access thread local static
 };
 
 fn main() {}
diff --git a/tests/ui/consts/miri_unleashed/tls.stderr b/tests/ui/consts/miri_unleashed/tls.stderr
index ef836544303..cdfe8bfff4e 100644
--- a/tests/ui/consts/miri_unleashed/tls.stderr
+++ b/tests/ui/consts/miri_unleashed/tls.stderr
@@ -1,14 +1,14 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: cannot access thread local static `A`
   --> $DIR/tls.rs:11:25
    |
 LL |     unsafe { let _val = A; }
-   |                         ^ cannot access thread local static `A`
+   |                         ^ evaluation of static initializer failed here
 
-error[E0080]: could not evaluate static initializer
-  --> $DIR/tls.rs:20:26
+error[E0080]: cannot access thread local static `A`
+  --> $DIR/tls.rs:19:26
    |
 LL |     unsafe { let _val = &A; }
-   |                          ^ cannot access thread local static `A`
+   |                          ^ evaluation of static initializer failed here
 
 warning: skipping const checks
    |
@@ -18,7 +18,7 @@ help: skipping check that does not even have a feature gate
 LL |     unsafe { let _val = A; }
    |                         ^
 help: skipping check that does not even have a feature gate
-  --> $DIR/tls.rs:20:26
+  --> $DIR/tls.rs:19:26
    |
 LL |     unsafe { let _val = &A; }
    |                          ^
diff --git a/tests/ui/consts/missing_span_in_backtrace.rs b/tests/ui/consts/missing_span_in_backtrace.rs
index 490eb57c24d..893dc321604 100644
--- a/tests/ui/consts/missing_span_in_backtrace.rs
+++ b/tests/ui/consts/missing_span_in_backtrace.rs
@@ -11,7 +11,7 @@ const X: () = {
 
     // Swap them, bytewise.
     unsafe {
-        ptr::swap_nonoverlapping( //~ ERROR evaluation of constant value failed
+        ptr::swap_nonoverlapping( //~ ERROR unable to copy parts of a pointer
             &mut ptr1 as *mut _ as *mut MaybeUninit<u8>,
             &mut ptr2 as *mut _ as *mut MaybeUninit<u8>,
             mem::size_of::<&i32>(),
diff --git a/tests/ui/consts/missing_span_in_backtrace.stderr b/tests/ui/consts/missing_span_in_backtrace.stderr
index 88b3e37bb84..5ba5e34b4c1 100644
--- a/tests/ui/consts/missing_span_in_backtrace.stderr
+++ b/tests/ui/consts/missing_span_in_backtrace.stderr
@@ -1,4 +1,4 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to copy parts of a pointer from memory at ALLOC0
   --> $DIR/missing_span_in_backtrace.rs:14:9
    |
 14 | /         ptr::swap_nonoverlapping(
@@ -6,19 +6,16 @@ error[E0080]: evaluation of constant value failed
 16 | |             &mut ptr2 as *mut _ as *mut MaybeUninit<u8>,
 17 | |             mem::size_of::<&i32>(),
 18 | |         );
-   | |_________^ unable to copy parts of a pointer from memory at ALLOC0
+   | |_________^ evaluation of constant value failed here
    |
-note: inside `swap_nonoverlapping::<MaybeUninit<u8>>`
-  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 note: inside `swap_nonoverlapping::compiletime::<MaybeUninit<u8>>`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 note: inside `std::ptr::swap_nonoverlapping_const::<MaybeUninit<u8>>`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
-note: inside `copy_nonoverlapping::<MaybeUninit<u8>>`
-  --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
-   = note: this error originates in the macro `$crate::intrinsics::const_eval_select` which comes from the expansion of the macro `const_eval_select` (in Nightly builds, run with -Z macro-backtrace for more info)
+note: inside `std::ptr::copy_nonoverlapping::<MaybeUninit<u8>>`
+  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/mono-reachable-invalid-const.rs b/tests/ui/consts/mono-reachable-invalid-const.rs
index aabdb071bc9..aba41dabe71 100644
--- a/tests/ui/consts/mono-reachable-invalid-const.rs
+++ b/tests/ui/consts/mono-reachable-invalid-const.rs
@@ -5,7 +5,7 @@ struct Bar<const BITS: usize>;
 impl<const BITS: usize> Bar<BITS> {
     const ASSERT: bool = {
         let b = std::convert::identity(1);
-        ["oops"][b]; //~ ERROR evaluation of `Bar::<0>::ASSERT` failed
+        ["oops"][b]; //~ ERROR index out of bounds: the length is 1 but the index is 1
         true
     };
 
@@ -17,7 +17,6 @@ impl<const BITS: usize> Bar<BITS> {
     }
 }
 
-
 fn main() {
     Bar::<0>::assert();
 }
diff --git a/tests/ui/consts/mono-reachable-invalid-const.stderr b/tests/ui/consts/mono-reachable-invalid-const.stderr
index 6b7b25b59b8..e357fd096fd 100644
--- a/tests/ui/consts/mono-reachable-invalid-const.stderr
+++ b/tests/ui/consts/mono-reachable-invalid-const.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Bar::<0>::ASSERT` failed
+error[E0080]: index out of bounds: the length is 1 but the index is 1
   --> $DIR/mono-reachable-invalid-const.rs:8:9
    |
 LL |         ["oops"][b];
-   |         ^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 1
+   |         ^^^^^^^^^^^ evaluation of `Bar::<0>::ASSERT` failed here
 
 note: erroneous constant encountered
   --> $DIR/mono-reachable-invalid-const.rs:13:19
@@ -19,7 +19,7 @@ LL |         let val = Self::ASSERT;
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 note: the above error was encountered while instantiating `fn Bar::<0>::assert`
-  --> $DIR/mono-reachable-invalid-const.rs:22:5
+  --> $DIR/mono-reachable-invalid-const.rs:21:5
    |
 LL |     Bar::<0>::assert();
    |     ^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/consts/no-ice-from-static-in-const-issue-52060.rs b/tests/ui/consts/no-ice-from-static-in-const-issue-52060.rs
index e3cd8ec7d8a..2ad5d18d72d 100644
--- a/tests/ui/consts/no-ice-from-static-in-const-issue-52060.rs
+++ b/tests/ui/consts/no-ice-from-static-in-const-issue-52060.rs
@@ -3,7 +3,6 @@
 
 static mut A: &'static [u32] = &[1];
 static B: [u32; 1] = [0; unsafe { A.len() }];
-//~^ ERROR: evaluation of constant value failed
-//~| NOTE mutable global memory
+//~^ ERROR: mutable global memory
 
 fn main() {}
diff --git a/tests/ui/consts/no-ice-from-static-in-const-issue-52060.stderr b/tests/ui/consts/no-ice-from-static-in-const-issue-52060.stderr
index ca4d3224ec7..318082f5452 100644
--- a/tests/ui/consts/no-ice-from-static-in-const-issue-52060.stderr
+++ b/tests/ui/consts/no-ice-from-static-in-const-issue-52060.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: constant accesses mutable global memory
   --> $DIR/no-ice-from-static-in-const-issue-52060.rs:5:35
    |
 LL | static B: [u32; 1] = [0; unsafe { A.len() }];
-   |                                   ^ constant accesses mutable global memory
+   |                                   ^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/offset_from_ub.rs b/tests/ui/consts/offset_from_ub.rs
index 47511c0343d..ccbe591f97e 100644
--- a/tests/ui/consts/offset_from_ub.rs
+++ b/tests/ui/consts/offset_from_ub.rs
@@ -17,28 +17,30 @@ pub const DIFFERENT_ALLOC: usize = {
     let base_ptr: *const Struct = &uninit as *const _ as *const Struct;
     let uninit2 = std::mem::MaybeUninit::<Struct>::uninit();
     let field_ptr: *const Struct = &uninit2 as *const _ as *const Struct;
-    let offset = unsafe { ptr_offset_from(field_ptr, base_ptr) }; //~ERROR evaluation of constant value failed
-    //~| NOTE not both derived from the same allocation
+    let offset = unsafe { ptr_offset_from(field_ptr, base_ptr) };
+    //~^ ERROR not both derived from the same allocation
     offset as usize
 };
 
 pub const NOT_PTR: usize = {
-    unsafe { (42 as *const u8).offset_from(&5u8) as usize } //~ ERROR evaluation of constant value failed
+    unsafe { (42 as *const u8).offset_from(&5u8) as usize }
+    //~^ ERROR not both derived from the same allocation
 };
 
 pub const NOT_MULTIPLE_OF_SIZE: isize = {
     let data = [5u8, 6, 7];
     let base_ptr = data.as_ptr();
     let field_ptr = &data[1] as *const u8 as *const u16;
-    unsafe { ptr_offset_from(field_ptr, base_ptr as *const u16) } //~ERROR evaluation of constant value failed
-    //~| NOTE 1_isize cannot be divided by 2_isize without remainder
+    unsafe { ptr_offset_from(field_ptr, base_ptr as *const u16) }
+    //~^ ERROR 1_isize cannot be divided by 2_isize without remainder
 };
 
-pub const DIFFERENT_INT: isize = { // offset_from with two different integers: like DIFFERENT_ALLOC
+pub const DIFFERENT_INT: isize = {
+    // offset_from with two different integers: like DIFFERENT_ALLOC
     let ptr1 = 8 as *const u8;
     let ptr2 = 16 as *const u8;
-    unsafe { ptr_offset_from(ptr2, ptr1) } //~ERROR evaluation of constant value failed
-    //~| NOTE not both derived from the same allocation
+    unsafe { ptr_offset_from(ptr2, ptr1) }
+    //~^ ERROR not both derived from the same allocation
 };
 
 const OUT_OF_BOUNDS_1: isize = {
@@ -46,8 +48,8 @@ const OUT_OF_BOUNDS_1: isize = {
     let length = 10;
     let end_ptr = (start_ptr).wrapping_add(length);
     // First ptr is out of bounds
-    unsafe { ptr_offset_from(end_ptr, start_ptr) } //~ERROR evaluation of constant value failed
-    //~| NOTE the memory range between them is not in-bounds of an allocation
+    unsafe { ptr_offset_from(end_ptr, start_ptr) }
+    //~^ ERROR the memory range between them is not in-bounds of an allocation
 };
 
 const OUT_OF_BOUNDS_2: isize = {
@@ -55,8 +57,8 @@ const OUT_OF_BOUNDS_2: isize = {
     let length = 10;
     let end_ptr = (start_ptr).wrapping_add(length);
     // Second ptr is out of bounds
-    unsafe { ptr_offset_from(start_ptr, end_ptr) } //~ERROR evaluation of constant value failed
-    //~| NOTE the memory range between them is not in-bounds of an allocation
+    unsafe { ptr_offset_from(start_ptr, end_ptr) }
+    //~^ ERROR the memory range between them is not in-bounds of an allocation
 };
 
 pub const DIFFERENT_ALLOC_UNSIGNED: usize = {
@@ -64,43 +66,42 @@ pub const DIFFERENT_ALLOC_UNSIGNED: usize = {
     let base_ptr: *const Struct = &uninit as *const _ as *const Struct;
     let uninit2 = std::mem::MaybeUninit::<Struct>::uninit();
     let field_ptr: *const Struct = &uninit2 as *const _ as *const Struct;
-    unsafe { ptr_offset_from_unsigned(field_ptr, base_ptr) } //~ERROR evaluation of constant value failed
-    //~| NOTE not both derived from the same allocation
+    unsafe { ptr_offset_from_unsigned(field_ptr, base_ptr) }
+    //~^ ERROR not both derived from the same allocation
 };
 
 pub const TOO_FAR_APART1: isize = {
     let ptr1 = &0u8 as *const u8;
     let ptr2 = ptr1.wrapping_add(isize::MAX as usize + 42);
-    unsafe { ptr_offset_from(ptr2, ptr1) } //~ERROR evaluation of constant value failed
-    //~| NOTE too far ahead
+    unsafe { ptr_offset_from(ptr2, ptr1) }
+    //~^ ERROR too far ahead
 };
 pub const TOO_FAR_APART2: isize = {
     let ptr1 = &0u8 as *const u8;
     let ptr2 = ptr1.wrapping_add(isize::MAX as usize + 42);
-    unsafe { ptr_offset_from(ptr1, ptr2) } //~ERROR evaluation of constant value failed
-    //~| NOTE too far before
+    unsafe { ptr_offset_from(ptr1, ptr2) }
+    //~^ ERROR too far before
 };
 pub const TOO_FAR_APART3: isize = {
     let ptr1 = &0u8 as *const u8;
     let ptr2 = ptr1.wrapping_offset(isize::MIN);
     // The result of this would be `isize::MIN`, which *does* fit in an `isize`, but its
     // absolute value does not. (Also anyway there cannot be an allocation of that size.)
-    unsafe { ptr_offset_from(ptr1, ptr2) } //~ERROR evaluation of constant value failed
-    //~| NOTE too far before
+    unsafe { ptr_offset_from(ptr1, ptr2) }
+    //~^ ERROR too far before
 };
 
 const WRONG_ORDER_UNSIGNED: usize = {
     let a = ['a', 'b', 'c'];
     let p = a.as_ptr();
-    unsafe { ptr_offset_from_unsigned(p, p.add(2) ) } //~ERROR evaluation of constant value failed
-    //~| NOTE first pointer has smaller offset than second: 0 < 8
+    unsafe { ptr_offset_from_unsigned(p, p.add(2)) }
+    //~^ ERROR first pointer has smaller offset than second: 0 < 8
 };
 pub const TOO_FAR_APART_UNSIGNED: usize = {
     let ptr1 = &0u8 as *const u8;
     let ptr2 = ptr1.wrapping_add(isize::MAX as usize + 42);
     // This would fit into a `usize` but we still don't allow it.
-    unsafe { ptr_offset_from_unsigned(ptr2, ptr1) } //~ERROR evaluation of constant value failed
-    //~| NOTE too far ahead
+    unsafe { ptr_offset_from_unsigned(ptr2, ptr1) } //~ERROR too far ahead
 };
 
 // These do NOT complain that pointers are too far apart; they pass that check (to then fail the
@@ -109,13 +110,13 @@ pub const OFFSET_VERY_FAR1: isize = {
     let ptr1 = ptr::null::<u8>();
     let ptr2 = ptr1.wrapping_offset(isize::MAX);
     unsafe { ptr2.offset_from(ptr1) }
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR called on two different pointers that are not both derived from the same allocation
 };
 pub const OFFSET_VERY_FAR2: isize = {
     let ptr1 = ptr::null::<u8>();
     let ptr2 = ptr1.wrapping_offset(isize::MAX);
     unsafe { ptr1.offset_from(ptr2.wrapping_offset(1)) }
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR ptr_offset_from` called when first pointer is too far before second
 };
 
 // If the pointers are the same, OOB/null/UAF is fine.
diff --git a/tests/ui/consts/offset_from_ub.stderr b/tests/ui/consts/offset_from_ub.stderr
index 5bfb9a1170c..842698e239d 100644
--- a/tests/ui/consts/offset_from_ub.stderr
+++ b/tests/ui/consts/offset_from_ub.stderr
@@ -1,92 +1,92 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: `ptr_offset_from` called on two different pointers that are not both derived from the same allocation
   --> $DIR/offset_from_ub.rs:20:27
    |
 LL |     let offset = unsafe { ptr_offset_from(field_ptr, base_ptr) };
-   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called on two different pointers that are not both derived from the same allocation
+   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: `ptr_offset_from` called on two different pointers that are not both derived from the same allocation
   --> $DIR/offset_from_ub.rs:26:14
    |
 LL |     unsafe { (42 as *const u8).offset_from(&5u8) as usize }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called on two different pointers that are not both derived from the same allocation
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `std::ptr::const_ptr::<impl *const u8>::offset_from`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/offset_from_ub.rs:33:14
+error[E0080]: exact_div: 1_isize cannot be divided by 2_isize without remainder
+  --> $DIR/offset_from_ub.rs:34:14
    |
 LL |     unsafe { ptr_offset_from(field_ptr, base_ptr as *const u16) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ exact_div: 1_isize cannot be divided by 2_isize without remainder
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/offset_from_ub.rs:40:14
+error[E0080]: `ptr_offset_from` called on two different pointers that are not both derived from the same allocation
+  --> $DIR/offset_from_ub.rs:42:14
    |
 LL |     unsafe { ptr_offset_from(ptr2, ptr1) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called on two different pointers that are not both derived from the same allocation
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/offset_from_ub.rs:49:14
+error[E0080]: `ptr_offset_from` called on two different pointers where the memory range between them is not in-bounds of an allocation
+  --> $DIR/offset_from_ub.rs:51:14
    |
 LL |     unsafe { ptr_offset_from(end_ptr, start_ptr) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called on two different pointers where the memory range between them is not in-bounds of an allocation
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/offset_from_ub.rs:58:14
+error[E0080]: `ptr_offset_from` called on two different pointers where the memory range between them is not in-bounds of an allocation
+  --> $DIR/offset_from_ub.rs:60:14
    |
 LL |     unsafe { ptr_offset_from(start_ptr, end_ptr) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called on two different pointers where the memory range between them is not in-bounds of an allocation
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/offset_from_ub.rs:67:14
+error[E0080]: `ptr_offset_from_unsigned` called on two different pointers that are not both derived from the same allocation
+  --> $DIR/offset_from_ub.rs:69:14
    |
 LL |     unsafe { ptr_offset_from_unsigned(field_ptr, base_ptr) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called on two different pointers that are not both derived from the same allocation
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/offset_from_ub.rs:74:14
+error[E0080]: `ptr_offset_from` called when first pointer is too far ahead of second
+  --> $DIR/offset_from_ub.rs:76:14
    |
 LL |     unsafe { ptr_offset_from(ptr2, ptr1) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called when first pointer is too far ahead of second
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/offset_from_ub.rs:80:14
+error[E0080]: `ptr_offset_from` called when first pointer is too far before second
+  --> $DIR/offset_from_ub.rs:82:14
    |
 LL |     unsafe { ptr_offset_from(ptr1, ptr2) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called when first pointer is too far before second
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/offset_from_ub.rs:88:14
+error[E0080]: `ptr_offset_from` called when first pointer is too far before second
+  --> $DIR/offset_from_ub.rs:90:14
    |
 LL |     unsafe { ptr_offset_from(ptr1, ptr2) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called when first pointer is too far before second
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/offset_from_ub.rs:95:14
+error[E0080]: `ptr_offset_from_unsigned` called when first pointer has smaller offset than second: 0 < 8
+  --> $DIR/offset_from_ub.rs:97:14
    |
-LL |     unsafe { ptr_offset_from_unsigned(p, p.add(2) ) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called when first pointer has smaller offset than second: 0 < 8
+LL |     unsafe { ptr_offset_from_unsigned(p, p.add(2)) }
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/offset_from_ub.rs:102:14
+error[E0080]: `ptr_offset_from_unsigned` called when first pointer is too far ahead of second
+  --> $DIR/offset_from_ub.rs:104:14
    |
 LL |     unsafe { ptr_offset_from_unsigned(ptr2, ptr1) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called when first pointer is too far ahead of second
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/offset_from_ub.rs:111:14
+error[E0080]: `ptr_offset_from` called on two different pointers that are not both derived from the same allocation
+  --> $DIR/offset_from_ub.rs:112:14
    |
 LL |     unsafe { ptr2.offset_from(ptr1) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called on two different pointers that are not both derived from the same allocation
+   |              ^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `std::ptr::const_ptr::<impl *const u8>::offset_from`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/offset_from_ub.rs:117:14
+error[E0080]: `ptr_offset_from` called when first pointer is too far before second
+  --> $DIR/offset_from_ub.rs:118:14
    |
 LL |     unsafe { ptr1.offset_from(ptr2.wrapping_offset(1)) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ptr_offset_from` called when first pointer is too far before second
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `std::ptr::const_ptr::<impl *const u8>::offset_from`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
diff --git a/tests/ui/consts/offset_ub.stderr b/tests/ui/consts/offset_ub.stderr
index 699b63dfd66..4135804da20 100644
--- a/tests/ui/consts/offset_ub.stderr
+++ b/tests/ui/consts/offset_ub.stderr
@@ -1,101 +1,68 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by -$BYTES bytes, but got ALLOC0 which is at the beginning of the allocation
   --> $DIR/offset_ub.rs:8:46
    |
 LL | pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1) };
-   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in-bounds pointer arithmetic failed: attempting to offset pointer by -$BYTES bytes, but got ALLOC0 which is at the beginning of the allocation
-   |
-note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by $BYTES bytes, but got ALLOC1 which is only 1 byte from the end of the allocation
   --> $DIR/offset_ub.rs:9:43
    |
 LL | pub const AFTER_END: *const u8 = unsafe { (&0u8 as *const u8).offset(2) };
-   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in-bounds pointer arithmetic failed: attempting to offset pointer by $BYTES bytes, but got ALLOC1 which is only 1 byte from the end of the allocation
-   |
-note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by $BYTES bytes, but got ALLOC2 which is only $BYTES bytes from the end of the allocation
   --> $DIR/offset_ub.rs:10:45
    |
 LL | pub const AFTER_ARRAY: *const u8 = unsafe { [0u8; 100].as_ptr().offset(101) };
-   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in-bounds pointer arithmetic failed: attempting to offset pointer by $BYTES bytes, but got ALLOC2 which is only $BYTES bytes from the end of the allocation
-   |
-note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: overflowing pointer arithmetic: the total offset in bytes does not fit in an `isize`
   --> $DIR/offset_ub.rs:12:43
    |
 LL | pub const OVERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MAX) };
-   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing pointer arithmetic: the total offset in bytes does not fit in an `isize`
-   |
-note: inside `std::ptr::const_ptr::<impl *const u16>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: overflowing pointer arithmetic: the total offset in bytes does not fit in an `isize`
   --> $DIR/offset_ub.rs:13:44
    |
 LL | pub const UNDERFLOW: *const u16 = unsafe { [0u16; 1].as_ptr().offset(isize::MIN) };
-   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing pointer arithmetic: the total offset in bytes does not fit in an `isize`
-   |
-note: inside `std::ptr::const_ptr::<impl *const u16>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by $BYTES bytes, but got 0xf..f[noalloc] which is a dangling pointer (it has no provenance)
   --> $DIR/offset_ub.rs:14:56
    |
 LL | pub const OVERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (usize::MAX as *const u8).offset(2) };
-   |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in-bounds pointer arithmetic failed: attempting to offset pointer by $BYTES bytes, but got 0xf..f[noalloc] which is a dangling pointer (it has no provenance)
-   |
-note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by -$BYTES bytes, but got 0x1[noalloc] which is a dangling pointer (it has no provenance)
   --> $DIR/offset_ub.rs:15:57
    |
 LL | pub const UNDERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (1 as *const u8).offset(-2) };
-   |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ in-bounds pointer arithmetic failed: attempting to offset pointer by -$BYTES bytes, but got 0x1[noalloc] which is a dangling pointer (it has no provenance)
-   |
-note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by -$BYTES bytes, but got ALLOC3-0x2 which is only $BYTES bytes from the beginning of the allocation
   --> $DIR/offset_ub.rs:16:49
    |
 LL | pub const NEGATIVE_OFFSET: *const u8 = unsafe { [0u8; 1].as_ptr().wrapping_offset(-2).offset(-2) };
-   |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in-bounds pointer arithmetic failed: attempting to offset pointer by -$BYTES bytes, but got ALLOC3-0x2 which is only $BYTES bytes from the beginning of the allocation
-   |
-note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by 1 byte, but got ALLOC4 which is at or beyond the end of the allocation of size $BYTES bytes
   --> $DIR/offset_ub.rs:18:50
    |
 LL | pub const ZERO_SIZED_ALLOC: *const u8 = unsafe { [0u8; 0].as_ptr().offset(1) };
-   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^ in-bounds pointer arithmetic failed: attempting to offset pointer by 1 byte, but got ALLOC4 which is at or beyond the end of the allocation of size $BYTES bytes
-   |
-note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by $BYTES bytes, but got 0x1[noalloc] which is a dangling pointer (it has no provenance)
   --> $DIR/offset_ub.rs:19:42
    |
 LL | pub const DANGLING: *const u8 = unsafe { ptr::NonNull::<u8>::dangling().as_ptr().offset(4) };
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in-bounds pointer arithmetic failed: attempting to offset pointer by $BYTES bytes, but got 0x1[noalloc] which is a dangling pointer (it has no provenance)
-   |
-note: inside `std::ptr::mut_ptr::<impl *mut u8>::offset`
-  --> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: in-bounds pointer arithmetic failed: attempting to offset pointer by -$BYTES bytes, but got 0xf..f[noalloc] which is a dangling pointer (it has no provenance)
   --> $DIR/offset_ub.rs:22:47
    |
 LL | pub const UNDERFLOW_ABS: *const u8 = unsafe { (usize::MAX as *const u8).offset(isize::MIN) };
-   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in-bounds pointer arithmetic failed: attempting to offset pointer by -$BYTES bytes, but got 0xf..f[noalloc] which is a dangling pointer (it has no provenance)
-   |
-note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
+   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 11 previous errors
 
diff --git a/tests/ui/consts/overflowing-consts.noopt.stderr b/tests/ui/consts/overflowing-consts.noopt.stderr
index 81f22944adb..e317060a141 100644
--- a/tests/ui/consts/overflowing-consts.noopt.stderr
+++ b/tests/ui/consts/overflowing-consts.noopt.stderr
@@ -1,1022 +1,1022 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:19:22
+error[E0080]: attempt to shift left by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:18:22
    |
 LL | const _NI8_SHL: i8 = 1i8 << 8;
-   |                      ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow
+   |                      ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:20:26
+error[E0080]: attempt to shift left by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:19:26
    |
 LL | const _NI8_SHL_P: &i8 = &(1i8 << 8);
-   |                          ^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow
+   |                          ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:22:24
+error[E0080]: attempt to shift left by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:21:24
    |
 LL | const _NI16_SHL: i16 = 1i16 << 16;
-   |                        ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:23:28
+error[E0080]: attempt to shift left by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:22:28
    |
 LL | const _NI16_SHL_P: &i16 = &(1i16 << 16);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:25:24
+error[E0080]: attempt to shift left by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:24:24
    |
 LL | const _NI32_SHL: i32 = 1i32 << 32;
-   |                        ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:26:28
+error[E0080]: attempt to shift left by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:25:28
    |
 LL | const _NI32_SHL_P: &i32 = &(1i32 << 32);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:28:24
+error[E0080]: attempt to shift left by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:27:24
    |
 LL | const _NI64_SHL: i64 = 1i64 << 64;
-   |                        ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:29:28
+error[E0080]: attempt to shift left by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:28:28
    |
 LL | const _NI64_SHL_P: &i64 = &(1i64 << 64);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:31:26
+error[E0080]: attempt to shift left by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:30:26
    |
 LL | const _NI128_SHL: i128 = 1i128 << 128;
-   |                          ^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow
+   |                          ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:32:30
+error[E0080]: attempt to shift left by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:31:30
    |
 LL | const _NI128_SHL_P: &i128 = &(1i128 << 128);
-   |                              ^^^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow
+   |                              ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:34:22
+error[E0080]: attempt to shift left by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:33:22
    |
 LL | const _NU8_SHL: u8 = 1u8 << 8;
-   |                      ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow
+   |                      ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:35:26
+error[E0080]: attempt to shift left by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:34:26
    |
 LL | const _NU8_SHL_P: &u8 = &(1u8 << 8);
-   |                          ^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow
+   |                          ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:37:24
+error[E0080]: attempt to shift left by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:36:24
    |
 LL | const _NU16_SHL: u16 = 1u16 << 16;
-   |                        ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:38:28
+error[E0080]: attempt to shift left by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:37:28
    |
 LL | const _NU16_SHL_P: &u16 = &(1u16 << 16);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:40:24
+error[E0080]: attempt to shift left by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:39:24
    |
 LL | const _NU32_SHL: u32 = 1u32 << 32;
-   |                        ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:41:28
+error[E0080]: attempt to shift left by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:40:28
    |
 LL | const _NU32_SHL_P: &u32 = &(1u32 << 32);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:43:24
+error[E0080]: attempt to shift left by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:42:24
    |
 LL | const _NU64_SHL: u64 = 1u64 << 64;
-   |                        ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:44:28
+error[E0080]: attempt to shift left by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:43:28
    |
 LL | const _NU64_SHL_P: &u64 = &(1u64 << 64);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:46:26
+error[E0080]: attempt to shift left by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:45:26
    |
 LL | const _NU128_SHL: u128 = 1u128 << 128;
-   |                          ^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow
+   |                          ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:47:30
+error[E0080]: attempt to shift left by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:46:30
    |
 LL | const _NU128_SHL_P: &u128 = &(1u128 << 128);
-   |                              ^^^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow
+   |                              ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:49:28
+error[E0080]: attempt to shift left by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:48:28
    |
 LL | const _NISIZE_SHL: isize = 1isize << BITS;
-   |                            ^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:50:32
+error[E0080]: attempt to shift left by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:49:32
    |
 LL | const _NISIZE_SHL_P: &isize = &(1isize << BITS);
-   |                                ^^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:52:28
+error[E0080]: attempt to shift left by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:51:28
    |
 LL | const _NUSIZE_SHL: usize = 1usize << BITS;
-   |                            ^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:53:32
+error[E0080]: attempt to shift left by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:52:32
    |
 LL | const _NUSIZE_SHL_P: &usize = &(1usize << BITS);
-   |                                ^^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:57:22
+error[E0080]: attempt to shift right by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:55:22
    |
 LL | const _NI8_SHR: i8 = 1i8 >> 8;
-   |                      ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow
+   |                      ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:58:26
+error[E0080]: attempt to shift right by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:56:26
    |
 LL | const _NI8_SHR_P: &i8 = &(1i8 >> 8);
-   |                          ^^^^^^^^^^ attempt to shift right by `8_i32`, which would overflow
+   |                          ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:60:24
+error[E0080]: attempt to shift right by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:58:24
    |
 LL | const _NI16_SHR: i16 = 1i16 >> 16;
-   |                        ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:61:28
+error[E0080]: attempt to shift right by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:59:28
    |
 LL | const _NI16_SHR_P: &i16 = &(1i16 >> 16);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:63:24
+error[E0080]: attempt to shift right by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:61:24
    |
 LL | const _NI32_SHR: i32 = 1i32 >> 32;
-   |                        ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:64:28
+error[E0080]: attempt to shift right by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:62:28
    |
 LL | const _NI32_SHR_P: &i32 = &(1i32 >> 32);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:66:24
+error[E0080]: attempt to shift right by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:64:24
    |
 LL | const _NI64_SHR: i64 = 1i64 >> 64;
-   |                        ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:67:28
+error[E0080]: attempt to shift right by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:65:28
    |
 LL | const _NI64_SHR_P: &i64 = &(1i64 >> 64);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:69:26
+error[E0080]: attempt to shift right by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:67:26
    |
 LL | const _NI128_SHR: i128 = 1i128 >> 128;
-   |                          ^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow
+   |                          ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:70:30
+error[E0080]: attempt to shift right by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:68:30
    |
 LL | const _NI128_SHR_P: &i128 = &(1i128 >> 128);
-   |                              ^^^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow
+   |                              ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:72:22
+error[E0080]: attempt to shift right by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:70:22
    |
 LL | const _NU8_SHR: u8 = 1u8 >> 8;
-   |                      ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow
+   |                      ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:73:26
+error[E0080]: attempt to shift right by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:71:26
    |
 LL | const _NU8_SHR_P: &u8 = &(1u8 >> 8);
-   |                          ^^^^^^^^^^ attempt to shift right by `8_i32`, which would overflow
+   |                          ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:75:24
+error[E0080]: attempt to shift right by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:73:24
    |
 LL | const _NU16_SHR: u16 = 1u16 >> 16;
-   |                        ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:76:28
+error[E0080]: attempt to shift right by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:74:28
    |
 LL | const _NU16_SHR_P: &u16 = &(1u16 >> 16);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:78:24
+error[E0080]: attempt to shift right by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:76:24
    |
 LL | const _NU32_SHR: u32 = 1u32 >> 32;
-   |                        ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:79:28
+error[E0080]: attempt to shift right by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:77:28
    |
 LL | const _NU32_SHR_P: &u32 = &(1u32 >> 32);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:81:24
+error[E0080]: attempt to shift right by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:79:24
    |
 LL | const _NU64_SHR: u64 = 1u64 >> 64;
-   |                        ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:82:28
+error[E0080]: attempt to shift right by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:80:28
    |
 LL | const _NU64_SHR_P: &u64 = &(1u64 >> 64);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:84:26
+error[E0080]: attempt to shift right by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:82:26
    |
 LL | const _NU128_SHR: u128 = 1u128 >> 128;
-   |                          ^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow
+   |                          ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:85:30
+error[E0080]: attempt to shift right by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:83:30
    |
 LL | const _NU128_SHR_P: &u128 = &(1u128 >> 128);
-   |                              ^^^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow
+   |                              ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:87:28
+error[E0080]: attempt to shift right by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:85:28
    |
 LL | const _NISIZE_SHR: isize = 1isize >> BITS;
-   |                            ^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:88:32
+error[E0080]: attempt to shift right by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:86:32
    |
 LL | const _NISIZE_SHR_P: &isize = &(1isize >> BITS);
-   |                                ^^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:90:28
+error[E0080]: attempt to shift right by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:88:28
    |
 LL | const _NUSIZE_SHR: usize = 1usize >> BITS;
-   |                            ^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:91:32
+error[E0080]: attempt to shift right by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:89:32
    |
 LL | const _NUSIZE_SHR_P: &usize = &(1usize >> BITS);
-   |                                ^^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:95:22
+error[E0080]: attempt to compute `1_i8 + i8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:92:22
    |
 LL | const _NI8_ADD: i8 = 1i8 + i8::MAX;
-   |                      ^^^^^^^^^^^^^ attempt to compute `1_i8 + i8::MAX`, which would overflow
+   |                      ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:96:26
+error[E0080]: attempt to compute `1_i8 + i8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:93:26
    |
 LL | const _NI8_ADD_P: &i8 = &(1i8 + i8::MAX);
-   |                          ^^^^^^^^^^^^^^^ attempt to compute `1_i8 + i8::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:98:24
+error[E0080]: attempt to compute `1_i16 + i16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:95:24
    |
 LL | const _NI16_ADD: i16 = 1i16 + i16::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_i16 + i16::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:99:28
+error[E0080]: attempt to compute `1_i16 + i16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:96:28
    |
 LL | const _NI16_ADD_P: &i16 = &(1i16 + i16::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_i16 + i16::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:101:24
+error[E0080]: attempt to compute `1_i32 + i32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:98:24
    |
 LL | const _NI32_ADD: i32 = 1i32 + i32::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:102:28
+error[E0080]: attempt to compute `1_i32 + i32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:99:28
    |
 LL | const _NI32_ADD_P: &i32 = &(1i32 + i32::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:104:24
+error[E0080]: attempt to compute `1_i64 + i64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:101:24
    |
 LL | const _NI64_ADD: i64 = 1i64 + i64::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_i64 + i64::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:105:28
+error[E0080]: attempt to compute `1_i64 + i64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:102:28
    |
 LL | const _NI64_ADD_P: &i64 = &(1i64 + i64::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_i64 + i64::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:107:26
+error[E0080]: attempt to compute `1_i128 + i128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:104:26
    |
 LL | const _NI128_ADD: i128 = 1i128 + i128::MAX;
-   |                          ^^^^^^^^^^^^^^^^^ attempt to compute `1_i128 + i128::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:108:30
+error[E0080]: attempt to compute `1_i128 + i128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:105:30
    |
 LL | const _NI128_ADD_P: &i128 = &(1i128 + i128::MAX);
-   |                              ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_i128 + i128::MAX`, which would overflow
+   |                              ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:110:22
+error[E0080]: attempt to compute `1_u8 + u8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:107:22
    |
 LL | const _NU8_ADD: u8 = 1u8 + u8::MAX;
-   |                      ^^^^^^^^^^^^^ attempt to compute `1_u8 + u8::MAX`, which would overflow
+   |                      ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:111:26
+error[E0080]: attempt to compute `1_u8 + u8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:108:26
    |
 LL | const _NU8_ADD_P: &u8 = &(1u8 + u8::MAX);
-   |                          ^^^^^^^^^^^^^^^ attempt to compute `1_u8 + u8::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:113:24
+error[E0080]: attempt to compute `1_u16 + u16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:110:24
    |
 LL | const _NU16_ADD: u16 = 1u16 + u16::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_u16 + u16::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:114:28
+error[E0080]: attempt to compute `1_u16 + u16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:111:28
    |
 LL | const _NU16_ADD_P: &u16 = &(1u16 + u16::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_u16 + u16::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:116:24
+error[E0080]: attempt to compute `1_u32 + u32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:113:24
    |
 LL | const _NU32_ADD: u32 = 1u32 + u32::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_u32 + u32::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:117:28
+error[E0080]: attempt to compute `1_u32 + u32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:114:28
    |
 LL | const _NU32_ADD_P: &u32 = &(1u32 + u32::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_u32 + u32::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:119:24
+error[E0080]: attempt to compute `1_u64 + u64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:116:24
    |
 LL | const _NU64_ADD: u64 = 1u64 + u64::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_u64 + u64::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:120:28
+error[E0080]: attempt to compute `1_u64 + u64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:117:28
    |
 LL | const _NU64_ADD_P: &u64 = &(1u64 + u64::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_u64 + u64::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:122:26
+error[E0080]: attempt to compute `1_u128 + u128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:119:26
    |
 LL | const _NU128_ADD: u128 = 1u128 + u128::MAX;
-   |                          ^^^^^^^^^^^^^^^^^ attempt to compute `1_u128 + u128::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:123:30
+error[E0080]: attempt to compute `1_u128 + u128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:120:30
    |
 LL | const _NU128_ADD_P: &u128 = &(1u128 + u128::MAX);
-   |                              ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_u128 + u128::MAX`, which would overflow
+   |                              ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:125:28
+error[E0080]: attempt to compute `1_isize + isize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:122:28
    |
 LL | const _NISIZE_ADD: isize = 1isize + isize::MAX;
-   |                            ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_isize + isize::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:126:32
+error[E0080]: attempt to compute `1_isize + isize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:123:32
    |
 LL | const _NISIZE_ADD_P: &isize = &(1isize + isize::MAX);
-   |                                ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `1_isize + isize::MAX`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:128:28
+error[E0080]: attempt to compute `1_usize + usize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:125:28
    |
 LL | const _NUSIZE_ADD: usize = 1usize + usize::MAX;
-   |                            ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_usize + usize::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:129:32
+error[E0080]: attempt to compute `1_usize + usize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:126:32
    |
 LL | const _NUSIZE_ADD_P: &usize = &(1usize + usize::MAX);
-   |                                ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `1_usize + usize::MAX`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:133:22
+error[E0080]: attempt to compute `-5_i8 - i8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:129:22
    |
 LL | const _NI8_SUB: i8 = -5i8 - i8::MAX;
-   |                      ^^^^^^^^^^^^^^ attempt to compute `-5_i8 - i8::MAX`, which would overflow
+   |                      ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:134:26
+error[E0080]: attempt to compute `-5_i8 - i8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:130:26
    |
 LL | const _NI8_SUB_P: &i8 = &(-5i8 - i8::MAX);
-   |                          ^^^^^^^^^^^^^^^^ attempt to compute `-5_i8 - i8::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:136:24
+error[E0080]: attempt to compute `-5_i16 - i16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:132:24
    |
 LL | const _NI16_SUB: i16 = -5i16 - i16::MAX;
-   |                        ^^^^^^^^^^^^^^^^ attempt to compute `-5_i16 - i16::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:137:28
+error[E0080]: attempt to compute `-5_i16 - i16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:133:28
    |
 LL | const _NI16_SUB_P: &i16 = &(-5i16 - i16::MAX);
-   |                            ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i16 - i16::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:139:24
+error[E0080]: attempt to compute `-5_i32 - i32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:135:24
    |
 LL | const _NI32_SUB: i32 = -5i32 - i32::MAX;
-   |                        ^^^^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:140:28
+error[E0080]: attempt to compute `-5_i32 - i32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:136:28
    |
 LL | const _NI32_SUB_P: &i32 = &(-5i32 - i32::MAX);
-   |                            ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:142:24
+error[E0080]: attempt to compute `-5_i64 - i64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:138:24
    |
 LL | const _NI64_SUB: i64 = -5i64 - i64::MAX;
-   |                        ^^^^^^^^^^^^^^^^ attempt to compute `-5_i64 - i64::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:143:28
+error[E0080]: attempt to compute `-5_i64 - i64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:139:28
    |
 LL | const _NI64_SUB_P: &i64 = &(-5i64 - i64::MAX);
-   |                            ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i64 - i64::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:145:26
+error[E0080]: attempt to compute `-5_i128 - i128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:141:26
    |
 LL | const _NI128_SUB: i128 = -5i128 - i128::MAX;
-   |                          ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i128 - i128::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:146:30
+error[E0080]: attempt to compute `-5_i128 - i128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:142:30
    |
 LL | const _NI128_SUB_P: &i128 = &(-5i128 - i128::MAX);
-   |                              ^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i128 - i128::MAX`, which would overflow
+   |                              ^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:148:22
+error[E0080]: attempt to compute `1_u8 - 5_u8`, which would overflow
+  --> $DIR/overflowing-consts.rs:144:22
    |
 LL | const _NU8_SUB: u8 = 1u8 - 5;
-   |                      ^^^^^^^ attempt to compute `1_u8 - 5_u8`, which would overflow
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:149:26
+error[E0080]: attempt to compute `1_u8 - 5_u8`, which would overflow
+  --> $DIR/overflowing-consts.rs:145:26
    |
 LL | const _NU8_SUB_P: &u8 = &(1u8 - 5);
-   |                          ^^^^^^^^^ attempt to compute `1_u8 - 5_u8`, which would overflow
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:151:24
+error[E0080]: attempt to compute `1_u16 - 5_u16`, which would overflow
+  --> $DIR/overflowing-consts.rs:147:24
    |
 LL | const _NU16_SUB: u16 = 1u16 - 5;
-   |                        ^^^^^^^^ attempt to compute `1_u16 - 5_u16`, which would overflow
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:152:28
+error[E0080]: attempt to compute `1_u16 - 5_u16`, which would overflow
+  --> $DIR/overflowing-consts.rs:148:28
    |
 LL | const _NU16_SUB_P: &u16 = &(1u16 - 5);
-   |                            ^^^^^^^^^^ attempt to compute `1_u16 - 5_u16`, which would overflow
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:154:24
+error[E0080]: attempt to compute `1_u32 - 5_u32`, which would overflow
+  --> $DIR/overflowing-consts.rs:150:24
    |
 LL | const _NU32_SUB: u32 = 1u32 - 5;
-   |                        ^^^^^^^^ attempt to compute `1_u32 - 5_u32`, which would overflow
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:155:28
+error[E0080]: attempt to compute `1_u32 - 5_u32`, which would overflow
+  --> $DIR/overflowing-consts.rs:151:28
    |
 LL | const _NU32_SUB_P: &u32 = &(1u32 - 5);
-   |                            ^^^^^^^^^^ attempt to compute `1_u32 - 5_u32`, which would overflow
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:157:24
+error[E0080]: attempt to compute `1_u64 - 5_u64`, which would overflow
+  --> $DIR/overflowing-consts.rs:153:24
    |
 LL | const _NU64_SUB: u64 = 1u64 - 5;
-   |                        ^^^^^^^^ attempt to compute `1_u64 - 5_u64`, which would overflow
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:158:28
+error[E0080]: attempt to compute `1_u64 - 5_u64`, which would overflow
+  --> $DIR/overflowing-consts.rs:154:28
    |
 LL | const _NU64_SUB_P: &u64 = &(1u64 - 5);
-   |                            ^^^^^^^^^^ attempt to compute `1_u64 - 5_u64`, which would overflow
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:160:26
+error[E0080]: attempt to compute `1_u128 - 5_u128`, which would overflow
+  --> $DIR/overflowing-consts.rs:156:26
    |
 LL | const _NU128_SUB: u128 = 1u128 - 5;
-   |                          ^^^^^^^^^ attempt to compute `1_u128 - 5_u128`, which would overflow
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:161:30
+error[E0080]: attempt to compute `1_u128 - 5_u128`, which would overflow
+  --> $DIR/overflowing-consts.rs:157:30
    |
 LL | const _NU128_SUB_P: &u128 = &(1u128 - 5);
-   |                              ^^^^^^^^^^^ attempt to compute `1_u128 - 5_u128`, which would overflow
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:163:28
+error[E0080]: attempt to compute `-5_isize - isize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:159:28
    |
 LL | const _NISIZE_SUB: isize = -5isize - isize::MAX;
-   |                            ^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_isize - isize::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:164:32
+error[E0080]: attempt to compute `-5_isize - isize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:160:32
    |
 LL | const _NISIZE_SUB_P: &isize = &(-5isize - isize::MAX);
-   |                                ^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_isize - isize::MAX`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:166:28
+error[E0080]: attempt to compute `1_usize - 5_usize`, which would overflow
+  --> $DIR/overflowing-consts.rs:162:28
    |
-LL | const _NUSIZE_SUB: usize = 1usize - 5 ;
-   |                            ^^^^^^^^^^ attempt to compute `1_usize - 5_usize`, which would overflow
+LL | const _NUSIZE_SUB: usize = 1usize - 5;
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:167:32
+error[E0080]: attempt to compute `1_usize - 5_usize`, which would overflow
+  --> $DIR/overflowing-consts.rs:163:32
    |
-LL | const _NUSIZE_SUB_P: &usize = &(1usize - 5 );
-   |                                ^^^^^^^^^^^^^ attempt to compute `1_usize - 5_usize`, which would overflow
+LL | const _NUSIZE_SUB_P: &usize = &(1usize - 5);
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:171:22
+error[E0080]: attempt to compute `i8::MAX * 5_i8`, which would overflow
+  --> $DIR/overflowing-consts.rs:166:22
    |
 LL | const _NI8_MUL: i8 = i8::MAX * 5;
-   |                      ^^^^^^^^^^^ attempt to compute `i8::MAX * 5_i8`, which would overflow
+   |                      ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:172:26
+error[E0080]: attempt to compute `i8::MAX * 5_i8`, which would overflow
+  --> $DIR/overflowing-consts.rs:167:26
    |
 LL | const _NI8_MUL_P: &i8 = &(i8::MAX * 5);
-   |                          ^^^^^^^^^^^^^ attempt to compute `i8::MAX * 5_i8`, which would overflow
+   |                          ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:174:24
+error[E0080]: attempt to compute `i16::MAX * 5_i16`, which would overflow
+  --> $DIR/overflowing-consts.rs:169:24
    |
 LL | const _NI16_MUL: i16 = i16::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `i16::MAX * 5_i16`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:175:28
+error[E0080]: attempt to compute `i16::MAX * 5_i16`, which would overflow
+  --> $DIR/overflowing-consts.rs:170:28
    |
 LL | const _NI16_MUL_P: &i16 = &(i16::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `i16::MAX * 5_i16`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:177:24
+error[E0080]: attempt to compute `i32::MAX * 5_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:172:24
    |
 LL | const _NI32_MUL: i32 = i32::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `i32::MAX * 5_i32`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:178:28
+error[E0080]: attempt to compute `i32::MAX * 5_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:173:28
    |
 LL | const _NI32_MUL_P: &i32 = &(i32::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `i32::MAX * 5_i32`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:180:24
+error[E0080]: attempt to compute `i64::MAX * 5_i64`, which would overflow
+  --> $DIR/overflowing-consts.rs:175:24
    |
 LL | const _NI64_MUL: i64 = i64::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `i64::MAX * 5_i64`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:181:28
+error[E0080]: attempt to compute `i64::MAX * 5_i64`, which would overflow
+  --> $DIR/overflowing-consts.rs:176:28
    |
 LL | const _NI64_MUL_P: &i64 = &(i64::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `i64::MAX * 5_i64`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:183:26
+error[E0080]: attempt to compute `i128::MAX * 5_i128`, which would overflow
+  --> $DIR/overflowing-consts.rs:178:26
    |
 LL | const _NI128_MUL: i128 = i128::MAX * 5;
-   |                          ^^^^^^^^^^^^^ attempt to compute `i128::MAX * 5_i128`, which would overflow
+   |                          ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:184:30
+error[E0080]: attempt to compute `i128::MAX * 5_i128`, which would overflow
+  --> $DIR/overflowing-consts.rs:179:30
    |
 LL | const _NI128_MUL_P: &i128 = &(i128::MAX * 5);
-   |                              ^^^^^^^^^^^^^^^ attempt to compute `i128::MAX * 5_i128`, which would overflow
+   |                              ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:186:22
+error[E0080]: attempt to compute `u8::MAX * 5_u8`, which would overflow
+  --> $DIR/overflowing-consts.rs:181:22
    |
 LL | const _NU8_MUL: u8 = u8::MAX * 5;
-   |                      ^^^^^^^^^^^ attempt to compute `u8::MAX * 5_u8`, which would overflow
+   |                      ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:187:26
+error[E0080]: attempt to compute `u8::MAX * 5_u8`, which would overflow
+  --> $DIR/overflowing-consts.rs:182:26
    |
 LL | const _NU8_MUL_P: &u8 = &(u8::MAX * 5);
-   |                          ^^^^^^^^^^^^^ attempt to compute `u8::MAX * 5_u8`, which would overflow
+   |                          ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:189:24
+error[E0080]: attempt to compute `u16::MAX * 5_u16`, which would overflow
+  --> $DIR/overflowing-consts.rs:184:24
    |
 LL | const _NU16_MUL: u16 = u16::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `u16::MAX * 5_u16`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:190:28
+error[E0080]: attempt to compute `u16::MAX * 5_u16`, which would overflow
+  --> $DIR/overflowing-consts.rs:185:28
    |
 LL | const _NU16_MUL_P: &u16 = &(u16::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `u16::MAX * 5_u16`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:192:24
+error[E0080]: attempt to compute `u32::MAX * 5_u32`, which would overflow
+  --> $DIR/overflowing-consts.rs:187:24
    |
 LL | const _NU32_MUL: u32 = u32::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `u32::MAX * 5_u32`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:193:28
+error[E0080]: attempt to compute `u32::MAX * 5_u32`, which would overflow
+  --> $DIR/overflowing-consts.rs:188:28
    |
 LL | const _NU32_MUL_P: &u32 = &(u32::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `u32::MAX * 5_u32`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:195:24
+error[E0080]: attempt to compute `u64::MAX * 5_u64`, which would overflow
+  --> $DIR/overflowing-consts.rs:190:24
    |
 LL | const _NU64_MUL: u64 = u64::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `u64::MAX * 5_u64`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:196:28
+error[E0080]: attempt to compute `u64::MAX * 5_u64`, which would overflow
+  --> $DIR/overflowing-consts.rs:191:28
    |
 LL | const _NU64_MUL_P: &u64 = &(u64::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `u64::MAX * 5_u64`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:198:26
+error[E0080]: attempt to compute `u128::MAX * 5_u128`, which would overflow
+  --> $DIR/overflowing-consts.rs:193:26
    |
 LL | const _NU128_MUL: u128 = u128::MAX * 5;
-   |                          ^^^^^^^^^^^^^ attempt to compute `u128::MAX * 5_u128`, which would overflow
+   |                          ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:199:30
+error[E0080]: attempt to compute `u128::MAX * 5_u128`, which would overflow
+  --> $DIR/overflowing-consts.rs:194:30
    |
 LL | const _NU128_MUL_P: &u128 = &(u128::MAX * 5);
-   |                              ^^^^^^^^^^^^^^^ attempt to compute `u128::MAX * 5_u128`, which would overflow
+   |                              ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:201:28
+error[E0080]: attempt to compute `isize::MAX * 5_isize`, which would overflow
+  --> $DIR/overflowing-consts.rs:196:28
    |
 LL | const _NISIZE_MUL: isize = isize::MAX * 5;
-   |                            ^^^^^^^^^^^^^^ attempt to compute `isize::MAX * 5_isize`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:202:32
+error[E0080]: attempt to compute `isize::MAX * 5_isize`, which would overflow
+  --> $DIR/overflowing-consts.rs:197:32
    |
 LL | const _NISIZE_MUL_P: &isize = &(isize::MAX * 5);
-   |                                ^^^^^^^^^^^^^^^^ attempt to compute `isize::MAX * 5_isize`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:204:28
+error[E0080]: attempt to compute `usize::MAX * 5_usize`, which would overflow
+  --> $DIR/overflowing-consts.rs:199:28
    |
 LL | const _NUSIZE_MUL: usize = usize::MAX * 5;
-   |                            ^^^^^^^^^^^^^^ attempt to compute `usize::MAX * 5_usize`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:205:32
+error[E0080]: attempt to compute `usize::MAX * 5_usize`, which would overflow
+  --> $DIR/overflowing-consts.rs:200:32
    |
 LL | const _NUSIZE_MUL_P: &usize = &(usize::MAX * 5);
-   |                                ^^^^^^^^^^^^^^^^ attempt to compute `usize::MAX * 5_usize`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:209:22
+error[E0080]: attempt to divide `1_i8` by zero
+  --> $DIR/overflowing-consts.rs:203:22
    |
 LL | const _NI8_DIV: i8 = 1i8 / 0;
-   |                      ^^^^^^^ attempt to divide `1_i8` by zero
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:210:26
+error[E0080]: attempt to divide `1_i8` by zero
+  --> $DIR/overflowing-consts.rs:204:26
    |
 LL | const _NI8_DIV_P: &i8 = &(1i8 / 0);
-   |                          ^^^^^^^^^ attempt to divide `1_i8` by zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:212:24
+error[E0080]: attempt to divide `1_i16` by zero
+  --> $DIR/overflowing-consts.rs:206:24
    |
 LL | const _NI16_DIV: i16 = 1i16 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_i16` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:213:28
+error[E0080]: attempt to divide `1_i16` by zero
+  --> $DIR/overflowing-consts.rs:207:28
    |
 LL | const _NI16_DIV_P: &i16 = &(1i16 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_i16` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:215:24
+error[E0080]: attempt to divide `1_i32` by zero
+  --> $DIR/overflowing-consts.rs:209:24
    |
 LL | const _NI32_DIV: i32 = 1i32 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_i32` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:216:28
+error[E0080]: attempt to divide `1_i32` by zero
+  --> $DIR/overflowing-consts.rs:210:28
    |
 LL | const _NI32_DIV_P: &i32 = &(1i32 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_i32` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:218:24
+error[E0080]: attempt to divide `1_i64` by zero
+  --> $DIR/overflowing-consts.rs:212:24
    |
 LL | const _NI64_DIV: i64 = 1i64 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_i64` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:219:28
+error[E0080]: attempt to divide `1_i64` by zero
+  --> $DIR/overflowing-consts.rs:213:28
    |
 LL | const _NI64_DIV_P: &i64 = &(1i64 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_i64` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:221:26
+error[E0080]: attempt to divide `1_i128` by zero
+  --> $DIR/overflowing-consts.rs:215:26
    |
 LL | const _NI128_DIV: i128 = 1i128 / 0;
-   |                          ^^^^^^^^^ attempt to divide `1_i128` by zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:222:30
+error[E0080]: attempt to divide `1_i128` by zero
+  --> $DIR/overflowing-consts.rs:216:30
    |
 LL | const _NI128_DIV_P: &i128 = &(1i128 / 0);
-   |                              ^^^^^^^^^^^ attempt to divide `1_i128` by zero
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:224:22
+error[E0080]: attempt to divide `1_u8` by zero
+  --> $DIR/overflowing-consts.rs:218:22
    |
 LL | const _NU8_DIV: u8 = 1u8 / 0;
-   |                      ^^^^^^^ attempt to divide `1_u8` by zero
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:225:26
+error[E0080]: attempt to divide `1_u8` by zero
+  --> $DIR/overflowing-consts.rs:219:26
    |
 LL | const _NU8_DIV_P: &u8 = &(1u8 / 0);
-   |                          ^^^^^^^^^ attempt to divide `1_u8` by zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:227:24
+error[E0080]: attempt to divide `1_u16` by zero
+  --> $DIR/overflowing-consts.rs:221:24
    |
 LL | const _NU16_DIV: u16 = 1u16 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_u16` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:228:28
+error[E0080]: attempt to divide `1_u16` by zero
+  --> $DIR/overflowing-consts.rs:222:28
    |
 LL | const _NU16_DIV_P: &u16 = &(1u16 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_u16` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:230:24
+error[E0080]: attempt to divide `1_u32` by zero
+  --> $DIR/overflowing-consts.rs:224:24
    |
 LL | const _NU32_DIV: u32 = 1u32 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_u32` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:231:28
+error[E0080]: attempt to divide `1_u32` by zero
+  --> $DIR/overflowing-consts.rs:225:28
    |
 LL | const _NU32_DIV_P: &u32 = &(1u32 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_u32` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:233:24
+error[E0080]: attempt to divide `1_u64` by zero
+  --> $DIR/overflowing-consts.rs:227:24
    |
 LL | const _NU64_DIV: u64 = 1u64 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_u64` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:234:28
+error[E0080]: attempt to divide `1_u64` by zero
+  --> $DIR/overflowing-consts.rs:228:28
    |
 LL | const _NU64_DIV_P: &u64 = &(1u64 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_u64` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:236:26
+error[E0080]: attempt to divide `1_u128` by zero
+  --> $DIR/overflowing-consts.rs:230:26
    |
 LL | const _NU128_DIV: u128 = 1u128 / 0;
-   |                          ^^^^^^^^^ attempt to divide `1_u128` by zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:237:30
+error[E0080]: attempt to divide `1_u128` by zero
+  --> $DIR/overflowing-consts.rs:231:30
    |
 LL | const _NU128_DIV_P: &u128 = &(1u128 / 0);
-   |                              ^^^^^^^^^^^ attempt to divide `1_u128` by zero
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:239:28
+error[E0080]: attempt to divide `1_isize` by zero
+  --> $DIR/overflowing-consts.rs:233:28
    |
 LL | const _NISIZE_DIV: isize = 1isize / 0;
-   |                            ^^^^^^^^^^ attempt to divide `1_isize` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:240:32
+error[E0080]: attempt to divide `1_isize` by zero
+  --> $DIR/overflowing-consts.rs:234:32
    |
 LL | const _NISIZE_DIV_P: &isize = &(1isize / 0);
-   |                                ^^^^^^^^^^^^ attempt to divide `1_isize` by zero
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:242:28
+error[E0080]: attempt to divide `1_usize` by zero
+  --> $DIR/overflowing-consts.rs:236:28
    |
 LL | const _NUSIZE_DIV: usize = 1usize / 0;
-   |                            ^^^^^^^^^^ attempt to divide `1_usize` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:243:32
+error[E0080]: attempt to divide `1_usize` by zero
+  --> $DIR/overflowing-consts.rs:237:32
    |
 LL | const _NUSIZE_DIV_P: &usize = &(1usize / 0);
-   |                                ^^^^^^^^^^^^ attempt to divide `1_usize` by zero
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:246:22
+error[E0080]: attempt to calculate the remainder of `1_i8` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:240:22
    |
 LL | const _NI8_MOD: i8 = 1i8 % 0;
-   |                      ^^^^^^^ attempt to calculate the remainder of `1_i8` with a divisor of zero
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:247:26
+error[E0080]: attempt to calculate the remainder of `1_i8` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:241:26
    |
 LL | const _NI8_MOD_P: &i8 = &(1i8 % 0);
-   |                          ^^^^^^^^^ attempt to calculate the remainder of `1_i8` with a divisor of zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:249:24
+error[E0080]: attempt to calculate the remainder of `1_i16` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:243:24
    |
 LL | const _NI16_MOD: i16 = 1i16 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_i16` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:250:28
+error[E0080]: attempt to calculate the remainder of `1_i16` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:244:28
    |
 LL | const _NI16_MOD_P: &i16 = &(1i16 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_i16` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:252:24
+error[E0080]: attempt to calculate the remainder of `1_i32` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:246:24
    |
 LL | const _NI32_MOD: i32 = 1i32 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:253:28
+error[E0080]: attempt to calculate the remainder of `1_i32` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:247:28
    |
 LL | const _NI32_MOD_P: &i32 = &(1i32 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:255:24
+error[E0080]: attempt to calculate the remainder of `1_i64` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:249:24
    |
 LL | const _NI64_MOD: i64 = 1i64 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_i64` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:256:28
+error[E0080]: attempt to calculate the remainder of `1_i64` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:250:28
    |
 LL | const _NI64_MOD_P: &i64 = &(1i64 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_i64` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:258:26
+error[E0080]: attempt to calculate the remainder of `1_i128` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:252:26
    |
 LL | const _NI128_MOD: i128 = 1i128 % 0;
-   |                          ^^^^^^^^^ attempt to calculate the remainder of `1_i128` with a divisor of zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:259:30
+error[E0080]: attempt to calculate the remainder of `1_i128` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:253:30
    |
 LL | const _NI128_MOD_P: &i128 = &(1i128 % 0);
-   |                              ^^^^^^^^^^^ attempt to calculate the remainder of `1_i128` with a divisor of zero
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:261:22
+error[E0080]: attempt to calculate the remainder of `1_u8` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:255:22
    |
 LL | const _NU8_MOD: u8 = 1u8 % 0;
-   |                      ^^^^^^^ attempt to calculate the remainder of `1_u8` with a divisor of zero
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:262:26
+error[E0080]: attempt to calculate the remainder of `1_u8` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:256:26
    |
 LL | const _NU8_MOD_P: &u8 = &(1u8 % 0);
-   |                          ^^^^^^^^^ attempt to calculate the remainder of `1_u8` with a divisor of zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:264:24
+error[E0080]: attempt to calculate the remainder of `1_u16` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:258:24
    |
 LL | const _NU16_MOD: u16 = 1u16 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_u16` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:265:28
+error[E0080]: attempt to calculate the remainder of `1_u16` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:259:28
    |
 LL | const _NU16_MOD_P: &u16 = &(1u16 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_u16` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:267:24
+error[E0080]: attempt to calculate the remainder of `1_u32` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:261:24
    |
 LL | const _NU32_MOD: u32 = 1u32 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_u32` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:268:28
+error[E0080]: attempt to calculate the remainder of `1_u32` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:262:28
    |
 LL | const _NU32_MOD_P: &u32 = &(1u32 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_u32` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:270:24
+error[E0080]: attempt to calculate the remainder of `1_u64` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:264:24
    |
 LL | const _NU64_MOD: u64 = 1u64 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_u64` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:271:28
+error[E0080]: attempt to calculate the remainder of `1_u64` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:265:28
    |
 LL | const _NU64_MOD_P: &u64 = &(1u64 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_u64` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:273:26
+error[E0080]: attempt to calculate the remainder of `1_u128` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:267:26
    |
 LL | const _NU128_MOD: u128 = 1u128 % 0;
-   |                          ^^^^^^^^^ attempt to calculate the remainder of `1_u128` with a divisor of zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:274:30
+error[E0080]: attempt to calculate the remainder of `1_u128` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:268:30
    |
 LL | const _NU128_MOD_P: &u128 = &(1u128 % 0);
-   |                              ^^^^^^^^^^^ attempt to calculate the remainder of `1_u128` with a divisor of zero
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:276:28
+error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:270:28
    |
 LL | const _NISIZE_MOD: isize = 1isize % 0;
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:277:32
+error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:271:32
    |
 LL | const _NISIZE_MOD_P: &isize = &(1isize % 0);
-   |                                ^^^^^^^^^^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:279:28
+error[E0080]: attempt to calculate the remainder of `1_usize` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:273:28
    |
 LL | const _NUSIZE_MOD: usize = 1usize % 0;
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_usize` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:280:32
+error[E0080]: attempt to calculate the remainder of `1_usize` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:274:32
    |
 LL | const _NUSIZE_MOD_P: &usize = &(1usize % 0);
-   |                                ^^^^^^^^^^^^ attempt to calculate the remainder of `1_usize` with a divisor of zero
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:284:24
+error[E0080]: index out of bounds: the length is 3 but the index is 4
+  --> $DIR/overflowing-consts.rs:277:24
    |
 LL | const _NI32_OOB: i32 = [1, 2, 3][4];
-   |                        ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:285:28
+error[E0080]: index out of bounds: the length is 3 but the index is 4
+  --> $DIR/overflowing-consts.rs:278:28
    |
 LL | const _NI32_OOB_P: &i32 = &([1, 2, 3][4]);
-   |                            ^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 170 previous errors
 
diff --git a/tests/ui/consts/overflowing-consts.opt.stderr b/tests/ui/consts/overflowing-consts.opt.stderr
index 81f22944adb..e317060a141 100644
--- a/tests/ui/consts/overflowing-consts.opt.stderr
+++ b/tests/ui/consts/overflowing-consts.opt.stderr
@@ -1,1022 +1,1022 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:19:22
+error[E0080]: attempt to shift left by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:18:22
    |
 LL | const _NI8_SHL: i8 = 1i8 << 8;
-   |                      ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow
+   |                      ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:20:26
+error[E0080]: attempt to shift left by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:19:26
    |
 LL | const _NI8_SHL_P: &i8 = &(1i8 << 8);
-   |                          ^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow
+   |                          ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:22:24
+error[E0080]: attempt to shift left by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:21:24
    |
 LL | const _NI16_SHL: i16 = 1i16 << 16;
-   |                        ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:23:28
+error[E0080]: attempt to shift left by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:22:28
    |
 LL | const _NI16_SHL_P: &i16 = &(1i16 << 16);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:25:24
+error[E0080]: attempt to shift left by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:24:24
    |
 LL | const _NI32_SHL: i32 = 1i32 << 32;
-   |                        ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:26:28
+error[E0080]: attempt to shift left by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:25:28
    |
 LL | const _NI32_SHL_P: &i32 = &(1i32 << 32);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:28:24
+error[E0080]: attempt to shift left by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:27:24
    |
 LL | const _NI64_SHL: i64 = 1i64 << 64;
-   |                        ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:29:28
+error[E0080]: attempt to shift left by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:28:28
    |
 LL | const _NI64_SHL_P: &i64 = &(1i64 << 64);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:31:26
+error[E0080]: attempt to shift left by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:30:26
    |
 LL | const _NI128_SHL: i128 = 1i128 << 128;
-   |                          ^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow
+   |                          ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:32:30
+error[E0080]: attempt to shift left by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:31:30
    |
 LL | const _NI128_SHL_P: &i128 = &(1i128 << 128);
-   |                              ^^^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow
+   |                              ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:34:22
+error[E0080]: attempt to shift left by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:33:22
    |
 LL | const _NU8_SHL: u8 = 1u8 << 8;
-   |                      ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow
+   |                      ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:35:26
+error[E0080]: attempt to shift left by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:34:26
    |
 LL | const _NU8_SHL_P: &u8 = &(1u8 << 8);
-   |                          ^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow
+   |                          ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:37:24
+error[E0080]: attempt to shift left by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:36:24
    |
 LL | const _NU16_SHL: u16 = 1u16 << 16;
-   |                        ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:38:28
+error[E0080]: attempt to shift left by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:37:28
    |
 LL | const _NU16_SHL_P: &u16 = &(1u16 << 16);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:40:24
+error[E0080]: attempt to shift left by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:39:24
    |
 LL | const _NU32_SHL: u32 = 1u32 << 32;
-   |                        ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:41:28
+error[E0080]: attempt to shift left by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:40:28
    |
 LL | const _NU32_SHL_P: &u32 = &(1u32 << 32);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:43:24
+error[E0080]: attempt to shift left by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:42:24
    |
 LL | const _NU64_SHL: u64 = 1u64 << 64;
-   |                        ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:44:28
+error[E0080]: attempt to shift left by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:43:28
    |
 LL | const _NU64_SHL_P: &u64 = &(1u64 << 64);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:46:26
+error[E0080]: attempt to shift left by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:45:26
    |
 LL | const _NU128_SHL: u128 = 1u128 << 128;
-   |                          ^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow
+   |                          ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:47:30
+error[E0080]: attempt to shift left by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:46:30
    |
 LL | const _NU128_SHL_P: &u128 = &(1u128 << 128);
-   |                              ^^^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow
+   |                              ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:49:28
+error[E0080]: attempt to shift left by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:48:28
    |
 LL | const _NISIZE_SHL: isize = 1isize << BITS;
-   |                            ^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:50:32
+error[E0080]: attempt to shift left by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:49:32
    |
 LL | const _NISIZE_SHL_P: &isize = &(1isize << BITS);
-   |                                ^^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:52:28
+error[E0080]: attempt to shift left by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:51:28
    |
 LL | const _NUSIZE_SHL: usize = 1usize << BITS;
-   |                            ^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:53:32
+error[E0080]: attempt to shift left by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:52:32
    |
 LL | const _NUSIZE_SHL_P: &usize = &(1usize << BITS);
-   |                                ^^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:57:22
+error[E0080]: attempt to shift right by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:55:22
    |
 LL | const _NI8_SHR: i8 = 1i8 >> 8;
-   |                      ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow
+   |                      ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:58:26
+error[E0080]: attempt to shift right by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:56:26
    |
 LL | const _NI8_SHR_P: &i8 = &(1i8 >> 8);
-   |                          ^^^^^^^^^^ attempt to shift right by `8_i32`, which would overflow
+   |                          ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:60:24
+error[E0080]: attempt to shift right by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:58:24
    |
 LL | const _NI16_SHR: i16 = 1i16 >> 16;
-   |                        ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:61:28
+error[E0080]: attempt to shift right by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:59:28
    |
 LL | const _NI16_SHR_P: &i16 = &(1i16 >> 16);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:63:24
+error[E0080]: attempt to shift right by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:61:24
    |
 LL | const _NI32_SHR: i32 = 1i32 >> 32;
-   |                        ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:64:28
+error[E0080]: attempt to shift right by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:62:28
    |
 LL | const _NI32_SHR_P: &i32 = &(1i32 >> 32);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:66:24
+error[E0080]: attempt to shift right by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:64:24
    |
 LL | const _NI64_SHR: i64 = 1i64 >> 64;
-   |                        ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:67:28
+error[E0080]: attempt to shift right by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:65:28
    |
 LL | const _NI64_SHR_P: &i64 = &(1i64 >> 64);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:69:26
+error[E0080]: attempt to shift right by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:67:26
    |
 LL | const _NI128_SHR: i128 = 1i128 >> 128;
-   |                          ^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow
+   |                          ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:70:30
+error[E0080]: attempt to shift right by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:68:30
    |
 LL | const _NI128_SHR_P: &i128 = &(1i128 >> 128);
-   |                              ^^^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow
+   |                              ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:72:22
+error[E0080]: attempt to shift right by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:70:22
    |
 LL | const _NU8_SHR: u8 = 1u8 >> 8;
-   |                      ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow
+   |                      ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:73:26
+error[E0080]: attempt to shift right by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:71:26
    |
 LL | const _NU8_SHR_P: &u8 = &(1u8 >> 8);
-   |                          ^^^^^^^^^^ attempt to shift right by `8_i32`, which would overflow
+   |                          ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:75:24
+error[E0080]: attempt to shift right by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:73:24
    |
 LL | const _NU16_SHR: u16 = 1u16 >> 16;
-   |                        ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:76:28
+error[E0080]: attempt to shift right by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:74:28
    |
 LL | const _NU16_SHR_P: &u16 = &(1u16 >> 16);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:78:24
+error[E0080]: attempt to shift right by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:76:24
    |
 LL | const _NU32_SHR: u32 = 1u32 >> 32;
-   |                        ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:79:28
+error[E0080]: attempt to shift right by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:77:28
    |
 LL | const _NU32_SHR_P: &u32 = &(1u32 >> 32);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:81:24
+error[E0080]: attempt to shift right by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:79:24
    |
 LL | const _NU64_SHR: u64 = 1u64 >> 64;
-   |                        ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:82:28
+error[E0080]: attempt to shift right by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:80:28
    |
 LL | const _NU64_SHR_P: &u64 = &(1u64 >> 64);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:84:26
+error[E0080]: attempt to shift right by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:82:26
    |
 LL | const _NU128_SHR: u128 = 1u128 >> 128;
-   |                          ^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow
+   |                          ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:85:30
+error[E0080]: attempt to shift right by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:83:30
    |
 LL | const _NU128_SHR_P: &u128 = &(1u128 >> 128);
-   |                              ^^^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow
+   |                              ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:87:28
+error[E0080]: attempt to shift right by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:85:28
    |
 LL | const _NISIZE_SHR: isize = 1isize >> BITS;
-   |                            ^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:88:32
+error[E0080]: attempt to shift right by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:86:32
    |
 LL | const _NISIZE_SHR_P: &isize = &(1isize >> BITS);
-   |                                ^^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:90:28
+error[E0080]: attempt to shift right by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:88:28
    |
 LL | const _NUSIZE_SHR: usize = 1usize >> BITS;
-   |                            ^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:91:32
+error[E0080]: attempt to shift right by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:89:32
    |
 LL | const _NUSIZE_SHR_P: &usize = &(1usize >> BITS);
-   |                                ^^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:95:22
+error[E0080]: attempt to compute `1_i8 + i8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:92:22
    |
 LL | const _NI8_ADD: i8 = 1i8 + i8::MAX;
-   |                      ^^^^^^^^^^^^^ attempt to compute `1_i8 + i8::MAX`, which would overflow
+   |                      ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:96:26
+error[E0080]: attempt to compute `1_i8 + i8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:93:26
    |
 LL | const _NI8_ADD_P: &i8 = &(1i8 + i8::MAX);
-   |                          ^^^^^^^^^^^^^^^ attempt to compute `1_i8 + i8::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:98:24
+error[E0080]: attempt to compute `1_i16 + i16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:95:24
    |
 LL | const _NI16_ADD: i16 = 1i16 + i16::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_i16 + i16::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:99:28
+error[E0080]: attempt to compute `1_i16 + i16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:96:28
    |
 LL | const _NI16_ADD_P: &i16 = &(1i16 + i16::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_i16 + i16::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:101:24
+error[E0080]: attempt to compute `1_i32 + i32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:98:24
    |
 LL | const _NI32_ADD: i32 = 1i32 + i32::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:102:28
+error[E0080]: attempt to compute `1_i32 + i32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:99:28
    |
 LL | const _NI32_ADD_P: &i32 = &(1i32 + i32::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:104:24
+error[E0080]: attempt to compute `1_i64 + i64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:101:24
    |
 LL | const _NI64_ADD: i64 = 1i64 + i64::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_i64 + i64::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:105:28
+error[E0080]: attempt to compute `1_i64 + i64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:102:28
    |
 LL | const _NI64_ADD_P: &i64 = &(1i64 + i64::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_i64 + i64::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:107:26
+error[E0080]: attempt to compute `1_i128 + i128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:104:26
    |
 LL | const _NI128_ADD: i128 = 1i128 + i128::MAX;
-   |                          ^^^^^^^^^^^^^^^^^ attempt to compute `1_i128 + i128::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:108:30
+error[E0080]: attempt to compute `1_i128 + i128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:105:30
    |
 LL | const _NI128_ADD_P: &i128 = &(1i128 + i128::MAX);
-   |                              ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_i128 + i128::MAX`, which would overflow
+   |                              ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:110:22
+error[E0080]: attempt to compute `1_u8 + u8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:107:22
    |
 LL | const _NU8_ADD: u8 = 1u8 + u8::MAX;
-   |                      ^^^^^^^^^^^^^ attempt to compute `1_u8 + u8::MAX`, which would overflow
+   |                      ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:111:26
+error[E0080]: attempt to compute `1_u8 + u8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:108:26
    |
 LL | const _NU8_ADD_P: &u8 = &(1u8 + u8::MAX);
-   |                          ^^^^^^^^^^^^^^^ attempt to compute `1_u8 + u8::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:113:24
+error[E0080]: attempt to compute `1_u16 + u16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:110:24
    |
 LL | const _NU16_ADD: u16 = 1u16 + u16::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_u16 + u16::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:114:28
+error[E0080]: attempt to compute `1_u16 + u16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:111:28
    |
 LL | const _NU16_ADD_P: &u16 = &(1u16 + u16::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_u16 + u16::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:116:24
+error[E0080]: attempt to compute `1_u32 + u32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:113:24
    |
 LL | const _NU32_ADD: u32 = 1u32 + u32::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_u32 + u32::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:117:28
+error[E0080]: attempt to compute `1_u32 + u32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:114:28
    |
 LL | const _NU32_ADD_P: &u32 = &(1u32 + u32::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_u32 + u32::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:119:24
+error[E0080]: attempt to compute `1_u64 + u64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:116:24
    |
 LL | const _NU64_ADD: u64 = 1u64 + u64::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_u64 + u64::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:120:28
+error[E0080]: attempt to compute `1_u64 + u64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:117:28
    |
 LL | const _NU64_ADD_P: &u64 = &(1u64 + u64::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_u64 + u64::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:122:26
+error[E0080]: attempt to compute `1_u128 + u128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:119:26
    |
 LL | const _NU128_ADD: u128 = 1u128 + u128::MAX;
-   |                          ^^^^^^^^^^^^^^^^^ attempt to compute `1_u128 + u128::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:123:30
+error[E0080]: attempt to compute `1_u128 + u128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:120:30
    |
 LL | const _NU128_ADD_P: &u128 = &(1u128 + u128::MAX);
-   |                              ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_u128 + u128::MAX`, which would overflow
+   |                              ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:125:28
+error[E0080]: attempt to compute `1_isize + isize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:122:28
    |
 LL | const _NISIZE_ADD: isize = 1isize + isize::MAX;
-   |                            ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_isize + isize::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:126:32
+error[E0080]: attempt to compute `1_isize + isize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:123:32
    |
 LL | const _NISIZE_ADD_P: &isize = &(1isize + isize::MAX);
-   |                                ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `1_isize + isize::MAX`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:128:28
+error[E0080]: attempt to compute `1_usize + usize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:125:28
    |
 LL | const _NUSIZE_ADD: usize = 1usize + usize::MAX;
-   |                            ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_usize + usize::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:129:32
+error[E0080]: attempt to compute `1_usize + usize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:126:32
    |
 LL | const _NUSIZE_ADD_P: &usize = &(1usize + usize::MAX);
-   |                                ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `1_usize + usize::MAX`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:133:22
+error[E0080]: attempt to compute `-5_i8 - i8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:129:22
    |
 LL | const _NI8_SUB: i8 = -5i8 - i8::MAX;
-   |                      ^^^^^^^^^^^^^^ attempt to compute `-5_i8 - i8::MAX`, which would overflow
+   |                      ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:134:26
+error[E0080]: attempt to compute `-5_i8 - i8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:130:26
    |
 LL | const _NI8_SUB_P: &i8 = &(-5i8 - i8::MAX);
-   |                          ^^^^^^^^^^^^^^^^ attempt to compute `-5_i8 - i8::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:136:24
+error[E0080]: attempt to compute `-5_i16 - i16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:132:24
    |
 LL | const _NI16_SUB: i16 = -5i16 - i16::MAX;
-   |                        ^^^^^^^^^^^^^^^^ attempt to compute `-5_i16 - i16::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:137:28
+error[E0080]: attempt to compute `-5_i16 - i16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:133:28
    |
 LL | const _NI16_SUB_P: &i16 = &(-5i16 - i16::MAX);
-   |                            ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i16 - i16::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:139:24
+error[E0080]: attempt to compute `-5_i32 - i32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:135:24
    |
 LL | const _NI32_SUB: i32 = -5i32 - i32::MAX;
-   |                        ^^^^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:140:28
+error[E0080]: attempt to compute `-5_i32 - i32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:136:28
    |
 LL | const _NI32_SUB_P: &i32 = &(-5i32 - i32::MAX);
-   |                            ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:142:24
+error[E0080]: attempt to compute `-5_i64 - i64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:138:24
    |
 LL | const _NI64_SUB: i64 = -5i64 - i64::MAX;
-   |                        ^^^^^^^^^^^^^^^^ attempt to compute `-5_i64 - i64::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:143:28
+error[E0080]: attempt to compute `-5_i64 - i64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:139:28
    |
 LL | const _NI64_SUB_P: &i64 = &(-5i64 - i64::MAX);
-   |                            ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i64 - i64::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:145:26
+error[E0080]: attempt to compute `-5_i128 - i128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:141:26
    |
 LL | const _NI128_SUB: i128 = -5i128 - i128::MAX;
-   |                          ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i128 - i128::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:146:30
+error[E0080]: attempt to compute `-5_i128 - i128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:142:30
    |
 LL | const _NI128_SUB_P: &i128 = &(-5i128 - i128::MAX);
-   |                              ^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i128 - i128::MAX`, which would overflow
+   |                              ^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:148:22
+error[E0080]: attempt to compute `1_u8 - 5_u8`, which would overflow
+  --> $DIR/overflowing-consts.rs:144:22
    |
 LL | const _NU8_SUB: u8 = 1u8 - 5;
-   |                      ^^^^^^^ attempt to compute `1_u8 - 5_u8`, which would overflow
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:149:26
+error[E0080]: attempt to compute `1_u8 - 5_u8`, which would overflow
+  --> $DIR/overflowing-consts.rs:145:26
    |
 LL | const _NU8_SUB_P: &u8 = &(1u8 - 5);
-   |                          ^^^^^^^^^ attempt to compute `1_u8 - 5_u8`, which would overflow
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:151:24
+error[E0080]: attempt to compute `1_u16 - 5_u16`, which would overflow
+  --> $DIR/overflowing-consts.rs:147:24
    |
 LL | const _NU16_SUB: u16 = 1u16 - 5;
-   |                        ^^^^^^^^ attempt to compute `1_u16 - 5_u16`, which would overflow
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:152:28
+error[E0080]: attempt to compute `1_u16 - 5_u16`, which would overflow
+  --> $DIR/overflowing-consts.rs:148:28
    |
 LL | const _NU16_SUB_P: &u16 = &(1u16 - 5);
-   |                            ^^^^^^^^^^ attempt to compute `1_u16 - 5_u16`, which would overflow
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:154:24
+error[E0080]: attempt to compute `1_u32 - 5_u32`, which would overflow
+  --> $DIR/overflowing-consts.rs:150:24
    |
 LL | const _NU32_SUB: u32 = 1u32 - 5;
-   |                        ^^^^^^^^ attempt to compute `1_u32 - 5_u32`, which would overflow
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:155:28
+error[E0080]: attempt to compute `1_u32 - 5_u32`, which would overflow
+  --> $DIR/overflowing-consts.rs:151:28
    |
 LL | const _NU32_SUB_P: &u32 = &(1u32 - 5);
-   |                            ^^^^^^^^^^ attempt to compute `1_u32 - 5_u32`, which would overflow
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:157:24
+error[E0080]: attempt to compute `1_u64 - 5_u64`, which would overflow
+  --> $DIR/overflowing-consts.rs:153:24
    |
 LL | const _NU64_SUB: u64 = 1u64 - 5;
-   |                        ^^^^^^^^ attempt to compute `1_u64 - 5_u64`, which would overflow
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:158:28
+error[E0080]: attempt to compute `1_u64 - 5_u64`, which would overflow
+  --> $DIR/overflowing-consts.rs:154:28
    |
 LL | const _NU64_SUB_P: &u64 = &(1u64 - 5);
-   |                            ^^^^^^^^^^ attempt to compute `1_u64 - 5_u64`, which would overflow
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:160:26
+error[E0080]: attempt to compute `1_u128 - 5_u128`, which would overflow
+  --> $DIR/overflowing-consts.rs:156:26
    |
 LL | const _NU128_SUB: u128 = 1u128 - 5;
-   |                          ^^^^^^^^^ attempt to compute `1_u128 - 5_u128`, which would overflow
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:161:30
+error[E0080]: attempt to compute `1_u128 - 5_u128`, which would overflow
+  --> $DIR/overflowing-consts.rs:157:30
    |
 LL | const _NU128_SUB_P: &u128 = &(1u128 - 5);
-   |                              ^^^^^^^^^^^ attempt to compute `1_u128 - 5_u128`, which would overflow
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:163:28
+error[E0080]: attempt to compute `-5_isize - isize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:159:28
    |
 LL | const _NISIZE_SUB: isize = -5isize - isize::MAX;
-   |                            ^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_isize - isize::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:164:32
+error[E0080]: attempt to compute `-5_isize - isize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:160:32
    |
 LL | const _NISIZE_SUB_P: &isize = &(-5isize - isize::MAX);
-   |                                ^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_isize - isize::MAX`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:166:28
+error[E0080]: attempt to compute `1_usize - 5_usize`, which would overflow
+  --> $DIR/overflowing-consts.rs:162:28
    |
-LL | const _NUSIZE_SUB: usize = 1usize - 5 ;
-   |                            ^^^^^^^^^^ attempt to compute `1_usize - 5_usize`, which would overflow
+LL | const _NUSIZE_SUB: usize = 1usize - 5;
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:167:32
+error[E0080]: attempt to compute `1_usize - 5_usize`, which would overflow
+  --> $DIR/overflowing-consts.rs:163:32
    |
-LL | const _NUSIZE_SUB_P: &usize = &(1usize - 5 );
-   |                                ^^^^^^^^^^^^^ attempt to compute `1_usize - 5_usize`, which would overflow
+LL | const _NUSIZE_SUB_P: &usize = &(1usize - 5);
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:171:22
+error[E0080]: attempt to compute `i8::MAX * 5_i8`, which would overflow
+  --> $DIR/overflowing-consts.rs:166:22
    |
 LL | const _NI8_MUL: i8 = i8::MAX * 5;
-   |                      ^^^^^^^^^^^ attempt to compute `i8::MAX * 5_i8`, which would overflow
+   |                      ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:172:26
+error[E0080]: attempt to compute `i8::MAX * 5_i8`, which would overflow
+  --> $DIR/overflowing-consts.rs:167:26
    |
 LL | const _NI8_MUL_P: &i8 = &(i8::MAX * 5);
-   |                          ^^^^^^^^^^^^^ attempt to compute `i8::MAX * 5_i8`, which would overflow
+   |                          ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:174:24
+error[E0080]: attempt to compute `i16::MAX * 5_i16`, which would overflow
+  --> $DIR/overflowing-consts.rs:169:24
    |
 LL | const _NI16_MUL: i16 = i16::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `i16::MAX * 5_i16`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:175:28
+error[E0080]: attempt to compute `i16::MAX * 5_i16`, which would overflow
+  --> $DIR/overflowing-consts.rs:170:28
    |
 LL | const _NI16_MUL_P: &i16 = &(i16::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `i16::MAX * 5_i16`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:177:24
+error[E0080]: attempt to compute `i32::MAX * 5_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:172:24
    |
 LL | const _NI32_MUL: i32 = i32::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `i32::MAX * 5_i32`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:178:28
+error[E0080]: attempt to compute `i32::MAX * 5_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:173:28
    |
 LL | const _NI32_MUL_P: &i32 = &(i32::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `i32::MAX * 5_i32`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:180:24
+error[E0080]: attempt to compute `i64::MAX * 5_i64`, which would overflow
+  --> $DIR/overflowing-consts.rs:175:24
    |
 LL | const _NI64_MUL: i64 = i64::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `i64::MAX * 5_i64`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:181:28
+error[E0080]: attempt to compute `i64::MAX * 5_i64`, which would overflow
+  --> $DIR/overflowing-consts.rs:176:28
    |
 LL | const _NI64_MUL_P: &i64 = &(i64::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `i64::MAX * 5_i64`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:183:26
+error[E0080]: attempt to compute `i128::MAX * 5_i128`, which would overflow
+  --> $DIR/overflowing-consts.rs:178:26
    |
 LL | const _NI128_MUL: i128 = i128::MAX * 5;
-   |                          ^^^^^^^^^^^^^ attempt to compute `i128::MAX * 5_i128`, which would overflow
+   |                          ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:184:30
+error[E0080]: attempt to compute `i128::MAX * 5_i128`, which would overflow
+  --> $DIR/overflowing-consts.rs:179:30
    |
 LL | const _NI128_MUL_P: &i128 = &(i128::MAX * 5);
-   |                              ^^^^^^^^^^^^^^^ attempt to compute `i128::MAX * 5_i128`, which would overflow
+   |                              ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:186:22
+error[E0080]: attempt to compute `u8::MAX * 5_u8`, which would overflow
+  --> $DIR/overflowing-consts.rs:181:22
    |
 LL | const _NU8_MUL: u8 = u8::MAX * 5;
-   |                      ^^^^^^^^^^^ attempt to compute `u8::MAX * 5_u8`, which would overflow
+   |                      ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:187:26
+error[E0080]: attempt to compute `u8::MAX * 5_u8`, which would overflow
+  --> $DIR/overflowing-consts.rs:182:26
    |
 LL | const _NU8_MUL_P: &u8 = &(u8::MAX * 5);
-   |                          ^^^^^^^^^^^^^ attempt to compute `u8::MAX * 5_u8`, which would overflow
+   |                          ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:189:24
+error[E0080]: attempt to compute `u16::MAX * 5_u16`, which would overflow
+  --> $DIR/overflowing-consts.rs:184:24
    |
 LL | const _NU16_MUL: u16 = u16::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `u16::MAX * 5_u16`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:190:28
+error[E0080]: attempt to compute `u16::MAX * 5_u16`, which would overflow
+  --> $DIR/overflowing-consts.rs:185:28
    |
 LL | const _NU16_MUL_P: &u16 = &(u16::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `u16::MAX * 5_u16`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:192:24
+error[E0080]: attempt to compute `u32::MAX * 5_u32`, which would overflow
+  --> $DIR/overflowing-consts.rs:187:24
    |
 LL | const _NU32_MUL: u32 = u32::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `u32::MAX * 5_u32`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:193:28
+error[E0080]: attempt to compute `u32::MAX * 5_u32`, which would overflow
+  --> $DIR/overflowing-consts.rs:188:28
    |
 LL | const _NU32_MUL_P: &u32 = &(u32::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `u32::MAX * 5_u32`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:195:24
+error[E0080]: attempt to compute `u64::MAX * 5_u64`, which would overflow
+  --> $DIR/overflowing-consts.rs:190:24
    |
 LL | const _NU64_MUL: u64 = u64::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `u64::MAX * 5_u64`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:196:28
+error[E0080]: attempt to compute `u64::MAX * 5_u64`, which would overflow
+  --> $DIR/overflowing-consts.rs:191:28
    |
 LL | const _NU64_MUL_P: &u64 = &(u64::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `u64::MAX * 5_u64`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:198:26
+error[E0080]: attempt to compute `u128::MAX * 5_u128`, which would overflow
+  --> $DIR/overflowing-consts.rs:193:26
    |
 LL | const _NU128_MUL: u128 = u128::MAX * 5;
-   |                          ^^^^^^^^^^^^^ attempt to compute `u128::MAX * 5_u128`, which would overflow
+   |                          ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:199:30
+error[E0080]: attempt to compute `u128::MAX * 5_u128`, which would overflow
+  --> $DIR/overflowing-consts.rs:194:30
    |
 LL | const _NU128_MUL_P: &u128 = &(u128::MAX * 5);
-   |                              ^^^^^^^^^^^^^^^ attempt to compute `u128::MAX * 5_u128`, which would overflow
+   |                              ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:201:28
+error[E0080]: attempt to compute `isize::MAX * 5_isize`, which would overflow
+  --> $DIR/overflowing-consts.rs:196:28
    |
 LL | const _NISIZE_MUL: isize = isize::MAX * 5;
-   |                            ^^^^^^^^^^^^^^ attempt to compute `isize::MAX * 5_isize`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:202:32
+error[E0080]: attempt to compute `isize::MAX * 5_isize`, which would overflow
+  --> $DIR/overflowing-consts.rs:197:32
    |
 LL | const _NISIZE_MUL_P: &isize = &(isize::MAX * 5);
-   |                                ^^^^^^^^^^^^^^^^ attempt to compute `isize::MAX * 5_isize`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:204:28
+error[E0080]: attempt to compute `usize::MAX * 5_usize`, which would overflow
+  --> $DIR/overflowing-consts.rs:199:28
    |
 LL | const _NUSIZE_MUL: usize = usize::MAX * 5;
-   |                            ^^^^^^^^^^^^^^ attempt to compute `usize::MAX * 5_usize`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:205:32
+error[E0080]: attempt to compute `usize::MAX * 5_usize`, which would overflow
+  --> $DIR/overflowing-consts.rs:200:32
    |
 LL | const _NUSIZE_MUL_P: &usize = &(usize::MAX * 5);
-   |                                ^^^^^^^^^^^^^^^^ attempt to compute `usize::MAX * 5_usize`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:209:22
+error[E0080]: attempt to divide `1_i8` by zero
+  --> $DIR/overflowing-consts.rs:203:22
    |
 LL | const _NI8_DIV: i8 = 1i8 / 0;
-   |                      ^^^^^^^ attempt to divide `1_i8` by zero
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:210:26
+error[E0080]: attempt to divide `1_i8` by zero
+  --> $DIR/overflowing-consts.rs:204:26
    |
 LL | const _NI8_DIV_P: &i8 = &(1i8 / 0);
-   |                          ^^^^^^^^^ attempt to divide `1_i8` by zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:212:24
+error[E0080]: attempt to divide `1_i16` by zero
+  --> $DIR/overflowing-consts.rs:206:24
    |
 LL | const _NI16_DIV: i16 = 1i16 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_i16` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:213:28
+error[E0080]: attempt to divide `1_i16` by zero
+  --> $DIR/overflowing-consts.rs:207:28
    |
 LL | const _NI16_DIV_P: &i16 = &(1i16 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_i16` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:215:24
+error[E0080]: attempt to divide `1_i32` by zero
+  --> $DIR/overflowing-consts.rs:209:24
    |
 LL | const _NI32_DIV: i32 = 1i32 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_i32` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:216:28
+error[E0080]: attempt to divide `1_i32` by zero
+  --> $DIR/overflowing-consts.rs:210:28
    |
 LL | const _NI32_DIV_P: &i32 = &(1i32 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_i32` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:218:24
+error[E0080]: attempt to divide `1_i64` by zero
+  --> $DIR/overflowing-consts.rs:212:24
    |
 LL | const _NI64_DIV: i64 = 1i64 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_i64` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:219:28
+error[E0080]: attempt to divide `1_i64` by zero
+  --> $DIR/overflowing-consts.rs:213:28
    |
 LL | const _NI64_DIV_P: &i64 = &(1i64 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_i64` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:221:26
+error[E0080]: attempt to divide `1_i128` by zero
+  --> $DIR/overflowing-consts.rs:215:26
    |
 LL | const _NI128_DIV: i128 = 1i128 / 0;
-   |                          ^^^^^^^^^ attempt to divide `1_i128` by zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:222:30
+error[E0080]: attempt to divide `1_i128` by zero
+  --> $DIR/overflowing-consts.rs:216:30
    |
 LL | const _NI128_DIV_P: &i128 = &(1i128 / 0);
-   |                              ^^^^^^^^^^^ attempt to divide `1_i128` by zero
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:224:22
+error[E0080]: attempt to divide `1_u8` by zero
+  --> $DIR/overflowing-consts.rs:218:22
    |
 LL | const _NU8_DIV: u8 = 1u8 / 0;
-   |                      ^^^^^^^ attempt to divide `1_u8` by zero
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:225:26
+error[E0080]: attempt to divide `1_u8` by zero
+  --> $DIR/overflowing-consts.rs:219:26
    |
 LL | const _NU8_DIV_P: &u8 = &(1u8 / 0);
-   |                          ^^^^^^^^^ attempt to divide `1_u8` by zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:227:24
+error[E0080]: attempt to divide `1_u16` by zero
+  --> $DIR/overflowing-consts.rs:221:24
    |
 LL | const _NU16_DIV: u16 = 1u16 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_u16` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:228:28
+error[E0080]: attempt to divide `1_u16` by zero
+  --> $DIR/overflowing-consts.rs:222:28
    |
 LL | const _NU16_DIV_P: &u16 = &(1u16 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_u16` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:230:24
+error[E0080]: attempt to divide `1_u32` by zero
+  --> $DIR/overflowing-consts.rs:224:24
    |
 LL | const _NU32_DIV: u32 = 1u32 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_u32` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:231:28
+error[E0080]: attempt to divide `1_u32` by zero
+  --> $DIR/overflowing-consts.rs:225:28
    |
 LL | const _NU32_DIV_P: &u32 = &(1u32 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_u32` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:233:24
+error[E0080]: attempt to divide `1_u64` by zero
+  --> $DIR/overflowing-consts.rs:227:24
    |
 LL | const _NU64_DIV: u64 = 1u64 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_u64` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:234:28
+error[E0080]: attempt to divide `1_u64` by zero
+  --> $DIR/overflowing-consts.rs:228:28
    |
 LL | const _NU64_DIV_P: &u64 = &(1u64 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_u64` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:236:26
+error[E0080]: attempt to divide `1_u128` by zero
+  --> $DIR/overflowing-consts.rs:230:26
    |
 LL | const _NU128_DIV: u128 = 1u128 / 0;
-   |                          ^^^^^^^^^ attempt to divide `1_u128` by zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:237:30
+error[E0080]: attempt to divide `1_u128` by zero
+  --> $DIR/overflowing-consts.rs:231:30
    |
 LL | const _NU128_DIV_P: &u128 = &(1u128 / 0);
-   |                              ^^^^^^^^^^^ attempt to divide `1_u128` by zero
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:239:28
+error[E0080]: attempt to divide `1_isize` by zero
+  --> $DIR/overflowing-consts.rs:233:28
    |
 LL | const _NISIZE_DIV: isize = 1isize / 0;
-   |                            ^^^^^^^^^^ attempt to divide `1_isize` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:240:32
+error[E0080]: attempt to divide `1_isize` by zero
+  --> $DIR/overflowing-consts.rs:234:32
    |
 LL | const _NISIZE_DIV_P: &isize = &(1isize / 0);
-   |                                ^^^^^^^^^^^^ attempt to divide `1_isize` by zero
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:242:28
+error[E0080]: attempt to divide `1_usize` by zero
+  --> $DIR/overflowing-consts.rs:236:28
    |
 LL | const _NUSIZE_DIV: usize = 1usize / 0;
-   |                            ^^^^^^^^^^ attempt to divide `1_usize` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:243:32
+error[E0080]: attempt to divide `1_usize` by zero
+  --> $DIR/overflowing-consts.rs:237:32
    |
 LL | const _NUSIZE_DIV_P: &usize = &(1usize / 0);
-   |                                ^^^^^^^^^^^^ attempt to divide `1_usize` by zero
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:246:22
+error[E0080]: attempt to calculate the remainder of `1_i8` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:240:22
    |
 LL | const _NI8_MOD: i8 = 1i8 % 0;
-   |                      ^^^^^^^ attempt to calculate the remainder of `1_i8` with a divisor of zero
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:247:26
+error[E0080]: attempt to calculate the remainder of `1_i8` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:241:26
    |
 LL | const _NI8_MOD_P: &i8 = &(1i8 % 0);
-   |                          ^^^^^^^^^ attempt to calculate the remainder of `1_i8` with a divisor of zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:249:24
+error[E0080]: attempt to calculate the remainder of `1_i16` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:243:24
    |
 LL | const _NI16_MOD: i16 = 1i16 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_i16` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:250:28
+error[E0080]: attempt to calculate the remainder of `1_i16` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:244:28
    |
 LL | const _NI16_MOD_P: &i16 = &(1i16 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_i16` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:252:24
+error[E0080]: attempt to calculate the remainder of `1_i32` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:246:24
    |
 LL | const _NI32_MOD: i32 = 1i32 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:253:28
+error[E0080]: attempt to calculate the remainder of `1_i32` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:247:28
    |
 LL | const _NI32_MOD_P: &i32 = &(1i32 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:255:24
+error[E0080]: attempt to calculate the remainder of `1_i64` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:249:24
    |
 LL | const _NI64_MOD: i64 = 1i64 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_i64` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:256:28
+error[E0080]: attempt to calculate the remainder of `1_i64` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:250:28
    |
 LL | const _NI64_MOD_P: &i64 = &(1i64 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_i64` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:258:26
+error[E0080]: attempt to calculate the remainder of `1_i128` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:252:26
    |
 LL | const _NI128_MOD: i128 = 1i128 % 0;
-   |                          ^^^^^^^^^ attempt to calculate the remainder of `1_i128` with a divisor of zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:259:30
+error[E0080]: attempt to calculate the remainder of `1_i128` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:253:30
    |
 LL | const _NI128_MOD_P: &i128 = &(1i128 % 0);
-   |                              ^^^^^^^^^^^ attempt to calculate the remainder of `1_i128` with a divisor of zero
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:261:22
+error[E0080]: attempt to calculate the remainder of `1_u8` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:255:22
    |
 LL | const _NU8_MOD: u8 = 1u8 % 0;
-   |                      ^^^^^^^ attempt to calculate the remainder of `1_u8` with a divisor of zero
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:262:26
+error[E0080]: attempt to calculate the remainder of `1_u8` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:256:26
    |
 LL | const _NU8_MOD_P: &u8 = &(1u8 % 0);
-   |                          ^^^^^^^^^ attempt to calculate the remainder of `1_u8` with a divisor of zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:264:24
+error[E0080]: attempt to calculate the remainder of `1_u16` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:258:24
    |
 LL | const _NU16_MOD: u16 = 1u16 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_u16` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:265:28
+error[E0080]: attempt to calculate the remainder of `1_u16` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:259:28
    |
 LL | const _NU16_MOD_P: &u16 = &(1u16 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_u16` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:267:24
+error[E0080]: attempt to calculate the remainder of `1_u32` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:261:24
    |
 LL | const _NU32_MOD: u32 = 1u32 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_u32` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:268:28
+error[E0080]: attempt to calculate the remainder of `1_u32` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:262:28
    |
 LL | const _NU32_MOD_P: &u32 = &(1u32 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_u32` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:270:24
+error[E0080]: attempt to calculate the remainder of `1_u64` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:264:24
    |
 LL | const _NU64_MOD: u64 = 1u64 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_u64` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:271:28
+error[E0080]: attempt to calculate the remainder of `1_u64` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:265:28
    |
 LL | const _NU64_MOD_P: &u64 = &(1u64 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_u64` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:273:26
+error[E0080]: attempt to calculate the remainder of `1_u128` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:267:26
    |
 LL | const _NU128_MOD: u128 = 1u128 % 0;
-   |                          ^^^^^^^^^ attempt to calculate the remainder of `1_u128` with a divisor of zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:274:30
+error[E0080]: attempt to calculate the remainder of `1_u128` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:268:30
    |
 LL | const _NU128_MOD_P: &u128 = &(1u128 % 0);
-   |                              ^^^^^^^^^^^ attempt to calculate the remainder of `1_u128` with a divisor of zero
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:276:28
+error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:270:28
    |
 LL | const _NISIZE_MOD: isize = 1isize % 0;
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:277:32
+error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:271:32
    |
 LL | const _NISIZE_MOD_P: &isize = &(1isize % 0);
-   |                                ^^^^^^^^^^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:279:28
+error[E0080]: attempt to calculate the remainder of `1_usize` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:273:28
    |
 LL | const _NUSIZE_MOD: usize = 1usize % 0;
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_usize` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:280:32
+error[E0080]: attempt to calculate the remainder of `1_usize` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:274:32
    |
 LL | const _NUSIZE_MOD_P: &usize = &(1usize % 0);
-   |                                ^^^^^^^^^^^^ attempt to calculate the remainder of `1_usize` with a divisor of zero
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:284:24
+error[E0080]: index out of bounds: the length is 3 but the index is 4
+  --> $DIR/overflowing-consts.rs:277:24
    |
 LL | const _NI32_OOB: i32 = [1, 2, 3][4];
-   |                        ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:285:28
+error[E0080]: index out of bounds: the length is 3 but the index is 4
+  --> $DIR/overflowing-consts.rs:278:28
    |
 LL | const _NI32_OOB_P: &i32 = &([1, 2, 3][4]);
-   |                            ^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 170 previous errors
 
diff --git a/tests/ui/consts/overflowing-consts.opt_with_overflow_checks.stderr b/tests/ui/consts/overflowing-consts.opt_with_overflow_checks.stderr
index 81f22944adb..e317060a141 100644
--- a/tests/ui/consts/overflowing-consts.opt_with_overflow_checks.stderr
+++ b/tests/ui/consts/overflowing-consts.opt_with_overflow_checks.stderr
@@ -1,1022 +1,1022 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:19:22
+error[E0080]: attempt to shift left by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:18:22
    |
 LL | const _NI8_SHL: i8 = 1i8 << 8;
-   |                      ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow
+   |                      ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:20:26
+error[E0080]: attempt to shift left by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:19:26
    |
 LL | const _NI8_SHL_P: &i8 = &(1i8 << 8);
-   |                          ^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow
+   |                          ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:22:24
+error[E0080]: attempt to shift left by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:21:24
    |
 LL | const _NI16_SHL: i16 = 1i16 << 16;
-   |                        ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:23:28
+error[E0080]: attempt to shift left by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:22:28
    |
 LL | const _NI16_SHL_P: &i16 = &(1i16 << 16);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:25:24
+error[E0080]: attempt to shift left by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:24:24
    |
 LL | const _NI32_SHL: i32 = 1i32 << 32;
-   |                        ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:26:28
+error[E0080]: attempt to shift left by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:25:28
    |
 LL | const _NI32_SHL_P: &i32 = &(1i32 << 32);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:28:24
+error[E0080]: attempt to shift left by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:27:24
    |
 LL | const _NI64_SHL: i64 = 1i64 << 64;
-   |                        ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:29:28
+error[E0080]: attempt to shift left by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:28:28
    |
 LL | const _NI64_SHL_P: &i64 = &(1i64 << 64);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:31:26
+error[E0080]: attempt to shift left by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:30:26
    |
 LL | const _NI128_SHL: i128 = 1i128 << 128;
-   |                          ^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow
+   |                          ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:32:30
+error[E0080]: attempt to shift left by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:31:30
    |
 LL | const _NI128_SHL_P: &i128 = &(1i128 << 128);
-   |                              ^^^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow
+   |                              ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:34:22
+error[E0080]: attempt to shift left by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:33:22
    |
 LL | const _NU8_SHL: u8 = 1u8 << 8;
-   |                      ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow
+   |                      ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:35:26
+error[E0080]: attempt to shift left by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:34:26
    |
 LL | const _NU8_SHL_P: &u8 = &(1u8 << 8);
-   |                          ^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow
+   |                          ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:37:24
+error[E0080]: attempt to shift left by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:36:24
    |
 LL | const _NU16_SHL: u16 = 1u16 << 16;
-   |                        ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:38:28
+error[E0080]: attempt to shift left by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:37:28
    |
 LL | const _NU16_SHL_P: &u16 = &(1u16 << 16);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:40:24
+error[E0080]: attempt to shift left by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:39:24
    |
 LL | const _NU32_SHL: u32 = 1u32 << 32;
-   |                        ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:41:28
+error[E0080]: attempt to shift left by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:40:28
    |
 LL | const _NU32_SHL_P: &u32 = &(1u32 << 32);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:43:24
+error[E0080]: attempt to shift left by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:42:24
    |
 LL | const _NU64_SHL: u64 = 1u64 << 64;
-   |                        ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:44:28
+error[E0080]: attempt to shift left by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:43:28
    |
 LL | const _NU64_SHL_P: &u64 = &(1u64 << 64);
-   |                            ^^^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:46:26
+error[E0080]: attempt to shift left by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:45:26
    |
 LL | const _NU128_SHL: u128 = 1u128 << 128;
-   |                          ^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow
+   |                          ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:47:30
+error[E0080]: attempt to shift left by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:46:30
    |
 LL | const _NU128_SHL_P: &u128 = &(1u128 << 128);
-   |                              ^^^^^^^^^^^^^^ attempt to shift left by `128_i32`, which would overflow
+   |                              ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:49:28
+error[E0080]: attempt to shift left by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:48:28
    |
 LL | const _NISIZE_SHL: isize = 1isize << BITS;
-   |                            ^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:50:32
+error[E0080]: attempt to shift left by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:49:32
    |
 LL | const _NISIZE_SHL_P: &isize = &(1isize << BITS);
-   |                                ^^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:52:28
+error[E0080]: attempt to shift left by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:51:28
    |
 LL | const _NUSIZE_SHL: usize = 1usize << BITS;
-   |                            ^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:53:32
+error[E0080]: attempt to shift left by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:52:32
    |
 LL | const _NUSIZE_SHL_P: &usize = &(1usize << BITS);
-   |                                ^^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:57:22
+error[E0080]: attempt to shift right by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:55:22
    |
 LL | const _NI8_SHR: i8 = 1i8 >> 8;
-   |                      ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow
+   |                      ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:58:26
+error[E0080]: attempt to shift right by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:56:26
    |
 LL | const _NI8_SHR_P: &i8 = &(1i8 >> 8);
-   |                          ^^^^^^^^^^ attempt to shift right by `8_i32`, which would overflow
+   |                          ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:60:24
+error[E0080]: attempt to shift right by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:58:24
    |
 LL | const _NI16_SHR: i16 = 1i16 >> 16;
-   |                        ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:61:28
+error[E0080]: attempt to shift right by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:59:28
    |
 LL | const _NI16_SHR_P: &i16 = &(1i16 >> 16);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:63:24
+error[E0080]: attempt to shift right by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:61:24
    |
 LL | const _NI32_SHR: i32 = 1i32 >> 32;
-   |                        ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:64:28
+error[E0080]: attempt to shift right by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:62:28
    |
 LL | const _NI32_SHR_P: &i32 = &(1i32 >> 32);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:66:24
+error[E0080]: attempt to shift right by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:64:24
    |
 LL | const _NI64_SHR: i64 = 1i64 >> 64;
-   |                        ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:67:28
+error[E0080]: attempt to shift right by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:65:28
    |
 LL | const _NI64_SHR_P: &i64 = &(1i64 >> 64);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:69:26
+error[E0080]: attempt to shift right by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:67:26
    |
 LL | const _NI128_SHR: i128 = 1i128 >> 128;
-   |                          ^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow
+   |                          ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:70:30
+error[E0080]: attempt to shift right by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:68:30
    |
 LL | const _NI128_SHR_P: &i128 = &(1i128 >> 128);
-   |                              ^^^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow
+   |                              ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:72:22
+error[E0080]: attempt to shift right by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:70:22
    |
 LL | const _NU8_SHR: u8 = 1u8 >> 8;
-   |                      ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow
+   |                      ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:73:26
+error[E0080]: attempt to shift right by `8_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:71:26
    |
 LL | const _NU8_SHR_P: &u8 = &(1u8 >> 8);
-   |                          ^^^^^^^^^^ attempt to shift right by `8_i32`, which would overflow
+   |                          ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:75:24
+error[E0080]: attempt to shift right by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:73:24
    |
 LL | const _NU16_SHR: u16 = 1u16 >> 16;
-   |                        ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:76:28
+error[E0080]: attempt to shift right by `16_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:74:28
    |
 LL | const _NU16_SHR_P: &u16 = &(1u16 >> 16);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:78:24
+error[E0080]: attempt to shift right by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:76:24
    |
 LL | const _NU32_SHR: u32 = 1u32 >> 32;
-   |                        ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:79:28
+error[E0080]: attempt to shift right by `32_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:77:28
    |
 LL | const _NU32_SHR_P: &u32 = &(1u32 >> 32);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:81:24
+error[E0080]: attempt to shift right by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:79:24
    |
 LL | const _NU64_SHR: u64 = 1u64 >> 64;
-   |                        ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
+   |                        ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:82:28
+error[E0080]: attempt to shift right by `64_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:80:28
    |
 LL | const _NU64_SHR_P: &u64 = &(1u64 >> 64);
-   |                            ^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
+   |                            ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:84:26
+error[E0080]: attempt to shift right by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:82:26
    |
 LL | const _NU128_SHR: u128 = 1u128 >> 128;
-   |                          ^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow
+   |                          ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:85:30
+error[E0080]: attempt to shift right by `128_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:83:30
    |
 LL | const _NU128_SHR_P: &u128 = &(1u128 >> 128);
-   |                              ^^^^^^^^^^^^^^ attempt to shift right by `128_i32`, which would overflow
+   |                              ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:87:28
+error[E0080]: attempt to shift right by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:85:28
    |
 LL | const _NISIZE_SHR: isize = 1isize >> BITS;
-   |                            ^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:88:32
+error[E0080]: attempt to shift right by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:86:32
    |
 LL | const _NISIZE_SHR_P: &isize = &(1isize >> BITS);
-   |                                ^^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:90:28
+error[E0080]: attempt to shift right by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:88:28
    |
 LL | const _NUSIZE_SHR: usize = 1usize >> BITS;
-   |                            ^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:91:32
+error[E0080]: attempt to shift right by `%BITS%`, which would overflow
+  --> $DIR/overflowing-consts.rs:89:32
    |
 LL | const _NUSIZE_SHR_P: &usize = &(1usize >> BITS);
-   |                                ^^^^^^^^^^^^^^^^ attempt to shift right by `%BITS%`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:95:22
+error[E0080]: attempt to compute `1_i8 + i8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:92:22
    |
 LL | const _NI8_ADD: i8 = 1i8 + i8::MAX;
-   |                      ^^^^^^^^^^^^^ attempt to compute `1_i8 + i8::MAX`, which would overflow
+   |                      ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:96:26
+error[E0080]: attempt to compute `1_i8 + i8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:93:26
    |
 LL | const _NI8_ADD_P: &i8 = &(1i8 + i8::MAX);
-   |                          ^^^^^^^^^^^^^^^ attempt to compute `1_i8 + i8::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:98:24
+error[E0080]: attempt to compute `1_i16 + i16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:95:24
    |
 LL | const _NI16_ADD: i16 = 1i16 + i16::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_i16 + i16::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:99:28
+error[E0080]: attempt to compute `1_i16 + i16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:96:28
    |
 LL | const _NI16_ADD_P: &i16 = &(1i16 + i16::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_i16 + i16::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:101:24
+error[E0080]: attempt to compute `1_i32 + i32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:98:24
    |
 LL | const _NI32_ADD: i32 = 1i32 + i32::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:102:28
+error[E0080]: attempt to compute `1_i32 + i32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:99:28
    |
 LL | const _NI32_ADD_P: &i32 = &(1i32 + i32::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_i32 + i32::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:104:24
+error[E0080]: attempt to compute `1_i64 + i64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:101:24
    |
 LL | const _NI64_ADD: i64 = 1i64 + i64::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_i64 + i64::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:105:28
+error[E0080]: attempt to compute `1_i64 + i64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:102:28
    |
 LL | const _NI64_ADD_P: &i64 = &(1i64 + i64::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_i64 + i64::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:107:26
+error[E0080]: attempt to compute `1_i128 + i128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:104:26
    |
 LL | const _NI128_ADD: i128 = 1i128 + i128::MAX;
-   |                          ^^^^^^^^^^^^^^^^^ attempt to compute `1_i128 + i128::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:108:30
+error[E0080]: attempt to compute `1_i128 + i128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:105:30
    |
 LL | const _NI128_ADD_P: &i128 = &(1i128 + i128::MAX);
-   |                              ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_i128 + i128::MAX`, which would overflow
+   |                              ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:110:22
+error[E0080]: attempt to compute `1_u8 + u8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:107:22
    |
 LL | const _NU8_ADD: u8 = 1u8 + u8::MAX;
-   |                      ^^^^^^^^^^^^^ attempt to compute `1_u8 + u8::MAX`, which would overflow
+   |                      ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:111:26
+error[E0080]: attempt to compute `1_u8 + u8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:108:26
    |
 LL | const _NU8_ADD_P: &u8 = &(1u8 + u8::MAX);
-   |                          ^^^^^^^^^^^^^^^ attempt to compute `1_u8 + u8::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:113:24
+error[E0080]: attempt to compute `1_u16 + u16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:110:24
    |
 LL | const _NU16_ADD: u16 = 1u16 + u16::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_u16 + u16::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:114:28
+error[E0080]: attempt to compute `1_u16 + u16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:111:28
    |
 LL | const _NU16_ADD_P: &u16 = &(1u16 + u16::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_u16 + u16::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:116:24
+error[E0080]: attempt to compute `1_u32 + u32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:113:24
    |
 LL | const _NU32_ADD: u32 = 1u32 + u32::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_u32 + u32::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:117:28
+error[E0080]: attempt to compute `1_u32 + u32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:114:28
    |
 LL | const _NU32_ADD_P: &u32 = &(1u32 + u32::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_u32 + u32::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:119:24
+error[E0080]: attempt to compute `1_u64 + u64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:116:24
    |
 LL | const _NU64_ADD: u64 = 1u64 + u64::MAX;
-   |                        ^^^^^^^^^^^^^^^ attempt to compute `1_u64 + u64::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:120:28
+error[E0080]: attempt to compute `1_u64 + u64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:117:28
    |
 LL | const _NU64_ADD_P: &u64 = &(1u64 + u64::MAX);
-   |                            ^^^^^^^^^^^^^^^^^ attempt to compute `1_u64 + u64::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:122:26
+error[E0080]: attempt to compute `1_u128 + u128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:119:26
    |
 LL | const _NU128_ADD: u128 = 1u128 + u128::MAX;
-   |                          ^^^^^^^^^^^^^^^^^ attempt to compute `1_u128 + u128::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:123:30
+error[E0080]: attempt to compute `1_u128 + u128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:120:30
    |
 LL | const _NU128_ADD_P: &u128 = &(1u128 + u128::MAX);
-   |                              ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_u128 + u128::MAX`, which would overflow
+   |                              ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:125:28
+error[E0080]: attempt to compute `1_isize + isize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:122:28
    |
 LL | const _NISIZE_ADD: isize = 1isize + isize::MAX;
-   |                            ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_isize + isize::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:126:32
+error[E0080]: attempt to compute `1_isize + isize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:123:32
    |
 LL | const _NISIZE_ADD_P: &isize = &(1isize + isize::MAX);
-   |                                ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `1_isize + isize::MAX`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:128:28
+error[E0080]: attempt to compute `1_usize + usize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:125:28
    |
 LL | const _NUSIZE_ADD: usize = 1usize + usize::MAX;
-   |                            ^^^^^^^^^^^^^^^^^^^ attempt to compute `1_usize + usize::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:129:32
+error[E0080]: attempt to compute `1_usize + usize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:126:32
    |
 LL | const _NUSIZE_ADD_P: &usize = &(1usize + usize::MAX);
-   |                                ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `1_usize + usize::MAX`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:133:22
+error[E0080]: attempt to compute `-5_i8 - i8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:129:22
    |
 LL | const _NI8_SUB: i8 = -5i8 - i8::MAX;
-   |                      ^^^^^^^^^^^^^^ attempt to compute `-5_i8 - i8::MAX`, which would overflow
+   |                      ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:134:26
+error[E0080]: attempt to compute `-5_i8 - i8::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:130:26
    |
 LL | const _NI8_SUB_P: &i8 = &(-5i8 - i8::MAX);
-   |                          ^^^^^^^^^^^^^^^^ attempt to compute `-5_i8 - i8::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:136:24
+error[E0080]: attempt to compute `-5_i16 - i16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:132:24
    |
 LL | const _NI16_SUB: i16 = -5i16 - i16::MAX;
-   |                        ^^^^^^^^^^^^^^^^ attempt to compute `-5_i16 - i16::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:137:28
+error[E0080]: attempt to compute `-5_i16 - i16::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:133:28
    |
 LL | const _NI16_SUB_P: &i16 = &(-5i16 - i16::MAX);
-   |                            ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i16 - i16::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:139:24
+error[E0080]: attempt to compute `-5_i32 - i32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:135:24
    |
 LL | const _NI32_SUB: i32 = -5i32 - i32::MAX;
-   |                        ^^^^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:140:28
+error[E0080]: attempt to compute `-5_i32 - i32::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:136:28
    |
 LL | const _NI32_SUB_P: &i32 = &(-5i32 - i32::MAX);
-   |                            ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i32 - i32::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:142:24
+error[E0080]: attempt to compute `-5_i64 - i64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:138:24
    |
 LL | const _NI64_SUB: i64 = -5i64 - i64::MAX;
-   |                        ^^^^^^^^^^^^^^^^ attempt to compute `-5_i64 - i64::MAX`, which would overflow
+   |                        ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:143:28
+error[E0080]: attempt to compute `-5_i64 - i64::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:139:28
    |
 LL | const _NI64_SUB_P: &i64 = &(-5i64 - i64::MAX);
-   |                            ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i64 - i64::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:145:26
+error[E0080]: attempt to compute `-5_i128 - i128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:141:26
    |
 LL | const _NI128_SUB: i128 = -5i128 - i128::MAX;
-   |                          ^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i128 - i128::MAX`, which would overflow
+   |                          ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:146:30
+error[E0080]: attempt to compute `-5_i128 - i128::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:142:30
    |
 LL | const _NI128_SUB_P: &i128 = &(-5i128 - i128::MAX);
-   |                              ^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_i128 - i128::MAX`, which would overflow
+   |                              ^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:148:22
+error[E0080]: attempt to compute `1_u8 - 5_u8`, which would overflow
+  --> $DIR/overflowing-consts.rs:144:22
    |
 LL | const _NU8_SUB: u8 = 1u8 - 5;
-   |                      ^^^^^^^ attempt to compute `1_u8 - 5_u8`, which would overflow
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:149:26
+error[E0080]: attempt to compute `1_u8 - 5_u8`, which would overflow
+  --> $DIR/overflowing-consts.rs:145:26
    |
 LL | const _NU8_SUB_P: &u8 = &(1u8 - 5);
-   |                          ^^^^^^^^^ attempt to compute `1_u8 - 5_u8`, which would overflow
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:151:24
+error[E0080]: attempt to compute `1_u16 - 5_u16`, which would overflow
+  --> $DIR/overflowing-consts.rs:147:24
    |
 LL | const _NU16_SUB: u16 = 1u16 - 5;
-   |                        ^^^^^^^^ attempt to compute `1_u16 - 5_u16`, which would overflow
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:152:28
+error[E0080]: attempt to compute `1_u16 - 5_u16`, which would overflow
+  --> $DIR/overflowing-consts.rs:148:28
    |
 LL | const _NU16_SUB_P: &u16 = &(1u16 - 5);
-   |                            ^^^^^^^^^^ attempt to compute `1_u16 - 5_u16`, which would overflow
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:154:24
+error[E0080]: attempt to compute `1_u32 - 5_u32`, which would overflow
+  --> $DIR/overflowing-consts.rs:150:24
    |
 LL | const _NU32_SUB: u32 = 1u32 - 5;
-   |                        ^^^^^^^^ attempt to compute `1_u32 - 5_u32`, which would overflow
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:155:28
+error[E0080]: attempt to compute `1_u32 - 5_u32`, which would overflow
+  --> $DIR/overflowing-consts.rs:151:28
    |
 LL | const _NU32_SUB_P: &u32 = &(1u32 - 5);
-   |                            ^^^^^^^^^^ attempt to compute `1_u32 - 5_u32`, which would overflow
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:157:24
+error[E0080]: attempt to compute `1_u64 - 5_u64`, which would overflow
+  --> $DIR/overflowing-consts.rs:153:24
    |
 LL | const _NU64_SUB: u64 = 1u64 - 5;
-   |                        ^^^^^^^^ attempt to compute `1_u64 - 5_u64`, which would overflow
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:158:28
+error[E0080]: attempt to compute `1_u64 - 5_u64`, which would overflow
+  --> $DIR/overflowing-consts.rs:154:28
    |
 LL | const _NU64_SUB_P: &u64 = &(1u64 - 5);
-   |                            ^^^^^^^^^^ attempt to compute `1_u64 - 5_u64`, which would overflow
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:160:26
+error[E0080]: attempt to compute `1_u128 - 5_u128`, which would overflow
+  --> $DIR/overflowing-consts.rs:156:26
    |
 LL | const _NU128_SUB: u128 = 1u128 - 5;
-   |                          ^^^^^^^^^ attempt to compute `1_u128 - 5_u128`, which would overflow
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:161:30
+error[E0080]: attempt to compute `1_u128 - 5_u128`, which would overflow
+  --> $DIR/overflowing-consts.rs:157:30
    |
 LL | const _NU128_SUB_P: &u128 = &(1u128 - 5);
-   |                              ^^^^^^^^^^^ attempt to compute `1_u128 - 5_u128`, which would overflow
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:163:28
+error[E0080]: attempt to compute `-5_isize - isize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:159:28
    |
 LL | const _NISIZE_SUB: isize = -5isize - isize::MAX;
-   |                            ^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_isize - isize::MAX`, which would overflow
+   |                            ^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:164:32
+error[E0080]: attempt to compute `-5_isize - isize::MAX`, which would overflow
+  --> $DIR/overflowing-consts.rs:160:32
    |
 LL | const _NISIZE_SUB_P: &isize = &(-5isize - isize::MAX);
-   |                                ^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `-5_isize - isize::MAX`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:166:28
+error[E0080]: attempt to compute `1_usize - 5_usize`, which would overflow
+  --> $DIR/overflowing-consts.rs:162:28
    |
-LL | const _NUSIZE_SUB: usize = 1usize - 5 ;
-   |                            ^^^^^^^^^^ attempt to compute `1_usize - 5_usize`, which would overflow
+LL | const _NUSIZE_SUB: usize = 1usize - 5;
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:167:32
+error[E0080]: attempt to compute `1_usize - 5_usize`, which would overflow
+  --> $DIR/overflowing-consts.rs:163:32
    |
-LL | const _NUSIZE_SUB_P: &usize = &(1usize - 5 );
-   |                                ^^^^^^^^^^^^^ attempt to compute `1_usize - 5_usize`, which would overflow
+LL | const _NUSIZE_SUB_P: &usize = &(1usize - 5);
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:171:22
+error[E0080]: attempt to compute `i8::MAX * 5_i8`, which would overflow
+  --> $DIR/overflowing-consts.rs:166:22
    |
 LL | const _NI8_MUL: i8 = i8::MAX * 5;
-   |                      ^^^^^^^^^^^ attempt to compute `i8::MAX * 5_i8`, which would overflow
+   |                      ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:172:26
+error[E0080]: attempt to compute `i8::MAX * 5_i8`, which would overflow
+  --> $DIR/overflowing-consts.rs:167:26
    |
 LL | const _NI8_MUL_P: &i8 = &(i8::MAX * 5);
-   |                          ^^^^^^^^^^^^^ attempt to compute `i8::MAX * 5_i8`, which would overflow
+   |                          ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:174:24
+error[E0080]: attempt to compute `i16::MAX * 5_i16`, which would overflow
+  --> $DIR/overflowing-consts.rs:169:24
    |
 LL | const _NI16_MUL: i16 = i16::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `i16::MAX * 5_i16`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:175:28
+error[E0080]: attempt to compute `i16::MAX * 5_i16`, which would overflow
+  --> $DIR/overflowing-consts.rs:170:28
    |
 LL | const _NI16_MUL_P: &i16 = &(i16::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `i16::MAX * 5_i16`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:177:24
+error[E0080]: attempt to compute `i32::MAX * 5_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:172:24
    |
 LL | const _NI32_MUL: i32 = i32::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `i32::MAX * 5_i32`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:178:28
+error[E0080]: attempt to compute `i32::MAX * 5_i32`, which would overflow
+  --> $DIR/overflowing-consts.rs:173:28
    |
 LL | const _NI32_MUL_P: &i32 = &(i32::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `i32::MAX * 5_i32`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:180:24
+error[E0080]: attempt to compute `i64::MAX * 5_i64`, which would overflow
+  --> $DIR/overflowing-consts.rs:175:24
    |
 LL | const _NI64_MUL: i64 = i64::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `i64::MAX * 5_i64`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:181:28
+error[E0080]: attempt to compute `i64::MAX * 5_i64`, which would overflow
+  --> $DIR/overflowing-consts.rs:176:28
    |
 LL | const _NI64_MUL_P: &i64 = &(i64::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `i64::MAX * 5_i64`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:183:26
+error[E0080]: attempt to compute `i128::MAX * 5_i128`, which would overflow
+  --> $DIR/overflowing-consts.rs:178:26
    |
 LL | const _NI128_MUL: i128 = i128::MAX * 5;
-   |                          ^^^^^^^^^^^^^ attempt to compute `i128::MAX * 5_i128`, which would overflow
+   |                          ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:184:30
+error[E0080]: attempt to compute `i128::MAX * 5_i128`, which would overflow
+  --> $DIR/overflowing-consts.rs:179:30
    |
 LL | const _NI128_MUL_P: &i128 = &(i128::MAX * 5);
-   |                              ^^^^^^^^^^^^^^^ attempt to compute `i128::MAX * 5_i128`, which would overflow
+   |                              ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:186:22
+error[E0080]: attempt to compute `u8::MAX * 5_u8`, which would overflow
+  --> $DIR/overflowing-consts.rs:181:22
    |
 LL | const _NU8_MUL: u8 = u8::MAX * 5;
-   |                      ^^^^^^^^^^^ attempt to compute `u8::MAX * 5_u8`, which would overflow
+   |                      ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:187:26
+error[E0080]: attempt to compute `u8::MAX * 5_u8`, which would overflow
+  --> $DIR/overflowing-consts.rs:182:26
    |
 LL | const _NU8_MUL_P: &u8 = &(u8::MAX * 5);
-   |                          ^^^^^^^^^^^^^ attempt to compute `u8::MAX * 5_u8`, which would overflow
+   |                          ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:189:24
+error[E0080]: attempt to compute `u16::MAX * 5_u16`, which would overflow
+  --> $DIR/overflowing-consts.rs:184:24
    |
 LL | const _NU16_MUL: u16 = u16::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `u16::MAX * 5_u16`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:190:28
+error[E0080]: attempt to compute `u16::MAX * 5_u16`, which would overflow
+  --> $DIR/overflowing-consts.rs:185:28
    |
 LL | const _NU16_MUL_P: &u16 = &(u16::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `u16::MAX * 5_u16`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:192:24
+error[E0080]: attempt to compute `u32::MAX * 5_u32`, which would overflow
+  --> $DIR/overflowing-consts.rs:187:24
    |
 LL | const _NU32_MUL: u32 = u32::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `u32::MAX * 5_u32`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:193:28
+error[E0080]: attempt to compute `u32::MAX * 5_u32`, which would overflow
+  --> $DIR/overflowing-consts.rs:188:28
    |
 LL | const _NU32_MUL_P: &u32 = &(u32::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `u32::MAX * 5_u32`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:195:24
+error[E0080]: attempt to compute `u64::MAX * 5_u64`, which would overflow
+  --> $DIR/overflowing-consts.rs:190:24
    |
 LL | const _NU64_MUL: u64 = u64::MAX * 5;
-   |                        ^^^^^^^^^^^^ attempt to compute `u64::MAX * 5_u64`, which would overflow
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:196:28
+error[E0080]: attempt to compute `u64::MAX * 5_u64`, which would overflow
+  --> $DIR/overflowing-consts.rs:191:28
    |
 LL | const _NU64_MUL_P: &u64 = &(u64::MAX * 5);
-   |                            ^^^^^^^^^^^^^^ attempt to compute `u64::MAX * 5_u64`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:198:26
+error[E0080]: attempt to compute `u128::MAX * 5_u128`, which would overflow
+  --> $DIR/overflowing-consts.rs:193:26
    |
 LL | const _NU128_MUL: u128 = u128::MAX * 5;
-   |                          ^^^^^^^^^^^^^ attempt to compute `u128::MAX * 5_u128`, which would overflow
+   |                          ^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:199:30
+error[E0080]: attempt to compute `u128::MAX * 5_u128`, which would overflow
+  --> $DIR/overflowing-consts.rs:194:30
    |
 LL | const _NU128_MUL_P: &u128 = &(u128::MAX * 5);
-   |                              ^^^^^^^^^^^^^^^ attempt to compute `u128::MAX * 5_u128`, which would overflow
+   |                              ^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:201:28
+error[E0080]: attempt to compute `isize::MAX * 5_isize`, which would overflow
+  --> $DIR/overflowing-consts.rs:196:28
    |
 LL | const _NISIZE_MUL: isize = isize::MAX * 5;
-   |                            ^^^^^^^^^^^^^^ attempt to compute `isize::MAX * 5_isize`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:202:32
+error[E0080]: attempt to compute `isize::MAX * 5_isize`, which would overflow
+  --> $DIR/overflowing-consts.rs:197:32
    |
 LL | const _NISIZE_MUL_P: &isize = &(isize::MAX * 5);
-   |                                ^^^^^^^^^^^^^^^^ attempt to compute `isize::MAX * 5_isize`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:204:28
+error[E0080]: attempt to compute `usize::MAX * 5_usize`, which would overflow
+  --> $DIR/overflowing-consts.rs:199:28
    |
 LL | const _NUSIZE_MUL: usize = usize::MAX * 5;
-   |                            ^^^^^^^^^^^^^^ attempt to compute `usize::MAX * 5_usize`, which would overflow
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:205:32
+error[E0080]: attempt to compute `usize::MAX * 5_usize`, which would overflow
+  --> $DIR/overflowing-consts.rs:200:32
    |
 LL | const _NUSIZE_MUL_P: &usize = &(usize::MAX * 5);
-   |                                ^^^^^^^^^^^^^^^^ attempt to compute `usize::MAX * 5_usize`, which would overflow
+   |                                ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:209:22
+error[E0080]: attempt to divide `1_i8` by zero
+  --> $DIR/overflowing-consts.rs:203:22
    |
 LL | const _NI8_DIV: i8 = 1i8 / 0;
-   |                      ^^^^^^^ attempt to divide `1_i8` by zero
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:210:26
+error[E0080]: attempt to divide `1_i8` by zero
+  --> $DIR/overflowing-consts.rs:204:26
    |
 LL | const _NI8_DIV_P: &i8 = &(1i8 / 0);
-   |                          ^^^^^^^^^ attempt to divide `1_i8` by zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:212:24
+error[E0080]: attempt to divide `1_i16` by zero
+  --> $DIR/overflowing-consts.rs:206:24
    |
 LL | const _NI16_DIV: i16 = 1i16 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_i16` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:213:28
+error[E0080]: attempt to divide `1_i16` by zero
+  --> $DIR/overflowing-consts.rs:207:28
    |
 LL | const _NI16_DIV_P: &i16 = &(1i16 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_i16` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:215:24
+error[E0080]: attempt to divide `1_i32` by zero
+  --> $DIR/overflowing-consts.rs:209:24
    |
 LL | const _NI32_DIV: i32 = 1i32 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_i32` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:216:28
+error[E0080]: attempt to divide `1_i32` by zero
+  --> $DIR/overflowing-consts.rs:210:28
    |
 LL | const _NI32_DIV_P: &i32 = &(1i32 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_i32` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:218:24
+error[E0080]: attempt to divide `1_i64` by zero
+  --> $DIR/overflowing-consts.rs:212:24
    |
 LL | const _NI64_DIV: i64 = 1i64 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_i64` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:219:28
+error[E0080]: attempt to divide `1_i64` by zero
+  --> $DIR/overflowing-consts.rs:213:28
    |
 LL | const _NI64_DIV_P: &i64 = &(1i64 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_i64` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:221:26
+error[E0080]: attempt to divide `1_i128` by zero
+  --> $DIR/overflowing-consts.rs:215:26
    |
 LL | const _NI128_DIV: i128 = 1i128 / 0;
-   |                          ^^^^^^^^^ attempt to divide `1_i128` by zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:222:30
+error[E0080]: attempt to divide `1_i128` by zero
+  --> $DIR/overflowing-consts.rs:216:30
    |
 LL | const _NI128_DIV_P: &i128 = &(1i128 / 0);
-   |                              ^^^^^^^^^^^ attempt to divide `1_i128` by zero
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:224:22
+error[E0080]: attempt to divide `1_u8` by zero
+  --> $DIR/overflowing-consts.rs:218:22
    |
 LL | const _NU8_DIV: u8 = 1u8 / 0;
-   |                      ^^^^^^^ attempt to divide `1_u8` by zero
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:225:26
+error[E0080]: attempt to divide `1_u8` by zero
+  --> $DIR/overflowing-consts.rs:219:26
    |
 LL | const _NU8_DIV_P: &u8 = &(1u8 / 0);
-   |                          ^^^^^^^^^ attempt to divide `1_u8` by zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:227:24
+error[E0080]: attempt to divide `1_u16` by zero
+  --> $DIR/overflowing-consts.rs:221:24
    |
 LL | const _NU16_DIV: u16 = 1u16 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_u16` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:228:28
+error[E0080]: attempt to divide `1_u16` by zero
+  --> $DIR/overflowing-consts.rs:222:28
    |
 LL | const _NU16_DIV_P: &u16 = &(1u16 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_u16` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:230:24
+error[E0080]: attempt to divide `1_u32` by zero
+  --> $DIR/overflowing-consts.rs:224:24
    |
 LL | const _NU32_DIV: u32 = 1u32 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_u32` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:231:28
+error[E0080]: attempt to divide `1_u32` by zero
+  --> $DIR/overflowing-consts.rs:225:28
    |
 LL | const _NU32_DIV_P: &u32 = &(1u32 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_u32` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:233:24
+error[E0080]: attempt to divide `1_u64` by zero
+  --> $DIR/overflowing-consts.rs:227:24
    |
 LL | const _NU64_DIV: u64 = 1u64 / 0;
-   |                        ^^^^^^^^ attempt to divide `1_u64` by zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:234:28
+error[E0080]: attempt to divide `1_u64` by zero
+  --> $DIR/overflowing-consts.rs:228:28
    |
 LL | const _NU64_DIV_P: &u64 = &(1u64 / 0);
-   |                            ^^^^^^^^^^ attempt to divide `1_u64` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:236:26
+error[E0080]: attempt to divide `1_u128` by zero
+  --> $DIR/overflowing-consts.rs:230:26
    |
 LL | const _NU128_DIV: u128 = 1u128 / 0;
-   |                          ^^^^^^^^^ attempt to divide `1_u128` by zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:237:30
+error[E0080]: attempt to divide `1_u128` by zero
+  --> $DIR/overflowing-consts.rs:231:30
    |
 LL | const _NU128_DIV_P: &u128 = &(1u128 / 0);
-   |                              ^^^^^^^^^^^ attempt to divide `1_u128` by zero
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:239:28
+error[E0080]: attempt to divide `1_isize` by zero
+  --> $DIR/overflowing-consts.rs:233:28
    |
 LL | const _NISIZE_DIV: isize = 1isize / 0;
-   |                            ^^^^^^^^^^ attempt to divide `1_isize` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:240:32
+error[E0080]: attempt to divide `1_isize` by zero
+  --> $DIR/overflowing-consts.rs:234:32
    |
 LL | const _NISIZE_DIV_P: &isize = &(1isize / 0);
-   |                                ^^^^^^^^^^^^ attempt to divide `1_isize` by zero
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:242:28
+error[E0080]: attempt to divide `1_usize` by zero
+  --> $DIR/overflowing-consts.rs:236:28
    |
 LL | const _NUSIZE_DIV: usize = 1usize / 0;
-   |                            ^^^^^^^^^^ attempt to divide `1_usize` by zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:243:32
+error[E0080]: attempt to divide `1_usize` by zero
+  --> $DIR/overflowing-consts.rs:237:32
    |
 LL | const _NUSIZE_DIV_P: &usize = &(1usize / 0);
-   |                                ^^^^^^^^^^^^ attempt to divide `1_usize` by zero
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:246:22
+error[E0080]: attempt to calculate the remainder of `1_i8` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:240:22
    |
 LL | const _NI8_MOD: i8 = 1i8 % 0;
-   |                      ^^^^^^^ attempt to calculate the remainder of `1_i8` with a divisor of zero
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:247:26
+error[E0080]: attempt to calculate the remainder of `1_i8` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:241:26
    |
 LL | const _NI8_MOD_P: &i8 = &(1i8 % 0);
-   |                          ^^^^^^^^^ attempt to calculate the remainder of `1_i8` with a divisor of zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:249:24
+error[E0080]: attempt to calculate the remainder of `1_i16` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:243:24
    |
 LL | const _NI16_MOD: i16 = 1i16 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_i16` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:250:28
+error[E0080]: attempt to calculate the remainder of `1_i16` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:244:28
    |
 LL | const _NI16_MOD_P: &i16 = &(1i16 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_i16` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:252:24
+error[E0080]: attempt to calculate the remainder of `1_i32` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:246:24
    |
 LL | const _NI32_MOD: i32 = 1i32 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:253:28
+error[E0080]: attempt to calculate the remainder of `1_i32` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:247:28
    |
 LL | const _NI32_MOD_P: &i32 = &(1i32 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_i32` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:255:24
+error[E0080]: attempt to calculate the remainder of `1_i64` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:249:24
    |
 LL | const _NI64_MOD: i64 = 1i64 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_i64` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:256:28
+error[E0080]: attempt to calculate the remainder of `1_i64` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:250:28
    |
 LL | const _NI64_MOD_P: &i64 = &(1i64 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_i64` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:258:26
+error[E0080]: attempt to calculate the remainder of `1_i128` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:252:26
    |
 LL | const _NI128_MOD: i128 = 1i128 % 0;
-   |                          ^^^^^^^^^ attempt to calculate the remainder of `1_i128` with a divisor of zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:259:30
+error[E0080]: attempt to calculate the remainder of `1_i128` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:253:30
    |
 LL | const _NI128_MOD_P: &i128 = &(1i128 % 0);
-   |                              ^^^^^^^^^^^ attempt to calculate the remainder of `1_i128` with a divisor of zero
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:261:22
+error[E0080]: attempt to calculate the remainder of `1_u8` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:255:22
    |
 LL | const _NU8_MOD: u8 = 1u8 % 0;
-   |                      ^^^^^^^ attempt to calculate the remainder of `1_u8` with a divisor of zero
+   |                      ^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:262:26
+error[E0080]: attempt to calculate the remainder of `1_u8` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:256:26
    |
 LL | const _NU8_MOD_P: &u8 = &(1u8 % 0);
-   |                          ^^^^^^^^^ attempt to calculate the remainder of `1_u8` with a divisor of zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:264:24
+error[E0080]: attempt to calculate the remainder of `1_u16` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:258:24
    |
 LL | const _NU16_MOD: u16 = 1u16 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_u16` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:265:28
+error[E0080]: attempt to calculate the remainder of `1_u16` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:259:28
    |
 LL | const _NU16_MOD_P: &u16 = &(1u16 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_u16` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:267:24
+error[E0080]: attempt to calculate the remainder of `1_u32` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:261:24
    |
 LL | const _NU32_MOD: u32 = 1u32 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_u32` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:268:28
+error[E0080]: attempt to calculate the remainder of `1_u32` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:262:28
    |
 LL | const _NU32_MOD_P: &u32 = &(1u32 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_u32` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:270:24
+error[E0080]: attempt to calculate the remainder of `1_u64` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:264:24
    |
 LL | const _NU64_MOD: u64 = 1u64 % 0;
-   |                        ^^^^^^^^ attempt to calculate the remainder of `1_u64` with a divisor of zero
+   |                        ^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:271:28
+error[E0080]: attempt to calculate the remainder of `1_u64` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:265:28
    |
 LL | const _NU64_MOD_P: &u64 = &(1u64 % 0);
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_u64` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:273:26
+error[E0080]: attempt to calculate the remainder of `1_u128` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:267:26
    |
 LL | const _NU128_MOD: u128 = 1u128 % 0;
-   |                          ^^^^^^^^^ attempt to calculate the remainder of `1_u128` with a divisor of zero
+   |                          ^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:274:30
+error[E0080]: attempt to calculate the remainder of `1_u128` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:268:30
    |
 LL | const _NU128_MOD_P: &u128 = &(1u128 % 0);
-   |                              ^^^^^^^^^^^ attempt to calculate the remainder of `1_u128` with a divisor of zero
+   |                              ^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:276:28
+error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:270:28
    |
 LL | const _NISIZE_MOD: isize = 1isize % 0;
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:277:32
+error[E0080]: attempt to calculate the remainder of `1_isize` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:271:32
    |
 LL | const _NISIZE_MOD_P: &isize = &(1isize % 0);
-   |                                ^^^^^^^^^^^^ attempt to calculate the remainder of `1_isize` with a divisor of zero
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:279:28
+error[E0080]: attempt to calculate the remainder of `1_usize` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:273:28
    |
 LL | const _NUSIZE_MOD: usize = 1usize % 0;
-   |                            ^^^^^^^^^^ attempt to calculate the remainder of `1_usize` with a divisor of zero
+   |                            ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:280:32
+error[E0080]: attempt to calculate the remainder of `1_usize` with a divisor of zero
+  --> $DIR/overflowing-consts.rs:274:32
    |
 LL | const _NUSIZE_MOD_P: &usize = &(1usize % 0);
-   |                                ^^^^^^^^^^^^ attempt to calculate the remainder of `1_usize` with a divisor of zero
+   |                                ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:284:24
+error[E0080]: index out of bounds: the length is 3 but the index is 4
+  --> $DIR/overflowing-consts.rs:277:24
    |
 LL | const _NI32_OOB: i32 = [1, 2, 3][4];
-   |                        ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4
+   |                        ^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/overflowing-consts.rs:285:28
+error[E0080]: index out of bounds: the length is 3 but the index is 4
+  --> $DIR/overflowing-consts.rs:278:28
    |
 LL | const _NI32_OOB_P: &i32 = &([1, 2, 3][4]);
-   |                            ^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4
+   |                            ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 170 previous errors
 
diff --git a/tests/ui/consts/overflowing-consts.rs b/tests/ui/consts/overflowing-consts.rs
index 5ff205ce58e..7c008573b87 100644
--- a/tests/ui/consts/overflowing-consts.rs
+++ b/tests/ui/consts/overflowing-consts.rs
@@ -9,280 +9,272 @@
 //@ normalize-stderr: "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which"
 //@ normalize-stderr: "shift right by `(64|32)_usize`, which" -> "shift right by `%BITS%`, which"
 
-
 #[cfg(target_pointer_width = "32")]
 const BITS: usize = 32;
 #[cfg(target_pointer_width = "64")]
 const BITS: usize = 64;
 
 // Shift left
-const _NI8_SHL: i8 = 1i8 << 8; //~ ERROR: evaluation of constant value failed
-const _NI8_SHL_P: &i8 = &(1i8 << 8); //~ ERROR: evaluation of constant value failed
-
-const _NI16_SHL: i16 = 1i16 << 16; //~ ERROR: evaluation of constant value failed
-const _NI16_SHL_P: &i16 = &(1i16 << 16); //~ ERROR: evaluation of constant value failed
+const _NI8_SHL: i8 = 1i8 << 8; //~ ERROR: overflow
+const _NI8_SHL_P: &i8 = &(1i8 << 8); //~ ERROR: overflow
 
-const _NI32_SHL: i32 = 1i32 << 32; //~ ERROR: evaluation of constant value failed
-const _NI32_SHL_P: &i32 = &(1i32 << 32); //~ ERROR: evaluation of constant value failed
+const _NI16_SHL: i16 = 1i16 << 16; //~ ERROR: overflow
+const _NI16_SHL_P: &i16 = &(1i16 << 16); //~ ERROR: overflow
 
-const _NI64_SHL: i64 = 1i64 << 64; //~ ERROR: evaluation of constant value failed
-const _NI64_SHL_P: &i64 = &(1i64 << 64); //~ ERROR: evaluation of constant value failed
+const _NI32_SHL: i32 = 1i32 << 32; //~ ERROR: overflow
+const _NI32_SHL_P: &i32 = &(1i32 << 32); //~ ERROR: overflow
 
-const _NI128_SHL: i128 = 1i128 << 128; //~ ERROR: evaluation of constant value failed
-const _NI128_SHL_P: &i128 = &(1i128 << 128); //~ ERROR: evaluation of constant value failed
+const _NI64_SHL: i64 = 1i64 << 64; //~ ERROR: overflow
+const _NI64_SHL_P: &i64 = &(1i64 << 64); //~ ERROR: overflow
 
-const _NU8_SHL: u8 = 1u8 << 8; //~ ERROR: evaluation of constant value failed
-const _NU8_SHL_P: &u8 = &(1u8 << 8); //~ ERROR: evaluation of constant value failed
+const _NI128_SHL: i128 = 1i128 << 128; //~ ERROR: overflow
+const _NI128_SHL_P: &i128 = &(1i128 << 128); //~ ERROR: overflow
 
-const _NU16_SHL: u16 = 1u16 << 16; //~ ERROR: evaluation of constant value failed
-const _NU16_SHL_P: &u16 = &(1u16 << 16); //~ ERROR: evaluation of constant value failed
+const _NU8_SHL: u8 = 1u8 << 8; //~ ERROR: overflow
+const _NU8_SHL_P: &u8 = &(1u8 << 8); //~ ERROR: overflow
 
-const _NU32_SHL: u32 = 1u32 << 32; //~ ERROR: evaluation of constant value failed
-const _NU32_SHL_P: &u32 = &(1u32 << 32); //~ ERROR: evaluation of constant value failed
+const _NU16_SHL: u16 = 1u16 << 16; //~ ERROR: overflow
+const _NU16_SHL_P: &u16 = &(1u16 << 16); //~ ERROR: overflow
 
-const _NU64_SHL: u64 = 1u64 << 64; //~ ERROR: evaluation of constant value failed
-const _NU64_SHL_P: &u64 = &(1u64 << 64); //~ ERROR: evaluation of constant value failed
+const _NU32_SHL: u32 = 1u32 << 32; //~ ERROR: overflow
+const _NU32_SHL_P: &u32 = &(1u32 << 32); //~ ERROR: overflow
 
-const _NU128_SHL: u128 = 1u128 << 128; //~ ERROR: evaluation of constant value failed
-const _NU128_SHL_P: &u128 = &(1u128 << 128); //~ ERROR: evaluation of constant value failed
+const _NU64_SHL: u64 = 1u64 << 64; //~ ERROR: overflow
+const _NU64_SHL_P: &u64 = &(1u64 << 64); //~ ERROR: overflow
 
-const _NISIZE_SHL: isize = 1isize << BITS; //~ ERROR: evaluation of constant value failed
-const _NISIZE_SHL_P: &isize = &(1isize << BITS); //~ ERROR: evaluation of constant value failed
+const _NU128_SHL: u128 = 1u128 << 128; //~ ERROR: overflow
+const _NU128_SHL_P: &u128 = &(1u128 << 128); //~ ERROR: overflow
 
-const _NUSIZE_SHL: usize = 1usize << BITS; //~ ERROR: evaluation of constant value failed
-const _NUSIZE_SHL_P: &usize = &(1usize << BITS); //~ ERROR: evaluation of constant value failed
+const _NISIZE_SHL: isize = 1isize << BITS; //~ ERROR: overflow
+const _NISIZE_SHL_P: &isize = &(1isize << BITS); //~ ERROR: overflow
 
+const _NUSIZE_SHL: usize = 1usize << BITS; //~ ERROR: overflow
+const _NUSIZE_SHL_P: &usize = &(1usize << BITS); //~ ERROR: overflow
 
 // Shift right
-const _NI8_SHR: i8 = 1i8 >> 8; //~ ERROR: evaluation of constant value failed
-const _NI8_SHR_P: &i8 = &(1i8 >> 8); //~ ERROR: evaluation of constant value failed
+const _NI8_SHR: i8 = 1i8 >> 8; //~ ERROR: overflow
+const _NI8_SHR_P: &i8 = &(1i8 >> 8); //~ ERROR: overflow
 
-const _NI16_SHR: i16 = 1i16 >> 16; //~ ERROR: evaluation of constant value failed
-const _NI16_SHR_P: &i16 = &(1i16 >> 16); //~ ERROR: evaluation of constant value failed
+const _NI16_SHR: i16 = 1i16 >> 16; //~ ERROR: overflow
+const _NI16_SHR_P: &i16 = &(1i16 >> 16); //~ ERROR: overflow
 
-const _NI32_SHR: i32 = 1i32 >> 32; //~ ERROR: evaluation of constant value failed
-const _NI32_SHR_P: &i32 = &(1i32 >> 32); //~ ERROR: evaluation of constant value failed
+const _NI32_SHR: i32 = 1i32 >> 32; //~ ERROR: overflow
+const _NI32_SHR_P: &i32 = &(1i32 >> 32); //~ ERROR: overflow
 
-const _NI64_SHR: i64 = 1i64 >> 64; //~ ERROR: evaluation of constant value failed
-const _NI64_SHR_P: &i64 = &(1i64 >> 64); //~ ERROR: evaluation of constant value failed
+const _NI64_SHR: i64 = 1i64 >> 64; //~ ERROR: overflow
+const _NI64_SHR_P: &i64 = &(1i64 >> 64); //~ ERROR: overflow
 
-const _NI128_SHR: i128 = 1i128 >> 128; //~ ERROR: evaluation of constant value failed
-const _NI128_SHR_P: &i128 = &(1i128 >> 128); //~ ERROR: evaluation of constant value failed
+const _NI128_SHR: i128 = 1i128 >> 128; //~ ERROR: overflow
+const _NI128_SHR_P: &i128 = &(1i128 >> 128); //~ ERROR: overflow
 
-const _NU8_SHR: u8 = 1u8 >> 8; //~ ERROR: evaluation of constant value failed
-const _NU8_SHR_P: &u8 = &(1u8 >> 8); //~ ERROR: evaluation of constant value failed
+const _NU8_SHR: u8 = 1u8 >> 8; //~ ERROR: overflow
+const _NU8_SHR_P: &u8 = &(1u8 >> 8); //~ ERROR: overflow
 
-const _NU16_SHR: u16 = 1u16 >> 16; //~ ERROR: evaluation of constant value failed
-const _NU16_SHR_P: &u16 = &(1u16 >> 16); //~ ERROR: evaluation of constant value failed
+const _NU16_SHR: u16 = 1u16 >> 16; //~ ERROR: overflow
+const _NU16_SHR_P: &u16 = &(1u16 >> 16); //~ ERROR: overflow
 
-const _NU32_SHR: u32 = 1u32 >> 32; //~ ERROR: evaluation of constant value failed
-const _NU32_SHR_P: &u32 = &(1u32 >> 32); //~ ERROR: evaluation of constant value failed
+const _NU32_SHR: u32 = 1u32 >> 32; //~ ERROR: overflow
+const _NU32_SHR_P: &u32 = &(1u32 >> 32); //~ ERROR: overflow
 
-const _NU64_SHR: u64 = 1u64 >> 64; //~ ERROR: evaluation of constant value failed
-const _NU64_SHR_P: &u64 = &(1u64 >> 64); //~ ERROR: evaluation of constant value failed
+const _NU64_SHR: u64 = 1u64 >> 64; //~ ERROR: overflow
+const _NU64_SHR_P: &u64 = &(1u64 >> 64); //~ ERROR: overflow
 
-const _NU128_SHR: u128 = 1u128 >> 128; //~ ERROR: evaluation of constant value failed
-const _NU128_SHR_P: &u128 = &(1u128 >> 128); //~ ERROR: evaluation of constant value failed
+const _NU128_SHR: u128 = 1u128 >> 128; //~ ERROR: overflow
+const _NU128_SHR_P: &u128 = &(1u128 >> 128); //~ ERROR: overflow
 
-const _NISIZE_SHR: isize = 1isize >> BITS; //~ ERROR: evaluation of constant value failed
-const _NISIZE_SHR_P: &isize = &(1isize >> BITS); //~ ERROR: evaluation of constant value failed
-
-const _NUSIZE_SHR: usize = 1usize >> BITS; //~ ERROR: evaluation of constant value failed
-const _NUSIZE_SHR_P: &usize = &(1usize >> BITS); //~ ERROR: evaluation of constant value failed
+const _NISIZE_SHR: isize = 1isize >> BITS; //~ ERROR: overflow
+const _NISIZE_SHR_P: &isize = &(1isize >> BITS); //~ ERROR: overflow
 
+const _NUSIZE_SHR: usize = 1usize >> BITS; //~ ERROR: overflow
+const _NUSIZE_SHR_P: &usize = &(1usize >> BITS); //~ ERROR: overflow
 
 // Addition
-const _NI8_ADD: i8 = 1i8 + i8::MAX; //~ ERROR: evaluation of constant value failed
-const _NI8_ADD_P: &i8 = &(1i8 + i8::MAX); //~ ERROR: evaluation of constant value failed
-
-const _NI16_ADD: i16 = 1i16 + i16::MAX; //~ ERROR: evaluation of constant value failed
-const _NI16_ADD_P: &i16 = &(1i16 + i16::MAX); //~ ERROR: evaluation of constant value failed
+const _NI8_ADD: i8 = 1i8 + i8::MAX; //~ ERROR: overflow
+const _NI8_ADD_P: &i8 = &(1i8 + i8::MAX); //~ ERROR: overflow
 
-const _NI32_ADD: i32 = 1i32 + i32::MAX; //~ ERROR: evaluation of constant value failed
-const _NI32_ADD_P: &i32 = &(1i32 + i32::MAX); //~ ERROR: evaluation of constant value failed
+const _NI16_ADD: i16 = 1i16 + i16::MAX; //~ ERROR: overflow
+const _NI16_ADD_P: &i16 = &(1i16 + i16::MAX); //~ ERROR: overflow
 
-const _NI64_ADD: i64 = 1i64 + i64::MAX; //~ ERROR: evaluation of constant value failed
-const _NI64_ADD_P: &i64 = &(1i64 + i64::MAX); //~ ERROR: evaluation of constant value failed
+const _NI32_ADD: i32 = 1i32 + i32::MAX; //~ ERROR: overflow
+const _NI32_ADD_P: &i32 = &(1i32 + i32::MAX); //~ ERROR: overflow
 
-const _NI128_ADD: i128 = 1i128 + i128::MAX; //~ ERROR: evaluation of constant value failed
-const _NI128_ADD_P: &i128 = &(1i128 + i128::MAX); //~ ERROR: evaluation of constant value failed
+const _NI64_ADD: i64 = 1i64 + i64::MAX; //~ ERROR: overflow
+const _NI64_ADD_P: &i64 = &(1i64 + i64::MAX); //~ ERROR: overflow
 
-const _NU8_ADD: u8 = 1u8 + u8::MAX; //~ ERROR: evaluation of constant value failed
-const _NU8_ADD_P: &u8 = &(1u8 + u8::MAX); //~ ERROR: evaluation of constant value failed
+const _NI128_ADD: i128 = 1i128 + i128::MAX; //~ ERROR: overflow
+const _NI128_ADD_P: &i128 = &(1i128 + i128::MAX); //~ ERROR: overflow
 
-const _NU16_ADD: u16 = 1u16 + u16::MAX; //~ ERROR: evaluation of constant value failed
-const _NU16_ADD_P: &u16 = &(1u16 + u16::MAX); //~ ERROR: evaluation of constant value failed
+const _NU8_ADD: u8 = 1u8 + u8::MAX; //~ ERROR: overflow
+const _NU8_ADD_P: &u8 = &(1u8 + u8::MAX); //~ ERROR: overflow
 
-const _NU32_ADD: u32 = 1u32 + u32::MAX; //~ ERROR: evaluation of constant value failed
-const _NU32_ADD_P: &u32 = &(1u32 + u32::MAX); //~ ERROR: evaluation of constant value failed
+const _NU16_ADD: u16 = 1u16 + u16::MAX; //~ ERROR: overflow
+const _NU16_ADD_P: &u16 = &(1u16 + u16::MAX); //~ ERROR: overflow
 
-const _NU64_ADD: u64 = 1u64 + u64::MAX; //~ ERROR: evaluation of constant value failed
-const _NU64_ADD_P: &u64 = &(1u64 + u64::MAX); //~ ERROR: evaluation of constant value failed
+const _NU32_ADD: u32 = 1u32 + u32::MAX; //~ ERROR: overflow
+const _NU32_ADD_P: &u32 = &(1u32 + u32::MAX); //~ ERROR: overflow
 
-const _NU128_ADD: u128 = 1u128 + u128::MAX; //~ ERROR: evaluation of constant value failed
-const _NU128_ADD_P: &u128 = &(1u128 + u128::MAX); //~ ERROR: evaluation of constant value failed
+const _NU64_ADD: u64 = 1u64 + u64::MAX; //~ ERROR: overflow
+const _NU64_ADD_P: &u64 = &(1u64 + u64::MAX); //~ ERROR: overflow
 
-const _NISIZE_ADD: isize = 1isize + isize::MAX; //~ ERROR: evaluation of constant value failed
-const _NISIZE_ADD_P: &isize = &(1isize + isize::MAX); //~ ERROR: evaluation of constant value failed
+const _NU128_ADD: u128 = 1u128 + u128::MAX; //~ ERROR: overflow
+const _NU128_ADD_P: &u128 = &(1u128 + u128::MAX); //~ ERROR: overflow
 
-const _NUSIZE_ADD: usize = 1usize + usize::MAX; //~ ERROR: evaluation of constant value failed
-const _NUSIZE_ADD_P: &usize = &(1usize + usize::MAX); //~ ERROR: evaluation of constant value failed
+const _NISIZE_ADD: isize = 1isize + isize::MAX; //~ ERROR: overflow
+const _NISIZE_ADD_P: &isize = &(1isize + isize::MAX); //~ ERROR: overflow
 
+const _NUSIZE_ADD: usize = 1usize + usize::MAX; //~ ERROR: overflow
+const _NUSIZE_ADD_P: &usize = &(1usize + usize::MAX); //~ ERROR: overflow
 
 // Subtraction
-const _NI8_SUB: i8 = -5i8 - i8::MAX; //~ ERROR: evaluation of constant value failed
-const _NI8_SUB_P: &i8 = &(-5i8 - i8::MAX); //~ ERROR: evaluation of constant value failed
+const _NI8_SUB: i8 = -5i8 - i8::MAX; //~ ERROR: overflow
+const _NI8_SUB_P: &i8 = &(-5i8 - i8::MAX); //~ ERROR: overflow
 
-const _NI16_SUB: i16 = -5i16 - i16::MAX; //~ ERROR: evaluation of constant value failed
-const _NI16_SUB_P: &i16 = &(-5i16 - i16::MAX); //~ ERROR: evaluation of constant value failed
+const _NI16_SUB: i16 = -5i16 - i16::MAX; //~ ERROR: overflow
+const _NI16_SUB_P: &i16 = &(-5i16 - i16::MAX); //~ ERROR: overflow
 
-const _NI32_SUB: i32 = -5i32 - i32::MAX; //~ ERROR: evaluation of constant value failed
-const _NI32_SUB_P: &i32 = &(-5i32 - i32::MAX); //~ ERROR: evaluation of constant value failed
+const _NI32_SUB: i32 = -5i32 - i32::MAX; //~ ERROR: overflow
+const _NI32_SUB_P: &i32 = &(-5i32 - i32::MAX); //~ ERROR: overflow
 
-const _NI64_SUB: i64 = -5i64 - i64::MAX; //~ ERROR: evaluation of constant value failed
-const _NI64_SUB_P: &i64 = &(-5i64 - i64::MAX); //~ ERROR: evaluation of constant value failed
+const _NI64_SUB: i64 = -5i64 - i64::MAX; //~ ERROR: overflow
+const _NI64_SUB_P: &i64 = &(-5i64 - i64::MAX); //~ ERROR: overflow
 
-const _NI128_SUB: i128 = -5i128 - i128::MAX; //~ ERROR: evaluation of constant value failed
-const _NI128_SUB_P: &i128 = &(-5i128 - i128::MAX); //~ ERROR: evaluation of constant value failed
+const _NI128_SUB: i128 = -5i128 - i128::MAX; //~ ERROR: overflow
+const _NI128_SUB_P: &i128 = &(-5i128 - i128::MAX); //~ ERROR: overflow
 
-const _NU8_SUB: u8 = 1u8 - 5; //~ ERROR: evaluation of constant value failed
-const _NU8_SUB_P: &u8 = &(1u8 - 5); //~ ERROR: evaluation of constant value failed
+const _NU8_SUB: u8 = 1u8 - 5; //~ ERROR: overflow
+const _NU8_SUB_P: &u8 = &(1u8 - 5); //~ ERROR: overflow
 
-const _NU16_SUB: u16 = 1u16 - 5; //~ ERROR: evaluation of constant value failed
-const _NU16_SUB_P: &u16 = &(1u16 - 5); //~ ERROR: evaluation of constant value failed
+const _NU16_SUB: u16 = 1u16 - 5; //~ ERROR: overflow
+const _NU16_SUB_P: &u16 = &(1u16 - 5); //~ ERROR: overflow
 
-const _NU32_SUB: u32 = 1u32 - 5; //~ ERROR: evaluation of constant value failed
-const _NU32_SUB_P: &u32 = &(1u32 - 5); //~ ERROR: evaluation of constant value failed
+const _NU32_SUB: u32 = 1u32 - 5; //~ ERROR: overflow
+const _NU32_SUB_P: &u32 = &(1u32 - 5); //~ ERROR: overflow
 
-const _NU64_SUB: u64 = 1u64 - 5; //~ ERROR: evaluation of constant value failed
-const _NU64_SUB_P: &u64 = &(1u64 - 5); //~ ERROR: evaluation of constant value failed
+const _NU64_SUB: u64 = 1u64 - 5; //~ ERROR: overflow
+const _NU64_SUB_P: &u64 = &(1u64 - 5); //~ ERROR: overflow
 
-const _NU128_SUB: u128 = 1u128 - 5; //~ ERROR: evaluation of constant value failed
-const _NU128_SUB_P: &u128 = &(1u128 - 5); //~ ERROR: evaluation of constant value failed
+const _NU128_SUB: u128 = 1u128 - 5; //~ ERROR: overflow
+const _NU128_SUB_P: &u128 = &(1u128 - 5); //~ ERROR: overflow
 
-const _NISIZE_SUB: isize = -5isize - isize::MAX; //~ ERROR: evaluation of constant value failed
-const _NISIZE_SUB_P: &isize = &(-5isize - isize::MAX); //~ ERROR: evaluation of constant value failed
-
-const _NUSIZE_SUB: usize = 1usize - 5 ; //~ ERROR: evaluation of constant value failed
-const _NUSIZE_SUB_P: &usize = &(1usize - 5 ); //~ ERROR: evaluation of constant value failed
+const _NISIZE_SUB: isize = -5isize - isize::MAX; //~ ERROR: overflow
+const _NISIZE_SUB_P: &isize = &(-5isize - isize::MAX); //~ ERROR: overflow
 
+const _NUSIZE_SUB: usize = 1usize - 5; //~ ERROR: overflow
+const _NUSIZE_SUB_P: &usize = &(1usize - 5); //~ ERROR: overflow
 
 // Multiplication
-const _NI8_MUL: i8 = i8::MAX * 5; //~ ERROR: evaluation of constant value failed
-const _NI8_MUL_P: &i8 = &(i8::MAX * 5); //~ ERROR: evaluation of constant value failed
-
-const _NI16_MUL: i16 = i16::MAX * 5; //~ ERROR: evaluation of constant value failed
-const _NI16_MUL_P: &i16 = &(i16::MAX * 5); //~ ERROR: evaluation of constant value failed
+const _NI8_MUL: i8 = i8::MAX * 5; //~ ERROR: overflow
+const _NI8_MUL_P: &i8 = &(i8::MAX * 5); //~ ERROR: overflow
 
-const _NI32_MUL: i32 = i32::MAX * 5; //~ ERROR: evaluation of constant value failed
-const _NI32_MUL_P: &i32 = &(i32::MAX * 5); //~ ERROR: evaluation of constant value failed
+const _NI16_MUL: i16 = i16::MAX * 5; //~ ERROR: overflow
+const _NI16_MUL_P: &i16 = &(i16::MAX * 5); //~ ERROR: overflow
 
-const _NI64_MUL: i64 = i64::MAX * 5; //~ ERROR: evaluation of constant value failed
-const _NI64_MUL_P: &i64 = &(i64::MAX * 5); //~ ERROR: evaluation of constant value failed
+const _NI32_MUL: i32 = i32::MAX * 5; //~ ERROR: overflow
+const _NI32_MUL_P: &i32 = &(i32::MAX * 5); //~ ERROR: overflow
 
-const _NI128_MUL: i128 = i128::MAX * 5; //~ ERROR: evaluation of constant value failed
-const _NI128_MUL_P: &i128 = &(i128::MAX * 5); //~ ERROR: evaluation of constant value failed
+const _NI64_MUL: i64 = i64::MAX * 5; //~ ERROR: overflow
+const _NI64_MUL_P: &i64 = &(i64::MAX * 5); //~ ERROR: overflow
 
-const _NU8_MUL: u8 = u8::MAX * 5; //~ ERROR: evaluation of constant value failed
-const _NU8_MUL_P: &u8 = &(u8::MAX * 5); //~ ERROR: evaluation of constant value failed
+const _NI128_MUL: i128 = i128::MAX * 5; //~ ERROR: overflow
+const _NI128_MUL_P: &i128 = &(i128::MAX * 5); //~ ERROR: overflow
 
-const _NU16_MUL: u16 = u16::MAX * 5; //~ ERROR: evaluation of constant value failed
-const _NU16_MUL_P: &u16 = &(u16::MAX * 5); //~ ERROR: evaluation of constant value failed
+const _NU8_MUL: u8 = u8::MAX * 5; //~ ERROR: overflow
+const _NU8_MUL_P: &u8 = &(u8::MAX * 5); //~ ERROR: overflow
 
-const _NU32_MUL: u32 = u32::MAX * 5; //~ ERROR: evaluation of constant value failed
-const _NU32_MUL_P: &u32 = &(u32::MAX * 5); //~ ERROR: evaluation of constant value failed
+const _NU16_MUL: u16 = u16::MAX * 5; //~ ERROR: overflow
+const _NU16_MUL_P: &u16 = &(u16::MAX * 5); //~ ERROR: overflow
 
-const _NU64_MUL: u64 = u64::MAX * 5; //~ ERROR: evaluation of constant value failed
-const _NU64_MUL_P: &u64 = &(u64::MAX * 5); //~ ERROR: evaluation of constant value failed
+const _NU32_MUL: u32 = u32::MAX * 5; //~ ERROR: overflow
+const _NU32_MUL_P: &u32 = &(u32::MAX * 5); //~ ERROR: overflow
 
-const _NU128_MUL: u128 = u128::MAX * 5; //~ ERROR: evaluation of constant value failed
-const _NU128_MUL_P: &u128 = &(u128::MAX * 5); //~ ERROR: evaluation of constant value failed
+const _NU64_MUL: u64 = u64::MAX * 5; //~ ERROR: overflow
+const _NU64_MUL_P: &u64 = &(u64::MAX * 5); //~ ERROR: overflow
 
-const _NISIZE_MUL: isize = isize::MAX * 5; //~ ERROR: evaluation of constant value failed
-const _NISIZE_MUL_P: &isize = &(isize::MAX * 5); //~ ERROR: evaluation of constant value failed
+const _NU128_MUL: u128 = u128::MAX * 5; //~ ERROR: overflow
+const _NU128_MUL_P: &u128 = &(u128::MAX * 5); //~ ERROR: overflow
 
-const _NUSIZE_MUL: usize = usize::MAX * 5; //~ ERROR: evaluation of constant value failed
-const _NUSIZE_MUL_P: &usize = &(usize::MAX * 5); //~ ERROR: evaluation of constant value failed
+const _NISIZE_MUL: isize = isize::MAX * 5; //~ ERROR: overflow
+const _NISIZE_MUL_P: &isize = &(isize::MAX * 5); //~ ERROR: overflow
 
+const _NUSIZE_MUL: usize = usize::MAX * 5; //~ ERROR: overflow
+const _NUSIZE_MUL_P: &usize = &(usize::MAX * 5); //~ ERROR: overflow
 
 // Division
-const _NI8_DIV: i8 = 1i8 / 0; //~ ERROR: evaluation of constant value failed
-const _NI8_DIV_P: &i8 = &(1i8 / 0); //~ ERROR: evaluation of constant value failed
+const _NI8_DIV: i8 = 1i8 / 0; //~ ERROR: by zero
+const _NI8_DIV_P: &i8 = &(1i8 / 0); //~ ERROR: by zero
 
-const _NI16_DIV: i16 = 1i16 / 0; //~ ERROR: evaluation of constant value failed
-const _NI16_DIV_P: &i16 = &(1i16 / 0); //~ ERROR: evaluation of constant value failed
+const _NI16_DIV: i16 = 1i16 / 0; //~ ERROR: by zero
+const _NI16_DIV_P: &i16 = &(1i16 / 0); //~ ERROR: by zero
 
-const _NI32_DIV: i32 = 1i32 / 0; //~ ERROR: evaluation of constant value failed
-const _NI32_DIV_P: &i32 = &(1i32 / 0); //~ ERROR: evaluation of constant value failed
+const _NI32_DIV: i32 = 1i32 / 0; //~ ERROR: by zero
+const _NI32_DIV_P: &i32 = &(1i32 / 0); //~ ERROR: by zero
 
-const _NI64_DIV: i64 = 1i64 / 0; //~ ERROR: evaluation of constant value failed
-const _NI64_DIV_P: &i64 = &(1i64 / 0); //~ ERROR: evaluation of constant value failed
+const _NI64_DIV: i64 = 1i64 / 0; //~ ERROR: by zero
+const _NI64_DIV_P: &i64 = &(1i64 / 0); //~ ERROR: by zero
 
-const _NI128_DIV: i128 = 1i128 / 0; //~ ERROR: evaluation of constant value failed
-const _NI128_DIV_P: &i128 = &(1i128 / 0); //~ ERROR: evaluation of constant value failed
+const _NI128_DIV: i128 = 1i128 / 0; //~ ERROR: by zero
+const _NI128_DIV_P: &i128 = &(1i128 / 0); //~ ERROR: by zero
 
-const _NU8_DIV: u8 = 1u8 / 0; //~ ERROR: evaluation of constant value failed
-const _NU8_DIV_P: &u8 = &(1u8 / 0); //~ ERROR: evaluation of constant value failed
+const _NU8_DIV: u8 = 1u8 / 0; //~ ERROR: by zero
+const _NU8_DIV_P: &u8 = &(1u8 / 0); //~ ERROR: by zero
 
-const _NU16_DIV: u16 = 1u16 / 0; //~ ERROR: evaluation of constant value failed
-const _NU16_DIV_P: &u16 = &(1u16 / 0); //~ ERROR: evaluation of constant value failed
+const _NU16_DIV: u16 = 1u16 / 0; //~ ERROR: by zero
+const _NU16_DIV_P: &u16 = &(1u16 / 0); //~ ERROR: by zero
 
-const _NU32_DIV: u32 = 1u32 / 0; //~ ERROR: evaluation of constant value failed
-const _NU32_DIV_P: &u32 = &(1u32 / 0); //~ ERROR: evaluation of constant value failed
+const _NU32_DIV: u32 = 1u32 / 0; //~ ERROR: by zero
+const _NU32_DIV_P: &u32 = &(1u32 / 0); //~ ERROR: by zero
 
-const _NU64_DIV: u64 = 1u64 / 0; //~ ERROR: evaluation of constant value failed
-const _NU64_DIV_P: &u64 = &(1u64 / 0); //~ ERROR: evaluation of constant value failed
+const _NU64_DIV: u64 = 1u64 / 0; //~ ERROR: by zero
+const _NU64_DIV_P: &u64 = &(1u64 / 0); //~ ERROR: by zero
 
-const _NU128_DIV: u128 = 1u128 / 0; //~ ERROR: evaluation of constant value failed
-const _NU128_DIV_P: &u128 = &(1u128 / 0); //~ ERROR: evaluation of constant value failed
+const _NU128_DIV: u128 = 1u128 / 0; //~ ERROR: by zero
+const _NU128_DIV_P: &u128 = &(1u128 / 0); //~ ERROR: by zero
 
-const _NISIZE_DIV: isize = 1isize / 0; //~ ERROR: evaluation of constant value failed
-const _NISIZE_DIV_P: &isize = &(1isize / 0); //~ ERROR: evaluation of constant value failed
+const _NISIZE_DIV: isize = 1isize / 0; //~ ERROR: by zero
+const _NISIZE_DIV_P: &isize = &(1isize / 0); //~ ERROR: by zero
 
-const _NUSIZE_DIV: usize = 1usize / 0; //~ ERROR: evaluation of constant value failed
-const _NUSIZE_DIV_P: &usize = &(1usize / 0); //~ ERROR: evaluation of constant value failed
+const _NUSIZE_DIV: usize = 1usize / 0; //~ ERROR: by zero
+const _NUSIZE_DIV_P: &usize = &(1usize / 0); //~ ERROR: by zero
 
 // Modulus
-const _NI8_MOD: i8 = 1i8 % 0; //~ ERROR: evaluation of constant value failed
-const _NI8_MOD_P: &i8 = &(1i8 % 0); //~ ERROR: evaluation of constant value failed
+const _NI8_MOD: i8 = 1i8 % 0; //~ ERROR: divisor of zero
+const _NI8_MOD_P: &i8 = &(1i8 % 0); //~ ERROR: divisor of zero
 
-const _NI16_MOD: i16 = 1i16 % 0; //~ ERROR: evaluation of constant value failed
-const _NI16_MOD_P: &i16 = &(1i16 % 0); //~ ERROR: evaluation of constant value failed
+const _NI16_MOD: i16 = 1i16 % 0; //~ ERROR: divisor of zero
+const _NI16_MOD_P: &i16 = &(1i16 % 0); //~ ERROR: divisor of zero
 
-const _NI32_MOD: i32 = 1i32 % 0; //~ ERROR: evaluation of constant value failed
-const _NI32_MOD_P: &i32 = &(1i32 % 0); //~ ERROR: evaluation of constant value failed
+const _NI32_MOD: i32 = 1i32 % 0; //~ ERROR: divisor of zero
+const _NI32_MOD_P: &i32 = &(1i32 % 0); //~ ERROR: divisor of zero
 
-const _NI64_MOD: i64 = 1i64 % 0; //~ ERROR: evaluation of constant value failed
-const _NI64_MOD_P: &i64 = &(1i64 % 0); //~ ERROR: evaluation of constant value failed
+const _NI64_MOD: i64 = 1i64 % 0; //~ ERROR: divisor of zero
+const _NI64_MOD_P: &i64 = &(1i64 % 0); //~ ERROR: divisor of zero
 
-const _NI128_MOD: i128 = 1i128 % 0; //~ ERROR: evaluation of constant value failed
-const _NI128_MOD_P: &i128 = &(1i128 % 0); //~ ERROR: evaluation of constant value failed
+const _NI128_MOD: i128 = 1i128 % 0; //~ ERROR: divisor of zero
+const _NI128_MOD_P: &i128 = &(1i128 % 0); //~ ERROR: divisor of zero
 
-const _NU8_MOD: u8 = 1u8 % 0; //~ ERROR: evaluation of constant value failed
-const _NU8_MOD_P: &u8 = &(1u8 % 0); //~ ERROR: evaluation of constant value failed
+const _NU8_MOD: u8 = 1u8 % 0; //~ ERROR: divisor of zero
+const _NU8_MOD_P: &u8 = &(1u8 % 0); //~ ERROR: divisor of zero
 
-const _NU16_MOD: u16 = 1u16 % 0; //~ ERROR: evaluation of constant value failed
-const _NU16_MOD_P: &u16 = &(1u16 % 0); //~ ERROR: evaluation of constant value failed
+const _NU16_MOD: u16 = 1u16 % 0; //~ ERROR: divisor of zero
+const _NU16_MOD_P: &u16 = &(1u16 % 0); //~ ERROR: divisor of zero
 
-const _NU32_MOD: u32 = 1u32 % 0; //~ ERROR: evaluation of constant value failed
-const _NU32_MOD_P: &u32 = &(1u32 % 0); //~ ERROR: evaluation of constant value failed
+const _NU32_MOD: u32 = 1u32 % 0; //~ ERROR: divisor of zero
+const _NU32_MOD_P: &u32 = &(1u32 % 0); //~ ERROR: divisor of zero
 
-const _NU64_MOD: u64 = 1u64 % 0; //~ ERROR: evaluation of constant value failed
-const _NU64_MOD_P: &u64 = &(1u64 % 0); //~ ERROR: evaluation of constant value failed
+const _NU64_MOD: u64 = 1u64 % 0; //~ ERROR: divisor of zero
+const _NU64_MOD_P: &u64 = &(1u64 % 0); //~ ERROR: divisor of zero
 
-const _NU128_MOD: u128 = 1u128 % 0; //~ ERROR: evaluation of constant value failed
-const _NU128_MOD_P: &u128 = &(1u128 % 0); //~ ERROR: evaluation of constant value failed
+const _NU128_MOD: u128 = 1u128 % 0; //~ ERROR: divisor of zero
+const _NU128_MOD_P: &u128 = &(1u128 % 0); //~ ERROR: divisor of zero
 
-const _NISIZE_MOD: isize = 1isize % 0; //~ ERROR: evaluation of constant value failed
-const _NISIZE_MOD_P: &isize = &(1isize % 0); //~ ERROR: evaluation of constant value failed
-
-const _NUSIZE_MOD: usize = 1usize % 0; //~ ERROR: evaluation of constant value failed
-const _NUSIZE_MOD_P: &usize = &(1usize % 0); //~ ERROR: evaluation of constant value failed
+const _NISIZE_MOD: isize = 1isize % 0; //~ ERROR: divisor of zero
+const _NISIZE_MOD_P: &isize = &(1isize % 0); //~ ERROR: divisor of zero
 
+const _NUSIZE_MOD: usize = 1usize % 0; //~ ERROR: divisor of zero
+const _NUSIZE_MOD_P: &usize = &(1usize % 0); //~ ERROR: divisor of zero
 
 // Out of bounds access
-const _NI32_OOB: i32 = [1, 2, 3][4]; //~ ERROR: evaluation of constant value failed
-const _NI32_OOB_P: &i32 = &([1, 2, 3][4]); //~ ERROR: evaluation of constant value failed
-
+const _NI32_OOB: i32 = [1, 2, 3][4]; //~ ERROR: the length is 3 but the index is 4
+const _NI32_OOB_P: &i32 = &([1, 2, 3][4]); //~ ERROR: the length is 3 but the index is 4
 
 pub fn main() {}
diff --git a/tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs b/tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs
index e458a6f98ad..d7977bfba77 100644
--- a/tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs
+++ b/tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs
@@ -11,7 +11,6 @@
 
 pub struct Data([u8; (1 << 47) - 1]);
 const _: &'static Data = &Data([0; (1 << 47) - 1]);
-//~^ERROR: evaluation of constant value failed
-//~| NOTE tried to allocate more memory than available to compiler
+//~^ ERROR: tried to allocate more memory than available to compiler
 
 fn main() {}
diff --git a/tests/ui/consts/promoted_running_out_of_memory_issue-130687.stderr b/tests/ui/consts/promoted_running_out_of_memory_issue-130687.stderr
index 02180c1e4c6..6c09a1faed2 100644
--- a/tests/ui/consts/promoted_running_out_of_memory_issue-130687.stderr
+++ b/tests/ui/consts/promoted_running_out_of_memory_issue-130687.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: tried to allocate more memory than available to compiler
   --> $DIR/promoted_running_out_of_memory_issue-130687.rs:13:32
    |
 LL | const _: &'static Data = &Data([0; (1 << 47) - 1]);
-   |                                ^^^^^^^^^^^^^^^^^^ tried to allocate more memory than available to compiler
+   |                                ^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/promoted_size_overflow.rs b/tests/ui/consts/promoted_size_overflow.rs
index ebd5ab06487..232fb76c75b 100644
--- a/tests/ui/consts/promoted_size_overflow.rs
+++ b/tests/ui/consts/promoted_size_overflow.rs
@@ -1,7 +1,6 @@
 //@ only-64bit
 pub struct Data([u8; usize::MAX >> 2]);
 const _: &'static [Data] = &[];
-//~^ERROR: evaluation of constant value failed
-//~| NOTE too big for the target architecture
+//~^ ERROR: too big for the target architecture
 
 fn main() {}
diff --git a/tests/ui/consts/promoted_size_overflow.stderr b/tests/ui/consts/promoted_size_overflow.stderr
index cfb8260bed0..226c78ec01b 100644
--- a/tests/ui/consts/promoted_size_overflow.stderr
+++ b/tests/ui/consts/promoted_size_overflow.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: values of the type `[u8; 4611686018427387903]` are too big for the target architecture
   --> $DIR/promoted_size_overflow.rs:3:29
    |
 LL | const _: &'static [Data] = &[];
-   |                             ^^ values of the type `[u8; 4611686018427387903]` are too big for the target architecture
+   |                             ^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/qualif-indirect-mutation-fail.rs b/tests/ui/consts/qualif-indirect-mutation-fail.rs
index 4abb231c29f..b70fca7b864 100644
--- a/tests/ui/consts/qualif-indirect-mutation-fail.rs
+++ b/tests/ui/consts/qualif-indirect-mutation-fail.rs
@@ -15,7 +15,7 @@ pub const A1: () = {
     let b = &mut y;
     std::mem::swap(a, b);
     std::mem::forget(y);
-}; //~ ERROR evaluation of constant value failed
+}; //~ ERROR calling non-const function `<Vec<u8> as Drop>::drop`
 
 // Mutable borrow of a type with drop impl.
 pub const A2: () = {
@@ -26,7 +26,7 @@ pub const A2: () = {
     std::mem::swap(a, b);
     std::mem::forget(y);
     let _z = x; //~ ERROR destructor of
-}; //~ ERROR evaluation of constant value failed
+}; //~ ERROR calling non-const function `<Vec<u8> as Drop>::drop`
 
 // Shared borrow of a type that might be !Freeze and Drop.
 pub const fn g1<T>() {
diff --git a/tests/ui/consts/qualif-indirect-mutation-fail.stderr b/tests/ui/consts/qualif-indirect-mutation-fail.stderr
index dd575e07c20..6cd7741103f 100644
--- a/tests/ui/consts/qualif-indirect-mutation-fail.stderr
+++ b/tests/ui/consts/qualif-indirect-mutation-fail.stderr
@@ -7,11 +7,11 @@ LL |     let mut x = None;
 LL | };
    | - value is dropped here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: calling non-const function `<Vec<u8> as Drop>::drop`
   --> $DIR/qualif-indirect-mutation-fail.rs:18:1
    |
 LL | };
-   | ^ calling non-const function `<Vec<u8> as Drop>::drop`
+   | ^ evaluation of constant value failed here
    |
 note: inside `drop_in_place::<Option<String>> - shim(Some(Option<String>))`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
@@ -28,11 +28,11 @@ LL |     let _z = x;
 LL | };
    | - value is dropped here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: calling non-const function `<Vec<u8> as Drop>::drop`
   --> $DIR/qualif-indirect-mutation-fail.rs:29:1
    |
 LL | };
-   | ^ calling non-const function `<Vec<u8> as Drop>::drop`
+   | ^ evaluation of constant value failed here
    |
 note: inside `drop_in_place::<Option<String>> - shim(Some(Option<String>))`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
diff --git a/tests/ui/consts/recursive-zst-static.default.stderr b/tests/ui/consts/recursive-zst-static.default.stderr
index dedca16db8d..80661825d53 100644
--- a/tests/ui/consts/recursive-zst-static.default.stderr
+++ b/tests/ui/consts/recursive-zst-static.default.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: encountered static that tried to initialize itself with itself
   --> $DIR/recursive-zst-static.rs:10:18
    |
 LL | static FOO: () = FOO;
-   |                  ^^^ encountered static that tried to initialize itself with itself
+   |                  ^^^ evaluation of static initializer failed here
 
 error[E0391]: cycle detected when evaluating initializer of static `A`
   --> $DIR/recursive-zst-static.rs:13:16
diff --git a/tests/ui/consts/recursive-zst-static.rs b/tests/ui/consts/recursive-zst-static.rs
index a52624fada8..852caae9493 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 could not evaluate static initializer
+//~^ ERROR encountered static that tried to initialize itself with itself
 
 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 dedca16db8d..80661825d53 100644
--- a/tests/ui/consts/recursive-zst-static.unleash.stderr
+++ b/tests/ui/consts/recursive-zst-static.unleash.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: encountered static that tried to initialize itself with itself
   --> $DIR/recursive-zst-static.rs:10:18
    |
 LL | static FOO: () = FOO;
-   |                  ^^^ encountered static that tried to initialize itself with itself
+   |                  ^^^ evaluation of static initializer failed here
 
 error[E0391]: cycle detected when evaluating initializer of static `A`
   --> $DIR/recursive-zst-static.rs:13:16
diff --git a/tests/ui/consts/recursive.rs b/tests/ui/consts/recursive.rs
index b5703d11310..ed23baf0768 100644
--- a/tests/ui/consts/recursive.rs
+++ b/tests/ui/consts/recursive.rs
@@ -4,6 +4,6 @@ const fn f<T>(x: T) { //~ WARN function cannot return without recursing
     f(x);
 }
 
-const X: () = f(1); //~ ERROR evaluation of constant value failed
+const X: () = f(1); //~ ERROR reached the configured maximum number of stack frames
 
 fn main() {}
diff --git a/tests/ui/consts/recursive.stderr b/tests/ui/consts/recursive.stderr
index fd38b078b94..97fa9e7e75e 100644
--- a/tests/ui/consts/recursive.stderr
+++ b/tests/ui/consts/recursive.stderr
@@ -9,11 +9,11 @@ LL |     f(x);
    = help: a `loop` may express intention better if this is on purpose
    = note: `#[warn(unconditional_recursion)]` on by default
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: reached the configured maximum number of stack frames
   --> $DIR/recursive.rs:7:15
    |
 LL | const X: () = f(1);
-   |               ^^^^ reached the configured maximum number of stack frames
+   |               ^^^^ evaluation of constant value failed here
    |
 note: [... 126 additional calls inside `f::<i32>` ...]
   --> $DIR/recursive.rs:4:5
diff --git a/tests/ui/consts/required-consts/collect-in-called-fn.noopt.stderr b/tests/ui/consts/required-consts/collect-in-called-fn.noopt.stderr
index 6812b3734ef..7d7bbbc5e36 100644
--- a/tests/ui/consts/required-consts/collect-in-called-fn.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-called-fn.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-called-fn.rs:10:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-called-fn.rs:19:17
diff --git a/tests/ui/consts/required-consts/collect-in-called-fn.opt.stderr b/tests/ui/consts/required-consts/collect-in-called-fn.opt.stderr
index 6812b3734ef..7d7bbbc5e36 100644
--- a/tests/ui/consts/required-consts/collect-in-called-fn.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-called-fn.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-called-fn.rs:10:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-called-fn.rs:19:17
diff --git a/tests/ui/consts/required-consts/collect-in-called-fn.rs b/tests/ui/consts/required-consts/collect-in-called-fn.rs
index 93947950af2..2045b8266c7 100644
--- a/tests/ui/consts/required-consts/collect-in-called-fn.rs
+++ b/tests/ui/consts/required-consts/collect-in-called-fn.rs
@@ -7,7 +7,7 @@
 
 struct Fail<T>(T);
 impl<T> Fail<T> {
-    const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
+    const C: () = panic!(); //~ERROR evaluation panicked: explicit panic
 }
 
 #[inline(never)]
diff --git a/tests/ui/consts/required-consts/collect-in-dead-closure.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-closure.noopt.stderr
index 661aea71604..239e9cb1472 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-closure.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-closure.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-closure.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-closure.rs:17:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-closure.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-closure.opt.stderr
index 661aea71604..239e9cb1472 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-closure.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-closure.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-closure.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-closure.rs:17:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-closure.rs b/tests/ui/consts/required-consts/collect-in-dead-closure.rs
index a00214c62db..5f8b6bbb174 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-closure.rs
+++ b/tests/ui/consts/required-consts/collect-in-dead-closure.rs
@@ -6,7 +6,7 @@
 
 struct Fail<T>(T);
 impl<T> Fail<T> {
-    const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
+    const C: () = panic!(); //~ERROR evaluation panicked: explicit panic
 }
 
 // This function is not actually called, but it is mentioned in a closure that is coerced to a
diff --git a/tests/ui/consts/required-consts/collect-in-dead-drop.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-drop.noopt.stderr
index 31e6b2f487f..7c6219ccf93 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-drop.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-drop.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-drop.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-drop.rs:16:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-drop.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-drop.opt.stderr
index 31e6b2f487f..7c6219ccf93 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-drop.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-drop.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-drop.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-drop.rs:16:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-drop.rs b/tests/ui/consts/required-consts/collect-in-dead-drop.rs
index 389fcf5dfc9..f7293d162df 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-drop.rs
+++ b/tests/ui/consts/required-consts/collect-in-dead-drop.rs
@@ -6,7 +6,7 @@
 
 struct Fail<T>(T);
 impl<T> Fail<T> {
-    const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
+    const C: () = panic!(); //~ERROR evaluation panicked: explicit panic
 }
 
 // This function is not actually called, but is mentioned implicitly as destructor in dead code in a
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.noopt.stderr
index 32dc1cb304b..e1a82fd5231 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-fn-behind-assoc-type.rs:10:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-fn-behind-assoc-type.rs:16:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.opt.stderr
index 32dc1cb304b..e1a82fd5231 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-fn-behind-assoc-type.rs:10:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-fn-behind-assoc-type.rs:16:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.rs b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.rs
index 9c36af50bb7..e6be9f56cb7 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.rs
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-assoc-type.rs
@@ -7,7 +7,7 @@
 
 struct Fail<T>(T);
 impl<T> Fail<T> {
-    const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
+    const C: () = panic!(); //~ERROR evaluation panicked: explicit panic
 }
 
 #[inline(never)]
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.noopt.stderr
index d22cf579448..1d2af342a44 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-fn-behind-generic.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-fn-behind-generic.rs:15:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.opt.stderr
index d22cf579448..1d2af342a44 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-fn-behind-generic.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-fn-behind-generic.rs:15:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.rs b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.rs
index 5829d914ee1..a86902af526 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.rs
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-generic.rs
@@ -6,7 +6,7 @@
 
 struct Fail<T>(T);
 impl<T> Fail<T> {
-    const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
+    const C: () = panic!(); //~ERROR evaluation panicked: explicit panic
 }
 
 #[inline(never)]
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.noopt.stderr
index 91daa2f9bc3..a480a8c5a39 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `m::Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-fn-behind-opaque-type.rs:11:23
    |
 LL |         const C: () = panic!();
-   |                       ^^^^^^^^ evaluation panicked: explicit panic
+   |                       ^^^^^^^^ evaluation of `m::Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-fn-behind-opaque-type.rs:19:21
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.opt.stderr
index 91daa2f9bc3..a480a8c5a39 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `m::Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-fn-behind-opaque-type.rs:11:23
    |
 LL |         const C: () = panic!();
-   |                       ^^^^^^^^ evaluation panicked: explicit panic
+   |                       ^^^^^^^^ evaluation of `m::Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-fn-behind-opaque-type.rs:19:21
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.rs b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.rs
index f333f3462c7..4cdb2741354 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.rs
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn-behind-opaque-type.rs
@@ -8,7 +8,7 @@
 mod m {
     struct Fail<T>(T);
     impl<T> Fail<T> {
-        const C: () = panic!(); //~ERROR evaluation of `m::Fail::<i32>::C` failed
+        const C: () = panic!(); //~ERROR: evaluation panicked: explicit panic
     }
 
     pub type NotCalledFn = impl Fn();
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fn.noopt.stderr
index d254fc60c0c..f253a7cbbee 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-fn.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-fn.rs:19:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fn.opt.stderr
index d254fc60c0c..f253a7cbbee 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-fn.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-fn.rs:19:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fn.rs b/tests/ui/consts/required-consts/collect-in-dead-fn.rs
index 1c95e0c303f..0c479580106 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fn.rs
+++ b/tests/ui/consts/required-consts/collect-in-dead-fn.rs
@@ -6,7 +6,7 @@
 
 struct Fail<T>(T);
 impl<T> Fail<T> {
-    const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
+    const C: () = panic!(); //~ERROR evaluation panicked: explicit panic
 }
 
 // This function is not actually called, but it is mentioned in dead code in a function that is
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.noopt.stderr
index c14837ce442..b962630ca01 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Late::<i32>::FAIL` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-fnptr-in-const.rs:9:22
    |
 LL |     const FAIL: () = panic!();
-   |                      ^^^^^^^^ evaluation panicked: explicit panic
+   |                      ^^^^^^^^ evaluation of `Late::<i32>::FAIL` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-fnptr-in-const.rs:10:28
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.opt.stderr
index c14837ce442..b962630ca01 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Late::<i32>::FAIL` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-fnptr-in-const.rs:9:22
    |
 LL |     const FAIL: () = panic!();
-   |                      ^^^^^^^^ evaluation panicked: explicit panic
+   |                      ^^^^^^^^ evaluation of `Late::<i32>::FAIL` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-fnptr-in-const.rs:10:28
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.rs b/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.rs
index 8b6344c93f3..04544cb4139 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.rs
+++ b/tests/ui/consts/required-consts/collect-in-dead-fnptr-in-const.rs
@@ -6,7 +6,7 @@
 
 struct Late<T>(T);
 impl<T> Late<T> {
-    const FAIL: () = panic!(); //~ERROR evaluation of `Late::<i32>::FAIL` failed
+    const FAIL: () = panic!(); //~ERROR evaluation panicked: explicit panic
     const FNPTR: fn() = || Self::FAIL;
 }
 
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fnptr.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fnptr.noopt.stderr
index 284e1a70a20..29e6711153c 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fnptr.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fnptr.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-fnptr.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-fnptr.rs:18:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fnptr.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-fnptr.opt.stderr
index 284e1a70a20..29e6711153c 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fnptr.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-fnptr.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-fnptr.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-fnptr.rs:18:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-fnptr.rs b/tests/ui/consts/required-consts/collect-in-dead-fnptr.rs
index acbe34829e8..4cdb50f4385 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-fnptr.rs
+++ b/tests/ui/consts/required-consts/collect-in-dead-fnptr.rs
@@ -6,7 +6,7 @@
 
 struct Fail<T>(T);
 impl<T> Fail<T> {
-    const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
+    const C: () = panic!(); //~ERROR evaluation panicked: explicit panic
 }
 
 // This function is not actually called, but it is mentioned in dead code in a function that is
diff --git a/tests/ui/consts/required-consts/collect-in-dead-move.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-move.noopt.stderr
index 8b43c67c085..6c8edc00260 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-move.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-move.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-move.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-move.rs:16:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-move.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-move.opt.stderr
index 8b43c67c085..6c8edc00260 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-move.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-move.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-move.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-move.rs:16:17
diff --git a/tests/ui/consts/required-consts/collect-in-dead-move.rs b/tests/ui/consts/required-consts/collect-in-dead-move.rs
index 6a224a375cf..4e2d959db32 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-move.rs
+++ b/tests/ui/consts/required-consts/collect-in-dead-move.rs
@@ -6,7 +6,7 @@
 
 struct Fail<T>(T);
 impl<T> Fail<T> {
-    const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
+    const C: () = panic!(); //~ERROR evaluation panicked: explicit panic
 }
 
 // This function is not actually called, but is mentioned implicitly as destructor in dead code in a
diff --git a/tests/ui/consts/required-consts/collect-in-dead-vtable.noopt.stderr b/tests/ui/consts/required-consts/collect-in-dead-vtable.noopt.stderr
index 4056f28541d..4e35beadbf4 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-vtable.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-vtable.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-vtable.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-vtable.rs:22:21
diff --git a/tests/ui/consts/required-consts/collect-in-dead-vtable.opt.stderr b/tests/ui/consts/required-consts/collect-in-dead-vtable.opt.stderr
index 4056f28541d..4e35beadbf4 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-vtable.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-dead-vtable.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-dead-vtable.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-dead-vtable.rs:22:21
diff --git a/tests/ui/consts/required-consts/collect-in-dead-vtable.rs b/tests/ui/consts/required-consts/collect-in-dead-vtable.rs
index f63207eafec..d4ad7308377 100644
--- a/tests/ui/consts/required-consts/collect-in-dead-vtable.rs
+++ b/tests/ui/consts/required-consts/collect-in-dead-vtable.rs
@@ -6,7 +6,7 @@
 
 struct Fail<T>(T);
 impl<T> Fail<T> {
-    const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
+    const C: () = panic!(); //~ERROR evaluation panicked: explicit panic
 }
 
 trait MyTrait {
diff --git a/tests/ui/consts/required-consts/collect-in-promoted-const.noopt.stderr b/tests/ui/consts/required-consts/collect-in-promoted-const.noopt.stderr
index c5f3b0009f5..67f5009c4ff 100644
--- a/tests/ui/consts/required-consts/collect-in-promoted-const.noopt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-promoted-const.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-promoted-const.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-promoted-const.rs:20:21
diff --git a/tests/ui/consts/required-consts/collect-in-promoted-const.opt.stderr b/tests/ui/consts/required-consts/collect-in-promoted-const.opt.stderr
index 6f36aaf314d..5c3edf68d95 100644
--- a/tests/ui/consts/required-consts/collect-in-promoted-const.opt.stderr
+++ b/tests/ui/consts/required-consts/collect-in-promoted-const.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<T>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-promoted-const.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<T>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-promoted-const.rs:20:21
@@ -10,11 +10,11 @@ note: erroneous constant encountered
 LL |         let _val = &Fail::<T>::C;
    |                     ^^^^^^^^^^^^
 
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/collect-in-promoted-const.rs:9:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/collect-in-promoted-const.rs:20:21
diff --git a/tests/ui/consts/required-consts/collect-in-promoted-const.rs b/tests/ui/consts/required-consts/collect-in-promoted-const.rs
index 4a3ce92e8f9..25c8cb7e804 100644
--- a/tests/ui/consts/required-consts/collect-in-promoted-const.rs
+++ b/tests/ui/consts/required-consts/collect-in-promoted-const.rs
@@ -6,8 +6,8 @@
 
 struct Fail<T>(T);
 impl<T> Fail<T> {
-    const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
-    //[opt]~^ ERROR evaluation of `Fail::<T>::C` failed
+    const C: () = panic!(); //~ERROR evaluation panicked: explicit panic
+    //[opt]~^ ERROR evaluation panicked: explicit panic
     // (Not sure why optimizations lead to this being emitted twice, but as long as compilation
     // fails either way it's fine.)
 }
diff --git a/tests/ui/consts/required-consts/interpret-in-const-called-fn.noopt.stderr b/tests/ui/consts/required-consts/interpret-in-const-called-fn.noopt.stderr
index f98e2c17202..c9fd476bd8b 100644
--- a/tests/ui/consts/required-consts/interpret-in-const-called-fn.noopt.stderr
+++ b/tests/ui/consts/required-consts/interpret-in-const-called-fn.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/interpret-in-const-called-fn.rs:8:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/interpret-in-const-called-fn.rs:18:9
diff --git a/tests/ui/consts/required-consts/interpret-in-const-called-fn.opt.stderr b/tests/ui/consts/required-consts/interpret-in-const-called-fn.opt.stderr
index f98e2c17202..c9fd476bd8b 100644
--- a/tests/ui/consts/required-consts/interpret-in-const-called-fn.opt.stderr
+++ b/tests/ui/consts/required-consts/interpret-in-const-called-fn.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/interpret-in-const-called-fn.rs:8:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/interpret-in-const-called-fn.rs:18:9
diff --git a/tests/ui/consts/required-consts/interpret-in-const-called-fn.rs b/tests/ui/consts/required-consts/interpret-in-const-called-fn.rs
index 1ed6853f0a4..9309457e22a 100644
--- a/tests/ui/consts/required-consts/interpret-in-const-called-fn.rs
+++ b/tests/ui/consts/required-consts/interpret-in-const-called-fn.rs
@@ -5,7 +5,7 @@
 
 struct Fail<T>(T);
 impl<T> Fail<T> {
-    const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
+    const C: () = panic!(); //~ERROR explicit panic
                             //~| NOTE in this expansion of panic!
 }
 
diff --git a/tests/ui/consts/required-consts/interpret-in-promoted.noopt.stderr b/tests/ui/consts/required-consts/interpret-in-promoted.noopt.stderr
index f70e262ac4c..b14c9aff7ba 100644
--- a/tests/ui/consts/required-consts/interpret-in-promoted.noopt.stderr
+++ b/tests/ui/consts/required-consts/interpret-in-promoted.noopt.stderr
@@ -1,16 +1,14 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: entering unreachable code
   --> $DIR/interpret-in-promoted.rs:15:28
    |
 LL |     let _x: &'static () = &ub();
-   |                            ^^^^ entering unreachable code
+   |                            ^^^^ evaluation of constant value failed here
    |
 note: inside `ub`
   --> $DIR/interpret-in-promoted.rs:9:5
    |
 LL |     std::hint::unreachable_unchecked();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: inside `unreachable_unchecked`
-  --> $SRC_DIR/core/src/hint.rs:LL:COL
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the failure occurred here
 
 note: erroneous constant encountered
   --> $DIR/interpret-in-promoted.rs:15:27
diff --git a/tests/ui/consts/required-consts/interpret-in-promoted.opt.stderr b/tests/ui/consts/required-consts/interpret-in-promoted.opt.stderr
index f70e262ac4c..b14c9aff7ba 100644
--- a/tests/ui/consts/required-consts/interpret-in-promoted.opt.stderr
+++ b/tests/ui/consts/required-consts/interpret-in-promoted.opt.stderr
@@ -1,16 +1,14 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: entering unreachable code
   --> $DIR/interpret-in-promoted.rs:15:28
    |
 LL |     let _x: &'static () = &ub();
-   |                            ^^^^ entering unreachable code
+   |                            ^^^^ evaluation of constant value failed here
    |
 note: inside `ub`
   --> $DIR/interpret-in-promoted.rs:9:5
    |
 LL |     std::hint::unreachable_unchecked();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: inside `unreachable_unchecked`
-  --> $SRC_DIR/core/src/hint.rs:LL:COL
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the failure occurred here
 
 note: erroneous constant encountered
   --> $DIR/interpret-in-promoted.rs:15:27
diff --git a/tests/ui/consts/required-consts/interpret-in-promoted.rs b/tests/ui/consts/required-consts/interpret-in-promoted.rs
index 85d2ea3418c..b223e6d16aa 100644
--- a/tests/ui/consts/required-consts/interpret-in-promoted.rs
+++ b/tests/ui/consts/required-consts/interpret-in-promoted.rs
@@ -12,7 +12,7 @@ const unsafe fn ub() {
 pub const FOO: () = unsafe {
     // Make sure that this gets promoted and then fails to evaluate, and we deal with that
     // correctly.
-    let _x: &'static () = &ub(); //~ ERROR evaluation of constant value failed
+    let _x: &'static () = &ub(); //~ ERROR unreachable code
 };
 
 fn main() {}
diff --git a/tests/ui/consts/required-consts/interpret-in-static.noopt.stderr b/tests/ui/consts/required-consts/interpret-in-static.noopt.stderr
index 28daf265af4..8b8d375250d 100644
--- a/tests/ui/consts/required-consts/interpret-in-static.noopt.stderr
+++ b/tests/ui/consts/required-consts/interpret-in-static.noopt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/interpret-in-static.rs:8:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/interpret-in-static.rs:17:9
diff --git a/tests/ui/consts/required-consts/interpret-in-static.opt.stderr b/tests/ui/consts/required-consts/interpret-in-static.opt.stderr
index 28daf265af4..8b8d375250d 100644
--- a/tests/ui/consts/required-consts/interpret-in-static.opt.stderr
+++ b/tests/ui/consts/required-consts/interpret-in-static.opt.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Fail::<i32>::C` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/interpret-in-static.rs:8:19
    |
 LL |     const C: () = panic!();
-   |                   ^^^^^^^^ evaluation panicked: explicit panic
+   |                   ^^^^^^^^ evaluation of `Fail::<i32>::C` failed here
 
 note: erroneous constant encountered
   --> $DIR/interpret-in-static.rs:17:9
diff --git a/tests/ui/consts/required-consts/interpret-in-static.rs b/tests/ui/consts/required-consts/interpret-in-static.rs
index 7ddf15f9121..19ad6be1c9f 100644
--- a/tests/ui/consts/required-consts/interpret-in-static.rs
+++ b/tests/ui/consts/required-consts/interpret-in-static.rs
@@ -5,7 +5,7 @@
 
 struct Fail<T>(T);
 impl<T> Fail<T> {
-    const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
+    const C: () = panic!(); //~ERROR explicit panic
                             //~| NOTE in this expansion of panic!
 }
 
diff --git a/tests/ui/consts/slice-index-overflow-issue-130284.rs b/tests/ui/consts/slice-index-overflow-issue-130284.rs
index 6877ebe1476..f5235b0e1f1 100644
--- a/tests/ui/consts/slice-index-overflow-issue-130284.rs
+++ b/tests/ui/consts/slice-index-overflow-issue-130284.rs
@@ -5,8 +5,7 @@ const C: () = {
     unsafe {
         // This used to ICE, but it should just report UB.
         let _ice = (*fat)[usize::MAX - 1];
-        //~^ERROR: constant value failed
-        //~| NOTE overflow
+        //~^ERROR: overflow
     }
 };
 
diff --git a/tests/ui/consts/slice-index-overflow-issue-130284.stderr b/tests/ui/consts/slice-index-overflow-issue-130284.stderr
index e3e676c8949..641aed349dd 100644
--- a/tests/ui/consts/slice-index-overflow-issue-130284.stderr
+++ b/tests/ui/consts/slice-index-overflow-issue-130284.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: overflowing pointer arithmetic: the total offset in bytes does not fit in an `isize`
   --> $DIR/slice-index-overflow-issue-130284.rs:7:20
    |
 LL |         let _ice = (*fat)[usize::MAX - 1];
-   |                    ^^^^^^^^^^^^^^^^^^^^^^ overflowing pointer arithmetic: the total offset in bytes does not fit in an `isize`
+   |                    ^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/static_mut_containing_mut_ref2.rs b/tests/ui/consts/static_mut_containing_mut_ref2.rs
index 2b1fe55df78..e9910816fc1 100644
--- a/tests/ui/consts/static_mut_containing_mut_ref2.rs
+++ b/tests/ui/consts/static_mut_containing_mut_ref2.rs
@@ -4,7 +4,7 @@ static mut STDERR_BUFFER_SPACE: u8 = 0;
 
 pub static mut STDERR_BUFFER: () = unsafe {
     *(&mut STDERR_BUFFER_SPACE) = 42;
-    //~^ ERROR could not evaluate static initializer
+    //~^ ERROR modifying a static's initial value
 };
 
 fn main() {}
diff --git a/tests/ui/consts/static_mut_containing_mut_ref2.stderr b/tests/ui/consts/static_mut_containing_mut_ref2.stderr
index 37cd2b51ad1..49b35dacd3a 100644
--- a/tests/ui/consts/static_mut_containing_mut_ref2.stderr
+++ b/tests/ui/consts/static_mut_containing_mut_ref2.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: modifying a static's initial value from another static's initializer
   --> $DIR/static_mut_containing_mut_ref2.rs:6:5
    |
 LL |     *(&mut STDERR_BUFFER_SPACE) = 42;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ modifying a static's initial value from another static's initializer
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/static_mut_containing_mut_ref3.rs b/tests/ui/consts/static_mut_containing_mut_ref3.rs
index c24c7e27920..42a4d04cde6 100644
--- a/tests/ui/consts/static_mut_containing_mut_ref3.rs
+++ b/tests/ui/consts/static_mut_containing_mut_ref3.rs
@@ -1,6 +1,6 @@
 static mut FOO: (u8, u8) = (42, 43);
 
 static mut BAR: () = unsafe { FOO.0 = 99; };
-//~^ ERROR could not evaluate static initializer
+//~^ ERROR modifying a static's initial value
 
 fn main() {}
diff --git a/tests/ui/consts/static_mut_containing_mut_ref3.stderr b/tests/ui/consts/static_mut_containing_mut_ref3.stderr
index be84608acf7..71d701434a3 100644
--- a/tests/ui/consts/static_mut_containing_mut_ref3.stderr
+++ b/tests/ui/consts/static_mut_containing_mut_ref3.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: modifying a static's initial value from another static's initializer
   --> $DIR/static_mut_containing_mut_ref3.rs:3:31
    |
 LL | static mut BAR: () = unsafe { FOO.0 = 99; };
-   |                               ^^^^^^^^^^ modifying a static's initial value from another static's initializer
+   |                               ^^^^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/uninhabited-const-issue-61744.rs b/tests/ui/consts/uninhabited-const-issue-61744.rs
index 802d422888b..d33f9c268a5 100644
--- a/tests/ui/consts/uninhabited-const-issue-61744.rs
+++ b/tests/ui/consts/uninhabited-const-issue-61744.rs
@@ -10,7 +10,7 @@ pub const unsafe fn hint_unreachable() -> ! {
 }
 
 trait Const {
-    const CONSTANT: i32 = unsafe { fake_type() }; //~ ERROR evaluation of `fake_type::<!>` failed
+    const CONSTANT: i32 = unsafe { fake_type() }; //~ ERROR reached the configured maximum number of stack frames
 }
 
 impl<T> Const for T {}
diff --git a/tests/ui/consts/uninhabited-const-issue-61744.stderr b/tests/ui/consts/uninhabited-const-issue-61744.stderr
index d0e90f9a423..3c5b5196aeb 100644
--- a/tests/ui/consts/uninhabited-const-issue-61744.stderr
+++ b/tests/ui/consts/uninhabited-const-issue-61744.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `fake_type::<!>` failed
+error[E0080]: reached the configured maximum number of stack frames
   --> $DIR/uninhabited-const-issue-61744.rs:13:36
    |
 LL |     const CONSTANT: i32 = unsafe { fake_type() };
-   |                                    ^^^^^^^^^^^ reached the configured maximum number of stack frames
+   |                                    ^^^^^^^^^^^ evaluation of `fake_type::<!>` failed here
    |
 note: inside `fake_type::<i32>`
   --> $DIR/uninhabited-const-issue-61744.rs:5:5
diff --git a/tests/ui/consts/validate_never_arrays.rs b/tests/ui/consts/validate_never_arrays.rs
index 055bb1c69c8..b0ea064188b 100644
--- a/tests/ui/consts/validate_never_arrays.rs
+++ b/tests/ui/consts/validate_never_arrays.rs
@@ -3,10 +3,10 @@
 //@ normalize-stderr: "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
 #![feature(never_type)]
 
-const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior
+const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR invalid value
 const _: &[!; 0] = unsafe { &*(1_usize as *const [!; 0]) }; // ok
 const _: &[!] = unsafe { &*(1_usize as *const [!; 0]) }; // ok
-const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior
-const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) }; //~ ERROR undefined behavior
+const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR invalid value
+const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) }; //~ ERROR invalid value
 
 fn main() {}
diff --git a/tests/ui/consts/validate_never_arrays.stderr b/tests/ui/consts/validate_never_arrays.stderr
index 12090e483a4..0f503df4060 100644
--- a/tests/ui/consts/validate_never_arrays.stderr
+++ b/tests/ui/consts/validate_never_arrays.stderr
@@ -1,30 +1,30 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered a reference pointing to uninhabited type [!; 1]
   --> $DIR/validate_never_arrays.rs:6:1
    |
 LL | const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) };
-   | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type [!; 1]
+   | ^^^^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
   --> $DIR/validate_never_arrays.rs:9:1
    |
 LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) };
-   | ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+   | ^^^^^^^^^^^^^ 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]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
   --> $DIR/validate_never_arrays.rs:10:1
    |
 LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) };
-   | ^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a value of the never type `!`
+   | ^^^^^^^^^^^^^ 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) {
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 a2985d05a79..ce15d9e912b 100644
--- a/tests/ui/consts/write-to-static-mut-in-static.rs
+++ b/tests/ui/consts/write-to-static-mut-in-static.rs
@@ -1,10 +1,10 @@
 pub static mut A: u32 = 0;
 pub static mut B: () = unsafe { A = 1; };
-//~^ ERROR could not evaluate static initializer
+//~^ ERROR modifying a static's initial value
 
 pub static mut C: u32 = unsafe { C = 1; 0 };
 
 pub static D: u32 = D;
-//~^ ERROR could not evaluate static initializer
+//~^ ERROR static that tried to initialize itself with itself
 
 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 9616f8eeeb7..c98c7d895fc 100644
--- a/tests/ui/consts/write-to-static-mut-in-static.stderr
+++ b/tests/ui/consts/write-to-static-mut-in-static.stderr
@@ -1,14 +1,14 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: modifying a static's initial value from another static's initializer
   --> $DIR/write-to-static-mut-in-static.rs:2:33
    |
 LL | pub static mut B: () = unsafe { A = 1; };
-   |                                 ^^^^^ modifying a static's initial value from another static's initializer
+   |                                 ^^^^^ evaluation of static initializer failed here
 
-error[E0080]: could not evaluate static initializer
+error[E0080]: encountered static that tried to initialize itself with itself
   --> $DIR/write-to-static-mut-in-static.rs:7:21
    |
 LL | pub static D: u32 = D;
-   |                     ^ encountered static that tried to initialize itself with itself
+   |                     ^ evaluation of static initializer failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/coroutine/auxiliary/xcrate.rs b/tests/ui/coroutine/auxiliary/xcrate.rs
index 52f188135bd..524eaafc752 100644
--- a/tests/ui/coroutine/auxiliary/xcrate.rs
+++ b/tests/ui/coroutine/auxiliary/xcrate.rs
@@ -12,7 +12,7 @@ pub fn foo() -> impl Coroutine<(), Yield = (), Return = ()> {
     }
 }
 
-pub fn bar<T: 'static>(t: T) -> Box<Coroutine<(), Yield = T, Return = ()> + Unpin> {
+pub fn bar<T: 'static>(t: T) -> Box<dyn Coroutine<(), Yield = T, Return = ()> + Unpin> {
     Box::new(
         #[coroutine]
         || {
diff --git a/tests/ui/coroutine/const_gen_fn.rs b/tests/ui/coroutine/const_gen_fn.rs
index 2701139ffed..b044c185e0f 100644
--- a/tests/ui/coroutine/const_gen_fn.rs
+++ b/tests/ui/coroutine/const_gen_fn.rs
@@ -4,8 +4,10 @@
 
 const gen fn a() {}
 //~^ ERROR functions cannot be both `const` and `gen`
+//~^^ ERROR `gen` fn bodies are not allowed in constant functions
 
 const async gen fn b() {}
 //~^ ERROR functions cannot be both `const` and `async gen`
+//~^^ ERROR `async gen` fn bodies are not allowed in constant functions
 
 fn main() {}
diff --git a/tests/ui/coroutine/const_gen_fn.stderr b/tests/ui/coroutine/const_gen_fn.stderr
index 4f3c73d1678..400ee216d06 100644
--- a/tests/ui/coroutine/const_gen_fn.stderr
+++ b/tests/ui/coroutine/const_gen_fn.stderr
@@ -8,7 +8,7 @@ LL | const gen fn a() {}
    | `const` because of this
 
 error: functions cannot be both `const` and `async gen`
-  --> $DIR/const_gen_fn.rs:8:1
+  --> $DIR/const_gen_fn.rs:9:1
    |
 LL | const async gen fn b() {}
    | ^^^^^-^^^^^^^^^----------
@@ -16,5 +16,17 @@ LL | const async gen fn b() {}
    | |     `async gen` because of this
    | `const` because of this
 
-error: aborting due to 2 previous errors
+error: `gen` fn bodies are not allowed in constant functions
+  --> $DIR/const_gen_fn.rs:5:18
+   |
+LL | const gen fn a() {}
+   |                  ^^
+
+error: `async gen` fn bodies are not allowed in constant functions
+  --> $DIR/const_gen_fn.rs:9:24
+   |
+LL | const async gen fn b() {}
+   |                        ^^
+
+error: aborting due to 4 previous errors
 
diff --git a/tests/ui/coroutine/gen_block.none.stderr b/tests/ui/coroutine/gen_block.none.stderr
index ed744f2957a..b793033b521 100644
--- a/tests/ui/coroutine/gen_block.none.stderr
+++ b/tests/ui/coroutine/gen_block.none.stderr
@@ -31,7 +31,7 @@ LL |     let _ = || yield true;
    |                ^^^^^^^^^^
    |
    = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = help: add `#![feature(yield_expr)]` 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]: yield syntax is experimental
@@ -41,7 +41,7 @@ LL |     let _ = #[coroutine] || yield true;
    |                             ^^^^^^^^^^
    |
    = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = help: add `#![feature(yield_expr)]` 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 `#[coroutine]` attribute is an experimental feature
diff --git a/tests/ui/cross-crate/auxiliary/static_priv_by_default.rs b/tests/ui/cross-crate/auxiliary/static_priv_by_default.rs
index 39f912066ec..fe9aef42feb 100644
--- a/tests/ui/cross-crate/auxiliary/static_priv_by_default.rs
+++ b/tests/ui/cross-crate/auxiliary/static_priv_by_default.rs
@@ -31,11 +31,11 @@ mod foo {
 }
 
 pub mod bar {
-    pub use foo::reexported_a as e;
-    pub use foo::reexported_b as f;
-    pub use foo::reexported_c as g;
-    pub use foo::reexported_d as h;
-    pub use foo::reexported_e as i;
+    pub use crate::foo::reexported_a as e;
+    pub use crate::foo::reexported_b as f;
+    pub use crate::foo::reexported_c as g;
+    pub use crate::foo::reexported_d as h;
+    pub use crate::foo::reexported_e as i;
 }
 
 pub static a: isize = 0;
diff --git a/tests/ui/delegation/bad-resolve.stderr b/tests/ui/delegation/bad-resolve.stderr
index 966387e1d61..fc6811292a6 100644
--- a/tests/ui/delegation/bad-resolve.stderr
+++ b/tests/ui/delegation/bad-resolve.stderr
@@ -44,9 +44,7 @@ error[E0575]: expected method or associated constant, found associated type `Tra
   --> $DIR/bad-resolve.rs:27:11
    |
 LL |     reuse <F as Trait>::Type;
-   |           ^^^^^^^^^^^^^^^^^^
-   |
-   = note: can't use a type alias as a constructor
+   |           ^^^^^^^^^^^^^^^^^^ not a method or associated constant
 
 error[E0576]: cannot find method or associated constant `baz` in trait `Trait`
   --> $DIR/bad-resolve.rs:30:25
diff --git a/tests/ui/delegation/glob-non-fn.stderr b/tests/ui/delegation/glob-non-fn.stderr
index 4b918c53b84..f63c8e88c6f 100644
--- a/tests/ui/delegation/glob-non-fn.stderr
+++ b/tests/ui/delegation/glob-non-fn.stderr
@@ -38,9 +38,7 @@ error[E0423]: expected function, found associated type `Trait::Type`
   --> $DIR/glob-non-fn.rs:30:11
    |
 LL |     reuse Trait::* { &self.0 }
-   |           ^^^^^
-   |
-   = note: can't use a type alias as a constructor
+   |           ^^^^^ not a function
 
 error[E0046]: not all trait items implemented, missing: `CONST`, `Type`, `method`
   --> $DIR/glob-non-fn.rs:29:1
diff --git a/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs b/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs
index 9525ff2e5ef..9a7a10529fa 100644
--- a/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs
+++ b/tests/ui/dep-graph/dep-graph-assoc-type-codegen.rs
@@ -15,7 +15,7 @@ pub trait Foo: Sized {
 }
 
 mod x {
-    use Foo;
+    use crate::Foo;
 
     #[rustc_if_this_changed]
     impl Foo for char { type T = char; }
@@ -24,7 +24,7 @@ mod x {
 }
 
 mod y {
-    use Foo;
+    use crate::Foo;
 
     #[rustc_then_this_would_need(typeck)] //~ ERROR OK
     pub fn use_char_assoc() {
diff --git a/tests/ui/dep-graph/dep-graph-caller-callee.rs b/tests/ui/dep-graph/dep-graph-caller-callee.rs
index e56cd5202e5..b1318a169d9 100644
--- a/tests/ui/dep-graph/dep-graph-caller-callee.rs
+++ b/tests/ui/dep-graph/dep-graph-caller-callee.rs
@@ -15,7 +15,7 @@ mod x {
 }
 
 mod y {
-    use x;
+    use crate::x;
 
     // These dependencies SHOULD exist:
     #[rustc_then_this_would_need(typeck)] //~ ERROR OK
@@ -25,7 +25,7 @@ mod y {
 }
 
 mod z {
-    use y;
+    use crate::y;
 
     // These are expected to yield errors, because changes to `x`
     // affect the BODY of `y`, but not its signature.
diff --git a/tests/ui/dep-graph/dep-graph-struct-signature.rs b/tests/ui/dep-graph/dep-graph-struct-signature.rs
index 5303c6d2e53..eea81b26f9f 100644
--- a/tests/ui/dep-graph/dep-graph-struct-signature.rs
+++ b/tests/ui/dep-graph/dep-graph-struct-signature.rs
@@ -23,7 +23,7 @@ struct WontChange {
 
 // these are valid dependencies
 mod signatures {
-    use WillChange;
+    use crate::WillChange;
 
     #[rustc_then_this_would_need(type_of)] //~ ERROR no path
     #[rustc_then_this_would_need(associated_item)] //~ ERROR no path
@@ -70,7 +70,7 @@ mod signatures {
 }
 
 mod invalid_signatures {
-    use WontChange;
+    use crate::WontChange;
 
     #[rustc_then_this_would_need(type_of)] //~ ERROR no path
     trait A {
diff --git a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs
index b3e8e9a512e..eab4c792105 100644
--- a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs
+++ b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs
@@ -19,7 +19,7 @@ pub trait Bar: Sized {
 }
 
 mod x {
-    use {Foo, Bar};
+    use crate::{Foo, Bar};
 
     #[rustc_if_this_changed]
     impl Foo for u32 { }
@@ -28,7 +28,7 @@ mod x {
 }
 
 mod y {
-    use {Foo, Bar};
+    use crate::{Foo, Bar};
 
     #[rustc_then_this_would_need(typeck)] //~ ERROR OK
     pub fn with_char() {
@@ -37,7 +37,7 @@ mod y {
 }
 
 mod z {
-    use y;
+    use crate::y;
 
     #[rustc_then_this_would_need(typeck)] //~ ERROR no path
     pub fn z() {
diff --git a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs
index 7c612158bf0..859505a4a7a 100644
--- a/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs
+++ b/tests/ui/dep-graph/dep-graph-trait-impl-two-traits.rs
@@ -18,7 +18,7 @@ pub trait Bar: Sized {
 }
 
 mod x {
-    use {Foo, Bar};
+    use crate::{Foo, Bar};
 
     #[rustc_if_this_changed]
     impl Foo for char { }
@@ -27,7 +27,7 @@ mod x {
 }
 
 mod y {
-    use {Foo, Bar};
+    use crate::{Foo, Bar};
 
     #[rustc_then_this_would_need(typeck)] //~ ERROR no path
     pub fn call_bar() {
@@ -36,7 +36,7 @@ mod y {
 }
 
 mod z {
-    use y;
+    use crate::y;
 
     #[rustc_then_this_would_need(typeck)] //~ ERROR no path
     pub fn z() {
diff --git a/tests/ui/dep-graph/dep-graph-trait-impl.rs b/tests/ui/dep-graph/dep-graph-trait-impl.rs
index 38cc88e567d..5cf0d34e007 100644
--- a/tests/ui/dep-graph/dep-graph-trait-impl.rs
+++ b/tests/ui/dep-graph/dep-graph-trait-impl.rs
@@ -14,7 +14,7 @@ pub trait Foo: Sized {
 }
 
 mod x {
-    use Foo;
+    use crate::Foo;
 
     #[rustc_if_this_changed]
     impl Foo for char { }
@@ -23,7 +23,7 @@ mod x {
 }
 
 mod y {
-    use Foo;
+    use crate::Foo;
 
     #[rustc_then_this_would_need(typeck)] //~ ERROR OK
     pub fn with_char() {
@@ -49,7 +49,7 @@ mod y {
 }
 
 mod z {
-    use y;
+    use crate::y;
 
     // These are expected to yield errors, because changes to `x`
     // affect the BODY of `y`, but not its signature.
diff --git a/tests/ui/deprecation/deprecation-lint.rs b/tests/ui/deprecation/deprecation-lint.rs
index dc11a4d56a2..5eda38732c8 100644
--- a/tests/ui/deprecation/deprecation-lint.rs
+++ b/tests/ui/deprecation/deprecation-lint.rs
@@ -71,7 +71,7 @@ mod cross_crate {
         <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text
     }
 
-    fn test_method_object(foo: &Trait) {
+    fn test_method_object(foo: &dyn Trait) {
         foo.trait_deprecated(); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated`
         foo.trait_deprecated_text(); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text
     }
@@ -299,7 +299,7 @@ mod this_crate {
         <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
     }
 
-    fn test_method_object(foo: &Trait) {
+    fn test_method_object(foo: &dyn Trait) {
         foo.trait_deprecated(); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated`
         foo.trait_deprecated_text(); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
     }
diff --git a/tests/ui/derived-errors/issue-31997.rs b/tests/ui/derived-errors/issue-31997.rs
index ff619313afb..59f19e4fde2 100644
--- a/tests/ui/derived-errors/issue-31997.rs
+++ b/tests/ui/derived-errors/issue-31997.rs
@@ -11,7 +11,7 @@ fn closure<F, T>(x: F) -> Result<T, ()>
 }
 
 fn foo() -> Result<(), ()> {
-    try!(closure(|| bar(core::ptr::null_mut()))); //~ ERROR cannot find function `bar` in this scope
+    closure(|| bar(core::ptr::null_mut()))?; //~ ERROR cannot find function `bar` in this scope
     Ok(())
 }
 
diff --git a/tests/ui/derived-errors/issue-31997.stderr b/tests/ui/derived-errors/issue-31997.stderr
index 7d6415fef83..f5afb94fbd6 100644
--- a/tests/ui/derived-errors/issue-31997.stderr
+++ b/tests/ui/derived-errors/issue-31997.stderr
@@ -1,8 +1,8 @@
 error[E0425]: cannot find function `bar` in this scope
-  --> $DIR/issue-31997.rs:14:21
+  --> $DIR/issue-31997.rs:14:16
    |
-LL |     try!(closure(|| bar(core::ptr::null_mut())));
-   |                     ^^^ not found in this scope
+LL |     closure(|| bar(core::ptr::null_mut()))?;
+   |                ^^^ not found in this scope
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/derives/clone-debug-dead-code.stderr b/tests/ui/derives/clone-debug-dead-code.stderr
index 38be486e332..34b7f929ec5 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 `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
+   = note: `D` has derived impls for the traits `Debug` and `Clone`, 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/deriving/deriving-all-codegen.rs b/tests/ui/deriving/deriving-all-codegen.rs
index eab2b4f1f53..e2b6804fbd1 100644
--- a/tests/ui/deriving/deriving-all-codegen.rs
+++ b/tests/ui/deriving/deriving-all-codegen.rs
@@ -45,6 +45,22 @@ struct Big {
     b1: u32, b2: u32, b3: u32, b4: u32, b5: u32, b6: u32, b7: u32, b8: u32,
 }
 
+// It is more efficient to compare scalar types before non-scalar types.
+#[derive(PartialEq, PartialOrd)]
+struct Reorder {
+    b1: Option<f32>,
+    b2: u16,
+    b3: &'static str,
+    b4: i8,
+    b5: u128,
+    _b: *mut &'static dyn FnMut() -> (),
+    b6: f64,
+    b7: &'static mut (),
+    b8: char,
+    b9: &'static [i64],
+    b10: &'static *const bool,
+}
+
 // A struct that doesn't impl `Copy`, which means it gets the non-simple
 // `clone` implemention that clones the fields individually.
 #[derive(Clone)]
@@ -130,6 +146,20 @@ enum Mixed {
     S { d1: Option<u32>, d2: Option<i32> },
 }
 
+// When comparing enum variant it is more efficient to compare scalar types before non-scalar types.
+#[derive(PartialEq, PartialOrd)]
+enum ReorderEnum {
+    A(i32),
+    B,
+    C(i8),
+    D,
+    E,
+    F,
+    G(&'static mut str, *const u8, *const dyn Fn() -> ()),
+    H,
+    I,
+}
+
 // An enum with no fieldless variants. Note that `Default` cannot be derived
 // for this enum.
 #[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
diff --git a/tests/ui/deriving/deriving-all-codegen.stdout b/tests/ui/deriving/deriving-all-codegen.stdout
index 6503c870990..fa8f249373d 100644
--- a/tests/ui/deriving/deriving-all-codegen.stdout
+++ b/tests/ui/deriving/deriving-all-codegen.stdout
@@ -419,6 +419,100 @@ impl ::core::cmp::Ord for Big {
     }
 }
 
+// It is more efficient to compare scalar types before non-scalar types.
+struct Reorder {
+    b1: Option<f32>,
+    b2: u16,
+    b3: &'static str,
+    b4: i8,
+    b5: u128,
+    _b: *mut &'static dyn FnMut() -> (),
+    b6: f64,
+    b7: &'static mut (),
+    b8: char,
+    b9: &'static [i64],
+    b10: &'static *const bool,
+}
+#[automatically_derived]
+impl ::core::marker::StructuralPartialEq for Reorder { }
+#[automatically_derived]
+impl ::core::cmp::PartialEq for Reorder {
+    #[inline]
+    fn eq(&self, other: &Reorder) -> bool {
+        self.b2 == other.b2 && self.b4 == other.b4 && self.b5 == other.b5 &&
+                                        self.b6 == other.b6 && self.b7 == other.b7 &&
+                                self.b8 == other.b8 && self.b10 == other.b10 &&
+                        self.b1 == other.b1 && self.b3 == other.b3 &&
+                self._b == other._b && self.b9 == other.b9
+    }
+}
+#[automatically_derived]
+impl ::core::cmp::PartialOrd for Reorder {
+    #[inline]
+    fn partial_cmp(&self, other: &Reorder)
+        -> ::core::option::Option<::core::cmp::Ordering> {
+        match ::core::cmp::PartialOrd::partial_cmp(&self.b1, &other.b1) {
+            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
+                match ::core::cmp::PartialOrd::partial_cmp(&self.b2,
+                        &other.b2) {
+                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
+                        =>
+                        match ::core::cmp::PartialOrd::partial_cmp(&self.b3,
+                                &other.b3) {
+                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
+                                =>
+                                match ::core::cmp::PartialOrd::partial_cmp(&self.b4,
+                                        &other.b4) {
+                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
+                                        =>
+                                        match ::core::cmp::PartialOrd::partial_cmp(&self.b5,
+                                                &other.b5) {
+                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
+                                                =>
+                                                match ::core::cmp::PartialOrd::partial_cmp(&self._b,
+                                                        &other._b) {
+                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
+                                                        =>
+                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.b6,
+                                                                &other.b6) {
+                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
+                                                                =>
+                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.b7,
+                                                                        &other.b7) {
+                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
+                                                                        =>
+                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.b8,
+                                                                                &other.b8) {
+                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
+                                                                                =>
+                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.b9,
+                                                                                        &other.b9) {
+                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
+                                                                                        =>
+                                                                                        ::core::cmp::PartialOrd::partial_cmp(&self.b10, &other.b10),
+                                                                                    cmp => cmp,
+                                                                                },
+                                                                            cmp => cmp,
+                                                                        },
+                                                                    cmp => cmp,
+                                                                },
+                                                            cmp => cmp,
+                                                        },
+                                                    cmp => cmp,
+                                                },
+                                            cmp => cmp,
+                                        },
+                                    cmp => cmp,
+                                },
+                            cmp => cmp,
+                        },
+                    cmp => cmp,
+                },
+            cmp => cmp,
+        }
+    }
+}
+
 // A struct that doesn't impl `Copy`, which means it gets the non-simple
 // `clone` implemention that clones the fields individually.
 struct NonCopy(u32);
@@ -1167,6 +1261,77 @@ impl ::core::cmp::Ord for Mixed {
     }
 }
 
+// When comparing enum variant it is more efficient to compare scalar types before non-scalar types.
+enum ReorderEnum {
+    A(i32),
+    B,
+    C(i8),
+    D,
+    E,
+    F,
+    G(&'static mut str, *const u8, *const dyn Fn() -> ()),
+    H,
+    I,
+}
+#[automatically_derived]
+impl ::core::marker::StructuralPartialEq for ReorderEnum { }
+#[automatically_derived]
+impl ::core::cmp::PartialEq for ReorderEnum {
+    #[inline]
+    fn eq(&self, other: &ReorderEnum) -> bool {
+        let __self_discr = ::core::intrinsics::discriminant_value(self);
+        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
+        __self_discr == __arg1_discr &&
+            match (self, other) {
+                (ReorderEnum::A(__self_0), ReorderEnum::A(__arg1_0)) =>
+                    __self_0 == __arg1_0,
+                (ReorderEnum::C(__self_0), ReorderEnum::C(__arg1_0)) =>
+                    __self_0 == __arg1_0,
+                (ReorderEnum::G(__self_0, __self_1, __self_2),
+                    ReorderEnum::G(__arg1_0, __arg1_1, __arg1_2)) =>
+                    __self_1 == __arg1_1 && __self_0 == __arg1_0 &&
+                        __self_2 == __arg1_2,
+                _ => true,
+            }
+    }
+}
+#[automatically_derived]
+impl ::core::cmp::PartialOrd for ReorderEnum {
+    #[inline]
+    fn partial_cmp(&self, other: &ReorderEnum)
+        -> ::core::option::Option<::core::cmp::Ordering> {
+        let __self_discr = ::core::intrinsics::discriminant_value(self);
+        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
+        match ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
+                &__arg1_discr) {
+            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
+                match (self, other) {
+                    (ReorderEnum::A(__self_0), ReorderEnum::A(__arg1_0)) =>
+                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
+                    (ReorderEnum::C(__self_0), ReorderEnum::C(__arg1_0)) =>
+                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
+                    (ReorderEnum::G(__self_0, __self_1, __self_2),
+                        ReorderEnum::G(__arg1_0, __arg1_1, __arg1_2)) =>
+                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
+                                __arg1_0) {
+                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
+                                =>
+                                match ::core::cmp::PartialOrd::partial_cmp(__self_1,
+                                        __arg1_1) {
+                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
+                                        => ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
+                                    cmp => cmp,
+                                },
+                            cmp => cmp,
+                        },
+                    _ =>
+                        ::core::option::Option::Some(::core::cmp::Ordering::Equal),
+                },
+            cmp => cmp,
+        }
+    }
+}
+
 // An enum with no fieldless variants. Note that `Default` cannot be derived
 // for this enum.
 enum Fielded { X(u32), Y(bool), Z(Option<i32>), }
diff --git a/tests/ui/deriving/deriving-in-macro.rs b/tests/ui/deriving/deriving-in-macro.rs
index 493c1415c7f..739d9b30682 100644
--- a/tests/ui/deriving/deriving-in-macro.rs
+++ b/tests/ui/deriving/deriving-in-macro.rs
@@ -1,5 +1,6 @@
-//@ run-pass
+//@ check-pass
 #![allow(non_camel_case_types)]
+#![allow(dead_code)]
 
 macro_rules! define_vec {
     () => (
diff --git a/tests/ui/destructuring-assignment/bad-let-in-destructure.rs b/tests/ui/destructuring-assignment/bad-let-in-destructure.rs
new file mode 100644
index 00000000000..70a0403fc38
--- /dev/null
+++ b/tests/ui/destructuring-assignment/bad-let-in-destructure.rs
@@ -0,0 +1,13 @@
+// Regression test for <https://github.com/rust-lang/rust/issues/141844>.
+
+fn main() {
+  // The following expression gets desugared into something like:
+  // ```
+  // let (lhs,) = x; (let x = 1) = lhs;
+  // ```
+  // This used to ICE since we haven't yet declared the type for `x` when
+  // checking the first desugared statement, whose RHS resolved to `x` since
+  // in the AST, the `let` expression was visited first.
+  (let x = 1,) = x;
+  //~^ ERROR expected expression, found `let` statement
+}
diff --git a/tests/ui/destructuring-assignment/bad-let-in-destructure.stderr b/tests/ui/destructuring-assignment/bad-let-in-destructure.stderr
new file mode 100644
index 00000000000..622d714ba2f
--- /dev/null
+++ b/tests/ui/destructuring-assignment/bad-let-in-destructure.stderr
@@ -0,0 +1,10 @@
+error: expected expression, found `let` statement
+  --> $DIR/bad-let-in-destructure.rs:11:4
+   |
+LL |   (let x = 1,) = x;
+   |    ^^^
+   |
+   = note: only supported directly in conditions of `if` and `while` expressions
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs
index b76b550fcb2..a0e497fa045 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs
@@ -3,7 +3,7 @@
 //@ reference: attributes.diagnostic.on_unimplemented.syntax
 //@ reference: attributes.diagnostic.on_unimplemented.invalid-formats
 #[diagnostic::on_unimplemented(
-    on(_Self = "&str"),
+    on(Self = "&str"),
     //~^WARN malformed `on_unimplemented` attribute
     //~|WARN malformed `on_unimplemented` attribute
     message = "trait has `{Self}` and `{T}` as params",
@@ -41,7 +41,7 @@ impl Bar for i32 {}
     //~|WARN there is no parameter `integral` on trait `Baz`
     //~|WARN there is no parameter `integer` on trait `Baz`
     //~|WARN there is no parameter `integer` on trait `Baz`
-    label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+    label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
     //~^WARN there is no parameter `float` on trait `Baz`
     //~|WARN there is no parameter `float` on trait `Baz`
     //~|WARN there is no parameter `_Self` on trait `Baz`
@@ -52,6 +52,8 @@ impl Bar for i32 {}
     //~|WARN there is no parameter `Trait` on trait `Baz`
     //~|WARN there is no parameter `ItemContext` on trait `Baz`
     //~|WARN there is no parameter `ItemContext` on trait `Baz`
+    //~|WARN there is no parameter `This` on trait `Baz`
+    //~|WARN there is no parameter `This` on trait `Baz`
 )]
 trait Baz {}
 
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr
index 88816a98dcf..8dace7d9052 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr
@@ -9,8 +9,8 @@ LL | #[diagnostic::on_unimplemented(message = "Not allowed to apply it on a impl
 warning: malformed `on_unimplemented` attribute
   --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:6:5
    |
-LL |     on(_Self = "&str"),
-   |     ^^^^^^^^^^^^^^^^^^ invalid option found here
+LL |     on(Self = "&str"),
+   |     ^^^^^^^^^^^^^^^^^ invalid option found here
    |
    = help: only `message`, `note` and `label` are allowed as options
 
@@ -81,7 +81,7 @@ LL |     message = "{from_desugaring}{direct}{cause}{integral}{integer}",
 warning: there is no parameter `float` on trait `Baz`
   --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:15
    |
-LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
    |               ^^^^^
    |
    = help: expect either a generic argument name or `{Self}` as format argument
@@ -89,7 +89,7 @@ LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
 warning: there is no parameter `_Self` on trait `Baz`
   --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:22
    |
-LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
    |                      ^^^^^
    |
    = help: expect either a generic argument name or `{Self}` as format argument
@@ -97,7 +97,7 @@ LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
 warning: there is no parameter `crate_local` on trait `Baz`
   --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:29
    |
-LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
    |                             ^^^^^^^^^^^
    |
    = help: expect either a generic argument name or `{Self}` as format argument
@@ -105,7 +105,7 @@ LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
 warning: there is no parameter `Trait` on trait `Baz`
   --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:42
    |
-LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
    |                                          ^^^^^
    |
    = help: expect either a generic argument name or `{Self}` as format argument
@@ -113,16 +113,24 @@ LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
 warning: there is no parameter `ItemContext` on trait `Baz`
   --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:49
    |
-LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
    |                                                 ^^^^^^^^^^^
    |
    = help: expect either a generic argument name or `{Self}` as format argument
 
+warning: there is no parameter `This` on trait `Baz`
+  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:62
+   |
+LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
+   |                                                              ^^^^
+   |
+   = help: expect either a generic argument name or `{Self}` as format argument
+
 warning: malformed `on_unimplemented` attribute
   --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:6:5
    |
-LL |     on(_Self = "&str"),
-   |     ^^^^^^^^^^^^^^^^^^ invalid option found here
+LL |     on(Self = "&str"),
+   |     ^^^^^^^^^^^^^^^^^ invalid option found here
    |
    = help: only `message`, `note` and `label` are allowed as options
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
@@ -146,7 +154,7 @@ LL |     append_const_msg
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0277]: trait has `()` and `i32` as params
-  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:63:15
+  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:65:15
    |
 LL |     takes_foo(());
    |     --------- ^^ trait has `()` and `i32` as params
@@ -161,7 +169,7 @@ help: this trait has no implementations, consider adding one
 LL | trait Foo<T> {}
    | ^^^^^^^^^^^^
 note: required by a bound in `takes_foo`
-  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:58:22
+  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:60:22
    |
 LL | fn takes_foo(_: impl Foo<i32>) {}
    |                      ^^^^^^^^ required by this bound in `takes_foo`
@@ -176,7 +184,7 @@ LL | #[diagnostic::on_unimplemented = "Message"]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0277]: the trait bound `(): Bar` is not satisfied
-  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:65:15
+  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:67:15
    |
 LL |     takes_bar(());
    |     --------- ^^ the trait `Bar` is not implemented for `()`
@@ -185,7 +193,7 @@ LL |     takes_bar(());
    |
    = help: the trait `Bar` is implemented for `i32`
 note: required by a bound in `takes_bar`
-  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:59:22
+  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:61:22
    |
 LL | fn takes_bar(_: impl Bar) {}
    |                      ^^^ required by this bound in `takes_bar`
@@ -238,7 +246,7 @@ LL |     message = "{from_desugaring}{direct}{cause}{integral}{integer}",
 warning: there is no parameter `float` on trait `Baz`
   --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:15
    |
-LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
    |               ^^^^^
    |
    = help: expect either a generic argument name or `{Self}` as format argument
@@ -247,7 +255,7 @@ LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
 warning: there is no parameter `_Self` on trait `Baz`
   --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:22
    |
-LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
    |                      ^^^^^
    |
    = help: expect either a generic argument name or `{Self}` as format argument
@@ -256,7 +264,7 @@ LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
 warning: there is no parameter `crate_local` on trait `Baz`
   --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:29
    |
-LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
    |                             ^^^^^^^^^^^
    |
    = help: expect either a generic argument name or `{Self}` as format argument
@@ -265,7 +273,7 @@ LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
 warning: there is no parameter `Trait` on trait `Baz`
   --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:42
    |
-LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
    |                                          ^^^^^
    |
    = help: expect either a generic argument name or `{Self}` as format argument
@@ -274,32 +282,41 @@ LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
 warning: there is no parameter `ItemContext` on trait `Baz`
   --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:49
    |
-LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}"
+LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
    |                                                 ^^^^^^^^^^^
    |
    = help: expect either a generic argument name or `{Self}` as format argument
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
+warning: there is no parameter `This` on trait `Baz`
+  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:44:62
+   |
+LL |     label = "{float}{_Self}{crate_local}{Trait}{ItemContext}{This}"
+   |                                                              ^^^^
+   |
+   = help: expect either a generic argument name or `{Self}` as format argument
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
 error[E0277]: {from_desugaring}{direct}{cause}{integral}{integer}
-  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:67:15
+  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:69:15
    |
 LL |     takes_baz(());
-   |     --------- ^^ {float}{_Self}{crate_local}{Trait}{ItemContext}
+   |     --------- ^^ {float}{_Self}{crate_local}{Trait}{ItemContext}{This}
    |     |
    |     required by a bound introduced by this call
    |
    = help: the trait `Baz` is not implemented for `()`
 help: this trait has no implementations, consider adding one
-  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:56:1
+  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:58:1
    |
 LL | trait Baz {}
    | ^^^^^^^^^
 note: required by a bound in `takes_baz`
-  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:60:22
+  --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:62:22
    |
 LL | fn takes_baz(_: impl Baz) {}
    |                      ^^^ required by this bound in `takes_baz`
 
-error: aborting due to 3 previous errors; 29 warnings emitted
+error: aborting due to 3 previous errors; 31 warnings emitted
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs
index 8328c10d2a0..08eb5707e90 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs
@@ -14,11 +14,15 @@ struct Bar {}
 //~|WARN malformed `on_unimplemented` attribute
 trait Baz {}
 
-#[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message = "whatever"))]
+#[diagnostic::on_unimplemented(message = "Boom", on(Self = "i32", message = "whatever"))]
 //~^WARN malformed `on_unimplemented` attribute
 //~|WARN malformed `on_unimplemented` attribute
 trait Boom {}
 
+#[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message = "whatever"))]
+//~^WARN malformed `on_unimplemented` attribute
+trait _Self {}
+
 #[diagnostic::on_unimplemented = "boom"]
 //~^WARN malformed `on_unimplemented` attribute
 trait Doom {}
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr
index 4dd8c1afca0..80790dc3f79 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr
@@ -25,13 +25,21 @@ LL | #[diagnostic::on_unimplemented(message = "Boom", unsupported = "Bar")]
 warning: malformed `on_unimplemented` attribute
   --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:17:50
    |
+LL | #[diagnostic::on_unimplemented(message = "Boom", on(Self = "i32", message = "whatever"))]
+   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
+   |
+   = help: only `message`, `note` and `label` are allowed as options
+
+warning: malformed `on_unimplemented` attribute
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:22:50
+   |
 LL | #[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message = "whatever"))]
    |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
    |
    = help: only `message`, `note` and `label` are allowed as options
 
 warning: malformed `on_unimplemented` attribute
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:22:32
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:26:32
    |
 LL | #[diagnostic::on_unimplemented = "boom"]
    |                                ^^^^^^^^ invalid option found here
@@ -39,7 +47,7 @@ LL | #[diagnostic::on_unimplemented = "boom"]
    = help: only `message`, `note` and `label` are allowed as options
 
 warning: missing options for `on_unimplemented` attribute
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:26:1
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:30:1
    |
 LL | #[diagnostic::on_unimplemented]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -47,7 +55,7 @@ LL | #[diagnostic::on_unimplemented]
    = help: at least one of the `message`, `note` and `label` options are expected
 
 warning: there is no parameter `DoesNotExist` on trait `Test`
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:31:44
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:35:44
    |
 LL | #[diagnostic::on_unimplemented(message = "{DoesNotExist}")]
    |                                            ^^^^^^^^^^^^
@@ -64,7 +72,7 @@ LL | #[diagnostic::on_unimplemented(unsupported = "foo")]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0277]: the trait bound `i32: Foo` is not satisfied
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:43:14
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:47:14
    |
 LL |     take_foo(1_i32);
    |     -------- ^^^^^ the trait `Foo` is not implemented for `i32`
@@ -77,7 +85,7 @@ help: this trait has no implementations, consider adding one
 LL | trait Foo {}
    | ^^^^^^^^^
 note: required by a bound in `take_foo`
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:36:21
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:40:21
    |
 LL | fn take_foo(_: impl Foo) {}
    |                     ^^^ required by this bound in `take_foo`
@@ -92,7 +100,7 @@ LL | #[diagnostic::on_unimplemented(message = "Boom", unsupported = "Bar")]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0277]: Boom
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:45:14
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:49:14
    |
 LL |     take_baz(1_i32);
    |     -------- ^^^^^ the trait `Baz` is not implemented for `i32`
@@ -105,7 +113,7 @@ help: this trait has no implementations, consider adding one
 LL | trait Baz {}
    | ^^^^^^^^^
 note: required by a bound in `take_baz`
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:37:21
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:41:21
    |
 LL | fn take_baz(_: impl Baz) {}
    |                     ^^^ required by this bound in `take_baz`
@@ -113,14 +121,14 @@ LL | fn take_baz(_: impl Baz) {}
 warning: malformed `on_unimplemented` attribute
   --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:17:50
    |
-LL | #[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message = "whatever"))]
-   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
+LL | #[diagnostic::on_unimplemented(message = "Boom", on(Self = "i32", message = "whatever"))]
+   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
    |
    = help: only `message`, `note` and `label` are allowed as options
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0277]: Boom
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:47:15
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:51:15
    |
 LL |     take_boom(1_i32);
    |     --------- ^^^^^ the trait `Boom` is not implemented for `i32`
@@ -133,13 +141,13 @@ help: this trait has no implementations, consider adding one
 LL | trait Boom {}
    | ^^^^^^^^^^
 note: required by a bound in `take_boom`
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:38:22
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:42:22
    |
 LL | fn take_boom(_: impl Boom) {}
    |                      ^^^^ required by this bound in `take_boom`
 
 warning: missing options for `on_unimplemented` attribute
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:26:1
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:30:1
    |
 LL | #[diagnostic::on_unimplemented]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -148,7 +156,7 @@ LL | #[diagnostic::on_unimplemented]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0277]: the trait bound `i32: Whatever` is not satisfied
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:49:19
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:53:19
    |
 LL |     take_whatever(1_i32);
    |     ------------- ^^^^^ the trait `Whatever` is not implemented for `i32`
@@ -156,18 +164,18 @@ LL |     take_whatever(1_i32);
    |     required by a bound introduced by this call
    |
 help: this trait has no implementations, consider adding one
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:29:1
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:33:1
    |
 LL | trait Whatever {}
    | ^^^^^^^^^^^^^^
 note: required by a bound in `take_whatever`
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:39:26
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:43:26
    |
 LL | fn take_whatever(_: impl Whatever) {}
    |                          ^^^^^^^^ required by this bound in `take_whatever`
 
 warning: there is no parameter `DoesNotExist` on trait `Test`
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:31:44
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:35:44
    |
 LL | #[diagnostic::on_unimplemented(message = "{DoesNotExist}")]
    |                                            ^^^^^^^^^^^^
@@ -176,7 +184,7 @@ LL | #[diagnostic::on_unimplemented(message = "{DoesNotExist}")]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0277]: {DoesNotExist}
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:51:15
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:55:15
    |
 LL |     take_test(());
    |     --------- ^^ the trait `Test` is not implemented for `()`
@@ -184,16 +192,16 @@ LL |     take_test(());
    |     required by a bound introduced by this call
    |
 help: this trait has no implementations, consider adding one
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:34:1
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:38:1
    |
 LL | trait Test {}
    | ^^^^^^^^^^
 note: required by a bound in `take_test`
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:40:22
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:44:22
    |
 LL | fn take_test(_: impl Test) {}
    |                      ^^^^ required by this bound in `take_test`
 
-error: aborting due to 5 previous errors; 12 warnings emitted
+error: aborting due to 5 previous errors; 13 warnings emitted
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/did_you_mean/E0178.rs b/tests/ui/did_you_mean/E0178.rs
index 095df640c38..cdaddac35a3 100644
--- a/tests/ui/did_you_mean/E0178.rs
+++ b/tests/ui/did_you_mean/E0178.rs
@@ -1,3 +1,4 @@
+//@ edition:2015
 #![allow(bare_trait_objects)]
 
 trait Foo {}
diff --git a/tests/ui/did_you_mean/E0178.stderr b/tests/ui/did_you_mean/E0178.stderr
index 36e4dbdf7c4..7b69f860381 100644
--- a/tests/ui/did_you_mean/E0178.stderr
+++ b/tests/ui/did_you_mean/E0178.stderr
@@ -1,5 +1,5 @@
 error[E0178]: expected a path on the left-hand side of `+`
-  --> $DIR/E0178.rs:6:8
+  --> $DIR/E0178.rs:7:8
    |
 LL |     w: &'a Foo + Copy,
    |        ^^^^^^^
@@ -10,7 +10,7 @@ LL |     w: &'a (Foo + Copy),
    |            +          +
 
 error[E0178]: expected a path on the left-hand side of `+`
-  --> $DIR/E0178.rs:7:8
+  --> $DIR/E0178.rs:8:8
    |
 LL |     x: &'a Foo + 'a,
    |        ^^^^^^^
@@ -21,7 +21,7 @@ LL |     x: &'a (Foo + 'a),
    |            +        +
 
 error[E0178]: expected a path on the left-hand side of `+`
-  --> $DIR/E0178.rs:8:8
+  --> $DIR/E0178.rs:9:8
    |
 LL |     y: &'a mut Foo + 'a,
    |        ^^^^^^^^^^^
@@ -32,7 +32,7 @@ LL |     y: &'a mut (Foo + 'a),
    |                +        +
 
 error[E0178]: expected a path on the left-hand side of `+`
-  --> $DIR/E0178.rs:9:8
+  --> $DIR/E0178.rs:10:8
    |
 LL |     z: fn() -> Foo + 'a,
    |        ^^^^^^^^^^^-----
diff --git a/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs b/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs
index 9cd32ffeb6d..eff431f4665 100644
--- a/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs
+++ b/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs
@@ -1,7 +1,9 @@
+//@ edition: 2015
 #![allow(bare_trait_objects)]
 
 fn main() {
     let _: &Copy + 'static; //~ ERROR expected a path
     //~^ ERROR is not dyn compatible
     let _: &'static Copy + 'static; //~ ERROR expected a path
+    //~^ ERROR is not dyn compatible
 }
diff --git a/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr b/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr
index 762b37b9e9d..b051d181ad8 100644
--- a/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr
+++ b/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr
@@ -1,5 +1,5 @@
 error[E0178]: expected a path on the left-hand side of `+`
-  --> $DIR/trait-object-reference-without-parens-suggestion.rs:4:12
+  --> $DIR/trait-object-reference-without-parens-suggestion.rs:5:12
    |
 LL |     let _: &Copy + 'static;
    |            ^^^^^
@@ -10,7 +10,7 @@ LL |     let _: &(Copy + 'static);
    |             +              +
 
 error[E0178]: expected a path on the left-hand side of `+`
-  --> $DIR/trait-object-reference-without-parens-suggestion.rs:6:12
+  --> $DIR/trait-object-reference-without-parens-suggestion.rs:7:12
    |
 LL |     let _: &'static Copy + 'static;
    |            ^^^^^^^^^^^^^
@@ -21,16 +21,26 @@ LL |     let _: &'static (Copy + 'static);
    |                     +              +
 
 error[E0038]: the trait `Copy` is not dyn compatible
-  --> $DIR/trait-object-reference-without-parens-suggestion.rs:4:12
+  --> $DIR/trait-object-reference-without-parens-suggestion.rs:5:13
    |
 LL |     let _: &Copy + 'static;
-   |            ^^^^^ `Copy` is not dyn compatible
+   |             ^^^^ `Copy` is not dyn compatible
    |
    = 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>
 
-error: aborting due to 3 previous errors
+error[E0038]: the trait `Copy` is not dyn compatible
+  --> $DIR/trait-object-reference-without-parens-suggestion.rs:7:21
+   |
+LL |     let _: &'static Copy + 'static;
+   |                     ^^^^ `Copy` is not dyn compatible
+   |
+   = 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>
+
+error: aborting due to 4 previous errors
 
 Some errors have detailed explanations: E0038, E0178.
 For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/drop/drop-order-comparisons.e2021.fixed b/tests/ui/drop/drop-order-comparisons.e2021.fixed
index 71158cb8062..6c8d2d3fa9c 100644
--- a/tests/ui/drop/drop-order-comparisons.e2021.fixed
+++ b/tests/ui/drop/drop-order-comparisons.e2021.fixed
@@ -24,6 +24,7 @@
 //@ [e2024] edition: 2024
 //@ run-pass
 
+#![feature(if_let_guard)]
 #![cfg_attr(e2021, feature(let_chains))]
 #![cfg_attr(e2021, warn(rust_2024_compatibility))]
 
@@ -344,6 +345,25 @@ fn t_if_let_chains_then() {
     e.assert(9);
 }
 
+#[rustfmt::skip]
+fn t_guard_if_let_chains_then() {
+    let e = Events::new();
+    _ = match () {
+        () if e.ok(1).is_ok()
+            && let true = e.ok(9).is_ok()
+            && let Ok(_v) = e.ok(8)
+            && let Ok(_) = e.ok(7)
+            && let Ok(_) = e.ok(6).as_ref()
+            && e.ok(2).is_ok()
+            && let Ok(_v) = e.ok(5)
+            && let Ok(_) = e.ok(4).as_ref() => {
+                e.mark(3);
+            }
+        _ => {}
+    };
+    e.assert(9);
+}
+
 #[cfg(e2021)]
 #[rustfmt::skip]
 fn t_if_let_nested_else() {
@@ -484,6 +504,25 @@ fn t_if_let_chains_then_else() {
     e.assert(9);
 }
 
+#[rustfmt::skip]
+fn t_guard_if_let_chains_then_else() {
+    let e = Events::new();
+    _ = match () {
+       () if e.ok(1).is_ok()
+            && let true = e.ok(8).is_ok()
+            && let Ok(_v) = e.ok(7)
+            && let Ok(_) = e.ok(6)
+            && let Ok(_) = e.ok(5).as_ref()
+            && e.ok(2).is_ok()
+            && let Ok(_v) = e.ok(4)
+            && let Ok(_) = e.err(3) => {}
+        _ => {
+            e.mark(9);
+        }
+    };
+    e.assert(9);
+}
+
 fn main() {
     t_bindings();
     t_tuples();
@@ -502,10 +541,12 @@ fn main() {
     t_if_let_nested_then();
     t_let_else_chained_then();
     t_if_let_chains_then();
+    t_guard_if_let_chains_then();
     t_if_let_nested_else();
     t_if_let_nested_then_else();
     t_let_else_chained_then_else();
     t_if_let_chains_then_else();
+    t_guard_if_let_chains_then_else();
 }
 
 // # Test scaffolding
diff --git a/tests/ui/drop/drop-order-comparisons.e2021.stderr b/tests/ui/drop/drop-order-comparisons.e2021.stderr
index 0717a8c1b9b..8b93376cc0d 100644
--- a/tests/ui/drop/drop-order-comparisons.e2021.stderr
+++ b/tests/ui/drop/drop-order-comparisons.e2021.stderr
@@ -1,5 +1,5 @@
 warning: relative drop order changing in Rust 2024
-  --> $DIR/drop-order-comparisons.rs:76:9
+  --> $DIR/drop-order-comparisons.rs:77:9
    |
 LL |       _ = ({
    |  _________-
@@ -29,35 +29,35 @@ LL | |     }, e.mark(3), e.ok(4));
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>
 note: `#3` invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: `#1` invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: `_v` invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: `#2` invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages
 note: the lint level is defined here
-  --> $DIR/drop-order-comparisons.rs:28:25
+  --> $DIR/drop-order-comparisons.rs:29:25
    |
 LL | #![cfg_attr(e2021, warn(rust_2024_compatibility))]
    |                         ^^^^^^^^^^^^^^^^^^^^^^^
    = note: `#[warn(tail_expr_drop_order)]` implied by `#[warn(rust_2024_compatibility)]`
 
 warning: relative drop order changing in Rust 2024
-  --> $DIR/drop-order-comparisons.rs:100:45
+  --> $DIR/drop-order-comparisons.rs:101:45
    |
 LL |       _ = ({
    |  _________-
@@ -77,19 +77,19 @@ LL | |     }, e.mark(1), e.ok(4));
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>
 note: `#2` invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: `#1` invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages
 
 warning: relative drop order changing in Rust 2024
-  --> $DIR/drop-order-comparisons.rs:100:19
+  --> $DIR/drop-order-comparisons.rs:101:19
    |
 LL |       _ = ({
    |  _________-
@@ -109,19 +109,19 @@ LL | |     }, e.mark(1), e.ok(4));
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>
 note: `#2` invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: `#1` invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages
 
 warning: relative drop order changing in Rust 2024
-  --> $DIR/drop-order-comparisons.rs:221:24
+  --> $DIR/drop-order-comparisons.rs:222:24
    |
 LL |       _ = ({
    |  _________-
@@ -141,19 +141,19 @@ LL | |     }, e.mark(2), e.ok(3));
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>
 note: `#2` invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: `#1` invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages
 
 warning: relative drop order changing in Rust 2024
-  --> $DIR/drop-order-comparisons.rs:247:24
+  --> $DIR/drop-order-comparisons.rs:248:24
    |
 LL |       _ = ({
    |  _________-
@@ -173,19 +173,19 @@ LL | |     }, e.mark(2), e.ok(3));
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>
 note: `#2` invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: `#1` invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages
 
 warning: `if let` assigns a shorter lifetime since Edition 2024
-  --> $DIR/drop-order-comparisons.rs:123:13
+  --> $DIR/drop-order-comparisons.rs:124:13
    |
 LL |     _ = (if let Ok(_) = e.ok(4).as_ref() {
    |             ^^^^^^^^^^^^-------^^^^^^^^^
@@ -195,12 +195,12 @@ LL |     _ = (if let Ok(_) = e.ok(4).as_ref() {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>
 note: value invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: the value is now dropped here in Edition 2024
-  --> $DIR/drop-order-comparisons.rs:127:5
+  --> $DIR/drop-order-comparisons.rs:128:5
    |
 LL |     }, e.mark(2), e.ok(3));
    |     ^
@@ -215,7 +215,7 @@ LL ~     } _ => {}}, e.mark(2), e.ok(3));
    |
 
 warning: `if let` assigns a shorter lifetime since Edition 2024
-  --> $DIR/drop-order-comparisons.rs:145:13
+  --> $DIR/drop-order-comparisons.rs:146:13
    |
 LL |     _ = (if let Ok(_) = e.err(4).as_ref() {} else {
    |             ^^^^^^^^^^^^--------^^^^^^^^^
@@ -225,12 +225,12 @@ LL |     _ = (if let Ok(_) = e.err(4).as_ref() {} else {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>
 note: value invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: the value is now dropped here in Edition 2024
-  --> $DIR/drop-order-comparisons.rs:145:44
+  --> $DIR/drop-order-comparisons.rs:146:44
    |
 LL |     _ = (if let Ok(_) = e.err(4).as_ref() {} else {
    |                                            ^
@@ -244,7 +244,7 @@ LL ~     }}, e.mark(2), e.ok(3));
    |
 
 warning: `if let` assigns a shorter lifetime since Edition 2024
-  --> $DIR/drop-order-comparisons.rs:247:12
+  --> $DIR/drop-order-comparisons.rs:248:12
    |
 LL |         if let Ok(_) = e.err(4).as_ref() {} else {
    |            ^^^^^^^^^^^^--------^^^^^^^^^
@@ -254,12 +254,12 @@ LL |         if let Ok(_) = e.err(4).as_ref() {} else {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>
 note: value invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: the value is now dropped here in Edition 2024
-  --> $DIR/drop-order-comparisons.rs:247:43
+  --> $DIR/drop-order-comparisons.rs:248:43
    |
 LL |         if let Ok(_) = e.err(4).as_ref() {} else {
    |                                           ^
@@ -273,7 +273,7 @@ LL ~         }}
    |
 
 warning: `if let` assigns a shorter lifetime since Edition 2024
-  --> $DIR/drop-order-comparisons.rs:352:12
+  --> $DIR/drop-order-comparisons.rs:372:12
    |
 LL |         if let true = e.err(9).is_ok() {} else {
    |            ^^^^^^^^^^^--------^^^^^^^^
@@ -283,12 +283,12 @@ LL |         if let true = e.err(9).is_ok() {} else {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>
 note: value invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: the value is now dropped here in Edition 2024
-  --> $DIR/drop-order-comparisons.rs:352:41
+  --> $DIR/drop-order-comparisons.rs:372:41
    |
 LL |         if let true = e.err(9).is_ok() {} else {
    |                                         ^
@@ -302,7 +302,7 @@ LL ~         }}}}}}}}};
    |
 
 warning: `if let` assigns a shorter lifetime since Edition 2024
-  --> $DIR/drop-order-comparisons.rs:355:12
+  --> $DIR/drop-order-comparisons.rs:375:12
    |
 LL |         if let Ok(_v) = e.err(8) {} else {
    |            ^^^^^^^^^^^^^--------
@@ -312,12 +312,12 @@ LL |         if let Ok(_v) = e.err(8) {} else {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>
 note: value invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: the value is now dropped here in Edition 2024
-  --> $DIR/drop-order-comparisons.rs:355:35
+  --> $DIR/drop-order-comparisons.rs:375:35
    |
 LL |         if let Ok(_v) = e.err(8) {} else {
    |                                   ^
@@ -331,7 +331,7 @@ LL ~         }}}}}}}}};
    |
 
 warning: `if let` assigns a shorter lifetime since Edition 2024
-  --> $DIR/drop-order-comparisons.rs:358:12
+  --> $DIR/drop-order-comparisons.rs:378:12
    |
 LL |         if let Ok(_) = e.err(7) {} else {
    |            ^^^^^^^^^^^^--------
@@ -341,12 +341,12 @@ LL |         if let Ok(_) = e.err(7) {} else {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>
 note: value invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: the value is now dropped here in Edition 2024
-  --> $DIR/drop-order-comparisons.rs:358:34
+  --> $DIR/drop-order-comparisons.rs:378:34
    |
 LL |         if let Ok(_) = e.err(7) {} else {
    |                                  ^
@@ -360,7 +360,7 @@ LL ~         }}}}}}}}};
    |
 
 warning: `if let` assigns a shorter lifetime since Edition 2024
-  --> $DIR/drop-order-comparisons.rs:361:12
+  --> $DIR/drop-order-comparisons.rs:381:12
    |
 LL |         if let Ok(_) = e.err(6).as_ref() {} else {
    |            ^^^^^^^^^^^^--------^^^^^^^^^
@@ -370,12 +370,12 @@ LL |         if let Ok(_) = e.err(6).as_ref() {} else {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>
 note: value invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: the value is now dropped here in Edition 2024
-  --> $DIR/drop-order-comparisons.rs:361:43
+  --> $DIR/drop-order-comparisons.rs:381:43
    |
 LL |         if let Ok(_) = e.err(6).as_ref() {} else {
    |                                           ^
@@ -389,7 +389,7 @@ LL ~         }}}}}}}}};
    |
 
 warning: `if let` assigns a shorter lifetime since Edition 2024
-  --> $DIR/drop-order-comparisons.rs:365:12
+  --> $DIR/drop-order-comparisons.rs:385:12
    |
 LL |         if let Ok(_v) = e.err(5) {} else {
    |            ^^^^^^^^^^^^^--------
@@ -399,12 +399,12 @@ LL |         if let Ok(_v) = e.err(5) {} else {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>
 note: value invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: the value is now dropped here in Edition 2024
-  --> $DIR/drop-order-comparisons.rs:365:35
+  --> $DIR/drop-order-comparisons.rs:385:35
    |
 LL |         if let Ok(_v) = e.err(5) {} else {
    |                                   ^
@@ -418,7 +418,7 @@ LL ~         }}}}}}}}};
    |
 
 warning: `if let` assigns a shorter lifetime since Edition 2024
-  --> $DIR/drop-order-comparisons.rs:368:12
+  --> $DIR/drop-order-comparisons.rs:388:12
    |
 LL |         if let Ok(_) = e.err(4) {} else {
    |            ^^^^^^^^^^^^--------
@@ -428,12 +428,12 @@ LL |         if let Ok(_) = e.err(4) {} else {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>
 note: value invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: the value is now dropped here in Edition 2024
-  --> $DIR/drop-order-comparisons.rs:368:34
+  --> $DIR/drop-order-comparisons.rs:388:34
    |
 LL |         if let Ok(_) = e.err(4) {} else {
    |                                  ^
@@ -447,7 +447,7 @@ LL ~         }}}}}}}}};
    |
 
 warning: `if let` assigns a shorter lifetime since Edition 2024
-  --> $DIR/drop-order-comparisons.rs:404:12
+  --> $DIR/drop-order-comparisons.rs:424:12
    |
 LL |         if let Ok(_) = e.err(4).as_ref() {} else {
    |            ^^^^^^^^^^^^--------^^^^^^^^^
@@ -457,12 +457,12 @@ LL |         if let Ok(_) = e.err(4).as_ref() {} else {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>
 note: value invokes this custom destructor
-  --> $DIR/drop-order-comparisons.rs:571:1
+  --> $DIR/drop-order-comparisons.rs:612:1
    |
 LL | impl<'b> Drop for LogDrop<'b> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: the value is now dropped here in Edition 2024
-  --> $DIR/drop-order-comparisons.rs:404:43
+  --> $DIR/drop-order-comparisons.rs:424:43
    |
 LL |         if let Ok(_) = e.err(4).as_ref() {} else {
    |                                           ^
diff --git a/tests/ui/drop/drop-order-comparisons.rs b/tests/ui/drop/drop-order-comparisons.rs
index 0492b3a4db7..9a10a08a3ff 100644
--- a/tests/ui/drop/drop-order-comparisons.rs
+++ b/tests/ui/drop/drop-order-comparisons.rs
@@ -24,6 +24,7 @@
 //@ [e2024] edition: 2024
 //@ run-pass
 
+#![feature(if_let_guard)]
 #![cfg_attr(e2021, feature(let_chains))]
 #![cfg_attr(e2021, warn(rust_2024_compatibility))]
 
@@ -344,6 +345,25 @@ fn t_if_let_chains_then() {
     e.assert(9);
 }
 
+#[rustfmt::skip]
+fn t_guard_if_let_chains_then() {
+    let e = Events::new();
+    _ = match () {
+        () if e.ok(1).is_ok()
+            && let true = e.ok(9).is_ok()
+            && let Ok(_v) = e.ok(8)
+            && let Ok(_) = e.ok(7)
+            && let Ok(_) = e.ok(6).as_ref()
+            && e.ok(2).is_ok()
+            && let Ok(_v) = e.ok(5)
+            && let Ok(_) = e.ok(4).as_ref() => {
+                e.mark(3);
+            }
+        _ => {}
+    };
+    e.assert(9);
+}
+
 #[cfg(e2021)]
 #[rustfmt::skip]
 fn t_if_let_nested_else() {
@@ -484,6 +504,25 @@ fn t_if_let_chains_then_else() {
     e.assert(9);
 }
 
+#[rustfmt::skip]
+fn t_guard_if_let_chains_then_else() {
+    let e = Events::new();
+    _ = match () {
+       () if e.ok(1).is_ok()
+            && let true = e.ok(8).is_ok()
+            && let Ok(_v) = e.ok(7)
+            && let Ok(_) = e.ok(6)
+            && let Ok(_) = e.ok(5).as_ref()
+            && e.ok(2).is_ok()
+            && let Ok(_v) = e.ok(4)
+            && let Ok(_) = e.err(3) => {}
+        _ => {
+            e.mark(9);
+        }
+    };
+    e.assert(9);
+}
+
 fn main() {
     t_bindings();
     t_tuples();
@@ -502,10 +541,12 @@ fn main() {
     t_if_let_nested_then();
     t_let_else_chained_then();
     t_if_let_chains_then();
+    t_guard_if_let_chains_then();
     t_if_let_nested_else();
     t_if_let_nested_then_else();
     t_let_else_chained_then_else();
     t_if_let_chains_then_else();
+    t_guard_if_let_chains_then_else();
 }
 
 // # Test scaffolding
diff --git a/tests/ui/drop/issue-23338-ensure-param-drop-order.rs b/tests/ui/drop/issue-23338-ensure-param-drop-order.rs
index 6fee4520cbc..54a9d3324b9 100644
--- a/tests/ui/drop/issue-23338-ensure-param-drop-order.rs
+++ b/tests/ui/drop/issue-23338-ensure-param-drop-order.rs
@@ -163,7 +163,7 @@ pub mod d {
             };
             self.log.borrow_mut().push(self.uid);
             indent_println(self.trail, &format!("+-- Drop {}", self));
-            indent_println(::PREF_INDENT, "");
+            indent_println(super::PREF_INDENT, "");
         }
     }
 }
diff --git a/tests/ui/drop/issue-23611-enum-swap-in-drop.rs b/tests/ui/drop/issue-23611-enum-swap-in-drop.rs
index 410b07b16fc..208c6e2ada3 100644
--- a/tests/ui/drop/issue-23611-enum-swap-in-drop.rs
+++ b/tests/ui/drop/issue-23611-enum-swap-in-drop.rs
@@ -256,7 +256,7 @@ pub mod d {
             };
             self.log.borrow_mut().push(self.uid);
             indent_println(self.trail, &format!("+-- Drop {}", self));
-            indent_println(::PREF_INDENT, "");
+            indent_println(super::PREF_INDENT, "");
         }
     }
 }
diff --git a/tests/ui/dropck/dropck_trait_cycle_checked.rs b/tests/ui/dropck/dropck_trait_cycle_checked.rs
index be6ec3e4ed1..ffe43480b12 100644
--- a/tests/ui/dropck/dropck_trait_cycle_checked.rs
+++ b/tests/ui/dropck/dropck_trait_cycle_checked.rs
@@ -17,7 +17,7 @@ mod s {
 }
 
 mod id {
-    use s;
+    use crate::s;
     #[derive(Debug)]
     pub struct Id {
         orig_count: usize,
diff --git a/tests/ui/dyn-compatibility/almost-supertrait-associated-type.rs b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.rs
index 1b1b8bcf03d..d73b67dc080 100644
--- a/tests/ui/dyn-compatibility/almost-supertrait-associated-type.rs
+++ b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.rs
@@ -6,7 +6,6 @@ use std::marker::PhantomData;
 fn transmute<T, U>(t: T) -> U {
     (&PhantomData::<T> as &dyn Foo<T, U>).transmute(t)
     //~^ ERROR the trait `Foo` is not dyn compatible
-    //~| ERROR the trait `Foo` is not dyn compatible
 }
 
 struct ActuallySuper;
diff --git a/tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr
index a384697ee08..acd6dbe7b2c 100644
--- a/tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr
+++ b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr
@@ -1,12 +1,12 @@
 error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/almost-supertrait-associated-type.rs:21:20
+  --> $DIR/almost-supertrait-associated-type.rs:20:20
    |
 LL | impl<T, U> Dyn for dyn Foo<T, U> + '_ {
    |                    ^^^^^^^^^^^^^^^^^^ `Foo` 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/almost-supertrait-associated-type.rs:33:34
+  --> $DIR/almost-supertrait-associated-type.rs:32:34
    |
 LL | trait Foo<T, U>: Super<ActuallySuper, Assoc = T>
    |       --- this trait is not dyn compatible...
@@ -16,14 +16,14 @@ LL |     fn transmute(&self, t: T) -> <Self as Super<NotActuallySuper>>::Assoc;
    = help: consider moving `transmute` to another trait
 
 error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/almost-supertrait-associated-type.rs:7:27
+  --> $DIR/almost-supertrait-associated-type.rs:7:32
    |
 LL |     (&PhantomData::<T> as &dyn Foo<T, U>).transmute(t)
-   |                           ^^^^^^^^^^^^^^ `Foo` is not dyn compatible
+   |                                ^^^^^^^^^ `Foo` 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/almost-supertrait-associated-type.rs:33:34
+  --> $DIR/almost-supertrait-associated-type.rs:32:34
    |
 LL | trait Foo<T, U>: Super<ActuallySuper, Assoc = T>
    |       --- this trait is not dyn compatible...
@@ -32,24 +32,6 @@ LL |     fn transmute(&self, t: T) -> <Self as Super<NotActuallySuper>>::Assoc;
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...because method `transmute` references the `Self` type in its return type
    = help: consider moving `transmute` to another trait
 
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/almost-supertrait-associated-type.rs:7:6
-   |
-LL |     (&PhantomData::<T> as &dyn Foo<T, U>).transmute(t)
-   |      ^^^^^^^^^^^^^^^^^ `Foo` 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/almost-supertrait-associated-type.rs:33:34
-   |
-LL | trait Foo<T, U>: Super<ActuallySuper, Assoc = T>
-   |       --- this trait is not dyn compatible...
-...
-LL |     fn transmute(&self, t: T) -> <Self as Super<NotActuallySuper>>::Assoc;
-   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...because method `transmute` references the `Self` type in its return type
-   = help: consider moving `transmute` to another trait
-   = note: required for the cast from `&PhantomData<T>` to `&dyn Foo<T, U>`
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/associated-consts.rs b/tests/ui/dyn-compatibility/associated-consts.rs
index 10d151d9a8b..69fff81b281 100644
--- a/tests/ui/dyn-compatibility/associated-consts.rs
+++ b/tests/ui/dyn-compatibility/associated-consts.rs
@@ -8,7 +8,6 @@ trait Bar {
 fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
     //~^ ERROR E0038
     t
-    //~^ ERROR E0038
 }
 
 fn main() {
diff --git a/tests/ui/dyn-compatibility/associated-consts.stderr b/tests/ui/dyn-compatibility/associated-consts.stderr
index beaf263af07..dc64c93a577 100644
--- a/tests/ui/dyn-compatibility/associated-consts.stderr
+++ b/tests/ui/dyn-compatibility/associated-consts.stderr
@@ -14,23 +14,6 @@ LL |     const X: usize;
    |           ^ ...because it contains this associated `const`
    = help: consider moving `X` to another trait
 
-error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/associated-consts.rs:10:5
-   |
-LL |     t
-   |     ^ `Bar` 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/associated-consts.rs:5:11
-   |
-LL | trait Bar {
-   |       --- this trait is not dyn compatible...
-LL |     const X: usize;
-   |           ^ ...because it contains this associated `const`
-   = help: consider moving `X` to another trait
-   = note: required for the cast from `&T` to `&dyn Bar`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/generics.rs b/tests/ui/dyn-compatibility/generics.rs
index dcce17f925b..c25bdab361b 100644
--- a/tests/ui/dyn-compatibility/generics.rs
+++ b/tests/ui/dyn-compatibility/generics.rs
@@ -15,14 +15,12 @@ trait Quux {
 fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
     //~^ ERROR E0038
     t
-    //~^ ERROR E0038
 }
 
 fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
     //~^ ERROR E0038
     t as &dyn Bar
     //~^ ERROR E0038
-    //~| ERROR E0038
 }
 
 fn make_quux<T:Quux>(t: &T) -> &dyn Quux {
diff --git a/tests/ui/dyn-compatibility/generics.stderr b/tests/ui/dyn-compatibility/generics.stderr
index c0193010541..79dccc42244 100644
--- a/tests/ui/dyn-compatibility/generics.stderr
+++ b/tests/ui/dyn-compatibility/generics.stderr
@@ -15,7 +15,7 @@ LL |     fn bar<T>(&self, t: T);
    = help: consider moving `bar` to another trait
 
 error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/generics.rs:21:40
+  --> $DIR/generics.rs:20:40
    |
 LL | fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
    |                                        ^^^^^^^ `Bar` is not dyn compatible
@@ -31,43 +31,10 @@ LL |     fn bar<T>(&self, t: T);
    = help: consider moving `bar` to another trait
 
 error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/generics.rs:17:5
-   |
-LL |     t
-   |     ^ `Bar` 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/generics.rs:7:8
-   |
-LL | trait Bar {
-   |       --- this trait is not dyn compatible...
-LL |     fn bar<T>(&self, t: T);
-   |        ^^^ ...because method `bar` has generic type parameters
-   = help: consider moving `bar` to another trait
-   = note: required for the cast from `&T` to `&dyn Bar`
-
-error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/generics.rs:23:10
-   |
-LL |     t as &dyn Bar
-   |          ^^^^^^^^ `Bar` 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/generics.rs:7:8
-   |
-LL | trait Bar {
-   |       --- this trait is not dyn compatible...
-LL |     fn bar<T>(&self, t: T);
-   |        ^^^ ...because method `bar` has generic type parameters
-   = help: consider moving `bar` to another trait
-
-error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/generics.rs:23:5
+  --> $DIR/generics.rs:22:15
    |
 LL |     t as &dyn Bar
-   |     ^ `Bar` is not dyn compatible
+   |               ^^^ `Bar` 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>
@@ -78,8 +45,7 @@ LL | trait Bar {
 LL |     fn bar<T>(&self, t: T);
    |        ^^^ ...because method `bar` has generic type parameters
    = help: consider moving `bar` to another trait
-   = note: required for the cast from `&T` to `&dyn Bar`
 
-error: aborting due to 5 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.rs b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.rs
index 1289d2d7874..d8b1bc5b717 100644
--- a/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.rs
+++ b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.rs
@@ -18,5 +18,4 @@ fn main() {
     let mut thing = Thing;
     let test: &mut dyn Bar = &mut thing;
     //~^ ERROR E0038
-    //~| ERROR E0038
 }
diff --git a/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr
index c1e93ccb83c..dd7b31a70c5 100644
--- a/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr
+++ b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/mention-correct-dyn-incompatible-trait.rs:19:30
+  --> $DIR/mention-correct-dyn-incompatible-trait.rs:19:24
    |
 LL |     let test: &mut dyn Bar = &mut thing;
-   |                              ^^^^^^^^^^ `Bar` is not dyn compatible
+   |                        ^^^ `Bar` 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>
@@ -15,26 +15,7 @@ LL | trait Bar: Foo { }
    |       --- this trait is not dyn compatible...
    = help: consider moving `foo` to another trait
    = help: only type `Thing` implements `Bar`; consider using it directly instead.
-   = note: required for the cast from `&mut Thing` to `&mut dyn Bar`
 
-error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/mention-correct-dyn-incompatible-trait.rs:19:15
-   |
-LL |     let test: &mut dyn Bar = &mut thing;
-   |               ^^^^^^^^^^^^ `Bar` 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/mention-correct-dyn-incompatible-trait.rs:4:8
-   |
-LL |     fn foo<T>(&self, val: T);
-   |        ^^^ ...because method `foo` has generic type parameters
-...
-LL | trait Bar: Foo { }
-   |       --- this trait is not dyn compatible...
-   = help: consider moving `foo` to another trait
-   = help: only type `Thing` implements `Bar`; consider using it directly instead.
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/mentions-Self.rs b/tests/ui/dyn-compatibility/mentions-Self.rs
index ce210f4776f..8b0d5ec6604 100644
--- a/tests/ui/dyn-compatibility/mentions-Self.rs
+++ b/tests/ui/dyn-compatibility/mentions-Self.rs
@@ -18,13 +18,11 @@ trait Quux {
 fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
     //~^ ERROR E0038
     t
-    //~^ ERROR E0038
 }
 
 fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
     //~^ ERROR E0038
     t
-    //~^ ERROR E0038
 }
 
 fn make_quux<T:Quux>(t: &T) -> &dyn Quux {
diff --git a/tests/ui/dyn-compatibility/mentions-Self.stderr b/tests/ui/dyn-compatibility/mentions-Self.stderr
index 6d1ae90152e..9d41e1d92dd 100644
--- a/tests/ui/dyn-compatibility/mentions-Self.stderr
+++ b/tests/ui/dyn-compatibility/mentions-Self.stderr
@@ -15,7 +15,7 @@ LL |     fn bar(&self, x: &Self);
    = help: consider moving `bar` to another trait
 
 error[E0038]: the trait `Baz` is not dyn compatible
-  --> $DIR/mentions-Self.rs:24:31
+  --> $DIR/mentions-Self.rs:23:31
    |
 LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
    |                               ^^^^^^^ `Baz` is not dyn compatible
@@ -30,40 +30,6 @@ LL |     fn baz(&self) -> Self;
    |                      ^^^^ ...because method `baz` references the `Self` type in its return type
    = help: consider moving `baz` to another trait
 
-error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/mentions-Self.rs:20:5
-   |
-LL |     t
-   |     ^ `Bar` 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/mentions-Self.rs:7:22
-   |
-LL | trait Bar {
-   |       --- this trait is not dyn compatible...
-LL |     fn bar(&self, x: &Self);
-   |                      ^^^^^ ...because method `bar` references the `Self` type in this parameter
-   = help: consider moving `bar` to another trait
-   = note: required for the cast from `&T` to `&dyn Bar`
-
-error[E0038]: the trait `Baz` is not dyn compatible
-  --> $DIR/mentions-Self.rs:26:5
-   |
-LL |     t
-   |     ^ `Baz` 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/mentions-Self.rs:11:22
-   |
-LL | trait Baz {
-   |       --- this trait is not dyn compatible...
-LL |     fn baz(&self) -> Self;
-   |                      ^^^^ ...because method `baz` references the `Self` type in its return type
-   = help: consider moving `baz` to another trait
-   = note: required for the cast from `&T` to `&dyn Baz`
-
-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/dyn-compatibility/no-static.rs b/tests/ui/dyn-compatibility/no-static.rs
index 9bd87161972..2d5954afffd 100644
--- a/tests/ui/dyn-compatibility/no-static.rs
+++ b/tests/ui/dyn-compatibility/no-static.rs
@@ -17,5 +17,4 @@ impl Foo for Bar {}
 fn main() {
     let b: Box<dyn Foo> = Box::new(Bar);
     //~^ ERROR E0038
-    //~| ERROR E0038
 }
diff --git a/tests/ui/dyn-compatibility/no-static.stderr b/tests/ui/dyn-compatibility/no-static.stderr
index 814ab0d53c3..c1d5dd6f562 100644
--- a/tests/ui/dyn-compatibility/no-static.stderr
+++ b/tests/ui/dyn-compatibility/no-static.stderr
@@ -23,10 +23,10 @@ LL |     fn foo() where Self: Sized {}
    |              +++++++++++++++++
 
 error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/no-static.rs:18:12
+  --> $DIR/no-static.rs:18:20
    |
 LL |     let b: Box<dyn Foo> = Box::new(Bar);
-   |            ^^^^^^^^^^^^ `Foo` is not dyn compatible
+   |                    ^^^ `Foo` 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>
@@ -46,31 +46,6 @@ help: alternatively, consider constraining `foo` so it does not apply to trait o
 LL |     fn foo() where Self: Sized {}
    |              +++++++++++++++++
 
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/no-static.rs:18:27
-   |
-LL |     let b: Box<dyn Foo> = Box::new(Bar);
-   |                           ^^^^^^^^^^^^^ `Foo` 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/no-static.rs:5:8
-   |
-LL | trait Foo {
-   |       --- this trait is not dyn compatible...
-LL |     fn foo() {}
-   |        ^^^ ...because associated function `foo` has no `self` parameter
-   = help: only type `Bar` implements `Foo`; consider using it directly instead.
-   = note: required for the cast from `Box<Bar>` to `Box<dyn Foo>`
-help: consider turning `foo` into a method by giving it a `&self` argument
-   |
-LL |     fn foo(&self) {}
-   |            +++++
-help: alternatively, consider constraining `foo` so it does not apply to trait objects
-   |
-LL |     fn foo() where Self: Sized {}
-   |              +++++++++++++++++
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/sized-2.rs b/tests/ui/dyn-compatibility/sized-2.rs
index f61d49ee8df..c99dcce46b2 100644
--- a/tests/ui/dyn-compatibility/sized-2.rs
+++ b/tests/ui/dyn-compatibility/sized-2.rs
@@ -10,7 +10,6 @@ trait Bar
 fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
     //~^ ERROR E0038
     t
-    //~^ ERROR E0038
 }
 
 fn main() {
diff --git a/tests/ui/dyn-compatibility/sized-2.stderr b/tests/ui/dyn-compatibility/sized-2.stderr
index 1834d906bb8..70bd5f6dd36 100644
--- a/tests/ui/dyn-compatibility/sized-2.stderr
+++ b/tests/ui/dyn-compatibility/sized-2.stderr
@@ -13,22 +13,6 @@ LL | trait Bar
 LL |     where Self : Sized
    |                  ^^^^^ ...because it requires `Self: Sized`
 
-error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/sized-2.rs:12:5
-   |
-LL |     t
-   |     ^ `Bar` 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/sized-2.rs:5:18
-   |
-LL | trait Bar
-   |       --- this trait is not dyn compatible...
-LL |     where Self : Sized
-   |                  ^^^^^ ...because it requires `Self: Sized`
-   = note: required for the cast from `&T` to `&dyn Bar`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/sized.rs b/tests/ui/dyn-compatibility/sized.rs
index eb5279c17e6..b5a8a4be766 100644
--- a/tests/ui/dyn-compatibility/sized.rs
+++ b/tests/ui/dyn-compatibility/sized.rs
@@ -8,7 +8,6 @@ trait Bar: Sized {
 fn make_bar<T: Bar>(t: &T) -> &dyn Bar {
     //~^ ERROR E0038
     t
-    //~^ ERROR E0038
 }
 
 fn main() {}
diff --git a/tests/ui/dyn-compatibility/sized.stderr b/tests/ui/dyn-compatibility/sized.stderr
index c66e299cf6f..0cc41179d9a 100644
--- a/tests/ui/dyn-compatibility/sized.stderr
+++ b/tests/ui/dyn-compatibility/sized.stderr
@@ -13,22 +13,6 @@ LL | trait Bar: Sized {
    |       |
    |       this trait is not dyn compatible...
 
-error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/sized.rs:10:5
-   |
-LL |     t
-   |     ^ `Bar` 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/sized.rs:4:12
-   |
-LL | trait Bar: Sized {
-   |       ---  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-   = note: required for the cast from `&T` to `&dyn Bar`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/taint-const-eval.rs b/tests/ui/dyn-compatibility/taint-const-eval.rs
index 64c4df611e6..a5c01e1791e 100644
--- a/tests/ui/dyn-compatibility/taint-const-eval.rs
+++ b/tests/ui/dyn-compatibility/taint-const-eval.rs
@@ -7,6 +7,5 @@ trait Qux {
 static FOO: &(dyn Qux + Sync) = "desc";
 //~^ ERROR the trait `Qux` is not dyn compatible
 //~| ERROR the trait `Qux` is not dyn compatible
-//~| ERROR the trait `Qux` is not dyn compatible
 
 fn main() {}
diff --git a/tests/ui/dyn-compatibility/taint-const-eval.stderr b/tests/ui/dyn-compatibility/taint-const-eval.stderr
index 942c20db6ce..585c1f012c7 100644
--- a/tests/ui/dyn-compatibility/taint-const-eval.stderr
+++ b/tests/ui/dyn-compatibility/taint-const-eval.stderr
@@ -22,30 +22,6 @@ LL |     fn bar() where Self: Sized;
    |              +++++++++++++++++
 
 error[E0038]: the trait `Qux` is not dyn compatible
-  --> $DIR/taint-const-eval.rs:7:33
-   |
-LL | static FOO: &(dyn Qux + Sync) = "desc";
-   |                                 ^^^^^^ `Qux` 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/taint-const-eval.rs:4:8
-   |
-LL | trait Qux {
-   |       --- this trait is not dyn compatible...
-LL |     fn bar();
-   |        ^^^ ...because associated function `bar` has no `self` parameter
-   = note: required for the cast from `&'static str` to `&'static (dyn Qux + Sync + 'static)`
-help: consider turning `bar` into a method by giving it a `&self` argument
-   |
-LL |     fn bar(&self);
-   |            +++++
-help: alternatively, consider constraining `bar` so it does not apply to trait objects
-   |
-LL |     fn bar() where Self: Sized;
-   |              +++++++++++++++++
-
-error[E0038]: the trait `Qux` is not dyn compatible
   --> $DIR/taint-const-eval.rs:7:15
    |
 LL | static FOO: &(dyn Qux + Sync) = "desc";
@@ -69,6 +45,6 @@ help: alternatively, consider constraining `bar` so it does not apply to trait o
 LL |     fn bar() where Self: Sized;
    |              +++++++++++++++++
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs
index ec32bec7785..ac3c2aadf29 100644
--- a/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs
+++ b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs
@@ -25,5 +25,4 @@ pub fn foo() {
     let fetcher = fetcher();
     //~^ ERROR the trait `Fetcher` is not dyn compatible
     let _ = fetcher.get();
-    //~^ ERROR the trait `Fetcher` is not dyn compatible
 }
diff --git a/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr
index 1299167159e..867a719e2eb 100644
--- a/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr
+++ b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr
@@ -34,24 +34,6 @@ LL | pub trait Fetcher: Send + Sync {
 LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
    |                      ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on
 
-error[E0038]: the trait `Fetcher` is not dyn compatible
-  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:27:13
-   |
-LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
-   |                      ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self`
-...
-LL |     let _ = fetcher.get();
-   |             ^^^^^^^^^^^^^ `Fetcher` 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/undispatchable-receiver-and-wc-references-Self.rs:11:22
-   |
-LL | pub trait Fetcher: Send + Sync {
-   |           ------- this trait is not dyn compatible...
-LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
-   |                      ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-drop/dyn-drop.rs b/tests/ui/dyn-drop/dyn-drop.rs
index e1668a3f188..f336949d2cb 100644
--- a/tests/ui/dyn-drop/dyn-drop.rs
+++ b/tests/ui/dyn-drop/dyn-drop.rs
@@ -1,8 +1,7 @@
 #![deny(dyn_drop)]
-#![allow(bare_trait_objects)]
 fn foo(_: Box<dyn Drop>) {} //~ ERROR
 fn bar(_: &dyn Drop) {} //~ERROR
-fn baz(_: *mut Drop) {} //~ ERROR
+fn baz(_: *mut dyn Drop) {} //~ ERROR
 struct Foo {
   _x: Box<dyn Drop> //~ ERROR
 }
diff --git a/tests/ui/dyn-drop/dyn-drop.stderr b/tests/ui/dyn-drop/dyn-drop.stderr
index 1b1dbc4d12d..8210d8a4c48 100644
--- a/tests/ui/dyn-drop/dyn-drop.stderr
+++ b/tests/ui/dyn-drop/dyn-drop.stderr
@@ -1,5 +1,5 @@
 error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
-  --> $DIR/dyn-drop.rs:3:19
+  --> $DIR/dyn-drop.rs:2:19
    |
 LL | fn foo(_: Box<dyn Drop>) {}
    |                   ^^^^
@@ -11,25 +11,25 @@ LL | #![deny(dyn_drop)]
    |         ^^^^^^^^
 
 error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
-  --> $DIR/dyn-drop.rs:4:16
+  --> $DIR/dyn-drop.rs:3:16
    |
 LL | fn bar(_: &dyn Drop) {}
    |                ^^^^
 
 error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
-  --> $DIR/dyn-drop.rs:5:16
+  --> $DIR/dyn-drop.rs:4:20
    |
-LL | fn baz(_: *mut Drop) {}
-   |                ^^^^
+LL | fn baz(_: *mut dyn Drop) {}
+   |                    ^^^^
 
 error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
-  --> $DIR/dyn-drop.rs:7:15
+  --> $DIR/dyn-drop.rs:6:15
    |
 LL |   _x: Box<dyn Drop>
    |               ^^^^
 
 error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
-  --> $DIR/dyn-drop.rs:14:16
+  --> $DIR/dyn-drop.rs:13:16
    |
 LL |   type T = dyn Drop;
    |                ^^^^
diff --git a/tests/ui/editions/async-block-2015.rs b/tests/ui/editions/async-block-2015.rs
index a079b4aad91..21549f059de 100644
--- a/tests/ui/editions/async-block-2015.rs
+++ b/tests/ui/editions/async-block-2015.rs
@@ -1,3 +1,4 @@
+//@ edition:2015
 async fn foo() {
 //~^ ERROR `async fn` is not permitted in Rust 2015
 //~| NOTE to use `async fn`, switch to Rust 2018 or later
diff --git a/tests/ui/editions/async-block-2015.stderr b/tests/ui/editions/async-block-2015.stderr
index 574bcacc1cf..139df1758cc 100644
--- a/tests/ui/editions/async-block-2015.stderr
+++ b/tests/ui/editions/async-block-2015.stderr
@@ -1,5 +1,5 @@
 error[E0670]: `async fn` is not permitted in Rust 2015
-  --> $DIR/async-block-2015.rs:1:1
+  --> $DIR/async-block-2015.rs:2:1
    |
 LL | async fn foo() {
    | ^^^^^ to use `async fn`, switch to Rust 2018 or later
@@ -8,7 +8,7 @@ LL | async fn foo() {
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
 error: expected identifier, found keyword `let`
-  --> $DIR/async-block-2015.rs:11:9
+  --> $DIR/async-block-2015.rs:12:9
    |
 LL |     let y = async {
    |             ----- `async` blocks are only allowed in Rust 2018 or later
@@ -19,7 +19,7 @@ LL |         let x = 42;
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
 error: expected identifier, found `42`
-  --> $DIR/async-block-2015.rs:19:9
+  --> $DIR/async-block-2015.rs:20:9
    |
 LL |     let z = async {
    |             ----- `async` blocks are only allowed in Rust 2018 or later
@@ -30,7 +30,7 @@ LL |         42
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
 error[E0422]: cannot find struct, variant or union type `async` in this scope
-  --> $DIR/async-block-2015.rs:7:13
+  --> $DIR/async-block-2015.rs:8:13
    |
 LL |     let x = async {};
    |             ^^^^^ `async` blocks are only allowed in Rust 2018 or later
diff --git a/tests/ui/editions/edition-extern-crate-allowed.stderr b/tests/ui/editions/edition-extern-crate-allowed.stderr
index dde774c520d..4444ab79b38 100644
--- a/tests/ui/editions/edition-extern-crate-allowed.stderr
+++ b/tests/ui/editions/edition-extern-crate-allowed.stderr
@@ -2,7 +2,7 @@ warning: unused extern crate
   --> $DIR/edition-extern-crate-allowed.rs:7:1
    |
 LL | extern crate edition_extern_crate_allowed;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
    |
 note: the lint level is defined here
   --> $DIR/edition-extern-crate-allowed.rs:5:9
@@ -10,6 +10,10 @@ note: the lint level is defined here
 LL | #![warn(rust_2018_idioms)]
    |         ^^^^^^^^^^^^^^^^
    = note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]`
+help: remove the unused `extern crate`
+   |
+LL - extern crate edition_extern_crate_allowed;
+   |
 
 warning: 1 warning emitted
 
diff --git a/tests/ui/empty/empty-struct-braces-expr.stderr b/tests/ui/empty/empty-struct-braces-expr.stderr
index 8ec8ecf46bf..a176107a06e 100644
--- a/tests/ui/empty/empty-struct-braces-expr.stderr
+++ b/tests/ui/empty/empty-struct-braces-expr.stderr
@@ -121,7 +121,7 @@ error[E0599]: no variant or associated item named `Empty3` found for enum `empty
   --> $DIR/empty-struct-braces-expr.rs:25:19
    |
 LL |     let xe3 = XE::Empty3;
-   |                   ^^^^^^ variant or associated item not found in `XE`
+   |                   ^^^^^^ variant or associated item not found in `empty_struct::XE`
    |
 help: there is a variant with a similar name
    |
@@ -132,7 +132,7 @@ error[E0599]: no variant or associated item named `Empty3` found for enum `empty
   --> $DIR/empty-struct-braces-expr.rs:26:19
    |
 LL |     let xe3 = XE::Empty3();
-   |                   ^^^^^^ variant or associated item not found in `XE`
+   |                   ^^^^^^ variant or associated item not found in `empty_struct::XE`
    |
 help: there is a variant with a similar name
    |
diff --git a/tests/ui/enum-discriminant/discriminant_size.rs b/tests/ui/enum-discriminant/discriminant_size.rs
index a3ec1b28e5c..b1feff3c59e 100644
--- a/tests/ui/enum-discriminant/discriminant_size.rs
+++ b/tests/ui/enum-discriminant/discriminant_size.rs
@@ -1,6 +1,5 @@
 //@ run-pass
-#![feature(core_intrinsics, repr128)]
-//~^ WARN the feature `repr128` is incomplete
+#![feature(core_intrinsics)]
 
 use std::intrinsics::discriminant_value;
 
diff --git a/tests/ui/enum-discriminant/discriminant_size.stderr b/tests/ui/enum-discriminant/discriminant_size.stderr
deleted file mode 100644
index 9b1505b5c46..00000000000
--- a/tests/ui/enum-discriminant/discriminant_size.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/discriminant_size.rs:2:29
-   |
-LL | #![feature(core_intrinsics, repr128)]
-   |                             ^^^^^^^
-   |
-   = note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/enum-discriminant/eval-error.rs b/tests/ui/enum-discriminant/eval-error.rs
index 08b71d52a8b..45ac9472a4b 100644
--- a/tests/ui/enum-discriminant/eval-error.rs
+++ b/tests/ui/enum-discriminant/eval-error.rs
@@ -6,7 +6,7 @@ union Foo {
 
 enum Bar {
     Boo = {
-        let _: Option<Foo> = None; //~ ERROR evaluation of constant value failed
+        let _: Option<Foo> = None; //~ ERROR `Foo` has an unknown layout
         0
     },
 }
diff --git a/tests/ui/enum-discriminant/eval-error.stderr b/tests/ui/enum-discriminant/eval-error.stderr
index 6bec2c8b420..b4061d7777b 100644
--- a/tests/ui/enum-discriminant/eval-error.stderr
+++ b/tests/ui/enum-discriminant/eval-error.stderr
@@ -45,11 +45,11 @@ help: wrap the field type in `ManuallyDrop<...>`
 LL |     a: std::mem::ManuallyDrop<str>,
    |        +++++++++++++++++++++++   +
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: the type `Foo` has an unknown layout
   --> $DIR/eval-error.rs:9:30
    |
 LL |         let _: Option<Foo> = None;
-   |                              ^^^^ the type `Foo` has an unknown layout
+   |                              ^^^^ evaluation of constant value failed here
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/enum-discriminant/issue-43398.stderr b/tests/ui/enum-discriminant/issue-43398.stderr
deleted file mode 100644
index fc7bbd06284..00000000000
--- a/tests/ui/enum-discriminant/issue-43398.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/issue-43398.rs:4:12
-   |
-LL | #![feature(repr128)]
-   |            ^^^^^^^
-   |
-   = note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/enum-discriminant/issue-70509-partial_eq.rs b/tests/ui/enum-discriminant/issue-70509-partial_eq.rs
index e98532c1207..5e71972c280 100644
--- a/tests/ui/enum-discriminant/issue-70509-partial_eq.rs
+++ b/tests/ui/enum-discriminant/issue-70509-partial_eq.rs
@@ -1,6 +1,4 @@
 //@ run-pass
-#![feature(repr128)]
-//~^ WARN the feature `repr128` is incomplete
 
 #[derive(PartialEq, Debug)]
 #[repr(i128)]
diff --git a/tests/ui/enum-discriminant/issue-70509-partial_eq.stderr b/tests/ui/enum-discriminant/issue-70509-partial_eq.stderr
deleted file mode 100644
index 2eef930c394..00000000000
--- a/tests/ui/enum-discriminant/issue-70509-partial_eq.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/issue-70509-partial_eq.rs:2:12
-   |
-LL | #![feature(repr128)]
-   |            ^^^^^^^
-   |
-   = note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/enum-discriminant/issue-43398.rs b/tests/ui/enum-discriminant/repr128-get-discriminant-issue-43398.rs
index 574a4b3ad5a..2bb9725fb77 100644
--- a/tests/ui/enum-discriminant/issue-43398.rs
+++ b/tests/ui/enum-discriminant/repr128-get-discriminant-issue-43398.rs
@@ -1,8 +1,6 @@
 //@ run-pass
 
 #![feature(core_intrinsics)]
-#![feature(repr128)]
-//~^ WARN the feature `repr128` is incomplete
 
 #[repr(i128)]
 enum Big { A, B }
diff --git a/tests/ui/enum-discriminant/repr128.rs b/tests/ui/enum-discriminant/repr128.rs
index 075ff7a7676..d59a5b3e256 100644
--- a/tests/ui/enum-discriminant/repr128.rs
+++ b/tests/ui/enum-discriminant/repr128.rs
@@ -1,6 +1,5 @@
 //@ run-pass
-#![feature(repr128, core_intrinsics, discriminant_kind)]
-//~^ WARN the feature `repr128` is incomplete
+#![feature(core_intrinsics, discriminant_kind)]
 
 use std::intrinsics::discriminant_value;
 use std::marker::DiscriminantKind;
diff --git a/tests/ui/enum-discriminant/repr128.stderr b/tests/ui/enum-discriminant/repr128.stderr
deleted file mode 100644
index da8d75c11af..00000000000
--- a/tests/ui/enum-discriminant/repr128.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/repr128.rs:2:12
-   |
-LL | #![feature(repr128, core_intrinsics, discriminant_kind)]
-   |            ^^^^^^^
-   |
-   = note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/ergonomic-clones/async/edition-2015.rs b/tests/ui/ergonomic-clones/async/edition-2015.rs
index d3b2071b9f9..78831249429 100644
--- a/tests/ui/ergonomic-clones/async/edition-2015.rs
+++ b/tests/ui/ergonomic-clones/async/edition-2015.rs
@@ -1,3 +1,4 @@
+//@ edition:2015
 #![feature(ergonomic_clones)]
 #![allow(incomplete_features)]
 
diff --git a/tests/ui/ergonomic-clones/async/edition-2015.stderr b/tests/ui/ergonomic-clones/async/edition-2015.stderr
index b218e6b242e..8de90f4bfd3 100644
--- a/tests/ui/ergonomic-clones/async/edition-2015.stderr
+++ b/tests/ui/ergonomic-clones/async/edition-2015.stderr
@@ -1,5 +1,5 @@
 error: `async use` blocks are only allowed in Rust 2018 or later
-  --> $DIR/edition-2015.rs:5:5
+  --> $DIR/edition-2015.rs:6:5
    |
 LL |     async use {};
    |     ^^^^^^^^^
diff --git a/tests/ui/error-codes/E0038.rs b/tests/ui/error-codes/E0038.rs
index a467767c3fa..9757e2ab10c 100644
--- a/tests/ui/error-codes/E0038.rs
+++ b/tests/ui/error-codes/E0038.rs
@@ -5,8 +5,6 @@ trait Trait {
 fn call_foo(x: Box<dyn Trait>) {
     //~^ ERROR E0038
     let y = x.foo();
-    //~^ ERROR E0038
-    //~| ERROR E0277
 }
 
 fn main() {
diff --git a/tests/ui/error-codes/E0038.stderr b/tests/ui/error-codes/E0038.stderr
index 63a5249a386..e09aefaa0dd 100644
--- a/tests/ui/error-codes/E0038.stderr
+++ b/tests/ui/error-codes/E0038.stderr
@@ -14,33 +14,6 @@ LL |     fn foo(&self) -> Self;
    |                      ^^^^ ...because method `foo` references the `Self` type in its return type
    = help: consider moving `foo` to another trait
 
-error[E0038]: the trait `Trait` is not dyn compatible
-  --> $DIR/E0038.rs:7:13
-   |
-LL |     let y = x.foo();
-   |             ^^^^^^^ `Trait` 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/E0038.rs:2:22
-   |
-LL | trait Trait {
-   |       ----- this trait is not dyn compatible...
-LL |     fn foo(&self) -> Self;
-   |                      ^^^^ ...because method `foo` references the `Self` type in its return type
-   = help: consider moving `foo` to another trait
-
-error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
-  --> $DIR/E0038.rs:7:9
-   |
-LL |     let y = x.foo();
-   |         ^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `dyn Trait`
-   = note: all local variables must have a statically known size
-   = help: unsized locals are gated as an unstable feature
-
-error: aborting due to 3 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0038, E0277.
-For more information about an error, try `rustc --explain E0038`.
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/error-codes/E0080.rs b/tests/ui/error-codes/E0080.rs
index 55f45055f01..0d19f02a9f1 100644
--- a/tests/ui/error-codes/E0080.rs
+++ b/tests/ui/error-codes/E0080.rs
@@ -1,9 +1,6 @@
 enum Enum {
-    X = (1 << 500), //~ ERROR E0080
-    //~| NOTE attempt to shift left by `500_i32`, which would overflow
-    Y = (1 / 0) //~ ERROR E0080
-                //~| NOTE attempt to divide `1_isize` by zero
+    X = (1 << 500), //~ ERROR attempt to shift left by `500_i32`, which would overflow
+    Y = (1 / 0),    //~ ERROR attempt to divide `1_isize` by zero
 }
 
-fn main() {
-}
+fn main() {}
diff --git a/tests/ui/error-codes/E0080.stderr b/tests/ui/error-codes/E0080.stderr
index 60ed9a4358f..431d4e04454 100644
--- a/tests/ui/error-codes/E0080.stderr
+++ b/tests/ui/error-codes/E0080.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: attempt to shift left by `500_i32`, which would overflow
   --> $DIR/E0080.rs:2:9
    |
 LL |     X = (1 << 500),
-   |         ^^^^^^^^^^ attempt to shift left by `500_i32`, which would overflow
+   |         ^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/E0080.rs:4:9
+error[E0080]: attempt to divide `1_isize` by zero
+  --> $DIR/E0080.rs:3:9
    |
-LL |     Y = (1 / 0)
-   |         ^^^^^^^ attempt to divide `1_isize` by zero
+LL |     Y = (1 / 0),
+   |         ^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/error-codes/E0223.stderr b/tests/ui/error-codes/E0223.stderr
index e985a4c9bf0..fbfdce5689a 100644
--- a/tests/ui/error-codes/E0223.stderr
+++ b/tests/ui/error-codes/E0223.stderr
@@ -2,7 +2,13 @@ error[E0223]: ambiguous associated type
   --> $DIR/E0223.rs:8:14
    |
 LL |     let foo: MyTrait::X;
-   |              ^^^^^^^^^^ help: use fully-qualified syntax: `<MyStruct as MyTrait>::X`
+   |              ^^^^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -     let foo: MyTrait::X;
+LL +     let foo: <MyStruct as MyTrait>::X;
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/error-codes/E0657.rs b/tests/ui/error-codes/E0657.rs
index 212c1d9e581..f046788153d 100644
--- a/tests/ui/error-codes/E0657.rs
+++ b/tests/ui/error-codes/E0657.rs
@@ -7,7 +7,7 @@ impl<'a> Lt<'a> for () {}
 impl<T> Id<T> for T {}
 
 fn free_fn_capture_hrtb_in_impl_trait()
-    -> Box<for<'a> Id<impl Lt<'a>>>
+    -> Box<dyn for<'a> Id<impl Lt<'a>>>
         //~^ ERROR `impl Trait` cannot capture higher-ranked lifetime from `dyn` type
 {
     Box::new(())
@@ -16,7 +16,7 @@ fn free_fn_capture_hrtb_in_impl_trait()
 struct Foo;
 impl Foo {
     fn impl_fn_capture_hrtb_in_impl_trait()
-        -> Box<for<'a> Id<impl Lt<'a>>>
+        -> Box<dyn for<'a> Id<impl Lt<'a>>>
             //~^ ERROR `impl Trait` cannot capture higher-ranked lifetime from `dyn` type
     {
         Box::new(())
diff --git a/tests/ui/error-codes/E0657.stderr b/tests/ui/error-codes/E0657.stderr
index c539007cdcf..c9dfc9eb906 100644
--- a/tests/ui/error-codes/E0657.stderr
+++ b/tests/ui/error-codes/E0657.stderr
@@ -1,26 +1,26 @@
 error[E0657]: `impl Trait` cannot capture higher-ranked lifetime from `dyn` type
-  --> $DIR/E0657.rs:10:31
+  --> $DIR/E0657.rs:10:35
    |
-LL |     -> Box<for<'a> Id<impl Lt<'a>>>
-   |                               ^^
+LL |     -> Box<dyn for<'a> Id<impl Lt<'a>>>
+   |                                   ^^
    |
 note: lifetime declared here
-  --> $DIR/E0657.rs:10:16
+  --> $DIR/E0657.rs:10:20
    |
-LL |     -> Box<for<'a> Id<impl Lt<'a>>>
-   |                ^^
+LL |     -> Box<dyn for<'a> Id<impl Lt<'a>>>
+   |                    ^^
 
 error[E0657]: `impl Trait` cannot capture higher-ranked lifetime from `dyn` type
-  --> $DIR/E0657.rs:19:35
+  --> $DIR/E0657.rs:19:39
    |
-LL |         -> Box<for<'a> Id<impl Lt<'a>>>
-   |                                   ^^
+LL |         -> Box<dyn for<'a> Id<impl Lt<'a>>>
+   |                                       ^^
    |
 note: lifetime declared here
-  --> $DIR/E0657.rs:19:20
+  --> $DIR/E0657.rs:19:24
    |
-LL |         -> Box<for<'a> Id<impl Lt<'a>>>
-   |                    ^^
+LL |         -> Box<dyn for<'a> Id<impl Lt<'a>>>
+   |                        ^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/error-codes/E0658.rs b/tests/ui/error-codes/E0658.rs
index 9c9b95d70a7..e51674cdf92 100644
--- a/tests/ui/error-codes/E0658.rs
+++ b/tests/ui/error-codes/E0658.rs
@@ -1,6 +1,3 @@
-#[repr(u128)]
-enum Foo { //~ ERROR E0658
-    Bar(u64),
-}
+use std::intrinsics; //~ ERROR E0658
 
 fn main() {}
diff --git a/tests/ui/error-codes/E0658.stderr b/tests/ui/error-codes/E0658.stderr
index e1e812940ec..ae7ecbbc5cb 100644
--- a/tests/ui/error-codes/E0658.stderr
+++ b/tests/ui/error-codes/E0658.stderr
@@ -1,11 +1,10 @@
-error[E0658]: repr with 128-bit type is unstable
-  --> $DIR/E0658.rs:2:1
+error[E0658]: use of unstable library feature `core_intrinsics`: intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
+  --> $DIR/E0658.rs:1:5
    |
-LL | enum Foo {
-   | ^^^^^^^^
+LL | use std::intrinsics;
+   |     ^^^^^^^^^^^^^^^
    |
-   = note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
-   = help: add `#![feature(repr128)]` to the crate attributes to enable
+   = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/error-codes/E0659.rs b/tests/ui/error-codes/E0659.rs
index c00026bb7a7..d056f1d96dd 100644
--- a/tests/ui/error-codes/E0659.rs
+++ b/tests/ui/error-codes/E0659.rs
@@ -7,8 +7,8 @@ mod earth {
 }
 
 mod collider {
-    pub use moon::*;
-    pub use earth::*;
+    pub use crate::moon::*;
+    pub use crate::earth::*;
 }
 
 fn main() {
diff --git a/tests/ui/error-codes/E0659.stderr b/tests/ui/error-codes/E0659.stderr
index dbb72bb6759..371250b811b 100644
--- a/tests/ui/error-codes/E0659.stderr
+++ b/tests/ui/error-codes/E0659.stderr
@@ -8,14 +8,14 @@ LL |     collider::foo();
 note: `foo` could refer to the function imported here
   --> $DIR/E0659.rs:10:13
    |
-LL |     pub use moon::*;
-   |             ^^^^^^^
+LL |     pub use crate::moon::*;
+   |             ^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `foo` to disambiguate
 note: `foo` could also refer to the function imported here
   --> $DIR/E0659.rs:11:13
    |
-LL |     pub use earth::*;
-   |             ^^^^^^^^
+LL |     pub use crate::earth::*;
+   |             ^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `foo` to disambiguate
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/error-emitter/multiline-removal-suggestion.svg b/tests/ui/error-emitter/multiline-removal-suggestion.svg
index 95c7740f699..9c9bd163ecd 100644
--- a/tests/ui/error-emitter/multiline-removal-suggestion.svg
+++ b/tests/ui/error-emitter/multiline-removal-suggestion.svg
@@ -1,4 +1,4 @@
-<svg width="1902px" height="4322px" xmlns="http://www.w3.org/2000/svg">
+<svg width="2322px" height="4322px" xmlns="http://www.w3.org/2000/svg">
   <style>
     .fg { fill: #AAAAAA }
     .bg { background: #000000 }
@@ -99,7 +99,7 @@
 </tspan>
     <tspan x="10px" y="712px">
 </tspan>
-    <tspan x="10px" y="730px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten&lt;Map&lt;IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@multiline-removal-suggestion.rs:14:8}&gt;&gt;`, but its trait bounds were not satisfied</tspan>
+    <tspan x="10px" y="730px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}&gt;&gt;`, but its trait bounds were not satisfied</tspan>
 </tspan>
     <tspan x="10px" y="748px"><tspan>  </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:24:4</tspan>
 </tspan>
@@ -213,7 +213,7 @@
 </tspan>
     <tspan x="10px" y="1738px">
 </tspan>
-    <tspan x="10px" y="1756px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten&lt;Map&lt;IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@multiline-removal-suggestion.rs:29:8}&gt;&gt;`, but its trait bounds were not satisfied</tspan>
+    <tspan x="10px" y="1756px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}&gt;&gt;`, but its trait bounds were not satisfied</tspan>
 </tspan>
     <tspan x="10px" y="1774px"><tspan>  </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:35:4</tspan>
 </tspan>
@@ -329,7 +329,7 @@
 </tspan>
     <tspan x="10px" y="2782px">
 </tspan>
-    <tspan x="10px" y="2800px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten&lt;Map&lt;IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@multiline-removal-suggestion.rs:40:8}&gt;&gt;`, but its trait bounds were not satisfied</tspan>
+    <tspan x="10px" y="2800px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}&gt;&gt;`, but its trait bounds were not satisfied</tspan>
 </tspan>
     <tspan x="10px" y="2818px"><tspan>  </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:46:4</tspan>
 </tspan>
@@ -441,7 +441,7 @@
 </tspan>
     <tspan x="10px" y="3790px">
 </tspan>
-    <tspan x="10px" y="3808px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten&lt;Map&lt;IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@multiline-removal-suggestion.rs:51:8}&gt;&gt;`, but its trait bounds were not satisfied</tspan>
+    <tspan x="10px" y="3808px"><tspan class="fg-ansi256-009 bold">error[E0599]</tspan><tspan class="bold">: the method `collect` exists for struct `Flatten&lt;Map&lt;std::collections::hash_map::IntoIter&lt;bool, Vec&lt;HashSet&lt;u8&gt;&gt;&gt;, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}&gt;&gt;`, but its trait bounds were not satisfied</tspan>
 </tspan>
     <tspan x="10px" y="3826px"><tspan>  </tspan><tspan class="fg-ansi256-012 bold">--&gt; </tspan><tspan>$DIR/multiline-removal-suggestion.rs:56:4</tspan>
 </tspan>
diff --git a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.rs b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.rs
index 69a4c13530b..d6bb6466227 100644
--- a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.rs
+++ b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.rs
@@ -1,3 +1,4 @@
+//@ edition:2015
 trait MyIterator : Iterator {}
 
 fn main() {
diff --git a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr
index 24f00cfa6be..7f3022c2923 100644
--- a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr
+++ b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr
@@ -1,5 +1,5 @@
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/dynless-turbofish-e0191-issue-91997.rs:4:13
+  --> $DIR/dynless-turbofish-e0191-issue-91997.rs:5:13
    |
 LL |     let _ = MyIterator::next;
    |             ^^^^^^^^^^
@@ -13,7 +13,7 @@ LL |     let _ = <dyn MyIterator>::next;
    |             ++++           +
 
 error[E0191]: the value of the associated type `Item` in `Iterator` must be specified
-  --> $DIR/dynless-turbofish-e0191-issue-91997.rs:4:13
+  --> $DIR/dynless-turbofish-e0191-issue-91997.rs:5:13
    |
 LL |     let _ = MyIterator::next;
    |             ^^^^^^^^^^ help: specify the associated type: `MyIterator::<Item = Type>`
diff --git a/tests/ui/explicit-tail-calls/ctfe-id-unlimited.return.stderr b/tests/ui/explicit-tail-calls/ctfe-id-unlimited.return.stderr
index 8fb51f5b637..2d558e9a561 100644
--- a/tests/ui/explicit-tail-calls/ctfe-id-unlimited.return.stderr
+++ b/tests/ui/explicit-tail-calls/ctfe-id-unlimited.return.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: reached the configured maximum number of stack frames
   --> $DIR/ctfe-id-unlimited.rs:28:20
    |
 LL | const ID_ED: u32 = rec_id(ORIGINAL);
-   |                    ^^^^^^^^^^^^^^^^ reached the configured maximum number of stack frames
+   |                    ^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `rec_id`
   --> $DIR/ctfe-id-unlimited.rs:21:5
diff --git a/tests/ui/explicit-tail-calls/ctfe-id-unlimited.rs b/tests/ui/explicit-tail-calls/ctfe-id-unlimited.rs
index 9e89f4066bb..53cccb38e2b 100644
--- a/tests/ui/explicit-tail-calls/ctfe-id-unlimited.rs
+++ b/tests/ui/explicit-tail-calls/ctfe-id-unlimited.rs
@@ -25,7 +25,7 @@ const fn rec_id(n: u32) -> u32 {
 const ORIGINAL: u32 = 12345;
 // Original number, but with identity function applied
 // (this is the same, but requires execution of the recursion)
-const ID_ED: u32 = rec_id(ORIGINAL); //[return]~ error: evaluation of constant value failed
+const ID_ED: u32 = rec_id(ORIGINAL); //[return]~ ERROR: reached the configured maximum number of stack frames
 // Assert to make absolutely sure the computation actually happens
 const ASSERT: () = assert!(ORIGINAL == ID_ED);
 
diff --git a/tests/ui/explicit-tail-calls/ctfe-tail-call-panic.rs b/tests/ui/explicit-tail-calls/ctfe-tail-call-panic.rs
index e7038a01d2d..bf32232cee3 100644
--- a/tests/ui/explicit-tail-calls/ctfe-tail-call-panic.rs
+++ b/tests/ui/explicit-tail-calls/ctfe-tail-call-panic.rs
@@ -10,7 +10,7 @@ const fn g() {
     //~^ NOTE in this expansion of panic!
 }
 
-const _: () = f(); //~ ERROR evaluation of constant value failed
-//~^ NOTE explicit panic
+const _: () = f(); //~ NOTE evaluation of constant value failed
+//~^ ERROR explicit panic
 
 fn main() {}
diff --git a/tests/ui/explicit-tail-calls/ctfe-tail-call-panic.stderr b/tests/ui/explicit-tail-calls/ctfe-tail-call-panic.stderr
index 3bdd09e9683..457290b76b8 100644
--- a/tests/ui/explicit-tail-calls/ctfe-tail-call-panic.stderr
+++ b/tests/ui/explicit-tail-calls/ctfe-tail-call-panic.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/ctfe-tail-call-panic.rs:13:15
    |
 LL | const _: () = f();
-   |               ^^^ evaluation panicked: explicit panic
+   |               ^^^ evaluation of constant value failed here
    |
 note: inside `g`
   --> $DIR/ctfe-tail-call-panic.rs:9:5
diff --git a/tests/ui/explore-issue-38412.stderr b/tests/ui/explore-issue-38412.stderr
index 884184ec16e..fca5c738d27 100644
--- a/tests/ui/explore-issue-38412.stderr
+++ b/tests/ui/explore-issue-38412.stderr
@@ -103,8 +103,8 @@ LL |     r.pub_mod();
    |
   ::: $DIR/auxiliary/pub-and-stability.rs:116:9
    |
-LL |         pub(in m) fn pub_mod(&self) -> i32 { self.d_priv }
-   |         ---------------------------------- private method defined here
+LL |         pub(in crate::m) fn pub_mod(&self) -> i32 { self.d_priv }
+   |         ----------------------------------------- private method defined here
 
 error[E0624]: method `private` is private
   --> $DIR/explore-issue-38412.rs:50:7
@@ -156,8 +156,8 @@ LL |     t.pub_mod();
    |
   ::: $DIR/auxiliary/pub-and-stability.rs:130:9
    |
-LL |         pub(in m) fn pub_mod(&self) -> i32 { self.0 }
-   |         ---------------------------------- private method defined here
+LL |         pub(in crate::m) fn pub_mod(&self) -> i32 { self.0 }
+   |         ----------------------------------------- private method defined here
 
 error[E0624]: method `private` is private
   --> $DIR/explore-issue-38412.rs:63:7
diff --git a/tests/ui/expr/scope.rs b/tests/ui/expr/scope.rs
index 3a1c8b87da8..b059e43de9e 100644
--- a/tests/ui/expr/scope.rs
+++ b/tests/ui/expr/scope.rs
@@ -1,3 +1,4 @@
+//@ edition:2015
 //@ run-pass
 // Regression test for issue #762
 
diff --git a/tests/ui/extern/extern-empty-string-issue-140884.rs b/tests/ui/extern/extern-empty-string-issue-140884.rs
new file mode 100644
index 00000000000..10291513d34
--- /dev/null
+++ b/tests/ui/extern/extern-empty-string-issue-140884.rs
@@ -0,0 +1,3 @@
+extern "" {} //~ ERROR invalid ABI: found ``
+
+fn main() {}
diff --git a/tests/ui/extern/extern-empty-string-issue-140884.stderr b/tests/ui/extern/extern-empty-string-issue-140884.stderr
new file mode 100644
index 00000000000..accae0c0f7c
--- /dev/null
+++ b/tests/ui/extern/extern-empty-string-issue-140884.stderr
@@ -0,0 +1,15 @@
+error[E0703]: invalid ABI: found ``
+  --> $DIR/extern-empty-string-issue-140884.rs:1:8
+   |
+LL | extern "" {}
+   |        ^^ invalid ABI
+   |
+   = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
+help: there's a similarly named valid ABI `C`
+   |
+LL | extern "C" {}
+   |         +
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0703`.
diff --git a/tests/ui/extern/issue-28324.rs b/tests/ui/extern/issue-28324.rs
index a5e240fa283..4af400d823b 100644
--- a/tests/ui/extern/issue-28324.rs
+++ b/tests/ui/extern/issue-28324.rs
@@ -4,6 +4,6 @@ extern "C" {
 
 pub static BAZ: u32 = *&error_message_count;
 //~^ ERROR use of extern static is unsafe and requires
-//~| ERROR could not evaluate static initializer
+//~| ERROR cannot access extern static
 
 fn main() {}
diff --git a/tests/ui/extern/issue-28324.stderr b/tests/ui/extern/issue-28324.stderr
index 93eb6ff8174..89dfab945be 100644
--- a/tests/ui/extern/issue-28324.stderr
+++ b/tests/ui/extern/issue-28324.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: cannot access extern static `error_message_count`
   --> $DIR/issue-28324.rs:5:23
    |
 LL | pub static BAZ: u32 = *&error_message_count;
-   |                       ^^^^^^^^^^^^^^^^^^^^^ cannot access extern static `error_message_count`
+   |                       ^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
 error[E0133]: use of extern static is unsafe and requires unsafe function or block
   --> $DIR/issue-28324.rs:5:25
diff --git a/tests/ui/feature-gates/feature-gate-asm_cfg.rs b/tests/ui/feature-gates/feature-gate-asm_cfg.rs
new file mode 100644
index 00000000000..ef8bf75b692
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-asm_cfg.rs
@@ -0,0 +1,48 @@
+//@ only-x86_64
+#![crate_type = "lib"]
+
+use std::arch::{asm, global_asm, naked_asm};
+
+global_asm!(
+    "nop",
+    #[cfg(false)]
+    //~^ ERROR the `#[cfg(/* ... */)]` and `#[cfg_attr(/* ... */)]` attributes on assembly are unstable
+    "nop"
+);
+
+#[unsafe(naked)]
+#[no_mangle]
+extern "C" fn naked() {
+    naked_asm!(
+        "mov rax, 5",
+        #[cfg(false)]
+        //~^ ERROR the `#[cfg(/* ... */)]` and `#[cfg_attr(/* ... */)]` attributes on assembly are unstable
+        "mov rax, {a}",
+        "ret",
+        #[cfg(false)]
+        //~^ ERROR the `#[cfg(/* ... */)]` and `#[cfg_attr(/* ... */)]` attributes on assembly are unstable
+        a = const 10,
+    )
+}
+
+fn asm() {
+    unsafe {
+        asm!(
+            "nop",
+            #[cfg(false)]
+            //~^ ERROR the `#[cfg(/* ... */)]` and `#[cfg_attr(/* ... */)]` attributes on assembly are unstable
+            clobber_abi("C"),
+            clobber_abi("C"), //~ ERROR `C` ABI specified multiple times
+        );
+    }
+}
+
+fn bad_attribute() {
+    unsafe {
+        asm!(
+            #[inline]
+            //~^ ERROR this attribute is not supported on assembly
+            "nop"
+        )
+    };
+}
diff --git a/tests/ui/feature-gates/feature-gate-asm_cfg.stderr b/tests/ui/feature-gates/feature-gate-asm_cfg.stderr
new file mode 100644
index 00000000000..e92d1e8c487
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-asm_cfg.stderr
@@ -0,0 +1,57 @@
+error[E0658]: the `#[cfg(/* ... */)]` and `#[cfg_attr(/* ... */)]` attributes on assembly are unstable
+  --> $DIR/feature-gate-asm_cfg.rs:8:5
+   |
+LL |     #[cfg(false)]
+   |     ^^^^^^^^^^^^^
+   |
+   = note: see issue #140364 <https://github.com/rust-lang/rust/issues/140364> for more information
+   = help: add `#![feature(asm_cfg)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error[E0658]: the `#[cfg(/* ... */)]` and `#[cfg_attr(/* ... */)]` attributes on assembly are unstable
+  --> $DIR/feature-gate-asm_cfg.rs:18:9
+   |
+LL |         #[cfg(false)]
+   |         ^^^^^^^^^^^^^
+   |
+   = note: see issue #140364 <https://github.com/rust-lang/rust/issues/140364> for more information
+   = help: add `#![feature(asm_cfg)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error[E0658]: the `#[cfg(/* ... */)]` and `#[cfg_attr(/* ... */)]` attributes on assembly are unstable
+  --> $DIR/feature-gate-asm_cfg.rs:22:9
+   |
+LL |         #[cfg(false)]
+   |         ^^^^^^^^^^^^^
+   |
+   = note: see issue #140364 <https://github.com/rust-lang/rust/issues/140364> for more information
+   = help: add `#![feature(asm_cfg)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error[E0658]: the `#[cfg(/* ... */)]` and `#[cfg_attr(/* ... */)]` attributes on assembly are unstable
+  --> $DIR/feature-gate-asm_cfg.rs:32:13
+   |
+LL |             #[cfg(false)]
+   |             ^^^^^^^^^^^^^
+   |
+   = note: see issue #140364 <https://github.com/rust-lang/rust/issues/140364> for more information
+   = help: add `#![feature(asm_cfg)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: this attribute is not supported on assembly
+  --> $DIR/feature-gate-asm_cfg.rs:43:13
+   |
+LL |             #[inline]
+   |             ^^^^^^^^^
+
+error: `C` ABI specified multiple times
+  --> $DIR/feature-gate-asm_cfg.rs:35:13
+   |
+LL |             clobber_abi("C"),
+   |             ---------------- previously specified here
+LL |             clobber_abi("C"),
+   |             ^^^^^^^^^^^^^^^^
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.rs b/tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.rs
index 278a5451e84..50e5fd1ab7a 100644
--- a/tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.rs
+++ b/tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.rs
@@ -7,8 +7,6 @@ trait Foo {
 async fn takes_dyn_trait(x: &dyn Foo) {
     //~^ ERROR the trait `Foo` is not dyn compatible
     x.bar().await;
-    //~^ ERROR the trait `Foo` is not dyn compatible
-    //~| ERROR the trait `Foo` is not dyn compatible
 }
 
 fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.stderr b/tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.stderr
index ab8c092a826..fd94b0babdb 100644
--- a/tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.stderr
+++ b/tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.stderr
@@ -14,38 +14,6 @@ LL |     async fn bar(&self);
    |              ^^^ ...because method `bar` is `async`
    = help: consider moving `bar` to another trait
 
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/feature-gate-async-fn-in-dyn-trait.rs:9:7
-   |
-LL |     x.bar().await;
-   |       ^^^ `Foo` 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/feature-gate-async-fn-in-dyn-trait.rs:4:14
-   |
-LL | trait Foo {
-   |       --- this trait is not dyn compatible...
-LL |     async fn bar(&self);
-   |              ^^^ ...because method `bar` is `async`
-   = help: consider moving `bar` to another trait
-
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/feature-gate-async-fn-in-dyn-trait.rs:9:5
-   |
-LL |     x.bar().await;
-   |     ^^^^^^^ `Foo` 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/feature-gate-async-fn-in-dyn-trait.rs:4:14
-   |
-LL | trait Foo {
-   |       --- this trait is not dyn compatible...
-LL |     async fn bar(&self);
-   |              ^^^ ...because method `bar` is `async`
-   = help: consider moving `bar` to another trait
-
-error: aborting due to 3 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr b/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr
index 15ef257fbd8..e5edd8e45e6 100644
--- a/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr
+++ b/tests/ui/feature-gates/feature-gate-autodiff-use.has_support.stderr
@@ -1,8 +1,8 @@
 error[E0658]: use of unstable library feature `autodiff`
   --> $DIR/feature-gate-autodiff-use.rs:13:3
    |
-LL | #[autodiff(dfoo, Reverse)]
-   |   ^^^^^^^^
+LL | #[autodiff_reverse(dfoo)]
+   |   ^^^^^^^^^^^^^^^^
    |
    = note: see issue #124509 <https://github.com/rust-lang/rust/issues/124509> for more information
    = help: add `#![feature(autodiff)]` to the crate attributes to enable
@@ -11,8 +11,8 @@ LL | #[autodiff(dfoo, Reverse)]
 error[E0658]: use of unstable library feature `autodiff`
   --> $DIR/feature-gate-autodiff-use.rs:9:5
    |
-LL | use std::autodiff::autodiff;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^
+LL | use std::autodiff::autodiff_reverse;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #124509 <https://github.com/rust-lang/rust/issues/124509> for more information
    = help: add `#![feature(autodiff)]` to the crate attributes to enable
diff --git a/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr b/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr
index f59e4955452..65ba033b358 100644
--- a/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr
+++ b/tests/ui/feature-gates/feature-gate-autodiff-use.no_support.stderr
@@ -1,8 +1,8 @@
 error[E0658]: use of unstable library feature `autodiff`
   --> $DIR/feature-gate-autodiff-use.rs:13:3
    |
-LL | #[autodiff(dfoo, Reverse)]
-   |   ^^^^^^^^
+LL | #[autodiff_reverse(dfoo)]
+   |   ^^^^^^^^^^^^^^^^
    |
    = note: see issue #124509 <https://github.com/rust-lang/rust/issues/124509> for more information
    = help: add `#![feature(autodiff)]` to the crate attributes to enable
@@ -11,14 +11,14 @@ LL | #[autodiff(dfoo, Reverse)]
 error: this rustc version does not support autodiff
   --> $DIR/feature-gate-autodiff-use.rs:13:1
    |
-LL | #[autodiff(dfoo, Reverse)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[autodiff_reverse(dfoo)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0658]: use of unstable library feature `autodiff`
   --> $DIR/feature-gate-autodiff-use.rs:9:5
    |
-LL | use std::autodiff::autodiff;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^
+LL | use std::autodiff::autodiff_reverse;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #124509 <https://github.com/rust-lang/rust/issues/124509> for more information
    = help: add `#![feature(autodiff)]` to the crate attributes to enable
diff --git a/tests/ui/feature-gates/feature-gate-autodiff-use.rs b/tests/ui/feature-gates/feature-gate-autodiff-use.rs
index 602e830b0b2..2864b786c12 100644
--- a/tests/ui/feature-gates/feature-gate-autodiff-use.rs
+++ b/tests/ui/feature-gates/feature-gate-autodiff-use.rs
@@ -6,11 +6,11 @@
 
 #![crate_type = "lib"]
 
-use std::autodiff::autodiff;
+use std::autodiff::autodiff_reverse;
 //[has_support]~^ ERROR use of unstable library feature `autodiff`
 //[no_support]~^^ ERROR use of unstable library feature `autodiff`
 
-#[autodiff(dfoo, Reverse)]
+#[autodiff_reverse(dfoo)]
 //[has_support]~^ ERROR use of unstable library feature `autodiff` [E0658]
 //[no_support]~^^ ERROR use of unstable library feature `autodiff` [E0658]
 //[no_support]~| ERROR this rustc version does not support autodiff
diff --git a/tests/ui/feature-gates/feature-gate-autodiff.has_support.stderr b/tests/ui/feature-gates/feature-gate-autodiff.has_support.stderr
index c25cf7d3373..dcbaba71645 100644
--- a/tests/ui/feature-gates/feature-gate-autodiff.has_support.stderr
+++ b/tests/ui/feature-gates/feature-gate-autodiff.has_support.stderr
@@ -1,12 +1,12 @@
-error: cannot find attribute `autodiff` in this scope
+error: cannot find attribute `autodiff_reverse` in this scope
   --> $DIR/feature-gate-autodiff.rs:9:3
    |
-LL | #[autodiff(dfoo, Reverse)]
-   |   ^^^^^^^^
+LL | #[autodiff_reverse(dfoo)]
+   |   ^^^^^^^^^^^^^^^^
    |
 help: consider importing this attribute macro
    |
-LL + use std::autodiff::autodiff;
+LL + use std::autodiff::autodiff_reverse;
    |
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/feature-gates/feature-gate-autodiff.no_support.stderr b/tests/ui/feature-gates/feature-gate-autodiff.no_support.stderr
index c25cf7d3373..dcbaba71645 100644
--- a/tests/ui/feature-gates/feature-gate-autodiff.no_support.stderr
+++ b/tests/ui/feature-gates/feature-gate-autodiff.no_support.stderr
@@ -1,12 +1,12 @@
-error: cannot find attribute `autodiff` in this scope
+error: cannot find attribute `autodiff_reverse` in this scope
   --> $DIR/feature-gate-autodiff.rs:9:3
    |
-LL | #[autodiff(dfoo, Reverse)]
-   |   ^^^^^^^^
+LL | #[autodiff_reverse(dfoo)]
+   |   ^^^^^^^^^^^^^^^^
    |
 help: consider importing this attribute macro
    |
-LL + use std::autodiff::autodiff;
+LL + use std::autodiff::autodiff_reverse;
    |
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/feature-gates/feature-gate-autodiff.rs b/tests/ui/feature-gates/feature-gate-autodiff.rs
index 4249b229a69..adb35cb8e33 100644
--- a/tests/ui/feature-gates/feature-gate-autodiff.rs
+++ b/tests/ui/feature-gates/feature-gate-autodiff.rs
@@ -6,7 +6,7 @@
 
 // This checks that without the autodiff feature enabled, we can't use it.
 
-#[autodiff(dfoo, Reverse)]
-//[has_support]~^ ERROR cannot find attribute `autodiff` in this scope
-//[no_support]~^^ ERROR cannot find attribute `autodiff` in this scope
+#[autodiff_reverse(dfoo)]
+//[has_support]~^ ERROR cannot find attribute `autodiff_reverse` in this scope
+//[no_support]~^^ ERROR cannot find attribute `autodiff_reverse` in this scope
 fn foo() {}
diff --git a/tests/ui/feature-gates/feature-gate-cfg-version.rs b/tests/ui/feature-gates/feature-gate-cfg-version.rs
index e35784a68d1..ec2446cc146 100644
--- a/tests/ui/feature-gates/feature-gate-cfg-version.rs
+++ b/tests/ui/feature-gates/feature-gate-cfg-version.rs
@@ -1,49 +1,12 @@
-#[cfg(version(42))] //~ ERROR: expected a version literal
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn foo() {}
-#[cfg(version(1.20))] //~ ERROR: expected a version literal
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn foo() -> bool { true }
-#[cfg(version("1.44"))]
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn foo() -> bool { true }
-#[cfg(not(version("1.44")))]
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn foo() -> bool { false }
+//! Feature gate test for `cfg_version`.
+//!
+//! Tracking issue: #64796.
 
-#[cfg(version("1.43", "1.44", "1.45"))] //~ ERROR: expected single version literal
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn bar() -> bool  { false }
-#[cfg(version(false))] //~ ERROR: expected a version literal
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn bar() -> bool  { false }
-#[cfg(version("foo"))] //~ WARNING: unknown version literal format
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn bar() -> bool  { false }
-#[cfg(version("999"))] //~ WARNING: unknown version literal format
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn bar() -> bool  { false }
-#[cfg(version("-1"))] //~ WARNING: unknown version literal format
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn bar() -> bool  { false }
-#[cfg(version("65536"))] //~ WARNING: unknown version literal format
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn bar() -> bool  { false }
-#[cfg(version("0"))] //~ WARNING: unknown version literal format
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn bar() -> bool { true }
-#[cfg(version("1.0"))]
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn bar() -> bool { true }
-#[cfg(version("1.65536.2"))] //~ WARNING: unknown version literal format
-//~^ ERROR `cfg(version)` is experimental and subject to change
-fn bar() -> bool  { false }
-#[cfg(version("1.20.0-stable"))] //~ WARNING: unknown version literal format
+#[cfg(version("1.42"))]
 //~^ ERROR `cfg(version)` is experimental and subject to change
 fn bar() {}
 
 fn main() {
-    assert!(foo());
-    assert!(bar());
-    assert!(cfg!(version("1.42"))); //~ ERROR `cfg(version)` is experimental and subject to change
+    assert!(cfg!(version("1.42")));
+    //~^ ERROR `cfg(version)` is experimental and subject to change
 }
diff --git a/tests/ui/feature-gates/feature-gate-cfg-version.stderr b/tests/ui/feature-gates/feature-gate-cfg-version.stderr
index c1c3e8e5897..7cb2f1e07af 100644
--- a/tests/ui/feature-gates/feature-gate-cfg-version.stderr
+++ b/tests/ui/feature-gates/feature-gate-cfg-version.stderr
@@ -1,39 +1,7 @@
 error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:1:7
+  --> $DIR/feature-gate-cfg-version.rs:5:7
    |
-LL | #[cfg(version(42))]
-   |       ^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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: expected a version literal
-  --> $DIR/feature-gate-cfg-version.rs:1:15
-   |
-LL | #[cfg(version(42))]
-   |               ^^
-
-error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:4:7
-   |
-LL | #[cfg(version(1.20))]
-   |       ^^^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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: expected a version literal
-  --> $DIR/feature-gate-cfg-version.rs:4:15
-   |
-LL | #[cfg(version(1.20))]
-   |               ^^^^
-
-error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:7:7
-   |
-LL | #[cfg(version("1.44"))]
+LL | #[cfg(version("1.42"))]
    |       ^^^^^^^^^^^^^^^
    |
    = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
@@ -41,171 +9,7 @@ LL | #[cfg(version("1.44"))]
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:10:11
-   |
-LL | #[cfg(not(version("1.44")))]
-   |           ^^^^^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:14:7
-   |
-LL | #[cfg(version("1.43", "1.44", "1.45"))]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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: expected single version literal
-  --> $DIR/feature-gate-cfg-version.rs:14:7
-   |
-LL | #[cfg(version("1.43", "1.44", "1.45"))]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:17:7
-   |
-LL | #[cfg(version(false))]
-   |       ^^^^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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: expected a version literal
-  --> $DIR/feature-gate-cfg-version.rs:17:15
-   |
-LL | #[cfg(version(false))]
-   |               ^^^^^
-
-error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:20:7
-   |
-LL | #[cfg(version("foo"))]
-   |       ^^^^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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: unknown version literal format, assuming it refers to a future version
-  --> $DIR/feature-gate-cfg-version.rs:20:15
-   |
-LL | #[cfg(version("foo"))]
-   |               ^^^^^
-
-error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:23:7
-   |
-LL | #[cfg(version("999"))]
-   |       ^^^^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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: unknown version literal format, assuming it refers to a future version
-  --> $DIR/feature-gate-cfg-version.rs:23:15
-   |
-LL | #[cfg(version("999"))]
-   |               ^^^^^
-
-error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:26:7
-   |
-LL | #[cfg(version("-1"))]
-   |       ^^^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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: unknown version literal format, assuming it refers to a future version
-  --> $DIR/feature-gate-cfg-version.rs:26:15
-   |
-LL | #[cfg(version("-1"))]
-   |               ^^^^
-
-error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:29:7
-   |
-LL | #[cfg(version("65536"))]
-   |       ^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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: unknown version literal format, assuming it refers to a future version
-  --> $DIR/feature-gate-cfg-version.rs:29:15
-   |
-LL | #[cfg(version("65536"))]
-   |               ^^^^^^^
-
-error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:32:7
-   |
-LL | #[cfg(version("0"))]
-   |       ^^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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: unknown version literal format, assuming it refers to a future version
-  --> $DIR/feature-gate-cfg-version.rs:32:15
-   |
-LL | #[cfg(version("0"))]
-   |               ^^^
-
-error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:35:7
-   |
-LL | #[cfg(version("1.0"))]
-   |       ^^^^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:38:7
-   |
-LL | #[cfg(version("1.65536.2"))]
-   |       ^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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: unknown version literal format, assuming it refers to a future version
-  --> $DIR/feature-gate-cfg-version.rs:38:15
-   |
-LL | #[cfg(version("1.65536.2"))]
-   |               ^^^^^^^^^^^
-
-error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:41:7
-   |
-LL | #[cfg(version("1.20.0-stable"))]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #64796 <https://github.com/rust-lang/rust/issues/64796> for more information
-   = help: add `#![feature(cfg_version)]` 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: unknown version literal format, assuming it refers to a future version
-  --> $DIR/feature-gate-cfg-version.rs:41:15
-   |
-LL | #[cfg(version("1.20.0-stable"))]
-   |               ^^^^^^^^^^^^^^^
-
-error[E0658]: `cfg(version)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-version.rs:48:18
+  --> $DIR/feature-gate-cfg-version.rs:10:18
    |
 LL |     assert!(cfg!(version("1.42")));
    |                  ^^^^^^^^^^^^^^^
@@ -214,6 +18,6 @@ LL |     assert!(cfg!(version("1.42")));
    = help: add `#![feature(cfg_version)]` 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 19 previous errors; 7 warnings emitted
+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-coroutines.e2024.stderr b/tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr
index 381e7a210be..c29c328ac14 100644
--- a/tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr
+++ b/tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr
@@ -5,7 +5,7 @@ LL |     yield true;
    |     ^^^^^^^^^^
    |
    = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = help: add `#![feature(yield_expr)]` 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]: yield syntax is experimental
@@ -15,7 +15,7 @@ LL |     let _ = || yield true;
    |                ^^^^^^^^^^
    |
    = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = help: add `#![feature(yield_expr)]` 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]: yield syntax is experimental
@@ -25,7 +25,7 @@ LL |     yield;
    |     ^^^^^
    |
    = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = help: add `#![feature(yield_expr)]` 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]: yield syntax is experimental
@@ -35,7 +35,7 @@ LL |     yield 0;
    |     ^^^^^^^
    |
    = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = help: add `#![feature(yield_expr)]` 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]: yield syntax is experimental
diff --git a/tests/ui/feature-gates/feature-gate-coroutines.none.stderr b/tests/ui/feature-gates/feature-gate-coroutines.none.stderr
index 381e7a210be..c29c328ac14 100644
--- a/tests/ui/feature-gates/feature-gate-coroutines.none.stderr
+++ b/tests/ui/feature-gates/feature-gate-coroutines.none.stderr
@@ -5,7 +5,7 @@ LL |     yield true;
    |     ^^^^^^^^^^
    |
    = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = help: add `#![feature(yield_expr)]` 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]: yield syntax is experimental
@@ -15,7 +15,7 @@ LL |     let _ = || yield true;
    |                ^^^^^^^^^^
    |
    = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = help: add `#![feature(yield_expr)]` 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]: yield syntax is experimental
@@ -25,7 +25,7 @@ LL |     yield;
    |     ^^^^^
    |
    = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = help: add `#![feature(yield_expr)]` 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]: yield syntax is experimental
@@ -35,7 +35,7 @@ LL |     yield 0;
    |     ^^^^^^^
    |
    = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = help: add `#![feature(yield_expr)]` 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]: yield syntax is experimental
diff --git a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs
index 37eabbf1602..8d7ccea9e64 100644
--- a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs
+++ b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs
@@ -31,5 +31,4 @@ impl Trait for i32 {
 fn main() {
     Ptr(Box::new(4)) as Ptr<dyn Trait>;
     //~^ ERROR the trait `Trait` is not dyn compatible
-    //~^^ ERROR the trait `Trait` is not dyn compatible
 }
diff --git a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr
index 6634ce12118..c70ab65aa90 100644
--- a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr
+++ b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Trait` is not dyn compatible
-  --> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:32:25
+  --> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:32:33
    |
 LL |     fn ptr(self: Ptr<Self>);
    |                  --------- help: consider changing method `ptr`'s `self` parameter to be `&self`: `&Self`
 ...
 LL |     Ptr(Box::new(4)) as Ptr<dyn Trait>;
-   |                         ^^^^^^^^^^^^^^ `Trait` is not dyn compatible
+   |                                 ^^^^^ `Trait` 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>
@@ -17,26 +17,6 @@ LL |     fn ptr(self: Ptr<Self>);
    |                  ^^^^^^^^^ ...because method `ptr`'s `self` parameter cannot be dispatched on
    = help: only type `i32` implements `Trait`; consider using it directly instead.
 
-error[E0038]: the trait `Trait` is not dyn compatible
-  --> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:32:5
-   |
-LL |     fn ptr(self: Ptr<Self>);
-   |                  --------- help: consider changing method `ptr`'s `self` parameter to be `&self`: `&Self`
-...
-LL |     Ptr(Box::new(4)) as Ptr<dyn Trait>;
-   |     ^^^^^^^^^^^^^^^^ `Trait` 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/feature-gate-dispatch-from-dyn-missing-impl.rs:25:18
-   |
-LL | trait Trait {
-   |       ----- this trait is not dyn compatible...
-LL |     fn ptr(self: Ptr<Self>);
-   |                  ^^^^^^^^^ ...because method `ptr`'s `self` parameter cannot be dispatched on
-   = help: only type `i32` implements `Trait`; consider using it directly instead.
-   = note: required for the cast from `Ptr<{integer}>` to `Ptr<dyn Trait>`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/feature-gates/feature-gate-guard-patterns.rs b/tests/ui/feature-gates/feature-gate-guard-patterns.rs
index 74fb5817081..095f66eeb90 100644
--- a/tests/ui/feature-gates/feature-gate-guard-patterns.rs
+++ b/tests/ui/feature-gates/feature-gate-guard-patterns.rs
@@ -22,7 +22,6 @@ fn other_guards_dont() {
 
     let ((x if guard(x)) | x) = 0;
     //~^ ERROR: guard patterns are experimental
-    //~| ERROR: cannot find value `x`
 
     if let (x if guard(x)) = 0 {}
     //~^ ERROR: guard patterns are experimental
@@ -37,7 +36,6 @@ fn other_guards_dont() {
 
 fn even_as_function_parameters(((x if guard(x), _) | (_, x)): (i32, i32)) {}
 //~^ ERROR: guard patterns are experimental
-//~| ERROR: cannot find value `x`
 
 fn guard<T>(x: T) -> bool {
     unimplemented!()
diff --git a/tests/ui/feature-gates/feature-gate-guard-patterns.stderr b/tests/ui/feature-gates/feature-gate-guard-patterns.stderr
index 8b85b663889..b0bf302f3cb 100644
--- a/tests/ui/feature-gates/feature-gate-guard-patterns.stderr
+++ b/tests/ui/feature-gates/feature-gate-guard-patterns.stderr
@@ -10,24 +10,6 @@ LL -         (0 if guard(0)) => {},
 LL +         0 if guard(0) => {},
    |
 
-error[E0425]: cannot find value `x` in this scope
-  --> $DIR/feature-gate-guard-patterns.rs:23:22
-   |
-LL |     let ((x if guard(x)) | x) = 0;
-   |                      ^ not found in this scope
-
-error[E0425]: cannot find value `x` in this scope
-  --> $DIR/feature-gate-guard-patterns.rs:38:45
-   |
-LL | fn even_as_function_parameters(((x if guard(x), _) | (_, x)): (i32, i32)) {}
-   |                                             ^
-   |
-help: the binding `x` is available in a different scope in the same function
-  --> $DIR/feature-gate-guard-patterns.rs:23:11
-   |
-LL |     let ((x if guard(x)) | x) = 0;
-   |           ^
-
 error[E0658]: guard patterns are experimental
   --> $DIR/feature-gate-guard-patterns.rs:18:15
    |
@@ -51,7 +33,7 @@ LL |     let ((x if guard(x)) | x) = 0;
    = help: consider using match arm guards
 
 error[E0658]: guard patterns are experimental
-  --> $DIR/feature-gate-guard-patterns.rs:27:18
+  --> $DIR/feature-gate-guard-patterns.rs:26:18
    |
 LL |     if let (x if guard(x)) = 0 {}
    |                  ^^^^^^^^
@@ -62,7 +44,7 @@ LL |     if let (x if guard(x)) = 0 {}
    = help: consider using match arm guards
 
 error[E0658]: guard patterns are experimental
-  --> $DIR/feature-gate-guard-patterns.rs:30:21
+  --> $DIR/feature-gate-guard-patterns.rs:29:21
    |
 LL |     while let (x if guard(x)) = 0 {}
    |                     ^^^^^^^^
@@ -73,7 +55,7 @@ LL |     while let (x if guard(x)) = 0 {}
    = help: consider using match arm guards
 
 error[E0658]: guard patterns are experimental
-  --> $DIR/feature-gate-guard-patterns.rs:34:21
+  --> $DIR/feature-gate-guard-patterns.rs:33:21
    |
 LL |     while let (x if guard(x)) = 0 {}
    |                     ^^^^^^^^
@@ -84,7 +66,7 @@ LL |     while let (x if guard(x)) = 0 {}
    = help: consider using match arm guards
 
 error[E0658]: guard patterns are experimental
-  --> $DIR/feature-gate-guard-patterns.rs:38:39
+  --> $DIR/feature-gate-guard-patterns.rs:37:39
    |
 LL | fn even_as_function_parameters(((x if guard(x), _) | (_, x)): (i32, i32)) {}
    |                                       ^^^^^^^^
@@ -94,7 +76,6 @@ LL | fn even_as_function_parameters(((x if guard(x), _) | (_, x)): (i32, i32)) {
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
    = help: consider using match arm guards
 
-error: aborting due to 9 previous errors
+error: aborting due to 7 previous errors
 
-Some errors have detailed explanations: E0425, E0658.
-For more information about an error, try `rustc --explain E0425`.
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-repr128.rs b/tests/ui/feature-gates/feature-gate-repr128.rs
deleted file mode 100644
index 0290874dd27..00000000000
--- a/tests/ui/feature-gates/feature-gate-repr128.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-#[repr(u128)]
-enum A { //~ ERROR repr with 128-bit type is unstable
-    A(u64)
-}
-
-fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-repr128.stderr b/tests/ui/feature-gates/feature-gate-repr128.stderr
deleted file mode 100644
index 2607032447b..00000000000
--- a/tests/ui/feature-gates/feature-gate-repr128.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0658]: repr with 128-bit type is unstable
-  --> $DIR/feature-gate-repr128.rs:2:1
-   |
-LL | enum A {
-   | ^^^^^^
-   |
-   = note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
-   = help: add `#![feature(repr128)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-yield-expr.stderr b/tests/ui/feature-gates/feature-gate-yield-expr.stderr
index ad8a15a0f36..bfac9e49803 100644
--- a/tests/ui/feature-gates/feature-gate-yield-expr.stderr
+++ b/tests/ui/feature-gates/feature-gate-yield-expr.stderr
@@ -5,7 +5,7 @@ LL |     yield ();
    |     ^^^^^^^^
    |
    = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = help: add `#![feature(yield_expr)]` 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]: yield syntax is experimental
diff --git a/tests/ui/feature-gates/version_check.rs b/tests/ui/feature-gates/version_check.rs
deleted file mode 100644
index e212dc74fd1..00000000000
--- a/tests/ui/feature-gates/version_check.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-//@ run-pass
-//@ only-linux
-//@ only-x86
-// FIXME: this should be more like //@ needs-subprocesses
-use std::process::Command;
-
-fn main() {
-    let signalled_version = "Ceci n'est pas une rustc";
-    let version = Command::new(std::env::var_os("RUSTC").unwrap())
-        .env("RUSTC_OVERRIDE_VERSION_STRING", signalled_version)
-        .arg("--version")
-        .output()
-        .unwrap()
-        .stdout;
-    let version = std::str::from_utf8(&version).unwrap().strip_prefix("rustc ").unwrap().trim_end();
-    assert_eq!(version, signalled_version);
-}
diff --git a/tests/ui/fn/coerce-suggestion-infer-region.rs b/tests/ui/fn/coerce-suggestion-infer-region.rs
new file mode 100644
index 00000000000..7edb828c973
--- /dev/null
+++ b/tests/ui/fn/coerce-suggestion-infer-region.rs
@@ -0,0 +1,26 @@
+//! Functions with a mismatch between the expected and found type where the difference is a
+//! reference may trigger analysis for additional help. In this test the expected type will be
+//! &'a Container<&'a u8> and the found type will be Container<&'?0 u8>.
+//!
+//! This test exercises a scenario where the found type being analyzed contains an inference region
+//! variable ('?0). This cannot be used in comparisons because the variable no longer exists by the
+//! time the later analysis is performed.
+//!
+//! This is a regression test of #140823
+
+trait MyFn<P> {}
+
+struct Container<T> {
+    data: T,
+}
+
+struct Desugared {
+    callback: Box<dyn for<'a> MyFn<&'a Container<&'a u8>>>,
+}
+
+fn test(callback: Box<dyn for<'a> MyFn<Container<&'a u8>>>) -> Desugared {
+    Desugared { callback }
+    //~^ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/tests/ui/fn/coerce-suggestion-infer-region.stderr b/tests/ui/fn/coerce-suggestion-infer-region.stderr
new file mode 100644
index 00000000000..9dd0fcf76ce
--- /dev/null
+++ b/tests/ui/fn/coerce-suggestion-infer-region.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/coerce-suggestion-infer-region.rs:22:17
+   |
+LL |     Desugared { callback }
+   |                 ^^^^^^^^ expected `Box<dyn MyFn<&Container<&u8>>>`, found `Box<dyn MyFn<Container<&u8>>>`
+   |
+   = note: expected struct `Box<(dyn for<'a> MyFn<&'a Container<&'a u8>> + 'static)>`
+              found struct `Box<(dyn for<'a> MyFn<Container<&'a u8>> + 'static)>`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/bare-fn-implements-fn-mut.rs b/tests/ui/functions-closures/bare-fn-implements-fn-mut.rs
index 49b31f28f8a..52d5ad3d0f7 100644
--- a/tests/ui/bare-fn-implements-fn-mut.rs
+++ b/tests/ui/functions-closures/bare-fn-implements-fn-mut.rs
@@ -1,3 +1,7 @@
+//! Tests that bare functions implement the `FnMut` trait.
+//!
+//! See <https://github.com/rust-lang/rust/issues/15448>.
+
 //@ run-pass
 
 fn call_f<F:FnMut()>(mut f: F) {
diff --git a/tests/ui/functions-closures/fn-help-with-err.stderr b/tests/ui/functions-closures/fn-help-with-err.stderr
index e5fe4611434..9dc56c3652a 100644
--- a/tests/ui/functions-closures/fn-help-with-err.stderr
+++ b/tests/ui/functions-closures/fn-help-with-err.stderr
@@ -8,7 +8,7 @@ error[E0599]: no method named `bar` found for struct `Arc<{closure@$DIR/fn-help-
   --> $DIR/fn-help-with-err.rs:19:10
    |
 LL |     arc2.bar();
-   |          ^^^ method not found in `Arc<{closure@fn-help-with-err.rs:18:36}>`
+   |          ^^^ method not found in `Arc<{closure@$DIR/fn-help-with-err.rs:18:36: 18:38}>`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `Bar` defines an item `bar`, perhaps you need to implement it
diff --git a/tests/ui/generic-associated-types/gat-in-trait-path.rs b/tests/ui/generic-associated-types/gat-in-trait-path.rs
index 7523803eacf..774e16d84c5 100644
--- a/tests/ui/generic-associated-types/gat-in-trait-path.rs
+++ b/tests/ui/generic-associated-types/gat-in-trait-path.rs
@@ -26,5 +26,4 @@ fn main() {
   let foo = Fooer(5);
   f(Box::new(foo));
   //~^ ERROR the trait `Foo` is not dyn compatible
-  //~| ERROR the trait `Foo` is not dyn compatible
 }
diff --git a/tests/ui/generic-associated-types/gat-in-trait-path.stderr b/tests/ui/generic-associated-types/gat-in-trait-path.stderr
index e57f6b48401..d4ccd80f146 100644
--- a/tests/ui/generic-associated-types/gat-in-trait-path.stderr
+++ b/tests/ui/generic-associated-types/gat-in-trait-path.stderr
@@ -30,23 +30,6 @@ LL |     type A<'a> where Self: 'a;
    |          ^ ...because it contains the generic associated type `A`
    = help: consider moving `A` to another trait
 
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/gat-in-trait-path.rs:27:5
-   |
-LL |   f(Box::new(foo));
-   |     ^^^^^^^^^^^^^ `Foo` 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/gat-in-trait-path.rs:6:10
-   |
-LL | trait Foo {
-   |       --- this trait is not dyn compatible...
-LL |     type A<'a> where Self: 'a;
-   |          ^ ...because it contains the generic associated type `A`
-   = help: consider moving `A` to another trait
-   = note: required for the cast from `Box<Fooer<{integer}>>` to `Box<(dyn Foo<A<'a> = &'a ()> + 'static)>`
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-associated-types/issue-71176.rs b/tests/ui/generic-associated-types/issue-71176.rs
index d3a0caffec1..8ecfa93750d 100644
--- a/tests/ui/generic-associated-types/issue-71176.rs
+++ b/tests/ui/generic-associated-types/issue-71176.rs
@@ -18,6 +18,5 @@ fn main() {
     Holder {
         inner: Box::new(()),
         //~^ ERROR: the trait `Provider` is not dyn compatible
-        //~| ERROR: the trait `Provider` is not dyn compatible
     };
 }
diff --git a/tests/ui/generic-associated-types/issue-71176.stderr b/tests/ui/generic-associated-types/issue-71176.stderr
index 56439f6dfea..f231056a2ee 100644
--- a/tests/ui/generic-associated-types/issue-71176.stderr
+++ b/tests/ui/generic-associated-types/issue-71176.stderr
@@ -82,25 +82,7 @@ LL |     type A<'a>;
    = help: consider moving `A` to another trait
    = help: only type `()` implements `Provider`; consider using it directly instead.
 
-error[E0038]: the trait `Provider` is not dyn compatible
-  --> $DIR/issue-71176.rs:19:16
-   |
-LL |         inner: Box::new(()),
-   |                ^^^^^^^^^^^^ `Provider` 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-71176.rs:2:10
-   |
-LL | trait Provider {
-   |       -------- this trait is not dyn compatible...
-LL |     type A<'a>;
-   |          ^ ...because it contains the generic associated type `A`
-   = help: consider moving `A` to another trait
-   = help: only type `()` implements `Provider`; consider using it directly instead.
-   = note: required for the cast from `Box<()>` to `Box<(dyn Provider<A<'_> = _> + 'static), {type error}>`
-
-error: aborting due to 6 previous errors
+error: aborting due to 5 previous errors
 
 Some errors have detailed explanations: E0038, E0107.
 For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-associated-types/issue-76535.rs b/tests/ui/generic-associated-types/issue-76535.rs
index 9e18c82c7f1..dc697401a58 100644
--- a/tests/ui/generic-associated-types/issue-76535.rs
+++ b/tests/ui/generic-associated-types/issue-76535.rs
@@ -33,6 +33,5 @@ impl SuperTrait for SuperStruct {
 fn main() {
     let sub: Box<dyn SuperTrait<SubType = SubStruct>> = Box::new(SuperStruct::new(0));
       //~^ ERROR missing generics for associated type
-      //~^^ ERROR the trait
       //~| ERROR the trait
 }
diff --git a/tests/ui/generic-associated-types/issue-76535.stderr b/tests/ui/generic-associated-types/issue-76535.stderr
index b828234afa1..2daf9d817bb 100644
--- a/tests/ui/generic-associated-types/issue-76535.stderr
+++ b/tests/ui/generic-associated-types/issue-76535.stderr
@@ -15,10 +15,10 @@ LL |     let sub: Box<dyn SuperTrait<SubType<'a> = SubStruct>> = Box::new(SuperS
    |                                        ++++
 
 error[E0038]: the trait `SuperTrait` is not dyn compatible
-  --> $DIR/issue-76535.rs:34:14
+  --> $DIR/issue-76535.rs:34:22
    |
 LL |     let sub: Box<dyn SuperTrait<SubType = SubStruct>> = Box::new(SuperStruct::new(0));
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` is not dyn compatible
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` 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>
@@ -32,26 +32,7 @@ LL |     type SubType<'a>: SubTrait where Self: 'a;
    = help: only type `SuperStruct` implements `SuperTrait` within this crate; consider using it directly instead.
    = note: `SuperTrait` may be implemented in other crates; if you want to support your users passing their own types here, you can't refer to a specific type
 
-error[E0038]: the trait `SuperTrait` is not dyn compatible
-  --> $DIR/issue-76535.rs:34:57
-   |
-LL |     let sub: Box<dyn SuperTrait<SubType = SubStruct>> = Box::new(SuperStruct::new(0));
-   |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` 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-76535.rs:4:10
-   |
-LL | pub trait SuperTrait {
-   |           ---------- this trait is not dyn compatible...
-LL |     type SubType<'a>: SubTrait where Self: 'a;
-   |          ^^^^^^^ ...because it contains the generic associated type `SubType`
-   = help: consider moving `SubType` to another trait
-   = help: only type `SuperStruct` implements `SuperTrait` within this crate; consider using it directly instead.
-   = note: `SuperTrait` may be implemented in other crates; if you want to support your users passing their own types here, you can't refer to a specific type
-   = note: required for the cast from `Box<SuperStruct>` to `Box<dyn SuperTrait<SubType<'_> = SubStruct<'_>>>`
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0038, E0107.
 For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-associated-types/issue-78671.stderr b/tests/ui/generic-associated-types/issue-78671.stderr
index c6da137672d..fff061a8ada 100644
--- a/tests/ui/generic-associated-types/issue-78671.stderr
+++ b/tests/ui/generic-associated-types/issue-78671.stderr
@@ -15,10 +15,10 @@ LL |     Box::new(Family) as &dyn CollectionFamily<Member<T>=usize>
    |                                                     +++
 
 error[E0038]: the trait `CollectionFamily` is not dyn compatible
-  --> $DIR/issue-78671.rs:5:25
+  --> $DIR/issue-78671.rs:5:30
    |
 LL |     Box::new(Family) as &dyn CollectionFamily<Member=usize>
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `CollectionFamily` is not dyn compatible
+   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `CollectionFamily` 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>
diff --git a/tests/ui/generic-associated-types/issue-79422.rs b/tests/ui/generic-associated-types/issue-79422.rs
index fba7a86990e..462614b3612 100644
--- a/tests/ui/generic-associated-types/issue-79422.rs
+++ b/tests/ui/generic-associated-types/issue-79422.rs
@@ -15,12 +15,17 @@ impl<'a, T> RefCont<'a, T> for Box<T> {
 }
 
 trait MapLike<K, V> {
-    type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
+    type VRefCont<'a>: RefCont<'a, V>
+    where
+        Self: 'a;
     fn get<'a>(&'a self, key: &K) -> Option<Self::VRefCont<'a>>;
 }
 
 impl<K: Ord, V: 'static> MapLike<K, V> for std::collections::BTreeMap<K, V> {
-    type VRefCont<'a> = &'a V where Self: 'a;
+    type VRefCont<'a>
+        = &'a V
+    where
+        Self: 'a;
     fn get<'a>(&'a self, key: &K) -> Option<&'a V> {
         std::collections::BTreeMap::get(self, key)
     }
@@ -37,8 +42,7 @@ impl<K, V: Default> MapLike<K, V> for Source {
 
 fn main() {
     let m = Box::new(std::collections::BTreeMap::<u8, u8>::new())
-    //~^ ERROR the trait
         as Box<dyn MapLike<u8, u8, VRefCont = dyn RefCont<'_, u8>>>;
-      //~^ ERROR missing generics for associated type
-      //~| ERROR the trait
+    //~^ ERROR the trait
+    //~| ERROR missing generics for associated type
 }
diff --git a/tests/ui/generic-associated-types/issue-79422.stderr b/tests/ui/generic-associated-types/issue-79422.stderr
index 6311e4de272..dcf3a9008de 100644
--- a/tests/ui/generic-associated-types/issue-79422.stderr
+++ b/tests/ui/generic-associated-types/issue-79422.stderr
@@ -1,5 +1,5 @@
 error[E0107]: missing generics for associated type `MapLike::VRefCont`
-  --> $DIR/issue-79422.rs:41:36
+  --> $DIR/issue-79422.rs:45:36
    |
 LL |         as Box<dyn MapLike<u8, u8, VRefCont = dyn RefCont<'_, u8>>>;
    |                                    ^^^^^^^^ expected 1 lifetime argument
@@ -7,7 +7,7 @@ LL |         as Box<dyn MapLike<u8, u8, VRefCont = dyn RefCont<'_, u8>>>;
 note: associated type defined here, with 1 lifetime parameter: `'a`
   --> $DIR/issue-79422.rs:18:10
    |
-LL |     type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
+LL |     type VRefCont<'a>: RefCont<'a, V>
    |          ^^^^^^^^ --
 help: add missing lifetime argument
    |
@@ -15,10 +15,10 @@ LL |         as Box<dyn MapLike<u8, u8, VRefCont<'a> = dyn RefCont<'_, u8>>>;
    |                                            ++++
 
 error[E0038]: the trait `MapLike` is not dyn compatible
-  --> $DIR/issue-79422.rs:41:12
+  --> $DIR/issue-79422.rs:45:20
    |
 LL |         as Box<dyn MapLike<u8, u8, VRefCont = dyn RefCont<'_, u8>>>;
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` is not dyn compatible
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` 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>
@@ -26,28 +26,11 @@ note: for a trait to be dyn compatible it needs to allow building a vtable
    |
 LL | trait MapLike<K, V> {
    |       ------- this trait is not dyn compatible...
-LL |     type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
+LL |     type VRefCont<'a>: RefCont<'a, V>
    |          ^^^^^^^^ ...because it contains the generic associated type `VRefCont`
    = help: consider moving `VRefCont` to another trait
 
-error[E0038]: the trait `MapLike` is not dyn compatible
-  --> $DIR/issue-79422.rs:39:13
-   |
-LL |     let m = Box::new(std::collections::BTreeMap::<u8, u8>::new())
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` 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-79422.rs:18:10
-   |
-LL | trait MapLike<K, V> {
-   |       ------- this trait is not dyn compatible...
-LL |     type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
-   |          ^^^^^^^^ ...because it contains the generic associated type `VRefCont`
-   = help: consider moving `VRefCont` to another trait
-   = note: required for the cast from `Box<BTreeMap<u8, u8>>` to `Box<dyn MapLike<u8, u8, VRefCont<'_> = (dyn RefCont<'_, u8> + 'static)>>`
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0038, E0107.
 For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-associated-types/trait-objects.rs b/tests/ui/generic-associated-types/trait-objects.rs
index 256cfee4c80..87817111b54 100644
--- a/tests/ui/generic-associated-types/trait-objects.rs
+++ b/tests/ui/generic-associated-types/trait-objects.rs
@@ -8,8 +8,6 @@ trait StreamingIterator {
 fn min_size(x: &mut dyn for<'a> StreamingIterator<Item<'a> = &'a i32>) -> usize {
     //~^ ERROR the trait `StreamingIterator` is not dyn compatible
     x.size_hint().0
-    //~^ ERROR the trait `StreamingIterator` is not dyn compatible
-    //~| ERROR the trait `StreamingIterator` is not dyn compatible
 }
 
 fn main() {}
diff --git a/tests/ui/generic-associated-types/trait-objects.stderr b/tests/ui/generic-associated-types/trait-objects.stderr
index 7d95718ec87..8c3af6b654a 100644
--- a/tests/ui/generic-associated-types/trait-objects.stderr
+++ b/tests/ui/generic-associated-types/trait-objects.stderr
@@ -14,38 +14,6 @@ LL |     type Item<'a> where Self: 'a;
    |          ^^^^ ...because it contains the generic associated type `Item`
    = help: consider moving `Item` to another trait
 
-error[E0038]: the trait `StreamingIterator` is not dyn compatible
-  --> $DIR/trait-objects.rs:10:7
-   |
-LL |     x.size_hint().0
-   |       ^^^^^^^^^ `StreamingIterator` 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/trait-objects.rs:2:10
-   |
-LL | trait StreamingIterator {
-   |       ----------------- this trait is not dyn compatible...
-LL |     type Item<'a> where Self: 'a;
-   |          ^^^^ ...because it contains the generic associated type `Item`
-   = help: consider moving `Item` to another trait
-
-error[E0038]: the trait `StreamingIterator` is not dyn compatible
-  --> $DIR/trait-objects.rs:10:5
-   |
-LL |     x.size_hint().0
-   |     ^^^^^^^^^^^^^ `StreamingIterator` 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/trait-objects.rs:2:10
-   |
-LL | trait StreamingIterator {
-   |       ----------------- this trait is not dyn compatible...
-LL |     type Item<'a> where Self: 'a;
-   |          ^^^^ ...because it contains the generic associated type `Item`
-   = help: consider moving `Item` to another trait
-
-error: aborting due to 3 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-const-items/def-site-eval.fail.stderr b/tests/ui/generic-const-items/def-site-eval.fail.stderr
index fa07f385522..b8616547390 100644
--- a/tests/ui/generic-const-items/def-site-eval.fail.stderr
+++ b/tests/ui/generic-const-items/def-site-eval.fail.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `_::<'_>` failed
-  --> $DIR/def-site-eval.rs:14:20
+error[E0080]: evaluation panicked: explicit panic
+  --> $DIR/def-site-eval.rs:13:20
    |
 LL | const _<'_a>: () = panic!();
-   |                    ^^^^^^^^ evaluation panicked: explicit panic
+   |                    ^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/generic-const-items/def-site-eval.rs b/tests/ui/generic-const-items/def-site-eval.rs
index 3ed7f96aed0..fa3ef5907b2 100644
--- a/tests/ui/generic-const-items/def-site-eval.rs
+++ b/tests/ui/generic-const-items/def-site-eval.rs
@@ -1,16 +1,15 @@
 //! Test that we only evaluate free const items (their def site to be clear)
 //! whose generics don't require monomorphization.
 #![feature(generic_const_items)]
-#![allow(incomplete_features)]
+#![expect(incomplete_features)]
 
 //@ revisions: fail pass
-//@[fail] build-fail (we require monomorphization)
-//@[pass] build-pass (we require monomorphization)
+//@[pass] check-pass
 
 const _<_T>: () = panic!();
 const _<const _N: usize>: () = panic!();
 
 #[cfg(fail)]
-const _<'_a>: () = panic!(); //[fail]~ ERROR evaluation of `_::<'_>` failed
+const _<'_a>: () = panic!(); //[fail]~ ERROR evaluation panicked: explicit panic
 
 fn main() {}
diff --git a/tests/ui/generic-const-items/def-site-predicates-wf.rs b/tests/ui/generic-const-items/def-site-predicates-wf.rs
new file mode 100644
index 00000000000..39cdcc304f3
--- /dev/null
+++ b/tests/ui/generic-const-items/def-site-predicates-wf.rs
@@ -0,0 +1,9 @@
+//! Ensure that we check the predicates for well-formedness at the definition site.
+#![feature(generic_const_items)]
+#![expect(incomplete_features)]
+
+const _: () = ()
+where
+    Vec<str>: Sized; //~ ERROR the size for values of type `str` cannot be known at compilation time
+
+fn main() {}
diff --git a/tests/ui/generic-const-items/def-site-predicates-wf.stderr b/tests/ui/generic-const-items/def-site-predicates-wf.stderr
new file mode 100644
index 00000000000..62db089fd55
--- /dev/null
+++ b/tests/ui/generic-const-items/def-site-predicates-wf.stderr
@@ -0,0 +1,13 @@
+error[E0277]: the size for values of type `str` cannot be known at compilation time
+  --> $DIR/def-site-predicates-wf.rs:7:15
+   |
+LL |     Vec<str>: Sized;
+   |               ^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `str`
+note: required by an implicit `Sized` bound in `Vec`
+  --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs
index 93f01c9577c..102c7b1e5f9 100644
--- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs
+++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs
@@ -3,7 +3,7 @@
 
 // Ensure that we check if trivial bounds on const items hold or not.
 
-const UNUSABLE: () = () //~ ERROR evaluation of constant value failed
+const UNUSABLE: () = () //~ ERROR entering unreachable code
 where
     String: Copy;
 
diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr
index 407682fee56..a89356fadfd 100644
--- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr
+++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr
@@ -1,10 +1,10 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: entering unreachable code
   --> $DIR/trivially-unsatisfied-bounds-0.rs:6:1
    |
 LL | / const UNUSABLE: () = ()
 LL | | where
 LL | |     String: Copy;
-   | |_________________^ entering unreachable code
+   | |_________________^ evaluation of constant value failed here
 
 error[E0277]: the trait bound `String: Copy` is not satisfied
   --> $DIR/trivially-unsatisfied-bounds-0.rs:11:13
diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.rs b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.rs
index 9243deac870..ebe97a65bbf 100644
--- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.rs
+++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.rs
@@ -7,6 +7,6 @@
 const UNUSED: () = ()
 where
     String: Copy;
-//~^^^ ERROR evaluation of constant value failed
+//~^^^ ERROR unreachable code
 
 fn main() {}
diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr
index b8438a0589c..3aa26eb1656 100644
--- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr
+++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr
@@ -1,10 +1,10 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: entering unreachable code
   --> $DIR/trivially-unsatisfied-bounds-1.rs:7:1
    |
 LL | / const UNUSED: () = ()
 LL | | where
 LL | |     String: Copy;
-   | |_________________^ entering unreachable code
+   | |_________________^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.rs b/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.rs
index 961e5b4aeeb..13ce1f7de5b 100644
--- a/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.rs
+++ b/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.rs
@@ -5,7 +5,7 @@
 
 const POSITIVE<const N: usize>: usize = N
 where
-    [(); N - 1]:; //~ ERROR evaluation of `POSITIVE::<0>::{constant#0}` failed
+    [(); N - 1]:; //~ ERROR overflow
 
 fn main() {
     let _ = POSITIVE::<0>;
diff --git a/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr b/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr
index f522190e8aa..a9f11ac31c3 100644
--- a/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr
+++ b/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `POSITIVE::<0>::{constant#0}` failed
+error[E0080]: attempt to compute `0_usize - 1_usize`, which would overflow
   --> $DIR/unsatisfied-evaluatable-bounds.rs:8:10
    |
 LL |     [(); N - 1]:;
-   |          ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
+   |          ^^^^^ evaluation of `POSITIVE::<0>::{constant#0}` failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/generics/post_monomorphization_error_backtrace.rs b/tests/ui/generics/post_monomorphization_error_backtrace.rs
index f5f36ef03ae..9f53751584b 100644
--- a/tests/ui/generics/post_monomorphization_error_backtrace.rs
+++ b/tests/ui/generics/post_monomorphization_error_backtrace.rs
@@ -4,12 +4,12 @@ fn assert_zst<T>() {
     struct F<T>(T);
     impl<T> F<T> {
         const V: () = assert!(std::mem::size_of::<T>() == 0);
-        //~^ ERROR: evaluation of `assert_zst::F::<u32>::V` failed [E0080]
+        //~^ NOTE: evaluation of `assert_zst::F::<u32>::V` failed
         //~| NOTE: in this expansion of assert!
-        //~| NOTE: assertion failed
-        //~| ERROR: evaluation of `assert_zst::F::<i32>::V` failed [E0080]
+        //~| ERROR: assertion failed
+        //~| NOTE: evaluation of `assert_zst::F::<i32>::V` failed
         //~| NOTE: in this expansion of assert!
-        //~| NOTE: assertion failed
+        //~| ERROR: assertion failed
     }
     F::<T>::V;
     //~^NOTE: erroneous constant
@@ -23,7 +23,6 @@ fn foo<U>() {
     //~| NOTE: the above error was encountered while instantiating `fn assert_zst::<i32>`
 }
 
-
 fn bar<V>() {
     foo::<V>()
 }
diff --git a/tests/ui/generics/post_monomorphization_error_backtrace.stderr b/tests/ui/generics/post_monomorphization_error_backtrace.stderr
index 96aa04ee359..6953414f0c2 100644
--- a/tests/ui/generics/post_monomorphization_error_backtrace.stderr
+++ b/tests/ui/generics/post_monomorphization_error_backtrace.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `assert_zst::F::<u32>::V` failed
+error[E0080]: evaluation panicked: assertion failed: std::mem::size_of::<T>() == 0
   --> $DIR/post_monomorphization_error_backtrace.rs:6:23
    |
 LL |         const V: () = assert!(std::mem::size_of::<T>() == 0);
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: assertion failed: std::mem::size_of::<T>() == 0
+   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `assert_zst::F::<u32>::V` failed here
 
 note: erroneous constant encountered
   --> $DIR/post_monomorphization_error_backtrace.rs:14:5
@@ -16,11 +16,11 @@ note: the above error was encountered while instantiating `fn assert_zst::<u32>`
 LL |     assert_zst::<U>()
    |     ^^^^^^^^^^^^^^^^^
 
-error[E0080]: evaluation of `assert_zst::F::<i32>::V` failed
+error[E0080]: evaluation panicked: assertion failed: std::mem::size_of::<T>() == 0
   --> $DIR/post_monomorphization_error_backtrace.rs:6:23
    |
 LL |         const V: () = assert!(std::mem::size_of::<T>() == 0);
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: assertion failed: std::mem::size_of::<T>() == 0
+   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `assert_zst::F::<i32>::V` failed here
 
 note: erroneous constant encountered
   --> $DIR/post_monomorphization_error_backtrace.rs:14:5
diff --git a/tests/ui/bounds-lifetime.rs b/tests/ui/higher-ranked/higher-ranked-invalid-bounds.rs
index f26976066ac..be161aeb53d 100644
--- a/tests/ui/bounds-lifetime.rs
+++ b/tests/ui/higher-ranked/higher-ranked-invalid-bounds.rs
@@ -1,3 +1,5 @@
+//! Tests invalid lifetime bounds and generic parameters in higher-ranked types.
+
 type A = for<'b, 'a: 'b> fn(); //~ ERROR bounds cannot be used in this context
 type B = for<'b, 'a: 'b,> fn(); //~ ERROR bounds cannot be used in this context
 type C = for<'b, 'a: 'b +> fn(); //~ ERROR bounds cannot be used in this context
diff --git a/tests/ui/bounds-lifetime.stderr b/tests/ui/higher-ranked/higher-ranked-invalid-bounds.stderr
index 01b314f3d1b..60ee7a7cf76 100644
--- a/tests/ui/bounds-lifetime.stderr
+++ b/tests/ui/higher-ranked/higher-ranked-invalid-bounds.stderr
@@ -1,23 +1,23 @@
 error: bounds cannot be used in this context
-  --> $DIR/bounds-lifetime.rs:1:22
+  --> $DIR/higher-ranked-invalid-bounds.rs:3:22
    |
 LL | type A = for<'b, 'a: 'b> fn();
    |                      ^^
 
 error: bounds cannot be used in this context
-  --> $DIR/bounds-lifetime.rs:2:22
+  --> $DIR/higher-ranked-invalid-bounds.rs:4:22
    |
 LL | type B = for<'b, 'a: 'b,> fn();
    |                      ^^
 
 error: bounds cannot be used in this context
-  --> $DIR/bounds-lifetime.rs:3:22
+  --> $DIR/higher-ranked-invalid-bounds.rs:5:22
    |
 LL | type C = for<'b, 'a: 'b +> fn();
    |                      ^^
 
 error[E0658]: only lifetime parameters can be used in this context
-  --> $DIR/bounds-lifetime.rs:4:18
+  --> $DIR/higher-ranked-invalid-bounds.rs:6:18
    |
 LL | type D = for<'a, T> fn();
    |                  ^
@@ -27,7 +27,7 @@ LL | type D = for<'a, T> fn();
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: only lifetime parameters can be used in this context
-  --> $DIR/bounds-lifetime.rs:5:18
+  --> $DIR/higher-ranked-invalid-bounds.rs:7:18
    |
 LL | type E = dyn for<T, U> Fn();
    |                  ^  ^
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-1.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-1.stderr
index 240e1c3dde1..21dc5c66adf 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-1.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-1.stderr
@@ -1,4 +1,4 @@
-error[E0599]: the method `filterx` exists for struct `Map<Repeat, {closure@hrtb-doesnt-borrow-self-1.rs:113:27}>`, but its trait bounds were not satisfied
+error[E0599]: the method `filterx` exists for struct `Map<Repeat, {closure@$DIR/hrtb-doesnt-borrow-self-1.rs:113:27: 113:34}>`, but its trait bounds were not satisfied
   --> $DIR/hrtb-doesnt-borrow-self-1.rs:114:22
    |
 LL | pub struct Map<S, F> {
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.stderr
index 13041ea2bb0..23b979e2ef0 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.stderr
@@ -1,4 +1,4 @@
-error[E0599]: the method `countx` exists for struct `Filter<Map<Repeat, fn(&u64) -> &u64 {identity::<u64>}>, {closure@hrtb-doesnt-borrow-self-2.rs:109:30}>`, but its trait bounds were not satisfied
+error[E0599]: the method `countx` exists for struct `Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, {closure@$DIR/hrtb-doesnt-borrow-self-2.rs:109:30: 109:37}>`, but its trait bounds were not satisfied
   --> $DIR/hrtb-doesnt-borrow-self-2.rs:110:24
    |
 LL | pub struct Filter<S, F> {
diff --git a/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.rs b/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.rs
index 5d039cd5dc6..cc813430468 100644
--- a/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.rs
+++ b/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.rs
@@ -13,8 +13,6 @@ fn needs_bar(_: *mut Type2) {}
 fn main() {
     let x: &dyn Foo = &();
     //~^ ERROR the trait `Foo` is not dyn compatible
-    //~| ERROR the trait `Foo` is not dyn compatible
 
     needs_bar(x);
-    //~^ ERROR mismatched types
 }
diff --git a/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.stderr b/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.stderr
index 183ee678d7a..d35394a4f66 100644
--- a/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/span-bug-issue-121597.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/span-bug-issue-121597.rs:14:23
+  --> $DIR/span-bug-issue-121597.rs:14:17
    |
 LL |     let x: &dyn Foo = &();
-   |                       ^^^ `Foo` is not dyn compatible
+   |                 ^^^ `Foo` 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>
@@ -12,40 +12,7 @@ LL | trait Foo: for<T> Bar<T> {}
    |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
    |       |
    |       this trait is not dyn compatible...
-   = note: required for the cast from `&()` to `&dyn Foo`
 
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/span-bug-issue-121597.rs:14:12
-   |
-LL |     let x: &dyn Foo = &();
-   |            ^^^^^^^^ `Foo` 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/span-bug-issue-121597.rs:4:12
-   |
-LL | trait Foo: for<T> Bar<T> {}
-   |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
-   |       |
-   |       this trait is not dyn compatible...
-
-error[E0308]: mismatched types
-  --> $DIR/span-bug-issue-121597.rs:18:15
-   |
-LL |     needs_bar(x);
-   |     --------- ^ types differ in mutability
-   |     |
-   |     arguments to this function are incorrect
-   |
-   = note: expected raw pointer `*mut Type2`
-                found reference `&dyn Foo`
-note: function defined here
-  --> $DIR/span-bug-issue-121597.rs:11:4
-   |
-LL | fn needs_bar(_: *mut Type2) {}
-   |    ^^^^^^^^^ -------------
-
-error: aborting due to 3 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0038, E0308.
-For more information about an error, try `rustc --explain E0038`.
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.rs b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.rs
index 901d4b39cf3..accd173ce23 100644
--- a/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.rs
+++ b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.rs
@@ -21,6 +21,8 @@ impl DynIncompatible for B {
 
 fn car() -> dyn DynIncompatible { //~ ERROR the trait `DynIncompatible` is not dyn compatible
 //~^ ERROR return type cannot be a trait object without pointer indirection
+//~| ERROR the trait `DynIncompatible` is not dyn compatible
+//~| ERROR the trait `DynIncompatible` is not dyn compatible
     if true {
         return A;
     }
@@ -29,9 +31,9 @@ fn car() -> dyn DynIncompatible { //~ ERROR the trait `DynIncompatible` is not d
 
 fn cat() -> Box<dyn DynIncompatible> { //~ ERROR the trait `DynIncompatible` is not dyn compatible
     if true {
-        return Box::new(A); //~ ERROR is not dyn compatible
+        return Box::new(A);
     }
-    Box::new(B) //~ ERROR is not dyn compatible
+    Box::new(B)
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr
index 2c314b07bce..a8787a01a6f 100644
--- a/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr
+++ b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr
@@ -41,6 +41,7 @@ help: alternatively, box the return type, and wrap all of the returned values in
    |
 LL ~ fn car() -> Box<dyn DynIncompatible> {
 LL |
+...
 LL |     if true {
 LL ~         return Box::new(A);
 LL |     }
@@ -48,7 +49,7 @@ LL ~     Box::new(B)
    |
 
 error[E0038]: the trait `DynIncompatible` is not dyn compatible
-  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:30:17
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:32:17
    |
 LL | fn cat() -> Box<dyn DynIncompatible> {
    |                 ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` is not dyn compatible
@@ -76,10 +77,10 @@ LL |     fn foo() -> Self where Self: Sized;
    |                      +++++++++++++++++
 
 error[E0038]: the trait `DynIncompatible` is not dyn compatible
-  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:32:16
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:22:17
    |
-LL |         return Box::new(A);
-   |                ^^^^^^^^^^^ `DynIncompatible` is not dyn compatible
+LL | fn car() -> dyn DynIncompatible {
+   |                 ^^^^^^^^^^^^^^^ `DynIncompatible` 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>
@@ -94,7 +95,11 @@ LL |     fn foo() -> Self;
              B
            consider defining an enum where each variant holds one of these types,
            implementing `DynIncompatible` for this new enum and using it instead
-   = note: required for the cast from `Box<A>` to `Box<(dyn DynIncompatible + 'static)>`
+help: consider using an opaque type instead
+   |
+LL - fn car() -> dyn DynIncompatible {
+LL + fn car() -> impl DynIncompatible {
+   |
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) -> Self;
@@ -105,10 +110,10 @@ LL |     fn foo() -> Self where Self: Sized;
    |                      +++++++++++++++++
 
 error[E0038]: the trait `DynIncompatible` is not dyn compatible
-  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:34:5
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:22:17
    |
-LL |     Box::new(B)
-   |     ^^^^^^^^^^^ `DynIncompatible` is not dyn compatible
+LL | fn car() -> dyn DynIncompatible {
+   |                 ^^^^^^^^^^^^^^^ `DynIncompatible` 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>
@@ -123,7 +128,12 @@ LL |     fn foo() -> Self;
              B
            consider defining an enum where each variant holds one of these types,
            implementing `DynIncompatible` for this new enum and using it instead
-   = note: required for the cast from `Box<B>` to `Box<(dyn DynIncompatible + 'static)>`
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: consider using an opaque type instead
+   |
+LL - fn car() -> dyn DynIncompatible {
+LL + fn car() -> impl DynIncompatible {
+   |
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) -> Self;
diff --git a/tests/ui/impl-trait/in-trait/dyn-compatibility.rs b/tests/ui/impl-trait/in-trait/dyn-compatibility.rs
index 85b1ba269fc..45b431f6d30 100644
--- a/tests/ui/impl-trait/in-trait/dyn-compatibility.rs
+++ b/tests/ui/impl-trait/in-trait/dyn-compatibility.rs
@@ -13,8 +13,5 @@ impl Foo for u32 {
 fn main() {
     let i = Box::new(42_u32) as Box<dyn Foo>;
     //~^ ERROR the trait `Foo` is not dyn compatible
-    //~| ERROR the trait `Foo` is not dyn compatible
     let s = i.baz();
-    //~^ ERROR the trait `Foo` is not dyn compatible
-    //~| ERROR the trait `Foo` is not dyn compatible
 }
diff --git a/tests/ui/impl-trait/in-trait/dyn-compatibility.stderr b/tests/ui/impl-trait/in-trait/dyn-compatibility.stderr
index 840c27e183f..8cdb3808533 100644
--- a/tests/ui/impl-trait/in-trait/dyn-compatibility.stderr
+++ b/tests/ui/impl-trait/in-trait/dyn-compatibility.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/dyn-compatibility.rs:14:33
+  --> $DIR/dyn-compatibility.rs:14:41
    |
 LL |     let i = Box::new(42_u32) as Box<dyn Foo>;
-   |                                 ^^^^^^^^^^^^ `Foo` is not dyn compatible
+   |                                         ^^^ `Foo` 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>
@@ -15,58 +15,6 @@ LL |     fn baz(&self) -> impl Debug;
    = help: consider moving `baz` to another trait
    = help: only type `u32` implements `Foo`; consider using it directly instead.
 
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/dyn-compatibility.rs:17:15
-   |
-LL |     let s = i.baz();
-   |               ^^^ `Foo` 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-compatibility.rs:4:22
-   |
-LL | trait Foo {
-   |       --- this trait is not dyn compatible...
-LL |     fn baz(&self) -> impl Debug;
-   |                      ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
-   = help: consider moving `baz` to another trait
-   = help: only type `u32` implements `Foo`; consider using it directly instead.
-
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/dyn-compatibility.rs:17:13
-   |
-LL |     let s = i.baz();
-   |             ^^^^^^^ `Foo` 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-compatibility.rs:4:22
-   |
-LL | trait Foo {
-   |       --- this trait is not dyn compatible...
-LL |     fn baz(&self) -> impl Debug;
-   |                      ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
-   = help: consider moving `baz` to another trait
-   = help: only type `u32` implements `Foo`; consider using it directly instead.
-
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/dyn-compatibility.rs:14:13
-   |
-LL |     let i = Box::new(42_u32) as Box<dyn Foo>;
-   |             ^^^^^^^^^^^^^^^^ `Foo` 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-compatibility.rs:4:22
-   |
-LL | trait Foo {
-   |       --- this trait is not dyn compatible...
-LL |     fn baz(&self) -> impl Debug;
-   |                      ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
-   = help: consider moving `baz` to another trait
-   = help: only type `u32` implements `Foo`; consider using it directly instead.
-   = note: required for the cast from `Box<u32>` to `Box<dyn Foo>`
-
-error: aborting due to 4 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr
index 29235ca78a5..68ac765a3c1 100644
--- a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr
+++ b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/foreign-dyn-error.rs:6:12
+  --> $DIR/foreign-dyn-error.rs:6:17
    |
 LL |     let _: &dyn rpitit::Foo = todo!();
-   |            ^^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
+   |                 ^^^^^^^^^^^ `Foo` 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>
diff --git a/tests/ui/impl-trait/in-trait/not-inferred-generic.rs b/tests/ui/impl-trait/in-trait/not-inferred-generic.rs
new file mode 100644
index 00000000000..3879ea0e626
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/not-inferred-generic.rs
@@ -0,0 +1,13 @@
+trait TypedClient {
+    fn publish_typed<F>(&self) -> impl Sized
+    where
+        F: Clone;
+}
+impl TypedClient for () {
+    fn publish_typed<F>(&self) -> impl Sized {}
+}
+
+fn main() {
+    ().publish_typed();
+    //~^ ERROR type annotations needed [E0283]
+}
diff --git a/tests/ui/impl-trait/in-trait/not-inferred-generic.stderr b/tests/ui/impl-trait/in-trait/not-inferred-generic.stderr
new file mode 100644
index 00000000000..07f029d3bb7
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/not-inferred-generic.stderr
@@ -0,0 +1,21 @@
+error[E0283]: type annotations needed
+  --> $DIR/not-inferred-generic.rs:11:8
+   |
+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: required by a bound in `TypedClient::publish_typed::{anon_assoc#0}`
+  --> $DIR/not-inferred-generic.rs:4:12
+   |
+LL |         F: Clone;
+   |            ^^^^^ required by this bound in `TypedClient::publish_typed::{anon_assoc#0}`
+help: consider specifying the generic argument
+   |
+LL |     ().publish_typed::<F>();
+   |                     +++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/impl-trait/issues/issue-100075-2.stderr b/tests/ui/impl-trait/issues/issue-100075-2.stderr
index b3b69677507..554c3ea3433 100644
--- a/tests/ui/impl-trait/issues/issue-100075-2.stderr
+++ b/tests/ui/impl-trait/issues/issue-100075-2.stderr
@@ -1,3 +1,9 @@
+error[E0720]: cannot resolve opaque type
+  --> $DIR/issue-100075-2.rs:1:23
+   |
+LL | fn opaque<T>(t: T) -> impl Sized {
+   |                       ^^^^^^^^^^
+
 warning: function cannot return without recursing
   --> $DIR/issue-100075-2.rs:1:1
    |
@@ -10,15 +16,6 @@ LL |     opaque(Some(t))
    = help: a `loop` may express intention better if this is on purpose
    = note: `#[warn(unconditional_recursion)]` on by default
 
-error[E0720]: cannot resolve opaque type
-  --> $DIR/issue-100075-2.rs:1:23
-   |
-LL | fn opaque<T>(t: T) -> impl Sized {
-   |                       ^^^^^^^^^^ recursive opaque type
-...
-LL |     opaque(Some(t))
-   |     --------------- returning here with type `impl Sized`
-
 error: aborting due to 1 previous error; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/impl-trait/issues/issue-100075.stderr b/tests/ui/impl-trait/issues/issue-100075.stderr
index 75963489236..bca2874b2b4 100644
--- a/tests/ui/impl-trait/issues/issue-100075.stderr
+++ b/tests/ui/impl-trait/issues/issue-100075.stderr
@@ -2,10 +2,7 @@ error[E0720]: cannot resolve opaque type
   --> $DIR/issue-100075.rs:13:37
    |
 LL | fn _g<T>(t: &'static T) -> &'static impl Marker {
-   |                                     ^^^^^^^^^^^ recursive opaque type
-...
-LL |         return _g(t);
-   |                ----- returning here with type `&impl Marker`
+   |                                     ^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/issues/issue-103599.rs b/tests/ui/impl-trait/issues/issue-103599.rs
index 62741a7454c..e674ce3cbdf 100644
--- a/tests/ui/impl-trait/issues/issue-103599.rs
+++ b/tests/ui/impl-trait/issues/issue-103599.rs
@@ -1,9 +1,8 @@
-//@ check-pass
-
 trait T {}
 
 fn wrap(x: impl T) -> impl T {
-    //~^ WARN function cannot return without recursing
+    //~^ ERROR cannot resolve opaque type
+    //~| WARN function cannot return without recursing
     wrap(wrap(x))
 }
 
diff --git a/tests/ui/impl-trait/issues/issue-103599.stderr b/tests/ui/impl-trait/issues/issue-103599.stderr
index 82038c1dceb..9878b12044f 100644
--- a/tests/ui/impl-trait/issues/issue-103599.stderr
+++ b/tests/ui/impl-trait/issues/issue-103599.stderr
@@ -1,14 +1,21 @@
+error[E0720]: cannot resolve opaque type
+  --> $DIR/issue-103599.rs:3:23
+   |
+LL | fn wrap(x: impl T) -> impl T {
+   |                       ^^^^^^
+
 warning: function cannot return without recursing
-  --> $DIR/issue-103599.rs:5:1
+  --> $DIR/issue-103599.rs:3:1
    |
 LL | fn wrap(x: impl T) -> impl T {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
-LL |
+...
 LL |     wrap(wrap(x))
    |          ------- recursive call site
    |
    = help: a `loop` may express intention better if this is on purpose
    = note: `#[warn(unconditional_recursion)]` on by default
 
-warning: 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
 
+For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/impl-trait/issues/issue-87450.rs b/tests/ui/impl-trait/issues/issue-87450.rs
index 983ef7cfbe0..5a7759af111 100644
--- a/tests/ui/impl-trait/issues/issue-87450.rs
+++ b/tests/ui/impl-trait/issues/issue-87450.rs
@@ -3,8 +3,8 @@ fn bar() -> impl Fn() {
 }
 
 fn foo() -> impl Fn() {
-    //~^ WARNING 5:1: 5:22: function cannot return without recursing [unconditional_recursion]
-    //~| ERROR 5:13: 5:22: cannot resolve opaque type [E0720]
+    //~^ WARN function cannot return without recursing
+    //~| ERROR cannot resolve opaque type
     wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo())))))))
 }
 
diff --git a/tests/ui/impl-trait/issues/issue-87450.stderr b/tests/ui/impl-trait/issues/issue-87450.stderr
index 9567e09651d..f0f8b5859c0 100644
--- a/tests/ui/impl-trait/issues/issue-87450.stderr
+++ b/tests/ui/impl-trait/issues/issue-87450.stderr
@@ -1,3 +1,9 @@
+error[E0720]: cannot resolve opaque type
+  --> $DIR/issue-87450.rs:5:13
+   |
+LL | fn foo() -> impl Fn() {
+   |             ^^^^^^^^^
+
 warning: function cannot return without recursing
   --> $DIR/issue-87450.rs:5:1
    |
@@ -10,18 +16,6 @@ LL |     wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo())))))))
    = help: a `loop` may express intention better if this is on purpose
    = note: `#[warn(unconditional_recursion)]` on by default
 
-error[E0720]: cannot resolve opaque type
-  --> $DIR/issue-87450.rs:5:13
-   |
-LL | fn foo() -> impl Fn() {
-   |             ^^^^^^^^^ recursive opaque type
-...
-LL |     wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo())))))))
-   |     ----------------------------------------------- returning here with type `impl Fn()`
-...
-LL | fn wrap(f: impl Fn()) -> impl Fn() {
-   |                          --------- returning this opaque type `impl Fn()`
-
 error: aborting due to 1 previous error; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/impl-trait/no-method-suggested-traits.stderr b/tests/ui/impl-trait/no-method-suggested-traits.stderr
index 64202513ae2..061c9bd8f35 100644
--- a/tests/ui/impl-trait/no-method-suggested-traits.stderr
+++ b/tests/ui/impl-trait/no-method-suggested-traits.stderr
@@ -173,7 +173,7 @@ error[E0599]: no method named `method2` found for struct `no_method_suggested_tr
   --> $DIR/no-method-suggested-traits.rs:52:37
    |
 LL |     no_method_suggested_traits::Foo.method2();
-   |                                     ^^^^^^^ method not found in `Foo`
+   |                                     ^^^^^^^ method not found in `no_method_suggested_traits::Foo`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
@@ -186,7 +186,7 @@ error[E0599]: no method named `method2` found for struct `Rc<&mut Box<&no_method
   --> $DIR/no-method-suggested-traits.rs:54:71
    |
 LL |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2();
-   |                                                                       ^^^^^^^ method not found in `Rc<&mut Box<&Foo>>`
+   |                                                                       ^^^^^^^ method not found in `Rc<&mut Box<&no_method_suggested_traits::Foo>>`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
@@ -199,7 +199,7 @@ error[E0599]: no method named `method2` found for enum `no_method_suggested_trai
   --> $DIR/no-method-suggested-traits.rs:56:40
    |
 LL |     no_method_suggested_traits::Bar::X.method2();
-   |                                        ^^^^^^^ method not found in `Bar`
+   |                                        ^^^^^^^ method not found in `no_method_suggested_traits::Bar`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
@@ -212,7 +212,7 @@ error[E0599]: no method named `method2` found for struct `Rc<&mut Box<&no_method
   --> $DIR/no-method-suggested-traits.rs:58:74
    |
 LL |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2();
-   |                                                                          ^^^^^^^ method not found in `Rc<&mut Box<&Bar>>`
+   |                                                                          ^^^^^^^ method not found in `Rc<&mut Box<&no_method_suggested_traits::Bar>>`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
@@ -283,25 +283,25 @@ error[E0599]: no method named `method3` found for struct `no_method_suggested_tr
   --> $DIR/no-method-suggested-traits.rs:73:37
    |
 LL |     no_method_suggested_traits::Foo.method3();
-   |                                     ^^^^^^^ method not found in `Foo`
+   |                                     ^^^^^^^ method not found in `no_method_suggested_traits::Foo`
 
 error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&no_method_suggested_traits::Foo>>` in the current scope
   --> $DIR/no-method-suggested-traits.rs:74:71
    |
 LL |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3();
-   |                                                                       ^^^^^^^ method not found in `Rc<&mut Box<&Foo>>`
+   |                                                                       ^^^^^^^ method not found in `Rc<&mut Box<&no_method_suggested_traits::Foo>>`
 
 error[E0599]: no method named `method3` found for enum `no_method_suggested_traits::Bar` in the current scope
   --> $DIR/no-method-suggested-traits.rs:76:40
    |
 LL |     no_method_suggested_traits::Bar::X.method3();
-   |                                        ^^^^^^^ method not found in `Bar`
+   |                                        ^^^^^^^ method not found in `no_method_suggested_traits::Bar`
 
 error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&no_method_suggested_traits::Bar>>` in the current scope
   --> $DIR/no-method-suggested-traits.rs:77:74
    |
 LL |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3();
-   |                                                                          ^^^^^^^ method not found in `Rc<&mut Box<&Bar>>`
+   |                                                                          ^^^^^^^ method not found in `Rc<&mut Box<&no_method_suggested_traits::Bar>>`
 
 error: aborting due to 24 previous errors
 
diff --git a/tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr b/tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr
index 2d2731e4368..af84375c747 100644
--- a/tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr
+++ b/tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr
@@ -2,112 +2,67 @@ error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:6:22
    |
 LL | fn option(i: i32) -> impl Sized {
-   |                      ^^^^^^^^^^ recursive opaque type
-LL |
-LL |     if i < 0 { None } else { Some((option(i - 1), i)) }
-   |                ----          ------------------------ returning here with type `Option<(impl Sized, i32)>`
-   |                |
-   |                returning here with type `Option<(impl Sized, i32)>`
+   |                      ^^^^^^^^^^
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:11:15
    |
 LL | fn tuple() -> impl Sized {
-   |               ^^^^^^^^^^ recursive opaque type
-LL |
-LL |     (tuple(),)
-   |     ---------- returning here with type `(impl Sized,)`
+   |               ^^^^^^^^^^
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:16:15
    |
 LL | fn array() -> impl Sized {
-   |               ^^^^^^^^^^ recursive opaque type
-LL |
-LL |     [array()]
-   |     --------- returning here with type `[impl Sized; 1]`
+   |               ^^^^^^^^^^
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:21:13
    |
 LL | fn ptr() -> impl Sized {
-   |             ^^^^^^^^^^ recursive opaque type
-LL |
-LL |     &ptr() as *const _
-   |     ------------------ returning here with type `*const impl Sized`
+   |             ^^^^^^^^^^
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:26:16
    |
 LL | fn fn_ptr() -> impl Sized {
-   |                ^^^^^^^^^^ recursive opaque type
-LL |
-LL |     fn_ptr as fn() -> _
-   |     ------------------- returning here with type `fn() -> impl Sized`
+   |                ^^^^^^^^^^
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:31:25
    |
-LL |   fn closure_capture() -> impl Sized {
-   |                           ^^^^^^^^^^ recursive opaque type
-...
-LL | /     move || {
-LL | |         x;
-   | |         - closure captures itself here
-LL | |     }
-   | |_____- returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:34:5: 34:12}`
+LL | fn closure_capture() -> impl Sized {
+   |                         ^^^^^^^^^^
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:39:29
    |
-LL |   fn closure_ref_capture() -> impl Sized {
-   |                               ^^^^^^^^^^ recursive opaque type
-...
-LL | /     move || {
-LL | |         &x;
-   | |          - closure captures itself here
-LL | |     }
-   | |_____- returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:42:5: 42:12}`
+LL | fn closure_ref_capture() -> impl Sized {
+   |                             ^^^^^^^^^^
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:47:21
    |
 LL | fn closure_sig() -> impl Sized {
-   |                     ^^^^^^^^^^ recursive opaque type
-LL |
-LL |     || closure_sig()
-   |     ---------------- returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:49:5: 49:7}`
+   |                     ^^^^^^^^^^
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:52:23
    |
 LL | fn coroutine_sig() -> impl Sized {
-   |                       ^^^^^^^^^^ recursive opaque type
-LL |
-LL |     || coroutine_sig()
-   |     ------------------ returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:54:5: 54:7}`
+   |                       ^^^^^^^^^^
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:57:27
    |
-LL |   fn coroutine_capture() -> impl Sized {
-   |                             ^^^^^^^^^^ recursive opaque type
-...
-LL | /     move || {
-LL | |         yield;
-LL | |         x;
-   | |         - coroutine captures itself here
-LL | |     }
-   | |_____- returning here with type `{coroutine@$DIR/recursive-impl-trait-type-indirect.rs:62:5: 62:12}`
+LL | fn coroutine_capture() -> impl Sized {
+   |                           ^^^^^^^^^^
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:68:35
    |
 LL | fn substs_change<T: 'static>() -> impl Sized {
-   |                                   ^^^^^^^^^^ recursive opaque type
-LL |
-LL |     (substs_change::<&T>(),)
-   |     ------------------------ returning here with type `(impl Sized,)`
+   |                                   ^^^^^^^^^^
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:78:26
diff --git a/tests/ui/impl-trait/recursive-in-exhaustiveness.current.stderr b/tests/ui/impl-trait/recursive-in-exhaustiveness.current.stderr
index 42dbc7c9160..080c3284641 100644
--- a/tests/ui/impl-trait/recursive-in-exhaustiveness.current.stderr
+++ b/tests/ui/impl-trait/recursive-in-exhaustiveness.current.stderr
@@ -1,56 +1,21 @@
-warning: function cannot return without recursing
-  --> $DIR/recursive-in-exhaustiveness.rs:17:1
+error[E0720]: cannot resolve opaque type
+  --> $DIR/recursive-in-exhaustiveness.rs:17:22
    |
 LL | fn build<T>(x: T) -> impl Sized {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
-LL |
-LL |     let (x,) = (build(x),);
-   |                 -------- recursive call site
-   |
-   = help: a `loop` may express intention better if this is on purpose
-   = note: `#[warn(unconditional_recursion)]` on by default
-
-warning: function cannot return without recursing
-  --> $DIR/recursive-in-exhaustiveness.rs:27:1
-   |
-LL | fn build2<T>(x: T) -> impl Sized {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
-...
-LL |     let (x,) = (build2(x),);
-   |                 --------- recursive call site
-   |
-   = help: a `loop` may express intention better if this is on purpose
+   |                      ^^^^^^^^^^
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-in-exhaustiveness.rs:27:23
    |
 LL | fn build2<T>(x: T) -> impl Sized {
-   |                       ^^^^^^^^^^ recursive opaque type
-...
-LL |     (build2(x),)
-   |     ------------ returning here with type `(impl Sized,)`
+   |                       ^^^^^^^^^^
 
-warning: function cannot return without recursing
-  --> $DIR/recursive-in-exhaustiveness.rs:40:1
-   |
-LL | fn build3<T>(x: T) -> impl Sized {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
-LL |
-LL |     let (x,) = (build3((x,)),);
-   |                 ------------ recursive call site
-   |
-   = help: a `loop` may express intention better if this is on purpose
-
-error[E0792]: expected generic type parameter, found `(T,)`
-  --> $DIR/recursive-in-exhaustiveness.rs:49:5
+error[E0720]: cannot resolve opaque type
+  --> $DIR/recursive-in-exhaustiveness.rs:39:23
    |
 LL | fn build3<T>(x: T) -> impl Sized {
-   |           - this generic parameter must be used with a generic type parameter
-...
-LL |     build3(x)
-   |     ^^^^^^^^^
+   |                       ^^^^^^^^^^
 
-error: aborting due to 2 previous errors; 3 warnings emitted
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0720, E0792.
-For more information about an error, try `rustc --explain E0720`.
+For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/impl-trait/recursive-in-exhaustiveness.next.stderr b/tests/ui/impl-trait/recursive-in-exhaustiveness.next.stderr
index 4c3d5aa8fb8..a3609b93cb3 100644
--- a/tests/ui/impl-trait/recursive-in-exhaustiveness.next.stderr
+++ b/tests/ui/impl-trait/recursive-in-exhaustiveness.next.stderr
@@ -5,19 +5,19 @@ LL |     let (x,) = (build(x),);
    |                 ^^^^^^^^ cannot satisfy `impl Sized == _`
 
 error[E0271]: type mismatch resolving `build2<(_,)>::{opaque#0} normalizes-to _`
-  --> $DIR/recursive-in-exhaustiveness.rs:31:6
+  --> $DIR/recursive-in-exhaustiveness.rs:30:6
    |
 LL |     (build2(x),)
    |      ^^^^^^^^^ types differ
 
 error[E0271]: type mismatch resolving `build2<(_,)>::{opaque#0} normalizes-to _`
-  --> $DIR/recursive-in-exhaustiveness.rs:31:5
+  --> $DIR/recursive-in-exhaustiveness.rs:30:5
    |
 LL |     (build2(x),)
    |     ^^^^^^^^^^^^ types differ
 
 error[E0277]: the size for values of type `(impl Sized,)` cannot be known at compilation time
-  --> $DIR/recursive-in-exhaustiveness.rs:31:5
+  --> $DIR/recursive-in-exhaustiveness.rs:30:5
    |
 LL |     (build2(x),)
    |     ^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -26,13 +26,13 @@ LL |     (build2(x),)
    = note: tuples must have a statically known size to be initialized
 
 error[E0271]: type mismatch resolving `build3<(T,)>::{opaque#0} normalizes-to _`
-  --> $DIR/recursive-in-exhaustiveness.rs:42:17
+  --> $DIR/recursive-in-exhaustiveness.rs:41:17
    |
 LL |     let (x,) = (build3((x,)),);
    |                 ^^^^^^^^^^^^ types differ
 
 error[E0277]: the size for values of type `(impl Sized,)` cannot be known at compilation time
-  --> $DIR/recursive-in-exhaustiveness.rs:42:16
+  --> $DIR/recursive-in-exhaustiveness.rs:41:16
    |
 LL |     let (x,) = (build3((x,)),);
    |                ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -41,7 +41,7 @@ LL |     let (x,) = (build3((x,)),);
    = note: tuples must have a statically known size to be initialized
 
 error[E0308]: mismatched types
-  --> $DIR/recursive-in-exhaustiveness.rs:42:16
+  --> $DIR/recursive-in-exhaustiveness.rs:41:16
    |
 LL | fn build3<T>(x: T) -> impl Sized {
    |                       ---------- the found opaque type
@@ -53,7 +53,7 @@ LL |     let (x,) = (build3((x,)),);
              found tuple `(impl Sized,)`
 
 error[E0271]: type mismatch resolving `build3<(T,)>::{opaque#0} normalizes-to _`
-  --> $DIR/recursive-in-exhaustiveness.rs:42:17
+  --> $DIR/recursive-in-exhaustiveness.rs:41:17
    |
 LL |     let (x,) = (build3((x,)),);
    |                 ^^^^^^^^^^^^ types differ
@@ -61,13 +61,13 @@ LL |     let (x,) = (build3((x,)),);
    = note: the return type of a function must have a statically known size
 
 error[E0271]: type mismatch resolving `build3<(T,)>::{opaque#0} normalizes-to _`
-  --> $DIR/recursive-in-exhaustiveness.rs:42:16
+  --> $DIR/recursive-in-exhaustiveness.rs:41:16
    |
 LL |     let (x,) = (build3((x,)),);
    |                ^^^^^^^^^^^^^^^ types differ
 
 error[E0271]: type mismatch resolving `build3<(T,)>::{opaque#0} normalizes-to _`
-  --> $DIR/recursive-in-exhaustiveness.rs:42:17
+  --> $DIR/recursive-in-exhaustiveness.rs:41:17
    |
 LL |     let (x,) = (build3((x,)),);
    |                 ^^^^^^^^^^^^ types differ
diff --git a/tests/ui/impl-trait/recursive-in-exhaustiveness.rs b/tests/ui/impl-trait/recursive-in-exhaustiveness.rs
index 58944533686..fa8fa0e8174 100644
--- a/tests/ui/impl-trait/recursive-in-exhaustiveness.rs
+++ b/tests/ui/impl-trait/recursive-in-exhaustiveness.rs
@@ -15,7 +15,7 @@
 // We unfortunately accept this today, and due to how opaque type relating is implemented
 // in the NLL type relation, this defines `Opaque<T> = T`.
 fn build<T>(x: T) -> impl Sized {
-    //[current]~^ WARN function cannot return without recursing
+    //[current]~^ ERROR cannot resolve opaque type
     let (x,) = (build(x),);
     //[next]~^ ERROR type annotations needed
     build(x)
@@ -26,7 +26,6 @@ fn build<T>(x: T) -> impl Sized {
 // Not allowed today. Detected as recursive.
 fn build2<T>(x: T) -> impl Sized {
     //[current]~^ ERROR cannot resolve opaque type
-    //[current]~| WARN function cannot return without recursing
     let (x,) = (build2(x),);
     (build2(x),)
     //[next]~^ ERROR type mismatch resolving
@@ -38,7 +37,7 @@ fn build2<T>(x: T) -> impl Sized {
 //
 // Not allowed today. Detected as not defining.
 fn build3<T>(x: T) -> impl Sized {
-    //[current]~^ WARN function cannot return without recursing
+    //[current]~^ ERROR cannot resolve opaque type
     let (x,) = (build3((x,)),);
     //[next]~^ ERROR type mismatch resolving
     //[next]~| ERROR type mismatch resolving
@@ -47,7 +46,6 @@ fn build3<T>(x: T) -> impl Sized {
     //[next]~| ERROR the size for values of type
     //[next]~| ERROR mismatched types
     build3(x)
-    //[current]~^ ERROR expected generic type parameter, found `(T,)`
 }
 
 fn main() {}
diff --git a/tests/ui/imports/duplicate.rs b/tests/ui/imports/duplicate.rs
index 0c5a376da38..69ec82aafbd 100644
--- a/tests/ui/imports/duplicate.rs
+++ b/tests/ui/imports/duplicate.rs
@@ -7,27 +7,27 @@ mod b {
 }
 
 mod c {
-    pub use a::foo;
+    pub use crate::a::foo;
 }
 
 mod d {
-    use a::foo;
-    use a::foo; //~ ERROR the name `foo` is defined multiple times
+    use crate::a::foo;
+    use crate::a::foo; //~ ERROR the name `foo` is defined multiple times
 }
 
 mod e {
-    pub use a::*;
-    pub use c::*; // ok
+    pub use crate::a::*;
+    pub use crate::c::*; // ok
 }
 
 mod f {
-    pub use a::*;
-    pub use b::*;
+    pub use crate::a::*;
+    pub use crate::b::*;
 }
 
 mod g {
-    pub use a::*;
-    pub use f::*;
+    pub use crate::a::*;
+    pub use crate::f::*;
 }
 
 fn main() {
diff --git a/tests/ui/imports/duplicate.stderr b/tests/ui/imports/duplicate.stderr
index d7a7dfce921..f7dc7312b9d 100644
--- a/tests/ui/imports/duplicate.stderr
+++ b/tests/ui/imports/duplicate.stderr
@@ -1,10 +1,10 @@
 error[E0252]: the name `foo` is defined multiple times
   --> $DIR/duplicate.rs:15:9
    |
-LL |     use a::foo;
-   |         ------ previous import of the value `foo` here
-LL |     use a::foo;
-   |         ^^^^^^ `foo` reimported here
+LL |     use crate::a::foo;
+   |         ------------- previous import of the value `foo` here
+LL |     use crate::a::foo;
+   |         ^^^^^^^^^^^^^ `foo` reimported here
    |
    = note: `foo` must be defined only once in the value namespace of this module
 
@@ -38,14 +38,14 @@ LL |     f::foo();
 note: `foo` could refer to the function imported here
   --> $DIR/duplicate.rs:24:13
    |
-LL |     pub use a::*;
-   |             ^^^^
+LL |     pub use crate::a::*;
+   |             ^^^^^^^^^^^
    = help: consider adding an explicit import of `foo` to disambiguate
 note: `foo` could also refer to the function imported here
   --> $DIR/duplicate.rs:25:13
    |
-LL |     pub use b::*;
-   |             ^^^^
+LL |     pub use crate::b::*;
+   |             ^^^^^^^^^^^
    = help: consider adding an explicit import of `foo` to disambiguate
 
 error[E0659]: `foo` is ambiguous
@@ -80,14 +80,14 @@ LL |     g::foo();
 note: `foo` could refer to the function imported here
   --> $DIR/duplicate.rs:24:13
    |
-LL |     pub use a::*;
-   |             ^^^^
+LL |     pub use crate::a::*;
+   |             ^^^^^^^^^^^
    = help: consider adding an explicit import of `foo` to disambiguate
 note: `foo` could also refer to the function imported here
   --> $DIR/duplicate.rs:25:13
    |
-LL |     pub use b::*;
-   |             ^^^^
+LL |     pub use crate::b::*;
+   |             ^^^^^^^^^^^
    = help: consider adding an explicit import of `foo` to disambiguate
    = note: `#[warn(ambiguous_glob_imports)]` on by default
 
diff --git a/tests/ui/imports/export-glob-imports-target.rs b/tests/ui/imports/export-glob-imports-target.rs
index 6fde9fef0b6..84b9ffa83ff 100644
--- a/tests/ui/imports/export-glob-imports-target.rs
+++ b/tests/ui/imports/export-glob-imports-target.rs
@@ -9,7 +9,7 @@
 
 
 mod foo {
-    use foo::bar::*;
+    use crate::foo::bar::*;
     pub mod bar {
         pub static a : isize = 10;
     }
diff --git a/tests/ui/imports/extern-crate-used.stderr b/tests/ui/imports/extern-crate-used.stderr
index 982da0c913e..08bee391414 100644
--- a/tests/ui/imports/extern-crate-used.stderr
+++ b/tests/ui/imports/extern-crate-used.stderr
@@ -2,13 +2,18 @@ error: unused extern crate
   --> $DIR/extern-crate-used.rs:18:1
    |
 LL | extern crate core;
-   | ^^^^^^^^^^^^^^^^^^ help: remove it
+   | ^^^^^^^^^^^^^^^^^^ unused
    |
 note: the lint level is defined here
   --> $DIR/extern-crate-used.rs:6:9
    |
 LL | #![deny(unused_extern_crates)]
    |         ^^^^^^^^^^^^^^^^^^^^
+help: remove the unused `extern crate`
+   |
+LL - extern crate core;
+LL +
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/imports/glob-cycles.rs b/tests/ui/imports/glob-cycles.rs
index 066aa3b53ea..d9850bec4ca 100644
--- a/tests/ui/imports/glob-cycles.rs
+++ b/tests/ui/imports/glob-cycles.rs
@@ -1,12 +1,12 @@
 //@ check-pass
 
 mod foo {
-    pub use bar::*;
-    pub use main as f;
+    pub use crate::bar::*;
+    pub use crate::main as f;
 }
 
 mod bar {
-    pub use foo::*;
+    pub use crate::foo::*;
 }
 
 pub use foo::*;
diff --git a/tests/ui/imports/glob-shadowing.rs b/tests/ui/imports/glob-shadowing.rs
index 3a33b592b00..72848aac511 100644
--- a/tests/ui/imports/glob-shadowing.rs
+++ b/tests/ui/imports/glob-shadowing.rs
@@ -6,7 +6,7 @@ mod m {
 }
 
 mod glob_in_normal_module {
-    use m::*;
+    use crate::m::*;
     fn check() {
         let x = env!("PATH"); //~ ERROR `env` is ambiguous
     }
@@ -14,7 +14,7 @@ mod glob_in_normal_module {
 
 mod glob_in_block_module {
     fn block() {
-        use m::*;
+        use crate::m::*;
         fn check() {
             let x = env!("PATH"); //~ ERROR `env` is ambiguous
         }
@@ -24,7 +24,7 @@ mod glob_in_block_module {
 mod glob_shadows_item {
     pub macro fenv($e: expr) { $e }
     fn block() {
-        use m::*;
+        use crate::m::*;
         fn check() {
             let x = fenv!(); //~ ERROR `fenv` is ambiguous
         }
diff --git a/tests/ui/imports/glob-shadowing.stderr b/tests/ui/imports/glob-shadowing.stderr
index aff2eff68ac..0ce8d4f54f8 100644
--- a/tests/ui/imports/glob-shadowing.stderr
+++ b/tests/ui/imports/glob-shadowing.stderr
@@ -9,8 +9,8 @@ LL |         let x = env!("PATH");
 note: `env` could also refer to the macro imported here
   --> $DIR/glob-shadowing.rs:9:9
    |
-LL |     use m::*;
-   |         ^^^^
+LL |     use crate::m::*;
+   |         ^^^^^^^^^^^
    = help: consider adding an explicit import of `env` to disambiguate
    = help: or use `self::env` to refer to this macro unambiguously
 
@@ -25,8 +25,8 @@ LL |             let x = env!("PATH");
 note: `env` could also refer to the macro imported here
   --> $DIR/glob-shadowing.rs:17:13
    |
-LL |         use m::*;
-   |             ^^^^
+LL |         use crate::m::*;
+   |             ^^^^^^^^^^^
    = help: consider adding an explicit import of `env` to disambiguate
 
 error[E0659]: `fenv` is ambiguous
@@ -39,8 +39,8 @@ LL |             let x = fenv!();
 note: `fenv` could refer to the macro imported here
   --> $DIR/glob-shadowing.rs:27:13
    |
-LL |         use m::*;
-   |             ^^^^
+LL |         use crate::m::*;
+   |             ^^^^^^^^^^^
    = help: consider adding an explicit import of `fenv` to disambiguate
 note: `fenv` could also refer to the macro defined here
   --> $DIR/glob-shadowing.rs:25:5
diff --git a/tests/ui/imports/import-glob-1.rs b/tests/ui/imports/import-glob-1.rs
index 510f3814567..8beec4ce469 100644
--- a/tests/ui/imports/import-glob-1.rs
+++ b/tests/ui/imports/import-glob-1.rs
@@ -21,7 +21,7 @@ mod bar {
 }
 
 mod foo {
-    use bar::Baz::{Baz1, Baz2};
+    use crate::bar::Baz::{Baz1, Baz2};
 }
 
 fn main() {}
diff --git a/tests/ui/imports/import-glob-circular.rs b/tests/ui/imports/import-glob-circular.rs
index e47fa870c06..2dcfc7721fa 100644
--- a/tests/ui/imports/import-glob-circular.rs
+++ b/tests/ui/imports/import-glob-circular.rs
@@ -1,17 +1,17 @@
 mod circ1 {
-    pub use circ2::f2;
+    pub use crate::circ2::f2;
     pub fn f1() { println!("f1"); }
     pub fn common() -> usize { return 0; }
 }
 
 mod circ2 {
-    pub use circ1::f1;
+    pub use crate::circ1::f1;
     pub fn f2() { println!("f2"); }
     pub fn common() -> usize { return 1; }
 }
 
 mod test {
-    use circ1::*;
+    use crate::circ1::*;
 
     fn test() { f1066(); } //~ ERROR cannot find function `f1066` in this scope
 }
diff --git a/tests/ui/imports/import-glob-crate.rs b/tests/ui/imports/import-glob-crate.rs
index 0a2ca6ef2c3..ee067931876 100644
--- a/tests/ui/imports/import-glob-crate.rs
+++ b/tests/ui/imports/import-glob-crate.rs
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ run-pass
 use std::mem::*;
 
diff --git a/tests/ui/imports/import-loop-2.rs b/tests/ui/imports/import-loop-2.rs
index 1bd0f06c671..42f9a07fff3 100644
--- a/tests/ui/imports/import-loop-2.rs
+++ b/tests/ui/imports/import-loop-2.rs
@@ -1,9 +1,9 @@
 mod a {
-    pub use b::x;
+    pub use crate::b::x;
 }
 
 mod b {
-    pub use a::x; //~ ERROR unresolved import `a::x`
+    pub use crate::a::x; //~ ERROR unresolved import `crate::a::x`
 
     fn main() { let y = x; }
 }
diff --git a/tests/ui/imports/import-loop-2.stderr b/tests/ui/imports/import-loop-2.stderr
index 2521b6e7c04..2ef40c4e218 100644
--- a/tests/ui/imports/import-loop-2.stderr
+++ b/tests/ui/imports/import-loop-2.stderr
@@ -1,8 +1,8 @@
-error[E0432]: unresolved import `a::x`
+error[E0432]: unresolved import `crate::a::x`
   --> $DIR/import-loop-2.rs:6:13
    |
-LL |     pub use a::x;
-   |             ^^^^ no `x` in `a`
+LL |     pub use crate::a::x;
+   |             ^^^^^^^^^^^ no `x` in `a`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/imports/import-loop.rs b/tests/ui/imports/import-loop.rs
index fc5bd32adee..92483770711 100644
--- a/tests/ui/imports/import-loop.rs
+++ b/tests/ui/imports/import-loop.rs
@@ -1,7 +1,7 @@
 use y::x;
 
 mod y {
-    pub use y::x; //~ ERROR unresolved import `y::x`
+    pub use crate::y::x; //~ ERROR unresolved import `crate::y::x`
 }
 
 fn main() { }
diff --git a/tests/ui/imports/import-loop.stderr b/tests/ui/imports/import-loop.stderr
index 801fc2552b6..888ca11293c 100644
--- a/tests/ui/imports/import-loop.stderr
+++ b/tests/ui/imports/import-loop.stderr
@@ -1,8 +1,8 @@
-error[E0432]: unresolved import `y::x`
+error[E0432]: unresolved import `crate::y::x`
   --> $DIR/import-loop.rs:4:13
    |
-LL |     pub use y::x;
-   |             ^^^^ no `x` in `y`
+LL |     pub use crate::y::x;
+   |             ^^^^^^^^^^^ no `x` in `y`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/imports/import-rpass.rs b/tests/ui/imports/import-rpass.rs
index 97c64fd9c63..f03f974d573 100644
--- a/tests/ui/imports/import-rpass.rs
+++ b/tests/ui/imports/import-rpass.rs
@@ -4,8 +4,8 @@ mod foo {
 }
 
 mod bar {
-    use foo::x;
-    use foo::x as z;
+    use crate::foo::x;
+    use crate::foo::x as z;
     pub fn thing() { x(10); z(10); }
 }
 
diff --git a/tests/ui/imports/import4.rs b/tests/ui/imports/import4.rs
index 01535fc6f45..f670cc06201 100644
--- a/tests/ui/imports/import4.rs
+++ b/tests/ui/imports/import4.rs
@@ -1,4 +1,4 @@
-mod a { pub use b::foo; }
-mod b { pub use a::foo; } //~ ERROR unresolved import `a::foo`
+mod a { pub use crate::b::foo; }
+mod b { pub use crate::a::foo; } //~ ERROR unresolved import `crate::a::foo`
 
 fn main() { println!("loop"); }
diff --git a/tests/ui/imports/import4.stderr b/tests/ui/imports/import4.stderr
index c979d6c9ae2..4faa5f0520a 100644
--- a/tests/ui/imports/import4.stderr
+++ b/tests/ui/imports/import4.stderr
@@ -1,8 +1,8 @@
-error[E0432]: unresolved import `a::foo`
+error[E0432]: unresolved import `crate::a::foo`
   --> $DIR/import4.rs:2:17
    |
-LL | mod b { pub use a::foo; }
-   |                 ^^^^^^ no `foo` in `a`
+LL | mod b { pub use crate::a::foo; }
+   |                 ^^^^^^^^^^^^^ no `foo` in `a`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/imports/import5.rs b/tests/ui/imports/import5.rs
index 96d6c62d48a..7c7d99d7175 100644
--- a/tests/ui/imports/import5.rs
+++ b/tests/ui/imports/import5.rs
@@ -1,7 +1,7 @@
 //@ run-pass
 use foo::bar;
 mod foo {
-    pub use foo::zed::bar;
+    pub use crate::foo::zed::bar;
     pub mod zed {
         pub fn bar() { println!("foo"); }
     }
diff --git a/tests/ui/imports/import6.rs b/tests/ui/imports/import6.rs
index 8632c21e5f7..1677003c0ec 100644
--- a/tests/ui/imports/import6.rs
+++ b/tests/ui/imports/import6.rs
@@ -10,6 +10,6 @@ mod foo {
     }
 }
 mod bar {
-    pub use foo::zed::baz;
+    pub use crate::foo::zed::baz;
 }
 pub fn main() { baz(); }
diff --git a/tests/ui/imports/imports.rs b/tests/ui/imports/imports.rs
index a770103c212..b5c25eb0447 100644
--- a/tests/ui/imports/imports.rs
+++ b/tests/ui/imports/imports.rs
@@ -3,7 +3,7 @@
 
 // Like other items, private imports can be imported and used non-lexically in paths.
 mod a {
-    use a as foo;
+    use crate::a as foo;
     use self::foo::foo as bar;
 
     mod b {
@@ -18,22 +18,22 @@ pub fn f() -> bool { true }
 
 // Items and explicit imports shadow globs.
 fn g() {
-    use foo::*;
-    use bar::*;
+    use crate::foo::*;
+    use crate::bar::*;
     fn f() -> bool { true }
     let _: bool = f();
 }
 
 fn h() {
-    use foo::*;
-    use bar::*;
-    use f;
+    use crate::foo::*;
+    use crate::bar::*;
+    use crate::f;
     let _: bool = f();
 }
 
 // Here, there appears to be shadowing but isn't because of namespaces.
 mod b {
-    use foo::*; // This imports `f` in the value namespace.
+    use crate::foo::*; // This imports `f` in the value namespace.
     use super::b as f; // This imports `f` only in the type namespace,
     fn test() { self::f(); } // so the glob isn't shadowed.
 }
@@ -55,12 +55,13 @@ mod c {
 
 // Unused names can be ambiguous.
 mod d {
-    pub use foo::*; // This imports `f` in the value namespace.
-    pub use bar::*; // This also imports `f` in the value namespace.
+    pub use crate::foo::*; // This imports `f` in the value namespace.
+    pub use crate::bar::*; // This also imports `f` in the value namespace.
 }
 
 mod e {
-    pub use d::*; // n.b. Since `e::f` is not used, this is not considered to be a use of `d::f`.
+    pub use crate::d::*; // n.b. Since `e::f` is not used,
+                         // this is not considered to be a use of `d::f`.
 }
 
 fn main() {}
diff --git a/tests/ui/imports/issue-18083.rs b/tests/ui/imports/issue-18083.rs
index 97c0bc83ad5..c111c9b5aa8 100644
--- a/tests/ui/imports/issue-18083.rs
+++ b/tests/ui/imports/issue-18083.rs
@@ -5,7 +5,7 @@
 // each other and be reported as unresolved.
 
 mod a {
-    use b::{B};
+    use crate::b::{B};
     pub use self::inner::A;
 
     mod inner {
@@ -14,7 +14,7 @@ mod a {
 }
 
 mod b {
-    use a::{A};
+    use crate::a::{A};
     pub use self::inner::B;
 
     mod inner {
diff --git a/tests/ui/imports/issue-19498.rs b/tests/ui/imports/issue-19498.rs
index 5b9ce85fd8b..ae4e5fd35e5 100644
--- a/tests/ui/imports/issue-19498.rs
+++ b/tests/ui/imports/issue-19498.rs
@@ -7,7 +7,7 @@ mod A {} //~ ERROR the name `A` is defined multiple times
 pub mod B {} //~ ERROR the name `B` is defined multiple times
 //~| NOTE `B` redefined here
 mod C {
-    use C::D;
+    use crate::C::D;
     mod D {} //~ ERROR the name `D` is defined multiple times
     //~| NOTE `D` redefined here
 }
diff --git a/tests/ui/imports/issue-19498.stderr b/tests/ui/imports/issue-19498.stderr
index eb0d68a24c9..a4ddff3ed99 100644
--- a/tests/ui/imports/issue-19498.stderr
+++ b/tests/ui/imports/issue-19498.stderr
@@ -31,16 +31,16 @@ LL | use self::B as OtherB;
 error[E0255]: the name `D` is defined multiple times
   --> $DIR/issue-19498.rs:11:5
    |
-LL |     use C::D;
-   |         ---- previous import of the module `D` here
+LL |     use crate::C::D;
+   |         ----------- previous import of the module `D` here
 LL |     mod D {}
    |     ^^^^^ `D` redefined here
    |
    = note: `D` must be defined only once in the type namespace of this module
 help: you can use `as` to change the binding name of the import
    |
-LL |     use C::D as OtherD;
-   |              +++++++++
+LL |     use crate::C::D as OtherD;
+   |                     +++++++++
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/imports/issue-32222.rs b/tests/ui/imports/issue-32222.rs
index 8c528bc0a1e..6f5530a065c 100644
--- a/tests/ui/imports/issue-32222.rs
+++ b/tests/ui/imports/issue-32222.rs
@@ -16,7 +16,7 @@ mod a {
 }
 
 mod b {
-    pub use a::bar;
+    pub use crate::a::bar;
 }
 
 fn main() {}
diff --git a/tests/ui/imports/issue-4366-2.rs b/tests/ui/imports/issue-4366-2.rs
index c777b750252..e92d964f889 100644
--- a/tests/ui/imports/issue-4366-2.rs
+++ b/tests/ui/imports/issue-4366-2.rs
@@ -7,11 +7,11 @@ mod foo {
 }
 mod a {
     pub mod b {
-        use foo::foo;
+        use crate::foo::foo;
         type Bar = isize;
     }
     pub mod sub {
-        use a::b::*;
+        use crate::a::b::*;
         fn sub() -> Bar { 1 }
         //~^ ERROR cannot find type `Bar` in this scope
     }
diff --git a/tests/ui/imports/issue-4366.rs b/tests/ui/imports/issue-4366.rs
index 9ec2e58ecad..e2d89fdaff3 100644
--- a/tests/ui/imports/issue-4366.rs
+++ b/tests/ui/imports/issue-4366.rs
@@ -10,11 +10,11 @@ mod foo {
 }
 mod a {
     pub mod b {
-        use foo::foo;
+        use crate::foo::foo;
         type Bar = isize;
     }
     pub mod sub {
-        use a::b::*;
+        use crate::a::b::*;
         fn sub() -> isize { foo(); 1 } //~ ERROR cannot find function `foo` in this scope
     }
 }
diff --git a/tests/ui/imports/issue-4865-1.rs b/tests/ui/imports/issue-4865-1.rs
index 1a72b1b5e3f..7c34d105550 100644
--- a/tests/ui/imports/issue-4865-1.rs
+++ b/tests/ui/imports/issue-4865-1.rs
@@ -6,16 +6,16 @@
 // because these previous imports were not resolved.
 
 pub mod a {
-    use b::fn_b;
-    use c::*;
+    use crate::b::fn_b;
+    use crate::c::*;
 
     pub fn fn_a(){
     }
 }
 
 pub mod b {
-    use a::fn_a;
-    use c::*;
+    use crate::a::fn_a;
+    use crate::c::*;
 
     pub fn fn_b(){
     }
diff --git a/tests/ui/imports/issue-4865-2.rs b/tests/ui/imports/issue-4865-2.rs
index 746a74658dd..60ce2a468d9 100644
--- a/tests/ui/imports/issue-4865-2.rs
+++ b/tests/ui/imports/issue-4865-2.rs
@@ -12,7 +12,7 @@ pub mod say {
 }
 
 pub mod hello {
-    use say;
+    use crate::say;
 
     pub fn hello() {
         say::hello();
diff --git a/tests/ui/imports/issue-4865-3.rs b/tests/ui/imports/issue-4865-3.rs
index 130223558cb..d9d17f4dd47 100644
--- a/tests/ui/imports/issue-4865-3.rs
+++ b/tests/ui/imports/issue-4865-3.rs
@@ -4,11 +4,11 @@
 // they are not `pub`.
 
 pub mod a {
-    use b::*;
+    use crate::b::*;
 }
 
 pub mod b {
-    use a::*;
+    use crate::a::*;
 }
 
 use a::*;
diff --git a/tests/ui/imports/issue-8208.rs b/tests/ui/imports/issue-8208.rs
index 997d4d227b3..f6d88f830f2 100644
--- a/tests/ui/imports/issue-8208.rs
+++ b/tests/ui/imports/issue-8208.rs
@@ -2,7 +2,7 @@ use self::*; //~ ERROR: unresolved import `self::*` [E0432]
              //~^ NOTE cannot glob-import a module into itself
 
 mod foo {
-    use foo::*; //~ ERROR: unresolved import `foo::*` [E0432]
+    use crate::foo::*; //~ ERROR: unresolved import `crate::foo::*` [E0432]
                 //~^ NOTE cannot glob-import a module into itself
 
     mod bar {
diff --git a/tests/ui/imports/issue-8208.stderr b/tests/ui/imports/issue-8208.stderr
index e59aea12cda..0fbe4d35fab 100644
--- a/tests/ui/imports/issue-8208.stderr
+++ b/tests/ui/imports/issue-8208.stderr
@@ -4,11 +4,11 @@ error[E0432]: unresolved import `self::*`
 LL | use self::*;
    |     ^^^^^^^ cannot glob-import a module into itself
 
-error[E0432]: unresolved import `foo::*`
+error[E0432]: unresolved import `crate::foo::*`
   --> $DIR/issue-8208.rs:5:9
    |
-LL |     use foo::*;
-   |         ^^^^^^ cannot glob-import a module into itself
+LL |     use crate::foo::*;
+   |         ^^^^^^^^^^^^^ cannot glob-import a module into itself
 
 error[E0432]: unresolved import `super::bar::*`
   --> $DIR/issue-8208.rs:9:13
diff --git a/tests/ui/imports/issue-8640.rs b/tests/ui/imports/issue-8640.rs
index 51a02a32ec8..7cf73d0e93e 100644
--- a/tests/ui/imports/issue-8640.rs
+++ b/tests/ui/imports/issue-8640.rs
@@ -1,7 +1,7 @@
 #[allow(unused_imports)]
 
 mod foo {
-    use baz::bar;
+    use crate::baz::bar;
     mod bar {}
     //~^ ERROR the name `bar` is defined multiple times
 }
diff --git a/tests/ui/imports/issue-8640.stderr b/tests/ui/imports/issue-8640.stderr
index d22fddb1a69..3ce57e3a44a 100644
--- a/tests/ui/imports/issue-8640.stderr
+++ b/tests/ui/imports/issue-8640.stderr
@@ -1,16 +1,16 @@
 error[E0255]: the name `bar` is defined multiple times
   --> $DIR/issue-8640.rs:5:5
    |
-LL |     use baz::bar;
-   |         -------- previous import of the module `bar` here
+LL |     use crate::baz::bar;
+   |         --------------- previous import of the module `bar` here
 LL |     mod bar {}
    |     ^^^^^^^ `bar` redefined here
    |
    = note: `bar` must be defined only once in the type namespace of this module
 help: you can use `as` to change the binding name of the import
    |
-LL |     use baz::bar as other_bar;
-   |                  ++++++++++++
+LL |     use crate::baz::bar as other_bar;
+   |                         ++++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/imports/issue-99695-b.fixed b/tests/ui/imports/issue-99695-b.fixed
index 0108f762400..ae63b0c4627 100644
--- a/tests/ui/imports/issue-99695-b.fixed
+++ b/tests/ui/imports/issue-99695-b.fixed
@@ -11,7 +11,7 @@ mod m {
         pub struct other_item;
     }
 
-    use ::nu;
+    use crate::nu;
 pub use self::p::{other_item as _};
     //~^ ERROR unresolved import `self::p::nu` [E0432]
     //~| HELP a macro with this name exists at the root of the crate
diff --git a/tests/ui/imports/issue-99695-b.stderr b/tests/ui/imports/issue-99695-b.stderr
index d58d2798746..ad752d5c45a 100644
--- a/tests/ui/imports/issue-99695-b.stderr
+++ b/tests/ui/imports/issue-99695-b.stderr
@@ -7,7 +7,7 @@ LL |     pub use self::p::{nu, other_item as _};
    = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
 help: a macro with this name exists at the root of the crate
    |
-LL ~     use ::nu;
+LL ~     use crate::nu;
 LL ~ pub use self::p::{other_item as _};
    |
 
diff --git a/tests/ui/imports/issue-99695.fixed b/tests/ui/imports/issue-99695.edition_2015.fixed
index 51ccd3f8c48..798acfd5874 100644
--- a/tests/ui/imports/issue-99695.fixed
+++ b/tests/ui/imports/issue-99695.edition_2015.fixed
@@ -1,4 +1,8 @@
 //@ run-rustfix
+//@ revisions: edition_2015 edition_2018
+//@ [edition_2015] edition: 2015
+//@ [edition_2018] edition: 2018
+
 #![allow(unused, nonstandard_style)]
 mod m {
     #[macro_export]
@@ -8,7 +12,7 @@ mod m {
 
     pub struct other_item;
 
-    use ::nu;
+    use crate::nu;
 pub use self::{other_item as _};
     //~^ ERROR unresolved import `self::nu` [E0432]
     //~| HELP a macro with this name exists at the root of the crate
diff --git a/tests/ui/imports/issue-99695.stderr b/tests/ui/imports/issue-99695.edition_2015.stderr
index 536f51dcb3b..4ef8e6426fb 100644
--- a/tests/ui/imports/issue-99695.stderr
+++ b/tests/ui/imports/issue-99695.edition_2015.stderr
@@ -1,5 +1,5 @@
 error[E0432]: unresolved import `self::nu`
-  --> $DIR/issue-99695.rs:11:20
+  --> $DIR/issue-99695.rs:15:20
    |
 LL |     pub use self::{nu, other_item as _};
    |                    ^^ no `nu` in `m`
@@ -7,7 +7,7 @@ LL |     pub use self::{nu, other_item as _};
    = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
 help: a macro with this name exists at the root of the crate
    |
-LL ~     use ::nu;
+LL ~     use crate::nu;
 LL ~ pub use self::{other_item as _};
    |
 
diff --git a/tests/ui/imports/issue-99695.edition_2018.fixed b/tests/ui/imports/issue-99695.edition_2018.fixed
new file mode 100644
index 00000000000..798acfd5874
--- /dev/null
+++ b/tests/ui/imports/issue-99695.edition_2018.fixed
@@ -0,0 +1,21 @@
+//@ run-rustfix
+//@ revisions: edition_2015 edition_2018
+//@ [edition_2015] edition: 2015
+//@ [edition_2018] edition: 2018
+
+#![allow(unused, nonstandard_style)]
+mod m {
+    #[macro_export]
+    macro_rules! nu {
+        {} => {};
+    }
+
+    pub struct other_item;
+
+    use crate::nu;
+pub use self::{other_item as _};
+    //~^ ERROR unresolved import `self::nu` [E0432]
+    //~| HELP a macro with this name exists at the root of the crate
+}
+
+fn main() {}
diff --git a/tests/ui/imports/issue-99695.edition_2018.stderr b/tests/ui/imports/issue-99695.edition_2018.stderr
new file mode 100644
index 00000000000..4ef8e6426fb
--- /dev/null
+++ b/tests/ui/imports/issue-99695.edition_2018.stderr
@@ -0,0 +1,16 @@
+error[E0432]: unresolved import `self::nu`
+  --> $DIR/issue-99695.rs:15:20
+   |
+LL |     pub use self::{nu, other_item as _};
+   |                    ^^ no `nu` in `m`
+   |
+   = note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
+help: a macro with this name exists at the root of the crate
+   |
+LL ~     use crate::nu;
+LL ~ pub use self::{other_item as _};
+   |
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/imports/issue-99695.rs b/tests/ui/imports/issue-99695.rs
index a52370e0eb0..dc0a8f438e0 100644
--- a/tests/ui/imports/issue-99695.rs
+++ b/tests/ui/imports/issue-99695.rs
@@ -1,4 +1,8 @@
 //@ run-rustfix
+//@ revisions: edition_2015 edition_2018
+//@ [edition_2015] edition: 2015
+//@ [edition_2018] edition: 2018
+
 #![allow(unused, nonstandard_style)]
 mod m {
     #[macro_export]
diff --git a/tests/ui/imports/local-modularized-tricky-fail-2.rs b/tests/ui/imports/local-modularized-tricky-fail-2.rs
index 386de88bc3d..80b242b456c 100644
--- a/tests/ui/imports/local-modularized-tricky-fail-2.rs
+++ b/tests/ui/imports/local-modularized-tricky-fail-2.rs
@@ -10,13 +10,13 @@ macro_rules! define_exported { () => {
 define_exported!();
 
 mod m {
-    use exported;
+    use crate::exported;
     //~^ ERROR macro-expanded `macro_export` macros from the current crate cannot
     //~| WARN this was previously accepted
 }
 
 fn main() {
-    ::exported!();
+    crate::exported!();
     //~^ ERROR macro-expanded `macro_export` macros from the current crate cannot
     //~| WARN this was previously accepted
 }
diff --git a/tests/ui/imports/local-modularized-tricky-fail-2.stderr b/tests/ui/imports/local-modularized-tricky-fail-2.stderr
index 2c1965ac0a4..49f5c72947f 100644
--- a/tests/ui/imports/local-modularized-tricky-fail-2.stderr
+++ b/tests/ui/imports/local-modularized-tricky-fail-2.stderr
@@ -1,8 +1,8 @@
 error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths
   --> $DIR/local-modularized-tricky-fail-2.rs:13:9
    |
-LL |     use exported;
-   |         ^^^^^^^^
+LL |     use crate::exported;
+   |         ^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #52234 <https://github.com/rust-lang/rust/issues/52234>
@@ -22,8 +22,8 @@ LL |   define_exported!();
 error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths
   --> $DIR/local-modularized-tricky-fail-2.rs:19:5
    |
-LL |     ::exported!();
-   |     ^^^^^^^^^^
+LL |     crate::exported!();
+   |     ^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #52234 <https://github.com/rust-lang/rust/issues/52234>
diff --git a/tests/ui/imports/macros.rs b/tests/ui/imports/macros.rs
index 7f479571e5e..cf67e08c87a 100644
--- a/tests/ui/imports/macros.rs
+++ b/tests/ui/imports/macros.rs
@@ -8,13 +8,13 @@ mod foo {
 
 mod m1 {
     m!(use two_macros::*;);
-    use foo::m; // This shadows the glob import
+    use crate::foo::m; // This shadows the glob import
 }
 
 mod m2 {
     use two_macros::*;
     m! { //~ ERROR ambiguous
-        use foo::m;
+        use crate::foo::m;
     }
 }
 
diff --git a/tests/ui/imports/macros.stderr b/tests/ui/imports/macros.stderr
index e34e5359b48..25a678c6b37 100644
--- a/tests/ui/imports/macros.stderr
+++ b/tests/ui/imports/macros.stderr
@@ -8,8 +8,8 @@ LL |     m! {
 note: `m` could refer to the macro imported here
   --> $DIR/macros.rs:17:13
    |
-LL |         use foo::m;
-   |             ^^^^^^
+LL |         use crate::foo::m;
+   |             ^^^^^^^^^^^^^
 note: `m` could also refer to the macro imported here
   --> $DIR/macros.rs:15:9
    |
diff --git a/tests/ui/imports/reexport-star.rs b/tests/ui/imports/reexport-star.rs
index 461dc23b4dc..9bf4a6ce0c4 100644
--- a/tests/ui/imports/reexport-star.rs
+++ b/tests/ui/imports/reexport-star.rs
@@ -6,7 +6,7 @@ mod a {
 }
 
 mod b {
-    pub use a::*;
+    pub use crate::a::*;
 }
 
 pub fn main() {
diff --git a/tests/ui/imports/reexports.rs b/tests/ui/imports/reexports.rs
index 2a1a62834ce..6ad704b53fc 100644
--- a/tests/ui/imports/reexports.rs
+++ b/tests/ui/imports/reexports.rs
@@ -33,8 +33,8 @@ mod b {
 
 mod c {
     // Test that `foo` is not re-exported.
-    use b::a::foo::S; //~ ERROR `foo`
-    use b::b::foo::S as T; //~ ERROR `foo`
+    use crate::b::a::foo::S; //~ ERROR `foo`
+    use crate::b::b::foo::S as T; //~ ERROR `foo`
 }
 
 fn main() {}
diff --git a/tests/ui/imports/reexports.stderr b/tests/ui/imports/reexports.stderr
index fa05c0c0f8e..0ebcf8e58d6 100644
--- a/tests/ui/imports/reexports.stderr
+++ b/tests/ui/imports/reexports.stderr
@@ -11,10 +11,10 @@ LL |         pub use super::foo;
    |                 ^^^^^^^^^^
 
 error[E0603]: module import `foo` is private
-  --> $DIR/reexports.rs:36:15
+  --> $DIR/reexports.rs:36:22
    |
-LL |     use b::a::foo::S;
-   |               ^^^ private module import
+LL |     use crate::b::a::foo::S;
+   |                      ^^^ private module import
    |
 note: the module import `foo` is defined here...
   --> $DIR/reexports.rs:24:17
@@ -28,10 +28,10 @@ LL |     mod foo {
    |     ^^^^^^^
 
 error[E0603]: module import `foo` is private
-  --> $DIR/reexports.rs:37:15
+  --> $DIR/reexports.rs:37:22
    |
-LL |     use b::b::foo::S as T;
-   |               ^^^ private module import
+LL |     use crate::b::b::foo::S as T;
+   |                      ^^^ private module import
    |
 note: the module import `foo` is defined here...
   --> $DIR/reexports.rs:29:17
diff --git a/tests/ui/imports/shadow_builtin_macros.rs b/tests/ui/imports/shadow_builtin_macros.rs
index 5a149067408..7d318dfdb43 100644
--- a/tests/ui/imports/shadow_builtin_macros.rs
+++ b/tests/ui/imports/shadow_builtin_macros.rs
@@ -6,17 +6,17 @@ mod foo {
 }
 
 mod m1 {
-    use foo::panic; // ok
+    use crate::foo::panic; // ok
     fn f() { panic!(); }
 }
 
 mod m2 {
-    use foo::*;
+    use crate::foo::*;
     fn f() { panic!(); } //~ ERROR ambiguous
 }
 
 mod m3 {
-    ::two_macros::m!(use foo::panic;);
+    ::two_macros::m!(use crate::foo::panic;);
     fn f() { panic!(); } //~ ERROR ambiguous
 }
 
@@ -40,12 +40,12 @@ mod bar {
 }
 
 mod m6 {
-    use bar::n; // ok
+    use crate::bar::n; // ok
     n!();
 }
 
 mod m7 {
-    use bar::*;
+    use crate::bar::*;
     n!(); //~ ERROR ambiguous
 }
 
diff --git a/tests/ui/imports/shadow_builtin_macros.stderr b/tests/ui/imports/shadow_builtin_macros.stderr
index 6ffb31c20e6..c828b1193d8 100644
--- a/tests/ui/imports/shadow_builtin_macros.stderr
+++ b/tests/ui/imports/shadow_builtin_macros.stderr
@@ -9,8 +9,8 @@ LL |     fn f() { panic!(); }
 note: `panic` could also refer to the macro imported here
   --> $DIR/shadow_builtin_macros.rs:14:9
    |
-LL |     use foo::*;
-   |         ^^^^^^
+LL |     use crate::foo::*;
+   |         ^^^^^^^^^^^^^
    = help: consider adding an explicit import of `panic` to disambiguate
    = help: or use `self::panic` to refer to this macro unambiguously
 
@@ -42,8 +42,8 @@ LL |     n!();
 note: `n` could refer to the macro imported here
   --> $DIR/shadow_builtin_macros.rs:48:9
    |
-LL |     use bar::*;
-   |         ^^^^^^
+LL |     use crate::bar::*;
+   |         ^^^^^^^^^^^^^
    = help: consider adding an explicit import of `n` to disambiguate
    = help: or use `self::n` to refer to this macro unambiguously
 note: `n` could also refer to the macro imported here
@@ -63,8 +63,8 @@ LL |     fn f() { panic!(); }
 note: `panic` could also refer to the macro imported here
   --> $DIR/shadow_builtin_macros.rs:19:26
    |
-LL |     ::two_macros::m!(use foo::panic;);
-   |                          ^^^^^^^^^^
+LL |     ::two_macros::m!(use crate::foo::panic;);
+   |                          ^^^^^^^^^^^^^^^^^
    = help: use `self::panic` to refer to this macro unambiguously
 
 error: aborting due to 4 previous errors
diff --git a/tests/ui/infinite/infinite-recursion-const-fn.rs b/tests/ui/infinite/infinite-recursion-const-fn.rs
index 7b7f6fafab5..3c0b3b9741b 100644
--- a/tests/ui/infinite/infinite-recursion-const-fn.rs
+++ b/tests/ui/infinite/infinite-recursion-const-fn.rs
@@ -6,6 +6,6 @@ const fn a() -> usize {
 const fn b() -> usize {
     a()
 }
-const ARR: [i32; a()] = [5; 6]; //~ ERROR evaluation of constant value failed [E0080]
+const ARR: [i32; a()] = [5; 6]; //~ ERROR reached the configured maximum number of stack frames
 
 fn main() {}
diff --git a/tests/ui/infinite/infinite-recursion-const-fn.stderr b/tests/ui/infinite/infinite-recursion-const-fn.stderr
index 524abdf4d7a..529bad510c9 100644
--- a/tests/ui/infinite/infinite-recursion-const-fn.stderr
+++ b/tests/ui/infinite/infinite-recursion-const-fn.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: reached the configured maximum number of stack frames
   --> $DIR/infinite-recursion-const-fn.rs:9:18
    |
 LL | const ARR: [i32; a()] = [5; 6];
-   |                  ^^^ reached the configured maximum number of stack frames
+   |                  ^^^ evaluation of constant value failed here
    |
 note: inside `a`
   --> $DIR/infinite-recursion-const-fn.rs:4:5
diff --git a/tests/ui/inline-const/const-expr-generic-err.stderr b/tests/ui/inline-const/const-expr-generic-err.stderr
index a40e8bceb36..26039ba6d44 100644
--- a/tests/ui/inline-const/const-expr-generic-err.stderr
+++ b/tests/ui/inline-const/const-expr-generic-err.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `foo::<i32>::{constant#0}` failed
+error[E0080]: evaluation panicked: assertion failed: std::mem::size_of::<T>() == 0
   --> $DIR/const-expr-generic-err.rs:4:13
    |
 LL |     const { assert!(std::mem::size_of::<T>() == 0); }
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: assertion failed: std::mem::size_of::<T>() == 0
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `foo::<i32>::{constant#0}` failed here
 
 note: erroneous constant encountered
   --> $DIR/const-expr-generic-err.rs:4:5
@@ -16,11 +16,11 @@ note: the above error was encountered while instantiating `fn foo::<i32>`
 LL |     foo::<i32>();
    |     ^^^^^^^^^^^^
 
-error[E0080]: evaluation of `bar::<0>::{constant#0}` failed
+error[E0080]: attempt to compute `0_usize - 1_usize`, which would overflow
   --> $DIR/const-expr-generic-err.rs:8:13
    |
 LL |     const { N - 1 }
-   |             ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
+   |             ^^^^^ evaluation of `bar::<0>::{constant#0}` failed here
 
 note: erroneous constant encountered
   --> $DIR/const-expr-generic-err.rs:8:5
diff --git a/tests/ui/inline-const/required-const.stderr b/tests/ui/inline-const/required-const.stderr
index 2f618e54ed3..a517ea2fec0 100644
--- a/tests/ui/inline-const/required-const.stderr
+++ b/tests/ui/inline-const/required-const.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `foo::<i32>::{constant#0}` failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/required-const.rs:6:17
    |
 LL |         const { panic!() }
-   |                 ^^^^^^^^ evaluation panicked: explicit panic
+   |                 ^^^^^^^^ evaluation of `foo::<i32>::{constant#0}` failed here
 
 note: erroneous constant encountered
   --> $DIR/required-const.rs:6:9
diff --git a/tests/ui/instrument-xray/platform-support.rs b/tests/ui/instrument-xray/platform-support.rs
new file mode 100644
index 00000000000..238018b348d
--- /dev/null
+++ b/tests/ui/instrument-xray/platform-support.rs
@@ -0,0 +1,27 @@
+//@ only-nightly (flag is still unstable)
+//@ needs-xray
+
+//@ revisions: unsupported
+//@[unsupported] needs-llvm-components: x86
+//@[unsupported] compile-flags: -Z instrument-xray --target=x86_64-pc-windows-msvc
+
+//@ revisions: x86_64-linux
+//@[x86_64-linux] needs-llvm-components: x86
+//@[x86_64-linux] compile-flags: -Z instrument-xray --target=x86_64-unknown-linux-gnu
+//@[x86_64-linux] check-pass
+
+//@ revisions: x86_64-darwin
+//@[x86_64-darwin] needs-llvm-components: x86
+//@[x86_64-darwin] compile-flags: -Z instrument-xray --target=x86_64-apple-darwin
+//@[x86_64-darwin] check-pass
+
+//@ revisions: aarch64-darwin
+//@[aarch64-darwin] needs-llvm-components: aarch64
+//@[aarch64-darwin] compile-flags: -Z instrument-xray --target=aarch64-apple-darwin
+//@[aarch64-darwin] check-pass
+
+#![feature(no_core)]
+#![no_core]
+#![no_main]
+
+//[unsupported]~? ERROR XRay instrumentation is not supported for this target
diff --git a/tests/ui/instrument-xray/target-not-supported.stderr b/tests/ui/instrument-xray/platform-support.unsupported.stderr
index 119094bfc4c..119094bfc4c 100644
--- a/tests/ui/instrument-xray/target-not-supported.stderr
+++ b/tests/ui/instrument-xray/platform-support.unsupported.stderr
diff --git a/tests/ui/instrument-xray/target-not-supported.rs b/tests/ui/instrument-xray/target-not-supported.rs
deleted file mode 100644
index 2045913b186..00000000000
--- a/tests/ui/instrument-xray/target-not-supported.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Verifies that `-Z instrument-xray` cannot be used with unsupported targets,
-//
-//@ needs-llvm-components: x86
-//@ compile-flags: -Z instrument-xray --target x86_64-apple-darwin
-
-#![feature(no_core)]
-#![no_core]
-#![no_main]
-
-//~? ERROR XRay instrumentation is not supported for this target
diff --git a/tests/ui/intrinsics/const-eval-select-stability.stderr b/tests/ui/intrinsics/const-eval-select-stability.stderr
index 5f443b1d4ff..513c19cbb5b 100644
--- a/tests/ui/intrinsics/const-eval-select-stability.stderr
+++ b/tests/ui/intrinsics/const-eval-select-stability.stderr
@@ -4,16 +4,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     const_eval_select((), nothing, log);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | pub const fn hey() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_eval_select)]
-LL | pub const fn hey() {
-   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/intrinsics/intrinsic-alignment.rs b/tests/ui/intrinsics/intrinsic-alignment.rs
index c42a4b94e29..a467c445d61 100644
--- a/tests/ui/intrinsics/intrinsic-alignment.rs
+++ b/tests/ui/intrinsics/intrinsic-alignment.rs
@@ -24,16 +24,16 @@ mod m {
     #[cfg(target_arch = "x86")]
     pub fn main() {
         unsafe {
-            assert_eq!(::rusti::pref_align_of::<u64>(), 8);
-            assert_eq!(::rusti::min_align_of::<u64>(), 4);
+            assert_eq!(crate::rusti::pref_align_of::<u64>(), 8);
+            assert_eq!(crate::rusti::min_align_of::<u64>(), 4);
         }
     }
 
     #[cfg(not(target_arch = "x86"))]
     pub fn main() {
         unsafe {
-            assert_eq!(::rusti::pref_align_of::<u64>(), 8);
-            assert_eq!(::rusti::min_align_of::<u64>(), 8);
+            assert_eq!(crate::rusti::pref_align_of::<u64>(), 8);
+            assert_eq!(crate::rusti::min_align_of::<u64>(), 8);
         }
     }
 }
@@ -43,8 +43,8 @@ mod m {
     #[cfg(target_arch = "x86_64")]
     pub fn main() {
         unsafe {
-            assert_eq!(::rusti::pref_align_of::<u64>(), 8);
-            assert_eq!(::rusti::min_align_of::<u64>(), 8);
+            assert_eq!(crate::rusti::pref_align_of::<u64>(), 8);
+            assert_eq!(crate::rusti::min_align_of::<u64>(), 8);
         }
     }
 }
@@ -53,8 +53,8 @@ mod m {
 mod m {
     pub fn main() {
         unsafe {
-            assert_eq!(::rusti::pref_align_of::<u64>(), 8);
-            assert_eq!(::rusti::min_align_of::<u64>(), 8);
+            assert_eq!(crate::rusti::pref_align_of::<u64>(), 8);
+            assert_eq!(crate::rusti::min_align_of::<u64>(), 8);
         }
     }
 }
@@ -63,8 +63,8 @@ mod m {
 mod m {
     pub fn main() {
         unsafe {
-            assert_eq!(::rusti::pref_align_of::<u64>(), 8);
-            assert_eq!(::rusti::min_align_of::<u64>(), 8);
+            assert_eq!(crate::rusti::pref_align_of::<u64>(), 8);
+            assert_eq!(crate::rusti::min_align_of::<u64>(), 8);
         }
     }
 }
diff --git a/tests/ui/intrinsics/intrinsic-atomics.rs b/tests/ui/intrinsics/intrinsic-atomics.rs
index 9127cc649e6..f96c6dc832e 100644
--- a/tests/ui/intrinsics/intrinsic-atomics.rs
+++ b/tests/ui/intrinsics/intrinsic-atomics.rs
@@ -1,14 +1,14 @@
 //@ run-pass
 #![feature(core_intrinsics)]
-use std::intrinsics as rusti;
+use std::intrinsics::{self as rusti, AtomicOrdering};
 
 pub fn main() {
     unsafe {
         let mut x: Box<_> = Box::new(1);
 
-        assert_eq!(rusti::atomic_load_seqcst(&*x), 1);
+        assert_eq!(rusti::atomic_load::<_, { AtomicOrdering::SeqCst }>(&*x), 1);
         *x = 5;
-        assert_eq!(rusti::atomic_load_acquire(&*x), 5);
+        assert_eq!(rusti::atomic_load::<_, { AtomicOrdering::Acquire }>(&*x), 5);
 
         rusti::atomic_store_seqcst(&mut *x, 3);
         assert_eq!(*x, 3);
diff --git a/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.rs b/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.rs
index fdb25a3ae3f..15f4a9a778e 100644
--- a/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.rs
+++ b/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.rs
@@ -2,22 +2,19 @@
 
 const RAW_EQ_PADDING: bool = unsafe {
     std::intrinsics::raw_eq(&(1_u8, 2_u16), &(1_u8, 2_u16))
-//~^ ERROR evaluation of constant value failed
-//~| NOTE requires initialized memory
+//~^ ERROR requires initialized memory
 };
 
 const RAW_EQ_PTR: bool = unsafe {
     std::intrinsics::raw_eq(&(&0), &(&1))
-//~^ ERROR evaluation of constant value failed
-//~| NOTE unable to turn pointer into integer
+//~^ ERROR unable to turn pointer into integer
 };
 
 const RAW_EQ_NOT_ALIGNED: bool = unsafe {
     let arr = [0u8; 4];
     let aref = &*arr.as_ptr().cast::<i32>();
     std::intrinsics::raw_eq(aref, aref)
-//~^ ERROR evaluation of constant value failed
-//~| NOTE alignment
+//~^ ERROR alignment
 };
 
 pub fn main() {
diff --git a/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.stderr b/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.stderr
index b8fdfe7bef3..1d2c263baf1 100644
--- a/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.stderr
+++ b/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.stderr
@@ -1,23 +1,23 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: reading memory at ALLOC0[0x0..0x4], but memory is uninitialized at [0x1..0x2], and this operation requires initialized memory
   --> $DIR/intrinsic-raw_eq-const-bad.rs:4:5
    |
 LL |     std::intrinsics::raw_eq(&(1_u8, 2_u16), &(1_u8, 2_u16))
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at ALLOC0[0x0..0x4], but memory is uninitialized at [0x1..0x2], and this operation requires initialized memory
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/intrinsic-raw_eq-const-bad.rs:10:5
+error[E0080]: unable to turn pointer into integer
+  --> $DIR/intrinsic-raw_eq-const-bad.rs:9:5
    |
 LL |     std::intrinsics::raw_eq(&(&0), &(&1))
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/intrinsic-raw_eq-const-bad.rs:18:5
+error[E0080]: accessing memory with alignment 1, but alignment 4 is required
+  --> $DIR/intrinsic-raw_eq-const-bad.rs:16:5
    |
 LL |     std::intrinsics::raw_eq(aref, aref)
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing memory with alignment 1, but alignment 4 is required
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/intrinsics/non-integer-atomic.rs b/tests/ui/intrinsics/non-integer-atomic.rs
index 2d1d0882084..5464bf747fa 100644
--- a/tests/ui/intrinsics/non-integer-atomic.rs
+++ b/tests/ui/intrinsics/non-integer-atomic.rs
@@ -4,16 +4,16 @@
 #![allow(warnings)]
 #![crate_type = "rlib"]
 
-use std::intrinsics;
+use std::intrinsics::{self, AtomicOrdering};
 
 #[derive(Copy, Clone)]
 pub struct Foo(i64);
-pub type Bar = &'static Fn();
+pub type Bar = &'static dyn Fn();
 pub type Quux = [u8; 100];
 
 pub unsafe fn test_bool_load(p: &mut bool, v: bool) {
-    intrinsics::atomic_load_seqcst(p);
-    //~^ ERROR `atomic_load_seqcst` intrinsic: expected basic integer type, found `bool`
+    intrinsics::atomic_load::<_, { AtomicOrdering::SeqCst }>(p);
+    //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `bool`
 }
 
 pub unsafe fn test_bool_store(p: &mut bool, v: bool) {
@@ -32,8 +32,8 @@ pub unsafe fn test_bool_cxchg(p: &mut bool, v: bool) {
 }
 
 pub unsafe fn test_Foo_load(p: &mut Foo, v: Foo) {
-    intrinsics::atomic_load_seqcst(p);
-    //~^ ERROR `atomic_load_seqcst` intrinsic: expected basic integer type, found `Foo`
+    intrinsics::atomic_load::<_, { AtomicOrdering::SeqCst }>(p);
+    //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `Foo`
 }
 
 pub unsafe fn test_Foo_store(p: &mut Foo, v: Foo) {
@@ -52,7 +52,7 @@ pub unsafe fn test_Foo_cxchg(p: &mut Foo, v: Foo) {
 }
 
 pub unsafe fn test_Bar_load(p: &mut Bar, v: Bar) {
-    intrinsics::atomic_load_seqcst(p);
+    intrinsics::atomic_load::<_, { AtomicOrdering::SeqCst }>(p);
     //~^ ERROR expected basic integer type, found `&dyn Fn()`
 }
 
@@ -72,8 +72,8 @@ pub unsafe fn test_Bar_cxchg(p: &mut Bar, v: Bar) {
 }
 
 pub unsafe fn test_Quux_load(p: &mut Quux, v: Quux) {
-    intrinsics::atomic_load_seqcst(p);
-    //~^ ERROR `atomic_load_seqcst` intrinsic: expected basic integer type, found `[u8; 100]`
+    intrinsics::atomic_load::<_, { AtomicOrdering::SeqCst }>(p);
+    //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `[u8; 100]`
 }
 
 pub unsafe fn test_Quux_store(p: &mut Quux, v: Quux) {
diff --git a/tests/ui/intrinsics/non-integer-atomic.stderr b/tests/ui/intrinsics/non-integer-atomic.stderr
index 32791a8e8b7..58c2dc00c66 100644
--- a/tests/ui/intrinsics/non-integer-atomic.stderr
+++ b/tests/ui/intrinsics/non-integer-atomic.stderr
@@ -1,8 +1,8 @@
-error[E0511]: invalid monomorphization of `atomic_load_seqcst` intrinsic: expected basic integer type, found `bool`
+error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `bool`
   --> $DIR/non-integer-atomic.rs:15:5
    |
-LL |     intrinsics::atomic_load_seqcst(p);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     intrinsics::atomic_load::<_, { AtomicOrdering::SeqCst }>(p);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `atomic_store_seqcst` intrinsic: expected basic integer type, found `bool`
   --> $DIR/non-integer-atomic.rs:20:5
@@ -22,11 +22,11 @@ error[E0511]: invalid monomorphization of `atomic_cxchg_seqcst_seqcst` intrinsic
 LL |     intrinsics::atomic_cxchg_seqcst_seqcst(p, v, v);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_load_seqcst` intrinsic: expected basic integer type, found `Foo`
+error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `Foo`
   --> $DIR/non-integer-atomic.rs:35:5
    |
-LL |     intrinsics::atomic_load_seqcst(p);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     intrinsics::atomic_load::<_, { AtomicOrdering::SeqCst }>(p);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `atomic_store_seqcst` intrinsic: expected basic integer type, found `Foo`
   --> $DIR/non-integer-atomic.rs:40:5
@@ -46,11 +46,11 @@ error[E0511]: invalid monomorphization of `atomic_cxchg_seqcst_seqcst` intrinsic
 LL |     intrinsics::atomic_cxchg_seqcst_seqcst(p, v, v);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_load_seqcst` intrinsic: expected basic integer type, found `&dyn Fn()`
+error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `&dyn Fn()`
   --> $DIR/non-integer-atomic.rs:55:5
    |
-LL |     intrinsics::atomic_load_seqcst(p);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     intrinsics::atomic_load::<_, { AtomicOrdering::SeqCst }>(p);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `atomic_store_seqcst` intrinsic: expected basic integer type, found `&dyn Fn()`
   --> $DIR/non-integer-atomic.rs:60:5
@@ -70,11 +70,11 @@ error[E0511]: invalid monomorphization of `atomic_cxchg_seqcst_seqcst` intrinsic
 LL |     intrinsics::atomic_cxchg_seqcst_seqcst(p, v, v);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0511]: invalid monomorphization of `atomic_load_seqcst` intrinsic: expected basic integer type, found `[u8; 100]`
+error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `[u8; 100]`
   --> $DIR/non-integer-atomic.rs:75:5
    |
-LL |     intrinsics::atomic_load_seqcst(p);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     intrinsics::atomic_load::<_, { AtomicOrdering::SeqCst }>(p);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0511]: invalid monomorphization of `atomic_store_seqcst` intrinsic: expected basic integer type, found `[u8; 100]`
   --> $DIR/non-integer-atomic.rs:80:5
diff --git a/tests/ui/issues/auxiliary/issue-11224.rs b/tests/ui/issues/auxiliary/issue-11224.rs
index 63543621a80..94fb1f3abd5 100644
--- a/tests/ui/issues/auxiliary/issue-11224.rs
+++ b/tests/ui/issues/auxiliary/issue-11224.rs
@@ -11,6 +11,6 @@ mod inner {
 }
 
 pub fn foo() {
-    let a = &1isize as &inner::Trait;
+    let a = &1isize as &dyn inner::Trait;
     a.f();
 }
diff --git a/tests/ui/issues/auxiliary/issue-13507.rs b/tests/ui/issues/auxiliary/issue-13507.rs
index c91013043eb..4160cf99f53 100644
--- a/tests/ui/issues/auxiliary/issue-13507.rs
+++ b/tests/ui/issues/auxiliary/issue-13507.rs
@@ -16,7 +16,7 @@ pub mod testtypes {
             TypeId::of::<FooFnPtr>(),
             TypeId::of::<FooNil>(),
             TypeId::of::<FooTuple>(),
-            TypeId::of::<FooTrait>(),
+            TypeId::of::<dyn FooTrait>(),
             TypeId::of::<FooStruct>(),
             TypeId::of::<FooEnum>()
         ]
diff --git a/tests/ui/issues/auxiliary/issue-17662.rs b/tests/ui/issues/auxiliary/issue-17662.rs
index 75efe110cdf..5ecec31deb0 100644
--- a/tests/ui/issues/auxiliary/issue-17662.rs
+++ b/tests/ui/issues/auxiliary/issue-17662.rs
@@ -4,9 +4,9 @@ pub trait Foo<'a, T> {
     fn foo(&'a self) -> T;
 }
 
-pub fn foo<'a, T>(x: &'a Foo<'a, T>) -> T {
-    let x: &'a Foo<T> = x;
-    //            ^ the lifetime parameter of Foo is left to be inferred.
+pub fn foo<'a, T>(x: &'a dyn Foo<'a, T>) -> T {
+    let x: &'a dyn Foo<T> = x;
+    //                ^ the lifetime parameter of Foo is left to be inferred.
     x.foo()
     // ^ encoding this method call in metadata triggers an ICE.
 }
diff --git a/tests/ui/issues/auxiliary/issue-2380.rs b/tests/ui/issues/auxiliary/issue-2380.rs
index 79fd62d1633..9ec829b417f 100644
--- a/tests/ui/issues/auxiliary/issue-2380.rs
+++ b/tests/ui/issues/auxiliary/issue-2380.rs
@@ -6,8 +6,8 @@ pub trait i<T>
     fn dummy(&self, t: T) -> T { panic!() }
 }
 
-pub fn f<T>() -> Box<i<T>+'static> {
+pub fn f<T>() -> Box<dyn i<T>+'static> {
     impl<T> i<T> for () { }
 
-    Box::new(()) as Box<i<T>+'static>
+    Box::new(()) as Box<dyn i<T>+'static>
 }
diff --git a/tests/ui/issues/auxiliary/issue-25467.rs b/tests/ui/issues/auxiliary/issue-25467.rs
index ca9b3097c83..16c2869dc75 100644
--- a/tests/ui/issues/auxiliary/issue-25467.rs
+++ b/tests/ui/issues/auxiliary/issue-25467.rs
@@ -7,4 +7,4 @@ pub trait Trait {
     type Issue25467BarT;
 }
 
-pub type Object = Option<Box<Trait<Issue25467FooT=(),Issue25467BarT=()>>>;
+pub type Object = Option<Box<dyn Trait<Issue25467FooT=(),Issue25467BarT=()>>>;
diff --git a/tests/ui/issues/auxiliary/issue-34796-aux.rs b/tests/ui/issues/auxiliary/issue-34796-aux.rs
index 09c69b90329..0e91bb4bcdc 100644
--- a/tests/ui/issues/auxiliary/issue-34796-aux.rs
+++ b/tests/ui/issues/auxiliary/issue-34796-aux.rs
@@ -9,7 +9,7 @@ impl Future for u32 {
     type Error = Box<()>;
 }
 
-fn foo() -> Box<Future<Item=(), Error=Box<()>>> {
+fn foo() -> Box<dyn Future<Item=(), Error=Box<()>>> {
     Box::new(0u32)
 }
 
diff --git a/tests/ui/issues/auxiliary/issue-38226-aux.rs b/tests/ui/issues/auxiliary/issue-38226-aux.rs
index f968017199f..a8e964e016f 100644
--- a/tests/ui/issues/auxiliary/issue-38226-aux.rs
+++ b/tests/ui/issues/auxiliary/issue-38226-aux.rs
@@ -2,7 +2,7 @@
 
 #[inline(never)]
 pub fn foo<T>() {
-    let _: Box<SomeTrait> = Box::new(SomeTraitImpl);
+    let _: Box<dyn SomeTrait> = Box::new(SomeTraitImpl);
 }
 
 pub fn bar() {
diff --git a/tests/ui/issues/auxiliary/issue-8401.rs b/tests/ui/issues/auxiliary/issue-8401.rs
index e35dbbfabfc..7d0eb5cd876 100644
--- a/tests/ui/issues/auxiliary/issue-8401.rs
+++ b/tests/ui/issues/auxiliary/issue-8401.rs
@@ -8,9 +8,9 @@ trait A {
 struct B;
 impl A for B {}
 
-fn bar<T>(_: &mut A, _: &T) {}
+fn bar<T>(_: &mut dyn A, _: &T) {}
 
 fn foo<T>(t: &T) {
     let mut b = B;
-    bar(&mut b as &mut A, t)
+    bar(&mut b as &mut dyn A, t)
 }
diff --git a/tests/ui/issues/issue-18959.rs b/tests/ui/issues/issue-18959.rs
index 6aeb34879ea..415fe818f53 100644
--- a/tests/ui/issues/issue-18959.rs
+++ b/tests/ui/issues/issue-18959.rs
@@ -11,13 +11,12 @@ impl Foo for Thing {
 fn foo(b: &dyn Bar) {
     //~^ ERROR E0038
     b.foo(&0)
-    //~^ ERROR E0038
 }
 
 fn main() {
     let mut thing = Thing;
     let test: &dyn Bar = &mut thing;
     //~^ ERROR E0038
-    //~| ERROR E0038
     foo(test);
+    //~^ ERROR E0038
 }
diff --git a/tests/ui/issues/issue-18959.stderr b/tests/ui/issues/issue-18959.stderr
index 1e050b115e5..df47d50a019 100644
--- a/tests/ui/issues/issue-18959.stderr
+++ b/tests/ui/issues/issue-18959.stderr
@@ -15,26 +15,10 @@ LL | pub trait Bar: Foo { }
    = help: consider moving `foo` to another trait
 
 error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/issue-18959.rs:13:5
-   |
-LL |     b.foo(&0)
-   |     ^^^^^^^^^ `Bar` 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-18959.rs:1:20
-   |
-LL | pub trait Foo { fn foo<T>(&self, ext_thing: &T); }
-   |                    ^^^ ...because method `foo` has generic type parameters
-LL | pub trait Bar: Foo { }
-   |           --- this trait is not dyn compatible...
-   = help: consider moving `foo` to another trait
-
-error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/issue-18959.rs:19:26
+  --> $DIR/issue-18959.rs:18:20
    |
 LL |     let test: &dyn Bar = &mut thing;
-   |                          ^^^^^^^^^^ `Bar` is not dyn compatible
+   |                    ^^^ `Bar` 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>
@@ -45,13 +29,12 @@ LL | pub trait Foo { fn foo<T>(&self, ext_thing: &T); }
 LL | pub trait Bar: Foo { }
    |           --- this trait is not dyn compatible...
    = help: consider moving `foo` to another trait
-   = note: required for the cast from `&mut Thing` to `&dyn Bar`
 
 error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/issue-18959.rs:19:15
+  --> $DIR/issue-18959.rs:20:9
    |
-LL |     let test: &dyn Bar = &mut thing;
-   |               ^^^^^^^^ `Bar` is not dyn compatible
+LL |     foo(test);
+   |         ^^^^ `Bar` 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>
@@ -63,6 +46,6 @@ LL | pub trait Bar: Foo { }
    |           --- this trait is not dyn compatible...
    = help: consider moving `foo` to another trait
 
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/issues/issue-19380.rs b/tests/ui/issues/issue-19380.rs
index 8b3fe4d2b09..fce737cba18 100644
--- a/tests/ui/issues/issue-19380.rs
+++ b/tests/ui/issues/issue-19380.rs
@@ -15,6 +15,5 @@ struct Bar {
 const FOO : Foo = Foo;
 const BAR : Bar = Bar { foos: &[&FOO]};
 //~^ ERROR E0038
-//~| ERROR E0038
 
 fn main() { }
diff --git a/tests/ui/issues/issue-19380.stderr b/tests/ui/issues/issue-19380.stderr
index f8509891d3a..4c41d41ae37 100644
--- a/tests/ui/issues/issue-19380.stderr
+++ b/tests/ui/issues/issue-19380.stderr
@@ -23,31 +23,6 @@ LL |   fn qiz() where Self: Sized;
    |            +++++++++++++++++
 
 error[E0038]: the trait `Qiz` is not dyn compatible
-  --> $DIR/issue-19380.rs:16:33
-   |
-LL | const BAR : Bar = Bar { foos: &[&FOO]};
-   |                                 ^^^^ `Qiz` 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-19380.rs:2:6
-   |
-LL | trait Qiz {
-   |       --- this trait is not dyn compatible...
-LL |   fn qiz();
-   |      ^^^ ...because associated function `qiz` has no `self` parameter
-   = help: only type `Foo` implements `Qiz`; consider using it directly instead.
-   = note: required for the cast from `&Foo` to `&'static (dyn Qiz + 'static)`
-help: consider turning `qiz` into a method by giving it a `&self` argument
-   |
-LL |   fn qiz(&self);
-   |          +++++
-help: alternatively, consider constraining `qiz` so it does not apply to trait objects
-   |
-LL |   fn qiz() where Self: Sized;
-   |            +++++++++++++++++
-
-error[E0038]: the trait `Qiz` is not dyn compatible
   --> $DIR/issue-19380.rs:16:31
    |
 LL | const BAR : Bar = Bar { foos: &[&FOO]};
@@ -71,6 +46,6 @@ help: alternatively, consider constraining `qiz` so it does not apply to trait o
 LL |   fn qiz() where Self: Sized;
    |            +++++++++++++++++
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/issues/issue-30123.stderr b/tests/ui/issues/issue-30123.stderr
index c086b45ac9b..3ed1f34c44a 100644
--- a/tests/ui/issues/issue-30123.stderr
+++ b/tests/ui/issues/issue-30123.stderr
@@ -2,7 +2,7 @@ error[E0599]: no function or associated item named `new_undirected` found for st
   --> $DIR/issue-30123.rs:7:33
    |
 LL |     let ug = Graph::<i32, i32>::new_undirected();
-   |                                 ^^^^^^^^^^^^^^ function or associated item not found in `Graph<i32, i32>`
+   |                                 ^^^^^^^^^^^^^^ function or associated item not found in `issue_30123_aux::Graph<i32, i32>`
    |
 note: if you're trying to build a new `issue_30123_aux::Graph<i32, i32>`, consider using `issue_30123_aux::Graph::<N, E>::new` which returns `issue_30123_aux::Graph<_, _>`
   --> $DIR/auxiliary/issue-30123-aux.rs:14:5
diff --git a/tests/ui/issues/issue-34373.rs b/tests/ui/issues/issue-34373.rs
index 707aa8cf338..5b05811a4eb 100644
--- a/tests/ui/issues/issue-34373.rs
+++ b/tests/ui/issues/issue-34373.rs
@@ -4,7 +4,7 @@ trait Trait<T> {
     fn foo(_: T) {}
 }
 
-pub struct Foo<T = Box<Trait<DefaultFoo>>>;  //~ ERROR cycle detected
+pub struct Foo<T = Box<dyn Trait<DefaultFoo>>>;  //~ ERROR cycle detected
 //~^ ERROR `T` is never used
 type DefaultFoo = Foo;
 
diff --git a/tests/ui/issues/issue-34373.stderr b/tests/ui/issues/issue-34373.stderr
index 06365558217..03d77193134 100644
--- a/tests/ui/issues/issue-34373.stderr
+++ b/tests/ui/issues/issue-34373.stderr
@@ -1,8 +1,8 @@
 error[E0391]: cycle detected when computing type of `Foo::T`
-  --> $DIR/issue-34373.rs:7:30
+  --> $DIR/issue-34373.rs:7:34
    |
-LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
-   |                              ^^^^^^^^^^
+LL | pub struct Foo<T = Box<dyn Trait<DefaultFoo>>>;
+   |                                  ^^^^^^^^^^
    |
 note: ...which requires expanding type alias `DefaultFoo`...
   --> $DIR/issue-34373.rs:9:19
@@ -13,15 +13,15 @@ LL | type DefaultFoo = Foo;
 note: cycle used when checking that `Foo` is well-formed
   --> $DIR/issue-34373.rs:7:1
    |
-LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | pub struct Foo<T = Box<dyn Trait<DefaultFoo>>>;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = 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[E0392]: type parameter `T` is never used
   --> $DIR/issue-34373.rs:7:16
    |
-LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^ unused type parameter
+LL | pub struct Foo<T = Box<dyn Trait<DefaultFoo>>>;
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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
diff --git a/tests/ui/issues/issue-41880.stderr b/tests/ui/issues/issue-41880.stderr
index 9d09be66305..1936c0aebd4 100644
--- a/tests/ui/issues/issue-41880.stderr
+++ b/tests/ui/issues/issue-41880.stderr
@@ -5,7 +5,7 @@ LL | pub struct Iterate<T, F> {
    | ------------------------ method `iter` not found for this struct
 ...
 LL |     println!("{:?}", a.iter().take(10).collect::<Vec<usize>>());
-   |                        ^^^^ method not found in `Iterate<{integer}, {closure@issue-41880.rs:26:24}>`
+   |                        ^^^^ method not found in `Iterate<{integer}, {closure@$DIR/issue-41880.rs:26:24: 26:27}>`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-50781.rs b/tests/ui/issues/issue-50781.rs
index ab90db1cadc..d837b848591 100644
--- a/tests/ui/issues/issue-50781.rs
+++ b/tests/ui/issues/issue-50781.rs
@@ -15,5 +15,4 @@ pub fn main() {
     // Check that this does not segfault.
     <dyn X as X>::foo(&());
     //~^ ERROR the trait `X` is not dyn compatible
-    //~| ERROR the trait `X` is not dyn compatible
 }
diff --git a/tests/ui/issues/issue-50781.stderr b/tests/ui/issues/issue-50781.stderr
index 88b83a83e0c..4ba3166b6c5 100644
--- a/tests/ui/issues/issue-50781.stderr
+++ b/tests/ui/issues/issue-50781.stderr
@@ -16,10 +16,10 @@ LL |     fn foo(&self) where Self: Trait;
    = help: only type `()` implements `X`; consider using it directly instead.
 
 error[E0038]: the trait `X` is not dyn compatible
-  --> $DIR/issue-50781.rs:16:23
+  --> $DIR/issue-50781.rs:16:10
    |
 LL |     <dyn X as X>::foo(&());
-   |                       ^^^ `X` is not dyn compatible
+   |          ^ `X` 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>
@@ -31,25 +31,7 @@ LL |     fn foo(&self) where Self: Trait;
    |        ^^^ ...because method `foo` references the `Self` type in its `where` clause
    = help: consider moving `foo` to another trait
    = help: only type `()` implements `X`; consider using it directly instead.
-   = note: required for the cast from `&()` to `&dyn X`
 
-error[E0038]: the trait `X` is not dyn compatible
-  --> $DIR/issue-50781.rs:16:6
-   |
-LL |     <dyn X as X>::foo(&());
-   |      ^^^^^ `X` 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-50781.rs:4:8
-   |
-LL | trait X {
-   |       - this trait is not dyn compatible...
-LL |     fn foo(&self) where Self: Trait;
-   |        ^^^ ...because method `foo` references the `Self` type in its `where` clause
-   = help: consider moving `foo` to another trait
-   = help: only type `()` implements `X`; consider using it directly instead.
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/issues/issue-58734.rs b/tests/ui/issues/issue-58734.rs
index ee23be87b6b..e5b371f5530 100644
--- a/tests/ui/issues/issue-58734.rs
+++ b/tests/ui/issues/issue-58734.rs
@@ -18,8 +18,7 @@ fn main() {
     Trait::exists(());
     // no dyn-compatibility error
     Trait::nonexistent(());
-    //~^ ERROR no function or associated item named `nonexistent` found
-    //~| WARN trait objects without an explicit `dyn` are deprecated
+    //~^ WARN trait objects without an explicit `dyn` are deprecated
     //~| WARN this is accepted in the current edition
     //~| ERROR the trait `Trait` is not dyn compatible
 }
diff --git a/tests/ui/issues/issue-58734.stderr b/tests/ui/issues/issue-58734.stderr
index c4624cecc62..e5dad000b51 100644
--- a/tests/ui/issues/issue-58734.stderr
+++ b/tests/ui/issues/issue-58734.stderr
@@ -37,13 +37,6 @@ help: alternatively, consider constraining `dyn_incompatible` so it does not app
 LL |     fn dyn_incompatible() -> Self where Self: Sized;
    |                                   +++++++++++++++++
 
-error[E0599]: no function or associated item named `nonexistent` found for trait object `dyn Trait` in the current scope
-  --> $DIR/issue-58734.rs:20:12
-   |
-LL |     Trait::nonexistent(());
-   |            ^^^^^^^^^^^ function or associated item not found in `dyn Trait`
-
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
 
-Some errors have detailed explanations: E0038, E0599.
-For more information about an error, try `rustc --explain E0038`.
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/issues/issue-76191.rs b/tests/ui/issues/issue-76191.rs
index 277624c005a..d2de44380c3 100644
--- a/tests/ui/issues/issue-76191.rs
+++ b/tests/ui/issues/issue-76191.rs
@@ -6,7 +6,7 @@ use std::ops::RangeInclusive;
 const RANGE: RangeInclusive<i32> = 0..=255;
 
 const RANGE2: RangeInclusive<i32> = panic!();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR evaluation panicked: explicit panic
 
 fn main() {
     let n: i32 = 1;
diff --git a/tests/ui/issues/issue-76191.stderr b/tests/ui/issues/issue-76191.stderr
index ac1bdfaa847..1f19db49c43 100644
--- a/tests/ui/issues/issue-76191.stderr
+++ b/tests/ui/issues/issue-76191.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: explicit panic
   --> $DIR/issue-76191.rs:8:37
    |
 LL | const RANGE2: RangeInclusive<i32> = panic!();
-   |                                     ^^^^^^^^ evaluation panicked: explicit panic
+   |                                     ^^^^^^^^ evaluation of constant value failed here
 
 error[E0308]: mismatched types
   --> $DIR/issue-76191.rs:14:9
diff --git a/tests/ui/iterators/generator.rs b/tests/ui/iterators/generator.rs
new file mode 100644
index 00000000000..e633efb11c1
--- /dev/null
+++ b/tests/ui/iterators/generator.rs
@@ -0,0 +1,24 @@
+//@ run-pass
+
+#![feature(iter_macro, yield_expr)]
+
+use std::iter::iter;
+
+fn main() {
+    let i = iter! { || {
+        yield 0;
+        for x in 5..10 {
+            yield x * 2;
+        }
+    } };
+    let mut i = i();
+    assert_eq!(i.next(), Some(0));
+    assert_eq!(i.next(), Some(10));
+    assert_eq!(i.next(), Some(12));
+    assert_eq!(i.next(), Some(14));
+    assert_eq!(i.next(), Some(16));
+    assert_eq!(i.next(), Some(18));
+    assert_eq!(i.next(), None);
+    assert_eq!(i.next(), None);
+    assert_eq!(i.next(), None);
+}
diff --git a/tests/ui/iterators/generator_args.rs b/tests/ui/iterators/generator_args.rs
new file mode 100644
index 00000000000..c9da9e5fba6
--- /dev/null
+++ b/tests/ui/iterators/generator_args.rs
@@ -0,0 +1,24 @@
+//@ run-pass
+
+#![feature(iter_macro, yield_expr)]
+
+use std::iter::iter;
+
+fn main() {
+    let i = iter! {|foo| {
+        yield foo;
+        for x in 5..10 {
+            yield x * 2;
+        }
+    }};
+    let mut i = i(3);
+    assert_eq!(i.next(), Some(3));
+    assert_eq!(i.next(), Some(10));
+    assert_eq!(i.next(), Some(12));
+    assert_eq!(i.next(), Some(14));
+    assert_eq!(i.next(), Some(16));
+    assert_eq!(i.next(), Some(18));
+    assert_eq!(i.next(), None);
+    assert_eq!(i.next(), None);
+    assert_eq!(i.next(), None);
+}
diff --git a/tests/ui/iterators/generator_capture.rs b/tests/ui/iterators/generator_capture.rs
new file mode 100644
index 00000000000..c790b7a4b96
--- /dev/null
+++ b/tests/ui/iterators/generator_capture.rs
@@ -0,0 +1,27 @@
+//@ run-pass
+
+#![feature(iter_macro, yield_expr)]
+
+use std::iter::iter;
+
+fn main() {
+    let i = {
+        let s = String::new();
+        iter! { move || {
+            yield s.len();
+            for x in 5..10 {
+                yield x * 2;
+            }
+        }}
+    };
+    let mut i = i();
+    assert_eq!(i.next(), Some(0));
+    assert_eq!(i.next(), Some(10));
+    assert_eq!(i.next(), Some(12));
+    assert_eq!(i.next(), Some(14));
+    assert_eq!(i.next(), Some(16));
+    assert_eq!(i.next(), Some(18));
+    assert_eq!(i.next(), None);
+    assert_eq!(i.next(), None);
+    assert_eq!(i.next(), None);
+}
diff --git a/tests/ui/iterators/generator_capture_.rs b/tests/ui/iterators/generator_capture_.rs
new file mode 100644
index 00000000000..f630bc64b97
--- /dev/null
+++ b/tests/ui/iterators/generator_capture_.rs
@@ -0,0 +1,26 @@
+// This test exercises lending behavior for iterator closures which is not yet supported.
+
+#![feature(iter_macro, yield_expr)]
+
+use std::iter::iter;
+
+fn main() {
+    let f = {
+        let s = "foo".to_string();
+        iter! { move || {
+            for c in s.chars() {
+                yield c;
+            }
+        }}
+    };
+    let mut i = f();
+    assert_eq!(i.next(), Some('f'));
+    assert_eq!(i.next(), Some('o'));
+    assert_eq!(i.next(), Some('o'));
+    assert_eq!(i.next(), None);
+    let mut i = f(); //~ ERROR use of moved value: `f`
+    assert_eq!(i.next(), Some('f'));
+    assert_eq!(i.next(), Some('o'));
+    assert_eq!(i.next(), Some('o'));
+    assert_eq!(i.next(), None);
+}
diff --git a/tests/ui/iterators/generator_capture_.stderr b/tests/ui/iterators/generator_capture_.stderr
new file mode 100644
index 00000000000..3d9647ae16f
--- /dev/null
+++ b/tests/ui/iterators/generator_capture_.stderr
@@ -0,0 +1,25 @@
+error[E0382]: use of moved value: `f`
+  --> $DIR/generator_capture_.rs:21:17
+   |
+LL |     let f = {
+   |         - move occurs because `f` has type `{gen closure@$DIR/generator_capture_.rs:10:17: 10:24}`, which does not implement the `Copy` trait
+...
+LL |     let mut i = f();
+   |                 --- `f` moved due to this call
+...
+LL |     let mut i = f();
+   |                 ^ value used here after move
+   |
+note: this value implements `FnOnce`, which causes it to be moved when called
+  --> $DIR/generator_capture_.rs:16:17
+   |
+LL |     let mut i = f();
+   |                 ^
+help: consider cloning the value if the performance cost is acceptable
+   |
+LL |     let mut i = f.clone()();
+   |                  ++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/iterators/generator_capture_fail.rs b/tests/ui/iterators/generator_capture_fail.rs
new file mode 100644
index 00000000000..d987b2df011
--- /dev/null
+++ b/tests/ui/iterators/generator_capture_fail.rs
@@ -0,0 +1,25 @@
+#![feature(iter_macro, yield_expr)]
+
+use std::iter::iter;
+
+fn main() {
+    let i = {
+        let s = String::new();
+        iter! { || { //~ ERROR `s` does not live long enough
+            yield s.len();
+            for x in 5..10 {
+                yield x * 2;
+            }
+        } }
+    };
+    let mut i = i();
+    assert_eq!(i.next(), Some(0));
+    assert_eq!(i.next(), Some(10));
+    assert_eq!(i.next(), Some(12));
+    assert_eq!(i.next(), Some(14));
+    assert_eq!(i.next(), Some(16));
+    assert_eq!(i.next(), Some(18));
+    assert_eq!(i.next(), None);
+    assert_eq!(i.next(), None);
+    assert_eq!(i.next(), None);
+}
diff --git a/tests/ui/iterators/generator_capture_fail.stderr b/tests/ui/iterators/generator_capture_fail.stderr
new file mode 100644
index 00000000000..225a385d6a0
--- /dev/null
+++ b/tests/ui/iterators/generator_capture_fail.stderr
@@ -0,0 +1,20 @@
+error[E0597]: `s` does not live long enough
+  --> $DIR/generator_capture_fail.rs:8:17
+   |
+LL |       let i = {
+   |           - borrow later stored here
+LL |           let s = String::new();
+LL |           iter! { || {
+   |  _________________^
+LL | |             yield s.len();
+LL | |             for x in 5..10 {
+LL | |                 yield x * 2;
+LL | |             }
+LL | |         } }
+   | |_________^ borrowed value does not live long enough
+LL |       };
+   |       - `s` 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/iterators/generator_capture_fnonce.rs b/tests/ui/iterators/generator_capture_fnonce.rs
new file mode 100644
index 00000000000..090727eb9b7
--- /dev/null
+++ b/tests/ui/iterators/generator_capture_fnonce.rs
@@ -0,0 +1,32 @@
+//@ run-pass
+
+#![feature(iter_macro, yield_expr)]
+
+use std::iter::iter;
+
+fn main() {
+    let i = {
+        let s = String::new();
+        iter! { move || {
+            yield s.len();
+            for x in 5..10 {
+                yield x * 2;
+            }
+        }}
+    };
+    test_iterator(i);
+}
+
+/// Exercise the iterator in a separate function to ensure it's not capturing anything it shoudln't.
+fn test_iterator<I: Iterator<Item = usize>>(i: impl FnOnce() -> I) {
+    let mut i = i();
+    assert_eq!(i.next(), Some(0));
+    assert_eq!(i.next(), Some(10));
+    assert_eq!(i.next(), Some(12));
+    assert_eq!(i.next(), Some(14));
+    assert_eq!(i.next(), Some(16));
+    assert_eq!(i.next(), Some(18));
+    assert_eq!(i.next(), None);
+    assert_eq!(i.next(), None);
+    assert_eq!(i.next(), None);
+}
diff --git a/tests/ui/iterators/generator_capture_no_lend.rs b/tests/ui/iterators/generator_capture_no_lend.rs
new file mode 100644
index 00000000000..822db58d48d
--- /dev/null
+++ b/tests/ui/iterators/generator_capture_no_lend.rs
@@ -0,0 +1,30 @@
+//@ run-pass
+
+#![feature(iter_macro, yield_expr)]
+
+// This test creates an iterator that captures a reference and ensure that doesn't force the
+// iterator to become lending.
+
+use std::iter::iter;
+
+fn main() {
+    let s = "foo".to_string();
+    let f = iter! { || {
+        for c in s.chars() {
+            yield c;
+        }
+    }};
+
+    let mut i = f();
+    let mut j = f();
+
+    assert_eq!(i.next(), Some('f'));
+    assert_eq!(i.next(), Some('o'));
+    assert_eq!(i.next(), Some('o'));
+    assert_eq!(i.next(), None);
+
+    assert_eq!(j.next(), Some('f'));
+    assert_eq!(j.next(), Some('o'));
+    assert_eq!(j.next(), Some('o'));
+    assert_eq!(j.next(), None);
+}
diff --git a/tests/ui/iterators/generator_returned_from_fn.rs b/tests/ui/iterators/generator_returned_from_fn.rs
new file mode 100644
index 00000000000..bd0317b1ffb
--- /dev/null
+++ b/tests/ui/iterators/generator_returned_from_fn.rs
@@ -0,0 +1,63 @@
+#![feature(iter_macro, impl_trait_in_fn_trait_return, yield_expr)]
+
+use std::iter::iter;
+
+fn plain() -> impl Fn() -> impl Iterator<Item = u32> {
+    iter! { || {
+        yield 0;
+        for x in 5..10 {
+            yield x * 2;
+        }
+    } }
+}
+
+fn arg() -> impl Fn(u32) -> impl Iterator<Item = u32> {
+    iter! { |arg| {
+        yield arg;
+        for x in 5..10 {
+            yield x * 2;
+        }
+    } }
+}
+
+fn capture<'a>(a: &'a u32) -> impl Fn() -> (impl Iterator<Item = u32> + 'a) {
+    iter! { || { //~ ERROR cannot return reference to function parameter `a`
+        yield *a;
+        for x in 5..10 {
+            yield x * 2;
+        }
+    } }
+}
+
+fn capture_move(a: &u32) -> impl Fn() -> impl Iterator<Item = u32> {
+    iter! { move || { //~ ERROR does not implement `Fn` because it captures
+        yield *a;
+        for x in 5..10 {
+            yield x * 2;
+        }
+    } }
+}
+
+fn capture_move_once(a: &u32) -> impl FnOnce() -> impl Iterator<Item = u32> {
+    iter! { move || {
+        //~^ ERROR captures lifetime
+        //~| ERROR: captures lifetime
+        yield *a;
+        for x in 5..10 {
+            yield x * 2;
+        }
+    } }
+}
+
+fn capture_move_once_lifetimes<'a>(
+    a: &'a u32,
+) -> impl FnOnce() -> (impl Iterator<Item = u32> + 'a) {
+    iter! { move || {
+        yield *a;
+        for x in 5..10 {
+            yield x * 2;
+        }
+    } }
+}
+
+fn main() {}
diff --git a/tests/ui/iterators/generator_returned_from_fn.stderr b/tests/ui/iterators/generator_returned_from_fn.stderr
new file mode 100644
index 00000000000..b2324af6d5e
--- /dev/null
+++ b/tests/ui/iterators/generator_returned_from_fn.stderr
@@ -0,0 +1,70 @@
+error[E0515]: cannot return reference to function parameter `a`
+  --> $DIR/generator_returned_from_fn.rs:24:13
+   |
+LL |       iter! { || {
+   |  _____________^
+LL | |         yield *a;
+LL | |         for x in 5..10 {
+LL | |             yield x * 2;
+LL | |         }
+LL | |     } }
+   | |_____^ returns a reference to data owned by the current function
+
+error: gen closure does not implement `Fn` because it captures state from its environment
+  --> $DIR/generator_returned_from_fn.rs:33:13
+   |
+LL |       iter! { move || {
+   |  _____________-^^^^^^
+LL | |         yield *a;
+LL | |         for x in 5..10 {
+LL | |             yield x * 2;
+LL | |         }
+LL | |     } }
+   | |_____- return type was inferred to be `{gen closure@$DIR/generator_returned_from_fn.rs:33:13: 33:20}` here
+
+error[E0700]: hidden type for `impl FnOnce() -> impl Iterator<Item = u32>` captures lifetime that does not appear in bounds
+  --> $DIR/generator_returned_from_fn.rs:42:13
+   |
+LL |   fn capture_move_once(a: &u32) -> impl FnOnce() -> impl Iterator<Item = u32> {
+   |                           ----     ------------------------------------------ opaque type defined here
+   |                           |
+   |                           hidden type `{gen closure@$DIR/generator_returned_from_fn.rs:42:13: 42:20}` captures the anonymous lifetime defined here
+LL |       iter! { move || {
+   |  _____________^
+LL | |
+LL | |
+LL | |         yield *a;
+...  |
+LL | |     } }
+   | |_____^
+   |
+help: add a `use<...>` bound to explicitly capture `'_`
+   |
+LL | fn capture_move_once(a: &u32) -> impl FnOnce() -> impl Iterator<Item = u32> + use<'_> {
+   |                                                                             +++++++++
+
+error[E0700]: hidden type for `impl Iterator<Item = u32>` captures lifetime that does not appear in bounds
+  --> $DIR/generator_returned_from_fn.rs:42:13
+   |
+LL |   fn capture_move_once(a: &u32) -> impl FnOnce() -> impl Iterator<Item = u32> {
+   |                           ----                      ------------------------- opaque type defined here
+   |                           |
+   |                           hidden type `{gen closure body@$DIR/generator_returned_from_fn.rs:42:21: 49:6}` captures the anonymous lifetime defined here
+LL |       iter! { move || {
+   |  _____________^
+LL | |
+LL | |
+LL | |         yield *a;
+...  |
+LL | |     } }
+   | |_____^
+   |
+help: add a `use<...>` bound to explicitly capture `'_`
+   |
+LL | fn capture_move_once(a: &u32) -> impl FnOnce() -> impl Iterator<Item = u32> + use<'_> {
+   |                                                                             +++++++++
+
+error: aborting due to 4 previous errors
+
+Some errors have detailed explanations: E0515, E0700.
+For more information about an error, try `rustc --explain E0515`.
diff --git a/tests/ui/iterators/iter-macro-not-async-closure-simplified.narrow.stderr b/tests/ui/iterators/iter-macro-not-async-closure-simplified.narrow.stderr
new file mode 100644
index 00000000000..4e0dabade2d
--- /dev/null
+++ b/tests/ui/iterators/iter-macro-not-async-closure-simplified.narrow.stderr
@@ -0,0 +1,18 @@
+error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure-simplified.rs:21:21: 21:28}: AsyncFnOnce()` is not satisfied
+  --> $DIR/iter-macro-not-async-closure-simplified.rs:27:21
+   |
+LL |     call_async_once(f);
+   |     --------------- ^ unsatisfied trait bound
+   |     |
+   |     required by a bound introduced by this call
+   |
+   = help: the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure-simplified.rs:21:21: 21:28}`
+note: required by a bound in `call_async_once`
+  --> $DIR/iter-macro-not-async-closure-simplified.rs:18:28
+   |
+LL | ...pl AsyncFnOnce()) {}
+   |       ^^^^^^^^^^^^^ required by this bound in `call_async_once`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/iterators/iter-macro-not-async-closure-simplified.rs b/tests/ui/iterators/iter-macro-not-async-closure-simplified.rs
new file mode 100644
index 00000000000..4fa14fda661
--- /dev/null
+++ b/tests/ui/iterators/iter-macro-not-async-closure-simplified.rs
@@ -0,0 +1,29 @@
+// This test ensures iterators created with the `iter!` macro are not
+// accidentally async closures.
+//
+// We test this both in a `narrow` and `wide` configuration because
+// the way that the diagnostic is emitted varies depending on the
+// diagnostic width.  If it's too narrow to fit the explanation, that
+// explanation is moved to the `help` instead of the span label.
+//
+//@ edition: 2024
+//@ revisions: narrow wide
+//@[narrow] compile-flags: --diagnostic-width=20
+//@[wide] compile-flags: --diagnostic-width=300
+
+#![feature(yield_expr, iter_macro)]
+
+use std::iter::iter;
+
+fn call_async_once(_: impl AsyncFnOnce()) {}
+
+fn main() {
+    let f = iter! { move || {
+        for i in 0..10 {
+            yield i;
+        }
+    }};
+
+    call_async_once(f);
+    //~^ ERROR AsyncFnOnce()` is not satisfied
+}
diff --git a/tests/ui/iterators/iter-macro-not-async-closure-simplified.wide.stderr b/tests/ui/iterators/iter-macro-not-async-closure-simplified.wide.stderr
new file mode 100644
index 00000000000..a6c239c181b
--- /dev/null
+++ b/tests/ui/iterators/iter-macro-not-async-closure-simplified.wide.stderr
@@ -0,0 +1,17 @@
+error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure-simplified.rs:21:21: 21:28}: AsyncFnOnce()` is not satisfied
+  --> $DIR/iter-macro-not-async-closure-simplified.rs:27:21
+   |
+LL |     call_async_once(f);
+   |     --------------- ^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure-simplified.rs:21:21: 21:28}`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `call_async_once`
+  --> $DIR/iter-macro-not-async-closure-simplified.rs:18:28
+   |
+LL | fn call_async_once(_: impl AsyncFnOnce()) {}
+   |                            ^^^^^^^^^^^^^ required by this bound in `call_async_once`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/iterators/iter-macro-not-async-closure.narrow.stderr b/tests/ui/iterators/iter-macro-not-async-closure.narrow.stderr
new file mode 100644
index 00000000000..af3289c3d4e
--- /dev/null
+++ b/tests/ui/iterators/iter-macro-not-async-closure.narrow.stderr
@@ -0,0 +1,72 @@
+error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}: AsyncFnOnce()` is not satisfied
+  --> $DIR/iter-macro-not-async-closure.rs:32:34
+   |
+LL | ...n!(call_async_once(f));
+   |       --------------- ^ unsatisfied trait bound
+   |       |
+   |       required by a bound introduced by this call
+   |
+   = help: the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}`
+note: required by a bound in `call_async_once`
+  --> $DIR/iter-macro-not-async-closure.rs:21:34
+   |
+LL | ...pl AsyncFnOnce()) {
+   |       ^^^^^^^^^^^^^ required by this bound in `call_async_once`
+
+error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}: AsyncFnOnce()` is not satisfied
+  --> $DIR/iter-macro-not-async-closure.rs:32:18
+   |
+LL | ...n!(call_async_once(f));
+   |       ^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
+   |
+   = help: the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}`
+note: required by a bound in `call_async_once`
+  --> $DIR/iter-macro-not-async-closure.rs:21:34
+   |
+LL | ...pl AsyncFnOnce()) {
+   |       ^^^^^^^^^^^^^ required by this bound in `call_async_once`
+
+error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}: AsyncFnOnce()` is not satisfied
+  --> $DIR/iter-macro-not-async-closure.rs:32:13
+   |
+LL | ... = pin!(call_async_once(f));
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
+   |
+   = help: the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}`
+note: required by a bound in `call_async_once`
+  --> $DIR/iter-macro-not-async-closure.rs:21:34
+   |
+LL | ...pl AsyncFnOnce()) {
+   |       ^^^^^^^^^^^^^ required by this bound in `call_async_once`
+   = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}: AsyncFnOnce()` is not satisfied
+  --> $DIR/iter-macro-not-async-closure.rs:32:13
+   |
+LL | ... = pin!(call_async_once(f));
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
+   |
+   = help: the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}`
+note: required by a bound in `call_async_once`
+  --> $DIR/iter-macro-not-async-closure.rs:21:34
+   |
+LL | ...pl AsyncFnOnce()) {
+   |       ^^^^^^^^^^^^^ required by this bound in `call_async_once`
+   = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}: AsyncFnOnce()` is not satisfied
+  --> $DIR/iter-macro-not-async-closure.rs:37:5
+   |
+LL |     ...::noop()));
+   |     ...^^^^^^^^^^ unsatisfied trait bound
+   |
+   = help: the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:26:21: 26:28}`
+note: required by a bound in `call_async_once`
+  --> $DIR/iter-macro-not-async-closure.rs:21:34
+   |
+LL | ...pl AsyncFnOnce()) {
+   |       ^^^^^^^^^^^^^ required by this bound in `call_async_once`
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/iterators/iter-macro-not-async-closure.rs b/tests/ui/iterators/iter-macro-not-async-closure.rs
new file mode 100644
index 00000000000..634391883ea
--- /dev/null
+++ b/tests/ui/iterators/iter-macro-not-async-closure.rs
@@ -0,0 +1,32 @@
+// This test ensures iterators created with the `iter!` macro are not
+// accidentally async closures.
+//
+//@ edition: 2024
+//@ remap-src-base
+
+#![feature(yield_expr, iter_macro)]
+
+use std::task::{Waker, Context};
+use std::iter::iter;
+use std::pin::pin;
+use std::future::Future;
+
+async fn call_async_once(f: impl AsyncFnOnce()) {
+    f().await
+}
+
+fn main() {
+    let f = iter! { move || {
+        for i in 0..10 {
+            yield i;
+        }
+    }};
+
+    let x = pin!(call_async_once(f));
+    //~^ ERROR AsyncFnOnce()` is not satisfied
+    //~^^ ERROR AsyncFnOnce()` is not satisfied
+    //~^^^ ERROR AsyncFnOnce()` is not satisfied
+    //~^^^^ ERROR AsyncFnOnce()` is not satisfied
+    x.poll(&mut Context::from_waker(Waker::noop()));
+    //~^ ERROR AsyncFnOnce()` is not satisfied
+}
diff --git a/tests/ui/iterators/iter-macro-not-async-closure.stderr b/tests/ui/iterators/iter-macro-not-async-closure.stderr
new file mode 100644
index 00000000000..2f0343a2d0d
--- /dev/null
+++ b/tests/ui/iterators/iter-macro-not-async-closure.stderr
@@ -0,0 +1,67 @@
+error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied
+  --> $DIR/iter-macro-not-async-closure.rs:25:34
+   |
+LL |     let x = pin!(call_async_once(f));
+   |                  --------------- ^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}`
+   |                  |
+   |                  required by a bound introduced by this call
+   |
+note: required by a bound in `call_async_once`
+  --> $DIR/iter-macro-not-async-closure.rs:14:34
+   |
+LL | async fn call_async_once(f: impl AsyncFnOnce()) {
+   |                                  ^^^^^^^^^^^^^ required by this bound in `call_async_once`
+
+error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied
+  --> $DIR/iter-macro-not-async-closure.rs:25:18
+   |
+LL |     let x = pin!(call_async_once(f));
+   |                  ^^^^^^^^^^^^^^^^^^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}`
+   |
+note: required by a bound in `call_async_once`
+  --> $DIR/iter-macro-not-async-closure.rs:14:34
+   |
+LL | async fn call_async_once(f: impl AsyncFnOnce()) {
+   |                                  ^^^^^^^^^^^^^ required by this bound in `call_async_once`
+
+error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied
+  --> $DIR/iter-macro-not-async-closure.rs:25:13
+   |
+LL |     let x = pin!(call_async_once(f));
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}`
+   |
+note: required by a bound in `call_async_once`
+  --> $DIR/iter-macro-not-async-closure.rs:14:34
+   |
+LL | async fn call_async_once(f: impl AsyncFnOnce()) {
+   |                                  ^^^^^^^^^^^^^ required by this bound in `call_async_once`
+   = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied
+  --> $DIR/iter-macro-not-async-closure.rs:25:13
+   |
+LL |     let x = pin!(call_async_once(f));
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}`
+   |
+note: required by a bound in `call_async_once`
+  --> $DIR/iter-macro-not-async-closure.rs:14:34
+   |
+LL | async fn call_async_once(f: impl AsyncFnOnce()) {
+   |                                  ^^^^^^^^^^^^^ required by this bound in `call_async_once`
+   = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied
+  --> $DIR/iter-macro-not-async-closure.rs:30:5
+   |
+LL |     x.poll(&mut Context::from_waker(Waker::noop()));
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsyncFnOnce()` is not implemented for `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}`
+   |
+note: required by a bound in `call_async_once`
+  --> $DIR/iter-macro-not-async-closure.rs:14:34
+   |
+LL | async fn call_async_once(f: impl AsyncFnOnce()) {
+   |                                  ^^^^^^^^^^^^^ required by this bound in `call_async_once`
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.rs b/tests/ui/kindck/kindck-inherited-copy-bound.rs
index 20d54a3fb10..92c2b273c2c 100644
--- a/tests/ui/kindck/kindck-inherited-copy-bound.rs
+++ b/tests/ui/kindck/kindck-inherited-copy-bound.rs
@@ -22,7 +22,6 @@ fn b() {
     let y = &x;
     let z = &x as &dyn Foo;
     //~^ ERROR E0038
-    //~| ERROR E0038
 }
 
 fn main() { }
diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.stderr b/tests/ui/kindck/kindck-inherited-copy-bound.stderr
index edfa7ae7769..c15aabacddd 100644
--- a/tests/ui/kindck/kindck-inherited-copy-bound.stderr
+++ b/tests/ui/kindck/kindck-inherited-copy-bound.stderr
@@ -20,10 +20,10 @@ LL | fn take_param<T:Foo>(foo: &T) { }
    |                 ^^^ required by this bound in `take_param`
 
 error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/kindck-inherited-copy-bound.rs:23:19
+  --> $DIR/kindck-inherited-copy-bound.rs:23:24
    |
 LL |     let z = &x as &dyn Foo;
-   |                   ^^^^^^^^ `Foo` is not dyn compatible
+   |                        ^^^ `Foo` 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>
@@ -34,23 +34,7 @@ LL | trait Foo : Copy {
    |       |
    |       this trait is not dyn compatible...
 
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/kindck-inherited-copy-bound.rs:23:13
-   |
-LL |     let z = &x as &dyn Foo;
-   |             ^^ `Foo` 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/kindck-inherited-copy-bound.rs:6:13
-   |
-LL | trait Foo : Copy {
-   |       ---   ^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-   = note: required for the cast from `&Box<{integer}>` to `&dyn Foo`
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0038, E0277.
 For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/label/continue-pointing-to-block-ice-113379.rs b/tests/ui/label/continue-pointing-to-block-ice-113379.rs
new file mode 100644
index 00000000000..8a6a9cc8409
--- /dev/null
+++ b/tests/ui/label/continue-pointing-to-block-ice-113379.rs
@@ -0,0 +1,12 @@
+//! Regression test for ICE #113379. Liveness linting assumes that `continue`s all point to loops.
+//! This tests that if a `continue` points to a block, we don't run liveness lints.
+
+async fn f999() -> Vec<usize> {
+    //~^ ERROR `async fn` is not permitted in Rust 2015
+    'b: {
+        //~^ ERROR mismatched types
+        continue 'b;
+        //~^ ERROR `continue` pointing to a labeled block
+    }
+}
+//~^ ERROR `main` function not found
diff --git a/tests/ui/label/continue-pointing-to-block-ice-113379.stderr b/tests/ui/label/continue-pointing-to-block-ice-113379.stderr
new file mode 100644
index 00000000000..ada6305ec99
--- /dev/null
+++ b/tests/ui/label/continue-pointing-to-block-ice-113379.stderr
@@ -0,0 +1,43 @@
+error[E0670]: `async fn` is not permitted in Rust 2015
+  --> $DIR/continue-pointing-to-block-ice-113379.rs:4:1
+   |
+LL | async fn f999() -> Vec<usize> {
+   | ^^^^^ to use `async fn`, switch to Rust 2018 or later
+   |
+   = help: pass `--edition 2024` to `rustc`
+   = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error[E0601]: `main` function not found in crate `continue_pointing_to_block_ice_113379`
+  --> $DIR/continue-pointing-to-block-ice-113379.rs:11:2
+   |
+LL | }
+   |  ^ consider adding a `main` function to `$DIR/continue-pointing-to-block-ice-113379.rs`
+
+error[E0696]: `continue` pointing to a labeled block
+  --> $DIR/continue-pointing-to-block-ice-113379.rs:8:9
+   |
+LL | /     'b: {
+LL | |
+LL | |         continue 'b;
+   | |         ^^^^^^^^^^^ labeled blocks cannot be `continue`'d
+LL | |
+LL | |     }
+   | |_____- labeled block the `continue` points to
+
+error[E0308]: mismatched types
+  --> $DIR/continue-pointing-to-block-ice-113379.rs:6:5
+   |
+LL | /     'b: {
+LL | |
+LL | |         continue 'b;
+LL | |
+LL | |     }
+   | |_____^ expected `Vec<usize>`, found `()`
+   |
+   = note: expected struct `Vec<usize>`
+           found unit type `()`
+
+error: aborting due to 4 previous errors
+
+Some errors have detailed explanations: E0308, E0601, E0670, E0696.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/label/continue-pointing-to-block-ice-121623.rs b/tests/ui/label/continue-pointing-to-block-ice-121623.rs
new file mode 100644
index 00000000000..7047f7a309a
--- /dev/null
+++ b/tests/ui/label/continue-pointing-to-block-ice-121623.rs
@@ -0,0 +1,11 @@
+//! Regression test for ICE #121623. Liveness linting assumes that `continue`s all point to loops.
+//! This tests that if a `continue` points to a block, we don't run liveness lints.
+
+fn main() {
+    match () {
+        _ => 'b: {
+            continue 'b;
+            //~^ ERROR `continue` pointing to a labeled block
+        }
+    }
+}
diff --git a/tests/ui/label/continue-pointing-to-block-ice-121623.stderr b/tests/ui/label/continue-pointing-to-block-ice-121623.stderr
new file mode 100644
index 00000000000..a484fb629d1
--- /dev/null
+++ b/tests/ui/label/continue-pointing-to-block-ice-121623.stderr
@@ -0,0 +1,14 @@
+error[E0696]: `continue` pointing to a labeled block
+  --> $DIR/continue-pointing-to-block-ice-121623.rs:7:13
+   |
+LL |           _ => 'b: {
+   |  ______________-
+LL | |             continue 'b;
+   | |             ^^^^^^^^^^^ labeled blocks cannot be `continue`'d
+LL | |
+LL | |         }
+   | |_________- labeled block the `continue` points to
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0696`.
diff --git a/tests/ui/lang-items/lang-item-generic-requirements.rs b/tests/ui/lang-items/lang-item-generic-requirements.rs
index 90ed5f3f0ef..7676b5557d2 100644
--- a/tests/ui/lang-items/lang-item-generic-requirements.rs
+++ b/tests/ui/lang-items/lang-item-generic-requirements.rs
@@ -49,12 +49,14 @@ fn ice() {
     // Use index
     let arr = [0; 5];
     let _ = arr[2];
+    //~^ ERROR cannot index into a value of type `[{integer}; 5]`
 
     // Use phantomdata
     let _ = MyPhantomData::<(), i32>;
 
     // Use Foo
     let _: () = Foo;
+    //~^ ERROR mismatched types
 }
 
 // use `start`
diff --git a/tests/ui/lang-items/lang-item-generic-requirements.stderr b/tests/ui/lang-items/lang-item-generic-requirements.stderr
index 3de67d65940..409fa05d637 100644
--- a/tests/ui/lang-items/lang-item-generic-requirements.stderr
+++ b/tests/ui/lang-items/lang-item-generic-requirements.stderr
@@ -76,9 +76,23 @@ LL |     r + a;
    |     |
    |     {integer}
 
+error[E0608]: cannot index into a value of type `[{integer}; 5]`
+  --> $DIR/lang-item-generic-requirements.rs:51:16
+   |
+LL |     let _ = arr[2];
+   |                ^^^
+
+error[E0308]: mismatched types
+  --> $DIR/lang-item-generic-requirements.rs:58:17
+   |
+LL |     let _: () = Foo;
+   |            --   ^^^ expected `()`, found `Foo`
+   |            |
+   |            expected due to this
+
 error: requires `copy` lang_item
 
-error: aborting due to 10 previous errors
+error: aborting due to 12 previous errors
 
-Some errors have detailed explanations: E0369, E0392, E0718.
-For more information about an error, try `rustc --explain E0369`.
+Some errors have detailed explanations: E0308, E0369, E0392, E0608, E0718.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/layout/invalid-unsized-const-eval.rs b/tests/ui/layout/invalid-unsized-const-eval.rs
index 1f664d30055..94fa6449e67 100644
--- a/tests/ui/layout/invalid-unsized-const-eval.rs
+++ b/tests/ui/layout/invalid-unsized-const-eval.rs
@@ -10,6 +10,6 @@ struct LazyLock {
 }
 
 static EMPTY_SET: LazyLock = todo!();
-//~^ ERROR could not evaluate static initializer
+//~^ ERROR the type `(dyn Sync, ())` has an unknown layout
 
 fn main() {}
diff --git a/tests/ui/layout/invalid-unsized-const-eval.stderr b/tests/ui/layout/invalid-unsized-const-eval.stderr
index a434ca9b2c7..073568883c4 100644
--- a/tests/ui/layout/invalid-unsized-const-eval.stderr
+++ b/tests/ui/layout/invalid-unsized-const-eval.stderr
@@ -7,11 +7,11 @@ LL |     data: (dyn Sync, ()),
    = help: the trait `Sized` is not implemented for `(dyn Sync + 'static)`
    = note: only the last element of a tuple may have a dynamically sized type
 
-error[E0080]: could not evaluate static initializer
+error[E0080]: the type `(dyn Sync, ())` has an unknown layout
   --> $DIR/invalid-unsized-const-eval.rs:12:1
    |
 LL | static EMPTY_SET: LazyLock = todo!();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the type `(dyn Sync, ())` has an unknown layout
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/layout/invalid-unsized-in-always-sized-tail.rs b/tests/ui/layout/invalid-unsized-in-always-sized-tail.rs
index c6d5f2bfa0e..8da2bb385ef 100644
--- a/tests/ui/layout/invalid-unsized-in-always-sized-tail.rs
+++ b/tests/ui/layout/invalid-unsized-in-always-sized-tail.rs
@@ -12,6 +12,7 @@ struct P2 {
     //~^ ERROR: the size for values of type `[bool]` cannot be known at compilation time
 }
 
-static CHECK: () = assert!(align_of::<P2>() == 1); //~ ERROR could not evaluate static initializer
+static CHECK: () = assert!(align_of::<P2>() == 1);
+//~^ ERROR the type `MySlice<[bool]>` has an unknown layout
 
 fn main() {}
diff --git a/tests/ui/layout/invalid-unsized-in-always-sized-tail.stderr b/tests/ui/layout/invalid-unsized-in-always-sized-tail.stderr
index 3a4735e4832..e08107f5f8e 100644
--- a/tests/ui/layout/invalid-unsized-in-always-sized-tail.stderr
+++ b/tests/ui/layout/invalid-unsized-in-always-sized-tail.stderr
@@ -18,11 +18,11 @@ LL | struct MySlice<T>(T);
    |                |
    |                this could be changed to `T: ?Sized`...
 
-error[E0080]: could not evaluate static initializer
+error[E0080]: the type `MySlice<[bool]>` has an unknown layout
   --> $DIR/invalid-unsized-in-always-sized-tail.rs:15:28
    |
 LL | static CHECK: () = assert!(align_of::<P2>() == 1);
-   |                            ^^^^^^^^^^^^^^^^ the type `MySlice<[bool]>` has an unknown layout
+   |                            ^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
    |
 note: inside `align_of::<P2>`
   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
diff --git a/tests/ui/layout/issue-unsized-tail-restatic-ice-122488.rs b/tests/ui/layout/issue-unsized-tail-restatic-ice-122488.rs
index f84c10d8e5c..92295704615 100644
--- a/tests/ui/layout/issue-unsized-tail-restatic-ice-122488.rs
+++ b/tests/ui/layout/issue-unsized-tail-restatic-ice-122488.rs
@@ -6,6 +6,6 @@ struct ArenaSet<U: Deref, V: ?Sized = <U as Deref>::Target>(V, U);
 //~^ ERROR the size for values of type `V` cannot be known at compilation time
 
 const DATA: *const ArenaSet<Vec<u8>> = std::ptr::null_mut();
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR the type `ArenaSet<Vec<u8>, [u8]>` has an unknown layout
 
 pub fn main() {}
diff --git a/tests/ui/layout/issue-unsized-tail-restatic-ice-122488.stderr b/tests/ui/layout/issue-unsized-tail-restatic-ice-122488.stderr
index 220951fab86..c85c40d5bda 100644
--- a/tests/ui/layout/issue-unsized-tail-restatic-ice-122488.stderr
+++ b/tests/ui/layout/issue-unsized-tail-restatic-ice-122488.stderr
@@ -22,11 +22,11 @@ help: the `Box` type always has a statically known size and allocates its conten
 LL | struct ArenaSet<U: Deref, V: ?Sized = <U as Deref>::Target>(Box<V>, U);
    |                                                             ++++ +
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: the type `ArenaSet<Vec<u8>, [u8]>` has an unknown layout
   --> $DIR/issue-unsized-tail-restatic-ice-122488.rs:8:1
    |
 LL | const DATA: *const ArenaSet<Vec<u8>> = std::ptr::null_mut();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the type `ArenaSet<Vec<u8>, [u8]>` has an unknown layout
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/layout/uncomputable-due-to-trivial-bounds-ice-135138.rs b/tests/ui/layout/uncomputable-due-to-trivial-bounds-ice-135138.rs
index 91280e49dcd..4423b83e24d 100644
--- a/tests/ui/layout/uncomputable-due-to-trivial-bounds-ice-135138.rs
+++ b/tests/ui/layout/uncomputable-due-to-trivial-bounds-ice-135138.rs
@@ -5,7 +5,7 @@ where
     str: Sized,
 {
     [(); { let _a: Option<str> = None; 0 }];
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR the type `Option<str>` has an unknown layout
 }
 
 fn main() {}
diff --git a/tests/ui/layout/uncomputable-due-to-trivial-bounds-ice-135138.stderr b/tests/ui/layout/uncomputable-due-to-trivial-bounds-ice-135138.stderr
index 6c7c51db8df..fa58b1f8fe4 100644
--- a/tests/ui/layout/uncomputable-due-to-trivial-bounds-ice-135138.stderr
+++ b/tests/ui/layout/uncomputable-due-to-trivial-bounds-ice-135138.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: the type `Option<str>` has an unknown layout
   --> $DIR/uncomputable-due-to-trivial-bounds-ice-135138.rs:7:16
    |
 LL |     [(); { let _a: Option<str> = None; 0 }];
-   |                ^^ the type `Option<str>` has an unknown layout
+   |                ^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/layout/unknown-when-no-type-parameter.rs b/tests/ui/layout/unknown-when-no-type-parameter.rs
index 87f90aa438a..81386feaacf 100644
--- a/tests/ui/layout/unknown-when-no-type-parameter.rs
+++ b/tests/ui/layout/unknown-when-no-type-parameter.rs
@@ -4,10 +4,14 @@ trait Project {
     type Assoc;
 }
 
-fn foo() where (): Project {
-    [(); size_of::<<() as Project>::Assoc>()]; //~ ERROR evaluation of constant value failed
-    //~| NOTE the type `<() as Project>::Assoc` has an unknown layout
+fn foo()
+where
+    (): Project,
+{
+    [(); size_of::<<() as Project>::Assoc>()];
+    //~^ ERROR the type `<() as Project>::Assoc` has an unknown layout
     //~| NOTE inside `std::mem::size_of::<<() as Project>::Assoc>`
+    //~| NOTE evaluation of constant value failed
 }
 
 fn main() {}
diff --git a/tests/ui/layout/unknown-when-no-type-parameter.stderr b/tests/ui/layout/unknown-when-no-type-parameter.stderr
index 35fbb11f156..f0a64960c6a 100644
--- a/tests/ui/layout/unknown-when-no-type-parameter.stderr
+++ b/tests/ui/layout/unknown-when-no-type-parameter.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/unknown-when-no-type-parameter.rs:8:10
+error[E0080]: the type `<() as Project>::Assoc` has an unknown layout
+  --> $DIR/unknown-when-no-type-parameter.rs:11:10
    |
 LL |     [(); size_of::<<() as Project>::Assoc>()];
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the type `<() as Project>::Assoc` has an unknown layout
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `std::mem::size_of::<<() as Project>::Assoc>`
   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
diff --git a/tests/ui/layout/unknown-when-ptr-metadata-is-DST.rs b/tests/ui/layout/unknown-when-ptr-metadata-is-DST.rs
index 973235fe65a..54f339711d5 100644
--- a/tests/ui/layout/unknown-when-ptr-metadata-is-DST.rs
+++ b/tests/ui/layout/unknown-when-ptr-metadata-is-DST.rs
@@ -6,7 +6,7 @@ where
     str: std::ptr::Pointee<Metadata = str>,
 {
     [(); { let _a: Option<&str> = None; 0 }];
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR the type `str` has an unknown layout
 }
 
 fn main() {}
diff --git a/tests/ui/layout/unknown-when-ptr-metadata-is-DST.stderr b/tests/ui/layout/unknown-when-ptr-metadata-is-DST.stderr
index 68bba2e9678..8cf5ce7c22d 100644
--- a/tests/ui/layout/unknown-when-ptr-metadata-is-DST.stderr
+++ b/tests/ui/layout/unknown-when-ptr-metadata-is-DST.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: the type `str` has an unknown layout
   --> $DIR/unknown-when-ptr-metadata-is-DST.rs:8:16
    |
 LL |     [(); { let _a: Option<&str> = None; 0 }];
-   |                ^^ the type `str` has an unknown layout
+   |                ^^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/lazy-type-alias/def-site-param-defaults-wf.rs b/tests/ui/lazy-type-alias/def-site-param-defaults-wf.rs
index 90bb0a294f8..7f417de5fd3 100644
--- a/tests/ui/lazy-type-alias/def-site-param-defaults-wf.rs
+++ b/tests/ui/lazy-type-alias/def-site-param-defaults-wf.rs
@@ -2,8 +2,8 @@
 #![feature(lazy_type_alias)]
 #![allow(incomplete_features)]
 
-type Alias<T = Vec<str>, const N: usize = {0 - 1}> = T;
-//~^ ERROR evaluation of constant value failed
+type Alias<T = Vec<str>, const N: usize = { 0 - 1 }> = T;
+//~^ ERROR attempt to compute `0_usize - 1_usize`, which would overflow
 //~| ERROR the size for values of type `str` cannot be known at compilation time
 
 fn main() {}
diff --git a/tests/ui/lazy-type-alias/def-site-param-defaults-wf.stderr b/tests/ui/lazy-type-alias/def-site-param-defaults-wf.stderr
index da0021ccaf4..e0d25742502 100644
--- a/tests/ui/lazy-type-alias/def-site-param-defaults-wf.stderr
+++ b/tests/ui/lazy-type-alias/def-site-param-defaults-wf.stderr
@@ -1,13 +1,13 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/def-site-param-defaults-wf.rs:5:44
+error[E0080]: attempt to compute `0_usize - 1_usize`, which would overflow
+  --> $DIR/def-site-param-defaults-wf.rs:5:45
    |
-LL | type Alias<T = Vec<str>, const N: usize = {0 - 1}> = T;
-   |                                            ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
+LL | type Alias<T = Vec<str>, const N: usize = { 0 - 1 }> = T;
+   |                                             ^^^^^ evaluation of constant value failed here
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/def-site-param-defaults-wf.rs:5:16
    |
-LL | type Alias<T = Vec<str>, const N: usize = {0 - 1}> = T;
+LL | type Alias<T = Vec<str>, const N: usize = { 0 - 1 }> = T;
    |                ^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `str`
diff --git a/tests/ui/lifetimes/auxiliary/lifetime_bound_will_change_warning_lib.rs b/tests/ui/lifetimes/auxiliary/lifetime_bound_will_change_warning_lib.rs
index 58f1b81cf4d..e351cc9e8fe 100644
--- a/tests/ui/lifetimes/auxiliary/lifetime_bound_will_change_warning_lib.rs
+++ b/tests/ui/lifetimes/auxiliary/lifetime_bound_will_change_warning_lib.rs
@@ -3,9 +3,8 @@
 // Helper for testing that we get suitable warnings when lifetime
 // bound change will cause breakage.
 
-pub fn just_ref(x: &Fn()) {
-}
+pub fn just_ref(x: &dyn Fn()) {}
 
-pub fn ref_obj(x: &Box<Fn()>) {
+pub fn ref_obj(x: &Box<dyn Fn()>) {
     // this will change to &Box<Fn()+'static>...
 }
diff --git a/tests/ui/limits/huge-static.rs b/tests/ui/limits/huge-static.rs
index 4c3641ac7d4..1473fd6054e 100644
--- a/tests/ui/limits/huge-static.rs
+++ b/tests/ui/limits/huge-static.rs
@@ -5,22 +5,19 @@
 
 const HUGE_SIZE: usize = 1 << 61;
 
-
 pub struct TooBigArray {
     arr: [u8; HUGE_SIZE],
 }
 
 impl TooBigArray {
     pub const fn new() -> Self {
-        TooBigArray { arr: [0x00; HUGE_SIZE], }
+        TooBigArray { arr: [0x00; HUGE_SIZE] }
     }
 }
 
 static MY_TOO_BIG_ARRAY_1: TooBigArray = TooBigArray::new();
-//~^ ERROR could not evaluate static initializer
-//~| NOTE too big
+//~^ ERROR too big
 static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE];
-//~^ ERROR could not evaluate static initializer
-//~| NOTE too big
+//~^ ERROR too big
 
-fn main() { }
+fn main() {}
diff --git a/tests/ui/limits/huge-static.stderr b/tests/ui/limits/huge-static.stderr
index 684efeeb4a3..63d04b75d99 100644
--- a/tests/ui/limits/huge-static.stderr
+++ b/tests/ui/limits/huge-static.stderr
@@ -1,14 +1,14 @@
-error[E0080]: could not evaluate static initializer
-  --> $DIR/huge-static.rs:19:1
+error[E0080]: values of the type `[u8; 2305843009213693952]` are too big for the target architecture
+  --> $DIR/huge-static.rs:18:1
    |
 LL | static MY_TOO_BIG_ARRAY_1: TooBigArray = TooBigArray::new();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values of the type `[u8; 2305843009213693952]` are too big for the target architecture
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
-error[E0080]: could not evaluate static initializer
-  --> $DIR/huge-static.rs:22:1
+error[E0080]: values of the type `[u8; 2305843009213693952]` are too big for the target architecture
+  --> $DIR/huge-static.rs:20:1
    |
 LL | static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values of the type `[u8; 2305843009213693952]` are too big for the target architecture
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/limits/issue-55878.rs b/tests/ui/limits/issue-55878.rs
index 614ff328bf5..9e75f00a408 100644
--- a/tests/ui/limits/issue-55878.rs
+++ b/tests/ui/limits/issue-55878.rs
@@ -2,5 +2,5 @@
 
 fn main() {
     println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR too big for the target architecture
 }
diff --git a/tests/ui/limits/issue-55878.stderr b/tests/ui/limits/issue-55878.stderr
index 9b3922d7933..27357796c18 100644
--- a/tests/ui/limits/issue-55878.stderr
+++ b/tests/ui/limits/issue-55878.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: values of the type `[u8; usize::MAX]` are too big for the target architecture
   --> $DIR/issue-55878.rs:4:26
    |
 LL |     println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
-   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values of the type `[u8; usize::MAX]` are too big for the target architecture
+   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
 note: inside `std::mem::size_of::<[u8; usize::MAX]>`
   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
diff --git a/tests/ui/lint/bare-trait-objects-path.stderr b/tests/ui/lint/bare-trait-objects-path.stderr
index fbb647c37c5..e611abd31f3 100644
--- a/tests/ui/lint/bare-trait-objects-path.stderr
+++ b/tests/ui/lint/bare-trait-objects-path.stderr
@@ -55,7 +55,13 @@ error[E0223]: ambiguous associated type
   --> $DIR/bare-trait-objects-path.rs:23:12
    |
 LL |     let _: Dyn::Ty;
-   |            ^^^^^^^ help: use fully-qualified syntax: `<dyn Dyn as Assoc>::Ty`
+   |            ^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -     let _: Dyn::Ty;
+LL +     let _: <dyn Dyn as Assoc>::Ty;
+   |
 
 error: aborting due to 1 previous error; 4 warnings emitted
 
diff --git a/tests/ui/lint/dead-code/alias-type-used-as-generic-arg-in-impl.rs b/tests/ui/lint/dead-code/alias-type-used-as-generic-arg-in-impl.rs
new file mode 100644
index 00000000000..4857ef6a9b8
--- /dev/null
+++ b/tests/ui/lint/dead-code/alias-type-used-as-generic-arg-in-impl.rs
@@ -0,0 +1,19 @@
+//@ check-pass
+
+#![deny(dead_code)]
+
+struct T<X>(X);
+
+type A<X> = T<X>;
+
+trait Tr {
+    fn foo();
+}
+
+impl<X> Tr for T<A<X>> {
+    fn foo() {}
+}
+
+fn main() {
+   T::<T<()>>::foo();
+}
diff --git a/tests/ui/lint/dead-code/issue-41883.stderr b/tests/ui/lint/dead-code/issue-41883.stderr
index 47ccef9a530..cf079e4dda3 100644
--- a/tests/ui/lint/dead-code/issue-41883.stderr
+++ b/tests/ui/lint/dead-code/issue-41883.stderr
@@ -29,6 +29,8 @@ 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/multiple-dead-codes-in-the-same-struct.stderr b/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
index 25a7d96cb89..b992005318f 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,6 +56,8 @@ 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/trait-only-used-as-type-bound.rs b/tests/ui/lint/dead-code/trait-only-used-as-type-bound.rs
new file mode 100644
index 00000000000..fb994653e1b
--- /dev/null
+++ b/tests/ui/lint/dead-code/trait-only-used-as-type-bound.rs
@@ -0,0 +1,31 @@
+//@ check-pass
+
+#![deny(dead_code)]
+
+trait UInt: Copy + From<u8> {}
+
+impl UInt for u16 {}
+
+trait Int: Copy {
+    type Unsigned: UInt;
+
+    fn as_unsigned(self) -> Self::Unsigned;
+}
+
+impl Int for i16 {
+    type Unsigned = u16;
+
+    fn as_unsigned(self) -> u16 {
+        self as _
+    }
+}
+
+fn priv_func<T: Int>(x: u8, y: T) -> (T::Unsigned, T::Unsigned) {
+    (T::Unsigned::from(x), y.as_unsigned())
+}
+
+pub fn pub_func(x: u8, y: i16) -> (u16, u16) {
+    priv_func(x, y)
+}
+
+fn main() {}
diff --git a/tests/ui/lint/lint-ctypes-enum.rs b/tests/ui/lint/lint-ctypes-enum.rs
index b2ef27b833b..f900f998d06 100644
--- a/tests/ui/lint/lint-ctypes-enum.rs
+++ b/tests/ui/lint/lint-ctypes-enum.rs
@@ -2,8 +2,6 @@
 #![deny(improper_ctypes)]
 #![feature(ptr_internals)]
 #![feature(transparent_unions)]
-#![feature(repr128)]
-#![allow(incomplete_features)]
 
 use std::num;
 
@@ -87,8 +85,8 @@ extern "C" {
     fn repr_c(x: ReprC);
     fn repr_u8(x: U8);
     fn repr_isize(x: Isize);
-    fn repr_u128(x: U128); //~ ERROR `extern` block uses type `U128`
-    fn repr_i128(x: I128); //~ ERROR `extern` block uses type `I128`
+    fn repr_u128(x: U128);
+    fn repr_i128(x: I128);
     fn option_ref(x: Option<&'static u8>);
     fn option_fn(x: Option<extern "C" fn()>);
     fn option_nonnull(x: Option<std::ptr::NonNull<u8>>);
@@ -98,14 +96,12 @@ extern "C" {
     fn option_nonzero_u32(x: Option<num::NonZero<u32>>);
     fn option_nonzero_u64(x: Option<num::NonZero<u64>>);
     fn option_nonzero_u128(x: Option<num::NonZero<u128>>);
-    //~^ ERROR `extern` block uses type `u128`
     fn option_nonzero_usize(x: Option<num::NonZero<usize>>);
     fn option_nonzero_i8(x: Option<num::NonZero<i8>>);
     fn option_nonzero_i16(x: Option<num::NonZero<i16>>);
     fn option_nonzero_i32(x: Option<num::NonZero<i32>>);
     fn option_nonzero_i64(x: Option<num::NonZero<i64>>);
     fn option_nonzero_i128(x: Option<num::NonZero<i128>>);
-    //~^ ERROR `extern` block uses type `i128`
     fn option_nonzero_isize(x: Option<num::NonZero<isize>>);
     fn option_transparent_struct(x: Option<TransparentStruct<num::NonZero<u8>>>);
     fn option_transparent_enum(x: Option<TransparentEnum<num::NonZero<u8>>>);
@@ -123,14 +119,12 @@ extern "C" {
     fn result_nonzero_u32_t(x: Result<num::NonZero<u32>, ()>);
     fn result_nonzero_u64_t(x: Result<num::NonZero<u64>, ()>);
     fn result_nonzero_u128_t(x: Result<num::NonZero<u128>, ()>);
-    //~^ ERROR `extern` block uses type `u128`
     fn result_nonzero_usize_t(x: Result<num::NonZero<usize>, ()>);
     fn result_nonzero_i8_t(x: Result<num::NonZero<i8>, ()>);
     fn result_nonzero_i16_t(x: Result<num::NonZero<i16>, ()>);
     fn result_nonzero_i32_t(x: Result<num::NonZero<i32>, ()>);
     fn result_nonzero_i64_t(x: Result<num::NonZero<i64>, ()>);
     fn result_nonzero_i128_t(x: Result<num::NonZero<i128>, ()>);
-    //~^ ERROR `extern` block uses type `i128`
     fn result_nonzero_isize_t(x: Result<num::NonZero<isize>, ()>);
     fn result_transparent_struct_t(x: Result<TransparentStruct<num::NonZero<u8>>, ()>);
     fn result_transparent_enum_t(x: Result<TransparentEnum<num::NonZero<u8>>, ()>);
@@ -161,14 +155,12 @@ extern "C" {
     fn result_nonzero_u32_e(x: Result<(), num::NonZero<u32>>);
     fn result_nonzero_u64_e(x: Result<(), num::NonZero<u64>>);
     fn result_nonzero_u128_e(x: Result<(), num::NonZero<u128>>);
-    //~^ ERROR `extern` block uses type `u128`
     fn result_nonzero_usize_e(x: Result<(), num::NonZero<usize>>);
     fn result_nonzero_i8_e(x: Result<(), num::NonZero<i8>>);
     fn result_nonzero_i16_e(x: Result<(), num::NonZero<i16>>);
     fn result_nonzero_i32_e(x: Result<(), num::NonZero<i32>>);
     fn result_nonzero_i64_e(x: Result<(), num::NonZero<i64>>);
     fn result_nonzero_i128_e(x: Result<(), num::NonZero<i128>>);
-    //~^ ERROR `extern` block uses type `i128`
     fn result_nonzero_isize_e(x: Result<(), num::NonZero<isize>>);
     fn result_transparent_struct_e(x: Result<(), TransparentStruct<num::NonZero<u8>>>);
     fn result_transparent_enum_e(x: Result<(), TransparentEnum<num::NonZero<u8>>>);
diff --git a/tests/ui/lint/lint-ctypes-enum.stderr b/tests/ui/lint/lint-ctypes-enum.stderr
index d5fc844f756..40d22723309 100644
--- a/tests/ui/lint/lint-ctypes-enum.stderr
+++ b/tests/ui/lint/lint-ctypes-enum.stderr
@@ -1,5 +1,5 @@
 error: `extern` block uses type `U`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:84:14
+  --> $DIR/lint-ctypes-enum.rs:82:14
    |
 LL |     fn uf(x: U);
    |              ^ not FFI-safe
@@ -7,7 +7,7 @@ LL |     fn uf(x: U);
    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
    = note: enum has no representation hint
 note: the type is defined here
-  --> $DIR/lint-ctypes-enum.rs:11:1
+  --> $DIR/lint-ctypes-enum.rs:9:1
    |
 LL | enum U {
    | ^^^^^^
@@ -18,7 +18,7 @@ LL | #![deny(improper_ctypes)]
    |         ^^^^^^^^^^^^^^^
 
 error: `extern` block uses type `B`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:85:14
+  --> $DIR/lint-ctypes-enum.rs:83:14
    |
 LL |     fn bf(x: B);
    |              ^ not FFI-safe
@@ -26,13 +26,13 @@ LL |     fn bf(x: B);
    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
    = note: enum has no representation hint
 note: the type is defined here
-  --> $DIR/lint-ctypes-enum.rs:14:1
+  --> $DIR/lint-ctypes-enum.rs:12:1
    |
 LL | enum B {
    | ^^^^^^
 
 error: `extern` block uses type `T`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:86:14
+  --> $DIR/lint-ctypes-enum.rs:84:14
    |
 LL |     fn tf(x: T);
    |              ^ not FFI-safe
@@ -40,55 +40,13 @@ LL |     fn tf(x: T);
    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
    = note: enum has no representation hint
 note: the type is defined here
-  --> $DIR/lint-ctypes-enum.rs:18:1
+  --> $DIR/lint-ctypes-enum.rs:16:1
    |
 LL | enum T {
    | ^^^^^^
 
-error: `extern` block uses type `U128`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:90:21
-   |
-LL |     fn repr_u128(x: U128);
-   |                     ^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-note: the type is defined here
-  --> $DIR/lint-ctypes-enum.rs:46:1
-   |
-LL | enum U128 {
-   | ^^^^^^^^^
-
-error: `extern` block uses type `I128`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:91:21
-   |
-LL |     fn repr_i128(x: I128);
-   |                     ^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-note: the type is defined here
-  --> $DIR/lint-ctypes-enum.rs:53:1
-   |
-LL | enum I128 {
-   | ^^^^^^^^^
-
-error: `extern` block uses type `u128`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:100:31
-   |
-LL |     fn option_nonzero_u128(x: Option<num::NonZero<u128>>);
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
-error: `extern` block uses type `i128`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:107:31
-   |
-LL |     fn option_nonzero_i128(x: Option<num::NonZero<i128>>);
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
 error: `extern` block uses type `Option<TransparentUnion<NonZero<u8>>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:112:36
+  --> $DIR/lint-ctypes-enum.rs:108:36
    |
 LL |     fn option_transparent_union(x: Option<TransparentUnion<num::NonZero<u8>>>);
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -97,7 +55,7 @@ LL |     fn option_transparent_union(x: Option<TransparentUnion<num::NonZero<u8>
    = note: enum has no representation hint
 
 error: `extern` block uses type `Option<Rust<NonZero<u8>>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:114:28
+  --> $DIR/lint-ctypes-enum.rs:110:28
    |
 LL |     fn option_repr_rust(x: Option<Rust<num::NonZero<u8>>>);
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -106,7 +64,7 @@ LL |     fn option_repr_rust(x: Option<Rust<num::NonZero<u8>>>);
    = note: enum has no representation hint
 
 error: `extern` block uses type `Option<u8>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:115:21
+  --> $DIR/lint-ctypes-enum.rs:111:21
    |
 LL |     fn option_u8(x: Option<u8>);
    |                     ^^^^^^^^^^ not FFI-safe
@@ -114,24 +72,8 @@ LL |     fn option_u8(x: Option<u8>);
    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
    = note: enum has no representation hint
 
-error: `extern` block uses type `u128`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:125:33
-   |
-LL |     fn result_nonzero_u128_t(x: Result<num::NonZero<u128>, ()>);
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
-error: `extern` block uses type `i128`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:132:33
-   |
-LL |     fn result_nonzero_i128_t(x: Result<num::NonZero<i128>, ()>);
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
 error: `extern` block uses type `Result<TransparentUnion<NonZero<u8>>, ()>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:137:38
+  --> $DIR/lint-ctypes-enum.rs:131:38
    |
 LL |     fn result_transparent_union_t(x: Result<TransparentUnion<num::NonZero<u8>>, ()>);
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -140,7 +82,7 @@ LL |     fn result_transparent_union_t(x: Result<TransparentUnion<num::NonZero<u
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<Rust<NonZero<u8>>, ()>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:139:30
+  --> $DIR/lint-ctypes-enum.rs:133:30
    |
 LL |     fn result_repr_rust_t(x: Result<Rust<num::NonZero<u8>>, ()>);
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -149,7 +91,7 @@ LL |     fn result_repr_rust_t(x: Result<Rust<num::NonZero<u8>>, ()>);
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<NonZero<u8>, U>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:143:51
+  --> $DIR/lint-ctypes-enum.rs:137:51
    |
 LL |     fn result_1zst_exhaustive_single_variant_t(x: Result<num::NonZero<u8>, U>);
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -158,7 +100,7 @@ LL |     fn result_1zst_exhaustive_single_variant_t(x: Result<num::NonZero<u8>,
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<NonZero<u8>, B>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:145:53
+  --> $DIR/lint-ctypes-enum.rs:139:53
    |
 LL |     fn result_1zst_exhaustive_multiple_variant_t(x: Result<num::NonZero<u8>, B>);
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -167,7 +109,7 @@ LL |     fn result_1zst_exhaustive_multiple_variant_t(x: Result<num::NonZero<u8>
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<NonZero<u8>, NonExhaustive>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:147:51
+  --> $DIR/lint-ctypes-enum.rs:141:51
    |
 LL |     fn result_1zst_non_exhaustive_no_variant_t(x: Result<num::NonZero<u8>, NonExhaustive>);
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -176,7 +118,7 @@ LL |     fn result_1zst_non_exhaustive_no_variant_t(x: Result<num::NonZero<u8>,
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<NonZero<u8>, Field>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:150:49
+  --> $DIR/lint-ctypes-enum.rs:144:49
    |
 LL |     fn result_1zst_exhaustive_single_field_t(x: Result<num::NonZero<u8>, Field>);
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -185,7 +127,7 @@ LL |     fn result_1zst_exhaustive_single_field_t(x: Result<num::NonZero<u8>, Fi
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<Result<(), NonZero<u8>>, ()>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:152:30
+  --> $DIR/lint-ctypes-enum.rs:146:30
    |
 LL |     fn result_cascading_t(x: Result<Result<(), num::NonZero<u8>>, ()>);
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -193,24 +135,8 @@ LL |     fn result_cascading_t(x: Result<Result<(), num::NonZero<u8>>, ()>);
    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
    = note: enum has no representation hint
 
-error: `extern` block uses type `u128`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:163:33
-   |
-LL |     fn result_nonzero_u128_e(x: Result<(), num::NonZero<u128>>);
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
-error: `extern` block uses type `i128`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:170:33
-   |
-LL |     fn result_nonzero_i128_e(x: Result<(), num::NonZero<i128>>);
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
 error: `extern` block uses type `Result<(), TransparentUnion<NonZero<u8>>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:175:38
+  --> $DIR/lint-ctypes-enum.rs:167:38
    |
 LL |     fn result_transparent_union_e(x: Result<(), TransparentUnion<num::NonZero<u8>>>);
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -219,7 +145,7 @@ LL |     fn result_transparent_union_e(x: Result<(), TransparentUnion<num::NonZe
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<(), Rust<NonZero<u8>>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:177:30
+  --> $DIR/lint-ctypes-enum.rs:169:30
    |
 LL |     fn result_repr_rust_e(x: Result<(), Rust<num::NonZero<u8>>>);
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -228,7 +154,7 @@ LL |     fn result_repr_rust_e(x: Result<(), Rust<num::NonZero<u8>>>);
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<U, NonZero<u8>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:181:51
+  --> $DIR/lint-ctypes-enum.rs:173:51
    |
 LL |     fn result_1zst_exhaustive_single_variant_e(x: Result<U, num::NonZero<u8>>);
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -237,7 +163,7 @@ LL |     fn result_1zst_exhaustive_single_variant_e(x: Result<U, num::NonZero<u8
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<B, NonZero<u8>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:183:53
+  --> $DIR/lint-ctypes-enum.rs:175:53
    |
 LL |     fn result_1zst_exhaustive_multiple_variant_e(x: Result<B, num::NonZero<u8>>);
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -246,7 +172,7 @@ LL |     fn result_1zst_exhaustive_multiple_variant_e(x: Result<B, num::NonZero<
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<NonExhaustive, NonZero<u8>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:185:51
+  --> $DIR/lint-ctypes-enum.rs:177:51
    |
 LL |     fn result_1zst_non_exhaustive_no_variant_e(x: Result<NonExhaustive, num::NonZero<u8>>);
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -255,7 +181,7 @@ LL |     fn result_1zst_non_exhaustive_no_variant_e(x: Result<NonExhaustive, num
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<Field, NonZero<u8>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:188:49
+  --> $DIR/lint-ctypes-enum.rs:180:49
    |
 LL |     fn result_1zst_exhaustive_single_field_e(x: Result<Field, num::NonZero<u8>>);
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -264,7 +190,7 @@ LL |     fn result_1zst_exhaustive_single_field_e(x: Result<Field, num::NonZero<
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<(), Result<(), NonZero<u8>>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:190:30
+  --> $DIR/lint-ctypes-enum.rs:182:30
    |
 LL |     fn result_cascading_e(x: Result<(), Result<(), num::NonZero<u8>>>);
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -273,7 +199,7 @@ LL |     fn result_cascading_e(x: Result<(), Result<(), num::NonZero<u8>>>);
    = note: enum has no representation hint
 
 error: `extern` block uses type `Result<(), ()>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-enum.rs:192:27
+  --> $DIR/lint-ctypes-enum.rs:184:27
    |
 LL |     fn result_unit_t_e(x: Result<(), ()>);
    |                           ^^^^^^^^^^^^^^ not FFI-safe
@@ -281,5 +207,5 @@ LL |     fn result_unit_t_e(x: Result<(), ()>);
    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
    = note: enum has no representation hint
 
-error: aborting due to 29 previous errors
+error: aborting due to 21 previous errors
 
diff --git a/tests/ui/lint/lint-ctypes-fn.rs b/tests/ui/lint/lint-ctypes-fn.rs
index 73820c86d1a..0b84098e390 100644
--- a/tests/ui/lint/lint-ctypes-fn.rs
+++ b/tests/ui/lint/lint-ctypes-fn.rs
@@ -89,12 +89,6 @@ pub extern "C" fn boxed_trait(p: Box<dyn Trait>) { }
 pub extern "C" fn char_type(p: char) { }
 //~^ ERROR uses type `char`
 
-pub extern "C" fn i128_type(p: i128) { }
-//~^ ERROR uses type `i128`
-
-pub extern "C" fn u128_type(p: u128) { }
-//~^ ERROR uses type `u128`
-
 pub extern "C" fn tuple_type(p: (i32, i32)) { }
 //~^ ERROR uses type `(i32, i32)`
 
@@ -120,9 +114,6 @@ pub extern "C" fn fn_type2(p: fn()) { }
 
 pub extern "C" fn fn_contained(p: RustBadRet) { }
 
-pub extern "C" fn transparent_i128(p: TransparentI128) { }
-//~^ ERROR: uses type `i128`
-
 pub extern "C" fn transparent_str(p: TransparentStr) { }
 //~^ ERROR: uses type `str`
 
@@ -161,6 +152,12 @@ pub extern "C" fn good17(p: TransparentCustomZst) { }
 #[allow(improper_ctypes_definitions)]
 pub extern "C" fn good18(_: &String) { }
 
+pub extern "C" fn good_i128_type(p: i128) { }
+
+pub extern "C" fn good_u128_type(p: u128) { }
+
+pub extern "C" fn good_transparent_i128(p: TransparentI128) { }
+
 #[cfg(not(target_arch = "wasm32"))]
 pub extern "C" fn good1(size: *const c_int) { }
 
diff --git a/tests/ui/lint/lint-ctypes-fn.stderr b/tests/ui/lint/lint-ctypes-fn.stderr
index a62533a4be1..a19c04a63b5 100644
--- a/tests/ui/lint/lint-ctypes-fn.stderr
+++ b/tests/ui/lint/lint-ctypes-fn.stderr
@@ -54,24 +54,8 @@ LL | pub extern "C" fn char_type(p: char) { }
    = help: consider using `u32` or `libc::wchar_t` instead
    = note: the `char` type has no C equivalent
 
-error: `extern` fn uses type `i128`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:92:32
-   |
-LL | pub extern "C" fn i128_type(p: i128) { }
-   |                                ^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
-error: `extern` fn uses type `u128`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:95:32
-   |
-LL | pub extern "C" fn u128_type(p: u128) { }
-   |                                ^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
 error: `extern` fn uses type `(i32, i32)`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:98:33
+  --> $DIR/lint-ctypes-fn.rs:92:33
    |
 LL | pub extern "C" fn tuple_type(p: (i32, i32)) { }
    |                                 ^^^^^^^^^^ not FFI-safe
@@ -80,7 +64,7 @@ LL | pub extern "C" fn tuple_type(p: (i32, i32)) { }
    = note: tuples have unspecified layout
 
 error: `extern` fn uses type `(i32, i32)`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:101:34
+  --> $DIR/lint-ctypes-fn.rs:95:34
    |
 LL | pub extern "C" fn tuple_type2(p: I32Pair) { }
    |                                  ^^^^^^^ not FFI-safe
@@ -89,7 +73,7 @@ LL | pub extern "C" fn tuple_type2(p: I32Pair) { }
    = note: tuples have unspecified layout
 
 error: `extern` fn uses type `ZeroSize`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:104:32
+  --> $DIR/lint-ctypes-fn.rs:98:32
    |
 LL | pub extern "C" fn zero_size(p: ZeroSize) { }
    |                                ^^^^^^^^ not FFI-safe
@@ -103,7 +87,7 @@ LL | pub struct ZeroSize;
    | ^^^^^^^^^^^^^^^^^^^
 
 error: `extern` fn uses type `ZeroSizeWithPhantomData`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:107:40
+  --> $DIR/lint-ctypes-fn.rs:101:40
    |
 LL | pub extern "C" fn zero_size_phantom(p: ZeroSizeWithPhantomData) { }
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -116,7 +100,7 @@ LL | pub struct ZeroSizeWithPhantomData(PhantomData<i32>);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `extern` fn uses type `PhantomData<bool>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:110:51
+  --> $DIR/lint-ctypes-fn.rs:104:51
    |
 LL | pub extern "C" fn zero_size_phantom_toplevel() -> PhantomData<bool> {
    |                                                   ^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -124,7 +108,7 @@ LL | pub extern "C" fn zero_size_phantom_toplevel() -> PhantomData<bool> {
    = note: composed only of `PhantomData`
 
 error: `extern` fn uses type `fn()`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:115:30
+  --> $DIR/lint-ctypes-fn.rs:109:30
    |
 LL | pub extern "C" fn fn_type(p: RustFn) { }
    |                              ^^^^^^ not FFI-safe
@@ -133,7 +117,7 @@ LL | pub extern "C" fn fn_type(p: RustFn) { }
    = note: this function pointer has Rust-specific calling convention
 
 error: `extern` fn uses type `fn()`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:118:31
+  --> $DIR/lint-ctypes-fn.rs:112:31
    |
 LL | pub extern "C" fn fn_type2(p: fn()) { }
    |                               ^^^^ not FFI-safe
@@ -141,16 +125,8 @@ LL | pub extern "C" fn fn_type2(p: fn()) { }
    = help: consider using an `extern fn(...) -> ...` function pointer instead
    = note: this function pointer has Rust-specific calling convention
 
-error: `extern` fn uses type `i128`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:123:39
-   |
-LL | pub extern "C" fn transparent_i128(p: TransparentI128) { }
-   |                                       ^^^^^^^^^^^^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
 error: `extern` fn uses type `str`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:126:38
+  --> $DIR/lint-ctypes-fn.rs:117:38
    |
 LL | pub extern "C" fn transparent_str(p: TransparentStr) { }
    |                                      ^^^^^^^^^^^^^^ not FFI-safe
@@ -159,7 +135,7 @@ LL | pub extern "C" fn transparent_str(p: TransparentStr) { }
    = note: string slices have no C equivalent
 
 error: `extern` fn uses type `PhantomData<bool>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:172:43
+  --> $DIR/lint-ctypes-fn.rs:169:43
    |
 LL | pub extern "C" fn unused_generic2<T>() -> PhantomData<bool> {
    |                                           ^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -167,7 +143,7 @@ LL | pub extern "C" fn unused_generic2<T>() -> PhantomData<bool> {
    = note: composed only of `PhantomData`
 
 error: `extern` fn uses type `Vec<T>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:185:39
+  --> $DIR/lint-ctypes-fn.rs:182:39
    |
 LL | pub extern "C" fn used_generic4<T>(x: Vec<T>) { }
    |                                       ^^^^^^ not FFI-safe
@@ -176,7 +152,7 @@ LL | pub extern "C" fn used_generic4<T>(x: Vec<T>) { }
    = note: this struct has unspecified layout
 
 error: `extern` fn uses type `Vec<T>`, which is not FFI-safe
-  --> $DIR/lint-ctypes-fn.rs:188:41
+  --> $DIR/lint-ctypes-fn.rs:185:41
    |
 LL | pub extern "C" fn used_generic5<T>() -> Vec<T> {
    |                                         ^^^^^^ not FFI-safe
@@ -184,5 +160,5 @@ LL | pub extern "C" fn used_generic5<T>() -> Vec<T> {
    = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
    = note: this struct has unspecified layout
 
-error: aborting due to 20 previous errors
+error: aborting due to 17 previous errors
 
diff --git a/tests/ui/lint/lint-ctypes.rs b/tests/ui/lint/lint-ctypes.rs
index 6dd9be10a48..47586c826ab 100644
--- a/tests/ui/lint/lint-ctypes.rs
+++ b/tests/ui/lint/lint-ctypes.rs
@@ -54,8 +54,6 @@ extern "C" {
     pub fn opt_box_type(p: Option<Box<u32>>);
     //~^ ERROR uses type `Option<Box<u32>>`
     pub fn char_type(p: char); //~ ERROR uses type `char`
-    pub fn i128_type(p: i128); //~ ERROR uses type `i128`
-    pub fn u128_type(p: u128); //~ ERROR uses type `u128`
     pub fn trait_type(p: &dyn Bar); //~ ERROR uses type `dyn Bar`
     pub fn tuple_type(p: (i32, i32)); //~ ERROR uses type `(i32, i32)`
     pub fn tuple_type2(p: I32Pair); //~ ERROR uses type `(i32, i32)`
@@ -67,7 +65,6 @@ extern "C" {
     pub fn fn_type(p: RustFn); //~ ERROR uses type `fn()`
     pub fn fn_type2(p: fn()); //~ ERROR uses type `fn()`
     pub fn fn_contained(p: RustBadRet); //~ ERROR: uses type `Box<u32>`
-    pub fn transparent_i128(p: TransparentI128); //~ ERROR: uses type `i128`
     pub fn transparent_str(p: TransparentStr); //~ ERROR: uses type `str`
     pub fn transparent_fn(p: TransparentBadFn); //~ ERROR: uses type `Box<u32>`
     pub fn raw_array(arr: [u8; 8]); //~ ERROR: uses type `[u8; 8]`
@@ -77,9 +74,6 @@ extern "C" {
     pub fn no_niche_b(b: Option<UnsafeCell<&i32>>);
     //~^ ERROR: uses type `Option<UnsafeCell<&i32>>`
 
-    pub static static_u128_type: u128; //~ ERROR: uses type `u128`
-    pub static static_u128_array_type: [u128; 16]; //~ ERROR: uses type `u128`
-
     pub fn good3(fptr: Option<extern "C" fn()>);
     pub fn good4(aptr: &[u8; 4 as usize]);
     pub fn good5(s: StructWithProjection);
@@ -99,7 +93,11 @@ extern "C" {
     pub fn good18(_: &String);
     pub fn good20(arr: *const [u8; 8]);
     pub static good21: [u8; 8];
-
+    pub fn good_i128_type(p: i128);
+    pub fn good_u128_type(p: u128);
+    pub fn good_transparent_i128(p: TransparentI128);
+    pub static good_static_u128_type: u128;
+    pub static good_static_u128_array_type: [u128; 16];
 }
 
 #[allow(improper_ctypes)]
diff --git a/tests/ui/lint/lint-ctypes.stderr b/tests/ui/lint/lint-ctypes.stderr
index 8137ae868d3..3fb36647d4f 100644
--- a/tests/ui/lint/lint-ctypes.stderr
+++ b/tests/ui/lint/lint-ctypes.stderr
@@ -85,24 +85,8 @@ LL |     pub fn char_type(p: char);
    = help: consider using `u32` or `libc::wchar_t` instead
    = note: the `char` type has no C equivalent
 
-error: `extern` block uses type `i128`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:57:25
-   |
-LL |     pub fn i128_type(p: i128);
-   |                         ^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
-error: `extern` block uses type `u128`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:58:25
-   |
-LL |     pub fn u128_type(p: u128);
-   |                         ^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
 error: `extern` block uses type `dyn Bar`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:59:26
+  --> $DIR/lint-ctypes.rs:57:26
    |
 LL |     pub fn trait_type(p: &dyn Bar);
    |                          ^^^^^^^^ not FFI-safe
@@ -110,7 +94,7 @@ LL |     pub fn trait_type(p: &dyn Bar);
    = note: trait objects have no C equivalent
 
 error: `extern` block uses type `(i32, i32)`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:60:26
+  --> $DIR/lint-ctypes.rs:58:26
    |
 LL |     pub fn tuple_type(p: (i32, i32));
    |                          ^^^^^^^^^^ not FFI-safe
@@ -119,7 +103,7 @@ LL |     pub fn tuple_type(p: (i32, i32));
    = note: tuples have unspecified layout
 
 error: `extern` block uses type `(i32, i32)`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:61:27
+  --> $DIR/lint-ctypes.rs:59:27
    |
 LL |     pub fn tuple_type2(p: I32Pair);
    |                           ^^^^^^^ not FFI-safe
@@ -128,7 +112,7 @@ LL |     pub fn tuple_type2(p: I32Pair);
    = note: tuples have unspecified layout
 
 error: `extern` block uses type `ZeroSize`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:62:25
+  --> $DIR/lint-ctypes.rs:60:25
    |
 LL |     pub fn zero_size(p: ZeroSize);
    |                         ^^^^^^^^ not FFI-safe
@@ -142,7 +126,7 @@ LL | pub struct ZeroSize;
    | ^^^^^^^^^^^^^^^^^^^
 
 error: `extern` block uses type `ZeroSizeWithPhantomData`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:63:33
+  --> $DIR/lint-ctypes.rs:61:33
    |
 LL |     pub fn zero_size_phantom(p: ZeroSizeWithPhantomData);
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -155,7 +139,7 @@ LL | pub struct ZeroSizeWithPhantomData(::std::marker::PhantomData<i32>);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `extern` block uses type `PhantomData<bool>`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:66:12
+  --> $DIR/lint-ctypes.rs:64:12
    |
 LL |         -> ::std::marker::PhantomData<bool>;
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -163,7 +147,7 @@ LL |         -> ::std::marker::PhantomData<bool>;
    = note: composed only of `PhantomData`
 
 error: `extern` block uses type `fn()`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:67:23
+  --> $DIR/lint-ctypes.rs:65:23
    |
 LL |     pub fn fn_type(p: RustFn);
    |                       ^^^^^^ not FFI-safe
@@ -172,7 +156,7 @@ LL |     pub fn fn_type(p: RustFn);
    = note: this function pointer has Rust-specific calling convention
 
 error: `extern` block uses type `fn()`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:68:24
+  --> $DIR/lint-ctypes.rs:66:24
    |
 LL |     pub fn fn_type2(p: fn());
    |                        ^^^^ not FFI-safe
@@ -181,7 +165,7 @@ LL |     pub fn fn_type2(p: fn());
    = note: this function pointer has Rust-specific calling convention
 
 error: `extern` block uses type `Box<u32>`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:69:28
+  --> $DIR/lint-ctypes.rs:67:28
    |
 LL |     pub fn fn_contained(p: RustBadRet);
    |                            ^^^^^^^^^^ not FFI-safe
@@ -189,16 +173,8 @@ LL |     pub fn fn_contained(p: RustBadRet);
    = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
    = note: this struct has unspecified layout
 
-error: `extern` block uses type `i128`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:70:32
-   |
-LL |     pub fn transparent_i128(p: TransparentI128);
-   |                                ^^^^^^^^^^^^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
 error: `extern` block uses type `str`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:71:31
+  --> $DIR/lint-ctypes.rs:68:31
    |
 LL |     pub fn transparent_str(p: TransparentStr);
    |                               ^^^^^^^^^^^^^^ not FFI-safe
@@ -207,7 +183,7 @@ LL |     pub fn transparent_str(p: TransparentStr);
    = note: string slices have no C equivalent
 
 error: `extern` block uses type `Box<u32>`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:72:30
+  --> $DIR/lint-ctypes.rs:69:30
    |
 LL |     pub fn transparent_fn(p: TransparentBadFn);
    |                              ^^^^^^^^^^^^^^^^ not FFI-safe
@@ -216,7 +192,7 @@ LL |     pub fn transparent_fn(p: TransparentBadFn);
    = note: this struct has unspecified layout
 
 error: `extern` block uses type `[u8; 8]`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:73:27
+  --> $DIR/lint-ctypes.rs:70:27
    |
 LL |     pub fn raw_array(arr: [u8; 8]);
    |                           ^^^^^^^ not FFI-safe
@@ -225,7 +201,7 @@ LL |     pub fn raw_array(arr: [u8; 8]);
    = note: passing raw arrays by value is not FFI-safe
 
 error: `extern` block uses type `Option<UnsafeCell<extern "C" fn()>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:75:26
+  --> $DIR/lint-ctypes.rs:72:26
    |
 LL |     pub fn no_niche_a(a: Option<UnsafeCell<extern "C" fn()>>);
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -234,7 +210,7 @@ LL |     pub fn no_niche_a(a: Option<UnsafeCell<extern "C" fn()>>);
    = note: enum has no representation hint
 
 error: `extern` block uses type `Option<UnsafeCell<&i32>>`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:77:26
+  --> $DIR/lint-ctypes.rs:74:26
    |
 LL |     pub fn no_niche_b(b: Option<UnsafeCell<&i32>>);
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -242,21 +218,5 @@ LL |     pub fn no_niche_b(b: Option<UnsafeCell<&i32>>);
    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
    = note: enum has no representation hint
 
-error: `extern` block uses type `u128`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:80:34
-   |
-LL |     pub static static_u128_type: u128;
-   |                                  ^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
-error: `extern` block uses type `u128`, which is not FFI-safe
-  --> $DIR/lint-ctypes.rs:81:40
-   |
-LL |     pub static static_u128_array_type: [u128; 16];
-   |                                        ^^^^^^^^^^ not FFI-safe
-   |
-   = note: 128-bit integers don't currently have a known stable ABI
-
-error: aborting due to 27 previous errors
+error: aborting due to 22 previous errors
 
diff --git a/tests/ui/big-literals.rs b/tests/ui/lint/overflowing-literals-valid.rs
index d2f447a595c..08aa092ee71 100644
--- a/tests/ui/big-literals.rs
+++ b/tests/ui/lint/overflowing-literals-valid.rs
@@ -1,5 +1,7 @@
+//! Test that valid large numeric literals do not trigger the `overflowing_literals` lint.
+
 //@ run-pass
-// Catch mistakes in the overflowing literals lint.
+
 #![deny(overflowing_literals)]
 
 pub fn main() {
diff --git a/tests/ui/lint/unnecessary-extern-crate.stderr b/tests/ui/lint/unnecessary-extern-crate.stderr
index 1fa4aa9c9a9..db5406bc567 100644
--- a/tests/ui/lint/unnecessary-extern-crate.stderr
+++ b/tests/ui/lint/unnecessary-extern-crate.stderr
@@ -2,43 +2,72 @@ error: unused extern crate
   --> $DIR/unnecessary-extern-crate.rs:6:1
    |
 LL | extern crate core;
-   | ^^^^^^^^^^^^^^^^^^ help: remove it
+   | ^^^^^^^^^^^^^^^^^^ unused
    |
 note: the lint level is defined here
   --> $DIR/unnecessary-extern-crate.rs:3:9
    |
 LL | #![deny(unused_extern_crates)]
    |         ^^^^^^^^^^^^^^^^^^^^
+help: remove the unused `extern crate`
+   |
+LL - extern crate core;
+   |
 
 error: unused extern crate
   --> $DIR/unnecessary-extern-crate.rs:9:1
    |
 LL | extern crate core as x;
-   | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
+   | ^^^^^^^^^^^^^^^^^^^^^^^ unused
+   |
+help: remove the unused `extern crate`
+   |
+LL - extern crate core as x;
+   |
 
 error: unused extern crate
   --> $DIR/unnecessary-extern-crate.rs:31:5
    |
 LL |     extern crate core;
-   |     ^^^^^^^^^^^^^^^^^^ help: remove it
+   |     ^^^^^^^^^^^^^^^^^^ unused
+   |
+help: remove the unused `extern crate`
+   |
+LL -     extern crate core;
+   |
 
 error: unused extern crate
   --> $DIR/unnecessary-extern-crate.rs:35:5
    |
 LL |     extern crate core as x;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ unused
+   |
+help: remove the unused `extern crate`
+   |
+LL -     extern crate core as x;
+   |
 
 error: unused extern crate
   --> $DIR/unnecessary-extern-crate.rs:44:9
    |
 LL |         extern crate core;
-   |         ^^^^^^^^^^^^^^^^^^ help: remove it
+   |         ^^^^^^^^^^^^^^^^^^ unused
+   |
+help: remove the unused `extern crate`
+   |
+LL -         extern crate core;
+   |
 
 error: unused extern crate
   --> $DIR/unnecessary-extern-crate.rs:48:9
    |
 LL |         extern crate core as x;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
+   |         ^^^^^^^^^^^^^^^^^^^^^^^ unused
+   |
+help: remove the unused `extern crate`
+   |
+LL -         extern crate core as x;
+   |
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/lint/unused/lint-unused-extern-crate.stderr b/tests/ui/lint/unused/lint-unused-extern-crate.stderr
index 46d8f3beeab..7fcbdd813ce 100644
--- a/tests/ui/lint/unused/lint-unused-extern-crate.stderr
+++ b/tests/ui/lint/unused/lint-unused-extern-crate.stderr
@@ -2,19 +2,30 @@ error: unused extern crate
   --> $DIR/lint-unused-extern-crate.rs:11:1
    |
 LL | extern crate lint_unused_extern_crate5;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
    |
 note: the lint level is defined here
   --> $DIR/lint-unused-extern-crate.rs:7:9
    |
 LL | #![deny(unused_extern_crates)]
    |         ^^^^^^^^^^^^^^^^^^^^
+help: remove the unused `extern crate`
+   |
+LL - extern crate lint_unused_extern_crate5;
+LL +
+   |
 
 error: unused extern crate
   --> $DIR/lint-unused-extern-crate.rs:29:5
    |
 LL |     extern crate lint_unused_extern_crate2;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
+   |
+help: remove the unused `extern crate`
+   |
+LL -     extern crate lint_unused_extern_crate2;
+LL +
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/lint/unused/unused-braces-attrs-issue-141549.fixed b/tests/ui/lint/unused/unused-braces-attrs-issue-141549.fixed
new file mode 100644
index 00000000000..6129da30676
--- /dev/null
+++ b/tests/ui/lint/unused/unused-braces-attrs-issue-141549.fixed
@@ -0,0 +1,15 @@
+//@ check-pass
+//@ run-rustfix
+
+#![allow(dead_code)]
+#![warn(unused_braces)]
+
+use std::cmp::Ordering;
+
+#[rustfmt::skip]
+fn ptr_cmp<T: ?Sized>(p1: *const T, p2: *const T) -> Ordering {
+    #[expect(ambiguous_wide_pointer_comparisons)] p1.cmp(&p2)
+    //~^ WARN unnecessary braces around block return value
+}
+
+fn main() {}
diff --git a/tests/ui/lint/unused/unused-braces-attrs-issue-141549.rs b/tests/ui/lint/unused/unused-braces-attrs-issue-141549.rs
new file mode 100644
index 00000000000..a550ebc4973
--- /dev/null
+++ b/tests/ui/lint/unused/unused-braces-attrs-issue-141549.rs
@@ -0,0 +1,15 @@
+//@ check-pass
+//@ run-rustfix
+
+#![allow(dead_code)]
+#![warn(unused_braces)]
+
+use std::cmp::Ordering;
+
+#[rustfmt::skip]
+fn ptr_cmp<T: ?Sized>(p1: *const T, p2: *const T) -> Ordering {
+    { #[expect(ambiguous_wide_pointer_comparisons)] p1.cmp(&p2) }
+    //~^ WARN unnecessary braces around block return value
+}
+
+fn main() {}
diff --git a/tests/ui/lint/unused/unused-braces-attrs-issue-141549.stderr b/tests/ui/lint/unused/unused-braces-attrs-issue-141549.stderr
new file mode 100644
index 00000000000..0b2b6211ab9
--- /dev/null
+++ b/tests/ui/lint/unused/unused-braces-attrs-issue-141549.stderr
@@ -0,0 +1,19 @@
+warning: unnecessary braces around block return value
+  --> $DIR/unused-braces-attrs-issue-141549.rs:11:5
+   |
+LL |     { #[expect(ambiguous_wide_pointer_comparisons)] p1.cmp(&p2) }
+   |     ^^                                                         ^^
+   |
+note: the lint level is defined here
+  --> $DIR/unused-braces-attrs-issue-141549.rs:5:9
+   |
+LL | #![warn(unused_braces)]
+   |         ^^^^^^^^^^^^^
+help: remove these braces
+   |
+LL -     { #[expect(ambiguous_wide_pointer_comparisons)] p1.cmp(&p2) }
+LL +     #[expect(ambiguous_wide_pointer_comparisons)] p1.cmp(&p2)
+   |
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/lint/wide_pointer_comparisons.stderr b/tests/ui/lint/wide_pointer_comparisons.stderr
index 5a0b914d832..4f5238e8252 100644
--- a/tests/ui/lint/wide_pointer_comparisons.stderr
+++ b/tests/ui/lint/wide_pointer_comparisons.stderr
@@ -29,10 +29,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |     let _ = a < b;
    |             ^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |     let _ = a.cast::<()>() < b.cast::<()>();
    |              +++++++++++++    +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |     let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a < b) };
+   |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:26:13
@@ -40,10 +44,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |     let _ = a <= b;
    |             ^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |     let _ = a.cast::<()>() <= b.cast::<()>();
    |              +++++++++++++     +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |     let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a <= b) };
+   |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:28:13
@@ -51,10 +59,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |     let _ = a > b;
    |             ^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |     let _ = a.cast::<()>() > b.cast::<()>();
    |              +++++++++++++    +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |     let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a > b) };
+   |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:30:13
@@ -62,10 +74,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |     let _ = a >= b;
    |             ^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |     let _ = a.cast::<()>() >= b.cast::<()>();
    |              +++++++++++++     +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |     let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a >= b) };
+   |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:33:13
@@ -121,10 +137,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |     let _ = a.cmp(&b);
    |             ^^^^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |     let _ = a.cast::<()>().cmp(&b.cast::<()>());
    |              +++++++++++++       +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |     let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] a.cmp(&b) };
+   |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++           +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:43:13
@@ -132,10 +152,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |     let _ = a.partial_cmp(&b);
    |             ^^^^^^^^^^^^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |     let _ = a.cast::<()>().partial_cmp(&b.cast::<()>());
    |              +++++++++++++               +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |     let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] a.partial_cmp(&b) };
+   |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                   +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:45:13
@@ -143,10 +167,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |     let _ = a.le(&b);
    |             ^^^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |     let _ = a.cast::<()>().le(&b.cast::<()>());
    |              +++++++++++++      +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |     let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] a.le(&b) };
+   |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:47:13
@@ -154,10 +182,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |     let _ = a.lt(&b);
    |             ^^^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |     let _ = a.cast::<()>().lt(&b.cast::<()>());
    |              +++++++++++++      +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |     let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] a.lt(&b) };
+   |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:49:13
@@ -165,10 +197,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |     let _ = a.ge(&b);
    |             ^^^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |     let _ = a.cast::<()>().ge(&b.cast::<()>());
    |              +++++++++++++      +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |     let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] a.ge(&b) };
+   |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:51:13
@@ -176,10 +212,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |     let _ = a.gt(&b);
    |             ^^^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |     let _ = a.cast::<()>().gt(&b.cast::<()>());
    |              +++++++++++++      +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |     let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] a.gt(&b) };
+   |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:57:17
@@ -199,10 +239,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a >= b;
    |                 ^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = a.as_ptr().cast::<()>() >= b.as_ptr().cast::<()>();
    |                  ++++++++++++++++++++++     ++++++++++++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a >= b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:61:17
@@ -246,10 +290,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a < b;
    |                 ^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = (*a).cast::<()>() < (*b).cast::<()>();
    |                 ++ ++++++++++++++   ++ ++++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a < b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:76:17
@@ -257,10 +305,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a <= b;
    |                 ^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = (*a).cast::<()>() <= (*b).cast::<()>();
    |                 ++ ++++++++++++++    ++ ++++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a <= b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:78:17
@@ -268,10 +320,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a > b;
    |                 ^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = (*a).cast::<()>() > (*b).cast::<()>();
    |                 ++ ++++++++++++++   ++ ++++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a > b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:80:17
@@ -279,10 +335,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a >= b;
    |                 ^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = (*a).cast::<()>() >= (*b).cast::<()>();
    |                 ++ ++++++++++++++    ++ ++++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a >= b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:83:17
@@ -362,10 +422,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a.cmp(&b);
    |                 ^^^^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = (*a).cast::<()>().cmp(&(*b).cast::<()>());
    |                 ++ ++++++++++++++      ++ ++++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] a.cmp(&b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++           +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:97:17
@@ -373,10 +437,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a.partial_cmp(&b);
    |                 ^^^^^^^^^^^^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = (*a).cast::<()>().partial_cmp(&(*b).cast::<()>());
    |                 ++ ++++++++++++++              ++ ++++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] a.partial_cmp(&b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                   +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:99:17
@@ -384,10 +452,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a.le(&b);
    |                 ^^^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = (*a).cast::<()>().le(&(*b).cast::<()>());
    |                 ++ ++++++++++++++     ++ ++++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] a.le(&b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:101:17
@@ -395,10 +467,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a.lt(&b);
    |                 ^^^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = (*a).cast::<()>().lt(&(*b).cast::<()>());
    |                 ++ ++++++++++++++     ++ ++++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] a.lt(&b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:103:17
@@ -406,10 +482,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a.ge(&b);
    |                 ^^^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = (*a).cast::<()>().ge(&(*b).cast::<()>());
    |                 ++ ++++++++++++++     ++ ++++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] a.ge(&b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:105:17
@@ -417,10 +497,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a.gt(&b);
    |                 ^^^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = (*a).cast::<()>().gt(&(*b).cast::<()>());
    |                 ++ ++++++++++++++     ++ ++++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] a.gt(&b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:110:13
@@ -496,10 +580,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a < b;
    |                 ^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = a.cast::<()>() < b.cast::<()>();
    |                  +++++++++++++    +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a < b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:124:17
@@ -507,10 +595,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a <= b;
    |                 ^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = a.cast::<()>() <= b.cast::<()>();
    |                  +++++++++++++     +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a <= b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:126:17
@@ -518,10 +610,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a > b;
    |                 ^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = a.cast::<()>() > b.cast::<()>();
    |                  +++++++++++++    +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a > b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:128:17
@@ -529,10 +625,14 @@ warning: ambiguous wide pointer comparison, the comparison includes metadata whi
 LL |         let _ = a >= b;
    |                 ^^^^^^
    |
-help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+help: use untyped pointers to only compare their addresses
    |
 LL |         let _ = a.cast::<()>() >= b.cast::<()>();
    |                  +++++++++++++     +++++++++++++
+help: or expect the lint to compare the pointers metadata and addresses
+   |
+LL |         let _ = { #[expect(ambiguous_wide_pointer_comparisons, reason = "...")] (a >= b) };
+   |                 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      +++
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
   --> $DIR/wide_pointer_comparisons.rs:131:17
diff --git a/tests/ui/macros/auxiliary/borrowck-error-in-macro.rs b/tests/ui/macros/auxiliary/borrowck-error-in-macro.rs
new file mode 100644
index 00000000000..2d5f2bda2ed
--- /dev/null
+++ b/tests/ui/macros/auxiliary/borrowck-error-in-macro.rs
@@ -0,0 +1,10 @@
+#[macro_export]
+macro_rules! ice {
+    () => {
+        fn main() {
+            let d = &mut 0;
+            let c = || *d += 1;
+            c();
+        }
+    };
+}
diff --git a/tests/ui/macros/borrowck-error-in-macro.rs b/tests/ui/macros/borrowck-error-in-macro.rs
new file mode 100644
index 00000000000..fe75188efd2
--- /dev/null
+++ b/tests/ui/macros/borrowck-error-in-macro.rs
@@ -0,0 +1,8 @@
+//@ aux-build: borrowck-error-in-macro.rs
+//@ error-pattern: a call in this macro requires a mutable binding due to mutable borrow of `d`
+//FIXME: remove error-pattern (see #141896)
+
+extern crate borrowck_error_in_macro as a;
+
+a::ice! {}
+//~^ ERROR cannot borrow value as mutable, as it is not declared as mutable
diff --git a/tests/ui/macros/borrowck-error-in-macro.stderr b/tests/ui/macros/borrowck-error-in-macro.stderr
new file mode 100644
index 00000000000..ec0302ee287
--- /dev/null
+++ b/tests/ui/macros/borrowck-error-in-macro.stderr
@@ -0,0 +1,19 @@
+error[E0596]: cannot borrow value as mutable, as it is not declared as mutable
+  --> $DIR/borrowck-error-in-macro.rs:7:1
+   |
+LL | a::ice! {}
+   | ^^^^^^^^^^
+   | |
+   | cannot borrow as mutable
+   | a call in this macro requires a mutable binding due to mutable borrow of `d`
+   |
+   = note: this error originates in the macro `a::ice` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider changing this to be mutable
+  --> $DIR/auxiliary/borrowck-error-in-macro.rs:6:17
+   |
+LL |             let mut c = || *d += 1;
+   |                 +++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/macros/ice-in-tokenstream-for-contracts-issue-140683.rs b/tests/ui/macros/ice-in-tokenstream-for-contracts-issue-140683.rs
new file mode 100644
index 00000000000..68346a00ae1
--- /dev/null
+++ b/tests/ui/macros/ice-in-tokenstream-for-contracts-issue-140683.rs
@@ -0,0 +1,13 @@
+#![feature(contracts)]
+#![allow(incomplete_features)]
+
+struct T;
+
+impl T {
+    #[core::contracts::ensures] //~ ERROR expected a `Fn(&_)` closure, found `()`
+    fn b() {(loop)}
+    //~^ ERROR expected `{`, found `)`
+    //~| ERROR expected `{`, found `)`
+}
+
+fn main() {}
diff --git a/tests/ui/macros/ice-in-tokenstream-for-contracts-issue-140683.stderr b/tests/ui/macros/ice-in-tokenstream-for-contracts-issue-140683.stderr
new file mode 100644
index 00000000000..f1ffda2a9be
--- /dev/null
+++ b/tests/ui/macros/ice-in-tokenstream-for-contracts-issue-140683.stderr
@@ -0,0 +1,34 @@
+error: expected `{`, found `)`
+  --> $DIR/ice-in-tokenstream-for-contracts-issue-140683.rs:8:18
+   |
+LL |     fn b() {(loop)}
+   |              ----^ expected `{`
+   |              |
+   |              while parsing this `loop` expression
+
+error: expected `{`, found `)`
+  --> $DIR/ice-in-tokenstream-for-contracts-issue-140683.rs:8:18
+   |
+LL |     fn b() {(loop)}
+   |              ----^ expected `{`
+   |              |
+   |              while parsing this `loop` expression
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0277]: expected a `Fn(&_)` closure, found `()`
+  --> $DIR/ice-in-tokenstream-for-contracts-issue-140683.rs:7:5
+   |
+LL |     #[core::contracts::ensures]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     |
+   |     expected an `Fn(&_)` closure, found `()`
+   |     required by a bound introduced by this call
+   |
+   = help: the trait `for<'a> Fn(&'a _)` is not implemented for `()`
+note: required by a bound in `build_check_ensures`
+  --> $SRC_DIR/core/src/contracts.rs:LL:COL
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/macros/missing-writer.stderr b/tests/ui/macros/missing-writer.stderr
index 86dfe7d65ea..a3430cfc0ee 100644
--- a/tests/ui/macros/missing-writer.stderr
+++ b/tests/ui/macros/missing-writer.stderr
@@ -24,7 +24,7 @@ error[E0599]: cannot write into `&'static str`
   --> $DIR/missing-writer.rs:5:12
    |
 LL |     write!("{}_{}", x, y);
-   |     -------^^^^^^^------- method not found in `&str`
+   |     -------^^^^^^^------- method not found in `&'static str`
    |
 note: must implement `io::Write`, `fmt::Write`, or have a `write_fmt` method
   --> $DIR/missing-writer.rs:5:12
@@ -41,7 +41,7 @@ error[E0599]: cannot write into `&'static str`
   --> $DIR/missing-writer.rs:11:14
    |
 LL |     writeln!("{}_{}", x, y);
-   |     ---------^^^^^^^------- method not found in `&str`
+   |     ---------^^^^^^^------- method not found in `&'static str`
    |
 note: must implement `io::Write`, `fmt::Write`, or have a `write_fmt` method
   --> $DIR/missing-writer.rs:11:14
diff --git a/tests/ui/macros/no-close-delim-issue-139248.rs b/tests/ui/macros/no-close-delim-issue-139248.rs
index 86583b2724e..f15234eaff1 100644
--- a/tests/ui/macros/no-close-delim-issue-139248.rs
+++ b/tests/ui/macros/no-close-delim-issue-139248.rs
@@ -2,9 +2,8 @@
 
 macro_rules! m {
     (static a : () = $e:expr) => {
-        static a : () = $e;
-        //~^ ERROR macro expansion ends with an incomplete expression: expected expression
-    }
+        static a: () = $e;
+    };
 }
 
 m! { static a : () = (if b) }
diff --git a/tests/ui/macros/no-close-delim-issue-139248.stderr b/tests/ui/macros/no-close-delim-issue-139248.stderr
index 6ed41ae9b46..8aa39851b4b 100644
--- a/tests/ui/macros/no-close-delim-issue-139248.stderr
+++ b/tests/ui/macros/no-close-delim-issue-139248.stderr
@@ -1,33 +1,27 @@
 error: expected `{`, found `)`
-  --> $DIR/no-close-delim-issue-139248.rs:10:27
+  --> $DIR/no-close-delim-issue-139248.rs:9:27
    |
 LL | m! { static a : () = (if b) }
    |                           ^ expected `{`
    |
 note: the `if` expression is missing a block after this condition
-  --> $DIR/no-close-delim-issue-139248.rs:10:26
+  --> $DIR/no-close-delim-issue-139248.rs:9:26
    |
 LL | m! { static a : () = (if b) }
    |                          ^
 
 error: expected `{`, found `)`
-  --> $DIR/no-close-delim-issue-139248.rs:10:27
+  --> $DIR/no-close-delim-issue-139248.rs:9:27
    |
 LL | m! { static a : () = (if b) }
    |                           ^ expected `{`
    |
 note: the `if` expression is missing a block after this condition
-  --> $DIR/no-close-delim-issue-139248.rs:10:26
+  --> $DIR/no-close-delim-issue-139248.rs:9:26
    |
 LL | m! { static a : () = (if b) }
    |                          ^
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: macro expansion ends with an incomplete expression: expected expression
-  --> $DIR/no-close-delim-issue-139248.rs:5:28
-   |
-LL |         static a : () = $e;
-   |                            ^ expected expression
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/methods/issue-19521.stderr b/tests/ui/methods/issue-19521.stderr
index f451dc36d45..2ef83a4792a 100644
--- a/tests/ui/methods/issue-19521.stderr
+++ b/tests/ui/methods/issue-19521.stderr
@@ -2,7 +2,7 @@ error[E0599]: no method named `homura` found for reference `&'static str` in the
   --> $DIR/issue-19521.rs:2:8
    |
 LL |     "".homura()();
-   |        ^^^^^^ method not found in `&str`
+   |        ^^^^^^ method not found in `&'static str`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/methods/method-not-found-generic-arg-elision.stderr b/tests/ui/methods/method-not-found-generic-arg-elision.stderr
index a665500fd9e..8429c3aebac 100644
--- a/tests/ui/methods/method-not-found-generic-arg-elision.stderr
+++ b/tests/ui/methods/method-not-found-generic-arg-elision.stderr
@@ -23,7 +23,7 @@ error[E0599]: no method named `extend` found for struct `Map` in the current sco
   --> $DIR/method-not-found-generic-arg-elision.rs:87:67
    |
 LL |     v.iter().map(Box::new(|x| x * x) as Box<dyn Fn(&i32) -> i32>).extend(std::iter::once(100));
-   |                                                                   ^^^^^^ method not found in `Map<Iter<'_, i32>, Box<dyn Fn(&i32) -> i32>>`
+   |                                                                   ^^^^^^ method not found in `Map<std::slice::Iter<'_, i32>, Box<dyn for<'a> Fn(&'a i32) -> i32>>`
 
 error[E0599]: no method named `method` found for struct `Wrapper<bool>` in the current scope
   --> $DIR/method-not-found-generic-arg-elision.rs:90:13
diff --git a/tests/ui/methods/receiver-equality.stderr b/tests/ui/methods/receiver-equality.stderr
index cea3340e386..bf149cc2eb4 100644
--- a/tests/ui/methods/receiver-equality.stderr
+++ b/tests/ui/methods/receiver-equality.stderr
@@ -5,7 +5,7 @@ LL | struct B<T>(T);
    | ----------- function or associated item `method` not found for this struct
 ...
 LL |     B::<for<'a> fn(&'a ())>::method(y);
-   |                              ^^^^^^ function or associated item not found in `B<fn(&())>`
+   |                              ^^^^^^ function or associated item not found in `B<for<'a> fn(&'a ())>`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/methods/untrimmed-path-type.rs b/tests/ui/methods/untrimmed-path-type.rs
new file mode 100644
index 00000000000..e6e3ad79185
--- /dev/null
+++ b/tests/ui/methods/untrimmed-path-type.rs
@@ -0,0 +1,11 @@
+// Ensures that the path of the `Error` type is not trimmed
+// to make it clear which Error type is meant.
+
+fn main() {
+   meow().unknown(); //~ ERROR no method named `unknown` found
+   //~^ NOTE method not found in `Result<(), std::io::Error>`
+}
+
+fn meow() -> Result<(), std::io::Error> {
+    Ok(())
+}
diff --git a/tests/ui/methods/untrimmed-path-type.stderr b/tests/ui/methods/untrimmed-path-type.stderr
new file mode 100644
index 00000000000..1f3101ff4e7
--- /dev/null
+++ b/tests/ui/methods/untrimmed-path-type.stderr
@@ -0,0 +1,9 @@
+error[E0599]: no method named `unknown` found for enum `Result` in the current scope
+  --> $DIR/untrimmed-path-type.rs:5:11
+   |
+LL |    meow().unknown();
+   |           ^^^^^^^ method not found in `Result<(), std::io::Error>`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/auto-ref-slice-plus-ref.rs b/tests/ui/methods/vec-autoderef-autoref.rs
index 00b279d3226..38c0ba8574b 100644
--- a/tests/ui/auto-ref-slice-plus-ref.rs
+++ b/tests/ui/methods/vec-autoderef-autoref.rs
@@ -1,8 +1,7 @@
-fn main() {
-
-    // Testing that method lookup does not automatically borrow
-    // vectors to slices then automatically create a self reference.
+//! Test that method resolution does not autoderef `Vec`
+//! into a slice or perform additional autorefs.
 
+fn main() {
     let mut a = vec![0];
     a.test_mut(); //~ ERROR no method named `test_mut` found
     a.test(); //~ ERROR no method named `test` found
diff --git a/tests/ui/auto-ref-slice-plus-ref.stderr b/tests/ui/methods/vec-autoderef-autoref.stderr
index 806c1ee064f..61c3bcc5b3b 100644
--- a/tests/ui/auto-ref-slice-plus-ref.stderr
+++ b/tests/ui/methods/vec-autoderef-autoref.stderr
@@ -1,12 +1,12 @@
 error[E0599]: no method named `test_mut` found for struct `Vec<{integer}>` in the current scope
-  --> $DIR/auto-ref-slice-plus-ref.rs:7:7
+  --> $DIR/vec-autoderef-autoref.rs:6:7
    |
 LL |     a.test_mut();
    |       ^^^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `MyIter` defines an item `test_mut`, perhaps you need to implement it
-  --> $DIR/auto-ref-slice-plus-ref.rs:14:1
+  --> $DIR/vec-autoderef-autoref.rs:13:1
    |
 LL | trait MyIter {
    | ^^^^^^^^^^^^
@@ -14,40 +14,40 @@ help: there is a method `get_mut` with a similar name, but with different argume
   --> $SRC_DIR/core/src/slice/mod.rs:LL:COL
 
 error[E0599]: no method named `test` found for struct `Vec<{integer}>` in the current scope
-  --> $DIR/auto-ref-slice-plus-ref.rs:8:7
+  --> $DIR/vec-autoderef-autoref.rs:7:7
    |
 LL |     a.test();
    |       ^^^^ method not found in `Vec<{integer}>`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `MyIter` defines an item `test`, perhaps you need to implement it
-  --> $DIR/auto-ref-slice-plus-ref.rs:14:1
+  --> $DIR/vec-autoderef-autoref.rs:13:1
    |
 LL | trait MyIter {
    | ^^^^^^^^^^^^
 
 error[E0599]: no method named `test` found for array `[{integer}; 1]` in the current scope
-  --> $DIR/auto-ref-slice-plus-ref.rs:10:11
+  --> $DIR/vec-autoderef-autoref.rs:9:11
    |
 LL |     ([1]).test();
    |           ^^^^ method not found in `[{integer}; 1]`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `MyIter` defines an item `test`, perhaps you need to implement it
-  --> $DIR/auto-ref-slice-plus-ref.rs:14:1
+  --> $DIR/vec-autoderef-autoref.rs:13:1
    |
 LL | trait MyIter {
    | ^^^^^^^^^^^^
 
 error[E0599]: no method named `test` found for reference `&[{integer}; 1]` in the current scope
-  --> $DIR/auto-ref-slice-plus-ref.rs:11:12
+  --> $DIR/vec-autoderef-autoref.rs:10:12
    |
 LL |     (&[1]).test();
    |            ^^^^ method not found in `&[{integer}; 1]`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `MyIter` defines an item `test`, perhaps you need to implement it
-  --> $DIR/auto-ref-slice-plus-ref.rs:14:1
+  --> $DIR/vec-autoderef-autoref.rs:13:1
    |
 LL | trait MyIter {
    | ^^^^^^^^^^^^
diff --git a/tests/ui/mir/mir_match_guard_let_chains_drop_order.rs b/tests/ui/mir/mir_match_guard_let_chains_drop_order.rs
new file mode 100644
index 00000000000..e98d57d1154
--- /dev/null
+++ b/tests/ui/mir/mir_match_guard_let_chains_drop_order.rs
@@ -0,0 +1,110 @@
+//@ run-pass
+//@ needs-unwind
+//@ revisions: edition2021 edition2024
+//@ [edition2021] edition: 2021
+//@ [edition2024] edition: 2024
+
+// See `mir_drop_order.rs` for more information
+
+#![feature(if_let_guard)]
+#![allow(irrefutable_let_patterns)]
+
+use std::cell::RefCell;
+use std::panic;
+
+pub struct DropLogger<'a, T> {
+    extra: T,
+    id: usize,
+    log: &'a panic::AssertUnwindSafe<RefCell<Vec<usize>>>,
+}
+
+impl<'a, T> Drop for DropLogger<'a, T> {
+    fn drop(&mut self) {
+        self.log.0.borrow_mut().push(self.id);
+    }
+}
+
+struct InjectedFailure;
+
+#[allow(unreachable_code)]
+fn main() {
+    let log = panic::AssertUnwindSafe(RefCell::new(vec![]));
+    let d = |id, extra| DropLogger { extra, id: id, log: &log };
+    let get = || -> Vec<_> {
+        let mut m = log.0.borrow_mut();
+        let n = m.drain(..);
+        n.collect()
+    };
+
+    {
+        let _x = (
+            d(
+                0,
+                d(
+                    1,
+                    match () { () if let Some(_) = d(2, Some(true)).extra
+                        && let DropLogger { .. } = d(3, None) => {
+                            None
+                        }
+                        _ => {
+                            Some(true)
+                        }
+                    }
+                )
+                .extra,
+            ),
+            d(4, None),
+            &d(5, None),
+            d(6, None),
+            match () {
+                () if let DropLogger { .. } = d(7, None)
+                && let DropLogger { .. } = d(8, None) => {
+                    d(9, None)
+                }
+                _ => {
+                    // 10 is not constructed
+                    d(10, None)
+                }
+            },
+        );
+        assert_eq!(get(), vec![3, 2, 8, 7, 1]);
+    }
+    assert_eq!(get(), vec![0, 4, 6, 9, 5]);
+
+    let _ = std::panic::catch_unwind(|| {
+        (
+            d(
+                11,
+                d(
+                    12,
+                    match () {
+                        () if let Some(_) = d(13, Some(true)).extra
+                                && let DropLogger { .. } = d(14, None) => {
+                            None
+                        }
+                        _ => {
+                            Some(true)
+                        }
+                    }
+                )
+                .extra,
+            ),
+            d(15, None),
+            &d(16, None),
+            d(17, None),
+            match () {
+                () if let DropLogger { .. } = d(18, None)
+                    && let DropLogger { .. } = d(19, None)
+                => {
+                    d(20, None)
+                }
+                _ => {
+                    // 10 is not constructed
+                    d(21, None)
+                }
+            },
+            panic::panic_any(InjectedFailure),
+        );
+    });
+    assert_eq!(get(), vec![14, 13, 19, 18, 20, 17, 15, 11, 16, 12]);
+}
diff --git a/tests/ui/mismatched_types/hr-projection-mismatch.current.stderr b/tests/ui/mismatched_types/hr-projection-mismatch.current.stderr
new file mode 100644
index 00000000000..a2cec972e4a
--- /dev/null
+++ b/tests/ui/mismatched_types/hr-projection-mismatch.current.stderr
@@ -0,0 +1,12 @@
+error[E0308]: mismatched types
+  --> $DIR/hr-projection-mismatch.rs:20:5
+   |
+LL |     wrap::<_, Thing>();
+   |     ^^^^^^^^^^^^^^^^ one type is more general than the other
+   |
+   = note: expected reference `&'a _`
+              found reference `&_`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/hr-projection-mismatch.next.stderr b/tests/ui/mismatched_types/hr-projection-mismatch.next.stderr
new file mode 100644
index 00000000000..6ea0d43e153
--- /dev/null
+++ b/tests/ui/mismatched_types/hr-projection-mismatch.next.stderr
@@ -0,0 +1,20 @@
+error[E0271]: type mismatch resolving `<Thing as Trait<'a>>::Assoc == &i32`
+  --> $DIR/hr-projection-mismatch.rs:20:15
+   |
+LL |     wrap::<_, Thing>();
+   |               ^^^^^ type mismatch resolving `<Thing as Trait<'a>>::Assoc == &i32`
+   |
+note: types differ
+  --> $DIR/hr-projection-mismatch.rs:14:18
+   |
+LL |     type Assoc = &'a i32;
+   |                  ^^^^^^^
+note: required by a bound in `wrap`
+  --> $DIR/hr-projection-mismatch.rs:17:33
+   |
+LL | fn wrap<T, U: for<'a> Trait<'a, Assoc = T>>() {}
+   |                                 ^^^^^^^^^ required by this bound in `wrap`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/mismatched_types/hr-projection-mismatch.rs b/tests/ui/mismatched_types/hr-projection-mismatch.rs
new file mode 100644
index 00000000000..f96314a3fca
--- /dev/null
+++ b/tests/ui/mismatched_types/hr-projection-mismatch.rs
@@ -0,0 +1,25 @@
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
+// Regression test for <https://github.com/rust-lang/rust/issues/141322>.
+
+trait Trait<'a> {
+    type Assoc;
+}
+
+struct Thing;
+
+impl<'a> Trait<'a> for Thing {
+    type Assoc = &'a i32;
+}
+
+fn wrap<T, U: for<'a> Trait<'a, Assoc = T>>() {}
+
+fn foo() {
+    wrap::<_, Thing>();
+    //[next]~^ ERROR type mismatch resolving `<Thing as Trait<'a>>::Assoc == &i32
+    //[current]~^^ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/tests/ui/mismatched_types/issue-36053-2.stderr b/tests/ui/mismatched_types/issue-36053-2.stderr
index ffaa276b62e..8827be73a57 100644
--- a/tests/ui/mismatched_types/issue-36053-2.stderr
+++ b/tests/ui/mismatched_types/issue-36053-2.stderr
@@ -15,7 +15,7 @@ help: consider adjusting the signature so it borrows its argument
 LL |     once::<&str>("str").fuse().filter(|a: &&str| true).count();
    |                                           +
 
-error[E0599]: the method `count` exists for struct `Filter<Fuse<Once<&str>>, {closure@issue-36053-2.rs:7:39}>`, but its trait bounds were not satisfied
+error[E0599]: the method `count` exists for struct `Filter<Fuse<std::iter::Once<&str>>, {closure@$DIR/issue-36053-2.rs:7:39: 7:48}>`, but its trait bounds were not satisfied
   --> $DIR/issue-36053-2.rs:7:55
    |
 LL |     once::<&str>("str").fuse().filter(|a: &str| true).count();
diff --git a/tests/ui/namespace/namespace-mix.stderr b/tests/ui/namespace/namespace-mix.stderr
index 412ea4aba30..200d31cc710 100644
--- a/tests/ui/namespace/namespace-mix.stderr
+++ b/tests/ui/namespace/namespace-mix.stderr
@@ -7,7 +7,6 @@ LL |     pub struct TS();
 LL |     check(m1::S);
    |           ^^^^^
    |
-   = note: can't use a type alias as a constructor
 help: a tuple struct with a similar name exists
    |
 LL |     check(m1::TS);
@@ -35,7 +34,6 @@ LL |     check(xm1::S);
 LL |     pub struct TS();
    |     ------------- similarly named tuple struct `TS` defined here
    |
-   = note: can't use a type alias as a constructor
 help: a tuple struct with a similar name exists
    |
 LL |     check(xm1::TS);
@@ -61,7 +59,6 @@ LL |         TV(),
 LL |     check(m7::V);
    |           ^^^^^
    |
-   = note: can't use a type alias as a constructor
 help: a tuple variant with a similar name exists
    |
 LL |     check(m7::TV);
@@ -89,7 +86,6 @@ LL |     check(xm7::V);
 LL |         TV(),
    |         -- similarly named tuple variant `TV` defined here
    |
-   = note: can't use a type alias as a constructor
 help: a tuple variant with a similar name exists
    |
 LL |     check(xm7::TV);
diff --git a/tests/ui/nll/issue-57362-2.stderr b/tests/ui/nll/issue-57362-2.stderr
index 24787b990e3..8a1a4d6b22c 100644
--- a/tests/ui/nll/issue-57362-2.stderr
+++ b/tests/ui/nll/issue-57362-2.stderr
@@ -2,7 +2,7 @@ error[E0599]: no function or associated item named `make_g` found for fn pointer
   --> $DIR/issue-57362-2.rs:23:25
    |
 LL |     let x = <fn (&())>::make_g();
-   |                         ^^^^^^ function or associated item not found in `fn(&())`
+   |                         ^^^^^^ function or associated item not found in `for<'a> fn(&'a ())`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `X` defines an item `make_g`, perhaps you need to implement it
diff --git a/tests/ui/nll/issue-57642-higher-ranked-subtype.stderr b/tests/ui/nll/issue-57642-higher-ranked-subtype.stderr
index 998d06b7706..27a887e8600 100644
--- a/tests/ui/nll/issue-57642-higher-ranked-subtype.stderr
+++ b/tests/ui/nll/issue-57642-higher-ranked-subtype.stderr
@@ -2,7 +2,7 @@ error[E0599]: no function or associated item named `make_g` found for fn pointer
   --> $DIR/issue-57642-higher-ranked-subtype.rs:31:25
    |
 LL |     let x = <fn (&())>::make_g();
-   |                         ^^^^^^ function or associated item not found in `fn(&())`
+   |                         ^^^^^^ function or associated item not found in `for<'a> fn(&'a ())`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `X` defines an item `make_g`, perhaps you need to implement it
@@ -15,7 +15,7 @@ error[E0599]: no function or associated item named `make_f` found for fn pointer
   --> $DIR/issue-57642-higher-ranked-subtype.rs:36:25
    |
 LL |     let x = <fn (&())>::make_f();
-   |                         ^^^^^^ function or associated item not found in `fn(&())`
+   |                         ^^^^^^ function or associated item not found in `for<'a> fn(&'a ())`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
 note: `Y` defines an item `make_f`, perhaps you need to implement it
diff --git a/tests/ui/nll/user-annotations/normalizing-user-annotation.rs b/tests/ui/nll/user-annotations/normalizing-user-annotation.rs
new file mode 100644
index 00000000000..fa8b3bfd577
--- /dev/null
+++ b/tests/ui/nll/user-annotations/normalizing-user-annotation.rs
@@ -0,0 +1,31 @@
+//@ check-pass
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
+// Regression test for <https://github.com/rust-lang/rust/issues/141708>.
+
+// See description in there; this has to do with fundamental limitations
+// to the old trait solver surrounding higher-ranked aliases with infer
+// vars. This always worked in the new trait solver, but I added a revision
+// just for good measure.
+
+trait Foo<'a> {
+    type Assoc;
+}
+
+impl Foo<'_> for i32 {
+    type Assoc = u32;
+}
+
+impl Foo<'_> for u32 {
+    type Assoc = u32;
+}
+
+fn foo<'b: 'b, T: for<'a> Foo<'a>, F: for<'a> Fn(<T as Foo<'a>>::Assoc)>(_: F) -> (T, F) {
+    todo!()
+}
+
+fn main() {
+    let (x, c): (i32, _) = foo::<'static, _, _>(|_| {});
+}
diff --git a/tests/ui/not-enough-arguments.rs b/tests/ui/not-enough-arguments.rs
index 4a2ea5e44c7..ec660a1de81 100644
--- a/tests/ui/not-enough-arguments.rs
+++ b/tests/ui/not-enough-arguments.rs
@@ -1,20 +1,16 @@
+//@ aux-build: delegate_macro.rs
+extern crate delegate_macro;
+use delegate_macro::delegate;
+
 // Check that the only error msg we report is the
 // mismatch between the # of params, and not other
 // unrelated errors.
-
-fn foo(a: isize, b: isize, c: isize, d:isize) {
-  panic!();
+fn foo(a: isize, b: isize, c: isize, d: isize) {
+    panic!();
 }
 
 // Check that all arguments are shown in the error message, even if they're across multiple lines.
-fn bar(
-    a: i32,
-    b: i32,
-    c: i32,
-    d: i32,
-    e: i32,
-    f: i32,
-) {
+fn bar(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32) {
     println!("{}", a);
     println!("{}", b);
     println!("{}", c);
@@ -23,9 +19,35 @@ fn bar(
     println!("{}", f);
 }
 
+macro_rules! delegate_local {
+    ($method:ident) => {
+        <Self>::$method(8)
+        //~^ ERROR function takes 2 arguments but 1
+    };
+}
+
+macro_rules! delegate_from {
+    ($from:ident, $method:ident) => {
+        <$from>::$method(8)
+        //~^ ERROR function takes 2 arguments but 1
+    };
+}
+
+struct Bar;
+
+impl Bar {
+    fn foo(a: u8, b: u8) {}
+    fn bar() {
+        delegate_local!(foo);
+        delegate!(foo);
+        //~^ ERROR function takes 2 arguments but 1
+        delegate_from!(Bar, foo);
+    }
+}
+
 fn main() {
-  foo(1, 2, 3);
-  //~^ ERROR function takes 4 arguments but 3
-  bar(1, 2, 3);
-  //~^ ERROR function takes 6 arguments but 3
+    foo(1, 2, 3);
+    //~^ ERROR function takes 4 arguments but 3
+    bar(1, 2, 3);
+    //~^ ERROR function takes 6 arguments but 3
 }
diff --git a/tests/ui/not-enough-arguments.stderr b/tests/ui/not-enough-arguments.stderr
index 099d82eb935..908d0273bbe 100644
--- a/tests/ui/not-enough-arguments.stderr
+++ b/tests/ui/not-enough-arguments.stderr
@@ -1,42 +1,88 @@
+error[E0061]: this function takes 2 arguments but 1 argument was supplied
+  --> $DIR/not-enough-arguments.rs:24:9
+   |
+LL |         <Self>::$method(8)
+   |         ^^^^^^^^^^^^^^^--- argument #2 of type `u8` is missing
+...
+LL |         delegate_local!(foo);
+   |         -------------------- in this macro invocation
+   |
+note: associated function defined here
+  --> $DIR/not-enough-arguments.rs:39:8
+   |
+LL |     fn foo(a: u8, b: u8) {}
+   |        ^^^        -----
+   = note: this error originates in the macro `delegate_local` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: provide the argument
+   |
+LL |         <Self>::$method(8, /* u8 */)
+   |                          ++++++++++
+
+error[E0061]: this function takes 2 arguments but 1 argument was supplied
+  --> $DIR/not-enough-arguments.rs:42:9
+   |
+LL |         delegate!(foo);
+   |         ^^^^^^^^^^^^^^ argument #2 of type `u8` is missing
+   |
+note: associated function defined here
+  --> $DIR/not-enough-arguments.rs:39:8
+   |
+LL |     fn foo(a: u8, b: u8) {}
+   |        ^^^        -----
+   = note: this error originates in the macro `delegate` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0061]: this function takes 2 arguments but 1 argument was supplied
+  --> $DIR/not-enough-arguments.rs:31:9
+   |
+LL |         <$from>::$method(8)
+   |         ^^^^^^^^^^^^^^^^--- argument #2 of type `u8` is missing
+...
+LL |         delegate_from!(Bar, foo);
+   |         ------------------------ in this macro invocation
+   |
+note: associated function defined here
+  --> $DIR/not-enough-arguments.rs:39:8
+   |
+LL |     fn foo(a: u8, b: u8) {}
+   |        ^^^        -----
+   = note: this error originates in the macro `delegate_from` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: provide the argument
+   |
+LL |         <$from>::$method(8, /* u8 */)
+   |                           ++++++++++
+
 error[E0061]: this function takes 4 arguments but 3 arguments were supplied
-  --> $DIR/not-enough-arguments.rs:27:3
+  --> $DIR/not-enough-arguments.rs:49:5
    |
-LL |   foo(1, 2, 3);
-   |   ^^^--------- argument #4 of type `isize` is missing
+LL |     foo(1, 2, 3);
+   |     ^^^--------- argument #4 of type `isize` is missing
    |
 note: function defined here
-  --> $DIR/not-enough-arguments.rs:5:4
+  --> $DIR/not-enough-arguments.rs:8:4
    |
-LL | fn foo(a: isize, b: isize, c: isize, d:isize) {
-   |    ^^^                               -------
+LL | fn foo(a: isize, b: isize, c: isize, d: isize) {
+   |    ^^^                               --------
 help: provide the argument
    |
-LL |   foo(1, 2, 3, /* isize */);
-   |              +++++++++++++
+LL |     foo(1, 2, 3, /* isize */);
+   |                +++++++++++++
 
 error[E0061]: this function takes 6 arguments but 3 arguments were supplied
-  --> $DIR/not-enough-arguments.rs:29:3
+  --> $DIR/not-enough-arguments.rs:51:5
    |
-LL |   bar(1, 2, 3);
-   |   ^^^--------- three arguments of type `i32`, `i32`, and `i32` are missing
+LL |     bar(1, 2, 3);
+   |     ^^^--------- three arguments of type `i32`, `i32`, and `i32` are missing
    |
 note: function defined here
-  --> $DIR/not-enough-arguments.rs:10:4
+  --> $DIR/not-enough-arguments.rs:13:4
    |
-LL | fn bar(
-   |    ^^^
-...
-LL |     d: i32,
-   |     ------
-LL |     e: i32,
-   |     ------
-LL |     f: i32,
-   |     ------
+LL | fn bar(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32) {
+   |    ^^^                         ------  ------  ------
 help: provide the arguments
    |
-LL |   bar(1, 2, 3, /* i32 */, /* i32 */, /* i32 */);
-   |              +++++++++++++++++++++++++++++++++
+LL |     bar(1, 2, 3, /* i32 */, /* i32 */, /* i32 */);
+   |                +++++++++++++++++++++++++++++++++
 
-error: aborting due to 2 previous errors
+error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0061`.
diff --git a/tests/ui/bitwise.rs b/tests/ui/numbers-arithmetic/bitwise-ops-platform.rs
index 0779e7f229c..60d552e904b 100644
--- a/tests/ui/bitwise.rs
+++ b/tests/ui/numbers-arithmetic/bitwise-ops-platform.rs
@@ -1,3 +1,5 @@
+//! Tests bitwise operations with platform-specific and negative number behavior.
+
 //@ run-pass
 
 #[cfg(any(target_pointer_width = "32"))]
diff --git a/tests/ui/object-pointer-types.stderr b/tests/ui/object-pointer-types.stderr
index ac8e069cfd2..72b290f2ad9 100644
--- a/tests/ui/object-pointer-types.stderr
+++ b/tests/ui/object-pointer-types.stderr
@@ -25,7 +25,7 @@ error[E0599]: no method named `managed` found for struct `Box<(dyn Foo + 'static
   --> $DIR/object-pointer-types.rs:23:7
    |
 LL |     x.managed();
-   |       ^^^^^^^ method not found in `Box<dyn Foo>`
+   |       ^^^^^^^ method not found in `Box<(dyn Foo + 'static)>`
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/on-unimplemented/bad-annotation.rs b/tests/ui/on-unimplemented/bad-annotation.rs
index 25de5978110..937e5b82da5 100644
--- a/tests/ui/on-unimplemented/bad-annotation.rs
+++ b/tests/ui/on-unimplemented/bad-annotation.rs
@@ -59,7 +59,7 @@ trait EmptyOn {}
 //~^^^ NOTE expected value here
 trait ExpectedPredicateInOn {}
 
-#[rustc_on_unimplemented(on(x = "y"), message = "y")]
+#[rustc_on_unimplemented(on(Self = "y"), message = "y")]
 trait OnWithoutDirectives {}
 
 #[rustc_on_unimplemented(on(from_desugaring, on(from_desugaring, message = "x")), message = "y")]
@@ -107,3 +107,13 @@ trait InvalidPredicate {}
 //~^ ERROR invalid flag in `on`-clause
 //~^^ NOTE expected one of the `crate_local`, `direct` or `from_desugaring` flags, not `something`
 trait InvalidFlag {}
+
+#[rustc_on_unimplemented(on(_Self = "y", message = "y"))]
+//~^ ERROR invalid name in `on`-clause
+//~^^ NOTE expected one of `cause`, `from_desugaring`, `Self` or any generic parameter of the trait, not `_Self`
+trait InvalidName {}
+
+#[rustc_on_unimplemented(on(abc = "y", message = "y"))]
+//~^ ERROR invalid name in `on`-clause
+//~^^ NOTE expected one of `cause`, `from_desugaring`, `Self` or any generic parameter of the trait, not `abc`
+trait InvalidName2 {}
diff --git a/tests/ui/on-unimplemented/bad-annotation.stderr b/tests/ui/on-unimplemented/bad-annotation.stderr
index 35b919c7b78..3fc54532774 100644
--- a/tests/ui/on-unimplemented/bad-annotation.stderr
+++ b/tests/ui/on-unimplemented/bad-annotation.stderr
@@ -125,7 +125,19 @@ error[E0232]: invalid flag in `on`-clause
 LL | #[rustc_on_unimplemented(on(something, message = "y"))]
    |                             ^^^^^^^^^ expected one of the `crate_local`, `direct` or `from_desugaring` flags, not `something`
 
-error: aborting due to 18 previous errors
+error[E0232]: invalid name in `on`-clause
+  --> $DIR/bad-annotation.rs:111:29
+   |
+LL | #[rustc_on_unimplemented(on(_Self = "y", message = "y"))]
+   |                             ^^^^^ expected one of `cause`, `from_desugaring`, `Self` or any generic parameter of the trait, not `_Self`
+
+error[E0232]: invalid name in `on`-clause
+  --> $DIR/bad-annotation.rs:116:29
+   |
+LL | #[rustc_on_unimplemented(on(abc = "y", message = "y"))]
+   |                             ^^^ expected one of `cause`, `from_desugaring`, `Self` or any generic parameter of the trait, not `abc`
+
+error: aborting due to 20 previous errors
 
 Some errors have detailed explanations: E0230, E0231, E0232.
 For more information about an error, try `rustc --explain E0230`.
diff --git a/tests/ui/on-unimplemented/on-trait.rs b/tests/ui/on-unimplemented/on-trait.rs
index 556813cd479..91630af17e9 100644
--- a/tests/ui/on-unimplemented/on-trait.rs
+++ b/tests/ui/on-unimplemented/on-trait.rs
@@ -3,7 +3,7 @@
 #![feature(rustc_attrs)]
 
 pub mod Bar {
-  #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}` `{Baz}` `{Quux}` in `{Foo}`"]
+  #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}` `{Baz}` `{Quux}` in `{This}`"]
   pub trait Foo<Bar, Baz, Quux> {}
 }
 
diff --git a/tests/ui/panics/location-detail-unwrap-multiline.rs b/tests/ui/panics/location-detail-unwrap-multiline.rs
new file mode 100644
index 00000000000..56e1760d851
--- /dev/null
+++ b/tests/ui/panics/location-detail-unwrap-multiline.rs
@@ -0,0 +1,12 @@
+//@ run-fail
+//@ compile-flags: -Cstrip=none -Cdebuginfo=line-tables-only -Copt-level=0
+//@ exec-env:RUST_BACKTRACE=1
+//@ regex-error-pattern: location-detail-unwrap-multiline\.rs:11(:10)?\n
+//@ needs-unwind
+//@ ignore-android FIXME #17520
+
+fn main() {
+    let opt: Option<u32> = None;
+    opt
+        .unwrap();
+}
diff --git a/tests/ui/parser/bounds-obj-parens.rs b/tests/ui/parser/bounds-obj-parens.rs
index eea4bccdc09..5ba90b50d2f 100644
--- a/tests/ui/parser/bounds-obj-parens.rs
+++ b/tests/ui/parser/bounds-obj-parens.rs
@@ -1,7 +1,5 @@
 //@ check-pass
 
-#![allow(bare_trait_objects)]
-
-type A = Box<(Fn(u8) -> u8) + 'static + Send + Sync>; // OK (but see #39318)
+type A = Box<dyn (Fn(u8) -> u8) + 'static + Send + Sync>; // OK (but see #39318)
 
 fn main() {}
diff --git a/tests/ui/parser/macro/auxiliary/unicode-control.rs b/tests/ui/parser/macro/auxiliary/unicode-control.rs
new file mode 100644
index 00000000000..8e73e3985ce
--- /dev/null
+++ b/tests/ui/parser/macro/auxiliary/unicode-control.rs
@@ -0,0 +1,19 @@
+#![allow(text_direction_codepoint_in_literal)]
+
+extern crate proc_macro;
+use proc_macro::*;
+
+#[proc_macro]
+pub fn create_rtl_in_string(_: TokenStream) -> TokenStream {
+    r#""‮test⁦ RTL in string literal""#.parse().unwrap()
+}
+
+#[proc_macro]
+pub fn forward_stream(s: TokenStream) -> TokenStream {
+    s
+}
+
+#[proc_macro]
+pub fn recollect_stream(s: TokenStream) -> TokenStream {
+    s.into_iter().collect()
+}
diff --git a/tests/ui/parser/macro/unicode-control-codepoints-macros.rs b/tests/ui/parser/macro/unicode-control-codepoints-macros.rs
new file mode 100644
index 00000000000..775c5077976
--- /dev/null
+++ b/tests/ui/parser/macro/unicode-control-codepoints-macros.rs
@@ -0,0 +1,49 @@
+// Regression test for #140281
+//@ edition: 2021
+//@ proc-macro: unicode-control.rs
+
+extern crate unicode_control;
+use unicode_control::*;
+
+macro_rules! foo {
+    ($x:expr) => {
+        $x
+    };
+}
+
+macro_rules! empty {
+    ($x:expr) => {};
+}
+
+fn main() {
+    let t = vec![
+        /// ‮test⁦ RTL in doc in vec
+        //~^ ERROR unicode codepoint changing visible direction of text present in doc comment
+        1
+    ];
+    foo!(
+        /**
+         * ‮test⁦ RTL in doc in macro
+         */
+        //~^^^ ERROR unicode codepoint changing visible direction of text present in doc comment
+        1
+    );
+    empty!(
+        /**
+         * ‮test⁦ RTL in doc in macro
+         */
+        //~^^^ ERROR unicode codepoint changing visible direction of text present in doc comment
+        1
+    );
+    let x = create_rtl_in_string!(); // OK
+    forward_stream!(
+        /// ‮test⁦ RTL in doc in proc macro
+        //~^ ERROR unicode codepoint changing visible direction of text present in doc comment
+        mod a {}
+    );
+    recollect_stream!(
+        /// ‮test⁦ RTL in doc in proc macro
+        //~^ ERROR unicode codepoint changing visible direction of text present in doc comment
+        mod b {}
+    );
+}
diff --git a/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr b/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr
new file mode 100644
index 00000000000..ca813399eac
--- /dev/null
+++ b/tests/ui/parser/macro/unicode-control-codepoints-macros.stderr
@@ -0,0 +1,57 @@
+error: unicode codepoint changing visible direction of text present in doc comment
+  --> $DIR/unicode-control-codepoints-macros.rs:20:9
+   |
+LL |         /// �test� RTL in doc in vec
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment contains invisible unicode text flow control codepoints
+   |
+   = note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
+   = note: if their presence wasn't intentional, you can remove them
+   = note: if you want to keep them but make them visible in your source code, you can escape them: '\u{202e}', '\u{2066}'
+   = note: `#[deny(text_direction_codepoint_in_literal)]` on by default
+
+error: unicode codepoint changing visible direction of text present in doc comment
+  --> $DIR/unicode-control-codepoints-macros.rs:25:9
+   |
+LL | /         /**
+LL | |          * �test� RTL in doc in macro
+LL | |          */
+   | |___________^ this doc comment contains invisible unicode text flow control codepoints
+   |
+   = note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
+   = note: if their presence wasn't intentional, you can remove them
+   = note: if you want to keep them but make them visible in your source code, you can escape them: '\u{202e}', '\u{2066}'
+
+error: unicode codepoint changing visible direction of text present in doc comment
+  --> $DIR/unicode-control-codepoints-macros.rs:32:9
+   |
+LL | /         /**
+LL | |          * �test� RTL in doc in macro
+LL | |          */
+   | |___________^ this doc comment contains invisible unicode text flow control codepoints
+   |
+   = note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
+   = note: if their presence wasn't intentional, you can remove them
+   = note: if you want to keep them but make them visible in your source code, you can escape them: '\u{202e}', '\u{2066}'
+
+error: unicode codepoint changing visible direction of text present in doc comment
+  --> $DIR/unicode-control-codepoints-macros.rs:40:9
+   |
+LL |         /// �test� RTL in doc in proc macro
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment contains invisible unicode text flow control codepoints
+   |
+   = note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
+   = note: if their presence wasn't intentional, you can remove them
+   = note: if you want to keep them but make them visible in your source code, you can escape them: '\u{202e}', '\u{2066}'
+
+error: unicode codepoint changing visible direction of text present in doc comment
+  --> $DIR/unicode-control-codepoints-macros.rs:45:9
+   |
+LL |         /// �test� RTL in doc in proc macro
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment contains invisible unicode text flow control codepoints
+   |
+   = note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
+   = note: if their presence wasn't intentional, you can remove them
+   = note: if you want to keep them but make them visible in your source code, you can escape them: '\u{202e}', '\u{2066}'
+
+error: aborting due to 5 previous errors
+
diff --git a/tests/ui/parser/match-arm-comma-typo-issue-140991.fixed b/tests/ui/parser/match-arm-comma-typo-issue-140991.fixed
new file mode 100644
index 00000000000..4d99e4bdc1c
--- /dev/null
+++ b/tests/ui/parser/match-arm-comma-typo-issue-140991.fixed
@@ -0,0 +1,24 @@
+//@ run-rustfix
+
+pub enum Foo {
+    X, Y
+}
+
+pub fn typo1(foo: Foo) -> Foo {
+    use Foo::*;
+    match foo {
+        X => Y,
+        Y => X, //~ ERROR expected one of
+    }
+}
+
+pub fn typo2(foo: Foo) -> Foo {
+    use Foo::*;
+    match foo {
+        X => Y,
+        Y => X, //~ ERROR expected one of
+    }
+}
+
+
+fn main() { }
diff --git a/tests/ui/parser/match-arm-comma-typo-issue-140991.rs b/tests/ui/parser/match-arm-comma-typo-issue-140991.rs
new file mode 100644
index 00000000000..3baf1ff3fa1
--- /dev/null
+++ b/tests/ui/parser/match-arm-comma-typo-issue-140991.rs
@@ -0,0 +1,24 @@
+//@ run-rustfix
+
+pub enum Foo {
+    X, Y
+}
+
+pub fn typo1(foo: Foo) -> Foo {
+    use Foo::*;
+    match foo {
+        X => Y.
+        Y => X, //~ ERROR expected one of
+    }
+}
+
+pub fn typo2(foo: Foo) -> Foo {
+    use Foo::*;
+    match foo {
+        X => Y/
+        Y => X, //~ ERROR expected one of
+    }
+}
+
+
+fn main() { }
diff --git a/tests/ui/parser/match-arm-comma-typo-issue-140991.stderr b/tests/ui/parser/match-arm-comma-typo-issue-140991.stderr
new file mode 100644
index 00000000000..19532d14245
--- /dev/null
+++ b/tests/ui/parser/match-arm-comma-typo-issue-140991.stderr
@@ -0,0 +1,26 @@
+error: expected one of `(`, `,`, `.`, `::`, `?`, `}`, or an operator, found `=>`
+  --> $DIR/match-arm-comma-typo-issue-140991.rs:11:11
+   |
+LL |         Y => X,
+   |           ^^ expected one of 7 possible tokens
+   |
+help: you might have meant to write a `,` to end this `match` arm
+   |
+LL -         X => Y.
+LL +         X => Y,
+   |
+
+error: expected one of `!`, `,`, `.`, `::`, `?`, `{`, `}`, or an operator, found `=>`
+  --> $DIR/match-arm-comma-typo-issue-140991.rs:19:11
+   |
+LL |         Y => X,
+   |           ^^ expected one of 8 possible tokens
+   |
+help: you might have meant to write a `,` to end this `match` arm
+   |
+LL -         X => Y/
+LL +         X => Y,
+   |
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/parser/trailing-plus-in-bounds.rs b/tests/ui/parser/trailing-plus-in-bounds.rs
index ef9bdadb282..aa5bc3aca59 100644
--- a/tests/ui/parser/trailing-plus-in-bounds.rs
+++ b/tests/ui/parser/trailing-plus-in-bounds.rs
@@ -1,9 +1,7 @@
 //@ check-pass
 
-#![allow(bare_trait_objects)]
-
 use std::fmt::Debug;
 
 fn main() {
-    let x: Box<Debug+> = Box::new(3) as Box<Debug+>; // Trailing `+` is OK
+    let x: Box<dyn Debug+> = Box::new(3) as Box<dyn Debug+>; // Trailing `+` is OK
 }
diff --git a/tests/ui/parser/unicode-control-codepoints.rs b/tests/ui/parser/unicode-control-codepoints.rs
index 14e1cfe59d3..e3c906063c4 100644
--- a/tests/ui/parser/unicode-control-codepoints.rs
+++ b/tests/ui/parser/unicode-control-codepoints.rs
@@ -34,7 +34,7 @@ fn main() {
     //~^ ERROR unicode codepoint changing visible direction of text present in literal
 
     println!("{{‮}}");
-    //~^ ERROR unicode codepoint changing visible direction of text present in format string
+    //~^ ERROR unicode codepoint changing visible direction of text present in literal
 }
 
 //"/*‮ } ⁦if isAdmin⁩ ⁦ begin admins only */"
diff --git a/tests/ui/parser/unicode-control-codepoints.stderr b/tests/ui/parser/unicode-control-codepoints.stderr
index 27b95f9ac61..7978c1435f6 100644
--- a/tests/ui/parser/unicode-control-codepoints.stderr
+++ b/tests/ui/parser/unicode-control-codepoints.stderr
@@ -100,21 +100,6 @@ LL |     // if access_level != "us�e�r" { // Check if admin
    = note: `#[deny(text_direction_codepoint_in_comment)]` on by default
    = help: if their presence wasn't intentional, you can remove them
 
-error: unicode codepoint changing visible direction of text present in comment
-  --> $DIR/unicode-control-codepoints.rs:40:1
-   |
-LL | //"/*� } �if isAdmin� � begin admins only */"
-   | ^^^^^-^^^-^^^^^^^^^^-^-^^^^^^^^^^^^^^^^^^^^^^
-   | |    |   |          | |
-   | |    |   |          | '\u{2066}'
-   | |    |   |          '\u{2069}'
-   | |    |   '\u{2066}'
-   | |    '\u{202e}'
-   | this comment contains invisible unicode text flow control codepoints
-   |
-   = note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
-   = help: if their presence wasn't intentional, you can remove them
-
 error: unicode codepoint changing visible direction of text present in literal
   --> $DIR/unicode-control-codepoints.rs:13:22
    |
@@ -207,14 +192,14 @@ LL -     let _ = cr#"�"#;
 LL +     let _ = cr#"\u{202e}"#;
    |
 
-error: unicode codepoint changing visible direction of text present in format string
+error: unicode codepoint changing visible direction of text present in literal
   --> $DIR/unicode-control-codepoints.rs:36:14
    |
 LL |     println!("{{�}}");
    |              ^^^-^^^
    |              |  |
    |              |  '\u{202e}'
-   |              this format string contains an invisible unicode text flow control codepoint
+   |              this literal contains an invisible unicode text flow control codepoint
    |
    = note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
    = help: if their presence wasn't intentional, you can remove them
@@ -224,6 +209,21 @@ LL -     println!("{{�}}");
 LL +     println!("{{\u{202e}}}");
    |
 
+error: unicode codepoint changing visible direction of text present in comment
+  --> $DIR/unicode-control-codepoints.rs:40:1
+   |
+LL | //"/*� } �if isAdmin� � begin admins only */"
+   | ^^^^^-^^^-^^^^^^^^^^-^-^^^^^^^^^^^^^^^^^^^^^^
+   | |    |   |          | |
+   | |    |   |          | '\u{2066}'
+   | |    |   |          '\u{2069}'
+   | |    |   '\u{2066}'
+   | |    '\u{202e}'
+   | this comment contains invisible unicode text flow control codepoints
+   |
+   = note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
+   = help: if their presence wasn't intentional, you can remove them
+
 error: unicode codepoint changing visible direction of text present in doc comment
   --> $DIR/unicode-control-codepoints.rs:43:1
    |
diff --git a/tests/ui/bind-by-move.rs b/tests/ui/pattern/pattern-match-arc-move.rs
index 99f3536e533..bc79401e4e3 100644
--- a/tests/ui/bind-by-move.rs
+++ b/tests/ui/pattern/pattern-match-arc-move.rs
@@ -1,3 +1,5 @@
+//! Tests moving an `Arc` value out of an `Option` in a match expression.
+
 //@ run-pass
 
 use std::sync::Arc;
diff --git a/tests/ui/pattern/pattern-match-invalid-variant.rs b/tests/ui/pattern/pattern-match-invalid-variant.rs
new file mode 100644
index 00000000000..183031553c0
--- /dev/null
+++ b/tests/ui/pattern/pattern-match-invalid-variant.rs
@@ -0,0 +1,19 @@
+//! Tests invalid enum variant in a match expression.
+
+enum Color {
+    Rgb(isize, isize, isize),
+    Rgba(isize, isize, isize, isize),
+}
+
+fn main() {
+    let red: Color = Color::Rgb(255, 0, 0);
+    match red {
+        Color::Rgb(r, g, b) => {
+            println!("rgb");
+        }
+        Color::Hsl(h, s, l) => {
+            //~^ ERROR no variant
+            println!("hsl");
+        }
+    }
+}
diff --git a/tests/ui/bogus-tag.stderr b/tests/ui/pattern/pattern-match-invalid-variant.stderr
index d94bd489ec6..08a99f696f6 100644
--- a/tests/ui/bogus-tag.stderr
+++ b/tests/ui/pattern/pattern-match-invalid-variant.stderr
@@ -1,10 +1,10 @@
 error[E0599]: no variant or associated item named `Hsl` found for enum `Color` in the current scope
-  --> $DIR/bogus-tag.rs:7:16
+  --> $DIR/pattern-match-invalid-variant.rs:14:16
    |
-LL | enum Color { Rgb(isize, isize, isize), Rgba(isize, isize, isize, isize), }
+LL | enum Color {
    | ---------- variant or associated item `Hsl` not found for this enum
 ...
-LL |         Color::Hsl(h, s, l) => { println!("hsl"); }
+LL |         Color::Hsl(h, s, l) => {
    |                ^^^ variant or associated item not found in `Color`
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/pattern/rfc-3637-guard-patterns/name-resolution.rs b/tests/ui/pattern/rfc-3637-guard-patterns/name-resolution.rs
new file mode 100644
index 00000000000..83ad8c76bb1
--- /dev/null
+++ b/tests/ui/pattern/rfc-3637-guard-patterns/name-resolution.rs
@@ -0,0 +1,81 @@
+//! Test that guard patterns can see bindings already in scope and bindings introduced in their
+//! subpattern, but no other bindings from the containing pattern. Also make sure bindings
+//! introduced in guard patterns are visible in fn/arm/loop/etc bodies.
+
+#![feature(guard_patterns)]
+#![expect(incomplete_features)]
+
+fn good_fn_item(((x if x) | x): bool) -> bool { x }
+
+fn bad_fn_item_1(x: bool, ((y if x) | y): bool) {}
+//~^ ERROR cannot find value `x` in this scope
+fn bad_fn_item_2(((x if y) | x): bool, y: bool) {}
+//~^ ERROR cannot find value `y` in this scope
+
+fn main() {
+    let ((local if local) if local) = false;
+
+    match (true, true) {
+        (x if local, y if good_fn_item(y)) => x && y,
+        (x, y if x) => x && y,
+        //~^ ERROR cannot find value `x` in this scope
+        (x if y, y) => x && y,
+        //~^ ERROR cannot find value `y` in this scope
+    };
+
+    match (true,) {
+        (x @ y if x && y,) => x && y,
+        (x @ (y if y),) => x && y,
+        (x @ (y if x),) => x && y,
+        //~^ ERROR cannot find value `x` in this scope
+    };
+
+    match (Ok(true),) {
+        ((Ok(x) | Err(x)) if good_fn_item(x),) => x,
+        ((Ok(x) if local) | (Err(x) if good_fn_item(x)),) => x,
+        ((Ok(x if x) if x) | (Err(x if x) if x) if x,) if x => x,
+        ((Ok(x) if y) | (Err(y) if x),) => x && y,
+        //~^ ERROR variable `x` is not bound in all patterns
+        //~| ERROR variable `y` is not bound in all patterns
+        //~| ERROR cannot find value `x` in this scope
+        //~| ERROR cannot find value `y` in this scope
+    };
+
+    let (_ if nonexistent) = true;
+    //~^ ERROR cannot find value `nonexistent` in this scope
+    if let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
+    //~^ ERROR cannot find value `x` in this scope
+    //~| ERROR cannot find value `y` in this scope
+    while let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
+    //~^ ERROR cannot find value `x` in this scope
+    //~| ERROR cannot find value `y` in this scope
+    for ((x, y if x) | (x if y, y)) in [(true, true)] { x && y; }
+    //~^ ERROR cannot find value `x` in this scope
+    //~| ERROR cannot find value `y` in this scope
+
+    (|(x if x), (y if y)| x && y)(true, true);
+    (|(x if y), (y if x)| x && y)(true, true);
+    //~^ ERROR cannot find value `x` in this scope
+    //~| ERROR cannot find value `y` in this scope
+
+    // FIXME(guard_patterns): mismatched bindings are not yet allowed
+    match Some(0) {
+        Some(x if x > 0) | None => {}
+        //~^ ERROR variable `x` is not bound in all patterns
+    }
+}
+
+/// Make sure shadowing is handled properly. In particular, if a pattern shadows an identifier,
+/// a guard pattern's guard should still see the original binding if the shadowing binding isn't in
+/// its subpattern.
+fn test_shadowing(local: bool) -> u8 {
+    match (0, 0) {
+        // The `local` binding here shadows the `bool` definition, so we get a type error.
+        //~v ERROR mismatched types
+        local if local => 0,
+        // The guards here should see the `bool` definition of `local`, not the new `u8` binding.
+        // The body should see the new binding.
+        (local, _ if local) => local,
+        (_ if local, local) => local,
+    }
+}
diff --git a/tests/ui/pattern/rfc-3637-guard-patterns/name-resolution.stderr b/tests/ui/pattern/rfc-3637-guard-patterns/name-resolution.stderr
new file mode 100644
index 00000000000..d76e60478a1
--- /dev/null
+++ b/tests/ui/pattern/rfc-3637-guard-patterns/name-resolution.stderr
@@ -0,0 +1,133 @@
+error[E0408]: variable `y` is not bound in all patterns
+  --> $DIR/name-resolution.rs:37:10
+   |
+LL |         ((Ok(x) if y) | (Err(y) if x),) => x && y,
+   |          ^^^^^^^^^^^^        - variable not in all patterns
+   |          |
+   |          pattern doesn't bind `y`
+
+error[E0408]: variable `x` is not bound in all patterns
+  --> $DIR/name-resolution.rs:37:25
+   |
+LL |         ((Ok(x) if y) | (Err(y) if x),) => x && y,
+   |              -          ^^^^^^^^^^^^^ pattern doesn't bind `x`
+   |              |
+   |              variable not in all patterns
+
+error[E0408]: variable `x` is not bound in all patterns
+  --> $DIR/name-resolution.rs:63:28
+   |
+LL |         Some(x if x > 0) | None => {}
+   |              -             ^^^^ pattern doesn't bind `x`
+   |              |
+   |              variable not in all patterns
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/name-resolution.rs:10:34
+   |
+LL | fn bad_fn_item_1(x: bool, ((y if x) | y): bool) {}
+   |                                  ^ help: a local variable with a similar name exists: `y`
+
+error[E0425]: cannot find value `y` in this scope
+  --> $DIR/name-resolution.rs:12:25
+   |
+LL | fn bad_fn_item_2(((x if y) | x): bool, y: bool) {}
+   |                         ^ help: a local variable with a similar name exists: `x`
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/name-resolution.rs:20:18
+   |
+LL |         (x, y if x) => x && y,
+   |                  ^ help: a local variable with a similar name exists: `y`
+
+error[E0425]: cannot find value `y` in this scope
+  --> $DIR/name-resolution.rs:22:15
+   |
+LL |         (x if y, y) => x && y,
+   |               ^ help: a local variable with a similar name exists: `x`
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/name-resolution.rs:29:20
+   |
+LL |         (x @ (y if x),) => x && y,
+   |                    ^ help: a local variable with a similar name exists: `y`
+
+error[E0425]: cannot find value `y` in this scope
+  --> $DIR/name-resolution.rs:37:20
+   |
+LL |         ((Ok(x) if y) | (Err(y) if x),) => x && y,
+   |                    ^ help: a local variable with a similar name exists: `x`
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/name-resolution.rs:37:36
+   |
+LL |         ((Ok(x) if y) | (Err(y) if x),) => x && y,
+   |                                    ^ help: a local variable with a similar name exists: `y`
+
+error[E0425]: cannot find value `nonexistent` in this scope
+  --> $DIR/name-resolution.rs:44:15
+   |
+LL |     let (_ if nonexistent) = true;
+   |               ^^^^^^^^^^^ not found in this scope
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/name-resolution.rs:46:22
+   |
+LL |     if let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
+   |                      ^ help: a local variable with a similar name exists: `y`
+
+error[E0425]: cannot find value `y` in this scope
+  --> $DIR/name-resolution.rs:46:33
+   |
+LL |     if let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
+   |                                 ^ help: a local variable with a similar name exists: `x`
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/name-resolution.rs:49:25
+   |
+LL |     while let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
+   |                         ^ help: a local variable with a similar name exists: `y`
+
+error[E0425]: cannot find value `y` in this scope
+  --> $DIR/name-resolution.rs:49:36
+   |
+LL |     while let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
+   |                                    ^ help: a local variable with a similar name exists: `x`
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/name-resolution.rs:52:19
+   |
+LL |     for ((x, y if x) | (x if y, y)) in [(true, true)] { x && y; }
+   |                   ^ help: a local variable with a similar name exists: `y`
+
+error[E0425]: cannot find value `y` in this scope
+  --> $DIR/name-resolution.rs:52:30
+   |
+LL |     for ((x, y if x) | (x if y, y)) in [(true, true)] { x && y; }
+   |                              ^ help: a local variable with a similar name exists: `x`
+
+error[E0425]: cannot find value `y` in this scope
+  --> $DIR/name-resolution.rs:57:13
+   |
+LL |     (|(x if y), (y if x)| x && y)(true, true);
+   |             ^ help: a local variable with a similar name exists: `x`
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/name-resolution.rs:57:23
+   |
+LL |     (|(x if y), (y if x)| x && y)(true, true);
+   |                       ^ help: a local variable with a similar name exists: `y`
+
+error[E0308]: mismatched types
+  --> $DIR/name-resolution.rs:75:18
+   |
+LL |         local if local => 0,
+   |                  ^^^^^ expected `bool`, found `({integer}, {integer})`
+   |
+   = note: expected type `bool`
+             found tuple `({integer}, {integer})`
+
+error: aborting due to 20 previous errors
+
+Some errors have detailed explanations: E0308, E0408, E0425.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/pattern/rfc-3637-guard-patterns/only-gather-locals-once.rs b/tests/ui/pattern/rfc-3637-guard-patterns/only-gather-locals-once.rs
new file mode 100644
index 00000000000..7bb39ca7bb9
--- /dev/null
+++ b/tests/ui/pattern/rfc-3637-guard-patterns/only-gather-locals-once.rs
@@ -0,0 +1,15 @@
+//@ check-pass
+//! Test that `GatherLocalsVisitor` only visits expressions in guard patterns when checking the
+//! expressions, and not a second time when visiting the pattern. If locals are declared inside the
+//! the guard expression, it would ICE if visited twice ("evaluated expression more than once").
+
+#![feature(guard_patterns)]
+#![expect(incomplete_features)]
+
+fn main() {
+    match (0,) {
+        // FIXME(guard_patterns): liveness lints don't work yet; this will ICE without the `_`.
+        (_ if { let _x = false; _x },) => {}
+        _ => {}
+    }
+}
diff --git a/tests/ui/pattern/rfc-3637-guard-patterns/only-resolve-top-level-guard-expr-once-ice-141265.rs b/tests/ui/pattern/rfc-3637-guard-patterns/only-resolve-top-level-guard-expr-once-ice-141265.rs
new file mode 100644
index 00000000000..7dc9ef7161d
--- /dev/null
+++ b/tests/ui/pattern/rfc-3637-guard-patterns/only-resolve-top-level-guard-expr-once-ice-141265.rs
@@ -0,0 +1,12 @@
+//! Regression test for <https://github.com/rust-lang/rust/issues/141265>.
+//! Make sure expressions in top-level guard patterns are only resolved once.
+
+fn main() {
+    for
+    else if b 0 {}
+    //~^ ERROR expected identifier, found keyword `else`
+    //~| ERROR missing `in` in `for` loop
+    //~| ERROR cannot find value `b` in this scope
+    //~| ERROR guard patterns are experimental
+    //~| ERROR `{integer}` is not an iterator
+}
diff --git a/tests/ui/pattern/rfc-3637-guard-patterns/only-resolve-top-level-guard-expr-once-ice-141265.stderr b/tests/ui/pattern/rfc-3637-guard-patterns/only-resolve-top-level-guard-expr-once-ice-141265.stderr
new file mode 100644
index 00000000000..dae384137f5
--- /dev/null
+++ b/tests/ui/pattern/rfc-3637-guard-patterns/only-resolve-top-level-guard-expr-once-ice-141265.stderr
@@ -0,0 +1,48 @@
+error: expected identifier, found keyword `else`
+  --> $DIR/only-resolve-top-level-guard-expr-once-ice-141265.rs:6:5
+   |
+LL |     else if b 0 {}
+   |     ^^^^ expected identifier, found keyword
+
+error: missing `in` in `for` loop
+  --> $DIR/only-resolve-top-level-guard-expr-once-ice-141265.rs:6:14
+   |
+LL |     else if b 0 {}
+   |              ^
+   |
+help: try adding `in` here
+   |
+LL |     else if b in 0 {}
+   |               ++
+
+error[E0425]: cannot find value `b` in this scope
+  --> $DIR/only-resolve-top-level-guard-expr-once-ice-141265.rs:6:13
+   |
+LL |     else if b 0 {}
+   |             ^ not found in this scope
+
+error[E0658]: guard patterns are experimental
+  --> $DIR/only-resolve-top-level-guard-expr-once-ice-141265.rs:6:13
+   |
+LL |     else if b 0 {}
+   |             ^
+   |
+   = note: see issue #129967 <https://github.com/rust-lang/rust/issues/129967> for more information
+   = help: add `#![feature(guard_patterns)]` 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 using match arm guards
+
+error[E0277]: `{integer}` is not an iterator
+  --> $DIR/only-resolve-top-level-guard-expr-once-ice-141265.rs:6:15
+   |
+LL |     else if b 0 {}
+   |               ^ `{integer}` is not an iterator
+   |
+   = help: the trait `Iterator` is not implemented for `{integer}`
+   = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
+   = note: required for `{integer}` to implement `IntoIterator`
+
+error: aborting due to 5 previous errors
+
+Some errors have detailed explanations: E0277, E0425, E0658.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/pattern/unused-parameters-const-pattern.rs b/tests/ui/pattern/unused-parameters-const-pattern.rs
new file mode 100644
index 00000000000..107c65ddfd3
--- /dev/null
+++ b/tests/ui/pattern/unused-parameters-const-pattern.rs
@@ -0,0 +1,19 @@
+//@ check-pass
+
+// Tests that const patterns that use generic parameters are
+// allowed if we are still able to evaluate them.
+
+trait Trait { const ASSOC: usize; }
+
+impl<T> Trait for T {
+    const ASSOC: usize = 10;
+}
+
+fn foo<T>(a: usize) {
+    match a {
+        <T as Trait>::ASSOC => (),
+        _ => (),
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/print-request/emit-warning-print-link-info-without-staticlib.rs b/tests/ui/print-request/emit-warning-print-link-info-without-staticlib.rs
new file mode 100644
index 00000000000..b100c062bba
--- /dev/null
+++ b/tests/ui/print-request/emit-warning-print-link-info-without-staticlib.rs
@@ -0,0 +1,5 @@
+//@ compile-flags: --print native-static-libs
+//@ check-pass
+//~? WARN cannot output linkage information without staticlib crate-type
+
+fn main() {}
diff --git a/tests/ui/print-request/emit-warning-print-link-info-without-staticlib.stderr b/tests/ui/print-request/emit-warning-print-link-info-without-staticlib.stderr
new file mode 100644
index 00000000000..ceff08baa13
--- /dev/null
+++ b/tests/ui/print-request/emit-warning-print-link-info-without-staticlib.stderr
@@ -0,0 +1,6 @@
+warning: cannot output linkage information without staticlib crate-type
+
+note: consider `--crate-type staticlib` to print linkage information
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/print-request/emit-warning-while-exe-and-print-link-info.rs b/tests/ui/print-request/emit-warning-while-exe-and-print-link-info.rs
new file mode 100644
index 00000000000..3e9ca457a9c
--- /dev/null
+++ b/tests/ui/print-request/emit-warning-while-exe-and-print-link-info.rs
@@ -0,0 +1,3 @@
+//@ compile-flags: --print native-static-libs --crate-type staticlib  --emit metadata
+//@ check-pass
+//~? WARN cannot output linkage information when --emit link is not passed
diff --git a/tests/ui/print-request/emit-warning-while-exe-and-print-link-info.stderr b/tests/ui/print-request/emit-warning-while-exe-and-print-link-info.stderr
new file mode 100644
index 00000000000..b32e1437d6b
--- /dev/null
+++ b/tests/ui/print-request/emit-warning-while-exe-and-print-link-info.stderr
@@ -0,0 +1,4 @@
+warning: cannot output linkage information when --emit link is not passed
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/print-request/stability.rs b/tests/ui/print-request/stability.rs
index 54142ce78ce..fbcdf916cc7 100644
--- a/tests/ui/print-request/stability.rs
+++ b/tests/ui/print-request/stability.rs
@@ -110,3 +110,4 @@ fn main() {}
 //[check_cfg]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `check-cfg` print option
 //[supported_crate_types]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `supported-crate-types` print option
 //[target_spec_json]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `target-spec-json` print option
+//[native_static_libs]~? WARNING cannot output linkage information without staticlib crate-type
diff --git a/tests/ui/print_type_sizes/niche-filling.rs b/tests/ui/print_type_sizes/niche-filling.rs
index 36739e3fc04..719bc2a07dc 100644
--- a/tests/ui/print_type_sizes/niche-filling.rs
+++ b/tests/ui/print_type_sizes/niche-filling.rs
@@ -55,7 +55,14 @@ pub struct NestedNonZero {
 
 impl Default for NestedNonZero {
     fn default() -> Self {
-        NestedNonZero { pre: 0, val: unsafe { NonZero::new_unchecked(1) }, post: 0 }
+        // Ideally we'd call NonZero::new_unchecked, but this test is supposed
+        // to be target-independent and NonZero::new_unchecked is #[track_caller]
+        // (see #129658) so mentioning that function pulls in std::panic::Location
+        // which contains a &str, whose layout is target-dependent.
+        const ONE: NonZero<u32> = const {
+            unsafe { std::mem::transmute(1u32) }
+        };
+        NestedNonZero { pre: 0, val: ONE, post: 0 }
     }
 }
 
diff --git a/tests/ui/print_type_sizes/niche-filling.stdout b/tests/ui/print_type_sizes/niche-filling.stdout
index 70612490a47..3342f68dd70 100644
--- a/tests/ui/print_type_sizes/niche-filling.stdout
+++ b/tests/ui/print_type_sizes/niche-filling.stdout
@@ -72,10 +72,6 @@ print-type-size type: `core::num::niche_types::NonZeroU32Inner`: 4 bytes, alignm
 print-type-size     field `.0`: 4 bytes
 print-type-size type: `std::num::NonZero<u32>`: 4 bytes, alignment: 4 bytes
 print-type-size     field `.0`: 4 bytes
-print-type-size type: `std::option::Option<std::num::NonZero<u32>>`: 4 bytes, alignment: 4 bytes
-print-type-size     variant `Some`: 4 bytes
-print-type-size         field `.0`: 4 bytes
-print-type-size     variant `None`: 0 bytes
 print-type-size type: `Enum4<(), (), (), MyOption<u8>>`: 2 bytes, alignment: 1 bytes
 print-type-size     variant `Four`: 2 bytes
 print-type-size         field `.0`: 2 bytes
diff --git a/tests/ui/proc-macro/no-macro-use-attr.stderr b/tests/ui/proc-macro/no-macro-use-attr.stderr
index 4913672450a..0bef563fbb9 100644
--- a/tests/ui/proc-macro/no-macro-use-attr.stderr
+++ b/tests/ui/proc-macro/no-macro-use-attr.stderr
@@ -2,13 +2,17 @@ warning: unused extern crate
   --> $DIR/no-macro-use-attr.rs:6:1
    |
 LL | extern crate test_macros;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ unused
    |
 note: the lint level is defined here
   --> $DIR/no-macro-use-attr.rs:4:9
    |
 LL | #![warn(unused_extern_crates)]
    |         ^^^^^^^^^^^^^^^^^^^^
+help: remove the unused `extern crate`
+   |
+LL - extern crate test_macros;
+   |
 
 warning: 1 warning emitted
 
diff --git a/tests/ui/qualified/qualified-path-params-2.stderr b/tests/ui/qualified/qualified-path-params-2.stderr
index 6641e81013f..e70cdbdc3f4 100644
--- a/tests/ui/qualified/qualified-path-params-2.stderr
+++ b/tests/ui/qualified/qualified-path-params-2.stderr
@@ -7,7 +7,7 @@ LL | type A = <S as Tr>::A::f<u8>;
 help: if there were a trait named `Example` with associated type `f` implemented for `<S as Tr>::A`, you could use the fully-qualified path
    |
 LL - type A = <S as Tr>::A::f<u8>;
-LL + type A = <<S as Tr>::A as Example>::f;
+LL + type A = <<S as Tr>::A as Example>::f<u8>;
    |
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/recursion/recursive-static-definition.rs b/tests/ui/recursion/recursive-static-definition.rs
index 5317c47076e..55db6a86bf1 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 could not evaluate static initializer
+//~^ ERROR encountered static that tried to initialize itself with itself
 
 #[derive(Copy, Clone)]
 pub union Foo {
@@ -7,6 +7,6 @@ pub union Foo {
 }
 
 pub static BAR: Foo = BAR;
-//~^ ERROR could not evaluate static initializer
+//~^ ERROR encountered static that tried to initialize itself with itself
 
 fn main() {}
diff --git a/tests/ui/recursion/recursive-static-definition.stderr b/tests/ui/recursion/recursive-static-definition.stderr
index 86a22c990e9..7063e5c3c66 100644
--- a/tests/ui/recursion/recursive-static-definition.stderr
+++ b/tests/ui/recursion/recursive-static-definition.stderr
@@ -1,14 +1,14 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: encountered static that tried to initialize itself with itself
   --> $DIR/recursive-static-definition.rs:1:23
    |
 LL | pub static FOO: u32 = FOO;
-   |                       ^^^ encountered static that tried to initialize itself with itself
+   |                       ^^^ evaluation of static initializer failed here
 
-error[E0080]: could not evaluate static initializer
+error[E0080]: encountered static that tried to initialize itself with itself
   --> $DIR/recursive-static-definition.rs:9:23
    |
 LL | pub static BAR: Foo = BAR;
-   |                       ^^^ encountered static that tried to initialize itself with itself
+   |                       ^^^ evaluation of static initializer failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/regions/region-object-lifetime-1.rs b/tests/ui/regions/region-object-lifetime-1.rs
index 11e3c8a1a33..7ff37d7a525 100644
--- a/tests/ui/regions/region-object-lifetime-1.rs
+++ b/tests/ui/regions/region-object-lifetime-1.rs
@@ -10,7 +10,7 @@ trait Foo {
 
 // Here the receiver and return value all have the same lifetime,
 // so no error results.
-fn borrowed_receiver_same_lifetime<'a>(x: &'a Foo) -> &'a () {
+fn borrowed_receiver_same_lifetime<'a>(x: &'a dyn Foo) -> &'a () {
     x.borrowed()
 }
 
diff --git a/tests/ui/regions/region-object-lifetime-3.rs b/tests/ui/regions/region-object-lifetime-3.rs
index ddeeec902f1..fee32f92059 100644
--- a/tests/ui/regions/region-object-lifetime-3.rs
+++ b/tests/ui/regions/region-object-lifetime-3.rs
@@ -10,7 +10,7 @@ trait Foo {
 
 // Borrowed receiver with two distinct lifetimes, but we know that
 // 'b:'a, hence &'a () is permitted.
-fn borrowed_receiver_related_lifetimes<'a,'b>(x: &'a (Foo+'b)) -> &'a () {
+fn borrowed_receiver_related_lifetimes<'a,'b>(x: &'a (dyn Foo+'b)) -> &'a () {
     x.borrowed()
 }
 
diff --git a/tests/ui/repeat-expr/copy-check-const-element-uninferred-count.rs b/tests/ui/repeat-expr/copy-check-const-element-uninferred-count.rs
new file mode 100644
index 00000000000..6115146539c
--- /dev/null
+++ b/tests/ui/repeat-expr/copy-check-const-element-uninferred-count.rs
@@ -0,0 +1,72 @@
+#![feature(generic_arg_infer)]
+
+// Test when deferring repeat expr copy checks to end of typechecking whether elements
+// that are const items allow for repeat counts to go uninferred without an error being
+// emitted if they would later wind up inferred by integer fallback.
+//
+// This test should be updated if we wind up deferring repeat expr checks until *after*
+// integer fallback as the point of the test is not *specifically* about integer fallback
+// but rather about the behaviour of `const` element exprs.
+
+trait Trait<const N: usize> {}
+
+// We impl `Trait` for both `i32` and `u32` to avoid being able
+// to prove `?int: Trait<?n>` from there only being one impl.
+impl Trait<2> for i32 {}
+impl Trait<2> for u32 {}
+
+fn tie_and_make_goal<const N: usize, T: Trait<N>>(_: &T, _: &[String; N]) {}
+
+fn const_block() {
+    // Deferred repeat expr `String; ?n`
+    let a = [const { String::new() }; _];
+
+    // `?int: Trait<?n>` goal
+    tie_and_make_goal(&1, &a);
+
+    // If repeat expr checks structurally resolve the `?n`s before checking if the
+    // element is a `const` then we would error here. Otherwise we avoid doing so,
+    // integer fallback occurs, allowing `?int: Trait<?n>` goals to make progress,
+    // inferring the repeat counts (to `2` but that doesn't matter as the element is `const`).
+}
+
+fn const_item() {
+    const MY_CONST: String = String::new();
+
+    // Deferred repeat expr `String; ?n`
+    let a = [MY_CONST; _];
+
+    // `?int: Trait<?n>` goal
+    tie_and_make_goal(&1, &a);
+
+    // ... same as `const_block`
+}
+
+fn assoc_const() {
+    trait Dummy {
+        const ASSOC: String;
+    }
+    impl Dummy for () {
+        const ASSOC: String = String::new();
+    }
+
+    // Deferred repeat expr `String; ?n`
+    let a = [<() as Dummy>::ASSOC; _];
+
+    // `?int: Trait<?n>` goal
+    tie_and_make_goal(&1, &a);
+
+    // ... same as `const_block`
+}
+
+fn const_block_but_uninferred() {
+    // Deferred repeat expr `String; ?n`
+    let a = [const { String::new() }; _];
+    //~^ ERROR: type annotations needed for `[String; _]`
+
+    // Even if we don't structurally resolve the repeat count as part of repeat expr
+    // checks, we still error on the repeat count being uninferred as we require all
+    // types/consts to be inferred by the end of type checking.
+}
+
+fn main() {}
diff --git a/tests/ui/repeat-expr/copy-check-const-element-uninferred-count.stderr b/tests/ui/repeat-expr/copy-check-const-element-uninferred-count.stderr
new file mode 100644
index 00000000000..2f52537fa94
--- /dev/null
+++ b/tests/ui/repeat-expr/copy-check-const-element-uninferred-count.stderr
@@ -0,0 +1,15 @@
+error[E0284]: type annotations needed for `[String; _]`
+  --> $DIR/copy-check-const-element-uninferred-count.rs:64:9
+   |
+LL |     let a = [const { String::new() }; _];
+   |         ^   ---------------------------- type must be known at this point
+   |
+   = note: the length of array `[String; _]` must be type `usize`
+help: consider giving `a` an explicit type, where the placeholders `_` are specified
+   |
+LL |     let a: [_; _] = [const { String::new() }; _];
+   |          ++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/repeat-expr/copy-check-deferred-after-fallback.rs b/tests/ui/repeat-expr/copy-check-deferred-after-fallback.rs
index d9ad93541ec..3f310f07de0 100644
--- a/tests/ui/repeat-expr/copy-check-deferred-after-fallback.rs
+++ b/tests/ui/repeat-expr/copy-check-deferred-after-fallback.rs
@@ -1,37 +1,53 @@
 #![feature(generic_arg_infer)]
 
-// Test that would start passing if we defer repeat expr copy checks to end of
-// typechecking and they're checked after integer fallback occurs. We accomplish
-// this by contriving a situation where integer fallback allows progress to be
-// made on a trait goal that infers the length of a repeat expr.
+// Test when deferring repeat expr copy checks to end of typechecking whether they're
+// checked before integer fallback occurs or not. We accomplish this by having a repeat
+// count that can only be inferred after integer fallback has occured. This test will
+// pass if we were to check repeat exprs after integer fallback.
 
 use std::marker::PhantomData;
-
-struct NotCopy;
+struct Foo<T>(PhantomData<T>);
+
+// We impl Copy/Clone for multiple (but not all) substitutions
+// to ensure that `Foo<?int>: Copy` can't be proven on the basis
+// of there only being one applying impl.
+impl Clone for Foo<u32> {
+    fn clone(&self) -> Self {
+        Foo(PhantomData)
+    }
+}
+impl Clone for Foo<i32> {
+    fn clone(&self) -> Self {
+        Foo(PhantomData)
+    }
+}
+impl Copy for Foo<u32> {}
+impl Copy for Foo<i32> {}
 
 trait Trait<const N: usize> {}
 
-impl Trait<2> for u32 {}
+// We impl `Trait` for both `i32` and `u32` to avoid being able
+// to prove `?int: Trait<?n>` from there only being one impl.
 impl Trait<1> for i32 {}
+impl Trait<2> for u32 {}
 
-fn make_goal<T: Trait<N>, const N: usize>(_: &T, _: [NotCopy; N]) {}
+fn tie_and_make_goal<const N: usize, T: Trait<N>>(_: &T, _: &[Foo<T>; N]) {}
 
 fn main() {
     let a = 1;
-    let b = [NotCopy; _];
-    //~^ ERROR: type annotations needed
-
-    // a is of type `?y`
-    // b is of type `[NotCopy; ?x]`
-    // there is a goal ?y: Trait<?x>` with two candidates:
-    // - `i32: Trait<1>`, ?y=i32 ?x=1 which doesnt require `NotCopy: Copy`
-    // - `u32: Trait<2>` ?y=u32 ?x=2 which requires `NotCopy: Copy`
-    make_goal(&a, b);
-
-    // final repeat expr checks:
-    //
-    // `NotCopy; ?x`
-    // - succeeds if fallback happens before repeat exprs as `i32: Trait<?x>` infers `?x=1`
-    // - fails if repeat expr checks happen first as `?x` is unconstrained so cannot be
-    //    structurally resolved
+    // Deferred repeat expr `Foo<?int>; ?n`
+    let b = [Foo(PhantomData); _];
+    //~^ ERROR: type annotations needed for `[Foo<{integer}>; _]`
+
+    // Introduces a `?int: Trait<?n>` goal
+    tie_and_make_goal(&a, &b);
+
+    // If fallback doesn't occur:
+    // - `Foo<?int>; ?n`is ambig as repeat count is unknown -> error
+
+    // If fallback occurs:
+    // - `?int` inferred to `i32`
+    // - `?int: Trait<?n>` becomes `i32: Trait<?n>` wihhc infers `?n=1`
+    // - Repeat expr check `Foo<?int>; ?n` is now `Foo<i32>; 1`
+    // - `Foo<i32>; 1` doesn't require `Foo<i32>: Copy`
 }
diff --git a/tests/ui/repeat-expr/copy-check-deferred-after-fallback.stderr b/tests/ui/repeat-expr/copy-check-deferred-after-fallback.stderr
index 2a0cb3fb7a3..103b074dda7 100644
--- a/tests/ui/repeat-expr/copy-check-deferred-after-fallback.stderr
+++ b/tests/ui/repeat-expr/copy-check-deferred-after-fallback.stderr
@@ -1,13 +1,13 @@
-error[E0282]: type annotations needed for `[NotCopy; _]`
-  --> $DIR/copy-check-deferred-after-fallback.rs:21:9
+error[E0282]: type annotations needed for `[Foo<{integer}>; _]`
+  --> $DIR/copy-check-deferred-after-fallback.rs:39:9
    |
-LL |     let b = [NotCopy; _];
-   |         ^    ------- type must be known at this point
+LL |     let b = [Foo(PhantomData); _];
+   |         ^    ---------------- type must be known at this point
    |
 help: consider giving `b` an explicit type, where the value of const parameter `N` is specified
    |
-LL |     let b: [_; N] = [NotCopy; _];
-   |          ++++++++
+LL |     let b: [Foo<{integer}>; N] = [Foo(PhantomData); _];
+   |          +++++++++++++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/repeat-expr/copy-check-deferred-before-fallback.rs b/tests/ui/repeat-expr/copy-check-deferred-before-fallback.rs
index 4654d7483a6..4fbb8f0a00c 100644
--- a/tests/ui/repeat-expr/copy-check-deferred-before-fallback.rs
+++ b/tests/ui/repeat-expr/copy-check-deferred-before-fallback.rs
@@ -1,18 +1,13 @@
 //@ check-pass
-
 #![feature(generic_arg_infer)]
 
-// Test that if we defer repeat expr copy checks to end of typechecking they're
-// checked before integer fallback occurs. We accomplish this by contriving a
-// situation where we have a goal that can be proven either via another repeat expr
-// check or by integer fallback. In the integer fallback case an array length would
-// be inferred to `2` requiring `NotCopy: Copy`, and in the repeat expr case it would
-// be inferred to `1`.
+// Test when deferring repeat expr checks to end of typechecking whether they're
+// checked before integer fallback occurs. We accomplish this by having the repeat
+// expr check allow inference progress on an ambiguous goal, where the ambiguous goal
+// would fail if the inference variable was fallen back to `i32`. This test will
+// pass if we check repeat exprs before integer fallback.
 
 use std::marker::PhantomData;
-
-struct NotCopy;
-
 struct Foo<T>(PhantomData<T>);
 
 impl Clone for Foo<u32> {
@@ -20,40 +15,34 @@ impl Clone for Foo<u32> {
         Foo(PhantomData)
     }
 }
-
 impl Copy for Foo<u32> {}
 
-fn tie<T>(_: &T, _: [Foo<T>; 2]) {}
+trait Trait {}
 
-trait Trait<const N: usize> {}
+// Two impls just to ensure that `?int: Trait` wont itself succeed by unifying with
+// a self type on an impl here. It also ensures that integer fallback would actually
+// be valid for all of the stalled goals incase that's ever something we take into account.
+impl Trait for i32 {}
+impl Trait for u32 {}
 
-impl Trait<2> for i32 {}
-impl Trait<1> for u32 {}
-
-fn make_goal<T: Trait<N>, const N: usize>(_: &T, _: [NotCopy; N]) {}
+fn make_goal<T: Trait>(_: &T) {}
+fn tie<T>(_: &T, _: &[Foo<T>; 2]) {}
 
 fn main() {
     let a = 1;
+    // `?int: Trait`
+    make_goal(&a);
+
+    // Deferred `Foo<?int>: Copy` requirement
     let b: [Foo<_>; 2] = [Foo(PhantomData); _];
-    tie(&a, b);
-    let c = [NotCopy; _];
-
-    // a is of type `?y`
-    // b is of type `[Foo<?y>; 2]`
-    // c is of type `[NotCopy; ?x]`
-    // there is a goal ?y: Trait<?x>` with two candidates:
-    // - `i32: Trait<2>`, ?y=i32 ?x=2 which requires `NotCopy: Copy` when expr checks happen
-    // - `u32: Trait<1>` ?y=u32 ?x=1 which doesnt require `NotCopy: Copy`
-    make_goal(&a, c);
-
-    // final repeat expr checks:
-    //
-    // `Foo<?y>; 2`
-    // - Foo<?y>: Copy
-    // - requires ?y=u32
-    //
-    // `NotCopy; ?x`
-    // - fails if fallback happens before repeat exprs as `i32: Trait<?x>` infers `?x=2`
-    // - succeeds if repeat expr checks happen first as `?y=u32` means `u32: Trait<?x>`
-    //    infers `?x=1`
+    tie(&a, &b);
+
+    // If fallback doesn't occur:
+    // - `Foo<?int>; 2`is > 1, needs copy
+    // - `Foo<?int>: Copy` infers `?int=u32`
+    // - stalled goal `?int: Trait` can now make progress and succeed
+
+    // If fallback occurs:
+    // - `Foo<i32>; 2` is > 1, needs copy
+    // - `Foo<i32>: Copy` doesn't hold -> error
 }
diff --git a/tests/ui/repeat-expr/copy-check-inference-side-effects.rs b/tests/ui/repeat-expr/copy-check-inference-side-effects.rs
new file mode 100644
index 00000000000..4e3bfdead26
--- /dev/null
+++ b/tests/ui/repeat-expr/copy-check-inference-side-effects.rs
@@ -0,0 +1,34 @@
+#![feature(generic_arg_infer)]
+
+struct Foo<const N: usize>;
+
+impl Clone for Foo<1> {
+    fn clone(&self) -> Self {
+        Self
+    }
+}
+impl Copy for Foo<1> {}
+
+fn unify<const N: usize>(_: &[Foo<N>; 2], _: &[String; N]) {}
+
+fn works_if_inference_side_effects() {
+    // This will only pass if inference side effects from proving `Foo<?x>: Copy` are
+    // able to be relied upon by other repeat expressions.
+    let a /* : [Foo<?x>; 2] */ = [Foo::<_>; 2];
+    //~^ ERROR: type annotations needed for `[Foo<_>; 2]`
+    let b /* : [String; ?x] */ = ["string".to_string(); _];
+
+    unify(&a, &b);
+}
+
+fn works_if_fixed_point() {
+    // This will only pass if the *second* array repeat expr is checked first
+    // allowing `Foo<?x>: Copy` to infer the array length of the first repeat expr.
+    let b /* : [String; ?x] */ = ["string".to_string(); _];
+    //~^ ERROR: type annotations needed for `[String; _]`
+    let a /* : [Foo<?x>; 2] */ = [Foo::<_>; 2];
+
+    unify(&a, &b);
+}
+
+fn main() {}
diff --git a/tests/ui/repeat-expr/copy-check-inference-side-effects.stderr b/tests/ui/repeat-expr/copy-check-inference-side-effects.stderr
new file mode 100644
index 00000000000..505beff0f6b
--- /dev/null
+++ b/tests/ui/repeat-expr/copy-check-inference-side-effects.stderr
@@ -0,0 +1,28 @@
+error[E0282]: type annotations needed for `[Foo<_>; 2]`
+  --> $DIR/copy-check-inference-side-effects.rs:17:9
+   |
+LL |     let a /* : [Foo<?x>; 2] */ = [Foo::<_>; 2];
+   |         ^
+LL |
+LL |     let b /* : [String; ?x] */ = ["string".to_string(); _];
+   |                                   -------------------- type must be known at this point
+   |
+help: consider giving `a` an explicit type, where the value of const parameter `N` is specified
+   |
+LL |     let a: [Foo<N>; 2] /* : [Foo<?x>; 2] */ = [Foo::<_>; 2];
+   |          +++++++++++++
+
+error[E0282]: type annotations needed for `[String; _]`
+  --> $DIR/copy-check-inference-side-effects.rs:27:9
+   |
+LL |     let b /* : [String; ?x] */ = ["string".to_string(); _];
+   |         ^                         -------------------- type must be known at this point
+   |
+help: consider giving `b` an explicit type, where the value of const parameter `N` is specified
+   |
+LL |     let b: [_; N] /* : [String; ?x] */ = ["string".to_string(); _];
+   |          ++++++++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/repeat-expr/copy-check-when-count-inferred-later.rs b/tests/ui/repeat-expr/copy-check-when-count-inferred-later.rs
new file mode 100644
index 00000000000..b9d123cbefa
--- /dev/null
+++ b/tests/ui/repeat-expr/copy-check-when-count-inferred-later.rs
@@ -0,0 +1,11 @@
+#![feature(generic_arg_infer)]
+
+// Test that we enforce repeat expr element types are `Copy` even
+// when the repeat count is only inferred at a later point in type
+// checking.
+
+fn main() {
+    let a = [String::new(); _];
+    //~^ ERROR: the trait bound `String: Copy` is not satisfied
+    let b: [_; 2] = a;
+}
diff --git a/tests/ui/repeat-expr/copy-check-when-count-inferred-later.stderr b/tests/ui/repeat-expr/copy-check-when-count-inferred-later.stderr
new file mode 100644
index 00000000000..d974f5add50
--- /dev/null
+++ b/tests/ui/repeat-expr/copy-check-when-count-inferred-later.stderr
@@ -0,0 +1,14 @@
+error[E0277]: the trait bound `String: Copy` is not satisfied
+  --> $DIR/copy-check-when-count-inferred-later.rs:8:14
+   |
+LL |     let a = [String::new(); _];
+   |              ^^^^^^^^^^^^^
+   |              |
+   |              the trait `Copy` is not implemented for `String`
+   |              help: create an inline `const` block: `const { String::new() }`
+   |
+   = note: the `Copy` trait is required because this value will be copied for each element of the array
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.rs b/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.rs
index 0b0672d9c2b..d50466ac4bb 100644
--- a/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.rs
+++ b/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.rs
@@ -1,8 +1,3 @@
-//@revisions: current gai
-//@[current] check-pass
-
-#![cfg_attr(gai, feature(generic_arg_infer))]
-
 use std::marker::PhantomData;
 
 struct Foo<T>(PhantomData<T>);
@@ -20,6 +15,6 @@ fn extract<T, const N: usize>(_: [Foo<T>; N]) -> T {
 
 fn main() {
     let x = [Foo(PhantomData); 2];
-    //[gai]~^ ERROR: type annotations needed
-    _ = extract(x).max(2);
+    //~^ ERROR: type annotations needed
+    extract(x).max(2);
 }
diff --git a/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr b/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr
new file mode 100644
index 00000000000..ba44beb76db
--- /dev/null
+++ b/tests/ui/repeat-expr/copy-inference-side-effects-are-lazy.stderr
@@ -0,0 +1,17 @@
+error[E0282]: type annotations needed for `[Foo<_>; 2]`
+  --> $DIR/copy-inference-side-effects-are-lazy.rs:17:9
+   |
+LL |     let x = [Foo(PhantomData); 2];
+   |         ^
+LL |
+LL |     extract(x).max(2);
+   |     ---------- type must be known at this point
+   |
+help: consider giving `x` an explicit type, where the type for type parameter `T` is specified
+   |
+LL |     let x: [Foo<T>; 2] = [Foo(PhantomData); 2];
+   |          +++++++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/resolve/extern-crate-lint-issue-141785.rs b/tests/ui/resolve/extern-crate-lint-issue-141785.rs
new file mode 100644
index 00000000000..8d044d666df
--- /dev/null
+++ b/tests/ui/resolve/extern-crate-lint-issue-141785.rs
@@ -0,0 +1,11 @@
+//@ check-pass
+//@ edition:2018
+
+#![no_implicit_prelude]
+#![warn(unused_extern_crates)]
+
+extern crate std;
+fn main() {
+    let r = 1u16..10;
+    std::println!("{:?}", r.is_empty());
+}
diff --git a/tests/ui/resolve/suggestions/sugg-field-in-format-string-issue-141136.rs b/tests/ui/resolve/suggestions/sugg-field-in-format-string-issue-141136.rs
new file mode 100644
index 00000000000..d2aa61186bc
--- /dev/null
+++ b/tests/ui/resolve/suggestions/sugg-field-in-format-string-issue-141136.rs
@@ -0,0 +1,15 @@
+struct Foo {
+    x: i32
+}
+
+impl Foo {
+    fn foo(&self) {
+        let _ = format!("{x}"); //~ ERROR cannot find value `x` in this scope [E0425]
+        let _ = format!("{x }"); //~ ERROR cannot find value `x` in this scope [E0425]
+        let _ = format!("{ x}"); //~ ERROR invalid format string: expected `}`, found `x`
+        let _ = format!("{}", x); //~ ERROR cannot find value `x` in this scope [E0425]
+        println!("{x}"); //~ ERROR cannot find value `x` in this scope [E0425]
+    }
+}
+
+fn main(){}
diff --git a/tests/ui/resolve/suggestions/sugg-field-in-format-string-issue-141136.stderr b/tests/ui/resolve/suggestions/sugg-field-in-format-string-issue-141136.stderr
new file mode 100644
index 00000000000..0a84848081d
--- /dev/null
+++ b/tests/ui/resolve/suggestions/sugg-field-in-format-string-issue-141136.stderr
@@ -0,0 +1,48 @@
+error: invalid format string: expected `}`, found `x`
+  --> $DIR/sugg-field-in-format-string-issue-141136.rs:9:28
+   |
+LL |         let _ = format!("{ x}");
+   |                          - ^ expected `}` in format string
+   |                          |
+   |                          because of this opening brace
+   |
+   = note: if you intended to print `{`, you can escape it using `{{`
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/sugg-field-in-format-string-issue-141136.rs:7:27
+   |
+LL |         let _ = format!("{x}");
+   |                           ^
+   |
+   = help: you might have meant to use the available field in a format string: `"{}", self.x`
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/sugg-field-in-format-string-issue-141136.rs:8:27
+   |
+LL |         let _ = format!("{x }");
+   |                           ^^
+   |
+   = help: you might have meant to use the available field in a format string: `"{}", self.x`
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/sugg-field-in-format-string-issue-141136.rs:10:31
+   |
+LL |         let _ = format!("{}", x);
+   |                               ^
+   |
+help: you might have meant to use the available field
+   |
+LL |         let _ = format!("{}", self.x);
+   |                               +++++
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/sugg-field-in-format-string-issue-141136.rs:11:20
+   |
+LL |         println!("{x}");
+   |                    ^
+   |
+   = help: you might have meant to use the available field in a format string: `"{}", self.x`
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/resolve/tuple-struct-alias.stderr b/tests/ui/resolve/tuple-struct-alias.stderr
index a739ea43eed..bf026a499b8 100644
--- a/tests/ui/resolve/tuple-struct-alias.stderr
+++ b/tests/ui/resolve/tuple-struct-alias.stderr
@@ -6,8 +6,6 @@ LL | struct S(u8, u16);
 ...
 LL |         A(..) => {}
    |         ^ help: a tuple struct with a similar name exists: `S`
-   |
-   = note: can't use a type alias as a constructor
 
 error[E0423]: expected function, tuple struct or tuple variant, found type alias `A`
   --> $DIR/tuple-struct-alias.rs:5:13
@@ -16,9 +14,18 @@ LL | struct S(u8, u16);
    | ------------------ similarly named tuple struct `S` defined here
 ...
 LL |     let s = A(0, 1);
-   |             ^ help: a tuple struct with a similar name exists: `S`
+   |             ^
+   |
+help: a tuple struct with a similar name exists
+   |
+LL -     let s = A(0, 1);
+LL +     let s = S(0, 1);
+   |
+help: you might have meant to use `:` for type annotation
+   |
+LL -     let s = A(0, 1);
+LL +     let s: A(0, 1);
    |
-   = note: can't use a type alias as a constructor
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr
index 5832cb69a3d..1ecbfee17bc 100644
--- a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr
+++ b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr
@@ -20,17 +20,9 @@ error[E0425]: cannot find value `config` in this scope
   --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:15:20
    |
 LL |         println!("{config}");
-   |                    ^^^^^^
-   |
-help: you might have meant to use the available field
-   |
-LL |         println!("{self.config}");
-   |                    +++++
-help: a local variable with a similar name exists
-   |
-LL -         println!("{config}");
-LL +         println!("{cofig}");
+   |                    ^^^^^^ help: a local variable with a similar name exists: `cofig`
    |
+   = help: you might have meant to use the available field in a format string: `"{}", self.config`
 
 error[E0425]: cannot find value `bah` in this scope
   --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:33:9
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/temporary-early-drop.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/temporary-early-drop.rs
new file mode 100644
index 00000000000..9edbc3243c7
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/temporary-early-drop.rs
@@ -0,0 +1,29 @@
+// issue-103476
+//@ revisions: edition2021 edition2024
+//@ [edition2021] edition: 2021
+//@ [edition2024] edition: 2024
+//@ check-pass
+
+#![feature(if_let_guard)]
+#![allow(irrefutable_let_patterns)]
+
+struct Pd;
+
+impl Pd {
+    fn it(&self) -> It {
+        todo!()
+    }
+}
+
+pub struct It<'a>(Box<dyn Tr<'a>>);
+
+trait Tr<'a> {}
+
+fn f(m: Option<Pd>) {
+    match () {
+        () if let Some(n) = m && let it = n.it() => {}
+        _ => {}
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr b/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr
index a68d99c14ce..248d42ba3f4 100644
--- a/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr
+++ b/tests/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr
@@ -2,7 +2,7 @@ error: unused extern crate
   --> $DIR/extern-crate-idiomatic-in-2018.rs:12:1
    |
 LL | extern crate edition_lint_paths;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
    |
 note: the lint level is defined here
   --> $DIR/extern-crate-idiomatic-in-2018.rs:9:9
@@ -10,6 +10,10 @@ note: the lint level is defined here
 LL | #![deny(rust_2018_idioms)]
    |         ^^^^^^^^^^^^^^^^
    = note: `#[deny(unused_extern_crates)]` implied by `#[deny(rust_2018_idioms)]`
+help: remove the unused `extern crate`
+   |
+LL - extern crate edition_lint_paths;
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs
index 573942bd095..467914d6a5e 100644
--- a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs
+++ b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs
@@ -8,7 +8,7 @@
 
 // The suggestion span should include the attribute.
 
-#[cfg(not(FALSE))] //~ HELP remove it
+#[cfg(not(FALSE))] //~ HELP remove
 extern crate edition_lint_paths;
 //~^ ERROR unused extern crate
 
diff --git a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr
index 038a9dd967b..9efc3493d34 100644
--- a/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr
+++ b/tests/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr
@@ -1,11 +1,8 @@
 error: unused extern crate
   --> $DIR/issue-54400-unused-extern-crate-attr-span.rs:12:1
    |
-LL | / #[cfg(not(FALSE))]
-LL | | extern crate edition_lint_paths;
-   | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   | |________________________________|
-   |                                  help: remove it
+LL | extern crate edition_lint_paths;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
    |
 note: the lint level is defined here
   --> $DIR/issue-54400-unused-extern-crate-attr-span.rs:6:9
@@ -13,6 +10,11 @@ note: the lint level is defined here
 LL | #![deny(rust_2018_idioms)]
    |         ^^^^^^^^^^^^^^^^
    = note: `#[deny(unused_extern_crates)]` implied by `#[deny(rust_2018_idioms)]`
+help: remove the unused `extern crate`
+   |
+LL - #[cfg(not(FALSE))]
+LL - extern crate edition_lint_paths;
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/rust-2018/remove-extern-crate.stderr b/tests/ui/rust-2018/remove-extern-crate.stderr
index cb090c621e9..a530d40188b 100644
--- a/tests/ui/rust-2018/remove-extern-crate.stderr
+++ b/tests/ui/rust-2018/remove-extern-crate.stderr
@@ -2,7 +2,7 @@ warning: unused extern crate
   --> $DIR/remove-extern-crate.rs:11:1
    |
 LL | extern crate core;
-   | ^^^^^^^^^^^^^^^^^^ help: remove it
+   | ^^^^^^^^^^^^^^^^^^ unused
    |
 note: the lint level is defined here
   --> $DIR/remove-extern-crate.rs:7:9
@@ -10,6 +10,11 @@ note: the lint level is defined here
 LL | #![warn(rust_2018_idioms)]
    |         ^^^^^^^^^^^^^^^^
    = note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]`
+help: remove the unused `extern crate`
+   |
+LL - extern crate core;
+LL +
+   |
 
 warning: `extern crate` is not idiomatic in the new edition
   --> $DIR/remove-extern-crate.rs:35:5
diff --git a/tests/ui/rust-2018/removing-extern-crate-malformed-cfg.fixed b/tests/ui/rust-2018/removing-extern-crate-malformed-cfg.fixed
new file mode 100644
index 00000000000..26c1c9015da
--- /dev/null
+++ b/tests/ui/rust-2018/removing-extern-crate-malformed-cfg.fixed
@@ -0,0 +1,15 @@
+//@ edition:2018
+//@ aux-build:../removing-extern-crate.rs
+//@ run-rustfix
+
+#![warn(rust_2018_idioms)]
+
+ //~ WARNING unused extern crate
+ //~ WARNING unused extern crate
+
+mod another {
+     //~ WARNING unused extern crate
+     //~ WARNING unused extern crate
+}
+
+fn main() {}
diff --git a/tests/ui/rust-2018/removing-extern-crate-malformed-cfg.rs b/tests/ui/rust-2018/removing-extern-crate-malformed-cfg.rs
new file mode 100644
index 00000000000..c5b629fa90b
--- /dev/null
+++ b/tests/ui/rust-2018/removing-extern-crate-malformed-cfg.rs
@@ -0,0 +1,17 @@
+//@ edition:2018
+//@ aux-build:../removing-extern-crate.rs
+//@ run-rustfix
+
+#![warn(rust_2018_idioms)]
+
+#[cfg_attr(test, "macro_use")] //~ ERROR expected
+extern crate removing_extern_crate as foo; //~ WARNING unused extern crate
+extern crate core; //~ WARNING unused extern crate
+
+mod another {
+    #[cfg_attr(test)] //~ ERROR expected
+    extern crate removing_extern_crate as foo; //~ WARNING unused extern crate
+    extern crate core; //~ WARNING unused extern crate
+}
+
+fn main() {}
diff --git a/tests/ui/rust-2018/removing-extern-crate-malformed-cfg.stderr b/tests/ui/rust-2018/removing-extern-crate-malformed-cfg.stderr
new file mode 100644
index 00000000000..0e834707bf9
--- /dev/null
+++ b/tests/ui/rust-2018/removing-extern-crate-malformed-cfg.stderr
@@ -0,0 +1,76 @@
+error: expected identifier, found `"macro_use"`
+  --> $DIR/removing-extern-crate-malformed-cfg.rs:7:18
+   |
+LL | #[cfg_attr(test, "macro_use")]
+   |                  ^^^^^^^^^^^ expected identifier
+   |
+   = help: the valid syntax is `#[cfg_attr(condition, attribute, other_attribute, ...)]`
+   = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
+
+error: expected one of `(`, `,`, `::`, or `=`, found `<eof>`
+  --> $DIR/removing-extern-crate-malformed-cfg.rs:12:16
+   |
+LL |     #[cfg_attr(test)]
+   |                ^^^^ expected one of `(`, `,`, `::`, or `=`
+   |
+   = help: the valid syntax is `#[cfg_attr(condition, attribute, other_attribute, ...)]`
+   = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
+
+warning: unused extern crate
+  --> $DIR/removing-extern-crate-malformed-cfg.rs:8:1
+   |
+LL | extern crate removing_extern_crate as foo;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
+   |
+note: the lint level is defined here
+  --> $DIR/removing-extern-crate-malformed-cfg.rs:5:9
+   |
+LL | #![warn(rust_2018_idioms)]
+   |         ^^^^^^^^^^^^^^^^
+   = note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]`
+help: remove the unused `extern crate`
+   |
+LL - #[cfg_attr(test, "macro_use")]
+LL - extern crate removing_extern_crate as foo;
+LL +
+   |
+
+warning: unused extern crate
+  --> $DIR/removing-extern-crate-malformed-cfg.rs:9:1
+   |
+LL | extern crate core;
+   | ^^^^^^^^^^^^^^^^^^ unused
+   |
+help: remove the unused `extern crate`
+   |
+LL - extern crate core;
+LL +
+   |
+
+warning: unused extern crate
+  --> $DIR/removing-extern-crate-malformed-cfg.rs:13:5
+   |
+LL |     extern crate removing_extern_crate as foo;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
+   |
+help: remove the unused `extern crate`
+   |
+LL -     #[cfg_attr(test)]
+LL -     extern crate removing_extern_crate as foo;
+LL +
+   |
+
+warning: unused extern crate
+  --> $DIR/removing-extern-crate-malformed-cfg.rs:14:5
+   |
+LL |     extern crate core;
+   |     ^^^^^^^^^^^^^^^^^^ unused
+   |
+help: remove the unused `extern crate`
+   |
+LL -     extern crate core;
+LL +
+   |
+
+error: aborting due to 2 previous errors; 4 warnings emitted
+
diff --git a/tests/ui/rust-2018/removing-extern-crate.stderr b/tests/ui/rust-2018/removing-extern-crate.stderr
index 57312542640..b6f8314ce4b 100644
--- a/tests/ui/rust-2018/removing-extern-crate.stderr
+++ b/tests/ui/rust-2018/removing-extern-crate.stderr
@@ -2,7 +2,7 @@ warning: unused extern crate
   --> $DIR/removing-extern-crate.rs:8:1
    |
 LL | extern crate dummy_crate as foo;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
    |
 note: the lint level is defined here
   --> $DIR/removing-extern-crate.rs:6:9
@@ -10,24 +10,47 @@ note: the lint level is defined here
 LL | #![warn(rust_2018_idioms)]
    |         ^^^^^^^^^^^^^^^^
    = note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]`
+help: remove the unused `extern crate`
+   |
+LL - extern crate dummy_crate as foo;
+LL +
+   |
 
 warning: unused extern crate
   --> $DIR/removing-extern-crate.rs:9:1
    |
 LL | extern crate core;
-   | ^^^^^^^^^^^^^^^^^^ help: remove it
+   | ^^^^^^^^^^^^^^^^^^ unused
+   |
+help: remove the unused `extern crate`
+   |
+LL - extern crate core;
+LL +
+   |
 
 warning: unused extern crate
   --> $DIR/removing-extern-crate.rs:12:5
    |
 LL |     extern crate dummy_crate as foo;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
+   |
+help: remove the unused `extern crate`
+   |
+LL -     extern crate dummy_crate as foo;
+LL +
+   |
 
 warning: unused extern crate
   --> $DIR/removing-extern-crate.rs:13:5
    |
 LL |     extern crate core;
-   |     ^^^^^^^^^^^^^^^^^^ help: remove it
+   |     ^^^^^^^^^^^^^^^^^^ unused
+   |
+help: remove the unused `extern crate`
+   |
+LL -     extern crate core;
+LL +
+   |
 
 warning: 4 warnings emitted
 
diff --git a/tests/ui/self/arbitrary-self-types-dyn-incompatible.rs b/tests/ui/self/arbitrary-self-types-dyn-incompatible.rs
index 0477d9d79c7..b223f18327b 100644
--- a/tests/ui/self/arbitrary-self-types-dyn-incompatible.rs
+++ b/tests/ui/self/arbitrary-self-types-dyn-incompatible.rs
@@ -28,7 +28,6 @@ impl Bar for usize {
 fn make_foo() {
     let x = Rc::new(5usize) as Rc<dyn Foo>;
     //~^ ERROR E0038
-    //~| ERROR E0038
 }
 
 fn make_bar() {
diff --git a/tests/ui/self/arbitrary-self-types-dyn-incompatible.stderr b/tests/ui/self/arbitrary-self-types-dyn-incompatible.stderr
index 9fb4c80329d..fe4802c9b3a 100644
--- a/tests/ui/self/arbitrary-self-types-dyn-incompatible.stderr
+++ b/tests/ui/self/arbitrary-self-types-dyn-incompatible.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:29:32
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:29:39
    |
 LL |     fn foo(self: &Rc<Self>) -> usize;
    |                  --------- help: consider changing method `foo`'s `self` parameter to be `&self`: `&Self`
 ...
 LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
-   |                                ^^^^^^^^^^^ `Foo` is not dyn compatible
+   |                                       ^^^ `Foo` 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>
@@ -17,26 +17,6 @@ LL |     fn foo(self: &Rc<Self>) -> usize;
    |                  ^^^^^^^^^ ...because method `foo`'s `self` parameter cannot be dispatched on
    = help: only type `usize` implements `Foo`; consider using it directly instead.
 
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:29:13
-   |
-LL |     fn foo(self: &Rc<Self>) -> usize;
-   |                  --------- help: consider changing method `foo`'s `self` parameter to be `&self`: `&Self`
-...
-LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
-   |             ^^^^^^^^^^^^^^^ `Foo` 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/arbitrary-self-types-dyn-incompatible.rs:4:18
-   |
-LL | trait Foo {
-   |       --- this trait is not dyn compatible...
-LL |     fn foo(self: &Rc<Self>) -> usize;
-   |                  ^^^^^^^^^ ...because method `foo`'s `self` parameter cannot be dispatched on
-   = help: only type `usize` implements `Foo`; consider using it directly instead.
-   = note: required for the cast from `Rc<usize>` to `Rc<dyn Foo>`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/self/dispatch-dyn-incompatible-that-does-not-deref.rs b/tests/ui/self/dispatch-dyn-incompatible-that-does-not-deref.rs
new file mode 100644
index 00000000000..af35d1e0359
--- /dev/null
+++ b/tests/ui/self/dispatch-dyn-incompatible-that-does-not-deref.rs
@@ -0,0 +1,18 @@
+// Regression test for <https://github.com/rust-lang/rust/issues/141419>.
+
+use std::ops::Deref;
+
+struct W;
+
+trait Foo: Deref<Target = W> {
+    fn method(self: &W) {}
+    //~^ ERROR invalid `self` parameter type: `&W`
+}
+
+fn test(x: &dyn Foo) {
+    //~^ ERROR the trait `Foo` is not dyn compatible
+    x.method();
+    //~^ ERROR the trait `Foo` is not dyn compatible
+}
+
+fn main() {}
diff --git a/tests/ui/self/dispatch-dyn-incompatible-that-does-not-deref.stderr b/tests/ui/self/dispatch-dyn-incompatible-that-does-not-deref.stderr
new file mode 100644
index 00000000000..237bbc56715
--- /dev/null
+++ b/tests/ui/self/dispatch-dyn-incompatible-that-does-not-deref.stderr
@@ -0,0 +1,49 @@
+error[E0038]: the trait `Foo` is not dyn compatible
+  --> $DIR/dispatch-dyn-incompatible-that-does-not-deref.rs:12:13
+   |
+LL |     fn method(self: &W) {}
+   |                     -- help: consider changing method `method`'s `self` parameter to be `&self`: `&Self`
+...
+LL | fn test(x: &dyn Foo) {
+   |             ^^^^^^^ `Foo` 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/dispatch-dyn-incompatible-that-does-not-deref.rs:8:21
+   |
+LL | trait Foo: Deref<Target = W> {
+   |       --- this trait is not dyn compatible...
+LL |     fn method(self: &W) {}
+   |                     ^^ ...because method `method`'s `self` parameter cannot be dispatched on
+
+error[E0307]: invalid `self` parameter type: `&W`
+  --> $DIR/dispatch-dyn-incompatible-that-does-not-deref.rs:8:21
+   |
+LL |     fn method(self: &W) {}
+   |                     ^^
+   |
+   = note: type of `self` must be `Self` or a type that dereferences to it
+   = help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
+
+error[E0038]: the trait `Foo` is not dyn compatible
+  --> $DIR/dispatch-dyn-incompatible-that-does-not-deref.rs:14:5
+   |
+LL |     fn method(self: &W) {}
+   |                     -- help: consider changing method `method`'s `self` parameter to be `&self`: `&Self`
+...
+LL |     x.method();
+   |     ^^^^^^^^^^ `Foo` 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/dispatch-dyn-incompatible-that-does-not-deref.rs:8:21
+   |
+LL | trait Foo: Deref<Target = W> {
+   |       --- this trait is not dyn compatible...
+LL |     fn method(self: &W) {}
+   |                     ^^ ...because method `method`'s `self` parameter cannot be dispatched on
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0038, E0307.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/self/self-impl.stderr b/tests/ui/self/self-impl.stderr
index 18ffd15427f..1bda307d0eb 100644
--- a/tests/ui/self/self-impl.stderr
+++ b/tests/ui/self/self-impl.stderr
@@ -2,13 +2,25 @@ error[E0223]: ambiguous associated type
   --> $DIR/self-impl.rs:23:16
    |
 LL |         let _: <Self>::Baz = true;
-   |                ^^^^^^^^^^^ help: use fully-qualified syntax: `<Bar as Foo>::Baz`
+   |                ^^^^^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -         let _: <Self>::Baz = true;
+LL +         let _: <Bar as Foo>::Baz = true;
+   |
 
 error[E0223]: ambiguous associated type
   --> $DIR/self-impl.rs:25:16
    |
 LL |         let _: Self::Baz = true;
-   |                ^^^^^^^^^ help: use fully-qualified syntax: `<Bar as Foo>::Baz`
+   |                ^^^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -         let _: Self::Baz = true;
+LL +         let _: <Bar as Foo>::Baz = true;
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/simd/const-err-trumps-simd-err.rs b/tests/ui/simd/const-err-trumps-simd-err.rs
index 05a224d037a..8d9870855f8 100644
--- a/tests/ui/simd/const-err-trumps-simd-err.rs
+++ b/tests/ui/simd/const-err-trumps-simd-err.rs
@@ -16,8 +16,7 @@ struct int8x4_t([u8; 4]);
 
 fn get_elem<const LANE: u32>(a: int8x4_t) -> u8 {
     const { assert!(LANE < 4); } // the error should be here...
-    //~^ ERROR failed
-    //~| NOTE assertion failed
+    //~^ ERROR assertion failed
     unsafe { simd_extract(a, LANE) } // ...not here
 }
 
diff --git a/tests/ui/simd/const-err-trumps-simd-err.stderr b/tests/ui/simd/const-err-trumps-simd-err.stderr
index 389f75492c6..d4ba54a28da 100644
--- a/tests/ui/simd/const-err-trumps-simd-err.stderr
+++ b/tests/ui/simd/const-err-trumps-simd-err.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `get_elem::<4>::{constant#0}` failed
+error[E0080]: evaluation panicked: assertion failed: LANE < 4
   --> $DIR/const-err-trumps-simd-err.rs:18:13
    |
 LL |     const { assert!(LANE < 4); } // the error should be here...
-   |             ^^^^^^^^^^^^^^^^^ evaluation panicked: assertion failed: LANE < 4
+   |             ^^^^^^^^^^^^^^^^^ evaluation of `get_elem::<4>::{constant#0}` failed here
 
 note: erroneous constant encountered
   --> $DIR/const-err-trumps-simd-err.rs:18:5
@@ -11,7 +11,7 @@ LL |     const { assert!(LANE < 4); } // the error should be here...
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 note: the above error was encountered while instantiating `fn get_elem::<4>`
-  --> $DIR/const-err-trumps-simd-err.rs:25:5
+  --> $DIR/const-err-trumps-simd-err.rs:24:5
    |
 LL |     get_elem::<4>(int8x4_t([0, 0, 0, 0]));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/simd/target-feature-mixup.rs b/tests/ui/simd/target-feature-mixup.rs
index 2786251c795..77f18615248 100644
--- a/tests/ui/simd/target-feature-mixup.rs
+++ b/tests/ui/simd/target-feature-mixup.rs
@@ -7,7 +7,6 @@
 //@ ignore-fuchsia must translate zircon signal to SIGILL, FIXME (#58590)
 
 #![feature(repr_simd, target_feature, cfg_target_feature)]
-#![feature(avx512_target_feature)]
 
 use std::process::{Command, ExitStatus};
 use std::env;
diff --git a/tests/ui/sized/stack-overflow-trait-infer-98842.32bit.stderr b/tests/ui/sized/stack-overflow-trait-infer-98842.32bit.stderr
index c01b2ccd163..354ca78c7be 100644
--- a/tests/ui/sized/stack-overflow-trait-infer-98842.32bit.stderr
+++ b/tests/ui/sized/stack-overflow-trait-infer-98842.32bit.stderr
@@ -9,11 +9,11 @@ LL | const _: *const Foo = 0 as _;
    | ^^^^^^^^^^^^^^^^^^^
    = 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[E0080]: evaluation of constant value failed
+error[E0080]: a cycle occurred during layout computation
   --> $DIR/stack-overflow-trait-infer-98842.rs:14:1
    |
 LL | const _: *const Foo = 0 as _;
-   | ^^^^^^^^^^^^^^^^^^^ a cycle occurred during layout computation
+   | ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/sized/stack-overflow-trait-infer-98842.64bit.stderr b/tests/ui/sized/stack-overflow-trait-infer-98842.64bit.stderr
index c01b2ccd163..354ca78c7be 100644
--- a/tests/ui/sized/stack-overflow-trait-infer-98842.64bit.stderr
+++ b/tests/ui/sized/stack-overflow-trait-infer-98842.64bit.stderr
@@ -9,11 +9,11 @@ LL | const _: *const Foo = 0 as _;
    | ^^^^^^^^^^^^^^^^^^^
    = 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[E0080]: evaluation of constant value failed
+error[E0080]: a cycle occurred during layout computation
   --> $DIR/stack-overflow-trait-infer-98842.rs:14:1
    |
 LL | const _: *const Foo = 0 as _;
-   | ^^^^^^^^^^^^^^^^^^^ a cycle occurred during layout computation
+   | ^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/sized/stack-overflow-trait-infer-98842.rs b/tests/ui/sized/stack-overflow-trait-infer-98842.rs
index 8a958870b0e..1c9f6c593f4 100644
--- a/tests/ui/sized/stack-overflow-trait-infer-98842.rs
+++ b/tests/ui/sized/stack-overflow-trait-infer-98842.rs
@@ -12,6 +12,6 @@ struct Foo(<&'static Foo as ::core::ops::Deref>::Target);
 // and it will infinitely recurse somewhere trying to figure out the
 // size of this pointer (is my guess):
 const _: *const Foo = 0 as _;
-//~^ ERROR evaluation of constant value failed
+//~^ ERROR a cycle occurred during layout computation
 
 pub fn main() {}
diff --git a/tests/ui/statics/issue-14227.rs b/tests/ui/statics/issue-14227.rs
index 8a70f51d3b4..84994f033d1 100644
--- a/tests/ui/statics/issue-14227.rs
+++ b/tests/ui/statics/issue-14227.rs
@@ -3,6 +3,6 @@ extern "C" {
 }
 static CRASH: u32 = symbol;
 //~^ ERROR use of extern static is unsafe and requires
-//~| ERROR could not evaluate static initializer
+//~| ERROR cannot access extern static `symbol`
 
 fn main() {}
diff --git a/tests/ui/statics/issue-14227.stderr b/tests/ui/statics/issue-14227.stderr
index 3551821a3da..372a06ae1ed 100644
--- a/tests/ui/statics/issue-14227.stderr
+++ b/tests/ui/statics/issue-14227.stderr
@@ -1,8 +1,8 @@
-error[E0080]: could not evaluate static initializer
+error[E0080]: cannot access extern static `symbol`
   --> $DIR/issue-14227.rs:4:21
    |
 LL | static CRASH: u32 = symbol;
-   |                     ^^^^^^ cannot access extern static `symbol`
+   |                     ^^^^^^ evaluation of static initializer failed here
 
 error[E0133]: use of extern static is unsafe and requires unsafe function or block
   --> $DIR/issue-14227.rs:4:21
diff --git a/tests/ui/statics/mutable_memory_validation.rs b/tests/ui/statics/mutable_memory_validation.rs
index 3bb572d38bc..033c2bc2839 100644
--- a/tests/ui/statics/mutable_memory_validation.rs
+++ b/tests/ui/statics/mutable_memory_validation.rs
@@ -11,7 +11,7 @@ struct Meh {
 }
 
 const MUH: Meh = Meh { x: unsafe { &mut *(&READONLY as *const _ as *mut _) } };
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: invalid value at .x.<deref>: encountered `UnsafeCell` in read-only memory
 
 static READONLY: i32 = 0;
 
diff --git a/tests/ui/statics/mutable_memory_validation.stderr b/tests/ui/statics/mutable_memory_validation.stderr
index 76e1827ea12..df36287cc69 100644
--- a/tests/ui/statics/mutable_memory_validation.stderr
+++ b/tests/ui/statics/mutable_memory_validation.stderr
@@ -1,8 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .x.<deref>: encountered `UnsafeCell` in read-only memory
   --> $DIR/mutable_memory_validation.rs:13:1
    |
 LL | const MUH: Meh = Meh { x: unsafe { &mut *(&READONLY as *const _ as *mut _) } };
-   | ^^^^^^^^^^^^^^ constructing invalid value at .x.<deref>: encountered `UnsafeCell` in read-only memory
+   | ^^^^^^^^^^^^^^ 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) {
diff --git a/tests/ui/statics/uninhabited-static.rs b/tests/ui/statics/uninhabited-static.rs
index 0f7c5ae6ef4..955d489d313 100644
--- a/tests/ui/statics/uninhabited-static.rs
+++ b/tests/ui/statics/uninhabited-static.rs
@@ -11,9 +11,9 @@ extern "C" {
 
 static VOID2: Void = unsafe { std::mem::transmute(()) }; //~ ERROR static of uninhabited type
 //~| WARN: previously accepted
-//~| ERROR could not evaluate static initializer
+//~| ERROR value of uninhabited type `Void`
 static NEVER2: Void = unsafe { std::mem::transmute(()) }; //~ ERROR static of uninhabited type
 //~| WARN: previously accepted
-//~| ERROR could not evaluate static initializer
+//~| ERROR value of uninhabited type `Void`
 
 fn main() {}
diff --git a/tests/ui/statics/uninhabited-static.stderr b/tests/ui/statics/uninhabited-static.stderr
index f891c0ce25b..60268ad3562 100644
--- a/tests/ui/statics/uninhabited-static.stderr
+++ b/tests/ui/statics/uninhabited-static.stderr
@@ -43,17 +43,17 @@ LL | static NEVER2: Void = unsafe { std::mem::transmute(()) };
    = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
    = note: uninhabited statics cannot be initialized, and any access would be an immediate error
 
-error[E0080]: could not evaluate static initializer
+error[E0080]: constructing invalid value: encountered a value of uninhabited type `Void`
   --> $DIR/uninhabited-static.rs:12:31
    |
 LL | static VOID2: Void = unsafe { std::mem::transmute(()) };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of uninhabited type `Void`
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
-error[E0080]: could not evaluate static initializer
+error[E0080]: constructing invalid value: encountered a value of uninhabited type `Void`
   --> $DIR/uninhabited-static.rs:15:32
    |
 LL | static NEVER2: Void = unsafe { std::mem::transmute(()) };
-   |                                ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of uninhabited type `Void`
+   |                                ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/statics/unsizing-wfcheck-issue-127299.rs b/tests/ui/statics/unsizing-wfcheck-issue-127299.rs
index fd07937d90f..14ba38d7535 100644
--- a/tests/ui/statics/unsizing-wfcheck-issue-127299.rs
+++ b/tests/ui/statics/unsizing-wfcheck-issue-127299.rs
@@ -12,6 +12,5 @@ pub struct Lint {
 static FOO: &Lint = &Lint { desc: "desc" };
 //~^ ERROR cannot be shared between threads safely
 //~| ERROR is not dyn compatible
-//~| ERROR is not dyn compatible
 
 fn main() {}
diff --git a/tests/ui/statics/unsizing-wfcheck-issue-127299.stderr b/tests/ui/statics/unsizing-wfcheck-issue-127299.stderr
index 28427161e87..e401277a020 100644
--- a/tests/ui/statics/unsizing-wfcheck-issue-127299.stderr
+++ b/tests/ui/statics/unsizing-wfcheck-issue-127299.stderr
@@ -51,7 +51,6 @@ LL | trait Qux {
    |       --- this trait is not dyn compatible...
 LL |     fn bar() -> i32;
    |        ^^^ ...because associated function `bar` has no `self` parameter
-   = note: required for the cast from `&'static str` to `&'static (dyn Qux + 'static)`
 help: consider turning `bar` into a method by giving it a `&self` argument
    |
 LL |     fn bar(&self) -> i32;
@@ -61,30 +60,7 @@ help: alternatively, consider constraining `bar` so it does not apply to trait o
 LL |     fn bar() -> i32 where Self: Sized;
    |                     +++++++++++++++++
 
-error[E0038]: the trait `Qux` is not dyn compatible
-  --> $DIR/unsizing-wfcheck-issue-127299.rs:12:35
-   |
-LL | static FOO: &Lint = &Lint { desc: "desc" };
-   |                                   ^^^^^^ `Qux` 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/unsizing-wfcheck-issue-127299.rs:4:8
-   |
-LL | trait Qux {
-   |       --- this trait is not dyn compatible...
-LL |     fn bar() -> i32;
-   |        ^^^ ...because associated function `bar` has no `self` parameter
-help: consider turning `bar` into a method by giving it a `&self` argument
-   |
-LL |     fn bar(&self) -> i32;
-   |            +++++
-help: alternatively, consider constraining `bar` so it does not apply to trait objects
-   |
-LL |     fn bar() -> i32 where Self: Sized;
-   |                     +++++++++++++++++
-
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0038, E0277.
 For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/stats/input-stats.rs b/tests/ui/stats/input-stats.rs
index f19a53cc610..e760e2894e3 100644
--- a/tests/ui/stats/input-stats.rs
+++ b/tests/ui/stats/input-stats.rs
@@ -3,6 +3,10 @@
 //@ only-64bit
 // layout randomization affects the hir stat output
 //@ needs-deterministic-layouts
+//
+// Filter out the percentages because a change to a single count can affect
+// many or all percentages, which makes the diffs hard to read.
+//@ normalize-stderr: "\([0-9 ][0-9]\.[0-9]%\)" -> "(NN.N%)"
 
 // Type layouts sometimes change. When that happens, until the next bootstrap
 // bump occurs, stage1 and stage2 will give different outputs for this test.
diff --git a/tests/ui/stats/input-stats.stderr b/tests/ui/stats/input-stats.stderr
index b369af62f87..f2598bd7eaf 100644
--- a/tests/ui/stats/input-stats.stderr
+++ b/tests/ui/stats/input-stats.stderr
@@ -1,178 +1,121 @@
-ast-stats-1 PRE EXPANSION AST STATS
-ast-stats-1 Name                Accumulated Size         Count     Item Size
-ast-stats-1 ----------------------------------------------------------------
-ast-stats-1 Crate                     40 ( 0.6%)             1            40
-ast-stats-1 GenericArgs               40 ( 0.6%)             1            40
-ast-stats-1 - AngleBracketed            40 ( 0.6%)             1
-ast-stats-1 ExprField                 48 ( 0.7%)             1            48
-ast-stats-1 Attribute                 64 ( 0.9%)             2            32
-ast-stats-1 - DocComment                32 ( 0.5%)             1
-ast-stats-1 - Normal                    32 ( 0.5%)             1
-ast-stats-1 WherePredicate            72 ( 1.1%)             1            72
-ast-stats-1 - BoundPredicate            72 ( 1.1%)             1
-ast-stats-1 ForeignItem               80 ( 1.2%)             1            80
-ast-stats-1 - Fn                        80 ( 1.2%)             1
-ast-stats-1 Arm                       96 ( 1.4%)             2            48
-ast-stats-1 Local                     96 ( 1.4%)             1            96
-ast-stats-1 FnDecl                   120 ( 1.8%)             5            24
-ast-stats-1 Param                    160 ( 2.4%)             4            40
-ast-stats-1 Stmt                     160 ( 2.4%)             5            32
-ast-stats-1 - Let                       32 ( 0.5%)             1
-ast-stats-1 - MacCall                   32 ( 0.5%)             1
-ast-stats-1 - Expr                      96 ( 1.4%)             3
-ast-stats-1 Block                    192 ( 2.8%)             6            32
-ast-stats-1 FieldDef                 208 ( 3.1%)             2           104
-ast-stats-1 Variant                  208 ( 3.1%)             2           104
-ast-stats-1 AssocItem                320 ( 4.7%)             4            80
-ast-stats-1 - Fn                       160 ( 2.4%)             2
-ast-stats-1 - Type                     160 ( 2.4%)             2
-ast-stats-1 GenericBound             352 ( 5.2%)             4            88
-ast-stats-1 - Trait                    352 ( 5.2%)             4
-ast-stats-1 GenericParam             480 ( 7.1%)             5            96
-ast-stats-1 Pat                      504 ( 7.5%)             7            72
-ast-stats-1 - Struct                    72 ( 1.1%)             1
-ast-stats-1 - Wild                      72 ( 1.1%)             1
-ast-stats-1 - Ident                    360 ( 5.3%)             5
-ast-stats-1 Expr                     576 ( 8.5%)             8            72
-ast-stats-1 - Match                     72 ( 1.1%)             1
-ast-stats-1 - Path                      72 ( 1.1%)             1
-ast-stats-1 - Struct                    72 ( 1.1%)             1
-ast-stats-1 - Lit                      144 ( 2.1%)             2
-ast-stats-1 - Block                    216 ( 3.2%)             3
-ast-stats-1 PathSegment              744 (11.0%)            31            24
-ast-stats-1 Ty                       896 (13.3%)            14            64
-ast-stats-1 - Ptr                       64 ( 0.9%)             1
-ast-stats-1 - Ref                       64 ( 0.9%)             1
-ast-stats-1 - ImplicitSelf             128 ( 1.9%)             2
-ast-stats-1 - Path                     640 ( 9.5%)            10
-ast-stats-1 Item                   1_296 (19.2%)             9           144
-ast-stats-1 - Enum                     144 ( 2.1%)             1
-ast-stats-1 - ForeignMod               144 ( 2.1%)             1
-ast-stats-1 - Impl                     144 ( 2.1%)             1
-ast-stats-1 - Trait                    144 ( 2.1%)             1
-ast-stats-1 - Fn                       288 ( 4.3%)             2
-ast-stats-1 - Use                      432 ( 6.4%)             3
-ast-stats-1 ----------------------------------------------------------------
-ast-stats-1 Total                  6_752                   116
-ast-stats-1
-ast-stats-2 POST EXPANSION AST STATS
-ast-stats-2 Name                Accumulated Size         Count     Item Size
-ast-stats-2 ----------------------------------------------------------------
-ast-stats-2 Crate                     40 ( 0.5%)             1            40
-ast-stats-2 GenericArgs               40 ( 0.5%)             1            40
-ast-stats-2 - AngleBracketed            40 ( 0.5%)             1
-ast-stats-2 ExprField                 48 ( 0.6%)             1            48
-ast-stats-2 WherePredicate            72 ( 1.0%)             1            72
-ast-stats-2 - BoundPredicate            72 ( 1.0%)             1
-ast-stats-2 ForeignItem               80 ( 1.1%)             1            80
-ast-stats-2 - Fn                        80 ( 1.1%)             1
-ast-stats-2 Arm                       96 ( 1.3%)             2            48
-ast-stats-2 Local                     96 ( 1.3%)             1            96
-ast-stats-2 FnDecl                   120 ( 1.6%)             5            24
-ast-stats-2 InlineAsm                120 ( 1.6%)             1           120
-ast-stats-2 Attribute                128 ( 1.7%)             4            32
-ast-stats-2 - DocComment                32 ( 0.4%)             1
-ast-stats-2 - Normal                    96 ( 1.3%)             3
-ast-stats-2 Param                    160 ( 2.2%)             4            40
-ast-stats-2 Stmt                     160 ( 2.2%)             5            32
-ast-stats-2 - Let                       32 ( 0.4%)             1
-ast-stats-2 - Semi                      32 ( 0.4%)             1
-ast-stats-2 - Expr                      96 ( 1.3%)             3
-ast-stats-2 Block                    192 ( 2.6%)             6            32
-ast-stats-2 FieldDef                 208 ( 2.8%)             2           104
-ast-stats-2 Variant                  208 ( 2.8%)             2           104
-ast-stats-2 AssocItem                320 ( 4.3%)             4            80
-ast-stats-2 - Fn                       160 ( 2.2%)             2
-ast-stats-2 - Type                     160 ( 2.2%)             2
-ast-stats-2 GenericBound             352 ( 4.7%)             4            88
-ast-stats-2 - Trait                    352 ( 4.7%)             4
-ast-stats-2 GenericParam             480 ( 6.5%)             5            96
-ast-stats-2 Pat                      504 ( 6.8%)             7            72
-ast-stats-2 - Struct                    72 ( 1.0%)             1
-ast-stats-2 - Wild                      72 ( 1.0%)             1
-ast-stats-2 - Ident                    360 ( 4.9%)             5
-ast-stats-2 Expr                     648 ( 8.7%)             9            72
-ast-stats-2 - InlineAsm                 72 ( 1.0%)             1
-ast-stats-2 - Match                     72 ( 1.0%)             1
-ast-stats-2 - Path                      72 ( 1.0%)             1
-ast-stats-2 - Struct                    72 ( 1.0%)             1
-ast-stats-2 - Lit                      144 ( 1.9%)             2
-ast-stats-2 - Block                    216 ( 2.9%)             3
-ast-stats-2 PathSegment              864 (11.7%)            36            24
-ast-stats-2 Ty                       896 (12.1%)            14            64
-ast-stats-2 - Ptr                       64 ( 0.9%)             1
-ast-stats-2 - Ref                       64 ( 0.9%)             1
-ast-stats-2 - ImplicitSelf             128 ( 1.7%)             2
-ast-stats-2 - Path                     640 ( 8.6%)            10
-ast-stats-2 Item                   1_584 (21.4%)            11           144
-ast-stats-2 - Enum                     144 ( 1.9%)             1
-ast-stats-2 - ExternCrate              144 ( 1.9%)             1
-ast-stats-2 - ForeignMod               144 ( 1.9%)             1
-ast-stats-2 - Impl                     144 ( 1.9%)             1
-ast-stats-2 - Trait                    144 ( 1.9%)             1
-ast-stats-2 - Fn                       288 ( 3.9%)             2
-ast-stats-2 - Use                      576 ( 7.8%)             4
-ast-stats-2 ----------------------------------------------------------------
-ast-stats-2 Total                  7_416                   127
-ast-stats-2
+ast-stats POST EXPANSION AST 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
+ast-stats - ForeignMod               144 (NN.N%)             1
+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 ----------------------------------------------------------------
+ast-stats Total                  7_416                   127
+ast-stats
 hir-stats HIR STATS
 hir-stats Name                Accumulated Size         Count     Item Size
 hir-stats ----------------------------------------------------------------
-hir-stats ForeignItemRef            24 ( 0.3%)             1            24
-hir-stats Lifetime                  28 ( 0.3%)             1            28
-hir-stats Mod                       32 ( 0.4%)             1            32
-hir-stats ExprField                 40 ( 0.4%)             1            40
-hir-stats TraitItemRef              56 ( 0.6%)             2            28
-hir-stats GenericArg                64 ( 0.7%)             4            16
-hir-stats - Type                      16 ( 0.2%)             1
-hir-stats - Lifetime                  48 ( 0.5%)             3
-hir-stats Param                     64 ( 0.7%)             2            32
-hir-stats Body                      72 ( 0.8%)             3            24
-hir-stats ImplItemRef               72 ( 0.8%)             2            36
-hir-stats InlineAsm                 72 ( 0.8%)             1            72
-hir-stats Local                     72 ( 0.8%)             1            72
-hir-stats WherePredicate            72 ( 0.8%)             3            24
-hir-stats - BoundPredicate            72 ( 0.8%)             3
-hir-stats Arm                       80 ( 0.9%)             2            40
-hir-stats Stmt                      96 ( 1.1%)             3            32
-hir-stats - Expr                      32 ( 0.4%)             1
-hir-stats - Let                       32 ( 0.4%)             1
-hir-stats - Semi                      32 ( 0.4%)             1
-hir-stats FnDecl                   120 ( 1.3%)             3            40
-hir-stats Attribute                128 ( 1.4%)             4            32
-hir-stats FieldDef                 128 ( 1.4%)             2            64
-hir-stats GenericArgs              144 ( 1.6%)             3            48
-hir-stats Variant                  144 ( 1.6%)             2            72
-hir-stats GenericBound             256 ( 2.8%)             4            64
-hir-stats - Trait                    256 ( 2.8%)             4
-hir-stats Block                    288 ( 3.2%)             6            48
-hir-stats Pat                      360 ( 4.0%)             5            72
-hir-stats - Struct                    72 ( 0.8%)             1
-hir-stats - Wild                      72 ( 0.8%)             1
-hir-stats - Binding                  216 ( 2.4%)             3
-hir-stats GenericParam             400 ( 4.5%)             5            80
-hir-stats Generics                 560 ( 6.2%)            10            56
-hir-stats Ty                       720 ( 8.0%)            15            48
-hir-stats - Ptr                       48 ( 0.5%)             1
-hir-stats - Ref                       48 ( 0.5%)             1
-hir-stats - Path                     624 ( 6.9%)            13
-hir-stats Expr                     768 ( 8.5%)            12            64
-hir-stats - InlineAsm                 64 ( 0.7%)             1
-hir-stats - Match                     64 ( 0.7%)             1
-hir-stats - Path                      64 ( 0.7%)             1
-hir-stats - Struct                    64 ( 0.7%)             1
-hir-stats - Lit                      128 ( 1.4%)             2
-hir-stats - Block                    384 ( 4.3%)             6
-hir-stats Item                     968 (10.8%)            11            88
-hir-stats - Enum                      88 ( 1.0%)             1
-hir-stats - ExternCrate               88 ( 1.0%)             1
-hir-stats - ForeignMod                88 ( 1.0%)             1
-hir-stats - Impl                      88 ( 1.0%)             1
-hir-stats - Trait                     88 ( 1.0%)             1
-hir-stats - Fn                       176 ( 2.0%)             2
-hir-stats - Use                      352 ( 3.9%)             4
-hir-stats Path                   1_240 (13.8%)            31            40
-hir-stats PathSegment            1_920 (21.4%)            40            48
+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 Attribute                128 (NN.N%)             4            32
+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 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 Item                     968 (NN.N%)            11            88
+hir-stats - Enum                      88 (NN.N%)             1
+hir-stats - ExternCrate               88 (NN.N%)             1
+hir-stats - ForeignMod                88 (NN.N%)             1
+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 ----------------------------------------------------------------
-hir-stats Total                  8_988                   180
+hir-stats Total                  8_644                   172
 hir-stats
diff --git a/tests/ui/bare-static-string.rs b/tests/ui/str/str-static-literal.rs
index b71cf38cfe8..61630f0f22b 100644
--- a/tests/ui/bare-static-string.rs
+++ b/tests/ui/str/str-static-literal.rs
@@ -1,3 +1,5 @@
+//! Check that a bare string literal is typed as a `&'static str` and is usable.
+
 //@ run-pass
 
 pub fn main() {
diff --git a/tests/ui/structs/default-field-values/invalid-const.rs b/tests/ui/structs/default-field-values/invalid-const.rs
index 203a712868b..ddb73f68865 100644
--- a/tests/ui/structs/default-field-values/invalid-const.rs
+++ b/tests/ui/structs/default-field-values/invalid-const.rs
@@ -3,13 +3,13 @@
 
 pub struct Bat {
     pub bax: u8 = panic!("asdf"),
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR evaluation panicked: asdf
 }
 
 pub struct Baz<const C: u8> {
     pub bax: u8 = 130 + C, // ok
     pub bat: u8 = 130 + 130,
-    //~^ ERROR evaluation of `Baz::<C>::bat::{constant#0}` failed
+    //~^ ERROR attempt to compute `130_u8 + 130_u8`, which would overflow
     pub bay: u8 = 1, // ok
 }
 
diff --git a/tests/ui/structs/default-field-values/invalid-const.stderr b/tests/ui/structs/default-field-values/invalid-const.stderr
index 030bdbfcc3e..f4a74ef9fdc 100644
--- a/tests/ui/structs/default-field-values/invalid-const.stderr
+++ b/tests/ui/structs/default-field-values/invalid-const.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: asdf
   --> $DIR/invalid-const.rs:5:19
    |
 LL |     pub bax: u8 = panic!("asdf"),
-   |                   ^^^^^^^^^^^^^^ evaluation panicked: asdf
+   |                   ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of `Baz::<C>::bat::{constant#0}` failed
+error[E0080]: attempt to compute `130_u8 + 130_u8`, which would overflow
   --> $DIR/invalid-const.rs:11:19
    |
 LL |     pub bat: u8 = 130 + 130,
-   |                   ^^^^^^^^^ attempt to compute `130_u8 + 130_u8`, which would overflow
+   |                   ^^^^^^^^^ evaluation of `Baz::<C>::bat::{constant#0}` failed here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/structs/default-field-values/post-mono.direct.stderr b/tests/ui/structs/default-field-values/post-mono.direct.stderr
index cdd80620c48..74e37795f06 100644
--- a/tests/ui/structs/default-field-values/post-mono.direct.stderr
+++ b/tests/ui/structs/default-field-values/post-mono.direct.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Z::<1>::post_mono::{constant#0}` failed
+error[E0080]: attempt to divide `1_usize` by zero
   --> $DIR/post-mono.rs:7:24
    |
 LL |     post_mono: usize = X / 0,
-   |                        ^^^^^ attempt to divide `1_usize` by zero
+   |                        ^^^^^ evaluation of `Z::<1>::post_mono::{constant#0}` failed here
 
 note: erroneous constant encountered
   --> $DIR/post-mono.rs:17:19
diff --git a/tests/ui/structs/default-field-values/post-mono.indirect.stderr b/tests/ui/structs/default-field-values/post-mono.indirect.stderr
index 56c27a6e5dc..c8af9c959c1 100644
--- a/tests/ui/structs/default-field-values/post-mono.indirect.stderr
+++ b/tests/ui/structs/default-field-values/post-mono.indirect.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of `Z::<1>::post_mono::{constant#0}` failed
+error[E0080]: attempt to divide `1_usize` by zero
   --> $DIR/post-mono.rs:7:24
    |
 LL |     post_mono: usize = X / 0,
-   |                        ^^^^^ attempt to divide `1_usize` by zero
+   |                        ^^^^^ evaluation of `Z::<1>::post_mono::{constant#0}` failed here
 
 note: erroneous constant encountered
   --> $DIR/post-mono.rs:12:19
diff --git a/tests/ui/structs/default-field-values/post-mono.rs b/tests/ui/structs/default-field-values/post-mono.rs
index 4de31f6e2fb..68dfa391bb4 100644
--- a/tests/ui/structs/default-field-values/post-mono.rs
+++ b/tests/ui/structs/default-field-values/post-mono.rs
@@ -5,7 +5,7 @@
 
 struct Z<const X: usize> {
     post_mono: usize = X / 0,
-    //~^ ERROR evaluation of `Z::<1>::post_mono::{constant#0}` failed
+    //~^ ERROR attempt to divide `1_usize` by zero
 }
 
 fn indirect<const X: usize>() {
diff --git a/tests/ui/structs/struct-path-associated-type.stderr b/tests/ui/structs/struct-path-associated-type.stderr
index de396e875b0..110362293ac 100644
--- a/tests/ui/structs/struct-path-associated-type.stderr
+++ b/tests/ui/structs/struct-path-associated-type.stderr
@@ -48,19 +48,37 @@ error[E0223]: ambiguous associated type
   --> $DIR/struct-path-associated-type.rs:32:13
    |
 LL |     let s = S::A {};
-   |             ^^^^ help: use fully-qualified syntax: `<S as Tr>::A`
+   |             ^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -     let s = S::A {};
+LL +     let s = <S as Tr>::A {};
+   |
 
 error[E0223]: ambiguous associated type
   --> $DIR/struct-path-associated-type.rs:33:13
    |
 LL |     let z = S::A::<u8> {};
-   |             ^^^^ help: use fully-qualified syntax: `<S as Tr>::A`
+   |             ^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -     let z = S::A::<u8> {};
+LL +     let z = <S as Tr>::A::<u8> {};
+   |
 
 error[E0223]: ambiguous associated type
   --> $DIR/struct-path-associated-type.rs:35:9
    |
 LL |         S::A {} => {}
-   |         ^^^^ help: use fully-qualified syntax: `<S as Tr>::A`
+   |         ^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -         S::A {} => {}
+LL +         <S as Tr>::A {} => {}
+   |
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/suggestions/mut-borrow-needed-by-trait.stderr b/tests/ui/suggestions/mut-borrow-needed-by-trait.stderr
index 09a9b1d3b34..eadf512a63b 100644
--- a/tests/ui/suggestions/mut-borrow-needed-by-trait.stderr
+++ b/tests/ui/suggestions/mut-borrow-needed-by-trait.stderr
@@ -20,11 +20,11 @@ LL |     let fp = BufWriter::new(fp);
 note: required by a bound in `BufWriter`
   --> $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
 
-error[E0599]: the method `write_fmt` exists for struct `BufWriter<&dyn Write>`, but its trait bounds were not satisfied
+error[E0599]: the method `write_fmt` exists for struct `BufWriter<&dyn std::io::Write>`, but its trait bounds were not satisfied
   --> $DIR/mut-borrow-needed-by-trait.rs:21:14
    |
 LL |     writeln!(fp, "hello world").unwrap();
-   |     ---------^^---------------- method cannot be called on `BufWriter<&dyn Write>` due to unsatisfied trait bounds
+   |     ---------^^---------------- method cannot be called on `BufWriter<&dyn std::io::Write>` due to unsatisfied trait bounds
    |
 note: must implement `io::Write`, `fmt::Write`, or have a `write_fmt` method
   --> $DIR/mut-borrow-needed-by-trait.rs:21:14
diff --git a/tests/ui/suggestions/suggest-using-chars.stderr b/tests/ui/suggestions/suggest-using-chars.stderr
index a197223beb0..20a162f8bfe 100644
--- a/tests/ui/suggestions/suggest-using-chars.stderr
+++ b/tests/ui/suggestions/suggest-using-chars.stderr
@@ -2,7 +2,7 @@ error[E0599]: no method named `iter` found for reference `&'static str` in the c
   --> $DIR/suggest-using-chars.rs:2:19
    |
 LL |     let _ = "foo".iter();
-   |                   ^^^^ method not found in `&str`
+   |                   ^^^^ method not found in `&'static str`
    |
 help: because of the in-memory representation of `&str`, to obtain an `Iterator` over each of its codepoint use method `chars`
    |
@@ -14,7 +14,7 @@ error[E0599]: no method named `foo` found for reference `&'static str` in the cu
   --> $DIR/suggest-using-chars.rs:3:19
    |
 LL |     let _ = "foo".foo();
-   |                   ^^^ method not found in `&str`
+   |                   ^^^ method not found in `&'static str`
 
 error[E0599]: no method named `iter` found for struct `String` in the current scope
   --> $DIR/suggest-using-chars.rs:4:33
diff --git a/tests/ui/suggestions/unnamable-types.rs b/tests/ui/suggestions/unnamable-types.rs
index 094584ff850..6772217a2f6 100644
--- a/tests/ui/suggestions/unnamable-types.rs
+++ b/tests/ui/suggestions/unnamable-types.rs
@@ -1,7 +1,7 @@
 // Test that we do not suggest to add type annotations for unnamable types.
 
 #![crate_type="lib"]
-#![feature(coroutines, stmt_expr_attributes)]
+#![feature(coroutines, stmt_expr_attributes, const_async_blocks)]
 
 const A = 5;
 //~^ ERROR: missing type for `const` item
diff --git a/tests/ui/target-feature/abi-incompatible-target-feature-attribute-fcw.rs b/tests/ui/target-feature/abi-incompatible-target-feature-attribute-fcw.rs
new file mode 100644
index 00000000000..270874a9f58
--- /dev/null
+++ b/tests/ui/target-feature/abi-incompatible-target-feature-attribute-fcw.rs
@@ -0,0 +1,14 @@
+//@ compile-flags: --crate-type=lib
+//@ compile-flags: --target=aarch64-unknown-none-softfloat
+//@ needs-llvm-components: aarch64
+#![feature(no_core, lang_items)]
+#![no_core]
+#![deny(aarch64_softfloat_neon)]
+
+#[lang = "sized"]
+pub trait Sized {}
+
+#[target_feature(enable = "neon")]
+//~^ERROR: enabling the `neon` target feature on the current target is unsound
+//~|WARN: previously accepted
+pub unsafe fn my_fun() {}
diff --git a/tests/ui/target-feature/abi-incompatible-target-feature-attribute-fcw.stderr b/tests/ui/target-feature/abi-incompatible-target-feature-attribute-fcw.stderr
new file mode 100644
index 00000000000..bf745291a5a
--- /dev/null
+++ b/tests/ui/target-feature/abi-incompatible-target-feature-attribute-fcw.stderr
@@ -0,0 +1,31 @@
+error: enabling the `neon` target feature on the current target is unsound due to ABI issues
+  --> $DIR/abi-incompatible-target-feature-attribute-fcw.rs:11:18
+   |
+LL | #[target_feature(enable = "neon")]
+   |                  ^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #134375 <https://github.com/rust-lang/rust/issues/134375>
+note: the lint level is defined here
+  --> $DIR/abi-incompatible-target-feature-attribute-fcw.rs:6:9
+   |
+LL | #![deny(aarch64_softfloat_neon)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
+Future incompatibility report: Future breakage diagnostic:
+error: enabling the `neon` target feature on the current target is unsound due to ABI issues
+  --> $DIR/abi-incompatible-target-feature-attribute-fcw.rs:11:18
+   |
+LL | #[target_feature(enable = "neon")]
+   |                  ^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #134375 <https://github.com/rust-lang/rust/issues/134375>
+note: the lint level is defined here
+  --> $DIR/abi-incompatible-target-feature-attribute-fcw.rs:6:9
+   |
+LL | #![deny(aarch64_softfloat_neon)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^
+
diff --git a/tests/ui/target-feature/auxiliary/using-target-feature-unstable.rs b/tests/ui/target-feature/auxiliary/using-target-feature-unstable.rs
index 2682028936c..15bcfdd9076 100644
--- a/tests/ui/target-feature/auxiliary/using-target-feature-unstable.rs
+++ b/tests/ui/target-feature/auxiliary/using-target-feature-unstable.rs
@@ -1,5 +1,5 @@
-#![feature(avx512_target_feature)]
+#![feature(x87_target_feature)]
 
 #[inline]
-#[target_feature(enable = "avx512ifma")]
+#[target_feature(enable = "x87")]
 pub unsafe fn foo() {}
diff --git a/tests/ui/target-feature/gate.rs b/tests/ui/target-feature/gate.rs
index 14fdad02f56..9244a98d82f 100644
--- a/tests/ui/target-feature/gate.rs
+++ b/tests/ui/target-feature/gate.rs
@@ -2,7 +2,6 @@
 //
 // gate-test-sse4a_target_feature
 // gate-test-powerpc_target_feature
-// gate-test-avx512_target_feature
 // gate-test-tbm_target_feature
 // gate-test-arm_target_feature
 // gate-test-hexagon_target_feature
@@ -27,7 +26,7 @@
 // gate-test-x87_target_feature
 // gate-test-m68k_target_feature
 
-#[target_feature(enable = "avx512bw")]
+#[target_feature(enable = "x87")]
 //~^ ERROR: currently unstable
 unsafe fn foo() {}
 
diff --git a/tests/ui/target-feature/gate.stderr b/tests/ui/target-feature/gate.stderr
index fa876893848..32d60ce4382 100644
--- a/tests/ui/target-feature/gate.stderr
+++ b/tests/ui/target-feature/gate.stderr
@@ -1,11 +1,11 @@
-error[E0658]: the target feature `avx512bw` is currently unstable
-  --> $DIR/gate.rs:30:18
+error[E0658]: the target feature `x87` is currently unstable
+  --> $DIR/gate.rs:29:18
    |
-LL | #[target_feature(enable = "avx512bw")]
-   |                  ^^^^^^^^^^^^^^^^^^^
+LL | #[target_feature(enable = "x87")]
+   |                  ^^^^^^^^^^^^^^
    |
    = note: see issue #44839 <https://github.com/rust-lang/rust/issues/44839> for more information
-   = help: add `#![feature(avx512_target_feature)]` to the crate attributes to enable
+   = help: add `#![feature(x87_target_feature)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/target-feature/unstable-feature.rs b/tests/ui/target-feature/unstable-feature.rs
index f62c4dd938a..a79ad469603 100644
--- a/tests/ui/target-feature/unstable-feature.rs
+++ b/tests/ui/target-feature/unstable-feature.rs
@@ -1,8 +1,8 @@
-//@ compile-flags: -Ctarget-feature=+vaes --crate-type=rlib --target=x86_64-unknown-linux-gnu
+//@ compile-flags: -Ctarget-feature=+x87 --crate-type=rlib --target=x86_64-unknown-linux-gnu
 //@ build-pass
 //@ needs-llvm-components: x86
 
 #![feature(no_core)]
 #![no_core]
 
-//~? WARN unstable feature specified for `-Ctarget-feature`: `vaes`
+//~? WARN unstable feature specified for `-Ctarget-feature`: `x87`
diff --git a/tests/ui/target-feature/unstable-feature.stderr b/tests/ui/target-feature/unstable-feature.stderr
index d34544c5c27..309b64afd92 100644
--- a/tests/ui/target-feature/unstable-feature.stderr
+++ b/tests/ui/target-feature/unstable-feature.stderr
@@ -1,4 +1,4 @@
-warning: unstable feature specified for `-Ctarget-feature`: `vaes`
+warning: unstable feature specified for `-Ctarget-feature`: `x87`
    |
    = note: this feature is not stably supported; its behavior can change in the future
 
diff --git a/tests/ui/threads-sendsync/tls-dont-move-after-init.rs b/tests/ui/threads-sendsync/tls-dont-move-after-init.rs
new file mode 100644
index 00000000000..54fcc32e9bd
--- /dev/null
+++ b/tests/ui/threads-sendsync/tls-dont-move-after-init.rs
@@ -0,0 +1,37 @@
+//@ run-pass
+//@ needs-threads
+
+use std::cell::Cell;
+use std::thread;
+
+#[derive(Default)]
+struct Foo {
+    ptr: Cell<*const Foo>,
+}
+
+impl Foo {
+    fn touch(&self) {
+        if self.ptr.get().is_null() {
+            self.ptr.set(self);
+        } else {
+            assert!(self.ptr.get() == self);
+        }
+    }
+}
+
+impl Drop for Foo {
+    fn drop(&mut self) {
+        self.touch();
+    }
+}
+
+thread_local!(static FOO: Foo = Foo::default());
+
+fn main() {
+    thread::spawn(|| {
+        FOO.with(|foo| foo.touch());
+        FOO.with(|foo| foo.touch());
+    })
+    .join()
+    .unwrap();
+}
diff --git a/tests/ui/traits/const-traits/staged-api.stderr b/tests/ui/traits/const-traits/staged-api.stderr
index cdf577287ee..4756c490cb1 100644
--- a/tests/ui/traits/const-traits/staged-api.stderr
+++ b/tests/ui/traits/const-traits/staged-api.stderr
@@ -71,16 +71,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Unstable::func();
    |     ^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
-LL | const fn const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(unstable)]`
   --> $DIR/staged-api.rs:38:5
@@ -88,16 +83,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Unstable::func();
    |     ^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(unstable)]
-LL | const fn const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(const_trait_impl)]`
   --> $DIR/staged-api.rs:41:5
@@ -105,16 +95,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Foo::func();
    |     ^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
-LL | const fn const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(unstable)]`
   --> $DIR/staged-api.rs:41:5
@@ -122,16 +107,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Foo::func();
    |     ^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(unstable)]
-LL | const fn const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(const_trait_impl)]`
   --> $DIR/staged-api.rs:44:5
@@ -139,16 +119,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Unstable2::func();
    |     ^^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
-LL | const fn const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(unstable)]`
   --> $DIR/staged-api.rs:44:5
@@ -156,16 +131,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Unstable2::func();
    |     ^^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(unstable)]
-LL | const fn const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(const_trait_impl)]`
   --> $DIR/staged-api.rs:47:5
@@ -173,16 +143,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     conditionally_const::<Foo>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
-LL | const fn const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(const_trait_impl)]`
   --> $DIR/staged-api.rs:63:5
@@ -190,16 +155,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Unstable::func();
    |     ^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn stable_const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
-LL | const fn stable_const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(unstable)]`
   --> $DIR/staged-api.rs:63:5
@@ -207,16 +167,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Unstable::func();
    |     ^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn stable_const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(unstable)]
-LL | const fn stable_const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(const_trait_impl)]`
   --> $DIR/staged-api.rs:66:5
@@ -224,16 +179,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Foo::func();
    |     ^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn stable_const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
-LL | const fn stable_const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(unstable)]`
   --> $DIR/staged-api.rs:66:5
@@ -241,16 +191,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Foo::func();
    |     ^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn stable_const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(unstable)]
-LL | const fn stable_const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local_feature)]`
   --> $DIR/staged-api.rs:69:5
@@ -259,16 +204,11 @@ LL |     const_context_not_const_stable();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn stable_const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(local_feature)]
-LL | const fn stable_const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(const_trait_impl)]`
   --> $DIR/staged-api.rs:71:5
@@ -276,16 +216,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     conditionally_const::<Foo>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn stable_const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
-LL | const fn stable_const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(const_trait_impl)]`
   --> $DIR/staged-api.rs:76:5
@@ -293,16 +228,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Unstable::func();
    |     ^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn implicitly_stable_const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
-LL | const fn implicitly_stable_const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(unstable)]`
   --> $DIR/staged-api.rs:76:5
@@ -310,16 +240,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Unstable::func();
    |     ^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn implicitly_stable_const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(unstable)]
-LL | const fn implicitly_stable_const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(const_trait_impl)]`
   --> $DIR/staged-api.rs:79:5
@@ -327,16 +252,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Foo::func();
    |     ^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn implicitly_stable_const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
-LL | const fn implicitly_stable_const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(unstable)]`
   --> $DIR/staged-api.rs:79:5
@@ -344,16 +264,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     Foo::func();
    |     ^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn implicitly_stable_const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(unstable)]
-LL | const fn implicitly_stable_const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local_feature)]`
   --> $DIR/staged-api.rs:82:5
@@ -362,16 +277,11 @@ LL |     const_context_not_const_stable();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
-help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn implicitly_stable_const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(local_feature)]
-LL | const fn implicitly_stable_const_context() {
-   |
 
 error: const function that might be (indirectly) exposed to stable cannot use `#[feature(const_trait_impl)]`
   --> $DIR/staged-api.rs:84:5
@@ -379,16 +289,11 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
 LL |     conditionally_const::<Foo>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
+help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
    |
 LL + #[rustc_const_unstable(feature = "...", issue = "...")]
 LL | const fn implicitly_stable_const_context() {
    |
-help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
-   |
-LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
-LL | const fn implicitly_stable_const_context() {
-   |
 
 error: aborting due to 24 previous errors
 
diff --git a/tests/ui/traits/issue-20692.rs b/tests/ui/traits/issue-20692.rs
index 10611a232f7..79edc389ec4 100644
--- a/tests/ui/traits/issue-20692.rs
+++ b/tests/ui/traits/issue-20692.rs
@@ -2,7 +2,6 @@ trait Array: Sized + Copy {}
 
 fn f<T: Array>(x: &T) {
     let _ = x
-    //~^ ERROR `Array` is not dyn compatible
     as
     &dyn Array;
     //~^ ERROR `Array` is not dyn compatible
diff --git a/tests/ui/traits/issue-20692.stderr b/tests/ui/traits/issue-20692.stderr
index 32e29de49a1..d4a18899dcb 100644
--- a/tests/ui/traits/issue-20692.stderr
+++ b/tests/ui/traits/issue-20692.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Array` is not dyn compatible
-  --> $DIR/issue-20692.rs:7:5
+  --> $DIR/issue-20692.rs:6:10
    |
 LL |     &dyn Array;
-   |     ^^^^^^^^^^ `Array` is not dyn compatible
+   |          ^^^^^ `Array` 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>
@@ -14,23 +14,6 @@ LL | trait Array: Sized + Copy {}
    |       |      ...because it requires `Self: Sized`
    |       this trait is not dyn compatible...
 
-error[E0038]: the trait `Array` is not dyn compatible
-  --> $DIR/issue-20692.rs:4:13
-   |
-LL |     let _ = x
-   |             ^ `Array` 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-20692.rs:1:14
-   |
-LL | trait Array: Sized + Copy {}
-   |       -----  ^^^^^   ^^^^ ...because it requires `Self: Sized`
-   |       |      |
-   |       |      ...because it requires `Self: Sized`
-   |       this trait is not dyn compatible...
-   = note: required for the cast from `&T` to `&dyn Array`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/issue-38604.rs b/tests/ui/traits/issue-38604.rs
index d90aa61ef9f..70f0ef0cb9c 100644
--- a/tests/ui/traits/issue-38604.rs
+++ b/tests/ui/traits/issue-38604.rs
@@ -12,5 +12,5 @@ impl Foo for () {
 
 fn main() {
     let _f: Box<dyn Foo> = //~ ERROR `Foo` is not dyn compatible
-        Box::new(()); //~ ERROR `Foo` is not dyn compatible
+        Box::new(());
 }
diff --git a/tests/ui/traits/issue-38604.stderr b/tests/ui/traits/issue-38604.stderr
index e6a6b44e730..0f39dc536eb 100644
--- a/tests/ui/traits/issue-38604.stderr
+++ b/tests/ui/traits/issue-38604.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/issue-38604.rs:14:13
+  --> $DIR/issue-38604.rs:14:21
    |
 LL |     let _f: Box<dyn Foo> =
-   |             ^^^^^^^^^^^^ `Foo` is not dyn compatible
+   |                     ^^^ `Foo` 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>
@@ -14,23 +14,6 @@ LL | trait Foo where u32: Q<Self> {
    |       this trait is not dyn compatible...
    = help: only type `()` implements `Foo`; consider using it directly instead.
 
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/issue-38604.rs:15:9
-   |
-LL |         Box::new(());
-   |         ^^^^^^^^^^^^ `Foo` 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-38604.rs:2:22
-   |
-LL | trait Foo where u32: Q<Self> {
-   |       ---            ^^^^^^^ ...because it uses `Self` as a type parameter
-   |       |
-   |       this trait is not dyn compatible...
-   = help: only type `()` implements `Foo`; consider using it directly instead.
-   = note: required for the cast from `Box<()>` to `Box<dyn Foo>`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/item-privacy.rs b/tests/ui/traits/item-privacy.rs
index cdfd667a6f1..9f75e6e4c12 100644
--- a/tests/ui/traits/item-privacy.rs
+++ b/tests/ui/traits/item-privacy.rs
@@ -99,9 +99,7 @@ fn check_assoc_const() {
     S::C; // OK
     // A, B, C are resolved as inherent items, their traits don't need to be in scope
     <dyn C>::A;
-    //~^ ERROR associated constant `A` is private
-    //~| ERROR the trait `assoc_const::C` is not dyn compatible
-    //~| ERROR the trait `assoc_const::C` is not dyn compatible
+    //~^ ERROR the trait `assoc_const::C` is not dyn compatible
     <dyn C>::B;
     //~^ ERROR the trait `assoc_const::C` is not dyn compatible
     C::C; // OK
diff --git a/tests/ui/traits/item-privacy.stderr b/tests/ui/traits/item-privacy.stderr
index 4fd9ef91192..bf59cd079a5 100644
--- a/tests/ui/traits/item-privacy.stderr
+++ b/tests/ui/traits/item-privacy.stderr
@@ -131,44 +131,10 @@ LL + use assoc_const::B;
    |
 
 error[E0038]: the trait `assoc_const::C` is not dyn compatible
-  --> $DIR/item-privacy.rs:101:6
+  --> $DIR/item-privacy.rs:101:10
    |
 LL |     <dyn C>::A;
-   |      ^^^^^ `assoc_const::C` 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/item-privacy.rs:25:15
-   |
-LL |         const A: u8 = 0;
-   |               ^ ...because it contains this associated `const`
-...
-LL |         const B: u8 = 0;
-   |               ^ ...because it contains this associated `const`
-...
-LL |     pub trait C: A + B {
-   |               - this trait is not dyn compatible...
-LL |         const C: u8 = 0;
-   |               ^ ...because it contains this associated `const`
-   = help: consider moving `C` to another trait
-   = help: consider moving `A` to another trait
-   = help: consider moving `B` to another trait
-   = help: only type `S` implements `assoc_const::C`; consider using it directly instead.
-
-error[E0624]: associated constant `A` is private
-  --> $DIR/item-privacy.rs:101:14
-   |
-LL |         const A: u8 = 0;
-   |         ----------- private associated constant defined here
-...
-LL |     <dyn C>::A;
-   |              ^ private associated constant
-
-error[E0038]: the trait `assoc_const::C` is not dyn compatible
-  --> $DIR/item-privacy.rs:101:5
-   |
-LL |     <dyn C>::A;
-   |     ^^^^^^^^^^ `assoc_const::C` is not dyn compatible
+   |          ^ `assoc_const::C` 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>
@@ -190,10 +156,10 @@ LL |         const C: u8 = 0;
    = help: only type `S` implements `assoc_const::C`; consider using it directly instead.
 
 error[E0038]: the trait `assoc_const::C` is not dyn compatible
-  --> $DIR/item-privacy.rs:105:5
+  --> $DIR/item-privacy.rs:103:10
    |
 LL |     <dyn C>::B;
-   |     ^^^^^^^^^^ `assoc_const::C` is not dyn compatible
+   |          ^ `assoc_const::C` 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>
@@ -215,7 +181,7 @@ LL |         const C: u8 = 0;
    = help: only type `S` implements `assoc_const::C`; consider using it directly instead.
 
 error[E0223]: ambiguous associated type
-  --> $DIR/item-privacy.rs:118:12
+  --> $DIR/item-privacy.rs:116:12
    |
 LL |     let _: S::A;
    |            ^^^^
@@ -227,19 +193,31 @@ LL +     let _: <S as Example>::A;
    |
 
 error[E0223]: ambiguous associated type
-  --> $DIR/item-privacy.rs:119:12
+  --> $DIR/item-privacy.rs:117:12
    |
 LL |     let _: S::B;
-   |            ^^^^ help: use fully-qualified syntax: `<S as assoc_ty::B>::B`
+   |            ^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -     let _: S::B;
+LL +     let _: <S as assoc_ty::B>::B;
+   |
 
 error[E0223]: ambiguous associated type
-  --> $DIR/item-privacy.rs:120:12
+  --> $DIR/item-privacy.rs:118:12
    |
 LL |     let _: S::C;
-   |            ^^^^ help: use fully-qualified syntax: `<S as assoc_ty::C>::C`
+   |            ^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -     let _: S::C;
+LL +     let _: <S as assoc_ty::C>::C;
+   |
 
 error[E0624]: associated type `A` is private
-  --> $DIR/item-privacy.rs:122:12
+  --> $DIR/item-privacy.rs:120:12
    |
 LL |         type A = u8;
    |         ------ the associated type is defined here
@@ -248,7 +226,7 @@ LL |     let _: T::A;
    |            ^^^^ private associated type
 
 error[E0624]: associated type `A` is private
-  --> $DIR/item-privacy.rs:131:9
+  --> $DIR/item-privacy.rs:129:9
    |
 LL |         type A = u8;
    |         ------ the associated type is defined here
@@ -256,7 +234,7 @@ LL |         type A = u8;
 LL |         A = u8,
    |         ^^^^^^ private associated type
 
-error: aborting due to 17 previous errors
+error: aborting due to 15 previous errors
 
 Some errors have detailed explanations: E0038, E0223, E0599, E0624.
 For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/next-solver/assembly/better_any-backcompat.rs b/tests/ui/traits/next-solver/assembly/better_any-backcompat.rs
new file mode 100644
index 00000000000..8b153833e3a
--- /dev/null
+++ b/tests/ui/traits/next-solver/assembly/better_any-backcompat.rs
@@ -0,0 +1,33 @@
+//@ check-pass
+//@ revisions: current next
+//@[next] compile-flags: -Znext-solver
+//@ ignore-compare-mode-next-solver (explicit revisions)
+
+// A regression test for trait-system-refactor-initiative#183. While
+// this concrete instance is likely not practically unsound, the general
+// pattern is, see #57893.
+
+use std::any::TypeId;
+
+unsafe trait TidAble<'a>: Tid<'a> {}
+trait TidExt<'a>: Tid<'a> {
+    fn downcast_box(self: Box<Self>) {
+        loop {}
+    }
+}
+
+impl<'a, X: ?Sized + Tid<'a>> TidExt<'a> for X {}
+
+unsafe trait Tid<'a>: 'a {}
+
+unsafe impl<'a, T: ?Sized + TidAble<'a>> Tid<'a> for T {}
+
+impl<'a> dyn Tid<'a> + 'a {
+    fn downcast_any_box(self: Box<Self>) {
+        self.downcast_box();
+    }
+}
+
+unsafe impl<'a> TidAble<'a> for dyn Tid<'a> + 'a {}
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs b/tests/ui/traits/next-solver/coercion/coerce-ambig-alias-to-rigid-alias.rs
index cc78dc20eaf..cc78dc20eaf 100644
--- a/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs
+++ b/tests/ui/traits/next-solver/coercion/coerce-ambig-alias-to-rigid-alias.rs
diff --git a/tests/ui/traits/next-solver/coerce-depth.rs b/tests/ui/traits/next-solver/coercion/coerce-depth.rs
index c8fc3fcab59..c8fc3fcab59 100644
--- a/tests/ui/traits/next-solver/coerce-depth.rs
+++ b/tests/ui/traits/next-solver/coercion/coerce-depth.rs
diff --git a/tests/ui/traits/next-solver/coercion/fn-def-coerce-nested-obligations.rs b/tests/ui/traits/next-solver/coercion/fn-def-coerce-nested-obligations.rs
new file mode 100644
index 00000000000..1b5abcb02f2
--- /dev/null
+++ b/tests/ui/traits/next-solver/coercion/fn-def-coerce-nested-obligations.rs
@@ -0,0 +1,16 @@
+//@ compile-flags: -Znext-solver
+//@ check-pass
+
+// Make sure that we consider nested obligations when checking whether
+// we should coerce fn definitions to function pointers.
+
+fn foo<const N: usize>() {}
+fn bar<T>() {}
+fn main() {
+    let _ = if true { foo::<{ 0 + 0 }> } else { foo::<1> };
+    let _ = if true {
+        bar::<for<'a> fn(<Vec<&'a ()> as IntoIterator>::Item)>
+    } else {
+        bar::<fn(i32)>
+    };
+}
diff --git a/tests/ui/traits/next-solver/non-wf-in-coerce-pointers.rs b/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs
index d05def2cb75..d05def2cb75 100644
--- a/tests/ui/traits/next-solver/non-wf-in-coerce-pointers.rs
+++ b/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs
diff --git a/tests/ui/traits/next-solver/non-wf-in-coerce-pointers.stderr b/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.stderr
index 72be10367da..72be10367da 100644
--- a/tests/ui/traits/next-solver/non-wf-in-coerce-pointers.stderr
+++ b/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.stderr
diff --git a/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs b/tests/ui/traits/next-solver/coercion/trait-upcast-lhs-needs-normalization.rs
index c6094b45775..c6094b45775 100644
--- a/tests/ui/traits/next-solver/trait-upcast-lhs-needs-normalization.rs
+++ b/tests/ui/traits/next-solver/coercion/trait-upcast-lhs-needs-normalization.rs
diff --git a/tests/ui/traits/next-solver/upcast-right-substs.rs b/tests/ui/traits/next-solver/coercion/upcast-right-substs.rs
index 7a566b59b83..7a566b59b83 100644
--- a/tests/ui/traits/next-solver/upcast-right-substs.rs
+++ b/tests/ui/traits/next-solver/coercion/upcast-right-substs.rs
diff --git a/tests/ui/traits/next-solver/upcast-wrong-substs.rs b/tests/ui/traits/next-solver/coercion/upcast-wrong-substs.rs
index 473977c527c..473977c527c 100644
--- a/tests/ui/traits/next-solver/upcast-wrong-substs.rs
+++ b/tests/ui/traits/next-solver/coercion/upcast-wrong-substs.rs
diff --git a/tests/ui/traits/next-solver/upcast-wrong-substs.stderr b/tests/ui/traits/next-solver/coercion/upcast-wrong-substs.stderr
index 00ba1ef678f..00ba1ef678f 100644
--- a/tests/ui/traits/next-solver/upcast-wrong-substs.stderr
+++ b/tests/ui/traits/next-solver/coercion/upcast-wrong-substs.stderr
diff --git a/tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env-2.rs b/tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env-2.rs
new file mode 100644
index 00000000000..ffb99d6d638
--- /dev/null
+++ b/tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env-2.rs
@@ -0,0 +1,29 @@
+//@ check-pass
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
+// Regression test for <https://github.com/rust-lang/trait-system-refactor-initiative/issues/214>.
+// See comment below.
+
+trait A {
+    fn hello(&self) {}
+}
+
+trait B {
+    fn hello(&self) {}
+}
+
+impl<T> A for T {}
+impl<T> B for T {}
+
+fn test<F, R>(q: F::Item)
+where
+    F: Iterator<Item = R>,
+    // We want to prefer `A` for `R.hello()`
+    F::Item: A,
+{
+    q.hello();
+}
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env.rs b/tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env.rs
new file mode 100644
index 00000000000..dde4f745879
--- /dev/null
+++ b/tests/ui/traits/next-solver/method/param-method-from-unnormalized-param-env.rs
@@ -0,0 +1,17 @@
+//@ check-pass
+//@ compile-flags: -Znext-solver
+
+// Regression test for <https://github.com/rust-lang/trait-system-refactor-initiative/issues/214>.
+
+fn execute<K, F, R>(q: F::Item) -> R
+where
+    F: Iterator<Item = R>,
+    // Both of the below bounds should be considered for `.into()`, and then be combined
+    // into a single `R: Into<?0>` bound which can be inferred to `?0 = R`.
+    F::Item: Into<K>,
+    R: Into<String>,
+{
+    q.into()
+}
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/no-param-env-const-fold.rs b/tests/ui/traits/next-solver/no-param-env-const-fold.rs
new file mode 100644
index 00000000000..4f47332dd23
--- /dev/null
+++ b/tests/ui/traits/next-solver/no-param-env-const-fold.rs
@@ -0,0 +1,10 @@
+//@ check-pass
+//@ compile-flags: -Znext-solver
+
+// Regression test for <https://github.com/rust-lang/trait-system-refactor-initiative/issues/213>.
+
+use std::ops::Deref;
+
+trait Trait: Deref<Target = [u8; { 1 + 1 }]> {}
+
+fn main() {}
diff --git a/tests/ui/traits/next-solver/normalize/normalize-place-elem.rs b/tests/ui/traits/next-solver/normalize/normalize-place-elem.rs
new file mode 100644
index 00000000000..9a600875bb9
--- /dev/null
+++ b/tests/ui/traits/next-solver/normalize/normalize-place-elem.rs
@@ -0,0 +1,32 @@
+//@ check-pass
+//@ compile-flags: -Znext-solver
+
+// Regression test for <https://github.com/rust-lang/trait-system-refactor-initiative/issues/221>.
+// Ensure that we normalize after applying projection elems in MIR typeck.
+
+use std::marker::PhantomData;
+
+#[derive(Copy, Clone)]
+struct Span;
+
+trait AstKind {
+    type Inner;
+}
+
+struct WithSpan;
+impl AstKind for WithSpan {
+    type Inner
+        = (i32,);
+}
+
+struct Expr<'a> { f: &'a <WithSpan as AstKind>::Inner }
+
+impl Expr<'_> {
+    fn span(self) {
+        match self {
+            Self { f: (n,) } => {},
+        }
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.rs b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.rs
index 28785ae3dea..96345732f0f 100644
--- a/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.rs
+++ b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.rs
@@ -18,7 +18,5 @@ impl<T: ?Sized> Bar<T> for () {}
 fn main() {
     let x: &dyn Foo = &();
     //~^ ERROR the trait `Foo` is not dyn compatible
-    //~| ERROR the trait `Foo` is not dyn compatible
     needs_bar(x);
-    //~^ ERROR the trait `Foo` is not dyn compatible
 }
diff --git a/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr
index 43b69d0b50e..aead19c4527 100644
--- a/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr
+++ b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr
@@ -8,10 +8,10 @@ LL | #![feature(non_lifetime_binders)]
    = note: `#[warn(incomplete_features)]` on by default
 
 error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/supertrait-dyn-compatibility.rs:19:23
+  --> $DIR/supertrait-dyn-compatibility.rs:19:17
    |
 LL |     let x: &dyn Foo = &();
-   |                       ^^^ `Foo` is not dyn compatible
+   |                 ^^^ `Foo` 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>
@@ -22,40 +22,7 @@ LL | trait Foo: for<T> Bar<T> {}
    |       |
    |       this trait is not dyn compatible...
    = help: only type `()` implements `Foo`; consider using it directly instead.
-   = note: required for the cast from `&()` to `&dyn Foo`
 
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/supertrait-dyn-compatibility.rs:19:12
-   |
-LL |     let x: &dyn Foo = &();
-   |            ^^^^^^^^ `Foo` 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/supertrait-dyn-compatibility.rs:4:12
-   |
-LL | trait Foo: for<T> Bar<T> {}
-   |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
-   |       |
-   |       this trait is not dyn compatible...
-   = help: only type `()` implements `Foo`; consider using it directly instead.
-
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/supertrait-dyn-compatibility.rs:22:5
-   |
-LL |     needs_bar(x);
-   |     ^^^^^^^^^ `Foo` 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/supertrait-dyn-compatibility.rs:4:12
-   |
-LL | trait Foo: for<T> Bar<T> {}
-   |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
-   |       |
-   |       this trait is not dyn compatible...
-   = help: only type `()` implements `Foo`; consider using it directly instead.
-
-error: aborting due to 3 previous errors; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.rs b/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.rs
index 6fcd67b4950..9ac3b84dc12 100644
--- a/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.rs
+++ b/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.rs
@@ -9,8 +9,6 @@ trait Try {
 fn w<'a, T: 'a, F: Fn(&'a T)>() {
     let b: &dyn FromResidual = &();
     //~^ ERROR: the trait `FromResidual` is not dyn compatible
-    //~| ERROR: the trait `FromResidual` is not dyn compatible
-    //~| ERROR the type parameter `R` must be explicitly specified
 }
 
 fn main() {}
diff --git a/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.stderr b/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.stderr
index b4bbd65b2f4..707aa9e9713 100644
--- a/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.stderr
+++ b/tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.stderr
@@ -1,47 +1,8 @@
-error[E0393]: the type parameter `R` must be explicitly specified
-  --> $DIR/canonicalize-fresh-infer-vars-issue-103626.rs:10:17
-   |
-LL | trait FromResidual<R = <Self as Try>::Residual> {
-   | ----------------------------------------------- type parameter `R` must be specified for this
-...
-LL |     let b: &dyn FromResidual = &();
-   |                 ^^^^^^^^^^^^
-   |
-   = note: because the parameter default references `Self`, the parameter must be specified on the object type
-help: set the type parameter to the desired type
-   |
-LL |     let b: &dyn FromResidual<R> = &();
-   |                             +++
-
 error[E0038]: the trait `FromResidual` is not dyn compatible
-  --> $DIR/canonicalize-fresh-infer-vars-issue-103626.rs:10:32
-   |
-LL |     let b: &dyn FromResidual = &();
-   |                                ^^^ `FromResidual` 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/canonicalize-fresh-infer-vars-issue-103626.rs:2:8
-   |
-LL | trait FromResidual<R = <Self as Try>::Residual> {
-   |       ------------ this trait is not dyn compatible...
-LL |     fn from_residual(residual: R) -> Self;
-   |        ^^^^^^^^^^^^^ ...because associated function `from_residual` has no `self` parameter
-   = note: required for the cast from `&()` to `&dyn FromResidual<{type error}>`
-help: consider turning `from_residual` into a method by giving it a `&self` argument
-   |
-LL |     fn from_residual(&self, residual: R) -> Self;
-   |                      ++++++
-help: alternatively, consider constraining `from_residual` so it does not apply to trait objects
-   |
-LL |     fn from_residual(residual: R) -> Self where Self: Sized;
-   |                                           +++++++++++++++++
-
-error[E0038]: the trait `FromResidual` is not dyn compatible
-  --> $DIR/canonicalize-fresh-infer-vars-issue-103626.rs:10:12
+  --> $DIR/canonicalize-fresh-infer-vars-issue-103626.rs:10:17
    |
 LL |     let b: &dyn FromResidual = &();
-   |            ^^^^^^^^^^^^^^^^^ `FromResidual` is not dyn compatible
+   |                 ^^^^^^^^^^^^ `FromResidual` 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>
@@ -60,7 +21,6 @@ help: alternatively, consider constraining `from_residual` so it does not apply
 LL |     fn from_residual(residual: R) -> Self where Self: Sized;
    |                                           +++++++++++++++++
 
-error: aborting due to 3 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0038, E0393.
-For more information about an error, try `rustc --explain E0038`.
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/object/macro-matcher.stderr b/tests/ui/traits/object/macro-matcher.stderr
index 3c668ce99c7..94d5c189a43 100644
--- a/tests/ui/traits/object/macro-matcher.stderr
+++ b/tests/ui/traits/object/macro-matcher.stderr
@@ -1,19 +1,19 @@
-error[E0224]: at least one trait is required for an object type
-  --> $DIR/macro-matcher.rs:11:8
-   |
-LL |     m!(dyn 'static +);
-   |        ^^^^^^^^^^^^^
-
 error[E0038]: the trait `Copy` is not dyn compatible
-  --> $DIR/macro-matcher.rs:8:8
+  --> $DIR/macro-matcher.rs:8:12
    |
 LL |     m!(dyn Copy + Send + 'static);
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^^ `Copy` is not dyn compatible
+   |            ^^^^ `Copy` is not dyn compatible
    |
    = 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>
 
+error[E0224]: at least one trait is required for an object type
+  --> $DIR/macro-matcher.rs:11:8
+   |
+LL |     m!(dyn 'static +);
+   |        ^^^^^^^^^^^^^
+
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0038, E0224.
diff --git a/tests/ui/traits/object/safety.rs b/tests/ui/traits/object/safety.rs
index f4abcf8542e..ec039557b63 100644
--- a/tests/ui/traits/object/safety.rs
+++ b/tests/ui/traits/object/safety.rs
@@ -13,5 +13,4 @@ impl Tr for St {
 
 fn main() {
     let _: &dyn Tr = &St; //~ ERROR E0038
-    //~^ ERROR E0038
 }
diff --git a/tests/ui/traits/object/safety.stderr b/tests/ui/traits/object/safety.stderr
index 593e42619f4..c5637b43526 100644
--- a/tests/ui/traits/object/safety.stderr
+++ b/tests/ui/traits/object/safety.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `Tr` is not dyn compatible
-  --> $DIR/safety.rs:15:22
+  --> $DIR/safety.rs:15:17
    |
 LL |     let _: &dyn Tr = &St;
-   |                      ^^^ `Tr` is not dyn compatible
+   |                 ^^ `Tr` 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>
@@ -13,7 +13,6 @@ LL | trait Tr {
 LL |     fn foo();
    |        ^^^ ...because associated function `foo` has no `self` parameter
    = help: only type `St` implements `Tr`; consider using it directly instead.
-   = note: required for the cast from `&St` to `&dyn Tr`
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self);
@@ -23,30 +22,6 @@ help: alternatively, consider constraining `foo` so it does not apply to trait o
 LL |     fn foo() where Self: Sized;
    |              +++++++++++++++++
 
-error[E0038]: the trait `Tr` is not dyn compatible
-  --> $DIR/safety.rs:15:12
-   |
-LL |     let _: &dyn Tr = &St;
-   |            ^^^^^^^ `Tr` 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/safety.rs:4:8
-   |
-LL | trait Tr {
-   |       -- this trait is not dyn compatible...
-LL |     fn foo();
-   |        ^^^ ...because associated function `foo` has no `self` parameter
-   = help: only type `St` implements `Tr`; consider using it directly instead.
-help: consider turning `foo` into a method by giving it a `&self` argument
-   |
-LL |     fn foo(&self);
-   |            +++++
-help: alternatively, consider constraining `foo` so it does not apply to trait objects
-   |
-LL |     fn foo() where Self: Sized;
-   |              +++++++++++++++++
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/test-2.rs b/tests/ui/traits/test-2.rs
index ffb778a0141..1b7fc55b99a 100644
--- a/tests/ui/traits/test-2.rs
+++ b/tests/ui/traits/test-2.rs
@@ -12,6 +12,4 @@ fn main() {
     //~^ ERROR method takes 1 generic argument but 2
     (Box::new(10) as Box<dyn bar>).dup();
     //~^ ERROR E0038
-    //~| ERROR E0038
-    //~| ERROR E0038
 }
diff --git a/tests/ui/traits/test-2.stderr b/tests/ui/traits/test-2.stderr
index 6a6cb503aa4..6a8109281a8 100644
--- a/tests/ui/traits/test-2.stderr
+++ b/tests/ui/traits/test-2.stderr
@@ -27,10 +27,10 @@ LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
    |                                       ^^^^ -
 
 error[E0038]: the trait `bar` is not dyn compatible
-  --> $DIR/test-2.rs:13:22
+  --> $DIR/test-2.rs:13:30
    |
 LL |     (Box::new(10) as Box<dyn bar>).dup();
-   |                      ^^^^^^^^^^^^ `bar` is not dyn compatible
+   |                              ^^^ `bar` 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>
@@ -49,54 +49,7 @@ LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
            consider defining an enum where each variant holds one of these types,
            implementing `bar` for this new enum and using it instead
 
-error[E0038]: the trait `bar` is not dyn compatible
-  --> $DIR/test-2.rs:13:5
-   |
-LL |     (Box::new(10) as Box<dyn bar>).dup();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `bar` 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/test-2.rs:4:30
-   |
-LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
-   |       ---                    ^^^^     ^^^^ ...because method `blah` has generic type parameters
-   |       |                      |
-   |       |                      ...because method `dup` references the `Self` type in its return type
-   |       this trait is not dyn compatible...
-   = help: consider moving `dup` to another trait
-   = help: consider moving `blah` to another trait
-   = help: the following types implement `bar`:
-             i32
-             u32
-           consider defining an enum where each variant holds one of these types,
-           implementing `bar` for this new enum and using it instead
-
-error[E0038]: the trait `bar` is not dyn compatible
-  --> $DIR/test-2.rs:13:6
-   |
-LL |     (Box::new(10) as Box<dyn bar>).dup();
-   |      ^^^^^^^^^^^^ `bar` 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/test-2.rs:4:30
-   |
-LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
-   |       ---                    ^^^^     ^^^^ ...because method `blah` has generic type parameters
-   |       |                      |
-   |       |                      ...because method `dup` references the `Self` type in its return type
-   |       this trait is not dyn compatible...
-   = help: consider moving `dup` to another trait
-   = help: consider moving `blah` to another trait
-   = help: the following types implement `bar`:
-             i32
-             u32
-           consider defining an enum where each variant holds one of these types,
-           implementing `bar` for this new enum and using it instead
-   = note: required for the cast from `Box<{integer}>` to `Box<dyn bar>`
-
-error: aborting due to 5 previous errors
+error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0038, E0107.
 For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/transmutability/enums/repr/should_handle_all.rs b/tests/ui/transmutability/enums/repr/should_handle_all.rs
index dec0126f22d..192b7cdcf72 100644
--- a/tests/ui/transmutability/enums/repr/should_handle_all.rs
+++ b/tests/ui/transmutability/enums/repr/should_handle_all.rs
@@ -1,8 +1,7 @@
 //@ check-pass
 #![crate_type = "lib"]
-#![feature(repr128)]
 #![feature(transmutability)]
-#![allow(dead_code, incomplete_features, non_camel_case_types)]
+#![allow(dead_code, non_camel_case_types)]
 
 mod assert {
     use std::mem::{Assume, TransmuteFrom};
diff --git a/tests/ui/transmutability/uninhabited.rs b/tests/ui/transmutability/uninhabited.rs
index 274104ffb39..4e48b590c42 100644
--- a/tests/ui/transmutability/uninhabited.rs
+++ b/tests/ui/transmutability/uninhabited.rs
@@ -38,7 +38,7 @@ fn yawning_void_struct() {
     const _: () = {
         assert!(std::mem::size_of::<YawningVoid>() == std::mem::size_of::<u128>());
         // Just to be sure the above constant actually evaluated:
-        assert!(false); //~ ERROR: evaluation of constant value failed
+        assert!(false); //~ ERROR: evaluation panicked: assertion failed: false
     };
 
     // This transmutation is vacuously acceptable; since one cannot construct a
@@ -60,7 +60,7 @@ fn yawning_void_enum() {
     const _: () = {
         assert!(std::mem::size_of::<YawningVoid>() == std::mem::size_of::<u128>());
         // Just to be sure the above constant actually evaluated:
-        assert!(false); //~ ERROR: evaluation of constant value failed
+        assert!(false); //~ ERROR: evaluation panicked: assertion failed: false
     };
 
     // This transmutation is vacuously acceptable; since one cannot construct a
@@ -84,7 +84,7 @@ fn distant_void() {
     const _: () = {
         assert!(std::mem::size_of::<DistantVoid>() == std::mem::size_of::<usize>());
         // Just to be sure the above constant actually evaluated:
-        assert!(false); //~ ERROR: evaluation of constant value failed
+        assert!(false); //~ ERROR: evaluation panicked: assertion failed: false
     };
 
     assert::is_maybe_transmutable::<DistantVoid, ()>();
diff --git a/tests/ui/transmutability/uninhabited.stderr b/tests/ui/transmutability/uninhabited.stderr
index 3044b502d31..79cd75ce279 100644
--- a/tests/ui/transmutability/uninhabited.stderr
+++ b/tests/ui/transmutability/uninhabited.stderr
@@ -40,11 +40,11 @@ LL | |                 lifetimes: true,
 LL | |         }>
    | |__________^ required by this bound in `is_maybe_transmutable`
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: assertion failed: false
   --> $DIR/uninhabited.rs:41:9
    |
 LL |         assert!(false);
-   |         ^^^^^^^^^^^^^^ evaluation panicked: assertion failed: false
+   |         ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error[E0277]: `()` cannot be safely transmuted into `yawning_void_enum::Void`
   --> $DIR/uninhabited.rs:71:41
@@ -67,11 +67,11 @@ LL | |                 lifetimes: true,
 LL | |         }>
    | |__________^ required by this bound in `is_maybe_transmutable`
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: assertion failed: false
   --> $DIR/uninhabited.rs:63:9
    |
 LL |         assert!(false);
-   |         ^^^^^^^^^^^^^^ evaluation panicked: assertion failed: false
+   |         ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error[E0277]: `u128` cannot be safely transmuted into `DistantVoid`
   --> $DIR/uninhabited.rs:92:43
@@ -94,11 +94,11 @@ LL | |                 lifetimes: true,
 LL | |         }>
    | |__________^ required by this bound in `is_maybe_transmutable`
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: assertion failed: false
   --> $DIR/uninhabited.rs:87:9
    |
 LL |         assert!(false);
-   |         ^^^^^^^^^^^^^^ evaluation panicked: assertion failed: false
+   |         ^^^^^^^^^^^^^^ evaluation of constant value failed here
 
 error[E0277]: `Src` cannot be safely transmuted into `issue_126267::Error`
   --> $DIR/uninhabited.rs:108:42
diff --git a/tests/ui/transmute/unnecessary-transmutation.fixed b/tests/ui/transmute/unnecessary-transmutation.fixed
index bf7d769348a..08010ec8b84 100644
--- a/tests/ui/transmute/unnecessary-transmutation.fixed
+++ b/tests/ui/transmute/unnecessary-transmutation.fixed
@@ -8,7 +8,27 @@ pub fn bytes_at_home(x: u32) -> [u8; 4] {
     //~^ ERROR
 }
 
+pub const fn intinator_const(from: bool) -> u8 {
+    unsafe { (from) as u8 }
+    //~^ ERROR
+}
+
+pub static X: u8 = unsafe { (true) as u8 };
+//~^ ERROR
+pub const Y: u8 = unsafe { (true) as u8 };
+//~^ ERROR
+
+pub struct Z {}
+impl Z {
+    pub const fn intinator_assoc(x: bool) -> u8 {
+        unsafe { (x) as u8 }
+        //~^ ERROR
+    }
+}
+
 fn main() {
+    const { unsafe { (true) as u8 } };
+    //~^ ERROR
     unsafe {
         let x: u16 = u16::from_ne_bytes(*b"01");
         //~^ ERROR
@@ -81,14 +101,14 @@ fn main() {
         let y: i64 = f64::to_bits(1f64).cast_signed();
         //~^ ERROR
 
-        let z: bool = (1u8 == 1);
-        //~^ ERROR
-        let z: u8 = (z) as u8;
+        let z: bool = transmute(1u8);
+        // clippy
+        let z: u8 = u8::from(z);
         //~^ ERROR
 
         let z: bool = transmute(1i8);
-        // no error!
-        let z: i8 = (z) as i8;
+        // clippy
+        let z: i8 = i8::from(z);
         //~^ ERROR
     }
 }
diff --git a/tests/ui/transmute/unnecessary-transmutation.rs b/tests/ui/transmute/unnecessary-transmutation.rs
index b9de529f1cc..43eefb97dc2 100644
--- a/tests/ui/transmute/unnecessary-transmutation.rs
+++ b/tests/ui/transmute/unnecessary-transmutation.rs
@@ -8,7 +8,27 @@ pub fn bytes_at_home(x: u32) -> [u8; 4] {
     //~^ ERROR
 }
 
+pub const fn intinator_const(from: bool) -> u8 {
+    unsafe { transmute(from) }
+    //~^ ERROR
+}
+
+pub static X: u8 = unsafe { transmute(true) };
+//~^ ERROR
+pub const Y: u8 = unsafe { transmute(true) };
+//~^ ERROR
+
+pub struct Z {}
+impl Z {
+    pub const fn intinator_assoc(x: bool) -> u8 {
+        unsafe { transmute(x) }
+        //~^ ERROR
+    }
+}
+
 fn main() {
+    const { unsafe { transmute::<_, u8>(true) } };
+    //~^ ERROR
     unsafe {
         let x: u16 = transmute(*b"01");
         //~^ ERROR
@@ -82,12 +102,12 @@ fn main() {
         //~^ ERROR
 
         let z: bool = transmute(1u8);
-        //~^ ERROR
+        // clippy
         let z: u8 = transmute(z);
         //~^ ERROR
 
         let z: bool = transmute(1i8);
-        // no error!
+        // clippy
         let z: i8 = transmute(z);
         //~^ ERROR
     }
diff --git a/tests/ui/transmute/unnecessary-transmutation.stderr b/tests/ui/transmute/unnecessary-transmutation.stderr
index a19f1bebf16..0132ac4776b 100644
--- a/tests/ui/transmute/unnecessary-transmutation.stderr
+++ b/tests/ui/transmute/unnecessary-transmutation.stderr
@@ -2,7 +2,9 @@ error: unnecessary transmute
   --> $DIR/unnecessary-transmutation.rs:7:14
    |
 LL |     unsafe { transmute(x) }
-   |              ^^^^^^^^^^^^ help: replace this with: `u32::to_ne_bytes(x)`
+   |              ---------^^^
+   |              |
+   |              help: replace this with: `u32::to_ne_bytes`
    |
    = help: there's also `to_le_bytes` and `to_be_bytes` if you expect a particular byte order
 note: the lint level is defined here
@@ -12,250 +14,387 @@ LL | #![deny(unnecessary_transmutes)]
    |         ^^^^^^^^^^^^^^^^^^^^^^
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:13:22
+  --> $DIR/unnecessary-transmutation.rs:12:14
+   |
+LL |     unsafe { transmute(from) }
+   |              ^^^^^^^^^^^^^^^
+   |
+help: replace this with
+   |
+LL -     unsafe { transmute(from) }
+LL +     unsafe { (from) as u8 }
+   |
+
+error: unnecessary transmute
+  --> $DIR/unnecessary-transmutation.rs:16:29
+   |
+LL | pub static X: u8 = unsafe { transmute(true) };
+   |                             ^^^^^^^^^^^^^^^
+   |
+help: replace this with
+   |
+LL - pub static X: u8 = unsafe { transmute(true) };
+LL + pub static X: u8 = unsafe { (true) as u8 };
+   |
+
+error: unnecessary transmute
+  --> $DIR/unnecessary-transmutation.rs:18:28
+   |
+LL | pub const Y: u8 = unsafe { transmute(true) };
+   |                            ^^^^^^^^^^^^^^^
+   |
+help: replace this with
+   |
+LL - pub const Y: u8 = unsafe { transmute(true) };
+LL + pub const Y: u8 = unsafe { (true) as u8 };
+   |
+
+error: unnecessary transmute
+  --> $DIR/unnecessary-transmutation.rs:24:18
+   |
+LL |         unsafe { transmute(x) }
+   |                  ^^^^^^^^^^^^
+   |
+help: replace this with
+   |
+LL -         unsafe { transmute(x) }
+LL +         unsafe { (x) as u8 }
+   |
+
+error: unnecessary transmute
+  --> $DIR/unnecessary-transmutation.rs:30:22
+   |
+LL |     const { unsafe { transmute::<_, u8>(true) } };
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: replace this with
+   |
+LL -     const { unsafe { transmute::<_, u8>(true) } };
+LL +     const { unsafe { (true) as u8 } };
+   |
+
+error: unnecessary transmute
+  --> $DIR/unnecessary-transmutation.rs:33:22
    |
 LL |         let x: u16 = transmute(*b"01");
-   |                      ^^^^^^^^^^^^^^^^^ help: replace this with: `u16::from_ne_bytes(*b"01")`
+   |                      ---------^^^^^^^^
+   |                      |
+   |                      help: replace this with: `u16::from_ne_bytes`
    |
    = help: there's also `from_le_bytes` and `from_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:15:26
+  --> $DIR/unnecessary-transmutation.rs:35:26
    |
 LL |         let x: [u8; 2] = transmute(x);
-   |                          ^^^^^^^^^^^^ help: replace this with: `u16::to_ne_bytes(x)`
+   |                          ---------^^^
+   |                          |
+   |                          help: replace this with: `u16::to_ne_bytes`
    |
    = help: there's also `to_le_bytes` and `to_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:17:22
+  --> $DIR/unnecessary-transmutation.rs:37:22
    |
 LL |         let x: u32 = transmute(*b"0123");
-   |                      ^^^^^^^^^^^^^^^^^^^ help: replace this with: `u32::from_ne_bytes(*b"0123")`
+   |                      ---------^^^^^^^^^^
+   |                      |
+   |                      help: replace this with: `u32::from_ne_bytes`
    |
    = help: there's also `from_le_bytes` and `from_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:19:26
+  --> $DIR/unnecessary-transmutation.rs:39:26
    |
 LL |         let x: [u8; 4] = transmute(x);
-   |                          ^^^^^^^^^^^^ help: replace this with: `u32::to_ne_bytes(x)`
+   |                          ---------^^^
+   |                          |
+   |                          help: replace this with: `u32::to_ne_bytes`
    |
    = help: there's also `to_le_bytes` and `to_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:21:22
+  --> $DIR/unnecessary-transmutation.rs:41:22
    |
 LL |         let x: u64 = transmute(*b"feriscat");
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `u64::from_ne_bytes(*b"feriscat")`
+   |                      ---------^^^^^^^^^^^^^^
+   |                      |
+   |                      help: replace this with: `u64::from_ne_bytes`
    |
    = help: there's also `from_le_bytes` and `from_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:23:26
+  --> $DIR/unnecessary-transmutation.rs:43:26
    |
 LL |         let x: [u8; 8] = transmute(x);
-   |                          ^^^^^^^^^^^^ help: replace this with: `u64::to_ne_bytes(x)`
+   |                          ---------^^^
+   |                          |
+   |                          help: replace this with: `u64::to_ne_bytes`
    |
    = help: there's also `to_le_bytes` and `to_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:26:22
+  --> $DIR/unnecessary-transmutation.rs:46:22
    |
 LL |         let y: i16 = transmute(*b"01");
-   |                      ^^^^^^^^^^^^^^^^^ help: replace this with: `i16::from_ne_bytes(*b"01")`
+   |                      ---------^^^^^^^^
+   |                      |
+   |                      help: replace this with: `i16::from_ne_bytes`
    |
    = help: there's also `from_le_bytes` and `from_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:28:26
+  --> $DIR/unnecessary-transmutation.rs:48:26
    |
 LL |         let y: [u8; 2] = transmute(y);
-   |                          ^^^^^^^^^^^^ help: replace this with: `i16::to_ne_bytes(y)`
+   |                          ---------^^^
+   |                          |
+   |                          help: replace this with: `i16::to_ne_bytes`
    |
    = help: there's also `to_le_bytes` and `to_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:30:22
+  --> $DIR/unnecessary-transmutation.rs:50:22
    |
 LL |         let y: i32 = transmute(*b"0123");
-   |                      ^^^^^^^^^^^^^^^^^^^ help: replace this with: `i32::from_ne_bytes(*b"0123")`
+   |                      ---------^^^^^^^^^^
+   |                      |
+   |                      help: replace this with: `i32::from_ne_bytes`
    |
    = help: there's also `from_le_bytes` and `from_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:32:26
+  --> $DIR/unnecessary-transmutation.rs:52:26
    |
 LL |         let y: [u8; 4] = transmute(y);
-   |                          ^^^^^^^^^^^^ help: replace this with: `i32::to_ne_bytes(y)`
+   |                          ---------^^^
+   |                          |
+   |                          help: replace this with: `i32::to_ne_bytes`
    |
    = help: there's also `to_le_bytes` and `to_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:34:22
+  --> $DIR/unnecessary-transmutation.rs:54:22
    |
 LL |         let y: i64 = transmute(*b"feriscat");
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `i64::from_ne_bytes(*b"feriscat")`
+   |                      ---------^^^^^^^^^^^^^^
+   |                      |
+   |                      help: replace this with: `i64::from_ne_bytes`
    |
    = help: there's also `from_le_bytes` and `from_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:36:26
+  --> $DIR/unnecessary-transmutation.rs:56:26
    |
 LL |         let y: [u8; 8] = transmute(y);
-   |                          ^^^^^^^^^^^^ help: replace this with: `i64::to_ne_bytes(y)`
+   |                          ---------^^^
+   |                          |
+   |                          help: replace this with: `i64::to_ne_bytes`
    |
    = help: there's also `to_le_bytes` and `to_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:39:22
+  --> $DIR/unnecessary-transmutation.rs:59:22
    |
 LL |         let z: f32 = transmute(*b"0123");
-   |                      ^^^^^^^^^^^^^^^^^^^ help: replace this with: `f32::from_ne_bytes(*b"0123")`
+   |                      ---------^^^^^^^^^^
+   |                      |
+   |                      help: replace this with: `f32::from_ne_bytes`
    |
    = help: there's also `from_le_bytes` and `from_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:41:26
+  --> $DIR/unnecessary-transmutation.rs:61:26
    |
 LL |         let z: [u8; 4] = transmute(z);
-   |                          ^^^^^^^^^^^^ help: replace this with: `f32::to_ne_bytes(z)`
+   |                          ---------^^^
+   |                          |
+   |                          help: replace this with: `f32::to_ne_bytes`
    |
    = help: there's also `to_le_bytes` and `to_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:43:22
+  --> $DIR/unnecessary-transmutation.rs:63:22
    |
 LL |         let z: f64 = transmute(*b"feriscat");
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `f64::from_ne_bytes(*b"feriscat")`
+   |                      ---------^^^^^^^^^^^^^^
+   |                      |
+   |                      help: replace this with: `f64::from_ne_bytes`
    |
    = help: there's also `from_le_bytes` and `from_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:45:26
+  --> $DIR/unnecessary-transmutation.rs:65:26
    |
 LL |         let z: [u8; 8] = transmute(z);
-   |                          ^^^^^^^^^^^^ help: replace this with: `f64::to_ne_bytes(z)`
+   |                          ---------^^^
+   |                          |
+   |                          help: replace this with: `f64::to_ne_bytes`
    |
    = help: there's also `to_le_bytes` and `to_be_bytes` if you expect a particular byte order
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:48:22
+  --> $DIR/unnecessary-transmutation.rs:68:22
    |
 LL |         let y: u32 = transmute('🦀');
-   |                      ^^^^^^^^^^^^^^^ help: replace this with: `u32::from('🦀')`
+   |                      ---------^^^^^^
+   |                      |
+   |                      help: replace this with: `u32::from`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:50:23
+  --> $DIR/unnecessary-transmutation.rs:70:23
    |
 LL |         let y: char = transmute(y);
-   |                       ^^^^^^^^^^^^ help: replace this with: `char::from_u32_unchecked(y)`
+   |                       ---------^^^
+   |                       |
+   |                       help: replace this with: `char::from_u32_unchecked`
    |
-   = help: consider `char::from_u32(…).unwrap()`
+   = help: consider using `char::from_u32(…).unwrap()`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:52:22
+  --> $DIR/unnecessary-transmutation.rs:72:22
    |
 LL |         let y: i32 = transmute('🐱');
-   |                      ^^^^^^^^^^^^^^^ help: replace this with: `u32::from('🐱').cast_signed()`
+   |                      ^^^^^^^^^^^^^^^
+   |
+help: replace this with
+   |
+LL -         let y: i32 = transmute('🐱');
+LL +         let y: i32 = u32::from('🐱').cast_signed();
+   |
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:54:23
+  --> $DIR/unnecessary-transmutation.rs:74:23
    |
 LL |         let y: char = transmute(y);
-   |                       ^^^^^^^^^^^^ help: replace this with: `char::from_u32_unchecked(i32::cast_unsigned(y))`
+   |                       ^^^^^^^^^^^^
+   |
+   = help: consider using `char::from_u32(i32::cast_unsigned(…)).unwrap()`
+help: replace this with
+   |
+LL -         let y: char = transmute(y);
+LL +         let y: char = char::from_u32_unchecked(i32::cast_unsigned(y));
    |
-   = help: consider `char::from_u32(i32::cast_unsigned(…)).unwrap()`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:57:22
+  --> $DIR/unnecessary-transmutation.rs:77:22
    |
 LL |         let x: u16 = transmute(8i16);
-   |                      ^^^^^^^^^^^^^^^ help: replace this with: `i16::cast_unsigned(8i16)`
+   |                      ---------^^^^^^
+   |                      |
+   |                      help: replace this with: `i16::cast_unsigned`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:59:22
+  --> $DIR/unnecessary-transmutation.rs:79:22
    |
 LL |         let x: i16 = transmute(x);
-   |                      ^^^^^^^^^^^^ help: replace this with: `u16::cast_signed(x)`
+   |                      ---------^^^
+   |                      |
+   |                      help: replace this with: `u16::cast_signed`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:61:22
+  --> $DIR/unnecessary-transmutation.rs:81:22
    |
 LL |         let x: u32 = transmute(4i32);
-   |                      ^^^^^^^^^^^^^^^ help: replace this with: `i32::cast_unsigned(4i32)`
+   |                      ---------^^^^^^
+   |                      |
+   |                      help: replace this with: `i32::cast_unsigned`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:63:22
+  --> $DIR/unnecessary-transmutation.rs:83:22
    |
 LL |         let x: i32 = transmute(x);
-   |                      ^^^^^^^^^^^^ help: replace this with: `u32::cast_signed(x)`
+   |                      ---------^^^
+   |                      |
+   |                      help: replace this with: `u32::cast_signed`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:65:22
+  --> $DIR/unnecessary-transmutation.rs:85:22
    |
 LL |         let x: u64 = transmute(7i64);
-   |                      ^^^^^^^^^^^^^^^ help: replace this with: `i64::cast_unsigned(7i64)`
+   |                      ---------^^^^^^
+   |                      |
+   |                      help: replace this with: `i64::cast_unsigned`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:67:22
+  --> $DIR/unnecessary-transmutation.rs:87:22
    |
 LL |         let x: i64 = transmute(x);
-   |                      ^^^^^^^^^^^^ help: replace this with: `u64::cast_signed(x)`
+   |                      ---------^^^
+   |                      |
+   |                      help: replace this with: `u64::cast_signed`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:70:22
+  --> $DIR/unnecessary-transmutation.rs:90:22
    |
 LL |         let y: f32 = transmute(1u32);
-   |                      ^^^^^^^^^^^^^^^ help: replace this with: `f32::from_bits(1u32)`
+   |                      ---------^^^^^^
+   |                      |
+   |                      help: replace this with: `f32::from_bits`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:72:22
+  --> $DIR/unnecessary-transmutation.rs:92:22
    |
 LL |         let y: u32 = transmute(y);
-   |                      ^^^^^^^^^^^^ help: replace this with: `f32::to_bits(y)`
+   |                      ---------^^^
+   |                      |
+   |                      help: replace this with: `f32::to_bits`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:74:22
+  --> $DIR/unnecessary-transmutation.rs:94:22
    |
 LL |         let y: f64 = transmute(3u64);
-   |                      ^^^^^^^^^^^^^^^ help: replace this with: `f64::from_bits(3u64)`
+   |                      ---------^^^^^^
+   |                      |
+   |                      help: replace this with: `f64::from_bits`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:76:22
+  --> $DIR/unnecessary-transmutation.rs:96:22
    |
 LL |         let y: u64 = transmute(2.0);
-   |                      ^^^^^^^^^^^^^^ help: replace this with: `f64::to_bits(2.0)`
+   |                      ---------^^^^^
+   |                      |
+   |                      help: replace this with: `f64::to_bits`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:79:22
+  --> $DIR/unnecessary-transmutation.rs:99:22
    |
 LL |         let y: f64 = transmute(1i64);
-   |                      ^^^^^^^^^^^^^^^ help: replace this with: `f64::from_bits(i64::cast_unsigned(1i64))`
+   |                      ^^^^^^^^^^^^^^^
+   |
+help: replace this with
+   |
+LL -         let y: f64 = transmute(1i64);
+LL +         let y: f64 = f64::from_bits(i64::cast_unsigned(1i64));
+   |
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:81:22
+  --> $DIR/unnecessary-transmutation.rs:101:22
    |
 LL |         let y: i64 = transmute(1f64);
-   |                      ^^^^^^^^^^^^^^^ help: replace this with: `f64::to_bits(1f64).cast_signed()`
-
-error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:84:23
+   |                      ^^^^^^^^^^^^^^^
+   |
+help: replace this with
+   |
+LL -         let y: i64 = transmute(1f64);
+LL +         let y: i64 = f64::to_bits(1f64).cast_signed();
    |
-LL |         let z: bool = transmute(1u8);
-   |                       ^^^^^^^^^^^^^^ help: replace this with: `(1u8 == 1)`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:86:21
+  --> $DIR/unnecessary-transmutation.rs:106:21
    |
 LL |         let z: u8 = transmute(z);
-   |                     ^^^^^^^^^^^^ help: replace this with: `(z) as u8`
+   |                     ---------^^^
+   |                     |
+   |                     help: replace this with: `u8::from`
 
 error: unnecessary transmute
-  --> $DIR/unnecessary-transmutation.rs:91:21
+  --> $DIR/unnecessary-transmutation.rs:111:21
    |
 LL |         let z: i8 = transmute(z);
-   |                     ^^^^^^^^^^^^ help: replace this with: `(z) as i8`
+   |                     ---------^^^
+   |                     |
+   |                     help: replace this with: `i8::from`
 
-error: aborting due to 36 previous errors
+error: aborting due to 40 previous errors
 
diff --git a/tests/ui/treat-err-as-bug/err.rs b/tests/ui/treat-err-as-bug/err.rs
index 7868c06fee1..6f0e3c55fbb 100644
--- a/tests/ui/treat-err-as-bug/err.rs
+++ b/tests/ui/treat-err-as-bug/err.rs
@@ -7,7 +7,7 @@
 #![crate_type = "rlib"]
 
 pub static C: u32 = 0 - 1;
-//~^ ERROR could not evaluate static initializer
+//~^ ERROR attempt to compute `0_u32 - 1_u32`, which would overflow
 
 //~? RAW aborting due to `-Z treat-err-as-bug=1`
 //~? RAW [eval_static_initializer] evaluating initializer of static `C`
diff --git a/tests/ui/treat-err-as-bug/err.stderr b/tests/ui/treat-err-as-bug/err.stderr
index 2049df22000..3279392e1f4 100644
--- a/tests/ui/treat-err-as-bug/err.stderr
+++ b/tests/ui/treat-err-as-bug/err.stderr
@@ -1,8 +1,8 @@
-error: internal compiler error[E0080]: could not evaluate static initializer
+error: internal compiler error[E0080]: attempt to compute `0_u32 - 1_u32`, which would overflow
   --> $DIR/err.rs:9:21
    |
 LL | pub static C: u32 = 0 - 1;
-   |                     ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
+   |                     ^^^^^ evaluation of static initializer failed here
 
 
 error: the compiler unexpectedly panicked. this is a bug.
diff --git a/tests/ui/type-alias-impl-trait/in-where-clause.stderr b/tests/ui/type-alias-impl-trait/in-where-clause.stderr
index 9fcb26c20a6..81be8c8362e 100644
--- a/tests/ui/type-alias-impl-trait/in-where-clause.stderr
+++ b/tests/ui/type-alias-impl-trait/in-where-clause.stderr
@@ -62,6 +62,11 @@ LL | / fn foo() -> Bar
 LL | | where
 LL | |     Bar: Send,
    | |______________^
+note: ...which requires computing revealed normalized predicates of `foo::{constant#0}`...
+  --> $DIR/in-where-clause.rs:13:9
+   |
+LL |     [0; 1 + 2]
+   |         ^^^^^
    = note: ...which requires revealing opaque types in `[Binder { value: TraitPredicate(<Bar as core::marker::Send>, polarity:Positive), bound_vars: [] }]`...
 note: ...which requires computing type of `Bar::{opaque#0}`...
   --> $DIR/in-where-clause.rs:5:12
diff --git a/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.rs b/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.rs
index ef6871bec7c..0aaee5d1764 100644
--- a/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.rs
+++ b/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.rs
@@ -1,10 +1,10 @@
 #![feature(type_alias_impl_trait)]
 
 type T = impl Copy;
-//~^ ERROR cannot resolve opaque type
 
 #[define_opaque(T)]
 fn foo() -> T {
+    //~^ ERROR cannot resolve opaque type
     None::<&'static T>
 }
 
diff --git a/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr b/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr
index d820df472f9..426a6c29fff 100644
--- a/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr
+++ b/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr
@@ -1,8 +1,8 @@
 error[E0720]: cannot resolve opaque type
-  --> $DIR/infinite-cycle-involving-weak.rs:3:10
+  --> $DIR/infinite-cycle-involving-weak.rs:6:13
    |
-LL | type T = impl Copy;
-   |          ^^^^^^^^^ cannot resolve opaque type
+LL | fn foo() -> T {
+   |             ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs b/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs
index f02ccbbb93c..b258d2e156d 100644
--- a/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs
+++ b/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs
@@ -1,4 +1,4 @@
-#![feature(coroutines, coroutine_trait, rustc_attrs)]
+#![feature(coroutines, coroutine_trait, rustc_attrs, const_async_blocks)]
 #![feature(type_alias_impl_trait)]
 
 //@ check-pass
diff --git a/tests/ui/type-alias-impl-trait/match-upvar-discriminant-of-opaque.rs b/tests/ui/type-alias-impl-trait/match-upvar-discriminant-of-opaque.rs
new file mode 100644
index 00000000000..f4e2cb0c037
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/match-upvar-discriminant-of-opaque.rs
@@ -0,0 +1,12 @@
+#![feature(type_alias_impl_trait)]
+
+fn enum_upvar() {
+    type T = impl Copy;
+    let foo: T = Some((42, std::marker::PhantomData::<T>));
+    let x = move || match foo {
+        None => (),
+        //~^ ERROR cannot resolve opaque type
+    };
+}
+
+fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/match-upvar-discriminant-of-opaque.stderr b/tests/ui/type-alias-impl-trait/match-upvar-discriminant-of-opaque.stderr
new file mode 100644
index 00000000000..2bfce2d63a8
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/match-upvar-discriminant-of-opaque.stderr
@@ -0,0 +1,9 @@
+error[E0720]: cannot resolve opaque type
+  --> $DIR/match-upvar-discriminant-of-opaque.rs:7:9
+   |
+LL |         None => (),
+   |         ^^^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/type-alias-impl-trait/recursive-fn-tait.rs b/tests/ui/type-alias-impl-trait/recursive-fn-tait.rs
index 94597adfed0..fe354cc6545 100644
--- a/tests/ui/type-alias-impl-trait/recursive-fn-tait.rs
+++ b/tests/ui/type-alias-impl-trait/recursive-fn-tait.rs
@@ -13,7 +13,7 @@ pub fn add(
     n: Diff,
     m: Diff,
 ) -> Diff {
-    //~^ ERROR concrete type differs
+    //~^ ERROR cannot resolve opaque type
     move |x: usize| m(n(x))
 }
 
diff --git a/tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr b/tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr
index 59ff9917612..847f1cc6c2e 100644
--- a/tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr
+++ b/tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr
@@ -1,14 +1,9 @@
-error: concrete type differs from previous defining opaque type use
+error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-fn-tait.rs:15:6
    |
 LL | ) -> Diff {
-   |      ^^^^ expected `{closure@$DIR/recursive-fn-tait.rs:8:5: 8:16}`, got `{closure@$DIR/recursive-fn-tait.rs:17:5: 17:20}`
-   |
-note: previous use here
-  --> $DIR/recursive-fn-tait.rs:7:18
-   |
-LL | pub fn lift() -> Diff {
-   |                  ^^^^
+   |      ^^^^
 
 error: aborting due to 1 previous error
 
+For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.rs b/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.rs
index 858f2a2feb6..7803b3b78db 100644
--- a/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.rs
+++ b/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.rs
@@ -13,7 +13,7 @@ fn transform<S>() -> impl std::fmt::Display {
 }
 #[define_opaque(Op)]
 fn bad() -> Op {
-    //~^ ERROR concrete type differs from previous defining opaque type use
+    //~^ ERROR cannot resolve opaque type
     transform::<Op>()
 }
 
diff --git a/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.stderr b/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.stderr
index e527b5bc7f8..837df7f5d43 100644
--- a/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.stderr
+++ b/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn-2.stderr
@@ -1,14 +1,9 @@
-error: concrete type differs from previous defining opaque type use
+error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-tait-conflicting-defn-2.rs:15:13
    |
 LL | fn bad() -> Op {
-   |             ^^ expected `&&str`, got `impl std::fmt::Display`
-   |
-note: previous use here
-  --> $DIR/recursive-tait-conflicting-defn-2.rs:7:13
-   |
-LL | fn foo() -> Op {
    |             ^^
 
 error: aborting due to 1 previous error
 
+For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.rs b/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.rs
index 90581a98a34..d66ceda5234 100644
--- a/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.rs
+++ b/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.rs
@@ -23,7 +23,7 @@ pub fn test() -> TestImpl {
 
 #[define_opaque(TestImpl)]
 fn make_option2() -> Option<TestImpl> {
-    //~^ ERROR concrete type differs from previous defining opaque type use
+    //~^ ERROR cannot resolve opaque type
     let inner = make_option().unwrap();
     Some(B { inner })
 }
diff --git a/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.stderr b/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.stderr
index 256f13b6221..c7a3381d615 100644
--- a/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.stderr
+++ b/tests/ui/type-alias-impl-trait/recursive-tait-conflicting-defn.stderr
@@ -1,14 +1,9 @@
-error: concrete type differs from previous defining opaque type use
+error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-tait-conflicting-defn.rs:25:22
    |
 LL | fn make_option2() -> Option<TestImpl> {
-   |                      ^^^^^^^^^^^^^^^^ expected `A`, got `B<TestImpl>`
-   |
-note: previous use here
-  --> $DIR/recursive-tait-conflicting-defn.rs:20:18
-   |
-LL | pub fn test() -> TestImpl {
-   |                  ^^^^^^^^
+   |                      ^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
+For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/type/pattern_types/literals.rs b/tests/ui/type/pattern_types/literals.rs
index b2a83a2a8bd..fbca421aa9a 100644
--- a/tests/ui/type/pattern_types/literals.rs
+++ b/tests/ui/type/pattern_types/literals.rs
@@ -84,12 +84,12 @@ fn single_element_range_exclusive() -> pattern_type!(u32 is 0..1) {
 }
 
 fn empty_range_at_base_type_min() -> pattern_type!(u32 is 0..0) {
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR evaluation panicked: exclusive range end at minimum value of type
     0
 }
 
 fn empty_range_at_base_type_min2() -> pattern_type!(u32 is 0..0) {
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR evaluation panicked: exclusive range end at minimum value of type
     1
 }
 
@@ -104,17 +104,17 @@ fn empty_range2() -> pattern_type!(u32 is 1..1) {
 }
 
 fn wraparound_range_at_base_ty_end() -> pattern_type!(u32 is 1..0) {
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR evaluation panicked: exclusive range end at minimum value of type
     1
 }
 
 fn wraparound_range_at_base_ty_end2() -> pattern_type!(u32 is 1..0) {
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR evaluation panicked: exclusive range end at minimum value of type
     0
 }
 
 fn wraparound_range_at_base_ty_end3() -> pattern_type!(u32 is 1..0) {
-    //~^ ERROR evaluation of constant value failed
+    //~^ ERROR evaluation panicked: exclusive range end at minimum value of type
     2
 }
 
diff --git a/tests/ui/type/pattern_types/literals.stderr b/tests/ui/type/pattern_types/literals.stderr
index 5c926742f3c..72c812ed3ba 100644
--- a/tests/ui/type/pattern_types/literals.stderr
+++ b/tests/ui/type/pattern_types/literals.stderr
@@ -1,32 +1,32 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: exclusive range end at minimum value of type
   --> $DIR/literals.rs:86:62
    |
 LL | fn empty_range_at_base_type_min() -> pattern_type!(u32 is 0..0) {
-   |                                                              ^ evaluation panicked: exclusive range end at minimum value of type
+   |                                                              ^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: exclusive range end at minimum value of type
   --> $DIR/literals.rs:91:63
    |
 LL | fn empty_range_at_base_type_min2() -> pattern_type!(u32 is 0..0) {
-   |                                                               ^ evaluation panicked: exclusive range end at minimum value of type
+   |                                                               ^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: exclusive range end at minimum value of type
   --> $DIR/literals.rs:106:65
    |
 LL | fn wraparound_range_at_base_ty_end() -> pattern_type!(u32 is 1..0) {
-   |                                                                 ^ evaluation panicked: exclusive range end at minimum value of type
+   |                                                                 ^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: exclusive range end at minimum value of type
   --> $DIR/literals.rs:111:66
    |
 LL | fn wraparound_range_at_base_ty_end2() -> pattern_type!(u32 is 1..0) {
-   |                                                                  ^ evaluation panicked: exclusive range end at minimum value of type
+   |                                                                  ^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: exclusive range end at minimum value of type
   --> $DIR/literals.rs:116:66
    |
 LL | fn wraparound_range_at_base_ty_end3() -> pattern_type!(u32 is 1..0) {
-   |                                                                  ^ evaluation panicked: exclusive range end at minimum value of type
+   |                                                                  ^ evaluation of constant value failed here
 
 error[E0308]: mismatched types
   --> $DIR/literals.rs:9:5
diff --git a/tests/ui/type/pattern_types/range_patterns.rs b/tests/ui/type/pattern_types/range_patterns.rs
index 21c1454d6cd..86b618a8d24 100644
--- a/tests/ui/type/pattern_types/range_patterns.rs
+++ b/tests/ui/type/pattern_types/range_patterns.rs
@@ -23,7 +23,7 @@ type EMPTY = pattern_type!(u32 is 1..1); //~ ERROR unknown layout
 
 #[rustc_layout(debug)]
 type WRAP = pattern_type!(u32 is 1..0); //~ ERROR unknown layout
-//~^ ERROR: evaluation of constant value failed
+//~^ ERROR: evaluation panicked: exclusive range end at minimum value of type
 
 #[rustc_layout(debug)]
 type WRAP2 = pattern_type!(u32 is 5..2); //~ ERROR unknown layout
diff --git a/tests/ui/type/pattern_types/range_patterns.stderr b/tests/ui/type/pattern_types/range_patterns.stderr
index a05995a33f9..bcb602a70dd 100644
--- a/tests/ui/type/pattern_types/range_patterns.stderr
+++ b/tests/ui/type/pattern_types/range_patterns.stderr
@@ -365,11 +365,11 @@ error: the type has an unknown layout
 LL | type EMPTY = pattern_type!(u32 is 1..1);
    | ^^^^^^^^^^
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: exclusive range end at minimum value of type
   --> $DIR/range_patterns.rs:25:37
    |
 LL | type WRAP = pattern_type!(u32 is 1..0);
-   |                                     ^ evaluation panicked: exclusive range end at minimum value of type
+   |                                     ^ evaluation of constant value failed here
 
 error: the type has an unknown layout
   --> $DIR/range_patterns.rs:25:1
diff --git a/tests/ui/type/pattern_types/reverse_range.rs b/tests/ui/type/pattern_types/reverse_range.rs
index e698e9dd541..34c931e4e96 100644
--- a/tests/ui/type/pattern_types/reverse_range.rs
+++ b/tests/ui/type/pattern_types/reverse_range.rs
@@ -5,7 +5,6 @@
 use std::pat::pattern_type;
 
 const NONE: pattern_type!(u8 is 1..0) = unsafe { std::mem::transmute(3_u8) };
-//~^ NOTE: exclusive range end at minimum value of type
-//~| ERROR: evaluation of constant value failed
+//~^ ERROR: exclusive range end at minimum value of type
 
 fn main() {}
diff --git a/tests/ui/type/pattern_types/reverse_range.stderr b/tests/ui/type/pattern_types/reverse_range.stderr
index 90f8ef3261a..8f5b86c7db9 100644
--- a/tests/ui/type/pattern_types/reverse_range.stderr
+++ b/tests/ui/type/pattern_types/reverse_range.stderr
@@ -1,8 +1,8 @@
-error[E0080]: evaluation of constant value failed
+error[E0080]: evaluation panicked: exclusive range end at minimum value of type
   --> $DIR/reverse_range.rs:7:36
    |
 LL | const NONE: pattern_type!(u8 is 1..0) = unsafe { std::mem::transmute(3_u8) };
-   |                                    ^ evaluation panicked: exclusive range end at minimum value of type
+   |                                    ^ evaluation of constant value failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/type/pattern_types/validity.rs b/tests/ui/type/pattern_types/validity.rs
index c61bb71ac25..a4e49692c98 100644
--- a/tests/ui/type/pattern_types/validity.rs
+++ b/tests/ui/type/pattern_types/validity.rs
@@ -8,32 +8,32 @@
 use std::pat::pattern_type;
 
 const BAD: pattern_type!(u32 is 1..) = unsafe { std::mem::transmute(0) };
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: constructing invalid value: encountered 0
 
 const BAD_UNINIT: pattern_type!(u32 is 1..) =
-    //~^ ERROR: evaluation of constant value failed
+    //~^ ERROR: using uninitialized data, but this operation requires initialized memory
     unsafe { std::mem::transmute(std::mem::MaybeUninit::<u32>::uninit()) };
 
 const BAD_PTR: pattern_type!(usize is 1..) = unsafe { std::mem::transmute(&42) };
-//~^ ERROR: evaluation of constant value failed
+//~^ ERROR: unable to turn pointer into integer
 
 const BAD_AGGREGATE: (pattern_type!(u32 is 1..), u32) = (unsafe { std::mem::transmute(0) }, 0);
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: constructing invalid value at .0: encountered 0
 
 struct Foo(Bar);
 struct Bar(pattern_type!(u32 is 1..));
 
 const BAD_FOO: Foo = Foo(Bar(unsafe { std::mem::transmute(0) }));
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: constructing invalid value at .0.0: encountered 0
 
 const CHAR_UNINIT: pattern_type!(char is 'A'..'Z') =
-    //~^ ERROR: evaluation of constant value failed
+    //~^ ERROR: using uninitialized data, but this operation requires initialized memory
     unsafe { std::mem::transmute(std::mem::MaybeUninit::<u32>::uninit()) };
 
 const CHAR_OOB_PAT: pattern_type!(char is 'A'..'Z') = unsafe { std::mem::transmute('a') };
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: constructing invalid value: encountered 97, but expected something in the range 65..=89
 
 const CHAR_OOB: pattern_type!(char is 'A'..'Z') = unsafe { std::mem::transmute(u32::MAX) };
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: constructing invalid value: encountered 0xffffffff
 
 fn main() {}
diff --git a/tests/ui/type/pattern_types/validity.stderr b/tests/ui/type/pattern_types/validity.stderr
index b990ec2d368..7ba73aacc24 100644
--- a/tests/ui/type/pattern_types/validity.stderr
+++ b/tests/ui/type/pattern_types/validity.stderr
@@ -1,73 +1,73 @@
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 0, but expected something greater or equal to 1
   --> $DIR/validity.rs:10:1
    |
 LL | const BAD: pattern_type!(u32 is 1..) = unsafe { std::mem::transmute(0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                HEX_DUMP
            }
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/validity.rs:13:1
    |
 LL | const BAD_UNINIT: pattern_type!(u32 is 1..) =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: unable to turn pointer into integer
   --> $DIR/validity.rs:17:1
    |
 LL | const BAD_PTR: pattern_type!(usize is 1..) = unsafe { std::mem::transmute(&42) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
   --> $DIR/validity.rs:20:1
    |
 LL | const BAD_AGGREGATE: (pattern_type!(u32 is 1..), u32) = (unsafe { std::mem::transmute(0) }, 0);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 4) {
                HEX_DUMP
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value at .0.0: encountered 0, but expected something greater or equal to 1
   --> $DIR/validity.rs:26:1
    |
 LL | const BAD_FOO: Foo = Foo(Bar(unsafe { std::mem::transmute(0) }));
-   | ^^^^^^^^^^^^^^^^^^ constructing invalid value at .0.0: encountered 0, but expected something greater or equal to 1
+   | ^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                HEX_DUMP
            }
 
-error[E0080]: evaluation of constant value failed
+error[E0080]: using uninitialized data, but this operation requires initialized memory
   --> $DIR/validity.rs:29:1
    |
 LL | const CHAR_UNINIT: pattern_type!(char is 'A'..'Z') =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed here
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 97, but expected something in the range 65..=89
   --> $DIR/validity.rs:33:1
    |
 LL | const CHAR_OOB_PAT: pattern_type!(char is 'A'..'Z') = unsafe { std::mem::transmute('a') };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 97, but expected something in the range 65..=89
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
                HEX_DUMP
            }
 
-error[E0080]: it is undefined behavior to use this value
+error[E0080]: constructing invalid value: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
   --> $DIR/validity.rs:36:1
    |
 LL | const CHAR_OOB: pattern_type!(char is 'A'..'Z') = unsafe { std::mem::transmute(u32::MAX) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 4, align: 4) {
diff --git a/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.rs b/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.rs
index 444453dc694..b877ef569f6 100644
--- a/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.rs
+++ b/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.rs
@@ -13,5 +13,4 @@ fn main() {
     let x: i32 = 5;
     let y = x as dyn MyAdd<i32>;
     //~^ ERROR E0038
-    //~| ERROR cast to unsized type: `i32` as `dyn MyAdd<i32>`
 }
diff --git a/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr b/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr
index eea2e75a238..33478740d65 100644
--- a/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr
+++ b/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr
@@ -1,20 +1,8 @@
-error[E0620]: cast to unsized type: `i32` as `dyn MyAdd<i32>`
-  --> $DIR/type-parameter-defaults-referencing-Self-ppaux.rs:14:13
-   |
-LL |     let y = x as dyn MyAdd<i32>;
-   |             ^^^^^^^^^^^^^^^^^^^
-   |
-help: consider using a box or reference as appropriate
-  --> $DIR/type-parameter-defaults-referencing-Self-ppaux.rs:14:13
-   |
-LL |     let y = x as dyn MyAdd<i32>;
-   |             ^
-
 error[E0038]: the trait `MyAdd` is not dyn compatible
-  --> $DIR/type-parameter-defaults-referencing-Self-ppaux.rs:14:18
+  --> $DIR/type-parameter-defaults-referencing-Self-ppaux.rs:14:22
    |
 LL |     let y = x as dyn MyAdd<i32>;
-   |                  ^^^^^^^^^^^^^^ `MyAdd` is not dyn compatible
+   |                      ^^^^^^^^^^ `MyAdd` 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>
@@ -25,7 +13,6 @@ LL | trait MyAdd<Rhs=Self> { fn add(&self, other: &Rhs) -> Self; }
    = help: consider moving `add` to another trait
    = help: only type `i32` implements `MyAdd`; consider using it directly instead.
 
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0038, E0620.
-For more information about an error, try `rustc --explain E0038`.
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/typeck/closure-ty-mismatch-issue-128561.rs b/tests/ui/typeck/closure-ty-mismatch-issue-128561.rs
new file mode 100644
index 00000000000..589a90e71d6
--- /dev/null
+++ b/tests/ui/typeck/closure-ty-mismatch-issue-128561.rs
@@ -0,0 +1,10 @@
+fn main() {
+    b"abc".iter().for_each(|x| x); //~ ERROR: mismatched types
+
+    b"abc".iter().for_each(|x| dbg!(x)); //~ ERROR: mismatched types
+
+    b"abc".iter().for_each(|x| {
+        println!("{}", x);
+        x //~ ERROR: mismatched types
+    })
+}
diff --git a/tests/ui/typeck/closure-ty-mismatch-issue-128561.stderr b/tests/ui/typeck/closure-ty-mismatch-issue-128561.stderr
new file mode 100644
index 00000000000..31acc5bb10e
--- /dev/null
+++ b/tests/ui/typeck/closure-ty-mismatch-issue-128561.stderr
@@ -0,0 +1,28 @@
+error[E0308]: mismatched types
+  --> $DIR/closure-ty-mismatch-issue-128561.rs:2:32
+   |
+LL |     b"abc".iter().for_each(|x| x);
+   |                                ^ expected `()`, found `&u8`
+   |
+help: consider ignoring the value
+   |
+LL |     b"abc".iter().for_each(|x| _ = x);
+   |                                +++
+
+error[E0308]: mismatched types
+  --> $DIR/closure-ty-mismatch-issue-128561.rs:4:32
+   |
+LL |     b"abc".iter().for_each(|x| dbg!(x));
+   |                                ^^^^^^^ expected `()`, found `&u8`
+   |
+   = note: this error originates in the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0308]: mismatched types
+  --> $DIR/closure-ty-mismatch-issue-128561.rs:8:9
+   |
+LL |         x
+   |         ^ expected `()`, found `&u8`
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/consider-borrowing-141810-1.rs b/tests/ui/typeck/consider-borrowing-141810-1.rs
new file mode 100644
index 00000000000..94c2d690915
--- /dev/null
+++ b/tests/ui/typeck/consider-borrowing-141810-1.rs
@@ -0,0 +1,9 @@
+fn main() {
+    let x = if true {
+        &true
+    } else if false { //~ ERROR `if` and `else` have incompatible types [E0308]
+        true //~ HELP consider borrowing here
+    } else {
+        true
+    };
+}
diff --git a/tests/ui/typeck/consider-borrowing-141810-1.stderr b/tests/ui/typeck/consider-borrowing-141810-1.stderr
new file mode 100644
index 00000000000..9291721ac71
--- /dev/null
+++ b/tests/ui/typeck/consider-borrowing-141810-1.stderr
@@ -0,0 +1,28 @@
+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`
+   |
+help: consider borrowing here
+   |
+LL ~         &true
+LL |     } else {
+LL ~         &true
+   |
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/consider-borrowing-141810-2.rs b/tests/ui/typeck/consider-borrowing-141810-2.rs
new file mode 100644
index 00000000000..e32e689efb7
--- /dev/null
+++ b/tests/ui/typeck/consider-borrowing-141810-2.rs
@@ -0,0 +1,8 @@
+fn main() {
+    let x = if true {
+        &()
+    } else if false { //~ ERROR `if` and `else` have incompatible types [E0308]
+    } else {
+    };
+
+}
diff --git a/tests/ui/typeck/consider-borrowing-141810-2.stderr b/tests/ui/typeck/consider-borrowing-141810-2.stderr
new file mode 100644
index 00000000000..dd229897283
--- /dev/null
+++ b/tests/ui/typeck/consider-borrowing-141810-2.stderr
@@ -0,0 +1,19 @@
+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 `()`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/consider-borrowing-141810-3.rs b/tests/ui/typeck/consider-borrowing-141810-3.rs
new file mode 100644
index 00000000000..d38828de7c1
--- /dev/null
+++ b/tests/ui/typeck/consider-borrowing-141810-3.rs
@@ -0,0 +1,7 @@
+fn main() {
+    let x = if true {
+        &()
+    } else if false { //~ ERROR `if` and `else` have incompatible types [E0308]
+
+    };
+}
diff --git a/tests/ui/typeck/consider-borrowing-141810-3.stderr b/tests/ui/typeck/consider-borrowing-141810-3.stderr
new file mode 100644
index 00000000000..0b0c5f191a0
--- /dev/null
+++ b/tests/ui/typeck/consider-borrowing-141810-3.stderr
@@ -0,0 +1,22 @@
+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 `()`
+   |
+   = note: `if` expressions without `else` evaluate to `()`
+   = note: consider adding an `else` block that evaluates to the expected type
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/consider-borrowing-141810-4.rs b/tests/ui/typeck/consider-borrowing-141810-4.rs
new file mode 100644
index 00000000000..754af7920a8
--- /dev/null
+++ b/tests/ui/typeck/consider-borrowing-141810-4.rs
@@ -0,0 +1,11 @@
+fn baz(x: &String) {}
+
+fn bar() {
+    baz({
+        String::from("hi") //~ ERROR mismatched types
+    });
+}
+
+fn main() {
+    bar();
+}
diff --git a/tests/ui/typeck/consider-borrowing-141810-4.stderr b/tests/ui/typeck/consider-borrowing-141810-4.stderr
new file mode 100644
index 00000000000..80869d4a5d5
--- /dev/null
+++ b/tests/ui/typeck/consider-borrowing-141810-4.stderr
@@ -0,0 +1,14 @@
+error[E0308]: mismatched types
+  --> $DIR/consider-borrowing-141810-4.rs:5:9
+   |
+LL |         String::from("hi")
+   |         ^^^^^^^^^^^^^^^^^^ expected `&String`, found `String`
+   |
+help: consider borrowing here
+   |
+LL |         &String::from("hi")
+   |         +
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/ice-unexpected-region-123863.stderr b/tests/ui/typeck/ice-unexpected-region-123863.stderr
index 8a4d767c143..e5050b4d316 100644
--- a/tests/ui/typeck/ice-unexpected-region-123863.stderr
+++ b/tests/ui/typeck/ice-unexpected-region-123863.stderr
@@ -39,7 +39,7 @@ LL |     Inner::concat_strs::<"a">::A
 help: if there were a trait named `Example` with associated type `concat_strs` implemented for `Inner<_>`, you could use the fully-qualified path
    |
 LL -     Inner::concat_strs::<"a">::A
-LL +     <Inner<_> as Example>::concat_strs::A
+LL +     <Inner<_> as Example>::concat_strs::<"a">::A
    |
 
 error: aborting due to 3 previous errors
diff --git a/tests/ui/typeck/issue-107087.stderr b/tests/ui/typeck/issue-107087.stderr
index 289c8d161ae..157ba5a1672 100644
--- a/tests/ui/typeck/issue-107087.stderr
+++ b/tests/ui/typeck/issue-107087.stderr
@@ -2,7 +2,13 @@ error[E0223]: ambiguous associated type
   --> $DIR/issue-107087.rs:16:5
    |
 LL |     A::B::<>::C
-   |     ^^^^^^^^ help: use fully-qualified syntax: `<A<_> as Foo>::B`
+   |     ^^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL -     A::B::<>::C
+LL +     <A<_> as Foo>::B::<>::C
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/typeck/issue-31173.stderr b/tests/ui/typeck/issue-31173.stderr
index 9598bc61352..5815da4dea9 100644
--- a/tests/ui/typeck/issue-31173.stderr
+++ b/tests/ui/typeck/issue-31173.stderr
@@ -21,7 +21,7 @@ LL | |         })
 note: required by a bound in `cloned`
   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
 
-error[E0599]: the method `collect` exists for struct `Cloned<TakeWhile<&mut IntoIter<u8>, {closure@issue-31173.rs:7:21}>>`, but its trait bounds were not satisfied
+error[E0599]: the method `collect` exists for struct `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, {closure@$DIR/issue-31173.rs:7:21: 7:25}>>`, but its trait bounds were not satisfied
   --> $DIR/issue-31173.rs:12:10
    |
 LL |       let temp: Vec<u8> = it
diff --git a/tests/ui/ufcs/ufcs-partially-resolved.stderr b/tests/ui/ufcs/ufcs-partially-resolved.stderr
index 0a9c190cb35..69d6bd74a73 100644
--- a/tests/ui/ufcs/ufcs-partially-resolved.stderr
+++ b/tests/ui/ufcs/ufcs-partially-resolved.stderr
@@ -235,8 +235,6 @@ LL |     <u8 as Dr>::X;
    |     ^^^^^^^^^^^^-
    |                 |
    |                 help: an associated function with a similar name exists: `Z`
-   |
-   = note: can't use a type alias as a constructor
 
 error[E0575]: expected associated type, found associated function `Dr::Z`
   --> $DIR/ufcs-partially-resolved.rs:54:12
diff --git a/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr b/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr
index 4d5e6f47965..db5a49d2b34 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr
@@ -2,7 +2,7 @@ error[E0599]: no method named `call` found for closure `{closure@$DIR/unboxed-cl
   --> $DIR/unboxed-closures-static-call-wrong-trait.rs:7:10
    |
 LL |     mut_.call((0, ));
-   |          ^^^^ method not found in `{closure@unboxed-closures-static-call-wrong-trait.rs:6:26}`
+   |          ^^^^ method not found in `{closure@$DIR/unboxed-closures-static-call-wrong-trait.rs:6:26: 6:29}`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/unsafe-binders/cat-projection.rs b/tests/ui/unsafe-binders/cat-projection.rs
new file mode 100644
index 00000000000..0ce8579a688
--- /dev/null
+++ b/tests/ui/unsafe-binders/cat-projection.rs
@@ -0,0 +1,24 @@
+//@ revisions: e2015 e2021
+//@[e2015] edition: 2015
+//@[e2021] edition: 2021
+//@ check-pass
+
+#![feature(unsafe_binders)]
+#![allow(incomplete_features)]
+
+use std::unsafe_binder::unwrap_binder;
+
+#[derive(Copy, Clone)]
+pub struct S([usize; 8]);
+
+// Regression test for <https://github.com/rust-lang/rust/issues/141418>.
+pub fn by_value(x: unsafe<'a> S) -> usize {
+    unsafe { (|| unwrap_binder!(x).0[0])() }
+}
+
+// Regression test for <https://github.com/rust-lang/rust/issues/141417>.
+pub fn by_ref(x: unsafe<'a> &'a S) -> usize {
+    unsafe { (|| unwrap_binder!(x).0[0])() }
+}
+
+fn main() {}
diff --git a/tests/ui/unsafe-binders/non-strucutral-type-diag.rs b/tests/ui/unsafe-binders/non-strucutral-type-diag.rs
new file mode 100644
index 00000000000..e021e9567e5
--- /dev/null
+++ b/tests/ui/unsafe-binders/non-strucutral-type-diag.rs
@@ -0,0 +1,17 @@
+// regression test for <https://github.com/rust-lang/rust/issues/141422>.
+
+#![feature(unsafe_binders)]
+#![allow(incomplete_features)]
+
+#[derive(Copy, Clone)]
+struct Adt<'a>(&'a ());
+
+const C: Option<(unsafe<'a> Adt<'a>, Box<dyn Send>)> = None;
+
+fn main() {
+    match None {
+        C => {}
+        //~^ ERROR constant of non-structural type
+        _ => {}
+    }
+}
diff --git a/tests/ui/unsafe-binders/non-strucutral-type-diag.stderr b/tests/ui/unsafe-binders/non-strucutral-type-diag.stderr
new file mode 100644
index 00000000000..ab23210b2e5
--- /dev/null
+++ b/tests/ui/unsafe-binders/non-strucutral-type-diag.stderr
@@ -0,0 +1,13 @@
+error: constant of non-structural type `Option<(unsafe<'a> Adt<'a>, Box<dyn Send>)>` in a pattern
+  --> $DIR/non-strucutral-type-diag.rs:13:9
+   |
+LL | const C: Option<(unsafe<'a> Adt<'a>, Box<dyn Send>)> = None;
+   | ---------------------------------------------------- constant defined here
+...
+LL |         C => {}
+   |         ^ constant of non-structural type
+   |
+   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/unsafe-binders/unused-lifetimes-2.fixed b/tests/ui/unsafe-binders/unused-lifetimes-2.fixed
new file mode 100644
index 00000000000..714a5fdaf03
--- /dev/null
+++ b/tests/ui/unsafe-binders/unused-lifetimes-2.fixed
@@ -0,0 +1,20 @@
+// regression test for #141758
+//@ run-rustfix
+//@ check-pass
+
+#![warn(unused_lifetimes)]
+#![allow(incomplete_features, unused_imports, dead_code)]
+#![feature(unsafe_binders)]
+
+use std::unsafe_binder::unwrap_binder;
+
+#[derive(Copy, Clone)]
+pub struct S([usize; 8]);
+
+// Regression test for <https://github.com/rust-lang/rust/issues/141418>.
+pub fn by_value(_x: unsafe<'a> &'a S) -> usize {
+    //~^ WARN lifetime parameter `'b` never used
+    0
+}
+
+fn main() {}
diff --git a/tests/ui/unsafe-binders/unused-lifetimes-2.rs b/tests/ui/unsafe-binders/unused-lifetimes-2.rs
new file mode 100644
index 00000000000..5b34cf91163
--- /dev/null
+++ b/tests/ui/unsafe-binders/unused-lifetimes-2.rs
@@ -0,0 +1,20 @@
+// regression test for #141758
+//@ run-rustfix
+//@ check-pass
+
+#![warn(unused_lifetimes)]
+#![allow(incomplete_features, unused_imports, dead_code)]
+#![feature(unsafe_binders)]
+
+use std::unsafe_binder::unwrap_binder;
+
+#[derive(Copy, Clone)]
+pub struct S([usize; 8]);
+
+// Regression test for <https://github.com/rust-lang/rust/issues/141418>.
+pub fn by_value(_x: unsafe<'a, 'b> &'a S) -> usize {
+    //~^ WARN lifetime parameter `'b` never used
+    0
+}
+
+fn main() {}
diff --git a/tests/ui/unsafe-binders/unused-lifetimes-2.stderr b/tests/ui/unsafe-binders/unused-lifetimes-2.stderr
new file mode 100644
index 00000000000..bca8a15d56b
--- /dev/null
+++ b/tests/ui/unsafe-binders/unused-lifetimes-2.stderr
@@ -0,0 +1,16 @@
+warning: lifetime parameter `'b` never used
+  --> $DIR/unused-lifetimes-2.rs:15:32
+   |
+LL | pub fn by_value(_x: unsafe<'a, 'b> &'a S) -> usize {
+   |                              --^^
+   |                              |
+   |                              help: elide the unused lifetime
+   |
+note: the lint level is defined here
+  --> $DIR/unused-lifetimes-2.rs:5:9
+   |
+LL | #![warn(unused_lifetimes)]
+   |         ^^^^^^^^^^^^^^^^
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/unsafe-binders/unused-lifetimes.fixed b/tests/ui/unsafe-binders/unused-lifetimes.fixed
new file mode 100644
index 00000000000..4295b6a848c
--- /dev/null
+++ b/tests/ui/unsafe-binders/unused-lifetimes.fixed
@@ -0,0 +1,20 @@
+// regression test for #141758
+//@ run-rustfix
+//@ check-pass
+
+#![warn(unused_lifetimes)]
+#![allow(incomplete_features, unused_imports, dead_code)]
+#![feature(unsafe_binders)]
+
+use std::unsafe_binder::unwrap_binder;
+
+#[derive(Copy, Clone)]
+pub struct S([usize; 8]);
+
+// Regression test for <https://github.com/rust-lang/rust/issues/141418>.
+pub fn by_value(_x: S) -> usize {
+    //~^ WARN lifetime parameter `'a` never used
+    0
+}
+
+fn main() {}
diff --git a/tests/ui/unsafe-binders/unused-lifetimes.rs b/tests/ui/unsafe-binders/unused-lifetimes.rs
new file mode 100644
index 00000000000..b1382328318
--- /dev/null
+++ b/tests/ui/unsafe-binders/unused-lifetimes.rs
@@ -0,0 +1,20 @@
+// regression test for #141758
+//@ run-rustfix
+//@ check-pass
+
+#![warn(unused_lifetimes)]
+#![allow(incomplete_features, unused_imports, dead_code)]
+#![feature(unsafe_binders)]
+
+use std::unsafe_binder::unwrap_binder;
+
+#[derive(Copy, Clone)]
+pub struct S([usize; 8]);
+
+// Regression test for <https://github.com/rust-lang/rust/issues/141418>.
+pub fn by_value(_x: unsafe<'a> S) -> usize {
+    //~^ WARN lifetime parameter `'a` never used
+    0
+}
+
+fn main() {}
diff --git a/tests/ui/unsafe-binders/unused-lifetimes.stderr b/tests/ui/unsafe-binders/unused-lifetimes.stderr
new file mode 100644
index 00000000000..d9a5216301f
--- /dev/null
+++ b/tests/ui/unsafe-binders/unused-lifetimes.stderr
@@ -0,0 +1,14 @@
+warning: lifetime parameter `'a` never used
+  --> $DIR/unused-lifetimes.rs:15:28
+   |
+LL | pub fn by_value(_x: unsafe<'a> S) -> usize {
+   |                     -------^^-- help: elide the unused lifetime
+   |
+note: the lint level is defined here
+  --> $DIR/unused-lifetimes.rs:5:9
+   |
+LL | #![warn(unused_lifetimes)]
+   |         ^^^^^^^^^^^^^^^^
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/unsafe/move-out-of-non-copy.rs b/tests/ui/unsafe/move-out-of-non-copy.rs
new file mode 100644
index 00000000000..ca6bf4277a1
--- /dev/null
+++ b/tests/ui/unsafe/move-out-of-non-copy.rs
@@ -0,0 +1,15 @@
+//@ compile-flags: -Zvalidate-mir
+
+// Regression test for <https://github.com/rust-lang/rust/issues/141394>.
+
+#![feature(unsafe_binders)]
+#![allow(incomplete_features)]
+
+use std::unsafe_binder::unwrap_binder;
+
+fn id<T>(x: unsafe<> T) -> T {
+    //~^ ERROR the trait bound `T: Copy` is not satisfied
+    unsafe { unwrap_binder!(x) }
+}
+
+fn main() {}
diff --git a/tests/ui/unsafe/move-out-of-non-copy.stderr b/tests/ui/unsafe/move-out-of-non-copy.stderr
new file mode 100644
index 00000000000..4598742c92b
--- /dev/null
+++ b/tests/ui/unsafe/move-out-of-non-copy.stderr
@@ -0,0 +1,14 @@
+error[E0277]: the trait bound `T: Copy` is not satisfied
+  --> $DIR/move-out-of-non-copy.rs:10:13
+   |
+LL | fn id<T>(x: unsafe<> T) -> T {
+   |             ^^^^^^^^^^ the trait `Copy` is not implemented for `T`
+   |
+help: consider restricting type parameter `T` with trait `Copy`
+   |
+LL | fn id<T: std::marker::Copy>(x: unsafe<> T) -> T {
+   |        +++++++++++++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-dyn-incompatible.stderr b/tests/ui/wf/wf-dyn-incompatible.stderr
index e61b37d9293..2ba17b7aaef 100644
--- a/tests/ui/wf/wf-dyn-incompatible.stderr
+++ b/tests/ui/wf/wf-dyn-incompatible.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `A` is not dyn compatible
-  --> $DIR/wf-dyn-incompatible.rs:9:13
+  --> $DIR/wf-dyn-incompatible.rs:9:18
    |
 LL |     let _x: &dyn A;
-   |             ^^^^^^ `A` is not dyn compatible
+   |                  ^ `A` 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>