about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/codegen/cast-target-abi.rs2
-rw-r--r--tests/codegen/cffi/ffi-out-of-bounds-loads.rs2
-rw-r--r--tests/codegen/clone_as_copy.rs2
-rw-r--r--tests/codegen/slice-last-elements-optimization.rs37
-rw-r--r--tests/codegen/slice-split-at.rs24
-rw-r--r--tests/codegen/try_question_mark_nop.rs38
-rw-r--r--tests/coverage/abort.cov-map4
-rw-r--r--tests/coverage/assert-ne.cov-map4
-rw-r--r--tests/coverage/assert-ne.coverage2
-rw-r--r--tests/coverage/assert-ne.rs2
-rw-r--r--tests/coverage/assert_not.cov-map10
-rw-r--r--tests/coverage/async_block.cov-map8
-rw-r--r--tests/coverage/async_block.coverage2
-rw-r--r--tests/coverage/async_closure.cov-map14
-rw-r--r--tests/coverage/async_closure.coverage4
-rw-r--r--tests/coverage/attr/off-on-sandwich.cov-map12
-rw-r--r--tests/coverage/bad_counter_ids.cov-map16
-rw-r--r--tests/coverage/branch/guard.cov-map4
-rw-r--r--tests/coverage/branch/if-let.cov-map4
-rw-r--r--tests/coverage/branch/if.cov-map18
-rw-r--r--tests/coverage/branch/lazy-boolean.cov-map20
-rw-r--r--tests/coverage/branch/let-else.cov-map6
-rw-r--r--tests/coverage/branch/match-arms.cov-map34
-rw-r--r--tests/coverage/branch/match-trivial.cov-map8
-rw-r--r--tests/coverage/branch/while.cov-map16
-rw-r--r--tests/coverage/closure.cov-map12
-rw-r--r--tests/coverage/closure.coverage22
-rw-r--r--tests/coverage/closure_macro.cov-map6
-rw-r--r--tests/coverage/closure_macro_async.cov-map6
-rw-r--r--tests/coverage/condition/conditions.cov-map10
-rw-r--r--tests/coverage/coroutine.cov-map8
-rw-r--r--tests/coverage/holes.cov-map22
-rw-r--r--tests/coverage/holes.coverage20
-rw-r--r--tests/coverage/inline-dead.cov-map4
-rw-r--r--tests/coverage/inline.cov-map4
-rw-r--r--tests/coverage/issue-83601.cov-map6
-rw-r--r--tests/coverage/issue-84561.cov-map173
-rw-r--r--tests/coverage/issue-84561.coverage42
-rw-r--r--tests/coverage/loop-break.cov-map4
-rw-r--r--tests/coverage/loops_branches.cov-map12
-rw-r--r--tests/coverage/macro_name_span.cov-map4
-rw-r--r--tests/coverage/mcdc/non_control_flow.cov-map10
-rw-r--r--tests/coverage/no_cov_crate.cov-map8
-rw-r--r--tests/coverage/panic_unwind.cov-map4
-rw-r--r--tests/coverage/sort_groups.cov-map4
-rw-r--r--tests/coverage/try_error_result.cov-map50
-rw-r--r--tests/coverage/try_error_result.coverage2
-rw-r--r--tests/coverage/unicode.cov-map6
-rw-r--r--tests/coverage/unicode.coverage2
-rw-r--r--tests/coverage/unreachable.cov-map12
-rw-r--r--tests/coverage/yield.cov-map10
-rw-r--r--tests/crashes/134334.rs9
-rw-r--r--tests/crashes/134335.rs12
-rw-r--r--tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-abort.diff3
-rw-r--r--tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-unwind.diff3
-rw-r--r--tests/mir-opt/const_prop/read_immutable_static.main.GVN.diff14
-rw-r--r--tests/mir-opt/const_prop/read_immutable_static.rs3
-rw-r--r--tests/mir-opt/const_prop/ref_deref.main.GVN.diff3
-rw-r--r--tests/mir-opt/const_prop/ref_deref_project.main.GVN.diff3
-rw-r--r--tests/mir-opt/const_prop/ref_deref_project.rs3
-rw-r--r--tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-abort.diff2
-rw-r--r--tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-unwind.diff2
-rw-r--r--tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-abort.diff2
-rw-r--r--tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-unwind.diff2
-rw-r--r--tests/mir-opt/const_prop/slice_len.rs5
-rw-r--r--tests/mir-opt/const_prop/transmute.undef_union_as_integer.GVN.32bit.diff3
-rw-r--r--tests/mir-opt/const_prop/transmute.undef_union_as_integer.GVN.64bit.diff3
-rw-r--r--tests/mir-opt/coroutine_drop_cleanup.rs2
-rw-r--r--tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff8
-rw-r--r--tests/mir-opt/coverage/instrument_coverage.main.InstrumentCoverage.diff2
-rw-r--r--tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-abort.diff10
-rw-r--r--tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-unwind.diff10
-rw-r--r--tests/mir-opt/gvn.borrowed.GVN.panic-abort.diff3
-rw-r--r--tests/mir-opt/gvn.borrowed.GVN.panic-unwind.diff3
-rw-r--r--tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff18
-rw-r--r--tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff18
-rw-r--r--tests/mir-opt/gvn.rs31
-rw-r--r--tests/mir-opt/gvn.slices.GVN.panic-abort.diff38
-rw-r--r--tests/mir-opt/gvn.slices.GVN.panic-unwind.diff38
-rw-r--r--tests/mir-opt/gvn_clone.rs2
-rw-r--r--tests/mir-opt/gvn_clone.{impl#0}-clone.GVN.diff6
-rw-r--r--tests/mir-opt/gvn_copy_aggregate.rs2
-rw-r--r--tests/mir-opt/gvn_uninhabited.f.GVN.panic-abort.diff15
-rw-r--r--tests/mir-opt/gvn_uninhabited.f.GVN.panic-unwind.diff15
-rw-r--r--tests/mir-opt/pre-codegen/clone_as_copy.rs2
-rw-r--r--tests/mir-opt/pre-codegen/deref_nested_borrows.rs1
-rw-r--r--tests/mir-opt/pre-codegen/no_inlined_clone.{impl#0}-clone.PreCodegen.after.mir6
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir238
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir54
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir80
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-unwind.mir24
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-abort.mir56
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-unwind.mir56
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir26
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir26
-rw-r--r--tests/mir-opt/pre-codegen/try_identity.old.PreCodegen.after.mir8
-rw-r--r--tests/mir-opt/simplify_aggregate_to_copy_miscompile.foo.GVN.diff62
-rw-r--r--tests/mir-opt/simplify_aggregate_to_copy_miscompile.rs43
-rw-r--r--tests/mir-opt/simplify_aggregate_to_copy_miscompile.set_discriminant.GVN.diff20
-rw-r--r--tests/pretty/stmt_expr_attributes.rs5
-rw-r--r--tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs4
-rw-r--r--tests/run-make/embed-metadata/dep1.rs1
-rw-r--r--tests/run-make/embed-metadata/foo.rs5
-rw-r--r--tests/run-make/embed-metadata/rmake.rs86
-rw-r--r--tests/run-make/issue-107495-archive-permissions/rmake.rs4
-rw-r--r--tests/run-make/print-crate-root-lint-levels/lib.rs5
-rw-r--r--tests/run-make/print-crate-root-lint-levels/rmake.rs118
-rw-r--r--tests/run-make/rust-lld-by-default-beta-stable/rmake.rs17
-rw-r--r--tests/run-make/rust-lld-by-default-nightly/rmake.rs27
-rw-r--r--tests/run-make/rust-lld-custom-target/rmake.rs39
-rw-r--r--tests/run-make/rust-lld/rmake.rs68
-rw-r--r--tests/run-make/rustc-help/help-v.stdout2
-rw-r--r--tests/run-make/rustc-help/help.stdout2
-rw-r--r--tests/rustdoc-json/attrs/automatically_derived.rs13
-rw-r--r--tests/rustdoc-ui/doctest/edition-2024-error-output.rs14
-rw-r--r--tests/rustdoc-ui/doctest/edition-2024-error-output.stdout20
-rw-r--r--tests/rustdoc-ui/doctest/no-run-flag-error.rs3
-rw-r--r--tests/rustdoc-ui/invalid-theme-name.rs3
-rw-r--r--tests/rustdoc-ui/issues/issue-91713.rs3
-rw-r--r--tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs3
-rw-r--r--tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr2
-rw-r--r--tests/rustdoc-ui/track-diagnostics.rs2
-rw-r--r--tests/ui-fulldeps/missing-rustc-driver-error.rs2
-rw-r--r--tests/ui/abi/fixed_x18.rs2
-rw-r--r--tests/ui/abi/shadow-call-stack-without-fixed-x18.rs3
-rw-r--r--tests/ui/allocator/two-allocators2.rs3
-rw-r--r--tests/ui/allocator/two-allocators3.rs4
-rw-r--r--tests/ui/amdgpu-require-explicit-cpu.rs3
-rw-r--r--tests/ui/associated-types/issue-36499.rs2
-rw-r--r--tests/ui/associated-types/issue-59324.stderr26
-rw-r--r--tests/ui/async-await/async-closures/by-move-body-inlined-attrs.rs28
-rw-r--r--tests/ui/attributes/attr-bad-crate-attr.rs3
-rw-r--r--tests/ui/attributes/attr-bad-crate-attr.stderr2
-rw-r--r--tests/ui/attributes/dont-dup-expr-attrs.rs133
-rw-r--r--tests/ui/attributes/inner-attr-metavar.rs14
-rw-r--r--tests/ui/attributes/nonterminal-expansion.rs4
-rw-r--r--tests/ui/attributes/nonterminal-expansion.stderr11
-rw-r--r--tests/ui/attributes/z-crate-attr/garbage.rs5
-rw-r--r--tests/ui/attributes/z-crate-attr/injection.rs4
-rw-r--r--tests/ui/attributes/z-crate-attr/inner-attr.rs3
-rw-r--r--tests/ui/attributes/z-crate-attr/multiple.rs4
-rw-r--r--tests/ui/attributes/z-crate-attr/unbalanced-paren.rs4
-rw-r--r--tests/ui/binop/binop-bitxor-str.rs3
-rw-r--r--tests/ui/binop/binop-bitxor-str.stderr2
-rw-r--r--tests/ui/binop/binop-mul-bool.rs4
-rw-r--r--tests/ui/binop/binop-mul-bool.stderr2
-rw-r--r--tests/ui/borrowck/mut-borrow-in-loop-2.stderr4
-rw-r--r--tests/ui/c-variadic/issue-86053-1.rs14
-rw-r--r--tests/ui/c-variadic/issue-86053-1.stderr8
-rw-r--r--tests/ui/capture1.rs4
-rw-r--r--tests/ui/capture1.stderr2
-rw-r--r--tests/ui/cast/cast-from-nil.rs3
-rw-r--r--tests/ui/cast/cast-from-nil.stderr2
-rw-r--r--tests/ui/cast/cast-to-nil.rs3
-rw-r--r--tests/ui/cast/cast-to-nil.stderr2
-rw-r--r--tests/ui/cfg/cfg_false_no_std-2.rs7
-rw-r--r--tests/ui/cfg/raw-true-false.rs24
-rw-r--r--tests/ui/check-cfg/invalid-arguments.boolean.stderr6
-rw-r--r--tests/ui/check-cfg/invalid-arguments.boolean_after_values.stderr5
-rw-r--r--tests/ui/check-cfg/invalid-arguments.rs4
-rw-r--r--tests/ui/check-cfg/target_feature.stderr11
-rw-r--r--tests/ui/codegen/equal-pointers-unequal/as-cast/print3.rs23
-rw-r--r--tests/ui/codegen/equal-pointers-unequal/exposed-provenance/print3.rs25
-rw-r--r--tests/ui/codegen/equal-pointers-unequal/strict-provenance/print3.rs25
-rw-r--r--tests/ui/codegen/mismatched-data-layouts.rs3
-rw-r--r--tests/ui/conditional-compilation/cfg-arg-invalid-3.rs4
-rw-r--r--tests/ui/conditional-compilation/cfg-arg-invalid-5.rs4
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-cfg-2.rs3
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-cfg-2.stderr2
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-syntax-validation.rs2
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr2
-rw-r--r--tests/ui/conditional-compilation/cfg-in-crate-1.rs4
-rw-r--r--tests/ui/conditional-compilation/cfg-in-crate-1.stderr2
-rw-r--r--tests/ui/const-generics/const-param-has-ty-goal-in-error-implies.rs41
-rw-r--r--tests/ui/const-generics/const-param-has-ty-goal-in-error-implies.stderr23
-rw-r--r--tests/ui/const-ptr/out_of_bounds_read.rs5
-rw-r--r--tests/ui/const-ptr/out_of_bounds_read.stderr4
-rw-r--r--tests/ui/consts/const-size_of-cycle.rs3
-rw-r--r--tests/ui/consts/const-size_of-cycle.stderr6
-rw-r--r--tests/ui/consts/const_in_pattern/arrays-and-slices.rs53
-rw-r--r--tests/ui/consts/const_in_pattern/arrays-and-slices.stderr84
-rw-r--r--tests/ui/consts/invalid-inline-const-in-match-arm.rs9
-rw-r--r--tests/ui/consts/invalid-inline-const-in-match-arm.stderr18
-rw-r--r--tests/ui/consts/miri_unleashed/drop.rs4
-rw-r--r--tests/ui/consts/timeout.rs3
-rw-r--r--tests/ui/consts/timeout.stderr2
-rw-r--r--tests/ui/coverage-attr/name-value.stderr34
-rw-r--r--tests/ui/coverage-attr/word-only.stderr30
-rw-r--r--tests/ui/crate_type_flag.rs3
-rw-r--r--tests/ui/custom_test_frameworks/full.rs15
-rw-r--r--tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs2
-rw-r--r--tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs8
-rw-r--r--tests/ui/debuginfo/dwarf-versions.rs6
-rw-r--r--tests/ui/debuginfo/windows_gnu_split_debuginfo_packed.rs3
-rw-r--r--tests/ui/debuginfo/windows_gnu_split_debuginfo_unpacked.rs3
-rw-r--r--tests/ui/deprecation/deprecation-lint-2.rs3
-rw-r--r--tests/ui/deprecation/deprecation-lint-2.stderr4
-rw-r--r--tests/ui/deprecation/deprecation-lint-3.rs2
-rw-r--r--tests/ui/deprecation/deprecation-lint-3.stderr4
-rw-r--r--tests/ui/drop/nonsense-drop-impl-issue-139278.rs10
-rw-r--r--tests/ui/drop/nonsense-drop-impl-issue-139278.stderr18
-rw-r--r--tests/ui/duplicate/dupe-symbols-4.rs4
-rw-r--r--tests/ui/duplicate/dupe-symbols-4.stderr2
-rw-r--r--tests/ui/duplicate/dupe-symbols-7.rs5
-rw-r--r--tests/ui/duplicate/dupe-symbols-7.stderr2
-rw-r--r--tests/ui/duplicate/dupe-symbols-8.rs3
-rw-r--r--tests/ui/duplicate/dupe-symbols-8.stderr2
-rw-r--r--tests/ui/elided-test.rs4
-rw-r--r--tests/ui/elided-test.stderr2
-rw-r--r--tests/ui/error-codes/E0602.rs5
-rw-r--r--tests/ui/errors/remap-path-prefix-reverse.local-self.stderr2
-rw-r--r--tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr2
-rw-r--r--tests/ui/errors/remap-path-prefix-reverse.rs3
-rw-r--r--tests/ui/errors/remap-path-prefix-sysroot.rs4
-rw-r--r--tests/ui/errors/remap-path-prefix.normal.stderr2
-rw-r--r--tests/ui/errors/remap-path-prefix.rs9
-rw-r--r--tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr2
-rw-r--r--tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr2
-rw-r--r--tests/ui/expr/if/if-typeck.rs3
-rw-r--r--tests/ui/expr/if/if-typeck.stderr2
-rw-r--r--tests/ui/ext-nonexistent.rs2
-rw-r--r--tests/ui/ext-nonexistent.stderr2
-rw-r--r--tests/ui/extern-flag/empty-extern-arg.rs5
-rw-r--r--tests/ui/extern-flag/invalid-crate-name-dashed.rs3
-rw-r--r--tests/ui/extern-flag/invalid-crate-name-non-ascii.rs3
-rw-r--r--tests/ui/extern-flag/invalid-crate-name.rs3
-rw-r--r--tests/ui/extern-flag/no-force-extern.rs6
-rw-r--r--tests/ui/feature-gates/feature-gate-f128.e2015.stderr16
-rw-r--r--tests/ui/feature-gates/feature-gate-f128.e2018.stderr16
-rw-r--r--tests/ui/feature-gates/feature-gate-f128.rs1
-rw-r--r--tests/ui/feature-gates/feature-gate-f16.e2015.stderr16
-rw-r--r--tests/ui/feature-gates/feature-gate-f16.e2018.stderr16
-rw-r--r--tests/ui/feature-gates/feature-gate-f16.rs1
-rw-r--r--tests/ui/feature-gates/feature-gate-inline_const_pat.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-inline_const_pat.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-movrs_target_feature.rs6
-rw-r--r--tests/ui/feature-gates/feature-gate-movrs_target_feature.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-super-let.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-super-let.stderr13
-rw-r--r--tests/ui/fn/bad-turbofish-hints-issue-121901.rs8
-rw-r--r--tests/ui/fn/bad-turbofish-hints-issue-121901.stderr25
-rw-r--r--tests/ui/fn/fn-bad-block-type.rs4
-rw-r--r--tests/ui/fn/fn-bad-block-type.stderr2
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions0.rs5
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions1.rs2
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions1.stderr19
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions2.rs22
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions2.stderr43
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions3.rs19
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions3.stderr13
-rw-r--r--tests/ui/imports/glob-resolve1.stderr5
-rw-r--r--tests/ui/imports/import-loop-2.rs4
-rw-r--r--tests/ui/imports/import-loop-2.stderr2
-rw-r--r--tests/ui/imports/import-loop.rs4
-rw-r--r--tests/ui/imports/import-loop.stderr2
-rw-r--r--tests/ui/imports/import3.rs3
-rw-r--r--tests/ui/imports/import3.stderr2
-rw-r--r--tests/ui/imports/import4.rs5
-rw-r--r--tests/ui/imports/import4.stderr2
-rw-r--r--tests/ui/imports/issue-4366-2.stderr5
-rw-r--r--tests/ui/imports/issue-4366.stderr5
-rw-r--r--tests/ui/imports/show-private-items-issue-138626.rs19
-rw-r--r--tests/ui/imports/show-private-items-issue-138626.stderr20
-rw-r--r--tests/ui/infinite/infinite-autoderef.stderr4
-rw-r--r--tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs17
-rw-r--r--tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr8
-rw-r--r--tests/ui/inline-const/collect-scopes-in-pat.rs16
-rw-r--r--tests/ui/inline-const/const-block-pat-liveness.rs18
-rw-r--r--tests/ui/inline-const/const-match-pat-generic.rs28
-rw-r--r--tests/ui/inline-const/const-match-pat-generic.stderr15
-rw-r--r--tests/ui/inline-const/const-match-pat-inference.rs11
-rw-r--r--tests/ui/inline-const/const-match-pat-lifetime-err.rs47
-rw-r--r--tests/ui/inline-const/const-match-pat-lifetime-err.stderr28
-rw-r--r--tests/ui/inline-const/const-match-pat-lifetime.rs34
-rw-r--r--tests/ui/inline-const/const-match-pat-range.rs38
-rw-r--r--tests/ui/inline-const/const-match-pat.rs20
-rw-r--r--tests/ui/inline-const/in-pat-recovery.rs11
-rw-r--r--tests/ui/inline-const/in-pat-recovery.stderr10
-rw-r--r--tests/ui/inline-const/pat-match-fndef.rs12
-rw-r--r--tests/ui/inline-const/pat-match-fndef.stderr8
-rw-r--r--tests/ui/inline-const/pat-unsafe-err.rs22
-rw-r--r--tests/ui/inline-const/pat-unsafe-err.stderr19
-rw-r--r--tests/ui/inline-const/pat-unsafe.rs29
-rw-r--r--tests/ui/inline-const/pat-unsafe.stderr20
-rw-r--r--tests/ui/instrument-xray/flags-always-never-1.rs3
-rw-r--r--tests/ui/instrument-xray/flags-dupe-always.rs3
-rw-r--r--tests/ui/instrument-xray/flags-dupe-ignore-loops.rs3
-rw-r--r--tests/ui/instrument-xray/target-not-supported.rs3
-rw-r--r--tests/ui/internal/internal-unstable-noallow.rs10
-rw-r--r--tests/ui/internal/internal-unstable-noallow.stderr8
-rw-r--r--tests/ui/invalid-compile-flags/crate-type-flag.rs7
-rw-r--r--tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs3
-rw-r--r--tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs3
-rw-r--r--tests/ui/invalid-compile-flags/print-without-arg.stderr2
-rw-r--r--tests/ui/invalid-compile-flags/print.stderr2
-rw-r--r--tests/ui/invalid-compile-flags/reg-struct-return/requires-x86.rs5
-rw-r--r--tests/ui/invalid-compile-flags/regparm/regparm-valid-values.rs3
-rw-r--r--tests/ui/invalid-compile-flags/regparm/requires-x86.rs5
-rw-r--r--tests/ui/invalid/issue-114435-layout-type-err.rs3
-rw-r--r--tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs4
-rw-r--r--tests/ui/issues/issue-37131.rs1
-rw-r--r--tests/ui/lang-items/lang-item-missing.rs4
-rw-r--r--tests/ui/lang-items/lang-item-missing.stderr2
-rw-r--r--tests/ui/lang-items/missing-copy-lang-item-issue-19660.rs4
-rw-r--r--tests/ui/lang-items/missing-copy-lang-item-issue-19660.stderr2
-rw-r--r--tests/ui/layout/size-of-val-raw-too-big.rs3
-rw-r--r--tests/ui/layout/unknown-when-no-type-parameter.rs3
-rw-r--r--tests/ui/layout/unknown-when-no-type-parameter.stderr2
-rw-r--r--tests/ui/limits/issue-17913.rs3
-rw-r--r--tests/ui/limits/issue-55878.rs2
-rw-r--r--tests/ui/limits/issue-55878.stderr2
-rw-r--r--tests/ui/link-native-libs/empty-kind-1.rs3
-rw-r--r--tests/ui/link-native-libs/empty-kind-2.rs3
-rw-r--r--tests/ui/link-native-libs/link-arg-error.rs3
-rw-r--r--tests/ui/link-native-libs/manual-link-bad-form.rs3
-rw-r--r--tests/ui/link-native-libs/manual-link-bad-kind.rs3
-rw-r--r--tests/ui/link-native-libs/manual-link-bad-search-path.rs3
-rw-r--r--tests/ui/link-native-libs/manual-link-framework.rs3
-rw-r--r--tests/ui/link-native-libs/manual-link-unsupported-kind.rs3
-rw-r--r--tests/ui/link-native-libs/modifiers-override-3.rs3
-rw-r--r--tests/ui/link-native-libs/suggest-libname-only-1.rs5
-rw-r--r--tests/ui/link-native-libs/suggest-libname-only-1.stderr2
-rw-r--r--tests/ui/link-native-libs/suggest-libname-only-2.rs5
-rw-r--r--tests/ui/link-native-libs/suggest-libname-only-2.stderr2
-rw-r--r--tests/ui/linkage-attr/incompatible-flavor.rs3
-rw-r--r--tests/ui/linkage-attr/issue-10755.rs3
-rw-r--r--tests/ui/linkage-attr/raw-dylib/elf/multiple-libraries.rs2
-rw-r--r--tests/ui/linkage-attr/raw-dylib/elf/single-symbol.rs2
-rw-r--r--tests/ui/linkage-attr/raw-dylib/elf/verbatim.rs2
-rw-r--r--tests/ui/linkage-attr/unstable-flavor.rs5
-rw-r--r--tests/ui/linking/link-self-contained-consistency.many.stderr (renamed from tests/ui/linkage-attr/link-self-contained-consistency.many.stderr)0
-rw-r--r--tests/ui/linking/link-self-contained-consistency.one.stderr (renamed from tests/ui/linkage-attr/link-self-contained-consistency.one.stderr)0
-rw-r--r--tests/ui/linking/link-self-contained-consistency.rs (renamed from tests/ui/linkage-attr/link-self-contained-consistency.rs)0
-rw-r--r--tests/ui/lint/bad-lint-cap.rs3
-rw-r--r--tests/ui/lint/cli-unknown-force-warn.rs5
-rw-r--r--tests/ui/lint/command-line-register-unknown-lint-tool.rs5
-rw-r--r--tests/ui/lint/dead-code/anon-const-in-pat.rs44
-rw-r--r--tests/ui/lint/force-warn/warnings-lint-group.rs5
-rw-r--r--tests/ui/lint/issue-104897.rs5
-rw-r--r--tests/ui/lint/issue-104897.stderr2
-rw-r--r--tests/ui/lint/lint-pre-expansion-extern-module.rs4
-rw-r--r--tests/ui/lint/lint-removed-cmdline-deny.rs7
-rw-r--r--tests/ui/lint/lint-removed-cmdline-deny.stderr4
-rw-r--r--tests/ui/lint/lint-removed-cmdline.rs7
-rw-r--r--tests/ui/lint/lint-removed-cmdline.stderr4
-rw-r--r--tests/ui/lint/lint-renamed-cmdline-deny.rs8
-rw-r--r--tests/ui/lint/lint-renamed-cmdline-deny.stderr4
-rw-r--r--tests/ui/lint/lint-renamed-cmdline.rs8
-rw-r--r--tests/ui/lint/lint-renamed-cmdline.stderr4
-rw-r--r--tests/ui/lint/lint-stability2.rs3
-rw-r--r--tests/ui/lint/lint-stability2.stderr4
-rw-r--r--tests/ui/lint/lint-stability3.rs2
-rw-r--r--tests/ui/lint/lint-stability3.stderr4
-rw-r--r--tests/ui/lint/lint-unknown-lint-cmdline-deny.rs8
-rw-r--r--tests/ui/lint/lint-unknown-lint-cmdline.rs9
-rw-r--r--tests/ui/lint/unused_parens_multibyte_recovery.rs7
-rw-r--r--tests/ui/lint/unused_parens_multibyte_recovery.stderr2
-rw-r--r--tests/ui/lto/issue-11154.rs4
-rw-r--r--tests/ui/lto/lto-duplicate-symbols.rs4
-rw-r--r--tests/ui/macros/nonterminal-matching.rs4
-rw-r--r--tests/ui/macros/nonterminal-matching.stderr4
-rw-r--r--tests/ui/macros/not-utf8.rs2
-rw-r--r--tests/ui/macros/not-utf8.stderr2
-rw-r--r--tests/ui/macros/unreachable-arg.edition_2021.stderr2
-rw-r--r--tests/ui/macros/unreachable-arg.rs3
-rw-r--r--tests/ui/macros/unreachable-format-args.edition_2015.stderr2
-rw-r--r--tests/ui/macros/unreachable-format-args.rs2
-rw-r--r--tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs5
-rw-r--r--tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.stderr2
-rw-r--r--tests/ui/match/issue-112438.rs10
-rw-r--r--tests/ui/match/validate-range-endpoints.rs3
-rw-r--r--tests/ui/match/validate-range-endpoints.stderr28
-rw-r--r--tests/ui/minus-string.rs4
-rw-r--r--tests/ui/minus-string.stderr2
-rw-r--r--tests/ui/mir/enable_passes_validation.rs11
-rw-r--r--tests/ui/mir/lint/assignment-overlap.rs2
-rw-r--r--tests/ui/mir/lint/call-overlap.rs2
-rw-r--r--tests/ui/mir/lint/no-storage.rs2
-rw-r--r--tests/ui/mir/lint/storage-live.rs2
-rw-r--r--tests/ui/mir/lint/storage-return.rs2
-rw-r--r--tests/ui/mir/validate/noncleanup-cleanup.rs6
-rw-r--r--tests/ui/mir/validate/noncleanup-resume.rs4
-rw-r--r--tests/ui/mir/validate/noncleanup-terminate.rs4
-rw-r--r--tests/ui/missing/missing-main.rs3
-rw-r--r--tests/ui/missing/missing-main.stderr2
-rw-r--r--tests/ui/missing/missing-return.rs2
-rw-r--r--tests/ui/nested-ty-params.rs2
-rw-r--r--tests/ui/no-capture-arc.rs4
-rw-r--r--tests/ui/no-capture-arc.stderr2
-rw-r--r--tests/ui/no_std/no-std-no-start-binary.rs2
-rw-r--r--tests/ui/no_std/no-std-unwind-binary.rs3
-rw-r--r--tests/ui/occurs-check-2.rs2
-rw-r--r--tests/ui/occurs-check-2.stderr6
-rw-r--r--tests/ui/occurs-check-3.stderr4
-rw-r--r--tests/ui/occurs-check.stderr4
-rw-r--r--tests/ui/packed/packed-struct-generic-transmute.rs1
-rw-r--r--tests/ui/packed/packed-struct-transmute.rs1
-rw-r--r--tests/ui/panic-handler/panic-handler-missing.rs3
-rw-r--r--tests/ui/panic-handler/panic-handler-std.rs3
-rw-r--r--tests/ui/panic-handler/panic-handler-std.stderr2
-rw-r--r--tests/ui/panic-handler/weak-lang-item.rs7
-rw-r--r--tests/ui/panic-handler/weak-lang-item.stderr2
-rw-r--r--tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs3
-rw-r--r--tests/ui/panic-runtime/bad-panic-flag1.rs3
-rw-r--r--tests/ui/panic-runtime/bad-panic-flag2.rs3
-rw-r--r--tests/ui/panic-runtime/need-abort-got-unwind.rs3
-rw-r--r--tests/ui/panic-runtime/need-unwind-got-abort.rs3
-rw-r--r--tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs3
-rw-r--r--tests/ui/panic-runtime/transitive-link-a-bunch.rs5
-rw-r--r--tests/ui/panic-runtime/two-panic-runtimes.rs9
-rw-r--r--tests/ui/panic-runtime/unwind-tables-target-required.rs3
-rw-r--r--tests/ui/panic-runtime/want-abort-got-unwind.rs9
-rw-r--r--tests/ui/panic-runtime/want-abort-got-unwind2.rs9
-rw-r--r--tests/ui/panic-runtime/want-unwind-got-abort.rs3
-rw-r--r--tests/ui/panic-runtime/want-unwind-got-abort2.rs4
-rw-r--r--tests/ui/panics/default-backtrace-ice.rs2
-rw-r--r--tests/ui/parser/attribute/attr-dangling-in-fn.rs4
-rw-r--r--tests/ui/parser/attribute/attr-dangling-in-fn.stderr2
-rw-r--r--tests/ui/parser/attribute/attr-dangling-in-mod.rs4
-rw-r--r--tests/ui/parser/attribute/attr-dangling-in-mod.stderr2
-rw-r--r--tests/ui/parser/circular_modules_main.rs4
-rw-r--r--tests/ui/parser/class-implements-bad-trait.rs3
-rw-r--r--tests/ui/parser/class-implements-bad-trait.stderr2
-rw-r--r--tests/ui/parser/extern-abi-from-mac-literal-frag.rs4
-rw-r--r--tests/ui/parser/float-field-interpolated.rs8
-rw-r--r--tests/ui/parser/float-field-interpolated.stderr8
-rw-r--r--tests/ui/parser/import-from-path.rs3
-rw-r--r--tests/ui/parser/import-from-path.stderr2
-rw-r--r--tests/ui/parser/import-from-rename.rs4
-rw-r--r--tests/ui/parser/import-from-rename.stderr2
-rw-r--r--tests/ui/parser/import-glob-path.rs3
-rw-r--r--tests/ui/parser/import-glob-path.stderr2
-rw-r--r--tests/ui/parser/import-glob-rename.rs4
-rw-r--r--tests/ui/parser/import-glob-rename.stderr2
-rw-r--r--tests/ui/parser/issues/circular-module-with-doc-comment-issue-97589/circular-module-with-doc-comment-issue-97589.rs3
-rw-r--r--tests/ui/parser/issues/issue-21146.rs3
-rw-r--r--tests/ui/parser/issues/issue-24375.stderr4
-rw-r--r--tests/ui/parser/issues/issue-66473.rsbin129 -> 287 bytes
-rw-r--r--tests/ui/parser/issues/issue-66473.stderr13
-rw-r--r--tests/ui/parser/issues/issue-68629.rsbin131 -> 258 bytes
-rw-r--r--tests/ui/parser/issues/issue-68629.stderr10
-rw-r--r--tests/ui/parser/issues/issue-68730.rsbin177 -> 305 bytes
-rw-r--r--tests/ui/parser/issues/issue-68730.stderr10
-rw-r--r--tests/ui/parser/macro/trait-non-item-macros.rs2
-rw-r--r--tests/ui/parser/macro/trait-non-item-macros.stderr2
-rw-r--r--tests/ui/parser/recover/recover-pat-exprs.stderr116
-rw-r--r--tests/ui/parser/recover/recover-pat-issues.stderr24
-rw-r--r--tests/ui/parser/recover/recover-pat-lets.stderr8
-rw-r--r--tests/ui/parser/recover/recover-pat-ranges.stderr24
-rw-r--r--tests/ui/parser/recover/recover-pat-wildcards.stderr4
-rw-r--r--tests/ui/parser/shebang/shebang-split.rs3
-rw-r--r--tests/ui/parser/utf16-be-without-bom.rsbin162 -> 202 bytes
-rw-r--r--tests/ui/parser/utf16-be-without-bom.stderr28
-rw-r--r--tests/ui/parser/utf16-le-without-bom.rsbin163 -> 203 bytes
-rw-r--r--tests/ui/parser/utf16-le-without-bom.stderr28
-rw-r--r--tests/ui/pattern/non-structural-match-types.rs31
-rw-r--r--tests/ui/pattern/non-structural-match-types.stderr46
-rw-r--r--tests/ui/print-request/print-lints-help.rs3
-rw-r--r--tests/ui/print-request/print-lints-help.stderr2
-rw-r--r--tests/ui/print-request/stability.rs13
-rw-r--r--tests/ui/privacy/privacy-ns1.stderr24
-rw-r--r--tests/ui/privacy/privacy-ns2.stderr24
-rw-r--r--tests/ui/privacy/private-inferred-type-3.rs15
-rw-r--r--tests/ui/privacy/private-inferred-type-3.stderr14
-rw-r--r--tests/ui/proc-macro/export-macro.rs4
-rw-r--r--tests/ui/proc-macro/export-macro.stderr2
-rw-r--r--tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs4
-rw-r--r--tests/ui/proc-macro/macro-rules-derive-cfg.stdout129
-rw-r--r--tests/ui/proc-macro/panic-abort.rs3
-rw-r--r--tests/ui/proc-macro/two-crate-types-1.rs4
-rw-r--r--tests/ui/proc-macro/two-crate-types-2.rs3
-rw-r--r--tests/ui/reachable/unreachable-code-ret.rs4
-rw-r--r--tests/ui/reachable/unreachable-code-ret.stderr4
-rw-r--r--tests/ui/resolve/auxiliary/macro_helpers.rs16
-rw-r--r--tests/ui/resolve/bad-env-capture.rs4
-rw-r--r--tests/ui/resolve/bad-env-capture.stderr6
-rw-r--r--tests/ui/resolve/bad-env-capture2.rs4
-rw-r--r--tests/ui/resolve/bad-env-capture2.stderr6
-rw-r--r--tests/ui/resolve/bad-env-capture3.rs4
-rw-r--r--tests/ui/resolve/bad-env-capture3.stderr6
-rw-r--r--tests/ui/resolve/issue-21221-1.stderr11
-rw-r--r--tests/ui/resolve/prelude-order.rs89
-rw-r--r--tests/ui/resolve/prelude-order.stderr47
-rw-r--r--tests/ui/return/ret-non-nil.rs4
-rw-r--r--tests/ui/return/ret-non-nil.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs3
-rw-r--r--tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs3
-rw-r--r--tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs2
-rw-r--r--tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.stderr2
-rw-r--r--tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs3
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs2
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr26
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.feature.stderr264
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.no_feature.stderr274
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.nothing.stderr196
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.rs4
-rw-r--r--tests/ui/rmeta/no_optitimized_mir.rs2
-rw-r--r--tests/ui/rmeta/no_optitimized_mir.stderr2
-rw-r--r--tests/ui/rmeta/rmeta_bin.rs3
-rw-r--r--tests/ui/rmeta/rmeta_lib.rs3
-rw-r--r--tests/ui/sanitizer/incompatible.rs3
-rw-r--r--tests/ui/sanitizer/unsupported-target.rs4
-rw-r--r--tests/ui/self/dyn-dispatch-do-not-mix-normalized-and-unnormalized.rs26
-rw-r--r--tests/ui/simd/empty-simd-vector-in-operand.rs15
-rw-r--r--tests/ui/simd/empty-simd-vector-in-operand.stderr15
-rw-r--r--tests/ui/simd/monomorphize-too-long.rs3
-rw-r--r--tests/ui/simd/monomorphize-zero-length.rs3
-rw-r--r--tests/ui/simd/type-generic-monomorphisation-empty.rs4
-rw-r--r--tests/ui/simd/type-generic-monomorphisation-non-primitive.rs4
-rw-r--r--tests/ui/simd/type-generic-monomorphisation-oversized.rs4
-rw-r--r--tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs4
-rw-r--r--tests/ui/simd/type-generic-monomorphisation.rs5
-rw-r--r--tests/ui/simd/type-wide-ptr.rs4
-rw-r--r--tests/ui/stats/input-stats.stderr78
-rw-r--r--tests/ui/tail-typeck.rs4
-rw-r--r--tests/ui/tail-typeck.stderr2
-rw-r--r--tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable-implied.rs4
-rw-r--r--tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable-neon.rs4
-rw-r--r--tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable.rs5
-rw-r--r--tests/ui/target-feature/forbidden-hardfloat-target-feature-flag.rs5
-rw-r--r--tests/ui/target-feature/forbidden-target-feature-flag-disable.rs2
-rw-r--r--tests/ui/target-feature/forbidden-target-feature-flag.rs4
-rw-r--r--tests/ui/target-feature/target-cpu-lacks-required-target-feature.rs3
-rw-r--r--tests/ui/target-feature/tied-features-no-implication.pacg.stderr4
-rw-r--r--tests/ui/target-feature/tied-features-no-implication.rs8
-rw-r--r--tests/ui/test-attrs/test-panic-abort-disabled.rs3
-rw-r--r--tests/ui/track-diagnostics/track.rs3
-rw-r--r--tests/ui/track-diagnostics/track2.rs2
-rw-r--r--tests/ui/track-diagnostics/track3.rs2
-rw-r--r--tests/ui/track-diagnostics/track4.rs2
-rw-r--r--tests/ui/track-diagnostics/track5.rs2
-rw-r--r--tests/ui/track-diagnostics/track6.rs2
-rw-r--r--tests/ui/traits/default_auto_traits/backward-compatible-lazy-bounds-pass.rs25
-rw-r--r--tests/ui/traits/default_auto_traits/default-bounds.rs41
-rw-r--r--tests/ui/traits/default_auto_traits/default-bounds.stderr31
-rw-r--r--tests/ui/traits/default_auto_traits/extern-types.current.stderr17
-rw-r--r--tests/ui/traits/default_auto_traits/extern-types.next.stderr17
-rw-r--r--tests/ui/traits/default_auto_traits/extern-types.rs49
-rw-r--r--tests/ui/traits/default_auto_traits/maybe-bounds-in-dyn-traits.rs61
-rw-r--r--tests/ui/traits/default_auto_traits/maybe-bounds-in-dyn-traits.stderr23
-rw-r--r--tests/ui/traits/default_auto_traits/maybe-bounds-in-traits.rs115
-rw-r--r--tests/ui/traits/default_auto_traits/maybe-bounds-in-traits.stderr71
-rw-r--r--tests/ui/traits/mutual-recursion-issue-75860.stderr2
-rw-r--r--tests/ui/traits/object/suggestion-trait-object-issue-139174.rs24
-rw-r--r--tests/ui/traits/object/suggestion-trait-object-issue-139174.stderr40
-rw-r--r--tests/ui/traits/solver-cycles/129541-recursive-struct.rs3
-rw-r--r--tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs2
-rw-r--r--tests/ui/treat-err-as-bug/span_delayed_bug.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-1.rs3
-rw-r--r--tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-1.stderr11
-rw-r--r--tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-2.rs4
-rw-r--r--tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-2.stderr11
-rw-r--r--tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-3.rs4
-rw-r--r--tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-3.stderr11
-rw-r--r--tests/ui/type/issue-91268.rs3
-rw-r--r--tests/ui/type/issue-91268.stderr2
-rw-r--r--tests/ui/type/pattern_types/const_block.rs10
-rw-r--r--tests/ui/type/type-arg-out-of-scope.rs3
-rw-r--r--tests/ui/type/type-arg-out-of-scope.stderr4
-rw-r--r--tests/ui/typeck/issue-91334.rs4
-rw-r--r--tests/ui/typeck/output-type-mismatch.rs4
-rw-r--r--tests/ui/typeck/output-type-mismatch.stderr2
-rw-r--r--tests/ui/typeck/while-type-error.rs4
-rw-r--r--tests/ui/typeck/while-type-error.stderr2
-rw-r--r--tests/ui/typeck/wrong-ret-type.rs3
-rw-r--r--tests/ui/typeck/wrong-ret-type.stderr2
-rw-r--r--tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs2
-rw-r--r--tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs2
-rw-r--r--tests/ui/unresolved/unresolved-import.rs2
-rw-r--r--tests/ui/unresolved/unresolved-import.stderr10
-rw-r--r--tests/ui/unsafe/const_pat_in_layout_restricted.rs23
-rw-r--r--tests/ui/use/use-meta-mismatch.rs4
-rw-r--r--tests/ui/use/use-meta-mismatch.stderr2
-rw-r--r--tests/ui/windows-subsystem/windows-subsystem-invalid.rs4
574 files changed, 4027 insertions, 2997 deletions
diff --git a/tests/codegen/cast-target-abi.rs b/tests/codegen/cast-target-abi.rs
index 186198bc631..e1a7ad718a0 100644
--- a/tests/codegen/cast-target-abi.rs
+++ b/tests/codegen/cast-target-abi.rs
@@ -2,7 +2,7 @@
 //@ add-core-stubs
 //@ revisions:aarch64 loongarch64 powerpc64 sparc64 x86_64
 //@ min-llvm-version: 19
-//@ compile-flags: -Copt-level=3 -Cno-prepopulate-passes -Zlint-llvm-ir -Cllvm-args=-lint-abort-on-error
+//@ compile-flags: -Copt-level=3 -Cno-prepopulate-passes -Zlint-llvm-ir
 
 //@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
 //@[aarch64] needs-llvm-components: arm
diff --git a/tests/codegen/cffi/ffi-out-of-bounds-loads.rs b/tests/codegen/cffi/ffi-out-of-bounds-loads.rs
index 404f6237849..73bc7ef6b77 100644
--- a/tests/codegen/cffi/ffi-out-of-bounds-loads.rs
+++ b/tests/codegen/cffi/ffi-out-of-bounds-loads.rs
@@ -1,7 +1,7 @@
 //@ add-core-stubs
 //@ revisions: linux apple
 //@ min-llvm-version: 19
-//@ compile-flags: -Copt-level=0 -Cno-prepopulate-passes -Zlint-llvm-ir -Cllvm-args=-lint-abort-on-error
+//@ compile-flags: -Copt-level=0 -Cno-prepopulate-passes -Zlint-llvm-ir
 
 //@[linux] compile-flags: --target x86_64-unknown-linux-gnu
 //@[linux] needs-llvm-components: x86
diff --git a/tests/codegen/clone_as_copy.rs b/tests/codegen/clone_as_copy.rs
index c39f120044c..ef834ef5912 100644
--- a/tests/codegen/clone_as_copy.rs
+++ b/tests/codegen/clone_as_copy.rs
@@ -1,6 +1,4 @@
 //@ revisions: DEBUGINFO NODEBUGINFO
-//@ compile-flags: -Zunsound-mir-opts
-// FIXME: see <https://github.com/rust-lang/rust/issues/132353>
 //@ compile-flags: -Copt-level=3 -Cno-prepopulate-passes
 //@ [DEBUGINFO] compile-flags: -Cdebuginfo=full
 
diff --git a/tests/codegen/slice-last-elements-optimization.rs b/tests/codegen/slice-last-elements-optimization.rs
new file mode 100644
index 00000000000..b90f91d7b17
--- /dev/null
+++ b/tests/codegen/slice-last-elements-optimization.rs
@@ -0,0 +1,37 @@
+//@ compile-flags: -Copt-level=3
+//@ only-x86_64
+//@ min-llvm-version: 20
+#![crate_type = "lib"]
+
+// This test verifies that LLVM 20 properly optimizes the bounds check
+// when accessing the last few elements of a slice with proper conditions.
+// Previously, this would generate an unreachable branch to
+// slice_start_index_len_fail even when the bounds check was provably safe.
+
+// CHECK-LABEL: @last_four_initial(
+#[no_mangle]
+pub fn last_four_initial(s: &[u8]) -> &[u8] {
+    // Previously this would generate a branch to slice_start_index_len_fail
+    // that is unreachable. The LLVM 20 fix should eliminate this branch.
+    // CHECK-NOT: slice_start_index_len_fail
+    // CHECK-NOT: unreachable
+    let start = if s.len() <= 4 { 0 } else { s.len() - 4 };
+    &s[start..]
+}
+
+// CHECK-LABEL: @last_four_optimized(
+#[no_mangle]
+pub fn last_four_optimized(s: &[u8]) -> &[u8] {
+    // This version was already correctly optimized before the fix in LLVM 20.
+    // CHECK-NOT: slice_start_index_len_fail
+    // CHECK-NOT: unreachable
+    if s.len() <= 4 { &s[0..] } else { &s[s.len() - 4..] }
+}
+
+// Just to verify we're correctly checking for the right thing
+// CHECK-LABEL: @test_bounds_check_happens(
+#[no_mangle]
+pub fn test_bounds_check_happens(s: &[u8], i: usize) -> &[u8] {
+    // CHECK: slice_start_index_len_fail
+    &s[i..]
+}
diff --git a/tests/codegen/slice-split-at.rs b/tests/codegen/slice-split-at.rs
new file mode 100644
index 00000000000..07018cf9c91
--- /dev/null
+++ b/tests/codegen/slice-split-at.rs
@@ -0,0 +1,24 @@
+//@ compile-flags: -Copt-level=3
+#![crate_type = "lib"]
+
+// Check that no panic is generated in `split_at` when calculating the index for
+// the tail chunk using `checked_sub`.
+//
+// Tests written for refactored implementations of:
+// `<[T]>::{split_last_chunk, split_last_chunk_mut, last_chunk, last_chunk_mut}`
+
+// CHECK-LABEL: @split_at_last_chunk
+#[no_mangle]
+pub fn split_at_last_chunk(s: &[u8], chunk_size: usize) -> Option<(&[u8], &[u8])> {
+    // CHECK-NOT: panic
+    let Some(index) = s.len().checked_sub(chunk_size) else { return None };
+    Some(s.split_at(index))
+}
+
+// CHECK-LABEL: @split_at_mut_last_chunk
+#[no_mangle]
+pub fn split_at_mut_last_chunk(s: &mut [u8], chunk_size: usize) -> Option<(&mut [u8], &mut [u8])> {
+    // CHECK-NOT: panic
+    let Some(index) = s.len().checked_sub(chunk_size) else { return None };
+    Some(s.split_at_mut(index))
+}
diff --git a/tests/codegen/try_question_mark_nop.rs b/tests/codegen/try_question_mark_nop.rs
index 3a3453b22b4..9430465a286 100644
--- a/tests/codegen/try_question_mark_nop.rs
+++ b/tests/codegen/try_question_mark_nop.rs
@@ -16,12 +16,17 @@ use std::ptr::NonNull;
 #[no_mangle]
 pub fn option_nop_match_32(x: Option<u32>) -> Option<u32> {
     // CHECK: start:
-    // TWENTY-NEXT: %[[IS_SOME:.+]] = trunc nuw i32 %0 to i1
-    // TWENTY-NEXT: %[[PAYLOAD:.+]] = select i1 %[[IS_SOME]], i32 %1, i32 undef
-    // CHECK-NEXT: [[REG1:%.*]] = insertvalue { i32, i32 } poison, i32 %0, 0
-    // NINETEEN-NEXT: [[REG2:%.*]] = insertvalue { i32, i32 } [[REG1]], i32 %1, 1
-    // TWENTY-NEXT: [[REG2:%.*]] = insertvalue { i32, i32 } [[REG1]], i32 %[[PAYLOAD]], 1
-    // CHECK-NEXT: ret { i32, i32 } [[REG2]]
+    // CHECK-NEXT: [[TRUNC:%.*]] = trunc nuw i32 %0 to i1
+
+    // NINETEEN-NEXT: [[SELECT:%.*]] = select i1 [[TRUNC]], i32 %0, i32 0
+    // NINETEEN-NEXT: [[REG2:%.*]] = insertvalue { i32, i32 } poison, i32 [[SELECT]], 0
+    // NINETEEN-NEXT: [[REG3:%.*]] = insertvalue { i32, i32 } [[REG2]], i32 %1, 1
+
+    // TWENTY-NEXT: [[SELECT:%.*]] = select i1 [[TRUNC]], i32 %1, i32 undef
+    // TWENTY-NEXT: [[REG2:%.*]] = insertvalue { i32, i32 } poison, i32 %0, 0
+    // TWENTY-NEXT: [[REG3:%.*]] = insertvalue { i32, i32 } [[REG2]], i32 [[SELECT]], 1
+
+    // CHECK-NEXT: ret { i32, i32 } [[REG3]]
     match x {
         Some(x) => Some(x),
         None => None,
@@ -90,12 +95,17 @@ pub fn control_flow_nop_traits_32(x: ControlFlow<i32, u32>) -> ControlFlow<i32,
 #[no_mangle]
 pub fn option_nop_match_64(x: Option<u64>) -> Option<u64> {
     // CHECK: start:
-    // TWENTY-NEXT: %[[TRUNC:[0-9]+]] = trunc nuw i64 %0 to i1
-    // TWENTY-NEXT: %[[SEL:\.[0-9]+]] = select i1 %[[TRUNC]], i64 %1, i64 undef
-    // CHECK-NEXT: [[REG1:%[0-9a-zA-Z_.]+]] = insertvalue { i64, i64 } poison, i64 %0, 0
-    // NINETEEN-NEXT: [[REG2:%[0-9a-zA-Z_.]+]] = insertvalue { i64, i64 } [[REG1]], i64 %1, 1
-    // TWENTY-NEXT: [[REG2:%[0-9a-zA-Z_.]+]] = insertvalue { i64, i64 } [[REG1]], i64 %[[SEL]], 1
-    // CHECK-NEXT: ret { i64, i64 } [[REG2]]
+    // CHECK-NEXT: [[TRUNC:%.*]] = trunc nuw i64 %0 to i1
+
+    // NINETEEN-NEXT: [[SELECT:%.*]] = select i1 [[TRUNC]], i64 %0, i64 0
+    // NINETEEN-NEXT: [[REG2:%.*]] = insertvalue { i64, i64 } poison, i64 [[SELECT]], 0
+    // NINETEEN-NEXT: [[REG3:%.*]] = insertvalue { i64, i64 } [[REG2]], i64 %1, 1
+
+    // TWENTY-NEXT: [[SELECT:%.*]] = select i1 [[TRUNC]], i64 %1, i64 undef
+    // TWENTY-NEXT: [[REG2:%.*]] = insertvalue { i64, i64 } poison, i64 %0, 0
+    // TWENTY-NEXT: [[REG3:%.*]] = insertvalue { i64, i64 } [[REG2]], i64 [[SELECT]], 1
+
+    // CHECK-NEXT: ret { i64, i64 } [[REG3]]
     match x {
         Some(x) => Some(x),
         None => None,
@@ -164,8 +174,8 @@ pub fn control_flow_nop_traits_64(x: ControlFlow<i64, u64>) -> ControlFlow<i64,
 #[no_mangle]
 pub fn result_nop_match_128(x: Result<i128, u128>) -> Result<i128, u128> {
     // CHECK: start:
-    // CHECK-NEXT: getelementptr inbounds {{(nuw )?}}i8
     // CHECK-NEXT: store i128
+    // CHECK-NEXT: getelementptr inbounds {{(nuw )?}}i8
     // CHECK-NEXT: store i128
     // CHECK-NEXT: ret void
     match x {
@@ -189,8 +199,8 @@ pub fn result_nop_traits_128(x: Result<i128, u128>) -> Result<i128, u128> {
 #[no_mangle]
 pub fn control_flow_nop_match_128(x: ControlFlow<i128, u128>) -> ControlFlow<i128, u128> {
     // CHECK: start:
-    // CHECK-NEXT: getelementptr inbounds {{(nuw )?}}i8
     // CHECK-NEXT: store i128
+    // CHECK-NEXT: getelementptr inbounds {{(nuw )?}}i8
     // CHECK-NEXT: store i128
     // CHECK-NEXT: ret void
     match x {
diff --git a/tests/coverage/abort.cov-map b/tests/coverage/abort.cov-map
index 84fae4a595a..26536caeba5 100644
--- a/tests/coverage/abort.cov-map
+++ b/tests/coverage/abort.cov-map
@@ -34,14 +34,14 @@ Number of file 0 mappings: 13
 Highest counter ID seen: c4
 
 Function name: abort::might_abort
-Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 03, 01, 01, 14, 05, 02, 09, 01, 24, 02, 02, 0c, 03, 02]
+Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 03, 01, 01, 14, 05, 02, 09, 01, 0f, 02, 02, 0c, 03, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 3, 1) to (start + 1, 20)
-- Code(Counter(1)) at (prev + 2, 9) to (start + 1, 36)
+- Code(Counter(1)) at (prev + 2, 9) to (start + 1, 15)
 - Code(Expression(0, Sub)) at (prev + 2, 12) to (start + 3, 2)
     = (c0 - c1)
 Highest counter ID seen: c1
diff --git a/tests/coverage/assert-ne.cov-map b/tests/coverage/assert-ne.cov-map
index b432e63c168..27d4b0382de 100644
--- a/tests/coverage/assert-ne.cov-map
+++ b/tests/coverage/assert-ne.cov-map
@@ -1,12 +1,12 @@
 Function name: assert_ne::main
-Raw bytes (28): 0x[01, 01, 02, 01, 05, 01, 09, 04, 01, 08, 01, 03, 1c, 05, 04, 0d, 00, 13, 02, 02, 0d, 00, 13, 06, 03, 05, 01, 02]
+Raw bytes (28): 0x[01, 01, 02, 01, 05, 01, 09, 04, 01, 08, 01, 03, 15, 05, 04, 0d, 00, 13, 02, 02, 0d, 00, 13, 06, 03, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 4
-- Code(Counter(0)) at (prev + 8, 1) to (start + 3, 28)
+- Code(Counter(0)) at (prev + 8, 1) to (start + 3, 21)
 - Code(Counter(1)) at (prev + 4, 13) to (start + 0, 19)
 - Code(Expression(0, Sub)) at (prev + 2, 13) to (start + 0, 19)
     = (c0 - c1)
diff --git a/tests/coverage/assert-ne.coverage b/tests/coverage/assert-ne.coverage
index 236a8fd1385..fc43d4a8e06 100644
--- a/tests/coverage/assert-ne.coverage
+++ b/tests/coverage/assert-ne.coverage
@@ -7,7 +7,7 @@
    LL|       |
    LL|      1|fn main() {
    LL|      1|    assert_ne!(
-   LL|      1|        Foo(5), // Make sure this expression's span isn't lost.
+   LL|      1|        black_box(Foo(5)), // Make sure this expression's span isn't lost.
    LL|      1|        if black_box(false) {
    LL|      0|            Foo(0) //
    LL|       |        } else {
diff --git a/tests/coverage/assert-ne.rs b/tests/coverage/assert-ne.rs
index 8a8fe089804..9d9fcb71ba7 100644
--- a/tests/coverage/assert-ne.rs
+++ b/tests/coverage/assert-ne.rs
@@ -7,7 +7,7 @@ struct Foo(u32);
 
 fn main() {
     assert_ne!(
-        Foo(5), // Make sure this expression's span isn't lost.
+        black_box(Foo(5)), // Make sure this expression's span isn't lost.
         if black_box(false) {
             Foo(0) //
         } else {
diff --git a/tests/coverage/assert_not.cov-map b/tests/coverage/assert_not.cov-map
index 526110ebbb7..3aef4274edc 100644
--- a/tests/coverage/assert_not.cov-map
+++ b/tests/coverage/assert_not.cov-map
@@ -1,13 +1,13 @@
 Function name: assert_not::main
-Raw bytes (29): 0x[01, 01, 00, 05, 01, 06, 01, 01, 12, 01, 02, 05, 00, 14, 01, 01, 05, 00, 14, 01, 01, 05, 00, 16, 01, 01, 01, 00, 02]
+Raw bytes (29): 0x[01, 01, 00, 05, 01, 06, 01, 01, 11, 01, 02, 05, 00, 13, 01, 01, 05, 00, 13, 01, 01, 05, 00, 15, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 5
-- Code(Counter(0)) at (prev + 6, 1) to (start + 1, 18)
-- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 20)
-- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 20)
-- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 22)
+- Code(Counter(0)) at (prev + 6, 1) to (start + 1, 17)
+- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 19)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 19)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 21)
 - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
 Highest counter ID seen: c0
 
diff --git a/tests/coverage/async_block.cov-map b/tests/coverage/async_block.cov-map
index 5eb69e668ca..d9196f446f1 100644
--- a/tests/coverage/async_block.cov-map
+++ b/tests/coverage/async_block.cov-map
@@ -1,5 +1,5 @@
 Function name: async_block::main
-Raw bytes (36): 0x[01, 01, 01, 05, 01, 06, 01, 07, 01, 00, 0b, 02, 01, 09, 00, 0a, 05, 00, 0e, 00, 13, 02, 00, 14, 01, 16, 02, 07, 0a, 02, 06, 01, 03, 01, 00, 02]
+Raw bytes (36): 0x[01, 01, 01, 05, 01, 06, 01, 07, 01, 00, 0b, 02, 01, 09, 00, 0a, 05, 00, 0e, 00, 13, 02, 01, 0d, 00, 13, 02, 07, 09, 00, 22, 01, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
@@ -9,11 +9,11 @@ Number of file 0 mappings: 6
 - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10)
     = (c1 - c0)
 - Code(Counter(1)) at (prev + 0, 14) to (start + 0, 19)
-- Code(Expression(0, Sub)) at (prev + 0, 20) to (start + 1, 22)
+- Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 0, 19)
     = (c1 - c0)
-- Code(Expression(0, Sub)) at (prev + 7, 10) to (start + 2, 6)
+- Code(Expression(0, Sub)) at (prev + 7, 9) to (start + 0, 34)
     = (c1 - c0)
-- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2)
 Highest counter ID seen: c1
 
 Function name: async_block::main::{closure#0}
diff --git a/tests/coverage/async_block.coverage b/tests/coverage/async_block.coverage
index 9e3294492cd..4e00024aebd 100644
--- a/tests/coverage/async_block.coverage
+++ b/tests/coverage/async_block.coverage
@@ -15,6 +15,6 @@
    LL|     12|            }
    LL|     16|        };
    LL|     16|        executor::block_on(future);
-   LL|     16|    }
+   LL|       |    }
    LL|      1|}
 
diff --git a/tests/coverage/async_closure.cov-map b/tests/coverage/async_closure.cov-map
index 0e1d9877830..a4ef0ceeb6d 100644
--- a/tests/coverage/async_closure.cov-map
+++ b/tests/coverage/async_closure.cov-map
@@ -30,21 +30,23 @@ Number of file 0 mappings: 2
 Highest counter ID seen: c0
 
 Function name: async_closure::main::{closure#0}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 23, 00, 24]
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 0b, 22, 00, 23, 01, 00, 23, 00, 24]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
-Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 11, 35) to (start + 0, 36)
+Number of file 0 mappings: 2
+- Code(Counter(0)) at (prev + 11, 34) to (start + 0, 35)
+- Code(Counter(0)) at (prev + 0, 35) to (start + 0, 36)
 Highest counter ID seen: c0
 
 Function name: async_closure::main::{closure#0}
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 23, 00, 24]
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 0b, 22, 00, 23, 01, 00, 23, 00, 24]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
-Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 11, 35) to (start + 0, 36)
+Number of file 0 mappings: 2
+- Code(Counter(0)) at (prev + 11, 34) to (start + 0, 35)
+- Code(Counter(0)) at (prev + 0, 35) to (start + 0, 36)
 Highest counter ID seen: c0
 
 Function name: async_closure::main::{closure#0}::{closure#0}::<i16>
diff --git a/tests/coverage/async_closure.coverage b/tests/coverage/async_closure.coverage
index 10a8ea14504..5aed131de2e 100644
--- a/tests/coverage/async_closure.coverage
+++ b/tests/coverage/async_closure.coverage
@@ -9,7 +9,6 @@
    LL|       |
    LL|      1|pub fn main() {
    LL|      2|    let async_closure = async || {};
-                                               ^1
   ------------------
   | async_closure::main::{closure#0}:
   |   LL|      1|    let async_closure = async || {};
@@ -17,6 +16,9 @@
   | async_closure::main::{closure#0}:
   |   LL|      1|    let async_closure = async || {};
   ------------------
+  | async_closure::main::{closure#0}::{closure#0}::<i16>:
+  |   LL|      1|    let async_closure = async || {};
+  ------------------
    LL|      1|    executor::block_on(async_closure());
    LL|      1|    executor::block_on(call_once(async_closure));
    LL|      1|}
diff --git a/tests/coverage/attr/off-on-sandwich.cov-map b/tests/coverage/attr/off-on-sandwich.cov-map
index ef6f5a9dc42..c55c5897d8b 100644
--- a/tests/coverage/attr/off-on-sandwich.cov-map
+++ b/tests/coverage/attr/off-on-sandwich.cov-map
@@ -1,30 +1,30 @@
 Function name: off_on_sandwich::dense_a::dense_b
-Raw bytes (14): 0x[01, 01, 00, 02, 01, 10, 05, 02, 12, 01, 07, 05, 00, 06]
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 10, 05, 02, 10, 01, 07, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 2
-- Code(Counter(0)) at (prev + 16, 5) to (start + 2, 18)
+- Code(Counter(0)) at (prev + 16, 5) to (start + 2, 16)
 - Code(Counter(0)) at (prev + 7, 5) to (start + 0, 6)
 Highest counter ID seen: c0
 
 Function name: off_on_sandwich::sparse_a::sparse_b::sparse_c
-Raw bytes (14): 0x[01, 01, 00, 02, 01, 22, 09, 02, 17, 01, 0b, 09, 00, 0a]
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 22, 09, 02, 15, 01, 0b, 09, 00, 0a]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 2
-- Code(Counter(0)) at (prev + 34, 9) to (start + 2, 23)
+- Code(Counter(0)) at (prev + 34, 9) to (start + 2, 21)
 - Code(Counter(0)) at (prev + 11, 9) to (start + 0, 10)
 Highest counter ID seen: c0
 
 Function name: off_on_sandwich::sparse_a::sparse_b::sparse_c::sparse_d
-Raw bytes (14): 0x[01, 01, 00, 02, 01, 25, 0d, 02, 1b, 01, 07, 0d, 00, 0e]
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 25, 0d, 02, 19, 01, 07, 0d, 00, 0e]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 2
-- Code(Counter(0)) at (prev + 37, 13) to (start + 2, 27)
+- Code(Counter(0)) at (prev + 37, 13) to (start + 2, 25)
 - Code(Counter(0)) at (prev + 7, 13) to (start + 0, 14)
 Highest counter ID seen: c0
 
diff --git a/tests/coverage/bad_counter_ids.cov-map b/tests/coverage/bad_counter_ids.cov-map
index baac0073fcb..f08a70a899d 100644
--- a/tests/coverage/bad_counter_ids.cov-map
+++ b/tests/coverage/bad_counter_ids.cov-map
@@ -1,10 +1,10 @@
 Function name: bad_counter_ids::eq_bad
-Raw bytes (14): 0x[01, 01, 00, 02, 01, 24, 01, 02, 1f, 00, 03, 01, 00, 02]
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 24, 01, 02, 0f, 00, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 2
-- Code(Counter(0)) at (prev + 36, 1) to (start + 2, 31)
+- Code(Counter(0)) at (prev + 36, 1) to (start + 2, 15)
 - Code(Zero) at (prev + 3, 1) to (start + 0, 2)
 Highest counter ID seen: c0
 
@@ -20,12 +20,12 @@ Number of file 0 mappings: 3
 Highest counter ID seen: c0
 
 Function name: bad_counter_ids::eq_good
-Raw bytes (14): 0x[01, 01, 00, 02, 01, 10, 01, 02, 1f, 01, 03, 01, 00, 02]
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 10, 01, 02, 0f, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 2
-- Code(Counter(0)) at (prev + 16, 1) to (start + 2, 31)
+- Code(Counter(0)) at (prev + 16, 1) to (start + 2, 15)
 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
 Highest counter ID seen: c0
 
@@ -41,12 +41,12 @@ Number of file 0 mappings: 3
 Highest counter ID seen: c0
 
 Function name: bad_counter_ids::ne_bad
-Raw bytes (14): 0x[01, 01, 00, 02, 01, 2e, 01, 02, 1f, 00, 03, 01, 00, 02]
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 2e, 01, 02, 0f, 00, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 2
-- Code(Counter(0)) at (prev + 46, 1) to (start + 2, 31)
+- Code(Counter(0)) at (prev + 46, 1) to (start + 2, 15)
 - Code(Zero) at (prev + 3, 1) to (start + 0, 2)
 Highest counter ID seen: c0
 
@@ -62,12 +62,12 @@ Number of file 0 mappings: 3
 Highest counter ID seen: c0
 
 Function name: bad_counter_ids::ne_good
-Raw bytes (14): 0x[01, 01, 00, 02, 01, 1a, 01, 02, 1f, 01, 03, 01, 00, 02]
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 1a, 01, 02, 0f, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 2
-- Code(Counter(0)) at (prev + 26, 1) to (start + 2, 31)
+- Code(Counter(0)) at (prev + 26, 1) to (start + 2, 15)
 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
 Highest counter ID seen: c0
 
diff --git a/tests/coverage/branch/guard.cov-map b/tests/coverage/branch/guard.cov-map
index 55f45daa9c9..46533df00f7 100644
--- a/tests/coverage/branch/guard.cov-map
+++ b/tests/coverage/branch/guard.cov-map
@@ -1,5 +1,5 @@
 Function name: guard::branch_match_guard
-Raw bytes (89): 0x[01, 01, 08, 05, 0d, 09, 05, 05, 0f, 0d, 11, 17, 1b, 01, 05, 1f, 11, 09, 0d, 0d, 01, 0c, 01, 01, 10, 02, 03, 0b, 00, 0c, 06, 01, 14, 02, 0a, 0d, 03, 0e, 00, 0f, 05, 00, 14, 00, 19, 20, 0d, 02, 00, 14, 00, 1e, 0d, 00, 1d, 02, 0a, 11, 03, 0e, 00, 0f, 02, 00, 14, 00, 19, 20, 11, 0a, 00, 14, 00, 1e, 11, 00, 1d, 02, 0a, 12, 03, 0e, 02, 0a, 01, 04, 01, 00, 02]
+Raw bytes (89): 0x[01, 01, 08, 05, 0d, 09, 05, 05, 0f, 0d, 11, 17, 1b, 01, 05, 1f, 11, 09, 0d, 0d, 01, 0c, 01, 01, 0e, 02, 03, 0b, 00, 0c, 06, 01, 14, 02, 0a, 0d, 03, 0e, 00, 0f, 05, 00, 14, 00, 19, 20, 0d, 02, 00, 14, 00, 1e, 0d, 00, 1d, 02, 0a, 11, 03, 0e, 00, 0f, 02, 00, 14, 00, 19, 20, 11, 0a, 00, 14, 00, 1e, 11, 00, 1d, 02, 0a, 12, 03, 0e, 02, 0a, 01, 04, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 8
@@ -12,7 +12,7 @@ Number of expressions: 8
 - expression 6 operands: lhs = Expression(7, Add), rhs = Counter(4)
 - expression 7 operands: lhs = Counter(2), rhs = Counter(3)
 Number of file 0 mappings: 13
-- Code(Counter(0)) at (prev + 12, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 12, 1) to (start + 1, 14)
 - Code(Expression(0, Sub)) at (prev + 3, 11) to (start + 0, 12)
     = (c1 - c3)
 - Code(Expression(1, Sub)) at (prev + 1, 20) to (start + 2, 10)
diff --git a/tests/coverage/branch/if-let.cov-map b/tests/coverage/branch/if-let.cov-map
index db45df2a5cd..7f6b174615a 100644
--- a/tests/coverage/branch/if-let.cov-map
+++ b/tests/coverage/branch/if-let.cov-map
@@ -1,11 +1,11 @@
 Function name: if_let::if_let
-Raw bytes (43): 0x[01, 01, 01, 01, 05, 07, 01, 0c, 01, 01, 10, 20, 02, 05, 03, 0c, 00, 13, 02, 00, 11, 00, 12, 01, 00, 16, 00, 1b, 02, 00, 1c, 02, 06, 05, 02, 0c, 02, 06, 01, 03, 05, 01, 02]
+Raw bytes (43): 0x[01, 01, 01, 01, 05, 07, 01, 0c, 01, 01, 0e, 20, 02, 05, 03, 0c, 00, 13, 02, 00, 11, 00, 12, 01, 00, 16, 00, 1b, 02, 00, 1c, 02, 06, 05, 02, 0c, 02, 06, 01, 03, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 7
-- Code(Counter(0)) at (prev + 12, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 12, 1) to (start + 1, 14)
 - Branch { true: Expression(0, Sub), false: Counter(1) } at (prev + 3, 12) to (start + 0, 19)
     true  = (c0 - c1)
     false = c1
diff --git a/tests/coverage/branch/if.cov-map b/tests/coverage/branch/if.cov-map
index a6b865318c6..1d40f032aa8 100644
--- a/tests/coverage/branch/if.cov-map
+++ b/tests/coverage/branch/if.cov-map
@@ -1,5 +1,5 @@
 Function name: if::branch_and
-Raw bytes (54): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 08, 01, 2b, 01, 01, 10, 01, 03, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 20, 09, 06, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
+Raw bytes (54): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 08, 01, 2b, 01, 01, 0e, 01, 03, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 20, 09, 06, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 3
@@ -7,7 +7,7 @@ Number of expressions: 3
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 2 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 8
-- Code(Counter(0)) at (prev + 43, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 43, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 3, 8) to (start + 0, 9)
 - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 8) to (start + 0, 9)
     true  = c1
@@ -23,7 +23,7 @@ Number of file 0 mappings: 8
 Highest counter ID seen: c2
 
 Function name: if::branch_not
-Raw bytes (116): 0x[01, 01, 07, 01, 05, 01, 09, 01, 09, 01, 0d, 01, 0d, 01, 11, 01, 11, 12, 01, 0c, 01, 01, 10, 01, 03, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 05, 01, 09, 00, 11, 02, 01, 05, 00, 06, 01, 01, 08, 00, 0a, 20, 0a, 09, 00, 08, 00, 0a, 0a, 00, 0b, 02, 06, 09, 02, 05, 00, 06, 01, 01, 08, 00, 0b, 20, 0d, 12, 00, 08, 00, 0b, 0d, 00, 0c, 02, 06, 12, 02, 05, 00, 06, 01, 01, 08, 00, 0c, 20, 1a, 11, 00, 08, 00, 0c, 1a, 00, 0d, 02, 06, 11, 02, 05, 00, 06, 01, 01, 01, 00, 02]
+Raw bytes (116): 0x[01, 01, 07, 01, 05, 01, 09, 01, 09, 01, 0d, 01, 0d, 01, 11, 01, 11, 12, 01, 0c, 01, 01, 0e, 01, 03, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 05, 01, 09, 00, 10, 02, 01, 05, 00, 06, 01, 01, 08, 00, 0a, 20, 0a, 09, 00, 08, 00, 0a, 0a, 00, 0b, 02, 06, 09, 02, 05, 00, 06, 01, 01, 08, 00, 0b, 20, 0d, 12, 00, 08, 00, 0b, 0d, 00, 0c, 02, 06, 12, 02, 05, 00, 06, 01, 01, 08, 00, 0c, 20, 1a, 11, 00, 08, 00, 0c, 1a, 00, 0d, 02, 06, 11, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 7
@@ -35,12 +35,12 @@ Number of expressions: 7
 - expression 5 operands: lhs = Counter(0), rhs = Counter(4)
 - expression 6 operands: lhs = Counter(0), rhs = Counter(4)
 Number of file 0 mappings: 18
-- Code(Counter(0)) at (prev + 12, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 12, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 3, 8) to (start + 0, 9)
 - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 8) to (start + 0, 9)
     true  = c1
     false = (c0 - c1)
-- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 17)
+- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 16)
 - Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6)
     = (c0 - c1)
 - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 10)
@@ -68,7 +68,7 @@ Number of file 0 mappings: 18
 Highest counter ID seen: c4
 
 Function name: if::branch_not_as
-Raw bytes (90): 0x[01, 01, 05, 01, 05, 01, 09, 01, 09, 01, 0d, 01, 0d, 0e, 01, 1d, 01, 01, 10, 01, 03, 08, 00, 14, 20, 02, 05, 00, 08, 00, 14, 02, 00, 15, 02, 06, 05, 02, 05, 00, 06, 01, 01, 08, 00, 15, 20, 09, 0a, 00, 08, 00, 15, 09, 00, 16, 02, 06, 0a, 02, 05, 00, 06, 01, 01, 08, 00, 16, 20, 12, 0d, 00, 08, 00, 16, 12, 00, 17, 02, 06, 0d, 02, 05, 00, 06, 01, 01, 01, 00, 02]
+Raw bytes (90): 0x[01, 01, 05, 01, 05, 01, 09, 01, 09, 01, 0d, 01, 0d, 0e, 01, 1d, 01, 01, 0e, 01, 03, 08, 00, 14, 20, 02, 05, 00, 08, 00, 14, 02, 00, 15, 02, 06, 05, 02, 05, 00, 06, 01, 01, 08, 00, 15, 20, 09, 0a, 00, 08, 00, 15, 09, 00, 16, 02, 06, 0a, 02, 05, 00, 06, 01, 01, 08, 00, 16, 20, 12, 0d, 00, 08, 00, 16, 12, 00, 17, 02, 06, 0d, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 5
@@ -78,7 +78,7 @@ Number of expressions: 5
 - expression 3 operands: lhs = Counter(0), rhs = Counter(3)
 - expression 4 operands: lhs = Counter(0), rhs = Counter(3)
 Number of file 0 mappings: 14
-- Code(Counter(0)) at (prev + 29, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 29, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 3, 8) to (start + 0, 20)
 - Branch { true: Expression(0, Sub), false: Counter(1) } at (prev + 0, 8) to (start + 0, 20)
     true  = (c0 - c1)
@@ -104,7 +104,7 @@ Number of file 0 mappings: 14
 Highest counter ID seen: c3
 
 Function name: if::branch_or
-Raw bytes (60): 0x[01, 01, 06, 01, 05, 01, 17, 05, 09, 05, 09, 01, 17, 05, 09, 08, 01, 35, 01, 01, 10, 01, 03, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 20, 09, 12, 00, 0d, 00, 0e, 17, 00, 0f, 02, 06, 12, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
+Raw bytes (60): 0x[01, 01, 06, 01, 05, 01, 17, 05, 09, 05, 09, 01, 17, 05, 09, 08, 01, 35, 01, 01, 0e, 01, 03, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 20, 09, 12, 00, 0d, 00, 0e, 17, 00, 0f, 02, 06, 12, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 6
@@ -115,7 +115,7 @@ Number of expressions: 6
 - expression 4 operands: lhs = Counter(0), rhs = Expression(5, Add)
 - expression 5 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 8
-- Code(Counter(0)) at (prev + 53, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 53, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 3, 8) to (start + 0, 9)
 - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 8) to (start + 0, 9)
     true  = c1
diff --git a/tests/coverage/branch/lazy-boolean.cov-map b/tests/coverage/branch/lazy-boolean.cov-map
index 622f30e2b56..5d4fc57eb8f 100644
--- a/tests/coverage/branch/lazy-boolean.cov-map
+++ b/tests/coverage/branch/lazy-boolean.cov-map
@@ -1,11 +1,11 @@
 Function name: lazy_boolean::branch_and
-Raw bytes (38): 0x[01, 01, 01, 01, 05, 06, 01, 13, 01, 01, 10, 01, 04, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 01, 01, 05, 01, 02]
+Raw bytes (38): 0x[01, 01, 01, 01, 05, 06, 01, 13, 01, 01, 0e, 01, 04, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 6
-- Code(Counter(0)) at (prev + 19, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 19, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 4, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
 - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 13) to (start + 0, 14)
@@ -16,13 +16,13 @@ Number of file 0 mappings: 6
 Highest counter ID seen: c1
 
 Function name: lazy_boolean::branch_or
-Raw bytes (38): 0x[01, 01, 01, 01, 05, 06, 01, 1b, 01, 01, 10, 01, 04, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 01, 01, 05, 01, 02]
+Raw bytes (38): 0x[01, 01, 01, 01, 05, 06, 01, 1b, 01, 01, 0e, 01, 04, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 6
-- Code(Counter(0)) at (prev + 27, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 27, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 4, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
 - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 13) to (start + 0, 14)
@@ -34,7 +34,7 @@ Number of file 0 mappings: 6
 Highest counter ID seen: c1
 
 Function name: lazy_boolean::chain
-Raw bytes (141): 0x[01, 01, 0f, 01, 05, 05, 09, 09, 0d, 01, 11, 01, 11, 01, 3b, 11, 15, 01, 3b, 11, 15, 01, 37, 3b, 19, 11, 15, 01, 37, 3b, 19, 11, 15, 13, 01, 24, 01, 01, 10, 01, 04, 09, 00, 0a, 01, 00, 0d, 00, 12, 20, 05, 02, 00, 0d, 00, 12, 05, 00, 16, 00, 1b, 20, 09, 06, 00, 16, 00, 1b, 09, 00, 1f, 00, 24, 20, 0d, 0a, 00, 1f, 00, 24, 0d, 00, 28, 00, 2d, 01, 01, 05, 00, 11, 01, 03, 09, 00, 0a, 01, 00, 0d, 00, 12, 20, 11, 12, 00, 0d, 00, 12, 12, 00, 16, 00, 1b, 20, 15, 1e, 00, 16, 00, 1b, 1e, 00, 1f, 00, 24, 20, 19, 32, 00, 1f, 00, 24, 32, 00, 28, 00, 2d, 01, 01, 05, 01, 02]
+Raw bytes (141): 0x[01, 01, 0f, 01, 05, 05, 09, 09, 0d, 01, 11, 01, 11, 01, 3b, 11, 15, 01, 3b, 11, 15, 01, 37, 3b, 19, 11, 15, 01, 37, 3b, 19, 11, 15, 13, 01, 24, 01, 01, 0e, 01, 04, 09, 00, 0a, 01, 00, 0d, 00, 12, 20, 05, 02, 00, 0d, 00, 12, 05, 00, 16, 00, 1b, 20, 09, 06, 00, 16, 00, 1b, 09, 00, 1f, 00, 24, 20, 0d, 0a, 00, 1f, 00, 24, 0d, 00, 28, 00, 2d, 01, 01, 05, 00, 10, 01, 03, 09, 00, 0a, 01, 00, 0d, 00, 12, 20, 11, 12, 00, 0d, 00, 12, 12, 00, 16, 00, 1b, 20, 15, 1e, 00, 16, 00, 1b, 1e, 00, 1f, 00, 24, 20, 19, 32, 00, 1f, 00, 24, 32, 00, 28, 00, 2d, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 15
@@ -54,7 +54,7 @@ Number of expressions: 15
 - expression 13 operands: lhs = Expression(14, Add), rhs = Counter(6)
 - expression 14 operands: lhs = Counter(4), rhs = Counter(5)
 Number of file 0 mappings: 19
-- Code(Counter(0)) at (prev + 36, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 36, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 4, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 18)
 - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 13) to (start + 0, 18)
@@ -69,7 +69,7 @@ Number of file 0 mappings: 19
     true  = c3
     false = (c2 - c3)
 - Code(Counter(3)) at (prev + 0, 40) to (start + 0, 45)
-- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 16)
 - Code(Counter(0)) at (prev + 3, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 18)
 - Branch { true: Counter(4), false: Expression(4, Sub) } at (prev + 0, 13) to (start + 0, 18)
@@ -91,7 +91,7 @@ Number of file 0 mappings: 19
 Highest counter ID seen: c6
 
 Function name: lazy_boolean::nested_mixed
-Raw bytes (137): 0x[01, 01, 0d, 01, 05, 01, 1f, 05, 09, 05, 09, 1f, 0d, 05, 09, 1f, 0d, 05, 09, 01, 11, 11, 15, 01, 15, 01, 33, 15, 19, 13, 01, 31, 01, 01, 10, 01, 04, 09, 00, 0a, 01, 00, 0e, 00, 13, 20, 05, 02, 00, 0e, 00, 13, 02, 00, 17, 00, 1d, 20, 09, 06, 00, 17, 00, 1d, 1f, 00, 23, 00, 28, 20, 0d, 1a, 00, 23, 00, 28, 1a, 00, 2c, 00, 33, 01, 01, 05, 00, 11, 01, 03, 09, 00, 0a, 01, 00, 0e, 00, 13, 20, 11, 22, 00, 0e, 00, 13, 11, 00, 17, 00, 1c, 20, 15, 26, 00, 17, 00, 1c, 2a, 00, 22, 00, 28, 20, 19, 2e, 00, 22, 00, 28, 19, 00, 2c, 00, 33, 01, 01, 05, 01, 02]
+Raw bytes (137): 0x[01, 01, 0d, 01, 05, 01, 1f, 05, 09, 05, 09, 1f, 0d, 05, 09, 1f, 0d, 05, 09, 01, 11, 11, 15, 01, 15, 01, 33, 15, 19, 13, 01, 31, 01, 01, 0e, 01, 04, 09, 00, 0a, 01, 00, 0e, 00, 13, 20, 05, 02, 00, 0e, 00, 13, 02, 00, 17, 00, 1d, 20, 09, 06, 00, 17, 00, 1d, 1f, 00, 23, 00, 28, 20, 0d, 1a, 00, 23, 00, 28, 1a, 00, 2c, 00, 33, 01, 01, 05, 00, 10, 01, 03, 09, 00, 0a, 01, 00, 0e, 00, 13, 20, 11, 22, 00, 0e, 00, 13, 11, 00, 17, 00, 1c, 20, 15, 26, 00, 17, 00, 1c, 2a, 00, 22, 00, 28, 20, 19, 2e, 00, 22, 00, 28, 19, 00, 2c, 00, 33, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 13
@@ -109,7 +109,7 @@ Number of expressions: 13
 - expression 11 operands: lhs = Counter(0), rhs = Expression(12, Add)
 - expression 12 operands: lhs = Counter(5), rhs = Counter(6)
 Number of file 0 mappings: 19
-- Code(Counter(0)) at (prev + 49, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 49, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 4, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 14) to (start + 0, 19)
 - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 14) to (start + 0, 19)
@@ -127,7 +127,7 @@ Number of file 0 mappings: 19
     false = ((c1 + c2) - c3)
 - Code(Expression(6, Sub)) at (prev + 0, 44) to (start + 0, 51)
     = ((c1 + c2) - c3)
-- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 17)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 16)
 - Code(Counter(0)) at (prev + 3, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 14) to (start + 0, 19)
 - Branch { true: Counter(4), false: Expression(8, Sub) } at (prev + 0, 14) to (start + 0, 19)
diff --git a/tests/coverage/branch/let-else.cov-map b/tests/coverage/branch/let-else.cov-map
index 215d71599e4..78507a32638 100644
--- a/tests/coverage/branch/let-else.cov-map
+++ b/tests/coverage/branch/let-else.cov-map
@@ -1,11 +1,11 @@
 Function name: let_else::let_else
-Raw bytes (43): 0x[01, 01, 01, 01, 05, 07, 01, 0c, 01, 01, 10, 20, 02, 05, 03, 09, 00, 10, 02, 00, 0e, 00, 0f, 01, 00, 13, 00, 18, 05, 01, 09, 01, 0f, 02, 04, 05, 00, 0b, 01, 01, 01, 00, 02]
+Raw bytes (43): 0x[01, 01, 01, 01, 05, 07, 01, 0c, 01, 01, 0e, 20, 02, 05, 03, 09, 00, 10, 02, 00, 0e, 00, 0f, 01, 00, 13, 00, 18, 05, 01, 09, 01, 0f, 02, 04, 05, 00, 0a, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 7
-- Code(Counter(0)) at (prev + 12, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 12, 1) to (start + 1, 14)
 - Branch { true: Expression(0, Sub), false: Counter(1) } at (prev + 3, 9) to (start + 0, 16)
     true  = (c0 - c1)
     false = c1
@@ -13,7 +13,7 @@ Number of file 0 mappings: 7
     = (c0 - c1)
 - Code(Counter(0)) at (prev + 0, 19) to (start + 0, 24)
 - Code(Counter(1)) at (prev + 1, 9) to (start + 1, 15)
-- Code(Expression(0, Sub)) at (prev + 4, 5) to (start + 0, 11)
+- Code(Expression(0, Sub)) at (prev + 4, 5) to (start + 0, 10)
     = (c0 - c1)
 - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
 Highest counter ID seen: c1
diff --git a/tests/coverage/branch/match-arms.cov-map b/tests/coverage/branch/match-arms.cov-map
index d5b4d04d401..ef71d12c8af 100644
--- a/tests/coverage/branch/match-arms.cov-map
+++ b/tests/coverage/branch/match-arms.cov-map
@@ -1,5 +1,5 @@
 Function name: match_arms::guards
-Raw bytes (88): 0x[01, 01, 08, 15, 05, 19, 09, 1d, 0d, 21, 11, 01, 17, 1b, 11, 1f, 0d, 05, 09, 0c, 01, 30, 01, 01, 10, 21, 03, 0b, 00, 10, 05, 01, 11, 00, 29, 20, 05, 02, 00, 17, 00, 1b, 09, 01, 11, 00, 29, 20, 09, 06, 00, 17, 00, 1b, 0d, 01, 11, 00, 29, 20, 0d, 0a, 00, 17, 00, 1b, 11, 01, 11, 00, 29, 20, 11, 0e, 00, 17, 00, 1b, 12, 01, 0e, 00, 18, 01, 03, 05, 01, 02]
+Raw bytes (88): 0x[01, 01, 08, 15, 05, 19, 09, 1d, 0d, 21, 11, 01, 17, 1b, 11, 1f, 0d, 05, 09, 0c, 01, 30, 01, 01, 0e, 21, 03, 0b, 00, 10, 05, 01, 11, 00, 28, 20, 05, 02, 00, 17, 00, 1b, 09, 01, 11, 00, 28, 20, 09, 06, 00, 17, 00, 1b, 0d, 01, 11, 00, 28, 20, 0d, 0a, 00, 17, 00, 1b, 11, 01, 11, 00, 28, 20, 11, 0e, 00, 17, 00, 1b, 12, 01, 0e, 00, 15, 01, 03, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 8
@@ -12,31 +12,31 @@ Number of expressions: 8
 - expression 6 operands: lhs = Expression(7, Add), rhs = Counter(3)
 - expression 7 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 12
-- Code(Counter(0)) at (prev + 48, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 48, 1) to (start + 1, 14)
 - Code(Counter(8)) at (prev + 3, 11) to (start + 0, 16)
-- Code(Counter(1)) at (prev + 1, 17) to (start + 0, 41)
+- Code(Counter(1)) at (prev + 1, 17) to (start + 0, 40)
 - Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 23) to (start + 0, 27)
     true  = c1
     false = (c5 - c1)
-- Code(Counter(2)) at (prev + 1, 17) to (start + 0, 41)
+- Code(Counter(2)) at (prev + 1, 17) to (start + 0, 40)
 - Branch { true: Counter(2), false: Expression(1, Sub) } at (prev + 0, 23) to (start + 0, 27)
     true  = c2
     false = (c6 - c2)
-- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 41)
+- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 40)
 - Branch { true: Counter(3), false: Expression(2, Sub) } at (prev + 0, 23) to (start + 0, 27)
     true  = c3
     false = (c7 - c3)
-- Code(Counter(4)) at (prev + 1, 17) to (start + 0, 41)
+- Code(Counter(4)) at (prev + 1, 17) to (start + 0, 40)
 - Branch { true: Counter(4), false: Expression(3, Sub) } at (prev + 0, 23) to (start + 0, 27)
     true  = c4
     false = (c8 - c4)
-- Code(Expression(4, Sub)) at (prev + 1, 14) to (start + 0, 24)
+- Code(Expression(4, Sub)) at (prev + 1, 14) to (start + 0, 21)
     = (c0 - (((c1 + c2) + c3) + c4))
 - Code(Counter(0)) at (prev + 3, 5) to (start + 1, 2)
 Highest counter ID seen: c8
 
 Function name: match_arms::match_arms
-Raw bytes (45): 0x[01, 01, 03, 01, 07, 0b, 0d, 05, 09, 07, 01, 18, 01, 01, 10, 01, 03, 0b, 00, 10, 05, 01, 11, 00, 21, 09, 01, 11, 00, 21, 0d, 01, 11, 00, 21, 02, 01, 11, 00, 21, 01, 03, 05, 01, 02]
+Raw bytes (45): 0x[01, 01, 03, 01, 07, 0b, 0d, 05, 09, 07, 01, 18, 01, 01, 0e, 01, 03, 0b, 00, 10, 05, 01, 11, 00, 20, 09, 01, 11, 00, 20, 0d, 01, 11, 00, 20, 02, 01, 11, 00, 20, 01, 03, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 3
@@ -44,18 +44,18 @@ Number of expressions: 3
 - expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3)
 - expression 2 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 7
-- Code(Counter(0)) at (prev + 24, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 24, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 3, 11) to (start + 0, 16)
-- Code(Counter(1)) at (prev + 1, 17) to (start + 0, 33)
-- Code(Counter(2)) at (prev + 1, 17) to (start + 0, 33)
-- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 33)
-- Code(Expression(0, Sub)) at (prev + 1, 17) to (start + 0, 33)
+- Code(Counter(1)) at (prev + 1, 17) to (start + 0, 32)
+- Code(Counter(2)) at (prev + 1, 17) to (start + 0, 32)
+- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 32)
+- Code(Expression(0, Sub)) at (prev + 1, 17) to (start + 0, 32)
     = (c0 - ((c1 + c2) + c3))
 - Code(Counter(0)) at (prev + 3, 5) to (start + 1, 2)
 Highest counter ID seen: c3
 
 Function name: match_arms::or_patterns
-Raw bytes (57): 0x[01, 01, 04, 05, 09, 01, 0b, 03, 0d, 01, 03, 09, 01, 25, 01, 01, 10, 01, 03, 0b, 00, 10, 05, 01, 11, 00, 12, 09, 00, 1e, 00, 1f, 03, 00, 24, 00, 2e, 0d, 01, 11, 00, 12, 06, 00, 1e, 00, 1f, 0e, 00, 24, 00, 2e, 01, 03, 05, 01, 02]
+Raw bytes (57): 0x[01, 01, 04, 05, 09, 01, 0b, 03, 0d, 01, 03, 09, 01, 25, 01, 01, 0e, 01, 03, 0b, 00, 10, 05, 01, 11, 00, 12, 09, 00, 1e, 00, 1f, 03, 00, 24, 00, 2d, 0d, 01, 11, 00, 12, 06, 00, 1e, 00, 1f, 0e, 00, 24, 00, 2d, 01, 03, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 4
@@ -64,16 +64,16 @@ Number of expressions: 4
 - expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3)
 - expression 3 operands: lhs = Counter(0), rhs = Expression(0, Add)
 Number of file 0 mappings: 9
-- Code(Counter(0)) at (prev + 37, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 37, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 3, 11) to (start + 0, 16)
 - Code(Counter(1)) at (prev + 1, 17) to (start + 0, 18)
 - Code(Counter(2)) at (prev + 0, 30) to (start + 0, 31)
-- Code(Expression(0, Add)) at (prev + 0, 36) to (start + 0, 46)
+- Code(Expression(0, Add)) at (prev + 0, 36) to (start + 0, 45)
     = (c1 + c2)
 - Code(Counter(3)) at (prev + 1, 17) to (start + 0, 18)
 - Code(Expression(1, Sub)) at (prev + 0, 30) to (start + 0, 31)
     = (c0 - ((c1 + c2) + c3))
-- Code(Expression(3, Sub)) at (prev + 0, 36) to (start + 0, 46)
+- Code(Expression(3, Sub)) at (prev + 0, 36) to (start + 0, 45)
     = (c0 - (c1 + c2))
 - Code(Counter(0)) at (prev + 3, 5) to (start + 1, 2)
 Highest counter ID seen: c3
diff --git a/tests/coverage/branch/match-trivial.cov-map b/tests/coverage/branch/match-trivial.cov-map
index 31322f127af..1b0c6d12e3d 100644
--- a/tests/coverage/branch/match-trivial.cov-map
+++ b/tests/coverage/branch/match-trivial.cov-map
@@ -1,19 +1,19 @@
 Function name: match_trivial::_uninhabited (unused)
-Raw bytes (9): 0x[01, 01, 00, 01, 00, 16, 01, 01, 10]
+Raw bytes (9): 0x[01, 01, 00, 01, 00, 16, 01, 01, 0e]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 1
-- Code(Zero) at (prev + 22, 1) to (start + 1, 16)
+- Code(Zero) at (prev + 22, 1) to (start + 1, 14)
 Highest counter ID seen: (none)
 
 Function name: match_trivial::trivial
-Raw bytes (14): 0x[01, 01, 00, 02, 01, 1e, 01, 01, 10, 01, 03, 0b, 05, 02]
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 1e, 01, 01, 0e, 01, 03, 0b, 05, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 2
-- Code(Counter(0)) at (prev + 30, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 30, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 3, 11) to (start + 5, 2)
 Highest counter ID seen: c0
 
diff --git a/tests/coverage/branch/while.cov-map b/tests/coverage/branch/while.cov-map
index 5ce92c72b51..67746af051b 100644
--- a/tests/coverage/branch/while.cov-map
+++ b/tests/coverage/branch/while.cov-map
@@ -1,11 +1,11 @@
 Function name: while::while_cond
-Raw bytes (38): 0x[01, 01, 01, 05, 01, 06, 01, 0c, 01, 01, 10, 01, 03, 09, 00, 12, 05, 01, 0b, 00, 10, 20, 02, 01, 00, 0b, 00, 10, 02, 00, 11, 02, 06, 01, 03, 01, 00, 02]
+Raw bytes (38): 0x[01, 01, 01, 05, 01, 06, 01, 0c, 01, 01, 0e, 01, 03, 09, 00, 12, 05, 01, 0b, 00, 10, 20, 02, 01, 00, 0b, 00, 10, 02, 00, 11, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 Number of file 0 mappings: 6
-- Code(Counter(0)) at (prev + 12, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 12, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 3, 9) to (start + 0, 18)
 - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 16)
 - Branch { true: Expression(0, Sub), false: Counter(0) } at (prev + 0, 11) to (start + 0, 16)
@@ -17,13 +17,13 @@ Number of file 0 mappings: 6
 Highest counter ID seen: c1
 
 Function name: while::while_cond_not
-Raw bytes (38): 0x[01, 01, 01, 05, 01, 06, 01, 15, 01, 01, 10, 01, 03, 09, 00, 12, 05, 01, 0b, 00, 14, 20, 02, 01, 00, 0b, 00, 14, 02, 00, 15, 02, 06, 01, 03, 01, 00, 02]
+Raw bytes (38): 0x[01, 01, 01, 05, 01, 06, 01, 15, 01, 01, 0e, 01, 03, 09, 00, 12, 05, 01, 0b, 00, 14, 20, 02, 01, 00, 0b, 00, 14, 02, 00, 15, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 Number of file 0 mappings: 6
-- Code(Counter(0)) at (prev + 21, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 21, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 3, 9) to (start + 0, 18)
 - Code(Counter(1)) at (prev + 1, 11) to (start + 0, 20)
 - Branch { true: Expression(0, Sub), false: Counter(0) } at (prev + 0, 11) to (start + 0, 20)
@@ -35,7 +35,7 @@ Number of file 0 mappings: 6
 Highest counter ID seen: c1
 
 Function name: while::while_op_and
-Raw bytes (58): 0x[01, 01, 05, 05, 09, 05, 01, 0f, 05, 01, 09, 05, 01, 08, 01, 1e, 01, 01, 10, 01, 03, 09, 01, 12, 05, 02, 0b, 00, 10, 20, 09, 02, 00, 0b, 00, 10, 09, 00, 14, 00, 19, 20, 12, 0a, 00, 14, 00, 19, 12, 00, 1a, 03, 06, 01, 04, 01, 00, 02]
+Raw bytes (58): 0x[01, 01, 05, 05, 09, 05, 01, 0f, 05, 01, 09, 05, 01, 08, 01, 1e, 01, 01, 0e, 01, 03, 09, 01, 12, 05, 02, 0b, 00, 10, 20, 09, 02, 00, 0b, 00, 10, 09, 00, 14, 00, 19, 20, 12, 0a, 00, 14, 00, 19, 12, 00, 1a, 03, 06, 01, 04, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 5
@@ -45,7 +45,7 @@ Number of expressions: 5
 - expression 3 operands: lhs = Counter(0), rhs = Counter(2)
 - expression 4 operands: lhs = Counter(1), rhs = Counter(0)
 Number of file 0 mappings: 8
-- Code(Counter(0)) at (prev + 30, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 30, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 3, 9) to (start + 1, 18)
 - Code(Counter(1)) at (prev + 2, 11) to (start + 0, 16)
 - Branch { true: Counter(2), false: Expression(0, Sub) } at (prev + 0, 11) to (start + 0, 16)
@@ -61,7 +61,7 @@ Number of file 0 mappings: 8
 Highest counter ID seen: c2
 
 Function name: while::while_op_or
-Raw bytes (56): 0x[01, 01, 04, 05, 09, 05, 0b, 01, 09, 05, 01, 08, 01, 29, 01, 01, 10, 01, 03, 09, 01, 12, 05, 02, 0b, 00, 10, 20, 09, 02, 00, 0b, 00, 10, 02, 00, 14, 00, 19, 20, 06, 01, 00, 14, 00, 19, 0e, 00, 1a, 03, 06, 01, 04, 01, 00, 02]
+Raw bytes (56): 0x[01, 01, 04, 05, 09, 05, 0b, 01, 09, 05, 01, 08, 01, 29, 01, 01, 0e, 01, 03, 09, 01, 12, 05, 02, 0b, 00, 10, 20, 09, 02, 00, 0b, 00, 10, 02, 00, 14, 00, 19, 20, 06, 01, 00, 14, 00, 19, 0e, 00, 1a, 03, 06, 01, 04, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 4
@@ -70,7 +70,7 @@ Number of expressions: 4
 - expression 2 operands: lhs = Counter(0), rhs = Counter(2)
 - expression 3 operands: lhs = Counter(1), rhs = Counter(0)
 Number of file 0 mappings: 8
-- Code(Counter(0)) at (prev + 41, 1) to (start + 1, 16)
+- Code(Counter(0)) at (prev + 41, 1) to (start + 1, 14)
 - Code(Counter(0)) at (prev + 3, 9) to (start + 1, 18)
 - Code(Counter(1)) at (prev + 2, 11) to (start + 0, 16)
 - Branch { true: Counter(2), false: Expression(0, Sub) } at (prev + 0, 11) to (start + 0, 16)
diff --git a/tests/coverage/closure.cov-map b/tests/coverage/closure.cov-map
index fa20c8cf6d7..2d784ba09b6 100644
--- a/tests/coverage/closure.cov-map
+++ b/tests/coverage/closure.cov-map
@@ -1,15 +1,15 @@
 Function name: closure::main
-Raw bytes (126): 0x[01, 01, 01, 01, 05, 18, 01, 09, 01, 0f, 0d, 01, 16, 0e, 06, 0a, 01, 10, 05, 13, 0d, 01, 1a, 0e, 06, 0a, 01, 10, 05, 0c, 16, 01, 16, 05, 0d, 18, 01, 19, 09, 01, 1e, 01, 04, 09, 00, 29, 01, 01, 09, 00, 2d, 01, 01, 09, 00, 24, 01, 05, 09, 00, 24, 01, 02, 09, 00, 21, 01, 04, 09, 00, 21, 01, 04, 09, 00, 28, 01, 09, 09, 00, 32, 01, 04, 09, 00, 33, 01, 07, 09, 00, 4b, 01, 08, 09, 00, 48, 01, 0a, 09, 00, 47, 01, 08, 09, 00, 44, 01, 0a, 08, 00, 10, 05, 00, 11, 04, 06, 02, 04, 05, 00, 06, 01, 01, 05, 03, 02]
+Raw bytes (126): 0x[01, 01, 01, 01, 05, 18, 01, 09, 01, 0d, 1b, 01, 1a, 05, 02, 0a, 01, 0c, 05, 11, 1b, 01, 1e, 05, 02, 0a, 01, 0c, 05, 0c, 16, 01, 16, 05, 0d, 18, 01, 19, 09, 01, 1e, 01, 04, 09, 00, 29, 01, 01, 09, 00, 2d, 01, 01, 09, 00, 24, 01, 05, 09, 00, 24, 01, 02, 09, 00, 21, 01, 04, 09, 00, 21, 01, 04, 09, 00, 28, 01, 09, 09, 00, 32, 01, 04, 09, 00, 33, 01, 07, 09, 00, 4b, 01, 08, 09, 00, 48, 01, 0a, 09, 00, 47, 01, 08, 09, 00, 44, 01, 0a, 08, 00, 10, 05, 00, 11, 04, 06, 02, 04, 05, 00, 06, 01, 01, 05, 03, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 24
-- Code(Counter(0)) at (prev + 9, 1) to (start + 15, 13)
-- Code(Counter(0)) at (prev + 22, 14) to (start + 6, 10)
-- Code(Counter(0)) at (prev + 16, 5) to (start + 19, 13)
-- Code(Counter(0)) at (prev + 26, 14) to (start + 6, 10)
-- Code(Counter(0)) at (prev + 16, 5) to (start + 12, 22)
+- Code(Counter(0)) at (prev + 9, 1) to (start + 13, 27)
+- Code(Counter(0)) at (prev + 26, 5) to (start + 2, 10)
+- Code(Counter(0)) at (prev + 12, 5) to (start + 17, 27)
+- Code(Counter(0)) at (prev + 30, 5) to (start + 2, 10)
+- Code(Counter(0)) at (prev + 12, 5) to (start + 12, 22)
 - Code(Counter(0)) at (prev + 22, 5) to (start + 13, 24)
 - Code(Counter(0)) at (prev + 25, 9) to (start + 1, 30)
 - Code(Counter(0)) at (prev + 4, 9) to (start + 0, 41)
diff --git a/tests/coverage/closure.coverage b/tests/coverage/closure.coverage
index 3eac52eb723..2deeb9806c4 100644
--- a/tests/coverage/closure.coverage
+++ b/tests/coverage/closure.coverage
@@ -20,18 +20,18 @@
    LL|      1|        some_string
    LL|      1|            .
    LL|      1|            unwrap_or_else
-   LL|      1|        (
-   LL|      1|            ||
+   LL|       |        (
+   LL|       |            ||
    LL|      0|            {
    LL|      0|                let mut countdown = 0;
    LL|      0|                if is_false {
    LL|      0|                    countdown = 10;
    LL|      0|                }
    LL|      0|                "alt string 1".to_owned()
-   LL|      1|            }
-   LL|      1|        )
-   LL|      1|    );
-   LL|      1|
+   LL|      0|            }
+   LL|       |        )
+   LL|       |    );
+   LL|       |
    LL|      1|    some_string = Some(String::from("the string content"));
    LL|      1|    let
    LL|      1|        a
@@ -62,8 +62,8 @@
    LL|      1|        some_string
    LL|      1|            .
    LL|      1|            unwrap_or_else
-   LL|      1|        (
-   LL|      1|            ||
+   LL|       |        (
+   LL|       |            ||
    LL|      1|            {
    LL|      1|                let mut countdown = 0;
    LL|      1|                if is_false {
@@ -71,9 +71,9 @@
    LL|      1|                }
    LL|      1|                "alt string 3".to_owned()
    LL|      1|            }
-   LL|      1|        )
-   LL|      1|    );
-   LL|      1|
+   LL|       |        )
+   LL|       |    );
+   LL|       |
    LL|      1|    some_string = None;
    LL|      1|    let
    LL|      1|        a
diff --git a/tests/coverage/closure_macro.cov-map b/tests/coverage/closure_macro.cov-map
index 653848dd6ff..9dd99c8fab3 100644
--- a/tests/coverage/closure_macro.cov-map
+++ b/tests/coverage/closure_macro.cov-map
@@ -8,16 +8,16 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: closure_macro::main
-Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 21, 01, 01, 21, 02, 02, 09, 00, 0f, 01, 00, 12, 00, 54, 05, 00, 54, 00, 55, 02, 02, 09, 02, 0b, 01, 03, 01, 00, 02]
+Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 21, 01, 01, 20, 02, 02, 09, 00, 0f, 01, 00, 12, 00, 34, 05, 00, 54, 00, 55, 02, 02, 09, 02, 0b, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 6
-- Code(Counter(0)) at (prev + 33, 1) to (start + 1, 33)
+- Code(Counter(0)) at (prev + 33, 1) to (start + 1, 32)
 - Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 15)
     = (c0 - c1)
-- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 84)
+- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 52)
 - Code(Counter(1)) at (prev + 0, 84) to (start + 0, 85)
 - Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 2, 11)
     = (c0 - c1)
diff --git a/tests/coverage/closure_macro_async.cov-map b/tests/coverage/closure_macro_async.cov-map
index 1bd1460a147..2548754d754 100644
--- a/tests/coverage/closure_macro_async.cov-map
+++ b/tests/coverage/closure_macro_async.cov-map
@@ -17,16 +17,16 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: closure_macro_async::test::{closure#0}
-Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 25, 2b, 01, 21, 02, 02, 09, 00, 0f, 01, 00, 12, 00, 54, 05, 00, 54, 00, 55, 02, 02, 09, 02, 0b, 01, 03, 01, 00, 02]
+Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 25, 2b, 01, 20, 02, 02, 09, 00, 0f, 01, 00, 12, 00, 34, 05, 00, 54, 00, 55, 02, 02, 09, 02, 0b, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 6
-- Code(Counter(0)) at (prev + 37, 43) to (start + 1, 33)
+- Code(Counter(0)) at (prev + 37, 43) to (start + 1, 32)
 - Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 15)
     = (c0 - c1)
-- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 84)
+- Code(Counter(0)) at (prev + 0, 18) to (start + 0, 52)
 - Code(Counter(1)) at (prev + 0, 84) to (start + 0, 85)
 - Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 2, 11)
     = (c0 - c1)
diff --git a/tests/coverage/condition/conditions.cov-map b/tests/coverage/condition/conditions.cov-map
index 417637f2d2e..c34075a0bcf 100644
--- a/tests/coverage/condition/conditions.cov-map
+++ b/tests/coverage/condition/conditions.cov-map
@@ -109,15 +109,17 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: conditions::func_call
-Raw bytes (37): 0x[01, 01, 02, 01, 05, 05, 09, 05, 01, 25, 01, 01, 0a, 20, 05, 02, 01, 09, 00, 0a, 05, 00, 0e, 00, 0f, 20, 09, 06, 00, 0e, 00, 0f, 01, 01, 01, 00, 02]
+Raw bytes (47): 0x[01, 01, 02, 01, 05, 05, 09, 07, 01, 25, 01, 00, 20, 01, 01, 05, 00, 08, 01, 00, 09, 00, 0a, 20, 05, 02, 00, 09, 00, 0a, 05, 00, 0e, 00, 0f, 20, 09, 06, 00, 0e, 00, 0f, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
-Number of file 0 mappings: 5
-- Code(Counter(0)) at (prev + 37, 1) to (start + 1, 10)
-- Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 1, 9) to (start + 0, 10)
+Number of file 0 mappings: 7
+- Code(Counter(0)) at (prev + 37, 1) to (start + 0, 32)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 8)
+- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 10)
+- Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 0, 9) to (start + 0, 10)
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 14) to (start + 0, 15)
diff --git a/tests/coverage/coroutine.cov-map b/tests/coverage/coroutine.cov-map
index c6f2d415056..fee32376d83 100644
--- a/tests/coverage/coroutine.cov-map
+++ b/tests/coverage/coroutine.cov-map
@@ -13,7 +13,7 @@ Number of file 0 mappings: 4
 Highest counter ID seen: c1
 
 Function name: coroutine::main
-Raw bytes (53): 0x[01, 01, 02, 01, 05, 05, 09, 09, 01, 13, 01, 02, 16, 01, 08, 0b, 00, 2e, 05, 01, 2b, 00, 2d, 02, 01, 0e, 00, 35, 05, 02, 0b, 00, 2e, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 35, 09, 02, 01, 00, 02]
+Raw bytes (53): 0x[01, 01, 02, 01, 05, 05, 09, 09, 01, 13, 01, 02, 16, 01, 08, 0b, 00, 2d, 05, 01, 2b, 00, 2d, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 2
@@ -21,14 +21,14 @@ Number of expressions: 2
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 9
 - Code(Counter(0)) at (prev + 19, 1) to (start + 2, 22)
-- Code(Counter(0)) at (prev + 8, 11) to (start + 0, 46)
+- Code(Counter(0)) at (prev + 8, 11) to (start + 0, 45)
 - Code(Counter(1)) at (prev + 1, 43) to (start + 0, 45)
-- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 53)
+- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 20)
     = (c0 - c1)
 - Code(Counter(1)) at (prev + 2, 11) to (start + 0, 46)
 - Code(Counter(3)) at (prev + 1, 34) to (start + 0, 39)
 - Code(Counter(2)) at (prev + 0, 44) to (start + 0, 46)
-- Code(Expression(1, Sub)) at (prev + 1, 14) to (start + 0, 53)
+- Code(Expression(1, Sub)) at (prev + 1, 14) to (start + 0, 20)
     = (c1 - c2)
 - Code(Counter(2)) at (prev + 2, 1) to (start + 0, 2)
 Highest counter ID seen: c3
diff --git a/tests/coverage/holes.cov-map b/tests/coverage/holes.cov-map
index 3deacbc8e12..6e2d243e8dd 100644
--- a/tests/coverage/holes.cov-map
+++ b/tests/coverage/holes.cov-map
@@ -8,24 +8,24 @@ Number of file 0 mappings: 1
 Highest counter ID seen: (none)
 
 Function name: holes::main
-Raw bytes (69): 0x[01, 01, 00, 0d, 01, 08, 01, 01, 12, 01, 05, 05, 00, 12, 01, 07, 09, 00, 11, 01, 09, 05, 00, 12, 01, 04, 05, 00, 12, 01, 07, 05, 00, 12, 01, 06, 05, 00, 12, 01, 04, 05, 00, 12, 01, 04, 05, 00, 12, 01, 06, 05, 03, 0f, 01, 0a, 05, 03, 0f, 01, 0a, 05, 0c, 0d, 01, 0f, 0e, 05, 02]
+Raw bytes (69): 0x[01, 01, 00, 0d, 01, 08, 01, 01, 11, 01, 05, 05, 00, 11, 01, 07, 09, 00, 11, 01, 09, 05, 00, 11, 01, 04, 05, 00, 11, 01, 07, 05, 00, 11, 01, 06, 05, 00, 11, 01, 04, 05, 00, 11, 01, 04, 05, 00, 11, 01, 06, 05, 03, 0f, 01, 0a, 05, 03, 0f, 01, 0a, 05, 06, 27, 01, 13, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 13
-- Code(Counter(0)) at (prev + 8, 1) to (start + 1, 18)
-- Code(Counter(0)) at (prev + 5, 5) to (start + 0, 18)
+- Code(Counter(0)) at (prev + 8, 1) to (start + 1, 17)
+- Code(Counter(0)) at (prev + 5, 5) to (start + 0, 17)
 - Code(Counter(0)) at (prev + 7, 9) to (start + 0, 17)
-- Code(Counter(0)) at (prev + 9, 5) to (start + 0, 18)
-- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 18)
-- Code(Counter(0)) at (prev + 7, 5) to (start + 0, 18)
-- Code(Counter(0)) at (prev + 6, 5) to (start + 0, 18)
-- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 18)
-- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 18)
+- Code(Counter(0)) at (prev + 9, 5) to (start + 0, 17)
+- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 17)
+- Code(Counter(0)) at (prev + 7, 5) to (start + 0, 17)
+- Code(Counter(0)) at (prev + 6, 5) to (start + 0, 17)
+- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 17)
+- Code(Counter(0)) at (prev + 4, 5) to (start + 0, 17)
 - Code(Counter(0)) at (prev + 6, 5) to (start + 3, 15)
 - Code(Counter(0)) at (prev + 10, 5) to (start + 3, 15)
-- Code(Counter(0)) at (prev + 10, 5) to (start + 12, 13)
-- Code(Counter(0)) at (prev + 15, 14) to (start + 5, 2)
+- Code(Counter(0)) at (prev + 10, 5) to (start + 6, 39)
+- Code(Counter(0)) at (prev + 19, 5) to (start + 1, 2)
 Highest counter ID seen: c0
 
 Function name: holes::main::_unused_fn (unused)
diff --git a/tests/coverage/holes.coverage b/tests/coverage/holes.coverage
index 1b45c12156a..a6a02f1b9d0 100644
--- a/tests/coverage/holes.coverage
+++ b/tests/coverage/holes.coverage
@@ -84,18 +84,18 @@
    LL|      1|    // `nested_filter::OnlyBodies` or equivalent.
    LL|      1|    #[rustfmt::skip]
    LL|      1|    let _const_block_inside_anon_const =
-   LL|      1|        [
-   LL|      1|            0
-   LL|      1|            ;
-   LL|      1|            7
-   LL|      1|            +
-   LL|      1|            const
+   LL|       |        [
+   LL|       |            0
+   LL|       |            ;
+   LL|       |            7
+   LL|       |            +
+   LL|       |            const
    LL|       |            {
    LL|       |                3
-   LL|      1|            }
-   LL|      1|        ]
-   LL|      1|        ;
-   LL|      1|
+   LL|       |            }
+   LL|       |        ]
+   LL|       |        ;
+   LL|       |
    LL|      1|    black_box(());
    LL|      1|}
 
diff --git a/tests/coverage/inline-dead.cov-map b/tests/coverage/inline-dead.cov-map
index 49cdc514fed..65cefe76c29 100644
--- a/tests/coverage/inline-dead.cov-map
+++ b/tests/coverage/inline-dead.cov-map
@@ -8,14 +8,14 @@ Number of file 0 mappings: 1
 Highest counter ID seen: (none)
 
 Function name: inline_dead::live::<false>
-Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 0e, 01, 01, 09, 05, 02, 09, 00, 0f, 02, 02, 09, 00, 0a, 01, 02, 01, 00, 02]
+Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 0e, 01, 01, 09, 05, 02, 09, 00, 0d, 02, 02, 09, 00, 0a, 01, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 14, 1) to (start + 1, 9)
-- Code(Counter(1)) at (prev + 2, 9) to (start + 0, 15)
+- Code(Counter(1)) at (prev + 2, 9) to (start + 0, 13)
 - Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 10)
     = (c0 - c1)
 - Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2)
diff --git a/tests/coverage/inline.cov-map b/tests/coverage/inline.cov-map
index a569ad53cbc..7264391baaf 100644
--- a/tests/coverage/inline.cov-map
+++ b/tests/coverage/inline.cov-map
@@ -15,12 +15,12 @@ Number of file 0 mappings: 5
 Highest counter ID seen: c1
 
 Function name: inline::error
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 31, 01, 01, 14]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 31, 01, 01, 0b]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 49, 1) to (start + 1, 20)
+- Code(Counter(0)) at (prev + 49, 1) to (start + 1, 11)
 Highest counter ID seen: c0
 
 Function name: inline::length::<char>
diff --git a/tests/coverage/issue-83601.cov-map b/tests/coverage/issue-83601.cov-map
index c188cca1b51..f1023109008 100644
--- a/tests/coverage/issue-83601.cov-map
+++ b/tests/coverage/issue-83601.cov-map
@@ -1,12 +1,12 @@
 Function name: issue_83601::main
-Raw bytes (21): 0x[01, 01, 01, 05, 09, 03, 01, 06, 01, 02, 1c, 05, 03, 09, 01, 1c, 02, 02, 05, 03, 02]
+Raw bytes (21): 0x[01, 01, 01, 05, 09, 03, 01, 06, 01, 02, 0f, 05, 03, 09, 01, 0f, 02, 02, 05, 03, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 3
-- Code(Counter(0)) at (prev + 6, 1) to (start + 2, 28)
-- Code(Counter(1)) at (prev + 3, 9) to (start + 1, 28)
+- Code(Counter(0)) at (prev + 6, 1) to (start + 2, 15)
+- Code(Counter(1)) at (prev + 3, 9) to (start + 1, 15)
 - Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 3, 2)
     = (c1 - c2)
 Highest counter ID seen: c1
diff --git a/tests/coverage/issue-84561.cov-map b/tests/coverage/issue-84561.cov-map
index c8f75cddcb5..47e2922a805 100644
--- a/tests/coverage/issue-84561.cov-map
+++ b/tests/coverage/issue-84561.cov-map
@@ -1,11 +1,11 @@
 Function name: <issue_84561::Foo as core::fmt::Debug>::fmt
-Raw bytes (27): 0x[01, 01, 01, 01, 05, 04, 01, 8a, 01, 05, 01, 25, 05, 01, 25, 00, 26, 02, 01, 09, 00, 0f, 01, 01, 05, 00, 06]
+Raw bytes (27): 0x[01, 01, 01, 01, 05, 04, 01, 8a, 01, 05, 01, 24, 05, 01, 25, 00, 26, 02, 01, 09, 00, 0f, 01, 01, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
-- Code(Counter(0)) at (prev + 138, 5) to (start + 1, 37)
+- Code(Counter(0)) at (prev + 138, 5) to (start + 1, 36)
 - Code(Counter(1)) at (prev + 1, 37) to (start + 0, 38)
 - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15)
     = (c0 - c1)
@@ -59,109 +59,80 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: issue_84561::test3
-Raw bytes (315): 0x[01, 01, 1b, 1d, 21, 25, 29, 21, 25, 2d, 31, 21, 17, 25, 2d, 41, 45, 49, 4d, 51, 55, 33, 51, 49, 4d, 33, 37, 49, 4d, 51, 59, 55, 59, 55, 59, 47, 5d, 55, 59, 61, 65, 71, 75, 69, 6d, 69, 6d, 69, 6d, 63, 79, 71, 75, 79, 7d, 7d, 81, 01, 33, 01, 08, 01, 03, 1c, 05, 04, 09, 01, 1c, 09, 02, 05, 04, 1f, 0d, 05, 05, 00, 1f, 11, 01, 05, 00, 1f, 15, 01, 09, 01, 1c, 19, 02, 05, 00, 1f, 1d, 01, 05, 00, 0f, 02, 00, 20, 00, 30, 21, 01, 05, 03, 0f, 25, 03, 20, 00, 30, 29, 00, 33, 00, 41, 06, 00, 4b, 00, 5a, 0a, 01, 05, 00, 0f, 2d, 05, 09, 03, 10, 31, 05, 0d, 00, 1b, 0e, 02, 0d, 00, 1c, 12, 04, 09, 05, 06, 35, 06, 05, 03, 06, 39, 04, 05, 03, 06, 3d, 04, 09, 04, 06, 41, 05, 08, 00, 0f, 45, 01, 09, 03, 0a, 1a, 05, 09, 03, 0a, 33, 05, 08, 00, 0f, 51, 01, 09, 00, 13, 22, 03, 0d, 00, 1d, 26, 03, 09, 00, 13, 2e, 03, 0d, 00, 1d, 47, 03, 05, 00, 0f, 47, 01, 0c, 00, 13, 5d, 01, 0d, 00, 13, 42, 02, 0d, 00, 13, 61, 04, 05, 02, 13, 65, 03, 0d, 00, 13, 4a, 02, 0d, 00, 13, 63, 03, 05, 00, 0f, 69, 01, 0c, 00, 13, 6d, 01, 0d, 03, 0e, 71, 04, 0d, 00, 13, 5a, 02, 0d, 00, 17, 5a, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, 5a, 02, 15, 00, 1b, 75, 04, 0d, 00, 13, 5e, 03, 09, 00, 19, 79, 02, 05, 00, 0f, 66, 03, 09, 00, 22, 7d, 02, 05, 00, 0f, 6a, 03, 09, 00, 2c, 81, 01, 02, 01, 00, 02]
+Raw bytes (279): 0x[01, 01, 0a, 0d, 11, 0d, 15, 0d, 19, 1d, 21, 29, 2d, 25, 29, 25, 29, 25, 29, 27, 31, 29, 2d, 33, 01, 08, 01, 03, 0f, 05, 04, 09, 01, 0f, 09, 02, 05, 04, 0f, 09, 05, 05, 00, 0f, 09, 01, 05, 00, 0f, 09, 01, 09, 01, 0f, 0d, 02, 05, 00, 0f, 0d, 01, 05, 00, 0f, 00, 00, 20, 00, 30, 0d, 01, 05, 03, 0f, 00, 03, 20, 00, 30, 00, 00, 33, 00, 41, 00, 00, 4b, 00, 5a, 0d, 01, 05, 00, 0f, 00, 05, 09, 03, 10, 00, 05, 0d, 00, 1b, 00, 02, 0d, 00, 1c, 0d, 04, 09, 02, 0f, 0d, 06, 05, 00, 0f, 0d, 04, 05, 00, 0f, 0d, 04, 09, 01, 0f, 0d, 05, 08, 00, 0f, 11, 01, 09, 00, 13, 02, 05, 09, 00, 13, 0d, 05, 08, 00, 0f, 15, 01, 09, 00, 13, 00, 03, 0d, 00, 1d, 06, 03, 09, 00, 13, 00, 03, 0d, 00, 1d, 0d, 03, 05, 00, 0f, 0d, 01, 0c, 00, 13, 19, 01, 0d, 00, 13, 0a, 02, 0d, 00, 13, 1d, 04, 05, 02, 13, 21, 03, 0d, 00, 13, 0e, 02, 0d, 00, 13, 27, 03, 05, 00, 0f, 25, 01, 0c, 00, 13, 29, 01, 0d, 00, 17, 29, 04, 0d, 00, 13, 1e, 02, 0d, 00, 17, 1e, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, 1e, 02, 15, 00, 1b, 2d, 04, 0d, 00, 13, 22, 03, 09, 00, 19, 31, 02, 05, 00, 0f, 31, 03, 09, 00, 22, 00, 02, 05, 00, 0f, 00, 03, 09, 00, 2c, 00, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 27
-- expression 0 operands: lhs = Counter(7), rhs = Counter(8)
-- expression 1 operands: lhs = Counter(9), rhs = Counter(10)
-- expression 2 operands: lhs = Counter(8), rhs = Counter(9)
-- expression 3 operands: lhs = Counter(11), rhs = Counter(12)
-- expression 4 operands: lhs = Counter(8), rhs = Expression(5, Add)
-- expression 5 operands: lhs = Counter(9), rhs = Counter(11)
-- expression 6 operands: lhs = Counter(16), rhs = Counter(17)
-- expression 7 operands: lhs = Counter(18), rhs = Counter(19)
-- expression 8 operands: lhs = Counter(20), rhs = Counter(21)
-- expression 9 operands: lhs = Expression(12, Add), rhs = Counter(20)
-- expression 10 operands: lhs = Counter(18), rhs = Counter(19)
-- expression 11 operands: lhs = Expression(12, Add), rhs = Expression(13, Add)
-- expression 12 operands: lhs = Counter(18), rhs = Counter(19)
-- expression 13 operands: lhs = Counter(20), rhs = Counter(22)
-- expression 14 operands: lhs = Counter(21), rhs = Counter(22)
-- expression 15 operands: lhs = Counter(21), rhs = Counter(22)
-- expression 16 operands: lhs = Expression(17, Add), rhs = Counter(23)
-- expression 17 operands: lhs = Counter(21), rhs = Counter(22)
-- expression 18 operands: lhs = Counter(24), rhs = Counter(25)
-- expression 19 operands: lhs = Counter(28), rhs = Counter(29)
-- expression 20 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 21 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 22 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 23 operands: lhs = Expression(24, Add), rhs = Counter(30)
-- expression 24 operands: lhs = Counter(28), rhs = Counter(29)
-- expression 25 operands: lhs = Counter(30), rhs = Counter(31)
-- expression 26 operands: lhs = Counter(31), rhs = Counter(32)
+Number of expressions: 10
+- expression 0 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 1 operands: lhs = Counter(3), rhs = Counter(5)
+- expression 2 operands: lhs = Counter(3), rhs = Counter(6)
+- expression 3 operands: lhs = Counter(7), rhs = Counter(8)
+- expression 4 operands: lhs = Counter(10), rhs = Counter(11)
+- expression 5 operands: lhs = Counter(9), rhs = Counter(10)
+- expression 6 operands: lhs = Counter(9), rhs = Counter(10)
+- expression 7 operands: lhs = Counter(9), rhs = Counter(10)
+- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(12)
+- expression 9 operands: lhs = Counter(10), rhs = Counter(11)
 Number of file 0 mappings: 51
-- Code(Counter(0)) at (prev + 8, 1) to (start + 3, 28)
-- Code(Counter(1)) at (prev + 4, 9) to (start + 1, 28)
-- Code(Counter(2)) at (prev + 2, 5) to (start + 4, 31)
-- Code(Counter(3)) at (prev + 5, 5) to (start + 0, 31)
-- Code(Counter(4)) at (prev + 1, 5) to (start + 0, 31)
-- Code(Counter(5)) at (prev + 1, 9) to (start + 1, 28)
-- Code(Counter(6)) at (prev + 2, 5) to (start + 0, 31)
-- Code(Counter(7)) at (prev + 1, 5) to (start + 0, 15)
-- Code(Expression(0, Sub)) at (prev + 0, 32) to (start + 0, 48)
+- Code(Counter(0)) at (prev + 8, 1) to (start + 3, 15)
+- Code(Counter(1)) at (prev + 4, 9) to (start + 1, 15)
+- Code(Counter(2)) at (prev + 2, 5) to (start + 4, 15)
+- Code(Counter(2)) at (prev + 5, 5) to (start + 0, 15)
+- Code(Counter(2)) at (prev + 1, 5) to (start + 0, 15)
+- Code(Counter(2)) at (prev + 1, 9) to (start + 1, 15)
+- Code(Counter(3)) at (prev + 2, 5) to (start + 0, 15)
+- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 15)
+- Code(Zero) at (prev + 0, 32) to (start + 0, 48)
+- Code(Counter(3)) at (prev + 1, 5) to (start + 3, 15)
+- Code(Zero) at (prev + 3, 32) to (start + 0, 48)
+- Code(Zero) at (prev + 0, 51) to (start + 0, 65)
+- Code(Zero) at (prev + 0, 75) to (start + 0, 90)
+- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 15)
+- Code(Zero) at (prev + 5, 9) to (start + 3, 16)
+- Code(Zero) at (prev + 5, 13) to (start + 0, 27)
+- Code(Zero) at (prev + 2, 13) to (start + 0, 28)
+- Code(Counter(3)) at (prev + 4, 9) to (start + 2, 15)
+- Code(Counter(3)) at (prev + 6, 5) to (start + 0, 15)
+- Code(Counter(3)) at (prev + 4, 5) to (start + 0, 15)
+- Code(Counter(3)) at (prev + 4, 9) to (start + 1, 15)
+- Code(Counter(3)) at (prev + 5, 8) to (start + 0, 15)
+- Code(Counter(4)) at (prev + 1, 9) to (start + 0, 19)
+- Code(Expression(0, Sub)) at (prev + 5, 9) to (start + 0, 19)
+    = (c3 - c4)
+- Code(Counter(3)) at (prev + 5, 8) to (start + 0, 15)
+- Code(Counter(5)) at (prev + 1, 9) to (start + 0, 19)
+- Code(Zero) at (prev + 3, 13) to (start + 0, 29)
+- Code(Expression(1, Sub)) at (prev + 3, 9) to (start + 0, 19)
+    = (c3 - c5)
+- Code(Zero) at (prev + 3, 13) to (start + 0, 29)
+- Code(Counter(3)) at (prev + 3, 5) to (start + 0, 15)
+- Code(Counter(3)) at (prev + 1, 12) to (start + 0, 19)
+- Code(Counter(6)) at (prev + 1, 13) to (start + 0, 19)
+- Code(Expression(2, Sub)) at (prev + 2, 13) to (start + 0, 19)
+    = (c3 - c6)
+- Code(Counter(7)) at (prev + 4, 5) to (start + 2, 19)
+- Code(Counter(8)) at (prev + 3, 13) to (start + 0, 19)
+- Code(Expression(3, Sub)) at (prev + 2, 13) to (start + 0, 19)
     = (c7 - c8)
-- Code(Counter(8)) at (prev + 1, 5) to (start + 3, 15)
-- Code(Counter(9)) at (prev + 3, 32) to (start + 0, 48)
-- Code(Counter(10)) at (prev + 0, 51) to (start + 0, 65)
-- Code(Expression(1, Sub)) at (prev + 0, 75) to (start + 0, 90)
+- Code(Expression(9, Add)) at (prev + 3, 5) to (start + 0, 15)
+    = (c10 + c11)
+- Code(Counter(9)) at (prev + 1, 12) to (start + 0, 19)
+- Code(Counter(10)) at (prev + 1, 13) to (start + 0, 23)
+- Code(Counter(10)) at (prev + 4, 13) to (start + 0, 19)
+- Code(Expression(7, Sub)) at (prev + 2, 13) to (start + 0, 23)
+    = (c9 - c10)
+- Code(Expression(7, Sub)) at (prev + 1, 20) to (start + 0, 27)
     = (c9 - c10)
-- Code(Expression(2, Sub)) at (prev + 1, 5) to (start + 0, 15)
-    = (c8 - c9)
-- Code(Counter(11)) at (prev + 5, 9) to (start + 3, 16)
-- Code(Counter(12)) at (prev + 5, 13) to (start + 0, 27)
-- Code(Expression(3, Sub)) at (prev + 2, 13) to (start + 0, 28)
-    = (c11 - c12)
-- Code(Expression(4, Sub)) at (prev + 4, 9) to (start + 5, 6)
-    = (c8 - (c9 + c11))
-- Code(Counter(13)) at (prev + 6, 5) to (start + 3, 6)
-- Code(Counter(14)) at (prev + 4, 5) to (start + 3, 6)
-- Code(Counter(15)) at (prev + 4, 9) to (start + 4, 6)
-- Code(Counter(16)) at (prev + 5, 8) to (start + 0, 15)
-- Code(Counter(17)) at (prev + 1, 9) to (start + 3, 10)
-- Code(Expression(6, Sub)) at (prev + 5, 9) to (start + 3, 10)
-    = (c16 - c17)
-- Code(Expression(12, Add)) at (prev + 5, 8) to (start + 0, 15)
-    = (c18 + c19)
-- Code(Counter(20)) at (prev + 1, 9) to (start + 0, 19)
-- Code(Expression(8, Sub)) at (prev + 3, 13) to (start + 0, 29)
-    = (c20 - c21)
-- Code(Expression(9, Sub)) at (prev + 3, 9) to (start + 0, 19)
-    = ((c18 + c19) - c20)
-- Code(Expression(11, Sub)) at (prev + 3, 13) to (start + 0, 29)
-    = ((c18 + c19) - (c20 + c22))
-- Code(Expression(17, Add)) at (prev + 3, 5) to (start + 0, 15)
-    = (c21 + c22)
-- Code(Expression(17, Add)) at (prev + 1, 12) to (start + 0, 19)
-    = (c21 + c22)
-- Code(Counter(23)) at (prev + 1, 13) to (start + 0, 19)
-- Code(Expression(16, Sub)) at (prev + 2, 13) to (start + 0, 19)
-    = ((c21 + c22) - c23)
-- Code(Counter(24)) at (prev + 4, 5) to (start + 2, 19)
-- Code(Counter(25)) at (prev + 3, 13) to (start + 0, 19)
-- Code(Expression(18, Sub)) at (prev + 2, 13) to (start + 0, 19)
-    = (c24 - c25)
-- Code(Expression(24, Add)) at (prev + 3, 5) to (start + 0, 15)
-    = (c28 + c29)
-- Code(Counter(26)) at (prev + 1, 12) to (start + 0, 19)
-- Code(Counter(27)) at (prev + 1, 13) to (start + 3, 14)
-- Code(Counter(28)) at (prev + 4, 13) to (start + 0, 19)
-- Code(Expression(22, Sub)) at (prev + 2, 13) to (start + 0, 23)
-    = (c26 - c27)
-- Code(Expression(22, Sub)) at (prev + 1, 20) to (start + 0, 27)
-    = (c26 - c27)
 - Code(Zero) at (prev + 1, 21) to (start + 0, 27)
-- Code(Expression(22, Sub)) at (prev + 2, 21) to (start + 0, 27)
-    = (c26 - c27)
-- Code(Counter(29)) at (prev + 4, 13) to (start + 0, 19)
-- Code(Expression(23, Sub)) at (prev + 3, 9) to (start + 0, 25)
-    = ((c28 + c29) - c30)
-- Code(Counter(30)) at (prev + 2, 5) to (start + 0, 15)
-- Code(Expression(25, Sub)) at (prev + 3, 9) to (start + 0, 34)
-    = (c30 - c31)
-- Code(Counter(31)) at (prev + 2, 5) to (start + 0, 15)
-- Code(Expression(26, Sub)) at (prev + 3, 9) to (start + 0, 44)
-    = (c31 - c32)
-- Code(Counter(32)) at (prev + 2, 1) to (start + 0, 2)
-Highest counter ID seen: c32
+- Code(Expression(7, Sub)) at (prev + 2, 21) to (start + 0, 27)
+    = (c9 - c10)
+- Code(Counter(11)) at (prev + 4, 13) to (start + 0, 19)
+- Code(Expression(8, Sub)) at (prev + 3, 9) to (start + 0, 25)
+    = ((c10 + c11) - c12)
+- Code(Counter(12)) at (prev + 2, 5) to (start + 0, 15)
+- Code(Counter(12)) at (prev + 3, 9) to (start + 0, 34)
+- Code(Zero) at (prev + 2, 5) to (start + 0, 15)
+- Code(Zero) at (prev + 3, 9) to (start + 0, 44)
+- Code(Zero) at (prev + 2, 1) to (start + 0, 2)
+Highest counter ID seen: c12
 
diff --git a/tests/coverage/issue-84561.coverage b/tests/coverage/issue-84561.coverage
index 2a642e2427b..a55f42a696e 100644
--- a/tests/coverage/issue-84561.coverage
+++ b/tests/coverage/issue-84561.coverage
@@ -47,32 +47,32 @@
    LL|      1|    let is_true = std::env::args().len() == 1;
    LL|      1|
    LL|      1|    assert_eq!(
-   LL|      1|        Foo(1),
-   LL|      1|        Foo(1)
-   LL|      1|    );
+   LL|       |        Foo(1),
+   LL|       |        Foo(1)
+   LL|       |    );
    LL|      1|    assert_ne!(
-   LL|      1|        Foo(0),
-   LL|      1|        Foo(1)
-   LL|      1|    );
+   LL|       |        Foo(0),
+   LL|       |        Foo(1)
+   LL|       |    );
    LL|      1|    assert_eq!(
-   LL|      1|        Foo(2),
-   LL|      1|        Foo(2)
-   LL|      1|    );
+   LL|       |        Foo(2),
+   LL|       |        Foo(2)
+   LL|       |    );
    LL|      1|    let bar = Foo(1);
    LL|      1|    assert_ne!(
-   LL|      1|        bar,
-   LL|      1|        Foo(3)
-   LL|      1|    );
+   LL|       |        bar,
+   LL|       |        Foo(3)
+   LL|       |    );
    LL|      1|    if is_true {
    LL|      1|        assert_ne!(
-   LL|      1|            Foo(0),
-   LL|      1|            Foo(4)
-   LL|      1|        );
+   LL|       |            Foo(0),
+   LL|       |            Foo(4)
+   LL|       |        );
    LL|       |    } else {
    LL|      0|        assert_eq!(
-   LL|      0|            Foo(3),
-   LL|      0|            Foo(3)
-   LL|      0|        );
+   LL|       |            Foo(3),
+   LL|       |            Foo(3)
+   LL|       |        );
    LL|       |    }
    LL|      1|    if is_true {
    LL|      1|        assert_ne!(
@@ -106,9 +106,9 @@
    LL|      1|    assert_ne!(
    LL|      1|        if is_true {
    LL|      1|            assert_eq!(
-   LL|      1|                Foo(3),
-   LL|      1|                Foo(3)
-   LL|      1|            );
+   LL|       |                Foo(3),
+   LL|       |                Foo(3)
+   LL|       |            );
    LL|      1|            Foo(0)
    LL|       |        } else {
    LL|      0|            assert_ne!(
diff --git a/tests/coverage/loop-break.cov-map b/tests/coverage/loop-break.cov-map
index f13e82da151..fccc4d64395 100644
--- a/tests/coverage/loop-break.cov-map
+++ b/tests/coverage/loop-break.cov-map
@@ -1,12 +1,12 @@
 Function name: loop_break::main
-Raw bytes (31): 0x[01, 01, 01, 05, 01, 05, 01, 03, 01, 00, 0b, 05, 02, 0c, 00, 27, 01, 01, 0d, 00, 12, 02, 01, 09, 00, 0a, 01, 02, 01, 00, 02]
+Raw bytes (31): 0x[01, 01, 01, 05, 01, 05, 01, 03, 01, 00, 0b, 05, 02, 0c, 00, 21, 01, 01, 0d, 00, 12, 02, 01, 09, 00, 0a, 01, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 Number of file 0 mappings: 5
 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 11)
-- Code(Counter(1)) at (prev + 2, 12) to (start + 0, 39)
+- Code(Counter(1)) at (prev + 2, 12) to (start + 0, 33)
 - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 18)
 - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10)
     = (c1 - c0)
diff --git a/tests/coverage/loops_branches.cov-map b/tests/coverage/loops_branches.cov-map
index 2cb0f948b3e..2157cd6ee3f 100644
--- a/tests/coverage/loops_branches.cov-map
+++ b/tests/coverage/loops_branches.cov-map
@@ -1,5 +1,5 @@
 Function name: <loops_branches::DebugTest as core::fmt::Debug>::fmt
-Raw bytes (112): 0x[01, 01, 04, 07, 0b, 01, 0d, 05, 09, 09, 0d, 14, 01, 09, 05, 01, 10, 01, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 01, 01, 0d, 00, 0e, 01, 01, 0d, 00, 1e, 05, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, 0d, 03, 0d, 00, 0e, 09, 00, 12, 00, 17, 0d, 01, 10, 00, 14, 0d, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 0d, 01, 11, 00, 12, 0d, 01, 11, 00, 22, 02, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 0e, 03, 09, 00, 0f, 01, 01, 05, 00, 06]
+Raw bytes (112): 0x[01, 01, 04, 07, 0b, 01, 0d, 05, 09, 09, 0d, 14, 01, 09, 05, 01, 10, 01, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 01, 01, 0d, 00, 0e, 01, 01, 0d, 00, 1d, 05, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, 0d, 03, 0d, 00, 0e, 09, 00, 12, 00, 17, 0d, 01, 10, 00, 14, 0d, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 0d, 01, 11, 00, 12, 0d, 01, 11, 00, 21, 02, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 0e, 03, 09, 00, 0f, 01, 01, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 4
@@ -13,7 +13,7 @@ Number of file 0 mappings: 20
 - Code(Zero) at (prev + 1, 23) to (start + 0, 27)
 - Code(Zero) at (prev + 0, 28) to (start + 0, 30)
 - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14)
-- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 30)
+- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 29)
 - Code(Counter(1)) at (prev + 0, 30) to (start + 0, 31)
 - Code(Zero) at (prev + 1, 16) to (start + 1, 10)
 - Code(Counter(3)) at (prev + 3, 13) to (start + 0, 14)
@@ -23,7 +23,7 @@ Number of file 0 mappings: 20
 - Code(Zero) at (prev + 1, 27) to (start + 0, 31)
 - Code(Zero) at (prev + 0, 32) to (start + 0, 34)
 - Code(Counter(3)) at (prev + 1, 17) to (start + 0, 18)
-- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 34)
+- Code(Counter(3)) at (prev + 1, 17) to (start + 0, 33)
 - Code(Expression(0, Sub)) at (prev + 0, 34) to (start + 0, 35)
     = ((c0 + c3) - (c1 + c2))
 - Code(Zero) at (prev + 1, 20) to (start + 1, 14)
@@ -33,7 +33,7 @@ Number of file 0 mappings: 20
 Highest counter ID seen: c3
 
 Function name: <loops_branches::DisplayTest as core::fmt::Display>::fmt
-Raw bytes (112): 0x[01, 01, 04, 07, 0b, 01, 09, 05, 0d, 05, 09, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 01, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 01, 01, 0d, 00, 0e, 01, 01, 0d, 00, 1e, 0d, 00, 1e, 00, 1f, 09, 02, 0d, 00, 0e, 05, 00, 12, 00, 17, 09, 01, 10, 00, 15, 00, 00, 16, 01, 0e, 09, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 09, 01, 11, 00, 12, 09, 01, 11, 00, 22, 02, 00, 22, 00, 23, 0e, 03, 09, 00, 0f, 01, 01, 05, 00, 06]
+Raw bytes (112): 0x[01, 01, 04, 07, 0b, 01, 09, 05, 0d, 05, 09, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 01, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 01, 01, 0d, 00, 0e, 01, 01, 0d, 00, 1d, 0d, 00, 1e, 00, 1f, 09, 02, 0d, 00, 0e, 05, 00, 12, 00, 17, 09, 01, 10, 00, 15, 00, 00, 16, 01, 0e, 09, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 09, 01, 11, 00, 12, 09, 01, 11, 00, 21, 02, 00, 22, 00, 23, 0e, 03, 09, 00, 0f, 01, 01, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 4
@@ -48,7 +48,7 @@ Number of file 0 mappings: 20
 - Code(Zero) at (prev + 1, 23) to (start + 0, 27)
 - Code(Zero) at (prev + 0, 28) to (start + 0, 30)
 - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14)
-- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 30)
+- Code(Counter(0)) at (prev + 1, 13) to (start + 0, 29)
 - Code(Counter(3)) at (prev + 0, 30) to (start + 0, 31)
 - Code(Counter(2)) at (prev + 2, 13) to (start + 0, 14)
 - Code(Counter(1)) at (prev + 0, 18) to (start + 0, 23)
@@ -58,7 +58,7 @@ Number of file 0 mappings: 20
 - Code(Zero) at (prev + 1, 27) to (start + 0, 31)
 - Code(Zero) at (prev + 0, 32) to (start + 0, 34)
 - Code(Counter(2)) at (prev + 1, 17) to (start + 0, 18)
-- Code(Counter(2)) at (prev + 1, 17) to (start + 0, 34)
+- Code(Counter(2)) at (prev + 1, 17) to (start + 0, 33)
 - Code(Expression(0, Sub)) at (prev + 0, 34) to (start + 0, 35)
     = ((c0 + c2) - (c1 + c3))
 - Code(Expression(3, Sub)) at (prev + 3, 9) to (start + 0, 15)
diff --git a/tests/coverage/macro_name_span.cov-map b/tests/coverage/macro_name_span.cov-map
index 58620452b2b..bd033faa551 100644
--- a/tests/coverage/macro_name_span.cov-map
+++ b/tests/coverage/macro_name_span.cov-map
@@ -1,10 +1,10 @@
 Function name: macro_name_span::affected_function
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 16, 1c, 01, 40]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 16, 1c, 01, 3e]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 22, 28) to (start + 1, 64)
+- Code(Counter(0)) at (prev + 22, 28) to (start + 1, 62)
 Highest counter ID seen: c0
 
 Function name: macro_name_span::main
diff --git a/tests/coverage/mcdc/non_control_flow.cov-map b/tests/coverage/mcdc/non_control_flow.cov-map
index c282d53c5ac..959d21901de 100644
--- a/tests/coverage/mcdc/non_control_flow.cov-map
+++ b/tests/coverage/mcdc/non_control_flow.cov-map
@@ -113,15 +113,17 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: non_control_flow::func_call
-Raw bytes (50): 0x[01, 01, 02, 01, 05, 05, 09, 06, 01, 29, 01, 01, 0a, 28, 03, 02, 01, 09, 00, 0f, 30, 05, 02, 01, 02, 00, 00, 09, 00, 0a, 05, 00, 0e, 00, 0f, 30, 09, 06, 02, 00, 00, 00, 0e, 00, 0f, 01, 01, 01, 00, 02]
+Raw bytes (60): 0x[01, 01, 02, 01, 05, 05, 09, 08, 01, 29, 01, 00, 20, 01, 01, 05, 00, 08, 01, 00, 09, 00, 0a, 28, 03, 02, 00, 09, 00, 0f, 30, 05, 02, 01, 02, 00, 00, 09, 00, 0a, 05, 00, 0e, 00, 0f, 30, 09, 06, 02, 00, 00, 00, 0e, 00, 0f, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
-Number of file 0 mappings: 6
-- Code(Counter(0)) at (prev + 41, 1) to (start + 1, 10)
-- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 9) to (start + 0, 15)
+Number of file 0 mappings: 8
+- Code(Counter(0)) at (prev + 41, 1) to (start + 0, 32)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 8)
+- Code(Counter(0)) at (prev + 0, 9) to (start + 0, 10)
+- MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 9) to (start + 0, 15)
 - MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 9) to (start + 0, 10)
     true  = c1
     false = (c0 - c1)
diff --git a/tests/coverage/no_cov_crate.cov-map b/tests/coverage/no_cov_crate.cov-map
index 04171fdb79b..244b0099544 100644
--- a/tests/coverage/no_cov_crate.cov-map
+++ b/tests/coverage/no_cov_crate.cov-map
@@ -35,22 +35,22 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: no_cov_crate::nested_fns::outer
-Raw bytes (14): 0x[01, 01, 00, 02, 01, 33, 05, 02, 23, 01, 0c, 05, 00, 06]
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 33, 05, 02, 22, 01, 0c, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 2
-- Code(Counter(0)) at (prev + 51, 5) to (start + 2, 35)
+- Code(Counter(0)) at (prev + 51, 5) to (start + 2, 34)
 - Code(Counter(0)) at (prev + 12, 5) to (start + 0, 6)
 Highest counter ID seen: c0
 
 Function name: no_cov_crate::nested_fns::outer_both_covered
-Raw bytes (14): 0x[01, 01, 00, 02, 01, 41, 05, 02, 17, 01, 0b, 05, 00, 06]
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 41, 05, 02, 16, 01, 0b, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 2
-- Code(Counter(0)) at (prev + 65, 5) to (start + 2, 23)
+- Code(Counter(0)) at (prev + 65, 5) to (start + 2, 22)
 - Code(Counter(0)) at (prev + 11, 5) to (start + 0, 6)
 Highest counter ID seen: c0
 
diff --git a/tests/coverage/panic_unwind.cov-map b/tests/coverage/panic_unwind.cov-map
index 4628a24689e..18b13919fe5 100644
--- a/tests/coverage/panic_unwind.cov-map
+++ b/tests/coverage/panic_unwind.cov-map
@@ -26,14 +26,14 @@ Number of file 0 mappings: 9
 Highest counter ID seen: c3
 
 Function name: panic_unwind::might_panic
-Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 04, 01, 01, 14, 05, 02, 09, 01, 19, 02, 02, 0c, 03, 02]
+Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 04, 01, 01, 14, 05, 02, 09, 01, 0f, 02, 02, 0c, 03, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 4, 1) to (start + 1, 20)
-- Code(Counter(1)) at (prev + 2, 9) to (start + 1, 25)
+- Code(Counter(1)) at (prev + 2, 9) to (start + 1, 15)
 - Code(Expression(0, Sub)) at (prev + 2, 12) to (start + 3, 2)
     = (c0 - c1)
 Highest counter ID seen: c1
diff --git a/tests/coverage/sort_groups.cov-map b/tests/coverage/sort_groups.cov-map
index 69e13422296..898d68171c5 100644
--- a/tests/coverage/sort_groups.cov-map
+++ b/tests/coverage/sort_groups.cov-map
@@ -55,13 +55,13 @@ Number of file 0 mappings: 4
 Highest counter ID seen: c1
 
 Function name: sort_groups::main
-Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 06, 01, 04, 23, 05, 04, 24, 02, 06, 02, 02, 05, 00, 06, 01, 01, 05, 02, 02]
+Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 06, 01, 04, 1c, 05, 04, 24, 02, 06, 02, 02, 05, 00, 06, 01, 01, 05, 02, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
-- Code(Counter(0)) at (prev + 6, 1) to (start + 4, 35)
+- Code(Counter(0)) at (prev + 6, 1) to (start + 4, 28)
 - Code(Counter(1)) at (prev + 4, 36) to (start + 2, 6)
 - Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6)
     = (c0 - c1)
diff --git a/tests/coverage/try_error_result.cov-map b/tests/coverage/try_error_result.cov-map
index 35b2c36a575..e45f3de1081 100644
--- a/tests/coverage/try_error_result.cov-map
+++ b/tests/coverage/try_error_result.cov-map
@@ -41,13 +41,13 @@ Number of file 0 mappings: 4
 Highest counter ID seen: c1
 
 Function name: try_error_result::main
-Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 71, 01, 02, 0c, 05, 03, 05, 00, 06, 02, 02, 05, 00, 0b, 01, 01, 01, 00, 02]
+Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 71, 01, 02, 0a, 05, 03, 05, 00, 06, 02, 02, 05, 00, 0b, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
-- Code(Counter(0)) at (prev + 113, 1) to (start + 2, 12)
+- Code(Counter(0)) at (prev + 113, 1) to (start + 2, 10)
 - Code(Counter(1)) at (prev + 3, 5) to (start + 0, 6)
 - Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 11)
     = (c0 - c1)
@@ -55,7 +55,7 @@ Number of file 0 mappings: 4
 Highest counter ID seen: c1
 
 Function name: try_error_result::test1
-Raw bytes (67): 0x[01, 01, 04, 07, 05, 01, 09, 05, 01, 05, 09, 0b, 01, 0d, 01, 02, 17, 05, 07, 09, 00, 0e, 09, 02, 09, 04, 1a, 02, 06, 0d, 00, 29, 02, 00, 29, 00, 2a, 00, 01, 0d, 00, 2a, 00, 00, 2a, 00, 2b, 0a, 04, 0d, 00, 2a, 00, 00, 2a, 00, 2b, 0e, 03, 05, 00, 0b, 01, 01, 01, 00, 02]
+Raw bytes (67): 0x[01, 01, 04, 07, 05, 01, 09, 05, 01, 05, 09, 0b, 01, 0d, 01, 02, 17, 05, 07, 09, 00, 0e, 09, 02, 09, 04, 1a, 02, 06, 0d, 00, 11, 02, 00, 29, 00, 2a, 00, 01, 0d, 00, 11, 00, 00, 2a, 00, 2b, 0a, 04, 0d, 00, 11, 00, 00, 2a, 00, 2b, 0e, 03, 05, 00, 0b, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 4
@@ -67,13 +67,13 @@ Number of file 0 mappings: 11
 - Code(Counter(0)) at (prev + 13, 1) to (start + 2, 23)
 - Code(Counter(1)) at (prev + 7, 9) to (start + 0, 14)
 - Code(Counter(2)) at (prev + 2, 9) to (start + 4, 26)
-- Code(Expression(0, Sub)) at (prev + 6, 13) to (start + 0, 41)
+- Code(Expression(0, Sub)) at (prev + 6, 13) to (start + 0, 17)
     = ((c0 + c2) - c1)
 - Code(Expression(0, Sub)) at (prev + 0, 41) to (start + 0, 42)
     = ((c0 + c2) - c1)
-- Code(Zero) at (prev + 1, 13) to (start + 0, 42)
+- Code(Zero) at (prev + 1, 13) to (start + 0, 17)
 - Code(Zero) at (prev + 0, 42) to (start + 0, 43)
-- Code(Expression(2, Sub)) at (prev + 4, 13) to (start + 0, 42)
+- Code(Expression(2, Sub)) at (prev + 4, 13) to (start + 0, 17)
     = (c1 - c0)
 - Code(Zero) at (prev + 0, 42) to (start + 0, 43)
 - Code(Expression(3, Sub)) at (prev + 3, 5) to (start + 0, 11)
@@ -82,7 +82,7 @@ Number of file 0 mappings: 11
 Highest counter ID seen: c2
 
 Function name: try_error_result::test2
-Raw bytes (336): 0x[01, 01, 36, 0d, 11, 0d, 3f, 11, 15, 0d, 37, 3b, 1d, 3f, 19, 11, 15, 0d, 3f, 11, 15, 0d, 3b, 3f, 19, 11, 15, 0d, 37, 3b, 1d, 3f, 19, 11, 15, 41, 53, 21, 25, 41, 21, 41, 53, 21, 25, 09, 73, 77, 2d, 0d, 29, 09, 0d, 09, 77, 0d, 29, 09, 73, 77, 2d, 0d, 29, 45, 8b, 01, 31, 35, 45, 31, 45, 8b, 01, 31, 35, 49, 9f, 01, 39, 3d, 49, 39, 49, 9f, 01, 39, 3d, 05, 09, ab, 01, 09, af, 01, 3d, b3, 01, 39, b7, 01, 35, bb, 01, 31, bf, 01, 2d, c3, 01, 29, c7, 01, 25, cb, 01, 21, cf, 01, 1d, d3, 01, 19, d7, 01, 15, 05, 11, 28, 01, 3d, 01, 03, 17, 05, 08, 09, 00, 0e, 09, 02, 09, 04, 1a, 0d, 06, 0d, 00, 2f, 11, 00, 2f, 00, 30, 02, 00, 31, 03, 35, 15, 04, 11, 00, 12, 1e, 02, 11, 04, 12, 32, 05, 11, 00, 14, 1e, 00, 17, 00, 41, 19, 00, 41, 00, 42, 26, 00, 43, 00, 5f, 1d, 00, 5f, 00, 60, 32, 01, 0d, 00, 20, 4e, 01, 11, 00, 14, 41, 00, 17, 00, 41, 21, 00, 41, 00, 42, 4a, 00, 43, 00, 60, 25, 00, 60, 00, 61, 4e, 01, 0d, 00, 20, 6e, 04, 11, 00, 14, 62, 00, 17, 00, 42, 29, 00, 42, 00, 43, 66, 00, 44, 00, 61, 2d, 00, 61, 00, 62, 6e, 01, 0d, 00, 20, 86, 01, 01, 11, 00, 14, 45, 00, 17, 01, 36, 31, 01, 36, 00, 37, 82, 01, 01, 12, 00, 2f, 35, 00, 2f, 00, 30, 86, 01, 01, 0d, 00, 20, 9a, 01, 01, 11, 00, 14, 49, 00, 17, 01, 36, 39, 02, 11, 00, 12, 96, 01, 01, 12, 00, 2f, 3d, 01, 11, 00, 12, 9a, 01, 02, 0d, 00, 20, a2, 01, 03, 05, 00, 0b, a6, 01, 01, 01, 00, 02]
+Raw bytes (336): 0x[01, 01, 36, 0d, 11, 0d, 3f, 11, 15, 0d, 37, 3b, 1d, 3f, 19, 11, 15, 0d, 3f, 11, 15, 0d, 3b, 3f, 19, 11, 15, 0d, 37, 3b, 1d, 3f, 19, 11, 15, 41, 53, 21, 25, 41, 21, 41, 53, 21, 25, 09, 73, 77, 2d, 0d, 29, 09, 0d, 09, 77, 0d, 29, 09, 73, 77, 2d, 0d, 29, 45, 8b, 01, 31, 35, 45, 31, 45, 8b, 01, 31, 35, 49, 9f, 01, 39, 3d, 49, 39, 49, 9f, 01, 39, 3d, 05, 09, ab, 01, 09, af, 01, 3d, b3, 01, 39, b7, 01, 35, bb, 01, 31, bf, 01, 2d, c3, 01, 29, c7, 01, 25, cb, 01, 21, cf, 01, 1d, d3, 01, 19, d7, 01, 15, 05, 11, 28, 01, 3d, 01, 03, 17, 05, 08, 09, 00, 0e, 09, 02, 09, 04, 1a, 0d, 06, 0d, 00, 1f, 11, 00, 2f, 00, 30, 02, 00, 31, 03, 1c, 15, 04, 11, 00, 12, 1e, 02, 11, 03, 27, 32, 05, 11, 00, 14, 1e, 00, 17, 00, 29, 19, 00, 41, 00, 42, 26, 00, 43, 00, 47, 1d, 00, 5f, 00, 60, 32, 01, 0d, 00, 17, 4e, 01, 11, 00, 14, 41, 00, 17, 00, 29, 21, 00, 41, 00, 42, 4a, 00, 43, 00, 47, 25, 00, 60, 00, 61, 4e, 01, 0d, 00, 17, 6e, 04, 11, 00, 14, 62, 00, 17, 00, 29, 29, 00, 42, 00, 43, 66, 00, 44, 00, 48, 2d, 00, 61, 00, 62, 6e, 01, 0d, 00, 17, 86, 01, 01, 11, 00, 14, 45, 00, 17, 01, 1d, 31, 01, 36, 00, 37, 82, 01, 01, 12, 00, 16, 35, 00, 2f, 00, 30, 86, 01, 01, 0d, 00, 17, 9a, 01, 01, 11, 00, 14, 49, 00, 17, 01, 1d, 39, 02, 11, 00, 12, 96, 01, 01, 12, 00, 16, 3d, 01, 11, 00, 12, 9a, 01, 02, 0d, 00, 17, a2, 01, 03, 05, 00, 0b, a6, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 54
@@ -144,59 +144,59 @@ Number of file 0 mappings: 40
 - Code(Counter(0)) at (prev + 61, 1) to (start + 3, 23)
 - Code(Counter(1)) at (prev + 8, 9) to (start + 0, 14)
 - Code(Counter(2)) at (prev + 2, 9) to (start + 4, 26)
-- Code(Counter(3)) at (prev + 6, 13) to (start + 0, 47)
+- Code(Counter(3)) at (prev + 6, 13) to (start + 0, 31)
 - Code(Counter(4)) at (prev + 0, 47) to (start + 0, 48)
-- Code(Expression(0, Sub)) at (prev + 0, 49) to (start + 3, 53)
+- Code(Expression(0, Sub)) at (prev + 0, 49) to (start + 3, 28)
     = (c3 - c4)
 - Code(Counter(5)) at (prev + 4, 17) to (start + 0, 18)
-- Code(Expression(7, Sub)) at (prev + 2, 17) to (start + 4, 18)
+- Code(Expression(7, Sub)) at (prev + 2, 17) to (start + 3, 39)
     = (c3 - (c4 + c5))
 - Code(Expression(12, Sub)) at (prev + 5, 17) to (start + 0, 20)
     = (c3 - (((c4 + c5) + c6) + c7))
-- Code(Expression(7, Sub)) at (prev + 0, 23) to (start + 0, 65)
+- Code(Expression(7, Sub)) at (prev + 0, 23) to (start + 0, 41)
     = (c3 - (c4 + c5))
 - Code(Counter(6)) at (prev + 0, 65) to (start + 0, 66)
-- Code(Expression(9, Sub)) at (prev + 0, 67) to (start + 0, 95)
+- Code(Expression(9, Sub)) at (prev + 0, 67) to (start + 0, 71)
     = (c3 - ((c4 + c5) + c6))
 - Code(Counter(7)) at (prev + 0, 95) to (start + 0, 96)
-- Code(Expression(12, Sub)) at (prev + 1, 13) to (start + 0, 32)
+- Code(Expression(12, Sub)) at (prev + 1, 13) to (start + 0, 23)
     = (c3 - (((c4 + c5) + c6) + c7))
 - Code(Expression(19, Sub)) at (prev + 1, 17) to (start + 0, 20)
     = (c16 - (c8 + c9))
-- Code(Counter(16)) at (prev + 0, 23) to (start + 0, 65)
+- Code(Counter(16)) at (prev + 0, 23) to (start + 0, 41)
 - Code(Counter(8)) at (prev + 0, 65) to (start + 0, 66)
-- Code(Expression(18, Sub)) at (prev + 0, 67) to (start + 0, 96)
+- Code(Expression(18, Sub)) at (prev + 0, 67) to (start + 0, 71)
     = (c16 - c8)
 - Code(Counter(9)) at (prev + 0, 96) to (start + 0, 97)
-- Code(Expression(19, Sub)) at (prev + 1, 13) to (start + 0, 32)
+- Code(Expression(19, Sub)) at (prev + 1, 13) to (start + 0, 23)
     = (c16 - (c8 + c9))
 - Code(Expression(27, Sub)) at (prev + 4, 17) to (start + 0, 20)
     = (c2 - ((c3 + c10) + c11))
-- Code(Expression(24, Sub)) at (prev + 0, 23) to (start + 0, 66)
+- Code(Expression(24, Sub)) at (prev + 0, 23) to (start + 0, 41)
     = (c2 - c3)
 - Code(Counter(10)) at (prev + 0, 66) to (start + 0, 67)
-- Code(Expression(25, Sub)) at (prev + 0, 68) to (start + 0, 97)
+- Code(Expression(25, Sub)) at (prev + 0, 68) to (start + 0, 72)
     = (c2 - (c3 + c10))
 - Code(Counter(11)) at (prev + 0, 97) to (start + 0, 98)
-- Code(Expression(27, Sub)) at (prev + 1, 13) to (start + 0, 32)
+- Code(Expression(27, Sub)) at (prev + 1, 13) to (start + 0, 23)
     = (c2 - ((c3 + c10) + c11))
 - Code(Expression(33, Sub)) at (prev + 1, 17) to (start + 0, 20)
     = (c17 - (c12 + c13))
-- Code(Counter(17)) at (prev + 0, 23) to (start + 1, 54)
+- Code(Counter(17)) at (prev + 0, 23) to (start + 1, 29)
 - Code(Counter(12)) at (prev + 1, 54) to (start + 0, 55)
-- Code(Expression(32, Sub)) at (prev + 1, 18) to (start + 0, 47)
+- Code(Expression(32, Sub)) at (prev + 1, 18) to (start + 0, 22)
     = (c17 - c12)
 - Code(Counter(13)) at (prev + 0, 47) to (start + 0, 48)
-- Code(Expression(33, Sub)) at (prev + 1, 13) to (start + 0, 32)
+- Code(Expression(33, Sub)) at (prev + 1, 13) to (start + 0, 23)
     = (c17 - (c12 + c13))
 - Code(Expression(38, Sub)) at (prev + 1, 17) to (start + 0, 20)
     = (c18 - (c14 + c15))
-- Code(Counter(18)) at (prev + 0, 23) to (start + 1, 54)
+- Code(Counter(18)) at (prev + 0, 23) to (start + 1, 29)
 - Code(Counter(14)) at (prev + 2, 17) to (start + 0, 18)
-- Code(Expression(37, Sub)) at (prev + 1, 18) to (start + 0, 47)
+- Code(Expression(37, Sub)) at (prev + 1, 18) to (start + 0, 22)
     = (c18 - c14)
 - Code(Counter(15)) at (prev + 1, 17) to (start + 0, 18)
-- Code(Expression(38, Sub)) at (prev + 2, 13) to (start + 0, 32)
+- Code(Expression(38, Sub)) at (prev + 2, 13) to (start + 0, 23)
     = (c18 - (c14 + c15))
 - Code(Expression(40, Sub)) at (prev + 3, 5) to (start + 0, 11)
     = (c1 - c2)
diff --git a/tests/coverage/try_error_result.coverage b/tests/coverage/try_error_result.coverage
index 7100248f7df..7a89c0452ac 100644
--- a/tests/coverage/try_error_result.coverage
+++ b/tests/coverage/try_error_result.coverage
@@ -86,7 +86,7 @@
    LL|      1|                .
    LL|      1|                expect_err(
    LL|      1|                    "call should fail"
-   LL|      1|                );
+   LL|       |                );
    LL|      1|            let val = thing1.get_thing_2(/*return_error=*/ true)?.call(/*return_error=*/ true)?;
                               ^0                                                ^0                          ^0
    LL|      0|            assert_eq!(val, 57);
diff --git a/tests/coverage/unicode.cov-map b/tests/coverage/unicode.cov-map
index 7b9dc0b9bc8..29d40a05513 100644
--- a/tests/coverage/unicode.cov-map
+++ b/tests/coverage/unicode.cov-map
@@ -1,5 +1,5 @@
 Function name: unicode::main
-Raw bytes (53): 0x[01, 01, 02, 05, 01, 01, 0d, 09, 01, 0e, 01, 00, 0b, 02, 01, 09, 00, 0c, 05, 00, 10, 00, 1b, 02, 00, 1c, 00, 28, 01, 02, 08, 00, 25, 09, 00, 29, 00, 46, 0d, 00, 47, 02, 06, 06, 02, 05, 00, 06, 01, 02, 05, 01, 02]
+Raw bytes (53): 0x[01, 01, 02, 05, 01, 01, 0d, 09, 01, 0e, 01, 00, 0b, 02, 01, 09, 00, 0c, 05, 00, 10, 00, 1b, 02, 00, 1c, 00, 28, 01, 02, 08, 00, 23, 09, 00, 29, 00, 44, 0d, 00, 47, 02, 06, 06, 02, 05, 00, 06, 01, 02, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 2
@@ -12,8 +12,8 @@ Number of file 0 mappings: 9
 - Code(Counter(1)) at (prev + 0, 16) to (start + 0, 27)
 - Code(Expression(0, Sub)) at (prev + 0, 28) to (start + 0, 40)
     = (c1 - c0)
-- Code(Counter(0)) at (prev + 2, 8) to (start + 0, 37)
-- Code(Counter(2)) at (prev + 0, 41) to (start + 0, 70)
+- Code(Counter(0)) at (prev + 2, 8) to (start + 0, 35)
+- Code(Counter(2)) at (prev + 0, 41) to (start + 0, 68)
 - Code(Counter(3)) at (prev + 0, 71) to (start + 2, 6)
 - Code(Expression(1, Sub)) at (prev + 2, 5) to (start + 0, 6)
     = (c0 - c3)
diff --git a/tests/coverage/unicode.coverage b/tests/coverage/unicode.coverage
index 84c5f05a8c4..44349954550 100644
--- a/tests/coverage/unicode.coverage
+++ b/tests/coverage/unicode.coverage
@@ -15,7 +15,7 @@
    LL|     33|    for _İ in 'А'..='Я' { /* Я */ }
                       ^32                ^32
    LL|       |
-   LL|      1|    if 申し訳ございません() && 申し訳ございません() {
+   LL|      1|    if 申し訳ございません() && 申し訳ございません() {
                                                       ^0
    LL|      0|        println!("true");
    LL|      1|    }
diff --git a/tests/coverage/unreachable.cov-map b/tests/coverage/unreachable.cov-map
index 97961bc7414..0bc18bfcbd3 100644
--- a/tests/coverage/unreachable.cov-map
+++ b/tests/coverage/unreachable.cov-map
@@ -1,27 +1,27 @@
 Function name: unreachable::UNREACHABLE_CLOSURE::{closure#0} (unused)
-Raw bytes (9): 0x[01, 01, 00, 01, 00, 0e, 27, 00, 47]
+Raw bytes (9): 0x[01, 01, 00, 01, 00, 0e, 27, 00, 45]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 1
-- Code(Zero) at (prev + 14, 39) to (start + 0, 71)
+- Code(Zero) at (prev + 14, 39) to (start + 0, 69)
 Highest counter ID seen: (none)
 
 Function name: unreachable::unreachable_function (unused)
-Raw bytes (9): 0x[01, 01, 00, 01, 00, 10, 01, 01, 25]
+Raw bytes (9): 0x[01, 01, 00, 01, 00, 10, 01, 01, 23]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 1
-- Code(Zero) at (prev + 16, 1) to (start + 1, 37)
+- Code(Zero) at (prev + 16, 1) to (start + 1, 35)
 Highest counter ID seen: (none)
 
 Function name: unreachable::unreachable_intrinsic (unused)
-Raw bytes (9): 0x[01, 01, 00, 01, 00, 15, 01, 01, 2c]
+Raw bytes (9): 0x[01, 01, 00, 01, 00, 15, 01, 01, 2a]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 1
-- Code(Zero) at (prev + 21, 1) to (start + 1, 44)
+- Code(Zero) at (prev + 21, 1) to (start + 1, 42)
 Highest counter ID seen: (none)
 
diff --git a/tests/coverage/yield.cov-map b/tests/coverage/yield.cov-map
index d296f9bd778..bf0916e5503 100644
--- a/tests/coverage/yield.cov-map
+++ b/tests/coverage/yield.cov-map
@@ -1,5 +1,5 @@
 Function name: yield::main
-Raw bytes (94): 0x[01, 01, 05, 01, 05, 05, 09, 09, 11, 11, 15, 11, 15, 10, 01, 07, 01, 01, 16, 01, 07, 0b, 00, 2e, 05, 01, 27, 00, 29, 02, 01, 0e, 00, 34, 05, 02, 0b, 00, 2e, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 34, 09, 03, 09, 00, 16, 09, 08, 0b, 00, 2e, 11, 01, 27, 00, 29, 0a, 01, 0e, 00, 34, 11, 02, 0b, 00, 2e, 12, 01, 27, 00, 29, 15, 01, 0e, 00, 34, 12, 02, 01, 00, 02]
+Raw bytes (94): 0x[01, 01, 05, 01, 05, 05, 09, 09, 11, 11, 15, 11, 15, 10, 01, 07, 01, 01, 16, 01, 07, 0b, 00, 2e, 05, 01, 27, 00, 29, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 03, 09, 00, 16, 09, 08, 0b, 00, 2e, 11, 01, 27, 00, 29, 0a, 01, 0e, 00, 14, 11, 02, 0b, 00, 2e, 12, 01, 27, 00, 29, 15, 01, 0e, 00, 14, 12, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 5
@@ -12,22 +12,22 @@ Number of file 0 mappings: 16
 - Code(Counter(0)) at (prev + 7, 1) to (start + 1, 22)
 - Code(Counter(0)) at (prev + 7, 11) to (start + 0, 46)
 - Code(Counter(1)) at (prev + 1, 39) to (start + 0, 41)
-- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 52)
+- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 20)
     = (c0 - c1)
 - Code(Counter(1)) at (prev + 2, 11) to (start + 0, 46)
 - Code(Counter(3)) at (prev + 1, 34) to (start + 0, 39)
 - Code(Counter(2)) at (prev + 0, 44) to (start + 0, 46)
-- Code(Expression(1, Sub)) at (prev + 1, 14) to (start + 0, 52)
+- Code(Expression(1, Sub)) at (prev + 1, 14) to (start + 0, 20)
     = (c1 - c2)
 - Code(Counter(2)) at (prev + 3, 9) to (start + 0, 22)
 - Code(Counter(2)) at (prev + 8, 11) to (start + 0, 46)
 - Code(Counter(4)) at (prev + 1, 39) to (start + 0, 41)
-- Code(Expression(2, Sub)) at (prev + 1, 14) to (start + 0, 52)
+- Code(Expression(2, Sub)) at (prev + 1, 14) to (start + 0, 20)
     = (c2 - c4)
 - Code(Counter(4)) at (prev + 2, 11) to (start + 0, 46)
 - Code(Expression(4, Sub)) at (prev + 1, 39) to (start + 0, 41)
     = (c4 - c5)
-- Code(Counter(5)) at (prev + 1, 14) to (start + 0, 52)
+- Code(Counter(5)) at (prev + 1, 14) to (start + 0, 20)
 - Code(Expression(4, Sub)) at (prev + 2, 1) to (start + 0, 2)
     = (c4 - c5)
 Highest counter ID seen: c5
diff --git a/tests/crashes/134334.rs b/tests/crashes/134334.rs
deleted file mode 100644
index d99df7bdc1e..00000000000
--- a/tests/crashes/134334.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-//@ known-bug: #134334
-//@ only-x86_64
-
-#[repr(simd)]
-struct A();
-
-fn main() {
-    std::arch::asm!("{}", in(xmm_reg) A());
-}
diff --git a/tests/crashes/134335.rs b/tests/crashes/134335.rs
deleted file mode 100644
index bee6686ff3f..00000000000
--- a/tests/crashes/134335.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-//@ known-bug: #134335
-//@compile-flags: -Zunstable-options --edition=2024 --crate-type=lib
-pub async fn async_closure(x: &mut i32) {
-    let c = async move || {
-        *x += 1;
-    };
-    call_once(c).await;
-}
-
-fn call_once<T>(f: impl FnOnce() -> T) -> T {
-    f()
-}
diff --git a/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-abort.diff b/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-abort.diff
index 886f9a68dd9..417406de39b 100644
--- a/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-abort.diff
+++ b/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-abort.diff
@@ -8,8 +8,9 @@
   
       bb0: {
           StorageLive(_1);
-          _1 = const <bool as NeedsDrop>::NEEDS;
+-         _1 = const <bool as NeedsDrop>::NEEDS;
 -         switchInt(move _1) -> [0: bb2, otherwise: bb1];
++         _1 = const false;
 +         switchInt(const false) -> [0: bb2, otherwise: bb1];
       }
   
diff --git a/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-unwind.diff b/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-unwind.diff
index cc53b213397..63ba2c6865f 100644
--- a/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/control_flow_simplification.hello.GVN.panic-unwind.diff
@@ -8,8 +8,9 @@
   
       bb0: {
           StorageLive(_1);
-          _1 = const <bool as NeedsDrop>::NEEDS;
+-         _1 = const <bool as NeedsDrop>::NEEDS;
 -         switchInt(move _1) -> [0: bb2, otherwise: bb1];
++         _1 = const false;
 +         switchInt(const false) -> [0: bb2, otherwise: bb1];
       }
   
diff --git a/tests/mir-opt/const_prop/read_immutable_static.main.GVN.diff b/tests/mir-opt/const_prop/read_immutable_static.main.GVN.diff
index 23928337bf7..8df262b351f 100644
--- a/tests/mir-opt/const_prop/read_immutable_static.main.GVN.diff
+++ b/tests/mir-opt/const_prop/read_immutable_static.main.GVN.diff
@@ -14,19 +14,23 @@
   
       bb0: {
           StorageLive(_1);
-          StorageLive(_2);
+-         StorageLive(_2);
 -         StorageLive(_3);
 +         nop;
++         nop;
           _3 = const {ALLOC0: &u8};
-          _2 = copy (*_3);
+-         _2 = copy (*_3);
++         _2 = const 2_u8;
           StorageLive(_4);
           StorageLive(_5);
           _5 = const {ALLOC0: &u8};
 -         _4 = copy (*_5);
-+         _4 = copy (*_3);
-          _1 = Add(move _2, move _4);
+-         _1 = Add(move _2, move _4);
++         _4 = const 2_u8;
++         _1 = const 4_u8;
           StorageDead(_4);
-          StorageDead(_2);
+-         StorageDead(_2);
++         nop;
           StorageDead(_5);
 -         StorageDead(_3);
 +         nop;
diff --git a/tests/mir-opt/const_prop/read_immutable_static.rs b/tests/mir-opt/const_prop/read_immutable_static.rs
index 98ba76fb765..05fec2f3303 100644
--- a/tests/mir-opt/const_prop/read_immutable_static.rs
+++ b/tests/mir-opt/const_prop/read_immutable_static.rs
@@ -6,7 +6,6 @@ static FOO: u8 = 2;
 fn main() {
     // CHECK-LABEL: fn main(
     // CHECK: debug x => [[x:_.*]];
-    // Disabled due to <https://github.com/rust-lang/rust/issues/130853>
-    // COM: CHECK: [[x]] = const 4_u8;
+    // CHECK: [[x]] = const 4_u8;
     let x = FOO + FOO;
 }
diff --git a/tests/mir-opt/const_prop/ref_deref.main.GVN.diff b/tests/mir-opt/const_prop/ref_deref.main.GVN.diff
index 4477b4b005b..b9e269266b0 100644
--- a/tests/mir-opt/const_prop/ref_deref.main.GVN.diff
+++ b/tests/mir-opt/const_prop/ref_deref.main.GVN.diff
@@ -16,7 +16,8 @@
           StorageLive(_2);
           _4 = const main::promoted[0];
           _2 = &(*_4);
-          _1 = copy (*_2);
+-         _1 = copy (*_2);
++         _1 = const 4_i32;
           StorageDead(_2);
           _0 = const ();
           StorageDead(_1);
diff --git a/tests/mir-opt/const_prop/ref_deref_project.main.GVN.diff b/tests/mir-opt/const_prop/ref_deref_project.main.GVN.diff
index bbfd70bea16..dcc13c9251c 100644
--- a/tests/mir-opt/const_prop/ref_deref_project.main.GVN.diff
+++ b/tests/mir-opt/const_prop/ref_deref_project.main.GVN.diff
@@ -16,7 +16,8 @@
           StorageLive(_2);
           _4 = const main::promoted[0];
           _2 = &((*_4).1: i32);
-          _1 = copy (*_2);
+-         _1 = copy (*_2);
++         _1 = const 5_i32;
           StorageDead(_2);
           _0 = const ();
           StorageDead(_1);
diff --git a/tests/mir-opt/const_prop/ref_deref_project.rs b/tests/mir-opt/const_prop/ref_deref_project.rs
index 31108e1a57f..5a48a887f93 100644
--- a/tests/mir-opt/const_prop/ref_deref_project.rs
+++ b/tests/mir-opt/const_prop/ref_deref_project.rs
@@ -5,7 +5,6 @@
 fn main() {
     // CHECK-LABEL: fn main(
     // CHECK: debug a => [[a:_.*]];
-    // Disabled due to <https://github.com/rust-lang/rust/issues/130853>
-    // COM: CHECK: [[a]] = const 5_i32;
+    // CHECK: [[a]] = const 5_i32;
     let a = *(&(4, 5).1);
 }
diff --git a/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-abort.diff b/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-abort.diff
index 0798b303929..d6e81debccd 100644
--- a/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-abort.diff
+++ b/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-abort.diff
@@ -40,7 +40,7 @@
   
       bb1: {
 -         _1 = copy (*_2)[_6];
-+         _1 = copy (*_2)[1 of 2];
++         _1 = const 2_u32;
           StorageDead(_6);
           StorageDead(_4);
           StorageDead(_2);
diff --git a/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-unwind.diff b/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-unwind.diff
index c0b3d4d3219..6713e531892 100644
--- a/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-unwind.diff
@@ -40,7 +40,7 @@
   
       bb1: {
 -         _1 = copy (*_2)[_6];
-+         _1 = copy (*_2)[1 of 2];
++         _1 = const 2_u32;
           StorageDead(_6);
           StorageDead(_4);
           StorageDead(_2);
diff --git a/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-abort.diff b/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-abort.diff
index 0798b303929..d6e81debccd 100644
--- a/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-abort.diff
+++ b/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-abort.diff
@@ -40,7 +40,7 @@
   
       bb1: {
 -         _1 = copy (*_2)[_6];
-+         _1 = copy (*_2)[1 of 2];
++         _1 = const 2_u32;
           StorageDead(_6);
           StorageDead(_4);
           StorageDead(_2);
diff --git a/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-unwind.diff b/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-unwind.diff
index c0b3d4d3219..6713e531892 100644
--- a/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-unwind.diff
@@ -40,7 +40,7 @@
   
       bb1: {
 -         _1 = copy (*_2)[_6];
-+         _1 = copy (*_2)[1 of 2];
++         _1 = const 2_u32;
           StorageDead(_6);
           StorageDead(_4);
           StorageDead(_2);
diff --git a/tests/mir-opt/const_prop/slice_len.rs b/tests/mir-opt/const_prop/slice_len.rs
index 498e09fbb65..ebd3c9e792d 100644
--- a/tests/mir-opt/const_prop/slice_len.rs
+++ b/tests/mir-opt/const_prop/slice_len.rs
@@ -8,8 +8,7 @@ fn main() {
     // CHECK-LABEL: fn main(
     // CHECK: debug a => [[a:_.*]];
     // CHECK: [[slice:_.*]] = copy {{.*}} as &[u32] (PointerCoercion(Unsize, AsCast));
-    // Disabled due to <https://github.com/rust-lang/rust/issues/130853>
-    // COM: CHECK: assert(const true,
-    // COM: CHECK: [[a]] = const 2_u32;
+    // CHECK: assert(const true,
+    // CHECK: [[a]] = const 2_u32;
     let a = (&[1u32, 2, 3] as &[u32])[1];
 }
diff --git a/tests/mir-opt/const_prop/transmute.undef_union_as_integer.GVN.32bit.diff b/tests/mir-opt/const_prop/transmute.undef_union_as_integer.GVN.32bit.diff
index febb6bfb0a4..2ac9769a0e7 100644
--- a/tests/mir-opt/const_prop/transmute.undef_union_as_integer.GVN.32bit.diff
+++ b/tests/mir-opt/const_prop/transmute.undef_union_as_integer.GVN.32bit.diff
@@ -10,8 +10,9 @@
           StorageLive(_1);
           StorageLive(_2);
 -         _2 = ();
+-         _1 = Union32 { value: move _2 };
 +         _2 = const ();
-          _1 = Union32 { value: move _2 };
++         _1 = Union32 { value: const () };
           StorageDead(_2);
           _0 = move _1 as u32 (Transmute);
           StorageDead(_1);
diff --git a/tests/mir-opt/const_prop/transmute.undef_union_as_integer.GVN.64bit.diff b/tests/mir-opt/const_prop/transmute.undef_union_as_integer.GVN.64bit.diff
index febb6bfb0a4..2ac9769a0e7 100644
--- a/tests/mir-opt/const_prop/transmute.undef_union_as_integer.GVN.64bit.diff
+++ b/tests/mir-opt/const_prop/transmute.undef_union_as_integer.GVN.64bit.diff
@@ -10,8 +10,9 @@
           StorageLive(_1);
           StorageLive(_2);
 -         _2 = ();
+-         _1 = Union32 { value: move _2 };
 +         _2 = const ();
-          _1 = Union32 { value: move _2 };
++         _1 = Union32 { value: const () };
           StorageDead(_2);
           _0 = move _1 as u32 (Transmute);
           StorageDead(_1);
diff --git a/tests/mir-opt/coroutine_drop_cleanup.rs b/tests/mir-opt/coroutine_drop_cleanup.rs
index 33fdd2dd0d9..4ae97273cd9 100644
--- a/tests/mir-opt/coroutine_drop_cleanup.rs
+++ b/tests/mir-opt/coroutine_drop_cleanup.rs
@@ -8,7 +8,7 @@
 
 // EMIT_MIR coroutine_drop_cleanup.main-{closure#0}.coroutine_drop.0.mir
 fn main() {
-    let gen = #[coroutine]
+    let gen_ = #[coroutine]
     || {
         let _s = String::new();
         yield;
diff --git a/tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff b/tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff
index 8e1cdb7182b..542b70bcee9 100644
--- a/tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff
+++ b/tests/mir-opt/coverage/branch_match_arms.main.InstrumentCoverage.diff
@@ -27,10 +27,10 @@
       }
   
 +     coverage Code { bcb: bcb0 } => $DIR/branch_match_arms.rs:14:1: 15:21 (#0);
-+     coverage Code { bcb: bcb1 } => $DIR/branch_match_arms.rs:16:17: 16:33 (#0);
-+     coverage Code { bcb: bcb3 } => $DIR/branch_match_arms.rs:17:17: 17:33 (#0);
-+     coverage Code { bcb: bcb4 } => $DIR/branch_match_arms.rs:18:17: 18:33 (#0);
-+     coverage Code { bcb: bcb5 } => $DIR/branch_match_arms.rs:19:17: 19:33 (#0);
++     coverage Code { bcb: bcb1 } => $DIR/branch_match_arms.rs:16:17: 16:32 (#0);
++     coverage Code { bcb: bcb3 } => $DIR/branch_match_arms.rs:17:17: 17:32 (#0);
++     coverage Code { bcb: bcb4 } => $DIR/branch_match_arms.rs:18:17: 18:32 (#0);
++     coverage Code { bcb: bcb5 } => $DIR/branch_match_arms.rs:19:17: 19:32 (#0);
 +     coverage Code { bcb: bcb2 } => $DIR/branch_match_arms.rs:21:2: 21:2 (#0);
 + 
       bb0: {
diff --git a/tests/mir-opt/coverage/instrument_coverage.main.InstrumentCoverage.diff b/tests/mir-opt/coverage/instrument_coverage.main.InstrumentCoverage.diff
index 1a71cb8dea7..30de92f3b86 100644
--- a/tests/mir-opt/coverage/instrument_coverage.main.InstrumentCoverage.diff
+++ b/tests/mir-opt/coverage/instrument_coverage.main.InstrumentCoverage.diff
@@ -8,7 +8,7 @@
       let mut _3: !;
   
 +     coverage Code { bcb: bcb0 } => $DIR/instrument_coverage.rs:13:1: 13:11 (#0);
-+     coverage Code { bcb: bcb1 } => $DIR/instrument_coverage.rs:15:12: 15:17 (#0);
++     coverage Code { bcb: bcb1 } => $DIR/instrument_coverage.rs:15:12: 15:15 (#0);
 +     coverage Code { bcb: bcb2 } => $DIR/instrument_coverage.rs:16:13: 16:18 (#0);
 +     coverage Code { bcb: bcb3 } => $DIR/instrument_coverage.rs:17:10: 17:10 (#0);
 +     coverage Code { bcb: bcb2 } => $DIR/instrument_coverage.rs:19:2: 19:2 (#0);
diff --git a/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-abort.diff b/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-abort.diff
index 557320f0179..ef418798faa 100644
--- a/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-abort.diff
+++ b/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-abort.diff
@@ -5,11 +5,10 @@
       let mut _0: ();
       let _1: main::Un;
       let mut _2: u32;
-      let mut _3: u32;
       scope 1 {
           debug un => _1;
           scope 3 (inlined std::mem::drop::<u32>) {
-              debug _x => _3;
+              debug _x => _2;
           }
       }
       scope 2 (inlined val) {
@@ -17,13 +16,10 @@
   
       bb0: {
           StorageLive(_1);
-          StorageLive(_2);
-          nop;
           _1 = Un { us: const 1_u32 };
+          StorageLive(_2);
+          _2 = copy (_1.0: u32);
           StorageDead(_2);
-          StorageLive(_3);
-          _3 = copy (_1.0: u32);
-          StorageDead(_3);
           StorageDead(_1);
           return;
       }
diff --git a/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-unwind.diff b/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-unwind.diff
index 557320f0179..ef418798faa 100644
--- a/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-unwind.diff
+++ b/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-unwind.diff
@@ -5,11 +5,10 @@
       let mut _0: ();
       let _1: main::Un;
       let mut _2: u32;
-      let mut _3: u32;
       scope 1 {
           debug un => _1;
           scope 3 (inlined std::mem::drop::<u32>) {
-              debug _x => _3;
+              debug _x => _2;
           }
       }
       scope 2 (inlined val) {
@@ -17,13 +16,10 @@
   
       bb0: {
           StorageLive(_1);
-          StorageLive(_2);
-          nop;
           _1 = Un { us: const 1_u32 };
+          StorageLive(_2);
+          _2 = copy (_1.0: u32);
           StorageDead(_2);
-          StorageLive(_3);
-          _3 = copy (_1.0: u32);
-          StorageDead(_3);
           StorageDead(_1);
           return;
       }
diff --git a/tests/mir-opt/gvn.borrowed.GVN.panic-abort.diff b/tests/mir-opt/gvn.borrowed.GVN.panic-abort.diff
index acbea13642c..b0702696e18 100644
--- a/tests/mir-opt/gvn.borrowed.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.borrowed.GVN.panic-abort.diff
@@ -18,7 +18,8 @@
       }
   
       bb2: {
-          _0 = opaque::<T>(copy (*_3)) -> [return: bb3, unwind unreachable];
+-         _0 = opaque::<T>(copy (*_3)) -> [return: bb3, unwind unreachable];
++         _0 = opaque::<T>(copy _1) -> [return: bb3, unwind unreachable];
       }
   
       bb3: {
diff --git a/tests/mir-opt/gvn.borrowed.GVN.panic-unwind.diff b/tests/mir-opt/gvn.borrowed.GVN.panic-unwind.diff
index ba080bfdb07..fe05d4deeed 100644
--- a/tests/mir-opt/gvn.borrowed.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.borrowed.GVN.panic-unwind.diff
@@ -18,7 +18,8 @@
       }
   
       bb2: {
-          _0 = opaque::<T>(copy (*_3)) -> [return: bb3, unwind continue];
+-         _0 = opaque::<T>(copy (*_3)) -> [return: bb3, unwind continue];
++         _0 = opaque::<T>(copy _1) -> [return: bb3, unwind continue];
       }
   
       bb3: {
diff --git a/tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff b/tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff
index 7f99b83d937..3cce35d34e9 100644
--- a/tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff
@@ -8,10 +8,10 @@
       let mut _3: fn(u8) -> u8;
       let _5: ();
       let mut _6: fn(u8) -> u8;
-      let mut _9: {closure@$DIR/gvn.rs:615:19: 615:21};
+      let mut _9: {closure@$DIR/gvn.rs:620:19: 620:21};
       let _10: ();
       let mut _11: fn();
-      let mut _13: {closure@$DIR/gvn.rs:615:19: 615:21};
+      let mut _13: {closure@$DIR/gvn.rs:620:19: 620:21};
       let _14: ();
       let mut _15: fn();
       scope 1 {
@@ -19,7 +19,7 @@
           let _4: fn(u8) -> u8;
           scope 2 {
               debug g => _4;
-              let _7: {closure@$DIR/gvn.rs:615:19: 615:21};
+              let _7: {closure@$DIR/gvn.rs:620:19: 620:21};
               scope 3 {
                   debug closure => _7;
                   let _8: fn();
@@ -62,16 +62,16 @@
           StorageDead(_6);
           StorageDead(_5);
 -         StorageLive(_7);
--         _7 = {closure@$DIR/gvn.rs:615:19: 615:21};
+-         _7 = {closure@$DIR/gvn.rs:620:19: 620:21};
 -         StorageLive(_8);
 +         nop;
-+         _7 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
++         _7 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
 +         nop;
           StorageLive(_9);
 -         _9 = copy _7;
 -         _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
-+         _9 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
-+         _8 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
++         _9 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
++         _8 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
           StorageDead(_9);
           StorageLive(_10);
           StorageLive(_11);
@@ -88,8 +88,8 @@
           StorageLive(_13);
 -         _13 = copy _7;
 -         _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
-+         _13 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
-+         _12 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
++         _13 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
++         _12 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
           StorageDead(_13);
           StorageLive(_14);
           StorageLive(_15);
diff --git a/tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff b/tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff
index 06dd0502f30..d85aca040fe 100644
--- a/tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff
@@ -8,10 +8,10 @@
       let mut _3: fn(u8) -> u8;
       let _5: ();
       let mut _6: fn(u8) -> u8;
-      let mut _9: {closure@$DIR/gvn.rs:615:19: 615:21};
+      let mut _9: {closure@$DIR/gvn.rs:620:19: 620:21};
       let _10: ();
       let mut _11: fn();
-      let mut _13: {closure@$DIR/gvn.rs:615:19: 615:21};
+      let mut _13: {closure@$DIR/gvn.rs:620:19: 620:21};
       let _14: ();
       let mut _15: fn();
       scope 1 {
@@ -19,7 +19,7 @@
           let _4: fn(u8) -> u8;
           scope 2 {
               debug g => _4;
-              let _7: {closure@$DIR/gvn.rs:615:19: 615:21};
+              let _7: {closure@$DIR/gvn.rs:620:19: 620:21};
               scope 3 {
                   debug closure => _7;
                   let _8: fn();
@@ -62,16 +62,16 @@
           StorageDead(_6);
           StorageDead(_5);
 -         StorageLive(_7);
--         _7 = {closure@$DIR/gvn.rs:615:19: 615:21};
+-         _7 = {closure@$DIR/gvn.rs:620:19: 620:21};
 -         StorageLive(_8);
 +         nop;
-+         _7 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
++         _7 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
 +         nop;
           StorageLive(_9);
 -         _9 = copy _7;
 -         _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
-+         _9 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
-+         _8 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
++         _9 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
++         _8 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
           StorageDead(_9);
           StorageLive(_10);
           StorageLive(_11);
@@ -88,8 +88,8 @@
           StorageLive(_13);
 -         _13 = copy _7;
 -         _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
-+         _13 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
-+         _12 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
++         _13 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
++         _12 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
           StorageDead(_13);
           StorageLive(_14);
           StorageLive(_15);
diff --git a/tests/mir-opt/gvn.rs b/tests/mir-opt/gvn.rs
index c895a579259..6ef320c90de 100644
--- a/tests/mir-opt/gvn.rs
+++ b/tests/mir-opt/gvn.rs
@@ -100,17 +100,18 @@ fn subexpression_elimination(x: u64, y: u64, mut z: u64) {
     opaque((x * y) - y);
 
     // We cannot substitute through an immutable reference.
-    // (Disabled due to <https://github.com/rust-lang/rust/issues/130853>)
     // CHECK: [[ref:_.*]] = &_3;
     // CHECK: [[deref:_.*]] = copy (*[[ref]]);
-    // COM: CHECK: [[addref:_.*]] = Add(copy [[deref]], copy _1);
-    // COM: CHECK: opaque::<u64>(copy [[addref]])
-    // COM: CHECK: opaque::<u64>(copy [[addref]])
+    // CHECK: [[addref:_.*]] = Add(move [[deref]], copy _1);
+    // CHECK: opaque::<u64>(move [[addref]])
+    // CHECK: [[deref2:_.*]] = copy (*[[ref]]);
+    // CHECK: [[addref2:_.*]] = Add(move [[deref2]], copy _1);
+    // CHECK: opaque::<u64>(move [[addref2]])
     let a = &z;
     opaque(*a + x);
     opaque(*a + x);
 
-    // And certainly not through a mutable reference or a pointer.
+    // But not through a mutable reference or a pointer.
     // CHECK: [[mut:_.*]] = &mut _3;
     // CHECK: [[addmut:_.*]] = Add(
     // CHECK: opaque::<u64>(move [[addmut]])
@@ -142,9 +143,11 @@ fn subexpression_elimination(x: u64, y: u64, mut z: u64) {
     // Important: `e` is not `a`!
     // CHECK: [[ref2:_.*]] = &_3;
     // CHECK: [[deref2:_.*]] = copy (*[[ref2]]);
-    // COM: CHECK: [[addref2:_.*]] = Add(copy [[deref2]], copy _1);
-    // COM: CHECK: opaque::<u64>(copy [[addref2]])
-    // COM: CHECK: opaque::<u64>(copy [[addref2]])
+    // CHECK: [[addref2:_.*]] = Add(move [[deref2]], copy _1);
+    // CHECK: opaque::<u64>(move [[addref2]])
+    // CHECK: [[deref3:_.*]] = copy (*[[ref2]]);
+    // CHECK: [[addref3:_.*]] = Add(move [[deref3]], copy _1);
+    // CHECK: opaque::<u64>(move [[addref3]])
     let e = &z;
     opaque(*e + x);
     opaque(*e + x);
@@ -499,8 +502,9 @@ fn dereferences(t: &mut u32, u: &impl Copy, s: &S<u32>) {
     // Do not reuse dereferences of `&Freeze`.
     // CHECK: [[ref:_.*]] = &(*_1);
     // CHECK: [[st7:_.*]] = copy (*[[ref]]);
-    // COM: CHECK: opaque::<u32>(copy [[st7]])
-    // COM: CHECK: opaque::<u32>(copy [[st7]])
+    // CHECK: opaque::<u32>(move [[st7]])
+    // CHECK: [[st8:_.*]] = copy (*[[ref]]);
+    // CHECK: opaque::<u32>(move [[st8]])
     let z = &*t;
     opaque(*z);
     opaque(*z);
@@ -519,8 +523,9 @@ fn dereferences(t: &mut u32, u: &impl Copy, s: &S<u32>) {
 
     // `*s` is not Copy, but `(*s).0` is, but we still cannot reuse.
     // CHECK: [[st10:_.*]] = copy ((*_3).0: u32);
-    // COM: CHECK: opaque::<u32>(copy [[st10]])
-    // COM: CHECK: opaque::<u32>(copy [[st10]])
+    // CHECK: opaque::<u32>(move [[st10]])
+    // CHECK: [[st11:_.*]] = copy ((*_3).0: u32);
+    // CHECK: opaque::<u32>(move [[st11]])
     opaque(s.0);
     opaque(s.0);
 }
@@ -737,7 +742,7 @@ fn borrowed<T: Copy + Freeze>(x: T) {
     // CHECK: bb1: {
     // CHECK-NEXT: _0 = opaque::<T>(copy _1)
     // CHECK: bb2: {
-    // COM: CHECK-NEXT: _0 = opaque::<T>(copy _1)
+    // CHECK-NEXT: _0 = opaque::<T>(copy _1)
     mir! {
         {
             let a = x;
diff --git a/tests/mir-opt/gvn.slices.GVN.panic-abort.diff b/tests/mir-opt/gvn.slices.GVN.panic-abort.diff
index 43efcbdfb1e..e8e99b44e72 100644
--- a/tests/mir-opt/gvn.slices.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.slices.GVN.panic-abort.diff
@@ -111,8 +111,9 @@
           StorageLive(_7);
           StorageLive(_8);
 -         StorageLive(_9);
+-         StorageLive(_10);
++         nop;
 +         nop;
-          StorageLive(_10);
           StorageLive(_11);
           _11 = &(*_1);
           _10 = core::str::<impl str>::as_ptr(move _11) -> [return: bb3, unwind unreachable];
@@ -122,8 +123,9 @@
           StorageDead(_11);
           _9 = &_10;
 -         StorageLive(_12);
+-         StorageLive(_13);
++         nop;
 +         nop;
-          StorageLive(_13);
           StorageLive(_14);
 -         _14 = &(*_4);
 +         _14 = &(*_1);
@@ -148,11 +150,12 @@
           StorageLive(_17);
           StorageLive(_18);
 -         _18 = copy (*_15);
-+         _18 = copy (*_9);
++         _18 = copy _10;
           StorageLive(_19);
 -         _19 = copy (*_16);
-+         _19 = copy (*_12);
-          _17 = Eq(move _18, move _19);
+-         _17 = Eq(move _18, move _19);
++         _19 = copy _13;
++         _17 = Eq(copy _10, copy _13);
           switchInt(move _17) -> [0: bb6, otherwise: bb5];
       }
   
@@ -163,8 +166,10 @@
           StorageDead(_17);
           StorageDead(_16);
           StorageDead(_15);
-          StorageDead(_13);
-          StorageDead(_10);
+-         StorageDead(_13);
+-         StorageDead(_10);
++         nop;
++         nop;
           StorageDead(_8);
           StorageDead(_7);
 -         StorageLive(_29);
@@ -213,8 +218,9 @@
           StorageLive(_33);
           StorageLive(_34);
 -         StorageLive(_35);
+-         StorageLive(_36);
++         nop;
 +         nop;
-          StorageLive(_36);
           StorageLive(_37);
           _37 = &(*_1);
           _36 = core::str::<impl str>::as_ptr(move _37) -> [return: bb8, unwind unreachable];
@@ -224,8 +230,9 @@
           StorageDead(_37);
           _35 = &_36;
 -         StorageLive(_38);
+-         StorageLive(_39);
++         nop;
 +         nop;
-          StorageLive(_39);
           StorageLive(_40);
           _40 = &(*_29);
           _39 = core::slice::<impl [u8]>::as_ptr(move _40) -> [return: bb9, unwind unreachable];
@@ -249,11 +256,12 @@
           StorageLive(_43);
           StorageLive(_44);
 -         _44 = copy (*_41);
-+         _44 = copy (*_35);
++         _44 = copy _36;
           StorageLive(_45);
 -         _45 = copy (*_42);
-+         _45 = copy (*_38);
-          _43 = Eq(move _44, move _45);
+-         _43 = Eq(move _44, move _45);
++         _45 = copy _39;
++         _43 = Eq(copy _36, copy _39);
           switchInt(move _43) -> [0: bb11, otherwise: bb10];
       }
   
@@ -264,8 +272,10 @@
           StorageDead(_43);
           StorageDead(_42);
           StorageDead(_41);
-          StorageDead(_39);
-          StorageDead(_36);
+-         StorageDead(_39);
+-         StorageDead(_36);
++         nop;
++         nop;
           StorageDead(_34);
           StorageDead(_33);
           _0 = const ();
diff --git a/tests/mir-opt/gvn.slices.GVN.panic-unwind.diff b/tests/mir-opt/gvn.slices.GVN.panic-unwind.diff
index 8572f538c0f..4296d4d4a59 100644
--- a/tests/mir-opt/gvn.slices.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.slices.GVN.panic-unwind.diff
@@ -111,8 +111,9 @@
           StorageLive(_7);
           StorageLive(_8);
 -         StorageLive(_9);
+-         StorageLive(_10);
++         nop;
 +         nop;
-          StorageLive(_10);
           StorageLive(_11);
           _11 = &(*_1);
           _10 = core::str::<impl str>::as_ptr(move _11) -> [return: bb3, unwind continue];
@@ -122,8 +123,9 @@
           StorageDead(_11);
           _9 = &_10;
 -         StorageLive(_12);
+-         StorageLive(_13);
++         nop;
 +         nop;
-          StorageLive(_13);
           StorageLive(_14);
 -         _14 = &(*_4);
 +         _14 = &(*_1);
@@ -148,11 +150,12 @@
           StorageLive(_17);
           StorageLive(_18);
 -         _18 = copy (*_15);
-+         _18 = copy (*_9);
++         _18 = copy _10;
           StorageLive(_19);
 -         _19 = copy (*_16);
-+         _19 = copy (*_12);
-          _17 = Eq(move _18, move _19);
+-         _17 = Eq(move _18, move _19);
++         _19 = copy _13;
++         _17 = Eq(copy _10, copy _13);
           switchInt(move _17) -> [0: bb6, otherwise: bb5];
       }
   
@@ -163,8 +166,10 @@
           StorageDead(_17);
           StorageDead(_16);
           StorageDead(_15);
-          StorageDead(_13);
-          StorageDead(_10);
+-         StorageDead(_13);
+-         StorageDead(_10);
++         nop;
++         nop;
           StorageDead(_8);
           StorageDead(_7);
 -         StorageLive(_29);
@@ -213,8 +218,9 @@
           StorageLive(_33);
           StorageLive(_34);
 -         StorageLive(_35);
+-         StorageLive(_36);
++         nop;
 +         nop;
-          StorageLive(_36);
           StorageLive(_37);
           _37 = &(*_1);
           _36 = core::str::<impl str>::as_ptr(move _37) -> [return: bb8, unwind continue];
@@ -224,8 +230,9 @@
           StorageDead(_37);
           _35 = &_36;
 -         StorageLive(_38);
+-         StorageLive(_39);
++         nop;
 +         nop;
-          StorageLive(_39);
           StorageLive(_40);
           _40 = &(*_29);
           _39 = core::slice::<impl [u8]>::as_ptr(move _40) -> [return: bb9, unwind continue];
@@ -249,11 +256,12 @@
           StorageLive(_43);
           StorageLive(_44);
 -         _44 = copy (*_41);
-+         _44 = copy (*_35);
++         _44 = copy _36;
           StorageLive(_45);
 -         _45 = copy (*_42);
-+         _45 = copy (*_38);
-          _43 = Eq(move _44, move _45);
+-         _43 = Eq(move _44, move _45);
++         _45 = copy _39;
++         _43 = Eq(copy _36, copy _39);
           switchInt(move _43) -> [0: bb11, otherwise: bb10];
       }
   
@@ -264,8 +272,10 @@
           StorageDead(_43);
           StorageDead(_42);
           StorageDead(_41);
-          StorageDead(_39);
-          StorageDead(_36);
+-         StorageDead(_39);
+-         StorageDead(_36);
++         nop;
++         nop;
           StorageDead(_34);
           StorageDead(_33);
           _0 = const ();
diff --git a/tests/mir-opt/gvn_clone.rs b/tests/mir-opt/gvn_clone.rs
index c16b665fbd3..08938c0e1b4 100644
--- a/tests/mir-opt/gvn_clone.rs
+++ b/tests/mir-opt/gvn_clone.rs
@@ -1,5 +1,3 @@
-//@ compile-flags: -Zunsound-mir-opts
-// FIXME: see <https://github.com/rust-lang/rust/issues/132353>
 //@ test-mir-pass: GVN
 //@ compile-flags: -Zmir-enable-passes=+InstSimplify-before-inline
 
diff --git a/tests/mir-opt/gvn_clone.{impl#0}-clone.GVN.diff b/tests/mir-opt/gvn_clone.{impl#0}-clone.GVN.diff
index 2a672e82970..0f23415ec53 100644
--- a/tests/mir-opt/gvn_clone.{impl#0}-clone.GVN.diff
+++ b/tests/mir-opt/gvn_clone.{impl#0}-clone.GVN.diff
@@ -1,7 +1,7 @@
-- // MIR for `<impl at $DIR/gvn_clone.rs:14:10: 14:15>::clone` before GVN
-+ // MIR for `<impl at $DIR/gvn_clone.rs:14:10: 14:15>::clone` after GVN
+- // MIR for `<impl at $DIR/gvn_clone.rs:12:10: 12:15>::clone` before GVN
++ // MIR for `<impl at $DIR/gvn_clone.rs:12:10: 12:15>::clone` after GVN
   
-  fn <impl at $DIR/gvn_clone.rs:14:10: 14:15>::clone(_1: &AllCopy) -> AllCopy {
+  fn <impl at $DIR/gvn_clone.rs:12:10: 12:15>::clone(_1: &AllCopy) -> AllCopy {
       debug self => _1;
       let mut _0: AllCopy;
       let mut _2: i32;
diff --git a/tests/mir-opt/gvn_copy_aggregate.rs b/tests/mir-opt/gvn_copy_aggregate.rs
index 7c181d1ad37..c9473025a15 100644
--- a/tests/mir-opt/gvn_copy_aggregate.rs
+++ b/tests/mir-opt/gvn_copy_aggregate.rs
@@ -1,5 +1,3 @@
-//@ compile-flags: -Zunsound-mir-opts
-// FIXME: see <https://github.com/rust-lang/rust/issues/132353.
 //@ test-mir-pass: GVN
 //@ compile-flags: -Cpanic=abort
 
diff --git a/tests/mir-opt/gvn_uninhabited.f.GVN.panic-abort.diff b/tests/mir-opt/gvn_uninhabited.f.GVN.panic-abort.diff
index 881b629803a..a3e4796d088 100644
--- a/tests/mir-opt/gvn_uninhabited.f.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn_uninhabited.f.GVN.panic-abort.diff
@@ -17,15 +17,16 @@
           StorageLive(_3);
           _5 = const f::promoted[0];
           _3 = &(*_5);
-          _2 = copy ((*_3).1: E);
--         StorageLive(_1);
-+         nop;
-          _1 = copy ((_2 as A).1: u32);
+-         _2 = copy ((*_3).1: E);
++         _2 = const Scalar(0x00000000): E;
+          StorageLive(_1);
+-         _1 = copy ((_2 as A).1: u32);
++         _1 = const 0_u32;
           StorageDead(_3);
           StorageDead(_2);
-          _0 = copy _1;
--         StorageDead(_1);
-+         nop;
+-         _0 = copy _1;
++         _0 = const 0_u32;
+          StorageDead(_1);
           return;
       }
   }
diff --git a/tests/mir-opt/gvn_uninhabited.f.GVN.panic-unwind.diff b/tests/mir-opt/gvn_uninhabited.f.GVN.panic-unwind.diff
index 881b629803a..a3e4796d088 100644
--- a/tests/mir-opt/gvn_uninhabited.f.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn_uninhabited.f.GVN.panic-unwind.diff
@@ -17,15 +17,16 @@
           StorageLive(_3);
           _5 = const f::promoted[0];
           _3 = &(*_5);
-          _2 = copy ((*_3).1: E);
--         StorageLive(_1);
-+         nop;
-          _1 = copy ((_2 as A).1: u32);
+-         _2 = copy ((*_3).1: E);
++         _2 = const Scalar(0x00000000): E;
+          StorageLive(_1);
+-         _1 = copy ((_2 as A).1: u32);
++         _1 = const 0_u32;
           StorageDead(_3);
           StorageDead(_2);
-          _0 = copy _1;
--         StorageDead(_1);
-+         nop;
+-         _0 = copy _1;
++         _0 = const 0_u32;
+          StorageDead(_1);
           return;
       }
   }
diff --git a/tests/mir-opt/pre-codegen/clone_as_copy.rs b/tests/mir-opt/pre-codegen/clone_as_copy.rs
index ae4661e93fd..f5ff1854d38 100644
--- a/tests/mir-opt/pre-codegen/clone_as_copy.rs
+++ b/tests/mir-opt/pre-codegen/clone_as_copy.rs
@@ -1,5 +1,3 @@
-//@ compile-flags: -Zunsound-mir-opts
-// FIXME: see <https://github.com/rust-lang/rust/issues/132353>
 //@ compile-flags: -Cdebuginfo=full
 
 // Check if we have transformed the nested clone to the copy in the complete pipeline.
diff --git a/tests/mir-opt/pre-codegen/deref_nested_borrows.rs b/tests/mir-opt/pre-codegen/deref_nested_borrows.rs
index 4f70ec36bc9..738cd981ae6 100644
--- a/tests/mir-opt/pre-codegen/deref_nested_borrows.rs
+++ b/tests/mir-opt/pre-codegen/deref_nested_borrows.rs
@@ -1,4 +1,3 @@
-//! Regression test for <https://github.com/rust-lang/rust/issues/130853>
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 fn src(x: &&u8) -> bool {
diff --git a/tests/mir-opt/pre-codegen/no_inlined_clone.{impl#0}-clone.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/no_inlined_clone.{impl#0}-clone.PreCodegen.after.mir
index 62a9cd9131f..9020cf1ef37 100644
--- a/tests/mir-opt/pre-codegen/no_inlined_clone.{impl#0}-clone.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/no_inlined_clone.{impl#0}-clone.PreCodegen.after.mir
@@ -3,13 +3,9 @@
 fn <impl at $DIR/no_inlined_clone.rs:9:10: 9:15>::clone(_1: &Foo) -> Foo {
     debug self => _1;
     let mut _0: Foo;
-    let mut _2: i32;
 
     bb0: {
-        StorageLive(_2);
-        _2 = copy ((*_1).0: i32);
-        _0 = Foo { a: move _2 };
-        StorageDead(_2);
+        _0 = copy (*_1);
         return;
     }
 }
diff --git a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
index 5a269717f82..cbdd194afd3 100644
--- a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
@@ -4,70 +4,65 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2
     let mut _0: bool;
     let mut _3: &(usize, usize, usize, usize);
     let _4: &usize;
-    let mut _5: &(usize, usize, usize, usize);
+    let _5: &usize;
     let _6: &usize;
-    let mut _7: &(usize, usize, usize, usize);
-    let _8: &usize;
-    let mut _9: &(usize, usize, usize, usize);
-    let _10: &usize;
-    let mut _11: &&usize;
-    let _12: &usize;
-    let mut _13: &&usize;
-    let mut _16: bool;
-    let mut _17: &&usize;
-    let _18: &usize;
-    let mut _19: &&usize;
-    let mut _22: bool;
-    let mut _23: &&usize;
-    let _24: &usize;
-    let mut _25: &&usize;
-    let mut _28: bool;
-    let mut _29: &&usize;
-    let _30: &usize;
-    let mut _31: &&usize;
+    let _7: &usize;
+    let mut _8: &&usize;
+    let _9: &usize;
+    let mut _10: &&usize;
+    let mut _13: bool;
+    let mut _14: &&usize;
+    let _15: &usize;
+    let mut _16: &&usize;
+    let mut _19: bool;
+    let mut _20: &&usize;
+    let _21: &usize;
+    let mut _22: &&usize;
+    let mut _23: bool;
+    let mut _24: &&usize;
+    let _25: &usize;
+    let mut _26: &&usize;
     scope 1 {
         debug a => _4;
-        debug b => _6;
-        debug c => _8;
-        debug d => _10;
+        debug b => _5;
+        debug c => _6;
+        debug d => _7;
         scope 2 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
-            debug self => _11;
-            debug other => _13;
+            debug self => _8;
+            debug other => _10;
             scope 3 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
                 debug self => _4;
-                debug other => _8;
-                let mut _14: usize;
-                let mut _15: usize;
+                debug other => _6;
+                let mut _11: usize;
+                let mut _12: usize;
             }
         }
         scope 4 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
-            debug self => _17;
-            debug other => _19;
+            debug self => _14;
+            debug other => _16;
             scope 5 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
-                debug self => _10;
-                debug other => _6;
-                let mut _20: usize;
-                let mut _21: usize;
+                debug self => _7;
+                debug other => _5;
+                let mut _17: usize;
+                let mut _18: usize;
             }
         }
         scope 6 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
-            debug self => _23;
-            debug other => _25;
+            debug self => _20;
+            debug other => _22;
             scope 7 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
-                debug self => _8;
+                debug self => _6;
                 debug other => _4;
-                let mut _26: usize;
-                let mut _27: usize;
             }
         }
         scope 8 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
-            debug self => _29;
-            debug other => _31;
+            debug self => _24;
+            debug other => _26;
             scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
-                debug self => _6;
-                debug other => _10;
-                let mut _32: usize;
-                let mut _33: usize;
+                debug self => _5;
+                debug other => _7;
+                let mut _27: usize;
+                let mut _28: usize;
             }
         }
     }
@@ -75,129 +70,116 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2
     bb0: {
         _3 = copy (*_2);
         _4 = &((*_3).0: usize);
-        _5 = copy (*_2);
-        _6 = &((*_5).1: usize);
-        _7 = copy (*_2);
-        _8 = &((*_7).2: usize);
-        _9 = copy (*_2);
-        _10 = &((*_9).3: usize);
-        StorageLive(_16);
-        StorageLive(_11);
-        _11 = &_4;
+        _5 = &((*_3).1: usize);
+        _6 = &((*_3).2: usize);
+        _7 = &((*_3).3: usize);
         StorageLive(_13);
-        StorageLive(_12);
-        _12 = copy _8;
-        _13 = &_12;
-        StorageLive(_14);
-        _14 = copy ((*_3).0: usize);
-        StorageLive(_15);
-        _15 = copy ((*_7).2: usize);
-        _16 = Le(move _14, move _15);
-        StorageDead(_15);
-        StorageDead(_14);
-        switchInt(move _16) -> [0: bb1, otherwise: bb2];
+        StorageLive(_8);
+        _8 = &_4;
+        StorageLive(_10);
+        StorageLive(_9);
+        _9 = copy _6;
+        _10 = &_9;
+        _11 = copy ((*_3).0: usize);
+        _12 = copy ((*_3).2: usize);
+        _13 = Le(copy _11, copy _12);
+        switchInt(move _13) -> [0: bb1, otherwise: bb2];
     }
 
     bb1: {
-        StorageDead(_12);
-        StorageDead(_13);
-        StorageDead(_11);
+        StorageDead(_9);
+        StorageDead(_10);
+        StorageDead(_8);
         goto -> bb4;
     }
 
     bb2: {
-        StorageDead(_12);
-        StorageDead(_13);
-        StorageDead(_11);
-        StorageLive(_22);
-        StorageLive(_17);
-        _17 = &_10;
+        StorageDead(_9);
+        StorageDead(_10);
+        StorageDead(_8);
         StorageLive(_19);
+        StorageLive(_14);
+        _14 = &_7;
+        StorageLive(_16);
+        StorageLive(_15);
+        _15 = copy _5;
+        _16 = &_15;
+        StorageLive(_17);
+        _17 = copy ((*_3).3: usize);
         StorageLive(_18);
-        _18 = copy _6;
-        _19 = &_18;
-        StorageLive(_20);
-        _20 = copy ((*_9).3: usize);
-        StorageLive(_21);
-        _21 = copy ((*_5).1: usize);
-        _22 = Le(move _20, move _21);
-        StorageDead(_21);
-        StorageDead(_20);
-        switchInt(move _22) -> [0: bb3, otherwise: bb8];
+        _18 = copy ((*_3).1: usize);
+        _19 = Le(move _17, move _18);
+        StorageDead(_18);
+        StorageDead(_17);
+        switchInt(move _19) -> [0: bb3, otherwise: bb8];
     }
 
     bb3: {
-        StorageDead(_18);
-        StorageDead(_19);
-        StorageDead(_17);
+        StorageDead(_15);
+        StorageDead(_16);
+        StorageDead(_14);
         goto -> bb4;
     }
 
     bb4: {
-        StorageLive(_28);
         StorageLive(_23);
-        _23 = &_8;
-        StorageLive(_25);
-        StorageLive(_24);
-        _24 = copy _4;
-        _25 = &_24;
-        StorageLive(_26);
-        _26 = copy ((*_7).2: usize);
-        StorageLive(_27);
-        _27 = copy ((*_3).0: usize);
-        _28 = Le(move _26, move _27);
-        StorageDead(_27);
-        StorageDead(_26);
-        switchInt(move _28) -> [0: bb5, otherwise: bb6];
+        StorageLive(_20);
+        _20 = &_6;
+        StorageLive(_22);
+        StorageLive(_21);
+        _21 = copy _4;
+        _22 = &_21;
+        _23 = Le(copy _12, copy _11);
+        switchInt(move _23) -> [0: bb5, otherwise: bb6];
     }
 
     bb5: {
-        StorageDead(_24);
-        StorageDead(_25);
-        StorageDead(_23);
+        StorageDead(_21);
+        StorageDead(_22);
+        StorageDead(_20);
         _0 = const false;
         goto -> bb7;
     }
 
     bb6: {
-        StorageDead(_24);
+        StorageDead(_21);
+        StorageDead(_22);
+        StorageDead(_20);
+        StorageLive(_24);
+        _24 = &_5;
+        StorageLive(_26);
+        StorageLive(_25);
+        _25 = copy _7;
+        _26 = &_25;
+        StorageLive(_27);
+        _27 = copy ((*_3).1: usize);
+        StorageLive(_28);
+        _28 = copy ((*_3).3: usize);
+        _0 = Le(move _27, move _28);
+        StorageDead(_28);
+        StorageDead(_27);
         StorageDead(_25);
-        StorageDead(_23);
-        StorageLive(_29);
-        _29 = &_6;
-        StorageLive(_31);
-        StorageLive(_30);
-        _30 = copy _10;
-        _31 = &_30;
-        StorageLive(_32);
-        _32 = copy ((*_5).1: usize);
-        StorageLive(_33);
-        _33 = copy ((*_9).3: usize);
-        _0 = Le(move _32, move _33);
-        StorageDead(_33);
-        StorageDead(_32);
-        StorageDead(_30);
-        StorageDead(_31);
-        StorageDead(_29);
+        StorageDead(_26);
+        StorageDead(_24);
         goto -> bb7;
     }
 
     bb7: {
-        StorageDead(_28);
+        StorageDead(_23);
         goto -> bb9;
     }
 
     bb8: {
-        StorageDead(_18);
-        StorageDead(_19);
-        StorageDead(_17);
+        StorageDead(_15);
+        StorageDead(_16);
+        StorageDead(_14);
         _0 = const true;
         goto -> bb9;
     }
 
     bb9: {
-        StorageDead(_22);
-        StorageDead(_16);
+        StorageDead(_19);
+        StorageDead(_13);
         return;
     }
 }
diff --git a/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir
index f93f7264dec..bc7a31d5219 100644
--- a/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir
@@ -4,46 +4,40 @@ fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:11:25: 11:41},
     let mut _0: bool;
     let mut _3: &(usize, usize, usize, usize);
     let _4: usize;
-    let mut _5: &(usize, usize, usize, usize);
+    let _5: usize;
     let _6: usize;
-    let mut _7: &(usize, usize, usize, usize);
-    let _8: usize;
-    let mut _9: &(usize, usize, usize, usize);
-    let _10: usize;
-    let mut _11: bool;
-    let mut _12: bool;
-    let mut _13: bool;
+    let _7: usize;
+    let mut _8: bool;
+    let mut _9: bool;
+    let mut _10: bool;
     scope 1 {
         debug a => _4;
-        debug b => _6;
-        debug c => _8;
-        debug d => _10;
+        debug b => _5;
+        debug c => _6;
+        debug d => _7;
     }
 
     bb0: {
         _3 = copy (*_2);
         _4 = copy ((*_3).0: usize);
-        _5 = copy (*_2);
-        _6 = copy ((*_5).1: usize);
-        _7 = copy (*_2);
-        _8 = copy ((*_7).2: usize);
-        _9 = copy (*_2);
-        _10 = copy ((*_9).3: usize);
-        StorageLive(_11);
-        _11 = Le(copy _4, copy _8);
-        switchInt(move _11) -> [0: bb2, otherwise: bb1];
+        _5 = copy ((*_3).1: usize);
+        _6 = copy ((*_3).2: usize);
+        _7 = copy ((*_3).3: usize);
+        StorageLive(_8);
+        _8 = Le(copy _4, copy _6);
+        switchInt(move _8) -> [0: bb2, otherwise: bb1];
     }
 
     bb1: {
-        StorageLive(_12);
-        _12 = Le(copy _10, copy _6);
-        switchInt(move _12) -> [0: bb2, otherwise: bb6];
+        StorageLive(_9);
+        _9 = Le(copy _7, copy _5);
+        switchInt(move _9) -> [0: bb2, otherwise: bb6];
     }
 
     bb2: {
-        StorageLive(_13);
-        _13 = Le(copy _8, copy _4);
-        switchInt(move _13) -> [0: bb3, otherwise: bb4];
+        StorageLive(_10);
+        _10 = Le(copy _6, copy _4);
+        switchInt(move _10) -> [0: bb3, otherwise: bb4];
     }
 
     bb3: {
@@ -52,12 +46,12 @@ fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:11:25: 11:41},
     }
 
     bb4: {
-        _0 = Le(copy _6, copy _10);
+        _0 = Le(copy _5, copy _7);
         goto -> bb5;
     }
 
     bb5: {
-        StorageDead(_13);
+        StorageDead(_10);
         goto -> bb7;
     }
 
@@ -67,8 +61,8 @@ fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:11:25: 11:41},
     }
 
     bb7: {
-        StorageDead(_12);
-        StorageDead(_11);
+        StorageDead(_9);
+        StorageDead(_8);
         return;
     }
 }
diff --git a/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir
index 7ef532d222d..c75edde711e 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir
@@ -22,74 +22,74 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
             debug i => _33;
             debug x => _34;
         }
-        scope 19 (inlined <Enumerate<std::slice::Iter<'_, T>> as Iterator>::next) {
+        scope 18 (inlined <Enumerate<std::slice::Iter<'_, T>> as Iterator>::next) {
             let mut _27: std::option::Option<&T>;
             let mut _30: (usize, bool);
             let mut _31: (usize, &T);
-            scope 20 {
+            scope 19 {
                 let _29: usize;
-                scope 25 {
+                scope 24 {
                 }
             }
-            scope 21 {
-                scope 22 {
-                    scope 28 (inlined <Option<(usize, &T)> as FromResidual<Option<Infallible>>>::from_residual) {
+            scope 20 {
+                scope 21 {
+                    scope 27 (inlined <Option<(usize, &T)> as FromResidual<Option<Infallible>>>::from_residual) {
                     }
                 }
             }
-            scope 23 {
-                scope 24 {
+            scope 22 {
+                scope 23 {
                 }
             }
-            scope 26 (inlined <Option<&T> as Try>::branch) {
+            scope 25 (inlined <Option<&T> as Try>::branch) {
                 let _28: &T;
-                scope 27 {
+                scope 26 {
                 }
             }
-            scope 29 (inlined <std::slice::Iter<'_, T> as Iterator>::next) {
+            scope 28 (inlined <std::slice::Iter<'_, T> as Iterator>::next) {
                 let _14: std::ptr::NonNull<T>;
                 let _16: std::ptr::NonNull<T>;
                 let mut _19: bool;
                 let mut _22: std::ptr::NonNull<T>;
                 let mut _24: usize;
                 let _26: &T;
-                scope 30 {
+                scope 29 {
                     let _15: *const T;
-                    scope 31 {
+                    scope 30 {
                         let _23: usize;
-                        scope 32 {
-                            scope 35 (inlined core::num::<impl usize>::unchecked_sub) {
-                                scope 36 (inlined core::ub_checks::check_language_ub) {
-                                    scope 37 (inlined core::ub_checks::check_language_ub::runtime) {
+                        scope 31 {
+                            scope 34 (inlined core::num::<impl usize>::unchecked_sub) {
+                                scope 35 (inlined core::ub_checks::check_language_ub) {
+                                    scope 36 (inlined core::ub_checks::check_language_ub::runtime) {
                                     }
                                 }
                             }
-                            scope 38 (inlined without_provenance_mut::<T>) {
+                            scope 37 (inlined without_provenance_mut::<T>) {
                             }
                         }
-                        scope 33 (inlined std::ptr::const_ptr::<impl *const T>::addr) {
-                            scope 34 (inlined std::ptr::const_ptr::<impl *const T>::cast::<()>) {
+                        scope 32 (inlined std::ptr::const_ptr::<impl *const T>::addr) {
+                            scope 33 (inlined std::ptr::const_ptr::<impl *const T>::cast::<()>) {
                             }
                         }
-                        scope 39 (inlined <NonNull<T> as PartialEq>::eq) {
+                        scope 38 (inlined <NonNull<T> as PartialEq>::eq) {
                             let mut _17: *mut T;
                             let mut _18: *mut T;
-                            scope 40 (inlined NonNull::<T>::as_ptr) {
+                            scope 39 (inlined NonNull::<T>::as_ptr) {
                             }
-                            scope 41 (inlined NonNull::<T>::as_ptr) {
+                            scope 40 (inlined NonNull::<T>::as_ptr) {
                             }
                         }
-                        scope 42 (inlined NonNull::<T>::add) {
+                        scope 41 (inlined NonNull::<T>::add) {
                             let mut _20: *const T;
                             let mut _21: *const T;
-                            scope 43 (inlined NonNull::<T>::as_ptr) {
+                            scope 42 (inlined NonNull::<T>::as_ptr) {
                             }
                         }
-                        scope 44 (inlined NonNull::<T>::as_ref::<'_>) {
+                        scope 43 (inlined NonNull::<T>::as_ref::<'_>) {
                             let _25: *const T;
-                            scope 45 (inlined NonNull::<T>::as_ptr) {
+                            scope 44 (inlined NonNull::<T>::as_ptr) {
                             }
-                            scope 46 (inlined std::ptr::mut_ptr::<impl *mut T>::cast_const) {
+                            scope 45 (inlined std::ptr::mut_ptr::<impl *mut T>::cast_const) {
                             }
                         }
                     }
@@ -109,33 +109,31 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
                     let _9: *const T;
                     scope 7 {
                     }
-                    scope 12 (inlined std::ptr::without_provenance::<T>) {
-                        scope 13 (inlined without_provenance_mut::<T>) {
+                    scope 11 (inlined std::ptr::without_provenance::<T>) {
+                        scope 12 (inlined without_provenance_mut::<T>) {
                         }
                     }
-                    scope 14 (inlined NonNull::<T>::as_ptr) {
+                    scope 13 (inlined NonNull::<T>::as_ptr) {
                     }
-                    scope 15 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
+                    scope 14 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
                     }
                 }
-                scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
-                    scope 9 (inlined NonNull::<[T]>::from_ref) {
-                        let mut _4: *const [T];
-                    }
+                scope 8 (inlined NonNull::<[T]>::from_ref) {
+                    let mut _4: *const [T];
                 }
-                scope 10 (inlined NonNull::<[T]>::cast::<T>) {
+                scope 9 (inlined NonNull::<[T]>::cast::<T>) {
                     let mut _5: *const T;
-                    scope 11 (inlined NonNull::<[T]>::as_ptr) {
+                    scope 10 (inlined NonNull::<[T]>::as_ptr) {
                     }
                 }
             }
         }
     }
-    scope 16 (inlined <std::slice::Iter<'_, T> as Iterator>::enumerate) {
-        scope 17 (inlined Enumerate::<std::slice::Iter<'_, T>>::new) {
+    scope 15 (inlined <std::slice::Iter<'_, T> as Iterator>::enumerate) {
+        scope 16 (inlined Enumerate::<std::slice::Iter<'_, T>>::new) {
         }
     }
-    scope 18 (inlined <Enumerate<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
+    scope 17 (inlined <Enumerate<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
     }
 
     bb0: {
diff --git a/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-unwind.mir
index 33dbf04d028..bc72181b77c 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-unwind.mir
@@ -34,33 +34,31 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
                     let _9: *const T;
                     scope 7 {
                     }
-                    scope 12 (inlined std::ptr::without_provenance::<T>) {
-                        scope 13 (inlined without_provenance_mut::<T>) {
+                    scope 11 (inlined std::ptr::without_provenance::<T>) {
+                        scope 12 (inlined without_provenance_mut::<T>) {
                         }
                     }
-                    scope 14 (inlined NonNull::<T>::as_ptr) {
+                    scope 13 (inlined NonNull::<T>::as_ptr) {
                     }
-                    scope 15 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
+                    scope 14 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
                     }
                 }
-                scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
-                    scope 9 (inlined NonNull::<[T]>::from_ref) {
-                        let mut _4: *const [T];
-                    }
+                scope 8 (inlined NonNull::<[T]>::from_ref) {
+                    let mut _4: *const [T];
                 }
-                scope 10 (inlined NonNull::<[T]>::cast::<T>) {
+                scope 9 (inlined NonNull::<[T]>::cast::<T>) {
                     let mut _5: *const T;
-                    scope 11 (inlined NonNull::<[T]>::as_ptr) {
+                    scope 10 (inlined NonNull::<[T]>::as_ptr) {
                     }
                 }
             }
         }
     }
-    scope 16 (inlined <std::slice::Iter<'_, T> as Iterator>::enumerate) {
-        scope 17 (inlined Enumerate::<std::slice::Iter<'_, T>>::new) {
+    scope 15 (inlined <std::slice::Iter<'_, T> as Iterator>::enumerate) {
+        scope 16 (inlined Enumerate::<std::slice::Iter<'_, T>>::new) {
         }
     }
-    scope 18 (inlined <Enumerate<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
+    scope 17 (inlined <Enumerate<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
     }
 
     bb0: {
diff --git a/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-abort.mir
index 62787f3447c..38c509d0b53 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-abort.mir
@@ -18,50 +18,50 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
         scope 2 {
             debug x => _27;
         }
-        scope 17 (inlined <std::slice::Iter<'_, T> as Iterator>::next) {
+        scope 16 (inlined <std::slice::Iter<'_, T> as Iterator>::next) {
             let _13: std::ptr::NonNull<T>;
             let _15: std::ptr::NonNull<T>;
             let mut _18: bool;
             let mut _21: std::ptr::NonNull<T>;
             let mut _23: usize;
             let _25: &T;
-            scope 18 {
+            scope 17 {
                 let _14: *const T;
-                scope 19 {
+                scope 18 {
                     let _22: usize;
-                    scope 20 {
-                        scope 23 (inlined core::num::<impl usize>::unchecked_sub) {
-                            scope 24 (inlined core::ub_checks::check_language_ub) {
-                                scope 25 (inlined core::ub_checks::check_language_ub::runtime) {
+                    scope 19 {
+                        scope 22 (inlined core::num::<impl usize>::unchecked_sub) {
+                            scope 23 (inlined core::ub_checks::check_language_ub) {
+                                scope 24 (inlined core::ub_checks::check_language_ub::runtime) {
                                 }
                             }
                         }
-                        scope 26 (inlined without_provenance_mut::<T>) {
+                        scope 25 (inlined without_provenance_mut::<T>) {
                         }
                     }
-                    scope 21 (inlined std::ptr::const_ptr::<impl *const T>::addr) {
-                        scope 22 (inlined std::ptr::const_ptr::<impl *const T>::cast::<()>) {
+                    scope 20 (inlined std::ptr::const_ptr::<impl *const T>::addr) {
+                        scope 21 (inlined std::ptr::const_ptr::<impl *const T>::cast::<()>) {
                         }
                     }
-                    scope 27 (inlined <NonNull<T> as PartialEq>::eq) {
+                    scope 26 (inlined <NonNull<T> as PartialEq>::eq) {
                         let mut _16: *mut T;
                         let mut _17: *mut T;
-                        scope 28 (inlined NonNull::<T>::as_ptr) {
+                        scope 27 (inlined NonNull::<T>::as_ptr) {
                         }
-                        scope 29 (inlined NonNull::<T>::as_ptr) {
+                        scope 28 (inlined NonNull::<T>::as_ptr) {
                         }
                     }
-                    scope 30 (inlined NonNull::<T>::add) {
+                    scope 29 (inlined NonNull::<T>::add) {
                         let mut _19: *const T;
                         let mut _20: *const T;
-                        scope 31 (inlined NonNull::<T>::as_ptr) {
+                        scope 30 (inlined NonNull::<T>::as_ptr) {
                         }
                     }
-                    scope 32 (inlined NonNull::<T>::as_ref::<'_>) {
+                    scope 31 (inlined NonNull::<T>::as_ref::<'_>) {
                         let _24: *const T;
-                        scope 33 (inlined NonNull::<T>::as_ptr) {
+                        scope 32 (inlined NonNull::<T>::as_ptr) {
                         }
-                        scope 34 (inlined std::ptr::mut_ptr::<impl *mut T>::cast_const) {
+                        scope 33 (inlined std::ptr::mut_ptr::<impl *mut T>::cast_const) {
                         }
                     }
                 }
@@ -80,29 +80,27 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
                     let _9: *const T;
                     scope 7 {
                     }
-                    scope 12 (inlined std::ptr::without_provenance::<T>) {
-                        scope 13 (inlined without_provenance_mut::<T>) {
+                    scope 11 (inlined std::ptr::without_provenance::<T>) {
+                        scope 12 (inlined without_provenance_mut::<T>) {
                         }
                     }
-                    scope 14 (inlined NonNull::<T>::as_ptr) {
+                    scope 13 (inlined NonNull::<T>::as_ptr) {
                     }
-                    scope 15 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
+                    scope 14 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
                     }
                 }
-                scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
-                    scope 9 (inlined NonNull::<[T]>::from_ref) {
-                        let mut _4: *const [T];
-                    }
+                scope 8 (inlined NonNull::<[T]>::from_ref) {
+                    let mut _4: *const [T];
                 }
-                scope 10 (inlined NonNull::<[T]>::cast::<T>) {
+                scope 9 (inlined NonNull::<[T]>::cast::<T>) {
                     let mut _5: *const T;
-                    scope 11 (inlined NonNull::<[T]>::as_ptr) {
+                    scope 10 (inlined NonNull::<[T]>::as_ptr) {
                     }
                 }
             }
         }
     }
-    scope 16 (inlined <std::slice::Iter<'_, T> as IntoIterator>::into_iter) {
+    scope 15 (inlined <std::slice::Iter<'_, T> as IntoIterator>::into_iter) {
     }
 
     bb0: {
diff --git a/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-unwind.mir
index e5478e27918..158cc284b1a 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-unwind.mir
@@ -18,50 +18,50 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
         scope 2 {
             debug x => _27;
         }
-        scope 17 (inlined <std::slice::Iter<'_, T> as Iterator>::next) {
+        scope 16 (inlined <std::slice::Iter<'_, T> as Iterator>::next) {
             let _13: std::ptr::NonNull<T>;
             let _15: std::ptr::NonNull<T>;
             let mut _18: bool;
             let mut _21: std::ptr::NonNull<T>;
             let mut _23: usize;
             let _25: &T;
-            scope 18 {
+            scope 17 {
                 let _14: *const T;
-                scope 19 {
+                scope 18 {
                     let _22: usize;
-                    scope 20 {
-                        scope 23 (inlined core::num::<impl usize>::unchecked_sub) {
-                            scope 24 (inlined core::ub_checks::check_language_ub) {
-                                scope 25 (inlined core::ub_checks::check_language_ub::runtime) {
+                    scope 19 {
+                        scope 22 (inlined core::num::<impl usize>::unchecked_sub) {
+                            scope 23 (inlined core::ub_checks::check_language_ub) {
+                                scope 24 (inlined core::ub_checks::check_language_ub::runtime) {
                                 }
                             }
                         }
-                        scope 26 (inlined without_provenance_mut::<T>) {
+                        scope 25 (inlined without_provenance_mut::<T>) {
                         }
                     }
-                    scope 21 (inlined std::ptr::const_ptr::<impl *const T>::addr) {
-                        scope 22 (inlined std::ptr::const_ptr::<impl *const T>::cast::<()>) {
+                    scope 20 (inlined std::ptr::const_ptr::<impl *const T>::addr) {
+                        scope 21 (inlined std::ptr::const_ptr::<impl *const T>::cast::<()>) {
                         }
                     }
-                    scope 27 (inlined <NonNull<T> as PartialEq>::eq) {
+                    scope 26 (inlined <NonNull<T> as PartialEq>::eq) {
                         let mut _16: *mut T;
                         let mut _17: *mut T;
-                        scope 28 (inlined NonNull::<T>::as_ptr) {
+                        scope 27 (inlined NonNull::<T>::as_ptr) {
                         }
-                        scope 29 (inlined NonNull::<T>::as_ptr) {
+                        scope 28 (inlined NonNull::<T>::as_ptr) {
                         }
                     }
-                    scope 30 (inlined NonNull::<T>::add) {
+                    scope 29 (inlined NonNull::<T>::add) {
                         let mut _19: *const T;
                         let mut _20: *const T;
-                        scope 31 (inlined NonNull::<T>::as_ptr) {
+                        scope 30 (inlined NonNull::<T>::as_ptr) {
                         }
                     }
-                    scope 32 (inlined NonNull::<T>::as_ref::<'_>) {
+                    scope 31 (inlined NonNull::<T>::as_ref::<'_>) {
                         let _24: *const T;
-                        scope 33 (inlined NonNull::<T>::as_ptr) {
+                        scope 32 (inlined NonNull::<T>::as_ptr) {
                         }
-                        scope 34 (inlined std::ptr::mut_ptr::<impl *mut T>::cast_const) {
+                        scope 33 (inlined std::ptr::mut_ptr::<impl *mut T>::cast_const) {
                         }
                     }
                 }
@@ -80,29 +80,27 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
                     let _9: *const T;
                     scope 7 {
                     }
-                    scope 12 (inlined std::ptr::without_provenance::<T>) {
-                        scope 13 (inlined without_provenance_mut::<T>) {
+                    scope 11 (inlined std::ptr::without_provenance::<T>) {
+                        scope 12 (inlined without_provenance_mut::<T>) {
                         }
                     }
-                    scope 14 (inlined NonNull::<T>::as_ptr) {
+                    scope 13 (inlined NonNull::<T>::as_ptr) {
                     }
-                    scope 15 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
+                    scope 14 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
                     }
                 }
-                scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
-                    scope 9 (inlined NonNull::<[T]>::from_ref) {
-                        let mut _4: *const [T];
-                    }
+                scope 8 (inlined NonNull::<[T]>::from_ref) {
+                    let mut _4: *const [T];
                 }
-                scope 10 (inlined NonNull::<[T]>::cast::<T>) {
+                scope 9 (inlined NonNull::<[T]>::cast::<T>) {
                     let mut _5: *const T;
-                    scope 11 (inlined NonNull::<[T]>::as_ptr) {
+                    scope 10 (inlined NonNull::<[T]>::as_ptr) {
                     }
                 }
             }
         }
     }
-    scope 16 (inlined <std::slice::Iter<'_, T> as IntoIterator>::into_iter) {
+    scope 15 (inlined <std::slice::Iter<'_, T> as IntoIterator>::into_iter) {
     }
 
     bb0: {
diff --git a/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir
index 4b7ab4516d2..00366762108 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir
@@ -18,7 +18,7 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
         scope 2 {
             debug x => _17;
         }
-        scope 19 (inlined <Rev<std::slice::Iter<'_, T>> as Iterator>::next) {
+        scope 18 (inlined <Rev<std::slice::Iter<'_, T>> as Iterator>::next) {
             let mut _14: &mut std::slice::Iter<'_, T>;
         }
     }
@@ -34,33 +34,31 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
                     let _9: *const T;
                     scope 7 {
                     }
-                    scope 12 (inlined std::ptr::without_provenance::<T>) {
-                        scope 13 (inlined without_provenance_mut::<T>) {
+                    scope 11 (inlined std::ptr::without_provenance::<T>) {
+                        scope 12 (inlined without_provenance_mut::<T>) {
                         }
                     }
-                    scope 14 (inlined NonNull::<T>::as_ptr) {
+                    scope 13 (inlined NonNull::<T>::as_ptr) {
                     }
-                    scope 15 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
+                    scope 14 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
                     }
                 }
-                scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
-                    scope 9 (inlined NonNull::<[T]>::from_ref) {
-                        let mut _4: *const [T];
-                    }
+                scope 8 (inlined NonNull::<[T]>::from_ref) {
+                    let mut _4: *const [T];
                 }
-                scope 10 (inlined NonNull::<[T]>::cast::<T>) {
+                scope 9 (inlined NonNull::<[T]>::cast::<T>) {
                     let mut _5: *const T;
-                    scope 11 (inlined NonNull::<[T]>::as_ptr) {
+                    scope 10 (inlined NonNull::<[T]>::as_ptr) {
                     }
                 }
             }
         }
     }
-    scope 16 (inlined <std::slice::Iter<'_, T> as Iterator>::rev) {
-        scope 17 (inlined Rev::<std::slice::Iter<'_, T>>::new) {
+    scope 15 (inlined <std::slice::Iter<'_, T> as Iterator>::rev) {
+        scope 16 (inlined Rev::<std::slice::Iter<'_, T>>::new) {
         }
     }
-    scope 18 (inlined <Rev<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
+    scope 17 (inlined <Rev<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
     }
 
     bb0: {
diff --git a/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir
index b2c15247cd7..e1d710fb689 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir
@@ -18,7 +18,7 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
         scope 2 {
             debug x => _17;
         }
-        scope 19 (inlined <Rev<std::slice::Iter<'_, T>> as Iterator>::next) {
+        scope 18 (inlined <Rev<std::slice::Iter<'_, T>> as Iterator>::next) {
             let mut _14: &mut std::slice::Iter<'_, T>;
         }
     }
@@ -34,33 +34,31 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
                     let _9: *const T;
                     scope 7 {
                     }
-                    scope 12 (inlined std::ptr::without_provenance::<T>) {
-                        scope 13 (inlined without_provenance_mut::<T>) {
+                    scope 11 (inlined std::ptr::without_provenance::<T>) {
+                        scope 12 (inlined without_provenance_mut::<T>) {
                         }
                     }
-                    scope 14 (inlined NonNull::<T>::as_ptr) {
+                    scope 13 (inlined NonNull::<T>::as_ptr) {
                     }
-                    scope 15 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
+                    scope 14 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
                     }
                 }
-                scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
-                    scope 9 (inlined NonNull::<[T]>::from_ref) {
-                        let mut _4: *const [T];
-                    }
+                scope 8 (inlined NonNull::<[T]>::from_ref) {
+                    let mut _4: *const [T];
                 }
-                scope 10 (inlined NonNull::<[T]>::cast::<T>) {
+                scope 9 (inlined NonNull::<[T]>::cast::<T>) {
                     let mut _5: *const T;
-                    scope 11 (inlined NonNull::<[T]>::as_ptr) {
+                    scope 10 (inlined NonNull::<[T]>::as_ptr) {
                     }
                 }
             }
         }
     }
-    scope 16 (inlined <std::slice::Iter<'_, T> as Iterator>::rev) {
-        scope 17 (inlined Rev::<std::slice::Iter<'_, T>>::new) {
+    scope 15 (inlined <std::slice::Iter<'_, T> as Iterator>::rev) {
+        scope 16 (inlined Rev::<std::slice::Iter<'_, T>>::new) {
         }
     }
-    scope 18 (inlined <Rev<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
+    scope 17 (inlined <Rev<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
     }
 
     bb0: {
diff --git a/tests/mir-opt/pre-codegen/try_identity.old.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/try_identity.old.PreCodegen.after.mir
index ac485f485b1..889e80d26e1 100644
--- a/tests/mir-opt/pre-codegen/try_identity.old.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/try_identity.old.PreCodegen.after.mir
@@ -19,14 +19,14 @@ fn old(_1: Result<T, E>) -> Result<T, E> {
     }
 
     bb1: {
-        _3 = move ((_1 as Ok).0: T);
-        _0 = Result::<T, E>::Ok(copy _3);
+        _3 = copy ((_1 as Ok).0: T);
+        _0 = copy _1;
         goto -> bb3;
     }
 
     bb2: {
-        _4 = move ((_1 as Err).0: E);
-        _0 = Result::<T, E>::Err(copy _4);
+        _4 = copy ((_1 as Err).0: E);
+        _0 = copy _1;
         goto -> bb3;
     }
 
diff --git a/tests/mir-opt/simplify_aggregate_to_copy_miscompile.foo.GVN.diff b/tests/mir-opt/simplify_aggregate_to_copy_miscompile.foo.GVN.diff
index 22d4277ee45..54c11679f0c 100644
--- a/tests/mir-opt/simplify_aggregate_to_copy_miscompile.foo.GVN.diff
+++ b/tests/mir-opt/simplify_aggregate_to_copy_miscompile.foo.GVN.diff
@@ -6,62 +6,52 @@
       let mut _0: std::option::Option<i32>;
       let mut _2: &std::option::Option<i32>;
       let mut _3: &std::option::Option<i32>;
-      let _4: &&mut std::option::Option<i32>;
-      let mut _5: isize;
-      let mut _7: !;
-      let mut _8: std::option::Option<i32>;
-      let mut _9: i32;
-      let mut _10: !;
-      let mut _11: &mut std::option::Option<i32>;
+      let mut _4: isize;
+      let mut _6: !;
+      let mut _7: std::option::Option<i32>;
+      let mut _8: i32;
+      let mut _9: !;
       scope 1 {
-          debug col => _6;
-          let _6: i32;
+          debug col => _5;
+          let _5: i32;
       }
   
       bb0: {
--         StorageLive(_2);
-+         nop;
+          StorageLive(_2);
           StorageLive(_3);
-          StorageLive(_4);
-          _4 = &_1;
--         _11 = deref_copy (*_4);
--         _3 = &(*_11);
-+         _11 = copy _1;
-+         _3 = &(*_1);
-          _2 = get(move _3) -> [return: bb1, unwind unreachable];
+          _3 = &(*_1);
+          _2 = get::<Option<i32>>(move _3) -> [return: bb1, unwind unreachable];
       }
   
       bb1: {
           StorageDead(_3);
-          _5 = discriminant((*_2));
-          switchInt(move _5) -> [1: bb2, otherwise: bb3];
+          _4 = discriminant((*_2));
+          switchInt(move _4) -> [1: bb2, otherwise: bb3];
       }
   
       bb2: {
--         StorageLive(_6);
+-         StorageLive(_5);
 +         nop;
-          _6 = copy (((*_2) as Some).0: i32);
-          StorageLive(_8);
--         _8 = Option::<i32>::None;
--         (*_1) = move _8;
-+         _8 = const Option::<i32>::None;
+          _5 = copy (((*_2) as Some).0: i32);
+          StorageLive(_7);
+-         _7 = Option::<i32>::None;
+-         (*_1) = move _7;
++         _7 = const Option::<i32>::None;
 +         (*_1) = const Option::<i32>::None;
+          StorageDead(_7);
+          StorageLive(_8);
+          _8 = copy _5;
+-         _0 = Option::<i32>::Some(move _8);
++         _0 = Option::<i32>::Some(copy _5);
           StorageDead(_8);
-          StorageLive(_9);
-          _9 = copy _6;
--         _0 = Option::<i32>::Some(move _9);
-+         _0 = copy (*_2);
-          StorageDead(_9);
--         StorageDead(_6);
-+         nop;
-          StorageDead(_4);
--         StorageDead(_2);
+-         StorageDead(_5);
 +         nop;
+          StorageDead(_2);
           return;
       }
   
       bb3: {
-          StorageLive(_10);
+          StorageLive(_9);
           unreachable;
       }
 + }
diff --git a/tests/mir-opt/simplify_aggregate_to_copy_miscompile.rs b/tests/mir-opt/simplify_aggregate_to_copy_miscompile.rs
index 47721b768be..33e31b56977 100644
--- a/tests/mir-opt/simplify_aggregate_to_copy_miscompile.rs
+++ b/tests/mir-opt/simplify_aggregate_to_copy_miscompile.rs
@@ -7,16 +7,23 @@
 //! This test demonstrates the behavior, and should be adjusted or removed when fixing and relanding
 //! the mir-opt.
 #![crate_type = "lib"]
-// skip-filecheck
-//@ compile-flags: -O -Zunsound-mir-opts
 //@ test-mir-pass: GVN
 #![allow(internal_features)]
-#![feature(rustc_attrs, core_intrinsics)]
+#![feature(core_intrinsics, custom_mir, rustc_attrs)]
+
+use std::intrinsics::mir::*;
 
 // EMIT_MIR simplify_aggregate_to_copy_miscompile.foo.GVN.diff
-#[no_mangle]
 fn foo(v: &mut Option<i32>) -> Option<i32> {
-    if let &Some(col) = get(&v) {
+    // CHECK-LABEL: fn foo(
+    // CHECK-SAME: [[v:_.*]]: &mut Option<i32>
+    // CHECK: [[v_alias_1:_.*]] = &(*_1)
+    // CHECK-NEXT: [[v_alias_2:_.*]] = get::<Option<i32>>(move [[v_alias_1]])
+    // CHECK: (*[[v]]) = const Option::<i32>::None;
+    // CHECK-NOT: _0 = copy (*[[v_alias_2]])
+    // CHECK: _0 = Option::<i32>::Some
+    // CHECK-NOT: _0 = copy (*[[v_alias_2]])
+    if let &Some(col) = get(v) {
         *v = None;
         return Some(col);
     } else {
@@ -24,9 +31,31 @@ fn foo(v: &mut Option<i32>) -> Option<i32> {
     }
 }
 
-#[no_mangle]
+pub enum Value {
+    V0(i32),
+    V1(i32),
+}
+
+// EMIT_MIR simplify_aggregate_to_copy_miscompile.set_discriminant.GVN.diff
+#[custom_mir(dialect = "runtime", phase = "initial")]
+fn set_discriminant(v: &mut Value) -> Value {
+    // CHECK-LABEL: fn set_discriminant(
+    mir! {
+        let v_: &Value;
+        {
+            Call(v_ = get(v), ReturnTo(ret), UnwindUnreachable())
+        }
+        ret = {
+            let col: i32 = Field(Variant(*v_, 0), 0);
+            SetDiscriminant(*v, 1);
+            RET = Value::V0(col);
+            Return()
+        }
+    }
+}
+
 #[inline(never)]
 #[rustc_nounwind]
-fn get(v: &Option<i32>) -> &Option<i32> {
+fn get<T>(v: &T) -> &T {
     v
 }
diff --git a/tests/mir-opt/simplify_aggregate_to_copy_miscompile.set_discriminant.GVN.diff b/tests/mir-opt/simplify_aggregate_to_copy_miscompile.set_discriminant.GVN.diff
new file mode 100644
index 00000000000..41f9763d024
--- /dev/null
+++ b/tests/mir-opt/simplify_aggregate_to_copy_miscompile.set_discriminant.GVN.diff
@@ -0,0 +1,20 @@
+- // MIR for `set_discriminant` before GVN
++ // MIR for `set_discriminant` after GVN
+  
+  fn set_discriminant(_1: &mut Value) -> Value {
+      let mut _0: Value;
+      let mut _2: &Value;
+      let mut _3: i32;
+  
+      bb0: {
+          _2 = get::<Value>(copy _1) -> [return: bb1, unwind unreachable];
+      }
+  
+      bb1: {
+          _3 = copy (((*_2) as variant#0).0: i32);
+          discriminant((*_1)) = 1;
+          _0 = Value::V0(copy _3);
+          return;
+      }
+  }
+  
diff --git a/tests/pretty/stmt_expr_attributes.rs b/tests/pretty/stmt_expr_attributes.rs
index 01a503ce7ee..90d2b2f5e1e 100644
--- a/tests/pretty/stmt_expr_attributes.rs
+++ b/tests/pretty/stmt_expr_attributes.rs
@@ -1,6 +1,5 @@
 //@ pp-exact
 
-#![feature(inline_const_pat)]
 #![feature(rustc_attrs)]
 #![feature(stmt_expr_attributes)]
 
@@ -206,9 +205,7 @@ fn _11() {
             let _ = ();
             ()
         };
-    let const {
-                    #![rustc_dummy]
-                } =
+    let _ =
         #[rustc_dummy] const {
                 #![rustc_dummy]
             };
diff --git a/tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs b/tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs
index 024ce975cd6..ba887b3d791 100644
--- a/tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs
+++ b/tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs
@@ -3,10 +3,10 @@
 // Check that the `CURRENT_RUSTC_VERSION` placeholder is correctly replaced by the current
 // `rustc` version and the `since` property in feature stability gating is properly respected.
 
-use run_make_support::{aux_build, rfs, rustc, source_root};
+use run_make_support::{rfs, rustc, source_root};
 
 fn main() {
-    aux_build().input("stable.rs").emit("metadata").run();
+    rustc().crate_type("lib").input("stable.rs").emit("metadata").run();
 
     let output =
         rustc().input("main.rs").emit("metadata").extern_("stable", "libstable.rmeta").run();
diff --git a/tests/run-make/embed-metadata/dep1.rs b/tests/run-make/embed-metadata/dep1.rs
new file mode 100644
index 00000000000..be70c3933e0
--- /dev/null
+++ b/tests/run-make/embed-metadata/dep1.rs
@@ -0,0 +1 @@
+pub fn func_dep1() {}
diff --git a/tests/run-make/embed-metadata/foo.rs b/tests/run-make/embed-metadata/foo.rs
new file mode 100644
index 00000000000..0cc9cede860
--- /dev/null
+++ b/tests/run-make/embed-metadata/foo.rs
@@ -0,0 +1,5 @@
+extern crate dep1;
+
+fn main() {
+    dep1::func_dep1();
+}
diff --git a/tests/run-make/embed-metadata/rmake.rs b/tests/run-make/embed-metadata/rmake.rs
new file mode 100644
index 00000000000..acefb186484
--- /dev/null
+++ b/tests/run-make/embed-metadata/rmake.rs
@@ -0,0 +1,86 @@
+// Tests the -Zembed-metadata compiler flag.
+// Tracking issue: https://github.com/rust-lang/rust/issues/139165
+
+use run_make_support::rfs::{create_dir, remove_file, rename};
+use run_make_support::{Rustc, dynamic_lib_name, path, run_in_tmpdir, rust_lib_name, rustc};
+
+#[derive(Debug, Copy, Clone)]
+enum LibraryKind {
+    Rlib,
+    Dylib,
+}
+
+impl LibraryKind {
+    fn crate_type(&self) -> &str {
+        match self {
+            LibraryKind::Rlib => "rlib",
+            LibraryKind::Dylib => "dylib",
+        }
+    }
+
+    fn add_extern(&self, rustc: &mut Rustc, dep_name: &str, dep_path: &str) {
+        let dep_path = match self {
+            LibraryKind::Dylib => format!("{dep_path}/{}", dynamic_lib_name(dep_name)),
+            LibraryKind::Rlib => format!("{dep_path}/{}", rust_lib_name(dep_name)),
+        };
+        rustc.extern_(dep_name, dep_path);
+    }
+}
+
+fn main() {
+    // The compiler takes different paths based on if --extern is passed or not, so we test all
+    // combinations (`rlib`/`dylib` x `--extern`/`no --extern`).
+    for kind in [LibraryKind::Rlib, LibraryKind::Dylib] {
+        eprintln!("Testing library kind {kind:?}");
+        lookup_rmeta_in_lib_dir(kind);
+        lookup_rmeta_through_extern(kind);
+        lookup_rmeta_missing(kind);
+    }
+}
+
+// Lookup .rmeta file in the same directory as a rlib/dylib with stub metadata.
+fn lookup_rmeta_in_lib_dir(kind: LibraryKind) {
+    run_in_tmpdir(|| {
+        build_dep_rustc(kind).run();
+        rustc().input("foo.rs").run();
+    });
+}
+
+// Lookup .rmeta file when specifying the dependency using --extern.
+fn lookup_rmeta_through_extern(kind: LibraryKind) {
+    run_in_tmpdir(|| {
+        // Generate libdep1.rlib and libdep1.rmeta in deps
+        create_dir("deps");
+        build_dep_rustc(kind).out_dir("deps").run();
+
+        let mut rustc = rustc();
+        kind.add_extern(&mut rustc, "dep1", "deps");
+        rustc.extern_("dep1", path("deps").join("libdep1.rmeta"));
+        rustc.input("foo.rs").run();
+    });
+}
+
+// Check the error message when the .rmeta file is missing.
+fn lookup_rmeta_missing(kind: LibraryKind) {
+    run_in_tmpdir(|| {
+        create_dir("deps");
+        build_dep_rustc(kind).out_dir("deps").run();
+
+        let mut rustc = rustc();
+        kind.add_extern(&mut rustc, "dep1", "deps");
+        rustc.input("foo.rs").run_fail().assert_stderr_contains("only metadata stub found");
+    });
+}
+
+fn build_dep_rustc(kind: LibraryKind) -> Rustc {
+    let mut dep_rustc = rustc();
+    dep_rustc
+        .arg("-Zembed-metadata=no")
+        .crate_type(kind.crate_type())
+        .input("dep1.rs")
+        .emit("metadata,link");
+    if matches!(kind, LibraryKind::Dylib) {
+        dep_rustc.arg("-Cprefer-dynamic");
+    }
+    dep_rustc
+}
diff --git a/tests/run-make/issue-107495-archive-permissions/rmake.rs b/tests/run-make/issue-107495-archive-permissions/rmake.rs
index 228cfb0864e..87d4faaa77a 100644
--- a/tests/run-make/issue-107495-archive-permissions/rmake.rs
+++ b/tests/run-make/issue-107495-archive-permissions/rmake.rs
@@ -4,7 +4,7 @@ use std::path::Path;
 
 #[cfg(unix)]
 use run_make_support::libc;
-use run_make_support::{aux_build, rfs};
+use run_make_support::{rfs, rustc};
 
 fn main() {
     #[cfg(unix)]
@@ -12,7 +12,7 @@ fn main() {
         libc::umask(0o002);
     }
 
-    aux_build().arg("foo.rs").run();
+    rustc().crate_type("lib").arg("foo.rs").run();
     verify(Path::new("libfoo.rlib"));
 }
 
diff --git a/tests/run-make/print-crate-root-lint-levels/lib.rs b/tests/run-make/print-crate-root-lint-levels/lib.rs
new file mode 100644
index 00000000000..dc846f8fd95
--- /dev/null
+++ b/tests/run-make/print-crate-root-lint-levels/lib.rs
@@ -0,0 +1,5 @@
+#![allow(unexpected_cfgs)]
+#![expect(unused_mut)]
+
+#[deny(unknown_lints)]
+mod my_mod {}
diff --git a/tests/run-make/print-crate-root-lint-levels/rmake.rs b/tests/run-make/print-crate-root-lint-levels/rmake.rs
new file mode 100644
index 00000000000..e373c91102d
--- /dev/null
+++ b/tests/run-make/print-crate-root-lint-levels/rmake.rs
@@ -0,0 +1,118 @@
+//! This checks the output of `--print=crate-root-lint-levels`
+
+extern crate run_make_support;
+
+use std::collections::HashSet;
+use std::iter::FromIterator;
+
+use run_make_support::rustc;
+
+struct CrateRootLintLevels {
+    args: &'static [&'static str],
+    contains: Contains,
+}
+
+struct Contains {
+    contains: &'static [&'static str],
+    doesnt_contain: &'static [&'static str],
+}
+
+fn main() {
+    check(CrateRootLintLevels {
+        args: &[],
+        contains: Contains {
+            contains: &[
+                "unexpected_cfgs=allow",
+                "unused_mut=expect",
+                "warnings=warn",
+                "stable_features=warn",
+                "unknown_lints=warn",
+            ],
+            doesnt_contain: &["unexpected_cfgs=warn", "unused_mut=warn"],
+        },
+    });
+    check(CrateRootLintLevels {
+        args: &["-Wunexpected_cfgs"],
+        contains: Contains {
+            contains: &["unexpected_cfgs=allow", "warnings=warn"],
+            doesnt_contain: &["unexpected_cfgs=warn"],
+        },
+    });
+    check(CrateRootLintLevels {
+        args: &["-Dwarnings"],
+        contains: Contains {
+            contains: &[
+                "unexpected_cfgs=allow",
+                "warnings=deny",
+                "stable_features=deny",
+                "unknown_lints=deny",
+            ],
+            doesnt_contain: &["warnings=warn"],
+        },
+    });
+    check(CrateRootLintLevels {
+        args: &["-Dstable_features"],
+        contains: Contains {
+            contains: &["warnings=warn", "stable_features=deny", "unexpected_cfgs=allow"],
+            doesnt_contain: &["warnings=deny"],
+        },
+    });
+    check(CrateRootLintLevels {
+        args: &["-Dwarnings", "--force-warn=stable_features"],
+        contains: Contains {
+            contains: &["warnings=deny", "stable_features=force-warn", "unknown_lints=deny"],
+            doesnt_contain: &["warnings=warn"],
+        },
+    });
+    check(CrateRootLintLevels {
+        args: &["-Dwarnings", "--cap-lints=warn"],
+        contains: Contains {
+            contains: &[
+                "unexpected_cfgs=allow",
+                "warnings=warn",
+                "stable_features=warn",
+                "unknown_lints=warn",
+            ],
+            doesnt_contain: &["warnings=deny"],
+        },
+    });
+}
+
+#[track_caller]
+fn check(CrateRootLintLevels { args, contains }: CrateRootLintLevels) {
+    let output = rustc()
+        .input("lib.rs")
+        .arg("-Zunstable-options")
+        .print("crate-root-lint-levels")
+        .args(args)
+        .run();
+
+    let stdout = output.stdout_utf8();
+
+    let mut found = HashSet::<String>::new();
+
+    for l in stdout.lines() {
+        assert!(l == l.trim());
+        if let Some((left, right)) = l.split_once('=') {
+            assert!(!left.contains("\""));
+            assert!(!right.contains("\""));
+        } else {
+            assert!(l.contains('='));
+        }
+        assert!(found.insert(l.to_string()), "{}", &l);
+    }
+
+    let Contains { contains, doesnt_contain } = contains;
+
+    {
+        let should_found = HashSet::<String>::from_iter(contains.iter().map(|s| s.to_string()));
+        let diff: Vec<_> = should_found.difference(&found).collect();
+        assert!(diff.is_empty(), "should found: {:?}, didn't found {:?}", &should_found, &diff);
+    }
+    {
+        let should_not_find =
+            HashSet::<String>::from_iter(doesnt_contain.iter().map(|s| s.to_string()));
+        let diff: Vec<_> = should_not_find.intersection(&found).collect();
+        assert!(diff.is_empty(), "should not find {:?}, did found {:?}", &should_not_find, &diff);
+    }
+}
diff --git a/tests/run-make/rust-lld-by-default-beta-stable/rmake.rs b/tests/run-make/rust-lld-by-default-beta-stable/rmake.rs
index 263bb9b2e20..9a08991c4b8 100644
--- a/tests/run-make/rust-lld-by-default-beta-stable/rmake.rs
+++ b/tests/run-make/rust-lld-by-default-beta-stable/rmake.rs
@@ -4,24 +4,11 @@
 //@ ignore-nightly
 //@ only-x86_64-unknown-linux-gnu
 
-use std::process::Output;
-
-use run_make_support::regex::Regex;
+use run_make_support::linker::assert_rustc_doesnt_use_lld;
 use run_make_support::rustc;
 
 fn main() {
     // A regular compilation should not use rust-lld by default. We'll check that by asking the
     // linker to display its version number with a link-arg.
-    let output = rustc().arg("-Wlinker-messages").link_arg("-Wl,-v").input("main.rs").run();
-    assert!(
-        !find_lld_version_in_logs(output.stderr_utf8()),
-        "the LLD version string should not be present in the output logs:\n{}",
-        output.stderr_utf8()
-    );
-}
-
-fn find_lld_version_in_logs(stderr: String) -> bool {
-    let lld_version_re =
-        Regex::new(r"^warning: linker stdout: LLD [0-9]+\.[0-9]+\.[0-9]+").unwrap();
-    stderr.lines().any(|line| lld_version_re.is_match(line.trim()))
+    assert_rustc_doesnt_use_lld(rustc().input("main.rs"));
 }
diff --git a/tests/run-make/rust-lld-by-default-nightly/rmake.rs b/tests/run-make/rust-lld-by-default-nightly/rmake.rs
index 7a0a08863dd..3ff1e2770e6 100644
--- a/tests/run-make/rust-lld-by-default-nightly/rmake.rs
+++ b/tests/run-make/rust-lld-by-default-nightly/rmake.rs
@@ -6,35 +6,14 @@
 //@ ignore-stable
 //@ only-x86_64-unknown-linux-gnu
 
-use run_make_support::regex::Regex;
+use run_make_support::linker::{assert_rustc_doesnt_use_lld, assert_rustc_uses_lld};
 use run_make_support::rustc;
 
 fn main() {
     // A regular compilation should use rust-lld by default. We'll check that by asking the linker
     // to display its version number with a link-arg.
-    let output = rustc().arg("-Wlinker-messages").link_arg("-Wl,-v").input("main.rs").run();
-    assert!(
-        find_lld_version_in_logs(output.stderr_utf8()),
-        "the LLD version string should be present in the output logs:\n{}",
-        output.stderr_utf8()
-    );
+    assert_rustc_uses_lld(rustc().input("main.rs"));
 
     // But it can still be disabled by turning the linker feature off.
-    let output = rustc()
-        .arg("-Wlinker-messages")
-        .link_arg("-Wl,-v")
-        .arg("-Zlinker-features=-lld")
-        .input("main.rs")
-        .run();
-    assert!(
-        !find_lld_version_in_logs(output.stderr_utf8()),
-        "the LLD version string should not be present in the output logs:\n{}",
-        output.stderr_utf8()
-    );
-}
-
-fn find_lld_version_in_logs(stderr: String) -> bool {
-    let lld_version_re =
-        Regex::new(r"^warning: linker stdout: LLD [0-9]+\.[0-9]+\.[0-9]+").unwrap();
-    stderr.lines().any(|line| lld_version_re.is_match(line.trim()))
+    assert_rustc_doesnt_use_lld(rustc().arg("-Zlinker-features=-lld").input("main.rs"));
 }
diff --git a/tests/run-make/rust-lld-custom-target/rmake.rs b/tests/run-make/rust-lld-custom-target/rmake.rs
index 993a248ad00..e2b065a10b1 100644
--- a/tests/run-make/rust-lld-custom-target/rmake.rs
+++ b/tests/run-make/rust-lld-custom-target/rmake.rs
@@ -8,43 +8,22 @@
 //@ needs-rust-lld
 //@ only-x86_64-unknown-linux-gnu
 
-use run_make_support::regex::Regex;
+use run_make_support::linker::{assert_rustc_doesnt_use_lld, assert_rustc_uses_lld};
 use run_make_support::rustc;
 
 fn main() {
     // Compile to a custom target spec with rust-lld enabled by default. We'll check that by asking
     // the linker to display its version number with a link-arg.
-    let output = rustc()
-        .crate_type("cdylib")
-        .arg("-Wlinker-messages")
-        .target("custom-target.json")
-        .link_arg("-Wl,-v")
-        .input("lib.rs")
-        .run();
-    assert!(
-        find_lld_version_in_logs(output.stderr_utf8()),
-        "the LLD version string should be present in the output logs:\n{}",
-        output.stderr_utf8()
+    assert_rustc_uses_lld(
+        rustc().crate_type("cdylib").target("custom-target.json").input("lib.rs"),
     );
 
     // But it can also be disabled via linker features.
-    let output = rustc()
-        .crate_type("cdylib")
-        .arg("-Wlinker-messages")
-        .target("custom-target.json")
-        .arg("-Zlinker-features=-lld")
-        .link_arg("-Wl,-v")
-        .input("lib.rs")
-        .run();
-    assert!(
-        !find_lld_version_in_logs(output.stderr_utf8()),
-        "the LLD version string should not be present in the output logs:\n{}",
-        output.stderr_utf8()
+    assert_rustc_doesnt_use_lld(
+        rustc()
+            .crate_type("cdylib")
+            .target("custom-target.json")
+            .arg("-Zlinker-features=-lld")
+            .input("lib.rs"),
     );
 }
-
-fn find_lld_version_in_logs(stderr: String) -> bool {
-    let lld_version_re =
-        Regex::new(r"^warning: linker stdout: LLD [0-9]+\.[0-9]+\.[0-9]+").unwrap();
-    stderr.lines().any(|line| lld_version_re.is_match(line.trim()))
-}
diff --git a/tests/run-make/rust-lld/rmake.rs b/tests/run-make/rust-lld/rmake.rs
index 35f716c24c7..9470f5d0be1 100644
--- a/tests/run-make/rust-lld/rmake.rs
+++ b/tests/run-make/rust-lld/rmake.rs
@@ -4,64 +4,32 @@
 //@ needs-rust-lld
 //@ ignore-s390x lld does not yet support s390x as target
 
-use run_make_support::regex::Regex;
-use run_make_support::{is_msvc, rustc};
+use run_make_support::linker::{assert_rustc_doesnt_use_lld, assert_rustc_uses_lld};
+use run_make_support::rustc;
 
 fn main() {
-    // lld-link is used if msvc, otherwise a gnu-compatible lld is used.
-    let linker_version_flag = if is_msvc() { "--version" } else { "-Wl,-v" };
-
     // Opt-in to lld and the self-contained linker, to link with rust-lld. We'll check that by
     // asking the linker to display its version number with a link-arg.
-    let output = rustc()
-        .arg("-Zlinker-features=+lld")
-        .arg("-Clink-self-contained=+linker")
-        .arg("-Zunstable-options")
-        .arg("-Wlinker-messages")
-        .link_arg(linker_version_flag)
-        .input("main.rs")
-        .run();
-    assert!(
-        find_lld_version_in_logs(output.stderr_utf8()),
-        "the LLD version string should be present in the output logs:\n{}",
-        output.stderr_utf8()
+    assert_rustc_uses_lld(
+        rustc()
+            .arg("-Zlinker-features=+lld")
+            .arg("-Clink-self-contained=+linker")
+            .arg("-Zunstable-options")
+            .input("main.rs"),
     );
 
-    // It should not be used when we explicitly opt-out of lld.
-    let output = rustc()
-        .link_arg(linker_version_flag)
-        .arg("-Zlinker-features=-lld")
-        .arg("-Wlinker-messages")
-        .input("main.rs")
-        .run();
-    assert!(
-        !find_lld_version_in_logs(output.stderr_utf8()),
-        "the LLD version string should not be present in the output logs:\n{}",
-        output.stderr_utf8()
-    );
+    // It should not be used when we explicitly opt out of lld.
+    assert_rustc_doesnt_use_lld(rustc().arg("-Zlinker-features=-lld").input("main.rs"));
 
     // While we're here, also check that the last linker feature flag "wins" when passed multiple
     // times to rustc.
-    let output = rustc()
-        .link_arg(linker_version_flag)
-        .arg("-Clink-self-contained=+linker")
-        .arg("-Zunstable-options")
-        .arg("-Zlinker-features=-lld")
-        .arg("-Zlinker-features=+lld")
-        .arg("-Zlinker-features=-lld,+lld")
-        .arg("-Wlinker-messages")
-        .input("main.rs")
-        .run();
-    assert!(
-        find_lld_version_in_logs(output.stderr_utf8()),
-        "the LLD version string should be present in the output logs:\n{}",
-        output.stderr_utf8()
+    assert_rustc_uses_lld(
+        rustc()
+            .arg("-Clink-self-contained=+linker")
+            .arg("-Zunstable-options")
+            .arg("-Zlinker-features=-lld")
+            .arg("-Zlinker-features=+lld")
+            .arg("-Zlinker-features=-lld,+lld")
+            .input("main.rs"),
     );
 }
-
-fn find_lld_version_in_logs(stderr: String) -> bool {
-    // Strip the `-Wlinker-messages` wrappers prefixing the linker output.
-    let stderr = Regex::new(r"warning: linker std(out|err):").unwrap().replace_all(&stderr, "");
-    let lld_version_re = Regex::new(r"^LLD [0-9]+\.[0-9]+\.[0-9]+").unwrap();
-    stderr.lines().any(|line| lld_version_re.is_match(line.trim()))
-}
diff --git a/tests/run-make/rustc-help/help-v.stdout b/tests/run-make/rustc-help/help-v.stdout
index 98e56735082..f19ca1e9f90 100644
--- a/tests/run-make/rustc-help/help-v.stdout
+++ b/tests/run-make/rustc-help/help-v.stdout
@@ -29,7 +29,7 @@ Options:
         --emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
                         Comma separated list of types of output for the
                         compiler to emit
-        --print [all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models]
+        --print [all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models]
                         Compiler information to print on stdout
     -g                  Equivalent to -C debuginfo=2
     -O                  Equivalent to -C opt-level=3
diff --git a/tests/run-make/rustc-help/help.stdout b/tests/run-make/rustc-help/help.stdout
index 040555f1d04..f7d35296603 100644
--- a/tests/run-make/rustc-help/help.stdout
+++ b/tests/run-make/rustc-help/help.stdout
@@ -29,7 +29,7 @@ Options:
         --emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
                         Comma separated list of types of output for the
                         compiler to emit
-        --print [all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models]
+        --print [all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models]
                         Compiler information to print on stdout
     -g                  Equivalent to -C debuginfo=2
     -O                  Equivalent to -C opt-level=3
diff --git a/tests/rustdoc-json/attrs/automatically_derived.rs b/tests/rustdoc-json/attrs/automatically_derived.rs
new file mode 100644
index 00000000000..4e1ab3d145e
--- /dev/null
+++ b/tests/rustdoc-json/attrs/automatically_derived.rs
@@ -0,0 +1,13 @@
+#[derive(Default)]
+pub struct Derive;
+
+pub struct Manual;
+
+impl Default for Manual {
+    fn default() -> Self {
+        Self
+    }
+}
+
+//@ is '$.index[?(@.inner.impl.for.resolved_path.path == "Derive" && @.inner.impl.trait.path == "Default")].attrs' '["#[automatically_derived]"]'
+//@ is '$.index[?(@.inner.impl.for.resolved_path.path == "Manual" && @.inner.impl.trait.path == "Default")].attrs' '[]'
diff --git a/tests/rustdoc-ui/doctest/edition-2024-error-output.rs b/tests/rustdoc-ui/doctest/edition-2024-error-output.rs
new file mode 100644
index 00000000000..82a85debcd1
--- /dev/null
+++ b/tests/rustdoc-ui/doctest/edition-2024-error-output.rs
@@ -0,0 +1,14 @@
+// This is a regression test for <https://github.com/rust-lang/rust/issues/137970>.
+// The output must look nice and not like a `Debug` display of a `String`.
+
+//@ edition: 2024
+//@ compile-flags: --test
+//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
+//@ normalize-stdout: "panicked at .+rs:" -> "panicked at $$TMP:"
+//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
+//@ rustc-env:RUST_BACKTRACE=0
+//@ failure-status: 101
+
+//! ```rust
+//! assert_eq!(2 + 2, 5);
+//! ```
diff --git a/tests/rustdoc-ui/doctest/edition-2024-error-output.stdout b/tests/rustdoc-ui/doctest/edition-2024-error-output.stdout
new file mode 100644
index 00000000000..8f056a5f703
--- /dev/null
+++ b/tests/rustdoc-ui/doctest/edition-2024-error-output.stdout
@@ -0,0 +1,20 @@
+
+running 1 test
+test $DIR/edition-2024-error-output.rs - (line 12) ... FAILED
+
+failures:
+
+---- $DIR/edition-2024-error-output.rs - (line 12) stdout ----
+
+thread 'main' panicked at $TMP:6:1:
+assertion `left == right` failed
+  left: 4
+ right: 5
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+
+
+failures:
+    $DIR/edition-2024-error-output.rs - (line 12)
+
+test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
+
diff --git a/tests/rustdoc-ui/doctest/no-run-flag-error.rs b/tests/rustdoc-ui/doctest/no-run-flag-error.rs
index 896d7729b8d..3f9016b23db 100644
--- a/tests/rustdoc-ui/doctest/no-run-flag-error.rs
+++ b/tests/rustdoc-ui/doctest/no-run-flag-error.rs
@@ -1,6 +1,7 @@
 // test the behavior of the --no-run flag without the --test flag
 
 //@ compile-flags:-Z unstable-options --no-run --test-args=--test-threads=1
-//@ error-pattern: the `--test` flag must be passed
 
 pub fn f() {}
+
+//~? ERROR the `--test` flag must be passed to enable `--no-run`
diff --git a/tests/rustdoc-ui/invalid-theme-name.rs b/tests/rustdoc-ui/invalid-theme-name.rs
index d632a08ebc8..7f1d191c89d 100644
--- a/tests/rustdoc-ui/invalid-theme-name.rs
+++ b/tests/rustdoc-ui/invalid-theme-name.rs
@@ -1,3 +1,4 @@
 //@ compile-flags:--theme {{src-base}}/invalid-theme-name.rs
-//@ error-pattern: invalid argument
 //@ error-pattern: must have a .css extension
+
+//~? ERROR invalid argument: "$DIR/invalid-theme-name.rs"
diff --git a/tests/rustdoc-ui/issues/issue-91713.rs b/tests/rustdoc-ui/issues/issue-91713.rs
index 9875b5d4ad6..68240726007 100644
--- a/tests/rustdoc-ui/issues/issue-91713.rs
+++ b/tests/rustdoc-ui/issues/issue-91713.rs
@@ -1,3 +1,4 @@
 //@ check-pass
 //@ compile-flags: --passes list
-//@ error-pattern: the `passes` flag no longer functions
+
+//~? WARN the `passes` flag no longer functions
diff --git a/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs
index 6e631061e8a..5e7dc377f5d 100644
--- a/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs
+++ b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs
@@ -1,6 +1,7 @@
-//@ error-pattern: no documentation found
 //@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
 #![deny(rustdoc::missing_crate_level_docs)]
 //^~ NOTE defined here
 
 pub fn foo() {}
+
+//~? ERROR no documentation found for this crate's top-level module
diff --git a/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
index 3a748335ea8..721d3662c93 100644
--- a/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
+++ b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
@@ -3,7 +3,7 @@ error: no documentation found for this crate's top-level module
    = help: The following guide may be of use:
            https://doc.rust-lang.org/$CHANNEL/rustdoc/how-to-write-documentation.html
 note: the lint level is defined here
-  --> $DIR/no-crate-level-doc-lint.rs:3:9
+  --> $DIR/no-crate-level-doc-lint.rs:2:9
    |
 LL | #![deny(rustdoc::missing_crate_level_docs)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/rustdoc-ui/track-diagnostics.rs b/tests/rustdoc-ui/track-diagnostics.rs
index 27781f47e0d..d18d26bf794 100644
--- a/tests/rustdoc-ui/track-diagnostics.rs
+++ b/tests/rustdoc-ui/track-diagnostics.rs
@@ -8,4 +8,4 @@
 struct A;
 struct B;
 
-pub const S: A = B;
+pub const S: A = B; //~ ERROR mismatched types
diff --git a/tests/ui-fulldeps/missing-rustc-driver-error.rs b/tests/ui-fulldeps/missing-rustc-driver-error.rs
index 03ab5ce7b25..d582efada90 100644
--- a/tests/ui-fulldeps/missing-rustc-driver-error.rs
+++ b/tests/ui-fulldeps/missing-rustc-driver-error.rs
@@ -1,6 +1,6 @@
 // Test that we get the following hint when trying to use a compiler crate without rustc_driver.
 //@ error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate
-//@ compile-flags: --emit link
+//@ compile-flags: --emit link --error-format=human
 //@ normalize-stderr: ".*crate .* required.*\n\n" -> ""
 //@ normalize-stderr: "aborting due to [0-9]+" -> "aborting due to NUMBER"
 
diff --git a/tests/ui/abi/fixed_x18.rs b/tests/ui/abi/fixed_x18.rs
index f1ff3e1d534..d373468f68f 100644
--- a/tests/ui/abi/fixed_x18.rs
+++ b/tests/ui/abi/fixed_x18.rs
@@ -23,3 +23,5 @@
 
 #[lang = "sized"]
 trait Sized {}
+
+//~? ERROR the `-Zfixed-x18` flag is not supported on the `
diff --git a/tests/ui/abi/shadow-call-stack-without-fixed-x18.rs b/tests/ui/abi/shadow-call-stack-without-fixed-x18.rs
index d758c903087..74882fb5c55 100644
--- a/tests/ui/abi/shadow-call-stack-without-fixed-x18.rs
+++ b/tests/ui/abi/shadow-call-stack-without-fixed-x18.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: --target aarch64-unknown-none -Zsanitizer=shadow-call-stack
-//@ error-pattern: shadow-call-stack sanitizer is not supported for this target
 //@ dont-check-compiler-stderr
 //@ needs-llvm-components: aarch64
 
@@ -13,3 +12,5 @@ trait Sized {}
 
 #[no_mangle]
 pub fn foo() {}
+
+//~? ERROR shadow-call-stack sanitizer is not supported for this target
diff --git a/tests/ui/allocator/two-allocators2.rs b/tests/ui/allocator/two-allocators2.rs
index b3bb4598c77..6efb297054b 100644
--- a/tests/ui/allocator/two-allocators2.rs
+++ b/tests/ui/allocator/two-allocators2.rs
@@ -1,6 +1,5 @@
 //@ aux-build:system-allocator.rs
 //@ no-prefer-dynamic
-//@ error-pattern: the `#[global_allocator]` in
 
 extern crate system_allocator;
 
@@ -10,3 +9,5 @@ use std::alloc::System;
 static A: System = System;
 
 fn main() {}
+
+//~? ERROR the `#[global_allocator]` in this crate conflicts with global allocator in: system_allocator
diff --git a/tests/ui/allocator/two-allocators3.rs b/tests/ui/allocator/two-allocators3.rs
index 0cb3879666d..3aba96068de 100644
--- a/tests/ui/allocator/two-allocators3.rs
+++ b/tests/ui/allocator/two-allocators3.rs
@@ -1,10 +1,10 @@
 //@ aux-build:system-allocator.rs
 //@ aux-build:system-allocator2.rs
 //@ no-prefer-dynamic
-//@ error-pattern: the `#[global_allocator]` in
-
 
 extern crate system_allocator;
 extern crate system_allocator2;
 
 fn main() {}
+
+//~? ERROR the `#[global_allocator]` in system_allocator conflicts with global allocator in: system_allocator2
diff --git a/tests/ui/amdgpu-require-explicit-cpu.rs b/tests/ui/amdgpu-require-explicit-cpu.rs
index 46778a1094f..d40cb97977d 100644
--- a/tests/ui/amdgpu-require-explicit-cpu.rs
+++ b/tests/ui/amdgpu-require-explicit-cpu.rs
@@ -3,7 +3,6 @@
 //@ compile-flags: --crate-type=cdylib --target=amdgcn-amd-amdhsa
 //@ needs-llvm-components: amdgpu
 //@ needs-rust-lld
-//@[nocpu] error-pattern: target requires explicitly specifying a cpu
 //@[nocpu] build-fail
 //@[cpu] compile-flags: -Ctarget-cpu=gfx900
 //@[cpu] build-pass
@@ -15,3 +14,5 @@
 trait Sized {}
 
 pub fn foo() {}
+
+//[nocpu]~? ERROR target requires explicitly specifying a cpu with `-C target-cpu`
diff --git a/tests/ui/associated-types/issue-36499.rs b/tests/ui/associated-types/issue-36499.rs
index 25f4060fa6f..606918b40b7 100644
--- a/tests/ui/associated-types/issue-36499.rs
+++ b/tests/ui/associated-types/issue-36499.rs
@@ -1,5 +1,5 @@
 //@ error-pattern: aborting due to 1 previous error
 
 fn main() {
-    2 + +2;
+    2 + +2; //~ ERROR leading `+` is not supported
 }
diff --git a/tests/ui/associated-types/issue-59324.stderr b/tests/ui/associated-types/issue-59324.stderr
index f5e696b7ac1..f79afc89d10 100644
--- a/tests/ui/associated-types/issue-59324.stderr
+++ b/tests/ui/associated-types/issue-59324.stderr
@@ -36,11 +36,18 @@ LL | |
 LL | |         &self,
 LL | |     ) -> Self::AssocType;
    | |_________________________^ the trait `Foo` is not implemented for `Bug`
+
+error[E0277]: the trait bound `(): Foo` is not satisfied
+  --> $DIR/issue-59324.rs:24:29
    |
-help: consider further restricting type parameter `Bug` with trait `Foo`
+LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
+   |                             ^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `()`
    |
-LL | pub trait ThriftService<Bug: NotFoo + Foo>:
-   |                                     +++++
+help: this trait has no implementations, consider adding one
+  --> $DIR/issue-59324.rs:3:1
+   |
+LL | pub trait Foo: NotFoo {
+   | ^^^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `Bug: Foo` is not satisfied
   --> $DIR/issue-59324.rs:16:5
@@ -51,18 +58,11 @@ LL | |
 LL | |         &self,
 LL | |     ) -> Self::AssocType;
    | |_________________________^ the trait `Foo` is not implemented for `Bug`
-
-error[E0277]: the trait bound `(): Foo` is not satisfied
-  --> $DIR/issue-59324.rs:24:29
    |
-LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
-   |                             ^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `()`
-   |
-help: this trait has no implementations, consider adding one
-  --> $DIR/issue-59324.rs:3:1
+help: consider further restricting type parameter `Bug` with trait `Foo`
    |
-LL | pub trait Foo: NotFoo {
-   | ^^^^^^^^^^^^^^^^^^^^^
+LL | pub trait ThriftService<Bug: NotFoo + Foo>:
+   |                                     +++++
 
 error[E0277]: the trait bound `Bug: Foo` is not satisfied
   --> $DIR/issue-59324.rs:20:10
diff --git a/tests/ui/async-await/async-closures/by-move-body-inlined-attrs.rs b/tests/ui/async-await/async-closures/by-move-body-inlined-attrs.rs
new file mode 100644
index 00000000000..ecfc06d2bad
--- /dev/null
+++ b/tests/ui/async-await/async-closures/by-move-body-inlined-attrs.rs
@@ -0,0 +1,28 @@
+//@ check-pass
+//@ compile-flags: -Zinline-mir -Zvalidate-mir
+//@ edition: 2024
+
+// See comment below.
+
+use std::future::Future;
+use std::pin::pin;
+use std::task::{Context, Waker};
+
+fn call_once<T>(f: impl FnOnce() -> T) -> T { f() }
+
+fn main() {
+    let x = async || {};
+    // We first inline `call_once<{async closure}>`.
+    //
+    // This gives us a future whose type is the "FnOnce" flavor of the async closure's
+    // child coroutine. The body of this coroutine is synthetic, which we synthesize in
+    // the by-move body query.
+    let fut = pin!(call_once(x));
+    // We then try to inline that body in this poll call.
+    //
+    // The inliner does some inlinability checks; one of these checks involves checking
+    // the body for the `#[rustc_no_mir_inline]` attribute. Since the synthetic body had
+    // no HIR synthesized, but it's still a local def id, we end up ICEing in the
+    // `local_def_id_to_hir_id` call when trying to read its attrs.
+    fut.poll(&mut Context::from_waker(Waker::noop()));
+}
diff --git a/tests/ui/attributes/attr-bad-crate-attr.rs b/tests/ui/attributes/attr-bad-crate-attr.rs
index 9de0abca9a7..d37d349026a 100644
--- a/tests/ui/attributes/attr-bad-crate-attr.rs
+++ b/tests/ui/attributes/attr-bad-crate-attr.rs
@@ -3,7 +3,6 @@
 //!
 //! See <https://doc.rust-lang.org/reference/attributes.html>.
 
-//@ error-pattern: expected item
-
 #![attr = "val"]
 #[attr = "val"] // Unterminated
+//~^ ERROR expected item after attributes
diff --git a/tests/ui/attributes/attr-bad-crate-attr.stderr b/tests/ui/attributes/attr-bad-crate-attr.stderr
index 69eabd32230..22522896bd1 100644
--- a/tests/ui/attributes/attr-bad-crate-attr.stderr
+++ b/tests/ui/attributes/attr-bad-crate-attr.stderr
@@ -1,5 +1,5 @@
 error: expected item after attributes
-  --> $DIR/attr-bad-crate-attr.rs:9:1
+  --> $DIR/attr-bad-crate-attr.rs:7:1
    |
 LL | #[attr = "val"] // Unterminated
    | ^^^^^^^^^^^^^^^
diff --git a/tests/ui/attributes/dont-dup-expr-attrs.rs b/tests/ui/attributes/dont-dup-expr-attrs.rs
new file mode 100644
index 00000000000..21da6820a53
--- /dev/null
+++ b/tests/ui/attributes/dont-dup-expr-attrs.rs
@@ -0,0 +1,133 @@
+//@ check-pass
+//
+// During development of #124141 at one point expression on attributes were
+// being duplicated and `m1` caused an exponential blowup that caused OOM.
+// The number of recursive calls depends on the number of doc comments on the
+// expr block. On each recursive call, the `#[allow(deprecated)]` attribute(s) on
+// the `0` somehow get duplicated, resulting in 1, 2, 4, 8, ... identical
+// attributes.
+//
+// After the fix, the code compiles quickly and normally.
+
+macro_rules! m1 {
+    ($(#[$meta:meta])* { $e:expr }) => {
+        m1! { expr: { $e }, unprocessed: [$(#[$meta])*] }
+    };
+
+    (expr: { $e:expr }, unprocessed: [ #[$meta:meta] $($metas:tt)* ]) => {
+        m1! { expr: { $e }, unprocessed: [ $($metas)* ] }
+    };
+
+    (expr: { $e:expr }, unprocessed: []) => {
+        { $e }
+    }
+}
+
+macro_rules! m2 {
+    ($(#[$meta:meta])* { $e:stmt }) => {
+        m2! { stmt: { $e }, unprocessed: [$(#[$meta])*] }
+    };
+
+    (stmt: { $e:stmt }, unprocessed: [ #[$meta:meta] $($metas:tt)* ]) => {
+        m2! { stmt: { $e }, unprocessed: [ $($metas)* ] }
+    };
+
+    (stmt: { $e:stmt }, unprocessed: []) => {
+        { $e }
+    }
+}
+
+macro_rules! m3 {
+    ($(#[$meta:meta])* { $e:item }) => {
+        m3! { item: { $e }, unprocessed: [$(#[$meta])*] }
+    };
+
+    (item: { $e:item }, unprocessed: [ #[$meta:meta] $($metas:tt)* ]) => {
+        m3! { item: { $e }, unprocessed: [ $($metas)* ] }
+    };
+
+    (item: { $e:item }, unprocessed: []) => {
+        { $e }
+    }
+}
+
+fn main() {
+    // Each additional doc comment line doubles the compile time.
+    m1!(
+        /// a1
+        /// a2
+        /// a3
+        /// a4
+        /// a5
+        /// a6
+        /// a7
+        /// a8
+        /// a9
+        /// a10
+        /// a11
+        /// a12
+        /// a13
+        /// a14
+        /// a15
+        /// a16
+        /// a17
+        /// a18
+        /// a19
+        /// a20
+        {
+            #[allow(deprecated)] 0
+        }
+    );
+
+    m2!(
+        /// a1
+        /// a2
+        /// a3
+        /// a4
+        /// a5
+        /// a6
+        /// a7
+        /// a8
+        /// a9
+        /// a10
+        /// a11
+        /// a12
+        /// a13
+        /// a14
+        /// a15
+        /// a16
+        /// a17
+        /// a18
+        /// a19
+        /// a20
+        {
+            #[allow(deprecated)] let x = 5
+        }
+    );
+
+    m3!(
+        /// a1
+        /// a2
+        /// a3
+        /// a4
+        /// a5
+        /// a6
+        /// a7
+        /// a8
+        /// a9
+        /// a10
+        /// a11
+        /// a12
+        /// a13
+        /// a14
+        /// a15
+        /// a16
+        /// a17
+        /// a18
+        /// a19
+        /// a20
+        {
+            #[allow(deprecated)] struct S;
+        }
+    );
+}
diff --git a/tests/ui/attributes/inner-attr-metavar.rs b/tests/ui/attributes/inner-attr-metavar.rs
new file mode 100644
index 00000000000..345121c252e
--- /dev/null
+++ b/tests/ui/attributes/inner-attr-metavar.rs
@@ -0,0 +1,14 @@
+//@ check-pass
+//
+// During `Nonterminal` removal (#124141) there was at one point a problem with
+// calling from_ast on expressions with inner attributes within metavars -- the
+// inner attributes were being inserted in the wrong place in `from_ast`. This
+// test covers that case.
+
+macro_rules! m3 { ($e:expr) => {} }
+macro_rules! m2 { ($e:expr) => { m3!($e); } }
+macro_rules! m1 { ($e:expr) => { m2!($e); } }
+
+m1!({ #![allow(unused)] 0 });
+
+fn main() {}
diff --git a/tests/ui/attributes/nonterminal-expansion.rs b/tests/ui/attributes/nonterminal-expansion.rs
index 83c8f00999a..004a8a23fd6 100644
--- a/tests/ui/attributes/nonterminal-expansion.rs
+++ b/tests/ui/attributes/nonterminal-expansion.rs
@@ -5,8 +5,7 @@
 macro_rules! pass_nonterminal {
     ($n:expr) => {
         #[repr(align($n))]
-        //~^ ERROR expected unsuffixed literal, found expression `n!()`
-        //~^^ ERROR incorrect `repr(align)` attribute format: `align` expects a literal integer as argument [E0693]
+        //~^ ERROR expected unsuffixed literal, found `expr` metavariable
         struct S;
     };
 }
@@ -16,5 +15,6 @@ macro_rules! n {
 }
 
 pass_nonterminal!(n!());
+//~^ ERROR incorrect `repr(align)` attribute format: `align` expects a literal integer as argument [E0693]
 
 fn main() {}
diff --git a/tests/ui/attributes/nonterminal-expansion.stderr b/tests/ui/attributes/nonterminal-expansion.stderr
index 8a85731bd5a..9c6cb98f619 100644
--- a/tests/ui/attributes/nonterminal-expansion.stderr
+++ b/tests/ui/attributes/nonterminal-expansion.stderr
@@ -1,4 +1,4 @@
-error: expected unsuffixed literal, found expression `n!()`
+error: expected unsuffixed literal, found `expr` metavariable
   --> $DIR/nonterminal-expansion.rs:7:22
    |
 LL |         #[repr(align($n))]
@@ -10,15 +10,10 @@ LL | pass_nonterminal!(n!());
    = note: this error originates in the macro `pass_nonterminal` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0693]: incorrect `repr(align)` attribute format: `align` expects a literal integer as argument
-  --> $DIR/nonterminal-expansion.rs:7:22
+  --> $DIR/nonterminal-expansion.rs:17:19
    |
-LL |         #[repr(align($n))]
-   |                      ^^
-...
 LL | pass_nonterminal!(n!());
-   | ----------------------- in this macro invocation
-   |
-   = note: this error originates in the macro `pass_nonterminal` (in Nightly builds, run with -Z macro-backtrace for more info)
+   |                   ^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/attributes/z-crate-attr/garbage.rs b/tests/ui/attributes/z-crate-attr/garbage.rs
index ec81dd1bcaa..69444e1935a 100644
--- a/tests/ui/attributes/z-crate-attr/garbage.rs
+++ b/tests/ui/attributes/z-crate-attr/garbage.rs
@@ -1,4 +1,7 @@
 // Show diagnostics for invalid tokens
 //@ compile-flags: -Zcrate-attr=`%~@$#
-//@ error-pattern:unknown start of token
+
 fn main() {}
+
+//~? ERROR unknown start of token: `
+//~? ERROR expected identifier, found `%`
diff --git a/tests/ui/attributes/z-crate-attr/injection.rs b/tests/ui/attributes/z-crate-attr/injection.rs
index 0c5c81ca71a..a91f9d2886e 100644
--- a/tests/ui/attributes/z-crate-attr/injection.rs
+++ b/tests/ui/attributes/z-crate-attr/injection.rs
@@ -1,3 +1,5 @@
 //@ compile-flags: '-Zcrate-attr=feature(yeet_expr)]fn main(){}#[inline'
-//@ error-pattern:unexpected closing delimiter
+
 fn foo() {}
+
+//~? ERROR unexpected closing delimiter: `]`
diff --git a/tests/ui/attributes/z-crate-attr/inner-attr.rs b/tests/ui/attributes/z-crate-attr/inner-attr.rs
index 522c906dcd8..47ecad70062 100644
--- a/tests/ui/attributes/z-crate-attr/inner-attr.rs
+++ b/tests/ui/attributes/z-crate-attr/inner-attr.rs
@@ -1,4 +1,5 @@
 //@ compile-flags: -Zcrate-attr=#![feature(foo)]
-//@ error-pattern:expected identifier
 
 fn main() {}
+
+//~? ERROR expected identifier, found `#`
diff --git a/tests/ui/attributes/z-crate-attr/multiple.rs b/tests/ui/attributes/z-crate-attr/multiple.rs
index ee13253f625..47d35d2c3fd 100644
--- a/tests/ui/attributes/z-crate-attr/multiple.rs
+++ b/tests/ui/attributes/z-crate-attr/multiple.rs
@@ -1,3 +1,5 @@
 //@ compile-flags: -Zcrate-attr=feature(foo),feature(bar)
-//@ error-pattern:invalid crate attr
+
 fn main() {}
+
+//~? ERROR invalid crate attribute
diff --git a/tests/ui/attributes/z-crate-attr/unbalanced-paren.rs b/tests/ui/attributes/z-crate-attr/unbalanced-paren.rs
index fc1d7f39a59..77d5d698f65 100644
--- a/tests/ui/attributes/z-crate-attr/unbalanced-paren.rs
+++ b/tests/ui/attributes/z-crate-attr/unbalanced-paren.rs
@@ -1,4 +1,6 @@
 // Show diagnostics for unbalanced parens.
 //@ compile-flags: -Zcrate-attr=(
-//@ error-pattern:unclosed delimiter
+
 fn main() {}
+
+//~? ERROR this file contains an unclosed delimiter
diff --git a/tests/ui/binop/binop-bitxor-str.rs b/tests/ui/binop/binop-bitxor-str.rs
index d59e46167fe..3072fa6ae90 100644
--- a/tests/ui/binop/binop-bitxor-str.rs
+++ b/tests/ui/binop/binop-bitxor-str.rs
@@ -1,3 +1,2 @@
-//@ error-pattern:no implementation for `String ^ String`
-
 fn main() { let x = "a".to_string() ^ "b".to_string(); }
+//~^ ERROR no implementation for `String ^ String`
diff --git a/tests/ui/binop/binop-bitxor-str.stderr b/tests/ui/binop/binop-bitxor-str.stderr
index 9d9ec6c5af6..d4bb0c17bfa 100644
--- a/tests/ui/binop/binop-bitxor-str.stderr
+++ b/tests/ui/binop/binop-bitxor-str.stderr
@@ -1,5 +1,5 @@
 error[E0369]: no implementation for `String ^ String`
-  --> $DIR/binop-bitxor-str.rs:3:37
+  --> $DIR/binop-bitxor-str.rs:1:37
    |
 LL | fn main() { let x = "a".to_string() ^ "b".to_string(); }
    |                     --------------- ^ --------------- String
diff --git a/tests/ui/binop/binop-mul-bool.rs b/tests/ui/binop/binop-mul-bool.rs
index 0b4ed21a12d..706195d215c 100644
--- a/tests/ui/binop/binop-mul-bool.rs
+++ b/tests/ui/binop/binop-mul-bool.rs
@@ -1,3 +1 @@
-//@ error-pattern:cannot multiply `bool` by `bool`
-
-fn main() { let x = true * false; }
+fn main() { let x = true * false; } //~ ERROR cannot multiply `bool` by `bool`
diff --git a/tests/ui/binop/binop-mul-bool.stderr b/tests/ui/binop/binop-mul-bool.stderr
index 82d066f45a4..7fa70f65f56 100644
--- a/tests/ui/binop/binop-mul-bool.stderr
+++ b/tests/ui/binop/binop-mul-bool.stderr
@@ -1,5 +1,5 @@
 error[E0369]: cannot multiply `bool` by `bool`
-  --> $DIR/binop-mul-bool.rs:3:26
+  --> $DIR/binop-mul-bool.rs:1:26
    |
 LL | fn main() { let x = true * false; }
    |                     ---- ^ ----- bool
diff --git a/tests/ui/borrowck/mut-borrow-in-loop-2.stderr b/tests/ui/borrowck/mut-borrow-in-loop-2.stderr
index 4f32df1eb24..46e06bc91b9 100644
--- a/tests/ui/borrowck/mut-borrow-in-loop-2.stderr
+++ b/tests/ui/borrowck/mut-borrow-in-loop-2.stderr
@@ -12,10 +12,6 @@ help: consider creating a fresh reborrow of `value` here
    |
 LL |         Other::handle(&mut *value);
    |                       ++++++
-help: consider creating a fresh reborrow of `value` here
-   |
-LL |         Other::handle(&mut *value);
-   |                       ++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/c-variadic/issue-86053-1.rs b/tests/ui/c-variadic/issue-86053-1.rs
index f952235be98..8eeb99a4cc1 100644
--- a/tests/ui/c-variadic/issue-86053-1.rs
+++ b/tests/ui/c-variadic/issue-86053-1.rs
@@ -1,12 +1,18 @@
 // Regression test for the ICE described in issue #86053.
-//@ error-pattern:unexpected `self` parameter in function
-//@ error-pattern:`...` must be the last argument of a C-variadic function
-//@ error-pattern:cannot find type `F` in this scope
-
 
 #![feature(c_variadic)]
 #![crate_type="lib"]
 
 fn ordering4 < 'a , 'b     > ( a :            ,   self , self ,   self ,
+    //~^ ERROR expected type, found `,`
+    //~| ERROR unexpected `self` parameter in function
+    //~| ERROR unexpected `self` parameter in function
+    //~| ERROR unexpected `self` parameter in function
     self , ... ,   self ,   self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
+    //~^ ERROR unexpected `self` parameter in function
+    //~| ERROR unexpected `self` parameter in function
+    //~| ERROR unexpected `self` parameter in function
+    //~| ERROR `...` must be the last argument of a C-variadic function
+    //~| ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
+    //~| ERROR cannot find type `F` in this scope
 }
diff --git a/tests/ui/c-variadic/issue-86053-1.stderr b/tests/ui/c-variadic/issue-86053-1.stderr
index ce31f0d300f..dc323f9a234 100644
--- a/tests/ui/c-variadic/issue-86053-1.stderr
+++ b/tests/ui/c-variadic/issue-86053-1.stderr
@@ -1,23 +1,23 @@
 error: expected type, found `,`
-  --> $DIR/issue-86053-1.rs:10:47
+  --> $DIR/issue-86053-1.rs:6:47
    |
 LL | fn ordering4 < 'a , 'b     > ( a :            ,   self , self ,   self ,
    |                                               ^ expected type
 
 error: unexpected `self` parameter in function
-  --> $DIR/issue-86053-1.rs:10:51
+  --> $DIR/issue-86053-1.rs:6:51
    |
 LL | fn ordering4 < 'a , 'b     > ( a :            ,   self , self ,   self ,
    |                                                   ^^^^ must be the first parameter of an associated function
 
 error: unexpected `self` parameter in function
-  --> $DIR/issue-86053-1.rs:10:58
+  --> $DIR/issue-86053-1.rs:6:58
    |
 LL | fn ordering4 < 'a , 'b     > ( a :            ,   self , self ,   self ,
    |                                                          ^^^^ must be the first parameter of an associated function
 
 error: unexpected `self` parameter in function
-  --> $DIR/issue-86053-1.rs:10:67
+  --> $DIR/issue-86053-1.rs:6:67
    |
 LL | fn ordering4 < 'a , 'b     > ( a :            ,   self , self ,   self ,
    |                                                                   ^^^^ must be the first parameter of an associated function
diff --git a/tests/ui/capture1.rs b/tests/ui/capture1.rs
index 9bf6532a7d3..4f8c04e3fa9 100644
--- a/tests/ui/capture1.rs
+++ b/tests/ui/capture1.rs
@@ -1,6 +1,4 @@
-//@ error-pattern: can't capture dynamic environment in a fn item
-
 fn main() {
     let bar: isize = 5;
-    fn foo() -> isize { return bar; }
+    fn foo() -> isize { return bar; } //~ ERROR can't capture dynamic environment in a fn item
 }
diff --git a/tests/ui/capture1.stderr b/tests/ui/capture1.stderr
index 067b85ba619..8027430de52 100644
--- a/tests/ui/capture1.stderr
+++ b/tests/ui/capture1.stderr
@@ -1,5 +1,5 @@
 error[E0434]: can't capture dynamic environment in a fn item
-  --> $DIR/capture1.rs:5:32
+  --> $DIR/capture1.rs:3:32
    |
 LL |     fn foo() -> isize { return bar; }
    |                                ^^^
diff --git a/tests/ui/cast/cast-from-nil.rs b/tests/ui/cast/cast-from-nil.rs
index 8a677603aa9..65e1eb31b21 100644
--- a/tests/ui/cast/cast-from-nil.rs
+++ b/tests/ui/cast/cast-from-nil.rs
@@ -1,2 +1 @@
-//@ error-pattern: non-primitive cast: `()` as `u32`
-fn main() { let u = (assert!(true) as u32); }
+fn main() { let u = (assert!(true) as u32); } //~ ERROR non-primitive cast: `()` as `u32`
diff --git a/tests/ui/cast/cast-from-nil.stderr b/tests/ui/cast/cast-from-nil.stderr
index 991ff93a8bd..82c53d71e78 100644
--- a/tests/ui/cast/cast-from-nil.stderr
+++ b/tests/ui/cast/cast-from-nil.stderr
@@ -1,5 +1,5 @@
 error[E0605]: non-primitive cast: `()` as `u32`
-  --> $DIR/cast-from-nil.rs:2:21
+  --> $DIR/cast-from-nil.rs:1:21
    |
 LL | fn main() { let u = (assert!(true) as u32); }
    |                     ^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
diff --git a/tests/ui/cast/cast-to-nil.rs b/tests/ui/cast/cast-to-nil.rs
index d91f9a16a07..7cd864471dd 100644
--- a/tests/ui/cast/cast-to-nil.rs
+++ b/tests/ui/cast/cast-to-nil.rs
@@ -1,2 +1 @@
-//@ error-pattern: non-primitive cast: `u32` as `()`
-fn main() { let u = 0u32 as (); }
+fn main() { let u = 0u32 as (); } //~ ERROR non-primitive cast: `u32` as `()`
diff --git a/tests/ui/cast/cast-to-nil.stderr b/tests/ui/cast/cast-to-nil.stderr
index 14c75983b94..d7121a7adba 100644
--- a/tests/ui/cast/cast-to-nil.stderr
+++ b/tests/ui/cast/cast-to-nil.stderr
@@ -1,5 +1,5 @@
 error[E0605]: non-primitive cast: `u32` as `()`
-  --> $DIR/cast-to-nil.rs:2:21
+  --> $DIR/cast-to-nil.rs:1:21
    |
 LL | fn main() { let u = 0u32 as (); }
    |                     ^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
diff --git a/tests/ui/cfg/cfg_false_no_std-2.rs b/tests/ui/cfg/cfg_false_no_std-2.rs
index cd337565872..35e545aae34 100644
--- a/tests/ui/cfg/cfg_false_no_std-2.rs
+++ b/tests/ui/cfg/cfg_false_no_std-2.rs
@@ -1,7 +1,8 @@
 // Error, the linked empty library is `no_std` and doesn't provide a panic handler.
 
-//@ dont-check-compiler-stderr
+//@ compile-flags: --error-format=human
 //@ error-pattern: `#[panic_handler]` function required, but not found
+//@ dont-check-compiler-stderr
 //@ aux-build: cfg_false_lib_no_std_before.rs
 
 #![no_std]
@@ -9,3 +10,7 @@
 extern crate cfg_false_lib_no_std_before as _;
 
 fn main() {}
+
+// FIXME: The second error is target-dependent.
+//FIXME~? ERROR `#[panic_handler]` function required, but not found
+//FIXME~? ERROR unwinding panics are not supported without std
diff --git a/tests/ui/cfg/raw-true-false.rs b/tests/ui/cfg/raw-true-false.rs
index 4cb8bb71c92..c92672fc144 100644
--- a/tests/ui/cfg/raw-true-false.rs
+++ b/tests/ui/cfg/raw-true-false.rs
@@ -1,19 +1,11 @@
 //@ check-pass
-//@ compile-flags: --cfg false --check-cfg=cfg(r#false)
-
-#![deny(warnings)]
-
-#[expect(unexpected_cfgs)]
-mod a {
-  #[cfg(r#true)]
-  pub fn foo() {}
-}
-
-mod b {
-  #[cfg(r#false)]
-  pub fn bar() {}
-}
-
+//@ revisions: r0x0 r0x1 r1x0 r1x1
+//@[r0x0] compile-flags: --cfg false --check-cfg=cfg(false)
+//@[r0x1] compile-flags: --cfg false --check-cfg=cfg(r#false)
+//@[r1x0] compile-flags: --cfg r#false --check-cfg=cfg(false)
+//@[r1x1] compile-flags: --cfg r#false --check-cfg=cfg(r#false)
+#![deny(unexpected_cfgs)]
 fn main() {
-    b::bar()
+    #[cfg(not(r#false))]
+    compile_error!("");
 }
diff --git a/tests/ui/check-cfg/invalid-arguments.boolean.stderr b/tests/ui/check-cfg/invalid-arguments.boolean.stderr
deleted file mode 100644
index 18734de9dac..00000000000
--- a/tests/ui/check-cfg/invalid-arguments.boolean.stderr
+++ /dev/null
@@ -1,6 +0,0 @@
-error: invalid `--check-cfg` argument: `cfg(true)`
-   |
-   = note: `true` is a boolean literal
-   = note: `cfg()` arguments must be simple identifiers, `any()` or `values(...)`
-   = note: visit <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more details
-
diff --git a/tests/ui/check-cfg/invalid-arguments.boolean_after_values.stderr b/tests/ui/check-cfg/invalid-arguments.boolean_after_values.stderr
new file mode 100644
index 00000000000..3aa2205d3b1
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.boolean_after_values.stderr
@@ -0,0 +1,5 @@
+error: invalid `--check-cfg` argument: `cfg(values(),true)`
+   |
+   = note: `values()` cannot be specified before the names
+   = note: visit <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more details
+
diff --git a/tests/ui/check-cfg/invalid-arguments.rs b/tests/ui/check-cfg/invalid-arguments.rs
index 3bea128e3e4..279b13b6972 100644
--- a/tests/ui/check-cfg/invalid-arguments.rs
+++ b/tests/ui/check-cfg/invalid-arguments.rs
@@ -2,7 +2,7 @@
 //
 //@ check-fail
 //@ no-auto-check-cfg
-//@ revisions: anything_else boolean
+//@ revisions: anything_else boolean_after_values
 //@ revisions: string_for_name_1 string_for_name_2 multiple_any multiple_values
 //@ revisions: multiple_values_any not_empty_any not_empty_values_any
 //@ revisions: values_any_missing_values values_any_before_ident ident_in_values_1
@@ -11,7 +11,7 @@
 //@ revisions: none_not_empty cfg_none unsafe_attr
 //
 //@ [anything_else]compile-flags: --check-cfg=anything_else(...)
-//@ [boolean]compile-flags: --check-cfg=cfg(true)
+//@ [boolean_after_values]compile-flags: --check-cfg=cfg(values(),true)
 //@ [string_for_name_1]compile-flags: --check-cfg=cfg("NOT_IDENT")
 //@ [string_for_name_2]compile-flags: --check-cfg=cfg(foo,"NOT_IDENT",bar)
 //@ [multiple_any]compile-flags: --check-cfg=cfg(any(),any())
diff --git a/tests/ui/check-cfg/target_feature.stderr b/tests/ui/check-cfg/target_feature.stderr
index e23984dc595..aa5fd09c0c7 100644
--- a/tests/ui/check-cfg/target_feature.stderr
+++ b/tests/ui/check-cfg/target_feature.stderr
@@ -17,11 +17,16 @@ LL |     cfg!(target_feature = "_UNEXPECTED_VALUE");
 `aes`
 `altivec`
 `alu32`
+`amx-avx512`
 `amx-bf16`
 `amx-complex`
 `amx-fp16`
+`amx-fp8`
 `amx-int8`
+`amx-movrs`
+`amx-tf32`
 `amx-tile`
+`amx-transpose`
 `atomics`
 `avx`
 `avx2`
@@ -152,6 +157,7 @@ LL |     cfg!(target_feature = "_UNEXPECTED_VALUE");
 `mclass`
 `mops`
 `movbe`
+`movrs`
 `mp`
 `mp1e2`
 `msa`
@@ -318,6 +324,11 @@ LL |     cfg!(target_feature = "_UNEXPECTED_VALUE");
 `zfinx`
 `zhinx`
 `zhinxmin`
+`zicntr`
+`zicsr`
+`zifencei`
+`zihintpause`
+`zihpm`
 `zk`
 `zkn`
 `zknd`
diff --git a/tests/ui/codegen/equal-pointers-unequal/as-cast/print3.rs b/tests/ui/codegen/equal-pointers-unequal/as-cast/print3.rs
deleted file mode 100644
index eda83e999a5..00000000000
--- a/tests/ui/codegen/equal-pointers-unequal/as-cast/print3.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-//@ known-bug: #107975
-//@ compile-flags: -Copt-level=2
-//@ run-pass
-
-// https://github.com/rust-lang/rust/issues/107975#issuecomment-1430704499
-
-fn main() {
-    let a = {
-        let v = 0;
-        &v as *const _ as usize
-    };
-    let b = {
-        let v = 0;
-        &v as *const _ as usize
-    };
-
-    assert_ne!(a, b);
-    assert_ne!(a, b);
-    let c = a;
-    assert_eq!(format!("{} {} {}", a == b, a == c, b == c), "false true false");
-    println!("{a} {b}");
-    assert_eq!(format!("{} {} {}", a == b, a == c, b == c), "true true true");
-}
diff --git a/tests/ui/codegen/equal-pointers-unequal/exposed-provenance/print3.rs b/tests/ui/codegen/equal-pointers-unequal/exposed-provenance/print3.rs
deleted file mode 100644
index c7f46318aae..00000000000
--- a/tests/ui/codegen/equal-pointers-unequal/exposed-provenance/print3.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-//@ known-bug: #107975
-//@ compile-flags: -Copt-level=2
-//@ run-pass
-
-// https://github.com/rust-lang/rust/issues/107975#issuecomment-1430704499
-
-use std::ptr;
-
-fn main() {
-    let a: usize = {
-        let v = 0;
-        ptr::from_ref(&v).expose_provenance()
-    };
-    let b: usize = {
-        let v = 0;
-        ptr::from_ref(&v).expose_provenance()
-    };
-
-    assert_ne!(a, b);
-    assert_ne!(a, b);
-    let c = a;
-    assert_eq!(format!("{} {} {}", a == b, a == c, b == c), "false true false");
-    println!("{a} {b}");
-    assert_eq!(format!("{} {} {}", a == b, a == c, b == c), "true true true");
-}
diff --git a/tests/ui/codegen/equal-pointers-unequal/strict-provenance/print3.rs b/tests/ui/codegen/equal-pointers-unequal/strict-provenance/print3.rs
deleted file mode 100644
index a02ff30918d..00000000000
--- a/tests/ui/codegen/equal-pointers-unequal/strict-provenance/print3.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-//@ known-bug: #107975
-//@ compile-flags: -Copt-level=2
-//@ run-pass
-
-// https://github.com/rust-lang/rust/issues/107975#issuecomment-1430704499
-
-use std::ptr;
-
-fn main() {
-    let a: usize = {
-        let v = 0;
-        ptr::from_ref(&v).addr()
-    };
-    let b: usize = {
-        let v = 0;
-        ptr::from_ref(&v).addr()
-    };
-
-    assert_ne!(a, b);
-    assert_ne!(a, b);
-    let c = a;
-    assert_eq!(format!("{} {} {}", a == b, a == c, b == c), "false true false");
-    println!("{a} {b}");
-    assert_eq!(format!("{} {} {}", a == b, a == c, b == c), "true true true");
-}
diff --git a/tests/ui/codegen/mismatched-data-layouts.rs b/tests/ui/codegen/mismatched-data-layouts.rs
index 955f917ee33..194bcaa307f 100644
--- a/tests/ui/codegen/mismatched-data-layouts.rs
+++ b/tests/ui/codegen/mismatched-data-layouts.rs
@@ -3,7 +3,6 @@
 //@ build-fail
 //@ needs-llvm-components: x86
 //@ compile-flags: --crate-type=lib --target={{src-base}}/codegen/mismatched-data-layout.json -Z unstable-options
-//@ error-pattern: differs from LLVM target's
 //@ normalize-stderr: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`"
 //@ normalize-stderr: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`"
 
@@ -12,3 +11,5 @@
 
 #[lang = "sized"]
 trait Sized {}
+
+//~? ERROR differs from LLVM target's
diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-3.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-3.rs
index c086b8d8c3f..ba55b1c08b1 100644
--- a/tests/ui/conditional-compilation/cfg-arg-invalid-3.rs
+++ b/tests/ui/conditional-compilation/cfg-arg-invalid-3.rs
@@ -1,3 +1,5 @@
 //@ compile-flags: --cfg a::b
-//@ error-pattern: invalid `--cfg` argument: `a::b` (argument key must be an identifier)
+
 fn main() {}
+
+//~? ERROR invalid `--cfg` argument: `a::b` (argument key must be an identifier)
diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-5.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-5.rs
index 6f0bf8cf5fe..d64aeead79c 100644
--- a/tests/ui/conditional-compilation/cfg-arg-invalid-5.rs
+++ b/tests/ui/conditional-compilation/cfg-arg-invalid-5.rs
@@ -1,3 +1,5 @@
 //@ compile-flags: --cfg a=10
-//@ error-pattern: invalid `--cfg` argument: `a=10` (argument value must be a string)
+
 fn main() {}
+
+//~? ERROR invalid `--cfg` argument: `a=10` (argument value must be a string)
diff --git a/tests/ui/conditional-compilation/cfg-attr-cfg-2.rs b/tests/ui/conditional-compilation/cfg-attr-cfg-2.rs
index c801bbccedd..80735990015 100644
--- a/tests/ui/conditional-compilation/cfg-attr-cfg-2.rs
+++ b/tests/ui/conditional-compilation/cfg-attr-cfg-2.rs
@@ -1,8 +1,7 @@
-//@ error-pattern: `main` function not found
 //@ compile-flags: --cfg foo --check-cfg=cfg(foo,bar)
 
 // main is conditionally compiled, but the conditional compilation
 // is conditional too!
 
 #[cfg_attr(foo, cfg(bar))]
-fn main() { }
+fn main() { } //~ ERROR `main` function not found in crate `cfg_attr_cfg_2`
diff --git a/tests/ui/conditional-compilation/cfg-attr-cfg-2.stderr b/tests/ui/conditional-compilation/cfg-attr-cfg-2.stderr
index 64595241dc7..1febb430863 100644
--- a/tests/ui/conditional-compilation/cfg-attr-cfg-2.stderr
+++ b/tests/ui/conditional-compilation/cfg-attr-cfg-2.stderr
@@ -1,5 +1,5 @@
 error[E0601]: `main` function not found in crate `cfg_attr_cfg_2`
-  --> $DIR/cfg-attr-cfg-2.rs:8:14
+  --> $DIR/cfg-attr-cfg-2.rs:7:14
    |
 LL | fn main() { }
    |              ^ consider adding a `main` function to `$DIR/cfg-attr-cfg-2.rs`
diff --git a/tests/ui/conditional-compilation/cfg-attr-syntax-validation.rs b/tests/ui/conditional-compilation/cfg-attr-syntax-validation.rs
index 416145a0c15..47418b4e091 100644
--- a/tests/ui/conditional-compilation/cfg-attr-syntax-validation.rs
+++ b/tests/ui/conditional-compilation/cfg-attr-syntax-validation.rs
@@ -28,7 +28,7 @@ struct S9;
 macro_rules! generate_s10 {
     ($expr: expr) => {
         #[cfg(feature = $expr)]
-        //~^ ERROR expected unsuffixed literal, found expression `concat!("nonexistent")`
+        //~^ ERROR expected unsuffixed literal, found `expr` metavariable
         struct S10;
     }
 }
diff --git a/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr b/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr
index d02d0d70a8b..66ce2ee9858 100644
--- a/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr
+++ b/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr
@@ -54,7 +54,7 @@ LL | #[cfg(a = b"hi")]
    |           |
    |           help: consider removing the prefix
 
-error: expected unsuffixed literal, found expression `concat!("nonexistent")`
+error: expected unsuffixed literal, found `expr` metavariable
   --> $DIR/cfg-attr-syntax-validation.rs:30:25
    |
 LL |         #[cfg(feature = $expr)]
diff --git a/tests/ui/conditional-compilation/cfg-in-crate-1.rs b/tests/ui/conditional-compilation/cfg-in-crate-1.rs
index ecd3722bf4c..a1faa2397a3 100644
--- a/tests/ui/conditional-compilation/cfg-in-crate-1.rs
+++ b/tests/ui/conditional-compilation/cfg-in-crate-1.rs
@@ -1,3 +1 @@
-//@ error-pattern: `main` function not found
-
-#![cfg(FALSE)]
+#![cfg(FALSE)] //~ ERROR `main` function not found in crate `cfg_in_crate_1`
diff --git a/tests/ui/conditional-compilation/cfg-in-crate-1.stderr b/tests/ui/conditional-compilation/cfg-in-crate-1.stderr
index 6067a3a921c..126e10cf040 100644
--- a/tests/ui/conditional-compilation/cfg-in-crate-1.stderr
+++ b/tests/ui/conditional-compilation/cfg-in-crate-1.stderr
@@ -1,5 +1,5 @@
 error[E0601]: `main` function not found in crate `cfg_in_crate_1`
-  --> $DIR/cfg-in-crate-1.rs:3:15
+  --> $DIR/cfg-in-crate-1.rs:1:15
    |
 LL | #![cfg(FALSE)]
    |               ^ consider adding a `main` function to `$DIR/cfg-in-crate-1.rs`
diff --git a/tests/ui/const-generics/const-param-has-ty-goal-in-error-implies.rs b/tests/ui/const-generics/const-param-has-ty-goal-in-error-implies.rs
new file mode 100644
index 00000000000..231bb5252de
--- /dev/null
+++ b/tests/ui/const-generics/const-param-has-ty-goal-in-error-implies.rs
@@ -0,0 +1,41 @@
+// compile-flags: -Znext-solver
+
+// Test for a weird diagnostics corner case. In the error reporting code, when reporting
+// fulfillment errors for goals A and B, we try to see if elaborating A will result in
+// another goal that can equate with B. That would signal that B is "implied by" A,
+// allowing us to skip reporting it, which is beneficial for cutting down on the number
+// of diagnostics we report. In the new trait solver especially, but even in the old trait
+// solver through things like defining opaque type usages, this `can_equate` call was not
+// properly taking the param-env of the goals, resulting in nested obligations that had
+// empty param-envs. If one of these nested obligations was a `ConstParamHasTy` goal, then
+// we would ICE, since those goals are particularly strict about the param-env they're
+// evaluated in.
+
+// This is morally a fix for <https://github.com/rust-lang/rust/issues/139314>, but that
+// repro uses details about how defining usages in the `check_opaque_well_formed` code
+// can spring out of type equality, and will likely stop failing soon coincidentally once
+// we start using `PostBorrowck` mode in that check.
+
+trait Foo: Baz<()> {}
+trait Baz<T> {}
+
+trait IdentityWithConstArgGoal<const N: usize> {
+    type Assoc;
+}
+impl<T, const N: usize> IdentityWithConstArgGoal<N> for T {
+    type Assoc = T;
+}
+
+fn unsatisfied<T, const N: usize>()
+where
+    T: Foo,
+    T: Baz<<T as IdentityWithConstArgGoal<N>>::Assoc>,
+{
+}
+
+fn test<const N: usize>() {
+    unsatisfied::<(), N>();
+    //~^ ERROR the trait bound `(): Foo` is not satisfied
+}
+
+fn main() {}
diff --git a/tests/ui/const-generics/const-param-has-ty-goal-in-error-implies.stderr b/tests/ui/const-generics/const-param-has-ty-goal-in-error-implies.stderr
new file mode 100644
index 00000000000..77bba494552
--- /dev/null
+++ b/tests/ui/const-generics/const-param-has-ty-goal-in-error-implies.stderr
@@ -0,0 +1,23 @@
+error[E0277]: the trait bound `(): Foo` is not satisfied
+  --> $DIR/const-param-has-ty-goal-in-error-implies.rs:37:19
+   |
+LL |     unsatisfied::<(), N>();
+   |                   ^^ the trait `Foo` is not implemented for `()`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/const-param-has-ty-goal-in-error-implies.rs:19:1
+   |
+LL | trait Foo: Baz<()> {}
+   | ^^^^^^^^^^^^^^^^^^
+note: required by a bound in `unsatisfied`
+  --> $DIR/const-param-has-ty-goal-in-error-implies.rs:31:8
+   |
+LL | fn unsatisfied<T, const N: usize>()
+   |    ----------- required by a bound in this function
+LL | where
+LL |     T: Foo,
+   |        ^^^ required by this bound in `unsatisfied`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-ptr/out_of_bounds_read.rs b/tests/ui/const-ptr/out_of_bounds_read.rs
index 312b53432b4..ccf45bf324a 100644
--- a/tests/ui/const-ptr/out_of_bounds_read.rs
+++ b/tests/ui/const-ptr/out_of_bounds_read.rs
@@ -1,5 +1,3 @@
-//@ error-pattern: evaluation of constant value failed
-
 fn main() {
     use std::ptr;
 
@@ -8,6 +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
     const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
+    //~^ ERROR evaluation of constant value failed
     const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() };
+    //~^ ERROR evaluation of constant value failed
 }
diff --git a/tests/ui/const-ptr/out_of_bounds_read.stderr b/tests/ui/const-ptr/out_of_bounds_read.stderr
index 899e151c9b8..b396fc4d71b 100644
--- a/tests/ui/const-ptr/out_of_bounds_read.stderr
+++ b/tests/ui/const-ptr/out_of_bounds_read.stderr
@@ -1,5 +1,5 @@
 error[E0080]: evaluation of constant value failed
-  --> $DIR/out_of_bounds_read.rs:10:33
+  --> $DIR/out_of_bounds_read.rs:8:33
    |
 LL |     const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 4 bytes of memory, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
@@ -8,7 +8,7 @@ note: inside `std::ptr::read::<u32>`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/out_of_bounds_read.rs:11:39
+  --> $DIR/out_of_bounds_read.rs:10:39
    |
 LL |     const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
    |                                       ^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 4 bytes of memory, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
diff --git a/tests/ui/consts/const-size_of-cycle.rs b/tests/ui/consts/const-size_of-cycle.rs
index cfb2294c445..f45d96d43f8 100644
--- a/tests/ui/consts/const-size_of-cycle.rs
+++ b/tests/ui/consts/const-size_of-cycle.rs
@@ -1,7 +1,6 @@
-//@ error-pattern: cycle detected
-
 struct Foo {
     bytes: [u8; std::mem::size_of::<Foo>()]
+    //~^ ERROR cycle detected when evaluating type-level constant
 }
 
 fn main() {}
diff --git a/tests/ui/consts/const-size_of-cycle.stderr b/tests/ui/consts/const-size_of-cycle.stderr
index cd0ea556425..bf17d76a092 100644
--- a/tests/ui/consts/const-size_of-cycle.stderr
+++ b/tests/ui/consts/const-size_of-cycle.stderr
@@ -1,11 +1,11 @@
 error[E0391]: cycle detected when evaluating type-level constant
-  --> $DIR/const-size_of-cycle.rs:4:17
+  --> $DIR/const-size_of-cycle.rs:2:17
    |
 LL |     bytes: [u8; std::mem::size_of::<Foo>()]
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`...
-  --> $DIR/const-size_of-cycle.rs:4:17
+  --> $DIR/const-size_of-cycle.rs:2:17
    |
 LL |     bytes: [u8; std::mem::size_of::<Foo>()]
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -14,7 +14,7 @@ LL |     bytes: [u8; std::mem::size_of::<Foo>()]
    = note: ...which requires normalizing `[u8; std::mem::size_of::<Foo>()]`...
    = note: ...which again requires evaluating type-level constant, completing the cycle
 note: cycle used when checking that `Foo` is well-formed
-  --> $DIR/const-size_of-cycle.rs:3:1
+  --> $DIR/const-size_of-cycle.rs:1:1
    |
 LL | struct Foo {
    | ^^^^^^^^^^
diff --git a/tests/ui/consts/const_in_pattern/arrays-and-slices.rs b/tests/ui/consts/const_in_pattern/arrays-and-slices.rs
new file mode 100644
index 00000000000..bb38490206b
--- /dev/null
+++ b/tests/ui/consts/const_in_pattern/arrays-and-slices.rs
@@ -0,0 +1,53 @@
+//! Tests that arrays and slices in constants aren't interchangeable when used as patterns.
+
+#[derive(PartialEq, Eq)]
+struct SomeStruct<T: ?Sized>(T);
+
+const BSTR_SIZED: &'static [u8; 3] = b"012";
+const BSTR_UNSIZED: &'static [u8] = BSTR_SIZED;
+const STRUCT_SIZED: &'static SomeStruct<[u8; 3]> = &SomeStruct(*BSTR_SIZED);
+const STRUCT_UNSIZED: &'static SomeStruct<[u8]> = STRUCT_SIZED;
+
+fn type_mismatches() {
+    // Test that array consts can't be used where a slice pattern is expected. This helps ensure
+    // that `const_to_pat` won't produce irrefutable `thir::PatKind::Array` patterns when matching
+    // on slices, which would result in missing length checks.
+    // See also `tests/ui/match/pattern-deref-miscompile.rs`, which tests that byte string literal
+    // patterns check slices' length appropriately when matching on slices.
+    match BSTR_UNSIZED {
+        BSTR_SIZED => {}
+        //~^ ERROR: mismatched types
+        _ => {}
+    }
+    match STRUCT_UNSIZED {
+        STRUCT_SIZED => {}
+        //~^ ERROR: mismatched types
+        _ => {}
+    }
+
+    // Test that slice consts can't be used where an array pattern is expected.
+    match BSTR_UNSIZED {
+        BSTR_SIZED => {}
+        //~^ ERROR: mismatched types
+        _ => {}
+    }
+    // If the types matched here, this would still error, since unsized structs aren't permitted in
+    // constant patterns. See the `invalid_patterns` test below.
+    match STRUCT_UNSIZED {
+        STRUCT_SIZED => {}
+        //~^ ERROR: mismatched types
+        _ => {}
+    }
+}
+
+fn invalid_patterns() {
+    // Test that unsized structs containing slices can't be used as patterns.
+    // See `tests/ui/consts/issue-87046.rs` for an example with `str`.
+    match STRUCT_UNSIZED {
+        STRUCT_UNSIZED => {}
+        //~^ ERROR: cannot use unsized non-slice type `SomeStruct<[u8]>` in constant patterns
+        _ => {}
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/consts/const_in_pattern/arrays-and-slices.stderr b/tests/ui/consts/const_in_pattern/arrays-and-slices.stderr
new file mode 100644
index 00000000000..412caf60f7d
--- /dev/null
+++ b/tests/ui/consts/const_in_pattern/arrays-and-slices.stderr
@@ -0,0 +1,84 @@
+error[E0308]: mismatched types
+  --> $DIR/arrays-and-slices.rs:18:9
+   |
+LL | const BSTR_SIZED: &'static [u8; 3] = b"012";
+   | ---------------------------------- constant defined here
+...
+LL |     match BSTR_UNSIZED {
+   |           ------------ this expression has type `&[u8]`
+LL |         BSTR_SIZED => {}
+   |         ^^^^^^^^^^
+   |         |
+   |         expected `&[u8]`, found `&[u8; 3]`
+   |         `BSTR_SIZED` is interpreted as a constant, not a new binding
+   |         help: introduce a new binding instead: `other_bstr_sized`
+   |
+   = note: expected reference `&[u8]`
+              found reference `&'static [u8; 3]`
+
+error[E0308]: mismatched types
+  --> $DIR/arrays-and-slices.rs:23:9
+   |
+LL | const STRUCT_SIZED: &'static SomeStruct<[u8; 3]> = &SomeStruct(*BSTR_SIZED);
+   | ------------------------------------------------ constant defined here
+...
+LL |     match STRUCT_UNSIZED {
+   |           -------------- this expression has type `&SomeStruct<[u8]>`
+LL |         STRUCT_SIZED => {}
+   |         ^^^^^^^^^^^^
+   |         |
+   |         expected `&SomeStruct<[u8]>`, found `&SomeStruct<[u8; 3]>`
+   |         `STRUCT_SIZED` is interpreted as a constant, not a new binding
+   |         help: introduce a new binding instead: `other_struct_sized`
+   |
+   = note: expected reference `&SomeStruct<[u8]>`
+              found reference `&'static SomeStruct<[u8; 3]>`
+
+error[E0308]: mismatched types
+  --> $DIR/arrays-and-slices.rs:30:9
+   |
+LL | const BSTR_SIZED: &'static [u8; 3] = b"012";
+   | ---------------------------------- constant defined here
+...
+LL |     match BSTR_UNSIZED {
+   |           ------------ this expression has type `&[u8]`
+LL |         BSTR_SIZED => {}
+   |         ^^^^^^^^^^
+   |         |
+   |         expected `&[u8]`, found `&[u8; 3]`
+   |         `BSTR_SIZED` is interpreted as a constant, not a new binding
+   |         help: introduce a new binding instead: `other_bstr_sized`
+   |
+   = note: expected reference `&[u8]`
+              found reference `&'static [u8; 3]`
+
+error[E0308]: mismatched types
+  --> $DIR/arrays-and-slices.rs:37:9
+   |
+LL | const STRUCT_SIZED: &'static SomeStruct<[u8; 3]> = &SomeStruct(*BSTR_SIZED);
+   | ------------------------------------------------ constant defined here
+...
+LL |     match STRUCT_UNSIZED {
+   |           -------------- this expression has type `&SomeStruct<[u8]>`
+LL |         STRUCT_SIZED => {}
+   |         ^^^^^^^^^^^^
+   |         |
+   |         expected `&SomeStruct<[u8]>`, found `&SomeStruct<[u8; 3]>`
+   |         `STRUCT_SIZED` is interpreted as a constant, not a new binding
+   |         help: introduce a new binding instead: `other_struct_sized`
+   |
+   = note: expected reference `&SomeStruct<[u8]>`
+              found reference `&'static SomeStruct<[u8; 3]>`
+
+error: cannot use unsized non-slice type `SomeStruct<[u8]>` in constant patterns
+  --> $DIR/arrays-and-slices.rs:47:9
+   |
+LL | const STRUCT_UNSIZED: &'static SomeStruct<[u8]> = STRUCT_SIZED;
+   | ----------------------------------------------- constant defined here
+...
+LL |         STRUCT_UNSIZED => {}
+   |         ^^^^^^^^^^^^^^
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/invalid-inline-const-in-match-arm.rs b/tests/ui/consts/invalid-inline-const-in-match-arm.rs
deleted file mode 100644
index 4fe4b0d33c8..00000000000
--- a/tests/ui/consts/invalid-inline-const-in-match-arm.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-#![feature(inline_const_pat)]
-
-fn main() {
-    match () {
-        const { (|| {})() } => {}
-        //~^ ERROR cannot call non-const closure in constants
-        //~| ERROR could not evaluate constant pattern
-    }
-}
diff --git a/tests/ui/consts/invalid-inline-const-in-match-arm.stderr b/tests/ui/consts/invalid-inline-const-in-match-arm.stderr
deleted file mode 100644
index b22f99f40d3..00000000000
--- a/tests/ui/consts/invalid-inline-const-in-match-arm.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0015]: cannot call non-const closure in constants
-  --> $DIR/invalid-inline-const-in-match-arm.rs:5:17
-   |
-LL |         const { (|| {})() } => {}
-   |                 ^^^^^^^^^
-   |
-   = note: closures need an RFC before allowed to be called in constants
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-
-error: could not evaluate constant pattern
-  --> $DIR/invalid-inline-const-in-match-arm.rs:5:9
-   |
-LL |         const { (|| {})() } => {}
-   |         ^^^^^^^^^^^^^^^^^^^ could not evaluate constant
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/miri_unleashed/drop.rs b/tests/ui/consts/miri_unleashed/drop.rs
index 45ade4906b8..17d089222d9 100644
--- a/tests/ui/consts/miri_unleashed/drop.rs
+++ b/tests/ui/consts/miri_unleashed/drop.rs
@@ -14,4 +14,6 @@ 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
+
+//~? WARN skipping const checks
diff --git a/tests/ui/consts/timeout.rs b/tests/ui/consts/timeout.rs
index c4fb8bab663..8dab87ac8e1 100644
--- a/tests/ui/consts/timeout.rs
+++ b/tests/ui/consts/timeout.rs
@@ -3,7 +3,6 @@
 //! ICE.
 
 //@ compile-flags: --crate-type=lib -Ztiny-const-eval-limit
-//@ error-pattern: constant evaluation is taking a long time
 
 static ROOK_ATTACKS_TABLE: () = {
     0_u64.count_ones();
@@ -23,3 +22,5 @@ static ROOK_ATTACKS_TABLE: () = {
     0_u64.count_ones();
     0_u64.count_ones();
 };
+
+//~? ERROR constant evaluation is taking a long time
diff --git a/tests/ui/consts/timeout.stderr b/tests/ui/consts/timeout.stderr
index 6bfa06d86d1..ecefeff76e9 100644
--- a/tests/ui/consts/timeout.stderr
+++ b/tests/ui/consts/timeout.stderr
@@ -4,7 +4,7 @@ error: constant evaluation is taking a long time
    = note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
            If your compilation actually takes a long time, you can safely allow the lint.
 help: the constant being evaluated
-  --> $DIR/timeout.rs:8:1
+  --> $DIR/timeout.rs:7:1
    |
 LL | static ROOK_ATTACKS_TABLE: () = {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/coverage-attr/name-value.stderr b/tests/ui/coverage-attr/name-value.stderr
index 31a635b57e5..f24db78415e 100644
--- a/tests/ui/coverage-attr/name-value.stderr
+++ b/tests/ui/coverage-attr/name-value.stderr
@@ -44,6 +44,21 @@ LL + #[coverage(on)]
    |
 
 error: malformed `coverage` attribute input
+  --> $DIR/name-value.rs:26:1
+   |
+LL | #[coverage = "off"]
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+help: the following are the possible correct uses
+   |
+LL - #[coverage = "off"]
+LL + #[coverage(off)]
+   |
+LL - #[coverage = "off"]
+LL + #[coverage(on)]
+   |
+
+error: malformed `coverage` attribute input
   --> $DIR/name-value.rs:29:5
    |
 LL |     #[coverage = "off"]
@@ -59,7 +74,7 @@ LL +     #[coverage(on)]
    |
 
 error: malformed `coverage` attribute input
-  --> $DIR/name-value.rs:26:1
+  --> $DIR/name-value.rs:35:1
    |
 LL | #[coverage = "off"]
    | ^^^^^^^^^^^^^^^^^^^
@@ -104,7 +119,7 @@ LL +     #[coverage(on)]
    |
 
 error: malformed `coverage` attribute input
-  --> $DIR/name-value.rs:35:1
+  --> $DIR/name-value.rs:50:1
    |
 LL | #[coverage = "off"]
    | ^^^^^^^^^^^^^^^^^^^
@@ -149,21 +164,6 @@ LL +     #[coverage(on)]
    |
 
 error: malformed `coverage` attribute input
-  --> $DIR/name-value.rs:50:1
-   |
-LL | #[coverage = "off"]
-   | ^^^^^^^^^^^^^^^^^^^
-   |
-help: the following are the possible correct uses
-   |
-LL - #[coverage = "off"]
-LL + #[coverage(off)]
-   |
-LL - #[coverage = "off"]
-LL + #[coverage(on)]
-   |
-
-error: malformed `coverage` attribute input
   --> $DIR/name-value.rs:64:1
    |
 LL | #[coverage = "off"]
diff --git a/tests/ui/coverage-attr/word-only.stderr b/tests/ui/coverage-attr/word-only.stderr
index 612301885dc..2773db9c857 100644
--- a/tests/ui/coverage-attr/word-only.stderr
+++ b/tests/ui/coverage-attr/word-only.stderr
@@ -38,6 +38,19 @@ LL | #[coverage(on)]
    |           ++++
 
 error: malformed `coverage` attribute input
+  --> $DIR/word-only.rs:26:1
+   |
+LL | #[coverage]
+   | ^^^^^^^^^^^
+   |
+help: the following are the possible correct uses
+   |
+LL | #[coverage(off)]
+   |           +++++
+LL | #[coverage(on)]
+   |           ++++
+
+error: malformed `coverage` attribute input
   --> $DIR/word-only.rs:29:5
    |
 LL |     #[coverage]
@@ -51,7 +64,7 @@ LL |     #[coverage(on)]
    |               ++++
 
 error: malformed `coverage` attribute input
-  --> $DIR/word-only.rs:26:1
+  --> $DIR/word-only.rs:35:1
    |
 LL | #[coverage]
    | ^^^^^^^^^^^
@@ -90,7 +103,7 @@ LL |     #[coverage(on)]
    |               ++++
 
 error: malformed `coverage` attribute input
-  --> $DIR/word-only.rs:35:1
+  --> $DIR/word-only.rs:50:1
    |
 LL | #[coverage]
    | ^^^^^^^^^^^
@@ -129,19 +142,6 @@ LL |     #[coverage(on)]
    |               ++++
 
 error: malformed `coverage` attribute input
-  --> $DIR/word-only.rs:50:1
-   |
-LL | #[coverage]
-   | ^^^^^^^^^^^
-   |
-help: the following are the possible correct uses
-   |
-LL | #[coverage(off)]
-   |           +++++
-LL | #[coverage(on)]
-   |           ++++
-
-error: malformed `coverage` attribute input
   --> $DIR/word-only.rs:64:1
    |
 LL | #[coverage]
diff --git a/tests/ui/crate_type_flag.rs b/tests/ui/crate_type_flag.rs
index 4f3cfbae45d..03bea3638e1 100644
--- a/tests/ui/crate_type_flag.rs
+++ b/tests/ui/crate_type_flag.rs
@@ -1,4 +1,5 @@
 //@ compile-flags: --crate-type dynlib
-//@ error-pattern: unknown crate type: `dynlib`, expected one of: `lib`, `rlib`, `staticlib`, `dylib`, `cdylib`, `bin`, `proc-macro`
 
 fn main() {}
+
+//~? ERROR unknown crate type: `dynlib`
diff --git a/tests/ui/custom_test_frameworks/full.rs b/tests/ui/custom_test_frameworks/full.rs
index 289767b1f69..57b55e9437b 100644
--- a/tests/ui/custom_test_frameworks/full.rs
+++ b/tests/ui/custom_test_frameworks/full.rs
@@ -25,4 +25,17 @@ impl example_runner::Testable for IsFoo {
 const TEST_1: IsFoo = IsFoo("hello");
 
 #[test_case]
-const TEST_2: IsFoo = IsFoo("foo");
+static TEST_2: IsFoo = IsFoo("foo");
+
+// FIXME: `test_case` is currently ignored on anything other than
+// fn/const/static. This should be an error. Compare this with `#[test]` and
+// #[bench] whose expanders emit "error: expected a non-associated function,
+// found […]" if applied to invalid items.
+#[test_case]
+struct _S;
+
+// FIXME: as above.
+#[test_case]
+impl _S {
+    fn _f() {}
+}
diff --git a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs
index 3bff4471698..7f85cbf227a 100644
--- a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs
+++ b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs
@@ -1,9 +1,9 @@
+//~ ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
 // Make sure the compiler does not ICE when trying to generate the debuginfo name of a type that
 // causes a layout error. See https://github.com/rust-lang/rust/issues/94961.
 
 //@ compile-flags:-C debuginfo=2
 //@ build-fail
-//@ error-pattern: too big for the target architecture
 
 #![crate_type = "rlib"]
 
diff --git a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs
index 6a3f8f4c249..b79b5ff6fdb 100644
--- a/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs
+++ b/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs
@@ -1,11 +1,12 @@
+//FIXME~ ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
 // Make sure the compiler does not ICE when trying to generate the debuginfo name of a type that
 // causes a layout error.
 // This version of the test already ICE'd before the commit that introduce the ICE described in
 // https://github.com/rust-lang/rust/issues/94961.
 
-//@ compile-flags:-C debuginfo=2
+//@ compile-flags:-C debuginfo=2 --error-format=human
 //@ build-fail
-//@ error-pattern: too big for the target architecture
+//@ error-pattern: values of the type `[u8; usize::MAX]` are too big for the target architecture
 
 #![crate_type = "rlib"]
 
@@ -16,3 +17,6 @@ pub enum Foo<T> {
 pub fn foo() -> usize {
     std::mem::size_of::<Foo<u8>>()
 }
+
+// FIXME: the error is reported on different lines on different targets
+//FIXME~? ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
diff --git a/tests/ui/debuginfo/dwarf-versions.rs b/tests/ui/debuginfo/dwarf-versions.rs
index 806ade51a99..6030b2fcf3c 100644
--- a/tests/ui/debuginfo/dwarf-versions.rs
+++ b/tests/ui/debuginfo/dwarf-versions.rs
@@ -4,7 +4,6 @@
 //@ revisions: zero one two three four five six
 
 //@[zero] compile-flags: -Zdwarf-version=0
-//@[zero] error-pattern: requested DWARF version 0 is not supported
 
 //@[one] compile-flags: -Zdwarf-version=1
 //@[one] error-pattern: requested DWARF version 1 is not supported
@@ -22,7 +21,6 @@
 //@[five] check-pass
 
 //@[six] compile-flags: -Zdwarf-version=6
-//@[six] error-pattern: requested DWARF version 6 is not supported
 
 //@ compile-flags: -g --target x86_64-unknown-linux-gnu --crate-type cdylib
 //@ needs-llvm-components: x86
@@ -36,3 +34,7 @@
 pub trait Sized {}
 
 pub fn foo() {}
+
+//[zero]~? ERROR requested DWARF version 0 is not supported
+//[one]~? ERROR requested DWARF version 1 is not supported
+//[six]~? ERROR requested DWARF version 6 is not supported
diff --git a/tests/ui/debuginfo/windows_gnu_split_debuginfo_packed.rs b/tests/ui/debuginfo/windows_gnu_split_debuginfo_packed.rs
index 896bbac7d8e..75b8141cc38 100644
--- a/tests/ui/debuginfo/windows_gnu_split_debuginfo_packed.rs
+++ b/tests/ui/debuginfo/windows_gnu_split_debuginfo_packed.rs
@@ -1,6 +1,5 @@
 //@ revisions: aarch64_gl i686_g i686_gl i686_uwp_g x86_64_g x86_64_gl x86_64_uwp_g
 //@ compile-flags: --crate-type cdylib -Csplit-debuginfo=packed
-//@ error-pattern: error: `-Csplit-debuginfo=packed` is unstable on this platform
 
 //@[aarch64_gl] compile-flags: --target aarch64-pc-windows-gnullvm
 //@[aarch64_gl] needs-llvm-components: aarch64
@@ -27,3 +26,5 @@
 
 #![no_core]
 #![no_std]
+
+//~? ERROR `-Csplit-debuginfo=packed` is unstable on this platform
diff --git a/tests/ui/debuginfo/windows_gnu_split_debuginfo_unpacked.rs b/tests/ui/debuginfo/windows_gnu_split_debuginfo_unpacked.rs
index 54a88c91217..3f4da555aad 100644
--- a/tests/ui/debuginfo/windows_gnu_split_debuginfo_unpacked.rs
+++ b/tests/ui/debuginfo/windows_gnu_split_debuginfo_unpacked.rs
@@ -1,6 +1,5 @@
 //@ revisions: aarch64_gl i686_g i686_gl i686_uwp_g x86_64_g x86_64_gl x86_64_uwp_g
 //@ compile-flags: --crate-type cdylib -Csplit-debuginfo=unpacked
-//@ error-pattern: error: `-Csplit-debuginfo=unpacked` is unstable on this platform
 
 //@[aarch64_gl] compile-flags: --target aarch64-pc-windows-gnullvm
 //@[aarch64_gl] needs-llvm-components: aarch64
@@ -27,3 +26,5 @@
 
 #![no_core]
 #![no_std]
+
+//~? ERROR `-Csplit-debuginfo=unpacked` is unstable on this platform
diff --git a/tests/ui/deprecation/deprecation-lint-2.rs b/tests/ui/deprecation/deprecation-lint-2.rs
index 553b1afe45c..f22eebb53a0 100644
--- a/tests/ui/deprecation/deprecation-lint-2.rs
+++ b/tests/ui/deprecation/deprecation-lint-2.rs
@@ -1,5 +1,4 @@
 //@ aux-build:deprecation-lint.rs
-//@ error-pattern: use of deprecated function
 
 #![deny(deprecated)]
 
@@ -9,5 +8,5 @@ extern crate deprecation_lint;
 use deprecation_lint::*;
 
 fn main() {
-    macro_test!();
+    macro_test!(); //~ ERROR use of deprecated function `deprecation_lint::deprecated`: text
 }
diff --git a/tests/ui/deprecation/deprecation-lint-2.stderr b/tests/ui/deprecation/deprecation-lint-2.stderr
index 7d411c00445..ebc760bfe7b 100644
--- a/tests/ui/deprecation/deprecation-lint-2.stderr
+++ b/tests/ui/deprecation/deprecation-lint-2.stderr
@@ -1,11 +1,11 @@
 error: use of deprecated function `deprecation_lint::deprecated`: text
-  --> $DIR/deprecation-lint-2.rs:12:5
+  --> $DIR/deprecation-lint-2.rs:11:5
    |
 LL |     macro_test!();
    |     ^^^^^^^^^^^^^
    |
 note: the lint level is defined here
-  --> $DIR/deprecation-lint-2.rs:4:9
+  --> $DIR/deprecation-lint-2.rs:3:9
    |
 LL | #![deny(deprecated)]
    |         ^^^^^^^^^^
diff --git a/tests/ui/deprecation/deprecation-lint-3.rs b/tests/ui/deprecation/deprecation-lint-3.rs
index f01fc924457..5a9ca9a2d0a 100644
--- a/tests/ui/deprecation/deprecation-lint-3.rs
+++ b/tests/ui/deprecation/deprecation-lint-3.rs
@@ -1,5 +1,4 @@
 //@ aux-build:deprecation-lint.rs
-//@ error-pattern: use of deprecated function
 
 #![deny(deprecated)]
 #![allow(warnings)]
@@ -11,4 +10,5 @@ use deprecation_lint::*;
 
 fn main() {
     macro_test_arg_nested!(deprecated_text);
+    //~^ ERROR use of deprecated function `deprecation_lint::deprecated_text`: text
 }
diff --git a/tests/ui/deprecation/deprecation-lint-3.stderr b/tests/ui/deprecation/deprecation-lint-3.stderr
index 1723b7bbd05..8bfe08cf6d5 100644
--- a/tests/ui/deprecation/deprecation-lint-3.stderr
+++ b/tests/ui/deprecation/deprecation-lint-3.stderr
@@ -1,11 +1,11 @@
 error: use of deprecated function `deprecation_lint::deprecated_text`: text
-  --> $DIR/deprecation-lint-3.rs:13:28
+  --> $DIR/deprecation-lint-3.rs:12:28
    |
 LL |     macro_test_arg_nested!(deprecated_text);
    |                            ^^^^^^^^^^^^^^^
    |
 note: the lint level is defined here
-  --> $DIR/deprecation-lint-3.rs:4:9
+  --> $DIR/deprecation-lint-3.rs:3:9
    |
 LL | #![deny(deprecated)]
    |         ^^^^^^^^^^
diff --git a/tests/ui/drop/nonsense-drop-impl-issue-139278.rs b/tests/ui/drop/nonsense-drop-impl-issue-139278.rs
new file mode 100644
index 00000000000..86f4e4d8607
--- /dev/null
+++ b/tests/ui/drop/nonsense-drop-impl-issue-139278.rs
@@ -0,0 +1,10 @@
+//@ check-fail
+struct Foo;
+
+impl Drop for Foo { //~ ERROR: not all trait items implemented
+    const SPLOK: u32 = 0; //~ ERROR: not a member of trait
+}
+
+const X: Foo = Foo;
+
+fn main() {}
diff --git a/tests/ui/drop/nonsense-drop-impl-issue-139278.stderr b/tests/ui/drop/nonsense-drop-impl-issue-139278.stderr
new file mode 100644
index 00000000000..825e883fa6d
--- /dev/null
+++ b/tests/ui/drop/nonsense-drop-impl-issue-139278.stderr
@@ -0,0 +1,18 @@
+error[E0438]: const `SPLOK` is not a member of trait `Drop`
+  --> $DIR/nonsense-drop-impl-issue-139278.rs:5:5
+   |
+LL |     const SPLOK: u32 = 0;
+   |     ^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Drop`
+
+error[E0046]: not all trait items implemented, missing: `drop`
+  --> $DIR/nonsense-drop-impl-issue-139278.rs:4:1
+   |
+LL | impl Drop for Foo {
+   | ^^^^^^^^^^^^^^^^^ missing `drop` in implementation
+   |
+   = help: implement the missing item: `fn drop(&mut self) { todo!() }`
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0046, E0438.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/duplicate/dupe-symbols-4.rs b/tests/ui/duplicate/dupe-symbols-4.rs
index a9b7d689ad4..d961ba10e72 100644
--- a/tests/ui/duplicate/dupe-symbols-4.rs
+++ b/tests/ui/duplicate/dupe-symbols-4.rs
@@ -1,7 +1,5 @@
 //@ build-fail
 
-//
-//@ error-pattern: symbol `fail` is already defined
 #![crate_type="rlib"]
 #![allow(warnings)]
 
@@ -20,5 +18,5 @@ impl A for B {
 
 impl A for C {
     #[no_mangle]
-    fn fail(self) {}
+    fn fail(self) {} //~ ERROR symbol `fail` is already defined
 }
diff --git a/tests/ui/duplicate/dupe-symbols-4.stderr b/tests/ui/duplicate/dupe-symbols-4.stderr
index 4c5f1e7867f..e85d3f2b063 100644
--- a/tests/ui/duplicate/dupe-symbols-4.stderr
+++ b/tests/ui/duplicate/dupe-symbols-4.stderr
@@ -1,5 +1,5 @@
 error: symbol `fail` is already defined
-  --> $DIR/dupe-symbols-4.rs:23:5
+  --> $DIR/dupe-symbols-4.rs:21:5
    |
 LL |     fn fail(self) {}
    |     ^^^^^^^^^^^^^
diff --git a/tests/ui/duplicate/dupe-symbols-7.rs b/tests/ui/duplicate/dupe-symbols-7.rs
index 162c3c40446..ea17942493c 100644
--- a/tests/ui/duplicate/dupe-symbols-7.rs
+++ b/tests/ui/duplicate/dupe-symbols-7.rs
@@ -1,10 +1,7 @@
 //@ build-fail
 //@ ignore-wasi wasi does different things with the `main` symbol
 
-//
-//@ error-pattern: entry symbol `main` declared multiple times
-
 #![allow(warnings)]
 
 #[no_mangle]
-fn main(){}
+fn main(){} //~ ERROR entry symbol `main` declared multiple times
diff --git a/tests/ui/duplicate/dupe-symbols-7.stderr b/tests/ui/duplicate/dupe-symbols-7.stderr
index aa6213af2e4..d7503856939 100644
--- a/tests/ui/duplicate/dupe-symbols-7.stderr
+++ b/tests/ui/duplicate/dupe-symbols-7.stderr
@@ -1,5 +1,5 @@
 error: entry symbol `main` declared multiple times
-  --> $DIR/dupe-symbols-7.rs:10:1
+  --> $DIR/dupe-symbols-7.rs:7:1
    |
 LL | fn main(){}
    | ^^^^^^^^^
diff --git a/tests/ui/duplicate/dupe-symbols-8.rs b/tests/ui/duplicate/dupe-symbols-8.rs
index 258e91fa8c8..b3c635f38ed 100644
--- a/tests/ui/duplicate/dupe-symbols-8.rs
+++ b/tests/ui/duplicate/dupe-symbols-8.rs
@@ -1,11 +1,10 @@
 //@ build-fail
-//@ error-pattern: entry symbol `main` declared multiple times
 //@ ignore-wasi wasi does different things with the `main` symbol
 //
 // See #67946.
 
 #![allow(warnings)]
-fn main() {
+fn main() { //~ ERROR entry symbol `main` declared multiple times
     extern "Rust" {
      fn main();
     }
diff --git a/tests/ui/duplicate/dupe-symbols-8.stderr b/tests/ui/duplicate/dupe-symbols-8.stderr
index 0f47d3683b5..494fdcca327 100644
--- a/tests/ui/duplicate/dupe-symbols-8.stderr
+++ b/tests/ui/duplicate/dupe-symbols-8.stderr
@@ -1,5 +1,5 @@
 error: entry symbol `main` declared multiple times
-  --> $DIR/dupe-symbols-8.rs:8:1
+  --> $DIR/dupe-symbols-8.rs:7:1
    |
 LL | fn main() {
    | ^^^^^^^^^
diff --git a/tests/ui/elided-test.rs b/tests/ui/elided-test.rs
index 025b75c1b5c..2bedc25e17b 100644
--- a/tests/ui/elided-test.rs
+++ b/tests/ui/elided-test.rs
@@ -1,7 +1,5 @@
-//@ error-pattern: `main` function not found
-
 // Since we're not compiling a test runner this function should be elided
 // and the build will fail because main doesn't exist
 #[test]
 fn main() {
-}
+} //~ ERROR `main` function not found in crate `elided_test`
diff --git a/tests/ui/elided-test.stderr b/tests/ui/elided-test.stderr
index e323b8ba7ea..7aebe5d8264 100644
--- a/tests/ui/elided-test.stderr
+++ b/tests/ui/elided-test.stderr
@@ -1,5 +1,5 @@
 error[E0601]: `main` function not found in crate `elided_test`
-  --> $DIR/elided-test.rs:7:2
+  --> $DIR/elided-test.rs:5:2
    |
 LL | }
    |  ^ consider adding a `main` function to `$DIR/elided-test.rs`
diff --git a/tests/ui/error-codes/E0602.rs b/tests/ui/error-codes/E0602.rs
index 1849fd2d895..cba15bb92d4 100644
--- a/tests/ui/error-codes/E0602.rs
+++ b/tests/ui/error-codes/E0602.rs
@@ -1,8 +1,11 @@
 //@ compile-flags:-D bogus
 //@ check-pass
 
-//@ error-pattern:E0602
 //@ error-pattern:requested on the command line with `-D bogus`
 //@ error-pattern:`#[warn(unknown_lints)]` on by default
 
 fn main() {}
+
+//~? WARN unknown lint: `bogus`
+//~? WARN unknown lint: `bogus`
+//~? WARN unknown lint: `bogus`
diff --git a/tests/ui/errors/remap-path-prefix-reverse.local-self.stderr b/tests/ui/errors/remap-path-prefix-reverse.local-self.stderr
index 7aa66be0d09..b4f83f6bfc0 100644
--- a/tests/ui/errors/remap-path-prefix-reverse.local-self.stderr
+++ b/tests/ui/errors/remap-path-prefix-reverse.local-self.stderr
@@ -1,7 +1,7 @@
 error[E0423]: expected value, found struct `remapped_dep::SomeStruct`
   --> $DIR/remap-path-prefix-reverse.rs:16:13
    |
-LL |     let _ = remapped_dep::SomeStruct; // ~ERROR E0423
+LL |     let _ = remapped_dep::SomeStruct;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `remapped_dep::SomeStruct {}`
    |
   ::: remapped-aux/remapped_dep.rs:4:1
diff --git a/tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr b/tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr
index 7aa66be0d09..b4f83f6bfc0 100644
--- a/tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr
+++ b/tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr
@@ -1,7 +1,7 @@
 error[E0423]: expected value, found struct `remapped_dep::SomeStruct`
   --> $DIR/remap-path-prefix-reverse.rs:16:13
    |
-LL |     let _ = remapped_dep::SomeStruct; // ~ERROR E0423
+LL |     let _ = remapped_dep::SomeStruct;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `remapped_dep::SomeStruct {}`
    |
   ::: remapped-aux/remapped_dep.rs:4:1
diff --git a/tests/ui/errors/remap-path-prefix-reverse.rs b/tests/ui/errors/remap-path-prefix-reverse.rs
index 7743e38f50f..28fdabb8f4d 100644
--- a/tests/ui/errors/remap-path-prefix-reverse.rs
+++ b/tests/ui/errors/remap-path-prefix-reverse.rs
@@ -13,5 +13,6 @@ extern crate remapped_dep;
 fn main() {
     // The actual error is irrelevant. The important part it that is should show
     // a snippet of the dependency's source.
-    let _ = remapped_dep::SomeStruct; // ~ERROR E0423
+    let _ = remapped_dep::SomeStruct;
+    //~^ ERROR expected value, found struct `remapped_dep::SomeStruct`
 }
diff --git a/tests/ui/errors/remap-path-prefix-sysroot.rs b/tests/ui/errors/remap-path-prefix-sysroot.rs
index 7281e6da094..5e2e4fab51d 100644
--- a/tests/ui/errors/remap-path-prefix-sysroot.rs
+++ b/tests/ui/errors/remap-path-prefix-sysroot.rs
@@ -3,7 +3,6 @@
 //@ [with-remap]compile-flags: --remap-path-prefix={{rust-src-base}}=remapped
 //@ [with-remap]compile-flags: --remap-path-prefix={{src-base}}=remapped-tests-ui
 //@ [without-remap]compile-flags:
-//@ error-pattern: E0507
 
 // The $SRC_DIR*.rs:LL:COL normalisation doesn't kick in automatically
 // as the remapped revision will not begin with $SRC_DIR_REAL,
@@ -18,7 +17,10 @@ struct Worker {
 impl Drop for Worker {
     fn drop(&mut self) {
         self.thread.join().unwrap();
+        //[without-remap]~^ ERROR cannot move out of `self.thread` which is behind a mutable reference
     }
 }
 
 pub fn main(){}
+
+//[with-remap]~? ERROR cannot move out of `self.thread` which is behind a mutable reference
diff --git a/tests/ui/errors/remap-path-prefix.normal.stderr b/tests/ui/errors/remap-path-prefix.normal.stderr
index 46d33d26052..5a125a7024a 100644
--- a/tests/ui/errors/remap-path-prefix.normal.stderr
+++ b/tests/ui/errors/remap-path-prefix.normal.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `ferris` in this scope
-  --> remapped/errors/remap-path-prefix.rs:19:5
+  --> remapped/errors/remap-path-prefix.rs:15:5
    |
 LL |     ferris
    |     ^^^^^^ not found in this scope
diff --git a/tests/ui/errors/remap-path-prefix.rs b/tests/ui/errors/remap-path-prefix.rs
index 8809caa4d4f..7e38e16280f 100644
--- a/tests/ui/errors/remap-path-prefix.rs
+++ b/tests/ui/errors/remap-path-prefix.rs
@@ -7,14 +7,13 @@
 // The remapped paths are not normalized by compiletest.
 //@ normalize-stderr: "\\(errors)" -> "/$1"
 
-// The remapped paths aren't recognized by compiletest, so we
-// cannot use line-specific patterns.
-//@ error-pattern: E0425
-
 fn main() {
     // We cannot actually put an ERROR marker here because
     // the file name in the error message is not what the
     // test framework expects (since the filename gets remapped).
     // We still test the expected error in the stderr file.
-    ferris
+    ferris //[without-diagnostic-scope]~ ERROR cannot find value `ferris` in this scope
 }
+
+//[normal]~? ERROR cannot find value `ferris` in this scope
+//[with-diagnostic-scope]~? ERROR cannot find value `ferris` in this scope
diff --git a/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr b/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr
index 46d33d26052..5a125a7024a 100644
--- a/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr
+++ b/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `ferris` in this scope
-  --> remapped/errors/remap-path-prefix.rs:19:5
+  --> remapped/errors/remap-path-prefix.rs:15:5
    |
 LL |     ferris
    |     ^^^^^^ not found in this scope
diff --git a/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr b/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr
index 0badea6e27b..b6332685dbf 100644
--- a/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr
+++ b/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `ferris` in this scope
-  --> $DIR/remap-path-prefix.rs:19:5
+  --> $DIR/remap-path-prefix.rs:15:5
    |
 LL |     ferris
    |     ^^^^^^ not found in this scope
diff --git a/tests/ui/expr/if/if-typeck.rs b/tests/ui/expr/if/if-typeck.rs
index ba828f11e79..0985598f0f7 100644
--- a/tests/ui/expr/if/if-typeck.rs
+++ b/tests/ui/expr/if/if-typeck.rs
@@ -1,4 +1,3 @@
-//@ error-pattern:mismatched types
 // issue #513
 
 fn f() { }
@@ -6,5 +5,5 @@ fn f() { }
 fn main() {
 
     // f is not a bool
-    if f { }
+    if f { } //~ ERROR mismatched types
 }
diff --git a/tests/ui/expr/if/if-typeck.stderr b/tests/ui/expr/if/if-typeck.stderr
index 1be43a20105..bca00f890cb 100644
--- a/tests/ui/expr/if/if-typeck.stderr
+++ b/tests/ui/expr/if/if-typeck.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/if-typeck.rs:9:8
+  --> $DIR/if-typeck.rs:8:8
    |
 LL |     if f { }
    |        ^ expected `bool`, found fn item
diff --git a/tests/ui/ext-nonexistent.rs b/tests/ui/ext-nonexistent.rs
index a66407953a9..1293324b67e 100644
--- a/tests/ui/ext-nonexistent.rs
+++ b/tests/ui/ext-nonexistent.rs
@@ -1,2 +1,2 @@
-//@ error-pattern:cannot find macro
 fn main() { iamnotanextensionthatexists!(""); }
+//~^ ERROR cannot find macro `iamnotanextensionthatexists` in this scope
diff --git a/tests/ui/ext-nonexistent.stderr b/tests/ui/ext-nonexistent.stderr
index 8891e823e4a..edb59bba6e5 100644
--- a/tests/ui/ext-nonexistent.stderr
+++ b/tests/ui/ext-nonexistent.stderr
@@ -1,5 +1,5 @@
 error: cannot find macro `iamnotanextensionthatexists` in this scope
-  --> $DIR/ext-nonexistent.rs:2:13
+  --> $DIR/ext-nonexistent.rs:1:13
    |
 LL | fn main() { iamnotanextensionthatexists!(""); }
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/extern-flag/empty-extern-arg.rs b/tests/ui/extern-flag/empty-extern-arg.rs
index dea68b5b1ad..2dee721ed03 100644
--- a/tests/ui/extern-flag/empty-extern-arg.rs
+++ b/tests/ui/extern-flag/empty-extern-arg.rs
@@ -1,6 +1,9 @@
+//~ ERROR extern location for std does not exist
 //@ compile-flags: --extern std=
-//@ error-pattern: extern location for std does not exist
 //@ needs-unwind since it affects the error output
 //@ ignore-emscripten missing eh_catch_typeinfo lang item
 
 fn main() {}
+
+//~? ERROR `#[panic_handler]` function required, but not found
+//~? ERROR unwinding panics are not supported without std
diff --git a/tests/ui/extern-flag/invalid-crate-name-dashed.rs b/tests/ui/extern-flag/invalid-crate-name-dashed.rs
index b846214175e..b336cc84569 100644
--- a/tests/ui/extern-flag/invalid-crate-name-dashed.rs
+++ b/tests/ui/extern-flag/invalid-crate-name-dashed.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: --extern=my-awesome-library=libawesome.rlib
-//@ error-pattern: crate name `my-awesome-library` passed to `--extern` is not a valid ASCII identifier
 //@ error-pattern: consider replacing the dashes with underscores: `my_awesome_library`
 
 // In a sense, this is a regression test for issue #113035. We no longer suggest
@@ -8,3 +7,5 @@
 pub use my_awesome_library::*;
 
 fn main() {}
+
+//~? ERROR crate name `my-awesome-library` passed to `--extern` is not a valid ASCII identifier
diff --git a/tests/ui/extern-flag/invalid-crate-name-non-ascii.rs b/tests/ui/extern-flag/invalid-crate-name-non-ascii.rs
index 5231503820f..71818938283 100644
--- a/tests/ui/extern-flag/invalid-crate-name-non-ascii.rs
+++ b/tests/ui/extern-flag/invalid-crate-name-non-ascii.rs
@@ -1,4 +1,5 @@
 //@ compile-flags: --extern čɍαţē=libnon_ascii.rlib
-//@ error-pattern: crate name `čɍαţē` passed to `--extern` is not a valid ASCII identifier
 
 fn main() {}
+
+//~? ERROR crate name `čɍαţē` passed to `--extern` is not a valid ASCII identifier
diff --git a/tests/ui/extern-flag/invalid-crate-name.rs b/tests/ui/extern-flag/invalid-crate-name.rs
index c7b5b637217..5d73e119673 100644
--- a/tests/ui/extern-flag/invalid-crate-name.rs
+++ b/tests/ui/extern-flag/invalid-crate-name.rs
@@ -1,4 +1,5 @@
 //@ compile-flags: --extern=?#1%$
-//@ error-pattern: crate name `?#1%$` passed to `--extern` is not a valid ASCII identifier
 
 fn main() {}
+
+//~? ERROR crate name `?#1%$` passed to `--extern` is not a valid ASCII identifier
diff --git a/tests/ui/extern-flag/no-force-extern.rs b/tests/ui/extern-flag/no-force-extern.rs
index 11d2f91c7bb..c9317abe292 100644
--- a/tests/ui/extern-flag/no-force-extern.rs
+++ b/tests/ui/extern-flag/no-force-extern.rs
@@ -1,10 +1,12 @@
 //@ aux-crate:panic_handler=panic_handler.rs
 //@ ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header)
 // compile_flags: -Zunstable-options --crate-type dylib
-//@ error-pattern: `#[panic_handler]` function required, but not found
 //@ dont-check-compiler-stderr
 //@ edition: 2018
 
 #![no_std]
 
-fn foo() {}
+fn foo() {} //~ ERROR `main` function not found in crate `no_force_extern`
+
+//~? ERROR `#[panic_handler]` function required, but not found
+//~? ERROR unwinding panics are not supported without std
diff --git a/tests/ui/feature-gates/feature-gate-f128.e2015.stderr b/tests/ui/feature-gates/feature-gate-f128.e2015.stderr
index 771aee79dce..7e8ea5e948d 100644
--- a/tests/ui/feature-gates/feature-gate-f128.e2015.stderr
+++ b/tests/ui/feature-gates/feature-gate-f128.e2015.stderr
@@ -19,7 +19,7 @@ LL |     let a: f128 = 100.0;
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the type `f128` is unstable
-  --> $DIR/feature-gate-f128.rs:15:11
+  --> $DIR/feature-gate-f128.rs:16:11
    |
 LL | fn foo(a: f128) {}
    |           ^^^^
@@ -29,7 +29,7 @@ LL | fn foo(a: f128) {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the type `f128` is unstable
-  --> $DIR/feature-gate-f128.rs:18:8
+  --> $DIR/feature-gate-f128.rs:19:8
    |
 LL |     a: f128,
    |        ^^^^
@@ -48,6 +48,16 @@ LL |     let b = 0.0f128;
    = help: add `#![feature(f128)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error: aborting due to 5 previous errors
+error[E0658]: the type `f128` is unstable
+  --> $DIR/feature-gate-f128.rs:12:13
+   |
+LL |     let c = 0f128;
+   |             ^^^^^
+   |
+   = note: see issue #116909 <https://github.com/rust-lang/rust/issues/116909> for more information
+   = help: add `#![feature(f128)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 6 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-f128.e2018.stderr b/tests/ui/feature-gates/feature-gate-f128.e2018.stderr
index 771aee79dce..7e8ea5e948d 100644
--- a/tests/ui/feature-gates/feature-gate-f128.e2018.stderr
+++ b/tests/ui/feature-gates/feature-gate-f128.e2018.stderr
@@ -19,7 +19,7 @@ LL |     let a: f128 = 100.0;
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the type `f128` is unstable
-  --> $DIR/feature-gate-f128.rs:15:11
+  --> $DIR/feature-gate-f128.rs:16:11
    |
 LL | fn foo(a: f128) {}
    |           ^^^^
@@ -29,7 +29,7 @@ LL | fn foo(a: f128) {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the type `f128` is unstable
-  --> $DIR/feature-gate-f128.rs:18:8
+  --> $DIR/feature-gate-f128.rs:19:8
    |
 LL |     a: f128,
    |        ^^^^
@@ -48,6 +48,16 @@ LL |     let b = 0.0f128;
    = help: add `#![feature(f128)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error: aborting due to 5 previous errors
+error[E0658]: the type `f128` is unstable
+  --> $DIR/feature-gate-f128.rs:12:13
+   |
+LL |     let c = 0f128;
+   |             ^^^^^
+   |
+   = note: see issue #116909 <https://github.com/rust-lang/rust/issues/116909> for more information
+   = help: add `#![feature(f128)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 6 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-f128.rs b/tests/ui/feature-gates/feature-gate-f128.rs
index d25b6dde4ee..dcbe60e934a 100644
--- a/tests/ui/feature-gates/feature-gate-f128.rs
+++ b/tests/ui/feature-gates/feature-gate-f128.rs
@@ -9,6 +9,7 @@ const A: f128 = 10.0; //~ ERROR the type `f128` is unstable
 pub fn main() {
     let a: f128 = 100.0; //~ ERROR the type `f128` is unstable
     let b = 0.0f128; //~ ERROR the type `f128` is unstable
+    let c = 0f128; //~ ERROR the type `f128` is unstable
     foo(1.23);
 }
 
diff --git a/tests/ui/feature-gates/feature-gate-f16.e2015.stderr b/tests/ui/feature-gates/feature-gate-f16.e2015.stderr
index 2bb3b59465a..5d1ca8f6d04 100644
--- a/tests/ui/feature-gates/feature-gate-f16.e2015.stderr
+++ b/tests/ui/feature-gates/feature-gate-f16.e2015.stderr
@@ -19,7 +19,7 @@ LL |     let a: f16 = 100.0;
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the type `f16` is unstable
-  --> $DIR/feature-gate-f16.rs:15:11
+  --> $DIR/feature-gate-f16.rs:16:11
    |
 LL | fn foo(a: f16) {}
    |           ^^^
@@ -29,7 +29,7 @@ LL | fn foo(a: f16) {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the type `f16` is unstable
-  --> $DIR/feature-gate-f16.rs:18:8
+  --> $DIR/feature-gate-f16.rs:19:8
    |
 LL |     a: f16,
    |        ^^^
@@ -48,6 +48,16 @@ LL |     let b = 0.0f16;
    = help: add `#![feature(f16)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error: aborting due to 5 previous errors
+error[E0658]: the type `f16` is unstable
+  --> $DIR/feature-gate-f16.rs:12:13
+   |
+LL |     let c = 0f16;
+   |             ^^^^
+   |
+   = note: see issue #116909 <https://github.com/rust-lang/rust/issues/116909> for more information
+   = help: add `#![feature(f16)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 6 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-f16.e2018.stderr b/tests/ui/feature-gates/feature-gate-f16.e2018.stderr
index 2bb3b59465a..5d1ca8f6d04 100644
--- a/tests/ui/feature-gates/feature-gate-f16.e2018.stderr
+++ b/tests/ui/feature-gates/feature-gate-f16.e2018.stderr
@@ -19,7 +19,7 @@ LL |     let a: f16 = 100.0;
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the type `f16` is unstable
-  --> $DIR/feature-gate-f16.rs:15:11
+  --> $DIR/feature-gate-f16.rs:16:11
    |
 LL | fn foo(a: f16) {}
    |           ^^^
@@ -29,7 +29,7 @@ LL | fn foo(a: f16) {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: the type `f16` is unstable
-  --> $DIR/feature-gate-f16.rs:18:8
+  --> $DIR/feature-gate-f16.rs:19:8
    |
 LL |     a: f16,
    |        ^^^
@@ -48,6 +48,16 @@ LL |     let b = 0.0f16;
    = help: add `#![feature(f16)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error: aborting due to 5 previous errors
+error[E0658]: the type `f16` is unstable
+  --> $DIR/feature-gate-f16.rs:12:13
+   |
+LL |     let c = 0f16;
+   |             ^^^^
+   |
+   = note: see issue #116909 <https://github.com/rust-lang/rust/issues/116909> for more information
+   = help: add `#![feature(f16)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 6 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-f16.rs b/tests/ui/feature-gates/feature-gate-f16.rs
index af906d71f5f..f748c603efe 100644
--- a/tests/ui/feature-gates/feature-gate-f16.rs
+++ b/tests/ui/feature-gates/feature-gate-f16.rs
@@ -9,6 +9,7 @@ const A: f16 = 10.0; //~ ERROR the type `f16` is unstable
 pub fn main() {
     let a: f16 = 100.0; //~ ERROR the type `f16` is unstable
     let b = 0.0f16; //~ ERROR the type `f16` is unstable
+    let c = 0f16; //~ ERROR the type `f16` is unstable
     foo(1.23);
 }
 
diff --git a/tests/ui/feature-gates/feature-gate-inline_const_pat.rs b/tests/ui/feature-gates/feature-gate-inline_const_pat.rs
deleted file mode 100644
index 3d0df289fb7..00000000000
--- a/tests/ui/feature-gates/feature-gate-inline_const_pat.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-fn main() {
-    let const { () } = ();
-    //~^ ERROR inline-const in pattern position is experimental [E0658]
-}
diff --git a/tests/ui/feature-gates/feature-gate-inline_const_pat.stderr b/tests/ui/feature-gates/feature-gate-inline_const_pat.stderr
deleted file mode 100644
index 7d7376fa818..00000000000
--- a/tests/ui/feature-gates/feature-gate-inline_const_pat.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0658]: inline-const in pattern position is experimental
-  --> $DIR/feature-gate-inline_const_pat.rs:2:9
-   |
-LL |     let const { () } = ();
-   |         ^^^^^
-   |
-   = note: see issue #76001 <https://github.com/rust-lang/rust/issues/76001> for more information
-   = help: add `#![feature(inline_const_pat)]` 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-movrs_target_feature.rs b/tests/ui/feature-gates/feature-gate-movrs_target_feature.rs
new file mode 100644
index 00000000000..738cab5a06d
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-movrs_target_feature.rs
@@ -0,0 +1,6 @@
+//@ only-x86_64
+#[target_feature(enable = "movrs")]
+//~^ ERROR: currently unstable
+unsafe fn foo() {}
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-movrs_target_feature.stderr b/tests/ui/feature-gates/feature-gate-movrs_target_feature.stderr
new file mode 100644
index 00000000000..16fe7aaead5
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-movrs_target_feature.stderr
@@ -0,0 +1,13 @@
+error[E0658]: the target feature `movrs` is currently unstable
+  --> $DIR/feature-gate-movrs_target_feature.rs:2:18
+   |
+LL | #[target_feature(enable = "movrs")]
+   |                  ^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #137976 <https://github.com/rust-lang/rust/issues/137976> for more information
+   = help: add `#![feature(movrs_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
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-super-let.rs b/tests/ui/feature-gates/feature-gate-super-let.rs
new file mode 100644
index 00000000000..cfe92a42669
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-super-let.rs
@@ -0,0 +1,4 @@
+fn main() {
+    super let a = 1;
+    //~^ ERROR `super let` is experimental
+}
diff --git a/tests/ui/feature-gates/feature-gate-super-let.stderr b/tests/ui/feature-gates/feature-gate-super-let.stderr
new file mode 100644
index 00000000000..a64e1b374f9
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-super-let.stderr
@@ -0,0 +1,13 @@
+error[E0658]: `super let` is experimental
+  --> $DIR/feature-gate-super-let.rs:2:5
+   |
+LL |     super let a = 1;
+   |     ^^^^^
+   |
+   = note: see issue #139076 <https://github.com/rust-lang/rust/issues/139076> for more information
+   = help: add `#![feature(super_let)]` 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/fn/bad-turbofish-hints-issue-121901.rs b/tests/ui/fn/bad-turbofish-hints-issue-121901.rs
new file mode 100644
index 00000000000..1425e576d75
--- /dev/null
+++ b/tests/ui/fn/bad-turbofish-hints-issue-121901.rs
@@ -0,0 +1,8 @@
+// Regression test for the parser wrongfully suggesting turbofish syntax in below syntax errors
+
+type One = for<'a> fn(Box<dyn Send + 'a);
+//~^ ERROR: expected one of `+`, `,`, or `>`, found `)`
+type Two = for<'a> fn(Box<dyn Send + 'a>>);
+//~^ ERROR: unmatched angle bracket
+
+fn main() {}
diff --git a/tests/ui/fn/bad-turbofish-hints-issue-121901.stderr b/tests/ui/fn/bad-turbofish-hints-issue-121901.stderr
new file mode 100644
index 00000000000..aacb326f8a2
--- /dev/null
+++ b/tests/ui/fn/bad-turbofish-hints-issue-121901.stderr
@@ -0,0 +1,25 @@
+error: expected one of `+`, `,`, or `>`, found `)`
+  --> $DIR/bad-turbofish-hints-issue-121901.rs:3:40
+   |
+LL | type One = for<'a> fn(Box<dyn Send + 'a);
+   |                                        ^ expected one of `+`, `,`, or `>`
+   |
+help: you might have meant to end the type parameters here
+   |
+LL | type One = for<'a> fn(Box<dyn Send + 'a>);
+   |                                        +
+
+error: unmatched angle bracket
+  --> $DIR/bad-turbofish-hints-issue-121901.rs:5:41
+   |
+LL | type Two = for<'a> fn(Box<dyn Send + 'a>>);
+   |                                         ^
+   |
+help: remove extra angle bracket
+   |
+LL - type Two = for<'a> fn(Box<dyn Send + 'a>>);
+LL + type Two = for<'a> fn(Box<dyn Send + 'a>);
+   |
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/fn/fn-bad-block-type.rs b/tests/ui/fn/fn-bad-block-type.rs
index c7ad462f143..47ddc583c87 100644
--- a/tests/ui/fn/fn-bad-block-type.rs
+++ b/tests/ui/fn/fn-bad-block-type.rs
@@ -1,5 +1,3 @@
-//@ error-pattern:mismatched types
-
-fn f() -> isize { true }
+fn f() -> isize { true } //~ ERROR mismatched types
 
 fn main() { }
diff --git a/tests/ui/fn/fn-bad-block-type.stderr b/tests/ui/fn/fn-bad-block-type.stderr
index 6917bea6591..287caee4582 100644
--- a/tests/ui/fn/fn-bad-block-type.stderr
+++ b/tests/ui/fn/fn-bad-block-type.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/fn-bad-block-type.rs:3:19
+  --> $DIR/fn-bad-block-type.rs:1:19
    |
 LL | fn f() -> isize { true }
    |           -----   ^^^^ expected `isize`, found `bool`
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions0.rs b/tests/ui/half-open-range-patterns/range_pat_interactions0.rs
index f943ea0271d..f79001ff1f1 100644
--- a/tests/ui/half-open-range-patterns/range_pat_interactions0.rs
+++ b/tests/ui/half-open-range-patterns/range_pat_interactions0.rs
@@ -1,7 +1,5 @@
 //@ run-pass
 #![allow(non_contiguous_range_endpoints)]
-#![feature(inline_const_pat)]
-
 fn main() {
     let mut if_lettable = vec![];
     let mut first_or = vec![];
@@ -16,7 +14,6 @@ fn main() {
         match x {
             1 | -3..0 => first_or.push(x),
             y @ (0..5 | 6) => or_two.push(y),
-            y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
             y @ -5.. => range_from.push(y),
             y @ ..-7 => assert_eq!(y, -8),
             y => bottom.push(y),
@@ -25,6 +22,6 @@ fn main() {
     assert_eq!(if_lettable, [-1, 0, 2, 4]);
     assert_eq!(first_or, [-3, -2, -1, 1]);
     assert_eq!(or_two, [0, 2, 3, 4, 6]);
-    assert_eq!(range_from, [-5, -4, 7]);
+    assert_eq!(range_from, [-5, -4, 5, 7]);
     assert_eq!(bottom, [-7, -6]);
 }
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions1.rs b/tests/ui/half-open-range-patterns/range_pat_interactions1.rs
index 4d7c9f10261..c5705d5db60 100644
--- a/tests/ui/half-open-range-patterns/range_pat_interactions1.rs
+++ b/tests/ui/half-open-range-patterns/range_pat_interactions1.rs
@@ -18,8 +18,6 @@ fn main() {
             //~^ error: expected a pattern range bound, found an expression
             1 | -3..0 => first_or.push(x),
             y @ (0..5 | 6) => or_two.push(y),
-            y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
-            //~^ error: inline-const in pattern position is experimental [E0658]
             y @ -5.. => range_from.push(y),
             y @ ..-7 => assert_eq!(y, -8),
             y => bottom.push(y),
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions1.stderr b/tests/ui/half-open-range-patterns/range_pat_interactions1.stderr
index 62be2ef7a4d..5cd98faa8ab 100644
--- a/tests/ui/half-open-range-patterns/range_pat_interactions1.stderr
+++ b/tests/ui/half-open-range-patterns/range_pat_interactions1.stderr
@@ -11,10 +11,6 @@ LL +         const VAL: /* Type */ = 5+1;
 LL ~         match x as i32 {
 LL ~             0..VAL => errors_only.push(x),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |             0..const { 5+1 } => errors_only.push(x),
-   |                +++++++     +
 
 error[E0408]: variable `n` is not bound in all patterns
   --> $DIR/range_pat_interactions1.rs:10:25
@@ -24,17 +20,6 @@ LL |         if let n @ 2..3|4 = x {
    |                |
    |                variable not in all patterns
 
-error[E0658]: inline-const in pattern position is experimental
-  --> $DIR/range_pat_interactions1.rs:21:20
-   |
-LL |             y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
-   |                    ^^^^^
-   |
-   = note: see issue #76001 <https://github.com/rust-lang/rust/issues/76001> for more information
-   = help: add `#![feature(inline_const_pat)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0408, E0658.
-For more information about an error, try `rustc --explain E0408`.
+For more information about this error, try `rustc --explain E0408`.
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions2.rs b/tests/ui/half-open-range-patterns/range_pat_interactions2.rs
deleted file mode 100644
index 0dbdb8fe7b6..00000000000
--- a/tests/ui/half-open-range-patterns/range_pat_interactions2.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-fn main() {
-    let mut first_or = Vec::<i32>::new();
-    let mut or_two = Vec::<i32>::new();
-    let mut range_from = Vec::<i32>::new();
-    let mut bottom = Vec::<i32>::new();
-    let mut errors_only = Vec::<i32>::new();
-
-    for x in -9 + 1..=(9 - 2) {
-        match x as i32 {
-            0..=(5+1) => errors_only.push(x),
-            //~^ error: expected a pattern range bound, found an expression
-            //~| error: range pattern bounds cannot have parentheses
-            1 | -3..0 => first_or.push(x),
-            y @ (0..5 | 6) => or_two.push(y),
-            y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
-            //~^ error: inline-const in pattern position is experimental
-            y @ -5.. => range_from.push(y),
-            y @ ..-7 => assert_eq!(y, -8),
-            y => bottom.push(y),
-        }
-    }
-}
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions2.stderr b/tests/ui/half-open-range-patterns/range_pat_interactions2.stderr
deleted file mode 100644
index dbe7f4482ee..00000000000
--- a/tests/ui/half-open-range-patterns/range_pat_interactions2.stderr
+++ /dev/null
@@ -1,43 +0,0 @@
-error: range pattern bounds cannot have parentheses
-  --> $DIR/range_pat_interactions2.rs:10:17
-   |
-LL |             0..=(5+1) => errors_only.push(x),
-   |                 ^   ^
-   |
-help: remove these parentheses
-   |
-LL -             0..=(5+1) => errors_only.push(x),
-LL +             0..=5+1 => errors_only.push(x),
-   |
-
-error: expected a pattern range bound, found an expression
-  --> $DIR/range_pat_interactions2.rs:10:18
-   |
-LL |             0..=(5+1) => errors_only.push(x),
-   |                  ^^^ not a pattern
-   |
-   = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html>
-help: consider extracting the expression into a `const`
-   |
-LL +         const VAL: /* Type */ = 5+1;
-LL ~         match x as i32 {
-LL ~             0..=(VAL) => errors_only.push(x),
-   |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |             0..=(const { 5+1 }) => errors_only.push(x),
-   |                  +++++++     +
-
-error[E0658]: inline-const in pattern position is experimental
-  --> $DIR/range_pat_interactions2.rs:15:20
-   |
-LL |             y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
-   |                    ^^^^^
-   |
-   = note: see issue #76001 <https://github.com/rust-lang/rust/issues/76001> for more information
-   = help: add `#![feature(inline_const_pat)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions3.rs b/tests/ui/half-open-range-patterns/range_pat_interactions3.rs
deleted file mode 100644
index 2f2778095cf..00000000000
--- a/tests/ui/half-open-range-patterns/range_pat_interactions3.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-fn main() {
-    let mut first_or = Vec::<i32>::new();
-    let mut or_two = Vec::<i32>::new();
-    let mut range_from = Vec::<i32>::new();
-    let mut bottom = Vec::<i32>::new();
-
-    for x in -9 + 1..=(9 - 2) {
-        match x as i32 {
-            8.. => bottom.push(x),
-            1 | -3..0 => first_or.push(x),
-            y @ (0..5 | 6) => or_two.push(y),
-            y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
-            //~^ inline-const in pattern position is experimental
-            y @ -5.. => range_from.push(y),
-            y @ ..-7 => assert_eq!(y, -8),
-            y => bottom.push(y),
-        }
-    }
-}
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions3.stderr b/tests/ui/half-open-range-patterns/range_pat_interactions3.stderr
deleted file mode 100644
index dc7dc0efa7a..00000000000
--- a/tests/ui/half-open-range-patterns/range_pat_interactions3.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0658]: inline-const in pattern position is experimental
-  --> $DIR/range_pat_interactions3.rs:12:20
-   |
-LL |             y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
-   |                    ^^^^^
-   |
-   = note: see issue #76001 <https://github.com/rust-lang/rust/issues/76001> for more information
-   = help: add `#![feature(inline_const_pat)]` 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/imports/glob-resolve1.stderr b/tests/ui/imports/glob-resolve1.stderr
index 75e65681c3a..23b0db0fa46 100644
--- a/tests/ui/imports/glob-resolve1.stderr
+++ b/tests/ui/imports/glob-resolve1.stderr
@@ -58,6 +58,11 @@ error[E0425]: cannot find function `import` in this scope
 LL |     import();
    |     ^^^^^^ not found in this scope
    |
+note: function `bar::import` exists but is inaccessible
+  --> $DIR/glob-resolve1.rs:7:5
+   |
+LL |     fn fpriv() {}
+   |     ^^^^^^^^^^ not accessible
 help: consider importing this function
    |
 LL + use other::import;
diff --git a/tests/ui/imports/import-loop-2.rs b/tests/ui/imports/import-loop-2.rs
index d9a56cb1378..1bd0f06c671 100644
--- a/tests/ui/imports/import-loop-2.rs
+++ b/tests/ui/imports/import-loop-2.rs
@@ -1,11 +1,9 @@
-//@ error-pattern:import
-
 mod a {
     pub use b::x;
 }
 
 mod b {
-    pub use a::x;
+    pub use a::x; //~ ERROR unresolved import `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 1a95200a662..2521b6e7c04 100644
--- a/tests/ui/imports/import-loop-2.stderr
+++ b/tests/ui/imports/import-loop-2.stderr
@@ -1,5 +1,5 @@
 error[E0432]: unresolved import `a::x`
-  --> $DIR/import-loop-2.rs:8:13
+  --> $DIR/import-loop-2.rs:6:13
    |
 LL |     pub use a::x;
    |             ^^^^ no `x` in `a`
diff --git a/tests/ui/imports/import-loop.rs b/tests/ui/imports/import-loop.rs
index 1ba9e090033..fc5bd32adee 100644
--- a/tests/ui/imports/import-loop.rs
+++ b/tests/ui/imports/import-loop.rs
@@ -1,9 +1,7 @@
-//@ error-pattern:import
-
 use y::x;
 
 mod y {
-    pub use y::x;
+    pub use y::x; //~ ERROR unresolved import `y::x`
 }
 
 fn main() { }
diff --git a/tests/ui/imports/import-loop.stderr b/tests/ui/imports/import-loop.stderr
index 8ad2d6be4d2..801fc2552b6 100644
--- a/tests/ui/imports/import-loop.stderr
+++ b/tests/ui/imports/import-loop.stderr
@@ -1,5 +1,5 @@
 error[E0432]: unresolved import `y::x`
-  --> $DIR/import-loop.rs:6:13
+  --> $DIR/import-loop.rs:4:13
    |
 LL |     pub use y::x;
    |             ^^^^ no `x` in `y`
diff --git a/tests/ui/imports/import3.rs b/tests/ui/imports/import3.rs
index 71eea0ebb26..7bd6458cba1 100644
--- a/tests/ui/imports/import3.rs
+++ b/tests/ui/imports/import3.rs
@@ -1,4 +1,3 @@
-//@ error-pattern: unresolved
-use main::bar;
+use main::bar; //~ ERROR unresolved import `main`
 
 fn main() { println!("foo"); }
diff --git a/tests/ui/imports/import3.stderr b/tests/ui/imports/import3.stderr
index 7f581146781..871104ce50d 100644
--- a/tests/ui/imports/import3.stderr
+++ b/tests/ui/imports/import3.stderr
@@ -1,5 +1,5 @@
 error[E0432]: unresolved import `main`
-  --> $DIR/import3.rs:2:5
+  --> $DIR/import3.rs:1:5
    |
 LL | use main::bar;
    |     ^^^^ use of unresolved module or unlinked crate `main`
diff --git a/tests/ui/imports/import4.rs b/tests/ui/imports/import4.rs
index 8d727ced890..01535fc6f45 100644
--- a/tests/ui/imports/import4.rs
+++ b/tests/ui/imports/import4.rs
@@ -1,7 +1,4 @@
-//@ error-pattern: import
-
-
 mod a { pub use b::foo; }
-mod b { pub use a::foo; }
+mod b { pub use a::foo; } //~ ERROR unresolved import `a::foo`
 
 fn main() { println!("loop"); }
diff --git a/tests/ui/imports/import4.stderr b/tests/ui/imports/import4.stderr
index c99e8385118..c979d6c9ae2 100644
--- a/tests/ui/imports/import4.stderr
+++ b/tests/ui/imports/import4.stderr
@@ -1,5 +1,5 @@
 error[E0432]: unresolved import `a::foo`
-  --> $DIR/import4.rs:5:17
+  --> $DIR/import4.rs:2:17
    |
 LL | mod b { pub use a::foo; }
    |                 ^^^^^^ no `foo` in `a`
diff --git a/tests/ui/imports/issue-4366-2.stderr b/tests/ui/imports/issue-4366-2.stderr
index 412423f4d59..b1c0092b05d 100644
--- a/tests/ui/imports/issue-4366-2.stderr
+++ b/tests/ui/imports/issue-4366-2.stderr
@@ -16,6 +16,11 @@ error[E0423]: expected function, found module `foo`
 LL |     foo();
    |     ^^^ not a function
    |
+note: function `m1::foo` exists but is inaccessible
+  --> $DIR/issue-4366-2.rs:21:5
+   |
+LL |     fn foo() {}
+   |     ^^^^^^^^ not accessible
 help: consider importing this function instead
    |
 LL + use foo::foo;
diff --git a/tests/ui/imports/issue-4366.stderr b/tests/ui/imports/issue-4366.stderr
index e63399d554e..54b7f31b231 100644
--- a/tests/ui/imports/issue-4366.stderr
+++ b/tests/ui/imports/issue-4366.stderr
@@ -4,6 +4,11 @@ error[E0425]: cannot find function `foo` in this scope
 LL |         fn sub() -> isize { foo(); 1 }
    |                             ^^^ not found in this scope
    |
+note: function `m1::foo` exists but is inaccessible
+  --> $DIR/issue-4366.rs:23:5
+   |
+LL |     fn foo() {}
+   |     ^^^^^^^^ not accessible
 help: consider importing this function
    |
 LL +         use foo::foo;
diff --git a/tests/ui/imports/show-private-items-issue-138626.rs b/tests/ui/imports/show-private-items-issue-138626.rs
new file mode 100644
index 00000000000..d9708fc33c2
--- /dev/null
+++ b/tests/ui/imports/show-private-items-issue-138626.rs
@@ -0,0 +1,19 @@
+pub mod one {
+    mod foo {
+        pub struct Foo;
+    }
+
+    pub use self::foo::Foo;
+}
+
+pub mod two {
+    mod foo {
+        mod bar {
+            pub struct Foo;
+        }
+    }
+
+    pub use crate::two::foo::Foo; //~ ERROR unresolved import `crate::two::foo::Foo` [E0432]
+}
+
+fn main() {}
diff --git a/tests/ui/imports/show-private-items-issue-138626.stderr b/tests/ui/imports/show-private-items-issue-138626.stderr
new file mode 100644
index 00000000000..b664462daed
--- /dev/null
+++ b/tests/ui/imports/show-private-items-issue-138626.stderr
@@ -0,0 +1,20 @@
+error[E0432]: unresolved import `crate::two::foo::Foo`
+  --> $DIR/show-private-items-issue-138626.rs:16:13
+   |
+LL |     pub use crate::two::foo::Foo;
+   |             ^^^^^^^^^^^^^^^^^^^^ no `Foo` in `two::foo`
+   |
+note: struct `two::foo::bar::Foo` exists but is inaccessible
+  --> $DIR/show-private-items-issue-138626.rs:12:13
+   |
+LL |             pub struct Foo;
+   |             ^^^^^^^^^^^^^^^ not accessible
+help: consider importing this struct through its public re-export instead
+   |
+LL -     pub use crate::two::foo::Foo;
+LL +     pub use one::Foo;
+   |
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/infinite/infinite-autoderef.stderr b/tests/ui/infinite/infinite-autoderef.stderr
index 7d09af9a7d4..7770cc8a720 100644
--- a/tests/ui/infinite/infinite-autoderef.stderr
+++ b/tests/ui/infinite/infinite-autoderef.stderr
@@ -1,8 +1,8 @@
 error[E0275]: overflow assigning `Box<_>` to `_`
-  --> $DIR/infinite-autoderef.rs:16:13
+  --> $DIR/infinite-autoderef.rs:16:22
    |
 LL |         x = Box::new(x);
-   |             ^^^^^^^^^^^
+   |                      ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs
index e28b8f373da..f50c4a5207a 100644
--- a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs
+++ b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs
@@ -1,8 +1,6 @@
+//~ ERROR reached the recursion limit while instantiating `<VirtualWrapper<VirtualWrapper<VirtualWrapper
 //@ build-fail
 
-//@ error-pattern: reached the recursion limit while instantiating
-//@ error-pattern: reached the recursion limit finding the struct tail
-
 // Regression test for #114484: This used to ICE during monomorphization, because we treated
 // `<VirtualWrapper<...> as Pointee>::Metadata` as a rigid projection after reaching the recursion
 // limit when finding the struct tail.
@@ -73,3 +71,16 @@ fn main() {
     let test = SomeData([0; 256]);
     test.virtualize();
 }
+
+//~? ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
+//~? ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
+//~? ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
+//~? ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
+//~? ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
+//~? ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
+//~? ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
+//~? ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
+//~? ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
+//~? ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
+//~? ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
+//~? ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
diff --git a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr
index 475e26fd0f0..59addc5cc4a 100644
--- a/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr
+++ b/tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.stderr
@@ -18,7 +18,7 @@ error: reached the recursion limit finding the struct tail for `[u8; 256]`
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
-  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:26:18
+  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:24:18
    |
 LL |         unsafe { virtualize_my_trait(L, self) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -43,7 +43,7 @@ error: reached the recursion limit finding the struct tail for `SomeData<256>`
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
-  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:26:18
+  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:24:18
    |
 LL |         unsafe { virtualize_my_trait(L, self) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -68,7 +68,7 @@ error: reached the recursion limit finding the struct tail for `VirtualWrapper<S
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
-  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:26:18
+  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:24:18
    |
 LL |         unsafe { virtualize_my_trait(L, self) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -76,7 +76,7 @@ LL |         unsafe { virtualize_my_trait(L, self) }
 error: reached the recursion limit while instantiating `<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<..., 1>, 1>, 1>, 1>, 1> as MyTrait>::virtualize`
    |
 note: `<VirtualWrapper<T, L> as MyTrait>::virtualize` defined here
-  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:25:5
+  --> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:23:5
    |
 LL |     fn virtualize(&self) -> &dyn MyTrait {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/inline-const/collect-scopes-in-pat.rs b/tests/ui/inline-const/collect-scopes-in-pat.rs
deleted file mode 100644
index 16baf920f58..00000000000
--- a/tests/ui/inline-const/collect-scopes-in-pat.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-//@ compile-flags: -Zlint-mir
-//@ check-pass
-
-#![feature(inline_const_pat)]
-
-fn main() {
-    match 1 {
-        const {
-            || match 0 {
-                x => 0,
-            };
-            0
-        } => (),
-        _ => (),
-    }
-}
diff --git a/tests/ui/inline-const/const-block-pat-liveness.rs b/tests/ui/inline-const/const-block-pat-liveness.rs
deleted file mode 100644
index 26393a4f65b..00000000000
--- a/tests/ui/inline-const/const-block-pat-liveness.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-//! This test used to ICE because const blocks didn't have a body
-//! anymore, making a lot of logic very fragile around handling the
-//! HIR of a const block.
-//! https://github.com/rust-lang/rust/issues/125846
-
-//@ check-pass
-
-#![feature(inline_const_pat)]
-
-fn main() {
-    match 0 {
-        const {
-            let a = 10_usize;
-            *&a
-        }
-        | _ => {}
-    }
-}
diff --git a/tests/ui/inline-const/const-match-pat-generic.rs b/tests/ui/inline-const/const-match-pat-generic.rs
deleted file mode 100644
index 889c015e9ac..00000000000
--- a/tests/ui/inline-const/const-match-pat-generic.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-#![feature(inline_const_pat)]
-
-// rust-lang/rust#82518: ICE with inline-const in match referencing const-generic parameter
-
-fn foo<const V: usize>() {
-    match 0 {
-        const { V } => {},
-        //~^ ERROR constant pattern cannot depend on generic parameters
-        _ => {},
-    }
-}
-
-const fn f(x: usize) -> usize {
-    x + 1
-}
-
-fn bar<const V: usize>() {
-    match 0 {
-        const { f(V) } => {},
-        //~^ ERROR constant pattern cannot depend on generic parameters
-        _ => {},
-    }
-}
-
-fn main() {
-    foo::<1>();
-    bar::<1>();
-}
diff --git a/tests/ui/inline-const/const-match-pat-generic.stderr b/tests/ui/inline-const/const-match-pat-generic.stderr
deleted file mode 100644
index 7d9e1d9e407..00000000000
--- a/tests/ui/inline-const/const-match-pat-generic.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0158]: constant pattern cannot depend on generic parameters
-  --> $DIR/const-match-pat-generic.rs:7:9
-   |
-LL |         const { V } => {},
-   |         ^^^^^^^^^^^ `const` depends on a generic parameter
-
-error[E0158]: constant pattern cannot depend on generic parameters
-  --> $DIR/const-match-pat-generic.rs:19:9
-   |
-LL |         const { f(V) } => {},
-   |         ^^^^^^^^^^^^^^ `const` depends on a generic parameter
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0158`.
diff --git a/tests/ui/inline-const/const-match-pat-inference.rs b/tests/ui/inline-const/const-match-pat-inference.rs
deleted file mode 100644
index 3d3533839bc..00000000000
--- a/tests/ui/inline-const/const-match-pat-inference.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-//@ check-pass
-
-#![feature(inline_const_pat)]
-
-fn main() {
-    match 1u64 {
-        0 => (),
-        const { 0 + 1 } => (),
-        const { 2 - 1 } ..= const { u64::MAX } => (),
-    }
-}
diff --git a/tests/ui/inline-const/const-match-pat-lifetime-err.rs b/tests/ui/inline-const/const-match-pat-lifetime-err.rs
deleted file mode 100644
index 7f450ebe6fc..00000000000
--- a/tests/ui/inline-const/const-match-pat-lifetime-err.rs
+++ /dev/null
@@ -1,47 +0,0 @@
-#![feature(inline_const_pat)]
-
-use std::marker::PhantomData;
-
-#[derive(PartialEq, Eq)]
-pub struct InvariantRef<'a, T: ?Sized>(&'a T, PhantomData<&'a mut &'a T>);
-
-#[derive(PartialEq, Eq)]
-pub struct CovariantRef<'a, T: ?Sized>(&'a T);
-
-impl<'a, T: ?Sized> InvariantRef<'a, T> {
-    pub const fn new(r: &'a T) -> Self {
-        InvariantRef(r, PhantomData)
-    }
-}
-
-impl<'a> InvariantRef<'a, ()> {
-    pub const NEW: Self = InvariantRef::new(&());
-}
-
-impl<'a> CovariantRef<'a, ()> {
-    pub const NEW: Self = CovariantRef(&());
-}
-
-fn match_invariant_ref<'a>() {
-    let y = ();
-    match InvariantRef::new(&y) {
-        //~^ ERROR `y` does not live long enough [E0597]
-        const { InvariantRef::<'a>::NEW } => (),
-    }
-}
-
-fn match_covariant_ref<'a>() {
-    // Unclear if we should error here (should we be able to subtype the type of
-    // `y.0`), but using the associated const directly in the pattern also
-    // errors.
-    let y: (CovariantRef<'static, _>,) = (CovariantRef(&()),);
-    //~^ ERROR lifetime may not live long enough
-    match y.0 {
-        const { CovariantRef::<'a>::NEW } => (),
-    }
-}
-
-fn main() {
-    match_invariant_ref();
-    match_covariant_ref();
-}
diff --git a/tests/ui/inline-const/const-match-pat-lifetime-err.stderr b/tests/ui/inline-const/const-match-pat-lifetime-err.stderr
deleted file mode 100644
index 7eea1846057..00000000000
--- a/tests/ui/inline-const/const-match-pat-lifetime-err.stderr
+++ /dev/null
@@ -1,28 +0,0 @@
-error[E0597]: `y` does not live long enough
-  --> $DIR/const-match-pat-lifetime-err.rs:27:29
-   |
-LL | fn match_invariant_ref<'a>() {
-   |                        -- lifetime `'a` defined here
-LL |     let y = ();
-   |         - binding `y` declared here
-LL |     match InvariantRef::new(&y) {
-   |                             ^^ borrowed value does not live long enough
-LL |
-LL |         const { InvariantRef::<'a>::NEW } => (),
-   |                 ----------------------- using this value as a constant requires that `y` is borrowed for `'a`
-LL |     }
-LL | }
-   | - `y` dropped here while still borrowed
-
-error: lifetime may not live long enough
-  --> $DIR/const-match-pat-lifetime-err.rs:37:12
-   |
-LL | fn match_covariant_ref<'a>() {
-   |                        -- lifetime `'a` defined here
-...
-LL |     let y: (CovariantRef<'static, _>,) = (CovariantRef(&()),);
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/inline-const/const-match-pat-lifetime.rs b/tests/ui/inline-const/const-match-pat-lifetime.rs
deleted file mode 100644
index 7f1011ea240..00000000000
--- a/tests/ui/inline-const/const-match-pat-lifetime.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-//@ run-pass
-
-#![feature(inline_const_pat)]
-
-use std::marker::PhantomData;
-
-// rust-lang/rust#78174: ICE: "cannot convert ReErased to a region vid"
-fn issue_78174() {
-    match "foo" {
-        const { concat!("fo", "o") } => (),
-        _ => unreachable!(),
-    }
-}
-
-#[derive(PartialEq, Eq)]
-pub struct InvariantRef<'a, T: ?Sized>(&'a T, PhantomData<&'a mut &'a T>);
-
-impl<'a, T: ?Sized> InvariantRef<'a, T> {
-    pub const fn new(r: &'a T) -> Self {
-        InvariantRef(r, PhantomData)
-    }
-}
-
-fn match_invariant_ref<'a>() {
-    match const { InvariantRef::<'a, _>::new(&()) } {
-        const { InvariantRef::<'a, ()>::new(&()) } => {
-        }
-    }
-}
-
-fn main() {
-    issue_78174();
-    match_invariant_ref();
-}
diff --git a/tests/ui/inline-const/const-match-pat-range.rs b/tests/ui/inline-const/const-match-pat-range.rs
deleted file mode 100644
index 7202c0c0452..00000000000
--- a/tests/ui/inline-const/const-match-pat-range.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-//@ build-pass
-
-#![feature(inline_const_pat)]
-
-fn main() {
-    const N: u32 = 10;
-    let x: u32 = 3;
-
-    match x {
-        1 ..= const { N + 1 } => {},
-        _ => {},
-    }
-
-    match x {
-        const { N - 1 } ..= 10 => {},
-        _ => {},
-    }
-
-    match x {
-        const { N - 1 } ..= const { N + 1 } => {},
-        _ => {},
-    }
-
-    match x {
-        .. const { N + 1 } => {},
-        _ => {},
-    }
-
-    match x {
-        const { N - 1 } .. => {},
-        _ => {},
-    }
-
-    match x {
-        ..= const { N + 1 } => {},
-        _ => {}
-    }
-}
diff --git a/tests/ui/inline-const/const-match-pat.rs b/tests/ui/inline-const/const-match-pat.rs
deleted file mode 100644
index 1580ef25812..00000000000
--- a/tests/ui/inline-const/const-match-pat.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-//@ run-pass
-
-#![feature(inline_const_pat)]
-const MMIO_BIT1: u8 = 4;
-const MMIO_BIT2: u8 = 5;
-
-fn main() {
-    let s = match read_mmio() {
-        0 => "FOO",
-        const { 1 << MMIO_BIT1 } => "BAR",
-        const { 1 << MMIO_BIT2 } => "BAZ",
-        _ => unreachable!(),
-    };
-
-    assert_eq!("BAZ", s);
-}
-
-fn read_mmio() -> i32 {
-    1 << 5
-}
diff --git a/tests/ui/inline-const/in-pat-recovery.rs b/tests/ui/inline-const/in-pat-recovery.rs
new file mode 100644
index 00000000000..0d912af0981
--- /dev/null
+++ b/tests/ui/inline-const/in-pat-recovery.rs
@@ -0,0 +1,11 @@
+// While `feature(inline_const_pat)` has been removed from the
+// compiler, we should still make sure that the resulting error
+// message is acceptable.
+fn main() {
+    match 1 {
+        const { 1 + 7 } => {}
+        //~^ `inline_const_pat` has been removed
+        2 => {}
+        _ => {}
+    }
+}
diff --git a/tests/ui/inline-const/in-pat-recovery.stderr b/tests/ui/inline-const/in-pat-recovery.stderr
new file mode 100644
index 00000000000..e1f2e681e77
--- /dev/null
+++ b/tests/ui/inline-const/in-pat-recovery.stderr
@@ -0,0 +1,10 @@
+error: `inline_const_pat` has been removed
+  --> $DIR/in-pat-recovery.rs:6:15
+   |
+LL |         const { 1 + 7 } => {}
+   |               ^^^^^^^^^
+   |
+   = help: use a named `const`-item or an `if`-guard instead
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/inline-const/pat-match-fndef.rs b/tests/ui/inline-const/pat-match-fndef.rs
deleted file mode 100644
index 013a4a67561..00000000000
--- a/tests/ui/inline-const/pat-match-fndef.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-#![feature(inline_const_pat)]
-
-fn uwu() {}
-
-fn main() {
-    let x = [];
-    match x[123] {
-        const { uwu } => {}
-        //~^ ERROR `fn() {uwu}` cannot be used in patterns
-        _ => {}
-    }
-}
diff --git a/tests/ui/inline-const/pat-match-fndef.stderr b/tests/ui/inline-const/pat-match-fndef.stderr
deleted file mode 100644
index 220437a0491..00000000000
--- a/tests/ui/inline-const/pat-match-fndef.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: fn item `fn() {uwu}` cannot be used in patterns
-  --> $DIR/pat-match-fndef.rs:8:9
-   |
-LL |         const { uwu } => {}
-   |         ^^^^^^^^^^^^^ fn item can't be used in patterns
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/inline-const/pat-unsafe-err.rs b/tests/ui/inline-const/pat-unsafe-err.rs
deleted file mode 100644
index b906def7029..00000000000
--- a/tests/ui/inline-const/pat-unsafe-err.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-#![feature(inline_const_pat)]
-
-const unsafe fn require_unsafe() -> usize {
-    1
-}
-
-fn main() {
-    match () {
-        const {
-            require_unsafe();
-            //~^ ERROR [E0133]
-        } => (),
-    }
-
-    match 1 {
-        const {
-            require_unsafe()
-            //~^ ERROR [E0133]
-        }..=4 => (),
-        _ => (),
-    }
-}
diff --git a/tests/ui/inline-const/pat-unsafe-err.stderr b/tests/ui/inline-const/pat-unsafe-err.stderr
deleted file mode 100644
index 786c7f31ccc..00000000000
--- a/tests/ui/inline-const/pat-unsafe-err.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0133]: call to unsafe function `require_unsafe` is unsafe and requires unsafe function or block
-  --> $DIR/pat-unsafe-err.rs:10:13
-   |
-LL |             require_unsafe();
-   |             ^^^^^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function `require_unsafe` is unsafe and requires unsafe function or block
-  --> $DIR/pat-unsafe-err.rs:17:13
-   |
-LL |             require_unsafe()
-   |             ^^^^^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/inline-const/pat-unsafe.rs b/tests/ui/inline-const/pat-unsafe.rs
deleted file mode 100644
index 4b05f3a1cdd..00000000000
--- a/tests/ui/inline-const/pat-unsafe.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-//@ check-pass
-
-#![warn(unused_unsafe)]
-#![feature(inline_const_pat)]
-
-const unsafe fn require_unsafe() -> usize {
-    1
-}
-
-fn main() {
-    unsafe {
-        match () {
-            const {
-                require_unsafe();
-                unsafe {}
-                //~^ WARNING unnecessary `unsafe` block
-            } => (),
-        }
-
-        match 1 {
-            const {
-                unsafe {}
-                //~^ WARNING unnecessary `unsafe` block
-                require_unsafe()
-            }..=4 => (),
-            _ => (),
-        }
-    }
-}
diff --git a/tests/ui/inline-const/pat-unsafe.stderr b/tests/ui/inline-const/pat-unsafe.stderr
deleted file mode 100644
index 59460271ac0..00000000000
--- a/tests/ui/inline-const/pat-unsafe.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-warning: unnecessary `unsafe` block
-  --> $DIR/pat-unsafe.rs:15:17
-   |
-LL |                 unsafe {}
-   |                 ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/pat-unsafe.rs:3:9
-   |
-LL | #![warn(unused_unsafe)]
-   |         ^^^^^^^^^^^^^
-
-warning: unnecessary `unsafe` block
-  --> $DIR/pat-unsafe.rs:22:17
-   |
-LL |                 unsafe {}
-   |                 ^^^^^^ unnecessary `unsafe` block
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/instrument-xray/flags-always-never-1.rs b/tests/ui/instrument-xray/flags-always-never-1.rs
index 91032662e6b..97f03fca102 100644
--- a/tests/ui/instrument-xray/flags-always-never-1.rs
+++ b/tests/ui/instrument-xray/flags-always-never-1.rs
@@ -2,6 +2,7 @@
 //
 //@ needs-xray
 //@ compile-flags: -Z instrument-xray=always,never
-//@ error-pattern: incorrect value `always,never` for unstable option `instrument-xray`
 
 fn main() {}
+
+//~? ERROR incorrect value `always,never` for unstable option `instrument-xray`
diff --git a/tests/ui/instrument-xray/flags-dupe-always.rs b/tests/ui/instrument-xray/flags-dupe-always.rs
index 41e4f267b47..e3a5b3b1c3e 100644
--- a/tests/ui/instrument-xray/flags-dupe-always.rs
+++ b/tests/ui/instrument-xray/flags-dupe-always.rs
@@ -2,6 +2,7 @@
 //
 //@ needs-xray
 //@ compile-flags: -Z instrument-xray=always,always
-//@ error-pattern: incorrect value `always,always` for unstable option `instrument-xray`
 
 fn main() {}
+
+//~? ERROR incorrect value `always,always` for unstable option `instrument-xray`
diff --git a/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs b/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs
index ba5ea28d40b..648bd144632 100644
--- a/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs
+++ b/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs
@@ -2,6 +2,7 @@
 //
 //@ needs-xray
 //@ compile-flags: -Z instrument-xray=ignore-loops,ignore-loops
-//@ error-pattern: incorrect value `ignore-loops,ignore-loops` for unstable option `instrument-xray`
 
 fn main() {}
+
+//~? ERROR incorrect value `ignore-loops,ignore-loops` for unstable option `instrument-xray`
diff --git a/tests/ui/instrument-xray/target-not-supported.rs b/tests/ui/instrument-xray/target-not-supported.rs
index cdae26f993d..2045913b186 100644
--- a/tests/ui/instrument-xray/target-not-supported.rs
+++ b/tests/ui/instrument-xray/target-not-supported.rs
@@ -2,8 +2,9 @@
 //
 //@ needs-llvm-components: x86
 //@ compile-flags: -Z instrument-xray --target x86_64-apple-darwin
-//@ error-pattern: error: XRay instrumentation is not supported for this target
 
 #![feature(no_core)]
 #![no_core]
 #![no_main]
+
+//~? ERROR XRay instrumentation is not supported for this target
diff --git a/tests/ui/internal/internal-unstable-noallow.rs b/tests/ui/internal/internal-unstable-noallow.rs
index 57ddb93d880..507eeebddc0 100644
--- a/tests/ui/internal/internal-unstable-noallow.rs
+++ b/tests/ui/internal/internal-unstable-noallow.rs
@@ -4,20 +4,18 @@
 // the // ~ form.
 
 //@ aux-build:internal_unstable.rs
-//@ error-pattern:use of unstable library feature `function`
-//@ error-pattern:use of unstable library feature `struct_field`
-//@ error-pattern:use of unstable library feature `method`
-//@ error-pattern:use of unstable library feature `struct2_field`
 
 #[macro_use]
 extern crate internal_unstable;
 
 fn main() {
-    call_unstable_noallow!();
+    call_unstable_noallow!(); //~ ERROR use of unstable library feature `function`
 
-    construct_unstable_noallow!(0);
+    construct_unstable_noallow!(0); //~ ERROR use of unstable library feature `struct_field`
 
     |x: internal_unstable::Foo| { call_method_noallow!(x) };
+    //~^ ERROR use of unstable library feature `method`
 
     |x: internal_unstable::Bar| { access_field_noallow!(x) };
+    //~^ ERROR use of unstable library feature `struct2_field`
 }
diff --git a/tests/ui/internal/internal-unstable-noallow.stderr b/tests/ui/internal/internal-unstable-noallow.stderr
index 22f42abbd11..2cc55022ef3 100644
--- a/tests/ui/internal/internal-unstable-noallow.stderr
+++ b/tests/ui/internal/internal-unstable-noallow.stderr
@@ -1,5 +1,5 @@
 error[E0658]: use of unstable library feature `function`
-  --> $DIR/internal-unstable-noallow.rs:16:5
+  --> $DIR/internal-unstable-noallow.rs:12:5
    |
 LL |     call_unstable_noallow!();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -9,7 +9,7 @@ LL |     call_unstable_noallow!();
    = note: this error originates in the macro `call_unstable_noallow` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0658]: use of unstable library feature `struct_field`
-  --> $DIR/internal-unstable-noallow.rs:18:5
+  --> $DIR/internal-unstable-noallow.rs:14:5
    |
 LL |     construct_unstable_noallow!(0);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -19,7 +19,7 @@ LL |     construct_unstable_noallow!(0);
    = note: this error originates in the macro `construct_unstable_noallow` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0658]: use of unstable library feature `method`
-  --> $DIR/internal-unstable-noallow.rs:20:35
+  --> $DIR/internal-unstable-noallow.rs:16:35
    |
 LL |     |x: internal_unstable::Foo| { call_method_noallow!(x) };
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^
@@ -29,7 +29,7 @@ LL |     |x: internal_unstable::Foo| { call_method_noallow!(x) };
    = note: this error originates in the macro `call_method_noallow` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0658]: use of unstable library feature `struct2_field`
-  --> $DIR/internal-unstable-noallow.rs:22:35
+  --> $DIR/internal-unstable-noallow.rs:19:35
    |
 LL |     |x: internal_unstable::Bar| { access_field_noallow!(x) };
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/invalid-compile-flags/crate-type-flag.rs b/tests/ui/invalid-compile-flags/crate-type-flag.rs
index 01014307149..8ccce97f7bf 100644
--- a/tests/ui/invalid-compile-flags/crate-type-flag.rs
+++ b/tests/ui/invalid-compile-flags/crate-type-flag.rs
@@ -45,16 +45,17 @@
 // `proc-macro` is accepted, but `proc_macro` is not.
 //@ revisions: proc_underscore_macro
 //@[proc_underscore_macro] compile-flags: --crate-type=proc_macro
-//@[proc_underscore_macro] error-pattern: unknown crate type: `proc_macro`
 
 // Empty `--crate-type` not accepted.
 //@ revisions: empty_crate_type
 //@[empty_crate_type] compile-flags: --crate-type=
-//@[empty_crate_type] error-pattern: unknown crate type: ``
 
 // Random unknown crate type. Also check that we can handle non-ASCII.
 //@ revisions: unknown
 //@[unknown] compile-flags: --crate-type=🤡
-//@[unknown] error-pattern: unknown crate type: `🤡`
 
 fn main() {}
+
+//[proc_underscore_macro]~? ERROR unknown crate type: `proc_macro`
+//[empty_crate_type]~? ERROR unknown crate type: ``
+//[unknown]~? ERROR unknown crate type: `🤡`
diff --git a/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs b/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs
index 6a4ecb9d839..c7973c686da 100644
--- a/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs
+++ b/tests/ui/invalid-compile-flags/function-return/requires-x86-or-x86_64.rs
@@ -13,8 +13,9 @@
 //@[aarch64] check-fail
 //@[aarch64] needs-llvm-components: aarch64
 //@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
-//@[aarch64] error-pattern: `-Zfunction-return` (except `keep`) is only supported on x86 and x86_64
 
 #![feature(no_core)]
 #![no_core]
 #![no_main]
+
+//[aarch64]~? ERROR `-Zfunction-return` (except `keep`) is only supported on x86 and x86_64
diff --git a/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs b/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs
index f4be36e08f0..fa3958c1f98 100644
--- a/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs
+++ b/tests/ui/invalid-compile-flags/function-return/thunk-extern-requires-non-large-code-model.rs
@@ -14,8 +14,9 @@
 
 //@[large] check-fail
 //@[large] compile-flags: -Ccode-model=large
-//@[large] error-pattern: `-Zfunction-return=thunk-extern` is only supported on non-large code models
 
 #![feature(no_core)]
 #![no_core]
 #![no_main]
+
+//[large]~? ERROR `-Zfunction-return=thunk-extern` is only supported on non-large code models
diff --git a/tests/ui/invalid-compile-flags/print-without-arg.stderr b/tests/ui/invalid-compile-flags/print-without-arg.stderr
index aa8a2ae42db..8abaee5056b 100644
--- a/tests/ui/invalid-compile-flags/print-without-arg.stderr
+++ b/tests/ui/invalid-compile-flags/print-without-arg.stderr
@@ -1,5 +1,5 @@
 error: Argument to option 'print' missing
        Usage:
-           --print [all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models]
+           --print [all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models]
                                Compiler information to print on stdout
 
diff --git a/tests/ui/invalid-compile-flags/print.stderr b/tests/ui/invalid-compile-flags/print.stderr
index f9cfb1616ce..e3374eb1e6e 100644
--- a/tests/ui/invalid-compile-flags/print.stderr
+++ b/tests/ui/invalid-compile-flags/print.stderr
@@ -1,5 +1,5 @@
 error: unknown print request: `yyyy`
   |
-  = help: valid print requests are: `all-target-specs-json`, `calling-conventions`, `cfg`, `check-cfg`, `code-models`, `crate-name`, `deployment-target`, `file-names`, `host-tuple`, `link-args`, `native-static-libs`, `relocation-models`, `split-debuginfo`, `stack-protector-strategies`, `supported-crate-types`, `sysroot`, `target-cpus`, `target-features`, `target-libdir`, `target-list`, `target-spec-json`, `tls-models`
+  = help: valid print requests are: `all-target-specs-json`, `calling-conventions`, `cfg`, `check-cfg`, `code-models`, `crate-name`, `crate-root-lint-levels`, `deployment-target`, `file-names`, `host-tuple`, `link-args`, `native-static-libs`, `relocation-models`, `split-debuginfo`, `stack-protector-strategies`, `supported-crate-types`, `sysroot`, `target-cpus`, `target-features`, `target-libdir`, `target-list`, `target-spec-json`, `tls-models`
   = help: for more information, see the rustc book: https://doc.rust-lang.org/rustc/command-line-arguments.html#--print-print-compiler-information
 
diff --git a/tests/ui/invalid-compile-flags/reg-struct-return/requires-x86.rs b/tests/ui/invalid-compile-flags/reg-struct-return/requires-x86.rs
index b5e34bece32..436442ee729 100644
--- a/tests/ui/invalid-compile-flags/reg-struct-return/requires-x86.rs
+++ b/tests/ui/invalid-compile-flags/reg-struct-return/requires-x86.rs
@@ -9,13 +9,14 @@
 //@[x86_64] check-fail
 //@[x86_64] needs-llvm-components: x86
 //@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
-//@[x86_64] error-pattern: `-Zreg-struct-return` is only supported on x86
 
 //@[aarch64] check-fail
 //@[aarch64] needs-llvm-components: aarch64
 //@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
-//@[aarch64] error-pattern: `-Zreg-struct-return` is only supported on x86
 
 #![feature(no_core)]
 #![no_core]
 #![no_main]
+
+//[x86_64]~? ERROR `-Zreg-struct-return` is only supported on x86
+//[aarch64]~? ERROR `-Zreg-struct-return` is only supported on x86
diff --git a/tests/ui/invalid-compile-flags/regparm/regparm-valid-values.rs b/tests/ui/invalid-compile-flags/regparm/regparm-valid-values.rs
index b548d678520..a66dfe85977 100644
--- a/tests/ui/invalid-compile-flags/regparm/regparm-valid-values.rs
+++ b/tests/ui/invalid-compile-flags/regparm/regparm-valid-values.rs
@@ -17,8 +17,9 @@
 
 //@[regparm4] check-fail
 //@[regparm4] compile-flags: -Zregparm=4
-//@[regparm4] error-pattern: `-Zregparm=4` is unsupported (valid values 0-3)
 
 #![feature(no_core)]
 #![no_core]
 #![no_main]
+
+//[regparm4]~? ERROR `-Zregparm=4` is unsupported (valid values 0-3)
diff --git a/tests/ui/invalid-compile-flags/regparm/requires-x86.rs b/tests/ui/invalid-compile-flags/regparm/requires-x86.rs
index ce6e437fb47..32c4b5af357 100644
--- a/tests/ui/invalid-compile-flags/regparm/requires-x86.rs
+++ b/tests/ui/invalid-compile-flags/regparm/requires-x86.rs
@@ -9,13 +9,14 @@
 //@[x86_64] check-fail
 //@[x86_64] needs-llvm-components: x86
 //@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
-//@[x86_64] error-pattern: `-Zregparm=N` is only supported on x86
 
 //@[aarch64] check-fail
 //@[aarch64] needs-llvm-components: aarch64
 //@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
-//@[aarch64] error-pattern: `-Zregparm=N` is only supported on x86
 
 #![feature(no_core)]
 #![no_core]
 #![no_main]
+
+//[x86_64]~? ERROR `-Zregparm=N` is only supported on x86
+//[aarch64]~? ERROR `-Zregparm=N` is only supported on x86
diff --git a/tests/ui/invalid/issue-114435-layout-type-err.rs b/tests/ui/invalid/issue-114435-layout-type-err.rs
index 2a86839e416..07f310478d3 100644
--- a/tests/ui/invalid/issue-114435-layout-type-err.rs
+++ b/tests/ui/invalid/issue-114435-layout-type-err.rs
@@ -1,6 +1,5 @@
 //@ check-fail
 //@ compile-flags: --crate-type lib -Cdebuginfo=2
-//@ error-pattern: recursion limit
 
 #![recursion_limit = "10"]
 macro_rules! link {
@@ -41,3 +40,5 @@ link!(J, K);
 link!(K, Bottom);
 
 fn main() {}
+
+//~? ERROR reached the recursion limit finding the struct tail for `Bottom`
diff --git a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
index 7cae77eb67f..5a5d0086aa9 100644
--- a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
+++ b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
@@ -16,8 +16,6 @@
 // rely on the checking of the normalized stderr output as our actual
 // "verification" of the diagnostic).
 
-//@ error-pattern: error
-
 // On Mac OS X, we get an error like the below
 //@ normalize-stderr: "failed to write bytecode to ./does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying ./does-not-exist/"
 
@@ -29,3 +27,5 @@
 //@ ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu
 
 #![crate_type = "lib"]
+
+//~? ERROR /does-not-exist/
diff --git a/tests/ui/issues/issue-37131.rs b/tests/ui/issues/issue-37131.rs
index 3ea14672e23..16681ac21d1 100644
--- a/tests/ui/issues/issue-37131.rs
+++ b/tests/ui/issues/issue-37131.rs
@@ -1,3 +1,4 @@
+//~ ERROR can't find crate for `std`
 // Tests that compiling for a target which is not installed will result in a helpful
 // error message.
 
diff --git a/tests/ui/lang-items/lang-item-missing.rs b/tests/ui/lang-items/lang-item-missing.rs
index 5b832a5bb8f..75e203d04f2 100644
--- a/tests/ui/lang-items/lang-item-missing.rs
+++ b/tests/ui/lang-items/lang-item-missing.rs
@@ -1,13 +1,11 @@
 // Test that a missing lang item (in this case `sized`) does not cause an ICE,
 // see #17392.
 
-//@ error-pattern: requires `sized` lang_item
-
 #![feature(lang_items, no_core)]
 #![no_core]
 #![no_main]
 
 #[no_mangle]
-extern "C" fn main(_argc: i32, _argv: *const *const u8) -> i32 {
+extern "C" fn main(_argc: i32, _argv: *const *const u8) -> i32 { //~ ERROR requires `sized` lang_item
     loop {}
 }
diff --git a/tests/ui/lang-items/lang-item-missing.stderr b/tests/ui/lang-items/lang-item-missing.stderr
index 63bca95adf7..85e9eaafe72 100644
--- a/tests/ui/lang-items/lang-item-missing.stderr
+++ b/tests/ui/lang-items/lang-item-missing.stderr
@@ -1,5 +1,5 @@
 error: requires `sized` lang_item
-  --> $DIR/lang-item-missing.rs:11:60
+  --> $DIR/lang-item-missing.rs:9:60
    |
 LL | extern "C" fn main(_argc: i32, _argv: *const *const u8) -> i32 {
    |                                                            ^^^
diff --git a/tests/ui/lang-items/missing-copy-lang-item-issue-19660.rs b/tests/ui/lang-items/missing-copy-lang-item-issue-19660.rs
index 9b634ee8ee3..f92a00e602c 100644
--- a/tests/ui/lang-items/missing-copy-lang-item-issue-19660.rs
+++ b/tests/ui/lang-items/missing-copy-lang-item-issue-19660.rs
@@ -1,5 +1,3 @@
-//@ error-pattern: requires `copy` lang_item
-
 #![feature(lang_items, no_core)]
 #![no_core]
 #![no_main]
@@ -11,5 +9,5 @@ struct S;
 
 #[no_mangle]
 extern "C" fn main(argc: i32, _argv: *const *const u8) -> i32 {
-    argc
+    argc //~ ERROR requires `copy` lang_item
 }
diff --git a/tests/ui/lang-items/missing-copy-lang-item-issue-19660.stderr b/tests/ui/lang-items/missing-copy-lang-item-issue-19660.stderr
index 3dc7716ecd2..9b25b1db292 100644
--- a/tests/ui/lang-items/missing-copy-lang-item-issue-19660.stderr
+++ b/tests/ui/lang-items/missing-copy-lang-item-issue-19660.stderr
@@ -1,5 +1,5 @@
 error: requires `copy` lang_item
-  --> $DIR/missing-copy-lang-item-issue-19660.rs:14:5
+  --> $DIR/missing-copy-lang-item-issue-19660.rs:12:5
    |
 LL |     argc
    |     ^^^^
diff --git a/tests/ui/layout/size-of-val-raw-too-big.rs b/tests/ui/layout/size-of-val-raw-too-big.rs
index dfca6d6eb76..566b01255fa 100644
--- a/tests/ui/layout/size-of-val-raw-too-big.rs
+++ b/tests/ui/layout/size-of-val-raw-too-big.rs
@@ -1,7 +1,8 @@
+//~ ERROR values of the type `Example` are too big for the target architecture
 //@ build-fail
 //@ compile-flags: --crate-type lib
 //@ only-32bit Layout computation rejects this layout for different reasons on 64-bit.
-//@ error-pattern: too big for the target architecture
+
 #![feature(core_intrinsics)]
 #![allow(internal_features)]
 
diff --git a/tests/ui/layout/unknown-when-no-type-parameter.rs b/tests/ui/layout/unknown-when-no-type-parameter.rs
index 94c32cf262f..500b7938eeb 100644
--- a/tests/ui/layout/unknown-when-no-type-parameter.rs
+++ b/tests/ui/layout/unknown-when-no-type-parameter.rs
@@ -1,6 +1,5 @@
 #![feature(trivial_bounds)]
 
-//@ error-pattern: error[E0080]: evaluation of constant value failed
 //@ error-pattern: the type `<() as Project>::Assoc` has an unknown layout
 
 trait Project {
@@ -8,7 +7,7 @@ trait Project {
 }
 
 fn foo() where (): Project {
-    [(); size_of::<<() as Project>::Assoc>()];
+    [(); size_of::<<() as Project>::Assoc>()]; //~ ERROR 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 9e414d224bb..a2dbb191ee2 100644
--- a/tests/ui/layout/unknown-when-no-type-parameter.stderr
+++ b/tests/ui/layout/unknown-when-no-type-parameter.stderr
@@ -1,5 +1,5 @@
 error[E0080]: evaluation of constant value failed
-  --> $DIR/unknown-when-no-type-parameter.rs:11:10
+  --> $DIR/unknown-when-no-type-parameter.rs:10:10
    |
 LL |     [(); size_of::<<() as Project>::Assoc>()];
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the type `<() as Project>::Assoc` has an unknown layout
diff --git a/tests/ui/limits/issue-17913.rs b/tests/ui/limits/issue-17913.rs
index 5407902daba..85deab4bc4c 100644
--- a/tests/ui/limits/issue-17913.rs
+++ b/tests/ui/limits/issue-17913.rs
@@ -1,6 +1,5 @@
 //@ build-fail
 //@ normalize-stderr: "\[&usize; \d+\]" -> "[&usize; usize::MAX]"
-//@ error-pattern: too big for the target architecture
 
 #[cfg(target_pointer_width = "64")]
 fn main() {
@@ -15,3 +14,5 @@ fn main() {
     let a: Box<_> = Box::new([&n; 0xFFFFFFFF_usize]);
     println!("{}", a[0xFFFFFF_usize]);
 }
+
+//~? ERROR are too big for the target architecture
diff --git a/tests/ui/limits/issue-55878.rs b/tests/ui/limits/issue-55878.rs
index db4a2724452..614ff328bf5 100644
--- a/tests/ui/limits/issue-55878.rs
+++ b/tests/ui/limits/issue-55878.rs
@@ -1,6 +1,6 @@
 //@ build-fail
 
-//@ error-pattern: are too big for the target architecture
 fn main() {
     println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
+    //~^ ERROR evaluation of constant value failed
 }
diff --git a/tests/ui/limits/issue-55878.stderr b/tests/ui/limits/issue-55878.stderr
index d705b3daf79..9b3922d7933 100644
--- a/tests/ui/limits/issue-55878.stderr
+++ b/tests/ui/limits/issue-55878.stderr
@@ -1,5 +1,5 @@
 error[E0080]: evaluation of constant value failed
-  --> $DIR/issue-55878.rs:5:26
+  --> $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
diff --git a/tests/ui/link-native-libs/empty-kind-1.rs b/tests/ui/link-native-libs/empty-kind-1.rs
index d9b8d8a7f7d..04e7e3c2c7b 100644
--- a/tests/ui/link-native-libs/empty-kind-1.rs
+++ b/tests/ui/link-native-libs/empty-kind-1.rs
@@ -1,6 +1,7 @@
 // Unspecified kind should fail with an error
 
 //@ compile-flags: -l =mylib
-//@ error-pattern: unknown library kind ``, expected one of: static, dylib, framework, link-arg
 
 fn main() {}
+
+//~? ERROR unknown library kind ``
diff --git a/tests/ui/link-native-libs/empty-kind-2.rs b/tests/ui/link-native-libs/empty-kind-2.rs
index 16cb3b917e4..1436c086dfd 100644
--- a/tests/ui/link-native-libs/empty-kind-2.rs
+++ b/tests/ui/link-native-libs/empty-kind-2.rs
@@ -1,6 +1,7 @@
 // Unspecified kind should fail with an error
 
 //@ compile-flags: -l :+bundle=mylib
-//@ error-pattern: unknown library kind ``, expected one of: static, dylib, framework, link-arg
 
 fn main() {}
+
+//~? ERROR unknown library kind ``
diff --git a/tests/ui/link-native-libs/link-arg-error.rs b/tests/ui/link-native-libs/link-arg-error.rs
index 4defb108178..9d9dcc27ccb 100644
--- a/tests/ui/link-native-libs/link-arg-error.rs
+++ b/tests/ui/link-native-libs/link-arg-error.rs
@@ -1,4 +1,5 @@
 //@ compile-flags: -l link-arg:+bundle=arg -Z unstable-options
-//@ error-pattern: linking modifier `bundle` is only compatible with `static` linking kind
 
 fn main() {}
+
+//~? ERROR linking modifier `bundle` is only compatible with `static` linking kind
diff --git a/tests/ui/link-native-libs/manual-link-bad-form.rs b/tests/ui/link-native-libs/manual-link-bad-form.rs
index 0f5723adec9..71e80c60dec 100644
--- a/tests/ui/link-native-libs/manual-link-bad-form.rs
+++ b/tests/ui/link-native-libs/manual-link-bad-form.rs
@@ -1,5 +1,6 @@
 //@ compile-flags:-l static=
-//@ error-pattern: library name must not be empty
 
 fn main() {
 }
+
+//~? ERROR library name must not be empty
diff --git a/tests/ui/link-native-libs/manual-link-bad-kind.rs b/tests/ui/link-native-libs/manual-link-bad-kind.rs
index d070faa6574..8b5f478e80a 100644
--- a/tests/ui/link-native-libs/manual-link-bad-kind.rs
+++ b/tests/ui/link-native-libs/manual-link-bad-kind.rs
@@ -1,5 +1,6 @@
 //@ compile-flags:-l bar=foo
-//@ error-pattern: unknown library kind `bar`, expected one of: static, dylib, framework, link-arg
 
 fn main() {
 }
+
+//~? ERROR unknown library kind `bar`
diff --git a/tests/ui/link-native-libs/manual-link-bad-search-path.rs b/tests/ui/link-native-libs/manual-link-bad-search-path.rs
index c9ced4734fc..cc4a5ef2267 100644
--- a/tests/ui/link-native-libs/manual-link-bad-search-path.rs
+++ b/tests/ui/link-native-libs/manual-link-bad-search-path.rs
@@ -1,5 +1,6 @@
 //@ compile-flags:-L native=
-//@ error-pattern: empty search path given via `-L`
 
 fn main() {
 }
+
+//~? ERROR empty search path given via `-L`
diff --git a/tests/ui/link-native-libs/manual-link-framework.rs b/tests/ui/link-native-libs/manual-link-framework.rs
index 43cdda0a4e6..b3c3d6a7c3c 100644
--- a/tests/ui/link-native-libs/manual-link-framework.rs
+++ b/tests/ui/link-native-libs/manual-link-framework.rs
@@ -1,5 +1,6 @@
 //@ ignore-apple
 //@ compile-flags:-l framework=foo
-//@ error-pattern: library kind `framework` is only supported on Apple targets
 
 fn main() {}
+
+//~? ERROR library kind `framework` is only supported on Apple targets
diff --git a/tests/ui/link-native-libs/manual-link-unsupported-kind.rs b/tests/ui/link-native-libs/manual-link-unsupported-kind.rs
index b5b9e3e6577..3dfe9bdebc5 100644
--- a/tests/ui/link-native-libs/manual-link-unsupported-kind.rs
+++ b/tests/ui/link-native-libs/manual-link-unsupported-kind.rs
@@ -1,5 +1,6 @@
 //@ compile-flags:-l raw-dylib=foo
-//@ error-pattern: unknown library kind `raw-dylib`, expected one of: static, dylib, framework, link-arg
 
 fn main() {
 }
+
+//~? ERROR unknown library kind `raw-dylib`
diff --git a/tests/ui/link-native-libs/modifiers-override-3.rs b/tests/ui/link-native-libs/modifiers-override-3.rs
index d05735ad616..3d269dbd812 100644
--- a/tests/ui/link-native-libs/modifiers-override-3.rs
+++ b/tests/ui/link-native-libs/modifiers-override-3.rs
@@ -2,6 +2,7 @@
 // overrides another command line library with modifiers.
 
 //@ compile-flags:-lstatic:+whole-archive=foo -lstatic:+whole-archive=foo
-//@ error-pattern: overriding linking modifiers from command line is not supported
 
 fn main() {}
+
+//~? ERROR overriding linking modifiers from command line is not supported
diff --git a/tests/ui/link-native-libs/suggest-libname-only-1.rs b/tests/ui/link-native-libs/suggest-libname-only-1.rs
index 328181fb5cb..4ccfa086bde 100644
--- a/tests/ui/link-native-libs/suggest-libname-only-1.rs
+++ b/tests/ui/link-native-libs/suggest-libname-only-1.rs
@@ -1,9 +1,10 @@
 //@ build-fail
 //@ compile-flags: --crate-type rlib
-//@ error-pattern: could not find native static library `libfoo.a`
 //@ error-pattern: only provide the library name `foo`, not the full filename
 
 #[link(name = "libfoo.a", kind = "static")]
-extern { }
+extern { } //~ WARN extern declarations without an explicit ABI are deprecated
 
 pub fn main() { }
+
+//~? ERROR could not find native static library `libfoo.a`
diff --git a/tests/ui/link-native-libs/suggest-libname-only-1.stderr b/tests/ui/link-native-libs/suggest-libname-only-1.stderr
index 47f7d92c9f9..85a3599e8db 100644
--- a/tests/ui/link-native-libs/suggest-libname-only-1.stderr
+++ b/tests/ui/link-native-libs/suggest-libname-only-1.stderr
@@ -1,5 +1,5 @@
 warning: extern declarations without an explicit ABI are deprecated
-  --> $DIR/suggest-libname-only-1.rs:7:1
+  --> $DIR/suggest-libname-only-1.rs:6:1
    |
 LL | extern { }
    | ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
diff --git a/tests/ui/link-native-libs/suggest-libname-only-2.rs b/tests/ui/link-native-libs/suggest-libname-only-2.rs
index 7ed106e4ab4..c35b4a674b7 100644
--- a/tests/ui/link-native-libs/suggest-libname-only-2.rs
+++ b/tests/ui/link-native-libs/suggest-libname-only-2.rs
@@ -1,9 +1,10 @@
 //@ build-fail
 //@ compile-flags: --crate-type rlib
-//@ error-pattern: could not find native static library `bar.lib`
 //@ error-pattern: only provide the library name `bar`, not the full filename
 
 #[link(name = "bar.lib", kind = "static")]
-extern { }
+extern { } //~ WARN extern declarations without an explicit ABI are deprecated
 
 pub fn main() { }
+
+//~? ERROR could not find native static library `bar.lib`
diff --git a/tests/ui/link-native-libs/suggest-libname-only-2.stderr b/tests/ui/link-native-libs/suggest-libname-only-2.stderr
index a2d8f4c8191..d5c88931ad5 100644
--- a/tests/ui/link-native-libs/suggest-libname-only-2.stderr
+++ b/tests/ui/link-native-libs/suggest-libname-only-2.stderr
@@ -1,5 +1,5 @@
 warning: extern declarations without an explicit ABI are deprecated
-  --> $DIR/suggest-libname-only-2.rs:7:1
+  --> $DIR/suggest-libname-only-2.rs:6:1
    |
 LL | extern { }
    | ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
diff --git a/tests/ui/linkage-attr/incompatible-flavor.rs b/tests/ui/linkage-attr/incompatible-flavor.rs
index acf720bc97a..7f583f47e2f 100644
--- a/tests/ui/linkage-attr/incompatible-flavor.rs
+++ b/tests/ui/linkage-attr/incompatible-flavor.rs
@@ -1,6 +1,7 @@
 //@ compile-flags: --target=x86_64-unknown-linux-gnu -C linker-flavor=msvc --crate-type=rlib
-//@ error-pattern: linker flavor `msvc` is incompatible with the current target
 //@ needs-llvm-components:
 
 #![feature(no_core)]
 #![no_core]
+
+//~? ERROR linker flavor `msvc` is incompatible with the current target
diff --git a/tests/ui/linkage-attr/issue-10755.rs b/tests/ui/linkage-attr/issue-10755.rs
index 58d5b5ead57..509f484adf8 100644
--- a/tests/ui/linkage-attr/issue-10755.rs
+++ b/tests/ui/linkage-attr/issue-10755.rs
@@ -1,10 +1,11 @@
 //@ build-fail
 //@ dont-check-compiler-stderr
 //@ compile-flags: -C linker=llllll
-//@ error-pattern: `llllll`
 
 // Before, the error-pattern checked for "not found". On WSL with appendWindowsPath=true, running
 // in invalid command returns a PermissionDenied instead.
 
 fn main() {
 }
+
+//~? ERROR `llllll`
diff --git a/tests/ui/linkage-attr/raw-dylib/elf/multiple-libraries.rs b/tests/ui/linkage-attr/raw-dylib/elf/multiple-libraries.rs
index f4715ff2d3d..030b95198f5 100644
--- a/tests/ui/linkage-attr/raw-dylib/elf/multiple-libraries.rs
+++ b/tests/ui/linkage-attr/raw-dylib/elf/multiple-libraries.rs
@@ -35,3 +35,5 @@ fn main() {
   meooooooooooooooow();
   woooooooooooooooooof();
 }
+
+//[without]~? ERROR linking with `
diff --git a/tests/ui/linkage-attr/raw-dylib/elf/single-symbol.rs b/tests/ui/linkage-attr/raw-dylib/elf/single-symbol.rs
index fe9c7884e54..20de4afcee0 100644
--- a/tests/ui/linkage-attr/raw-dylib/elf/single-symbol.rs
+++ b/tests/ui/linkage-attr/raw-dylib/elf/single-symbol.rs
@@ -26,3 +26,5 @@ unsafe extern "C" {
 fn main() {
   meooooooooooooooow();
 }
+
+//[without]~? ERROR linking with `
diff --git a/tests/ui/linkage-attr/raw-dylib/elf/verbatim.rs b/tests/ui/linkage-attr/raw-dylib/elf/verbatim.rs
index 72cba18d841..302ec0edeaa 100644
--- a/tests/ui/linkage-attr/raw-dylib/elf/verbatim.rs
+++ b/tests/ui/linkage-attr/raw-dylib/elf/verbatim.rs
@@ -27,3 +27,5 @@ unsafe extern "C" {
 fn main() {
   meooooooooooooooow();
 }
+
+//[without]~? ERROR linking with `
diff --git a/tests/ui/linkage-attr/unstable-flavor.rs b/tests/ui/linkage-attr/unstable-flavor.rs
index 82d9dff3874..6aa9efb58d1 100644
--- a/tests/ui/linkage-attr/unstable-flavor.rs
+++ b/tests/ui/linkage-attr/unstable-flavor.rs
@@ -4,11 +4,12 @@
 //
 //@ revisions: bpf ptx
 //@ [bpf] compile-flags: --target=bpfel-unknown-none -C linker-flavor=bpf --crate-type=rlib
-//@ [bpf] error-pattern: linker flavor `bpf` is unstable, the `-Z unstable-options` flag
 //@ [bpf] needs-llvm-components:
 //@ [ptx] compile-flags: --target=nvptx64-nvidia-cuda -C linker-flavor=ptx --crate-type=rlib
-//@ [ptx] error-pattern: linker flavor `ptx` is unstable, the `-Z unstable-options` flag
 //@ [ptx] needs-llvm-components:
 
 #![feature(no_core)]
 #![no_core]
+
+//[bpf]~? ERROR the linker flavor `bpf` is unstable
+//[ptx]~? ERROR the linker flavor `ptx` is unstable
diff --git a/tests/ui/linkage-attr/link-self-contained-consistency.many.stderr b/tests/ui/linking/link-self-contained-consistency.many.stderr
index a5fc96b4e0b..a5fc96b4e0b 100644
--- a/tests/ui/linkage-attr/link-self-contained-consistency.many.stderr
+++ b/tests/ui/linking/link-self-contained-consistency.many.stderr
diff --git a/tests/ui/linkage-attr/link-self-contained-consistency.one.stderr b/tests/ui/linking/link-self-contained-consistency.one.stderr
index 5982b7a618e..5982b7a618e 100644
--- a/tests/ui/linkage-attr/link-self-contained-consistency.one.stderr
+++ b/tests/ui/linking/link-self-contained-consistency.one.stderr
diff --git a/tests/ui/linkage-attr/link-self-contained-consistency.rs b/tests/ui/linking/link-self-contained-consistency.rs
index 08227433891..08227433891 100644
--- a/tests/ui/linkage-attr/link-self-contained-consistency.rs
+++ b/tests/ui/linking/link-self-contained-consistency.rs
diff --git a/tests/ui/lint/bad-lint-cap.rs b/tests/ui/lint/bad-lint-cap.rs
index aab3f723796..c219cb1b665 100644
--- a/tests/ui/lint/bad-lint-cap.rs
+++ b/tests/ui/lint/bad-lint-cap.rs
@@ -1,4 +1,5 @@
 //@ compile-flags: --cap-lints test
-//@ error-pattern: unknown lint level: `test`
 
 fn main() {}
+
+//~? ERROR unknown lint level: `test`
diff --git a/tests/ui/lint/cli-unknown-force-warn.rs b/tests/ui/lint/cli-unknown-force-warn.rs
index 007f8dd8732..330d5570e21 100644
--- a/tests/ui/lint/cli-unknown-force-warn.rs
+++ b/tests/ui/lint/cli-unknown-force-warn.rs
@@ -4,8 +4,11 @@
 //@ check-pass
 //@ compile-flags: --force-warn foo-qux
 
-//@ error-pattern: unknown lint: `foo_qux`
 //@ error-pattern: requested on the command line with `--force-warn foo_qux`
 //@ error-pattern: `#[warn(unknown_lints)]` on by default
 
 fn main() {}
+
+//~? WARN unknown lint: `foo_qux`
+//~? WARN unknown lint: `foo_qux`
+//~? WARN unknown lint: `foo_qux`
diff --git a/tests/ui/lint/command-line-register-unknown-lint-tool.rs b/tests/ui/lint/command-line-register-unknown-lint-tool.rs
index b4e9a067fe2..a517f4c7ea6 100644
--- a/tests/ui/lint/command-line-register-unknown-lint-tool.rs
+++ b/tests/ui/lint/command-line-register-unknown-lint-tool.rs
@@ -1,4 +1,7 @@
 //@ compile-flags: -A unknown_tool::foo
-//@ error-pattern: unknown lint tool: `unknown_tool`
 
 fn main() {}
+
+//~? ERROR unknown lint tool: `unknown_tool`
+//~? ERROR unknown lint tool: `unknown_tool`
+//~? ERROR unknown lint tool: `unknown_tool`
diff --git a/tests/ui/lint/dead-code/anon-const-in-pat.rs b/tests/ui/lint/dead-code/anon-const-in-pat.rs
deleted file mode 100644
index e2d8c90edcc..00000000000
--- a/tests/ui/lint/dead-code/anon-const-in-pat.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-//@ check-pass
-#![feature(inline_const_pat)]
-#![deny(dead_code)]
-
-const fn one() -> i32 {
-    1
-}
-
-const fn two() -> i32 {
-    2
-}
-
-const fn three() -> i32 {
-    3
-}
-
-fn inline_const() {
-    // rust-lang/rust#78171: dead_code lint triggers even though function is used in const pattern
-    match 1 {
-        const { one() } => {}
-        _ => {}
-    }
-}
-
-fn inline_const_range() {
-    match 1 {
-        1 ..= const { two() } => {}
-        _ => {}
-    }
-}
-
-struct S<const C: i32>;
-
-fn const_generic_arg() {
-    match S::<3> {
-        S::<{three()}> => {}
-    }
-}
-
-fn main() {
-    inline_const();
-    inline_const_range();
-    const_generic_arg();
-}
diff --git a/tests/ui/lint/force-warn/warnings-lint-group.rs b/tests/ui/lint/force-warn/warnings-lint-group.rs
index 944070527a1..28de42639d3 100644
--- a/tests/ui/lint/force-warn/warnings-lint-group.rs
+++ b/tests/ui/lint/force-warn/warnings-lint-group.rs
@@ -1,5 +1,8 @@
 // --force-warn warnings is an error
 //@ compile-flags: --force-warn warnings
-//@ error-pattern: `warnings` lint group is not supported
 
 fn main() {}
+
+//~? ERROR `warnings` lint group is not supported with ´--force-warn´
+//~? ERROR `warnings` lint group is not supported with ´--force-warn´
+//~? ERROR `warnings` lint group is not supported with ´--force-warn´
diff --git a/tests/ui/lint/issue-104897.rs b/tests/ui/lint/issue-104897.rs
index 3cfe94bbd22..99bc1cf3a42 100644
--- a/tests/ui/lint/issue-104897.rs
+++ b/tests/ui/lint/issue-104897.rs
@@ -1,5 +1,2 @@
-//@ error-pattern: this file contains an unclosed delimiter
-//@ error-pattern: this file contains an unclosed delimiter
-//@ error-pattern: this file contains an unclosed delimiter
-
+//~v ERROR this file contains an unclosed delimiter
 fn f(){(print!(á
diff --git a/tests/ui/lint/issue-104897.stderr b/tests/ui/lint/issue-104897.stderr
index 584902ee4c0..ebc794bfb73 100644
--- a/tests/ui/lint/issue-104897.stderr
+++ b/tests/ui/lint/issue-104897.stderr
@@ -1,5 +1,5 @@
 error: this file contains an unclosed delimiter
-  --> $DIR/issue-104897.rs:5:18
+  --> $DIR/issue-104897.rs:2:18
    |
 LL | fn f(){(print!(á
    |       --      - ^
diff --git a/tests/ui/lint/lint-pre-expansion-extern-module.rs b/tests/ui/lint/lint-pre-expansion-extern-module.rs
index b76879ccbb8..f1ab0cf3b74 100644
--- a/tests/ui/lint/lint-pre-expansion-extern-module.rs
+++ b/tests/ui/lint/lint-pre-expansion-extern-module.rs
@@ -1,7 +1,9 @@
 //@ check-pass
 //@ compile-flags: -W rust-2018-compatibility
-//@ error-pattern: `try` is a keyword in the 2018 edition
 
 fn main() {}
 
 mod lint_pre_expansion_extern_module_aux;
+
+//~? WARN `try` is a keyword in the 2018 edition
+//~? WARN this is accepted in the current edition
diff --git a/tests/ui/lint/lint-removed-cmdline-deny.rs b/tests/ui/lint/lint-removed-cmdline-deny.rs
index e56a95d292a..6616781d5cb 100644
--- a/tests/ui/lint/lint-removed-cmdline-deny.rs
+++ b/tests/ui/lint/lint-removed-cmdline-deny.rs
@@ -3,11 +3,14 @@
 
 //@ compile-flags:-D renamed-and-removed-lints -D raw_pointer_derive
 
-//@ error-pattern:lint `raw_pointer_derive` has been removed
 //@ error-pattern:requested on the command line with `-D raw_pointer_derive`
 //@ error-pattern:requested on the command line with `-D renamed-and-removed-lints`
 
 #![warn(unused)]
 
 #[deny(warnings)]
-fn main() { let unused = (); }
+fn main() { let unused = (); } //~ ERROR unused variable: `unused`
+
+//~? ERROR lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
+//~? ERROR lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
+//~? ERROR lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
diff --git a/tests/ui/lint/lint-removed-cmdline-deny.stderr b/tests/ui/lint/lint-removed-cmdline-deny.stderr
index 3321afa7fcd..27a3504a16a 100644
--- a/tests/ui/lint/lint-removed-cmdline-deny.stderr
+++ b/tests/ui/lint/lint-removed-cmdline-deny.stderr
@@ -14,13 +14,13 @@ error: lint `raw_pointer_derive` has been removed: using derive with raw pointer
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: unused variable: `unused`
-  --> $DIR/lint-removed-cmdline-deny.rs:13:17
+  --> $DIR/lint-removed-cmdline-deny.rs:12:17
    |
 LL | fn main() { let unused = (); }
    |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
-  --> $DIR/lint-removed-cmdline-deny.rs:12:8
+  --> $DIR/lint-removed-cmdline-deny.rs:11:8
    |
 LL | #[deny(warnings)]
    |        ^^^^^^^^
diff --git a/tests/ui/lint/lint-removed-cmdline.rs b/tests/ui/lint/lint-removed-cmdline.rs
index 3c9d3eb8e7b..4dde3dbc381 100644
--- a/tests/ui/lint/lint-removed-cmdline.rs
+++ b/tests/ui/lint/lint-removed-cmdline.rs
@@ -3,11 +3,14 @@
 
 //@ compile-flags:-D raw_pointer_derive
 
-//@ error-pattern:lint `raw_pointer_derive` has been removed
 //@ error-pattern:`#[warn(renamed_and_removed_lints)]` on by default
 //@ error-pattern:requested on the command line with `-D raw_pointer_derive`
 
 #![warn(unused)]
 
 #[deny(warnings)]
-fn main() { let unused = (); }
+fn main() { let unused = (); } //~ ERROR unused variable: `unused`
+
+//~? WARN lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
+//~? WARN lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
+//~? WARN lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
diff --git a/tests/ui/lint/lint-removed-cmdline.stderr b/tests/ui/lint/lint-removed-cmdline.stderr
index fd63433c308..7994f9bcfd9 100644
--- a/tests/ui/lint/lint-removed-cmdline.stderr
+++ b/tests/ui/lint/lint-removed-cmdline.stderr
@@ -14,13 +14,13 @@ warning: lint `raw_pointer_derive` has been removed: using derive with raw point
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: unused variable: `unused`
-  --> $DIR/lint-removed-cmdline.rs:13:17
+  --> $DIR/lint-removed-cmdline.rs:12:17
    |
 LL | fn main() { let unused = (); }
    |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
-  --> $DIR/lint-removed-cmdline.rs:12:8
+  --> $DIR/lint-removed-cmdline.rs:11:8
    |
 LL | #[deny(warnings)]
    |        ^^^^^^^^
diff --git a/tests/ui/lint/lint-renamed-cmdline-deny.rs b/tests/ui/lint/lint-renamed-cmdline-deny.rs
index 13500d006f8..0ea4ce40817 100644
--- a/tests/ui/lint/lint-renamed-cmdline-deny.rs
+++ b/tests/ui/lint/lint-renamed-cmdline-deny.rs
@@ -1,10 +1,12 @@
 //@ compile-flags:-D renamed-and-removed-lints -D bare_trait_object
 
-//@ error-pattern:lint `bare_trait_object` has been renamed to `bare_trait_objects`
 //@ error-pattern:use the new name `bare_trait_objects`
 //@ error-pattern:requested on the command line with `-D bare_trait_object`
 //@ error-pattern:requested on the command line with `-D renamed-and-removed-lints`
-//@ error-pattern:unused
 
 #[deny(unused)]
-fn main() { let unused = (); }
+fn main() { let unused = (); } //~ ERROR unused variable: `unused`
+
+//~? ERROR lint `bare_trait_object` has been renamed to `bare_trait_objects`
+//~? ERROR lint `bare_trait_object` has been renamed to `bare_trait_objects`
+//~? ERROR lint `bare_trait_object` has been renamed to `bare_trait_objects`
diff --git a/tests/ui/lint/lint-renamed-cmdline-deny.stderr b/tests/ui/lint/lint-renamed-cmdline-deny.stderr
index 0e182a4e5de..a49cdc84f9e 100644
--- a/tests/ui/lint/lint-renamed-cmdline-deny.stderr
+++ b/tests/ui/lint/lint-renamed-cmdline-deny.stderr
@@ -17,13 +17,13 @@ error: lint `bare_trait_object` has been renamed to `bare_trait_objects`
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: unused variable: `unused`
-  --> $DIR/lint-renamed-cmdline-deny.rs:10:17
+  --> $DIR/lint-renamed-cmdline-deny.rs:8:17
    |
 LL | fn main() { let unused = (); }
    |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
-  --> $DIR/lint-renamed-cmdline-deny.rs:9:8
+  --> $DIR/lint-renamed-cmdline-deny.rs:7:8
    |
 LL | #[deny(unused)]
    |        ^^^^^^
diff --git a/tests/ui/lint/lint-renamed-cmdline.rs b/tests/ui/lint/lint-renamed-cmdline.rs
index 7adea98a609..45df7b6d640 100644
--- a/tests/ui/lint/lint-renamed-cmdline.rs
+++ b/tests/ui/lint/lint-renamed-cmdline.rs
@@ -1,9 +1,11 @@
 //@ compile-flags:-D bare_trait_object
 
-//@ error-pattern:lint `bare_trait_object` has been renamed to `bare_trait_objects`
 //@ error-pattern:requested on the command line with `-D bare_trait_object`
 //@ error-pattern:`#[warn(renamed_and_removed_lints)]` on by default
-//@ error-pattern:unused
 
 #[deny(unused)]
-fn main() { let unused = (); }
+fn main() { let unused = (); } //~ ERROR unused variable: `unused`
+
+//~? WARN lint `bare_trait_object` has been renamed to `bare_trait_objects`
+//~? WARN lint `bare_trait_object` has been renamed to `bare_trait_objects`
+//~? WARN lint `bare_trait_object` has been renamed to `bare_trait_objects`
diff --git a/tests/ui/lint/lint-renamed-cmdline.stderr b/tests/ui/lint/lint-renamed-cmdline.stderr
index d6bb72f34dc..901e7a642d1 100644
--- a/tests/ui/lint/lint-renamed-cmdline.stderr
+++ b/tests/ui/lint/lint-renamed-cmdline.stderr
@@ -17,13 +17,13 @@ warning: lint `bare_trait_object` has been renamed to `bare_trait_objects`
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: unused variable: `unused`
-  --> $DIR/lint-renamed-cmdline.rs:9:17
+  --> $DIR/lint-renamed-cmdline.rs:7:17
    |
 LL | fn main() { let unused = (); }
    |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
-  --> $DIR/lint-renamed-cmdline.rs:8:8
+  --> $DIR/lint-renamed-cmdline.rs:6:8
    |
 LL | #[deny(unused)]
    |        ^^^^^^
diff --git a/tests/ui/lint/lint-stability2.rs b/tests/ui/lint/lint-stability2.rs
index 254ec8f9bee..056ff5a3e0a 100644
--- a/tests/ui/lint/lint-stability2.rs
+++ b/tests/ui/lint/lint-stability2.rs
@@ -1,5 +1,4 @@
 //@ aux-build:lint_stability.rs
-//@ error-pattern: use of deprecated function
 
 #![deny(deprecated)]
 
@@ -9,5 +8,5 @@ extern crate lint_stability;
 use lint_stability::*;
 
 fn main() {
-    macro_test!();
+    macro_test!(); //~ ERROR use of deprecated function `lint_stability::deprecated`: text
 }
diff --git a/tests/ui/lint/lint-stability2.stderr b/tests/ui/lint/lint-stability2.stderr
index 3df0c428167..fa1bce716fc 100644
--- a/tests/ui/lint/lint-stability2.stderr
+++ b/tests/ui/lint/lint-stability2.stderr
@@ -1,11 +1,11 @@
 error: use of deprecated function `lint_stability::deprecated`: text
-  --> $DIR/lint-stability2.rs:12:5
+  --> $DIR/lint-stability2.rs:11:5
    |
 LL |     macro_test!();
    |     ^^^^^^^^^^^^^
    |
 note: the lint level is defined here
-  --> $DIR/lint-stability2.rs:4:9
+  --> $DIR/lint-stability2.rs:3:9
    |
 LL | #![deny(deprecated)]
    |         ^^^^^^^^^^
diff --git a/tests/ui/lint/lint-stability3.rs b/tests/ui/lint/lint-stability3.rs
index 3c5652ae030..1ca346f746a 100644
--- a/tests/ui/lint/lint-stability3.rs
+++ b/tests/ui/lint/lint-stability3.rs
@@ -1,5 +1,4 @@
 //@ aux-build:lint_stability.rs
-//@ error-pattern: use of deprecated function
 
 #![deny(deprecated)]
 #![allow(warnings)]
@@ -11,4 +10,5 @@ use lint_stability::*;
 
 fn main() {
     macro_test_arg_nested!(deprecated_text);
+    //~^ ERROR use of deprecated function `lint_stability::deprecated_text`: text
 }
diff --git a/tests/ui/lint/lint-stability3.stderr b/tests/ui/lint/lint-stability3.stderr
index 3a2af452ce2..85f14c6fc17 100644
--- a/tests/ui/lint/lint-stability3.stderr
+++ b/tests/ui/lint/lint-stability3.stderr
@@ -1,11 +1,11 @@
 error: use of deprecated function `lint_stability::deprecated_text`: text
-  --> $DIR/lint-stability3.rs:13:28
+  --> $DIR/lint-stability3.rs:12:28
    |
 LL |     macro_test_arg_nested!(deprecated_text);
    |                            ^^^^^^^^^^^^^^^
    |
 note: the lint level is defined here
-  --> $DIR/lint-stability3.rs:4:9
+  --> $DIR/lint-stability3.rs:3:9
    |
 LL | #![deny(deprecated)]
    |         ^^^^^^^^^^
diff --git a/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs b/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs
index c92c3999ce9..e2f7c73eacf 100644
--- a/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs
+++ b/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs
@@ -1,9 +1,15 @@
 //@ compile-flags:-D unknown-lints -D bogus -D dead_cod
 
-//@ error-pattern:unknown lint: `bogus`
 //@ error-pattern:requested on the command line with `-D bogus`
 //@ error-pattern:requested on the command line with `-D dead_cod`
 //@ error-pattern:requested on the command line with `-D unknown-lints`
 //@ error-pattern:did you mean: `dead_code`
 
 fn main() { }
+
+//~? ERROR unknown lint: `bogus`
+//~? ERROR unknown lint: `dead_cod`
+//~? ERROR unknown lint: `bogus`
+//~? ERROR unknown lint: `dead_cod`
+//~? ERROR unknown lint: `bogus`
+//~? ERROR unknown lint: `dead_cod`
diff --git a/tests/ui/lint/lint-unknown-lint-cmdline.rs b/tests/ui/lint/lint-unknown-lint-cmdline.rs
index 202c617235f..931e945a1a3 100644
--- a/tests/ui/lint/lint-unknown-lint-cmdline.rs
+++ b/tests/ui/lint/lint-unknown-lint-cmdline.rs
@@ -1,11 +1,16 @@
 //@ check-pass
 //@ compile-flags:-D bogus -D dead_cod
 
-//@ error-pattern:unknown lint: `bogus`
 //@ error-pattern:requested on the command line with `-D bogus`
 //@ error-pattern:`#[warn(unknown_lints)]` on by default
-//@ error-pattern:unknown lint: `dead_cod`
 //@ error-pattern:requested on the command line with `-D dead_cod`
 //@ error-pattern:did you mean: `dead_code`
 
 fn main() { }
+
+//~? WARN unknown lint: `bogus`
+//~? WARN unknown lint: `dead_cod`
+//~? WARN unknown lint: `bogus`
+//~? WARN unknown lint: `dead_cod`
+//~? WARN unknown lint: `bogus`
+//~? WARN unknown lint: `dead_cod`
diff --git a/tests/ui/lint/unused_parens_multibyte_recovery.rs b/tests/ui/lint/unused_parens_multibyte_recovery.rs
index 630b25d192a..8f53c7ad262 100644
--- a/tests/ui/lint/unused_parens_multibyte_recovery.rs
+++ b/tests/ui/lint/unused_parens_multibyte_recovery.rs
@@ -1,10 +1,7 @@
 // ignore-tidy-trailing-newlines
-//
-//@ error-pattern: this file contains an unclosed delimiter
-//@ error-pattern: this file contains an unclosed delimiter
-//@ error-pattern: this file contains an unclosed delimiter
-//
+
 // Verify that unused parens lint does not try to create a span
 // which points in the middle of a multibyte character.
 
+//~v ERROR this file contains an unclosed delimiter
 fn f(){(print!(á
\ No newline at end of file
diff --git a/tests/ui/lint/unused_parens_multibyte_recovery.stderr b/tests/ui/lint/unused_parens_multibyte_recovery.stderr
index ef4089f31f4..770fd6f084e 100644
--- a/tests/ui/lint/unused_parens_multibyte_recovery.stderr
+++ b/tests/ui/lint/unused_parens_multibyte_recovery.stderr
@@ -1,5 +1,5 @@
 error: this file contains an unclosed delimiter
-  --> $DIR/unused_parens_multibyte_recovery.rs:10:17
+  --> $DIR/unused_parens_multibyte_recovery.rs:7:17
    |
 LL | fn f(){(print!(á
    |       --      - ^
diff --git a/tests/ui/lto/issue-11154.rs b/tests/ui/lto/issue-11154.rs
index 914b0b73e47..7770aeccd6a 100644
--- a/tests/ui/lto/issue-11154.rs
+++ b/tests/ui/lto/issue-11154.rs
@@ -1,6 +1,6 @@
 //@ build-fail
 //@ compile-flags: -C lto -C prefer-dynamic
 
-//@ error-pattern: cannot prefer dynamic linking
-
 fn main() {}
+
+//~? ERROR cannot prefer dynamic linking when performing LTO
diff --git a/tests/ui/lto/lto-duplicate-symbols.rs b/tests/ui/lto/lto-duplicate-symbols.rs
index 27bdde418f8..a62ab2e2217 100644
--- a/tests/ui/lto/lto-duplicate-symbols.rs
+++ b/tests/ui/lto/lto-duplicate-symbols.rs
@@ -1,7 +1,6 @@
 //@ build-fail
 //@ aux-build:lto-duplicate-symbols1.rs
 //@ aux-build:lto-duplicate-symbols2.rs
-//@ error-pattern:Linking globals named 'foo': symbol multiply defined!
 //@ compile-flags: -C lto
 //@ no-prefer-dynamic
 //@ normalize-stderr: "lto-duplicate-symbols2\.lto_duplicate_symbols2\.[0-9a-zA-Z]+-cgu" -> "lto-duplicate-symbols2.lto_duplicate_symbols2.HASH-cgu"
@@ -9,3 +8,6 @@ extern crate lto_duplicate_symbols1;
 extern crate lto_duplicate_symbols2;
 
 fn main() {}
+
+//~? WARN Linking globals named 'foo': symbol multiply defined
+//~? ERROR failed to load bitcode of module "lto-duplicate-symbols2.lto_duplicate_symbols2
diff --git a/tests/ui/macros/nonterminal-matching.rs b/tests/ui/macros/nonterminal-matching.rs
index b0a7f3e4650..a03ede20c54 100644
--- a/tests/ui/macros/nonterminal-matching.rs
+++ b/tests/ui/macros/nonterminal-matching.rs
@@ -29,8 +29,8 @@ macro_rules! foo {
     (ident $x:ident) => { bar!(ident $x); };
     (lifetime $x:lifetime) => { bar!(lifetime $x); };
     (tt $x:tt) => { bar!(tt $x); };
-    (expr $x:expr) => { bar!(expr $x); }; //~ ERROR: no rules expected expression `3`
-    (literal $x:literal) => { bar!(literal $x); }; //~ ERROR: no rules expected literal `4`
+    (expr $x:expr) => { bar!(expr $x); }; //~ ERROR: no rules expected `expr` metavariable
+    (literal $x:literal) => { bar!(literal $x); }; //~ ERROR: no rules expected `literal` metavariable
     (path $x:path) => { bar!(path $x); }; //~ ERROR: no rules expected `path` metavariable
     (stmt $x:stmt) => { bar!(stmt $x); }; //~ ERROR: no rules expected `stmt` metavariable
 }
diff --git a/tests/ui/macros/nonterminal-matching.stderr b/tests/ui/macros/nonterminal-matching.stderr
index 2d9252fbfc1..d0156141566 100644
--- a/tests/ui/macros/nonterminal-matching.stderr
+++ b/tests/ui/macros/nonterminal-matching.stderr
@@ -23,7 +23,7 @@ LL | complex_nonterminal!(enum E {});
    = help: try using `:tt` instead in the macro definition
    = note: this error originates in the macro `complex_nonterminal` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: no rules expected expression `3`
+error: no rules expected `expr` metavariable
   --> $DIR/nonterminal-matching.rs:32:35
    |
 LL |     (expr $x:expr) => { bar!(expr $x); };
@@ -45,7 +45,7 @@ LL |     (expr 3) => {};
    = help: try using `:tt` instead in the macro definition
    = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: no rules expected literal `4`
+error: no rules expected `literal` metavariable
   --> $DIR/nonterminal-matching.rs:33:44
    |
 LL |     (literal $x:literal) => { bar!(literal $x); };
diff --git a/tests/ui/macros/not-utf8.rs b/tests/ui/macros/not-utf8.rs
index ad8ac39d230..0993c068860 100644
--- a/tests/ui/macros/not-utf8.rs
+++ b/tests/ui/macros/not-utf8.rs
@@ -1,7 +1,7 @@
-//@ error-pattern: did not contain valid UTF-8
 //@ reference: input.encoding.utf8
 //@ reference: input.encoding.invalid
 
 fn foo() {
     include!("not-utf8.bin");
+    //~^ ERROR couldn't read `$DIR/not-utf8.bin`: stream did not contain valid UTF-8
 }
diff --git a/tests/ui/macros/not-utf8.stderr b/tests/ui/macros/not-utf8.stderr
index d466d5087d4..c310e70935e 100644
--- a/tests/ui/macros/not-utf8.stderr
+++ b/tests/ui/macros/not-utf8.stderr
@@ -1,5 +1,5 @@
 error: couldn't read `$DIR/not-utf8.bin`: stream did not contain valid UTF-8
-  --> $DIR/not-utf8.rs:6:5
+  --> $DIR/not-utf8.rs:5:5
    |
 LL |     include!("not-utf8.bin");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/macros/unreachable-arg.edition_2021.stderr b/tests/ui/macros/unreachable-arg.edition_2021.stderr
index ddaa2b9c1ef..fa776070789 100644
--- a/tests/ui/macros/unreachable-arg.edition_2021.stderr
+++ b/tests/ui/macros/unreachable-arg.edition_2021.stderr
@@ -1,5 +1,5 @@
 error: format argument must be a string literal
-  --> $DIR/unreachable-arg.rs:15:18
+  --> $DIR/unreachable-arg.rs:14:18
    |
 LL |     unreachable!(a);
    |                  ^
diff --git a/tests/ui/macros/unreachable-arg.rs b/tests/ui/macros/unreachable-arg.rs
index 702bd053ab0..d18272c8072 100644
--- a/tests/ui/macros/unreachable-arg.rs
+++ b/tests/ui/macros/unreachable-arg.rs
@@ -6,11 +6,10 @@
 //@ [edition_2015]run-fail
 //@ [edition_2021]check-fail
 //@ [edition_2015]error-pattern:internal error: entered unreachable code: hello
-//@ [edition_2021]error-pattern:format argument must be a string literal
 
 #![allow(non_fmt_panics)]
 
 fn main() {
     let a = "hello";
-    unreachable!(a);
+    unreachable!(a); //[edition_2021]~ ERROR format argument must be a string literal
 }
diff --git a/tests/ui/macros/unreachable-format-args.edition_2015.stderr b/tests/ui/macros/unreachable-format-args.edition_2015.stderr
index 9104848a58b..e2286b72e64 100644
--- a/tests/ui/macros/unreachable-format-args.edition_2015.stderr
+++ b/tests/ui/macros/unreachable-format-args.edition_2015.stderr
@@ -1,5 +1,5 @@
 error: there is no argument named `x`
-  --> $DIR/unreachable-format-args.rs:13:5
+  --> $DIR/unreachable-format-args.rs:12:5
    |
 LL |     unreachable!("x is {x} and y is {y}", y = 0);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/macros/unreachable-format-args.rs b/tests/ui/macros/unreachable-format-args.rs
index 856fc992685..79a851348ff 100644
--- a/tests/ui/macros/unreachable-format-args.rs
+++ b/tests/ui/macros/unreachable-format-args.rs
@@ -5,10 +5,10 @@
 //@ [edition_2021]edition:2021
 //@ [edition_2015]check-fail
 //@ [edition_2021]run-fail
-//@ [edition_2015]error-pattern:there is no argument named `x`
 //@ [edition_2021]error-pattern:internal error: entered unreachable code: x is 5 and y is 0
 
 fn main() {
     let x = 5;
     unreachable!("x is {x} and y is {y}", y = 0);
+    //[edition_2015]~^ ERROR there is no argument named `x`
 }
diff --git a/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs b/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs
index da56fe03184..94e6900bf40 100644
--- a/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs
+++ b/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs
@@ -1,7 +1,4 @@
 // check that we don't generate a span that points beyond EOF
 
-//@ error-pattern: unclosed delimiter
-//@ error-pattern: unclosed delimiter
-//@ error-pattern: unclosed delimiter
-
+//~v ERROR this file contains an unclosed delimiter
 fn a(){{{
diff --git a/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.stderr b/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.stderr
index d9748843fd7..9a86c267340 100644
--- a/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.stderr
+++ b/tests/ui/malformed/issue-107423-unused-delim-only-one-no-pair.stderr
@@ -1,5 +1,5 @@
 error: this file contains an unclosed delimiter
-  --> $DIR/issue-107423-unused-delim-only-one-no-pair.rs:7:11
+  --> $DIR/issue-107423-unused-delim-only-one-no-pair.rs:4:11
    |
 LL | fn a(){{{
    |       ---^
diff --git a/tests/ui/match/issue-112438.rs b/tests/ui/match/issue-112438.rs
deleted file mode 100644
index b2febe29210..00000000000
--- a/tests/ui/match/issue-112438.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-//@ run-pass
-#![feature(inline_const_pat)]
-#![allow(dead_code)]
-fn foo<const V: usize>() {
-    match 0 {
-        const { 1 << 5 } | _ => {}
-    }
-}
-
-fn main() {}
diff --git a/tests/ui/match/validate-range-endpoints.rs b/tests/ui/match/validate-range-endpoints.rs
index 46d4239886d..678cedf016b 100644
--- a/tests/ui/match/validate-range-endpoints.rs
+++ b/tests/ui/match/validate-range-endpoints.rs
@@ -1,4 +1,3 @@
-#![feature(inline_const_pat)]
 #![allow(overlapping_range_endpoints)]
 
 fn main() {
@@ -17,8 +16,6 @@ fn main() {
         // There isn't really a way to detect these
         1..=TOO_BIG => {}
         //~^ ERROR lower range bound must be less than or equal to upper
-        1..=const { 256 } => {}
-        //~^ ERROR lower range bound must be less than or equal to upper
         _ => {}
     }
 
diff --git a/tests/ui/match/validate-range-endpoints.stderr b/tests/ui/match/validate-range-endpoints.stderr
index 2d0538804a3..6a8a81a1cc6 100644
--- a/tests/ui/match/validate-range-endpoints.stderr
+++ b/tests/ui/match/validate-range-endpoints.stderr
@@ -1,59 +1,53 @@
 error: literal out of range for `u8`
-  --> $DIR/validate-range-endpoints.rs:7:12
+  --> $DIR/validate-range-endpoints.rs:6:12
    |
 LL |         1..257 => {}
    |            ^^^ this value does not fit into the type `u8` whose range is `0..=255`
 
 error: literal out of range for `u8`
-  --> $DIR/validate-range-endpoints.rs:9:13
+  --> $DIR/validate-range-endpoints.rs:8:13
    |
 LL |         1..=256 => {}
    |             ^^^ this value does not fit into the type `u8` whose range is `0..=255`
 
 error[E0030]: lower range bound must be less than or equal to upper
-  --> $DIR/validate-range-endpoints.rs:18:9
+  --> $DIR/validate-range-endpoints.rs:17:9
    |
 LL |         1..=TOO_BIG => {}
    |         ^^^^^^^^^^^ lower bound larger than upper bound
 
-error[E0030]: lower range bound must be less than or equal to upper
-  --> $DIR/validate-range-endpoints.rs:20:9
-   |
-LL |         1..=const { 256 } => {}
-   |         ^^^^^^^^^^^^^^^^^ lower bound larger than upper bound
-
 error: literal out of range for `u64`
-  --> $DIR/validate-range-endpoints.rs:26:32
+  --> $DIR/validate-range-endpoints.rs:23:32
    |
 LL |         10000000000000000000..=99999999999999999999 => {}
    |                                ^^^^^^^^^^^^^^^^^^^^ this value does not fit into the type `u64` whose range is `0..=18446744073709551615`
 
 error: literal out of range for `i8`
-  --> $DIR/validate-range-endpoints.rs:32:12
+  --> $DIR/validate-range-endpoints.rs:29:12
    |
 LL |         0..129 => {}
    |            ^^^ this value does not fit into the type `i8` whose range is `-128..=127`
 
 error: literal out of range for `i8`
-  --> $DIR/validate-range-endpoints.rs:34:13
+  --> $DIR/validate-range-endpoints.rs:31:13
    |
 LL |         0..=128 => {}
    |             ^^^ this value does not fit into the type `i8` whose range is `-128..=127`
 
 error: literal out of range for `i8`
-  --> $DIR/validate-range-endpoints.rs:36:9
+  --> $DIR/validate-range-endpoints.rs:33:9
    |
 LL |         -129..0 => {}
    |         ^^^^ this value does not fit into the type `i8` whose range is `-128..=127`
 
 error: literal out of range for `i8`
-  --> $DIR/validate-range-endpoints.rs:38:9
+  --> $DIR/validate-range-endpoints.rs:35:9
    |
 LL |         -10000..=-20 => {}
    |         ^^^^^^ this value does not fit into the type `i8` whose range is `-128..=127`
 
 error[E0004]: non-exhaustive patterns: `i8::MIN..=-17_i8` and `1_i8..=i8::MAX` not covered
-  --> $DIR/validate-range-endpoints.rs:49:11
+  --> $DIR/validate-range-endpoints.rs:46:11
    |
 LL |     match 0i8 {
    |           ^^^ patterns `i8::MIN..=-17_i8` and `1_i8..=i8::MAX` not covered
@@ -66,7 +60,7 @@ LL +         i8::MIN..=-17_i8 | 1_i8..=i8::MAX => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `i8::MIN..=-17_i8` not covered
-  --> $DIR/validate-range-endpoints.rs:53:11
+  --> $DIR/validate-range-endpoints.rs:50:11
    |
 LL |     match 0i8 {
    |           ^^^ pattern `i8::MIN..=-17_i8` not covered
@@ -78,7 +72,7 @@ LL ~         -10000.. => {},
 LL +         i8::MIN..=-17_i8 => todo!()
    |
 
-error: aborting due to 11 previous errors
+error: aborting due to 10 previous errors
 
 Some errors have detailed explanations: E0004, E0030.
 For more information about an error, try `rustc --explain E0004`.
diff --git a/tests/ui/minus-string.rs b/tests/ui/minus-string.rs
index 8d9b8d8bbf4..b83347b937e 100644
--- a/tests/ui/minus-string.rs
+++ b/tests/ui/minus-string.rs
@@ -1,3 +1 @@
-//@ error-pattern:cannot apply unary operator `-` to type `String`
-
-fn main() { -"foo".to_string(); }
+fn main() { -"foo".to_string(); } //~ ERROR cannot apply unary operator `-` to type `String`
diff --git a/tests/ui/minus-string.stderr b/tests/ui/minus-string.stderr
index cf63ec24416..153965c810e 100644
--- a/tests/ui/minus-string.stderr
+++ b/tests/ui/minus-string.stderr
@@ -1,5 +1,5 @@
 error[E0600]: cannot apply unary operator `-` to type `String`
-  --> $DIR/minus-string.rs:3:13
+  --> $DIR/minus-string.rs:1:13
    |
 LL | fn main() { -"foo".to_string(); }
    |             ^^^^^^^^^^^^^^^^^^ cannot apply unary operator `-`
diff --git a/tests/ui/mir/enable_passes_validation.rs b/tests/ui/mir/enable_passes_validation.rs
index 405ada77183..b97ddfba37f 100644
--- a/tests/ui/mir/enable_passes_validation.rs
+++ b/tests/ui/mir/enable_passes_validation.rs
@@ -1,24 +1,25 @@
 //@ revisions: empty unprefixed all_unknown all_known mixed
 
 //@[empty] compile-flags: -Zmir-enable-passes=
-//@[empty] error-pattern error: incorrect value `` for unstable option `mir-enable-passes` - a comma-separated list of strings, with elements beginning with + or - was expected
 
 //@[unprefixed] compile-flags: -Zmir-enable-passes=CheckAlignment
-//@[unprefixed] error-pattern error: incorrect value `CheckAlignment` for unstable option `mir-enable-passes` - a comma-separated list of strings, with elements beginning with + or - was expected
 
 //@[all_unknown] check-pass
 //@[all_unknown] compile-flags: -Zmir-enable-passes=+ThisPass,-DoesNotExist
-//@[all_unknown] error-pattern: warning: MIR pass `ThisPass` is unknown and will be ignored
-//@[all_unknown] error-pattern: warning: MIR pass `DoesNotExist` is unknown and will be ignored
 
 //@[all_known] check-pass
 //@[all_known] compile-flags: -Zmir-enable-passes=+CheckAlignment,+LowerIntrinsics
 
 //@[mixed] check-pass
 //@[mixed] compile-flags: -Zmir-enable-passes=+ThisPassDoesNotExist,+CheckAlignment
-//@[mixed] error-pattern: warning: MIR pass `ThisPassDoesNotExist` is unknown and will be ignored
 
 fn main() {}
 
 //[empty]~? ERROR incorrect value `` for unstable option `mir-enable-passes`
 //[unprefixed]~? ERROR incorrect value `CheckAlignment` for unstable option `mir-enable-passes`
+//[mixed]~? WARN MIR pass `ThisPassDoesNotExist` is unknown and will be ignored
+//[mixed]~? WARN MIR pass `ThisPassDoesNotExist` is unknown and will be ignored
+//[all_unknown]~? MIR pass `ThisPass` is unknown and will be ignored
+//[all_unknown]~? MIR pass `DoesNotExist` is unknown and will be ignored
+//[all_unknown]~? MIR pass `ThisPass` is unknown and will be ignored
+//[all_unknown]~? MIR pass `DoesNotExist` is unknown and will be ignored
diff --git a/tests/ui/mir/lint/assignment-overlap.rs b/tests/ui/mir/lint/assignment-overlap.rs
index 6396cccd4e8..950279b1555 100644
--- a/tests/ui/mir/lint/assignment-overlap.rs
+++ b/tests/ui/mir/lint/assignment-overlap.rs
@@ -12,7 +12,7 @@ pub fn main() {
     mir! {
         let a: [u8; 1024];
         {
-            a = a;
+            a = a; //~ ERROR broken MIR
             Return()
         }
     }
diff --git a/tests/ui/mir/lint/call-overlap.rs b/tests/ui/mir/lint/call-overlap.rs
index def78ea1e3b..3c42e04e3ec 100644
--- a/tests/ui/mir/lint/call-overlap.rs
+++ b/tests/ui/mir/lint/call-overlap.rs
@@ -12,7 +12,7 @@ pub fn main() {
     mir! {
         let a: [u8; 1024];
         {
-            Call(a = f(Move(a)), ReturnTo(bb1), UnwindUnreachable())
+            Call(a = f(Move(a)), ReturnTo(bb1), UnwindUnreachable()) //~ ERROR broken MIR
         }
         bb1 = {
             Return()
diff --git a/tests/ui/mir/lint/no-storage.rs b/tests/ui/mir/lint/no-storage.rs
index a6af8646f6e..68c1a2d2aab 100644
--- a/tests/ui/mir/lint/no-storage.rs
+++ b/tests/ui/mir/lint/no-storage.rs
@@ -21,7 +21,7 @@ pub fn f(a: bool) {
             Goto(bb3)
         }
         bb3 = {
-            b = ();
+            b = (); //~ ERROR broken MIR
             RET = b;
             StorageDead(b);
             Return()
diff --git a/tests/ui/mir/lint/storage-live.rs b/tests/ui/mir/lint/storage-live.rs
index 3e0cc4ee061..19d046b619c 100644
--- a/tests/ui/mir/lint/storage-live.rs
+++ b/tests/ui/mir/lint/storage-live.rs
@@ -20,7 +20,7 @@ fn multiple_storage() {
         let a: usize;
         {
             StorageLive(a);
-            StorageLive(a);
+            StorageLive(a); //~ ERROR broken MIR
             Return()
         }
     }
diff --git a/tests/ui/mir/lint/storage-return.rs b/tests/ui/mir/lint/storage-return.rs
index d51aee9518f..3bbd0045d9d 100644
--- a/tests/ui/mir/lint/storage-return.rs
+++ b/tests/ui/mir/lint/storage-return.rs
@@ -13,7 +13,7 @@ fn main() {
         {
             StorageLive(a);
             RET = a;
-            Return()
+            Return() //~ ERROR broken MIR
         }
     }
 }
diff --git a/tests/ui/mir/validate/noncleanup-cleanup.rs b/tests/ui/mir/validate/noncleanup-cleanup.rs
index b46bb46952b..3010a3804ce 100644
--- a/tests/ui/mir/validate/noncleanup-cleanup.rs
+++ b/tests/ui/mir/validate/noncleanup-cleanup.rs
@@ -2,16 +2,16 @@
 //
 //@ failure-status: 101
 //@ dont-check-compiler-stderr
-//@ error-pattern: cleanuppad mismatch
+
 #![feature(custom_mir, core_intrinsics)]
 extern crate core;
 use core::intrinsics::mir::*;
 
 #[custom_mir(dialect = "built")]
-pub fn main() {
+pub fn main() { //~ WARN function cannot return without recursing
     mir! {
         {
-            Call(RET = main(), ReturnTo(block), UnwindCleanup(block))
+            Call(RET = main(), ReturnTo(block), UnwindCleanup(block)) //~ ERROR cleanuppad mismatch
         }
         block = {
             Return()
diff --git a/tests/ui/mir/validate/noncleanup-resume.rs b/tests/ui/mir/validate/noncleanup-resume.rs
index b2a0e92e068..a80e99e2967 100644
--- a/tests/ui/mir/validate/noncleanup-resume.rs
+++ b/tests/ui/mir/validate/noncleanup-resume.rs
@@ -2,7 +2,7 @@
 //
 //@ failure-status: 101
 //@ dont-check-compiler-stderr
-//@ error-pattern: resume on non-cleanup block
+
 #![feature(custom_mir, core_intrinsics)]
 extern crate core;
 use core::intrinsics::mir::*;
@@ -11,7 +11,7 @@ use core::intrinsics::mir::*;
 pub fn main() {
     mir! {
         {
-            UnwindResume()
+            UnwindResume() //~ ERROR resume on non-cleanup block
         }
     }
 }
diff --git a/tests/ui/mir/validate/noncleanup-terminate.rs b/tests/ui/mir/validate/noncleanup-terminate.rs
index 24cf75e7d8e..859c5e71c0e 100644
--- a/tests/ui/mir/validate/noncleanup-terminate.rs
+++ b/tests/ui/mir/validate/noncleanup-terminate.rs
@@ -2,7 +2,7 @@
 //
 //@ failure-status: 101
 //@ dont-check-compiler-stderr
-//@ error-pattern: terminate on non-cleanup block
+
 #![feature(custom_mir, core_intrinsics)]
 extern crate core;
 use core::intrinsics::mir::*;
@@ -11,7 +11,7 @@ use core::intrinsics::mir::*;
 pub fn main() {
     mir! {
         {
-            UnwindTerminate(ReasonAbi)
+            UnwindTerminate(ReasonAbi) //~ ERROR terminate on non-cleanup block
         }
     }
 }
diff --git a/tests/ui/missing/missing-main.rs b/tests/ui/missing/missing-main.rs
index 3cafca09afb..2b8995fb8ff 100644
--- a/tests/ui/missing/missing-main.rs
+++ b/tests/ui/missing/missing-main.rs
@@ -1,2 +1 @@
-//@ error-pattern: `main` function not found
-fn mian() { }
+fn mian() { } //~ ERROR `main` function not found in crate `missing_main`
diff --git a/tests/ui/missing/missing-main.stderr b/tests/ui/missing/missing-main.stderr
index 2139981eac0..51a299d6a85 100644
--- a/tests/ui/missing/missing-main.stderr
+++ b/tests/ui/missing/missing-main.stderr
@@ -1,5 +1,5 @@
 error[E0601]: `main` function not found in crate `missing_main`
-  --> $DIR/missing-main.rs:2:14
+  --> $DIR/missing-main.rs:1:14
    |
 LL | fn mian() { }
    |              ^ consider adding a `main` function to `$DIR/missing-main.rs`
diff --git a/tests/ui/missing/missing-return.rs b/tests/ui/missing/missing-return.rs
index defd8a3bb78..5d9839a969c 100644
--- a/tests/ui/missing/missing-return.rs
+++ b/tests/ui/missing/missing-return.rs
@@ -1,5 +1,5 @@
 //@ error-pattern: return
 
-fn f() -> isize { }
+fn f() -> isize { } //~ ERROR mismatched types
 
 fn main() { f(); }
diff --git a/tests/ui/nested-ty-params.rs b/tests/ui/nested-ty-params.rs
index b7cedf97c91..866e6230f9e 100644
--- a/tests/ui/nested-ty-params.rs
+++ b/tests/ui/nested-ty-params.rs
@@ -1,6 +1,8 @@
 //@ error-pattern:can't use generic parameters from outer item
 fn hd<U>(v: Vec<U> ) -> U {
     fn hd1(w: [U]) -> U { return w[0]; }
+    //~^ ERROR can't use generic parameters from outer item
+    //~| ERROR can't use generic parameters from outer item
 
     return hd1(v);
 }
diff --git a/tests/ui/no-capture-arc.rs b/tests/ui/no-capture-arc.rs
index aafb170c7e1..9c957a4e01b 100644
--- a/tests/ui/no-capture-arc.rs
+++ b/tests/ui/no-capture-arc.rs
@@ -1,5 +1,3 @@
-//@ error-pattern: borrow of moved value
-
 use std::sync::Arc;
 use std::thread;
 
@@ -11,7 +9,7 @@ fn main() {
         assert_eq!((*arc_v)[3], 4);
     });
 
-    assert_eq!((*arc_v)[2], 3);
+    assert_eq!((*arc_v)[2], 3); //~ ERROR borrow of moved value: `arc_v`
 
     println!("{:?}", *arc_v);
 }
diff --git a/tests/ui/no-capture-arc.stderr b/tests/ui/no-capture-arc.stderr
index 4a51ddb67a3..9c1f5c65066 100644
--- a/tests/ui/no-capture-arc.stderr
+++ b/tests/ui/no-capture-arc.stderr
@@ -1,5 +1,5 @@
 error[E0382]: borrow of moved value: `arc_v`
-  --> $DIR/no-capture-arc.rs:14:18
+  --> $DIR/no-capture-arc.rs:12:18
    |
 LL |     let arc_v = Arc::new(v);
    |         ----- move occurs because `arc_v` has type `Arc<Vec<i32>>`, which does not implement the `Copy` trait
diff --git a/tests/ui/no_std/no-std-no-start-binary.rs b/tests/ui/no_std/no-std-no-start-binary.rs
index 5c8a0e6c0b8..df68b99346a 100644
--- a/tests/ui/no_std/no-std-no-start-binary.rs
+++ b/tests/ui/no_std/no-std-no-start-binary.rs
@@ -11,3 +11,5 @@ fn handler(_info: &core::panic::PanicInfo<'_>) -> ! {
 }
 
 fn main() {}
+
+//~? ERROR using `fn main` requires the standard library
diff --git a/tests/ui/no_std/no-std-unwind-binary.rs b/tests/ui/no_std/no-std-unwind-binary.rs
index 74c80d75c3e..cb1dc4427ae 100644
--- a/tests/ui/no_std/no-std-unwind-binary.rs
+++ b/tests/ui/no_std/no-std-unwind-binary.rs
@@ -1,4 +1,3 @@
-//@ error-pattern:unwinding panics are not supported without std
 //@ needs-unwind
 //@ compile-flags: -Cpanic=unwind
 
@@ -13,3 +12,5 @@ fn handler(_info: &core::panic::PanicInfo<'_>) -> ! {
 }
 
 fn main() {}
+
+//~? ERROR unwinding panics are not supported without std
diff --git a/tests/ui/occurs-check-2.rs b/tests/ui/occurs-check-2.rs
index 1ec460a8735..9289a8e870a 100644
--- a/tests/ui/occurs-check-2.rs
+++ b/tests/ui/occurs-check-2.rs
@@ -4,6 +4,6 @@ fn main() {
     let g;
 
     g = f;
-    f = Box::new(g);
     //~^ ERROR overflow assigning `Box<_>` to `_`
+    f = Box::new(g);
 }
diff --git a/tests/ui/occurs-check-2.stderr b/tests/ui/occurs-check-2.stderr
index 54307a6c547..5f296967f30 100644
--- a/tests/ui/occurs-check-2.stderr
+++ b/tests/ui/occurs-check-2.stderr
@@ -1,8 +1,8 @@
 error[E0275]: overflow assigning `Box<_>` to `_`
-  --> $DIR/occurs-check-2.rs:7:9
+  --> $DIR/occurs-check-2.rs:6:9
    |
-LL |     f = Box::new(g);
-   |         ^^^^^^^^^^^
+LL |     g = f;
+   |         ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/occurs-check-3.stderr b/tests/ui/occurs-check-3.stderr
index 77b67ec1a62..eb05c94957c 100644
--- a/tests/ui/occurs-check-3.stderr
+++ b/tests/ui/occurs-check-3.stderr
@@ -1,8 +1,8 @@
 error[E0275]: overflow assigning `Clam<_>` to `_`
-  --> $DIR/occurs-check-3.rs:6:9
+  --> $DIR/occurs-check-3.rs:6:17
    |
 LL |     c = Clam::A(c);
-   |         ^^^^^^^^^^
+   |                 ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/occurs-check.stderr b/tests/ui/occurs-check.stderr
index 30468d68cbd..ea7c541abc1 100644
--- a/tests/ui/occurs-check.stderr
+++ b/tests/ui/occurs-check.stderr
@@ -1,8 +1,8 @@
 error[E0275]: overflow assigning `Box<_>` to `_`
-  --> $DIR/occurs-check.rs:3:9
+  --> $DIR/occurs-check.rs:3:18
    |
 LL |     f = Box::new(f);
-   |         ^^^^^^^^^^^
+   |                  ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/packed/packed-struct-generic-transmute.rs b/tests/ui/packed/packed-struct-generic-transmute.rs
index ed655a1d483..17e72bebc7d 100644
--- a/tests/ui/packed/packed-struct-generic-transmute.rs
+++ b/tests/ui/packed/packed-struct-generic-transmute.rs
@@ -22,6 +22,7 @@ fn main() {
     let foo = Foo { bar: [1u8, 2, 3, 4, 5], baz: 10i32 };
     unsafe {
         let oof: Oof<[u8; 5], i32> = mem::transmute(foo);
+        //~^ ERROR cannot transmute between types of different sizes, or dependently-sized types
         println!("{:?} {:?}", &oof.rab[..], oof.zab);
     }
 }
diff --git a/tests/ui/packed/packed-struct-transmute.rs b/tests/ui/packed/packed-struct-transmute.rs
index 98feeea8871..5ad6524ff81 100644
--- a/tests/ui/packed/packed-struct-transmute.rs
+++ b/tests/ui/packed/packed-struct-transmute.rs
@@ -24,6 +24,7 @@ fn main() {
     let foo = Foo { bar: 1, baz: 10 };
     unsafe {
         let oof: Oof = mem::transmute(foo);
+        //~^ ERROR cannot transmute between types of different sizes, or dependently-sized types
         println!("{:?}", oof);
     }
 }
diff --git a/tests/ui/panic-handler/panic-handler-missing.rs b/tests/ui/panic-handler/panic-handler-missing.rs
index 09fbd9a69cf..ab617f93a99 100644
--- a/tests/ui/panic-handler/panic-handler-missing.rs
+++ b/tests/ui/panic-handler/panic-handler-missing.rs
@@ -1,5 +1,4 @@
 //@ dont-check-compiler-stderr
-//@ error-pattern: `#[panic_handler]` function required, but not found
 
 #![feature(lang_items)]
 #![no_main]
@@ -7,3 +6,5 @@
 
 #[lang = "eh_personality"]
 fn eh() {}
+
+//~? ERROR `#[panic_handler]` function required, but not found
diff --git a/tests/ui/panic-handler/panic-handler-std.rs b/tests/ui/panic-handler/panic-handler-std.rs
index 4eb05b5365f..f6a4b60461c 100644
--- a/tests/ui/panic-handler/panic-handler-std.rs
+++ b/tests/ui/panic-handler/panic-handler-std.rs
@@ -1,12 +1,11 @@
 //@ normalize-stderr: "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib"
-//@ error-pattern: found duplicate lang item `panic_impl`
 
 extern crate core;
 
 use core::panic::PanicInfo;
 
 #[panic_handler]
-fn panic(info: PanicInfo) -> ! {
+fn panic(info: PanicInfo) -> ! { //~ ERROR found duplicate lang item `panic_impl`
     loop {}
 }
 
diff --git a/tests/ui/panic-handler/panic-handler-std.stderr b/tests/ui/panic-handler/panic-handler-std.stderr
index caae16118ef..48c216ce27e 100644
--- a/tests/ui/panic-handler/panic-handler-std.stderr
+++ b/tests/ui/panic-handler/panic-handler-std.stderr
@@ -1,5 +1,5 @@
 error[E0152]: found duplicate lang item `panic_impl`
-  --> $DIR/panic-handler-std.rs:9:1
+  --> $DIR/panic-handler-std.rs:8:1
    |
 LL | / fn panic(info: PanicInfo) -> ! {
 LL | |     loop {}
diff --git a/tests/ui/panic-handler/weak-lang-item.rs b/tests/ui/panic-handler/weak-lang-item.rs
index 605e1bdd94b..cc5ccb75104 100644
--- a/tests/ui/panic-handler/weak-lang-item.rs
+++ b/tests/ui/panic-handler/weak-lang-item.rs
@@ -1,12 +1,13 @@
 //@ aux-build:weak-lang-items.rs
-//@ error-pattern: `#[panic_handler]` function required, but not found
-//@ error-pattern: unwinding panics are not supported without std
 //@ needs-unwind since it affects the error output
 //@ ignore-emscripten missing eh_catch_typeinfo lang item
 
 #![no_std]
 
-extern crate core;
+extern crate core; //~ ERROR the name `core` is defined multiple times
 extern crate weak_lang_items;
 
 fn main() {}
+
+//~? ERROR `#[panic_handler]` function required, but not found
+//~? ERROR unwinding panics are not supported without std
diff --git a/tests/ui/panic-handler/weak-lang-item.stderr b/tests/ui/panic-handler/weak-lang-item.stderr
index 5dcb37df689..5acd3e31870 100644
--- a/tests/ui/panic-handler/weak-lang-item.stderr
+++ b/tests/ui/panic-handler/weak-lang-item.stderr
@@ -1,5 +1,5 @@
 error[E0259]: the name `core` is defined multiple times
-  --> $DIR/weak-lang-item.rs:9:1
+  --> $DIR/weak-lang-item.rs:7:1
    |
 LL | extern crate core;
    | ^^^^^^^^^^^^^^^^^^ `core` reimported here
diff --git a/tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs b/tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs
index 2939835b0f4..8b782413f6a 100644
--- a/tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs
+++ b/tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs
@@ -4,7 +4,6 @@
 //@ ignore-musl - no dylibs here
 //@ ignore-emscripten
 //@ ignore-sgx no dynamic lib support
-//@ error-pattern:`panic_unwind` is not compiled with this crate's panic strategy
 
 // This is a test where the local crate, compiled with `panic=abort`, links to
 // the standard library **dynamically** which is already linked against
@@ -16,3 +15,5 @@
 
 fn main() {
 }
+
+//~? ERROR the linked panic runtime `panic_unwind` is not compiled with this crate's panic strategy `abort`
diff --git a/tests/ui/panic-runtime/bad-panic-flag1.rs b/tests/ui/panic-runtime/bad-panic-flag1.rs
index 82b7c2f723b..117935847cb 100644
--- a/tests/ui/panic-runtime/bad-panic-flag1.rs
+++ b/tests/ui/panic-runtime/bad-panic-flag1.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-C panic=foo
-//@ error-pattern:either `unwind` or `abort` was expected
 
 fn main() {}
+
+//~? ERROR incorrect value `foo` for codegen option `panic` - either `unwind` or `abort` was expected
diff --git a/tests/ui/panic-runtime/bad-panic-flag2.rs b/tests/ui/panic-runtime/bad-panic-flag2.rs
index 3875325deae..b5d0442a033 100644
--- a/tests/ui/panic-runtime/bad-panic-flag2.rs
+++ b/tests/ui/panic-runtime/bad-panic-flag2.rs
@@ -1,4 +1,5 @@
 //@ compile-flags:-C panic
-//@ error-pattern:requires either `unwind` or `abort`
 
 fn main() {}
+
+//~? ERROR codegen option `panic` requires either `unwind` or `abort`
diff --git a/tests/ui/panic-runtime/need-abort-got-unwind.rs b/tests/ui/panic-runtime/need-abort-got-unwind.rs
index 74b7edd968f..afd08426395 100644
--- a/tests/ui/panic-runtime/need-abort-got-unwind.rs
+++ b/tests/ui/panic-runtime/need-abort-got-unwind.rs
@@ -1,8 +1,9 @@
 //@ build-fail
 //@ needs-unwind
-//@ error-pattern:is incompatible with this crate's strategy of `unwind`
 //@ aux-build:needs-abort.rs
 
 extern crate needs_abort;
 
 fn main() {}
+
+//~? ERROR the crate `needs_abort` requires panic strategy `abort` which is incompatible with this crate's strategy of `unwind`
diff --git a/tests/ui/panic-runtime/need-unwind-got-abort.rs b/tests/ui/panic-runtime/need-unwind-got-abort.rs
index 6bc41509b6b..bc65e9ab3d9 100644
--- a/tests/ui/panic-runtime/need-unwind-got-abort.rs
+++ b/tests/ui/panic-runtime/need-unwind-got-abort.rs
@@ -1,5 +1,4 @@
 //@ build-fail
-//@ error-pattern:is incompatible with this crate's strategy of `abort`
 //@ aux-build:needs-unwind.rs
 //@ compile-flags:-C panic=abort
 //@ no-prefer-dynamic
@@ -7,3 +6,5 @@
 extern crate needs_unwind;
 
 fn main() {}
+
+//~? ERROR the crate `needs_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
diff --git a/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs b/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs
index d0a82bd8507..eb00c071702 100644
--- a/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs
+++ b/tests/ui/panic-runtime/runtime-depend-on-needs-runtime.rs
@@ -1,8 +1,9 @@
 //@ dont-check-compiler-stderr
 //@ aux-build:needs-panic-runtime.rs
 //@ aux-build:depends.rs
-//@ error-pattern:cannot depend on a crate that needs a panic runtime
 
 extern crate depends;
 
 fn main() {}
+
+//~? ERROR the crate `depends` cannot depend on a crate that needs a panic runtime, but it depends on `needs_panic_runtime`
diff --git a/tests/ui/panic-runtime/transitive-link-a-bunch.rs b/tests/ui/panic-runtime/transitive-link-a-bunch.rs
index 15557d35bc5..2a0b9e3fa63 100644
--- a/tests/ui/panic-runtime/transitive-link-a-bunch.rs
+++ b/tests/ui/panic-runtime/transitive-link-a-bunch.rs
@@ -5,7 +5,6 @@
 //@ aux-build:wants-panic-runtime-unwind.rs
 //@ aux-build:wants-panic-runtime-abort.rs
 //@ aux-build:panic-runtime-lang-items.rs
-//@ error-pattern: is not compiled with this crate's panic strategy `unwind`
 
 #![no_std]
 #![no_main]
@@ -13,3 +12,7 @@
 extern crate wants_panic_runtime_unwind;
 extern crate wants_panic_runtime_abort;
 extern crate panic_runtime_lang_items;
+
+//~? ERROR cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_abort
+//~? ERROR the linked panic runtime `panic_runtime_abort` is not compiled with this crate's panic strategy `unwind`
+//~? ERROR the crate `wants_panic_runtime_abort` requires panic strategy `abort` which is incompatible with this crate's strategy of `unwind`
diff --git a/tests/ui/panic-runtime/two-panic-runtimes.rs b/tests/ui/panic-runtime/two-panic-runtimes.rs
index 3608dca2124..15c08cbe30d 100644
--- a/tests/ui/panic-runtime/two-panic-runtimes.rs
+++ b/tests/ui/panic-runtime/two-panic-runtimes.rs
@@ -1,6 +1,8 @@
+// ignore-tidy-linelength
 //@ build-fail
+//@ compile-flags: --error-format=human
+//@ error-pattern: cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
 //@ dont-check-compiler-stderr
-//@ error-pattern:cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
 //@ aux-build:panic-runtime-unwind.rs
 //@ aux-build:panic-runtime-unwind2.rs
 //@ aux-build:panic-runtime-lang-items.rs
@@ -13,3 +15,8 @@ extern crate panic_runtime_unwind2;
 extern crate panic_runtime_lang_items;
 
 fn main() {}
+
+// FIXME: The second and third errors are target-dependent.
+//FIXME~? ERROR cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
+//FIXME~? ERROR the linked panic runtime `panic_runtime_unwind2` is not compiled with this crate's panic strategy `abort`
+//FIXME~? ERROR the crate `panic_runtime_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
diff --git a/tests/ui/panic-runtime/unwind-tables-target-required.rs b/tests/ui/panic-runtime/unwind-tables-target-required.rs
index 5c6ec19c16d..ff8df284f6b 100644
--- a/tests/ui/panic-runtime/unwind-tables-target-required.rs
+++ b/tests/ui/panic-runtime/unwind-tables-target-required.rs
@@ -5,7 +5,8 @@
 //@ compile-flags: -C force-unwind-tables=no
 //
 //@ dont-check-compiler-stderr
-//@ error-pattern: target requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no`
 
 pub fn main() {
 }
+
+//~? ERROR target requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no`
diff --git a/tests/ui/panic-runtime/want-abort-got-unwind.rs b/tests/ui/panic-runtime/want-abort-got-unwind.rs
index ad9fa52f3d4..ed61c2613df 100644
--- a/tests/ui/panic-runtime/want-abort-got-unwind.rs
+++ b/tests/ui/panic-runtime/want-abort-got-unwind.rs
@@ -1,9 +1,16 @@
+// ignore-tidy-linelength
 //@ build-fail
+//@ compile-flags: --error-format=human
+//@ error-pattern: the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
 //@ dont-check-compiler-stderr
-//@ error-pattern:is not compiled with this crate's panic strategy `abort`
 //@ aux-build:panic-runtime-unwind.rs
 //@ compile-flags:-C panic=abort
 
 extern crate panic_runtime_unwind;
 
 fn main() {}
+
+// FIXME: The first and third errors are target-dependent.
+//FIXME~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
+//FIXME~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
+//FIXME~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
diff --git a/tests/ui/panic-runtime/want-abort-got-unwind2.rs b/tests/ui/panic-runtime/want-abort-got-unwind2.rs
index d63161db55c..504fd779e09 100644
--- a/tests/ui/panic-runtime/want-abort-got-unwind2.rs
+++ b/tests/ui/panic-runtime/want-abort-got-unwind2.rs
@@ -1,6 +1,8 @@
+// ignore-tidy-linelength
 //@ build-fail
+//@ compile-flags: --error-format=human
+//@ error-pattern: the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
 //@ dont-check-compiler-stderr
-//@ error-pattern:is not compiled with this crate's panic strategy `abort`
 //@ aux-build:panic-runtime-unwind.rs
 //@ aux-build:wants-panic-runtime-unwind.rs
 //@ compile-flags:-C panic=abort
@@ -8,3 +10,8 @@
 extern crate wants_panic_runtime_unwind;
 
 fn main() {}
+
+// FIXME: The first and third errors are target-dependent.
+//FIXME~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
+//FIXME~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
+//FIXME~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
diff --git a/tests/ui/panic-runtime/want-unwind-got-abort.rs b/tests/ui/panic-runtime/want-unwind-got-abort.rs
index 93342a09182..497d1eafda5 100644
--- a/tests/ui/panic-runtime/want-unwind-got-abort.rs
+++ b/tests/ui/panic-runtime/want-unwind-got-abort.rs
@@ -1,6 +1,5 @@
 //@ build-fail
 //@ needs-unwind
-//@ error-pattern:is not compiled with this crate's panic strategy `unwind`
 //@ aux-build:panic-runtime-abort.rs
 //@ aux-build:panic-runtime-lang-items.rs
 
@@ -9,3 +8,5 @@
 
 extern crate panic_runtime_abort;
 extern crate panic_runtime_lang_items;
+
+//~? ERROR the linked panic runtime `panic_runtime_abort` is not compiled with this crate's panic strategy `unwind`
diff --git a/tests/ui/panic-runtime/want-unwind-got-abort2.rs b/tests/ui/panic-runtime/want-unwind-got-abort2.rs
index ee3f221d09c..2609545336c 100644
--- a/tests/ui/panic-runtime/want-unwind-got-abort2.rs
+++ b/tests/ui/panic-runtime/want-unwind-got-abort2.rs
@@ -1,6 +1,5 @@
 //@ build-fail
 //@ needs-unwind
-//@ error-pattern:is incompatible with this crate's strategy of `unwind`
 //@ aux-build:panic-runtime-abort.rs
 //@ aux-build:wants-panic-runtime-abort.rs
 //@ aux-build:panic-runtime-lang-items.rs
@@ -10,3 +9,6 @@
 
 extern crate wants_panic_runtime_abort;
 extern crate panic_runtime_lang_items;
+
+//~? ERROR the linked panic runtime `panic_runtime_abort` is not compiled with this crate's panic strategy `unwind`
+//~? ERROR the crate `wants_panic_runtime_abort` requires panic strategy `abort` which is incompatible with this crate's strategy of `unwind`
diff --git a/tests/ui/panics/default-backtrace-ice.rs b/tests/ui/panics/default-backtrace-ice.rs
index 9933f548758..cf8b0cea849 100644
--- a/tests/ui/panics/default-backtrace-ice.rs
+++ b/tests/ui/panics/default-backtrace-ice.rs
@@ -20,4 +20,4 @@
 // Ignored on msvc because the `__rust_{begin,end}_short_backtrace` symbols
 // aren't reliable.
 
-fn main() { missing_ident; }
+fn main() { missing_ident; } //~ ERROR cannot find value `missing_ident` in this scope
diff --git a/tests/ui/parser/attribute/attr-dangling-in-fn.rs b/tests/ui/parser/attribute/attr-dangling-in-fn.rs
index d59f90aed5d..b1436b8d89d 100644
--- a/tests/ui/parser/attribute/attr-dangling-in-fn.rs
+++ b/tests/ui/parser/attribute/attr-dangling-in-fn.rs
@@ -1,7 +1,5 @@
-//@ error-pattern:expected statement
-
 fn f() {
-  #[foo = "bar"]
+  #[foo = "bar"] //~ ERROR expected statement after outer attribute
 }
 
 fn main() {
diff --git a/tests/ui/parser/attribute/attr-dangling-in-fn.stderr b/tests/ui/parser/attribute/attr-dangling-in-fn.stderr
index c7b948ea8f7..3e9413f5357 100644
--- a/tests/ui/parser/attribute/attr-dangling-in-fn.stderr
+++ b/tests/ui/parser/attribute/attr-dangling-in-fn.stderr
@@ -1,5 +1,5 @@
 error: expected statement after outer attribute
-  --> $DIR/attr-dangling-in-fn.rs:4:3
+  --> $DIR/attr-dangling-in-fn.rs:2:3
    |
 LL |   #[foo = "bar"]
    |   ^^^^^^^^^^^^^^
diff --git a/tests/ui/parser/attribute/attr-dangling-in-mod.rs b/tests/ui/parser/attribute/attr-dangling-in-mod.rs
index 001ac1135f6..17bc7e547d9 100644
--- a/tests/ui/parser/attribute/attr-dangling-in-mod.rs
+++ b/tests/ui/parser/attribute/attr-dangling-in-mod.rs
@@ -1,6 +1,4 @@
-//@ error-pattern:expected item
-
 fn main() {
 }
 
-#[foo = "bar"]
+#[foo = "bar"] //~ ERROR expected item after attributes
diff --git a/tests/ui/parser/attribute/attr-dangling-in-mod.stderr b/tests/ui/parser/attribute/attr-dangling-in-mod.stderr
index 882400c1d6f..22cc092109d 100644
--- a/tests/ui/parser/attribute/attr-dangling-in-mod.stderr
+++ b/tests/ui/parser/attribute/attr-dangling-in-mod.stderr
@@ -1,5 +1,5 @@
 error: expected item after attributes
-  --> $DIR/attr-dangling-in-mod.rs:6:1
+  --> $DIR/attr-dangling-in-mod.rs:4:1
    |
 LL | #[foo = "bar"]
    | ^^^^^^^^^^^^^^
diff --git a/tests/ui/parser/circular_modules_main.rs b/tests/ui/parser/circular_modules_main.rs
index d5cdff34a26..c130c6792b8 100644
--- a/tests/ui/parser/circular_modules_main.rs
+++ b/tests/ui/parser/circular_modules_main.rs
@@ -1,5 +1,3 @@
-//@ error-pattern: circular modules
-
 #[path = "circular_modules_hello.rs"]
 mod circular_modules_hello;
 
@@ -10,3 +8,5 @@ pub fn hi_str() -> String {
 fn main() {
     circular_modules_hello::say_hello();
 }
+
+//~? ERROR circular modules: $DIR/circular_modules_main.rs -> $DIR/circular_modules_hello.rs -> $DIR/circular_modules_main.rs
diff --git a/tests/ui/parser/class-implements-bad-trait.rs b/tests/ui/parser/class-implements-bad-trait.rs
index 152fe09b51c..e30c1bc3a7f 100644
--- a/tests/ui/parser/class-implements-bad-trait.rs
+++ b/tests/ui/parser/class-implements-bad-trait.rs
@@ -1,5 +1,4 @@
-//@ error-pattern:nonexistent
-class cat : nonexistent {
+class cat : nonexistent { //~ ERROR expected one of `!` or `::`, found `cat`
   let meows: usize;
   new(in_x : usize) { self.meows = in_x; }
 }
diff --git a/tests/ui/parser/class-implements-bad-trait.stderr b/tests/ui/parser/class-implements-bad-trait.stderr
index 5290e3594d5..5cdb85a8cff 100644
--- a/tests/ui/parser/class-implements-bad-trait.stderr
+++ b/tests/ui/parser/class-implements-bad-trait.stderr
@@ -1,5 +1,5 @@
 error: expected one of `!` or `::`, found `cat`
-  --> $DIR/class-implements-bad-trait.rs:2:7
+  --> $DIR/class-implements-bad-trait.rs:1:7
    |
 LL | class cat : nonexistent {
    |       ^^^ expected one of `!` or `::`
diff --git a/tests/ui/parser/extern-abi-from-mac-literal-frag.rs b/tests/ui/parser/extern-abi-from-mac-literal-frag.rs
index a4e9134218c..12b6c98705c 100644
--- a/tests/ui/parser/extern-abi-from-mac-literal-frag.rs
+++ b/tests/ui/parser/extern-abi-from-mac-literal-frag.rs
@@ -12,6 +12,8 @@ macro_rules! abi_from_lit_frag {
             fn _import();
         }
 
+        unsafe extern $abi {}
+
         extern $abi fn _export() {}
 
         type _PTR = extern $abi fn();
@@ -24,6 +26,8 @@ macro_rules! abi_from_expr_frag {
             fn _import();
         }
 
+        unsafe extern $abi {}
+
         extern $abi fn _export() {}
 
         type _PTR = extern $abi fn();
diff --git a/tests/ui/parser/float-field-interpolated.rs b/tests/ui/parser/float-field-interpolated.rs
index 990f2926dc8..bf7163039c4 100644
--- a/tests/ui/parser/float-field-interpolated.rs
+++ b/tests/ui/parser/float-field-interpolated.rs
@@ -5,10 +5,10 @@ macro_rules! generate_field_accesses {
         let s = S(0, (0, 0));
 
         s.$a; // OK
-        { s.$b; } //~ ERROR unexpected token: `1.1`
-                  //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found literal `1.1`
-        { s.$c; } //~ ERROR unexpected token: `1.1`
-                  //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found expression `1.1`
+        { s.$b; } //~ ERROR unexpected token: `literal` metavariable
+                  //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `literal` metavariable
+        { s.$c; } //~ ERROR unexpected token: `expr` metavariable
+                  //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `expr` metavariable
     };
 }
 
diff --git a/tests/ui/parser/float-field-interpolated.stderr b/tests/ui/parser/float-field-interpolated.stderr
index 2a1a4926cb3..e2b7e3a7dbe 100644
--- a/tests/ui/parser/float-field-interpolated.stderr
+++ b/tests/ui/parser/float-field-interpolated.stderr
@@ -1,4 +1,4 @@
-error: unexpected token: `1.1`
+error: unexpected token: `literal` metavariable
   --> $DIR/float-field-interpolated.rs:8:13
    |
 LL |         { s.$b; }
@@ -9,7 +9,7 @@ LL |     generate_field_accesses!(1.1, 1.1, 1.1);
    |
    = note: this error originates in the macro `generate_field_accesses` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: expected one of `.`, `;`, `?`, `}`, or an operator, found literal `1.1`
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `literal` metavariable
   --> $DIR/float-field-interpolated.rs:8:13
    |
 LL |         { s.$b; }
@@ -20,7 +20,7 @@ LL |     generate_field_accesses!(1.1, 1.1, 1.1);
    |
    = note: this error originates in the macro `generate_field_accesses` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: unexpected token: `1.1`
+error: unexpected token: `expr` metavariable
   --> $DIR/float-field-interpolated.rs:10:13
    |
 LL |         { s.$c; }
@@ -31,7 +31,7 @@ LL |     generate_field_accesses!(1.1, 1.1, 1.1);
    |
    = note: this error originates in the macro `generate_field_accesses` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: expected one of `.`, `;`, `?`, `}`, or an operator, found expression `1.1`
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `expr` metavariable
   --> $DIR/float-field-interpolated.rs:10:13
    |
 LL |         { s.$c; }
diff --git a/tests/ui/parser/import-from-path.rs b/tests/ui/parser/import-from-path.rs
index 54349d4971e..0d38c7224c5 100644
--- a/tests/ui/parser/import-from-path.rs
+++ b/tests/ui/parser/import-from-path.rs
@@ -1,2 +1 @@
-//@ error-pattern:expected
-use foo::{bar}::baz
+use foo::{bar}::baz //~ ERROR expected `;`, found `::`
diff --git a/tests/ui/parser/import-from-path.stderr b/tests/ui/parser/import-from-path.stderr
index b63e48d6679..f70c3b2e870 100644
--- a/tests/ui/parser/import-from-path.stderr
+++ b/tests/ui/parser/import-from-path.stderr
@@ -1,5 +1,5 @@
 error: expected `;`, found `::`
-  --> $DIR/import-from-path.rs:2:15
+  --> $DIR/import-from-path.rs:1:15
    |
 LL | use foo::{bar}::baz
    |               ^^ expected `;`
diff --git a/tests/ui/parser/import-from-rename.rs b/tests/ui/parser/import-from-rename.rs
index f6a4bb55553..4929b270e45 100644
--- a/tests/ui/parser/import-from-rename.rs
+++ b/tests/ui/parser/import-from-rename.rs
@@ -1,6 +1,4 @@
-//@ error-pattern:expected
-
-use foo::{bar} as baz;
+use foo::{bar} as baz; //~ ERROR expected `;`, found keyword `as`
 
 mod foo {
     pub fn bar() {}
diff --git a/tests/ui/parser/import-from-rename.stderr b/tests/ui/parser/import-from-rename.stderr
index 2f267a8d026..3289f1bdbe7 100644
--- a/tests/ui/parser/import-from-rename.stderr
+++ b/tests/ui/parser/import-from-rename.stderr
@@ -1,5 +1,5 @@
 error: expected `;`, found keyword `as`
-  --> $DIR/import-from-rename.rs:3:16
+  --> $DIR/import-from-rename.rs:1:16
    |
 LL | use foo::{bar} as baz;
    |                ^^ expected `;`
diff --git a/tests/ui/parser/import-glob-path.rs b/tests/ui/parser/import-glob-path.rs
index cb854de0cff..3f1c98fcade 100644
--- a/tests/ui/parser/import-glob-path.rs
+++ b/tests/ui/parser/import-glob-path.rs
@@ -1,2 +1 @@
-//@ error-pattern:expected
-use foo::*::bar
+use foo::*::bar //~ ERROR expected `;`, found `::`
diff --git a/tests/ui/parser/import-glob-path.stderr b/tests/ui/parser/import-glob-path.stderr
index 3bde32d1ea4..04f8a6e96fa 100644
--- a/tests/ui/parser/import-glob-path.stderr
+++ b/tests/ui/parser/import-glob-path.stderr
@@ -1,5 +1,5 @@
 error: expected `;`, found `::`
-  --> $DIR/import-glob-path.rs:2:11
+  --> $DIR/import-glob-path.rs:1:11
    |
 LL | use foo::*::bar
    |           ^^ expected `;`
diff --git a/tests/ui/parser/import-glob-rename.rs b/tests/ui/parser/import-glob-rename.rs
index 899818b15b6..5027a75f881 100644
--- a/tests/ui/parser/import-glob-rename.rs
+++ b/tests/ui/parser/import-glob-rename.rs
@@ -1,6 +1,4 @@
-//@ error-pattern:expected
-
-use foo::* as baz;
+use foo::* as baz; //~ ERROR expected `;`, found keyword `as`
 
 mod foo {
     pub fn bar() {}
diff --git a/tests/ui/parser/import-glob-rename.stderr b/tests/ui/parser/import-glob-rename.stderr
index 24e6c3f0006..2a5f2b66404 100644
--- a/tests/ui/parser/import-glob-rename.stderr
+++ b/tests/ui/parser/import-glob-rename.stderr
@@ -1,5 +1,5 @@
 error: expected `;`, found keyword `as`
-  --> $DIR/import-glob-rename.rs:3:12
+  --> $DIR/import-glob-rename.rs:1:12
    |
 LL | use foo::* as baz;
    |            ^^ expected `;`
diff --git a/tests/ui/parser/issues/circular-module-with-doc-comment-issue-97589/circular-module-with-doc-comment-issue-97589.rs b/tests/ui/parser/issues/circular-module-with-doc-comment-issue-97589/circular-module-with-doc-comment-issue-97589.rs
index ff28548b795..9c164813de2 100644
--- a/tests/ui/parser/issues/circular-module-with-doc-comment-issue-97589/circular-module-with-doc-comment-issue-97589.rs
+++ b/tests/ui/parser/issues/circular-module-with-doc-comment-issue-97589/circular-module-with-doc-comment-issue-97589.rs
@@ -1,6 +1,7 @@
-//@ error-pattern: circular modules
 // Regression test for #97589: a doc-comment on a circular module bypassed cycle detection
 
 #![crate_type = "lib"]
 
 pub mod recursive;
+
+//~? ERROR circular modules: $DIR/recursive.rs -> $DIR/recursive.rs
diff --git a/tests/ui/parser/issues/issue-21146.rs b/tests/ui/parser/issues/issue-21146.rs
index 81112808b21..95cae47939f 100644
--- a/tests/ui/parser/issues/issue-21146.rs
+++ b/tests/ui/parser/issues/issue-21146.rs
@@ -1,3 +1,4 @@
-//@ error-pattern: expected one of `!` or `::`, found `<eof>`
 include!("auxiliary/issue-21146-inc.rs");
 fn main() {}
+
+//~? ERROR expected one of `!` or `::`, found `<eof>`
diff --git a/tests/ui/parser/issues/issue-24375.stderr b/tests/ui/parser/issues/issue-24375.stderr
index 2af57a52035..e96c004fb35 100644
--- a/tests/ui/parser/issues/issue-24375.stderr
+++ b/tests/ui/parser/issues/issue-24375.stderr
@@ -16,10 +16,6 @@ LL +     const VAL: /* Type */ = tmp[0];
 LL ~     match z {
 LL ~         VAL => {}
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { tmp[0] } => {}
-   |         +++++++        +
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/issues/issue-66473.rs b/tests/ui/parser/issues/issue-66473.rs
index baa00f95e12..d0786add1af 100644
--- a/tests/ui/parser/issues/issue-66473.rs
+++ b/tests/ui/parser/issues/issue-66473.rs
Binary files differdiff --git a/tests/ui/parser/issues/issue-66473.stderr b/tests/ui/parser/issues/issue-66473.stderr
index ba38c4fa1b7..65b2d5a34ee 100644
--- a/tests/ui/parser/issues/issue-66473.stderr
+++ b/tests/ui/parser/issues/issue-66473.stderr
@@ -1,11 +1,11 @@
 error: unknown start of token: \u{348}
-  --> $DIR/issue-66473.rs:4:2
+  --> $DIR/issue-66473.rs:1:2
    |
 LL | #͈␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀
    |  ^
 
 error: unknown start of token: \u{0}
-  --> $DIR/issue-66473.rs:4:3
+  --> $DIR/issue-66473.rs:1:3
    |
 LL | #͈␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀
    |  ^^^^^^^^^^^^^^^^^^
@@ -14,19 +14,19 @@ LL | #͈␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀
    = note: character appears 17 more times
 
 error: unknown start of token: \u{1d}
-  --> $DIR/issue-66473.rs:5:2
+  --> $DIR/issue-66473.rs:4:2
    |
 LL | ␋␝6␝␀␀
    |  ^
 
 error: unknown start of token: \u{1d}
-  --> $DIR/issue-66473.rs:5:4
+  --> $DIR/issue-66473.rs:4:4
    |
 LL | ␋␝6␝␀␀
    |    ^
 
 error: unknown start of token: \u{0}
-  --> $DIR/issue-66473.rs:5:5
+  --> $DIR/issue-66473.rs:4:5
    |
 LL | ␋␝6␝␀␀
    |     ^^
@@ -35,10 +35,11 @@ LL | ␋␝6␝␀␀
    = note: character appears once more
 
 error: expected one of `!` or `[`, found `6`
-  --> $DIR/issue-66473.rs:5:3
+  --> $DIR/issue-66473.rs:4:3
    |
 LL | #͈␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀
    |  - expected one of `!` or `[`
+...
 LL | ␋␝6␝␀␀
    |   ^ unexpected token
 
diff --git a/tests/ui/parser/issues/issue-68629.rs b/tests/ui/parser/issues/issue-68629.rs
index d353d1f56ce..d1ea4ca8b03 100644
--- a/tests/ui/parser/issues/issue-68629.rs
+++ b/tests/ui/parser/issues/issue-68629.rs
Binary files differdiff --git a/tests/ui/parser/issues/issue-68629.stderr b/tests/ui/parser/issues/issue-68629.stderr
index f003f378179..373ad142778 100644
--- a/tests/ui/parser/issues/issue-68629.stderr
+++ b/tests/ui/parser/issues/issue-68629.stderr
@@ -1,17 +1,17 @@
 error: unknown start of token: \u{1c}
-  --> $DIR/issue-68629.rs:4:1
+  --> $DIR/issue-68629.rs:6:1
    |
 LL | ␜␟ts␀![{i
    | ^
 
 error: unknown start of token: \u{1f}
-  --> $DIR/issue-68629.rs:4:2
+  --> $DIR/issue-68629.rs:6:2
    |
 LL | ␜␟ts␀![{i
    |  ^
 
 error: unknown start of token: \u{0}
-  --> $DIR/issue-68629.rs:4:5
+  --> $DIR/issue-68629.rs:6:5
    |
 LL | ␜␟ts␀![{i
    |     ^
@@ -19,7 +19,7 @@ LL | ␜␟ts␀![{i
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/issue-68629.rs:5:1
+  --> $DIR/issue-68629.rs:7:1
    |
 LL | ␀␀  fn rݻoa>rݻm
    | ^^
@@ -28,7 +28,7 @@ LL | ␀␀  fn rݻoa>rݻm
    = note: character appears once more
 
 error: this file contains an unclosed delimiter
-  --> $DIR/issue-68629.rs:5:17
+  --> $DIR/issue-68629.rs:7:17
    |
 LL | ␜␟ts␀![{i
    |       -- unclosed delimiter
diff --git a/tests/ui/parser/issues/issue-68730.rs b/tests/ui/parser/issues/issue-68730.rs
index f7f11cbc98b..9cf51b720eb 100644
--- a/tests/ui/parser/issues/issue-68730.rs
+++ b/tests/ui/parser/issues/issue-68730.rs
Binary files differdiff --git a/tests/ui/parser/issues/issue-68730.stderr b/tests/ui/parser/issues/issue-68730.stderr
index 838a6569bdc..1e01e02bdb7 100644
--- a/tests/ui/parser/issues/issue-68730.stderr
+++ b/tests/ui/parser/issues/issue-68730.stderr
@@ -1,5 +1,5 @@
 error: unknown start of token: \u{0}
-  --> $DIR/issue-68730.rs:5:5
+  --> $DIR/issue-68730.rs:8:5
    |
 LL | enum␀em␀˂˂
    |     ^
@@ -7,7 +7,7 @@ LL | enum␀em␀˂˂
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/issue-68730.rs:5:8
+  --> $DIR/issue-68730.rs:8:8
    |
 LL | enum␀em␀˂˂
    |        ^
@@ -15,7 +15,7 @@ LL | enum␀em␀˂˂
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{2c2}
-  --> $DIR/issue-68730.rs:5:9
+  --> $DIR/issue-68730.rs:8:9
    |
 LL | enum␀em␀˂˂
    |         ^^
@@ -28,7 +28,7 @@ LL + enum␀em␀<<
    |
 
 error: unknown start of token: \u{2c2}
-  --> $DIR/issue-68730.rs:5:10
+  --> $DIR/issue-68730.rs:8:10
    |
 LL | enum␀em␀˂˂
    |          ^
@@ -40,7 +40,7 @@ LL + enum␀em␀˂<
    |
 
 error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `<`
-  --> $DIR/issue-68730.rs:5:10
+  --> $DIR/issue-68730.rs:8:10
    |
 LL | enum␀em␀˂˂
    |          ^ expected one of `#`, `>`, `const`, identifier, or lifetime
diff --git a/tests/ui/parser/macro/trait-non-item-macros.rs b/tests/ui/parser/macro/trait-non-item-macros.rs
index e93000193b6..b4140613cba 100644
--- a/tests/ui/parser/macro/trait-non-item-macros.rs
+++ b/tests/ui/parser/macro/trait-non-item-macros.rs
@@ -1,7 +1,7 @@
 macro_rules! bah {
     ($a:expr) => {
         $a
-    }; //~^ ERROR macro expansion ignores expression `2` and any tokens following
+    }; //~^ ERROR macro expansion ignores `expr` metavariable and any tokens following
 }
 
 trait Bar {
diff --git a/tests/ui/parser/macro/trait-non-item-macros.stderr b/tests/ui/parser/macro/trait-non-item-macros.stderr
index 1a828483778..62b42fa8b8d 100644
--- a/tests/ui/parser/macro/trait-non-item-macros.stderr
+++ b/tests/ui/parser/macro/trait-non-item-macros.stderr
@@ -1,4 +1,4 @@
-error: macro expansion ignores expression `2` and any tokens following
+error: macro expansion ignores `expr` metavariable and any tokens following
   --> $DIR/trait-non-item-macros.rs:3:9
    |
 LL |         $a
diff --git a/tests/ui/parser/recover/recover-pat-exprs.stderr b/tests/ui/parser/recover/recover-pat-exprs.stderr
index dcc1945d569..69bc5107cca 100644
--- a/tests/ui/parser/recover/recover-pat-exprs.stderr
+++ b/tests/ui/parser/recover/recover-pat-exprs.stderr
@@ -17,10 +17,6 @@ LL ~     match 0 {
 LL |         x => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x.y } => (),
-   |         +++++++     +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:6:9
@@ -42,10 +38,6 @@ LL |         x => (),
 LL |         x.y => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x.0 } => (),
-   |         +++++++     +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:7:9
@@ -68,10 +60,6 @@ LL |         x.y => (),
 LL |         x.0 => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x._0 } => (),
-   |         +++++++      +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:8:9
@@ -94,10 +82,6 @@ LL |         x => (),
 LL |         x._0 => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x.0.1 } => (),
-   |         +++++++       +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:9:9
@@ -120,10 +104,6 @@ LL |         x => (),
 LL |         x.0.1 => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x.4.y.17.__z } => (),
-   |         +++++++              +
 
 error: expected one of `:`, `;`, `=`, `@`, or `|`, found `.`
   --> $DIR/recover-pat-exprs.rs:12:12
@@ -173,10 +153,6 @@ LL +     const VAL: /* Type */ = x[0];
 LL ~     match 0 {
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x[0] } => (),
-   |         +++++++      +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:24:9
@@ -197,10 +173,6 @@ LL ~     match 0 {
 LL |         x[0] => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x[..] } => (),
-   |         +++++++       +
 
 error: expected one of `:`, `;`, `=`, `@`, or `|`, found `[`
   --> $DIR/recover-pat-exprs.rs:27:12
@@ -247,10 +219,6 @@ LL +     const VAL: /* Type */ = x.f();
 LL ~     match 0 {
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x.f() } => (),
-   |         +++++++       +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:38:9
@@ -271,10 +239,6 @@ LL ~     match 0 {
 LL |         x.f() => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x._f() } => (),
-   |         +++++++        +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:39:9
@@ -296,10 +260,6 @@ LL |         x.f() => (),
 LL |         x._f() => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x? } => (),
-   |         +++++++    +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:40:9
@@ -322,10 +282,6 @@ LL |         x._f() => (),
 LL |         x? => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { ().f() } => (),
-   |         +++++++        +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:41:9
@@ -348,10 +304,6 @@ LL |         x.f() => (),
 LL |         ().f() => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { (0, x)?.f() } => (),
-   |         +++++++             +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:42:9
@@ -374,10 +326,6 @@ LL |         x.f() => (),
 LL |         (0, x)?.f() => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x.f().g() } => (),
-   |         +++++++           +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:43:9
@@ -400,10 +348,6 @@ LL |         x.f() => (),
 LL |         x.f().g() => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { 0.f()?.g()?? } => (),
-   |         +++++++              +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:50:9
@@ -423,10 +367,6 @@ LL +     const VAL: /* Type */ = x as usize;
 LL ~     match 0 {
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x as usize } => (),
-   |         +++++++            +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:51:9
@@ -447,10 +387,6 @@ LL ~     match 0 {
 LL |         x as usize => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { 0 as usize } => (),
-   |         +++++++            +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:52:9
@@ -472,10 +408,6 @@ LL |         x as usize => (),
 LL |         0 as usize => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x.f().0.4 as f32 } => (),
-   |         +++++++                  +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:59:9
@@ -495,10 +427,6 @@ LL +     const VAL: /* Type */ = 1 + 1;
 LL ~     match 0 {
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { 1 + 1 } => (),
-   |         +++++++       +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:60:9
@@ -519,10 +447,6 @@ LL ~     match 0 {
 LL |         1 + 1 => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { (1 + 2) * 3 } => (),
-   |         +++++++             +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:63:9
@@ -545,10 +469,6 @@ LL |         1 + 1 => (),
 LL |
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x.0 > 2 } => (),
-   |         +++++++         +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:64:9
@@ -571,10 +491,6 @@ LL |         1 + 1 => (),
 LL |         x.0 > 2 => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { x.0 == 2 } => (),
-   |         +++++++          +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:69:13
@@ -594,10 +510,6 @@ LL +     const VAL: /* Type */ = y.0 > 2;
 LL ~     match (0, 0) {
 LL ~         (x, VAL) if x != 0 => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         (x, const { y.0 > 2 }) if x != 0 => (),
-   |             +++++++         +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:70:13
@@ -618,10 +530,6 @@ LL ~     match (0, 0) {
 LL |         (x, y.0 > 2) if x != 0 => (),
 LL ~         (x, VAL) if x != 0 || x != 1 => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         (x, const { y.0 > 2 }) if x != 0 || x != 1 => (),
-   |             +++++++         +
 
 error: left-hand side of `@` must be a binding
   --> $DIR/recover-pat-exprs.rs:83:9
@@ -658,10 +566,6 @@ LL +     const VAL: /* Type */ = u8::MAX.abs();
 LL ~     match u8::MAX {
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { u8::MAX.abs() } => (),
-   |         +++++++               +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:86:17
@@ -684,10 +588,6 @@ LL |         u8::MAX.abs() => (),
 LL |
 LL ~         z @ w @ VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         z @ w @ const { v.u() } => (),
-   |                 +++++++       +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:88:9
@@ -710,10 +610,6 @@ LL |         u8::MAX.abs() => (),
 LL |
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { y.ilog(3) } => (),
-   |         +++++++           +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:90:9
@@ -736,10 +632,6 @@ LL |         u8::MAX.abs() => (),
 LL |
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { n + 1 } => (),
-   |         +++++++       +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:92:10
@@ -762,10 +654,6 @@ LL |         u8::MAX.abs() => (),
 LL |
 LL ~         (VAL) => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         (const { "".f() + 14 * 8 }) => (),
-   |          +++++++                 +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:95:9
@@ -788,10 +676,6 @@ LL |         u8::MAX.abs() => (),
 LL |         0 | ((1) | 2) | 3 => (),
 LL ~         VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { f?() } => (),
-   |         +++++++      +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-exprs.rs:101:9
diff --git a/tests/ui/parser/recover/recover-pat-issues.stderr b/tests/ui/parser/recover/recover-pat-issues.stderr
index 0c65b16dd95..ec7fcda3497 100644
--- a/tests/ui/parser/recover/recover-pat-issues.stderr
+++ b/tests/ui/parser/recover/recover-pat-issues.stderr
@@ -16,10 +16,6 @@ LL +     const VAL: /* Type */ = "hi".to_owned();
 LL ~     match foo {
 LL ~         Foo(VAL) => true,
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         Foo(const { "hi".to_owned() }) => true,
-   |             +++++++                 +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-issues.rs:14:20
@@ -39,10 +35,6 @@ LL +     const BAZ: /* Type */ = "hi".to_owned();
 LL ~     match bar {
 LL ~         Bar { baz: BAZ } => true,
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         Bar { baz: const { "hi".to_owned() } } => true,
-   |                    +++++++                 +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-issues.rs:25:11
@@ -62,10 +54,6 @@ LL +     const VAL: /* Type */ = "foo".to_string();
 LL ~     match foo.as_slice() {
 LL ~         &[VAL] => {}
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         &[const { "foo".to_string() }] => {}
-   |           +++++++                   +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-issues.rs:36:17
@@ -79,10 +67,6 @@ help: consider extracting the expression into a `const`
 LL +     const VAL: /* Type */ = MAGIC.0 as usize;
 LL ~     if let Some(VAL) = None::<usize> {}
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |     if let Some(const { MAGIC.0 as usize }) = None::<usize> {}
-   |                 +++++++                  +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-issues.rs:41:13
@@ -96,10 +80,6 @@ help: consider extracting the expression into a `const`
 LL +     const VAL: /* Type */ = -1.some(4);
 LL ~     if let (VAL) = (0, Some(4)) {}
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |     if let (const { -1.some(4) }) = (0, Some(4)) {}
-   |             +++++++            +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-issues.rs:44:13
@@ -113,10 +93,6 @@ help: consider extracting the expression into a `const`
 LL +     const VAL: /* Type */ = -1.Some(4);
 LL ~     if let (VAL) = (0, Some(4)) {}
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |     if let (const { -1.Some(4) }) = (0, Some(4)) {}
-   |             +++++++            +
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/parser/recover/recover-pat-lets.stderr b/tests/ui/parser/recover/recover-pat-lets.stderr
index 55252729d7b..ab79e4ebcae 100644
--- a/tests/ui/parser/recover/recover-pat-lets.stderr
+++ b/tests/ui/parser/recover/recover-pat-lets.stderr
@@ -34,10 +34,6 @@ help: consider extracting the expression into a `const`
 LL +     const VAL: /* Type */ = 1 + 1;
 LL ~     let Some(VAL) = x else {
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |     let Some(const { 1 + 1 }) = x else {
-   |              +++++++       +
 
 error: expected a pattern, found an expression
   --> $DIR/recover-pat-lets.rs:17:17
@@ -51,10 +47,6 @@ help: consider extracting the expression into a `const`
 LL +     const VAL: /* Type */ = 1 + 1;
 LL ~     if let Some(VAL) = x {
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |     if let Some(const { 1 + 1 }) = x {
-   |                 +++++++       +
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/parser/recover/recover-pat-ranges.stderr b/tests/ui/parser/recover/recover-pat-ranges.stderr
index e8f323596d0..6c17182618b 100644
--- a/tests/ui/parser/recover/recover-pat-ranges.stderr
+++ b/tests/ui/parser/recover/recover-pat-ranges.stderr
@@ -98,10 +98,6 @@ LL |         0..=1 => (),
 LL |
 LL ~         ..=VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         ..=const { 1 + 2 } => (),
-   |            +++++++       +
 
 error: expected a pattern range bound, found an expression
   --> $DIR/recover-pat-ranges.rs:15:10
@@ -119,10 +115,6 @@ LL |         0..=1 => (),
 LL |
 LL ~         (VAL).. => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         (const { -4 + 0 }).. => (),
-   |          +++++++        +
 
 error: expected a pattern range bound, found an expression
   --> $DIR/recover-pat-ranges.rs:18:10
@@ -140,10 +132,6 @@ LL |         0..=1 => (),
 LL |
 LL ~         (VAL)...1 * 2 => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         (const { 1 + 4 })...1 * 2 => (),
-   |          +++++++       +
 
 error: expected a pattern range bound, found an expression
   --> $DIR/recover-pat-ranges.rs:18:19
@@ -161,10 +149,6 @@ LL |         0..=1 => (),
 LL |
 LL ~         (1 + 4)...VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         (1 + 4)...const { 1 * 2 } => (),
-   |                   +++++++       +
 
 error: expected a pattern range bound, found an expression
   --> $DIR/recover-pat-ranges.rs:24:9
@@ -182,10 +166,6 @@ LL |         0..=1 => (),
 LL |
 LL ~         VAL..="y".z() => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         const { 0.x() }..="y".z() => (),
-   |         +++++++       +
 
 error: expected a pattern range bound, found an expression
   --> $DIR/recover-pat-ranges.rs:24:17
@@ -203,10 +183,6 @@ LL |         0..=1 => (),
 LL |
 LL ~         0.x()..=VAL => (),
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         0.x()..=const { "y".z() } => (),
-   |                 +++++++         +
 
 warning: `...` range patterns are deprecated
   --> $DIR/recover-pat-ranges.rs:18:16
diff --git a/tests/ui/parser/recover/recover-pat-wildcards.stderr b/tests/ui/parser/recover/recover-pat-wildcards.stderr
index f939e513370..ebc1cbf7d59 100644
--- a/tests/ui/parser/recover/recover-pat-wildcards.stderr
+++ b/tests/ui/parser/recover/recover-pat-wildcards.stderr
@@ -84,10 +84,6 @@ LL +     const VAL: /* Type */ = 2 + _;
 LL ~     match 9 {
 LL ~         4..=(VAL) => ()
    |
-help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
-   |
-LL |         4..=(const { 2 + _ }) => ()
-   |              +++++++       +
 
 error: aborting due to 11 previous errors
 
diff --git a/tests/ui/parser/shebang/shebang-split.rs b/tests/ui/parser/shebang/shebang-split.rs
index 470bb669143..eb8f0f769c8 100644
--- a/tests/ui/parser/shebang/shebang-split.rs
+++ b/tests/ui/parser/shebang/shebang-split.rs
@@ -1,5 +1,4 @@
 // empty line
 # !/bin/env
-
+//~^ ERROR expected `[`, found `/`
 // checks that diagnostics for shebang lookalikes is not present
-//@ error-pattern: expected `[`\n\n
diff --git a/tests/ui/parser/utf16-be-without-bom.rs b/tests/ui/parser/utf16-be-without-bom.rs
index f5fe8dc5a8c..538728735f0 100644
--- a/tests/ui/parser/utf16-be-without-bom.rs
+++ b/tests/ui/parser/utf16-be-without-bom.rs
Binary files differdiff --git a/tests/ui/parser/utf16-be-without-bom.stderr b/tests/ui/parser/utf16-be-without-bom.stderr
index 0493bcbc77a..467e0ed7313 100644
--- a/tests/ui/parser/utf16-be-without-bom.stderr
+++ b/tests/ui/parser/utf16-be-without-bom.stderr
@@ -1,5 +1,5 @@
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:1
+  --> $DIR/utf16-be-without-bom.rs:6:1
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    | ^
@@ -7,7 +7,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:3
+  --> $DIR/utf16-be-without-bom.rs:6:3
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |   ^
@@ -15,7 +15,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:5
+  --> $DIR/utf16-be-without-bom.rs:6:5
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |     ^
@@ -23,7 +23,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:7
+  --> $DIR/utf16-be-without-bom.rs:6:7
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |       ^
@@ -31,7 +31,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:9
+  --> $DIR/utf16-be-without-bom.rs:6:9
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |         ^
@@ -39,7 +39,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:11
+  --> $DIR/utf16-be-without-bom.rs:6:11
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |           ^
@@ -47,7 +47,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:13
+  --> $DIR/utf16-be-without-bom.rs:6:13
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |             ^
@@ -55,7 +55,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:15
+  --> $DIR/utf16-be-without-bom.rs:6:15
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |               ^
@@ -63,7 +63,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:17
+  --> $DIR/utf16-be-without-bom.rs:6:17
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |                 ^
@@ -71,7 +71,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:19
+  --> $DIR/utf16-be-without-bom.rs:6:19
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |                   ^
@@ -79,7 +79,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:21
+  --> $DIR/utf16-be-without-bom.rs:6:21
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |                     ^
@@ -87,7 +87,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:23
+  --> $DIR/utf16-be-without-bom.rs:6:23
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |                       ^
@@ -95,7 +95,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-be-without-bom.rs:5:25
+  --> $DIR/utf16-be-without-bom.rs:6:25
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |                         ^
@@ -103,7 +103,7 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: expected one of `!` or `::`, found `n`
-  --> $DIR/utf16-be-without-bom.rs:5:4
+  --> $DIR/utf16-be-without-bom.rs:6:4
    |
 LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |    ^ expected one of `!` or `::`
diff --git a/tests/ui/parser/utf16-le-without-bom.rs b/tests/ui/parser/utf16-le-without-bom.rs
index 8c781b27dc0..fc413663c9c 100644
--- a/tests/ui/parser/utf16-le-without-bom.rs
+++ b/tests/ui/parser/utf16-le-without-bom.rs
Binary files differdiff --git a/tests/ui/parser/utf16-le-without-bom.stderr b/tests/ui/parser/utf16-le-without-bom.stderr
index 4b195ed0da1..701379d4067 100644
--- a/tests/ui/parser/utf16-le-without-bom.stderr
+++ b/tests/ui/parser/utf16-le-without-bom.stderr
@@ -1,5 +1,5 @@
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:5:2
+  --> $DIR/utf16-le-without-bom.rs:6:2
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |  ^
@@ -7,7 +7,7 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:5:4
+  --> $DIR/utf16-le-without-bom.rs:6:4
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |    ^
@@ -15,7 +15,7 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:5:6
+  --> $DIR/utf16-le-without-bom.rs:6:6
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |      ^
@@ -23,7 +23,7 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:5:8
+  --> $DIR/utf16-le-without-bom.rs:6:8
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |        ^
@@ -31,7 +31,7 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:5:10
+  --> $DIR/utf16-le-without-bom.rs:6:10
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |          ^
@@ -39,7 +39,7 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:5:12
+  --> $DIR/utf16-le-without-bom.rs:6:12
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |            ^
@@ -47,7 +47,7 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:5:14
+  --> $DIR/utf16-le-without-bom.rs:6:14
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |              ^
@@ -55,7 +55,7 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:5:16
+  --> $DIR/utf16-le-without-bom.rs:6:16
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |                ^
@@ -63,7 +63,7 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:5:18
+  --> $DIR/utf16-le-without-bom.rs:6:18
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |                  ^
@@ -71,7 +71,7 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:5:20
+  --> $DIR/utf16-le-without-bom.rs:6:20
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |                    ^
@@ -79,7 +79,7 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:5:22
+  --> $DIR/utf16-le-without-bom.rs:6:22
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |                      ^
@@ -87,7 +87,7 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:5:24
+  --> $DIR/utf16-le-without-bom.rs:6:24
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |                        ^
@@ -95,7 +95,7 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: unknown start of token: \u{0}
-  --> $DIR/utf16-le-without-bom.rs:6:1
+  --> $DIR/utf16-le-without-bom.rs:7:1
    |
 LL | ␀
    | ^
@@ -103,7 +103,7 @@ LL | ␀
    = help: source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
 
 error: expected one of `!` or `::`, found `n`
-  --> $DIR/utf16-le-without-bom.rs:5:3
+  --> $DIR/utf16-le-without-bom.rs:6:3
    |
 LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀
    |   ^ expected one of `!` or `::`
diff --git a/tests/ui/pattern/non-structural-match-types.rs b/tests/ui/pattern/non-structural-match-types.rs
index dde44dfee9c..5869767c936 100644
--- a/tests/ui/pattern/non-structural-match-types.rs
+++ b/tests/ui/pattern/non-structural-match-types.rs
@@ -1,14 +1,29 @@
 //@ edition:2021
-
-#![allow(unreachable_code)]
 #![feature(const_async_blocks)]
-#![feature(inline_const_pat)]
 
-fn main() {
-    match loop {} {
-        const { || {} } => {} //~ ERROR cannot be used in patterns
+struct AnyOption<T>(T);
+impl<T> AnyOption<T> {
+    const NONE: Option<T> = None;
+}
+
+fn uwu() {}
+fn defines() {
+    match Some(uwu) {
+        AnyOption::<_>::NONE => {}
+        //~^ ERROR constant of non-structural type
+        _ => {}
     }
-    match loop {} {
-        const { async {} } => {} //~ ERROR cannot be used in patterns
+
+    match Some(|| {}) {
+        AnyOption::<_>::NONE => {}
+        //~^ ERROR constant of non-structural type
+        _ => {}
+    }
+
+    match Some(async {}) {
+        AnyOption::<_>::NONE => {}
+        //~^ ERROR constant of non-structural type
+        _ => {}
     }
 }
+fn main() {}
diff --git a/tests/ui/pattern/non-structural-match-types.stderr b/tests/ui/pattern/non-structural-match-types.stderr
index 3588751bf66..da675a9f3ff 100644
--- a/tests/ui/pattern/non-structural-match-types.stderr
+++ b/tests/ui/pattern/non-structural-match-types.stderr
@@ -1,14 +1,42 @@
-error: closure `{closure@$DIR/non-structural-match-types.rs:9:17: 9:19}` cannot be used in patterns
-  --> $DIR/non-structural-match-types.rs:9:9
+error: constant of non-structural type `Option<fn() {uwu}>` in a pattern
+  --> $DIR/non-structural-match-types.rs:12:9
+   |
+LL | impl<T> AnyOption<T> {
+   | --------------------
+LL |     const NONE: Option<T> = None;
+   |     --------------------- constant defined here
+...
+LL |         AnyOption::<_>::NONE => {}
+   |         ^^^^^^^^^^^^^^^^^^^^ constant of non-structural type
    |
-LL |         const { || {} } => {}
-   |         ^^^^^^^^^^^^^^^ closure can't be used in patterns
+   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
 
-error: `async` block `{async block@$DIR/non-structural-match-types.rs:12:17: 12:22}` cannot be used in patterns
-  --> $DIR/non-structural-match-types.rs:12:9
+error: constant of non-structural type `Option<{closure@$DIR/non-structural-match-types.rs:17:16: 17:18}>` in a pattern
+  --> $DIR/non-structural-match-types.rs:18:9
+   |
+LL | impl<T> AnyOption<T> {
+   | --------------------
+LL |     const NONE: Option<T> = None;
+   |     --------------------- constant defined here
+...
+LL |         AnyOption::<_>::NONE => {}
+   |         ^^^^^^^^^^^^^^^^^^^^ constant of non-structural type
+   |
+   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+
+error: constant of non-structural type `Option<{async block@$DIR/non-structural-match-types.rs:23:16: 23:21}>` in a pattern
+  --> $DIR/non-structural-match-types.rs:24:9
+   |
+LL | impl<T> AnyOption<T> {
+   | --------------------
+LL |     const NONE: Option<T> = None;
+   |     --------------------- constant defined here
+...
+LL |         AnyOption::<_>::NONE => {}
+   |         ^^^^^^^^^^^^^^^^^^^^ constant of non-structural type
    |
-LL |         const { async {} } => {}
-   |         ^^^^^^^^^^^^^^^^^^ `async` block can't be used in patterns
+   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
+   = note: `ResumeTy` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/print-request/print-lints-help.rs b/tests/ui/print-request/print-lints-help.rs
index 420eae27ed4..6dd88a701c3 100644
--- a/tests/ui/print-request/print-lints-help.rs
+++ b/tests/ui/print-request/print-lints-help.rs
@@ -2,6 +2,7 @@
 //! `--print=lints` (which is not a valid print request).
 
 //@ compile-flags: --print lints
-//@ error-pattern: error: unknown print request: `lints`
 //@ error-pattern: help: use `-Whelp` to print a list of lints
 //@ error-pattern: help: for more information, see the rustc book
+
+//~? ERROR unknown print request: `lints`
diff --git a/tests/ui/print-request/print-lints-help.stderr b/tests/ui/print-request/print-lints-help.stderr
index 0530d11f2e8..bc48b2fa73c 100644
--- a/tests/ui/print-request/print-lints-help.stderr
+++ b/tests/ui/print-request/print-lints-help.stderr
@@ -1,6 +1,6 @@
 error: unknown print request: `lints`
   |
-  = help: valid print requests are: `all-target-specs-json`, `calling-conventions`, `cfg`, `check-cfg`, `code-models`, `crate-name`, `deployment-target`, `file-names`, `host-tuple`, `link-args`, `native-static-libs`, `relocation-models`, `split-debuginfo`, `stack-protector-strategies`, `supported-crate-types`, `sysroot`, `target-cpus`, `target-features`, `target-libdir`, `target-list`, `target-spec-json`, `tls-models`
+  = help: valid print requests are: `all-target-specs-json`, `calling-conventions`, `cfg`, `check-cfg`, `code-models`, `crate-name`, `crate-root-lint-levels`, `deployment-target`, `file-names`, `host-tuple`, `link-args`, `native-static-libs`, `relocation-models`, `split-debuginfo`, `stack-protector-strategies`, `supported-crate-types`, `sysroot`, `target-cpus`, `target-features`, `target-libdir`, `target-list`, `target-spec-json`, `tls-models`
   = help: use `-Whelp` to print a list of lints
   = help: for more information, see the rustc book: https://doc.rust-lang.org/rustc/command-line-arguments.html#--print-print-compiler-information
 
diff --git a/tests/ui/print-request/stability.rs b/tests/ui/print-request/stability.rs
index c3421224d72..54142ce78ce 100644
--- a/tests/ui/print-request/stability.rs
+++ b/tests/ui/print-request/stability.rs
@@ -16,19 +16,18 @@
 
 //@ revisions: all_target_specs_json
 //@[all_target_specs_json] compile-flags: --print=all-target-specs-json
-//@[all_target_specs_json] error-pattern: the `-Z unstable-options` flag must also be passed
+
+//@ revisions: crate_root_lint_levels
+//@[crate_root_lint_levels] compile-flags: --print=crate-root-lint-levels
 
 //@ revisions: check_cfg
 //@[check_cfg] compile-flags: --print=check-cfg
-//@[check_cfg] error-pattern: the `-Z unstable-options` flag must also be passed
 
 //@ revisions: supported_crate_types
 //@[supported_crate_types] compile-flags: --print=supported-crate-types
-//@[supported_crate_types] error-pattern: the `-Z unstable-options` flag must also be passed
 
 //@ revisions: target_spec_json
 //@[target_spec_json] compile-flags: --print=target-spec-json
-//@[target_spec_json] error-pattern: the `-Z unstable-options` flag must also be passed
 
 // =======================
 // Stable print requests
@@ -105,3 +104,9 @@
 //@[tls_models] check-pass
 
 fn main() {}
+
+//[all_target_specs_json]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `all-target-specs-json` print option
+//[crate_root_lint_levels]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `crate-root-lint-levels` print option
+//[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
diff --git a/tests/ui/privacy/privacy-ns1.stderr b/tests/ui/privacy/privacy-ns1.stderr
index 3396330c993..c782c67e71c 100644
--- a/tests/ui/privacy/privacy-ns1.stderr
+++ b/tests/ui/privacy/privacy-ns1.stderr
@@ -7,6 +7,14 @@ LL |     pub struct Baz;
 LL |     Bar();
    |     ^^^
    |
+note: these functions exist but are inaccessible
+  --> $DIR/privacy-ns1.rs:14:5
+   |
+LL |     fn Bar() { }
+   |     ^^^^^^^^ `foo1::Bar`: not accessible
+...
+LL |     fn Bar() { }
+   |     ^^^^^^^^ `foo3::Bar`: not accessible
 help: a unit struct with a similar name exists
    |
 LL -     Bar();
@@ -26,6 +34,14 @@ LL |     pub struct Baz;
 LL |     Bar();
    |     ^^^
    |
+note: these functions exist but are inaccessible
+  --> $DIR/privacy-ns1.rs:14:5
+   |
+LL |     fn Bar() { }
+   |     ^^^^^^^^ `foo1::Bar`: not accessible
+...
+LL |     fn Bar() { }
+   |     ^^^^^^^^ `foo3::Bar`: not accessible
 help: a unit struct with a similar name exists
    |
 LL -     Bar();
@@ -45,6 +61,14 @@ LL |     pub struct Baz;
 LL |     let _x: Box<Bar>;
    |                 ^^^
    |
+note: these traits exist but are inaccessible
+  --> $DIR/privacy-ns1.rs:25:5
+   |
+LL |     trait Bar {
+   |     ^^^^^^^^^ `foo2::Bar`: not accessible
+...
+LL |     trait Bar {
+   |     ^^^^^^^^^ `foo3::Bar`: not accessible
 help: a struct with a similar name exists
    |
 LL -     let _x: Box<Bar>;
diff --git a/tests/ui/privacy/privacy-ns2.stderr b/tests/ui/privacy/privacy-ns2.stderr
index ac98682b2b3..fe1f0c9bd48 100644
--- a/tests/ui/privacy/privacy-ns2.stderr
+++ b/tests/ui/privacy/privacy-ns2.stderr
@@ -4,6 +4,14 @@ error[E0423]: expected function, tuple struct or tuple variant, found trait `Bar
 LL |     Bar();
    |     ^^^ not a function, tuple struct or tuple variant
    |
+note: these functions exist but are inaccessible
+  --> $DIR/privacy-ns2.rs:14:5
+   |
+LL |     fn Bar() { }
+   |     ^^^^^^^^ `foo1::Bar`: not accessible
+...
+LL |     fn Bar() { }
+   |     ^^^^^^^^ `foo3::Bar`: not accessible
 help: consider importing this function instead
    |
 LL + use foo2::Bar;
@@ -18,6 +26,14 @@ LL |     pub struct Baz;
 LL |     Bar();
    |     ^^^
    |
+note: these functions exist but are inaccessible
+  --> $DIR/privacy-ns2.rs:14:5
+   |
+LL |     fn Bar() { }
+   |     ^^^^^^^^ `foo1::Bar`: not accessible
+...
+LL |     fn Bar() { }
+   |     ^^^^^^^^ `foo3::Bar`: not accessible
 help: a unit struct with a similar name exists
    |
 LL -     Bar();
@@ -34,6 +50,14 @@ error[E0573]: expected type, found function `Bar`
 LL |     let _x : Bar();
    |              ^^^^^ not a type
    |
+note: these traits exist but are inaccessible
+  --> $DIR/privacy-ns2.rs:31:5
+   |
+LL |     trait Bar {
+   |     ^^^^^^^^^ `foo2::Bar`: not accessible
+...
+LL |     trait Bar {
+   |     ^^^^^^^^^ `foo3::Bar`: not accessible
 help: use `=` if you meant to assign
    |
 LL -     let _x : Bar();
diff --git a/tests/ui/privacy/private-inferred-type-3.rs b/tests/ui/privacy/private-inferred-type-3.rs
index 7bf6bea4b0f..820b0cbb30f 100644
--- a/tests/ui/privacy/private-inferred-type-3.rs
+++ b/tests/ui/privacy/private-inferred-type-3.rs
@@ -1,17 +1,16 @@
 //@ aux-build:private-inferred-type.rs
 
-//@ error-pattern:type `fn() {ext::priv_fn}` is private
-//@ error-pattern:static `ext::PRIV_STATIC` is private
-//@ error-pattern:type `ext::PrivEnum` is private
-//@ error-pattern:type `fn() {<u8 as ext::PrivTrait>::method}` is private
-//@ error-pattern:type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private
-//@ error-pattern:type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private
-//@ error-pattern:type `for<'a> fn(&'a Pub<u8>) {Pub::<u8>::priv_method}` is private
-
 #![feature(decl_macro)]
 
 extern crate private_inferred_type as ext;
 
 fn main() {
     ext::m!();
+    //~^ ERROR type `fn() {ext::priv_fn}` is private
+    //~| ERROR static `ext::PRIV_STATIC` is private
+    //~| ERROR type `ext::PrivEnum` is private
+    //~| ERROR type `fn() {<u8 as ext::PrivTrait>::method}` is private
+    //~| ERROR type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private
+    //~| ERROR type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private
+    //~| ERROR type `for<'a> fn(&'a Pub<u8>) {Pub::<u8>::priv_method}` is private
 }
diff --git a/tests/ui/privacy/private-inferred-type-3.stderr b/tests/ui/privacy/private-inferred-type-3.stderr
index 42faeb4bf34..0b4899c8d3d 100644
--- a/tests/ui/privacy/private-inferred-type-3.stderr
+++ b/tests/ui/privacy/private-inferred-type-3.stderr
@@ -1,5 +1,5 @@
 error: type `fn() {ext::priv_fn}` is private
-  --> $DIR/private-inferred-type-3.rs:16:5
+  --> $DIR/private-inferred-type-3.rs:8:5
    |
 LL |     ext::m!();
    |     ^^^^^^^^^ private type
@@ -7,7 +7,7 @@ LL |     ext::m!();
    = note: this error originates in the macro `ext::m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: static `ext::PRIV_STATIC` is private
-  --> $DIR/private-inferred-type-3.rs:16:5
+  --> $DIR/private-inferred-type-3.rs:8:5
    |
 LL |     ext::m!();
    |     ^^^^^^^^^ private static
@@ -15,7 +15,7 @@ LL |     ext::m!();
    = note: this error originates in the macro `ext::m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: type `ext::PrivEnum` is private
-  --> $DIR/private-inferred-type-3.rs:16:5
+  --> $DIR/private-inferred-type-3.rs:8:5
    |
 LL |     ext::m!();
    |     ^^^^^^^^^ private type
@@ -23,7 +23,7 @@ LL |     ext::m!();
    = note: this error originates in the macro `ext::m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: type `fn() {<u8 as ext::PrivTrait>::method}` is private
-  --> $DIR/private-inferred-type-3.rs:16:5
+  --> $DIR/private-inferred-type-3.rs:8:5
    |
 LL |     ext::m!();
    |     ^^^^^^^^^ private type
@@ -31,7 +31,7 @@ LL |     ext::m!();
    = note: this error originates in the macro `ext::m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private
-  --> $DIR/private-inferred-type-3.rs:16:5
+  --> $DIR/private-inferred-type-3.rs:8:5
    |
 LL |     ext::m!();
    |     ^^^^^^^^^ private type
@@ -39,7 +39,7 @@ LL |     ext::m!();
    = note: this error originates in the macro `ext::m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private
-  --> $DIR/private-inferred-type-3.rs:16:5
+  --> $DIR/private-inferred-type-3.rs:8:5
    |
 LL |     ext::m!();
    |     ^^^^^^^^^ private type
@@ -47,7 +47,7 @@ LL |     ext::m!();
    = note: this error originates in the macro `ext::m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: type `for<'a> fn(&'a Pub<u8>) {Pub::<u8>::priv_method}` is private
-  --> $DIR/private-inferred-type-3.rs:16:5
+  --> $DIR/private-inferred-type-3.rs:8:5
    |
 LL |     ext::m!();
    |     ^^^^^^^^^ private type
diff --git a/tests/ui/proc-macro/export-macro.rs b/tests/ui/proc-macro/export-macro.rs
index e6001d06f0f..33bf8cfb255 100644
--- a/tests/ui/proc-macro/export-macro.rs
+++ b/tests/ui/proc-macro/export-macro.rs
@@ -1,11 +1,9 @@
-//@ error-pattern: cannot export macro_rules! macros from a `proc-macro` crate
-
 //@ force-host
 //@ no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
 
 #[macro_export]
-macro_rules! foo {
+macro_rules! foo { //~ ERROR cannot export macro_rules! macros from a `proc-macro` crate type
     ($e:expr) => ($e)
 }
diff --git a/tests/ui/proc-macro/export-macro.stderr b/tests/ui/proc-macro/export-macro.stderr
index 410770eca08..be586d50459 100644
--- a/tests/ui/proc-macro/export-macro.stderr
+++ b/tests/ui/proc-macro/export-macro.stderr
@@ -1,5 +1,5 @@
 error: cannot export macro_rules! macros from a `proc-macro` crate type currently
-  --> $DIR/export-macro.rs:9:1
+  --> $DIR/export-macro.rs:7:1
    |
 LL | macro_rules! foo {
    | ^^^^^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs
index 6afafb7114a..df236cce6d2 100644
--- a/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs
+++ b/tests/ui/proc-macro/issue-59191-replace-root-with-fn.rs
@@ -4,8 +4,10 @@
 //@ edition:2018
 //@ proc-macro: issue-59191.rs
 //@ needs-unwind (affects error output)
-//@ error-pattern: error: `#[panic_handler]` function required
 
 #![feature(custom_inner_attributes)]
 #![issue_59191::no_main]
 #![issue_59191::no_main]
+
+//~? ERROR `#[panic_handler]` function required, but not found
+//~? ERROR unwinding panics are not supported without std
diff --git a/tests/ui/proc-macro/macro-rules-derive-cfg.stdout b/tests/ui/proc-macro/macro-rules-derive-cfg.stdout
index c1e46b50d40..9482b2784d2 100644
--- a/tests/ui/proc-macro/macro-rules-derive-cfg.stdout
+++ b/tests/ui/proc-macro/macro-rules-derive-cfg.stdout
@@ -1,8 +1,9 @@
 PRINT-DERIVE INPUT (DISPLAY): struct
-Foo([bool; #[rustc_dummy(first)] #[rustc_dummy(second)]
-{ #![rustc_dummy(third)] #[rustc_dummy(fourth)] 30 }]);
+Foo([bool; #[rustc_dummy(first)]
+#[rustc_dummy(second)] { #![rustc_dummy(third)] #[rustc_dummy(fourth)] 30 }]);
 PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): struct
-Foo([bool; #[rustc_dummy(first)] #[rustc_dummy(second)]
+Foo([bool; #[rustc_dummy(first)]
+#[rustc_dummy(second)]
 { #! [rustc_dummy(third)] #[rustc_dummy(fourth)] 30 }]);
 PRINT-DERIVE INPUT (DEBUG): TokenStream [
     Ident {
@@ -53,97 +54,103 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
                         ],
                         span: $DIR/macro-rules-derive-cfg.rs:18:21: 18:63 (#3),
                     },
-                    Punct {
-                        ch: '#',
-                        spacing: Alone,
-                        span: $DIR/macro-rules-derive-cfg.rs:23:13: 23:14 (#0),
-                    },
                     Group {
-                        delimiter: Bracket,
-                        stream: TokenStream [
-                            Ident {
-                                ident: "rustc_dummy",
-                                span: $DIR/macro-rules-derive-cfg.rs:23:36: 23:47 (#0),
-                            },
-                            Group {
-                                delimiter: Parenthesis,
-                                stream: TokenStream [
-                                    Ident {
-                                        ident: "second",
-                                        span: $DIR/macro-rules-derive-cfg.rs:23:48: 23:54 (#0),
-                                    },
-                                ],
-                                span: $DIR/macro-rules-derive-cfg.rs:23:47: 23:55 (#0),
-                            },
-                        ],
-                        span: $DIR/macro-rules-derive-cfg.rs:23:14: 23:57 (#0),
-                    },
-                    Group {
-                        delimiter: Brace,
+                        delimiter: None,
                         stream: TokenStream [
                             Punct {
                                 ch: '#',
-                                spacing: Joint,
-                                span: $DIR/macro-rules-derive-cfg.rs:24:5: 24:6 (#0),
-                            },
-                            Punct {
-                                ch: '!',
                                 spacing: Alone,
-                                span: $DIR/macro-rules-derive-cfg.rs:24:6: 24:7 (#0),
+                                span: $DIR/macro-rules-derive-cfg.rs:23:13: 23:14 (#0),
                             },
                             Group {
                                 delimiter: Bracket,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "rustc_dummy",
-                                        span: $DIR/macro-rules-derive-cfg.rs:24:29: 24:40 (#0),
+                                        span: $DIR/macro-rules-derive-cfg.rs:23:36: 23:47 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
-                                                ident: "third",
-                                                span: $DIR/macro-rules-derive-cfg.rs:24:41: 24:46 (#0),
+                                                ident: "second",
+                                                span: $DIR/macro-rules-derive-cfg.rs:23:48: 23:54 (#0),
                                             },
                                         ],
-                                        span: $DIR/macro-rules-derive-cfg.rs:24:40: 24:47 (#0),
+                                        span: $DIR/macro-rules-derive-cfg.rs:23:47: 23:55 (#0),
                                     },
                                 ],
-                                span: $DIR/macro-rules-derive-cfg.rs:24:7: 24:49 (#0),
-                            },
-                            Punct {
-                                ch: '#',
-                                spacing: Alone,
-                                span: $DIR/macro-rules-derive-cfg.rs:25:5: 25:6 (#0),
+                                span: $DIR/macro-rules-derive-cfg.rs:23:14: 23:57 (#0),
                             },
                             Group {
-                                delimiter: Bracket,
+                                delimiter: Brace,
                                 stream: TokenStream [
-                                    Ident {
-                                        ident: "rustc_dummy",
-                                        span: $DIR/macro-rules-derive-cfg.rs:25:28: 25:39 (#0),
+                                    Punct {
+                                        ch: '#',
+                                        spacing: Joint,
+                                        span: $DIR/macro-rules-derive-cfg.rs:24:5: 24:6 (#0),
+                                    },
+                                    Punct {
+                                        ch: '!',
+                                        spacing: Alone,
+                                        span: $DIR/macro-rules-derive-cfg.rs:24:6: 24:7 (#0),
                                     },
                                     Group {
-                                        delimiter: Parenthesis,
+                                        delimiter: Bracket,
+                                        stream: TokenStream [
+                                            Ident {
+                                                ident: "rustc_dummy",
+                                                span: $DIR/macro-rules-derive-cfg.rs:24:29: 24:40 (#0),
+                                            },
+                                            Group {
+                                                delimiter: Parenthesis,
+                                                stream: TokenStream [
+                                                    Ident {
+                                                        ident: "third",
+                                                        span: $DIR/macro-rules-derive-cfg.rs:24:41: 24:46 (#0),
+                                                    },
+                                                ],
+                                                span: $DIR/macro-rules-derive-cfg.rs:24:40: 24:47 (#0),
+                                            },
+                                        ],
+                                        span: $DIR/macro-rules-derive-cfg.rs:24:7: 24:49 (#0),
+                                    },
+                                    Punct {
+                                        ch: '#',
+                                        spacing: Alone,
+                                        span: $DIR/macro-rules-derive-cfg.rs:25:5: 25:6 (#0),
+                                    },
+                                    Group {
+                                        delimiter: Bracket,
                                         stream: TokenStream [
                                             Ident {
-                                                ident: "fourth",
-                                                span: $DIR/macro-rules-derive-cfg.rs:25:40: 25:46 (#0),
+                                                ident: "rustc_dummy",
+                                                span: $DIR/macro-rules-derive-cfg.rs:25:28: 25:39 (#0),
+                                            },
+                                            Group {
+                                                delimiter: Parenthesis,
+                                                stream: TokenStream [
+                                                    Ident {
+                                                        ident: "fourth",
+                                                        span: $DIR/macro-rules-derive-cfg.rs:25:40: 25:46 (#0),
+                                                    },
+                                                ],
+                                                span: $DIR/macro-rules-derive-cfg.rs:25:39: 25:47 (#0),
                                             },
                                         ],
-                                        span: $DIR/macro-rules-derive-cfg.rs:25:39: 25:47 (#0),
+                                        span: $DIR/macro-rules-derive-cfg.rs:25:6: 25:49 (#0),
+                                    },
+                                    Literal {
+                                        kind: Integer,
+                                        symbol: "30",
+                                        suffix: None,
+                                        span: $DIR/macro-rules-derive-cfg.rs:26:5: 26:7 (#0),
                                     },
                                 ],
-                                span: $DIR/macro-rules-derive-cfg.rs:25:6: 25:49 (#0),
-                            },
-                            Literal {
-                                kind: Integer,
-                                symbol: "30",
-                                suffix: None,
-                                span: $DIR/macro-rules-derive-cfg.rs:26:5: 26:7 (#0),
+                                span: $DIR/macro-rules-derive-cfg.rs:23:58: 27:2 (#0),
                             },
                         ],
-                        span: $DIR/macro-rules-derive-cfg.rs:23:58: 27:2 (#0),
+                        span: $DIR/macro-rules-derive-cfg.rs:18:64: 18:69 (#3),
                     },
                 ],
                 span: $DIR/macro-rules-derive-cfg.rs:18:13: 18:70 (#3),
diff --git a/tests/ui/proc-macro/panic-abort.rs b/tests/ui/proc-macro/panic-abort.rs
index 40d8aec5ef6..58e1d006433 100644
--- a/tests/ui/proc-macro/panic-abort.rs
+++ b/tests/ui/proc-macro/panic-abort.rs
@@ -1,4 +1,5 @@
-//@ error-pattern: building proc macro crate with `panic=abort` may crash the compiler should the proc-macro panic
 //@ compile-flags: --crate-type proc-macro -Cpanic=abort
 //@ force-host
 //@ check-pass
+
+//~? WARN building proc macro crate with `panic=abort` may crash the compiler should the proc-macro panic
diff --git a/tests/ui/proc-macro/two-crate-types-1.rs b/tests/ui/proc-macro/two-crate-types-1.rs
index 432b0a601b2..9d21a430537 100644
--- a/tests/ui/proc-macro/two-crate-types-1.rs
+++ b/tests/ui/proc-macro/two-crate-types-1.rs
@@ -1,7 +1,7 @@
-//@ error-pattern: cannot mix `proc-macro` crate type with others
-
 //@ force-host
 //@ no-prefer-dynamic
 
 #![crate_type = "proc-macro"]
 #![crate_type = "rlib"]
+
+//~? ERROR cannot mix `proc-macro` crate type with others
diff --git a/tests/ui/proc-macro/two-crate-types-2.rs b/tests/ui/proc-macro/two-crate-types-2.rs
index 491c5c71d76..c4cc0b4d80d 100644
--- a/tests/ui/proc-macro/two-crate-types-2.rs
+++ b/tests/ui/proc-macro/two-crate-types-2.rs
@@ -1,3 +1,4 @@
-//@ error-pattern: cannot mix `proc-macro` crate type with others
 //@ compile-flags: --crate-type rlib --crate-type proc-macro
 //@ force-host
+
+//~? ERROR cannot mix `proc-macro` crate type with others
diff --git a/tests/ui/reachable/unreachable-code-ret.rs b/tests/ui/reachable/unreachable-code-ret.rs
index ed9fbd5c5a2..746c4d53e7b 100644
--- a/tests/ui/reachable/unreachable-code-ret.rs
+++ b/tests/ui/reachable/unreachable-code-ret.rs
@@ -1,8 +1,6 @@
-//@ error-pattern: unreachable statement
-
 #![deny(unreachable_code)]
 
 fn main() {
     return;
-    println!("Paul is dead");
+    println!("Paul is dead"); //~ ERROR unreachable statement
 }
diff --git a/tests/ui/reachable/unreachable-code-ret.stderr b/tests/ui/reachable/unreachable-code-ret.stderr
index 824515a2271..d86def536df 100644
--- a/tests/ui/reachable/unreachable-code-ret.stderr
+++ b/tests/ui/reachable/unreachable-code-ret.stderr
@@ -1,5 +1,5 @@
 error: unreachable statement
-  --> $DIR/unreachable-code-ret.rs:7:5
+  --> $DIR/unreachable-code-ret.rs:5:5
    |
 LL |     return;
    |     ------ any code following this expression is unreachable
@@ -7,7 +7,7 @@ LL |     println!("Paul is dead");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement
    |
 note: the lint level is defined here
-  --> $DIR/unreachable-code-ret.rs:3:9
+  --> $DIR/unreachable-code-ret.rs:1:9
    |
 LL | #![deny(unreachable_code)]
    |         ^^^^^^^^^^^^^^^^
diff --git a/tests/ui/resolve/auxiliary/macro_helpers.rs b/tests/ui/resolve/auxiliary/macro_helpers.rs
new file mode 100644
index 00000000000..43aa336457d
--- /dev/null
+++ b/tests/ui/resolve/auxiliary/macro_helpers.rs
@@ -0,0 +1,16 @@
+/* macro namespace. */
+
+extern crate proc_macro;
+use proc_macro::*;
+use std::str::FromStr;
+
+const ERROR: &str = "fn helper() { \"helper\" }";
+// https://doc.rust-lang.org/nightly/std/prelude/v1/index.html#attributes
+// NOTE: all the bang macros in std are currently unstable.
+#[proc_macro_attribute] pub fn test       // lang.
+    (_: TokenStream, _: TokenStream) -> TokenStream {
+        TokenStream::from_str("fn test_macro() { \"\" }").unwrap() }
+// https://doc.rust-lang.org/nightly/reference/attributes.html#built-in-attributes-index
+#[proc_macro_attribute] pub fn global_allocator // lang.
+    (_: TokenStream, _: TokenStream) -> TokenStream {
+        TokenStream::from_str("fn global_allocator_macro() { \"\" }").unwrap() }
diff --git a/tests/ui/resolve/bad-env-capture.rs b/tests/ui/resolve/bad-env-capture.rs
index ccd98b6ef06..a0efe88e2a9 100644
--- a/tests/ui/resolve/bad-env-capture.rs
+++ b/tests/ui/resolve/bad-env-capture.rs
@@ -1,6 +1,8 @@
-//@ error-pattern: can't capture dynamic environment in a fn item
 fn foo() {
     let x: isize;
     fn bar() { log(debug, x); }
+    //~^ ERROR can't capture dynamic environment in a fn item
+    //~| ERROR cannot find value `debug` in this scope
+    //~| ERROR cannot find function `log` in this scope
 }
 fn main() { foo(); }
diff --git a/tests/ui/resolve/bad-env-capture.stderr b/tests/ui/resolve/bad-env-capture.stderr
index 59b1fabfd7c..a3a15ca245b 100644
--- a/tests/ui/resolve/bad-env-capture.stderr
+++ b/tests/ui/resolve/bad-env-capture.stderr
@@ -1,5 +1,5 @@
 error[E0434]: can't capture dynamic environment in a fn item
-  --> $DIR/bad-env-capture.rs:4:27
+  --> $DIR/bad-env-capture.rs:3:27
    |
 LL |     fn bar() { log(debug, x); }
    |                           ^
@@ -7,13 +7,13 @@ LL |     fn bar() { log(debug, x); }
    = help: use the `|| { ... }` closure form instead
 
 error[E0425]: cannot find value `debug` in this scope
-  --> $DIR/bad-env-capture.rs:4:20
+  --> $DIR/bad-env-capture.rs:3:20
    |
 LL |     fn bar() { log(debug, x); }
    |                    ^^^^^ not found in this scope
 
 error[E0425]: cannot find function `log` in this scope
-  --> $DIR/bad-env-capture.rs:4:16
+  --> $DIR/bad-env-capture.rs:3:16
    |
 LL |     fn bar() { log(debug, x); }
    |                ^^^ not found in this scope
diff --git a/tests/ui/resolve/bad-env-capture2.rs b/tests/ui/resolve/bad-env-capture2.rs
index 84d1832be60..8298e6fcd24 100644
--- a/tests/ui/resolve/bad-env-capture2.rs
+++ b/tests/ui/resolve/bad-env-capture2.rs
@@ -1,5 +1,7 @@
-//@ error-pattern: can't capture dynamic environment in a fn item
 fn foo(x: isize) {
     fn bar() { log(debug, x); }
+    //~^ ERROR can't capture dynamic environment in a fn item
+    //~| ERROR cannot find value `debug` in this scope
+    //~| ERROR cannot find function `log` in this scope
 }
 fn main() { foo(2); }
diff --git a/tests/ui/resolve/bad-env-capture2.stderr b/tests/ui/resolve/bad-env-capture2.stderr
index 811c259de6b..403fe2d32b9 100644
--- a/tests/ui/resolve/bad-env-capture2.stderr
+++ b/tests/ui/resolve/bad-env-capture2.stderr
@@ -1,5 +1,5 @@
 error[E0434]: can't capture dynamic environment in a fn item
-  --> $DIR/bad-env-capture2.rs:3:27
+  --> $DIR/bad-env-capture2.rs:2:27
    |
 LL |     fn bar() { log(debug, x); }
    |                           ^
@@ -7,13 +7,13 @@ LL |     fn bar() { log(debug, x); }
    = help: use the `|| { ... }` closure form instead
 
 error[E0425]: cannot find value `debug` in this scope
-  --> $DIR/bad-env-capture2.rs:3:20
+  --> $DIR/bad-env-capture2.rs:2:20
    |
 LL |     fn bar() { log(debug, x); }
    |                    ^^^^^ not found in this scope
 
 error[E0425]: cannot find function `log` in this scope
-  --> $DIR/bad-env-capture2.rs:3:16
+  --> $DIR/bad-env-capture2.rs:2:16
    |
 LL |     fn bar() { log(debug, x); }
    |                ^^^ not found in this scope
diff --git a/tests/ui/resolve/bad-env-capture3.rs b/tests/ui/resolve/bad-env-capture3.rs
index 849b84cb1ab..8f5440d3339 100644
--- a/tests/ui/resolve/bad-env-capture3.rs
+++ b/tests/ui/resolve/bad-env-capture3.rs
@@ -1,7 +1,9 @@
-//@ error-pattern: can't capture dynamic environment in a fn item
 fn foo(x: isize) {
     fn mth() {
         fn bar() { log(debug, x); }
+        //~^ ERROR can't capture dynamic environment in a fn item
+        //~| ERROR cannot find value `debug` in this scope
+        //~| ERROR cannot find function `log` in this scope
     }
 }
 
diff --git a/tests/ui/resolve/bad-env-capture3.stderr b/tests/ui/resolve/bad-env-capture3.stderr
index eab37fde96e..962eb72ee68 100644
--- a/tests/ui/resolve/bad-env-capture3.stderr
+++ b/tests/ui/resolve/bad-env-capture3.stderr
@@ -1,5 +1,5 @@
 error[E0434]: can't capture dynamic environment in a fn item
-  --> $DIR/bad-env-capture3.rs:4:31
+  --> $DIR/bad-env-capture3.rs:3:31
    |
 LL |         fn bar() { log(debug, x); }
    |                               ^
@@ -7,13 +7,13 @@ LL |         fn bar() { log(debug, x); }
    = help: use the `|| { ... }` closure form instead
 
 error[E0425]: cannot find value `debug` in this scope
-  --> $DIR/bad-env-capture3.rs:4:24
+  --> $DIR/bad-env-capture3.rs:3:24
    |
 LL |         fn bar() { log(debug, x); }
    |                        ^^^^^ not found in this scope
 
 error[E0425]: cannot find function `log` in this scope
-  --> $DIR/bad-env-capture3.rs:4:20
+  --> $DIR/bad-env-capture3.rs:3:20
    |
 LL |         fn bar() { log(debug, x); }
    |                    ^^^ not found in this scope
diff --git a/tests/ui/resolve/issue-21221-1.stderr b/tests/ui/resolve/issue-21221-1.stderr
index ccf03afaa19..dafa41bf312 100644
--- a/tests/ui/resolve/issue-21221-1.stderr
+++ b/tests/ui/resolve/issue-21221-1.stderr
@@ -19,6 +19,17 @@ error[E0412]: cannot find type `Mul` in this scope
 LL | fn getMul() -> Mul {
    |                ^^^ not found in this scope
    |
+note: these items exist but are inaccessible
+  --> $DIR/issue-21221-1.rs:10:5
+   |
+LL |     enum Mul {
+   |     ^^^^^^^^ `mul3::Mul`: not accessible
+...
+LL |     type Mul = String;
+   |     ^^^^^^^^^^^^^^^^^^ `mul4::Mul`: not accessible
+...
+LL |     struct Mul{
+   |     ^^^^^^^^^^ `mul5::Mul`: not accessible
 help: consider importing one of these traits
    |
 LL + use std::ops::Mul;
diff --git a/tests/ui/resolve/prelude-order.rs b/tests/ui/resolve/prelude-order.rs
new file mode 100644
index 00000000000..a3f194270d4
--- /dev/null
+++ b/tests/ui/resolve/prelude-order.rs
@@ -0,0 +1,89 @@
+//@ proc-macro:macro_helpers.rs
+//@ compile-flags: --crate-type=lib
+
+/* There are 5 preludes and 3 namespaces. Test the order in which they are resolved.
+ * See https://doc.rust-lang.org/nightly/reference/names/preludes.html.
+ *
+ * Macros cannot be in the type or value namespace.
+ * Tools and extern crates cannot be in the macro or value namespace.
+ *
+ * Test the following truth tables:
+
+Type:
+| ...... |  tool  | extern | macro  | lang   | libs |
+|   tool |    N/A |                   mirror
+| extern | extern |    N/A |             universe
+|  macro |    N/A |    N/A |    N/A |
+|   lang |   tool | extern |    N/A |   N/A  |
+|   libs |   tool | extern |    N/A |   X    |  N/A |
+
+Macro:
+| ...... |  tool  | extern | macro  | lang   | libs |
+|   tool |    N/A |                   mirror
+| extern |    N/A |    N/A |             universe
+|  macro |    N/A |    N/A |    N/A |
+|   lang |    N/A |    N/A |  macro |   N/A  |
+|   libs |    N/A |    N/A |  macro |   X    | N/A  |
+
+Value: N/A. Only libs has items in the value namespace.
+
+† ambiguous
+X don't care (controlled namespace with no overlap)
+
+* Types are tested with `#[name::inner]`. Macros are tested with `#[name]`.
+* WARNING: I have found in testing that attribute macros give ambiguity errors in some contexts
+* instead of choosing a prelude. Have not been able to replicate.
+*
+* There should be 7 total tests.
+* See `rustc_resolve::ident::visit_scopes` for more information,
+* and for a definition of "controlled namespace".
+*/
+
+#![feature(register_tool)]
+
+/* tool prelude */
+#![register_tool(type_ns)] // extern prelude. type.
+#![register_tool(i8)]      // lang   prelude. type.
+#![register_tool(Sync)]    // libs   prelude. type.
+
+/* extern prelude */
+extern crate macro_helpers as type_ns; // tool prelude. type.
+extern crate macro_helpers as usize;   // lang prelude. type.
+extern crate macro_helpers as Option;  // libs prelude. type.
+
+/* macro_use prelude */
+#[macro_use]
+extern crate macro_helpers as _;
+
+/* lang and libs implicitly in scope */
+
+// tool/extern -> extern
+#[type_ns::inner] //~ ERROR could not find `inner` in `type_ns`
+fn t1() {}
+
+// tool/lang -> tool
+#[i8::inner] // ok
+fn t2() {}
+
+// tool/libs -> tool
+#[Sync::not_real] // ok
+fn t3() {}
+
+// extern/lang -> extern
+#[usize::inner] //~ ERROR could not find `inner` in `usize`
+fn e1() {} // NOTE: testing with `-> usize` isn't valid, crates aren't considered in that scope
+           // (unless they have generic arguments, for some reason.)
+
+// extern/libs -> extern
+// https://github.com/rust-lang/rust/issues/139095
+fn e2() -> Option<i32> { None } //~ ERROR: expected type, found crate
+
+// macro/libs -> macro
+#[test] //~ ERROR mismatched types
+fn m1() {}
+
+// macro/lang -> macro
+#[global_allocator] //~ ERROR mismatched types
+fn m2() {}
+
+// lang/libs: no items that currently overlap, in either macro or type ns.
diff --git a/tests/ui/resolve/prelude-order.stderr b/tests/ui/resolve/prelude-order.stderr
new file mode 100644
index 00000000000..1b9cc94285a
--- /dev/null
+++ b/tests/ui/resolve/prelude-order.stderr
@@ -0,0 +1,47 @@
+error[E0433]: failed to resolve: could not find `inner` in `type_ns`
+  --> $DIR/prelude-order.rs:61:12
+   |
+LL | #[type_ns::inner]
+   |            ^^^^^ could not find `inner` in `type_ns`
+
+error[E0433]: failed to resolve: could not find `inner` in `usize`
+  --> $DIR/prelude-order.rs:73:10
+   |
+LL | #[usize::inner]
+   |          ^^^^^ could not find `inner` in `usize`
+
+error[E0573]: expected type, found crate `Option`
+  --> $DIR/prelude-order.rs:79:12
+   |
+LL | fn e2() -> Option<i32> { None }
+   |            ^^^^^^^^^^^ not a type
+   |
+help: consider importing this enum instead
+   |
+LL + use std::option::Option;
+   |
+
+error[E0308]: mismatched types
+  --> $DIR/prelude-order.rs:82:1
+   |
+LL | #[test]
+   | ^^^^^^^- help: try adding a return type: `-> &'static str`
+   | |
+   | expected `()`, found `&str`
+   |
+   = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0308]: mismatched types
+  --> $DIR/prelude-order.rs:86:1
+   |
+LL | #[global_allocator]
+   | ^^^^^^^^^^^^^^^^^^^- help: try adding a return type: `-> &'static str`
+   | |
+   | expected `()`, found `&str`
+   |
+   = note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 5 previous errors
+
+Some errors have detailed explanations: E0308, E0433, E0573.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/return/ret-non-nil.rs b/tests/ui/return/ret-non-nil.rs
index 1d039ffe18c..b9a53086b3c 100644
--- a/tests/ui/return/ret-non-nil.rs
+++ b/tests/ui/return/ret-non-nil.rs
@@ -1,7 +1,5 @@
-//@ error-pattern: `return;` in a function whose return type is not `()`
-
 fn f() { return; }
 
-fn g() -> isize { return; }
+fn g() -> isize { return; } //~ ERROR `return;` in a function whose return type is not `()`
 
 fn main() { f(); g(); }
diff --git a/tests/ui/return/ret-non-nil.stderr b/tests/ui/return/ret-non-nil.stderr
index 802900e61a3..44edecf501f 100644
--- a/tests/ui/return/ret-non-nil.stderr
+++ b/tests/ui/return/ret-non-nil.stderr
@@ -1,5 +1,5 @@
 error[E0069]: `return;` in a function whose return type is not `()`
-  --> $DIR/ret-non-nil.rs:5:19
+  --> $DIR/ret-non-nil.rs:3:19
    |
 LL | fn g() -> isize { return; }
    |           -----   ^^^^^^ return type is not `()`
diff --git a/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs b/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs
index d54b428bf22..9dc856959c0 100644
--- a/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs
+++ b/tests/ui/rfcs/rfc-1717-dllimport/missing-link-attr.rs
@@ -1,4 +1,5 @@
 //@ compile-flags: -l foo:bar
-//@ error-pattern: renaming of the library `foo` was specified
 
 #![crate_type = "lib"]
+
+//~? ERROR renaming of the library `foo` was specified
diff --git a/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs b/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs
index ec1a246245e..69132895510 100644
--- a/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs
+++ b/tests/ui/rfcs/rfc-1717-dllimport/multiple-renames.rs
@@ -1,7 +1,8 @@
 //@ compile-flags: -l foo:bar -l foo:baz
-//@ error-pattern: multiple renamings were specified for library
 
 #![crate_type = "lib"]
 
 #[link(name = "foo")]
 extern "C" {}
+
+//~? ERROR multiple renamings were specified for library `foo`
diff --git a/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs b/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs
index 2a13d22e22a..e1fec305932 100644
--- a/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs
+++ b/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -l dylib=foo:bar
-//@ error-pattern: overriding linking modifiers from command line is not supported
 
 #![feature(native_link_modifiers_as_needed)]
 
@@ -7,3 +6,4 @@
 
 #[link(name = "foo", kind = "dylib", modifiers = "-as-needed")]
 extern "C" {}
+//~^ ERROR overriding linking modifiers from command line is not supported
diff --git a/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.stderr b/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.stderr
index ce145689f90..84b197a9b98 100644
--- a/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.stderr
+++ b/tests/ui/rfcs/rfc-1717-dllimport/rename-modifiers.stderr
@@ -1,5 +1,5 @@
 error: overriding linking modifiers from command line is not supported
-  --> $DIR/rename-modifiers.rs:9:1
+  --> $DIR/rename-modifiers.rs:8:1
    |
 LL | extern "C" {}
    | ^^^^^^^^^^^^^
diff --git a/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs b/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs
index 39205a11dd7..6fee80f0294 100644
--- a/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs
+++ b/tests/ui/rfcs/rfc-1717-dllimport/rename-to-empty.rs
@@ -1,7 +1,8 @@
 //@ compile-flags: -l foo:
-//@ error-pattern: an empty renaming target was specified for library
 
 #![crate_type = "lib"]
 
 #[link(name = "foo")]
 extern "C" {}
+
+//~? ERROR an empty renaming target was specified for library `foo`
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs
index 4b2fc4a03b6..110c03d0e54 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs
@@ -59,8 +59,10 @@ fn _macros() {
     }
     use_expr!((let 0 = 1 && 0 == 0));
     //~^ ERROR expected expression, found `let` statement
+    //~| ERROR expected expression, found `let` statement
     use_expr!((let 0 = 1));
     //~^ ERROR expected expression, found `let` statement
+    //~| ERROR expected expression, found `let` statement
     match () {
         #[cfg(FALSE)]
         () if let 0 = 1 => {}
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr
index 1c710b04897..0997f0c81a0 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr
@@ -124,15 +124,33 @@ LL |     use_expr!((let 0 = 1 && 0 == 0));
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/feature-gate.rs:62:16
+  --> $DIR/feature-gate.rs:60:16
+   |
+LL |     use_expr!((let 0 = 1 && 0 == 0));
+   |                ^^^
+   |
+   = note: only supported directly in conditions of `if` and `while` expressions
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: expected expression, found `let` statement
+  --> $DIR/feature-gate.rs:63:16
+   |
+LL |     use_expr!((let 0 = 1));
+   |                ^^^
+   |
+   = note: only supported directly in conditions of `if` and `while` expressions
+
+error: expected expression, found `let` statement
+  --> $DIR/feature-gate.rs:63:16
    |
 LL |     use_expr!((let 0 = 1));
    |                ^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: no rules expected keyword `let`
-  --> $DIR/feature-gate.rs:70:15
+  --> $DIR/feature-gate.rs:72:15
    |
 LL |     macro_rules! use_expr {
    |     --------------------- when calling this macro
@@ -202,7 +220,7 @@ LL |         () if let Range { start: _, end: _ } = (true..true) && false => {}
    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
 
 error[E0658]: `if let` guards are experimental
-  --> $DIR/feature-gate.rs:66:12
+  --> $DIR/feature-gate.rs:68:12
    |
 LL |         () if let 0 = 1 => {}
    |            ^^^^^^^^^^^^
@@ -262,6 +280,6 @@ LL |         () if let Range { start: _, end: _ } = (true..true) && false => {}
    = help: add `#![feature(let_chains)]` 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 23 previous errors
+error: aborting due to 25 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.feature.stderr b/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.feature.stderr
index db32b8c1de4..817e226bc45 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.feature.stderr
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.feature.stderr
@@ -233,7 +233,7 @@ LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:99:9
+  --> $DIR/disallowed-positions.rs:103:9
    |
 LL |     if &let 0 = 0 {}
    |         ^^^^^^^^^
@@ -241,7 +241,7 @@ LL |     if &let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:102:9
+  --> $DIR/disallowed-positions.rs:106:9
    |
 LL |     if !let 0 = 0 {}
    |         ^^^^^^^^^
@@ -249,7 +249,7 @@ LL |     if !let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:104:9
+  --> $DIR/disallowed-positions.rs:108:9
    |
 LL |     if *let 0 = 0 {}
    |         ^^^^^^^^^
@@ -257,7 +257,7 @@ LL |     if *let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:106:9
+  --> $DIR/disallowed-positions.rs:110:9
    |
 LL |     if -let 0 = 0 {}
    |         ^^^^^^^^^
@@ -265,7 +265,7 @@ LL |     if -let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:114:9
+  --> $DIR/disallowed-positions.rs:118:9
    |
 LL |     if (let 0 = 0)? {}
    |         ^^^^^^^^^
@@ -273,20 +273,20 @@ LL |     if (let 0 = 0)? {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:117:16
+  --> $DIR/disallowed-positions.rs:121:16
    |
 LL |     if true || let 0 = 0 {}
    |                ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `||` operators are not supported in let chain expressions
-  --> $DIR/disallowed-positions.rs:117:13
+  --> $DIR/disallowed-positions.rs:121:13
    |
 LL |     if true || let 0 = 0 {}
    |             ^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:119:17
+  --> $DIR/disallowed-positions.rs:123:17
    |
 LL |     if (true || let 0 = 0) {}
    |                 ^^^^^^^^^
@@ -294,7 +294,7 @@ LL |     if (true || let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:121:25
+  --> $DIR/disallowed-positions.rs:125:25
    |
 LL |     if true && (true || let 0 = 0) {}
    |                         ^^^^^^^^^
@@ -302,7 +302,7 @@ LL |     if true && (true || let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:123:25
+  --> $DIR/disallowed-positions.rs:127:25
    |
 LL |     if true || (true && let 0 = 0) {}
    |                         ^^^^^^^^^
@@ -310,7 +310,7 @@ LL |     if true || (true && let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:127:12
+  --> $DIR/disallowed-positions.rs:131:12
    |
 LL |     if x = let 0 = 0 {}
    |            ^^^
@@ -318,7 +318,7 @@ LL |     if x = let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:130:15
+  --> $DIR/disallowed-positions.rs:134:15
    |
 LL |     if true..(let 0 = 0) {}
    |               ^^^^^^^^^
@@ -326,7 +326,7 @@ LL |     if true..(let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:133:11
+  --> $DIR/disallowed-positions.rs:137:11
    |
 LL |     if ..(let 0 = 0) {}
    |           ^^^^^^^^^
@@ -334,7 +334,7 @@ LL |     if ..(let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:135:9
+  --> $DIR/disallowed-positions.rs:139:9
    |
 LL |     if (let 0 = 0).. {}
    |         ^^^^^^^^^
@@ -342,7 +342,7 @@ LL |     if (let 0 = 0).. {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:139:8
+  --> $DIR/disallowed-positions.rs:143:8
    |
 LL |     if let Range { start: _, end: _ } = true..true && false {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -350,7 +350,7 @@ LL |     if let Range { start: _, end: _ } = true..true && false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:142:8
+  --> $DIR/disallowed-positions.rs:146:8
    |
 LL |     if let Range { start: _, end: _ } = true..true || false {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -358,7 +358,7 @@ LL |     if let Range { start: _, end: _ } = true..true || false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:148:8
+  --> $DIR/disallowed-positions.rs:152:8
    |
 LL |     if let Range { start: F, end } = F..|| true {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -366,7 +366,7 @@ LL |     if let Range { start: F, end } = F..|| true {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:154:8
+  --> $DIR/disallowed-positions.rs:158:8
    |
 LL |     if let Range { start: true, end } = t..&&false {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -374,7 +374,7 @@ LL |     if let Range { start: true, end } = t..&&false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:158:19
+  --> $DIR/disallowed-positions.rs:162:19
    |
 LL |     if let true = let true = true {}
    |                   ^^^
@@ -382,7 +382,7 @@ LL |     if let true = let true = true {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:161:15
+  --> $DIR/disallowed-positions.rs:165:15
    |
 LL |     if return let 0 = 0 {}
    |               ^^^
@@ -390,7 +390,7 @@ LL |     if return let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:164:21
+  --> $DIR/disallowed-positions.rs:168:21
    |
 LL |     loop { if break let 0 = 0 {} }
    |                     ^^^
@@ -398,7 +398,7 @@ LL |     loop { if break let 0 = 0 {} }
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:167:15
+  --> $DIR/disallowed-positions.rs:171:15
    |
 LL |     if (match let 0 = 0 { _ => { false } }) {}
    |               ^^^
@@ -406,7 +406,7 @@ LL |     if (match let 0 = 0 { _ => { false } }) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:170:9
+  --> $DIR/disallowed-positions.rs:174:9
    |
 LL |     if (let 0 = 0, false).1 {}
    |         ^^^^^^^^^
@@ -414,7 +414,7 @@ LL |     if (let 0 = 0, false).1 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:173:9
+  --> $DIR/disallowed-positions.rs:177:9
    |
 LL |     if (let 0 = 0,) {}
    |         ^^^^^^^^^
@@ -422,7 +422,7 @@ LL |     if (let 0 = 0,) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:177:13
+  --> $DIR/disallowed-positions.rs:181:13
    |
 LL |         if (let 0 = 0).await {}
    |             ^^^^^^^^^
@@ -430,7 +430,7 @@ LL |         if (let 0 = 0).await {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:181:12
+  --> $DIR/disallowed-positions.rs:185:12
    |
 LL |     if (|| let 0 = 0) {}
    |            ^^^
@@ -438,7 +438,7 @@ LL |     if (|| let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:184:9
+  --> $DIR/disallowed-positions.rs:188:9
    |
 LL |     if (let 0 = 0)() {}
    |         ^^^^^^^^^
@@ -446,7 +446,7 @@ LL |     if (let 0 = 0)() {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:190:12
+  --> $DIR/disallowed-positions.rs:194:12
    |
 LL |     while &let 0 = 0 {}
    |            ^^^^^^^^^
@@ -454,7 +454,7 @@ LL |     while &let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:193:12
+  --> $DIR/disallowed-positions.rs:197:12
    |
 LL |     while !let 0 = 0 {}
    |            ^^^^^^^^^
@@ -462,7 +462,7 @@ LL |     while !let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:195:12
+  --> $DIR/disallowed-positions.rs:199:12
    |
 LL |     while *let 0 = 0 {}
    |            ^^^^^^^^^
@@ -470,7 +470,7 @@ LL |     while *let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:197:12
+  --> $DIR/disallowed-positions.rs:201:12
    |
 LL |     while -let 0 = 0 {}
    |            ^^^^^^^^^
@@ -478,7 +478,7 @@ LL |     while -let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:205:12
+  --> $DIR/disallowed-positions.rs:209:12
    |
 LL |     while (let 0 = 0)? {}
    |            ^^^^^^^^^
@@ -486,20 +486,20 @@ LL |     while (let 0 = 0)? {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:208:19
+  --> $DIR/disallowed-positions.rs:212:19
    |
 LL |     while true || let 0 = 0 {}
    |                   ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `||` operators are not supported in let chain expressions
-  --> $DIR/disallowed-positions.rs:208:16
+  --> $DIR/disallowed-positions.rs:212:16
    |
 LL |     while true || let 0 = 0 {}
    |                ^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:210:20
+  --> $DIR/disallowed-positions.rs:214:20
    |
 LL |     while (true || let 0 = 0) {}
    |                    ^^^^^^^^^
@@ -507,7 +507,7 @@ LL |     while (true || let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:212:28
+  --> $DIR/disallowed-positions.rs:216:28
    |
 LL |     while true && (true || let 0 = 0) {}
    |                            ^^^^^^^^^
@@ -515,7 +515,7 @@ LL |     while true && (true || let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:214:28
+  --> $DIR/disallowed-positions.rs:218:28
    |
 LL |     while true || (true && let 0 = 0) {}
    |                            ^^^^^^^^^
@@ -523,7 +523,7 @@ LL |     while true || (true && let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:218:15
+  --> $DIR/disallowed-positions.rs:222:15
    |
 LL |     while x = let 0 = 0 {}
    |               ^^^
@@ -531,7 +531,7 @@ LL |     while x = let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:221:18
+  --> $DIR/disallowed-positions.rs:225:18
    |
 LL |     while true..(let 0 = 0) {}
    |                  ^^^^^^^^^
@@ -539,7 +539,7 @@ LL |     while true..(let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:224:14
+  --> $DIR/disallowed-positions.rs:228:14
    |
 LL |     while ..(let 0 = 0) {}
    |              ^^^^^^^^^
@@ -547,7 +547,7 @@ LL |     while ..(let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:226:12
+  --> $DIR/disallowed-positions.rs:230:12
    |
 LL |     while (let 0 = 0).. {}
    |            ^^^^^^^^^
@@ -555,7 +555,7 @@ LL |     while (let 0 = 0).. {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:230:11
+  --> $DIR/disallowed-positions.rs:234:11
    |
 LL |     while let Range { start: _, end: _ } = true..true && false {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -563,7 +563,7 @@ LL |     while let Range { start: _, end: _ } = true..true && false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:233:11
+  --> $DIR/disallowed-positions.rs:237:11
    |
 LL |     while let Range { start: _, end: _ } = true..true || false {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -571,7 +571,7 @@ LL |     while let Range { start: _, end: _ } = true..true || false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:239:11
+  --> $DIR/disallowed-positions.rs:243:11
    |
 LL |     while let Range { start: F, end } = F..|| true {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -579,7 +579,7 @@ LL |     while let Range { start: F, end } = F..|| true {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:245:11
+  --> $DIR/disallowed-positions.rs:249:11
    |
 LL |     while let Range { start: true, end } = t..&&false {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -587,7 +587,7 @@ LL |     while let Range { start: true, end } = t..&&false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:249:22
+  --> $DIR/disallowed-positions.rs:253:22
    |
 LL |     while let true = let true = true {}
    |                      ^^^
@@ -595,7 +595,7 @@ LL |     while let true = let true = true {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:252:18
+  --> $DIR/disallowed-positions.rs:256:18
    |
 LL |     while return let 0 = 0 {}
    |                  ^^^
@@ -603,7 +603,7 @@ LL |     while return let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:255:39
+  --> $DIR/disallowed-positions.rs:259:39
    |
 LL |     'outer: loop { while break 'outer let 0 = 0 {} }
    |                                       ^^^
@@ -611,7 +611,7 @@ LL |     'outer: loop { while break 'outer let 0 = 0 {} }
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:258:18
+  --> $DIR/disallowed-positions.rs:262:18
    |
 LL |     while (match let 0 = 0 { _ => { false } }) {}
    |                  ^^^
@@ -619,7 +619,7 @@ LL |     while (match let 0 = 0 { _ => { false } }) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:261:12
+  --> $DIR/disallowed-positions.rs:265:12
    |
 LL |     while (let 0 = 0, false).1 {}
    |            ^^^^^^^^^
@@ -627,7 +627,7 @@ LL |     while (let 0 = 0, false).1 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:264:12
+  --> $DIR/disallowed-positions.rs:268:12
    |
 LL |     while (let 0 = 0,) {}
    |            ^^^^^^^^^
@@ -635,7 +635,7 @@ LL |     while (let 0 = 0,) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:268:16
+  --> $DIR/disallowed-positions.rs:272:16
    |
 LL |         while (let 0 = 0).await {}
    |                ^^^^^^^^^
@@ -643,7 +643,7 @@ LL |         while (let 0 = 0).await {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:272:15
+  --> $DIR/disallowed-positions.rs:276:15
    |
 LL |     while (|| let 0 = 0) {}
    |               ^^^
@@ -651,7 +651,7 @@ LL |     while (|| let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:275:12
+  --> $DIR/disallowed-positions.rs:279:12
    |
 LL |     while (let 0 = 0)() {}
    |            ^^^^^^^^^
@@ -659,7 +659,7 @@ LL |     while (let 0 = 0)() {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:292:6
+  --> $DIR/disallowed-positions.rs:296:6
    |
 LL |     &let 0 = 0;
    |      ^^^
@@ -667,7 +667,7 @@ LL |     &let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:295:6
+  --> $DIR/disallowed-positions.rs:299:6
    |
 LL |     !let 0 = 0;
    |      ^^^
@@ -675,7 +675,7 @@ LL |     !let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:297:6
+  --> $DIR/disallowed-positions.rs:301:6
    |
 LL |     *let 0 = 0;
    |      ^^^
@@ -683,7 +683,7 @@ LL |     *let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:299:6
+  --> $DIR/disallowed-positions.rs:303:6
    |
 LL |     -let 0 = 0;
    |      ^^^
@@ -691,7 +691,7 @@ LL |     -let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:301:13
+  --> $DIR/disallowed-positions.rs:305:13
    |
 LL |     let _ = let _ = 3;
    |             ^^^
@@ -699,7 +699,7 @@ LL |     let _ = let _ = 3;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:309:6
+  --> $DIR/disallowed-positions.rs:313:6
    |
 LL |     (let 0 = 0)?;
    |      ^^^
@@ -707,7 +707,7 @@ LL |     (let 0 = 0)?;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:312:13
+  --> $DIR/disallowed-positions.rs:316:13
    |
 LL |     true || let 0 = 0;
    |             ^^^
@@ -715,7 +715,7 @@ LL |     true || let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:314:14
+  --> $DIR/disallowed-positions.rs:318:14
    |
 LL |     (true || let 0 = 0);
    |              ^^^
@@ -723,7 +723,7 @@ LL |     (true || let 0 = 0);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:316:22
+  --> $DIR/disallowed-positions.rs:320:22
    |
 LL |     true && (true || let 0 = 0);
    |                      ^^^
@@ -731,7 +731,7 @@ LL |     true && (true || let 0 = 0);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:320:9
+  --> $DIR/disallowed-positions.rs:324:9
    |
 LL |     x = let 0 = 0;
    |         ^^^
@@ -739,7 +739,7 @@ LL |     x = let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:323:12
+  --> $DIR/disallowed-positions.rs:327:12
    |
 LL |     true..(let 0 = 0);
    |            ^^^
@@ -747,7 +747,7 @@ LL |     true..(let 0 = 0);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:325:8
+  --> $DIR/disallowed-positions.rs:329:8
    |
 LL |     ..(let 0 = 0);
    |        ^^^
@@ -755,7 +755,7 @@ LL |     ..(let 0 = 0);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:327:6
+  --> $DIR/disallowed-positions.rs:331:6
    |
 LL |     (let 0 = 0)..;
    |      ^^^
@@ -763,7 +763,7 @@ LL |     (let 0 = 0)..;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:330:6
+  --> $DIR/disallowed-positions.rs:334:6
    |
 LL |     (let Range { start: _, end: _ } = true..true || false);
    |      ^^^
@@ -771,7 +771,7 @@ LL |     (let Range { start: _, end: _ } = true..true || false);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:334:6
+  --> $DIR/disallowed-positions.rs:338:6
    |
 LL |     (let true = let true = true);
    |      ^^^
@@ -779,7 +779,7 @@ LL |     (let true = let true = true);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:334:17
+  --> $DIR/disallowed-positions.rs:338:17
    |
 LL |     (let true = let true = true);
    |                 ^^^
@@ -787,7 +787,7 @@ LL |     (let true = let true = true);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:340:25
+  --> $DIR/disallowed-positions.rs:344:25
    |
 LL |         let x = true && let y = 1;
    |                         ^^^
@@ -795,7 +795,7 @@ LL |         let x = true && let y = 1;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:346:19
+  --> $DIR/disallowed-positions.rs:350:19
    |
 LL |         [1, 2, 3][let _ = ()]
    |                   ^^^
@@ -803,7 +803,7 @@ LL |         [1, 2, 3][let _ = ()]
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:351:6
+  --> $DIR/disallowed-positions.rs:355:6
    |
 LL |     &let 0 = 0
    |      ^^^
@@ -811,7 +811,7 @@ LL |     &let 0 = 0
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:362:17
+  --> $DIR/disallowed-positions.rs:366:17
    |
 LL |         true && let 1 = 1
    |                 ^^^
@@ -819,7 +819,7 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:367:17
+  --> $DIR/disallowed-positions.rs:371:17
    |
 LL |         true && let 1 = 1
    |                 ^^^
@@ -827,7 +827,7 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:372:17
+  --> $DIR/disallowed-positions.rs:376:17
    |
 LL |         true && let 1 = 1
    |                 ^^^
@@ -835,7 +835,7 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:383:17
+  --> $DIR/disallowed-positions.rs:387:17
    |
 LL |         true && let 1 = 1
    |                 ^^^
@@ -843,7 +843,7 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expressions must be enclosed in braces to be used as const generic arguments
-  --> $DIR/disallowed-positions.rs:383:9
+  --> $DIR/disallowed-positions.rs:387:9
    |
 LL |         true && let 1 = 1
    |         ^^^^^^^^^^^^^^^^^
@@ -854,124 +854,124 @@ LL |         { true && let 1 = 1 }
    |         +                   +
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:393:9
+  --> $DIR/disallowed-positions.rs:397:9
    |
 LL |     if (let Some(a) = opt && true) {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:393:9
+  --> $DIR/disallowed-positions.rs:397:9
    |
 LL |     if (let Some(a) = opt && true) {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:397:9
+  --> $DIR/disallowed-positions.rs:401:9
    |
 LL |     if (let Some(a) = opt) && true {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:397:9
+  --> $DIR/disallowed-positions.rs:401:9
    |
 LL |     if (let Some(a) = opt) && true {
    |         ^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:400:9
+  --> $DIR/disallowed-positions.rs:404:9
    |
 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:400:9
+  --> $DIR/disallowed-positions.rs:404:9
    |
 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
    |         ^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:400:32
+  --> $DIR/disallowed-positions.rs:404:32
    |
 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
    |                                ^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:400:32
+  --> $DIR/disallowed-positions.rs:404:32
    |
 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
    |                                ^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:408:9
+  --> $DIR/disallowed-positions.rs:412:9
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:408:9
+  --> $DIR/disallowed-positions.rs:412:9
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:408:31
+  --> $DIR/disallowed-positions.rs:412:31
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
    |                               ^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:408:31
+  --> $DIR/disallowed-positions.rs:412:31
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
    |                               ^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:412:9
+  --> $DIR/disallowed-positions.rs:416:9
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:412:9
+  --> $DIR/disallowed-positions.rs:416:9
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:412:31
+  --> $DIR/disallowed-positions.rs:416:31
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
    |                               ^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:412:31
+  --> $DIR/disallowed-positions.rs:416:31
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
    |                               ^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:416:9
+  --> $DIR/disallowed-positions.rs:420:9
    |
 LL |     if (let Some(a) = opt && (true)) && true {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:416:9
+  --> $DIR/disallowed-positions.rs:420:9
    |
 LL |     if (let Some(a) = opt && (true)) && true {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:436:22
+  --> $DIR/disallowed-positions.rs:440:22
    |
 LL |     let x = (true && let y = 1);
    |                      ^^^
@@ -979,7 +979,7 @@ LL |     let x = (true && let y = 1);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:441:20
+  --> $DIR/disallowed-positions.rs:445:20
    |
 LL |         ([1, 2, 3][let _ = ()])
    |                    ^^^
@@ -995,15 +995,51 @@ LL |     use_expr!((let 0 = 1 && 0 == 0));
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:93:16
+  --> $DIR/disallowed-positions.rs:91:16
+   |
+LL |     use_expr!((let 0 = 1 && 0 == 0));
+   |                ^^^
+   |
+   = note: only supported directly in conditions of `if` and `while` expressions
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: expected expression, found `let` statement
+  --> $DIR/disallowed-positions.rs:91:16
+   |
+LL |     use_expr!((let 0 = 1 && 0 == 0));
+   |                ^^^
+   |
+   = note: only supported directly in conditions of `if` and `while` expressions
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: expected expression, found `let` statement
+  --> $DIR/disallowed-positions.rs:95:16
+   |
+LL |     use_expr!((let 0 = 1));
+   |                ^^^
+   |
+   = note: only supported directly in conditions of `if` and `while` expressions
+
+error: expected expression, found `let` statement
+  --> $DIR/disallowed-positions.rs:95:16
+   |
+LL |     use_expr!((let 0 = 1));
+   |                ^^^
+   |
+   = note: only supported directly in conditions of `if` and `while` expressions
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: expected expression, found `let` statement
+  --> $DIR/disallowed-positions.rs:95:16
    |
 LL |     use_expr!((let 0 = 1));
    |                ^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:130:8
+  --> $DIR/disallowed-positions.rs:134:8
    |
 LL |     if true..(let 0 = 0) {}
    |        ^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
@@ -1012,7 +1048,7 @@ LL |     if true..(let 0 = 0) {}
             found struct `std::ops::Range<bool>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:139:12
+  --> $DIR/disallowed-positions.rs:143:12
    |
 LL |     if let Range { start: _, end: _ } = true..true && false {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
@@ -1023,7 +1059,7 @@ LL |     if let Range { start: _, end: _ } = true..true && false {}
             found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:142:12
+  --> $DIR/disallowed-positions.rs:146:12
    |
 LL |     if let Range { start: _, end: _ } = true..true || false {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
@@ -1034,7 +1070,7 @@ LL |     if let Range { start: _, end: _ } = true..true || false {}
             found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:148:12
+  --> $DIR/disallowed-positions.rs:152:12
    |
 LL |     if let Range { start: F, end } = F..|| true {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `fn() -> bool`
@@ -1045,7 +1081,7 @@ LL |     if let Range { start: F, end } = F..|| true {}
                   found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:154:12
+  --> $DIR/disallowed-positions.rs:158:12
    |
 LL |     if let Range { start: true, end } = t..&&false {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `&&bool`
@@ -1056,7 +1092,7 @@ LL |     if let Range { start: true, end } = t..&&false {}
             found struct `std::ops::Range<_>`
 
 error[E0277]: the `?` operator can only be applied to values that implement `Try`
-  --> $DIR/disallowed-positions.rs:110:20
+  --> $DIR/disallowed-positions.rs:114:20
    |
 LL |         if let 0 = 0? {}
    |                    ^^ the `?` operator cannot be applied to type `{integer}`
@@ -1064,7 +1100,7 @@ LL |         if let 0 = 0? {}
    = help: the trait `Try` is not implemented for `{integer}`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:221:11
+  --> $DIR/disallowed-positions.rs:225:11
    |
 LL |     while true..(let 0 = 0) {}
    |           ^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
@@ -1073,7 +1109,7 @@ LL |     while true..(let 0 = 0) {}
             found struct `std::ops::Range<bool>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:230:15
+  --> $DIR/disallowed-positions.rs:234:15
    |
 LL |     while let Range { start: _, end: _ } = true..true && false {}
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
@@ -1084,7 +1120,7 @@ LL |     while let Range { start: _, end: _ } = true..true && false {}
             found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:233:15
+  --> $DIR/disallowed-positions.rs:237:15
    |
 LL |     while let Range { start: _, end: _ } = true..true || false {}
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
@@ -1095,7 +1131,7 @@ LL |     while let Range { start: _, end: _ } = true..true || false {}
             found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:239:15
+  --> $DIR/disallowed-positions.rs:243:15
    |
 LL |     while let Range { start: F, end } = F..|| true {}
    |               ^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `fn() -> bool`
@@ -1106,7 +1142,7 @@ LL |     while let Range { start: F, end } = F..|| true {}
                   found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:245:15
+  --> $DIR/disallowed-positions.rs:249:15
    |
 LL |     while let Range { start: true, end } = t..&&false {}
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `&&bool`
@@ -1117,7 +1153,7 @@ LL |     while let Range { start: true, end } = t..&&false {}
             found struct `std::ops::Range<_>`
 
 error[E0277]: the `?` operator can only be applied to values that implement `Try`
-  --> $DIR/disallowed-positions.rs:201:23
+  --> $DIR/disallowed-positions.rs:205:23
    |
 LL |         while let 0 = 0? {}
    |                       ^^ the `?` operator cannot be applied to type `{integer}`
@@ -1125,7 +1161,7 @@ LL |         while let 0 = 0? {}
    = help: the trait `Try` is not implemented for `{integer}`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:330:10
+  --> $DIR/disallowed-positions.rs:334:10
    |
 LL |     (let Range { start: _, end: _ } = true..true || false);
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
@@ -1136,14 +1172,14 @@ LL |     (let Range { start: _, end: _ } = true..true || false);
             found struct `std::ops::Range<_>`
 
 error[E0277]: the `?` operator can only be applied to values that implement `Try`
-  --> $DIR/disallowed-positions.rs:305:17
+  --> $DIR/disallowed-positions.rs:309:17
    |
 LL |         let 0 = 0?;
    |                 ^^ the `?` operator cannot be applied to type `{integer}`
    |
    = help: the trait `Try` is not implemented for `{integer}`
 
-error: aborting due to 121 previous errors
+error: aborting due to 125 previous errors
 
 Some errors have detailed explanations: E0277, E0308.
 For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.no_feature.stderr b/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.no_feature.stderr
index ad16a0f8ed8..bab50c22c03 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.no_feature.stderr
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.no_feature.stderr
@@ -233,7 +233,7 @@ LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:99:9
+  --> $DIR/disallowed-positions.rs:103:9
    |
 LL |     if &let 0 = 0 {}
    |         ^^^^^^^^^
@@ -241,7 +241,7 @@ LL |     if &let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:102:9
+  --> $DIR/disallowed-positions.rs:106:9
    |
 LL |     if !let 0 = 0 {}
    |         ^^^^^^^^^
@@ -249,7 +249,7 @@ LL |     if !let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:104:9
+  --> $DIR/disallowed-positions.rs:108:9
    |
 LL |     if *let 0 = 0 {}
    |         ^^^^^^^^^
@@ -257,7 +257,7 @@ LL |     if *let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:106:9
+  --> $DIR/disallowed-positions.rs:110:9
    |
 LL |     if -let 0 = 0 {}
    |         ^^^^^^^^^
@@ -265,7 +265,7 @@ LL |     if -let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:114:9
+  --> $DIR/disallowed-positions.rs:118:9
    |
 LL |     if (let 0 = 0)? {}
    |         ^^^^^^^^^
@@ -273,20 +273,20 @@ LL |     if (let 0 = 0)? {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:117:16
+  --> $DIR/disallowed-positions.rs:121:16
    |
 LL |     if true || let 0 = 0 {}
    |                ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `||` operators are not supported in let chain expressions
-  --> $DIR/disallowed-positions.rs:117:13
+  --> $DIR/disallowed-positions.rs:121:13
    |
 LL |     if true || let 0 = 0 {}
    |             ^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:119:17
+  --> $DIR/disallowed-positions.rs:123:17
    |
 LL |     if (true || let 0 = 0) {}
    |                 ^^^^^^^^^
@@ -294,7 +294,7 @@ LL |     if (true || let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:121:25
+  --> $DIR/disallowed-positions.rs:125:25
    |
 LL |     if true && (true || let 0 = 0) {}
    |                         ^^^^^^^^^
@@ -302,7 +302,7 @@ LL |     if true && (true || let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:123:25
+  --> $DIR/disallowed-positions.rs:127:25
    |
 LL |     if true || (true && let 0 = 0) {}
    |                         ^^^^^^^^^
@@ -310,7 +310,7 @@ LL |     if true || (true && let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:127:12
+  --> $DIR/disallowed-positions.rs:131:12
    |
 LL |     if x = let 0 = 0 {}
    |            ^^^
@@ -318,7 +318,7 @@ LL |     if x = let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:130:15
+  --> $DIR/disallowed-positions.rs:134:15
    |
 LL |     if true..(let 0 = 0) {}
    |               ^^^^^^^^^
@@ -326,7 +326,7 @@ LL |     if true..(let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:133:11
+  --> $DIR/disallowed-positions.rs:137:11
    |
 LL |     if ..(let 0 = 0) {}
    |           ^^^^^^^^^
@@ -334,7 +334,7 @@ LL |     if ..(let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:135:9
+  --> $DIR/disallowed-positions.rs:139:9
    |
 LL |     if (let 0 = 0).. {}
    |         ^^^^^^^^^
@@ -342,7 +342,7 @@ LL |     if (let 0 = 0).. {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:139:8
+  --> $DIR/disallowed-positions.rs:143:8
    |
 LL |     if let Range { start: _, end: _ } = true..true && false {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -350,7 +350,7 @@ LL |     if let Range { start: _, end: _ } = true..true && false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:142:8
+  --> $DIR/disallowed-positions.rs:146:8
    |
 LL |     if let Range { start: _, end: _ } = true..true || false {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -358,7 +358,7 @@ LL |     if let Range { start: _, end: _ } = true..true || false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:148:8
+  --> $DIR/disallowed-positions.rs:152:8
    |
 LL |     if let Range { start: F, end } = F..|| true {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -366,7 +366,7 @@ LL |     if let Range { start: F, end } = F..|| true {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:154:8
+  --> $DIR/disallowed-positions.rs:158:8
    |
 LL |     if let Range { start: true, end } = t..&&false {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -374,7 +374,7 @@ LL |     if let Range { start: true, end } = t..&&false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:158:19
+  --> $DIR/disallowed-positions.rs:162:19
    |
 LL |     if let true = let true = true {}
    |                   ^^^
@@ -382,7 +382,7 @@ LL |     if let true = let true = true {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:161:15
+  --> $DIR/disallowed-positions.rs:165:15
    |
 LL |     if return let 0 = 0 {}
    |               ^^^
@@ -390,7 +390,7 @@ LL |     if return let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:164:21
+  --> $DIR/disallowed-positions.rs:168:21
    |
 LL |     loop { if break let 0 = 0 {} }
    |                     ^^^
@@ -398,7 +398,7 @@ LL |     loop { if break let 0 = 0 {} }
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:167:15
+  --> $DIR/disallowed-positions.rs:171:15
    |
 LL |     if (match let 0 = 0 { _ => { false } }) {}
    |               ^^^
@@ -406,7 +406,7 @@ LL |     if (match let 0 = 0 { _ => { false } }) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:170:9
+  --> $DIR/disallowed-positions.rs:174:9
    |
 LL |     if (let 0 = 0, false).1 {}
    |         ^^^^^^^^^
@@ -414,7 +414,7 @@ LL |     if (let 0 = 0, false).1 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:173:9
+  --> $DIR/disallowed-positions.rs:177:9
    |
 LL |     if (let 0 = 0,) {}
    |         ^^^^^^^^^
@@ -422,7 +422,7 @@ LL |     if (let 0 = 0,) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:177:13
+  --> $DIR/disallowed-positions.rs:181:13
    |
 LL |         if (let 0 = 0).await {}
    |             ^^^^^^^^^
@@ -430,7 +430,7 @@ LL |         if (let 0 = 0).await {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:181:12
+  --> $DIR/disallowed-positions.rs:185:12
    |
 LL |     if (|| let 0 = 0) {}
    |            ^^^
@@ -438,7 +438,7 @@ LL |     if (|| let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:184:9
+  --> $DIR/disallowed-positions.rs:188:9
    |
 LL |     if (let 0 = 0)() {}
    |         ^^^^^^^^^
@@ -446,7 +446,7 @@ LL |     if (let 0 = 0)() {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:190:12
+  --> $DIR/disallowed-positions.rs:194:12
    |
 LL |     while &let 0 = 0 {}
    |            ^^^^^^^^^
@@ -454,7 +454,7 @@ LL |     while &let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:193:12
+  --> $DIR/disallowed-positions.rs:197:12
    |
 LL |     while !let 0 = 0 {}
    |            ^^^^^^^^^
@@ -462,7 +462,7 @@ LL |     while !let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:195:12
+  --> $DIR/disallowed-positions.rs:199:12
    |
 LL |     while *let 0 = 0 {}
    |            ^^^^^^^^^
@@ -470,7 +470,7 @@ LL |     while *let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:197:12
+  --> $DIR/disallowed-positions.rs:201:12
    |
 LL |     while -let 0 = 0 {}
    |            ^^^^^^^^^
@@ -478,7 +478,7 @@ LL |     while -let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:205:12
+  --> $DIR/disallowed-positions.rs:209:12
    |
 LL |     while (let 0 = 0)? {}
    |            ^^^^^^^^^
@@ -486,20 +486,20 @@ LL |     while (let 0 = 0)? {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:208:19
+  --> $DIR/disallowed-positions.rs:212:19
    |
 LL |     while true || let 0 = 0 {}
    |                   ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `||` operators are not supported in let chain expressions
-  --> $DIR/disallowed-positions.rs:208:16
+  --> $DIR/disallowed-positions.rs:212:16
    |
 LL |     while true || let 0 = 0 {}
    |                ^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:210:20
+  --> $DIR/disallowed-positions.rs:214:20
    |
 LL |     while (true || let 0 = 0) {}
    |                    ^^^^^^^^^
@@ -507,7 +507,7 @@ LL |     while (true || let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:212:28
+  --> $DIR/disallowed-positions.rs:216:28
    |
 LL |     while true && (true || let 0 = 0) {}
    |                            ^^^^^^^^^
@@ -515,7 +515,7 @@ LL |     while true && (true || let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:214:28
+  --> $DIR/disallowed-positions.rs:218:28
    |
 LL |     while true || (true && let 0 = 0) {}
    |                            ^^^^^^^^^
@@ -523,7 +523,7 @@ LL |     while true || (true && let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:218:15
+  --> $DIR/disallowed-positions.rs:222:15
    |
 LL |     while x = let 0 = 0 {}
    |               ^^^
@@ -531,7 +531,7 @@ LL |     while x = let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:221:18
+  --> $DIR/disallowed-positions.rs:225:18
    |
 LL |     while true..(let 0 = 0) {}
    |                  ^^^^^^^^^
@@ -539,7 +539,7 @@ LL |     while true..(let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:224:14
+  --> $DIR/disallowed-positions.rs:228:14
    |
 LL |     while ..(let 0 = 0) {}
    |              ^^^^^^^^^
@@ -547,7 +547,7 @@ LL |     while ..(let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:226:12
+  --> $DIR/disallowed-positions.rs:230:12
    |
 LL |     while (let 0 = 0).. {}
    |            ^^^^^^^^^
@@ -555,7 +555,7 @@ LL |     while (let 0 = 0).. {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:230:11
+  --> $DIR/disallowed-positions.rs:234:11
    |
 LL |     while let Range { start: _, end: _ } = true..true && false {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -563,7 +563,7 @@ LL |     while let Range { start: _, end: _ } = true..true && false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:233:11
+  --> $DIR/disallowed-positions.rs:237:11
    |
 LL |     while let Range { start: _, end: _ } = true..true || false {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -571,7 +571,7 @@ LL |     while let Range { start: _, end: _ } = true..true || false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:239:11
+  --> $DIR/disallowed-positions.rs:243:11
    |
 LL |     while let Range { start: F, end } = F..|| true {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -579,7 +579,7 @@ LL |     while let Range { start: F, end } = F..|| true {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:245:11
+  --> $DIR/disallowed-positions.rs:249:11
    |
 LL |     while let Range { start: true, end } = t..&&false {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -587,7 +587,7 @@ LL |     while let Range { start: true, end } = t..&&false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:249:22
+  --> $DIR/disallowed-positions.rs:253:22
    |
 LL |     while let true = let true = true {}
    |                      ^^^
@@ -595,7 +595,7 @@ LL |     while let true = let true = true {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:252:18
+  --> $DIR/disallowed-positions.rs:256:18
    |
 LL |     while return let 0 = 0 {}
    |                  ^^^
@@ -603,7 +603,7 @@ LL |     while return let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:255:39
+  --> $DIR/disallowed-positions.rs:259:39
    |
 LL |     'outer: loop { while break 'outer let 0 = 0 {} }
    |                                       ^^^
@@ -611,7 +611,7 @@ LL |     'outer: loop { while break 'outer let 0 = 0 {} }
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:258:18
+  --> $DIR/disallowed-positions.rs:262:18
    |
 LL |     while (match let 0 = 0 { _ => { false } }) {}
    |                  ^^^
@@ -619,7 +619,7 @@ LL |     while (match let 0 = 0 { _ => { false } }) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:261:12
+  --> $DIR/disallowed-positions.rs:265:12
    |
 LL |     while (let 0 = 0, false).1 {}
    |            ^^^^^^^^^
@@ -627,7 +627,7 @@ LL |     while (let 0 = 0, false).1 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:264:12
+  --> $DIR/disallowed-positions.rs:268:12
    |
 LL |     while (let 0 = 0,) {}
    |            ^^^^^^^^^
@@ -635,7 +635,7 @@ LL |     while (let 0 = 0,) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:268:16
+  --> $DIR/disallowed-positions.rs:272:16
    |
 LL |         while (let 0 = 0).await {}
    |                ^^^^^^^^^
@@ -643,7 +643,7 @@ LL |         while (let 0 = 0).await {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:272:15
+  --> $DIR/disallowed-positions.rs:276:15
    |
 LL |     while (|| let 0 = 0) {}
    |               ^^^
@@ -651,7 +651,7 @@ LL |     while (|| let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:275:12
+  --> $DIR/disallowed-positions.rs:279:12
    |
 LL |     while (let 0 = 0)() {}
    |            ^^^^^^^^^
@@ -659,7 +659,7 @@ LL |     while (let 0 = 0)() {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:292:6
+  --> $DIR/disallowed-positions.rs:296:6
    |
 LL |     &let 0 = 0;
    |      ^^^
@@ -667,7 +667,7 @@ LL |     &let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:295:6
+  --> $DIR/disallowed-positions.rs:299:6
    |
 LL |     !let 0 = 0;
    |      ^^^
@@ -675,7 +675,7 @@ LL |     !let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:297:6
+  --> $DIR/disallowed-positions.rs:301:6
    |
 LL |     *let 0 = 0;
    |      ^^^
@@ -683,7 +683,7 @@ LL |     *let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:299:6
+  --> $DIR/disallowed-positions.rs:303:6
    |
 LL |     -let 0 = 0;
    |      ^^^
@@ -691,7 +691,7 @@ LL |     -let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:301:13
+  --> $DIR/disallowed-positions.rs:305:13
    |
 LL |     let _ = let _ = 3;
    |             ^^^
@@ -699,7 +699,7 @@ LL |     let _ = let _ = 3;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:309:6
+  --> $DIR/disallowed-positions.rs:313:6
    |
 LL |     (let 0 = 0)?;
    |      ^^^
@@ -707,7 +707,7 @@ LL |     (let 0 = 0)?;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:312:13
+  --> $DIR/disallowed-positions.rs:316:13
    |
 LL |     true || let 0 = 0;
    |             ^^^
@@ -715,7 +715,7 @@ LL |     true || let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:314:14
+  --> $DIR/disallowed-positions.rs:318:14
    |
 LL |     (true || let 0 = 0);
    |              ^^^
@@ -723,7 +723,7 @@ LL |     (true || let 0 = 0);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:316:22
+  --> $DIR/disallowed-positions.rs:320:22
    |
 LL |     true && (true || let 0 = 0);
    |                      ^^^
@@ -731,7 +731,7 @@ LL |     true && (true || let 0 = 0);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:320:9
+  --> $DIR/disallowed-positions.rs:324:9
    |
 LL |     x = let 0 = 0;
    |         ^^^
@@ -739,7 +739,7 @@ LL |     x = let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:323:12
+  --> $DIR/disallowed-positions.rs:327:12
    |
 LL |     true..(let 0 = 0);
    |            ^^^
@@ -747,7 +747,7 @@ LL |     true..(let 0 = 0);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:325:8
+  --> $DIR/disallowed-positions.rs:329:8
    |
 LL |     ..(let 0 = 0);
    |        ^^^
@@ -755,7 +755,7 @@ LL |     ..(let 0 = 0);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:327:6
+  --> $DIR/disallowed-positions.rs:331:6
    |
 LL |     (let 0 = 0)..;
    |      ^^^
@@ -763,7 +763,7 @@ LL |     (let 0 = 0)..;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:330:6
+  --> $DIR/disallowed-positions.rs:334:6
    |
 LL |     (let Range { start: _, end: _ } = true..true || false);
    |      ^^^
@@ -771,7 +771,7 @@ LL |     (let Range { start: _, end: _ } = true..true || false);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:334:6
+  --> $DIR/disallowed-positions.rs:338:6
    |
 LL |     (let true = let true = true);
    |      ^^^
@@ -779,7 +779,7 @@ LL |     (let true = let true = true);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:334:17
+  --> $DIR/disallowed-positions.rs:338:17
    |
 LL |     (let true = let true = true);
    |                 ^^^
@@ -787,7 +787,7 @@ LL |     (let true = let true = true);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:340:25
+  --> $DIR/disallowed-positions.rs:344:25
    |
 LL |         let x = true && let y = 1;
    |                         ^^^
@@ -795,7 +795,7 @@ LL |         let x = true && let y = 1;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:346:19
+  --> $DIR/disallowed-positions.rs:350:19
    |
 LL |         [1, 2, 3][let _ = ()]
    |                   ^^^
@@ -803,7 +803,7 @@ LL |         [1, 2, 3][let _ = ()]
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:351:6
+  --> $DIR/disallowed-positions.rs:355:6
    |
 LL |     &let 0 = 0
    |      ^^^
@@ -811,7 +811,7 @@ LL |     &let 0 = 0
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:362:17
+  --> $DIR/disallowed-positions.rs:366:17
    |
 LL |         true && let 1 = 1
    |                 ^^^
@@ -819,7 +819,7 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:367:17
+  --> $DIR/disallowed-positions.rs:371:17
    |
 LL |         true && let 1 = 1
    |                 ^^^
@@ -827,7 +827,7 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:372:17
+  --> $DIR/disallowed-positions.rs:376:17
    |
 LL |         true && let 1 = 1
    |                 ^^^
@@ -835,7 +835,7 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:383:17
+  --> $DIR/disallowed-positions.rs:387:17
    |
 LL |         true && let 1 = 1
    |                 ^^^
@@ -843,7 +843,7 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expressions must be enclosed in braces to be used as const generic arguments
-  --> $DIR/disallowed-positions.rs:383:9
+  --> $DIR/disallowed-positions.rs:387:9
    |
 LL |         true && let 1 = 1
    |         ^^^^^^^^^^^^^^^^^
@@ -854,124 +854,124 @@ LL |         { true && let 1 = 1 }
    |         +                   +
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:393:9
+  --> $DIR/disallowed-positions.rs:397:9
    |
 LL |     if (let Some(a) = opt && true) {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:393:9
+  --> $DIR/disallowed-positions.rs:397:9
    |
 LL |     if (let Some(a) = opt && true) {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:397:9
+  --> $DIR/disallowed-positions.rs:401:9
    |
 LL |     if (let Some(a) = opt) && true {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:397:9
+  --> $DIR/disallowed-positions.rs:401:9
    |
 LL |     if (let Some(a) = opt) && true {
    |         ^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:400:9
+  --> $DIR/disallowed-positions.rs:404:9
    |
 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:400:9
+  --> $DIR/disallowed-positions.rs:404:9
    |
 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
    |         ^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:400:32
+  --> $DIR/disallowed-positions.rs:404:32
    |
 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
    |                                ^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:400:32
+  --> $DIR/disallowed-positions.rs:404:32
    |
 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
    |                                ^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:408:9
+  --> $DIR/disallowed-positions.rs:412:9
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:408:9
+  --> $DIR/disallowed-positions.rs:412:9
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:408:31
+  --> $DIR/disallowed-positions.rs:412:31
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
    |                               ^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:408:31
+  --> $DIR/disallowed-positions.rs:412:31
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
    |                               ^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:412:9
+  --> $DIR/disallowed-positions.rs:416:9
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:412:9
+  --> $DIR/disallowed-positions.rs:416:9
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:412:31
+  --> $DIR/disallowed-positions.rs:416:31
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
    |                               ^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:412:31
+  --> $DIR/disallowed-positions.rs:416:31
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
    |                               ^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:416:9
+  --> $DIR/disallowed-positions.rs:420:9
    |
 LL |     if (let Some(a) = opt && (true)) && true {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:416:9
+  --> $DIR/disallowed-positions.rs:420:9
    |
 LL |     if (let Some(a) = opt && (true)) && true {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:436:22
+  --> $DIR/disallowed-positions.rs:440:22
    |
 LL |     let x = (true && let y = 1);
    |                      ^^^
@@ -979,7 +979,7 @@ LL |     let x = (true && let y = 1);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:441:20
+  --> $DIR/disallowed-positions.rs:445:20
    |
 LL |         ([1, 2, 3][let _ = ()])
    |                    ^^^
@@ -995,12 +995,48 @@ LL |     use_expr!((let 0 = 1 && 0 == 0));
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:93:16
+  --> $DIR/disallowed-positions.rs:91:16
+   |
+LL |     use_expr!((let 0 = 1 && 0 == 0));
+   |                ^^^
+   |
+   = note: only supported directly in conditions of `if` and `while` expressions
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: expected expression, found `let` statement
+  --> $DIR/disallowed-positions.rs:91:16
+   |
+LL |     use_expr!((let 0 = 1 && 0 == 0));
+   |                ^^^
+   |
+   = note: only supported directly in conditions of `if` and `while` expressions
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: expected expression, found `let` statement
+  --> $DIR/disallowed-positions.rs:95:16
+   |
+LL |     use_expr!((let 0 = 1));
+   |                ^^^
+   |
+   = note: only supported directly in conditions of `if` and `while` expressions
+
+error: expected expression, found `let` statement
+  --> $DIR/disallowed-positions.rs:95:16
+   |
+LL |     use_expr!((let 0 = 1));
+   |                ^^^
+   |
+   = note: only supported directly in conditions of `if` and `while` expressions
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: expected expression, found `let` statement
+  --> $DIR/disallowed-positions.rs:95:16
    |
 LL |     use_expr!((let 0 = 1));
    |                ^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0658]: `let` expressions in this position are unstable
   --> $DIR/disallowed-positions.rs:49:8
@@ -1043,7 +1079,7 @@ LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: `let` expressions in this position are unstable
-  --> $DIR/disallowed-positions.rs:404:8
+  --> $DIR/disallowed-positions.rs:408:8
    |
 LL |     if let Some(a) = opt && (true && true) {
    |        ^^^^^^^^^^^^^^^^^
@@ -1053,7 +1089,7 @@ LL |     if let Some(a) = opt && (true && true) {
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: `let` expressions in this position are unstable
-  --> $DIR/disallowed-positions.rs:420:28
+  --> $DIR/disallowed-positions.rs:424:28
    |
 LL |     if (true && (true)) && let Some(a) = opt {
    |                            ^^^^^^^^^^^^^^^^^
@@ -1063,7 +1099,7 @@ LL |     if (true && (true)) && let Some(a) = opt {
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: `let` expressions in this position are unstable
-  --> $DIR/disallowed-positions.rs:423:18
+  --> $DIR/disallowed-positions.rs:427:18
    |
 LL |     if (true) && let Some(a) = opt {
    |                  ^^^^^^^^^^^^^^^^^
@@ -1073,7 +1109,7 @@ LL |     if (true) && let Some(a) = opt {
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: `let` expressions in this position are unstable
-  --> $DIR/disallowed-positions.rs:426:16
+  --> $DIR/disallowed-positions.rs:430:16
    |
 LL |     if true && let Some(a) = opt {
    |                ^^^^^^^^^^^^^^^^^
@@ -1083,7 +1119,7 @@ LL |     if true && let Some(a) = opt {
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0658]: `let` expressions in this position are unstable
-  --> $DIR/disallowed-positions.rs:431:8
+  --> $DIR/disallowed-positions.rs:435:8
    |
 LL |     if let true = (true && fun()) && (true) {
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1093,7 +1129,7 @@ LL |     if let true = (true && fun()) && (true) {
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:130:8
+  --> $DIR/disallowed-positions.rs:134:8
    |
 LL |     if true..(let 0 = 0) {}
    |        ^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
@@ -1102,7 +1138,7 @@ LL |     if true..(let 0 = 0) {}
             found struct `std::ops::Range<bool>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:139:12
+  --> $DIR/disallowed-positions.rs:143:12
    |
 LL |     if let Range { start: _, end: _ } = true..true && false {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
@@ -1113,7 +1149,7 @@ LL |     if let Range { start: _, end: _ } = true..true && false {}
             found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:142:12
+  --> $DIR/disallowed-positions.rs:146:12
    |
 LL |     if let Range { start: _, end: _ } = true..true || false {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
@@ -1124,7 +1160,7 @@ LL |     if let Range { start: _, end: _ } = true..true || false {}
             found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:148:12
+  --> $DIR/disallowed-positions.rs:152:12
    |
 LL |     if let Range { start: F, end } = F..|| true {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `fn() -> bool`
@@ -1135,7 +1171,7 @@ LL |     if let Range { start: F, end } = F..|| true {}
                   found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:154:12
+  --> $DIR/disallowed-positions.rs:158:12
    |
 LL |     if let Range { start: true, end } = t..&&false {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `&&bool`
@@ -1146,7 +1182,7 @@ LL |     if let Range { start: true, end } = t..&&false {}
             found struct `std::ops::Range<_>`
 
 error[E0277]: the `?` operator can only be applied to values that implement `Try`
-  --> $DIR/disallowed-positions.rs:110:20
+  --> $DIR/disallowed-positions.rs:114:20
    |
 LL |         if let 0 = 0? {}
    |                    ^^ the `?` operator cannot be applied to type `{integer}`
@@ -1154,7 +1190,7 @@ LL |         if let 0 = 0? {}
    = help: the trait `Try` is not implemented for `{integer}`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:221:11
+  --> $DIR/disallowed-positions.rs:225:11
    |
 LL |     while true..(let 0 = 0) {}
    |           ^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
@@ -1163,7 +1199,7 @@ LL |     while true..(let 0 = 0) {}
             found struct `std::ops::Range<bool>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:230:15
+  --> $DIR/disallowed-positions.rs:234:15
    |
 LL |     while let Range { start: _, end: _ } = true..true && false {}
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
@@ -1174,7 +1210,7 @@ LL |     while let Range { start: _, end: _ } = true..true && false {}
             found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:233:15
+  --> $DIR/disallowed-positions.rs:237:15
    |
 LL |     while let Range { start: _, end: _ } = true..true || false {}
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
@@ -1185,7 +1221,7 @@ LL |     while let Range { start: _, end: _ } = true..true || false {}
             found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:239:15
+  --> $DIR/disallowed-positions.rs:243:15
    |
 LL |     while let Range { start: F, end } = F..|| true {}
    |               ^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `fn() -> bool`
@@ -1196,7 +1232,7 @@ LL |     while let Range { start: F, end } = F..|| true {}
                   found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:245:15
+  --> $DIR/disallowed-positions.rs:249:15
    |
 LL |     while let Range { start: true, end } = t..&&false {}
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `&&bool`
@@ -1207,7 +1243,7 @@ LL |     while let Range { start: true, end } = t..&&false {}
             found struct `std::ops::Range<_>`
 
 error[E0277]: the `?` operator can only be applied to values that implement `Try`
-  --> $DIR/disallowed-positions.rs:201:23
+  --> $DIR/disallowed-positions.rs:205:23
    |
 LL |         while let 0 = 0? {}
    |                       ^^ the `?` operator cannot be applied to type `{integer}`
@@ -1215,7 +1251,7 @@ LL |         while let 0 = 0? {}
    = help: the trait `Try` is not implemented for `{integer}`
 
 error[E0308]: mismatched types
-  --> $DIR/disallowed-positions.rs:330:10
+  --> $DIR/disallowed-positions.rs:334:10
    |
 LL |     (let Range { start: _, end: _ } = true..true || false);
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
@@ -1226,14 +1262,14 @@ LL |     (let Range { start: _, end: _ } = true..true || false);
             found struct `std::ops::Range<_>`
 
 error[E0277]: the `?` operator can only be applied to values that implement `Try`
-  --> $DIR/disallowed-positions.rs:305:17
+  --> $DIR/disallowed-positions.rs:309:17
    |
 LL |         let 0 = 0?;
    |                 ^^ the `?` operator cannot be applied to type `{integer}`
    |
    = help: the trait `Try` is not implemented for `{integer}`
 
-error: aborting due to 130 previous errors
+error: aborting due to 134 previous errors
 
 Some errors have detailed explanations: E0277, E0308, E0658.
 For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.nothing.stderr b/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.nothing.stderr
index 2d5fd1144ad..943956feb4e 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.nothing.stderr
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.nothing.stderr
@@ -233,7 +233,7 @@ LL |     while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:99:9
+  --> $DIR/disallowed-positions.rs:103:9
    |
 LL |     if &let 0 = 0 {}
    |         ^^^^^^^^^
@@ -241,7 +241,7 @@ LL |     if &let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:102:9
+  --> $DIR/disallowed-positions.rs:106:9
    |
 LL |     if !let 0 = 0 {}
    |         ^^^^^^^^^
@@ -249,7 +249,7 @@ LL |     if !let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:104:9
+  --> $DIR/disallowed-positions.rs:108:9
    |
 LL |     if *let 0 = 0 {}
    |         ^^^^^^^^^
@@ -257,7 +257,7 @@ LL |     if *let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:106:9
+  --> $DIR/disallowed-positions.rs:110:9
    |
 LL |     if -let 0 = 0 {}
    |         ^^^^^^^^^
@@ -265,7 +265,7 @@ LL |     if -let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:114:9
+  --> $DIR/disallowed-positions.rs:118:9
    |
 LL |     if (let 0 = 0)? {}
    |         ^^^^^^^^^
@@ -273,20 +273,20 @@ LL |     if (let 0 = 0)? {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:117:16
+  --> $DIR/disallowed-positions.rs:121:16
    |
 LL |     if true || let 0 = 0 {}
    |                ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `||` operators are not supported in let chain expressions
-  --> $DIR/disallowed-positions.rs:117:13
+  --> $DIR/disallowed-positions.rs:121:13
    |
 LL |     if true || let 0 = 0 {}
    |             ^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:119:17
+  --> $DIR/disallowed-positions.rs:123:17
    |
 LL |     if (true || let 0 = 0) {}
    |                 ^^^^^^^^^
@@ -294,7 +294,7 @@ LL |     if (true || let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:121:25
+  --> $DIR/disallowed-positions.rs:125:25
    |
 LL |     if true && (true || let 0 = 0) {}
    |                         ^^^^^^^^^
@@ -302,7 +302,7 @@ LL |     if true && (true || let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:123:25
+  --> $DIR/disallowed-positions.rs:127:25
    |
 LL |     if true || (true && let 0 = 0) {}
    |                         ^^^^^^^^^
@@ -310,7 +310,7 @@ LL |     if true || (true && let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:127:12
+  --> $DIR/disallowed-positions.rs:131:12
    |
 LL |     if x = let 0 = 0 {}
    |            ^^^
@@ -318,7 +318,7 @@ LL |     if x = let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:130:15
+  --> $DIR/disallowed-positions.rs:134:15
    |
 LL |     if true..(let 0 = 0) {}
    |               ^^^^^^^^^
@@ -326,7 +326,7 @@ LL |     if true..(let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:133:11
+  --> $DIR/disallowed-positions.rs:137:11
    |
 LL |     if ..(let 0 = 0) {}
    |           ^^^^^^^^^
@@ -334,7 +334,7 @@ LL |     if ..(let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:135:9
+  --> $DIR/disallowed-positions.rs:139:9
    |
 LL |     if (let 0 = 0).. {}
    |         ^^^^^^^^^
@@ -342,7 +342,7 @@ LL |     if (let 0 = 0).. {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:139:8
+  --> $DIR/disallowed-positions.rs:143:8
    |
 LL |     if let Range { start: _, end: _ } = true..true && false {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -350,7 +350,7 @@ LL |     if let Range { start: _, end: _ } = true..true && false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:142:8
+  --> $DIR/disallowed-positions.rs:146:8
    |
 LL |     if let Range { start: _, end: _ } = true..true || false {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -358,7 +358,7 @@ LL |     if let Range { start: _, end: _ } = true..true || false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:148:8
+  --> $DIR/disallowed-positions.rs:152:8
    |
 LL |     if let Range { start: F, end } = F..|| true {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -366,7 +366,7 @@ LL |     if let Range { start: F, end } = F..|| true {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:154:8
+  --> $DIR/disallowed-positions.rs:158:8
    |
 LL |     if let Range { start: true, end } = t..&&false {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -374,7 +374,7 @@ LL |     if let Range { start: true, end } = t..&&false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:158:19
+  --> $DIR/disallowed-positions.rs:162:19
    |
 LL |     if let true = let true = true {}
    |                   ^^^
@@ -382,7 +382,7 @@ LL |     if let true = let true = true {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:161:15
+  --> $DIR/disallowed-positions.rs:165:15
    |
 LL |     if return let 0 = 0 {}
    |               ^^^
@@ -390,7 +390,7 @@ LL |     if return let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:164:21
+  --> $DIR/disallowed-positions.rs:168:21
    |
 LL |     loop { if break let 0 = 0 {} }
    |                     ^^^
@@ -398,7 +398,7 @@ LL |     loop { if break let 0 = 0 {} }
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:167:15
+  --> $DIR/disallowed-positions.rs:171:15
    |
 LL |     if (match let 0 = 0 { _ => { false } }) {}
    |               ^^^
@@ -406,7 +406,7 @@ LL |     if (match let 0 = 0 { _ => { false } }) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:170:9
+  --> $DIR/disallowed-positions.rs:174:9
    |
 LL |     if (let 0 = 0, false).1 {}
    |         ^^^^^^^^^
@@ -414,7 +414,7 @@ LL |     if (let 0 = 0, false).1 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:173:9
+  --> $DIR/disallowed-positions.rs:177:9
    |
 LL |     if (let 0 = 0,) {}
    |         ^^^^^^^^^
@@ -422,7 +422,7 @@ LL |     if (let 0 = 0,) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:177:13
+  --> $DIR/disallowed-positions.rs:181:13
    |
 LL |         if (let 0 = 0).await {}
    |             ^^^^^^^^^
@@ -430,7 +430,7 @@ LL |         if (let 0 = 0).await {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:181:12
+  --> $DIR/disallowed-positions.rs:185:12
    |
 LL |     if (|| let 0 = 0) {}
    |            ^^^
@@ -438,7 +438,7 @@ LL |     if (|| let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:184:9
+  --> $DIR/disallowed-positions.rs:188:9
    |
 LL |     if (let 0 = 0)() {}
    |         ^^^^^^^^^
@@ -446,7 +446,7 @@ LL |     if (let 0 = 0)() {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:190:12
+  --> $DIR/disallowed-positions.rs:194:12
    |
 LL |     while &let 0 = 0 {}
    |            ^^^^^^^^^
@@ -454,7 +454,7 @@ LL |     while &let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:193:12
+  --> $DIR/disallowed-positions.rs:197:12
    |
 LL |     while !let 0 = 0 {}
    |            ^^^^^^^^^
@@ -462,7 +462,7 @@ LL |     while !let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:195:12
+  --> $DIR/disallowed-positions.rs:199:12
    |
 LL |     while *let 0 = 0 {}
    |            ^^^^^^^^^
@@ -470,7 +470,7 @@ LL |     while *let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:197:12
+  --> $DIR/disallowed-positions.rs:201:12
    |
 LL |     while -let 0 = 0 {}
    |            ^^^^^^^^^
@@ -478,7 +478,7 @@ LL |     while -let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:205:12
+  --> $DIR/disallowed-positions.rs:209:12
    |
 LL |     while (let 0 = 0)? {}
    |            ^^^^^^^^^
@@ -486,20 +486,20 @@ LL |     while (let 0 = 0)? {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:208:19
+  --> $DIR/disallowed-positions.rs:212:19
    |
 LL |     while true || let 0 = 0 {}
    |                   ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `||` operators are not supported in let chain expressions
-  --> $DIR/disallowed-positions.rs:208:16
+  --> $DIR/disallowed-positions.rs:212:16
    |
 LL |     while true || let 0 = 0 {}
    |                ^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:210:20
+  --> $DIR/disallowed-positions.rs:214:20
    |
 LL |     while (true || let 0 = 0) {}
    |                    ^^^^^^^^^
@@ -507,7 +507,7 @@ LL |     while (true || let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:212:28
+  --> $DIR/disallowed-positions.rs:216:28
    |
 LL |     while true && (true || let 0 = 0) {}
    |                            ^^^^^^^^^
@@ -515,7 +515,7 @@ LL |     while true && (true || let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:214:28
+  --> $DIR/disallowed-positions.rs:218:28
    |
 LL |     while true || (true && let 0 = 0) {}
    |                            ^^^^^^^^^
@@ -523,7 +523,7 @@ LL |     while true || (true && let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:218:15
+  --> $DIR/disallowed-positions.rs:222:15
    |
 LL |     while x = let 0 = 0 {}
    |               ^^^
@@ -531,7 +531,7 @@ LL |     while x = let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:221:18
+  --> $DIR/disallowed-positions.rs:225:18
    |
 LL |     while true..(let 0 = 0) {}
    |                  ^^^^^^^^^
@@ -539,7 +539,7 @@ LL |     while true..(let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:224:14
+  --> $DIR/disallowed-positions.rs:228:14
    |
 LL |     while ..(let 0 = 0) {}
    |              ^^^^^^^^^
@@ -547,7 +547,7 @@ LL |     while ..(let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:226:12
+  --> $DIR/disallowed-positions.rs:230:12
    |
 LL |     while (let 0 = 0).. {}
    |            ^^^^^^^^^
@@ -555,7 +555,7 @@ LL |     while (let 0 = 0).. {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:230:11
+  --> $DIR/disallowed-positions.rs:234:11
    |
 LL |     while let Range { start: _, end: _ } = true..true && false {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -563,7 +563,7 @@ LL |     while let Range { start: _, end: _ } = true..true && false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:233:11
+  --> $DIR/disallowed-positions.rs:237:11
    |
 LL |     while let Range { start: _, end: _ } = true..true || false {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -571,7 +571,7 @@ LL |     while let Range { start: _, end: _ } = true..true || false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:239:11
+  --> $DIR/disallowed-positions.rs:243:11
    |
 LL |     while let Range { start: F, end } = F..|| true {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -579,7 +579,7 @@ LL |     while let Range { start: F, end } = F..|| true {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:245:11
+  --> $DIR/disallowed-positions.rs:249:11
    |
 LL |     while let Range { start: true, end } = t..&&false {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -587,7 +587,7 @@ LL |     while let Range { start: true, end } = t..&&false {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:249:22
+  --> $DIR/disallowed-positions.rs:253:22
    |
 LL |     while let true = let true = true {}
    |                      ^^^
@@ -595,7 +595,7 @@ LL |     while let true = let true = true {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:252:18
+  --> $DIR/disallowed-positions.rs:256:18
    |
 LL |     while return let 0 = 0 {}
    |                  ^^^
@@ -603,7 +603,7 @@ LL |     while return let 0 = 0 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:255:39
+  --> $DIR/disallowed-positions.rs:259:39
    |
 LL |     'outer: loop { while break 'outer let 0 = 0 {} }
    |                                       ^^^
@@ -611,7 +611,7 @@ LL |     'outer: loop { while break 'outer let 0 = 0 {} }
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:258:18
+  --> $DIR/disallowed-positions.rs:262:18
    |
 LL |     while (match let 0 = 0 { _ => { false } }) {}
    |                  ^^^
@@ -619,7 +619,7 @@ LL |     while (match let 0 = 0 { _ => { false } }) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:261:12
+  --> $DIR/disallowed-positions.rs:265:12
    |
 LL |     while (let 0 = 0, false).1 {}
    |            ^^^^^^^^^
@@ -627,7 +627,7 @@ LL |     while (let 0 = 0, false).1 {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:264:12
+  --> $DIR/disallowed-positions.rs:268:12
    |
 LL |     while (let 0 = 0,) {}
    |            ^^^^^^^^^
@@ -635,7 +635,7 @@ LL |     while (let 0 = 0,) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:268:16
+  --> $DIR/disallowed-positions.rs:272:16
    |
 LL |         while (let 0 = 0).await {}
    |                ^^^^^^^^^
@@ -643,7 +643,7 @@ LL |         while (let 0 = 0).await {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:272:15
+  --> $DIR/disallowed-positions.rs:276:15
    |
 LL |     while (|| let 0 = 0) {}
    |               ^^^
@@ -651,7 +651,7 @@ LL |     while (|| let 0 = 0) {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:275:12
+  --> $DIR/disallowed-positions.rs:279:12
    |
 LL |     while (let 0 = 0)() {}
    |            ^^^^^^^^^
@@ -659,7 +659,7 @@ LL |     while (let 0 = 0)() {}
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:292:6
+  --> $DIR/disallowed-positions.rs:296:6
    |
 LL |     &let 0 = 0;
    |      ^^^
@@ -667,7 +667,7 @@ LL |     &let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:295:6
+  --> $DIR/disallowed-positions.rs:299:6
    |
 LL |     !let 0 = 0;
    |      ^^^
@@ -675,7 +675,7 @@ LL |     !let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:297:6
+  --> $DIR/disallowed-positions.rs:301:6
    |
 LL |     *let 0 = 0;
    |      ^^^
@@ -683,7 +683,7 @@ LL |     *let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:299:6
+  --> $DIR/disallowed-positions.rs:303:6
    |
 LL |     -let 0 = 0;
    |      ^^^
@@ -691,7 +691,7 @@ LL |     -let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:301:13
+  --> $DIR/disallowed-positions.rs:305:13
    |
 LL |     let _ = let _ = 3;
    |             ^^^
@@ -699,7 +699,7 @@ LL |     let _ = let _ = 3;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:309:6
+  --> $DIR/disallowed-positions.rs:313:6
    |
 LL |     (let 0 = 0)?;
    |      ^^^
@@ -707,7 +707,7 @@ LL |     (let 0 = 0)?;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:312:13
+  --> $DIR/disallowed-positions.rs:316:13
    |
 LL |     true || let 0 = 0;
    |             ^^^
@@ -715,7 +715,7 @@ LL |     true || let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:314:14
+  --> $DIR/disallowed-positions.rs:318:14
    |
 LL |     (true || let 0 = 0);
    |              ^^^
@@ -723,7 +723,7 @@ LL |     (true || let 0 = 0);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:316:22
+  --> $DIR/disallowed-positions.rs:320:22
    |
 LL |     true && (true || let 0 = 0);
    |                      ^^^
@@ -731,7 +731,7 @@ LL |     true && (true || let 0 = 0);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:320:9
+  --> $DIR/disallowed-positions.rs:324:9
    |
 LL |     x = let 0 = 0;
    |         ^^^
@@ -739,7 +739,7 @@ LL |     x = let 0 = 0;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:323:12
+  --> $DIR/disallowed-positions.rs:327:12
    |
 LL |     true..(let 0 = 0);
    |            ^^^
@@ -747,7 +747,7 @@ LL |     true..(let 0 = 0);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:325:8
+  --> $DIR/disallowed-positions.rs:329:8
    |
 LL |     ..(let 0 = 0);
    |        ^^^
@@ -755,7 +755,7 @@ LL |     ..(let 0 = 0);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:327:6
+  --> $DIR/disallowed-positions.rs:331:6
    |
 LL |     (let 0 = 0)..;
    |      ^^^
@@ -763,7 +763,7 @@ LL |     (let 0 = 0)..;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:330:6
+  --> $DIR/disallowed-positions.rs:334:6
    |
 LL |     (let Range { start: _, end: _ } = true..true || false);
    |      ^^^
@@ -771,7 +771,7 @@ LL |     (let Range { start: _, end: _ } = true..true || false);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:334:6
+  --> $DIR/disallowed-positions.rs:338:6
    |
 LL |     (let true = let true = true);
    |      ^^^
@@ -779,7 +779,7 @@ LL |     (let true = let true = true);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:334:17
+  --> $DIR/disallowed-positions.rs:338:17
    |
 LL |     (let true = let true = true);
    |                 ^^^
@@ -787,7 +787,7 @@ LL |     (let true = let true = true);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:340:25
+  --> $DIR/disallowed-positions.rs:344:25
    |
 LL |         let x = true && let y = 1;
    |                         ^^^
@@ -795,7 +795,7 @@ LL |         let x = true && let y = 1;
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:346:19
+  --> $DIR/disallowed-positions.rs:350:19
    |
 LL |         [1, 2, 3][let _ = ()]
    |                   ^^^
@@ -803,7 +803,7 @@ LL |         [1, 2, 3][let _ = ()]
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:351:6
+  --> $DIR/disallowed-positions.rs:355:6
    |
 LL |     &let 0 = 0
    |      ^^^
@@ -811,7 +811,7 @@ LL |     &let 0 = 0
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:362:17
+  --> $DIR/disallowed-positions.rs:366:17
    |
 LL |         true && let 1 = 1
    |                 ^^^
@@ -819,7 +819,7 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:367:17
+  --> $DIR/disallowed-positions.rs:371:17
    |
 LL |         true && let 1 = 1
    |                 ^^^
@@ -827,7 +827,7 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:372:17
+  --> $DIR/disallowed-positions.rs:376:17
    |
 LL |         true && let 1 = 1
    |                 ^^^
@@ -835,7 +835,7 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:383:17
+  --> $DIR/disallowed-positions.rs:387:17
    |
 LL |         true && let 1 = 1
    |                 ^^^
@@ -843,7 +843,7 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expressions must be enclosed in braces to be used as const generic arguments
-  --> $DIR/disallowed-positions.rs:383:9
+  --> $DIR/disallowed-positions.rs:387:9
    |
 LL |         true && let 1 = 1
    |         ^^^^^^^^^^^^^^^^^
@@ -854,124 +854,124 @@ LL |         { true && let 1 = 1 }
    |         +                   +
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:393:9
+  --> $DIR/disallowed-positions.rs:397:9
    |
 LL |     if (let Some(a) = opt && true) {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:393:9
+  --> $DIR/disallowed-positions.rs:397:9
    |
 LL |     if (let Some(a) = opt && true) {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:397:9
+  --> $DIR/disallowed-positions.rs:401:9
    |
 LL |     if (let Some(a) = opt) && true {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:397:9
+  --> $DIR/disallowed-positions.rs:401:9
    |
 LL |     if (let Some(a) = opt) && true {
    |         ^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:400:9
+  --> $DIR/disallowed-positions.rs:404:9
    |
 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:400:9
+  --> $DIR/disallowed-positions.rs:404:9
    |
 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
    |         ^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:400:32
+  --> $DIR/disallowed-positions.rs:404:32
    |
 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
    |                                ^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:400:32
+  --> $DIR/disallowed-positions.rs:404:32
    |
 LL |     if (let Some(a) = opt) && (let Some(b) = a) {
    |                                ^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:408:9
+  --> $DIR/disallowed-positions.rs:412:9
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:408:9
+  --> $DIR/disallowed-positions.rs:412:9
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:408:31
+  --> $DIR/disallowed-positions.rs:412:31
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
    |                               ^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:408:31
+  --> $DIR/disallowed-positions.rs:412:31
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
    |                               ^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:412:9
+  --> $DIR/disallowed-positions.rs:416:9
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:412:9
+  --> $DIR/disallowed-positions.rs:416:9
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:412:31
+  --> $DIR/disallowed-positions.rs:416:31
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
    |                               ^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:412:31
+  --> $DIR/disallowed-positions.rs:416:31
    |
 LL |     if (let Some(a) = opt && (let Some(b) = a)) && true {
    |                               ^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:416:9
+  --> $DIR/disallowed-positions.rs:420:9
    |
 LL |     if (let Some(a) = opt && (true)) && true {
    |         ^^^^^^^^^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/disallowed-positions.rs:416:9
+  --> $DIR/disallowed-positions.rs:420:9
    |
 LL |     if (let Some(a) = opt && (true)) && true {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:436:22
+  --> $DIR/disallowed-positions.rs:440:22
    |
 LL |     let x = (true && let y = 1);
    |                      ^^^
@@ -979,7 +979,7 @@ LL |     let x = (true && let y = 1);
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/disallowed-positions.rs:441:20
+  --> $DIR/disallowed-positions.rs:445:20
    |
 LL |         ([1, 2, 3][let _ = ()])
    |                    ^^^
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.rs
index 8eb8d617d58..99f99c2be72 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.rs
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.rs
@@ -90,8 +90,12 @@ fn _macros() {
     }
     use_expr!((let 0 = 1 && 0 == 0));
     //[feature,no_feature]~^ ERROR expected expression, found `let` statement
+    //[feature,no_feature]~| ERROR expected expression, found `let` statement
+    //[feature,no_feature]~| ERROR expected expression, found `let` statement
     use_expr!((let 0 = 1));
     //[feature,no_feature]~^ ERROR expected expression, found `let` statement
+    //[feature,no_feature]~| ERROR expected expression, found `let` statement
+    //[feature,no_feature]~| ERROR expected expression, found `let` statement
 }
 
 #[cfg(not(nothing))]
diff --git a/tests/ui/rmeta/no_optitimized_mir.rs b/tests/ui/rmeta/no_optitimized_mir.rs
index 708cdfc803f..c8ed00b039b 100644
--- a/tests/ui/rmeta/no_optitimized_mir.rs
+++ b/tests/ui/rmeta/no_optitimized_mir.rs
@@ -10,4 +10,4 @@ fn main() {
     rmeta_meta::missing_optimized_mir();
 }
 
-//~? ERROR missing optimized MIR for an item in the crate `rmeta_meta`
+//~? ERROR missing optimized MIR for `missing_optimized_mir` in the crate `rmeta_meta`
diff --git a/tests/ui/rmeta/no_optitimized_mir.stderr b/tests/ui/rmeta/no_optitimized_mir.stderr
index 92f22d78000..254f100aa7b 100644
--- a/tests/ui/rmeta/no_optitimized_mir.stderr
+++ b/tests/ui/rmeta/no_optitimized_mir.stderr
@@ -1,4 +1,4 @@
-error: missing optimized MIR for an item in the crate `rmeta_meta`
+error: missing optimized MIR for `missing_optimized_mir` in the crate `rmeta_meta`
    |
 note: missing optimized MIR for this item (was the crate `rmeta_meta` compiled with `--emit=metadata`?)
   --> $DIR/auxiliary/rmeta-meta.rs:10:1
diff --git a/tests/ui/rmeta/rmeta_bin.rs b/tests/ui/rmeta/rmeta_bin.rs
index c7d2050cd59..9eb65241faf 100644
--- a/tests/ui/rmeta/rmeta_bin.rs
+++ b/tests/ui/rmeta/rmeta_bin.rs
@@ -2,7 +2,6 @@
 //@ compile-flags: --crate-type=bin
 //@ aux-build:rmeta-meta.rs
 //@ no-prefer-dynamic
-//@ error-pattern: crate `rmeta_meta` required to be available in rlib format, but was not found
 
 // Check that building a bin crate fails if a dependent crate is metadata-only.
 
@@ -12,3 +11,5 @@ use rmeta_meta::Foo;
 fn main() {
     let _ = Foo { field: 42 };
 }
+
+//~? ERROR crate `rmeta_meta` required to be available in rlib format, but was not found in this form
diff --git a/tests/ui/rmeta/rmeta_lib.rs b/tests/ui/rmeta/rmeta_lib.rs
index 1be4ee8de79..d1a2b653ed8 100644
--- a/tests/ui/rmeta/rmeta_lib.rs
+++ b/tests/ui/rmeta/rmeta_lib.rs
@@ -1,7 +1,6 @@
 //@ build-fail
 //@ aux-build:rmeta-meta.rs
 //@ no-prefer-dynamic
-//@ error-pattern: crate `rmeta_meta` required to be available in rlib format, but was not found
 
 // Check that building a non-metadata crate fails if a dependent crate is
 // metadata-only.
@@ -12,3 +11,5 @@ use rmeta_meta::Foo;
 fn main() {
     let _ = Foo { field: 42 };
 }
+
+//~? ERROR crate `rmeta_meta` required to be available in rlib format, but was not found in this form
diff --git a/tests/ui/sanitizer/incompatible.rs b/tests/ui/sanitizer/incompatible.rs
index d000abb26ac..c706a5a2e4e 100644
--- a/tests/ui/sanitizer/incompatible.rs
+++ b/tests/ui/sanitizer/incompatible.rs
@@ -1,7 +1,8 @@
 //@ compile-flags: -Z sanitizer=address -Z sanitizer=memory --target x86_64-unknown-linux-gnu
 //@ needs-llvm-components: x86
-//@ error-pattern: error: `-Zsanitizer=address` is incompatible with `-Zsanitizer=memory`
 
 #![feature(no_core)]
 #![no_core]
 #![no_main]
+
+//~? ERROR `-Zsanitizer=address` is incompatible with `-Zsanitizer=memory`
diff --git a/tests/ui/sanitizer/unsupported-target.rs b/tests/ui/sanitizer/unsupported-target.rs
index 7c7dc24b5d9..14925548e92 100644
--- a/tests/ui/sanitizer/unsupported-target.rs
+++ b/tests/ui/sanitizer/unsupported-target.rs
@@ -1,6 +1,8 @@
 //@ compile-flags: -Z sanitizer=leak --target i686-unknown-linux-gnu
 //@ needs-llvm-components: x86
-//@ error-pattern: error: leak sanitizer is not supported for this target
+
 #![feature(no_core)]
 #![no_core]
 #![no_main]
+
+//~? ERROR leak sanitizer is not supported for this target
diff --git a/tests/ui/self/dyn-dispatch-do-not-mix-normalized-and-unnormalized.rs b/tests/ui/self/dyn-dispatch-do-not-mix-normalized-and-unnormalized.rs
new file mode 100644
index 00000000000..2bc70de2a34
--- /dev/null
+++ b/tests/ui/self/dyn-dispatch-do-not-mix-normalized-and-unnormalized.rs
@@ -0,0 +1,26 @@
+//@ check-pass
+
+// Regression test for <https://github.com/rust-lang/rust/issues/138937>.
+
+// Previously, we'd take the normalized param env's clauses which included
+// `<PF as TraitC>::Value = i32`, which comes from the supertraits of `TraitD`
+// after normalizing `<PF as TraitC>::Value = <PF as TraitD>::Scalar`. Since
+// `normalize_param_env_or_error` ends up re-elaborating `PF: TraitD`, we'd
+// end up with both versions of this predicate (normalized and unnormalized).
+// Since these projections preds are not equal, we'd fail with ambiguity.
+
+trait TraitB<T> {}
+
+trait TraitC: TraitB<Self::Value> {
+    type Value;
+}
+
+trait TraitD: TraitC<Value = Self::Scalar> {
+    type Scalar;
+}
+
+trait TraitE {
+    fn apply<PF: TraitD<Scalar = i32>>(&self);
+}
+
+fn main() {}
diff --git a/tests/ui/simd/empty-simd-vector-in-operand.rs b/tests/ui/simd/empty-simd-vector-in-operand.rs
new file mode 100644
index 00000000000..2a2a6c0737d
--- /dev/null
+++ b/tests/ui/simd/empty-simd-vector-in-operand.rs
@@ -0,0 +1,15 @@
+// Regression test for issue #134224.
+//@ only-x86_64
+
+#![feature(repr_simd)]
+
+#[repr(simd)]
+struct A();
+//~^ ERROR SIMD vector cannot be empty
+
+fn main() {
+    unsafe {
+        std::arch::asm!("{}", in(xmm_reg) A());
+        //~^ use of empty SIMD vector `A`
+    }
+}
diff --git a/tests/ui/simd/empty-simd-vector-in-operand.stderr b/tests/ui/simd/empty-simd-vector-in-operand.stderr
new file mode 100644
index 00000000000..7210dddd461
--- /dev/null
+++ b/tests/ui/simd/empty-simd-vector-in-operand.stderr
@@ -0,0 +1,15 @@
+error[E0075]: SIMD vector cannot be empty
+  --> $DIR/empty-simd-vector-in-operand.rs:7:1
+   |
+LL | struct A();
+   | ^^^^^^^^
+
+error: use of empty SIMD vector `A`
+  --> $DIR/empty-simd-vector-in-operand.rs:12:43
+   |
+LL |         std::arch::asm!("{}", in(xmm_reg) A());
+   |                                           ^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0075`.
diff --git a/tests/ui/simd/monomorphize-too-long.rs b/tests/ui/simd/monomorphize-too-long.rs
index 4bcde782292..4fac987b0b5 100644
--- a/tests/ui/simd/monomorphize-too-long.rs
+++ b/tests/ui/simd/monomorphize-too-long.rs
@@ -1,5 +1,4 @@
 //@ build-fail
-//@ error-pattern: monomorphising SIMD type `Simd<u16, 54321>` of length greater than 32768
 
 #![feature(repr_simd)]
 
@@ -9,3 +8,5 @@ struct Simd<T, const N: usize>([T; N]);
 fn main() {
     let _too_big = Simd([1_u16; 54321]);
 }
+
+//~? ERROR monomorphising SIMD type `Simd<u16, 54321>` of length greater than 32768
diff --git a/tests/ui/simd/monomorphize-zero-length.rs b/tests/ui/simd/monomorphize-zero-length.rs
index 44b4cfc0bcf..d38870c572d 100644
--- a/tests/ui/simd/monomorphize-zero-length.rs
+++ b/tests/ui/simd/monomorphize-zero-length.rs
@@ -1,5 +1,4 @@
 //@ build-fail
-//@ error-pattern: monomorphising SIMD type `Simd<f64, 0>` of zero length
 
 #![feature(repr_simd)]
 
@@ -9,3 +8,5 @@ struct Simd<T, const N: usize>([T; N]);
 fn main() {
     let _empty = Simd([1.0; 0]);
 }
+
+//~? ERROR monomorphising SIMD type `Simd<f64, 0>` of zero length
diff --git a/tests/ui/simd/type-generic-monomorphisation-empty.rs b/tests/ui/simd/type-generic-monomorphisation-empty.rs
index 4700f642065..c08dc9fe3df 100644
--- a/tests/ui/simd/type-generic-monomorphisation-empty.rs
+++ b/tests/ui/simd/type-generic-monomorphisation-empty.rs
@@ -2,11 +2,11 @@
 
 #![feature(repr_simd, intrinsics)]
 
-//@ error-pattern:monomorphising SIMD type `Simd<0>` of zero length
-
 #[repr(simd)]
 struct Simd<const N: usize>([f32; N]);
 
 fn main() {
     let _ = Simd::<0>([]);
 }
+
+//~? ERROR monomorphising SIMD type `Simd<0>` of zero length
diff --git a/tests/ui/simd/type-generic-monomorphisation-non-primitive.rs b/tests/ui/simd/type-generic-monomorphisation-non-primitive.rs
index a2f6998c6d9..7924aeb8684 100644
--- a/tests/ui/simd/type-generic-monomorphisation-non-primitive.rs
+++ b/tests/ui/simd/type-generic-monomorphisation-non-primitive.rs
@@ -4,11 +4,11 @@
 
 struct E;
 
-//@ error-pattern:monomorphising SIMD type `S<E>` with a non-primitive-scalar (integer/float/pointer) element type `E`
-
 #[repr(simd)]
 struct S<T>([T; 4]);
 
 fn main() {
     let _v: Option<S<E>> = None;
 }
+
+//~? ERROR monomorphising SIMD type `S<E>` with a non-primitive-scalar (integer/float/pointer) element type `E`
diff --git a/tests/ui/simd/type-generic-monomorphisation-oversized.rs b/tests/ui/simd/type-generic-monomorphisation-oversized.rs
index 9949f913c44..efe3480317c 100644
--- a/tests/ui/simd/type-generic-monomorphisation-oversized.rs
+++ b/tests/ui/simd/type-generic-monomorphisation-oversized.rs
@@ -2,11 +2,11 @@
 
 #![feature(repr_simd, intrinsics)]
 
-//@ error-pattern:monomorphising SIMD type `Simd<65536>` of length greater than 32768
-
 #[repr(simd)]
 struct Simd<const N: usize>([f32; N]);
 
 fn main() {
     let _ = Simd::<65536>([0.; 65536]);
 }
+
+//~? ERROR monomorphising SIMD type `Simd<65536>` of length greater than 32768
diff --git a/tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs b/tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs
index 18fc0753430..97640514dee 100644
--- a/tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs
+++ b/tests/ui/simd/type-generic-monomorphisation-wide-ptr.rs
@@ -2,11 +2,11 @@
 
 #![feature(repr_simd)]
 
-//@ error-pattern:monomorphising SIMD type `S<*mut [u8]>` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]`
-
 #[repr(simd)]
 struct S<T>([T; 4]);
 
 fn main() {
     let _v: Option<S<*mut [u8]>> = None;
 }
+
+//~? ERROR monomorphising SIMD type `S<*mut [u8]>` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]`
diff --git a/tests/ui/simd/type-generic-monomorphisation.rs b/tests/ui/simd/type-generic-monomorphisation.rs
index 8b8d645a264..2563b917e34 100644
--- a/tests/ui/simd/type-generic-monomorphisation.rs
+++ b/tests/ui/simd/type-generic-monomorphisation.rs
@@ -2,9 +2,6 @@
 
 #![feature(repr_simd, intrinsics)]
 
-
-//@ error-pattern:monomorphising SIMD type `Simd2<X>` with a non-primitive-scalar (integer/float/pointer) element type `X`
-
 struct X(Vec<i32>);
 #[repr(simd)]
 struct Simd2<T>([T; 2]);
@@ -12,3 +9,5 @@ struct Simd2<T>([T; 2]);
 fn main() {
     let _ = Simd2([X(vec![]), X(vec![])]);
 }
+
+//~? ERROR monomorphising SIMD type `Simd2<X>` with a non-primitive-scalar (integer/float/pointer) element type `X`
diff --git a/tests/ui/simd/type-wide-ptr.rs b/tests/ui/simd/type-wide-ptr.rs
index 41d9fac26ad..5740a4e8318 100644
--- a/tests/ui/simd/type-wide-ptr.rs
+++ b/tests/ui/simd/type-wide-ptr.rs
@@ -2,11 +2,11 @@
 
 #![feature(repr_simd)]
 
-//@ error-pattern:monomorphising SIMD type `S` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]`
-
 #[repr(simd)]
 struct S([*mut [u8]; 4]);
 
 fn main() {
     let _v: Option<S> = None;
 }
+
+//~? ERROR monomorphising SIMD type `S` with a non-primitive-scalar (integer/float/pointer) element type `*mut [u8]`
diff --git a/tests/ui/stats/input-stats.stderr b/tests/ui/stats/input-stats.stderr
index 191daff2137..24e38948647 100644
--- a/tests/ui/stats/input-stats.stderr
+++ b/tests/ui/stats/input-stats.stderr
@@ -10,9 +10,9 @@ 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 Local                     80 ( 1.2%)             1            80
-ast-stats-1 ForeignItem               88 ( 1.3%)             1            88
-ast-stats-1 - Fn                        88 ( 1.3%)             1
 ast-stats-1 Arm                       96 ( 1.4%)             2            48
 ast-stats-1 FnDecl                   120 ( 1.8%)             5            24
 ast-stats-1 Param                    160 ( 2.4%)             4            40
@@ -23,37 +23,37 @@ ast-stats-1 - Expr                      96 ( 1.4%)             3
 ast-stats-1 Block                    192 ( 2.9%)             6            32
 ast-stats-1 FieldDef                 208 ( 3.1%)             2           104
 ast-stats-1 Variant                  208 ( 3.1%)             2           104
-ast-stats-1 AssocItem                352 ( 5.3%)             4            88
-ast-stats-1 - Fn                       176 ( 2.6%)             2
-ast-stats-1 - Type                     176 ( 2.6%)             2
-ast-stats-1 GenericBound             352 ( 5.3%)             4            88
-ast-stats-1 - Trait                    352 ( 5.3%)             4
-ast-stats-1 GenericParam             480 ( 7.2%)             5            96
+ast-stats-1 AssocItem                320 ( 4.8%)             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.4%)             5
+ast-stats-1 - Ident                    360 ( 5.3%)             5
 ast-stats-1 Expr                     576 ( 8.6%)             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.1%)            31            24
-ast-stats-1 Ty                       896 (13.4%)            14            64
+ast-stats-1 PathSegment              744 (11.0%)            31            24
+ast-stats-1 Ty                       896 (13.3%)            14            64
 ast-stats-1 - Ptr                       64 ( 1.0%)             1
 ast-stats-1 - Ref                       64 ( 1.0%)             1
 ast-stats-1 - ImplicitSelf             128 ( 1.9%)             2
 ast-stats-1 - Path                     640 ( 9.5%)            10
-ast-stats-1 Item                   1_224 (18.3%)             9           136
-ast-stats-1 - Enum                     136 ( 2.0%)             1
-ast-stats-1 - ForeignMod               136 ( 2.0%)             1
-ast-stats-1 - Impl                     136 ( 2.0%)             1
-ast-stats-1 - Trait                    136 ( 2.0%)             1
-ast-stats-1 - Fn                       272 ( 4.1%)             2
-ast-stats-1 - Use                      408 ( 6.1%)             3
+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_704                   116
+ast-stats-1 Total                  6_736                   116
 ast-stats-1
 ast-stats-2 POST EXPANSION AST STATS
 ast-stats-2 Name                Accumulated Size         Count     Item Size
@@ -61,12 +61,12 @@ 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.7%)             1            48
+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 Local                     80 ( 1.1%)             1            80
-ast-stats-2 ForeignItem               88 ( 1.2%)             1            88
-ast-stats-2 - Fn                        88 ( 1.2%)             1
 ast-stats-2 Arm                       96 ( 1.3%)             2            48
 ast-stats-2 FnDecl                   120 ( 1.6%)             5            24
 ast-stats-2 InlineAsm                120 ( 1.6%)             1           120
@@ -81,13 +81,13 @@ 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                352 ( 4.8%)             4            88
-ast-stats-2 - Fn                       176 ( 2.4%)             2
-ast-stats-2 - Type                     176 ( 2.4%)             2
+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.8%)             4            88
 ast-stats-2 - Trait                    352 ( 4.8%)             4
 ast-stats-2 GenericParam             480 ( 6.5%)             5            96
-ast-stats-2 Pat                      504 ( 6.9%)             7            72
+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
@@ -96,24 +96,24 @@ 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 ( 2.0%)             2
+ast-stats-2 - Lit                      144 ( 1.9%)             2
 ast-stats-2 - Block                    216 ( 2.9%)             3
-ast-stats-2 PathSegment              864 (11.8%)            36            24
-ast-stats-2 Ty                       896 (12.2%)            14            64
+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.7%)            10
-ast-stats-2 Item                   1_496 (20.3%)            11           136
-ast-stats-2 - Enum                     136 ( 1.8%)             1
-ast-stats-2 - ExternCrate              136 ( 1.8%)             1
-ast-stats-2 - ForeignMod               136 ( 1.8%)             1
-ast-stats-2 - Impl                     136 ( 1.8%)             1
-ast-stats-2 - Trait                    136 ( 1.8%)             1
-ast-stats-2 - Fn                       272 ( 3.7%)             2
-ast-stats-2 - Use                      544 ( 7.4%)             4
+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_352                   127
+ast-stats-2 Total                  7_400                   127
 ast-stats-2
 hir-stats HIR STATS
 hir-stats Name                Accumulated Size         Count     Item Size
diff --git a/tests/ui/tail-typeck.rs b/tests/ui/tail-typeck.rs
index feef58a3388..1deb43c9496 100644
--- a/tests/ui/tail-typeck.rs
+++ b/tests/ui/tail-typeck.rs
@@ -1,6 +1,4 @@
-//@ error-pattern: mismatched types
-
-fn f() -> isize { return g(); }
+fn f() -> isize { return g(); } //~ ERROR mismatched types
 
 fn g() -> usize { return 0; }
 
diff --git a/tests/ui/tail-typeck.stderr b/tests/ui/tail-typeck.stderr
index 0e470a7b405..3cfbfa0fb56 100644
--- a/tests/ui/tail-typeck.stderr
+++ b/tests/ui/tail-typeck.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/tail-typeck.rs:3:26
+  --> $DIR/tail-typeck.rs:1:26
    |
 LL | fn f() -> isize { return g(); }
    |           -----          ^^^ expected `isize`, found `usize`
diff --git a/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable-implied.rs b/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable-implied.rs
index 81f138b175f..12e7e3bc45b 100644
--- a/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable-implied.rs
+++ b/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable-implied.rs
@@ -5,9 +5,11 @@
 //@ compile-flags: -Ctarget-feature=-sse
 // For now this is just a warning.
 //@ build-pass
-//@error-pattern: must be enabled to ensure that the ABI
+
 #![feature(no_core, lang_items)]
 #![no_core]
 
 #[lang = "sized"]
 pub trait Sized {}
+
+//~? WARN target feature `sse2` must be enabled to ensure that the ABI of the current target can be implemented correctly
diff --git a/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable-neon.rs b/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable-neon.rs
index 7242bcc85bf..33e4f12694f 100644
--- a/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable-neon.rs
+++ b/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable-neon.rs
@@ -3,9 +3,11 @@
 //@ compile-flags: -Ctarget-feature=-neon
 // For now this is just a warning.
 //@ build-pass
-//@error-pattern: must be enabled to ensure that the ABI
+
 #![feature(no_core, lang_items)]
 #![no_core]
 
 #[lang = "sized"]
 pub trait Sized {}
+
+//~? WARN target feature `neon` must be enabled to ensure that the ABI of the current target can be implemented correctly
diff --git a/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable.rs b/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable.rs
index 7eebcf05dc0..e1bd25ffad1 100644
--- a/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable.rs
+++ b/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable.rs
@@ -4,9 +4,12 @@
 //@ compile-flags: -Ctarget-feature=-x87
 // For now this is just a warning.
 //@ build-pass
-//@error-pattern: must be enabled to ensure that the ABI
+
 #![feature(no_core, lang_items)]
 #![no_core]
 
 #[lang = "sized"]
 pub trait Sized {}
+
+//~? WARN target feature `x87` must be enabled to ensure that the ABI of the current target can be implemented correctly
+//~? WARN unstable feature specified for `-Ctarget-feature`: `x87`
diff --git a/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag.rs b/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag.rs
index f277a309cd6..4ccc6e0e941 100644
--- a/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag.rs
+++ b/tests/ui/target-feature/forbidden-hardfloat-target-feature-flag.rs
@@ -4,9 +4,12 @@
 //@ compile-flags: -Ctarget-feature=+soft-float
 // For now this is just a warning.
 //@ build-pass
-//@error-pattern: must be disabled to ensure that the ABI
+
 #![feature(no_core, lang_items, riscv_target_feature)]
 #![no_core]
 
 #[lang = "sized"]
 pub trait Sized {}
+
+//~? WARN target feature `soft-float` must be disabled to ensure that the ABI of the current target can be implemented correctl
+//~? WARN unstable feature specified for `-Ctarget-feature`: `soft-float`
diff --git a/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs b/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs
index cf85c521228..fda0b1c08cb 100644
--- a/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs
+++ b/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs
@@ -10,3 +10,5 @@
 
 #[lang = "sized"]
 pub trait Sized {}
+
+//~? WARN target feature `forced-atomics` cannot be disabled with `-Ctarget-feature`: unsound because it changes the ABI of atomic operations
diff --git a/tests/ui/target-feature/forbidden-target-feature-flag.rs b/tests/ui/target-feature/forbidden-target-feature-flag.rs
index 245841eb039..a04d7e34753 100644
--- a/tests/ui/target-feature/forbidden-target-feature-flag.rs
+++ b/tests/ui/target-feature/forbidden-target-feature-flag.rs
@@ -4,9 +4,11 @@
 //@ compile-flags: -Ctarget-feature=+forced-atomics
 // For now this is just a warning.
 //@ build-pass
-//@error-pattern: unsound because it changes the ABI
+
 #![feature(no_core, lang_items)]
 #![no_core]
 
 #[lang = "sized"]
 pub trait Sized {}
+
+//~? WARN target feature `forced-atomics` cannot be enabled with `-Ctarget-feature`: unsound because it changes the ABI of atomic operations
diff --git a/tests/ui/target-feature/target-cpu-lacks-required-target-feature.rs b/tests/ui/target-feature/target-cpu-lacks-required-target-feature.rs
index 28d026c1a9a..be6cd2b6faf 100644
--- a/tests/ui/target-feature/target-cpu-lacks-required-target-feature.rs
+++ b/tests/ui/target-feature/target-cpu-lacks-required-target-feature.rs
@@ -3,10 +3,11 @@
 //@ compile-flags: -Ctarget-cpu=pentium
 // For now this is just a warning.
 //@ build-pass
-//@error-pattern: must be enabled
 
 #![feature(no_core, lang_items)]
 #![no_core]
 
 #[lang = "sized"]
 pub trait Sized {}
+
+//~? WARN target feature `sse2` must be enabled to ensure that the ABI of the current target can be implemented correctly
diff --git a/tests/ui/target-feature/tied-features-no-implication.pacg.stderr b/tests/ui/target-feature/tied-features-no-implication.pacg.stderr
index 0e31dea24ea..4ff42d31e94 100644
--- a/tests/ui/target-feature/tied-features-no-implication.pacg.stderr
+++ b/tests/ui/target-feature/tied-features-no-implication.pacg.stderr
@@ -1,10 +1,10 @@
 error[E0428]: the name `foo` is defined multiple times
-  --> $DIR/tied-features-no-implication.rs:28:1
+  --> $DIR/tied-features-no-implication.rs:27:1
    |
 LL | fn foo() {}
    | -------- previous definition of the value `foo` here
 ...
-LL | pub unsafe fn foo() {
+LL | pub unsafe fn foo() {}
    | ^^^^^^^^^^^^^^^^^^^ `foo` redefined here
    |
    = note: `foo` must be defined only once in the value namespace of this module
diff --git a/tests/ui/target-feature/tied-features-no-implication.rs b/tests/ui/target-feature/tied-features-no-implication.rs
index 157b50bb0d3..1625f71431a 100644
--- a/tests/ui/target-feature/tied-features-no-implication.rs
+++ b/tests/ui/target-feature/tied-features-no-implication.rs
@@ -2,9 +2,8 @@
 //@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
 //@ needs-llvm-components: aarch64
 //@[paca] compile-flags: -Ctarget-feature=+paca
-//@[paca] error-pattern: the target features paca, pacg must all be either enabled or disabled together
 //@[pacg] compile-flags: -Ctarget-feature=+pacg
-//@[pacg] error-pattern: the name `foo` is defined multiple times
+
 #![feature(no_core, lang_items)]
 #![no_core]
 
@@ -25,5 +24,6 @@ fn foo() {}
 // be).
 
 #[cfg(target_feature = "pacg")]
-pub unsafe fn foo() {
-}
+pub unsafe fn foo() {} //[pacg]~ ERROR the name `foo` is defined multiple times
+
+//[paca]~? ERROR the target features paca, pacg must all be either enabled or disabled together
diff --git a/tests/ui/test-attrs/test-panic-abort-disabled.rs b/tests/ui/test-attrs/test-panic-abort-disabled.rs
index e83be65f925..cb1b2af9e26 100644
--- a/tests/ui/test-attrs/test-panic-abort-disabled.rs
+++ b/tests/ui/test-attrs/test-panic-abort-disabled.rs
@@ -1,4 +1,3 @@
-//@ error-pattern:building tests with panic=abort is not supported
 //@ no-prefer-dynamic
 //@ compile-flags: --test -Cpanic=abort -Zpanic-abort-tests=no
 //@ run-flags: --test-threads=1
@@ -18,3 +17,5 @@ fn it_works() {
 fn it_panics() {
     assert_eq!(1 + 1, 4);
 }
+
+//~? ERROR building tests with panic=abort is not supported without `-Zpanic_abort_tests`
diff --git a/tests/ui/track-diagnostics/track.rs b/tests/ui/track-diagnostics/track.rs
index 9e81cb53fc1..78ff85489be 100644
--- a/tests/ui/track-diagnostics/track.rs
+++ b/tests/ui/track-diagnostics/track.rs
@@ -15,4 +15,7 @@
 
 fn main() {
     break rust
+    //~^ ERROR cannot find value `rust` in this scope
+    //~| ERROR `break` outside of a loop or labeled block
+    //~| ERROR It looks like you're trying to break rust; would you like some ICE?
 }
diff --git a/tests/ui/track-diagnostics/track2.rs b/tests/ui/track-diagnostics/track2.rs
index 5805fd21220..f51a42cf86f 100644
--- a/tests/ui/track-diagnostics/track2.rs
+++ b/tests/ui/track-diagnostics/track2.rs
@@ -6,5 +6,5 @@
 //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
 
 fn main() {
-    let _moved @ _from = String::from("foo");
+    let _moved @ _from = String::from("foo"); //~ ERROR use of moved value
 }
diff --git a/tests/ui/track-diagnostics/track3.rs b/tests/ui/track-diagnostics/track3.rs
index bac1fc7e184..428067572af 100644
--- a/tests/ui/track-diagnostics/track3.rs
+++ b/tests/ui/track-diagnostics/track3.rs
@@ -7,4 +7,6 @@
 
 fn main() {
     let _unimported = Blah { field: u8 };
+    //~^ ERROR cannot find struct, variant or union type `Blah` in this scope
+    //~| ERROR expected value, found builtin type `u8`
 }
diff --git a/tests/ui/track-diagnostics/track4.rs b/tests/ui/track-diagnostics/track4.rs
index ec9e3efa481..b6edfdba259 100644
--- a/tests/ui/track-diagnostics/track4.rs
+++ b/tests/ui/track-diagnostics/track4.rs
@@ -5,7 +5,7 @@
 // updating everytime someone adds or removes a line.
 //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
 
-pub onion {
+pub onion { //~ ERROR missing `enum` for enum definition
     Owo(u8),
     Uwu(i8),
 }
diff --git a/tests/ui/track-diagnostics/track5.rs b/tests/ui/track-diagnostics/track5.rs
index e72e3482ad3..800bb21b2b1 100644
--- a/tests/ui/track-diagnostics/track5.rs
+++ b/tests/ui/track-diagnostics/track5.rs
@@ -5,4 +5,4 @@
 // updating everytime someone adds or removes a line.
 //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
 
-}
+} //~ ERROR unexpected closing delimiter: `}`
diff --git a/tests/ui/track-diagnostics/track6.rs b/tests/ui/track-diagnostics/track6.rs
index e4d124a22e4..55db2ecf939 100644
--- a/tests/ui/track-diagnostics/track6.rs
+++ b/tests/ui/track-diagnostics/track6.rs
@@ -11,7 +11,7 @@ pub trait Foo {
 }
 
 impl <T> Foo for T {
-    default fn bar() {}
+    default fn bar() {} //~ ERROR specialization is unstable
 }
 
 fn main() {}
diff --git a/tests/ui/traits/default_auto_traits/backward-compatible-lazy-bounds-pass.rs b/tests/ui/traits/default_auto_traits/backward-compatible-lazy-bounds-pass.rs
new file mode 100644
index 00000000000..3818456d3a6
--- /dev/null
+++ b/tests/ui/traits/default_auto_traits/backward-compatible-lazy-bounds-pass.rs
@@ -0,0 +1,25 @@
+//@ check-pass
+//@ compile-flags: -Zexperimental-default-bounds
+
+#![feature(auto_traits, lang_items, no_core, rustc_attrs, trait_alias)]
+#![no_std]
+#![no_core]
+
+#[lang = "sized"]
+trait Sized {}
+
+#[lang = "default_trait1"]
+auto trait DefaultTrait1 {}
+
+#[lang = "default_trait2"]
+auto trait DefaultTrait2 {}
+
+trait Trait<Rhs: ?Sized = Self> {}
+trait Trait1 : Trait {}
+
+trait Trait2 {
+    type Type;
+}
+trait Trait3<T> = Trait2<Type = T>;
+
+fn main() {}
diff --git a/tests/ui/traits/default_auto_traits/default-bounds.rs b/tests/ui/traits/default_auto_traits/default-bounds.rs
new file mode 100644
index 00000000000..64733a40034
--- /dev/null
+++ b/tests/ui/traits/default_auto_traits/default-bounds.rs
@@ -0,0 +1,41 @@
+//@ compile-flags: -Zexperimental-default-bounds
+
+#![feature(
+    auto_traits,
+    lang_items,
+    negative_impls,
+    no_core,
+    rustc_attrs
+)]
+#![allow(incomplete_features)]
+#![no_std]
+#![no_core]
+
+#[lang = "sized"]
+trait Sized {}
+
+#[lang = "copy"]
+pub trait Copy {}
+
+#[lang = "default_trait1"]
+auto trait Leak {}
+
+#[lang = "default_trait2"]
+auto trait SyncDrop {}
+
+struct Forbidden;
+
+impl !Leak for Forbidden {}
+impl !SyncDrop for Forbidden {}
+
+struct Accepted;
+
+fn bar<T: Leak>(_: T) {}
+
+fn main() {
+    // checking that bounds can be added explicitly
+    bar(Forbidden);
+    //~^ ERROR the trait bound `Forbidden: Leak` is not satisfied
+    //~| ERROR the trait bound `Forbidden: SyncDrop` is not satisfied
+    bar(Accepted);
+}
diff --git a/tests/ui/traits/default_auto_traits/default-bounds.stderr b/tests/ui/traits/default_auto_traits/default-bounds.stderr
new file mode 100644
index 00000000000..10fdcc43417
--- /dev/null
+++ b/tests/ui/traits/default_auto_traits/default-bounds.stderr
@@ -0,0 +1,31 @@
+error[E0277]: the trait bound `Forbidden: SyncDrop` is not satisfied
+  --> $DIR/default-bounds.rs:37:9
+   |
+LL |     bar(Forbidden);
+   |     --- ^^^^^^^^^ the trait `SyncDrop` is not implemented for `Forbidden`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `bar`
+  --> $DIR/default-bounds.rs:33:8
+   |
+LL | fn bar<T: Leak>(_: T) {}
+   |        ^ required by this bound in `bar`
+
+error[E0277]: the trait bound `Forbidden: Leak` is not satisfied
+  --> $DIR/default-bounds.rs:37:9
+   |
+LL |     bar(Forbidden);
+   |     --- ^^^^^^^^^ the trait `Leak` is not implemented for `Forbidden`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `bar`
+  --> $DIR/default-bounds.rs:33:11
+   |
+LL | fn bar<T: Leak>(_: T) {}
+   |           ^^^^ required by this bound in `bar`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/default_auto_traits/extern-types.current.stderr b/tests/ui/traits/default_auto_traits/extern-types.current.stderr
new file mode 100644
index 00000000000..e1bd99b900f
--- /dev/null
+++ b/tests/ui/traits/default_auto_traits/extern-types.current.stderr
@@ -0,0 +1,17 @@
+error[E0277]: the trait bound `extern_non_leak::Opaque: Leak` is not satisfied
+  --> $DIR/extern-types.rs:44:13
+   |
+LL |         foo(x);
+   |         --- ^ the trait `Leak` is not implemented for `extern_non_leak::Opaque`
+   |         |
+   |         required by a bound introduced by this call
+   |
+note: required by a bound in `foo`
+  --> $DIR/extern-types.rs:20:8
+   |
+LL | fn foo<T: ?Sized>(_: &T) {}
+   |        ^ required by this bound in `foo`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/default_auto_traits/extern-types.next.stderr b/tests/ui/traits/default_auto_traits/extern-types.next.stderr
new file mode 100644
index 00000000000..e1bd99b900f
--- /dev/null
+++ b/tests/ui/traits/default_auto_traits/extern-types.next.stderr
@@ -0,0 +1,17 @@
+error[E0277]: the trait bound `extern_non_leak::Opaque: Leak` is not satisfied
+  --> $DIR/extern-types.rs:44:13
+   |
+LL |         foo(x);
+   |         --- ^ the trait `Leak` is not implemented for `extern_non_leak::Opaque`
+   |         |
+   |         required by a bound introduced by this call
+   |
+note: required by a bound in `foo`
+  --> $DIR/extern-types.rs:20:8
+   |
+LL | fn foo<T: ?Sized>(_: &T) {}
+   |        ^ required by this bound in `foo`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/default_auto_traits/extern-types.rs b/tests/ui/traits/default_auto_traits/extern-types.rs
new file mode 100644
index 00000000000..822d4c0637f
--- /dev/null
+++ b/tests/ui/traits/default_auto_traits/extern-types.rs
@@ -0,0 +1,49 @@
+//@  compile-flags:  -Zexperimental-default-bounds
+//@ revisions: current next
+//@ [next] compile-flags: -Znext-solver
+
+#![feature(auto_traits, extern_types, lang_items, negative_impls, no_core, rustc_attrs)]
+#![allow(incomplete_features)]
+#![no_std]
+#![no_core]
+
+#[lang = "sized"]
+trait Sized {}
+
+#[lang = "copy"]
+pub trait Copy {}
+
+#[lang = "default_trait1"]
+auto trait Leak {}
+
+// implicit T: Leak here
+fn foo<T: ?Sized>(_: &T) {}
+
+mod extern_leak {
+    use crate::*;
+
+    extern "C" {
+        type Opaque;
+    }
+
+    fn forward_extern_ty(x: &Opaque) {
+        // ok, extern type leak by default
+        crate::foo(x);
+    }
+}
+
+mod extern_non_leak {
+    use crate::*;
+
+    extern "C" {
+        type Opaque;
+    }
+
+    impl !Leak for Opaque {}
+    fn forward_extern_ty(x: &Opaque) {
+        foo(x);
+        //~^ ERROR: the trait bound `extern_non_leak::Opaque: Leak` is not satisfied
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/traits/default_auto_traits/maybe-bounds-in-dyn-traits.rs b/tests/ui/traits/default_auto_traits/maybe-bounds-in-dyn-traits.rs
new file mode 100644
index 00000000000..49f2faba146
--- /dev/null
+++ b/tests/ui/traits/default_auto_traits/maybe-bounds-in-dyn-traits.rs
@@ -0,0 +1,61 @@
+//@ compile-flags: -Zexperimental-default-bounds
+
+#![feature(
+    auto_traits,
+    lang_items,
+    more_maybe_bounds,
+    negative_impls,
+    no_core,
+    rustc_attrs
+)]
+#![allow(internal_features)]
+#![no_std]
+#![no_core]
+
+#[lang = "sized"]
+trait Sized {}
+
+#[lang = "copy"]
+pub trait Copy {}
+impl<'a, T: ?Sized> Copy for &'a T {}
+
+#[lang = "legacy_receiver"]
+trait Receiver {}
+impl<T: ?Sized + ?Leak> Receiver for &T {}
+
+#[lang = "unsize"]
+trait Unsize<T: ?Sized + ?Leak> {}
+
+#[lang = "coerce_unsized"]
+trait CoerceUnsized<T: ?Leak + ?Sized> {}
+impl<'a, 'b: 'a, T: ?Sized + ?Leak + Unsize<U>, U: ?Sized + ?Leak> CoerceUnsized<&'a U> for &'b T {}
+
+#[lang = "dispatch_from_dyn"]
+trait DispatchFromDyn<T: ?Leak> {}
+impl<'a, T: ?Sized + ?Leak + Unsize<U>, U: ?Sized + ?Leak> DispatchFromDyn<&'a U> for &'a T {}
+
+#[lang = "default_trait1"]
+auto trait Leak {}
+
+struct NonLeakS;
+impl !Leak for NonLeakS {}
+struct LeakS;
+
+trait Trait {
+    fn leak_foo(&self) {}
+    fn maybe_leak_foo(&self) where Self: ?Leak {}
+}
+
+impl Trait for NonLeakS {}
+impl Trait for LeakS {}
+
+fn main() {
+    let _: &dyn Trait = &NonLeakS;
+    //~^ ERROR the trait bound `NonLeakS: Leak` is not satisfied
+    let _: &dyn Trait = &LeakS;
+    let _: &(dyn Trait + ?Leak) = &LeakS;
+    let x: &(dyn Trait + ?Leak) = &NonLeakS;
+    x.leak_foo();
+    //~^ ERROR the trait bound `dyn Trait: Leak` is not satisfied
+    x.maybe_leak_foo();
+}
diff --git a/tests/ui/traits/default_auto_traits/maybe-bounds-in-dyn-traits.stderr b/tests/ui/traits/default_auto_traits/maybe-bounds-in-dyn-traits.stderr
new file mode 100644
index 00000000000..b7ffb66e60b
--- /dev/null
+++ b/tests/ui/traits/default_auto_traits/maybe-bounds-in-dyn-traits.stderr
@@ -0,0 +1,23 @@
+error[E0277]: the trait bound `NonLeakS: Leak` is not satisfied
+  --> $DIR/maybe-bounds-in-dyn-traits.rs:53:25
+   |
+LL |     let _: &dyn Trait = &NonLeakS;
+   |                         ^^^^^^^^^ the trait `Leak` is not implemented for `NonLeakS`
+   |
+   = note: required for the cast from `&NonLeakS` to `&dyn Trait + Leak`
+
+error[E0277]: the trait bound `dyn Trait: Leak` is not satisfied
+  --> $DIR/maybe-bounds-in-dyn-traits.rs:58:7
+   |
+LL |     x.leak_foo();
+   |       ^^^^^^^^ the trait `Leak` is not implemented for `dyn Trait`
+   |
+note: required by a bound in `Trait::leak_foo`
+  --> $DIR/maybe-bounds-in-dyn-traits.rs:45:5
+   |
+LL |     fn leak_foo(&self) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Trait::leak_foo`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/default_auto_traits/maybe-bounds-in-traits.rs b/tests/ui/traits/default_auto_traits/maybe-bounds-in-traits.rs
new file mode 100644
index 00000000000..761f22d1be5
--- /dev/null
+++ b/tests/ui/traits/default_auto_traits/maybe-bounds-in-traits.rs
@@ -0,0 +1,115 @@
+//@ compile-flags: -Zexperimental-default-bounds
+
+#![feature(
+    auto_traits,
+    associated_type_defaults,
+    generic_const_items,
+    lang_items,
+    more_maybe_bounds,
+    negative_impls,
+    no_core,
+    rustc_attrs
+)]
+#![allow(incomplete_features)]
+#![no_std]
+#![no_core]
+
+#[lang = "sized"]
+trait Sized {}
+
+#[lang = "legacy_receiver"]
+trait LegacyReceiver {}
+impl<T: ?Sized + ?Leak> LegacyReceiver for &T {}
+impl<T: ?Sized> LegacyReceiver for &mut T {}
+
+#[lang = "default_trait1"]
+auto trait Leak {}
+
+struct NonLeakS;
+impl !Leak for NonLeakS {}
+struct LeakS;
+
+mod supertraits {
+    use crate::*;
+
+    trait MaybeLeakT1: ?Leak {}
+    trait MaybeLeakT2 where Self: ?Leak {}
+
+    impl MaybeLeakT1 for NonLeakS {}
+    impl MaybeLeakT2 for NonLeakS {}
+}
+
+mod maybe_self_assoc_type {
+    use crate::*;
+
+    trait TestBase1<T: ?Sized> {}
+    trait TestBase2<T: ?Leak + ?Sized> {}
+
+    trait Test1<T> {
+        type MaybeLeakSelf: TestBase1<Self> where Self: ?Leak;
+        //~^ ERROR the trait bound `Self: Leak` is not satisfied
+        type LeakSelf: TestBase1<Self>;
+    }
+
+    trait Test2<T> {
+        type MaybeLeakSelf: TestBase2<Self> where Self: ?Leak;
+        type LeakSelf: TestBase2<Self>;
+    }
+
+    trait Test3 {
+        type Leak1 = LeakS;
+        type Leak2 = NonLeakS;
+        //~^ ERROR the trait bound `NonLeakS: Leak` is not satisfied
+    }
+
+    trait Test4 {
+        type MaybeLeak1: ?Leak = LeakS;
+        type MaybeLeak2: ?Leak = NonLeakS;
+    }
+
+    trait Test5: ?Leak {
+        // ok, because assoc types have implicit where Self: Leak
+        type MaybeLeakSelf1: TestBase1<Self>;
+        type MaybeLeakSelf2: TestBase2<Self>;
+    }
+}
+
+mod maybe_self_assoc_const {
+    use crate::*;
+
+    const fn size_of<T: ?Sized>() -> usize {
+        0
+    }
+
+    trait Trait {
+        const CLeak: usize = size_of::<Self>();
+        const CNonLeak: usize = size_of::<Self>() where Self: ?Leak;
+        //~^ ERROR the trait bound `Self: Leak` is not satisfied
+    }
+}
+
+mod methods {
+    use crate::*;
+
+    trait Trait {
+        fn leak_foo(&self) {}
+        fn maybe_leak_foo(&self) where Self: ?Leak {}
+        fn mut_leak_foo(&mut self) {}
+        // there is no relax bound on corresponding Receiver impl
+        fn mut_maybe_leak_foo(&mut self) where Self: ?Leak {}
+        //~^  `&mut Self` cannot be used as the type of `self` without the `arbitrary_self_types`
+    }
+
+    impl Trait for NonLeakS {}
+    impl Trait for LeakS {}
+
+    fn foo() {
+        LeakS.leak_foo();
+        LeakS.maybe_leak_foo();
+        NonLeakS.leak_foo();
+        //~^ ERROR the trait bound `NonLeakS: Leak` is not satisfied
+        NonLeakS.maybe_leak_foo();
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/traits/default_auto_traits/maybe-bounds-in-traits.stderr b/tests/ui/traits/default_auto_traits/maybe-bounds-in-traits.stderr
new file mode 100644
index 00000000000..3dd8418b100
--- /dev/null
+++ b/tests/ui/traits/default_auto_traits/maybe-bounds-in-traits.stderr
@@ -0,0 +1,71 @@
+error[E0277]: the trait bound `NonLeakS: Leak` is not satisfied
+  --> $DIR/maybe-bounds-in-traits.rs:61:22
+   |
+LL |         type Leak2 = NonLeakS;
+   |                      ^^^^^^^^ the trait `Leak` is not implemented for `NonLeakS`
+   |
+note: required by a bound in `Test3::Leak2`
+  --> $DIR/maybe-bounds-in-traits.rs:61:9
+   |
+LL |         type Leak2 = NonLeakS;
+   |         ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Test3::Leak2`
+
+error[E0277]: the trait bound `Self: Leak` is not satisfied
+  --> $DIR/maybe-bounds-in-traits.rs:49:29
+   |
+LL |         type MaybeLeakSelf: TestBase1<Self> where Self: ?Leak;
+   |                             ^^^^^^^^^^^^^^^ the trait `Leak` is not implemented for `Self`
+   |
+note: required by a bound in `TestBase1`
+  --> $DIR/maybe-bounds-in-traits.rs:45:21
+   |
+LL |     trait TestBase1<T: ?Sized> {}
+   |                     ^ required by this bound in `TestBase1`
+help: consider further restricting `Self`
+   |
+LL |     trait Test1<T>: Leak {
+   |                   ++++++
+
+error[E0658]: `&mut Self` cannot be used as the type of `self` without the `arbitrary_self_types` feature
+  --> $DIR/maybe-bounds-in-traits.rs:99:31
+   |
+LL |         fn mut_maybe_leak_foo(&mut self) where Self: ?Leak {}
+   |                               ^^^^^^^^^
+   |
+   = note: see issue #44874 <https://github.com/rust-lang/rust/issues/44874> for more information
+   = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+   = help: consider changing to `self`, `&self`, `&mut self`, or a type implementing `Receiver` such as `self: Box<Self>`, `self: Rc<Self>`, or `self: Arc<Self>`
+
+error[E0277]: the trait bound `Self: Leak` is not satisfied
+  --> $DIR/maybe-bounds-in-traits.rs:86:43
+   |
+LL |         const CNonLeak: usize = size_of::<Self>() where Self: ?Leak;
+   |                                           ^^^^ the trait `Leak` is not implemented for `Self`
+   |
+note: required by a bound in `size_of`
+  --> $DIR/maybe-bounds-in-traits.rs:80:22
+   |
+LL |     const fn size_of<T: ?Sized>() -> usize {
+   |                      ^ required by this bound in `size_of`
+help: consider further restricting `Self`
+   |
+LL |     trait Trait: Leak {
+   |                ++++++
+
+error[E0277]: the trait bound `NonLeakS: Leak` is not satisfied
+  --> $DIR/maybe-bounds-in-traits.rs:109:18
+   |
+LL |         NonLeakS.leak_foo();
+   |                  ^^^^^^^^ the trait `Leak` is not implemented for `NonLeakS`
+   |
+note: required by a bound in `methods::Trait::leak_foo`
+  --> $DIR/maybe-bounds-in-traits.rs:95:9
+   |
+LL |         fn leak_foo(&self) {}
+   |         ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Trait::leak_foo`
+
+error: aborting due to 5 previous errors
+
+Some errors have detailed explanations: E0277, E0658.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/mutual-recursion-issue-75860.stderr b/tests/ui/traits/mutual-recursion-issue-75860.stderr
index 272c56301bc..9e8eb1adb11 100644
--- a/tests/ui/traits/mutual-recursion-issue-75860.stderr
+++ b/tests/ui/traits/mutual-recursion-issue-75860.stderr
@@ -2,7 +2,7 @@ error[E0275]: overflow assigning `_` to `Option<_>`
   --> $DIR/mutual-recursion-issue-75860.rs:9:33
    |
 LL |     let left = |o_a: Option<_>| o_a.unwrap();
-   |                                 ^^^
+   |                                 ^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/object/suggestion-trait-object-issue-139174.rs b/tests/ui/traits/object/suggestion-trait-object-issue-139174.rs
new file mode 100644
index 00000000000..f8fa410b7d4
--- /dev/null
+++ b/tests/ui/traits/object/suggestion-trait-object-issue-139174.rs
@@ -0,0 +1,24 @@
+//@compile-flags: --edition 2021
+
+fn f<'a>(x: Box<dyn Fn() -> Option<usize + 'a>>) -> usize {
+    //~^ ERROR expected trait, found builtin type `usize`
+    //~| ERROR expected a type, found a trait [E0782]
+    0
+}
+
+fn create_adder<'a>(x: i32) -> usize + 'a {
+    //~^ ERROR expected trait, found builtin type `usize`
+    //~| ERROR expected a type, found a trait [E0782]
+    move |y| x + y
+}
+
+struct Struct<'a>{
+    x: usize + 'a,
+    //~^ ERROR expected trait, found builtin type `usize`
+    //~| ERROR expected a type, found a trait [E0782]
+}
+
+
+fn main() {
+
+}
diff --git a/tests/ui/traits/object/suggestion-trait-object-issue-139174.stderr b/tests/ui/traits/object/suggestion-trait-object-issue-139174.stderr
new file mode 100644
index 00000000000..0d1ce85fc28
--- /dev/null
+++ b/tests/ui/traits/object/suggestion-trait-object-issue-139174.stderr
@@ -0,0 +1,40 @@
+error[E0404]: expected trait, found builtin type `usize`
+  --> $DIR/suggestion-trait-object-issue-139174.rs:3:36
+   |
+LL | fn f<'a>(x: Box<dyn Fn() -> Option<usize + 'a>>) -> usize {
+   |                                    ^^^^^ not a trait
+
+error[E0404]: expected trait, found builtin type `usize`
+  --> $DIR/suggestion-trait-object-issue-139174.rs:9:32
+   |
+LL | fn create_adder<'a>(x: i32) -> usize + 'a {
+   |                                ^^^^^ not a trait
+
+error[E0404]: expected trait, found builtin type `usize`
+  --> $DIR/suggestion-trait-object-issue-139174.rs:16:8
+   |
+LL |     x: usize + 'a,
+   |        ^^^^^ not a trait
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/suggestion-trait-object-issue-139174.rs:3:36
+   |
+LL | fn f<'a>(x: Box<dyn Fn() -> Option<usize + 'a>>) -> usize {
+   |                                    ^^^^^^^^^^
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/suggestion-trait-object-issue-139174.rs:9:32
+   |
+LL | fn create_adder<'a>(x: i32) -> usize + 'a {
+   |                                ^^^^^^^^^^
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/suggestion-trait-object-issue-139174.rs:16:8
+   |
+LL |     x: usize + 'a,
+   |        ^^^^^^^^^^
+
+error: aborting due to 6 previous errors
+
+Some errors have detailed explanations: E0404, E0782.
+For more information about an error, try `rustc --explain E0404`.
diff --git a/tests/ui/traits/solver-cycles/129541-recursive-struct.rs b/tests/ui/traits/solver-cycles/129541-recursive-struct.rs
index 1f5d0a772a2..723179302e3 100644
--- a/tests/ui/traits/solver-cycles/129541-recursive-struct.rs
+++ b/tests/ui/traits/solver-cycles/129541-recursive-struct.rs
@@ -4,7 +4,6 @@
 //@ ignore-compare-mode-next-solver (explicit revisions)
 //@[unique_next] compile-flags: -Znext-solver
 //@[multiple_next] compile-flags: -Znext-solver
-//@ error-pattern: reached the recursion limit finding the struct tail for `<[Hello] as Normalize>::Assoc`
 
 trait Bound {}
 trait Normalize {
@@ -25,3 +24,5 @@ struct Hello {
 }
 
 fn main() {}
+
+//~? ERROR reached the recursion limit finding the struct tail for `<[Hello] as Normalize>::Assoc`
diff --git a/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs b/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs
index 0b75bb23faf..cfb2d7c5218 100644
--- a/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs
+++ b/tests/ui/treat-err-as-bug/panic-causes-oom-112708.rs
@@ -6,5 +6,5 @@
 
 fn main() {
     #[deny(while_true)]
-    while true {}
+    while true {} //~ ERROR denote infinite loops with `loop { ... }`
 }
diff --git a/tests/ui/treat-err-as-bug/span_delayed_bug.rs b/tests/ui/treat-err-as-bug/span_delayed_bug.rs
index 88a9d07c94c..a242d11129f 100644
--- a/tests/ui/treat-err-as-bug/span_delayed_bug.rs
+++ b/tests/ui/treat-err-as-bug/span_delayed_bug.rs
@@ -9,4 +9,4 @@
 #![feature(rustc_attrs)]
 
 #[rustc_delayed_bug_from_inside_query]
-fn main() {}
+fn main() {} //~ ERROR delayed bug triggered by #[rustc_delayed_bug_from_inside_query]
diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-1.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-1.rs
index 19986247d40..53b7667aa9f 100644
--- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-1.rs
+++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-1.rs
@@ -1,9 +1,10 @@
 #![feature(type_alias_impl_trait)]
-//@ known-bug: #109268
 
 type Foo = impl Fn() -> Foo;
 
+#[define_opaque(Foo)]
 fn crash(x: Foo) -> Foo {
+    //~^ ERROR overflow evaluating the requirement `<Foo as FnOnce<()>>::Output == Foo`
     x
 }
 
diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-1.stderr b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-1.stderr
index ad96a0eeb87..ee8922b673e 100644
--- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-1.stderr
+++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-1.stderr
@@ -1,10 +1,9 @@
-error: unconstrained opaque type
-  --> $DIR/type-alias-impl-trait-with-cycle-error-1.rs:4:12
+error[E0275]: overflow evaluating the requirement `<Foo as FnOnce<()>>::Output == Foo`
+  --> $DIR/type-alias-impl-trait-with-cycle-error-1.rs:6:21
    |
-LL | type Foo = impl Fn() -> Foo;
-   |            ^^^^^^^^^^^^^^^^
-   |
-   = note: `Foo` must be used in combination with a concrete type within the same crate
+LL | fn crash(x: Foo) -> Foo {
+   |                     ^^^
 
 error: aborting due to 1 previous error
 
+For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-2.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-2.rs
index 761cc83af51..d0c62d29069 100644
--- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-2.rs
+++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-2.rs
@@ -1,13 +1,13 @@
 #![feature(type_alias_impl_trait)]
-//@ known-bug: #109268
 
 pub trait Bar<T> {
     type Item;
 }
 
 type Foo = impl Bar<Foo, Item = Foo>;
-
+#[define_opaque(Foo)]
 fn crash(x: Foo) -> Foo {
+    //~^ ERROR overflow evaluating the requirement `<Foo as Bar<Foo>>::Item == Foo`
     x
 }
 
diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-2.stderr b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-2.stderr
index e5bb8163a81..40bd6517c06 100644
--- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-2.stderr
+++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-2.stderr
@@ -1,10 +1,9 @@
-error: unconstrained opaque type
-  --> $DIR/type-alias-impl-trait-with-cycle-error-2.rs:8:12
+error[E0275]: overflow evaluating the requirement `<Foo as Bar<Foo>>::Item == Foo`
+  --> $DIR/type-alias-impl-trait-with-cycle-error-2.rs:9:21
    |
-LL | type Foo = impl Bar<Foo, Item = Foo>;
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `Foo` must be used in combination with a concrete type within the same crate
+LL | fn crash(x: Foo) -> Foo {
+   |                     ^^^
 
 error: aborting due to 1 previous error
 
+For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-3.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-3.rs
index 52942afd639..de3d23b83a2 100644
--- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-3.rs
+++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-3.rs
@@ -1,9 +1,9 @@
 #![feature(type_alias_impl_trait)]
-//@ known-bug: #109268
 
 type Foo<'a> = impl Fn() -> Foo<'a>;
-
+#[define_opaque(Foo)]
 fn crash<'a>(_: &'a (), x: Foo<'a>) -> Foo<'a> {
+    //~^ ERROR overflow evaluating the requirement `<Foo<'_> as FnOnce<()>>::Output == Foo<'a>`
     x
 }
 
diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-3.stderr b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-3.stderr
index 157310bf623..f9e26fde1bd 100644
--- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-3.stderr
+++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-3.stderr
@@ -1,10 +1,9 @@
-error: unconstrained opaque type
-  --> $DIR/type-alias-impl-trait-with-cycle-error-3.rs:4:16
+error[E0275]: overflow evaluating the requirement `<Foo<'_> as FnOnce<()>>::Output == Foo<'a>`
+  --> $DIR/type-alias-impl-trait-with-cycle-error-3.rs:5:40
    |
-LL | type Foo<'a> = impl Fn() -> Foo<'a>;
-   |                ^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `Foo` must be used in combination with a concrete type within the same crate
+LL | fn crash<'a>(_: &'a (), x: Foo<'a>) -> Foo<'a> {
+   |                                        ^^^^^^^
 
 error: aborting due to 1 previous error
 
+For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/type/issue-91268.rs b/tests/ui/type/issue-91268.rs
index 16d5b241145..6297880702e 100644
--- a/tests/ui/type/issue-91268.rs
+++ b/tests/ui/type/issue-91268.rs
@@ -1,5 +1,6 @@
-//@ error-pattern: this file contains an unclosed delimiter
 // ignore-tidy-trailing-newlines
 // `ţ` must be the last character in this file, it cannot be followed by a newline
+
+//~vv ERROR this file contains an unclosed delimiter
 fn main() {
     0: u8(ţ
\ No newline at end of file
diff --git a/tests/ui/type/issue-91268.stderr b/tests/ui/type/issue-91268.stderr
index 395559442d1..db7b5a188cf 100644
--- a/tests/ui/type/issue-91268.stderr
+++ b/tests/ui/type/issue-91268.stderr
@@ -1,5 +1,5 @@
 error: this file contains an unclosed delimiter
-  --> $DIR/issue-91268.rs:5:12
+  --> $DIR/issue-91268.rs:6:12
    |
 LL | fn main() {
    |           - unclosed delimiter
diff --git a/tests/ui/type/pattern_types/const_block.rs b/tests/ui/type/pattern_types/const_block.rs
deleted file mode 100644
index ed19b10671a..00000000000
--- a/tests/ui/type/pattern_types/const_block.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![feature(pattern_types)]
-#![feature(pattern_type_macro)]
-#![feature(inline_const_pat)]
-//@ check-pass
-
-use std::pat::pattern_type;
-
-fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {}
-
-fn main() {}
diff --git a/tests/ui/type/type-arg-out-of-scope.rs b/tests/ui/type/type-arg-out-of-scope.rs
index 3f8a6ff1016..05ed54ec832 100644
--- a/tests/ui/type/type-arg-out-of-scope.rs
+++ b/tests/ui/type/type-arg-out-of-scope.rs
@@ -1,5 +1,6 @@
-//@ error-pattern:can't use generic parameters from outer item
 fn foo<T>(x: T) {
     fn bar(f: Box<dyn FnMut(T) -> T>) { }
+    //~^ ERROR can't use generic parameters from outer item
+    //~| ERROR can't use generic parameters from outer item
 }
 fn main() { foo(1); }
diff --git a/tests/ui/type/type-arg-out-of-scope.stderr b/tests/ui/type/type-arg-out-of-scope.stderr
index 8665001e243..fcaaca1770f 100644
--- a/tests/ui/type/type-arg-out-of-scope.stderr
+++ b/tests/ui/type/type-arg-out-of-scope.stderr
@@ -1,5 +1,5 @@
 error[E0401]: can't use generic parameters from outer item
-  --> $DIR/type-arg-out-of-scope.rs:3:29
+  --> $DIR/type-arg-out-of-scope.rs:2:29
    |
 LL | fn foo<T>(x: T) {
    |        - type parameter from outer item
@@ -9,7 +9,7 @@ LL |     fn bar(f: Box<dyn FnMut(T) -> T>) { }
    |           help: try introducing a local generic parameter here: `<T>`
 
 error[E0401]: can't use generic parameters from outer item
-  --> $DIR/type-arg-out-of-scope.rs:3:35
+  --> $DIR/type-arg-out-of-scope.rs:2:35
    |
 LL | fn foo<T>(x: T) {
    |        - type parameter from outer item
diff --git a/tests/ui/typeck/issue-91334.rs b/tests/ui/typeck/issue-91334.rs
index ec0d4ad70f1..c820014ff93 100644
--- a/tests/ui/typeck/issue-91334.rs
+++ b/tests/ui/typeck/issue-91334.rs
@@ -1,7 +1,7 @@
 // Regression test for the ICE described in issue #91334.
 
-//@ error-pattern: this file contains an unclosed delimiter
-
 #![feature(coroutines)]
 
+//~vv ERROR mismatched closing delimiter: `)`
+//~v ERROR this file contains an unclosed delimiter
 fn f(){||yield(((){),
diff --git a/tests/ui/typeck/output-type-mismatch.rs b/tests/ui/typeck/output-type-mismatch.rs
index d5691c9c353..0d7c7d1dfe1 100644
--- a/tests/ui/typeck/output-type-mismatch.rs
+++ b/tests/ui/typeck/output-type-mismatch.rs
@@ -1,5 +1,3 @@
-//@ error-pattern: mismatched types
-
 fn f() { }
 
-fn main() { let i: isize; i = f(); }
+fn main() { let i: isize; i = f(); } //~ ERROR mismatched types
diff --git a/tests/ui/typeck/output-type-mismatch.stderr b/tests/ui/typeck/output-type-mismatch.stderr
index c6df6650654..ba50cd4e6d7 100644
--- a/tests/ui/typeck/output-type-mismatch.stderr
+++ b/tests/ui/typeck/output-type-mismatch.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/output-type-mismatch.rs:5:31
+  --> $DIR/output-type-mismatch.rs:3:31
    |
 LL | fn main() { let i: isize; i = f(); }
    |                    -----      ^^^ expected `isize`, found `()`
diff --git a/tests/ui/typeck/while-type-error.rs b/tests/ui/typeck/while-type-error.rs
index ca3b8921f54..abc607516e6 100644
--- a/tests/ui/typeck/while-type-error.rs
+++ b/tests/ui/typeck/while-type-error.rs
@@ -1,3 +1 @@
-//@ error-pattern: mismatched types
-
-fn main() { while main { } }
+fn main() { while main { } } //~ ERROR mismatched types
diff --git a/tests/ui/typeck/while-type-error.stderr b/tests/ui/typeck/while-type-error.stderr
index b67ec561531..4bd86aafc17 100644
--- a/tests/ui/typeck/while-type-error.stderr
+++ b/tests/ui/typeck/while-type-error.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/while-type-error.rs:3:19
+  --> $DIR/while-type-error.rs:1:19
    |
 LL | fn main() { while main { } }
    |                   ^^^^ expected `bool`, found fn item
diff --git a/tests/ui/typeck/wrong-ret-type.rs b/tests/ui/typeck/wrong-ret-type.rs
index b83aefad1e9..2d6751a823c 100644
--- a/tests/ui/typeck/wrong-ret-type.rs
+++ b/tests/ui/typeck/wrong-ret-type.rs
@@ -1,3 +1,2 @@
-//@ error-pattern: mismatched types
-fn mk_int() -> usize { let i: isize = 3; return i; }
+fn mk_int() -> usize { let i: isize = 3; return i; } //~ ERROR mismatched types
 fn main() { }
diff --git a/tests/ui/typeck/wrong-ret-type.stderr b/tests/ui/typeck/wrong-ret-type.stderr
index 33a094ce95d..918eb2d5c88 100644
--- a/tests/ui/typeck/wrong-ret-type.stderr
+++ b/tests/ui/typeck/wrong-ret-type.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/wrong-ret-type.rs:2:49
+  --> $DIR/wrong-ret-type.rs:1:49
    |
 LL | fn mk_int() -> usize { let i: isize = 3; return i; }
    |                -----                            ^ expected `usize`, found `isize`
diff --git a/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs b/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs
index 7bd4df47220..9304e20b429 100644
--- a/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs
+++ b/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs
@@ -1,6 +1,6 @@
+//~ ERROR unknown lint: `test_unstable_lint`
 //@ check-fail
 //@ compile-flags: -Dunknown_lints -Atest_unstable_lint
-//@ error-pattern: unknown lint: `test_unstable_lint`
 //@ error-pattern: the `test_unstable_lint` lint is unstable
 
 fn main() {}
diff --git a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs
index 995f65ef83d..76983419c68 100644
--- a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs
+++ b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs
@@ -1,6 +1,6 @@
+//~ WARN unknown lint: `test_unstable_lint`
 //@ check-pass
 //@ compile-flags: -Wunknown_lints -Atest_unstable_lint
-//@ error-pattern: unknown lint: `test_unstable_lint`
 //@ error-pattern: the `test_unstable_lint` lint is unstable
 
 fn main() {}
diff --git a/tests/ui/unresolved/unresolved-import.rs b/tests/ui/unresolved/unresolved-import.rs
index 763e9496734..b0fdcf97015 100644
--- a/tests/ui/unresolved/unresolved-import.rs
+++ b/tests/ui/unresolved/unresolved-import.rs
@@ -31,6 +31,8 @@ mod food {
 
     mod zug {
         pub mod baz {
+        //~^ NOTE module `food::zug::baz` exists but is inaccessible
+        //~| NOTE not accessible
             pub struct Foobar;
         }
     }
diff --git a/tests/ui/unresolved/unresolved-import.stderr b/tests/ui/unresolved/unresolved-import.stderr
index c65fe841001..4001695459a 100644
--- a/tests/ui/unresolved/unresolved-import.stderr
+++ b/tests/ui/unresolved/unresolved-import.stderr
@@ -26,6 +26,12 @@ LL | use food::baz;
    |     |     |
    |     |     help: a similar name exists in the module: `bag`
    |     no `baz` in `food`
+   |
+note: module `food::zug::baz` exists but is inaccessible
+  --> $DIR/unresolved-import.rs:33:9
+   |
+LL |         pub mod baz {
+   |         ^^^^^^^^^^^ not accessible
 
 error[E0432]: unresolved import `food::beens`
   --> $DIR/unresolved-import.rs:19:12
@@ -37,13 +43,13 @@ LL | use food::{beens as Foo};
    |            help: a similar name exists in the module: `beans`
 
 error[E0432]: unresolved import `MyEnum`
-  --> $DIR/unresolved-import.rs:44:9
+  --> $DIR/unresolved-import.rs:46:9
    |
 LL |     use MyEnum::*;
    |         ^^^^^^ help: a similar path exists: `self::MyEnum`
 
 error[E0432]: unresolved import `Enum`
-  --> $DIR/unresolved-import.rs:55:9
+  --> $DIR/unresolved-import.rs:57:9
    |
 LL |     use Enum::*;
    |         ^^^^ help: a similar path exists: `self::Enum`
diff --git a/tests/ui/unsafe/const_pat_in_layout_restricted.rs b/tests/ui/unsafe/const_pat_in_layout_restricted.rs
deleted file mode 100644
index 2ba173ee499..00000000000
--- a/tests/ui/unsafe/const_pat_in_layout_restricted.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Check that ref mut patterns within a const pattern don't get considered
-// unsafe because they're within a pattern for a layout constrained stuct.
-//@ check-pass
-
-#![feature(rustc_attrs)]
-#![feature(inline_const_pat)]
-
-#[rustc_layout_scalar_valid_range_start(3)]
-struct Gt2(i32);
-
-fn main() {
-    match unsafe { Gt2(5) } {
-        Gt2(
-            const {
-                || match () {
-                    ref mut y => (),
-                };
-                4
-            },
-        ) => (),
-        _ => (),
-    }
-}
diff --git a/tests/ui/use/use-meta-mismatch.rs b/tests/ui/use/use-meta-mismatch.rs
index 2c5ae9cd9a1..8d15e46375c 100644
--- a/tests/ui/use/use-meta-mismatch.rs
+++ b/tests/ui/use/use-meta-mismatch.rs
@@ -1,5 +1,3 @@
-//@ error-pattern:can't find crate for `fake_crate`
-
-extern crate fake_crate as extra;
+extern crate fake_crate as extra; //~ ERROR can't find crate for `fake_crate`
 
 fn main() { }
diff --git a/tests/ui/use/use-meta-mismatch.stderr b/tests/ui/use/use-meta-mismatch.stderr
index b793229e5fd..ffc471fa722 100644
--- a/tests/ui/use/use-meta-mismatch.stderr
+++ b/tests/ui/use/use-meta-mismatch.stderr
@@ -1,5 +1,5 @@
 error[E0463]: can't find crate for `fake_crate`
-  --> $DIR/use-meta-mismatch.rs:3:1
+  --> $DIR/use-meta-mismatch.rs:1:1
    |
 LL | extern crate fake_crate as extra;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
diff --git a/tests/ui/windows-subsystem/windows-subsystem-invalid.rs b/tests/ui/windows-subsystem/windows-subsystem-invalid.rs
index c6a6dd00a92..4dadfc6fd5d 100644
--- a/tests/ui/windows-subsystem/windows-subsystem-invalid.rs
+++ b/tests/ui/windows-subsystem/windows-subsystem-invalid.rs
@@ -1,5 +1,5 @@
-//@ error-pattern: invalid windows subsystem `wrong`, only `windows` and `console` are allowed
-
 #![windows_subsystem = "wrong"]
 
 fn main() {}
+
+//~? ERROR invalid windows subsystem `wrong`