about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/assembly/asm/s390x-types.rs24
-rw-r--r--tests/codegen-units/item-collection/generic-drop-glue.rs4
-rw-r--r--tests/codegen-units/item-collection/transitive-drop-glue.rs10
-rw-r--r--tests/codegen-units/item-collection/unsizing.rs2
-rw-r--r--tests/codegen/align-byval.rs24
-rw-r--r--tests/codegen/align-struct.rs2
-rw-r--r--tests/codegen/function-arguments-noopt.rs4
-rw-r--r--tests/codegen/function-arguments.rs2
-rw-r--r--tests/codegen/intrinsics/transmute.rs10
-rw-r--r--tests/codegen/maybeuninit-rvo.rs33
-rw-r--r--tests/codegen/personality_lifetimes.rs2
-rw-r--r--tests/codegen/refs.rs5
-rw-r--r--tests/codegen/scalar-pair-bool.rs8
-rw-r--r--tests/codegen/slice-iter-nonnull.rs8
-rw-r--r--tests/codegen/vec-iter.rs46
-rw-r--r--tests/codegen/zst-offset.rs2
-rw-r--r--tests/coverage/closure.cov-map42
-rw-r--r--tests/coverage/color.coverage13
-rw-r--r--tests/coverage/color.rs11
-rw-r--r--tests/coverage/ignore_map.coverage4
-rw-r--r--tests/coverage/ignore_map.rs3
-rw-r--r--tests/coverage/ignore_run.cov-map8
-rw-r--r--tests/coverage/ignore_run.rs3
-rw-r--r--tests/coverage/inline-dead.cov-map4
-rw-r--r--tests/coverage/inline-dead.coverage2
-rw-r--r--tests/coverage/macro_name_span.cov-map8
-rw-r--r--tests/coverage/macro_name_span.coverage19
-rw-r--r--tests/coverage/unicode.cov-map53
-rw-r--r--tests/coverage/unicode.coverage40
-rw-r--r--tests/coverage/unicode.rs36
-rw-r--r--tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs124
-rw-r--r--tests/debuginfo/skip_second_statement.rs168
-rw-r--r--tests/debuginfo/skip_second_statement_collapse.rs170
-rw-r--r--tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir6
-rw-r--r--tests/mir-opt/building/custom/terminators.rs8
-rw-r--r--tests/mir-opt/building/custom/unwind_action.rs8
-rw-r--r--tests/mir-opt/copy-prop/borrowed_local.rs4
-rw-r--r--tests/mir-opt/copy-prop/calls.rs2
-rw-r--r--tests/mir-opt/copy-prop/custom_move_arg.f.CopyProp.panic-unwind.diff8
-rw-r--r--tests/mir-opt/copy-prop/custom_move_arg.rs6
-rw-r--r--tests/mir-opt/copy-prop/move_projection.f.CopyProp.panic-unwind.diff6
-rw-r--r--tests/mir-opt/copy-prop/move_projection.rs6
-rw-r--r--tests/mir-opt/dead-store-elimination/call_arg_copy.rs2
-rw-r--r--tests/mir-opt/dead-store-elimination/cycle.rs4
-rw-r--r--tests/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.panic-abort.diff18
-rw-r--r--tests/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.panic-unwind.diff18
-rw-r--r--tests/mir-opt/dest-prop/unreachable.f.DestinationPropagation.panic-abort.diff82
-rw-r--r--tests/mir-opt/dest-prop/unreachable.f.DestinationPropagation.panic-unwind.diff82
-rw-r--r--tests/mir-opt/dest-prop/unreachable.rs20
-rw-r--r--tests/mir-opt/gvn.rs12
-rw-r--r--tests/mir-opt/inline/indirect_destination.rs2
-rw-r--r--tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff10
-rw-r--r--tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff10
-rw-r--r--tests/mir-opt/jump_threading.rs8
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff24
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff18
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff24
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff18
-rw-r--r--tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.32bit.panic-abort.diff1
-rw-r--r--tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.32bit.panic-unwind.diff1
-rw-r--r--tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.64bit.panic-abort.diff1
-rw-r--r--tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.64bit.panic-unwind.diff1
-rw-r--r--tests/mir-opt/reference_prop.rs10
-rw-r--r--tests/mir-opt/remove_never_const.rs3
-rw-r--r--tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff22
-rw-r--r--tests/mir-opt/separate_const_switch.too_complex.SeparateConstSwitch.diff28
-rw-r--r--tests/mir-opt/set_no_discriminant.f.JumpThreading.diff26
-rw-r--r--tests/mir-opt/set_no_discriminant.generic.JumpThreading.diff26
-rw-r--r--tests/mir-opt/set_no_discriminant.rs78
-rw-r--r--tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-abort.diff12
-rw-r--r--tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-unwind.diff12
-rw-r--r--tests/mir-opt/simplify_match.main.GVN.panic-abort.diff10
-rw-r--r--tests/mir-opt/simplify_match.main.GVN.panic-unwind.diff10
-rw-r--r--tests/mir-opt/spanview_block.main.built.after.html67
-rw-r--r--tests/mir-opt/spanview_block.rs6
-rw-r--r--tests/mir-opt/spanview_statement.main.built.after.html67
-rw-r--r--tests/mir-opt/spanview_statement.rs6
-rw-r--r--tests/mir-opt/spanview_terminator.main.built.after.html66
-rw-r--r--tests/mir-opt/spanview_terminator.rs6
-rw-r--r--tests/run-make-fulldeps/hotplug_codegen_backend/Makefile1
-rw-r--r--tests/run-make/raw-dylib-c/Makefile2
-rw-r--r--tests/run-make/raw-dylib-inline-cross-dylib/Makefile2
-rw-r--r--tests/run-make/raw-dylib-link-ordinal/Makefile2
-rw-r--r--tests/run-make/sanitizer-cdylib-link/Makefile2
-rw-r--r--tests/run-make/sanitizer-cdylib-link/program.rs2
-rw-r--r--tests/run-make/sanitizer-dylib-link/Makefile2
-rw-r--r--tests/run-make/sanitizer-dylib-link/program.rs2
-rw-r--r--tests/run-make/sanitizer-staticlib-link/program.rs2
-rw-r--r--tests/rustdoc-js-std/parser-errors.js17
-rw-r--r--tests/rustdoc-js-std/parser-slice-array.js18
-rw-r--r--tests/rustdoc-js-std/parser-tuple.js365
-rw-r--r--tests/rustdoc-js-std/parser-weird-queries.js2
-rw-r--r--tests/rustdoc-js/tuple-unit.js80
-rw-r--r--tests/rustdoc-js/tuple-unit.rs18
-rw-r--r--tests/rustdoc-ui/issues/issue-105742.stderr4
-rw-r--r--tests/rustdoc-ui/issues/issue-81662-shortness.rs3
-rw-r--r--tests/rustdoc-ui/issues/issue-81662-shortness.stdout8
-rw-r--r--tests/rustdoc/check-source-code-urls-to-def.rs2
-rw-r--r--tests/rustdoc/inline_cross/auxiliary/default-generic-args.rs11
-rw-r--r--tests/rustdoc/inline_cross/auxiliary/u_default_generic_args.rs1
-rw-r--r--tests/rustdoc/inline_cross/default-generic-args.rs32
-rw-r--r--tests/rustdoc/jump-to-def-doc-links-calls.rs27
-rw-r--r--tests/rustdoc/synthetic_auto/no-redundancy.rs3
-rw-r--r--tests/ui-fulldeps/deriving-global.rs1
-rw-r--r--tests/ui-fulldeps/deriving-hygiene.rs1
-rw-r--r--tests/ui-fulldeps/dropck-tarena-cycle-checked.rs2
-rw-r--r--tests/ui-fulldeps/dropck-tarena-cycle-checked.stderr2
-rw-r--r--tests/ui-fulldeps/dropck-tarena-unsound-drop.rs2
-rw-r--r--tests/ui-fulldeps/dropck-tarena-unsound-drop.stderr2
-rw-r--r--tests/ui-fulldeps/empty-struct-braces-derive.rs1
-rw-r--r--tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs1
-rw-r--r--tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr4
-rw-r--r--tests/ui-fulldeps/pathless-extern-unstable.rs1
-rw-r--r--tests/ui-fulldeps/pathless-extern-unstable.stderr2
-rw-r--r--tests/ui-fulldeps/rustc_encodable_hygiene.rs2
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr4
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs2
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr2
-rw-r--r--tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs1
-rw-r--r--tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr2
-rw-r--r--tests/ui-fulldeps/stable-mir/check_trait_queries.rs125
-rw-r--r--tests/ui/abi/statics/static-mut-foreign.rs2
-rw-r--r--tests/ui/abi/statics/static-mut-foreign.stderr31
-rw-r--r--tests/ui/allocator/no_std-alloc-error-handler-custom.rs2
-rw-r--r--tests/ui/allocator/no_std-alloc-error-handler-default.rs2
-rw-r--r--tests/ui/annotate-snippet/missing-type.rs3
-rw-r--r--tests/ui/annotate-snippet/missing-type.stderr2
-rw-r--r--tests/ui/annotate-snippet/multispan.rs15
-rw-r--r--tests/ui/annotate-snippet/multispan.stderr14
-rw-r--r--tests/ui/anon-params/anon-params-edition-hygiene.rs5
-rw-r--r--tests/ui/anon-params/anon-params-edition-hygiene.stderr23
-rw-r--r--tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs13
-rw-r--r--tests/ui/array-slice-vec/show-boxed-slice.rs2
-rw-r--r--tests/ui/asm/aarch64/const.rs2
-rw-r--r--tests/ui/asm/bad-arch.rs2
-rw-r--r--tests/ui/asm/bad-arch.stderr (renamed from tests/ui/asm/bad-arch.mirunsafeck.stderr)4
-rw-r--r--tests/ui/asm/bad-arch.thirunsafeck.stderr17
-rw-r--r--tests/ui/asm/bad-template.aarch64.stderr (renamed from tests/ui/asm/bad-template.aarch64_mirunsafeck.stderr)52
-rw-r--r--tests/ui/asm/bad-template.aarch64_thirunsafeck.stderr202
-rw-r--r--tests/ui/asm/bad-template.rs22
-rw-r--r--tests/ui/asm/bad-template.x86_64.stderr (renamed from tests/ui/asm/bad-template.x86_64_mirunsafeck.stderr)52
-rw-r--r--tests/ui/asm/bad-template.x86_64_thirunsafeck.stderr202
-rw-r--r--tests/ui/asm/named-asm-labels.rs21
-rw-r--r--tests/ui/asm/named-asm-labels.stderr103
-rw-r--r--tests/ui/asm/x86_64/const.rs2
-rw-r--r--tests/ui/associated-consts/associated-const-type-parameters.rs2
-rw-r--r--tests/ui/associated-consts/issue-105330.stderr4
-rw-r--r--tests/ui/associated-inherent-types/issue-109071.no_gate.stderr4
-rw-r--r--tests/ui/associated-inherent-types/issue-109071.rs4
-rw-r--r--tests/ui/associated-inherent-types/issue-109071.with_gate.stderr18
-rw-r--r--tests/ui/associated-inherent-types/issue-109299-1.rs1
-rw-r--r--tests/ui/associated-inherent-types/issue-109299-1.stderr10
-rw-r--r--tests/ui/associated-inherent-types/issue-109768.rs1
-rw-r--r--tests/ui/associated-inherent-types/issue-109768.stderr24
-rw-r--r--tests/ui/associated-type-bounds/duplicate.rs12
-rw-r--r--tests/ui/associated-type-bounds/duplicate.stderr244
-rw-r--r--tests/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.rs2
-rw-r--r--tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.rs4
-rw-r--r--tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr24
-rw-r--r--tests/ui/associated-types/associated-types-method.rs2
-rw-r--r--tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr24
-rw-r--r--tests/ui/associated-types/associated-types-struct-field-numbered.rs2
-rw-r--r--tests/ui/associated-types/defaults-cyclic-fail-1.rs4
-rw-r--r--tests/ui/associated-types/defaults-cyclic-fail-1.stderr4
-rw-r--r--tests/ui/associated-types/defaults-cyclic-fail-2.rs4
-rw-r--r--tests/ui/associated-types/defaults-cyclic-fail-2.stderr4
-rw-r--r--tests/ui/associated-types/issue-23595-1.rs1
-rw-r--r--tests/ui/associated-types/issue-23595-1.stderr18
-rw-r--r--tests/ui/associated-types/issue-25700-1.rs2
-rw-r--r--tests/ui/associated-types/issue-25700-2.rs4
-rw-r--r--tests/ui/associated-types/issue-25700.rs2
-rw-r--r--tests/ui/async-await/async-await.rs3
-rw-r--r--tests/ui/async-await/async-fn-size-moved-locals.rs2
-rw-r--r--tests/ui/async-await/async-fn-size-uninit-locals.rs2
-rw-r--r--tests/ui/async-await/async-unsafe-fn-call-in-safe.mir.stderr35
-rw-r--r--tests/ui/async-await/async-unsafe-fn-call-in-safe.rs14
-rw-r--r--tests/ui/async-await/async-unsafe-fn-call-in-safe.stderr (renamed from tests/ui/async-await/async-unsafe-fn-call-in-safe.thir.stderr)8
-rw-r--r--tests/ui/async-await/in-trait/async-recursive-generic.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-recursive-generic.stderr10
-rw-r--r--tests/ui/async-await/in-trait/async-recursive.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-recursive.stderr10
-rw-r--r--tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs4
-rw-r--r--tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr15
-rw-r--r--tests/ui/async-await/issue-66312.stderr12
-rw-r--r--tests/ui/async-await/issues/issue-65159.rs2
-rw-r--r--tests/ui/async-await/issues/issue-65159.stderr16
-rw-r--r--tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs4
-rw-r--r--tests/ui/async-await/mutually-recursive-async-impl-trait-type.stderr21
-rw-r--r--tests/ui/async-await/pin-needed-to-poll-2.stderr2
-rw-r--r--tests/ui/async-await/recursive-async-impl-trait-type.rs2
-rw-r--r--tests/ui/async-await/recursive-async-impl-trait-type.stderr10
-rw-r--r--tests/ui/async-await/return-type-notation/rtn-in-impl-signature.rs1
-rw-r--r--tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr14
-rw-r--r--tests/ui/async-await/track-caller/async-closure-gate.afn.stderr44
-rw-r--r--tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr44
-rw-r--r--tests/ui/async-await/track-caller/async-closure-gate.rs2
-rw-r--r--tests/ui/auto-traits/auto-traits.rs2
-rw-r--r--tests/ui/bench/issue-32062.rs4
-rw-r--r--tests/ui/binding/issue-53114-safety-checks.stderr144
-rw-r--r--tests/ui/binding/match-tag.rs2
-rw-r--r--tests/ui/binding/or-pattern.rs2
-rw-r--r--tests/ui/binding/simple-generic-match.rs2
-rw-r--r--tests/ui/binop/binary-op-suggest-deref.stderr5
-rw-r--r--tests/ui/borrowck/borrowck-access-permissions.rs36
-rw-r--r--tests/ui/borrowck/borrowck-access-permissions.stderr33
-rw-r--r--tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs9
-rw-r--r--tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.stderr17
-rw-r--r--tests/ui/borrowck/issue-20801.rs1
-rw-r--r--tests/ui/borrowck/issue-20801.stderr25
-rw-r--r--tests/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.rs41
-rw-r--r--tests/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.stderr75
-rw-r--r--tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs1
-rw-r--r--tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr18
-rw-r--r--tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs2
-rw-r--r--tests/ui/closures/2229_closure_analysis/issue-88118-2.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed4
-rw-r--r--tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed4
-rw-r--r--tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed2
-rw-r--r--tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs2
-rw-r--r--tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.rs3
-rw-r--r--tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.stderr (renamed from tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.mir.stderr)4
-rw-r--r--tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.thir.stderr19
-rw-r--r--tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.rs3
-rw-r--r--tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.stderr (renamed from tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr)4
-rw-r--r--tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr11
-rw-r--r--tests/ui/closures/thir-unsafeck-issue-85871.rs1
-rw-r--r--tests/ui/codegen/issue-16602-3.rs2
-rw-r--r--tests/ui/coercion/issue-14589.rs2
-rw-r--r--tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs7
-rw-r--r--tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr46
-rw-r--r--tests/ui/command/command-pre-exec.rs2
-rw-r--r--tests/ui/const-generics/assoc_const_eq_diagnostic.rs3
-rw-r--r--tests/ui/const-generics/assoc_const_eq_diagnostic.stderr23
-rw-r--r--tests/ui/const-generics/const-argument-cross-crate.rs2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/associated-consts.rs2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-102768.rs5
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-102768.stderr84
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-105257.rs1
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-105257.stderr11
-rw-r--r--tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs2
-rw-r--r--tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs2
-rw-r--r--tests/ui/const-generics/issues/issue-83765.rs3
-rw-r--r--tests/ui/const-generics/issues/issue-83765.stderr42
-rw-r--r--tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.stderr11
-rw-r--r--tests/ui/const-generics/min_const_generics/macro-fail.rs3
-rw-r--r--tests/ui/const-generics/min_const_generics/macro-fail.stderr28
-rw-r--r--tests/ui/consts/assoc-const.rs2
-rw-r--r--tests/ui/consts/const-eval/ub-enum.64bit.stderr134
-rw-r--r--tests/ui/consts/const-eval/ub-enum.rs4
-rw-r--r--tests/ui/consts/const-eval/ub-enum.stderr (renamed from tests/ui/consts/const-eval/ub-enum.32bit.stderr)4
-rw-r--r--tests/ui/consts/const-eval/ub-uninhabit.rs2
-rw-r--r--tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs13
-rw-r--r--tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.stderr19
-rw-r--r--tests/ui/consts/const-needs_drop.rs4
-rw-r--r--tests/ui/consts/const-size_of_val-align_of_val.rs2
-rw-r--r--tests/ui/consts/const-unsized.stderr46
-rw-r--r--tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs2
-rw-r--r--tests/ui/consts/const_in_pattern/warn_corner_cases.rs2
-rw-r--r--tests/ui/consts/const_let_assign2.rs1
-rw-r--r--tests/ui/consts/const_let_assign2.stderr17
-rw-r--r--tests/ui/consts/escaping-bound-var.rs2
-rw-r--r--tests/ui/consts/escaping-bound-var.stderr20
-rw-r--r--tests/ui/consts/issue-103790.rs1
-rw-r--r--tests/ui/consts/issue-103790.stderr11
-rw-r--r--tests/ui/consts/issue-16538.mir.stderr29
-rw-r--r--tests/ui/consts/issue-16538.rs3
-rw-r--r--tests/ui/consts/issue-16538.stderr (renamed from tests/ui/consts/issue-16538.thir.stderr)6
-rw-r--r--tests/ui/consts/issue-17718-const-bad-values.rs3
-rw-r--r--tests/ui/consts/issue-17718-const-bad-values.stderr17
-rw-r--r--tests/ui/consts/issue-39974.stderr12
-rw-r--r--tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs2
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr77
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr77
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs22
-rw-r--r--tests/ui/consts/promoted_const_call4.rs2
-rw-r--r--tests/ui/consts/rvalue-static-promotion.rs2
-rw-r--r--tests/ui/consts/static_mut_containing_mut_ref.rs1
-rw-r--r--tests/ui/consts/static_mut_containing_mut_ref.stderr17
-rw-r--r--tests/ui/consts/static_mut_containing_mut_ref2.mut_refs.stderr23
-rw-r--r--tests/ui/consts/static_mut_containing_mut_ref2.rs10
-rw-r--r--tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr23
-rw-r--r--tests/ui/consts/transmute-const.rs2
-rw-r--r--tests/ui/consts/validate_never_arrays.rs2
-rw-r--r--tests/ui/coroutine/check-resume-ty-lifetimes-2.rs35
-rw-r--r--tests/ui/coroutine/check-resume-ty-lifetimes-2.stderr36
-rw-r--r--tests/ui/coroutine/check-resume-ty-lifetimes.rs27
-rw-r--r--tests/ui/coroutine/check-resume-ty-lifetimes.stderr11
-rw-r--r--tests/ui/coroutine/gen_block.e2024.stderr4
-rw-r--r--tests/ui/coroutine/issue-45729-unsafe-in-coroutine.mir.stderr11
-rw-r--r--tests/ui/coroutine/issue-45729-unsafe-in-coroutine.rs3
-rw-r--r--tests/ui/coroutine/issue-45729-unsafe-in-coroutine.stderr (renamed from tests/ui/coroutine/issue-45729-unsafe-in-coroutine.thir.stderr)2
-rw-r--r--tests/ui/coroutine/size-moved-locals.rs2
-rw-r--r--tests/ui/coroutine/sized-yield.stderr4
-rw-r--r--tests/ui/coroutine/static-mut-reference-across-yield.rs2
-rw-r--r--tests/ui/derive-uninhabited-enum-38885.rs2
-rw-r--r--tests/ui/derive-uninhabited-enum-38885.stderr2
-rw-r--r--tests/ui/derives/issue-97343.rs1
-rw-r--r--tests/ui/derives/issue-97343.stderr14
-rw-r--r--tests/ui/deriving/deriving-clone-generic-tuple-struct.rs2
-rw-r--r--tests/ui/deriving/deriving-copyclone.rs2
-rw-r--r--tests/ui/deriving/issue-58319.rs2
-rw-r--r--tests/ui/destructuring-assignment/struct_destructure_fail.stderr11
-rw-r--r--tests/ui/diagnostic-width/flag-json.rs2
-rw-r--r--tests/ui/diagnostic-width/flag-json.stderr4
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/auxiliary/other.rs8
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs12
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.stderr19
-rw-r--r--tests/ui/did_you_mean/bad-assoc-ty.rs1
-rw-r--r--tests/ui/did_you_mean/bad-assoc-ty.stderr20
-rw-r--r--tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed1
-rw-r--r--tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs1
-rw-r--r--tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.stderr11
-rw-r--r--tests/ui/drop/dropck-eyepatch-reorder.rs8
-rw-r--r--tests/ui/drop/dropck-eyepatch.rs8
-rw-r--r--tests/ui/drop/dynamic-drop.rs2
-rw-r--r--tests/ui/drop/issue-23338-ensure-param-drop-order.rs90
-rw-r--r--tests/ui/drop/issue-23338-ensure-param-drop-order.stderr17
-rw-r--r--tests/ui/dropck/issue-24805-dropck-itemless.rs2
-rw-r--r--tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs2
-rw-r--r--tests/ui/dyn-keyword/dyn-2021-edition-error.rs1
-rw-r--r--tests/ui/dyn-keyword/dyn-2021-edition-error.stderr13
-rw-r--r--tests/ui/dyn-star/drop.rs2
-rw-r--r--tests/ui/dyn-star/union.rs16
-rw-r--r--tests/ui/dyn-star/union.stderr20
-rw-r--r--tests/ui/editions/auxiliary/edition-kw-macro-2015.rs5
-rw-r--r--tests/ui/editions/auxiliary/edition-kw-macro-2018.rs5
-rw-r--r--tests/ui/editions/edition-keywords-2015-2015-parsing.rs2
-rw-r--r--tests/ui/editions/edition-keywords-2015-2015.rs2
-rw-r--r--tests/ui/editions/edition-keywords-2015-2018-parsing.rs2
-rw-r--r--tests/ui/editions/edition-keywords-2015-2018.rs2
-rw-r--r--tests/ui/editions/edition-keywords-2018-2015-parsing.rs4
-rw-r--r--tests/ui/editions/edition-keywords-2018-2015-parsing.stderr14
-rw-r--r--tests/ui/editions/edition-keywords-2018-2015.rs2
-rw-r--r--tests/ui/editions/edition-keywords-2018-2018-parsing.rs15
-rw-r--r--tests/ui/editions/edition-keywords-2018-2018-parsing.stderr34
-rw-r--r--tests/ui/editions/edition-keywords-2018-2018.rs2
-rw-r--r--tests/ui/enum-discriminant/discriminant_value-wrapper.rs2
-rw-r--r--tests/ui/enum-discriminant/discriminant_value.rs4
-rw-r--r--tests/ui/error-codes/E0017.rs12
-rw-r--r--tests/ui/error-codes/E0017.stderr29
-rw-r--r--tests/ui/error-codes/E0133.mir.stderr11
-rw-r--r--tests/ui/error-codes/E0133.rs3
-rw-r--r--tests/ui/error-codes/E0133.stderr (renamed from tests/ui/error-codes/E0133.thir.stderr)2
-rw-r--r--tests/ui/error-codes/E0227.rs1
-rw-r--r--tests/ui/error-codes/E0227.stderr22
-rw-r--r--tests/ui/error-codes/E0229.rs3
-rw-r--r--tests/ui/error-codes/E0229.stderr32
-rw-r--r--tests/ui/error-codes/E0719.rs2
-rw-r--r--tests/ui/error-codes/E0719.stderr22
-rw-r--r--tests/ui/extern-flag/empty-extern-arg.stderr6
-rw-r--r--tests/ui/extern/issue-28324.mir.stderr11
-rw-r--r--tests/ui/extern/issue-28324.rs3
-rw-r--r--tests/ui/extern/issue-28324.stderr (renamed from tests/ui/extern/issue-28324.thir.stderr)2
-rw-r--r--tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-associated_type_bounds.rs6
-rw-r--r--tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr12
-rw-r--r--tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr8
-rw-r--r--tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr22
-rw-r--r--tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr6
-rw-r--r--tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs22
-rw-r--r--tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr90
-rw-r--r--tests/ui/feature-gates/feature-gate-unsized_fn_params.stderr6
-rw-r--r--tests/ui/fmt/format-string-wrong-order.rs6
-rw-r--r--tests/ui/fmt/format-string-wrong-order.stderr20
-rw-r--r--tests/ui/fn/issue-39259.rs4
-rw-r--r--tests/ui/fn/issue-39259.stderr23
-rw-r--r--tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.rs3
-rw-r--r--tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr37
-rw-r--r--tests/ui/generic-associated-types/gat-trait-path-missing-lifetime.rs3
-rw-r--r--tests/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr25
-rw-r--r--tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs9
-rw-r--r--tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr143
-rw-r--r--tests/ui/generic-associated-types/issue-71176.rs3
-rw-r--r--tests/ui/generic-associated-types/issue-71176.stderr55
-rw-r--r--tests/ui/generic-associated-types/issue-79636-1.rs3
-rw-r--r--tests/ui/generic-associated-types/issue-79636-1.stderr56
-rw-r--r--tests/ui/generic-associated-types/issue-80433.rs2
-rw-r--r--tests/ui/generic-associated-types/issue-80433.stderr13
-rw-r--r--tests/ui/generic-associated-types/issue-84931.stderr26
-rw-r--r--tests/ui/generic-associated-types/missing_lifetime_args.rs3
-rw-r--r--tests/ui/generic-associated-types/missing_lifetime_args.stderr58
-rw-r--r--tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs5
-rw-r--r--tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr84
-rw-r--r--tests/ui/generic-associated-types/type-param-defaults.rs2
-rw-r--r--tests/ui/generic-associated-types/type-param-defaults.stderr40
-rw-r--r--tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr40
-rw-r--r--tests/ui/generic-const-items/parameter-defaults.rs1
-rw-r--r--tests/ui/generic-const-items/parameter-defaults.stderr14
-rw-r--r--tests/ui/generics/generic-default-type-params-cross-crate.rs2
-rw-r--r--tests/ui/generics/generic-ivec-leak.rs2
-rw-r--r--tests/ui/generics/generic-newtype-struct.rs2
-rw-r--r--tests/ui/generics/generic-no-mangle.fixed4
-rw-r--r--tests/ui/generics/generic-no-mangle.rs4
-rw-r--r--tests/ui/generics/generic-recursive-tag.rs2
-rw-r--r--tests/ui/generics/generic-tag-corruption.rs2
-rw-r--r--tests/ui/generics/generic-tag-local.rs2
-rw-r--r--tests/ui/generics/generic-tag.rs2
-rw-r--r--tests/ui/generics/wrong-number-of-args.rs6
-rw-r--r--tests/ui/generics/wrong-number-of-args.stderr26
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions2.rs3
-rw-r--r--tests/ui/half-open-range-patterns/range_pat_interactions2.stderr17
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-cache-issue-54302.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/issue-59311.stderr2
-rw-r--r--tests/ui/impl-header-lifetime-elision/bare_type.rs (renamed from tests/ui/issues/issue-20616.rs)9
-rw-r--r--tests/ui/impl-trait/bounds_regression.rs2
-rw-r--r--tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr11
-rw-r--r--tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs1
-rw-r--r--tests/ui/impl-trait/impl-fn-hrtb-bounds.rs3
-rw-r--r--tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr39
-rw-r--r--tests/ui/impl-trait/impl-fn-parsing-ambiguities.rs1
-rw-r--r--tests/ui/impl-trait/impl-fn-parsing-ambiguities.stderr13
-rw-r--r--tests/ui/impl-trait/impl_trait_projections.rs4
-rw-r--r--tests/ui/impl-trait/impl_trait_projections.stderr46
-rw-r--r--tests/ui/impl-trait/implicit-capture-late.stderr8
-rw-r--r--tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs28
-rw-r--r--tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.stderr78
-rw-r--r--tests/ui/impl-trait/issues/issue-54600.rs2
-rw-r--r--tests/ui/impl-trait/issues/issue-54600.stderr4
-rw-r--r--tests/ui/impl-trait/issues/issue-54840.rs2
-rw-r--r--tests/ui/impl-trait/issues/issue-54840.stderr4
-rw-r--r--tests/ui/impl-trait/issues/issue-58504.rs2
-rw-r--r--tests/ui/impl-trait/issues/issue-58504.stderr4
-rw-r--r--tests/ui/impl-trait/issues/issue-58956.rs4
-rw-r--r--tests/ui/impl-trait/issues/issue-58956.stderr8
-rw-r--r--tests/ui/impl-trait/issues/issue-67830.rs2
-rw-r--r--tests/ui/impl-trait/issues/issue-67830.stderr21
-rw-r--r--tests/ui/impl-trait/issues/issue-70971.rs2
-rw-r--r--tests/ui/impl-trait/issues/issue-70971.stderr4
-rw-r--r--tests/ui/impl-trait/issues/issue-78722-2.stderr18
-rw-r--r--tests/ui/impl-trait/issues/issue-79099.rs2
-rw-r--r--tests/ui/impl-trait/issues/issue-79099.stderr4
-rw-r--r--tests/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.rs4
-rw-r--r--tests/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.stderr8
-rw-r--r--tests/ui/impl-trait/issues/issue-84919.rs2
-rw-r--r--tests/ui/impl-trait/issues/issue-84919.stderr4
-rw-r--r--tests/ui/impl-trait/issues/issue-86642.rs2
-rw-r--r--tests/ui/impl-trait/issues/issue-86642.stderr4
-rw-r--r--tests/ui/impl-trait/issues/issue-86800.rs4
-rw-r--r--tests/ui/impl-trait/issues/issue-86800.stderr13
-rw-r--r--tests/ui/impl-trait/issues/issue-87295.rs2
-rw-r--r--tests/ui/impl-trait/issues/issue-87295.stderr4
-rw-r--r--tests/ui/impl-trait/issues/issue-88236-2.rs5
-rw-r--r--tests/ui/impl-trait/issues/issue-88236-2.stderr60
-rw-r--r--tests/ui/impl-trait/issues/issue-92305.rs1
-rw-r--r--tests/ui/impl-trait/issues/issue-92305.stderr16
-rw-r--r--tests/ui/impl-trait/nested-rpit-hrtb.rs6
-rw-r--r--tests/ui/impl-trait/nested-rpit-hrtb.stderr67
-rw-r--r--tests/ui/impl-trait/nested_impl_trait.rs2
-rw-r--r--tests/ui/impl-trait/nested_impl_trait.stderr4
-rw-r--r--tests/ui/impl-trait/recursive-coroutine-boxed.rs (renamed from tests/ui/impl-trait/recursive-coroutine.rs)5
-rw-r--r--tests/ui/impl-trait/recursive-coroutine-indirect.current.stderr11
-rw-r--r--tests/ui/impl-trait/recursive-coroutine-indirect.next.stderr11
-rw-r--r--tests/ui/impl-trait/recursive-coroutine-indirect.rs13
-rw-r--r--tests/ui/impl-trait/recursive-coroutine.current.stderr12
-rw-r--r--tests/ui/impl-trait/recursive-coroutine.next.stderr12
-rw-r--r--tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs10
-rw-r--r--tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr47
-rw-r--r--tests/ui/impl-trait/where-allowed.rs74
-rw-r--r--tests/ui/impl-trait/where-allowed.stderr148
-rw-r--r--tests/ui/inference/issue-36053.rs2
-rw-r--r--tests/ui/inline-const/expr-unsafe-err.mir.stderr11
-rw-r--r--tests/ui/inline-const/expr-unsafe-err.rs6
-rw-r--r--tests/ui/inline-const/expr-unsafe-err.stderr (renamed from tests/ui/inline-const/expr-unsafe-err.thir.stderr)0
-rw-r--r--tests/ui/inline-const/expr-unsafe.rs3
-rw-r--r--tests/ui/inline-const/expr-unsafe.stderr (renamed from tests/ui/inline-const/expr-unsafe.mir.stderr)4
-rw-r--r--tests/ui/inline-const/expr-unsafe.thir.stderr14
-rw-r--r--tests/ui/inline-const/pat-unsafe-err.rs4
-rw-r--r--tests/ui/inline-const/pat-unsafe-err.thir.stderr19
-rw-r--r--tests/ui/inline-const/pat-unsafe.rs4
-rw-r--r--tests/ui/inline-const/pat-unsafe.thir.stderr20
-rw-r--r--tests/ui/intrinsics/issue-28575.rs3
-rw-r--r--tests/ui/intrinsics/issue-28575.stderr (renamed from tests/ui/intrinsics/issue-28575.mir.stderr)2
-rw-r--r--tests/ui/intrinsics/issue-28575.thir.stderr11
-rw-r--r--tests/ui/intrinsics/safe-intrinsic-mismatch.rs2
-rw-r--r--tests/ui/intrinsics/safe-intrinsic-mismatch.stderr20
-rw-r--r--tests/ui/intrinsics/unchecked_math_unsafe.mir.stderr27
-rw-r--r--tests/ui/intrinsics/unchecked_math_unsafe.rs3
-rw-r--r--tests/ui/intrinsics/unchecked_math_unsafe.stderr (renamed from tests/ui/intrinsics/unchecked_math_unsafe.thir.stderr)6
-rw-r--r--tests/ui/issues/issue-11740.rs2
-rw-r--r--tests/ui/issues/issue-13027.rs2
-rw-r--r--tests/ui/issues/issue-14382.rs2
-rw-r--r--tests/ui/issues/issue-15858.rs2
-rw-r--r--tests/ui/issues/issue-17905.rs2
-rw-r--r--tests/ui/issues/issue-23122-2.stderr2
-rw-r--r--tests/ui/issues/issue-23491.rs2
-rw-r--r--tests/ui/issues/issue-23611-enum-swap-in-drop.rs44
-rw-r--r--tests/ui/issues/issue-23611-enum-swap-in-drop.stderr17
-rw-r--r--tests/ui/issues/issue-24308.rs2
-rw-r--r--tests/ui/issues/issue-25089.rs2
-rw-r--r--tests/ui/issues/issue-25679.rs2
-rw-r--r--tests/ui/issues/issue-26127.rs2
-rw-r--r--tests/ui/issues/issue-26641.rs2
-rw-r--r--tests/ui/issues/issue-26709.rs2
-rw-r--r--tests/ui/issues/issue-27240.rs6
-rw-r--r--tests/ui/issues/issue-28498-must-work-ex1.rs2
-rw-r--r--tests/ui/issues/issue-28498-must-work-ex2.rs2
-rw-r--r--tests/ui/issues/issue-28498-ugeh-ex1.rs2
-rw-r--r--tests/ui/issues/issue-28776.mir.stderr11
-rw-r--r--tests/ui/issues/issue-28776.rs3
-rw-r--r--tests/ui/issues/issue-28776.stderr (renamed from tests/ui/issues/issue-28776.thir.stderr)2
-rw-r--r--tests/ui/issues/issue-31267-additional.rs2
-rw-r--r--tests/ui/issues/issue-31299.rs4
-rw-r--r--tests/ui/issues/issue-31910.rs1
-rw-r--r--tests/ui/issues/issue-31910.stderr15
-rw-r--r--tests/ui/issues/issue-3214.rs1
-rw-r--r--tests/ui/issues/issue-3214.stderr10
-rw-r--r--tests/ui/issues/issue-34373.rs2
-rw-r--r--tests/ui/issues/issue-34373.stderr38
-rw-r--r--tests/ui/issues/issue-34571.rs2
-rw-r--r--tests/ui/issues/issue-36278-prefix-nesting.rs2
-rw-r--r--tests/ui/issues/issue-39367.rs2
-rw-r--r--tests/ui/issues/issue-4252.rs2
-rw-r--r--tests/ui/issues/issue-46069.rs2
-rw-r--r--tests/ui/issues/issue-47715.rs8
-rw-r--r--tests/ui/issues/issue-47715.stderr16
-rw-r--r--tests/ui/issues/issue-48131.mir.stderr20
-rw-r--r--tests/ui/issues/issue-48131.rs3
-rw-r--r--tests/ui/issues/issue-48131.stderr (renamed from tests/ui/issues/issue-48131.thir.stderr)6
-rw-r--r--tests/ui/issues/issue-5315.rs2
-rw-r--r--tests/ui/issues/issue-5844.mir.stderr11
-rw-r--r--tests/ui/issues/issue-5844.rs4
-rw-r--r--tests/ui/issues/issue-5844.stderr (renamed from tests/ui/issues/issue-5844.thir.stderr)2
-rw-r--r--tests/ui/issues/issue-61894.rs2
-rw-r--r--tests/ui/issues/issue-62375.stderr5
-rw-r--r--tests/ui/issues/issue-7911.rs2
-rw-r--r--tests/ui/issues/issue-99838.rs4
-rw-r--r--tests/ui/lang-items/lang-item-generic-requirements.rs7
-rw-r--r--tests/ui/lang-items/required-lang-item.rs7
-rw-r--r--tests/ui/lang-items/required-lang-item.stderr6
-rw-r--r--tests/ui/layout/issue-84108.stderr18
-rw-r--r--tests/ui/layout/unsafe-cell-hides-niche.rs4
-rw-r--r--tests/ui/lazy-type-alias/implied-outlives-bounds.neg.stderr34
-rw-r--r--tests/ui/lazy-type-alias/implied-outlives-bounds.rs39
-rw-r--r--tests/ui/lifetimes/issue-76168-hr-outlives-3.rs5
-rw-r--r--tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr25
-rw-r--r--tests/ui/lifetimes/issue-95023.rs4
-rw-r--r--tests/ui/lifetimes/issue-95023.stderr44
-rw-r--r--tests/ui/lifetimes/missing-lifetime-in-alias.rs3
-rw-r--r--tests/ui/lifetimes/missing-lifetime-in-alias.stderr31
-rw-r--r--tests/ui/lint/dead-code/lint-dead-code-1.rs2
-rw-r--r--tests/ui/lint/dead-code/lint-dead-code-5.rs6
-rw-r--r--tests/ui/lint/dead-code/lint-dead-code-5.stderr2
-rw-r--r--tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.rs2
-rw-r--r--tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr16
-rw-r--r--tests/ui/lint/dead-code/tuple-struct-field.rs2
-rw-r--r--tests/ui/lint/dead-code/tuple-struct-field.stderr4
-rw-r--r--tests/ui/lint/dead-code/with-impl.rs2
-rw-r--r--tests/ui/lint/let_underscore/issue-119696-err-on-fn.rs21
-rw-r--r--tests/ui/lint/let_underscore/issue-119696-err-on-fn.stderr22
-rw-r--r--tests/ui/lint/let_underscore/issue-119697-extra-let.rs21
-rw-r--r--tests/ui/lint/let_underscore/issue-119697-extra-let.stderr37
-rw-r--r--tests/ui/lint/lint-match-arms-2.stderr4
-rw-r--r--tests/ui/lint/unused/issue-104397.rs2
-rw-r--r--tests/ui/lint/unused/issue-105061-should-lint.rs2
-rw-r--r--tests/ui/lint/unused/issue-105061.rs2
-rw-r--r--tests/ui/lint/unused_parens_json_suggestion.fixed3
-rw-r--r--tests/ui/lint/unused_parens_json_suggestion.rs3
-rw-r--r--tests/ui/lint/unused_parens_json_suggestion.stderr6
-rw-r--r--tests/ui/lint/unused_parens_remove_json_suggestion.fixed17
-rw-r--r--tests/ui/lint/unused_parens_remove_json_suggestion.rs17
-rw-r--r--tests/ui/lint/unused_parens_remove_json_suggestion.stderr38
-rw-r--r--tests/ui/lint/use_suggestion_json.rs2
-rw-r--r--tests/ui/lint/use_suggestion_json.stderr424
-rw-r--r--tests/ui/lint/wide_pointer_comparisons.rs9
-rw-r--r--tests/ui/lint/wide_pointer_comparisons.stderr17
-rw-r--r--tests/ui/list.rs2
-rw-r--r--tests/ui/lto/lto-still-runs-thread-dtors.rs2
-rw-r--r--tests/ui/macros/html-literals.rs2
-rw-r--r--tests/ui/macros/issue-118786.stderr4
-rw-r--r--tests/ui/macros/macro-tt-followed-by-seq.rs2
-rw-r--r--tests/ui/methods/method-argument-inference-associated-type.rs2
-rw-r--r--tests/ui/methods/method-on-ambiguous-numeric-type.rs7
-rw-r--r--tests/ui/methods/method-on-ambiguous-numeric-type.stderr23
-rw-r--r--tests/ui/methods/method-probe-no-guessing-dyn-trait.rs4
-rw-r--r--tests/ui/mir/lint/assignment-overlap.rs19
-rw-r--r--tests/ui/mir/lint/call-overlap.rs23
-rw-r--r--tests/ui/mir/mir_codegen_switch.rs4
-rw-r--r--tests/ui/mir/mir_fat_ptr.rs2
-rw-r--r--tests/ui/mir/mir_raw_fat_ptr.rs2
-rw-r--r--tests/ui/mir/mir_refs_correct.rs4
-rw-r--r--tests/ui/mir/ssa_call_ret.rs2
-rw-r--r--tests/ui/mir/validate/critical-edge.rs2
-rw-r--r--tests/ui/mir/validate/noncleanup-cleanup.rs2
-rw-r--r--tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed2
-rw-r--r--tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs2
-rw-r--r--tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs5
-rw-r--r--tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.stderr17
-rw-r--r--tests/ui/nll/issue-54302.stderr2
-rw-r--r--tests/ui/no_std/no-std-no-start-binary.rs13
-rw-r--r--tests/ui/no_std/no-std-no-start-binary.stderr6
-rw-r--r--tests/ui/no_std/no-std-unwind-binary.rs15
-rw-r--r--tests/ui/no_std/no-std-unwind-binary.stderr7
-rw-r--r--tests/ui/nullable-pointer-iotareduction.rs2
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-rsh-6.rs9
-rw-r--r--tests/ui/numbers-arithmetic/overflowing-rsh-6.stderr14
-rw-r--r--tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.rs1
-rw-r--r--tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr18
-rw-r--r--tests/ui/object-safety/bare-trait-dont-suggest-dyn.fixed9
-rw-r--r--tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs9
-rw-r--r--tests/ui/object-safety/bare-trait-dont-suggest-dyn.stderr21
-rw-r--r--tests/ui/object-safety/object-safety-supertrait-mentions-Self.rs1
-rw-r--r--tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr31
-rw-r--r--tests/ui/offset-of/offset-of-arg-count.rs8
-rw-r--r--tests/ui/offset-of/offset-of-arg-count.stderr29
-rw-r--r--tests/ui/offset-of/offset-of-builtin.rs24
-rw-r--r--tests/ui/offset-of/offset-of-builtin.stderr67
-rw-r--r--tests/ui/offset-of/offset-of-self.rs11
-rw-r--r--tests/ui/offset-of/offset-of-self.stderr38
-rw-r--r--tests/ui/offset-of/offset-of-tuple-nested.rs5
-rw-r--r--tests/ui/offset-of/offset-of-tuple.rs42
-rw-r--r--tests/ui/offset-of/offset-of-tuple.stderr146
-rw-r--r--tests/ui/optimization-fuel-0.rs4
-rw-r--r--tests/ui/optimization-fuel-1.rs4
-rw-r--r--tests/ui/packed/issue-118537-field-offset-ice.rs2
-rw-r--r--tests/ui/packed/packed-struct-drop-aligned.rs2
-rw-r--r--tests/ui/packed/packed-struct-optimized-enum.rs2
-rw-r--r--tests/ui/packed/packed-tuple-struct-layout.rs4
-rw-r--r--tests/ui/panic-handler/weak-lang-item.rs2
-rw-r--r--tests/ui/panic-handler/weak-lang-item.stderr6
-rw-r--r--tests/ui/parser/impl-item-type-no-body-semantic-fail.rs1
-rw-r--r--tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr14
-rw-r--r--tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr8
-rw-r--r--tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr4
-rw-r--r--tests/ui/parser/issues/issue-70388-without-witness.fixed2
-rw-r--r--tests/ui/parser/issues/issue-70388-without-witness.rs2
-rw-r--r--tests/ui/parser/issues/issue-73568-lifetime-after-mut.rs1
-rw-r--r--tests/ui/parser/issues/issue-73568-lifetime-after-mut.stderr8
-rw-r--r--tests/ui/parser/pat-recover-ranges.rs19
-rw-r--r--tests/ui/parser/pat-recover-ranges.stderr50
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed2
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs2
-rw-r--r--tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr6
-rw-r--r--tests/ui/pattern/issue-117626.rs21
-rw-r--r--tests/ui/pattern/non-structural-match-types.mir.stderr14
-rw-r--r--tests/ui/pattern/non-structural-match-types.rs2
-rw-r--r--tests/ui/pattern/non-structural-match-types.stderr14
-rw-r--r--tests/ui/pattern/non-structural-match-types.thir.stderr14
-rw-r--r--tests/ui/pattern/usefulness/deny-irrefutable-let-patterns.stderr4
-rw-r--r--tests/ui/pattern/usefulness/issue-119493-type-error-ice.rs13
-rw-r--r--tests/ui/pattern/usefulness/issue-119493-type-error-ice.stderr30
-rw-r--r--tests/ui/pattern/usefulness/issue-119778-type-error-ice.rs13
-rw-r--r--tests/ui/pattern/usefulness/issue-119778-type-error-ice.stderr35
-rw-r--r--tests/ui/pattern/usefulness/issue-57472.rs12
-rw-r--r--tests/ui/pattern/usefulness/issue-57472.stderr6
-rw-r--r--tests/ui/privacy/auxiliary/issue-119463-extern.rs3
-rw-r--r--tests/ui/privacy/issue-119463.rs15
-rw-r--r--tests/ui/privacy/issue-119463.stderr22
-rw-r--r--tests/ui/proc-macro/capture-macro-rules-invoke.stdout2
-rw-r--r--tests/ui/proc-macro/expand-expr.rs4
-rw-r--r--tests/ui/proc-macro/expand-expr.stderr6
-rw-r--r--tests/ui/proc-macro/inner-attrs.rs9
-rw-r--r--tests/ui/proc-macro/inner-attrs.stderr8
-rw-r--r--tests/ui/proc-macro/inner-attrs.stdout356
-rw-r--r--tests/ui/proc-macro/issue-75930-derive-cfg.rs7
-rw-r--r--tests/ui/proc-macro/issue-75930-derive-cfg.stderr4
-rw-r--r--tests/ui/proc-macro/issue-75930-derive-cfg.stdout768
-rw-r--r--tests/ui/proc-macro/meta-macro-hygiene.stdout3
-rw-r--r--tests/ui/proc-macro/nonterminal-token-hygiene.stdout3
-rw-r--r--tests/ui/process/no-stdio.rs2
-rw-r--r--tests/ui/pub/pub-ident-struct-4.fixed2
-rw-r--r--tests/ui/pub/pub-ident-struct-4.rs2
-rw-r--r--tests/ui/pub/pub-ident-struct-4.stderr4
-rw-r--r--tests/ui/range_inclusive.rs2
-rw-r--r--tests/ui/recursion_limit/issue-40003.rs2
-rw-r--r--tests/ui/repr/align-with-extern-c-fn.rs2
-rw-r--r--tests/ui/resolve/auxiliary/suggest-constructor-cycle-error.rs12
-rw-r--r--tests/ui/resolve/issue-5035-2.stderr4
-rw-r--r--tests/ui/resolve/suggest-constructor-cycle-error.rs10
-rw-r--r--tests/ui/resolve/suggest-constructor-cycle-error.stderr15
-rw-r--r--tests/ui/rfcs/rfc-0000-never_patterns/macros.rs49
-rw-r--r--tests/ui/rfcs/rfc-0000-never_patterns/parse.rs5
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs2
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs2
-rw-r--r--tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs2
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs72
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs30
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/warns.stderr4
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs2
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs6
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs2
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.stderr23
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs2
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs39
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.stderr115
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr16
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs86
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr12
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr40
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs10
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.stderr24
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr8
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr19
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.rs2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr47
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs17
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs9
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.stderr65
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr10
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.ny.stderr10
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs3
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr12
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.ny.stderr10
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs4
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr14
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs29
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs (renamed from tests/ui/rfcs/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.rs)0
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs3
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr97
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr34
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr10
-rw-r--r--tests/ui/runtime/running-with-no-runtime.rs2
-rw-r--r--tests/ui/sanitize/badfree.rs2
-rw-r--r--tests/ui/self/arbitrary_self_types_pin_needing_borrow.stderr2
-rw-r--r--tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.rs11
-rw-r--r--tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.stderr2
-rw-r--r--tests/ui/shell-argfiles/shell-argfiles-badquotes.args1
-rw-r--r--tests/ui/shell-argfiles/shell-argfiles-badquotes.rs12
-rw-r--r--tests/ui/shell-argfiles/shell-argfiles-badquotes.stderr2
-rw-r--r--tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args1
-rw-r--r--tests/ui/shell-argfiles/shell-argfiles-via-argfile.args1
-rw-r--r--tests/ui/shell-argfiles/shell-argfiles-via-argfile.rs10
-rw-r--r--tests/ui/shell-argfiles/shell-argfiles.args3
-rw-r--r--tests/ui/shell-argfiles/shell-argfiles.rs19
-rw-r--r--tests/ui/simd/intrinsic/generic-comparison-pass.rs2
-rw-r--r--tests/ui/span/lint-unused-unsafe.rs3
-rw-r--r--tests/ui/span/lint-unused-unsafe.stderr (renamed from tests/ui/span/lint-unused-unsafe.mir.stderr)376
-rw-r--r--tests/ui/span/lint-unused-unsafe.thir.stderr1402
-rw-r--r--tests/ui/specialization/min_specialization/issue-79224.stderr8
-rw-r--r--tests/ui/specialization/specialization-cross-crate.rs2
-rw-r--r--tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs2
-rw-r--r--tests/ui/stability-attribute/generics-default-stability-where.rs1
-rw-r--r--tests/ui/stability-attribute/generics-default-stability-where.stderr14
-rw-r--r--tests/ui/static/reference-of-mut-static-safe.e2021.stderr26
-rw-r--r--tests/ui/static/reference-of-mut-static-safe.e2024.stderr15
-rw-r--r--tests/ui/static/reference-of-mut-static-safe.rs13
-rw-r--r--tests/ui/static/reference-of-mut-static-unsafe-fn.rs23
-rw-r--r--tests/ui/static/reference-of-mut-static-unsafe-fn.stderr63
-rw-r--r--tests/ui/static/reference-of-mut-static.e2021.stderr91
-rw-r--r--tests/ui/static/reference-of-mut-static.e2024.stderr75
-rw-r--r--tests/ui/static/reference-of-mut-static.rs50
-rw-r--r--tests/ui/static/safe-extern-statics-mut.mir.stderr35
-rw-r--r--tests/ui/static/safe-extern-statics-mut.rs4
-rw-r--r--tests/ui/static/safe-extern-statics-mut.stderr64
-rw-r--r--tests/ui/static/safe-extern-statics-mut.thir.stderr35
-rw-r--r--tests/ui/static/safe-extern-statics.mir.stderr35
-rw-r--r--tests/ui/static/safe-extern-statics.rs2
-rw-r--r--tests/ui/static/safe-extern-statics.stderr (renamed from tests/ui/static/safe-extern-statics.thir.stderr)8
-rw-r--r--tests/ui/static/static-mut-foreign-requires-unsafe.mir.stderr27
-rw-r--r--tests/ui/static/static-mut-foreign-requires-unsafe.rs3
-rw-r--r--tests/ui/static/static-mut-foreign-requires-unsafe.stderr (renamed from tests/ui/static/static-mut-foreign-requires-unsafe.thir.stderr)6
-rw-r--r--tests/ui/static/static-mut-requires-unsafe.mir.stderr27
-rw-r--r--tests/ui/static/static-mut-requires-unsafe.rs3
-rw-r--r--tests/ui/static/static-mut-requires-unsafe.stderr (renamed from tests/ui/static/static-mut-requires-unsafe.thir.stderr)6
-rw-r--r--tests/ui/statics/issue-14227.rs3
-rw-r--r--tests/ui/statics/issue-14227.stderr (renamed from tests/ui/statics/issue-14227.mir.stderr)2
-rw-r--r--tests/ui/statics/issue-14227.thir.stderr11
-rw-r--r--tests/ui/statics/issue-15261.rs3
-rw-r--r--tests/ui/statics/issue-15261.stderr17
-rw-r--r--tests/ui/statics/static-mut-xc.rs3
-rw-r--r--tests/ui/statics/static-mut-xc.stderr31
-rw-r--r--tests/ui/statics/static-recursive.rs27
-rw-r--r--tests/ui/statics/static-recursive.stderr17
-rw-r--r--tests/ui/stats/hir-stats.stderr8
-rw-r--r--tests/ui/stdlib-unit-tests/raw-fat-ptr.rs2
-rw-r--r--tests/ui/struct-ctor-mangling.rs2
-rw-r--r--tests/ui/structs-enums/enum-null-pointer-opt.rs6
-rw-r--r--tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs2
-rw-r--r--tests/ui/structs-enums/resource-in-struct.rs2
-rw-r--r--tests/ui/structs-enums/tuple-struct-construct.rs2
-rw-r--r--tests/ui/structs-enums/uninstantiable-struct.rs2
-rw-r--r--tests/ui/suggestions/auxiliary/hidden-struct.rs17
-rw-r--r--tests/ui/suggestions/bad-infer-in-trait-impl.rs1
-rw-r--r--tests/ui/suggestions/bad-infer-in-trait-impl.stderr14
-rw-r--r--tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs15
-rw-r--r--tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr25
-rw-r--r--tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr4
-rw-r--r--tests/ui/suggestions/fn-trait-notation.fixed1
-rw-r--r--tests/ui/suggestions/fn-trait-notation.rs1
-rw-r--r--tests/ui/suggestions/fn-trait-notation.stderr18
-rw-r--r--tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs6
-rw-r--r--tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr38
-rw-r--r--tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed2
-rw-r--r--tests/ui/suggestions/lifetimes/type-param-bound-scope.rs2
-rw-r--r--tests/ui/suggestions/missing-lifetime-specifier.rs13
-rw-r--r--tests/ui/suggestions/missing-lifetime-specifier.stderr183
-rw-r--r--tests/ui/tag-type-args.rs1
-rw-r--r--tests/ui/tag-type-args.stderr16
-rw-r--r--tests/ui/target-feature/invalid-attribute.rs4
-rw-r--r--tests/ui/target-feature/invalid-attribute.stderr22
-rw-r--r--tests/ui/thread-local/thread-local-static.rs5
-rw-r--r--tests/ui/thread-local/thread-local-static.stderr (renamed from tests/ui/thread-local/thread-local-static.mir.stderr)41
-rw-r--r--tests/ui/thread-local/thread-local-static.thir.stderr17
-rw-r--r--tests/ui/threads-sendsync/issue-43733.mir.stderr19
-rw-r--r--tests/ui/threads-sendsync/issue-43733.rs8
-rw-r--r--tests/ui/threads-sendsync/issue-43733.stderr (renamed from tests/ui/threads-sendsync/issue-43733.thir.stderr)4
-rw-r--r--tests/ui/trailing-comma.rs4
-rw-r--r--tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.rs3
-rw-r--r--tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr39
-rw-r--r--tests/ui/traits/augmented-assignments-trait.rs2
-rw-r--r--tests/ui/traits/bound/not-on-bare-trait-2021.rs19
-rw-r--r--tests/ui/traits/bound/not-on-bare-trait-2021.stderr91
-rw-r--r--tests/ui/traits/bound/not-on-bare-trait.rs3
-rw-r--r--tests/ui/traits/bound/not-on-bare-trait.stderr37
-rw-r--r--tests/ui/traits/cycle-cache-err-60010.rs3
-rw-r--r--tests/ui/traits/cycle-cache-err-60010.stderr59
-rw-r--r--tests/ui/traits/issue-106072.rs1
-rw-r--r--tests/ui/traits/issue-106072.stderr19
-rw-r--r--tests/ui/traits/issue-28576.rs2
-rw-r--r--tests/ui/traits/issue-28576.stderr51
-rw-r--r--tests/ui/traits/issue-38404.rs3
-rw-r--r--tests/ui/traits/issue-38404.stderr25
-rw-r--r--tests/ui/traits/issue-87558.rs2
-rw-r--r--tests/ui/traits/issue-87558.stderr26
-rw-r--r--tests/ui/traits/negative-bounds/associated-constraints.rs4
-rw-r--r--tests/ui/traits/negative-bounds/associated-constraints.stderr20
-rw-r--r--tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs23
-rw-r--r--tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr69
-rw-r--r--tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs9
-rw-r--r--tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr21
-rw-r--r--tests/ui/traits/negative-bounds/simple.rs1
-rw-r--r--tests/ui/traits/negative-bounds/simple.stderr26
-rw-r--r--tests/ui/traits/negative-bounds/supertrait.rs1
-rw-r--r--tests/ui/traits/negative-bounds/supertrait.stderr10
-rw-r--r--tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs2
-rw-r--r--tests/ui/traits/next-solver/specialization-transmute.rs6
-rw-r--r--tests/ui/traits/next-solver/specialization-transmute.stderr11
-rw-r--r--tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs2
-rw-r--r--tests/ui/traits/object/exclusion.rs2
-rw-r--r--tests/ui/traits/object/generics.rs2
-rw-r--r--tests/ui/traits/object/object-unsafe-missing-assoc-type.rs3
-rw-r--r--tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr49
-rw-r--r--tests/ui/traits/pointee-deduction.rs4
-rw-r--r--tests/ui/traits/principal-less-objects.rs2
-rw-r--r--tests/ui/traits/safety-fn-body.mir.stderr11
-rw-r--r--tests/ui/traits/safety-fn-body.rs3
-rw-r--r--tests/ui/traits/safety-fn-body.stderr (renamed from tests/ui/traits/safety-fn-body.thir.stderr)2
-rw-r--r--tests/ui/transmutability/issue-101739-2.rs1
-rw-r--r--tests/ui/transmutability/issue-101739-2.stderr18
-rw-r--r--tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.rs26
-rw-r--r--tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.stderr21
-rw-r--r--tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs2
-rw-r--r--tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr5
-rw-r--r--tests/ui/type-alias-impl-trait/generic_underconstrained.stderr22
-rw-r--r--tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr44
-rw-r--r--tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr31
-rw-r--r--tests/ui/type-alias-impl-trait/issue-53092-2.stderr16
-rw-r--r--tests/ui/type-alias-impl-trait/issue-77179.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.rs4
-rw-r--r--tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.stderr24
-rw-r--r--tests/ui/type-alias-impl-trait/nested-in-anon-const.rs21
-rw-r--r--tests/ui/type-alias-impl-trait/nested-in-anon-const.stderr20
-rw-r--r--tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.stderr4
-rw-r--r--tests/ui/typeck/escaping_bound_vars.rs4
-rw-r--r--tests/ui/typeck/escaping_bound_vars.stderr52
-rw-r--r--tests/ui/typeck/issue-104513-ice.rs2
-rw-r--r--tests/ui/typeck/issue-104513-ice.stderr4
-rw-r--r--tests/ui/typeck/issue-110052.rs2
-rw-r--r--tests/ui/typeck/issue-2063.rs2
-rw-r--r--tests/ui/typeck/issue-79040.rs1
-rw-r--r--tests/ui/typeck/issue-79040.stderr12
-rw-r--r--tests/ui/typeck/typeck-builtin-bound-type-parameters.rs5
-rw-r--r--tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr24
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_item.rs1
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_item.stderr37
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_item_help.rs4
-rw-r--r--tests/ui/typeck/typeck_type_placeholder_item_help.stderr27
-rw-r--r--tests/ui/ufcs/ufcs-explicit-self-bad.stderr34
-rw-r--r--tests/ui/unboxed-closures/type-id-higher-rank.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr28
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs10
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr68
-rw-r--r--tests/ui/union/union-align.rs2
-rw-r--r--tests/ui/union/union-backcomp.rs2
-rw-r--r--tests/ui/union/union-basic.rs2
-rw-r--r--tests/ui/union/union-borrow-move-parent-sibling.mirunsafeck.stderr84
-rw-r--r--tests/ui/union/union-borrow-move-parent-sibling.rs3
-rw-r--r--tests/ui/union/union-borrow-move-parent-sibling.stderr (renamed from tests/ui/union/union-borrow-move-parent-sibling.thirunsafeck.stderr)14
-rw-r--r--tests/ui/union/union-const-codegen.rs2
-rw-r--r--tests/ui/union/union-const-eval-field.rs2
-rw-r--r--tests/ui/union/union-const-eval.rs2
-rw-r--r--tests/ui/union/union-deref.rs3
-rw-r--r--tests/ui/union/union-deref.stderr (renamed from tests/ui/union/union-deref.mirunsafeck.stderr)12
-rw-r--r--tests/ui/union/union-deref.thirunsafeck.stderr56
-rw-r--r--tests/ui/union/union-derive-clone.rs3
-rw-r--r--tests/ui/union/union-derive-clone.stderr (renamed from tests/ui/union/union-derive-clone.mirunsafeck.stderr)6
-rw-r--r--tests/ui/union/union-derive-clone.thirunsafeck.stderr45
-rw-r--r--tests/ui/union/union-derive-eq.rs3
-rw-r--r--tests/ui/union/union-derive-eq.stderr (renamed from tests/ui/union/union-derive-eq.mirunsafeck.stderr)2
-rw-r--r--tests/ui/union/union-derive-eq.thirunsafeck.stderr21
-rw-r--r--tests/ui/union/union-derive-rpass.rs2
-rw-r--r--tests/ui/union/union-drop.rs2
-rw-r--r--tests/ui/union/union-fields-1.mirunsafeck.stderr42
-rw-r--r--tests/ui/union/union-fields-1.rs3
-rw-r--r--tests/ui/union/union-fields-1.stderr (renamed from tests/ui/union/union-fields-1.thirunsafeck.stderr)10
-rw-r--r--tests/ui/union/union-fields-2.mirunsafeck.stderr84
-rw-r--r--tests/ui/union/union-fields-2.rs3
-rw-r--r--tests/ui/union/union-fields-2.stderr (renamed from tests/ui/union/union-fields-2.thirunsafeck.stderr)26
-rw-r--r--tests/ui/union/union-generic-rpass.rs3
-rw-r--r--tests/ui/union/union-generic.rs3
-rw-r--r--tests/ui/union/union-generic.stderr (renamed from tests/ui/union/union-generic.mirunsafeck.stderr)8
-rw-r--r--tests/ui/union/union-generic.thirunsafeck.stderr27
-rw-r--r--tests/ui/union/union-inherent-method.rs2
-rw-r--r--tests/ui/union/union-lint-dead-code.mirunsafeck.stderr17
-rw-r--r--tests/ui/union/union-lint-dead-code.rs3
-rw-r--r--tests/ui/union/union-lint-dead-code.stderr (renamed from tests/ui/union/union-lint-dead-code.thirunsafeck.stderr)4
-rw-r--r--tests/ui/union/union-macro.rs2
-rw-r--r--tests/ui/union/union-manuallydrop-rpass.rs7
-rw-r--r--tests/ui/union/union-move.rs3
-rw-r--r--tests/ui/union/union-move.stderr (renamed from tests/ui/union/union-move.mirunsafeck.stderr)10
-rw-r--r--tests/ui/union/union-move.thirunsafeck.stderr51
-rw-r--r--tests/ui/union/union-nodrop.rs16
-rw-r--r--tests/ui/union/union-nonzero.rs2
-rw-r--r--tests/ui/union/union-overwrite.rs2
-rw-r--r--tests/ui/union/union-packed.rs2
-rw-r--r--tests/ui/union/union-pat-refutability.rs7
-rw-r--r--tests/ui/union/union-suggest-field.rs3
-rw-r--r--tests/ui/union/union-suggest-field.stderr (renamed from tests/ui/union/union-suggest-field.mirunsafeck.stderr)6
-rw-r--r--tests/ui/union/union-suggest-field.thirunsafeck.stderr37
-rw-r--r--tests/ui/union/union-trait-impl.rs2
-rw-r--r--tests/ui/union/union-transmute.rs2
-rw-r--r--tests/ui/union/union-unsafe.mir.stderr83
-rw-r--r--tests/ui/union/union-unsafe.rs4
-rw-r--r--tests/ui/union/union-unsafe.stderr (renamed from tests/ui/union/union-unsafe.thir.stderr)20
-rw-r--r--tests/ui/union/union-unsized.rs3
-rw-r--r--tests/ui/union/union-unsized.stderr (renamed from tests/ui/union/union-unsized.mirunsafeck.stderr)30
-rw-r--r--tests/ui/union/union-unsized.thirunsafeck.stderr64
-rw-r--r--tests/ui/union/union-with-drop-fields.rs3
-rw-r--r--tests/ui/union/union-with-drop-fields.stderr (renamed from tests/ui/union/union-with-drop-fields.mirunsafeck.stderr)6
-rw-r--r--tests/ui/union/union-with-drop-fields.thirunsafeck.stderr39
-rw-r--r--tests/ui/unsafe/access_union_field.rs3
-rw-r--r--tests/ui/unsafe/access_union_field.stderr (renamed from tests/ui/unsafe/access_union_field.mir.stderr)4
-rw-r--r--tests/ui/unsafe/access_union_field.thir.stderr19
-rw-r--r--tests/ui/unsafe/const_pat_in_layout_restricted.rs24
-rw-r--r--tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.mir.stderr16
-rw-r--r--tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs6
-rw-r--r--tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr (renamed from tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.thir.stderr)4
-rw-r--r--tests/ui/unsafe/foreign-unsafe-fn-called.mir.stderr11
-rw-r--r--tests/ui/unsafe/foreign-unsafe-fn-called.rs6
-rw-r--r--tests/ui/unsafe/foreign-unsafe-fn-called.stderr (renamed from tests/ui/unsafe/foreign-unsafe-fn-called.thir.stderr)2
-rw-r--r--tests/ui/unsafe/inline_asm.mir.stderr11
-rw-r--r--tests/ui/unsafe/inline_asm.rs2
-rw-r--r--tests/ui/unsafe/inline_asm.stderr (renamed from tests/ui/unsafe/inline_asm.thir.stderr)2
-rw-r--r--tests/ui/unsafe/issue-3080.mir.stderr11
-rw-r--r--tests/ui/unsafe/issue-3080.rs3
-rw-r--r--tests/ui/unsafe/issue-3080.stderr (renamed from tests/ui/unsafe/issue-3080.thir.stderr)2
-rw-r--r--tests/ui/unsafe/issue-45087-unreachable-unsafe.mir.stderr27
-rw-r--r--tests/ui/unsafe/issue-45087-unreachable-unsafe.rs2
-rw-r--r--tests/ui/unsafe/issue-45087-unreachable-unsafe.stderr (renamed from tests/ui/unsafe/issue-45087-unreachable-unsafe.thir.stderr)6
-rw-r--r--tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.mir.stderr35
-rw-r--r--tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.rs3
-rw-r--r--tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.stderr (renamed from tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.thir.stderr)8
-rw-r--r--tests/ui/unsafe/issue-47412.rs3
-rw-r--r--tests/ui/unsafe/issue-47412.stderr (renamed from tests/ui/unsafe/issue-47412.mir.stderr)4
-rw-r--r--tests/ui/unsafe/issue-47412.thir.stderr19
-rw-r--r--tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs2
-rw-r--r--tests/ui/unsafe/issue-87414-query-cycle.rs1
-rw-r--r--tests/ui/unsafe/ranged_ints.rs3
-rw-r--r--tests/ui/unsafe/ranged_ints.stderr (renamed from tests/ui/unsafe/ranged_ints.mir.stderr)2
-rw-r--r--tests/ui/unsafe/ranged_ints.thir.stderr11
-rw-r--r--tests/ui/unsafe/ranged_ints2.rs3
-rw-r--r--tests/ui/unsafe/ranged_ints2.stderr (renamed from tests/ui/unsafe/ranged_ints2.mirunsafeck.stderr)4
-rw-r--r--tests/ui/unsafe/ranged_ints2.thirunsafeck.stderr19
-rw-r--r--tests/ui/unsafe/ranged_ints2_const.mirunsafeck.stderr39
-rw-r--r--tests/ui/unsafe/ranged_ints2_const.rs3
-rw-r--r--tests/ui/unsafe/ranged_ints2_const.stderr (renamed from tests/ui/unsafe/ranged_ints2_const.thirunsafeck.stderr)8
-rw-r--r--tests/ui/unsafe/ranged_ints3.rs3
-rw-r--r--tests/ui/unsafe/ranged_ints3.stderr (renamed from tests/ui/unsafe/ranged_ints3.mirunsafeck.stderr)2
-rw-r--r--tests/ui/unsafe/ranged_ints3.thirunsafeck.stderr11
-rw-r--r--tests/ui/unsafe/ranged_ints3_const.rs3
-rw-r--r--tests/ui/unsafe/ranged_ints3_const.stderr (renamed from tests/ui/unsafe/ranged_ints3_const.mirunsafeck.stderr)20
-rw-r--r--tests/ui/unsafe/ranged_ints3_const.thirunsafeck.stderr30
-rw-r--r--tests/ui/unsafe/ranged_ints3_match.rs3
-rw-r--r--tests/ui/unsafe/ranged_ints3_match.stderr (renamed from tests/ui/unsafe/ranged_ints3_match.mirunsafeck.stderr)4
-rw-r--r--tests/ui/unsafe/ranged_ints3_match.thirunsafeck.stderr19
-rw-r--r--tests/ui/unsafe/ranged_ints4.mirunsafeck.stderr11
-rw-r--r--tests/ui/unsafe/ranged_ints4.rs3
-rw-r--r--tests/ui/unsafe/ranged_ints4.stderr (renamed from tests/ui/unsafe/ranged_ints4.thirunsafeck.stderr)2
-rw-r--r--tests/ui/unsafe/ranged_ints4_const.rs3
-rw-r--r--tests/ui/unsafe/ranged_ints4_const.stderr (renamed from tests/ui/unsafe/ranged_ints4_const.mirunsafeck.stderr)2
-rw-r--r--tests/ui/unsafe/ranged_ints4_const.thirunsafeck.stderr11
-rw-r--r--tests/ui/unsafe/ranged_ints_const.rs3
-rw-r--r--tests/ui/unsafe/ranged_ints_const.stderr (renamed from tests/ui/unsafe/ranged_ints_const.mir.stderr)2
-rw-r--r--tests/ui/unsafe/ranged_ints_const.thir.stderr11
-rw-r--r--tests/ui/unsafe/ranged_ints_macro.rs2
-rw-r--r--tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.mir.stderr112
-rw-r--r--tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.rs15
-rw-r--r--tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.stderr (renamed from tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.thir.stderr)32
-rw-r--r--tests/ui/unsafe/union-assignop.mirunsafeck.stderr51
-rw-r--r--tests/ui/unsafe/union-assignop.rs3
-rw-r--r--tests/ui/unsafe/union-assignop.stderr (renamed from tests/ui/unsafe/union-assignop.thirunsafeck.stderr)12
-rw-r--r--tests/ui/unsafe/union-modification.rs3
-rw-r--r--tests/ui/unsafe/union.mir.stderr19
-rw-r--r--tests/ui/unsafe/union.rs12
-rw-r--r--tests/ui/unsafe/union.stderr (renamed from tests/ui/unsafe/union.thir.stderr)12
-rw-r--r--tests/ui/unsafe/union_access_through_block.rs3
-rw-r--r--tests/ui/unsafe/union_destructure.mir.stderr16
-rw-r--r--tests/ui/unsafe/union_destructure.rs14
-rw-r--r--tests/ui/unsafe/union_wild_or_wild.rs3
-rw-r--r--tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.mir.stderr20
-rw-r--r--tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs2
-rw-r--r--tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.stderr (renamed from tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.thir.stderr)6
-rw-r--r--tests/ui/unsafe/unsafe-assign.rs3
-rw-r--r--tests/ui/unsafe/unsafe-assign.stderr (renamed from tests/ui/unsafe/unsafe-assign.mirunsafeck.stderr)2
-rw-r--r--tests/ui/unsafe/unsafe-assign.thirunsafeck.stderr11
-rw-r--r--tests/ui/unsafe/unsafe-borrow.rs3
-rw-r--r--tests/ui/unsafe/unsafe-borrow.stderr (renamed from tests/ui/unsafe/unsafe-borrow.mirunsafeck.stderr)6
-rw-r--r--tests/ui/unsafe/unsafe-borrow.thirunsafeck.stderr27
-rw-r--r--tests/ui/unsafe/unsafe-const-fn.mir.stderr11
-rw-r--r--tests/ui/unsafe/unsafe-const-fn.rs3
-rw-r--r--tests/ui/unsafe/unsafe-const-fn.stderr (renamed from tests/ui/unsafe/unsafe-const-fn.thir.stderr)2
-rw-r--r--tests/ui/unsafe/unsafe-fn-assign-deref-ptr.mir.stderr11
-rw-r--r--tests/ui/unsafe/unsafe-fn-assign-deref-ptr.rs3
-rw-r--r--tests/ui/unsafe/unsafe-fn-assign-deref-ptr.stderr (renamed from tests/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr)2
-rw-r--r--tests/ui/unsafe/unsafe-fn-called-from-safe.mir.stderr11
-rw-r--r--tests/ui/unsafe/unsafe-fn-called-from-safe.rs10
-rw-r--r--tests/ui/unsafe/unsafe-fn-called-from-safe.stderr (renamed from tests/ui/unsafe/unsafe-fn-called-from-safe.thir.stderr)2
-rw-r--r--tests/ui/unsafe/unsafe-fn-deref-ptr.rs3
-rw-r--r--tests/ui/unsafe/unsafe-fn-deref-ptr.stderr (renamed from tests/ui/unsafe/unsafe-fn-deref-ptr.mir.stderr)8
-rw-r--r--tests/ui/unsafe/unsafe-fn-deref-ptr.thir.stderr35
-rw-r--r--tests/ui/unsafe/unsafe-fn-used-as-value.mir.stderr11
-rw-r--r--tests/ui/unsafe/unsafe-fn-used-as-value.rs10
-rw-r--r--tests/ui/unsafe/unsafe-fn-used-as-value.stderr (renamed from tests/ui/unsafe/unsafe-fn-used-as-value.thir.stderr)2
-rw-r--r--tests/ui/unsafe/unsafe-not-inherited.mirunsafeck.stderr24
-rw-r--r--tests/ui/unsafe/unsafe-not-inherited.rs2
-rw-r--r--tests/ui/unsafe/unsafe-not-inherited.stderr (renamed from tests/ui/unsafe/unsafe-not-inherited.thirunsafeck.stderr)4
-rw-r--r--tests/ui/unsafe/unsafe-unstable-const-fn.rs3
-rw-r--r--tests/ui/unsafe/unsafe-unstable-const-fn.stderr (renamed from tests/ui/unsafe/unsafe-unstable-const-fn.mir.stderr)2
-rw-r--r--tests/ui/unsafe/unsafe-unstable-const-fn.thir.stderr11
-rw-r--r--tests/ui/unsafe/wrapping-unsafe-block-sugg.fixed (renamed from tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.fixed)18
-rw-r--r--tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.fixed73
-rw-r--r--tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.stderr99
-rw-r--r--tests/ui/unsafe/wrapping-unsafe-block-sugg.rs18
-rw-r--r--tests/ui/unsafe/wrapping-unsafe-block-sugg.stderr (renamed from tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.stderr)26
-rw-r--r--tests/ui/unsized-locals/unsized-exprs-rpass.rs2
-rw-r--r--tests/ui/unsized/unchanged-param.rs4
-rw-r--r--tests/ui/unused-crate-deps/test.mk7
-rw-r--r--tests/ui/wf/hir-wf-check-erase-regions.stderr24
1057 files changed, 10672 insertions, 8390 deletions
diff --git a/tests/assembly/asm/s390x-types.rs b/tests/assembly/asm/s390x-types.rs
index 2fb404dd9b2..c39a82c3b1c 100644
--- a/tests/assembly/asm/s390x-types.rs
+++ b/tests/assembly/asm/s390x-types.rs
@@ -112,6 +112,30 @@ check!(reg_i32, i32, reg, "lgr");
 // CHECK: #NO_APP
 check!(reg_i64, i64, reg, "lgr");
 
+// CHECK-LABEL: reg_i8_addr:
+// CHECK: #APP
+// CHECK: lgr %r{{[0-9]+}}, %r{{[0-9]+}}
+// CHECK: #NO_APP
+check!(reg_i8_addr, i8, reg_addr, "lgr");
+
+// CHECK-LABEL: reg_i16_addr:
+// CHECK: #APP
+// CHECK: lgr %r{{[0-9]+}}, %r{{[0-9]+}}
+// CHECK: #NO_APP
+check!(reg_i16_addr, i16, reg_addr, "lgr");
+
+// CHECK-LABEL: reg_i32_addr:
+// CHECK: #APP
+// CHECK: lgr %r{{[0-9]+}}, %r{{[0-9]+}}
+// CHECK: #NO_APP
+check!(reg_i32_addr, i32, reg_addr, "lgr");
+
+// CHECK-LABEL: reg_i64_addr:
+// CHECK: #APP
+// CHECK: lgr %r{{[0-9]+}}, %r{{[0-9]+}}
+// CHECK: #NO_APP
+check!(reg_i64_addr, i64, reg_addr, "lgr");
+
 // CHECK-LABEL: reg_f32:
 // CHECK: #APP
 // CHECK: ler %f{{[0-9]+}}, %f{{[0-9]+}}
diff --git a/tests/codegen-units/item-collection/generic-drop-glue.rs b/tests/codegen-units/item-collection/generic-drop-glue.rs
index 6df4ff7e58b..ca477d06610 100644
--- a/tests/codegen-units/item-collection/generic-drop-glue.rs
+++ b/tests/codegen-units/item-collection/generic-drop-glue.rs
@@ -34,9 +34,9 @@ enum EnumNoDrop<T1, T2> {
 }
 
 
-struct NonGenericNoDrop(#[allow(unused_tuple_struct_fields)] i32);
+struct NonGenericNoDrop(#[allow(dead_code)] i32);
 
-struct NonGenericWithDrop(#[allow(unused_tuple_struct_fields)] i32);
+struct NonGenericWithDrop(#[allow(dead_code)] i32);
 //~ MONO_ITEM fn std::ptr::drop_in_place::<NonGenericWithDrop> - shim(Some(NonGenericWithDrop)) @@ generic_drop_glue-cgu.0[Internal]
 
 impl Drop for NonGenericWithDrop {
diff --git a/tests/codegen-units/item-collection/transitive-drop-glue.rs b/tests/codegen-units/item-collection/transitive-drop-glue.rs
index e286c800b7c..5f20637b40f 100644
--- a/tests/codegen-units/item-collection/transitive-drop-glue.rs
+++ b/tests/codegen-units/item-collection/transitive-drop-glue.rs
@@ -6,9 +6,9 @@
 #![feature(start)]
 
 //~ MONO_ITEM fn std::ptr::drop_in_place::<Root> - shim(Some(Root)) @@ transitive_drop_glue-cgu.0[Internal]
-struct Root(#[allow(unused_tuple_struct_fields)] Intermediate);
+struct Root(#[allow(dead_code)] Intermediate);
 //~ MONO_ITEM fn std::ptr::drop_in_place::<Intermediate> - shim(Some(Intermediate)) @@ transitive_drop_glue-cgu.0[Internal]
-struct Intermediate(#[allow(unused_tuple_struct_fields)] Leaf);
+struct Intermediate(#[allow(dead_code)] Leaf);
 //~ MONO_ITEM fn std::ptr::drop_in_place::<Leaf> - shim(Some(Leaf)) @@ transitive_drop_glue-cgu.0[Internal]
 struct Leaf;
 
@@ -17,9 +17,9 @@ impl Drop for Leaf {
     fn drop(&mut self) {}
 }
 
-struct RootGen<T>(#[allow(unused_tuple_struct_fields)] IntermediateGen<T>);
-struct IntermediateGen<T>(#[allow(unused_tuple_struct_fields)] LeafGen<T>);
-struct LeafGen<T>(#[allow(unused_tuple_struct_fields)] T);
+struct RootGen<T>(#[allow(dead_code)] IntermediateGen<T>);
+struct IntermediateGen<T>(#[allow(dead_code)] LeafGen<T>);
+struct LeafGen<T>(#[allow(dead_code)] T);
 
 impl<T> Drop for LeafGen<T> {
     fn drop(&mut self) {}
diff --git a/tests/codegen-units/item-collection/unsizing.rs b/tests/codegen-units/item-collection/unsizing.rs
index 111a7231209..34f52ce4e61 100644
--- a/tests/codegen-units/item-collection/unsizing.rs
+++ b/tests/codegen-units/item-collection/unsizing.rs
@@ -40,7 +40,7 @@ impl Trait for u32 {
 }
 
 #[derive(Clone, Copy)]
-struct Wrapper<T: ?Sized>(#[allow(unused_tuple_struct_fields)] *const T);
+struct Wrapper<T: ?Sized>(#[allow(dead_code)] *const T);
 
 impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Wrapper<U>> for Wrapper<T> {}
 
diff --git a/tests/codegen/align-byval.rs b/tests/codegen/align-byval.rs
index e2446e02ef4..c6e3a8ef5f0 100644
--- a/tests/codegen/align-byval.rs
+++ b/tests/codegen/align-byval.rs
@@ -106,21 +106,21 @@ pub struct ForceAlign16 {
 pub unsafe fn call_na1(x: NaturalAlign1) {
     // CHECK: start:
 
-    // m68k: [[ALLOCA:%[a-z0-9+]]] = alloca { i8, i8 }, align 1
-    // m68k: call void @natural_align_1({{.*}}byval({ i8, i8 }) align 1{{.*}} [[ALLOCA]])
+    // m68k: [[ALLOCA:%[a-z0-9+]]] = alloca %NaturalAlign1, align 1
+    // m68k: call void @natural_align_1({{.*}}byval(%NaturalAlign1) align 1{{.*}} [[ALLOCA]])
 
-    // wasm: [[ALLOCA:%[a-z0-9+]]] = alloca { i8, i8 }, align 1
-    // wasm: call void @natural_align_1({{.*}}byval({ i8, i8 }) align 1{{.*}} [[ALLOCA]])
+    // wasm: [[ALLOCA:%[a-z0-9+]]] = alloca %NaturalAlign1, align 1
+    // wasm: call void @natural_align_1({{.*}}byval(%NaturalAlign1) align 1{{.*}} [[ALLOCA]])
 
     // x86_64-linux: call void @natural_align_1(i16
 
     // x86_64-windows: call void @natural_align_1(i16
 
-    // i686-linux: [[ALLOCA:%[a-z0-9+]]] = alloca { i8, i8 }, align 4
-    // i686-linux: call void @natural_align_1({{.*}}byval({ i8, i8 }) align 4{{.*}} [[ALLOCA]])
+    // i686-linux: [[ALLOCA:%[a-z0-9+]]] = alloca %NaturalAlign1, align 4
+    // i686-linux: call void @natural_align_1({{.*}}byval(%NaturalAlign1) align 4{{.*}} [[ALLOCA]])
 
-    // i686-windows: [[ALLOCA:%[a-z0-9+]]] = alloca { i8, i8 }, align 4
-    // i686-windows: call void @natural_align_1({{.*}}byval({ i8, i8 }) align 4{{.*}} [[ALLOCA]])
+    // i686-windows: [[ALLOCA:%[a-z0-9+]]] = alloca %NaturalAlign1, align 4
+    // i686-windows: call void @natural_align_1({{.*}}byval(%NaturalAlign1) align 4{{.*}} [[ALLOCA]])
     natural_align_1(x);
 }
 
@@ -199,17 +199,17 @@ pub unsafe fn call_fa16(x: ForceAlign16) {
 }
 
 extern "C" {
-    // m68k: declare void @natural_align_1({{.*}}byval({ i8, i8 }) align 1{{.*}})
+    // m68k: declare void @natural_align_1({{.*}}byval(%NaturalAlign1) align 1{{.*}})
 
-    // wasm: declare void @natural_align_1({{.*}}byval({ i8, i8 }) align 1{{.*}})
+    // wasm: declare void @natural_align_1({{.*}}byval(%NaturalAlign1) align 1{{.*}})
 
     // x86_64-linux: declare void @natural_align_1(i16)
 
     // x86_64-windows: declare void @natural_align_1(i16)
 
-    // i686-linux: declare void @natural_align_1({{.*}}byval({ i8, i8 }) align 4{{.*}})
+    // i686-linux: declare void @natural_align_1({{.*}}byval(%NaturalAlign1) align 4{{.*}})
 
-    // i686-windows: declare void @natural_align_1({{.*}}byval({ i8, i8 }) align 4{{.*}})
+    // i686-windows: declare void @natural_align_1({{.*}}byval(%NaturalAlign1) align 4{{.*}})
     fn natural_align_1(x: NaturalAlign1);
 
     // m68k: declare void @natural_align_2({{.*}}byval(%NaturalAlign2) align 2{{.*}})
diff --git a/tests/codegen/align-struct.rs b/tests/codegen/align-struct.rs
index 40bba6d5254..d483a2ba151 100644
--- a/tests/codegen/align-struct.rs
+++ b/tests/codegen/align-struct.rs
@@ -57,7 +57,7 @@ pub fn nested64(a: Align64, b: i32, c: i32, d: i8) -> Nested64 {
 // CHECK-LABEL: @enum4
 #[no_mangle]
 pub fn enum4(a: i32) -> Enum4 {
-// CHECK: %e4 = alloca { i32, i32 }, align 4
+// CHECK: %e4 = alloca %Enum4, align 4
     let e4 = Enum4::A(a);
     e4
 }
diff --git a/tests/codegen/function-arguments-noopt.rs b/tests/codegen/function-arguments-noopt.rs
index 8fe6c790dda..1bd735cc1af 100644
--- a/tests/codegen/function-arguments-noopt.rs
+++ b/tests/codegen/function-arguments-noopt.rs
@@ -55,7 +55,7 @@ pub fn struct_call(x: S, f: fn(S) -> S) -> S {
   f(x)
 }
 
-// CHECK: { i8, i8 } @enum_(i1 zeroext %x.0, i8 %x.1)
+// CHECK: { i1, i8 } @enum_(i1 zeroext %x.0, i8 %x.1)
 #[no_mangle]
 pub fn enum_(x: Option<u8>) -> Option<u8> {
   x
@@ -64,6 +64,6 @@ pub fn enum_(x: Option<u8>) -> Option<u8> {
 // CHECK-LABEL: @enum_call
 #[no_mangle]
 pub fn enum_call(x: Option<u8>, f: fn(Option<u8>) -> Option<u8>) -> Option<u8> {
-  // CHECK: call { i8, i8 } %f(i1 zeroext %x.0, i8 %x.1)
+  // CHECK: call { i1, i8 } %f(i1 zeroext %x.0, i8 %x.1)
   f(x)
 }
diff --git a/tests/codegen/function-arguments.rs b/tests/codegen/function-arguments.rs
index a218596da1d..64ebd3c05af 100644
--- a/tests/codegen/function-arguments.rs
+++ b/tests/codegen/function-arguments.rs
@@ -275,7 +275,7 @@ pub fn enum_id_1(x: Option<Result<u16, u16>>) -> Option<Result<u16, u16>> {
   x
 }
 
-// CHECK: { i8, i8 } @enum_id_2(i1 noundef zeroext %x.0, i8 %x.1)
+// CHECK: { i1, i8 } @enum_id_2(i1 noundef zeroext %x.0, i8 %x.1)
 #[no_mangle]
 pub fn enum_id_2(x: Option<u8>) -> Option<u8> {
   x
diff --git a/tests/codegen/intrinsics/transmute.rs b/tests/codegen/intrinsics/transmute.rs
index e64af33ab6c..eff16050875 100644
--- a/tests/codegen/intrinsics/transmute.rs
+++ b/tests/codegen/intrinsics/transmute.rs
@@ -190,7 +190,7 @@ pub unsafe fn check_byte_from_bool(x: bool) -> u8 {
 // CHECK-LABEL: @check_to_pair(
 #[no_mangle]
 pub unsafe fn check_to_pair(x: u64) -> Option<i32> {
-    // CHECK: %_0 = alloca { i32, i32 }, align 4
+    // CHECK: %_0 = alloca %"core::option::Option<i32>", align 4
     // CHECK: store i64 %x, ptr %_0, align 4
     transmute(x)
 }
@@ -203,10 +203,10 @@ pub unsafe fn check_from_pair(x: Option<i32>) -> u64 {
     const { assert!(std::mem::align_of::<Option<i32>>() == 4) };
 
     // CHECK: %_0 = alloca i64, align 8
-    // CHECK: store i32 %x.0, ptr %0, align 8
-    // CHECK: store i32 %x.1, ptr %1, align 4
-    // CHECK: %2 = load i64, ptr %_0, align 8
-    // CHECK: ret i64 %2
+    // CHECK: store i32 %x.0, ptr %_0, align 8
+    // CHECK: store i32 %x.1, ptr %0, align 4
+    // CHECK: %[[R:.+]] = load i64, ptr %_0, align 8
+    // CHECK: ret i64 %[[R]]
     transmute(x)
 }
 
diff --git a/tests/codegen/maybeuninit-rvo.rs b/tests/codegen/maybeuninit-rvo.rs
new file mode 100644
index 00000000000..feed513e1fb
--- /dev/null
+++ b/tests/codegen/maybeuninit-rvo.rs
@@ -0,0 +1,33 @@
+// compile-flags: -O
+#![feature(c_unwind)]
+#![crate_type = "lib"]
+
+pub struct Foo([u8; 1000]);
+
+extern "C" {
+    fn init(p: *mut Foo);
+}
+
+pub fn new_from_uninit() -> Foo {
+    // CHECK-LABEL: new_from_uninit
+    // CHECK-NOT: call void @llvm.memcpy.
+    let mut x = std::mem::MaybeUninit::uninit();
+    unsafe {
+        init(x.as_mut_ptr());
+        x.assume_init()
+    }
+}
+
+extern "C-unwind" {
+    fn init_unwind(p: *mut Foo);
+}
+
+pub fn new_from_uninit_unwind() -> Foo {
+    // CHECK-LABEL: new_from_uninit
+    // CHECK: call void @llvm.memcpy.
+    let mut x = std::mem::MaybeUninit::uninit();
+    unsafe {
+        init_unwind(x.as_mut_ptr());
+        x.assume_init()
+    }
+}
diff --git a/tests/codegen/personality_lifetimes.rs b/tests/codegen/personality_lifetimes.rs
index b39718a8d08..e2bc0ebcb37 100644
--- a/tests/codegen/personality_lifetimes.rs
+++ b/tests/codegen/personality_lifetimes.rs
@@ -24,7 +24,7 @@ pub fn test() {
     let _s = S;
     // Check that the personality slot alloca gets a lifetime start in each cleanup block, not just
     // in the first one.
-    // CHECK: [[SLOT:%[0-9]+]] = alloca { ptr, i32 }
+    // CHECK: [[SLOT:%[0-9]+]] = alloca { ptr, i32{{.*}} }
     // CHECK-LABEL: cleanup:
     // CHECK: call void @llvm.lifetime.start.{{.*}}({{.*}})
     // CHECK-LABEL: cleanup1:
diff --git a/tests/codegen/refs.rs b/tests/codegen/refs.rs
index 1c7746a3079..9e1205f5d1d 100644
--- a/tests/codegen/refs.rs
+++ b/tests/codegen/refs.rs
@@ -13,9 +13,8 @@ pub fn helper(_: usize) {
 pub fn ref_dst(s: &[u8]) {
     // We used to generate an extra alloca and memcpy to ref the dst, so check that we copy
     // directly to the alloca for "x"
-// CHECK: [[X0:%[0-9]+]] = getelementptr inbounds { ptr, [[USIZE]] }, {{.*}}  %x, i32 0, i32 0
-// CHECK: store ptr %s.0, {{.*}} [[X0]]
-// CHECK: [[X1:%[0-9]+]] = getelementptr inbounds { ptr, [[USIZE]] }, {{.*}} %x, i32 0, i32 1
+// CHECK: store ptr %s.0, {{.*}} %x
+// CHECK: [[X1:%[0-9]+]] = getelementptr inbounds i8, {{.*}} %x, {{i32 4|i64 8}}
 // CHECK: store [[USIZE]] %s.1, {{.*}} [[X1]]
 
     let x = &*s;
diff --git a/tests/codegen/scalar-pair-bool.rs b/tests/codegen/scalar-pair-bool.rs
index 8e8365b6a67..a8d16bc8f29 100644
--- a/tests/codegen/scalar-pair-bool.rs
+++ b/tests/codegen/scalar-pair-bool.rs
@@ -2,25 +2,25 @@
 
 #![crate_type = "lib"]
 
-// CHECK: define{{.*}}{ i8, i8 } @pair_bool_bool(i1 noundef zeroext %pair.0, i1 noundef zeroext %pair.1)
+// CHECK: define{{.*}}{ i1, i1 } @pair_bool_bool(i1 noundef zeroext %pair.0, i1 noundef zeroext %pair.1)
 #[no_mangle]
 pub fn pair_bool_bool(pair: (bool, bool)) -> (bool, bool) {
     pair
 }
 
-// CHECK: define{{.*}}{ i8, i32 } @pair_bool_i32(i1 noundef zeroext %pair.0, i32 noundef %pair.1)
+// CHECK: define{{.*}}{ i1, i32 } @pair_bool_i32(i1 noundef zeroext %pair.0, i32 noundef %pair.1)
 #[no_mangle]
 pub fn pair_bool_i32(pair: (bool, i32)) -> (bool, i32) {
     pair
 }
 
-// CHECK: define{{.*}}{ i32, i8 } @pair_i32_bool(i32 noundef %pair.0, i1 noundef zeroext %pair.1)
+// CHECK: define{{.*}}{ i32, i1 } @pair_i32_bool(i32 noundef %pair.0, i1 noundef zeroext %pair.1)
 #[no_mangle]
 pub fn pair_i32_bool(pair: (i32, bool)) -> (i32, bool) {
     pair
 }
 
-// CHECK: define{{.*}}{ i8, i8 } @pair_and_or(i1 noundef zeroext %_1.0, i1 noundef zeroext %_1.1)
+// CHECK: define{{.*}}{ i1, i1 } @pair_and_or(i1 noundef zeroext %_1.0, i1 noundef zeroext %_1.1)
 #[no_mangle]
 pub fn pair_and_or((a, b): (bool, bool)) -> (bool, bool) {
     // Make sure it can operate directly on the unpacked args
diff --git a/tests/codegen/slice-iter-nonnull.rs b/tests/codegen/slice-iter-nonnull.rs
index 8749226d401..1e691cc34c9 100644
--- a/tests/codegen/slice-iter-nonnull.rs
+++ b/tests/codegen/slice-iter-nonnull.rs
@@ -15,7 +15,7 @@
 // CHECK-LABEL: @slice_iter_next(
 #[no_mangle]
 pub fn slice_iter_next<'a>(it: &mut std::slice::Iter<'a, u32>) -> Option<&'a u32> {
-    // CHECK: %[[ENDP:.+]] = getelementptr{{.+}}ptr %it,{{.+}} 1
+    // CHECK: %[[ENDP:.+]] = getelementptr inbounds i8, ptr %it, {{i32 4|i64 8}}
     // CHECK: %[[END:.+]] = load ptr, ptr %[[ENDP]]
     // CHECK-SAME: !nonnull
     // CHECK-SAME: !noundef
@@ -32,7 +32,7 @@ pub fn slice_iter_next<'a>(it: &mut std::slice::Iter<'a, u32>) -> Option<&'a u32
 // CHECK-LABEL: @slice_iter_next_back(
 #[no_mangle]
 pub fn slice_iter_next_back<'a>(it: &mut std::slice::Iter<'a, u32>) -> Option<&'a u32> {
-    // CHECK: %[[ENDP:.+]] = getelementptr{{.+}}ptr %it,{{.+}} 1
+    // CHECK: %[[ENDP:.+]] = getelementptr inbounds i8, ptr %it, {{i32 4|i64 8}}
     // CHECK: %[[END:.+]] = load ptr, ptr %[[ENDP]]
     // CHECK-SAME: !nonnull
     // CHECK-SAME: !noundef
@@ -84,7 +84,7 @@ pub fn slice_iter_mut_new(slice: &mut [u32]) -> std::slice::IterMut<'_, u32> {
 // CHECK-LABEL: @slice_iter_is_empty
 #[no_mangle]
 pub fn slice_iter_is_empty(it: &std::slice::Iter<'_, u32>) -> bool {
-    // CHECK: %[[ENDP:.+]] = getelementptr{{.+}}ptr %it,{{.+}} 1
+    // CHECK: %[[ENDP:.+]] = getelementptr inbounds i8, ptr %it, {{i32 4|i64 8}}
     // CHECK: %[[END:.+]] = load ptr, ptr %[[ENDP]]
     // CHECK-SAME: !nonnull
     // CHECK-SAME: !noundef
@@ -100,7 +100,7 @@ pub fn slice_iter_is_empty(it: &std::slice::Iter<'_, u32>) -> bool {
 // CHECK-LABEL: @slice_iter_len
 #[no_mangle]
 pub fn slice_iter_len(it: &std::slice::Iter<'_, u32>) -> usize {
-    // CHECK: %[[ENDP:.+]] = getelementptr{{.+}}ptr %it,{{.+}} 1
+    // CHECK: %[[ENDP:.+]] = getelementptr inbounds i8, ptr %it, {{i32 4|i64 8}}
     // CHECK: %[[END:.+]] = load ptr, ptr %[[ENDP]]
     // CHECK-SAME: !nonnull
     // CHECK-SAME: !noundef
diff --git a/tests/codegen/vec-iter.rs b/tests/codegen/vec-iter.rs
new file mode 100644
index 00000000000..0282791e9d1
--- /dev/null
+++ b/tests/codegen/vec-iter.rs
@@ -0,0 +1,46 @@
+// ignore-debug: the debug assertions get in the way
+// compile-flags: -O
+#![crate_type = "lib"]
+#![feature(exact_size_is_empty)]
+
+use std::vec;
+
+// CHECK-LABEL: @vec_iter_len_nonnull
+#[no_mangle]
+pub fn vec_iter_len_nonnull(it: &vec::IntoIter<u8>) -> usize {
+    // CHECK: load ptr
+    // CHECK-SAME: !nonnull
+    // CHECK-SAME: !noundef
+    // CHECK: load ptr
+    // CHECK-SAME: !nonnull
+    // CHECK-SAME: !noundef
+    // CHECK: sub nuw
+    // CHECK: ret
+    it.len()
+}
+
+// CHECK-LABEL: @vec_iter_is_empty_nonnull
+#[no_mangle]
+pub fn vec_iter_is_empty_nonnull(it: &vec::IntoIter<u8>) -> bool {
+    // CHECK: load ptr
+    // CHECK-SAME: !nonnull
+    // CHECK-SAME: !noundef
+    // CHECK: load ptr
+    // CHECK-SAME: !nonnull
+    // CHECK-SAME: !noundef
+    // CHECK: ret
+    it.is_empty()
+}
+
+// CHECK-LABEL: @vec_iter_next
+#[no_mangle]
+pub fn vec_iter_next(it: &mut vec::IntoIter<u8>) -> Option<u8> {
+    // CHECK: load ptr
+    // CHECK-SAME: !nonnull
+    // CHECK-SAME: !noundef
+    // CHECK: load ptr
+    // CHECK-SAME: !nonnull
+    // CHECK-SAME: !noundef
+    // CHECK: ret
+    it.next()
+}
diff --git a/tests/codegen/zst-offset.rs b/tests/codegen/zst-offset.rs
index cef4b9bdaaf..56dfd96ab2c 100644
--- a/tests/codegen/zst-offset.rs
+++ b/tests/codegen/zst-offset.rs
@@ -22,7 +22,7 @@ pub fn scalar_layout(s: &(u64, ())) {
 // CHECK-LABEL: @scalarpair_layout
 #[no_mangle]
 pub fn scalarpair_layout(s: &(u64, u32, ())) {
-// CHECK: getelementptr i8, {{.+}}, [[USIZE]] 12
+// CHECK: getelementptr inbounds i8, {{.+}}, [[USIZE]] 12
     let x = &s.2;
     witness(&x); // keep variable in an alloca
 }
diff --git a/tests/coverage/closure.cov-map b/tests/coverage/closure.cov-map
index 522c1e73afe..c5ac17600cd 100644
--- a/tests/coverage/closure.cov-map
+++ b/tests/coverage/closure.cov-map
@@ -81,21 +81,18 @@ Number of file 0 mappings: 1
 - Code(Zero) at (prev + 171, 13) to (start + 2, 14)
 
 Function name: closure::main::{closure#14}
-Raw bytes (36): 0x[01, 01, 03, 05, 0a, 01, 05, 01, 05, 05, 03, b2, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0a, 00, 2f, 00, 33, 03, 01, 0d, 00, 0e]
+Raw bytes (29): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, b2, 01, 0d, 02, 1b, 05, 02, 1e, 00, 25, 02, 00, 2f, 00, 33, 07, 01, 0d, 00, 0e]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 3
-- expression 0 operands: lhs = Counter(1), rhs = Expression(2, Sub)
-- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
-Number of file 0 mappings: 5
-- Code(Expression(0, Add)) at (prev + 178, 13) to (start + 0, 21)
-    = (c1 + (c0 - c1))
-- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 27)
-- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37)
-- Code(Expression(2, Sub)) at (prev + 0, 47) to (start + 0, 51)
+Number of expressions: 2
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
+Number of file 0 mappings: 4
+- Code(Counter(0)) at (prev + 178, 13) to (start + 2, 27)
+- Code(Counter(1)) at (prev + 2, 30) to (start + 0, 37)
+- Code(Expression(0, Sub)) at (prev + 0, 47) to (start + 0, 51)
     = (c0 - c1)
-- Code(Expression(0, Add)) at (prev + 1, 13) to (start + 0, 14)
+- Code(Expression(1, Add)) at (prev + 1, 13) to (start + 0, 14)
     = (c1 + (c0 - c1))
 
 Function name: closure::main::{closure#15}
@@ -118,21 +115,18 @@ Number of file 0 mappings: 6
     = (c1 + (c0 - c1))
 
 Function name: closure::main::{closure#16}
-Raw bytes (36): 0x[01, 01, 03, 05, 0a, 01, 05, 01, 05, 05, 03, c4, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0a, 00, 2f, 00, 33, 03, 01, 0d, 00, 0e]
+Raw bytes (29): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, c4, 01, 0d, 02, 1b, 05, 02, 1e, 00, 25, 02, 00, 2f, 00, 33, 07, 01, 0d, 00, 0e]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 3
-- expression 0 operands: lhs = Counter(1), rhs = Expression(2, Sub)
-- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
-Number of file 0 mappings: 5
-- Code(Expression(0, Add)) at (prev + 196, 13) to (start + 0, 21)
-    = (c1 + (c0 - c1))
-- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 27)
-- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37)
-- Code(Expression(2, Sub)) at (prev + 0, 47) to (start + 0, 51)
+Number of expressions: 2
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
+Number of file 0 mappings: 4
+- Code(Counter(0)) at (prev + 196, 13) to (start + 2, 27)
+- Code(Counter(1)) at (prev + 2, 30) to (start + 0, 37)
+- Code(Expression(0, Sub)) at (prev + 0, 47) to (start + 0, 51)
     = (c0 - c1)
-- Code(Expression(0, Add)) at (prev + 1, 13) to (start + 0, 14)
+- Code(Expression(1, Add)) at (prev + 1, 13) to (start + 0, 14)
     = (c1 + (c0 - c1))
 
 Function name: closure::main::{closure#17}
diff --git a/tests/coverage/color.coverage b/tests/coverage/color.coverage
new file mode 100644
index 00000000000..bc49fff9cb7
--- /dev/null
+++ b/tests/coverage/color.coverage
@@ -0,0 +1,13 @@
+   LL|       |// edition: 2021
+   LL|       |// ignore-mode-coverage-map
+   LL|       |// ignore-windows
+   LL|       |// llvm-cov-flags: --use-color
+   LL|       |
+   LL|       |// Verify that telling `llvm-cov` to use colored output actually works.
+   LL|       |// Ignored on Windows because we can't tell the tool to use ANSI escapes.
+   LL|       |
+   LL|      1|fn main() {
+   LL|      1|    for _i in 0..0 {}
+                      ^0         ^0
+   LL|      1|}
+
diff --git a/tests/coverage/color.rs b/tests/coverage/color.rs
new file mode 100644
index 00000000000..bd727946c78
--- /dev/null
+++ b/tests/coverage/color.rs
@@ -0,0 +1,11 @@
+// edition: 2021
+// ignore-mode-coverage-map
+// ignore-windows
+// llvm-cov-flags: --use-color
+
+// Verify that telling `llvm-cov` to use colored output actually works.
+// Ignored on Windows because we can't tell the tool to use ANSI escapes.
+
+fn main() {
+    for _i in 0..0 {}
+}
diff --git a/tests/coverage/ignore_map.coverage b/tests/coverage/ignore_map.coverage
new file mode 100644
index 00000000000..04bcb5bec6e
--- /dev/null
+++ b/tests/coverage/ignore_map.coverage
@@ -0,0 +1,4 @@
+   LL|       |// ignore-mode-coverage-map
+   LL|       |
+   LL|      1|fn main() {}
+
diff --git a/tests/coverage/ignore_map.rs b/tests/coverage/ignore_map.rs
new file mode 100644
index 00000000000..71b82e8fc9d
--- /dev/null
+++ b/tests/coverage/ignore_map.rs
@@ -0,0 +1,3 @@
+// ignore-mode-coverage-map
+
+fn main() {}
diff --git a/tests/coverage/ignore_run.cov-map b/tests/coverage/ignore_run.cov-map
new file mode 100644
index 00000000000..9865efae0a1
--- /dev/null
+++ b/tests/coverage/ignore_run.cov-map
@@ -0,0 +1,8 @@
+Function name: ignore_run::main
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 03, 01, 00, 0d]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 1
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 13)
+
diff --git a/tests/coverage/ignore_run.rs b/tests/coverage/ignore_run.rs
new file mode 100644
index 00000000000..87108867a05
--- /dev/null
+++ b/tests/coverage/ignore_run.rs
@@ -0,0 +1,3 @@
+// ignore-mode-coverage-run
+
+fn main() {}
diff --git a/tests/coverage/inline-dead.cov-map b/tests/coverage/inline-dead.cov-map
index 958b423f24c..ab04e746b91 100644
--- a/tests/coverage/inline-dead.cov-map
+++ b/tests/coverage/inline-dead.cov-map
@@ -31,14 +31,14 @@ Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 7, 6) to (start + 2, 2)
 
 Function name: inline_dead::main::{closure#0}
-Raw bytes (23): 0x[01, 01, 02, 00, 06, 01, 00, 03, 01, 07, 17, 00, 18, 00, 02, 0d, 00, 0e, 03, 02, 05, 00, 06]
+Raw bytes (23): 0x[01, 01, 02, 00, 06, 01, 00, 03, 01, 07, 17, 01, 16, 00, 02, 0d, 00, 0e, 03, 02, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 2
 - expression 0 operands: lhs = Zero, rhs = Expression(1, Sub)
 - expression 1 operands: lhs = Counter(0), rhs = Zero
 Number of file 0 mappings: 3
-- Code(Counter(0)) at (prev + 7, 23) to (start + 0, 24)
+- Code(Counter(0)) at (prev + 7, 23) to (start + 1, 22)
 - Code(Zero) at (prev + 2, 13) to (start + 0, 14)
 - Code(Expression(0, Add)) at (prev + 2, 5) to (start + 0, 6)
     = (Zero + (c0 - Zero))
diff --git a/tests/coverage/inline-dead.coverage b/tests/coverage/inline-dead.coverage
index de96aa17acd..7c201f482db 100644
--- a/tests/coverage/inline-dead.coverage
+++ b/tests/coverage/inline-dead.coverage
@@ -5,7 +5,7 @@
    LL|      1|    println!("{}", live::<false>());
    LL|      1|
    LL|      1|    let f = |x: bool| {
-   LL|       |        debug_assert!(
+   LL|      1|        debug_assert!(
    LL|      0|            x
    LL|       |        );
    LL|      1|    };
diff --git a/tests/coverage/macro_name_span.cov-map b/tests/coverage/macro_name_span.cov-map
index b84628fc788..a18e5f14861 100644
--- a/tests/coverage/macro_name_span.cov-map
+++ b/tests/coverage/macro_name_span.cov-map
@@ -1,15 +1,15 @@
 Function name: macro_name_span::affected_function
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 06, 1b, 00, 20]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 16, 1c, 02, 06]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 6, 27) to (start + 0, 32)
+- Code(Counter(0)) at (prev + 22, 28) to (start + 2, 6)
 
 Function name: macro_name_span::main
-Raw bytes (9): 0x[01, 02, 00, 01, 01, 0b, 01, 02, 02]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 2
+- file 0 => global file 1
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 11, 1) to (start + 2, 2)
diff --git a/tests/coverage/macro_name_span.coverage b/tests/coverage/macro_name_span.coverage
index cadf7024657..28c88b1defa 100644
--- a/tests/coverage/macro_name_span.coverage
+++ b/tests/coverage/macro_name_span.coverage
@@ -1,16 +1,3 @@
-$DIR/auxiliary/macro_name_span_helper.rs:
-   LL|       |// edition: 2021
-   LL|       |
-   LL|       |#[macro_export]
-   LL|       |macro_rules! macro_that_defines_a_function {
-   LL|       |    (fn $name:ident () $body:tt) => {
-   LL|      1|        fn $name () -> () $body
-   LL|       |    }
-   LL|       |}
-   LL|       |
-   LL|       |// Non-executable comment.
-
-$DIR/macro_name_span.rs:
    LL|       |// edition: 2021
    LL|       |
    LL|       |// Regression test for <https://github.com/rust-lang/rust/issues/117788>.
@@ -32,8 +19,8 @@ $DIR/macro_name_span.rs:
    LL|       |}
    LL|       |
    LL|       |macro_name_span_helper::macro_that_defines_a_function! {
-   LL|       |    fn affected_function() {
-   LL|       |        macro_with_an_unreasonably_and_egregiously_long_name!();
-   LL|       |    }
+   LL|      1|    fn affected_function() {
+   LL|      1|        macro_with_an_unreasonably_and_egregiously_long_name!();
+   LL|      1|    }
    LL|       |}
 
diff --git a/tests/coverage/unicode.cov-map b/tests/coverage/unicode.cov-map
new file mode 100644
index 00000000000..cd40194a083
--- /dev/null
+++ b/tests/coverage/unicode.cov-map
@@ -0,0 +1,53 @@
+Function name: unicode::main
+Raw bytes (67): 0x[01, 01, 09, 01, 05, 03, 05, 1e, 0d, 22, 09, 03, 05, 11, 1b, 1e, 0d, 22, 09, 03, 05, 09, 01, 0e, 01, 00, 0b, 05, 01, 09, 00, 0c, 03, 00, 10, 00, 1b, 05, 00, 1c, 00, 28, 22, 02, 08, 00, 25, 09, 00, 29, 00, 46, 11, 00, 47, 02, 06, 1b, 02, 06, 00, 07, 17, 02, 05, 01, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 9
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Expression(0, Add), rhs = Counter(1)
+- expression 2 operands: lhs = Expression(7, Sub), rhs = Counter(3)
+- expression 3 operands: lhs = Expression(8, Sub), rhs = Counter(2)
+- expression 4 operands: lhs = Expression(0, Add), rhs = Counter(1)
+- expression 5 operands: lhs = Counter(4), rhs = Expression(6, Add)
+- expression 6 operands: lhs = Expression(7, Sub), rhs = Counter(3)
+- expression 7 operands: lhs = Expression(8, Sub), rhs = Counter(2)
+- expression 8 operands: lhs = Expression(0, Add), rhs = Counter(1)
+Number of file 0 mappings: 9
+- Code(Counter(0)) at (prev + 14, 1) to (start + 0, 11)
+- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 12)
+- Code(Expression(0, Add)) at (prev + 0, 16) to (start + 0, 27)
+    = (c0 + c1)
+- Code(Counter(1)) at (prev + 0, 28) to (start + 0, 40)
+- Code(Expression(8, Sub)) at (prev + 2, 8) to (start + 0, 37)
+    = ((c0 + c1) - c1)
+- Code(Counter(2)) at (prev + 0, 41) to (start + 0, 70)
+- Code(Counter(4)) at (prev + 0, 71) to (start + 2, 6)
+- Code(Expression(6, Add)) at (prev + 2, 6) to (start + 0, 7)
+    = ((((c0 + c1) - c1) - c2) + c3)
+- Code(Expression(5, Add)) at (prev + 2, 5) to (start + 1, 2)
+    = (c4 + ((((c0 + c1) - c1) - c2) + c3))
+
+Function name: unicode::サビ
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 1e, 14, 00, 18]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 1
+- Code(Counter(0)) at (prev + 30, 20) to (start + 0, 24)
+
+Function name: unicode::他 (unused)
+Raw bytes (9): 0x[01, 01, 00, 01, 00, 1e, 19, 00, 25]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 1
+- Code(Zero) at (prev + 30, 25) to (start + 0, 37)
+
+Function name: unicode::申し訳ございません
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 18, 01, 02, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 1
+- Code(Counter(0)) at (prev + 24, 1) to (start + 2, 2)
+
diff --git a/tests/coverage/unicode.coverage b/tests/coverage/unicode.coverage
new file mode 100644
index 00000000000..b284a557d57
--- /dev/null
+++ b/tests/coverage/unicode.coverage
@@ -0,0 +1,40 @@
+   LL|       |// edition: 2021
+   LL|       |// ignore-windows - we can't force `llvm-cov` to use ANSI escapes on Windows
+   LL|       |// llvm-cov-flags: --use-color
+   LL|       |
+   LL|       |// Check that column numbers are denoted in bytes, so that they don't cause
+   LL|       |// `llvm-cov` to fail or emit malformed output.
+   LL|       |//
+   LL|       |// Note that when `llvm-cov` prints ^ arrows on a subsequent line, it simply
+   LL|       |// inserts one space character for each "column", with no understanding of
+   LL|       |// Unicode or character widths. So those arrows will tend to be misaligned
+   LL|       |// for non-ASCII source code, regardless of whether column numbers are code
+   LL|       |// points or bytes.
+   LL|       |
+   LL|      1|fn main() {
+   LL|     33|    for _İ in 'А'..='Я' { /* Я */ }
+                      ^32                ^32
+   LL|       |
+   LL|      1|    if 申し訳ございません() && 申し訳ございません() {
+                                                      ^0
+   LL|      0|        println!("true");
+   LL|      1|    }
+   LL|       |
+   LL|      1|    サビ();
+   LL|      1|}
+   LL|       |
+   LL|      1|fn 申し訳ございません() -> bool {
+   LL|      1|    std::hint::black_box(false)
+   LL|      1|}
+   LL|       |
+   LL|       |macro_rules! macro_that_defines_a_function {
+   LL|       |    (fn $名:ident () $体:tt) => {
+   LL|      1|        fn $名 () $体 fn 他 () {}
+                                      ^0
+   LL|       |    }
+   LL|       |}
+   LL|       |
+   LL|       |macro_that_defines_a_function! {
+   LL|       |    fn サビ() {}
+   LL|       |}
+
diff --git a/tests/coverage/unicode.rs b/tests/coverage/unicode.rs
new file mode 100644
index 00000000000..dfc5ea69dd2
--- /dev/null
+++ b/tests/coverage/unicode.rs
@@ -0,0 +1,36 @@
+// edition: 2021
+// ignore-windows - we can't force `llvm-cov` to use ANSI escapes on Windows
+// llvm-cov-flags: --use-color
+
+// Check that column numbers are denoted in bytes, so that they don't cause
+// `llvm-cov` to fail or emit malformed output.
+//
+// Note that when `llvm-cov` prints ^ arrows on a subsequent line, it simply
+// inserts one space character for each "column", with no understanding of
+// Unicode or character widths. So those arrows will tend to be misaligned
+// for non-ASCII source code, regardless of whether column numbers are code
+// points or bytes.
+
+fn main() {
+    for _İ in 'А'..='Я' { /* Я */ }
+
+    if 申し訳ございません() && 申し訳ございません() {
+        println!("true");
+    }
+
+    サビ();
+}
+
+fn 申し訳ございません() -> bool {
+    std::hint::black_box(false)
+}
+
+macro_rules! macro_that_defines_a_function {
+    (fn $名:ident () $体:tt) => {
+        fn $名 () $体 fn 他 () {}
+    }
+}
+
+macro_that_defines_a_function! {
+    fn サビ() {}
+}
diff --git a/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs b/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs
new file mode 100644
index 00000000000..d9500c3641e
--- /dev/null
+++ b/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs
@@ -0,0 +1,124 @@
+// ignore-lldb
+#![feature(collapse_debuginfo)]
+
+// Test that statement, skipped/added/reordered by macros, is correctly processed in debuginfo.
+// When nested macros instantiations are tagged with collapse_debuginfo attribute,
+// debug info should be corrected to the first outer macro instantiation
+// without collapse_debuginfo attribute.
+// collapse_debuginfo feature enabled.
+
+// compile-flags:-g
+
+// === GDB TESTS ===================================================================================
+
+// gdb-command:run
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_rem_call1[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call1_pre[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_in_proxy[...]
+// gdb-command:next 2
+// gdb-check:[...]#loc_rem_call3[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_add_call1[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call1_pre[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_in_proxy[...]
+// gdb-command:next 2
+// gdb-check:[...]#loc_add_macro[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_add_call3[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder_call2[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder_call3[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder_call1[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call1_pre[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_in_proxy[...]
+// gdb-command:next 2
+// gdb-command:frame
+// gdb-command:continue
+
+#[inline(never)]
+fn myprintln_impl(text: &str) {
+    println!("{}", text)
+}
+
+#[collapse_debuginfo]
+macro_rules! myprintln {
+    ($($arg:tt)*) => {{
+        myprintln_impl($($arg)*);
+    }};
+}
+
+macro_rules! proxy_println {
+    ($($arg:tt)*) => {{
+        myprintln!($($arg)*); // #loc_in_proxy
+    }};
+}
+
+// Macro accepts 3 statements and removes the 2nd statement
+macro_rules! remove_second_statement {
+    ($s1:stmt; $s2:stmt; $s3:stmt;) => { $s1 $s3 }
+}
+
+macro_rules! add_second_statement {
+    ($s1:stmt; $s3:stmt;) => {
+        $s1
+        call2(); // #loc_add_macro
+        $s3
+    }
+}
+
+macro_rules! reorder_statements {
+    ($s1:stmt; $s2:stmt; $s3:stmt;) => { $s2 $s3 $s1 }
+}
+
+fn call1() {
+    let rv = 0; // #loc_call1_pre
+    proxy_println!("one"); // #loc_call1
+}
+
+fn call2() {
+    proxy_println!("two"); // #loc_call2
+}
+
+fn call3() {
+    proxy_println!("three"); // #loc_call3
+}
+
+fn main() {
+    let ret = 0; // #break, step should go to call1
+    remove_second_statement! { // #loc_rem_hdr
+        call1(); // #loc_rem_call1
+        call2(); // #loc_rem_call2
+        call3(); // #loc_rem_call3
+    }
+    add_second_statement! { // #loc_add_hdr
+        call1(); // #loc_add_call1
+        call3(); // #loc_add_call3
+    }
+    reorder_statements! { // #loc_reorder_hdr
+        call1(); // #loc_reorder_call1
+        call2(); // #loc_reorder_call2
+        call3(); // #loc_reorder_call3
+    }
+    std::process::exit(ret); // #loc_exit
+}
diff --git a/tests/debuginfo/skip_second_statement.rs b/tests/debuginfo/skip_second_statement.rs
new file mode 100644
index 00000000000..535b5474763
--- /dev/null
+++ b/tests/debuginfo/skip_second_statement.rs
@@ -0,0 +1,168 @@
+// ignore-lldb
+
+// Test that statement, skipped/added/reordered by macros, is correctly processed in debuginfo.
+// Performed step-over and step-into debug stepping through call statements.
+// collapse_debuginfo feature disabled.
+
+// compile-flags:-g
+
+// === GDB TESTS ===================================================================================
+
+// gdb-command:run
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_rem1_call1[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_rem1_call3[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_rem2_call1[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call1[...]
+// gdb-command:next 2
+// gdb-check:[...]#loc_rem2_call3[...]
+// gdb-command:step 2
+// gdb-command:frame
+// gdb-check:[...]#loc_call3_println[...]
+// gdb-command:next 3
+// gdb-command:frame
+// gdb-check:[...]#loc_after_rem[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_add1_call1[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_add1_hdr[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_add1_call3[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_add2_call1[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call1[...]
+// gdb-command:next 2
+// gdb-check:[...]#loc_add2_hdr[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call2[...]
+// gdb-command:next 2
+// gdb-command:frame
+// gdb-check:[...]#loc_add2_call3[...]
+// gdb-command:step 2
+// gdb-command:frame
+// gdb-check:[...]#loc_call3_println[...]
+// gdb-command:next 3
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder1_call2[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder1_call3[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder1_call1[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder2_call2[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call2[...]
+// gdb-command:next 2
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder2_call3[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call3[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call3_println[...]
+// gdb-command:next 3
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder2_call1[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call1[...]
+// gdb-command:next 2
+// gdb-command:continue
+
+#[inline(never)]
+fn myprintln_impl(text: &str) {
+    println!("{}", text)
+}
+
+macro_rules! myprintln {
+    ($($arg:tt)*) => {{
+        myprintln_impl($($arg)*);
+    }};
+}
+
+// Macro accepts 3 statements and removes the 2nd statement
+macro_rules! remove_second_statement {
+    ($s1:stmt; $s2:stmt; $s3:stmt;) => { $s1 $s3 }
+}
+
+macro_rules! add_second_statement {
+    ($s1:stmt; $s3:stmt;) => {
+        $s1
+        call2(); // #loc_add_macro
+        $s3
+    }
+}
+
+macro_rules! reorder_statements {
+    ($s1:stmt; $s2:stmt; $s3:stmt;) => { $s2 $s3 $s1 }
+}
+
+fn call1() {
+    myprintln!("one"); // #loc_call1
+}
+
+fn call2() {
+    myprintln!("two"); // #loc_call2
+}
+
+fn call3() {
+    (||{
+        myprintln!("three") // #loc_call3_println
+    })(); // #loc_call3
+}
+
+fn main() {
+    let ret = 0; // #break, step should go to call1
+    remove_second_statement! { // #loc_rem1_hdr
+        call1(); // #loc_rem1_call1, breakpoint should set to call1, step should go call3
+        call2(); // #loc_rem1_call2, breakpoint should set to call3
+        call3(); // #loc_rem1_call3
+    }
+    remove_second_statement! { // #loc_rem2_hdr
+        call1(); // #loc_rem2_call1, breakpoint should set to call1, step should go call3
+        call2(); // #loc_rem2_call2, breakpoint should set to call3
+        call3(); // #loc_rem2_call3, breakpoint should set to call3
+    }
+    myprintln!("After remove_second_statement test"); // #loc_after_rem
+
+    add_second_statement! { // #loc_add1_hdr
+        call1(); // #loc_add1_call1
+        call3(); // #loc_add1_call3
+    }
+    add_second_statement! { // #loc_add2_hdr
+        call1(); // #loc_add2_call1
+        call3(); // #loc_add2_call3
+    }
+
+    reorder_statements! { // #loc_reorder1_hdr
+        call1(); // #loc_reorder1_call1
+        call2(); // #loc_reorder1_call2
+        call3(); // #loc_reorder1_call3
+    }
+    reorder_statements! { // #loc_reorder2_hdr
+        call1(); // #loc_reorder2_call1
+        call2(); // #loc_reorder2_call2
+        call3(); // #loc_reorder2_call3
+    }
+
+    std::process::exit(ret); // #loc_exit
+}
diff --git a/tests/debuginfo/skip_second_statement_collapse.rs b/tests/debuginfo/skip_second_statement_collapse.rs
new file mode 100644
index 00000000000..a0557ca9fee
--- /dev/null
+++ b/tests/debuginfo/skip_second_statement_collapse.rs
@@ -0,0 +1,170 @@
+// ignore-lldb
+#![feature(collapse_debuginfo)]
+
+// Test that statement, skipped/added/reordered by macros, is correctly processed in debuginfo
+// Performed step-over and step-into debug stepping through call statements.
+// collapse_debuginfo feature enabled.
+
+// compile-flags:-g
+
+// === GDB TESTS ===================================================================================
+
+// gdb-command:run
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_rem1_call1[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_rem1_call3[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_rem2_call1[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call1[...]
+// gdb-command:next 2
+// gdb-check:[...]#loc_rem2_call3[...]
+// gdb-command:step 2
+// gdb-command:frame
+// gdb-check:[...]#loc_call3_println[...]
+// gdb-command:next 3
+// gdb-command:frame
+// gdb-check:[...]#loc_after_rem[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_add1_call1[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_add_macro[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_add1_call3[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_add2_call1[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call1[...]
+// gdb-command:next 2
+// gdb-check:[...]#loc_add_macro[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call2[...]
+// gdb-command:next 2
+// gdb-command:frame
+// gdb-check:[...]#loc_add2_call3[...]
+// gdb-command:step 2
+// gdb-command:frame
+// gdb-check:[...]#loc_call3_println[...]
+// gdb-command:next 3
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder1_call2[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder1_call3[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder1_call1[...]
+// gdb-command:next
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder2_call2[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call2[...]
+// gdb-command:next 2
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder2_call3[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call3[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call3_println[...]
+// gdb-command:next 3
+// gdb-command:frame
+// gdb-check:[...]#loc_reorder2_call1[...]
+// gdb-command:step
+// gdb-command:frame
+// gdb-check:[...]#loc_call1[...]
+// gdb-command:next 2
+// gdb-command:continue
+
+#[inline(never)]
+fn myprintln_impl(text: &str) {
+    println!("{}", text)
+}
+
+#[collapse_debuginfo]
+macro_rules! myprintln {
+    ($($arg:tt)*) => {{
+        myprintln_impl($($arg)*);
+    }};
+}
+
+// Macro accepts 3 statements and removes the 2nd statement
+macro_rules! remove_second_statement {
+    ($s1:stmt; $s2:stmt; $s3:stmt;) => { $s1 $s3 }
+}
+
+macro_rules! add_second_statement {
+    ($s1:stmt; $s3:stmt;) => {
+        $s1
+        call2(); // #loc_add_macro
+        $s3
+    }
+}
+
+macro_rules! reorder_statements {
+    ($s1:stmt; $s2:stmt; $s3:stmt;) => { $s2 $s3 $s1 }
+}
+
+fn call1() {
+    myprintln!("one"); // #loc_call1
+}
+
+fn call2() {
+    myprintln!("two"); // #loc_call2
+}
+
+fn call3() {
+    (||{
+        myprintln!("three") // #loc_call3_println
+    })(); // #loc_call3
+}
+
+fn main() {
+    let ret = 0; // #break, step should go to call1
+    remove_second_statement! { // #loc_rem1_hdr
+        call1(); // #loc_rem1_call1, breakpoint should set to call1, step should go call3
+        call2(); // #loc_rem1_call2, breakpoint should set to call3
+        call3(); // #loc_rem1_call3
+    }
+    remove_second_statement! { // #loc_rem2_hdr
+        call1(); // #loc_rem2_call1, breakpoint should set to call1, step should go call3
+        call2(); // #loc_rem2_call2, breakpoint should set to call3
+        call3(); // #loc_rem2_call3, breakpoint should set to call3
+    }
+    myprintln!("After remove_second_statement test"); // #loc_after_rem
+
+    add_second_statement! { // #loc_add1_hdr
+        call1(); // #loc_add1_call1
+        call3(); // #loc_add1_call3
+    }
+    add_second_statement! { // #loc_add2_hdr
+        call1(); // #loc_add2_call1
+        call3(); // #loc_add2_call3
+    }
+
+    reorder_statements! { // #loc_reorder1_hdr
+        call1(); // #loc_reorder1_call1
+        call2(); // #loc_reorder1_call2
+        call3(); // #loc_reorder1_call3
+    }
+    reorder_statements! { // #loc_reorder2_hdr
+        call1(); // #loc_reorder2_call1
+        call2(); // #loc_reorder2_call2
+        call3(); // #loc_reorder2_call3
+    }
+
+    std::process::exit(ret); // #loc_exit
+}
diff --git a/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir b/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
index 3a9c80caa1e..3c0d4008c90 100644
--- a/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
+++ b/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
@@ -108,7 +108,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:15:18: 18:2}>,
 
     bb0: {
         _39 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})));
-        switchInt(move _39) -> [0: bb1, 1: bb29, 3: bb27, 4: bb28, otherwise: bb30];
+        switchInt(move _39) -> [0: bb1, 1: bb29, 3: bb27, 4: bb28, otherwise: bb9];
     }
 
     bb1: {
@@ -345,8 +345,4 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:15:18: 18:2}>,
     bb29: {
         assert(const false, "`async fn` resumed after completion") -> [success: bb29, unwind unreachable];
     }
-
-    bb30: {
-        unreachable;
-    }
 }
diff --git a/tests/mir-opt/building/custom/terminators.rs b/tests/mir-opt/building/custom/terminators.rs
index a83a6c07461..01c132cf3e7 100644
--- a/tests/mir-opt/building/custom/terminators.rs
+++ b/tests/mir-opt/building/custom/terminators.rs
@@ -13,7 +13,7 @@ fn ident<T>(t: T) -> T {
 fn direct_call(x: i32) -> i32 {
     mir!(
         {
-            Call(RET = ident(x), retblock, UnwindContinue())
+            Call(RET = ident(x), ReturnTo(retblock), UnwindContinue())
         }
 
         retblock = {
@@ -27,7 +27,7 @@ fn direct_call(x: i32) -> i32 {
 fn indirect_call(x: i32, f: fn(i32) -> i32) -> i32 {
     mir!(
         {
-            Call(RET = f(x), retblock, UnwindContinue())
+            Call(RET = f(x), ReturnTo(retblock), UnwindContinue())
         }
 
         retblock = {
@@ -49,7 +49,7 @@ impl<'a> Drop for WriteOnDrop<'a> {
 fn drop_first<'a>(a: WriteOnDrop<'a>, b: WriteOnDrop<'a>) {
     mir!(
         {
-            Drop(a, retblock, UnwindContinue())
+            Drop(a, ReturnTo(retblock), UnwindContinue())
         }
 
         retblock = {
@@ -64,7 +64,7 @@ fn drop_first<'a>(a: WriteOnDrop<'a>, b: WriteOnDrop<'a>) {
 fn drop_second<'a>(a: WriteOnDrop<'a>, b: WriteOnDrop<'a>) {
     mir!(
         {
-            Drop(b, retblock, UnwindContinue())
+            Drop(b, ReturnTo(retblock), UnwindContinue())
         }
 
         retblock = {
diff --git a/tests/mir-opt/building/custom/unwind_action.rs b/tests/mir-opt/building/custom/unwind_action.rs
index e3c4ffac358..0dfbf780f67 100644
--- a/tests/mir-opt/building/custom/unwind_action.rs
+++ b/tests/mir-opt/building/custom/unwind_action.rs
@@ -11,7 +11,7 @@ use core::intrinsics::mir::*;
 pub fn a() {
     mir!(
         {
-            Call(RET = a(), bb1, UnwindUnreachable())
+            Call(RET = a(), ReturnTo(bb1), UnwindUnreachable())
         }
         bb1 = {
             Return()
@@ -26,7 +26,7 @@ pub fn a() {
 pub fn b() {
     mir!(
         {
-            Call(RET = b(), bb1, UnwindContinue())
+            Call(RET = b(), ReturnTo(bb1), UnwindContinue())
         }
         bb1 = {
             Return()
@@ -41,7 +41,7 @@ pub fn b() {
 pub fn c() {
     mir!(
         {
-            Call(RET = c(), bb1, UnwindTerminate(ReasonAbi))
+            Call(RET = c(), ReturnTo(bb1), UnwindTerminate(ReasonAbi))
         }
         bb1 = {
             Return()
@@ -56,7 +56,7 @@ pub fn c() {
 pub fn d() {
     mir!(
         {
-            Call(RET = d(), bb1, UnwindCleanup(bb2))
+            Call(RET = d(), ReturnTo(bb1), UnwindCleanup(bb2))
         }
         bb1 = {
             Return()
diff --git a/tests/mir-opt/copy-prop/borrowed_local.rs b/tests/mir-opt/copy-prop/borrowed_local.rs
index a44e65164af..af40f5bce8b 100644
--- a/tests/mir-opt/copy-prop/borrowed_local.rs
+++ b/tests/mir-opt/copy-prop/borrowed_local.rs
@@ -22,11 +22,11 @@ fn f() -> bool {
             let b = a;
             // We cannot propagate the place `a`.
             let r2 = &b;
-            Call(RET = cmp_ref(r1, r2), next, UnwindContinue())
+            Call(RET = cmp_ref(r1, r2), ReturnTo(next), UnwindContinue())
         }
         next = {
             // But we can propagate the value `a`.
-            Call(RET = opaque(b), ret, UnwindContinue())
+            Call(RET = opaque(b), ReturnTo(ret), UnwindContinue())
         }
         ret = {
             Return()
diff --git a/tests/mir-opt/copy-prop/calls.rs b/tests/mir-opt/copy-prop/calls.rs
index bc6760707cc..a6b5d511805 100644
--- a/tests/mir-opt/copy-prop/calls.rs
+++ b/tests/mir-opt/copy-prop/calls.rs
@@ -26,7 +26,7 @@ fn multiple_edges(t: bool) -> u8 {
             match t { true => bbt, _ => ret }
         }
         bbt = {
-            Call(x = dummy(13), ret, UnwindContinue())
+            Call(x = dummy(13), ReturnTo(ret), UnwindContinue())
         }
         ret = {
             // `x` is not assigned on the `bb0 -> ret` edge,
diff --git a/tests/mir-opt/copy-prop/custom_move_arg.f.CopyProp.panic-unwind.diff b/tests/mir-opt/copy-prop/custom_move_arg.f.CopyProp.panic-unwind.diff
index eb40183c1c9..7ba85301051 100644
--- a/tests/mir-opt/copy-prop/custom_move_arg.f.CopyProp.panic-unwind.diff
+++ b/tests/mir-opt/copy-prop/custom_move_arg.f.CopyProp.panic-unwind.diff
@@ -8,14 +8,14 @@
   
       bb0: {
 -         _2 = _1;
--         _0 = opaque::<NotCopy>(move _1) -> [return: bb1, unwind continue];
-+         _0 = opaque::<NotCopy>(_1) -> [return: bb1, unwind continue];
+-         _0 = opaque::<NotCopy>(move _1) -> [return: bb1, unwind unreachable];
++         _0 = opaque::<NotCopy>(_1) -> [return: bb1, unwind unreachable];
       }
   
       bb1: {
 -         _3 = move _2;
--         _0 = opaque::<NotCopy>(_3) -> [return: bb2, unwind continue];
-+         _0 = opaque::<NotCopy>(_1) -> [return: bb2, unwind continue];
+-         _0 = opaque::<NotCopy>(_3) -> [return: bb2, unwind unreachable];
++         _0 = opaque::<NotCopy>(_1) -> [return: bb2, unwind unreachable];
       }
   
       bb2: {
diff --git a/tests/mir-opt/copy-prop/custom_move_arg.rs b/tests/mir-opt/copy-prop/custom_move_arg.rs
index 8593d9fa9ab..1ee294fcfd9 100644
--- a/tests/mir-opt/copy-prop/custom_move_arg.rs
+++ b/tests/mir-opt/copy-prop/custom_move_arg.rs
@@ -10,15 +10,15 @@ use core::intrinsics::mir::*;
 struct NotCopy(bool);
 
 // EMIT_MIR custom_move_arg.f.CopyProp.diff
-#[custom_mir(dialect = "analysis", phase = "post-cleanup")]
+#[custom_mir(dialect = "runtime")]
 fn f(_1: NotCopy) {
     mir!({
         let _2 = _1;
-        Call(RET = opaque(Move(_1)), bb1, UnwindContinue())
+        Call(RET = opaque(Move(_1)), ReturnTo(bb1), UnwindUnreachable())
     }
     bb1 = {
         let _3 = Move(_2);
-        Call(RET = opaque(_3), bb2, UnwindContinue())
+        Call(RET = opaque(_3), ReturnTo(bb2), UnwindUnreachable())
     }
     bb2 = {
         Return()
diff --git a/tests/mir-opt/copy-prop/move_projection.f.CopyProp.panic-unwind.diff b/tests/mir-opt/copy-prop/move_projection.f.CopyProp.panic-unwind.diff
index ad3889639e0..b2b89968d70 100644
--- a/tests/mir-opt/copy-prop/move_projection.f.CopyProp.panic-unwind.diff
+++ b/tests/mir-opt/copy-prop/move_projection.f.CopyProp.panic-unwind.diff
@@ -9,13 +9,13 @@
       bb0: {
 -         _2 = _1;
 -         _3 = move (_2.0: u8);
--         _0 = opaque::<Foo>(move _1) -> [return: bb1, unwind continue];
+-         _0 = opaque::<Foo>(move _1) -> [return: bb1, unwind unreachable];
 +         _3 = (_1.0: u8);
-+         _0 = opaque::<Foo>(_1) -> [return: bb1, unwind continue];
++         _0 = opaque::<Foo>(_1) -> [return: bb1, unwind unreachable];
       }
   
       bb1: {
-          _0 = opaque::<u8>(move _3) -> [return: bb2, unwind continue];
+          _0 = opaque::<u8>(move _3) -> [return: bb2, unwind unreachable];
       }
   
       bb2: {
diff --git a/tests/mir-opt/copy-prop/move_projection.rs b/tests/mir-opt/copy-prop/move_projection.rs
index 438a90dddd0..f31e82c1f03 100644
--- a/tests/mir-opt/copy-prop/move_projection.rs
+++ b/tests/mir-opt/copy-prop/move_projection.rs
@@ -11,17 +11,17 @@ fn opaque(_: impl Sized) -> bool { true }
 
 struct Foo(u8);
 
-#[custom_mir(dialect = "analysis", phase = "post-cleanup")]
+#[custom_mir(dialect = "runtime")]
 fn f(a: Foo) -> bool {
     mir!(
         {
             let b = a;
             // This is a move out of a copy, so must become a copy of `a.0`.
             let c = Move(b.0);
-            Call(RET = opaque(Move(a)), bb1, UnwindContinue())
+            Call(RET = opaque(Move(a)), ReturnTo(bb1), UnwindUnreachable())
         }
         bb1 = {
-            Call(RET = opaque(Move(c)), ret, UnwindContinue())
+            Call(RET = opaque(Move(c)), ReturnTo(ret), UnwindUnreachable())
         }
         ret = {
             Return()
diff --git a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
index b2eb64756f9..490a4aa502c 100644
--- a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
+++ b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
@@ -28,7 +28,7 @@ struct Packed {
 fn move_packed(packed: Packed) {
     mir!(
         {
-            Call(RET = use_both(0, packed.y), ret, UnwindContinue())
+            Call(RET = use_both(0, packed.y), ReturnTo(ret), UnwindContinue())
         }
         ret = {
             Return()
diff --git a/tests/mir-opt/dead-store-elimination/cycle.rs b/tests/mir-opt/dead-store-elimination/cycle.rs
index c9ad06a9da2..13e5411275d 100644
--- a/tests/mir-opt/dead-store-elimination/cycle.rs
+++ b/tests/mir-opt/dead-store-elimination/cycle.rs
@@ -20,7 +20,7 @@ fn cycle(mut x: i32, mut y: i32, mut z: i32) {
     mir!(
         let condition: bool;
         {
-            Call(condition = cond(), bb1, UnwindContinue())
+            Call(condition = cond(), ReturnTo(bb1), UnwindContinue())
         }
         bb1 = {
             match condition { true => bb2, _ => ret }
@@ -30,7 +30,7 @@ fn cycle(mut x: i32, mut y: i32, mut z: i32) {
             z = y;
             y = x;
             x = temp;
-            Call(condition = cond(), bb1, UnwindContinue())
+            Call(condition = cond(), ReturnTo(bb1), UnwindContinue())
         }
         ret = {
             Return()
diff --git a/tests/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.panic-abort.diff b/tests/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.panic-abort.diff
index 54875cadec5..b461869be31 100644
--- a/tests/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.panic-abort.diff
+++ b/tests/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.panic-abort.diff
@@ -8,20 +8,20 @@
       let mut _3: u8;
   
       bb0: {
--         StorageLive(_2);
-+         nop;
-          StorageLive(_3);
-          _3 = _1;
+          StorageLive(_2);
+-         StorageLive(_3);
+-         _3 = _1;
 -         _2 = dummy(move _3) -> [return: bb1, unwind unreachable];
-+         _1 = dummy(move _3) -> [return: bb1, unwind unreachable];
++         nop;
++         nop;
++         _2 = dummy(move _1) -> [return: bb1, unwind unreachable];
       }
   
       bb1: {
-          StorageDead(_3);
--         _1 = move _2;
--         StorageDead(_2);
-+         nop;
+-         StorageDead(_3);
 +         nop;
+          _1 = move _2;
+          StorageDead(_2);
           _0 = const ();
           return;
       }
diff --git a/tests/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.panic-unwind.diff b/tests/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.panic-unwind.diff
index b4c8a89278b..d5c2e07c6c2 100644
--- a/tests/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.panic-unwind.diff
+++ b/tests/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.panic-unwind.diff
@@ -8,20 +8,20 @@
       let mut _3: u8;
   
       bb0: {
--         StorageLive(_2);
-+         nop;
-          StorageLive(_3);
-          _3 = _1;
+          StorageLive(_2);
+-         StorageLive(_3);
+-         _3 = _1;
 -         _2 = dummy(move _3) -> [return: bb1, unwind continue];
-+         _1 = dummy(move _3) -> [return: bb1, unwind continue];
++         nop;
++         nop;
++         _2 = dummy(move _1) -> [return: bb1, unwind continue];
       }
   
       bb1: {
-          StorageDead(_3);
--         _1 = move _2;
--         StorageDead(_2);
-+         nop;
+-         StorageDead(_3);
 +         nop;
+          _1 = move _2;
+          StorageDead(_2);
           _0 = const ();
           return;
       }
diff --git a/tests/mir-opt/dest-prop/unreachable.f.DestinationPropagation.panic-abort.diff b/tests/mir-opt/dest-prop/unreachable.f.DestinationPropagation.panic-abort.diff
deleted file mode 100644
index 80b5681ad06..00000000000
--- a/tests/mir-opt/dest-prop/unreachable.f.DestinationPropagation.panic-abort.diff
+++ /dev/null
@@ -1,82 +0,0 @@
-- // MIR for `f` before DestinationPropagation
-+ // MIR for `f` after DestinationPropagation
-  
-  fn f(_1: T) -> () {
-      debug a => _1;
-      let mut _0: ();
-      let _2: T;
-      let mut _3: bool;
-      let _4: ();
-      let mut _5: T;
-      let mut _6: T;
-      let _7: ();
-      let mut _8: T;
-      let mut _9: T;
-      scope 1 {
--         debug b => _2;
-+         debug b => _1;
-      }
-  
-      bb0: {
--         StorageLive(_2);
--         _2 = _1;
-+         nop;
-+         nop;
-          StorageLive(_3);
-          _3 = const false;
--         goto -> bb3;
-+         goto -> bb1;
-      }
-  
-      bb1: {
--         StorageLive(_4);
--         StorageLive(_5);
--         _5 = _1;
--         StorageLive(_6);
--         _6 = _1;
--         _4 = g::<T>(_1, _1) -> [return: bb2, unwind unreachable];
--     }
-- 
--     bb2: {
--         StorageDead(_6);
--         StorageDead(_5);
--         StorageDead(_4);
--         _0 = const ();
--         goto -> bb5;
--     }
-- 
--     bb3: {
-          StorageLive(_7);
--         StorageLive(_8);
--         _8 = _1;
--         StorageLive(_9);
--         _9 = _1;
--         _7 = g::<T>(_1, _1) -> [return: bb4, unwind unreachable];
-+         nop;
-+         nop;
-+         nop;
-+         nop;
-+         _7 = g::<T>(_1, _1) -> [return: bb2, unwind unreachable];
-      }
-  
--     bb4: {
--         StorageDead(_9);
--         StorageDead(_8);
-+     bb2: {
-+         nop;
-+         nop;
-          StorageDead(_7);
-          _0 = const ();
--         goto -> bb5;
-+         goto -> bb3;
-      }
-  
--     bb5: {
-+     bb3: {
-          StorageDead(_3);
--         StorageDead(_2);
-+         nop;
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/dest-prop/unreachable.f.DestinationPropagation.panic-unwind.diff b/tests/mir-opt/dest-prop/unreachable.f.DestinationPropagation.panic-unwind.diff
deleted file mode 100644
index eae7dd17b48..00000000000
--- a/tests/mir-opt/dest-prop/unreachable.f.DestinationPropagation.panic-unwind.diff
+++ /dev/null
@@ -1,82 +0,0 @@
-- // MIR for `f` before DestinationPropagation
-+ // MIR for `f` after DestinationPropagation
-  
-  fn f(_1: T) -> () {
-      debug a => _1;
-      let mut _0: ();
-      let _2: T;
-      let mut _3: bool;
-      let _4: ();
-      let mut _5: T;
-      let mut _6: T;
-      let _7: ();
-      let mut _8: T;
-      let mut _9: T;
-      scope 1 {
--         debug b => _2;
-+         debug b => _1;
-      }
-  
-      bb0: {
--         StorageLive(_2);
--         _2 = _1;
-+         nop;
-+         nop;
-          StorageLive(_3);
-          _3 = const false;
--         goto -> bb3;
-+         goto -> bb1;
-      }
-  
-      bb1: {
--         StorageLive(_4);
--         StorageLive(_5);
--         _5 = _1;
--         StorageLive(_6);
--         _6 = _1;
--         _4 = g::<T>(_1, _1) -> [return: bb2, unwind continue];
--     }
-- 
--     bb2: {
--         StorageDead(_6);
--         StorageDead(_5);
--         StorageDead(_4);
--         _0 = const ();
--         goto -> bb5;
--     }
-- 
--     bb3: {
-          StorageLive(_7);
--         StorageLive(_8);
--         _8 = _1;
--         StorageLive(_9);
--         _9 = _1;
--         _7 = g::<T>(_1, _1) -> [return: bb4, unwind continue];
-+         nop;
-+         nop;
-+         nop;
-+         nop;
-+         _7 = g::<T>(_1, _1) -> [return: bb2, unwind continue];
-      }
-  
--     bb4: {
--         StorageDead(_9);
--         StorageDead(_8);
-+     bb2: {
-+         nop;
-+         nop;
-          StorageDead(_7);
-          _0 = const ();
--         goto -> bb5;
-+         goto -> bb3;
-      }
-  
--     bb5: {
-+     bb3: {
-          StorageDead(_3);
--         StorageDead(_2);
-+         nop;
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/dest-prop/unreachable.rs b/tests/mir-opt/dest-prop/unreachable.rs
deleted file mode 100644
index 0bde157ff61..00000000000
--- a/tests/mir-opt/dest-prop/unreachable.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// skip-filecheck
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
-// Check that unreachable code is removed after the destination propagation.
-// Regression test for issue #105428.
-//
-// compile-flags: --crate-type=lib -Zmir-opt-level=0
-// compile-flags: -Zmir-enable-passes=+GVN,+SimplifyConstCondition-after-const-prop,+DestinationPropagation
-
-// EMIT_MIR unreachable.f.DestinationPropagation.diff
-pub fn f<T: Copy>(a: T) {
-    let b = a;
-    if false {
-        g(a, b);
-    } else {
-        g(b, b);
-    }
-}
-
-#[inline(never)]
-pub fn g<T: Copy>(_: T, _: T) {}
diff --git a/tests/mir-opt/gvn.rs b/tests/mir-opt/gvn.rs
index db131f7f97d..23e33a0fa49 100644
--- a/tests/mir-opt/gvn.rs
+++ b/tests/mir-opt/gvn.rs
@@ -529,31 +529,31 @@ fn duplicate_slice() -> (bool, bool) {
             // CHECK: [[a:_.*]] = (const "a",);
             // CHECK: [[au:_.*]] = ([[a]].0: &str) as u128 (Transmute);
             let a = ("a",);
-            Call(au = transmute::<_, u128>(a.0), bb1, UnwindContinue())
+            Call(au = transmute::<_, u128>(a.0), ReturnTo(bb1), UnwindContinue())
         }
         bb1 = {
             // CHECK: [[c:_.*]] = identity::<&str>(([[a]].0: &str))
-            Call(c = identity(a.0), bb2, UnwindContinue())
+            Call(c = identity(a.0), ReturnTo(bb2), UnwindContinue())
         }
         bb2 = {
             // CHECK: [[cu:_.*]] = [[c]] as u128 (Transmute);
-            Call(cu = transmute::<_, u128>(c), bb3, UnwindContinue())
+            Call(cu = transmute::<_, u128>(c), ReturnTo(bb3), UnwindContinue())
         }
         bb3 = {
             // This slice is different from `a.0`. Hence `bu` is not `au`.
             // CHECK: [[b:_.*]] = const "a";
             // CHECK: [[bu:_.*]] = [[b]] as u128 (Transmute);
             let b = "a";
-            Call(bu = transmute::<_, u128>(b), bb4, UnwindContinue())
+            Call(bu = transmute::<_, u128>(b), ReturnTo(bb4), UnwindContinue())
         }
         bb4 = {
             // This returns a copy of `b`, which is not `a`.
             // CHECK: [[d:_.*]] = identity::<&str>([[b]])
-            Call(d = identity(b), bb5, UnwindContinue())
+            Call(d = identity(b), ReturnTo(bb5), UnwindContinue())
         }
         bb5 = {
             // CHECK: [[du:_.*]] = [[d]] as u128 (Transmute);
-            Call(du = transmute::<_, u128>(d), bb6, UnwindContinue())
+            Call(du = transmute::<_, u128>(d), ReturnTo(bb6), UnwindContinue())
         }
         bb6 = {
             // `direct` must not fold to `true`, as `indirect` will not.
diff --git a/tests/mir-opt/inline/indirect_destination.rs b/tests/mir-opt/inline/indirect_destination.rs
index 2842e23366e..82143d85c25 100644
--- a/tests/mir-opt/inline/indirect_destination.rs
+++ b/tests/mir-opt/inline/indirect_destination.rs
@@ -25,7 +25,7 @@ pub fn f(a: *mut u8) {
             Goto(bb1)
         }
         bb1 = {
-            Call(*a = g(), bb1, UnwindUnreachable())
+            Call(*a = g(), ReturnTo(bb1), UnwindUnreachable())
         }
     }
 }
diff --git a/tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff
index f50603a66a5..f04ca72dd6d 100644
--- a/tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff
+++ b/tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff
@@ -56,7 +56,7 @@
           StorageLive(_11);
           StorageLive(_12);
           _10 = discriminant(_4);
-          switchInt(move _10) -> [0: bb8, 1: bb6, otherwise: bb7];
+          switchInt(move _10) -> [0: bb7, 1: bb6, otherwise: bb2];
       }
   
       bb1: {
@@ -114,20 +114,16 @@
           _3 = ControlFlow::<Result<Infallible, i32>, i32>::Break(move _13);
           StorageDead(_13);
 -         goto -> bb5;
-+         goto -> bb9;
++         goto -> bb8;
       }
   
       bb7: {
-          unreachable;
-      }
-  
-      bb8: {
           _11 = move ((_4 as Ok).0: i32);
           _3 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(move _11);
           goto -> bb5;
 +     }
 + 
-+     bb9: {
++     bb8: {
 +         StorageDead(_12);
 +         StorageDead(_11);
 +         StorageDead(_10);
diff --git a/tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff
index f50603a66a5..f04ca72dd6d 100644
--- a/tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff
+++ b/tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff
@@ -56,7 +56,7 @@
           StorageLive(_11);
           StorageLive(_12);
           _10 = discriminant(_4);
-          switchInt(move _10) -> [0: bb8, 1: bb6, otherwise: bb7];
+          switchInt(move _10) -> [0: bb7, 1: bb6, otherwise: bb2];
       }
   
       bb1: {
@@ -114,20 +114,16 @@
           _3 = ControlFlow::<Result<Infallible, i32>, i32>::Break(move _13);
           StorageDead(_13);
 -         goto -> bb5;
-+         goto -> bb9;
++         goto -> bb8;
       }
   
       bb7: {
-          unreachable;
-      }
-  
-      bb8: {
           _11 = move ((_4 as Ok).0: i32);
           _3 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(move _11);
           goto -> bb5;
 +     }
 + 
-+     bb9: {
++     bb8: {
 +         StorageDead(_12);
 +         StorageDead(_11);
 +         StorageDead(_10);
diff --git a/tests/mir-opt/jump_threading.rs b/tests/mir-opt/jump_threading.rs
index 66e5c5d3c11..0cbdaa085bc 100644
--- a/tests/mir-opt/jump_threading.rs
+++ b/tests/mir-opt/jump_threading.rs
@@ -50,7 +50,7 @@ fn identity(x: Result<i32, i32>) -> Result<i32, i32> {
     // CHECK-LABEL: fn identity(
     // CHECK: bb0: {
     // CHECK:     [[x:_.*]] = _1;
-    // CHECK:     switchInt(move {{_.*}}) -> [0: bb8, 1: bb6, otherwise: bb7];
+    // CHECK:     switchInt(move {{_.*}}) -> [0: bb7, 1: bb6, otherwise: bb2];
     // CHECK: bb1: {
     // CHECK:     {{_.*}} = (([[controlflow:_.*]] as Continue).0: i32);
     // CHECK:     _0 = Result::<i32, i32>::Ok(
@@ -68,14 +68,12 @@ fn identity(x: Result<i32, i32>) -> Result<i32, i32> {
     // CHECK: bb6: {
     // CHECK:     {{_.*}} = move (([[x]] as Err).0: i32);
     // CHECK:     [[controlflow]] = ControlFlow::<Result<Infallible, i32>, i32>::Break(
-    // CHECK:     goto -> bb9;
+    // CHECK:     goto -> bb8;
     // CHECK: bb7: {
-    // CHECK:     unreachable;
-    // CHECK: bb8: {
     // CHECK:     {{_.*}} = move (([[x]] as Ok).0: i32);
     // CHECK:     [[controlflow]] = ControlFlow::<Result<Infallible, i32>, i32>::Continue(
     // CHECK:     goto -> bb5;
-    // CHECK: bb9: {
+    // CHECK: bb8: {
     // CHECK:     goto -> bb3;
     Ok(x?)
 }
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff
index 5cb528c0d5f..47e0d402347 100644
--- a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff
@@ -56,9 +56,9 @@
 +         _2 = const Option::<Layout>::None;
           StorageLive(_10);
 -         _10 = discriminant(_2);
--         switchInt(move _10) -> [0: bb1, 1: bb3, otherwise: bb2];
+-         switchInt(move _10) -> [0: bb1, 1: bb2, otherwise: bb6];
 +         _10 = const 0_isize;
-+         switchInt(const 0_isize) -> [0: bb1, 1: bb3, otherwise: bb2];
++         switchInt(const 0_isize) -> [0: bb1, 1: bb2, otherwise: bb6];
       }
   
       bb1: {
@@ -66,10 +66,6 @@
       }
   
       bb2: {
-          unreachable;
-      }
-  
-      bb3: {
 -         _1 = move ((_2 as Some).0: std::alloc::Layout);
 +         _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }};
           StorageDead(_10);
@@ -79,18 +75,18 @@
           StorageLive(_5);
           StorageLive(_6);
           _9 = const _;
--         _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb4, unwind unreachable];
-+         _6 = std::alloc::Global::alloc_impl(const {ALLOC1<imm>: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb4, unwind unreachable];
+-         _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb3, unwind unreachable];
++         _6 = std::alloc::Global::alloc_impl(const {ALLOC1<imm>: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb3, unwind unreachable];
       }
   
-      bb4: {
+      bb3: {
           StorageLive(_12);
           StorageLive(_15);
           _12 = discriminant(_6);
-          switchInt(move _12) -> [0: bb6, 1: bb5, otherwise: bb2];
+          switchInt(move _12) -> [0: bb5, 1: bb4, otherwise: bb6];
       }
   
-      bb5: {
+      bb4: {
           _15 = const "called `Result::unwrap()` on an `Err` value";
           StorageLive(_16);
           StorageLive(_17);
@@ -100,7 +96,7 @@
           _14 = result::unwrap_failed(move _15, move _16) -> unwind unreachable;
       }
   
-      bb6: {
+      bb5: {
           _5 = move ((_6 as Ok).0: std::ptr::NonNull<[u8]>);
           StorageDead(_15);
           StorageDead(_12);
@@ -115,6 +111,10 @@
           StorageDead(_3);
           return;
       }
+  
+      bb6: {
+          unreachable;
+      }
   }
 + 
 + ALLOC0 (size: 8, align: 4) {
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff
index 1e1585f20ae..dee57ce6c27 100644
--- a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff
@@ -41,9 +41,9 @@
 +         _2 = const Option::<Layout>::None;
           StorageLive(_10);
 -         _10 = discriminant(_2);
--         switchInt(move _10) -> [0: bb2, 1: bb4, otherwise: bb3];
+-         switchInt(move _10) -> [0: bb2, 1: bb3, otherwise: bb5];
 +         _10 = const 0_isize;
-+         switchInt(const 0_isize) -> [0: bb2, 1: bb4, otherwise: bb3];
++         switchInt(const 0_isize) -> [0: bb2, 1: bb3, otherwise: bb5];
       }
   
       bb1: {
@@ -64,10 +64,6 @@
       }
   
       bb3: {
-          unreachable;
-      }
-  
-      bb4: {
 -         _1 = move ((_2 as Some).0: std::alloc::Layout);
 +         _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }};
           StorageDead(_10);
@@ -77,13 +73,17 @@
           StorageLive(_5);
           StorageLive(_6);
           _9 = const _;
--         _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb5, unwind continue];
-+         _6 = std::alloc::Global::alloc_impl(const {ALLOC1<imm>: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb5, unwind continue];
+-         _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb4, unwind continue];
++         _6 = std::alloc::Global::alloc_impl(const {ALLOC1<imm>: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb4, unwind continue];
       }
   
-      bb5: {
+      bb4: {
           _5 = Result::<NonNull<[u8]>, std::alloc::AllocError>::unwrap(move _6) -> [return: bb1, unwind continue];
       }
+  
+      bb5: {
+          unreachable;
+      }
   }
 + 
 + ALLOC0 (size: 8, align: 4) {
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff
index e655af559a1..a255b15920c 100644
--- a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff
@@ -56,9 +56,9 @@
 +         _2 = const Option::<Layout>::None;
           StorageLive(_10);
 -         _10 = discriminant(_2);
--         switchInt(move _10) -> [0: bb1, 1: bb3, otherwise: bb2];
+-         switchInt(move _10) -> [0: bb1, 1: bb2, otherwise: bb6];
 +         _10 = const 0_isize;
-+         switchInt(const 0_isize) -> [0: bb1, 1: bb3, otherwise: bb2];
++         switchInt(const 0_isize) -> [0: bb1, 1: bb2, otherwise: bb6];
       }
   
       bb1: {
@@ -66,10 +66,6 @@
       }
   
       bb2: {
-          unreachable;
-      }
-  
-      bb3: {
 -         _1 = move ((_2 as Some).0: std::alloc::Layout);
 +         _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }};
           StorageDead(_10);
@@ -79,18 +75,18 @@
           StorageLive(_5);
           StorageLive(_6);
           _9 = const _;
--         _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb4, unwind unreachable];
-+         _6 = std::alloc::Global::alloc_impl(const {ALLOC1<imm>: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb4, unwind unreachable];
+-         _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb3, unwind unreachable];
++         _6 = std::alloc::Global::alloc_impl(const {ALLOC1<imm>: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb3, unwind unreachable];
       }
   
-      bb4: {
+      bb3: {
           StorageLive(_12);
           StorageLive(_15);
           _12 = discriminant(_6);
-          switchInt(move _12) -> [0: bb6, 1: bb5, otherwise: bb2];
+          switchInt(move _12) -> [0: bb5, 1: bb4, otherwise: bb6];
       }
   
-      bb5: {
+      bb4: {
           _15 = const "called `Result::unwrap()` on an `Err` value";
           StorageLive(_16);
           StorageLive(_17);
@@ -100,7 +96,7 @@
           _14 = result::unwrap_failed(move _15, move _16) -> unwind unreachable;
       }
   
-      bb6: {
+      bb5: {
           _5 = move ((_6 as Ok).0: std::ptr::NonNull<[u8]>);
           StorageDead(_15);
           StorageDead(_12);
@@ -115,6 +111,10 @@
           StorageDead(_3);
           return;
       }
+  
+      bb6: {
+          unreachable;
+      }
   }
 + 
 + ALLOC0 (size: 16, align: 8) {
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff
index a6658713a02..192ffea2591 100644
--- a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff
@@ -41,9 +41,9 @@
 +         _2 = const Option::<Layout>::None;
           StorageLive(_10);
 -         _10 = discriminant(_2);
--         switchInt(move _10) -> [0: bb2, 1: bb4, otherwise: bb3];
+-         switchInt(move _10) -> [0: bb2, 1: bb3, otherwise: bb5];
 +         _10 = const 0_isize;
-+         switchInt(const 0_isize) -> [0: bb2, 1: bb4, otherwise: bb3];
++         switchInt(const 0_isize) -> [0: bb2, 1: bb3, otherwise: bb5];
       }
   
       bb1: {
@@ -64,10 +64,6 @@
       }
   
       bb3: {
-          unreachable;
-      }
-  
-      bb4: {
 -         _1 = move ((_2 as Some).0: std::alloc::Layout);
 +         _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }};
           StorageDead(_10);
@@ -77,13 +73,17 @@
           StorageLive(_5);
           StorageLive(_6);
           _9 = const _;
--         _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb5, unwind continue];
-+         _6 = std::alloc::Global::alloc_impl(const {ALLOC1<imm>: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb5, unwind continue];
+-         _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb4, unwind continue];
++         _6 = std::alloc::Global::alloc_impl(const {ALLOC1<imm>: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb4, unwind continue];
       }
   
-      bb5: {
+      bb4: {
           _5 = Result::<NonNull<[u8]>, std::alloc::AllocError>::unwrap(move _6) -> [return: bb1, unwind continue];
       }
+  
+      bb5: {
+          unreachable;
+      }
   }
 + 
 + ALLOC0 (size: 16, align: 8) {
diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.32bit.panic-abort.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.32bit.panic-abort.diff
index 6e681b4f970..5f2a096bb1f 100644
--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.32bit.panic-abort.diff
+++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.32bit.panic-abort.diff
@@ -61,7 +61,6 @@
 +         StorageDead(_10);
 +         StorageDead(_11);
 +         nop;
-          nop;
           StorageDead(_8);
           StorageDead(_3);
           StorageDead(_1);
diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.32bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.32bit.panic-unwind.diff
index e987969d313..a49546f158c 100644
--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.32bit.panic-unwind.diff
+++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.32bit.panic-unwind.diff
@@ -61,7 +61,6 @@
 +         StorageDead(_10);
 +         StorageDead(_11);
 +         nop;
-          nop;
           StorageDead(_8);
           StorageDead(_3);
           StorageDead(_1);
diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.64bit.panic-abort.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.64bit.panic-abort.diff
index 6e681b4f970..5f2a096bb1f 100644
--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.64bit.panic-abort.diff
+++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.64bit.panic-abort.diff
@@ -61,7 +61,6 @@
 +         StorageDead(_10);
 +         StorageDead(_11);
 +         nop;
-          nop;
           StorageDead(_8);
           StorageDead(_3);
           StorageDead(_1);
diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.64bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.64bit.panic-unwind.diff
index e987969d313..a49546f158c 100644
--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.64bit.panic-unwind.diff
+++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ScalarReplacementOfAggregates.64bit.panic-unwind.diff
@@ -61,7 +61,6 @@
 +         StorageDead(_10);
 +         StorageDead(_11);
 +         nop;
-          nop;
           StorageDead(_8);
           StorageDead(_3);
           StorageDead(_1);
diff --git a/tests/mir-opt/reference_prop.rs b/tests/mir-opt/reference_prop.rs
index 8adfbb4535b..b71ad90abb1 100644
--- a/tests/mir-opt/reference_prop.rs
+++ b/tests/mir-opt/reference_prop.rs
@@ -696,7 +696,7 @@ fn multiple_storage() {
             // As there are multiple `StorageLive` statements for `x`, we cannot know if this `z`'s
             // pointer address is the address of `x`, so do nothing.
             let y = *z;
-            Call(RET = opaque(y), retblock, UnwindContinue())
+            Call(RET = opaque(y), ReturnTo(retblock), UnwindContinue())
         }
 
         retblock = {
@@ -724,7 +724,7 @@ fn dominate_storage() {
         }
         bb1 = {
             let c = *r;
-            Call(RET = opaque(c), bb2, UnwindContinue())
+            Call(RET = opaque(c), ReturnTo(bb2), UnwindContinue())
         }
         bb2 = {
             StorageDead(x);
@@ -760,18 +760,18 @@ fn maybe_dead(m: bool) {
         bb1 = {
             StorageDead(x);
             StorageDead(y);
-            Call(RET = opaque(u), bb2, UnwindContinue())
+            Call(RET = opaque(u), ReturnTo(bb2), UnwindContinue())
         }
         bb2 = {
             // As `x` may be `StorageDead`, `a` may be dangling, so we do nothing.
             let z = *a;
-            Call(RET = opaque(z), bb3, UnwindContinue())
+            Call(RET = opaque(z), ReturnTo(bb3), UnwindContinue())
         }
         bb3 = {
             // As `y` may be `StorageDead`, `b` may be dangling, so we do nothing.
             // This implies that we also do not substitute `b` in `bb0`.
             let t = *b;
-            Call(RET = opaque(t), retblock, UnwindContinue())
+            Call(RET = opaque(t), ReturnTo(retblock), UnwindContinue())
         }
         retblock = {
             Return()
diff --git a/tests/mir-opt/remove_never_const.rs b/tests/mir-opt/remove_never_const.rs
index c144edaffaf..81562058d80 100644
--- a/tests/mir-opt/remove_never_const.rs
+++ b/tests/mir-opt/remove_never_const.rs
@@ -3,9 +3,6 @@
 // consts in codegen. We also have tests for this that catches the error, see
 // tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs.
 
-// Force generation of optimized mir for functions that do not reach codegen.
-// compile-flags: --emit mir,link
-
 #![feature(never_type)]
 
 struct PrintName<T>(T);
diff --git a/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff b/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
index d287b20c4ea..a12db0a730c 100644
--- a/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
+++ b/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
@@ -52,7 +52,7 @@
           StorageLive(_10);
           StorageLive(_11);
           _9 = discriminant(_1);
-          switchInt(move _9) -> [0: bb6, 1: bb5, otherwise: bb2];
+          switchInt(move _9) -> [0: bb5, 1: bb4, otherwise: bb6];
       }
   
       bb1: {
@@ -63,10 +63,6 @@
       }
   
       bb2: {
-          unreachable;
-      }
-  
-      bb3: {
           _6 = ((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>);
           _13 = ((_6 as Err).0: i32);
           _0 = Result::<i32, i32>::Err(move _13);
@@ -74,27 +70,31 @@
           return;
       }
   
-      bb4: {
+      bb3: {
           StorageDead(_11);
           StorageDead(_10);
           StorageDead(_9);
           _5 = discriminant(_3);
-          switchInt(move _5) -> [0: bb1, 1: bb3, otherwise: bb2];
+          switchInt(move _5) -> [0: bb1, 1: bb2, otherwise: bb6];
       }
   
-      bb5: {
+      bb4: {
           _11 = ((_1 as Err).0: i32);
           StorageLive(_12);
           _12 = Result::<Infallible, i32>::Err(move _11);
           _3 = ControlFlow::<Result<Infallible, i32>, i32>::Break(move _12);
           StorageDead(_12);
-          goto -> bb4;
+          goto -> bb3;
       }
   
-      bb6: {
+      bb5: {
           _10 = ((_1 as Ok).0: i32);
           _3 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(move _10);
-          goto -> bb4;
+          goto -> bb3;
+      }
+  
+      bb6: {
+          unreachable;
       }
   }
   
diff --git a/tests/mir-opt/separate_const_switch.too_complex.SeparateConstSwitch.diff b/tests/mir-opt/separate_const_switch.too_complex.SeparateConstSwitch.diff
index e2bf33f7fbc..80f40b86919 100644
--- a/tests/mir-opt/separate_const_switch.too_complex.SeparateConstSwitch.diff
+++ b/tests/mir-opt/separate_const_switch.too_complex.SeparateConstSwitch.diff
@@ -30,47 +30,47 @@
       bb0: {
           StorageLive(_2);
           _3 = discriminant(_1);
-          switchInt(move _3) -> [0: bb3, 1: bb1, otherwise: bb2];
+          switchInt(move _3) -> [0: bb2, 1: bb1, otherwise: bb7];
       }
   
       bb1: {
           _6 = ((_1 as Err).0: usize);
           _2 = ControlFlow::<usize, i32>::Break(_6);
-          goto -> bb4;
+          goto -> bb3;
       }
   
       bb2: {
-          unreachable;
-      }
-  
-      bb3: {
           _4 = ((_1 as Ok).0: i32);
           _2 = ControlFlow::<usize, i32>::Continue(_4);
-          goto -> bb4;
+          goto -> bb3;
       }
   
-      bb4: {
+      bb3: {
           _8 = discriminant(_2);
-          switchInt(move _8) -> [0: bb6, 1: bb5, otherwise: bb2];
+          switchInt(move _8) -> [0: bb5, 1: bb4, otherwise: bb7];
       }
   
-      bb5: {
+      bb4: {
           StorageLive(_11);
           _11 = ((_2 as Break).0: usize);
           _0 = Option::<i32>::None;
           StorageDead(_11);
-          goto -> bb7;
+          goto -> bb6;
       }
   
-      bb6: {
+      bb5: {
           _9 = ((_2 as Continue).0: i32);
           _0 = Option::<i32>::Some(_9);
-          goto -> bb7;
+          goto -> bb6;
       }
   
-      bb7: {
+      bb6: {
           StorageDead(_2);
           return;
       }
+  
+      bb7: {
+          unreachable;
+      }
   }
   
diff --git a/tests/mir-opt/set_no_discriminant.f.JumpThreading.diff b/tests/mir-opt/set_no_discriminant.f.JumpThreading.diff
new file mode 100644
index 00000000000..bc28e81c9a8
--- /dev/null
+++ b/tests/mir-opt/set_no_discriminant.f.JumpThreading.diff
@@ -0,0 +1,26 @@
+- // MIR for `f` before JumpThreading
++ // MIR for `f` after JumpThreading
+  
+  fn f() -> usize {
+      let mut _0: usize;
+      let mut _1: isize;
+      let mut _2: E<char>;
+  
+      bb0: {
+          _2 = E::<char>::A;
+          discriminant(_2) = 1;
+          _1 = discriminant(_2);
+          switchInt(_1) -> [0: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          _0 = const 0_usize;
+          return;
+      }
+  
+      bb2: {
+          _0 = const 1_usize;
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/set_no_discriminant.generic.JumpThreading.diff b/tests/mir-opt/set_no_discriminant.generic.JumpThreading.diff
new file mode 100644
index 00000000000..78bfeef3c64
--- /dev/null
+++ b/tests/mir-opt/set_no_discriminant.generic.JumpThreading.diff
@@ -0,0 +1,26 @@
+- // MIR for `generic` before JumpThreading
++ // MIR for `generic` after JumpThreading
+  
+  fn generic() -> usize {
+      let mut _0: usize;
+      let mut _1: isize;
+      let mut _2: E<T>;
+  
+      bb0: {
+          _2 = E::<T>::A;
+          discriminant(_2) = 1;
+          _1 = discriminant(_2);
+          switchInt(_1) -> [0: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          _0 = const 0_usize;
+          return;
+      }
+  
+      bb2: {
+          _0 = const 1_usize;
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/set_no_discriminant.rs b/tests/mir-opt/set_no_discriminant.rs
new file mode 100644
index 00000000000..8ffb9a2910a
--- /dev/null
+++ b/tests/mir-opt/set_no_discriminant.rs
@@ -0,0 +1,78 @@
+// `SetDiscriminant` does not actually write anything if the chosen variant is the untagged variant
+// of a niche encoding. Verify that we do not thread over this case.
+// unit-test: JumpThreading
+
+#![feature(custom_mir)]
+#![feature(core_intrinsics)]
+
+use std::intrinsics::mir::*;
+
+enum E<T> {
+    A,
+    B(T),
+}
+
+// EMIT_MIR set_no_discriminant.f.JumpThreading.diff
+#[custom_mir(dialect = "runtime")]
+pub fn f() -> usize {
+    // CHECK-LABEL: fn f(
+    // CHECK-NOT: goto
+    // CHECK: switchInt(
+    // CHECK-NOT: goto
+    mir!(
+        let a: isize;
+        let e: E<char>;
+        {
+            e = E::A;
+            SetDiscriminant(e, 1);
+            a = Discriminant(e);
+            match a {
+                0 => bb0,
+                _ => bb1,
+            }
+        }
+        bb0 = {
+            RET = 0;
+            Return()
+        }
+        bb1 = {
+            RET = 1;
+            Return()
+        }
+    )
+}
+
+// EMIT_MIR set_no_discriminant.generic.JumpThreading.diff
+#[custom_mir(dialect = "runtime")]
+pub fn generic<T>() -> usize {
+    // CHECK-LABEL: fn generic(
+    // CHECK-NOT: goto
+    // CHECK: switchInt(
+    // CHECK-NOT: goto
+    mir!(
+        let a: isize;
+        let e: E<T>;
+        {
+            e = E::A;
+            SetDiscriminant(e, 1);
+            a = Discriminant(e);
+            match a {
+                0 => bb0,
+                _ => bb1,
+            }
+        }
+        bb0 = {
+            RET = 0;
+            Return()
+        }
+        bb1 = {
+            RET = 1;
+            Return()
+        }
+    )
+}
+
+fn main() {
+    assert_eq!(f(), 0);
+    assert_eq!(generic::<char>(), 0);
+}
diff --git a/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-abort.diff b/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-abort.diff
index 64a435f2245..c3076fb67c2 100644
--- a/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-abort.diff
+++ b/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-abort.diff
@@ -6,8 +6,8 @@
       let _1: ();
   
       bb0: {
--         switchInt(const false) -> [0: bb3, otherwise: bb1];
-+         goto -> bb3;
+-         switchInt(const false) -> [0: bb2, otherwise: bb1];
++         goto -> bb2;
       }
   
       bb1: {
@@ -15,14 +15,6 @@
       }
   
       bb2: {
-          goto -> bb4;
-      }
-  
-      bb3: {
-          goto -> bb4;
-      }
-  
-      bb4: {
           return;
       }
   }
diff --git a/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-unwind.diff b/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-unwind.diff
index 146e00686ed..6c346e20e58 100644
--- a/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-unwind.diff
+++ b/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-unwind.diff
@@ -6,8 +6,8 @@
       let _1: ();
   
       bb0: {
--         switchInt(const false) -> [0: bb3, otherwise: bb1];
-+         goto -> bb3;
+-         switchInt(const false) -> [0: bb2, otherwise: bb1];
++         goto -> bb2;
       }
   
       bb1: {
@@ -15,14 +15,6 @@
       }
   
       bb2: {
-          goto -> bb4;
-      }
-  
-      bb3: {
-          goto -> bb4;
-      }
-  
-      bb4: {
           return;
       }
   }
diff --git a/tests/mir-opt/simplify_match.main.GVN.panic-abort.diff b/tests/mir-opt/simplify_match.main.GVN.panic-abort.diff
index 825babe7994..d7ade041e4c 100644
--- a/tests/mir-opt/simplify_match.main.GVN.panic-abort.diff
+++ b/tests/mir-opt/simplify_match.main.GVN.panic-abort.diff
@@ -11,19 +11,15 @@
   
       bb0: {
           _2 = const false;
--         switchInt(_2) -> [0: bb1, otherwise: bb2];
-+         switchInt(const false) -> [0: bb1, otherwise: bb2];
+-         switchInt(_2) -> [0: bb2, otherwise: bb1];
++         switchInt(const false) -> [0: bb2, otherwise: bb1];
       }
   
       bb1: {
-          goto -> bb3;
+          _0 = noop() -> [return: bb2, unwind unreachable];
       }
   
       bb2: {
-          _0 = noop() -> [return: bb3, unwind unreachable];
-      }
-  
-      bb3: {
           return;
       }
   }
diff --git a/tests/mir-opt/simplify_match.main.GVN.panic-unwind.diff b/tests/mir-opt/simplify_match.main.GVN.panic-unwind.diff
index 24ab6c39788..931c5c43c4c 100644
--- a/tests/mir-opt/simplify_match.main.GVN.panic-unwind.diff
+++ b/tests/mir-opt/simplify_match.main.GVN.panic-unwind.diff
@@ -11,19 +11,15 @@
   
       bb0: {
           _2 = const false;
--         switchInt(_2) -> [0: bb1, otherwise: bb2];
-+         switchInt(const false) -> [0: bb1, otherwise: bb2];
+-         switchInt(_2) -> [0: bb2, otherwise: bb1];
++         switchInt(const false) -> [0: bb2, otherwise: bb1];
       }
   
       bb1: {
-          goto -> bb3;
+          _0 = noop() -> [return: bb2, unwind continue];
       }
   
       bb2: {
-          _0 = noop() -> [return: bb3, unwind continue];
-      }
-  
-      bb3: {
           return;
       }
   }
diff --git a/tests/mir-opt/spanview_block.main.built.after.html b/tests/mir-opt/spanview_block.main.built.after.html
deleted file mode 100644
index 54ef00f56f3..00000000000
--- a/tests/mir-opt/spanview_block.main.built.after.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>spanview_block.main.built.after</title>
-<style>
-    .line {
-        counter-increment: line;
-    }
-    .line:before {
-        content: counter(line) ": ";
-        font-family: Menlo, Monaco, monospace;
-        font-style: italic;
-        width: 3.8em;
-        display: inline-block;
-        text-align: right;
-        filter: opacity(50%);
-        -webkit-user-select: none;
-    }
-    .code {
-        color: #dddddd;
-        background-color: #222222;
-        font-family: Menlo, Monaco, monospace;
-        line-height: 1.4em;
-        border-bottom: 2px solid #222222;
-        white-space: pre;
-        display: inline-block;
-    }
-    .odd {
-        background-color: #55bbff;
-        color: #223311;
-    }
-    .even {
-        background-color: #ee7756;
-        color: #551133;
-    }
-    .code {
-        --index: calc(var(--layer) - 1);
-        padding-top: calc(var(--index) * 0.15em);
-        filter:
-            hue-rotate(calc(var(--index) * 25deg))
-            saturate(calc(100% - (var(--index) * 2%)))
-            brightness(calc(100% - (var(--index) * 1.5%)));
-    }
-    .annotation {
-        color: #4444ff;
-        font-family: monospace;
-        font-style: italic;
-        display: none;
-        -webkit-user-select: none;
-    }
-    body:active .annotation {
-        /* requires holding mouse down anywhere on the page */
-        display: inline-block;
-    }
-    span:hover .annotation {
-        /* requires hover over a span ONLY on its first line */
-        display: inline-block;
-    }
-</style>
-</head>
-<body>
-<div class="code" style="counter-reset: line 5"><span class="line"><span class="code" style="--layer: 0">fn main() </span><span><span class="code even" style="--layer: 1" title="0: $DIR/spanview_block.rs:6:11: 6:13:
-    6:11-6:13: Assign: _0 = const ()
-    6:13-6:13: Return: return"><span class="annotation">0⦊</span>{}<span class="annotation">⦉0</span></span></span></span></div>
-</body>
-</html>
diff --git a/tests/mir-opt/spanview_block.rs b/tests/mir-opt/spanview_block.rs
deleted file mode 100644
index e8bc3d16348..00000000000
--- a/tests/mir-opt/spanview_block.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-// skip-filecheck
-// Test spanview block output
-// compile-flags: -Z dump-mir-spanview=block
-
-// EMIT_MIR spanview_block.main.built.after.html
-fn main() {}
diff --git a/tests/mir-opt/spanview_statement.main.built.after.html b/tests/mir-opt/spanview_statement.main.built.after.html
deleted file mode 100644
index 5e782b05f3b..00000000000
--- a/tests/mir-opt/spanview_statement.main.built.after.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>spanview_statement.main.built.after</title>
-<style>
-    .line {
-        counter-increment: line;
-    }
-    .line:before {
-        content: counter(line) ": ";
-        font-family: Menlo, Monaco, monospace;
-        font-style: italic;
-        width: 3.8em;
-        display: inline-block;
-        text-align: right;
-        filter: opacity(50%);
-        -webkit-user-select: none;
-    }
-    .code {
-        color: #dddddd;
-        background-color: #222222;
-        font-family: Menlo, Monaco, monospace;
-        line-height: 1.4em;
-        border-bottom: 2px solid #222222;
-        white-space: pre;
-        display: inline-block;
-    }
-    .odd {
-        background-color: #55bbff;
-        color: #223311;
-    }
-    .even {
-        background-color: #ee7756;
-        color: #551133;
-    }
-    .code {
-        --index: calc(var(--layer) - 1);
-        padding-top: calc(var(--index) * 0.15em);
-        filter:
-            hue-rotate(calc(var(--index) * 25deg))
-            saturate(calc(100% - (var(--index) * 2%)))
-            brightness(calc(100% - (var(--index) * 1.5%)));
-    }
-    .annotation {
-        color: #4444ff;
-        font-family: monospace;
-        font-style: italic;
-        display: none;
-        -webkit-user-select: none;
-    }
-    body:active .annotation {
-        /* requires holding mouse down anywhere on the page */
-        display: inline-block;
-    }
-    span:hover .annotation {
-        /* requires hover over a span ONLY on its first line */
-        display: inline-block;
-    }
-</style>
-</head>
-<body>
-<div class="code" style="counter-reset: line 5"><span class="line"><span class="code" style="--layer: 0">fn main() </span><span><span class="code even" style="--layer: 1" title="0[0]: $DIR/spanview_statement.rs:6:11: 6:13:
-    6:11-6:13: Assign: _0 = const ()"><span class="annotation">0[0]⦊</span>{}<span class="annotation">⦉0[0]</span></span></span><span><span class="code odd" style="--layer: 1" title="0:Return: $DIR/spanview_statement.rs:6:13: 6:13:
-    6:13-6:13: Return: return"><span class="annotation">0:Return⦊</span>‸<span class="annotation">⦉0:Return</span></span></span></span></div>
-</body>
-</html>
diff --git a/tests/mir-opt/spanview_statement.rs b/tests/mir-opt/spanview_statement.rs
deleted file mode 100644
index d547e6cb1e0..00000000000
--- a/tests/mir-opt/spanview_statement.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-// skip-filecheck
-// Test spanview output (the default value for `-Z dump-mir-spanview` is "statement")
-// compile-flags: -Z dump-mir-spanview
-
-// EMIT_MIR spanview_statement.main.built.after.html
-fn main() {}
diff --git a/tests/mir-opt/spanview_terminator.main.built.after.html b/tests/mir-opt/spanview_terminator.main.built.after.html
deleted file mode 100644
index 2a651489e23..00000000000
--- a/tests/mir-opt/spanview_terminator.main.built.after.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<title>spanview_terminator.main.built.after</title>
-<style>
-    .line {
-        counter-increment: line;
-    }
-    .line:before {
-        content: counter(line) ": ";
-        font-family: Menlo, Monaco, monospace;
-        font-style: italic;
-        width: 3.8em;
-        display: inline-block;
-        text-align: right;
-        filter: opacity(50%);
-        -webkit-user-select: none;
-    }
-    .code {
-        color: #dddddd;
-        background-color: #222222;
-        font-family: Menlo, Monaco, monospace;
-        line-height: 1.4em;
-        border-bottom: 2px solid #222222;
-        white-space: pre;
-        display: inline-block;
-    }
-    .odd {
-        background-color: #55bbff;
-        color: #223311;
-    }
-    .even {
-        background-color: #ee7756;
-        color: #551133;
-    }
-    .code {
-        --index: calc(var(--layer) - 1);
-        padding-top: calc(var(--index) * 0.15em);
-        filter:
-            hue-rotate(calc(var(--index) * 25deg))
-            saturate(calc(100% - (var(--index) * 2%)))
-            brightness(calc(100% - (var(--index) * 1.5%)));
-    }
-    .annotation {
-        color: #4444ff;
-        font-family: monospace;
-        font-style: italic;
-        display: none;
-        -webkit-user-select: none;
-    }
-    body:active .annotation {
-        /* requires holding mouse down anywhere on the page */
-        display: inline-block;
-    }
-    span:hover .annotation {
-        /* requires hover over a span ONLY on its first line */
-        display: inline-block;
-    }
-</style>
-</head>
-<body>
-<div class="code" style="counter-reset: line 5"><span class="line"><span class="code" style="--layer: 0">fn main() {}</span><span><span class="code even" style="--layer: 1" title="0:Return: $DIR/spanview_terminator.rs:6:13: 6:13:
-    6:13-6:13: Return: return"><span class="annotation">0:Return⦊</span>‸<span class="annotation">⦉0:Return</span></span></span></span></div>
-</body>
-</html>
diff --git a/tests/mir-opt/spanview_terminator.rs b/tests/mir-opt/spanview_terminator.rs
deleted file mode 100644
index a2c68b98ef5..00000000000
--- a/tests/mir-opt/spanview_terminator.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-// skip-filecheck
-// Test spanview terminator output
-// compile-flags: -Z dump-mir-spanview=terminator
-
-// EMIT_MIR spanview_terminator.main.built.after.html
-fn main() {}
diff --git a/tests/run-make-fulldeps/hotplug_codegen_backend/Makefile b/tests/run-make-fulldeps/hotplug_codegen_backend/Makefile
index 6752091e699..3a5a66b6755 100644
--- a/tests/run-make-fulldeps/hotplug_codegen_backend/Makefile
+++ b/tests/run-make-fulldeps/hotplug_codegen_backend/Makefile
@@ -7,7 +7,6 @@ include ../../run-make/tools.mk
 # -Zbinary-dep-depinfo is used.
 
 all:
-	/bin/echo || exit 0 # This test requires /bin/echo to exist
 	$(RUSTC) the_backend.rs --crate-name the_backend --crate-type dylib \
 		-o $(TMPDIR)/the_backend.dylib
 
diff --git a/tests/run-make/raw-dylib-c/Makefile b/tests/run-make/raw-dylib-c/Makefile
index 06e7935c026..af5c4a6edd7 100644
--- a/tests/run-make/raw-dylib-c/Makefile
+++ b/tests/run-make/raw-dylib-c/Makefile
@@ -17,7 +17,7 @@ else
 	$(CC) "$(TMPDIR)"/extern_1.obj -shared -o "$(TMPDIR)"/extern_1.dll
 	$(CC) "$(TMPDIR)"/extern_2.obj -shared -o "$(TMPDIR)"/extern_2.dll
 endif
-	"$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
+	"$(TMPDIR)"/driver | tr -d '\r' > "$(TMPDIR)"/output.txt
 	"$(TMPDIR)"/raw_dylib_test_bin > "$(TMPDIR)"/output_bin.txt
 
 ifdef RUSTC_BLESS_TEST
diff --git a/tests/run-make/raw-dylib-inline-cross-dylib/Makefile b/tests/run-make/raw-dylib-inline-cross-dylib/Makefile
index 195b5fda56f..6b44b40e253 100644
--- a/tests/run-make/raw-dylib-inline-cross-dylib/Makefile
+++ b/tests/run-make/raw-dylib-inline-cross-dylib/Makefile
@@ -26,5 +26,5 @@ else
 	$(CC) "$(TMPDIR)"/extern_1.obj -shared -o "$(TMPDIR)"/extern_1.dll
 	$(CC) "$(TMPDIR)"/extern_2.obj -shared -o "$(TMPDIR)"/extern_2.dll
 endif
-	$(call RUN,driver) > "$(TMPDIR)"/output.txt
+	$(call RUN,driver) | tr -d '\r' > "$(TMPDIR)"/output.txt
 	$(RUSTC_TEST_OP) "$(TMPDIR)"/output.txt output.txt
diff --git a/tests/run-make/raw-dylib-link-ordinal/Makefile b/tests/run-make/raw-dylib-link-ordinal/Makefile
index 49e959cdb5b..3cf1300c243 100644
--- a/tests/run-make/raw-dylib-link-ordinal/Makefile
+++ b/tests/run-make/raw-dylib-link-ordinal/Makefile
@@ -13,5 +13,5 @@ ifdef IS_MSVC
 else
 	$(CC) "$(TMPDIR)"/exporter.obj exporter.def -shared -o "$(TMPDIR)"/exporter.dll
 endif
-	"$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
+	"$(TMPDIR)"/driver | tr -d '\r' > "$(TMPDIR)"/output.txt
 	$(RUSTC_TEST_OP) "$(TMPDIR)"/output.txt output.txt
diff --git a/tests/run-make/sanitizer-cdylib-link/Makefile b/tests/run-make/sanitizer-cdylib-link/Makefile
index 691585268bf..10d94afc39e 100644
--- a/tests/run-make/sanitizer-cdylib-link/Makefile
+++ b/tests/run-make/sanitizer-cdylib-link/Makefile
@@ -12,5 +12,5 @@ LOG := $(TMPDIR)/log.txt
 
 all:
 	$(RUSTC) -g -Z sanitizer=address --crate-type cdylib --target $(TARGET) library.rs
-	$(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) -llibrary program.rs
+	$(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) program.rs
 	LD_LIBRARY_PATH=$(TMPDIR) $(TMPDIR)/program 2>&1 | $(CGREP) stack-buffer-overflow
diff --git a/tests/run-make/sanitizer-cdylib-link/program.rs b/tests/run-make/sanitizer-cdylib-link/program.rs
index ef053aa2e7a..1026c7f89ba 100644
--- a/tests/run-make/sanitizer-cdylib-link/program.rs
+++ b/tests/run-make/sanitizer-cdylib-link/program.rs
@@ -1,3 +1,5 @@
+#[cfg_attr(windows, link(name = "library.dll.lib", modifiers = "+verbatim"))]
+#[cfg_attr(not(windows), link(name = "library"))]
 extern "C" {
     fn overflow();
 }
diff --git a/tests/run-make/sanitizer-dylib-link/Makefile b/tests/run-make/sanitizer-dylib-link/Makefile
index b0a91e5b197..c5a698db3a0 100644
--- a/tests/run-make/sanitizer-dylib-link/Makefile
+++ b/tests/run-make/sanitizer-dylib-link/Makefile
@@ -12,5 +12,5 @@ LOG := $(TMPDIR)/log.txt
 
 all:
 	$(RUSTC) -g -Z sanitizer=address --crate-type dylib --target $(TARGET) library.rs
-	$(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) -llibrary program.rs
+	$(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) program.rs
 	LD_LIBRARY_PATH=$(TMPDIR) $(TMPDIR)/program 2>&1 | $(CGREP) stack-buffer-overflow
diff --git a/tests/run-make/sanitizer-dylib-link/program.rs b/tests/run-make/sanitizer-dylib-link/program.rs
index ef053aa2e7a..1026c7f89ba 100644
--- a/tests/run-make/sanitizer-dylib-link/program.rs
+++ b/tests/run-make/sanitizer-dylib-link/program.rs
@@ -1,3 +1,5 @@
+#[cfg_attr(windows, link(name = "library.dll.lib", modifiers = "+verbatim"))]
+#[cfg_attr(not(windows), link(name = "library"))]
 extern "C" {
     fn overflow();
 }
diff --git a/tests/run-make/sanitizer-staticlib-link/program.rs b/tests/run-make/sanitizer-staticlib-link/program.rs
index ec59bdb11c8..5fac0e73966 100644
--- a/tests/run-make/sanitizer-staticlib-link/program.rs
+++ b/tests/run-make/sanitizer-staticlib-link/program.rs
@@ -1,4 +1,4 @@
-#[link(name = "library")]
+#[link(name = "library", kind = "static")]
 extern "C" {
     fn overflow();
 }
diff --git a/tests/rustdoc-js-std/parser-errors.js b/tests/rustdoc-js-std/parser-errors.js
index f9f9c4f4de8..16d171260da 100644
--- a/tests/rustdoc-js-std/parser-errors.js
+++ b/tests/rustdoc-js-std/parser-errors.js
@@ -24,7 +24,7 @@ const PARSED = [
         original: "-> *",
         returned: [],
         userQuery: "-> *",
-        error: "Unexpected `*`",
+        error: "Unexpected `*` after ` `",
     },
     {
         query: 'a<"P">',
@@ -108,22 +108,13 @@ const PARSED = [
         error: "Unexpected `::`: paths cannot start with `::`",
     },
     {
-        query: "((a))",
-        elems: [],
-        foundElems: 0,
-        original: "((a))",
-        returned: [],
-        userQuery: "((a))",
-        error: "Unexpected `(`",
-    },
-    {
         query: "(p -> p",
         elems: [],
         foundElems: 0,
         original: "(p -> p",
         returned: [],
         userQuery: "(p -> p",
-        error: "Unexpected `(`",
+        error: "Unexpected `-` after `(`",
     },
     {
         query: "::a::b",
@@ -204,7 +195,7 @@ const PARSED = [
         original: "a (b:",
         returned: [],
         userQuery: "a (b:",
-        error: "Unexpected `(`",
+        error: "Expected `,`, `:` or `->`, found `(`",
     },
     {
         query: "_:",
@@ -249,7 +240,7 @@ const PARSED = [
         original: "ab'",
         returned: [],
         userQuery: "ab'",
-        error: "Unexpected `'`",
+        error: "Unexpected `'` after `b`",
     },
     {
         query: "a->",
diff --git a/tests/rustdoc-js-std/parser-slice-array.js b/tests/rustdoc-js-std/parser-slice-array.js
index 239391bed42..1de52af94e6 100644
--- a/tests/rustdoc-js-std/parser-slice-array.js
+++ b/tests/rustdoc-js-std/parser-slice-array.js
@@ -267,6 +267,24 @@ const PARSED = [
         error: "Unexpected `]`",
     },
     {
+        query: '[a<b>',
+        elems: [],
+        foundElems: 0,
+        original: "[a<b>",
+        returned: [],
+        userQuery: "[a<b>",
+        error: "Unclosed `[`",
+    },
+    {
+        query: 'a<b>]',
+        elems: [],
+        foundElems: 0,
+        original: "a<b>]",
+        returned: [],
+        userQuery: "a<b>]",
+        error: "Unexpected `]` after `>`",
+    },
+    {
         query: 'primitive:[u8]',
         elems: [
             {
diff --git a/tests/rustdoc-js-std/parser-tuple.js b/tests/rustdoc-js-std/parser-tuple.js
new file mode 100644
index 00000000000..eb16289d3c0
--- /dev/null
+++ b/tests/rustdoc-js-std/parser-tuple.js
@@ -0,0 +1,365 @@
+const PARSED = [
+    {
+        query: '(((D, ()))',
+        elems: [],
+        foundElems: 0,
+        original: '(((D, ()))',
+        returned: [],
+        userQuery: '(((d, ()))',
+        error: 'Unclosed `(`',
+    },
+    {
+        query: '(((D, ())))',
+        elems: [
+            {
+                name: "()",
+                fullPath: ["()"],
+                pathWithoutLast: [],
+                pathLast: "()",
+                generics: [
+                    {
+                        name: "d",
+                        fullPath: ["d"],
+                        pathWithoutLast: [],
+                        pathLast: "d",
+                        generics: [],
+                        typeFilter: -1,
+                    },
+                    {
+                        name: "()",
+                        fullPath: ["()"],
+                        pathWithoutLast: [],
+                        pathLast: "()",
+                        generics: [],
+                        typeFilter: 1,
+                    },
+                ],
+                typeFilter: 1,
+            }
+        ],
+        foundElems: 1,
+        original: '(((D, ())))',
+        returned: [],
+        userQuery: '(((d, ())))',
+        error: null,
+    },
+    {
+        query: '(),u8',
+        elems: [
+            {
+                name: "()",
+                fullPath: ["()"],
+                pathWithoutLast: [],
+                pathLast: "()",
+                generics: [],
+                typeFilter: 1,
+            },
+            {
+                name: "u8",
+                fullPath: ["u8"],
+                pathWithoutLast: [],
+                pathLast: "u8",
+                generics: [],
+                typeFilter: -1,
+            },
+        ],
+        foundElems: 2,
+        original: "(),u8",
+        returned: [],
+        userQuery: "(),u8",
+        error: null,
+    },
+    // Parens act as grouping operators when:
+    // - there's no commas directly nested within
+    // - there's at least two child types (zero means unit)
+    // - it's not tagged with a type filter
+    // Otherwise, they represent unit and/or tuple. To search for
+    // unit or tuple specifically, use `primitive:unit` or `primitive:tuple<...>`.
+    {
+        query: '(u8)',
+        elems: [
+            {
+                name: "u8",
+                fullPath: ["u8"],
+                pathWithoutLast: [],
+                pathLast: "u8",
+                generics: [],
+                typeFilter: -1,
+            },
+        ],
+        foundElems: 1,
+        original: "(u8)",
+        returned: [],
+        userQuery: "(u8)",
+        error: null,
+    },
+    {
+        query: '(u8,)',
+        elems: [
+            {
+                name: "()",
+                fullPath: ["()"],
+                pathWithoutLast: [],
+                pathLast: "()",
+                generics: [
+                    {
+                        name: "u8",
+                        fullPath: ["u8"],
+                        pathWithoutLast: [],
+                        pathLast: "u8",
+                        generics: [],
+                        typeFilter: -1,
+                    },
+                ],
+                typeFilter: 1,
+            },
+        ],
+        foundElems: 1,
+        original: "(u8,)",
+        returned: [],
+        userQuery: "(u8,)",
+        error: null,
+    },
+    {
+        query: '(,u8)',
+        elems: [
+            {
+                name: "()",
+                fullPath: ["()"],
+                pathWithoutLast: [],
+                pathLast: "()",
+                generics: [
+                    {
+                        name: "u8",
+                        fullPath: ["u8"],
+                        pathWithoutLast: [],
+                        pathLast: "u8",
+                        generics: [],
+                        typeFilter: -1,
+                    },
+                ],
+                typeFilter: 1,
+            },
+        ],
+        foundElems: 1,
+        original: "(,u8)",
+        returned: [],
+        userQuery: "(,u8)",
+        error: null,
+    },
+    {
+        query: 'primitive:(u8)',
+        elems: [
+            {
+                name: "()",
+                fullPath: ["()"],
+                pathWithoutLast: [],
+                pathLast: "()",
+                generics: [
+                    {
+                        name: "u8",
+                        fullPath: ["u8"],
+                        pathWithoutLast: [],
+                        pathLast: "u8",
+                        generics: [],
+                        typeFilter: -1,
+                    },
+                ],
+                typeFilter: 1,
+            },
+        ],
+        foundElems: 1,
+        original: "primitive:(u8)",
+        returned: [],
+        userQuery: "primitive:(u8)",
+        error: null,
+    },
+    {
+        query: '(primitive:u8)',
+        elems: [
+            {
+                name: "u8",
+                fullPath: ["u8"],
+                pathWithoutLast: [],
+                pathLast: "u8",
+                generics: [],
+                typeFilter: 1,
+            },
+        ],
+        foundElems: 1,
+        original: "(primitive:u8)",
+        returned: [],
+        userQuery: "(primitive:u8)",
+        error: null,
+    },
+    {
+        query: '(u8,u8)',
+        elems: [
+            {
+                name: "()",
+                fullPath: ["()"],
+                pathWithoutLast: [],
+                pathLast: "()",
+                generics: [
+                    {
+                        name: "u8",
+                        fullPath: ["u8"],
+                        pathWithoutLast: [],
+                        pathLast: "u8",
+                        generics: [],
+                        typeFilter: -1,
+                    },
+                    {
+                        name: "u8",
+                        fullPath: ["u8"],
+                        pathWithoutLast: [],
+                        pathLast: "u8",
+                        generics: [],
+                        typeFilter: -1,
+                    },
+                ],
+                typeFilter: 1,
+            },
+        ],
+        foundElems: 1,
+        original: "(u8,u8)",
+        returned: [],
+        userQuery: "(u8,u8)",
+        error: null,
+    },
+    {
+        query: '(u8<u8>)',
+        elems: [
+            {
+                name: "u8",
+                fullPath: ["u8"],
+                pathWithoutLast: [],
+                pathLast: "u8",
+                generics: [
+                    {
+                        name: "u8",
+                        fullPath: ["u8"],
+                        pathWithoutLast: [],
+                        pathLast: "u8",
+                        generics: [],
+                        typeFilter: -1,
+                    },
+                ],
+                typeFilter: -1,
+            },
+        ],
+        foundElems: 1,
+        original: "(u8<u8>)",
+        returned: [],
+        userQuery: "(u8<u8>)",
+        error: null,
+    },
+    {
+        query: '()',
+        elems: [
+            {
+                name: "()",
+                fullPath: ["()"],
+                pathWithoutLast: [],
+                pathLast: "()",
+                generics: [],
+                typeFilter: 1,
+            },
+        ],
+        foundElems: 1,
+        original: "()",
+        returned: [],
+        userQuery: "()",
+        error: null,
+    },
+    {
+        query: '(>',
+        elems: [],
+        foundElems: 0,
+        original: "(>",
+        returned: [],
+        userQuery: "(>",
+        error: "Unexpected `>` after `(`",
+    },
+    {
+        query: '(<',
+        elems: [],
+        foundElems: 0,
+        original: "(<",
+        returned: [],
+        userQuery: "(<",
+        error: "Found generics without a path",
+    },
+    {
+        query: '(a>',
+        elems: [],
+        foundElems: 0,
+        original: "(a>",
+        returned: [],
+        userQuery: "(a>",
+        error: "Unexpected `>` after `(`",
+    },
+    {
+        query: '(a<',
+        elems: [],
+        foundElems: 0,
+        original: "(a<",
+        returned: [],
+        userQuery: "(a<",
+        error: "Unclosed `<`",
+    },
+    {
+        query: '(a',
+        elems: [],
+        foundElems: 0,
+        original: "(a",
+        returned: [],
+        userQuery: "(a",
+        error: "Unclosed `(`",
+    },
+    {
+        query: '(',
+        elems: [],
+        foundElems: 0,
+        original: "(",
+        returned: [],
+        userQuery: "(",
+        error: "Unclosed `(`",
+    },
+    {
+        query: ')',
+        elems: [],
+        foundElems: 0,
+        original: ")",
+        returned: [],
+        userQuery: ")",
+        error: "Unexpected `)`",
+    },
+    {
+        query: '(a<b>',
+        elems: [],
+        foundElems: 0,
+        original: "(a<b>",
+        returned: [],
+        userQuery: "(a<b>",
+        error: "Unclosed `(`",
+    },
+    {
+        query: 'a<b>)',
+        elems: [],
+        foundElems: 0,
+        original: "a<b>)",
+        returned: [],
+        userQuery: "a<b>)",
+        error: "Unexpected `)` after `>`",
+    },
+    {
+        query: 'macro:(u8)',
+        elems: [],
+        foundElems: 0,
+        original: "macro:(u8)",
+        returned: [],
+        userQuery: "macro:(u8)",
+        error: "Invalid search type: primitive `()` and `macro` both specified",
+    },
+];
diff --git a/tests/rustdoc-js-std/parser-weird-queries.js b/tests/rustdoc-js-std/parser-weird-queries.js
index ba68c9717c5..26b8c32d680 100644
--- a/tests/rustdoc-js-std/parser-weird-queries.js
+++ b/tests/rustdoc-js-std/parser-weird-queries.js
@@ -44,7 +44,7 @@ const PARSED = [
         original: "a,b(c)",
         returned: [],
         userQuery: "a,b(c)",
-        error: "Unexpected `(`",
+        error: "Expected `,`, `:` or `->`, found `(`",
     },
     {
         query: 'aaa,a',
diff --git a/tests/rustdoc-js/tuple-unit.js b/tests/rustdoc-js/tuple-unit.js
new file mode 100644
index 00000000000..d24a3da328c
--- /dev/null
+++ b/tests/rustdoc-js/tuple-unit.js
@@ -0,0 +1,80 @@
+// exact-check
+
+const EXPECTED = [
+    {
+        'query': '()',
+        'returned': [
+            { 'path': 'tuple_unit', 'name': 'side_effect' },
+            { 'path': 'tuple_unit', 'name': 'one' },
+            { 'path': 'tuple_unit', 'name': 'two' },
+            { 'path': 'tuple_unit', 'name': 'nest' },
+        ],
+        'in_args': [],
+    },
+    {
+        'query': 'primitive:unit',
+        'returned': [
+            { 'path': 'tuple_unit', 'name': 'side_effect' },
+        ],
+        'in_args': [],
+    },
+    {
+        'query': 'primitive:tuple',
+        'returned': [
+            { 'path': 'tuple_unit', 'name': 'one' },
+            { 'path': 'tuple_unit', 'name': 'two' },
+            { 'path': 'tuple_unit', 'name': 'nest' },
+        ],
+        'in_args': [],
+    },
+    {
+        'query': '(P)',
+        'returned': [
+            { 'path': 'tuple_unit', 'name': 'not_tuple' },
+            { 'path': 'tuple_unit', 'name': 'one' },
+            { 'path': 'tuple_unit', 'name': 'two' },
+        ],
+        'in_args': [],
+    },
+    {
+        'query': '(P,)',
+        'returned': [
+            { 'path': 'tuple_unit', 'name': 'one' },
+            { 'path': 'tuple_unit', 'name': 'two' },
+        ],
+        'in_args': [],
+    },
+    {
+        'query': '(P, P)',
+        'returned': [
+            { 'path': 'tuple_unit', 'name': 'two' },
+        ],
+        'in_args': [],
+    },
+    {
+        'query': '(P, ())',
+        'returned': [],
+        'in_args': [],
+    },
+    {
+        'query': '(Q, ())',
+        'returned': [
+            { 'path': 'tuple_unit', 'name': 'nest' },
+        ],
+        'in_args': [],
+    },
+    {
+        'query': '(R)',
+        'returned': [
+            { 'path': 'tuple_unit', 'name': 'nest' },
+        ],
+        'in_args': [],
+    },
+    {
+        'query': '(u32)',
+        'returned': [
+            { 'path': 'tuple_unit', 'name': 'nest' },
+        ],
+        'in_args': [],
+    },
+];
diff --git a/tests/rustdoc-js/tuple-unit.rs b/tests/rustdoc-js/tuple-unit.rs
new file mode 100644
index 00000000000..93f9a671cbc
--- /dev/null
+++ b/tests/rustdoc-js/tuple-unit.rs
@@ -0,0 +1,18 @@
+pub struct P;
+pub struct Q;
+pub struct R<T>(T);
+
+// Checks that tuple and unit both work
+pub fn side_effect() { }
+
+// Check a non-tuple
+pub fn not_tuple() -> P { loop {} }
+
+// Check a 1-tuple
+pub fn one() -> (P,) { loop {} }
+
+// Check a 2-tuple
+pub fn two() -> (P,P) { loop {} }
+
+// Check a nested tuple
+pub fn nest() -> (Q, R<(u32,)>) { loop {} }
diff --git a/tests/rustdoc-ui/issues/issue-105742.stderr b/tests/rustdoc-ui/issues/issue-105742.stderr
index ad1020a1f08..d5a9031075f 100644
--- a/tests/rustdoc-ui/issues/issue-105742.stderr
+++ b/tests/rustdoc-ui/issues/issue-105742.stderr
@@ -323,6 +323,10 @@ LL | ||     Output = <Self as SVec>::Item> as SVec>::Item,
 LL | |
 LL | |  > {
    | |__^ ...because it uses `Self` as a type parameter
+help: consider using an opaque type instead
+   |
+LL | pub fn next<'a, T>(s: &'a mut impl SVec<Item = T, Output = T>) {
+   |                               ~~~~
 
 error[E0107]: missing generics for associated type `SVec::Item`
   --> $DIR/issue-105742.rs:15:21
diff --git a/tests/rustdoc-ui/issues/issue-81662-shortness.rs b/tests/rustdoc-ui/issues/issue-81662-shortness.rs
index 0240d217bee..79fb65dec48 100644
--- a/tests/rustdoc-ui/issues/issue-81662-shortness.rs
+++ b/tests/rustdoc-ui/issues/issue-81662-shortness.rs
@@ -1,4 +1,6 @@
 // compile-flags:--test --error-format=short
+// check-stdout
+// error-pattern:cannot find function `foo` in this scope
 // normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
@@ -6,7 +8,6 @@
 /// ```rust
 /// foo();
 /// ```
-//~^^ ERROR cannot find function `foo` in this scope
 fn foo() {
     println!("Hello, world!");
 }
diff --git a/tests/rustdoc-ui/issues/issue-81662-shortness.stdout b/tests/rustdoc-ui/issues/issue-81662-shortness.stdout
index 6313dde32c5..f32f51e12f2 100644
--- a/tests/rustdoc-ui/issues/issue-81662-shortness.stdout
+++ b/tests/rustdoc-ui/issues/issue-81662-shortness.stdout
@@ -1,16 +1,16 @@
 
 running 1 test
-test $DIR/issue-81662-shortness.rs - foo (line 6) ... FAILED
+test $DIR/issue-81662-shortness.rs - foo (line 8) ... FAILED
 
 failures:
 
----- $DIR/issue-81662-shortness.rs - foo (line 6) stdout ----
-$DIR/issue-81662-shortness.rs:7:1: error[E0425]: cannot find function `foo` in this scope
+---- $DIR/issue-81662-shortness.rs - foo (line 8) stdout ----
+$DIR/issue-81662-shortness.rs:9:1: error[E0425]: cannot find function `foo` in this scope
 error: aborting due to 1 previous error
 Couldn't compile the test.
 
 failures:
-    $DIR/issue-81662-shortness.rs - foo (line 6)
+    $DIR/issue-81662-shortness.rs - foo (line 8)
 
 test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
 
diff --git a/tests/rustdoc/check-source-code-urls-to-def.rs b/tests/rustdoc/check-source-code-urls-to-def.rs
index b803c7e9e86..c31c579030e 100644
--- a/tests/rustdoc/check-source-code-urls-to-def.rs
+++ b/tests/rustdoc/check-source-code-urls-to-def.rs
@@ -62,7 +62,7 @@ pub trait AnotherTrait2 {}
 
 // @has - '//pre[@class="rust"]//a[@href="#61"]' 'AnotherTrait2'
 pub fn foo4() {
-    let x: Vec<AnotherTrait2> = Vec::new();
+    let x: Vec<&dyn AnotherTrait2> = Vec::new();
 }
 
 // @has - '//pre[@class="rust"]//a[@href="../../foo/primitive.bool.html"]' 'bool'
diff --git a/tests/rustdoc/inline_cross/auxiliary/default-generic-args.rs b/tests/rustdoc/inline_cross/auxiliary/default-generic-args.rs
index 1e31f18927e..c2c94817fad 100644
--- a/tests/rustdoc/inline_cross/auxiliary/default-generic-args.rs
+++ b/tests/rustdoc/inline_cross/auxiliary/default-generic-args.rs
@@ -40,6 +40,11 @@ pub struct Multi<A = u64, B = u64>(A, B);
 
 pub type M0 = Multi<u64, ()>;
 
-pub trait Trait<'a, T = &'a ()> {}
-
-pub type F = dyn for<'a> Trait<'a>;
+pub trait Trait0<'a, T = &'a ()> {}
+pub type D0 = dyn for<'a> Trait0<'a>;
+
+// Regression test for issue #119529.
+pub trait Trait1<T = (), const K: u32 = 0> {}
+pub type D1<T> = dyn Trait1<T>;
+pub type D2<const K: u32> = dyn Trait1<(), K>;
+pub type D3 = dyn Trait1;
diff --git a/tests/rustdoc/inline_cross/auxiliary/u_default_generic_args.rs b/tests/rustdoc/inline_cross/auxiliary/u_default_generic_args.rs
new file mode 100644
index 00000000000..a742dd7d865
--- /dev/null
+++ b/tests/rustdoc/inline_cross/auxiliary/u_default_generic_args.rs
@@ -0,0 +1 @@
+pub use default_generic_args::*;
diff --git a/tests/rustdoc/inline_cross/default-generic-args.rs b/tests/rustdoc/inline_cross/default-generic-args.rs
index c9a87a19901..775bf041532 100644
--- a/tests/rustdoc/inline_cross/default-generic-args.rs
+++ b/tests/rustdoc/inline_cross/default-generic-args.rs
@@ -79,15 +79,14 @@ pub use default_generic_args::P1;
 pub use default_generic_args::P2;
 
 // @has user/type.A0.html
-// Ensure that we elide generic arguments that are alpha-equivalent to their respective
-// generic parameter (modulo substs) (#1):
-// @has - '//*[@class="rust item-decl"]//code' "Alpha"
+// @has - '//*[@class="rust item-decl"]//code' "Alpha;"
 pub use default_generic_args::A0;
 
 // @has user/type.A1.html
-// Ensure that we elide generic arguments that are alpha-equivalent to their respective
-// generic parameter (modulo substs) (#1):
-// @has - '//*[@class="rust item-decl"]//code' "Alpha"
+// Demonstrates that we currently don't elide generic arguments that are alpha-equivalent to their
+// respective generic parameter (after instantiation) for perf reasons (it would require us to
+// create an inference context).
+// @has - '//*[@class="rust item-decl"]//code' "Alpha<for<'arbitrary> fn(_: &'arbitrary ())>"
 pub use default_generic_args::A1;
 
 // @has user/type.M0.html
@@ -97,8 +96,19 @@ pub use default_generic_args::A1;
 // @has - '//*[@class="rust item-decl"]//code' "Multi<u64, ()>"
 pub use default_generic_args::M0;
 
-// @has user/type.F.html
-// FIXME: Ideally, we would elide `&'a ()` but `'a` is an escaping bound var which we can't reason
-//        about at the moment since we don't keep track of bound vars.
-// @has - '//*[@class="rust item-decl"]//code' "dyn for<'a> Trait<'a, &'a ()>"
-pub use default_generic_args::F;
+// @has user/type.D0.html
+// @has - '//*[@class="rust item-decl"]//code' "dyn for<'a> Trait0<'a>"
+pub use default_generic_args::D0;
+
+// Regression test for issue #119529.
+// Check that we correctly elide def ty&const args inside trait object types.
+
+// @has user/type.D1.html
+// @has - '//*[@class="rust item-decl"]//code' "dyn Trait1<T>"
+pub use default_generic_args::D1;
+// @has user/type.D2.html
+// @has - '//*[@class="rust item-decl"]//code' "dyn Trait1<(), K>"
+pub use default_generic_args::D2;
+// @has user/type.D3.html
+// @has - '//*[@class="rust item-decl"]//code' "dyn Trait1;"
+pub use default_generic_args::D3;
diff --git a/tests/rustdoc/jump-to-def-doc-links-calls.rs b/tests/rustdoc/jump-to-def-doc-links-calls.rs
new file mode 100644
index 00000000000..549d068528e
--- /dev/null
+++ b/tests/rustdoc/jump-to-def-doc-links-calls.rs
@@ -0,0 +1,27 @@
+// compile-flags: -Zunstable-options --generate-link-to-definition
+
+#![crate_name = "foo"]
+
+// @has 'src/foo/jump-to-def-doc-links-calls.rs.html'
+
+// @has - '//a[@href="../../foo/struct.Bar.html"]' 'Bar'
+pub struct Bar;
+
+impl std::default::Default for Bar {
+    // @has - '//a[@href="#20-22"]' 'Self::new'
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
+// @has - '//a[@href="#8"]' 'Bar'
+impl Bar {
+     // @has - '//a[@href="#24-26"]' 'Self::bar'
+     pub fn new()-> Self {
+         Self::bar()
+     }
+
+     pub fn bar() -> Self {
+         Self
+     }
+}
diff --git a/tests/rustdoc/synthetic_auto/no-redundancy.rs b/tests/rustdoc/synthetic_auto/no-redundancy.rs
index ea57d7388b8..fed9c9c7ba4 100644
--- a/tests/rustdoc/synthetic_auto/no-redundancy.rs
+++ b/tests/rustdoc/synthetic_auto/no-redundancy.rs
@@ -1,3 +1,6 @@
+// FIXME(fmease, #119216): Reenable this test!
+// ignore-test
+
 pub struct Inner<T> {
     field: T,
 }
diff --git a/tests/ui-fulldeps/deriving-global.rs b/tests/ui-fulldeps/deriving-global.rs
index 214bb4368ff..9c0fc13a5e2 100644
--- a/tests/ui-fulldeps/deriving-global.rs
+++ b/tests/ui-fulldeps/deriving-global.rs
@@ -4,6 +4,7 @@
 
 extern crate rustc_macros;
 extern crate rustc_serialize;
+extern crate rustc_span;
 
 // Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
 // files.
diff --git a/tests/ui-fulldeps/deriving-hygiene.rs b/tests/ui-fulldeps/deriving-hygiene.rs
index e1084a08fec..48d3355b9d5 100644
--- a/tests/ui-fulldeps/deriving-hygiene.rs
+++ b/tests/ui-fulldeps/deriving-hygiene.rs
@@ -4,6 +4,7 @@
 #![feature(rustc_private)]
 extern crate rustc_macros;
 extern crate rustc_serialize;
+extern crate rustc_span;
 
 use rustc_macros::{Decodable, Encodable};
 
diff --git a/tests/ui-fulldeps/dropck-tarena-cycle-checked.rs b/tests/ui-fulldeps/dropck-tarena-cycle-checked.rs
index 188da67295a..cc97971a0dd 100644
--- a/tests/ui-fulldeps/dropck-tarena-cycle-checked.rs
+++ b/tests/ui-fulldeps/dropck-tarena-cycle-checked.rs
@@ -1,5 +1,3 @@
-// ignore-stage1
-
 // Reject mixing cyclic structure and Drop when using TypedArena.
 //
 // (Compare against dropck-vec-cycle-checked.rs)
diff --git a/tests/ui-fulldeps/dropck-tarena-cycle-checked.stderr b/tests/ui-fulldeps/dropck-tarena-cycle-checked.stderr
index 2f5be3f7f55..f9ac36be60e 100644
--- a/tests/ui-fulldeps/dropck-tarena-cycle-checked.stderr
+++ b/tests/ui-fulldeps/dropck-tarena-cycle-checked.stderr
@@ -1,5 +1,5 @@
 error[E0597]: `arena` does not live long enough
-  --> $DIR/dropck-tarena-cycle-checked.rs:118:7
+  --> $DIR/dropck-tarena-cycle-checked.rs:116:7
    |
 LL |     let arena = TypedArena::default();
    |         ----- binding `arena` declared here
diff --git a/tests/ui-fulldeps/dropck-tarena-unsound-drop.rs b/tests/ui-fulldeps/dropck-tarena-unsound-drop.rs
index 5f9a5fb76eb..86485a9887f 100644
--- a/tests/ui-fulldeps/dropck-tarena-unsound-drop.rs
+++ b/tests/ui-fulldeps/dropck-tarena-unsound-drop.rs
@@ -1,5 +1,3 @@
-// ignore-stage1
-
 // Check that an arena (TypedArena) cannot carry elements whose drop
 // methods might access borrowed data of lifetime that does not
 // strictly outlive the arena itself.
diff --git a/tests/ui-fulldeps/dropck-tarena-unsound-drop.stderr b/tests/ui-fulldeps/dropck-tarena-unsound-drop.stderr
index 8bb3911241d..82aa339a83b 100644
--- a/tests/ui-fulldeps/dropck-tarena-unsound-drop.stderr
+++ b/tests/ui-fulldeps/dropck-tarena-unsound-drop.stderr
@@ -1,5 +1,5 @@
 error[E0597]: `arena` does not live long enough
-  --> $DIR/dropck-tarena-unsound-drop.rs:43:7
+  --> $DIR/dropck-tarena-unsound-drop.rs:41:7
    |
 LL |     let arena: TypedArena<C> = TypedArena::default();
    |         ----- binding `arena` declared here
diff --git a/tests/ui-fulldeps/empty-struct-braces-derive.rs b/tests/ui-fulldeps/empty-struct-braces-derive.rs
index 10e8beaa7b1..3637610af0d 100644
--- a/tests/ui-fulldeps/empty-struct-braces-derive.rs
+++ b/tests/ui-fulldeps/empty-struct-braces-derive.rs
@@ -5,6 +5,7 @@
 
 extern crate rustc_macros;
 extern crate rustc_serialize;
+extern crate rustc_span;
 
 // Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
 // files.
diff --git a/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs
index 39219986665..39980ee7c67 100644
--- a/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs
+++ b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs
@@ -1,6 +1,5 @@
 // Test the `rustc::span_use_eq_ctxt` internal lint
 // compile-flags: -Z unstable-options
-// ignore-stage1
 
 #![feature(rustc_private)]
 #![deny(rustc::span_use_eq_ctxt)]
diff --git a/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr
index fcf2565c8ab..b52df0368b1 100644
--- a/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr
+++ b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr
@@ -1,11 +1,11 @@
 error: use `.eq_ctxt()` instead of `.ctxt() == .ctxt()`
-  --> $DIR/span_use_eq_ctxt.rs:13:5
+  --> $DIR/span_use_eq_ctxt.rs:12:5
    |
 LL |     s.ctxt() == t.ctxt()
    |     ^^^^^^^^^^^^^^^^^^^^
    |
 note: the lint level is defined here
-  --> $DIR/span_use_eq_ctxt.rs:6:9
+  --> $DIR/span_use_eq_ctxt.rs:5:9
    |
 LL | #![deny(rustc::span_use_eq_ctxt)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui-fulldeps/pathless-extern-unstable.rs b/tests/ui-fulldeps/pathless-extern-unstable.rs
index 50d157c5795..7fba8343bc0 100644
--- a/tests/ui-fulldeps/pathless-extern-unstable.rs
+++ b/tests/ui-fulldeps/pathless-extern-unstable.rs
@@ -1,6 +1,5 @@
 // edition:2018
 // compile-flags:--extern rustc_middle
-// ignore-stage1
 
 // Test that `--extern rustc_middle` fails with `rustc_private`.
 
diff --git a/tests/ui-fulldeps/pathless-extern-unstable.stderr b/tests/ui-fulldeps/pathless-extern-unstable.stderr
index 840b95d755c..cfd8669c45f 100644
--- a/tests/ui-fulldeps/pathless-extern-unstable.stderr
+++ b/tests/ui-fulldeps/pathless-extern-unstable.stderr
@@ -1,5 +1,5 @@
 error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
-  --> $DIR/pathless-extern-unstable.rs:7:9
+  --> $DIR/pathless-extern-unstable.rs:6:9
    |
 LL | pub use rustc_middle;
    |         ^^^^^^^^^^^^
diff --git a/tests/ui-fulldeps/rustc_encodable_hygiene.rs b/tests/ui-fulldeps/rustc_encodable_hygiene.rs
index 509a6b1d22c..bec7930d462 100644
--- a/tests/ui-fulldeps/rustc_encodable_hygiene.rs
+++ b/tests/ui-fulldeps/rustc_encodable_hygiene.rs
@@ -3,8 +3,8 @@
 #![feature(rustc_private)]
 
 extern crate rustc_macros;
-#[allow(dead_code)]
 extern crate rustc_serialize;
+extern crate rustc_span;
 
 // Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
 // files.
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr
index bdcf54bd190..f07b69326b0 100644
--- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr
@@ -8,7 +8,7 @@ LL |     arg: NotIntoDiagnosticArg,
    |          ^^^^^^^^^^^^^^^^^^^^ the trait `IntoDiagnosticArg` is not implemented for `NotIntoDiagnosticArg`
    |
    = help: normalized in stderr
-note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
+note: required by a bound in `DiagnosticBuilder::<'a, G>::arg`
   --> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:LL:CC
    = note: this error originates in the macro `forward` (in Nightly builds, run with -Z macro-backtrace for more info)
 
@@ -22,7 +22,7 @@ LL |     arg: NotIntoDiagnosticArg,
    |          ^^^^^^^^^^^^^^^^^^^^ the trait `IntoDiagnosticArg` is not implemented for `NotIntoDiagnosticArg`
    |
    = help: normalized in stderr
-note: required by a bound in `Diagnostic::set_arg`
+note: required by a bound in `Diagnostic::arg`
   --> $COMPILER_DIR/rustc_errors/src/diagnostic.rs:LL:CC
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
index 63fb78ee919..f553aa96505 100644
--- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
@@ -741,7 +741,7 @@ struct SubdiagnosticEagerCorrect {
 }
 
 // Check that formatting of `correct` in suggestion doesn't move the binding for that field, making
-// the `set_arg` call a compile error; and that isn't worked around by moving the `set_arg` call
+// the `arg` call a compile error; and that isn't worked around by moving the `arg` call
 // after the `span_suggestion` call - which breaks eager translation.
 
 #[derive(Subdiagnostic)]
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
index d8ba65d297e..f376c034587 100644
--- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
@@ -654,7 +654,7 @@ LL |     other: Hello,
    |            ^^^^^ the trait `IntoDiagnosticArg` is not implemented for `Hello`
    |
    = help: normalized in stderr
-note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
+note: required by a bound in `DiagnosticBuilder::<'a, G>::arg`
   --> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:LL:CC
    = note: this error originates in the macro `forward` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs
index 33148311261..a0a8114e0c5 100644
--- a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs
+++ b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs
@@ -1,5 +1,4 @@
 // rustc-env:CARGO_CRATE_NAME=rustc_dummy
-// ignore-stage1
 
 #![feature(rustc_private)]
 #![crate_type = "lib"]
diff --git a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr
index c752a5ee057..4cdc24e6a6b 100644
--- a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr
+++ b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr
@@ -1,5 +1,5 @@
 error: diagnostic slug and crate name do not match
-  --> $DIR/enforce_slug_naming.rs:23:8
+  --> $DIR/enforce_slug_naming.rs:22:8
    |
 LL | #[diag(compiletest_example, code = "E0123")]
    |        ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui-fulldeps/stable-mir/check_trait_queries.rs b/tests/ui-fulldeps/stable-mir/check_trait_queries.rs
new file mode 100644
index 00000000000..fb1197e4ecc
--- /dev/null
+++ b/tests/ui-fulldeps/stable-mir/check_trait_queries.rs
@@ -0,0 +1,125 @@
+// run-pass
+//! Test that users are able to retrieve information about trait declarations and implementations.
+
+// ignore-stage1
+// ignore-cross-compile
+// ignore-remote
+// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
+// edition: 2021
+
+#![feature(rustc_private)]
+#![feature(assert_matches)]
+#![feature(control_flow_enum)]
+
+extern crate rustc_middle;
+#[macro_use]
+extern crate rustc_smir;
+extern crate rustc_driver;
+extern crate rustc_interface;
+extern crate stable_mir;
+
+use rustc_middle::ty::TyCtxt;
+use rustc_smir::rustc_internal;
+use stable_mir::CrateDef;
+use std::collections::HashSet;
+use std::io::Write;
+use std::ops::ControlFlow;
+
+const CRATE_NAME: &str = "trait_test";
+
+/// This function uses the Stable MIR APIs to get information about the test crate.
+fn test_traits() -> ControlFlow<()> {
+    let local_crate = stable_mir::local_crate();
+    let local_traits = local_crate.trait_decls();
+    assert_eq!(local_traits.len(), 1, "Expected `Max` trait, but found {:?}", local_traits);
+    assert_eq!(&local_traits[0].name(), "Max");
+
+    let local_impls = local_crate.trait_impls();
+    let impl_names = local_impls.iter().map(|trait_impl| trait_impl.name()).collect::<HashSet<_>>();
+    assert_impl(&impl_names, "<Positive as Max>");
+    assert_impl(&impl_names, "<Positive as std::marker::Copy>");
+    assert_impl(&impl_names, "<Positive as std::clone::Clone>");
+    assert_impl(&impl_names, "<Positive as std::fmt::Debug>");
+    assert_impl(&impl_names, "<Positive as std::cmp::PartialEq>");
+    assert_impl(&impl_names, "<Positive as std::cmp::Eq>");
+    assert_impl(&impl_names, "<Positive as std::convert::TryFrom<u64>>");
+    assert_impl(&impl_names, "<u64 as Max>");
+    assert_impl(&impl_names, "<impl std::convert::From<Positive> for u64>");
+
+    let all_traits = stable_mir::all_trait_decls();
+    assert!(all_traits.len() > local_traits.len());
+    assert!(
+        local_traits.iter().all(|t| all_traits.contains(t)),
+        "Local: {local_traits:#?}, All: {all_traits:#?}"
+    );
+
+    let all_impls = stable_mir::all_trait_impls();
+    assert!(all_impls.len() > local_impls.len());
+    assert!(
+        local_impls.iter().all(|t| all_impls.contains(t)),
+        "Local: {local_impls:#?}, All: {all_impls:#?}"
+    );
+    ControlFlow::Continue(())
+}
+
+fn assert_impl(impl_names: &HashSet<String>, target: &str) {
+    assert!(
+        impl_names.contains(target),
+        "Failed to find `{target}`. Implementations available: {impl_names:?}",
+    );
+}
+
+/// This test will generate and analyze a dummy crate using the stable mir.
+/// For that, it will first write the dummy crate into a file.
+/// Then it will create a `StableMir` using custom arguments and then
+/// it will run the compiler.
+fn main() {
+    let path = "trait_queries.rs";
+    generate_input(&path).unwrap();
+    let args = vec![
+        "rustc".to_string(),
+        "--crate-type=lib".to_string(),
+        "--crate-name".to_string(),
+        CRATE_NAME.to_string(),
+        path.to_string(),
+    ];
+    run!(args, test_traits()).unwrap();
+}
+
+fn generate_input(path: &str) -> std::io::Result<()> {
+    let mut file = std::fs::File::create(path)?;
+    write!(
+        file,
+        r#"
+        use std::convert::TryFrom;
+
+        #[derive(Copy, Clone, Debug, PartialEq, Eq)]
+        pub struct Positive(u64);
+
+        impl TryFrom<u64> for Positive {{
+            type Error = ();
+            fn try_from(val: u64) -> Result<Positive, Self::Error> {{
+                if val > 0 {{ Ok(Positive(val)) }} else {{ Err(()) }}
+            }}
+        }}
+
+        impl From<Positive> for u64 {{
+            fn from(val: Positive) -> u64 {{ val.0 }}
+        }}
+
+        pub trait Max {{
+            fn is_max(&self) -> bool;
+        }}
+
+        impl Max for u64 {{
+            fn is_max(&self) -> bool {{ *self == u64::MAX }}
+        }}
+
+        impl Max for Positive {{
+            fn is_max(&self) -> bool {{ self.0.is_max() }}
+        }}
+
+    "#
+    )?;
+    Ok(())
+}
diff --git a/tests/ui/abi/statics/static-mut-foreign.rs b/tests/ui/abi/statics/static-mut-foreign.rs
index ecd8ee94a01..eb732e7c2c3 100644
--- a/tests/ui/abi/statics/static-mut-foreign.rs
+++ b/tests/ui/abi/statics/static-mut-foreign.rs
@@ -33,7 +33,9 @@ unsafe fn run() {
     rust_dbg_static_mut = -3;
     assert_eq!(rust_dbg_static_mut, -3);
     static_bound(&rust_dbg_static_mut);
+    //~^ WARN shared reference of mutable static is discouraged [static_mut_ref]
     static_bound_set(&mut rust_dbg_static_mut);
+    //~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
 }
 
 pub fn main() {
diff --git a/tests/ui/abi/statics/static-mut-foreign.stderr b/tests/ui/abi/statics/static-mut-foreign.stderr
new file mode 100644
index 00000000000..144ac056f87
--- /dev/null
+++ b/tests/ui/abi/statics/static-mut-foreign.stderr
@@ -0,0 +1,31 @@
+warning: shared reference of mutable static is discouraged
+  --> $DIR/static-mut-foreign.rs:35:18
+   |
+LL |     static_bound(&rust_dbg_static_mut);
+   |                  ^^^^^^^^^^^^^^^^^^^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     static_bound(addr_of!(rust_dbg_static_mut));
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/static-mut-foreign.rs:37:22
+   |
+LL |     static_bound_set(&mut rust_dbg_static_mut);
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |     static_bound_set(addr_of_mut!(rust_dbg_static_mut));
+   |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/allocator/no_std-alloc-error-handler-custom.rs b/tests/ui/allocator/no_std-alloc-error-handler-custom.rs
index 28926243390..2323cf46d6f 100644
--- a/tests/ui/allocator/no_std-alloc-error-handler-custom.rs
+++ b/tests/ui/allocator/no_std-alloc-error-handler-custom.rs
@@ -74,7 +74,7 @@ fn panic(panic_info: &core::panic::PanicInfo) -> ! {
 extern "C" fn rust_eh_personality() {}
 
 #[derive(Default, Debug)]
-struct Page(#[allow(unused_tuple_struct_fields)] [[u64; 32]; 16]);
+struct Page(#[allow(dead_code)] [[u64; 32]; 16]);
 
 #[no_mangle]
 fn main(_argc: i32, _argv: *const *const u8) -> isize {
diff --git a/tests/ui/allocator/no_std-alloc-error-handler-default.rs b/tests/ui/allocator/no_std-alloc-error-handler-default.rs
index 56409e71339..488434a9a72 100644
--- a/tests/ui/allocator/no_std-alloc-error-handler-default.rs
+++ b/tests/ui/allocator/no_std-alloc-error-handler-default.rs
@@ -61,7 +61,7 @@ fn panic(panic_info: &core::panic::PanicInfo) -> ! {
 extern "C" fn rust_eh_personality() {}
 
 #[derive(Default, Debug)]
-struct Page(#[allow(unused_tuple_struct_fields)] [[u64; 32]; 16]);
+struct Page(#[allow(dead_code)] [[u64; 32]; 16]);
 
 #[no_mangle]
 fn main(_argc: i32, _argv: *const *const u8) -> isize {
diff --git a/tests/ui/annotate-snippet/missing-type.rs b/tests/ui/annotate-snippet/missing-type.rs
index b0d8b5fbaf2..f5facc16b31 100644
--- a/tests/ui/annotate-snippet/missing-type.rs
+++ b/tests/ui/annotate-snippet/missing-type.rs
@@ -1,5 +1,6 @@
 // compile-flags: --error-format human-annotate-rs -Z unstable-options
+// error-pattern:cannot find type `Iter` in this scope
 
 pub fn main() {
-    let x: Iter; //~ ERROR cannot find type `Iter` in this scope
+    let x: Iter;
 }
diff --git a/tests/ui/annotate-snippet/missing-type.stderr b/tests/ui/annotate-snippet/missing-type.stderr
index c16f022a77f..89ce19c182f 100644
--- a/tests/ui/annotate-snippet/missing-type.stderr
+++ b/tests/ui/annotate-snippet/missing-type.stderr
@@ -1,5 +1,5 @@
 error[E0412]: cannot find type `Iter` in this scope
-  --> $DIR/missing-type.rs:4:12
+  --> $DIR/missing-type.rs:5:12
    |
 LL |     let x: Iter;
    |            ^^^^ not found in this scope
diff --git a/tests/ui/annotate-snippet/multispan.rs b/tests/ui/annotate-snippet/multispan.rs
index 69d7e1a9d11..d7241b80364 100644
--- a/tests/ui/annotate-snippet/multispan.rs
+++ b/tests/ui/annotate-snippet/multispan.rs
@@ -1,4 +1,5 @@
 // aux-build:multispan.rs
+// error-pattern:hello to you, too!
 // compile-flags: --error-format human-annotate-rs -Z unstable-options
 
 #![feature(proc_macro_hygiene)]
@@ -12,17 +13,17 @@ fn main() {
     hello!();
 
     // Exactly one 'hi'.
-    hello!(hi); //~ ERROR hello to you, too!
+    hello!(hi);
 
     // Now two, back to back.
-    hello!(hi hi); //~ ERROR hello to you, too!
+    hello!(hi hi);
 
     // Now three, back to back.
-    hello!(hi hi hi); //~ ERROR hello to you, too!
+    hello!(hi hi hi);
 
     // Now several, with spacing.
-    hello!(hi hey hi yo hi beep beep hi hi); //~ ERROR hello to you, too!
-    hello!(hi there, hi how are you? hi... hi.); //~ ERROR hello to you, too!
-    hello!(whoah. hi di hi di ho); //~ ERROR hello to you, too!
-    hello!(hi good hi and good bye); //~ ERROR hello to you, too!
+    hello!(hi hey hi yo hi beep beep hi hi);
+    hello!(hi there, hi how are you? hi... hi.);
+    hello!(whoah. hi di hi di ho);
+    hello!(hi good hi and good bye);
 }
diff --git a/tests/ui/annotate-snippet/multispan.stderr b/tests/ui/annotate-snippet/multispan.stderr
index baed54c59a4..833b6773032 100644
--- a/tests/ui/annotate-snippet/multispan.stderr
+++ b/tests/ui/annotate-snippet/multispan.stderr
@@ -1,41 +1,41 @@
 error: hello to you, too!
-  --> $DIR/multispan.rs:15:5
+  --> $DIR/multispan.rs:16:5
    |
 LL |     hello!(hi);
    |     ^^^^^^^^^^
    |
 error: hello to you, too!
-  --> $DIR/multispan.rs:18:5
+  --> $DIR/multispan.rs:19:5
    |
 LL |     hello!(hi hi);
    |     ^^^^^^^^^^^^^
    |
 error: hello to you, too!
-  --> $DIR/multispan.rs:21:5
+  --> $DIR/multispan.rs:22:5
    |
 LL |     hello!(hi hi hi);
    |     ^^^^^^^^^^^^^^^^
    |
 error: hello to you, too!
-  --> $DIR/multispan.rs:24:5
+  --> $DIR/multispan.rs:25:5
    |
 LL |     hello!(hi hey hi yo hi beep beep hi hi);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 error: hello to you, too!
-  --> $DIR/multispan.rs:25:5
+  --> $DIR/multispan.rs:26:5
    |
 LL |     hello!(hi there, hi how are you? hi... hi.);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 error: hello to you, too!
-  --> $DIR/multispan.rs:26:5
+  --> $DIR/multispan.rs:27:5
    |
 LL |     hello!(whoah. hi di hi di ho);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 error: hello to you, too!
-  --> $DIR/multispan.rs:27:5
+  --> $DIR/multispan.rs:28:5
    |
 LL |     hello!(hi good hi and good bye);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/anon-params/anon-params-edition-hygiene.rs b/tests/ui/anon-params/anon-params-edition-hygiene.rs
index 6936205f8b9..0b69081d4ed 100644
--- a/tests/ui/anon-params/anon-params-edition-hygiene.rs
+++ b/tests/ui/anon-params/anon-params-edition-hygiene.rs
@@ -1,4 +1,3 @@
-// check-pass
 // edition:2018
 // aux-build:anon-params-edition-hygiene.rs
 
@@ -8,6 +7,8 @@
 #[macro_use]
 extern crate anon_params_edition_hygiene;
 
-generate_trait_2015!(u8);
+generate_trait_2015_ident!(u8);
+// FIXME: Edition hygiene doesn't work correctly with `tt`s in this case.
+generate_trait_2015_tt!(u8); //~ ERROR expected one of `:`, `@`, or `|`, found `)`
 
 fn main() {}
diff --git a/tests/ui/anon-params/anon-params-edition-hygiene.stderr b/tests/ui/anon-params/anon-params-edition-hygiene.stderr
new file mode 100644
index 00000000000..373d7c6aebb
--- /dev/null
+++ b/tests/ui/anon-params/anon-params-edition-hygiene.stderr
@@ -0,0 +1,23 @@
+error: expected one of `:`, `@`, or `|`, found `)`
+  --> $DIR/anon-params-edition-hygiene.rs:12:1
+   |
+LL | generate_trait_2015_tt!(u8);
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected one of `:`, `@`, or `|`
+   |
+   = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
+   = note: this error originates in the macro `generate_trait_2015_tt` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: if this is a `self` type, give it a parameter name
+   |
+LL | generate_trait_2015_tt!(self: u8);
+   |                         +++++
+help: if this is a parameter name, give it a type
+   |
+LL | generate_trait_2015_tt!(u8: TypeName);
+   |                           ++++++++++
+help: if this is a type, explicitly ignore the parameter name
+   |
+LL | generate_trait_2015_tt!(_: u8);
+   |                         ++
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs b/tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs
index aa4221becc2..28365655293 100644
--- a/tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs
+++ b/tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs
@@ -1,9 +1,18 @@
 // edition:2015
 
 #[macro_export]
-macro_rules! generate_trait_2015 {
+macro_rules! generate_trait_2015_ident {
     ($Type: ident) => {
-        trait Trait {
+        trait Trait1 {
+            fn method($Type) {}
+        }
+    };
+}
+
+#[macro_export]
+macro_rules! generate_trait_2015_tt {
+    ($Type: tt) => {
+        trait Trait2 {
             fn method($Type) {}
         }
     };
diff --git a/tests/ui/array-slice-vec/show-boxed-slice.rs b/tests/ui/array-slice-vec/show-boxed-slice.rs
index c10f779b1f6..3ae3686e423 100644
--- a/tests/ui/array-slice-vec/show-boxed-slice.rs
+++ b/tests/ui/array-slice-vec/show-boxed-slice.rs
@@ -1,7 +1,7 @@
 // run-pass
 
 #[derive(Debug)]
-struct Foo(#[allow(unused_tuple_struct_fields)] Box<[u8]>);
+struct Foo(#[allow(dead_code)] Box<[u8]>);
 
 pub fn main() {
     println!("{:?}", Foo(Box::new([0, 1, 2])));
diff --git a/tests/ui/asm/aarch64/const.rs b/tests/ui/asm/aarch64/const.rs
index de299bfdbdf..0b02c99abf6 100644
--- a/tests/ui/asm/aarch64/const.rs
+++ b/tests/ui/asm/aarch64/const.rs
@@ -1,8 +1,6 @@
 // only-aarch64
 // run-pass
 // needs-asm-support
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![feature(asm_const)]
 
diff --git a/tests/ui/asm/bad-arch.rs b/tests/ui/asm/bad-arch.rs
index 93309899bf3..3eeb76f3d00 100644
--- a/tests/ui/asm/bad-arch.rs
+++ b/tests/ui/asm/bad-arch.rs
@@ -1,7 +1,5 @@
 // compile-flags: --target sparc-unknown-linux-gnu
 // needs-llvm-components: sparc
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![feature(no_core, lang_items, rustc_attrs)]
 #![no_core]
diff --git a/tests/ui/asm/bad-arch.mirunsafeck.stderr b/tests/ui/asm/bad-arch.stderr
index d7af296152f..23aad9908ef 100644
--- a/tests/ui/asm/bad-arch.mirunsafeck.stderr
+++ b/tests/ui/asm/bad-arch.stderr
@@ -1,11 +1,11 @@
 error[E0472]: inline assembly is unsupported on this target
-  --> $DIR/bad-arch.rs:22:9
+  --> $DIR/bad-arch.rs:20:9
    |
 LL |         asm!("");
    |         ^^^^^^^^
 
 error[E0472]: inline assembly is unsupported on this target
-  --> $DIR/bad-arch.rs:27:1
+  --> $DIR/bad-arch.rs:25:1
    |
 LL | global_asm!("");
    | ^^^^^^^^^^^^^^^
diff --git a/tests/ui/asm/bad-arch.thirunsafeck.stderr b/tests/ui/asm/bad-arch.thirunsafeck.stderr
deleted file mode 100644
index d7af296152f..00000000000
--- a/tests/ui/asm/bad-arch.thirunsafeck.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0472]: inline assembly is unsupported on this target
-  --> $DIR/bad-arch.rs:22:9
-   |
-LL |         asm!("");
-   |         ^^^^^^^^
-
-error[E0472]: inline assembly is unsupported on this target
-  --> $DIR/bad-arch.rs:27:1
-   |
-LL | global_asm!("");
-   | ^^^^^^^^^^^^^^^
-   |
-   = note: this error originates in the macro `global_asm` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0472`.
diff --git a/tests/ui/asm/bad-template.aarch64_mirunsafeck.stderr b/tests/ui/asm/bad-template.aarch64.stderr
index b16f9a06c2a..4ffcd2303b7 100644
--- a/tests/ui/asm/bad-template.aarch64_mirunsafeck.stderr
+++ b/tests/ui/asm/bad-template.aarch64.stderr
@@ -1,5 +1,5 @@
 error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:31:15
+  --> $DIR/bad-template.rs:27:15
    |
 LL |         asm!("{}");
    |               ^^ from here
@@ -7,7 +7,7 @@ LL |         asm!("{}");
    = note: no arguments were given
 
 error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:33:15
+  --> $DIR/bad-template.rs:29:15
    |
 LL |         asm!("{1}", in(reg) foo);
    |               ^^^ from here
@@ -15,7 +15,7 @@ LL |         asm!("{1}", in(reg) foo);
    = note: there is 1 argument
 
 error: argument never used
-  --> $DIR/bad-template.rs:33:21
+  --> $DIR/bad-template.rs:29:21
    |
 LL |         asm!("{1}", in(reg) foo);
    |                     ^^^^^^^^^^^ argument never used
@@ -23,13 +23,13 @@ LL |         asm!("{1}", in(reg) foo);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
 
 error: there is no argument named `a`
-  --> $DIR/bad-template.rs:36:16
+  --> $DIR/bad-template.rs:32:16
    |
 LL |         asm!("{a}");
    |                ^
 
 error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:38:15
+  --> $DIR/bad-template.rs:34:15
    |
 LL |         asm!("{}", a = in(reg) foo);
    |               ^^   --------------- named argument
@@ -38,13 +38,13 @@ LL |         asm!("{}", a = in(reg) foo);
    |
    = note: no positional arguments were given
 note: named arguments cannot be referenced by position
-  --> $DIR/bad-template.rs:38:20
+  --> $DIR/bad-template.rs:34:20
    |
 LL |         asm!("{}", a = in(reg) foo);
    |                    ^^^^^^^^^^^^^^^
 
 error: named argument never used
-  --> $DIR/bad-template.rs:38:20
+  --> $DIR/bad-template.rs:34:20
    |
 LL |         asm!("{}", a = in(reg) foo);
    |                    ^^^^^^^^^^^^^^^ named argument never used
@@ -52,7 +52,7 @@ LL |         asm!("{}", a = in(reg) foo);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
 
 error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:41:15
+  --> $DIR/bad-template.rs:37:15
    |
 LL |         asm!("{1}", a = in(reg) foo);
    |               ^^^ from here
@@ -60,7 +60,7 @@ LL |         asm!("{1}", a = in(reg) foo);
    = note: no positional arguments were given
 
 error: named argument never used
-  --> $DIR/bad-template.rs:41:21
+  --> $DIR/bad-template.rs:37:21
    |
 LL |         asm!("{1}", a = in(reg) foo);
    |                     ^^^^^^^^^^^^^^^ named argument never used
@@ -68,7 +68,7 @@ LL |         asm!("{1}", a = in(reg) foo);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
 
 error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:48:15
+  --> $DIR/bad-template.rs:44:15
    |
 LL |         asm!("{}", in("x0") foo);
    |               ^^   ------------ explicit register argument
@@ -77,24 +77,24 @@ LL |         asm!("{}", in("x0") foo);
    |
    = note: no positional arguments were given
 note: explicit register arguments cannot be used in the asm template
-  --> $DIR/bad-template.rs:48:20
+  --> $DIR/bad-template.rs:44:20
    |
 LL |         asm!("{}", in("x0") foo);
    |                    ^^^^^^^^^^^^
 help: use the register name directly in the assembly code
-  --> $DIR/bad-template.rs:48:20
+  --> $DIR/bad-template.rs:44:20
    |
 LL |         asm!("{}", in("x0") foo);
    |                    ^^^^^^^^^^^^
 
 error: asm template modifier must be a single character
-  --> $DIR/bad-template.rs:50:17
+  --> $DIR/bad-template.rs:46:17
    |
 LL |         asm!("{:foo}", in(reg) foo);
    |                 ^^^
 
 error: multiple unused asm arguments
-  --> $DIR/bad-template.rs:53:18
+  --> $DIR/bad-template.rs:49:18
    |
 LL |         asm!("", in(reg) 0, in(reg) 1);
    |                  ^^^^^^^^^  ^^^^^^^^^ argument never used
@@ -104,7 +104,7 @@ LL |         asm!("", in(reg) 0, in(reg) 1);
    = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
 
 error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:59:14
+  --> $DIR/bad-template.rs:55:14
    |
 LL | global_asm!("{}");
    |              ^^ from here
@@ -112,7 +112,7 @@ LL | global_asm!("{}");
    = note: no arguments were given
 
 error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:61:14
+  --> $DIR/bad-template.rs:57:14
    |
 LL | global_asm!("{1}", const FOO);
    |              ^^^ from here
@@ -120,7 +120,7 @@ LL | global_asm!("{1}", const FOO);
    = note: there is 1 argument
 
 error: argument never used
-  --> $DIR/bad-template.rs:61:20
+  --> $DIR/bad-template.rs:57:20
    |
 LL | global_asm!("{1}", const FOO);
    |                    ^^^^^^^^^ argument never used
@@ -128,13 +128,13 @@ LL | global_asm!("{1}", const FOO);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
 
 error: there is no argument named `a`
-  --> $DIR/bad-template.rs:64:15
+  --> $DIR/bad-template.rs:60:15
    |
 LL | global_asm!("{a}");
    |               ^
 
 error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:66:14
+  --> $DIR/bad-template.rs:62:14
    |
 LL | global_asm!("{}", a = const FOO);
    |              ^^   ------------- named argument
@@ -143,13 +143,13 @@ LL | global_asm!("{}", a = const FOO);
    |
    = note: no positional arguments were given
 note: named arguments cannot be referenced by position
-  --> $DIR/bad-template.rs:66:19
+  --> $DIR/bad-template.rs:62:19
    |
 LL | global_asm!("{}", a = const FOO);
    |                   ^^^^^^^^^^^^^
 
 error: named argument never used
-  --> $DIR/bad-template.rs:66:19
+  --> $DIR/bad-template.rs:62:19
    |
 LL | global_asm!("{}", a = const FOO);
    |                   ^^^^^^^^^^^^^ named argument never used
@@ -157,7 +157,7 @@ LL | global_asm!("{}", a = const FOO);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
 
 error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:69:14
+  --> $DIR/bad-template.rs:65:14
    |
 LL | global_asm!("{1}", a = const FOO);
    |              ^^^ from here
@@ -165,7 +165,7 @@ LL | global_asm!("{1}", a = const FOO);
    = note: no positional arguments were given
 
 error: named argument never used
-  --> $DIR/bad-template.rs:69:20
+  --> $DIR/bad-template.rs:65:20
    |
 LL | global_asm!("{1}", a = const FOO);
    |                    ^^^^^^^^^^^^^ named argument never used
@@ -173,13 +173,13 @@ LL | global_asm!("{1}", a = const FOO);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
 
 error: asm template modifier must be a single character
-  --> $DIR/bad-template.rs:72:16
+  --> $DIR/bad-template.rs:68:16
    |
 LL | global_asm!("{:foo}", const FOO);
    |                ^^^
 
 error: multiple unused asm arguments
-  --> $DIR/bad-template.rs:74:17
+  --> $DIR/bad-template.rs:70:17
    |
 LL | global_asm!("", const FOO, const FOO);
    |                 ^^^^^^^^^  ^^^^^^^^^ argument never used
@@ -189,7 +189,7 @@ LL | global_asm!("", const FOO, const FOO);
    = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
 
 warning: formatting may not be suitable for sub-register argument
-  --> $DIR/bad-template.rs:50:15
+  --> $DIR/bad-template.rs:46:15
    |
 LL |         asm!("{:foo}", in(reg) foo);
    |               ^^^^^^           --- for this argument
diff --git a/tests/ui/asm/bad-template.aarch64_thirunsafeck.stderr b/tests/ui/asm/bad-template.aarch64_thirunsafeck.stderr
deleted file mode 100644
index b16f9a06c2a..00000000000
--- a/tests/ui/asm/bad-template.aarch64_thirunsafeck.stderr
+++ /dev/null
@@ -1,202 +0,0 @@
-error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:31:15
-   |
-LL |         asm!("{}");
-   |               ^^ from here
-   |
-   = note: no arguments were given
-
-error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:33:15
-   |
-LL |         asm!("{1}", in(reg) foo);
-   |               ^^^ from here
-   |
-   = note: there is 1 argument
-
-error: argument never used
-  --> $DIR/bad-template.rs:33:21
-   |
-LL |         asm!("{1}", in(reg) foo);
-   |                     ^^^^^^^^^^^ argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
-
-error: there is no argument named `a`
-  --> $DIR/bad-template.rs:36:16
-   |
-LL |         asm!("{a}");
-   |                ^
-
-error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:38:15
-   |
-LL |         asm!("{}", a = in(reg) foo);
-   |               ^^   --------------- named argument
-   |               |
-   |               from here
-   |
-   = note: no positional arguments were given
-note: named arguments cannot be referenced by position
-  --> $DIR/bad-template.rs:38:20
-   |
-LL |         asm!("{}", a = in(reg) foo);
-   |                    ^^^^^^^^^^^^^^^
-
-error: named argument never used
-  --> $DIR/bad-template.rs:38:20
-   |
-LL |         asm!("{}", a = in(reg) foo);
-   |                    ^^^^^^^^^^^^^^^ named argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
-
-error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:41:15
-   |
-LL |         asm!("{1}", a = in(reg) foo);
-   |               ^^^ from here
-   |
-   = note: no positional arguments were given
-
-error: named argument never used
-  --> $DIR/bad-template.rs:41:21
-   |
-LL |         asm!("{1}", a = in(reg) foo);
-   |                     ^^^^^^^^^^^^^^^ named argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
-
-error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:48:15
-   |
-LL |         asm!("{}", in("x0") foo);
-   |               ^^   ------------ explicit register argument
-   |               |
-   |               from here
-   |
-   = note: no positional arguments were given
-note: explicit register arguments cannot be used in the asm template
-  --> $DIR/bad-template.rs:48:20
-   |
-LL |         asm!("{}", in("x0") foo);
-   |                    ^^^^^^^^^^^^
-help: use the register name directly in the assembly code
-  --> $DIR/bad-template.rs:48:20
-   |
-LL |         asm!("{}", in("x0") foo);
-   |                    ^^^^^^^^^^^^
-
-error: asm template modifier must be a single character
-  --> $DIR/bad-template.rs:50:17
-   |
-LL |         asm!("{:foo}", in(reg) foo);
-   |                 ^^^
-
-error: multiple unused asm arguments
-  --> $DIR/bad-template.rs:53:18
-   |
-LL |         asm!("", in(reg) 0, in(reg) 1);
-   |                  ^^^^^^^^^  ^^^^^^^^^ argument never used
-   |                  |
-   |                  argument never used
-   |
-   = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
-
-error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:59:14
-   |
-LL | global_asm!("{}");
-   |              ^^ from here
-   |
-   = note: no arguments were given
-
-error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:61:14
-   |
-LL | global_asm!("{1}", const FOO);
-   |              ^^^ from here
-   |
-   = note: there is 1 argument
-
-error: argument never used
-  --> $DIR/bad-template.rs:61:20
-   |
-LL | global_asm!("{1}", const FOO);
-   |                    ^^^^^^^^^ argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
-
-error: there is no argument named `a`
-  --> $DIR/bad-template.rs:64:15
-   |
-LL | global_asm!("{a}");
-   |               ^
-
-error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:66:14
-   |
-LL | global_asm!("{}", a = const FOO);
-   |              ^^   ------------- named argument
-   |              |
-   |              from here
-   |
-   = note: no positional arguments were given
-note: named arguments cannot be referenced by position
-  --> $DIR/bad-template.rs:66:19
-   |
-LL | global_asm!("{}", a = const FOO);
-   |                   ^^^^^^^^^^^^^
-
-error: named argument never used
-  --> $DIR/bad-template.rs:66:19
-   |
-LL | global_asm!("{}", a = const FOO);
-   |                   ^^^^^^^^^^^^^ named argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
-
-error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:69:14
-   |
-LL | global_asm!("{1}", a = const FOO);
-   |              ^^^ from here
-   |
-   = note: no positional arguments were given
-
-error: named argument never used
-  --> $DIR/bad-template.rs:69:20
-   |
-LL | global_asm!("{1}", a = const FOO);
-   |                    ^^^^^^^^^^^^^ named argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
-
-error: asm template modifier must be a single character
-  --> $DIR/bad-template.rs:72:16
-   |
-LL | global_asm!("{:foo}", const FOO);
-   |                ^^^
-
-error: multiple unused asm arguments
-  --> $DIR/bad-template.rs:74:17
-   |
-LL | global_asm!("", const FOO, const FOO);
-   |                 ^^^^^^^^^  ^^^^^^^^^ argument never used
-   |                 |
-   |                 argument never used
-   |
-   = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
-
-warning: formatting may not be suitable for sub-register argument
-  --> $DIR/bad-template.rs:50:15
-   |
-LL |         asm!("{:foo}", in(reg) foo);
-   |               ^^^^^^           --- for this argument
-   |
-   = help: use `{0:w}` to have the register formatted as `w0`
-   = help: or use `{0:x}` to keep the default formatting of `x0`
-   = note: `#[warn(asm_sub_register)]` on by default
-
-error: aborting due to 21 previous errors; 1 warning emitted
-
diff --git a/tests/ui/asm/bad-template.rs b/tests/ui/asm/bad-template.rs
index 55637174792..a6a233a36ec 100644
--- a/tests/ui/asm/bad-template.rs
+++ b/tests/ui/asm/bad-template.rs
@@ -1,14 +1,10 @@
-// revisions: x86_64_mirunsafeck aarch64_mirunsafeck x86_64_thirunsafeck aarch64_thirunsafeck
+// revisions: x86_64 aarch64
 
-// [x86_64_thirunsafeck] compile-flags: -Z thir-unsafeck --target x86_64-unknown-linux-gnu
-// [aarch64_thirunsafeck] compile-flags: -Z thir-unsafeck --target aarch64-unknown-linux-gnu
-// [x86_64_mirunsafeck] compile-flags: --target x86_64-unknown-linux-gnu
-// [aarch64_mirunsafeck] compile-flags: --target aarch64-unknown-linux-gnu
+// [x86_64] compile-flags: --target x86_64-unknown-linux-gnu
+// [aarch64] compile-flags: --target aarch64-unknown-linux-gnu
 
-// [x86_64_thirunsafeck] needs-llvm-components: x86
-// [x86_64_mirunsafeck] needs-llvm-components: x86
-// [aarch64_thirunsafeck] needs-llvm-components: aarch64
-// [aarch64_mirunsafeck] needs-llvm-components: aarch64
+// [x86_64] needs-llvm-components: x86
+// [aarch64] needs-llvm-components: aarch64
 
 #![feature(no_core, lang_items, rustc_attrs, asm_const)]
 #![no_core]
@@ -41,12 +37,12 @@ fn main() {
         asm!("{1}", a = in(reg) foo);
         //~^ ERROR invalid reference to argument at index 1
         //~^^ ERROR named argument never used
-        #[cfg(any(x86_64_thirunsafeck, x86_64_mirunsafeck))]
+        #[cfg(any(x86_64))]
         asm!("{}", in("eax") foo);
-        //[x86_64_thirunsafeck,x86_64_mirunsafeck]~^ ERROR invalid reference to argument at index 0
-        #[cfg(any(aarch64_thirunsafeck, aarch64_mirunsafeck))]
+        //[x86_64]~^ ERROR invalid reference to argument at index 0
+        #[cfg(any(aarch64))]
         asm!("{}", in("x0") foo);
-        //[aarch64_thirunsafeck,aarch64_mirunsafeck]~^ ERROR invalid reference to argument at index 0
+        //[aarch64]~^ ERROR invalid reference to argument at index 0
         asm!("{:foo}", in(reg) foo);
         //~^ ERROR asm template modifier must be a single character
         //~| WARN formatting may not be suitable for sub-register argument [asm_sub_register]
diff --git a/tests/ui/asm/bad-template.x86_64_mirunsafeck.stderr b/tests/ui/asm/bad-template.x86_64.stderr
index 41ac37c33c2..52a7789b98c 100644
--- a/tests/ui/asm/bad-template.x86_64_mirunsafeck.stderr
+++ b/tests/ui/asm/bad-template.x86_64.stderr
@@ -1,5 +1,5 @@
 error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:31:15
+  --> $DIR/bad-template.rs:27:15
    |
 LL |         asm!("{}");
    |               ^^ from here
@@ -7,7 +7,7 @@ LL |         asm!("{}");
    = note: no arguments were given
 
 error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:33:15
+  --> $DIR/bad-template.rs:29:15
    |
 LL |         asm!("{1}", in(reg) foo);
    |               ^^^ from here
@@ -15,7 +15,7 @@ LL |         asm!("{1}", in(reg) foo);
    = note: there is 1 argument
 
 error: argument never used
-  --> $DIR/bad-template.rs:33:21
+  --> $DIR/bad-template.rs:29:21
    |
 LL |         asm!("{1}", in(reg) foo);
    |                     ^^^^^^^^^^^ argument never used
@@ -23,13 +23,13 @@ LL |         asm!("{1}", in(reg) foo);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
 
 error: there is no argument named `a`
-  --> $DIR/bad-template.rs:36:16
+  --> $DIR/bad-template.rs:32:16
    |
 LL |         asm!("{a}");
    |                ^
 
 error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:38:15
+  --> $DIR/bad-template.rs:34:15
    |
 LL |         asm!("{}", a = in(reg) foo);
    |               ^^   --------------- named argument
@@ -38,13 +38,13 @@ LL |         asm!("{}", a = in(reg) foo);
    |
    = note: no positional arguments were given
 note: named arguments cannot be referenced by position
-  --> $DIR/bad-template.rs:38:20
+  --> $DIR/bad-template.rs:34:20
    |
 LL |         asm!("{}", a = in(reg) foo);
    |                    ^^^^^^^^^^^^^^^
 
 error: named argument never used
-  --> $DIR/bad-template.rs:38:20
+  --> $DIR/bad-template.rs:34:20
    |
 LL |         asm!("{}", a = in(reg) foo);
    |                    ^^^^^^^^^^^^^^^ named argument never used
@@ -52,7 +52,7 @@ LL |         asm!("{}", a = in(reg) foo);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
 
 error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:41:15
+  --> $DIR/bad-template.rs:37:15
    |
 LL |         asm!("{1}", a = in(reg) foo);
    |               ^^^ from here
@@ -60,7 +60,7 @@ LL |         asm!("{1}", a = in(reg) foo);
    = note: no positional arguments were given
 
 error: named argument never used
-  --> $DIR/bad-template.rs:41:21
+  --> $DIR/bad-template.rs:37:21
    |
 LL |         asm!("{1}", a = in(reg) foo);
    |                     ^^^^^^^^^^^^^^^ named argument never used
@@ -68,7 +68,7 @@ LL |         asm!("{1}", a = in(reg) foo);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
 
 error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:45:15
+  --> $DIR/bad-template.rs:41:15
    |
 LL |         asm!("{}", in("eax") foo);
    |               ^^   ------------- explicit register argument
@@ -77,24 +77,24 @@ LL |         asm!("{}", in("eax") foo);
    |
    = note: no positional arguments were given
 note: explicit register arguments cannot be used in the asm template
-  --> $DIR/bad-template.rs:45:20
+  --> $DIR/bad-template.rs:41:20
    |
 LL |         asm!("{}", in("eax") foo);
    |                    ^^^^^^^^^^^^^
 help: use the register name directly in the assembly code
-  --> $DIR/bad-template.rs:45:20
+  --> $DIR/bad-template.rs:41:20
    |
 LL |         asm!("{}", in("eax") foo);
    |                    ^^^^^^^^^^^^^
 
 error: asm template modifier must be a single character
-  --> $DIR/bad-template.rs:50:17
+  --> $DIR/bad-template.rs:46:17
    |
 LL |         asm!("{:foo}", in(reg) foo);
    |                 ^^^
 
 error: multiple unused asm arguments
-  --> $DIR/bad-template.rs:53:18
+  --> $DIR/bad-template.rs:49:18
    |
 LL |         asm!("", in(reg) 0, in(reg) 1);
    |                  ^^^^^^^^^  ^^^^^^^^^ argument never used
@@ -104,7 +104,7 @@ LL |         asm!("", in(reg) 0, in(reg) 1);
    = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
 
 error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:59:14
+  --> $DIR/bad-template.rs:55:14
    |
 LL | global_asm!("{}");
    |              ^^ from here
@@ -112,7 +112,7 @@ LL | global_asm!("{}");
    = note: no arguments were given
 
 error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:61:14
+  --> $DIR/bad-template.rs:57:14
    |
 LL | global_asm!("{1}", const FOO);
    |              ^^^ from here
@@ -120,7 +120,7 @@ LL | global_asm!("{1}", const FOO);
    = note: there is 1 argument
 
 error: argument never used
-  --> $DIR/bad-template.rs:61:20
+  --> $DIR/bad-template.rs:57:20
    |
 LL | global_asm!("{1}", const FOO);
    |                    ^^^^^^^^^ argument never used
@@ -128,13 +128,13 @@ LL | global_asm!("{1}", const FOO);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
 
 error: there is no argument named `a`
-  --> $DIR/bad-template.rs:64:15
+  --> $DIR/bad-template.rs:60:15
    |
 LL | global_asm!("{a}");
    |               ^
 
 error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:66:14
+  --> $DIR/bad-template.rs:62:14
    |
 LL | global_asm!("{}", a = const FOO);
    |              ^^   ------------- named argument
@@ -143,13 +143,13 @@ LL | global_asm!("{}", a = const FOO);
    |
    = note: no positional arguments were given
 note: named arguments cannot be referenced by position
-  --> $DIR/bad-template.rs:66:19
+  --> $DIR/bad-template.rs:62:19
    |
 LL | global_asm!("{}", a = const FOO);
    |                   ^^^^^^^^^^^^^
 
 error: named argument never used
-  --> $DIR/bad-template.rs:66:19
+  --> $DIR/bad-template.rs:62:19
    |
 LL | global_asm!("{}", a = const FOO);
    |                   ^^^^^^^^^^^^^ named argument never used
@@ -157,7 +157,7 @@ LL | global_asm!("{}", a = const FOO);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
 
 error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:69:14
+  --> $DIR/bad-template.rs:65:14
    |
 LL | global_asm!("{1}", a = const FOO);
    |              ^^^ from here
@@ -165,7 +165,7 @@ LL | global_asm!("{1}", a = const FOO);
    = note: no positional arguments were given
 
 error: named argument never used
-  --> $DIR/bad-template.rs:69:20
+  --> $DIR/bad-template.rs:65:20
    |
 LL | global_asm!("{1}", a = const FOO);
    |                    ^^^^^^^^^^^^^ named argument never used
@@ -173,13 +173,13 @@ LL | global_asm!("{1}", a = const FOO);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
 
 error: asm template modifier must be a single character
-  --> $DIR/bad-template.rs:72:16
+  --> $DIR/bad-template.rs:68:16
    |
 LL | global_asm!("{:foo}", const FOO);
    |                ^^^
 
 error: multiple unused asm arguments
-  --> $DIR/bad-template.rs:74:17
+  --> $DIR/bad-template.rs:70:17
    |
 LL | global_asm!("", const FOO, const FOO);
    |                 ^^^^^^^^^  ^^^^^^^^^ argument never used
@@ -189,7 +189,7 @@ LL | global_asm!("", const FOO, const FOO);
    = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
 
 warning: formatting may not be suitable for sub-register argument
-  --> $DIR/bad-template.rs:50:15
+  --> $DIR/bad-template.rs:46:15
    |
 LL |         asm!("{:foo}", in(reg) foo);
    |               ^^^^^^           --- for this argument
diff --git a/tests/ui/asm/bad-template.x86_64_thirunsafeck.stderr b/tests/ui/asm/bad-template.x86_64_thirunsafeck.stderr
deleted file mode 100644
index 41ac37c33c2..00000000000
--- a/tests/ui/asm/bad-template.x86_64_thirunsafeck.stderr
+++ /dev/null
@@ -1,202 +0,0 @@
-error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:31:15
-   |
-LL |         asm!("{}");
-   |               ^^ from here
-   |
-   = note: no arguments were given
-
-error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:33:15
-   |
-LL |         asm!("{1}", in(reg) foo);
-   |               ^^^ from here
-   |
-   = note: there is 1 argument
-
-error: argument never used
-  --> $DIR/bad-template.rs:33:21
-   |
-LL |         asm!("{1}", in(reg) foo);
-   |                     ^^^^^^^^^^^ argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
-
-error: there is no argument named `a`
-  --> $DIR/bad-template.rs:36:16
-   |
-LL |         asm!("{a}");
-   |                ^
-
-error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:38:15
-   |
-LL |         asm!("{}", a = in(reg) foo);
-   |               ^^   --------------- named argument
-   |               |
-   |               from here
-   |
-   = note: no positional arguments were given
-note: named arguments cannot be referenced by position
-  --> $DIR/bad-template.rs:38:20
-   |
-LL |         asm!("{}", a = in(reg) foo);
-   |                    ^^^^^^^^^^^^^^^
-
-error: named argument never used
-  --> $DIR/bad-template.rs:38:20
-   |
-LL |         asm!("{}", a = in(reg) foo);
-   |                    ^^^^^^^^^^^^^^^ named argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
-
-error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:41:15
-   |
-LL |         asm!("{1}", a = in(reg) foo);
-   |               ^^^ from here
-   |
-   = note: no positional arguments were given
-
-error: named argument never used
-  --> $DIR/bad-template.rs:41:21
-   |
-LL |         asm!("{1}", a = in(reg) foo);
-   |                     ^^^^^^^^^^^^^^^ named argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
-
-error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:45:15
-   |
-LL |         asm!("{}", in("eax") foo);
-   |               ^^   ------------- explicit register argument
-   |               |
-   |               from here
-   |
-   = note: no positional arguments were given
-note: explicit register arguments cannot be used in the asm template
-  --> $DIR/bad-template.rs:45:20
-   |
-LL |         asm!("{}", in("eax") foo);
-   |                    ^^^^^^^^^^^^^
-help: use the register name directly in the assembly code
-  --> $DIR/bad-template.rs:45:20
-   |
-LL |         asm!("{}", in("eax") foo);
-   |                    ^^^^^^^^^^^^^
-
-error: asm template modifier must be a single character
-  --> $DIR/bad-template.rs:50:17
-   |
-LL |         asm!("{:foo}", in(reg) foo);
-   |                 ^^^
-
-error: multiple unused asm arguments
-  --> $DIR/bad-template.rs:53:18
-   |
-LL |         asm!("", in(reg) 0, in(reg) 1);
-   |                  ^^^^^^^^^  ^^^^^^^^^ argument never used
-   |                  |
-   |                  argument never used
-   |
-   = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
-
-error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:59:14
-   |
-LL | global_asm!("{}");
-   |              ^^ from here
-   |
-   = note: no arguments were given
-
-error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:61:14
-   |
-LL | global_asm!("{1}", const FOO);
-   |              ^^^ from here
-   |
-   = note: there is 1 argument
-
-error: argument never used
-  --> $DIR/bad-template.rs:61:20
-   |
-LL | global_asm!("{1}", const FOO);
-   |                    ^^^^^^^^^ argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
-
-error: there is no argument named `a`
-  --> $DIR/bad-template.rs:64:15
-   |
-LL | global_asm!("{a}");
-   |               ^
-
-error: invalid reference to argument at index 0
-  --> $DIR/bad-template.rs:66:14
-   |
-LL | global_asm!("{}", a = const FOO);
-   |              ^^   ------------- named argument
-   |              |
-   |              from here
-   |
-   = note: no positional arguments were given
-note: named arguments cannot be referenced by position
-  --> $DIR/bad-template.rs:66:19
-   |
-LL | global_asm!("{}", a = const FOO);
-   |                   ^^^^^^^^^^^^^
-
-error: named argument never used
-  --> $DIR/bad-template.rs:66:19
-   |
-LL | global_asm!("{}", a = const FOO);
-   |                   ^^^^^^^^^^^^^ named argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
-
-error: invalid reference to argument at index 1
-  --> $DIR/bad-template.rs:69:14
-   |
-LL | global_asm!("{1}", a = const FOO);
-   |              ^^^ from here
-   |
-   = note: no positional arguments were given
-
-error: named argument never used
-  --> $DIR/bad-template.rs:69:20
-   |
-LL | global_asm!("{1}", a = const FOO);
-   |                    ^^^^^^^^^^^^^ named argument never used
-   |
-   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
-
-error: asm template modifier must be a single character
-  --> $DIR/bad-template.rs:72:16
-   |
-LL | global_asm!("{:foo}", const FOO);
-   |                ^^^
-
-error: multiple unused asm arguments
-  --> $DIR/bad-template.rs:74:17
-   |
-LL | global_asm!("", const FOO, const FOO);
-   |                 ^^^^^^^^^  ^^^^^^^^^ argument never used
-   |                 |
-   |                 argument never used
-   |
-   = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
-
-warning: formatting may not be suitable for sub-register argument
-  --> $DIR/bad-template.rs:50:15
-   |
-LL |         asm!("{:foo}", in(reg) foo);
-   |               ^^^^^^           --- for this argument
-   |
-   = help: use `{0:e}` to have the register formatted as `eax`
-   = help: or use `{0:r}` to keep the default formatting of `rax`
-   = note: `#[warn(asm_sub_register)]` on by default
-
-error: aborting due to 21 previous errors; 1 warning emitted
-
diff --git a/tests/ui/asm/named-asm-labels.rs b/tests/ui/asm/named-asm-labels.rs
index 160dbf617c4..24586b39aac 100644
--- a/tests/ui/asm/named-asm-labels.rs
+++ b/tests/ui/asm/named-asm-labels.rs
@@ -120,6 +120,27 @@ fn main() {
         // is there an example that is valid x86 for this test?
         asm!(":bbb nop");
 
+        // non-ascii characters are not allowed in labels, so should not trigger the lint
+        asm!("Ù: nop");
+        asm!("testÙ: nop");
+        asm!("_Ù_: nop");
+
+        // Format arguments should be conservatively assumed to be valid characters in labels
+        // Would emit `test_rax:` or similar
+        #[allow(asm_sub_register)]
+        {
+            asm!("test_{}: nop", in(reg) 10); //~ ERROR avoid using named labels
+        }
+        asm!("test_{}: nop", const 10); //~ ERROR avoid using named labels
+        asm!("test_{}: nop", sym main); //~ ERROR avoid using named labels
+        asm!("{}_test: nop", const 10); //~ ERROR avoid using named labels
+        asm!("test_{}_test: nop", const 10); //~ ERROR avoid using named labels
+        asm!("{}: nop", const 10); //~ ERROR avoid using named labels
+
+        asm!("{uwu}: nop", uwu = const 10); //~ ERROR avoid using named labels
+        asm!("{0}: nop", const 10); //~ ERROR avoid using named labels
+        asm!("{1}: nop", "/* {0} */", const 10, const 20); //~ ERROR avoid using named labels
+
         // Test include_str in asm
         asm!(include_str!("named-asm-labels.s")); //~ ERROR avoid using named labels
 
diff --git a/tests/ui/asm/named-asm-labels.stderr b/tests/ui/asm/named-asm-labels.stderr
index c8380629e12..89c05849967 100644
--- a/tests/ui/asm/named-asm-labels.stderr
+++ b/tests/ui/asm/named-asm-labels.stderr
@@ -245,7 +245,88 @@ LL |             ab: nop // ab: does foo
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:124:14
+  --> $DIR/named-asm-labels.rs:132:19
+   |
+LL |             asm!("test_{}: nop", in(reg) 10);
+   |                   ^^^^^^^
+   |
+   = help: only local labels of the form `<number>:` should be used in inline asm
+   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
+
+error: avoid using named labels in inline assembly
+  --> $DIR/named-asm-labels.rs:134:15
+   |
+LL |         asm!("test_{}: nop", const 10);
+   |               ^^^^^^^
+   |
+   = help: only local labels of the form `<number>:` should be used in inline asm
+   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
+
+error: avoid using named labels in inline assembly
+  --> $DIR/named-asm-labels.rs:135:15
+   |
+LL |         asm!("test_{}: nop", sym main);
+   |               ^^^^^^^
+   |
+   = help: only local labels of the form `<number>:` should be used in inline asm
+   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
+
+error: avoid using named labels in inline assembly
+  --> $DIR/named-asm-labels.rs:136:15
+   |
+LL |         asm!("{}_test: nop", const 10);
+   |               ^^^^^^^
+   |
+   = help: only local labels of the form `<number>:` should be used in inline asm
+   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
+
+error: avoid using named labels in inline assembly
+  --> $DIR/named-asm-labels.rs:137:15
+   |
+LL |         asm!("test_{}_test: nop", const 10);
+   |               ^^^^^^^^^^^^
+   |
+   = help: only local labels of the form `<number>:` should be used in inline asm
+   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
+
+error: avoid using named labels in inline assembly
+  --> $DIR/named-asm-labels.rs:138:15
+   |
+LL |         asm!("{}: nop", const 10);
+   |               ^^
+   |
+   = help: only local labels of the form `<number>:` should be used in inline asm
+   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
+
+error: avoid using named labels in inline assembly
+  --> $DIR/named-asm-labels.rs:140:15
+   |
+LL |         asm!("{uwu}: nop", uwu = const 10);
+   |               ^^^^^
+   |
+   = help: only local labels of the form `<number>:` should be used in inline asm
+   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
+
+error: avoid using named labels in inline assembly
+  --> $DIR/named-asm-labels.rs:141:15
+   |
+LL |         asm!("{0}: nop", const 10);
+   |               ^^^
+   |
+   = help: only local labels of the form `<number>:` should be used in inline asm
+   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
+
+error: avoid using named labels in inline assembly
+  --> $DIR/named-asm-labels.rs:142:15
+   |
+LL |         asm!("{1}: nop", "/* {0} */", const 10, const 20);
+   |               ^^^
+   |
+   = help: only local labels of the form `<number>:` should be used in inline asm
+   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
+
+error: avoid using named labels in inline assembly
+  --> $DIR/named-asm-labels.rs:145:14
    |
 LL |         asm!(include_str!("named-asm-labels.s"));
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -254,7 +335,7 @@ LL |         asm!(include_str!("named-asm-labels.s"));
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 warning: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:134:19
+  --> $DIR/named-asm-labels.rs:155:19
    |
 LL |             asm!("warned: nop");
    |                   ^^^^^^
@@ -262,13 +343,13 @@ LL |             asm!("warned: nop");
    = help: only local labels of the form `<number>:` should be used in inline asm
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 note: the lint level is defined here
-  --> $DIR/named-asm-labels.rs:132:16
+  --> $DIR/named-asm-labels.rs:153:16
    |
 LL |         #[warn(named_asm_labels)]
    |                ^^^^^^^^^^^^^^^^
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:143:20
+  --> $DIR/named-asm-labels.rs:164:20
    |
 LL |     unsafe { asm!(".Lfoo: mov rax, {}; ret;", "nop", const 1, options(noreturn)) }
    |                    ^^^^^
@@ -277,7 +358,7 @@ LL |     unsafe { asm!(".Lfoo: mov rax, {}; ret;", "nop", const 1, options(noret
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:149:20
+  --> $DIR/named-asm-labels.rs:170:20
    |
 LL |     unsafe { asm!(".Lbar: mov rax, {}; ret;", "nop", const 1, options(noreturn)) }
    |                    ^^^^^
@@ -286,7 +367,7 @@ LL |     unsafe { asm!(".Lbar: mov rax, {}; ret;", "nop", const 1, options(noret
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:157:20
+  --> $DIR/named-asm-labels.rs:178:20
    |
 LL |     unsafe { asm!(".Laaa: nop; ret;", options(noreturn)) }
    |                    ^^^^^
@@ -295,7 +376,7 @@ LL |     unsafe { asm!(".Laaa: nop; ret;", options(noreturn)) }
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:167:24
+  --> $DIR/named-asm-labels.rs:188:24
    |
 LL |         unsafe { asm!(".Lbbb: nop; ret;", options(noreturn)) }
    |                        ^^^^^
@@ -304,7 +385,7 @@ LL |         unsafe { asm!(".Lbbb: nop; ret;", options(noreturn)) }
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:176:15
+  --> $DIR/named-asm-labels.rs:197:15
    |
 LL |         asm!("closure1: nop");
    |               ^^^^^^^^
@@ -313,7 +394,7 @@ LL |         asm!("closure1: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:180:15
+  --> $DIR/named-asm-labels.rs:201:15
    |
 LL |         asm!("closure2: nop");
    |               ^^^^^^^^
@@ -322,7 +403,7 @@ LL |         asm!("closure2: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:190:19
+  --> $DIR/named-asm-labels.rs:211:19
    |
 LL |             asm!("closure3: nop");
    |                   ^^^^^^^^
@@ -330,5 +411,5 @@ LL |             asm!("closure3: nop");
    = help: only local labels of the form `<number>:` should be used in inline asm
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
-error: aborting due to 35 previous errors; 1 warning emitted
+error: aborting due to 44 previous errors; 1 warning emitted
 
diff --git a/tests/ui/asm/x86_64/const.rs b/tests/ui/asm/x86_64/const.rs
index d523ae021a5..f9a2ab6269f 100644
--- a/tests/ui/asm/x86_64/const.rs
+++ b/tests/ui/asm/x86_64/const.rs
@@ -1,8 +1,6 @@
 // only-x86_64
 // run-pass
 // needs-asm-support
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![feature(asm_const)]
 
diff --git a/tests/ui/associated-consts/associated-const-type-parameters.rs b/tests/ui/associated-consts/associated-const-type-parameters.rs
index e7ead1045e6..b62d47458be 100644
--- a/tests/ui/associated-consts/associated-const-type-parameters.rs
+++ b/tests/ui/associated-consts/associated-const-type-parameters.rs
@@ -17,7 +17,7 @@ impl Foo for Def {
     const X: i32 = 97;
 }
 
-struct Proxy<T>(#[allow(unused_tuple_struct_fields)] T);
+struct Proxy<T>(#[allow(dead_code)] T);
 
 impl<T: Foo> Foo for Proxy<T> {
     const X: i32 = T::X;
diff --git a/tests/ui/associated-consts/issue-105330.stderr b/tests/ui/associated-consts/issue-105330.stderr
index aeedf6b1949..e1461fec296 100644
--- a/tests/ui/associated-consts/issue-105330.stderr
+++ b/tests/ui/associated-consts/issue-105330.stderr
@@ -33,11 +33,13 @@ LL | fn main<A: TraitWAssocConst<A=32>>() {
    = note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
    = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in impl headers
+error[E0562]: `impl Trait` is not allowed in impl headers
   --> $DIR/issue-105330.rs:6:27
    |
 LL | impl TraitWAssocConst for impl Demo {
    |                           ^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error[E0131]: `main` function is not allowed to have generic parameters
   --> $DIR/issue-105330.rs:15:8
diff --git a/tests/ui/associated-inherent-types/issue-109071.no_gate.stderr b/tests/ui/associated-inherent-types/issue-109071.no_gate.stderr
index 2fceeb15ea9..3acec9c085a 100644
--- a/tests/ui/associated-inherent-types/issue-109071.no_gate.stderr
+++ b/tests/ui/associated-inherent-types/issue-109071.no_gate.stderr
@@ -13,7 +13,7 @@ LL | impl<T> Windows {
 note: struct defined here, with 1 generic parameter: `T`
   --> $DIR/issue-109071.rs:5:8
    |
-LL | struct Windows<T> {}
+LL | struct Windows<T> { t: T }
    |        ^^^^^^^ -
 help: add missing generic argument
    |
@@ -30,7 +30,7 @@ LL |     type Item = &[T];
    = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable
 
 error[E0223]: ambiguous associated type
-  --> $DIR/issue-109071.rs:15:22
+  --> $DIR/issue-109071.rs:16:22
    |
 LL |     fn T() -> Option<Self::Item> {}
    |                      ^^^^^^^^^^
diff --git a/tests/ui/associated-inherent-types/issue-109071.rs b/tests/ui/associated-inherent-types/issue-109071.rs
index 951c708e3f9..a897aaebc58 100644
--- a/tests/ui/associated-inherent-types/issue-109071.rs
+++ b/tests/ui/associated-inherent-types/issue-109071.rs
@@ -2,18 +2,20 @@
 #![cfg_attr(with_gate, feature(inherent_associated_types))]
 #![cfg_attr(with_gate, allow(incomplete_features))]
 
-struct Windows<T> {}
+struct Windows<T> { t: T }
 
 impl<T> Windows { //~ ERROR: missing generics for struct `Windows`
     type Item = &[T]; //~ ERROR: `&` without an explicit lifetime name cannot be used here
     //[no_gate]~^ ERROR: inherent associated types are unstable
 
     fn next() -> Option<Self::Item> {}
+    //[with_gate]~^ ERROR type annotations needed
 }
 
 impl<T> Windows<T> {
     fn T() -> Option<Self::Item> {}
     //[no_gate]~^ ERROR: ambiguous associated type
+    //[with_gate]~^^ ERROR type annotations needed
 }
 
 fn main() {}
diff --git a/tests/ui/associated-inherent-types/issue-109071.with_gate.stderr b/tests/ui/associated-inherent-types/issue-109071.with_gate.stderr
index a91bb7a5162..d413c65dccb 100644
--- a/tests/ui/associated-inherent-types/issue-109071.with_gate.stderr
+++ b/tests/ui/associated-inherent-types/issue-109071.with_gate.stderr
@@ -13,14 +13,26 @@ LL | impl<T> Windows {
 note: struct defined here, with 1 generic parameter: `T`
   --> $DIR/issue-109071.rs:5:8
    |
-LL | struct Windows<T> {}
+LL | struct Windows<T> { t: T }
    |        ^^^^^^^ -
 help: add missing generic argument
    |
 LL | impl<T> Windows<T> {
    |                +++
 
-error: aborting due to 2 previous errors
+error[E0282]: type annotations needed
+  --> $DIR/issue-109071.rs:11:18
+   |
+LL |     fn next() -> Option<Self::Item> {}
+   |                  ^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T`
+
+error[E0282]: type annotations needed
+  --> $DIR/issue-109071.rs:16:15
+   |
+LL |     fn T() -> Option<Self::Item> {}
+   |               ^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T`
+
+error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0107, E0637.
+Some errors have detailed explanations: E0107, E0282, E0637.
 For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/associated-inherent-types/issue-109299-1.rs b/tests/ui/associated-inherent-types/issue-109299-1.rs
index 6f95273116b..b86e2e31e06 100644
--- a/tests/ui/associated-inherent-types/issue-109299-1.rs
+++ b/tests/ui/associated-inherent-types/issue-109299-1.rs
@@ -8,5 +8,6 @@ impl Lexer<i32> {
 }
 
 type X = impl for<T> Fn() -> Lexer<T>::Cursor; //~ ERROR associated type `Cursor` not found for `Lexer<T>` in the current scope
+//~^ ERROR: unconstrained opaque type
 
 fn main() {}
diff --git a/tests/ui/associated-inherent-types/issue-109299-1.stderr b/tests/ui/associated-inherent-types/issue-109299-1.stderr
index c25ffb9d9c2..5848fa4087d 100644
--- a/tests/ui/associated-inherent-types/issue-109299-1.stderr
+++ b/tests/ui/associated-inherent-types/issue-109299-1.stderr
@@ -10,6 +10,14 @@ LL | type X = impl for<T> Fn() -> Lexer<T>::Cursor;
    = note: the associated type was found for
            - `Lexer<i32>`
 
-error: aborting due to 1 previous error
+error: unconstrained opaque type
+  --> $DIR/issue-109299-1.rs:10:10
+   |
+LL | type X = impl for<T> Fn() -> Lexer<T>::Cursor;
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `X` must be used in combination with a concrete type within the same module
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/ui/associated-inherent-types/issue-109768.rs b/tests/ui/associated-inherent-types/issue-109768.rs
index a3ae2e2ab44..400f4f7de66 100644
--- a/tests/ui/associated-inherent-types/issue-109768.rs
+++ b/tests/ui/associated-inherent-types/issue-109768.rs
@@ -8,5 +8,6 @@ impl<T> Local { //~ ERROR missing generics for struct `Local`
     type AssocType3 = T; //~ ERROR inherent associated types are unstable
 
     const WRAPPED_ASSOC_3: Wrapper<Self::AssocType3> = Wrapper();
+    //~^ ERROR: this struct takes 1 argument but 0 arguments were supplied
 }
 //~^ ERROR `main` function not found
diff --git a/tests/ui/associated-inherent-types/issue-109768.stderr b/tests/ui/associated-inherent-types/issue-109768.stderr
index 97706d4062a..c489fd1ab9b 100644
--- a/tests/ui/associated-inherent-types/issue-109768.stderr
+++ b/tests/ui/associated-inherent-types/issue-109768.stderr
@@ -1,5 +1,5 @@
 error[E0601]: `main` function not found in crate `issue_109768`
-  --> $DIR/issue-109768.rs:11:2
+  --> $DIR/issue-109768.rs:12:2
    |
 LL | }
    |  ^ consider adding a `main` function to `$DIR/issue-109768.rs`
@@ -29,7 +29,23 @@ LL |     type AssocType3 = T;
    = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
    = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable
 
-error: aborting due to 3 previous errors
+error[E0061]: this struct takes 1 argument but 0 arguments were supplied
+  --> $DIR/issue-109768.rs:10:56
+   |
+LL |     const WRAPPED_ASSOC_3: Wrapper<Self::AssocType3> = Wrapper();
+   |                                                        ^^^^^^^-- an argument is missing
+   |
+note: tuple struct defined here
+  --> $DIR/issue-109768.rs:3:8
+   |
+LL | struct Wrapper<T>(T);
+   |        ^^^^^^^
+help: provide the argument
+   |
+LL |     const WRAPPED_ASSOC_3: Wrapper<Self::AssocType3> = Wrapper(/* value */);
+   |                                                               ~~~~~~~~~~~~~
+
+error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0107, E0601, E0658.
-For more information about an error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0061, E0107, E0601, E0658.
+For more information about an error, try `rustc --explain E0061`.
diff --git a/tests/ui/associated-type-bounds/duplicate.rs b/tests/ui/associated-type-bounds/duplicate.rs
index 5019804d494..160b524c881 100644
--- a/tests/ui/associated-type-bounds/duplicate.rs
+++ b/tests/ui/associated-type-bounds/duplicate.rs
@@ -134,14 +134,17 @@ where
 fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
     //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
     iter::empty()
+    //~^ ERROR type annotations needed
 }
 fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
     //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
     iter::empty()
+    //~^ ERROR type annotations needed
 }
 fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
     //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
     iter::empty()
+    //~^ ERROR type annotations needed
 }
 fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
 //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
@@ -194,12 +197,15 @@ trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
 trait TRS1: Iterator<Item: Copy, Item: Send> {}
 //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 trait TRS2: Iterator<Item: Copy, Item: Copy> {}
 //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 trait TRS3: Iterator<Item: 'static, Item: 'static> {}
 //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 trait TRW1<T>
 where
     T: Iterator<Item: Copy, Item: Send>,
@@ -223,6 +229,7 @@ where
     Self: Iterator<Item: Copy, Item: Send>,
     //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
     //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 {
 }
 trait TRSW2
@@ -230,6 +237,7 @@ where
     Self: Iterator<Item: Copy, Item: Copy>,
     //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
     //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 {
 }
 trait TRSW3
@@ -237,15 +245,19 @@ where
     Self: Iterator<Item: 'static, Item: 'static>,
     //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
     //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 {
 }
 trait TRA1 {
     type A: Iterator<Item: Copy, Item: Send>;
     //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+    //~| ERROR `<<Self as TRA1>::A as Iterator>::Item` cannot be sent between threads safely
+    //~| ERROR the trait bound `<<Self as TRA1>::A as Iterator>::Item: Copy` is not satisfied
 }
 trait TRA2 {
     type A: Iterator<Item: Copy, Item: Copy>;
     //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+    //~| ERROR the trait bound `<<Self as TRA2>::A as Iterator>::Item: Copy` is not satisfied
 }
 trait TRA3 {
     type A: Iterator<Item: 'static, Item: 'static>;
diff --git a/tests/ui/associated-type-bounds/duplicate.stderr b/tests/ui/associated-type-bounds/duplicate.stderr
index 3888e62230f..accb366dd15 100644
--- a/tests/ui/associated-type-bounds/duplicate.stderr
+++ b/tests/ui/associated-type-bounds/duplicate.stderr
@@ -7,6 +7,30 @@ LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> {
    |                        `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
+  --> $DIR/duplicate.rs:267:40
+   |
+LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
+   |                            ----------  ^^^^^^^^^^ re-bound here
+   |                            |
+   |                            `Item` bound here first
+
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
+  --> $DIR/duplicate.rs:269:44
+   |
+LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
+   |                                ----------  ^^^^^^^^^^ re-bound here
+   |                                |
+   |                                `Item` bound here first
+
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
+  --> $DIR/duplicate.rs:271:43
+   |
+LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
+   |                            -------------  ^^^^^^^^^^^^^ re-bound here
+   |                            |
+   |                            `Item` bound here first
+
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:11:36
    |
 LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
@@ -199,7 +223,7 @@ LL | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
    |                              `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:138:42
+  --> $DIR/duplicate.rs:139:42
    |
 LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
    |                              ----------  ^^^^^^^^^^ re-bound here
@@ -207,7 +231,7 @@ LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
    |                              `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:142:45
+  --> $DIR/duplicate.rs:144:45
    |
 LL | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
    |                              -------------  ^^^^^^^^^^^^^ re-bound here
@@ -215,7 +239,7 @@ LL | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
    |                              `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:146:40
+  --> $DIR/duplicate.rs:149:40
    |
 LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
    |                            ----------  ^^^^^^^^^^ re-bound here
@@ -223,7 +247,7 @@ LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
    |                            `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:148:40
+  --> $DIR/duplicate.rs:151:40
    |
 LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
    |                            ----------  ^^^^^^^^^^ re-bound here
@@ -231,7 +255,7 @@ LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
    |                            `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:150:43
+  --> $DIR/duplicate.rs:153:43
    |
 LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
    |                            -------------  ^^^^^^^^^^^^^ re-bound here
@@ -239,7 +263,7 @@ LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
    |                            `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:153:35
+  --> $DIR/duplicate.rs:156:35
    |
 LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
    |                       ----------  ^^^^^^^^^^ re-bound here
@@ -247,7 +271,7 @@ LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
    |                       `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:155:35
+  --> $DIR/duplicate.rs:158:35
    |
 LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
    |                       ----------  ^^^^^^^^^^ re-bound here
@@ -255,7 +279,7 @@ LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
    |                       `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:157:38
+  --> $DIR/duplicate.rs:160:38
    |
 LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
    |                       -------------  ^^^^^^^^^^^^^ re-bound here
@@ -263,7 +287,7 @@ LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
    |                       `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:161:29
+  --> $DIR/duplicate.rs:164:29
    |
 LL |     T: Iterator<Item: Copy, Item: Send>,
    |                 ----------  ^^^^^^^^^^ re-bound here
@@ -271,7 +295,7 @@ LL |     T: Iterator<Item: Copy, Item: Send>,
    |                 `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:166:29
+  --> $DIR/duplicate.rs:169:29
    |
 LL |     T: Iterator<Item: Copy, Item: Copy>,
    |                 ----------  ^^^^^^^^^^ re-bound here
@@ -279,7 +303,7 @@ LL |     T: Iterator<Item: Copy, Item: Copy>,
    |                 `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:171:32
+  --> $DIR/duplicate.rs:174:32
    |
 LL |     T: Iterator<Item: 'static, Item: 'static>,
    |                 -------------  ^^^^^^^^^^^^^ re-bound here
@@ -287,7 +311,7 @@ LL |     T: Iterator<Item: 'static, Item: 'static>,
    |                 `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:175:36
+  --> $DIR/duplicate.rs:178:36
    |
 LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
    |                        ----------  ^^^^^^^^^^ re-bound here
@@ -295,7 +319,7 @@ LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
    |                        `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:177:36
+  --> $DIR/duplicate.rs:180:36
    |
 LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
    |                        ----------  ^^^^^^^^^^ re-bound here
@@ -303,7 +327,7 @@ LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
    |                        `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:179:39
+  --> $DIR/duplicate.rs:182:39
    |
 LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
    |                        -------------  ^^^^^^^^^^^^^ re-bound here
@@ -311,7 +335,7 @@ LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
    |                        `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:181:40
+  --> $DIR/duplicate.rs:184:40
    |
 LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
    |                            ----------  ^^^^^^^^^^ re-bound here
@@ -319,7 +343,7 @@ LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
    |                            `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:183:40
+  --> $DIR/duplicate.rs:186:40
    |
 LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
    |                            ----------  ^^^^^^^^^^ re-bound here
@@ -327,7 +351,7 @@ LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
    |                            `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:185:43
+  --> $DIR/duplicate.rs:188:43
    |
 LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
    |                            -------------  ^^^^^^^^^^^^^ re-bound here
@@ -335,7 +359,7 @@ LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
    |                            `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:188:36
+  --> $DIR/duplicate.rs:191:36
    |
 LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
    |                        ----------  ^^^^^^^^^^ re-bound here
@@ -343,7 +367,7 @@ LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
    |                        `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:190:36
+  --> $DIR/duplicate.rs:193:36
    |
 LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
    |                        ----------  ^^^^^^^^^^ re-bound here
@@ -351,7 +375,7 @@ LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
    |                        `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:192:39
+  --> $DIR/duplicate.rs:195:39
    |
 LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
    |                        -------------  ^^^^^^^^^^^^^ re-bound here
@@ -359,7 +383,7 @@ LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
    |                        `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:194:34
+  --> $DIR/duplicate.rs:197:34
    |
 LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
    |                      ----------  ^^^^^^^^^^ re-bound here
@@ -367,7 +391,7 @@ LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
    |                      `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:194:34
+  --> $DIR/duplicate.rs:197:34
    |
 LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
    |                      ----------  ^^^^^^^^^^ re-bound here
@@ -377,7 +401,7 @@ LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:197:34
+  --> $DIR/duplicate.rs:201:34
    |
 LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
    |                      ----------  ^^^^^^^^^^ re-bound here
@@ -385,7 +409,7 @@ LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
    |                      `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:197:34
+  --> $DIR/duplicate.rs:201:34
    |
 LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
    |                      ----------  ^^^^^^^^^^ re-bound here
@@ -395,7 +419,7 @@ LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:200:37
+  --> $DIR/duplicate.rs:205:37
    |
 LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
    |                      -------------  ^^^^^^^^^^^^^ re-bound here
@@ -403,7 +427,7 @@ LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
    |                      `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:200:37
+  --> $DIR/duplicate.rs:205:37
    |
 LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
    |                      -------------  ^^^^^^^^^^^^^ re-bound here
@@ -413,7 +437,7 @@ LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:205:29
+  --> $DIR/duplicate.rs:211:29
    |
 LL |     T: Iterator<Item: Copy, Item: Send>,
    |                 ----------  ^^^^^^^^^^ re-bound here
@@ -421,7 +445,7 @@ LL |     T: Iterator<Item: Copy, Item: Send>,
    |                 `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:211:29
+  --> $DIR/duplicate.rs:217:29
    |
 LL |     T: Iterator<Item: Copy, Item: Copy>,
    |                 ----------  ^^^^^^^^^^ re-bound here
@@ -429,7 +453,7 @@ LL |     T: Iterator<Item: Copy, Item: Copy>,
    |                 `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:217:32
+  --> $DIR/duplicate.rs:223:32
    |
 LL |     T: Iterator<Item: 'static, Item: 'static>,
    |                 -------------  ^^^^^^^^^^^^^ re-bound here
@@ -437,7 +461,7 @@ LL |     T: Iterator<Item: 'static, Item: 'static>,
    |                 `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:223:32
+  --> $DIR/duplicate.rs:229:32
    |
 LL |     Self: Iterator<Item: Copy, Item: Send>,
    |                    ----------  ^^^^^^^^^^ re-bound here
@@ -445,7 +469,7 @@ LL |     Self: Iterator<Item: Copy, Item: Send>,
    |                    `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:223:32
+  --> $DIR/duplicate.rs:229:32
    |
 LL |     Self: Iterator<Item: Copy, Item: Send>,
    |                    ----------  ^^^^^^^^^^ re-bound here
@@ -455,7 +479,7 @@ LL |     Self: Iterator<Item: Copy, Item: Send>,
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:230:32
+  --> $DIR/duplicate.rs:237:32
    |
 LL |     Self: Iterator<Item: Copy, Item: Copy>,
    |                    ----------  ^^^^^^^^^^ re-bound here
@@ -463,7 +487,7 @@ LL |     Self: Iterator<Item: Copy, Item: Copy>,
    |                    `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:230:32
+  --> $DIR/duplicate.rs:237:32
    |
 LL |     Self: Iterator<Item: Copy, Item: Copy>,
    |                    ----------  ^^^^^^^^^^ re-bound here
@@ -473,7 +497,7 @@ LL |     Self: Iterator<Item: Copy, Item: Copy>,
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:237:35
+  --> $DIR/duplicate.rs:245:35
    |
 LL |     Self: Iterator<Item: 'static, Item: 'static>,
    |                    -------------  ^^^^^^^^^^^^^ re-bound here
@@ -481,7 +505,7 @@ LL |     Self: Iterator<Item: 'static, Item: 'static>,
    |                    `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:237:35
+  --> $DIR/duplicate.rs:245:35
    |
 LL |     Self: Iterator<Item: 'static, Item: 'static>,
    |                    -------------  ^^^^^^^^^^^^^ re-bound here
@@ -491,53 +515,157 @@ LL |     Self: Iterator<Item: 'static, Item: 'static>,
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:255:40
+  --> $DIR/duplicate.rs:252:34
    |
-LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
-   |                            ----------  ^^^^^^^^^^ re-bound here
-   |                            |
-   |                            `Item` bound here first
+LL |     type A: Iterator<Item: Copy, Item: Send>;
+   |                      ----------  ^^^^^^^^^^ re-bound here
+   |                      |
+   |                      `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:257:44
+  --> $DIR/duplicate.rs:258:34
    |
-LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
-   |                                ----------  ^^^^^^^^^^ re-bound here
-   |                                |
-   |                                `Item` bound here first
+LL |     type A: Iterator<Item: Copy, Item: Copy>;
+   |                      ----------  ^^^^^^^^^^ re-bound here
+   |                      |
+   |                      `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:259:43
+  --> $DIR/duplicate.rs:263:37
    |
-LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
-   |                            -------------  ^^^^^^^^^^^^^ re-bound here
-   |                            |
-   |                            `Item` bound here first
+LL |     type A: Iterator<Item: 'static, Item: 'static>;
+   |                      -------------  ^^^^^^^^^^^^^ re-bound here
+   |                      |
+   |                      `Item` bound here first
+
+error[E0282]: type annotations needed
+  --> $DIR/duplicate.rs:136:5
+   |
+LL |     iter::empty()
+   |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
+   |
+help: consider specifying the generic argument
+   |
+LL |     iter::empty::<T>()
+   |                +++++
+
+error[E0282]: type annotations needed
+  --> $DIR/duplicate.rs:141:5
+   |
+LL |     iter::empty()
+   |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
+   |
+help: consider specifying the generic argument
+   |
+LL |     iter::empty::<T>()
+   |                +++++
+
+error[E0282]: type annotations needed
+  --> $DIR/duplicate.rs:146:5
+   |
+LL |     iter::empty()
+   |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
+   |
+help: consider specifying the generic argument
+   |
+LL |     iter::empty::<T>()
+   |                +++++
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:243:34
+  --> $DIR/duplicate.rs:197:34
    |
-LL |     type A: Iterator<Item: Copy, Item: Send>;
+LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
    |                      ----------  ^^^^^^^^^^ re-bound here
    |                      |
    |                      `Item` bound here first
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:247:34
+  --> $DIR/duplicate.rs:201:34
    |
-LL |     type A: Iterator<Item: Copy, Item: Copy>;
+LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
    |                      ----------  ^^^^^^^^^^ re-bound here
    |                      |
    |                      `Item` bound here first
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/duplicate.rs:251:37
+  --> $DIR/duplicate.rs:205:37
    |
-LL |     type A: Iterator<Item: 'static, Item: 'static>;
+LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
    |                      -------------  ^^^^^^^^^^^^^ re-bound here
    |                      |
    |                      `Item` bound here first
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
+  --> $DIR/duplicate.rs:229:32
+   |
+LL |     Self: Iterator<Item: Copy, Item: Send>,
+   |                    ----------  ^^^^^^^^^^ re-bound here
+   |                    |
+   |                    `Item` bound here first
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
+  --> $DIR/duplicate.rs:237:32
+   |
+LL |     Self: Iterator<Item: Copy, Item: Copy>,
+   |                    ----------  ^^^^^^^^^^ re-bound here
+   |                    |
+   |                    `Item` bound here first
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
+  --> $DIR/duplicate.rs:245:35
+   |
+LL |     Self: Iterator<Item: 'static, Item: 'static>,
+   |                    -------------  ^^^^^^^^^^^^^ re-bound here
+   |                    |
+   |                    `Item` bound here first
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0277]: the trait bound `<<Self as TRA1>::A as Iterator>::Item: Copy` is not satisfied
+  --> $DIR/duplicate.rs:252:28
+   |
+LL |     type A: Iterator<Item: Copy, Item: Send>;
+   |                            ^^^^ the trait `Copy` is not implemented for `<<Self as TRA1>::A as Iterator>::Item`
+   |
+help: consider further restricting the associated type
+   |
+LL | trait TRA1 where <<Self as TRA1>::A as Iterator>::Item: Copy {
+   |            +++++++++++++++++++++++++++++++++++++++++++++++++
+
+error[E0277]: `<<Self as TRA1>::A as Iterator>::Item` cannot be sent between threads safely
+  --> $DIR/duplicate.rs:252:40
+   |
+LL |     type A: Iterator<Item: Copy, Item: Send>;
+   |                                        ^^^^ `<<Self as TRA1>::A as Iterator>::Item` cannot be sent between threads safely
+   |
+   = help: the trait `Send` is not implemented for `<<Self as TRA1>::A as Iterator>::Item`
+help: consider further restricting the associated type
+   |
+LL | trait TRA1 where <<Self as TRA1>::A as Iterator>::Item: Send {
+   |            +++++++++++++++++++++++++++++++++++++++++++++++++
+
+error[E0277]: the trait bound `<<Self as TRA2>::A as Iterator>::Item: Copy` is not satisfied
+  --> $DIR/duplicate.rs:258:28
+   |
+LL |     type A: Iterator<Item: Copy, Item: Copy>;
+   |                            ^^^^ the trait `Copy` is not implemented for `<<Self as TRA2>::A as Iterator>::Item`
+   |
+help: consider further restricting the associated type
+   |
+LL | trait TRA2 where <<Self as TRA2>::A as Iterator>::Item: Copy {
+   |            +++++++++++++++++++++++++++++++++++++++++++++++++
 
-error: aborting due to 66 previous errors
+error: aborting due to 78 previous errors
 
-For more information about this error, try `rustc --explain E0719`.
+Some errors have detailed explanations: E0277, E0282, E0719.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.rs b/tests/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.rs
index c85d41c7f51..eaf3090bbd3 100644
--- a/tests/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.rs
+++ b/tests/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.rs
@@ -25,7 +25,7 @@ fn c<C>(_: C::Color) where C : Vehicle, C : Box {
     //~^ ERROR ambiguous associated type `Color` in bounds of `C`
 }
 
-struct D<X>;
+struct D<X>(X);
 impl<X> D<X> where X : Vehicle {
     fn d(&self, _: X::Color) where X : Box { }
     //~^ ERROR ambiguous associated type `Color` in bounds of `X`
diff --git a/tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.rs b/tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.rs
index df19332b645..b757521e0a4 100644
--- a/tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.rs
+++ b/tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.rs
@@ -20,7 +20,7 @@ fn dent<C:BoxCar>(c: C, color: C::Color) {
     //~^ ERROR ambiguous associated type `Color` in bounds of `C`
 }
 
-fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
+fn dent_object<COLOR>(c: &dyn BoxCar<Color=COLOR>) {
     //~^ ERROR ambiguous associated type
     //~| ERROR the value of the associated types
 }
@@ -29,7 +29,7 @@ fn paint<C:BoxCar>(c: C, d: C::Color) {
     //~^ ERROR ambiguous associated type `Color` in bounds of `C`
 }
 
-fn dent_object_2<COLOR>(c: dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR {
+fn dent_object_2<COLOR>(c: &dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR {
     //~^ ERROR the value of the associated types
     //~| ERROR equality constraints are not yet supported in `where` clauses
 }
diff --git a/tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr b/tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr
index 66037054e06..a4874903285 100644
--- a/tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr
+++ b/tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr
@@ -1,8 +1,8 @@
 error: equality constraints are not yet supported in `where` clauses
-  --> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:46
+  --> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:47
    |
-LL | fn dent_object_2<COLOR>(c: dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR {
-   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not supported
+LL | fn dent_object_2<COLOR>(c: &dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR {
+   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not supported
    |
    = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
 
@@ -28,7 +28,7 @@ LL | fn dent<C:BoxCar>(c: C, color: <C as Box>::Color) {
    |                                ~~~~~~~~~~~~
 
 error[E0222]: ambiguous associated type `Color` in bounds of `BoxCar`
-  --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:37
+  --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:38
    |
 LL |     type Color;
    |     ---------- ambiguous `Color` from `Vehicle`
@@ -36,8 +36,8 @@ LL |     type Color;
 LL |     type Color;
    |     ---------- ambiguous `Color` from `Box`
 ...
-LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
-   |                                     ^^^^^^^^^^^ ambiguous associated type `Color`
+LL | fn dent_object<COLOR>(c: &dyn BoxCar<Color=COLOR>) {
+   |                                      ^^^^^^^^^^^ ambiguous associated type `Color`
    |
    = help: consider introducing a new type parameter `T` and adding `where` constraints:
                where
@@ -46,7 +46,7 @@ LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
                    T: Box::Color = COLOR
 
 error[E0191]: the value of the associated types `Color` in `Box`, `Color` in `Vehicle` must be specified
-  --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:30
+  --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:31
    |
 LL |     type Color;
    |     ---------- `Vehicle::Color` defined here
@@ -54,8 +54,8 @@ LL |     type Color;
 LL |     type Color;
    |     ---------- `Box::Color` defined here
 ...
-LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
-   |                              ^^^^^^^^^^^^^^^^^^^ associated types `Color` (from trait `Vehicle`), `Color` (from trait `Box`) must be specified
+LL | fn dent_object<COLOR>(c: &dyn BoxCar<Color=COLOR>) {
+   |                               ^^^^^^^^^^^^^^^^^^^ associated types `Color` (from trait `Vehicle`), `Color` (from trait `Box`) must be specified
    |
    = help: consider introducing a new type parameter, adding `where` constraints using the fully-qualified path to the associated types
 
@@ -81,7 +81,7 @@ LL | fn paint<C:BoxCar>(c: C, d: <C as Box>::Color) {
    |                             ~~~~~~~~~~~~
 
 error[E0191]: the value of the associated types `Color` in `Box`, `Color` in `Vehicle` must be specified
-  --> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:32
+  --> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:33
    |
 LL |     type Color;
    |     ---------- `Vehicle::Color` defined here
@@ -89,8 +89,8 @@ LL |     type Color;
 LL |     type Color;
    |     ---------- `Box::Color` defined here
 ...
-LL | fn dent_object_2<COLOR>(c: dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR {
-   |                                ^^^^^^ associated types `Color` (from trait `Vehicle`), `Color` (from trait `Box`) must be specified
+LL | fn dent_object_2<COLOR>(c: &dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR {
+   |                                 ^^^^^^ associated types `Color` (from trait `Vehicle`), `Color` (from trait `Box`) must be specified
    |
    = help: consider introducing a new type parameter, adding `where` constraints using the fully-qualified path to the associated types
 
diff --git a/tests/ui/associated-types/associated-types-method.rs b/tests/ui/associated-types/associated-types-method.rs
index 45df3ac20c2..6a6456cbbec 100644
--- a/tests/ui/associated-types/associated-types-method.rs
+++ b/tests/ui/associated-types/associated-types-method.rs
@@ -5,7 +5,7 @@
 trait Device {
     type Resources;
 }
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct Foo<D, R>(D, R);
 
 trait Tr {
diff --git a/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr b/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr
index 9ebc45387e8..5443699eb01 100644
--- a/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr
+++ b/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr
@@ -1,4 +1,16 @@
 error[E0277]: the trait bound `(T, U): Get` is not satisfied
+  --> $DIR/associated-types-no-suitable-supertrait.rs:22:5
+   |
+LL |     fn uhoh<U:Get>(&self, foo: U, bar: <(T, U) as Get>::Value) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `(T, U)`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/associated-types-no-suitable-supertrait.rs:12:1
+   |
+LL | trait Get {
+   | ^^^^^^^^^
+
+error[E0277]: the trait bound `(T, U): Get` is not satisfied
   --> $DIR/associated-types-no-suitable-supertrait.rs:22:40
    |
 LL |     fn uhoh<U:Get>(&self, foo: U, bar: <(T, U) as Get>::Value) {}
@@ -21,18 +33,6 @@ help: consider further restricting `Self`
 LL |     fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
    |                                                              +++++++++++++++
 
-error[E0277]: the trait bound `(T, U): Get` is not satisfied
-  --> $DIR/associated-types-no-suitable-supertrait.rs:22:5
-   |
-LL |     fn uhoh<U:Get>(&self, foo: U, bar: <(T, U) as Get>::Value) {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `(T, U)`
-   |
-help: this trait has no implementations, consider adding one
-  --> $DIR/associated-types-no-suitable-supertrait.rs:12:1
-   |
-LL | trait Get {
-   | ^^^^^^^^^
-
 error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/associated-types-struct-field-numbered.rs b/tests/ui/associated-types/associated-types-struct-field-numbered.rs
index 8612911d8f8..b71b71b25f5 100644
--- a/tests/ui/associated-types/associated-types-struct-field-numbered.rs
+++ b/tests/ui/associated-types/associated-types-struct-field-numbered.rs
@@ -9,7 +9,7 @@ pub trait UnifyKey {
     fn dummy(&self) { }
 }
 
-pub struct Node<K:UnifyKey>(#[allow(unused_tuple_struct_fields)] K, K::Value);
+pub struct Node<K:UnifyKey>(#[allow(dead_code)] K, K::Value);
 
 fn foo<K : UnifyKey<Value=Option<V>>,V : Clone>(node: &Node<K>) -> Option<V> {
     node.1.clone()
diff --git a/tests/ui/associated-types/defaults-cyclic-fail-1.rs b/tests/ui/associated-types/defaults-cyclic-fail-1.rs
index 61ef013236e..1ec5faca7c5 100644
--- a/tests/ui/associated-types/defaults-cyclic-fail-1.rs
+++ b/tests/ui/associated-types/defaults-cyclic-fail-1.rs
@@ -24,13 +24,13 @@ impl Tr for u32 {
 // ...but not in an impl that redefines one of the types.
 impl Tr for bool {
     type A = Box<Self::B>;
-    //~^ ERROR overflow evaluating the requirement `<bool as Tr>::B == _`
+    //~^ ERROR overflow evaluating the requirement `<bool as Tr>::A == _`
 }
 // (the error is shown twice for some reason)
 
 impl Tr for usize {
     type B = &'static Self::A;
-    //~^ ERROR overflow evaluating the requirement `<usize as Tr>::A == _`
+    //~^ ERROR overflow evaluating the requirement `<usize as Tr>::B == _`
 }
 
 fn main() {
diff --git a/tests/ui/associated-types/defaults-cyclic-fail-1.stderr b/tests/ui/associated-types/defaults-cyclic-fail-1.stderr
index 008eddcb29d..876fdaec296 100644
--- a/tests/ui/associated-types/defaults-cyclic-fail-1.stderr
+++ b/tests/ui/associated-types/defaults-cyclic-fail-1.stderr
@@ -1,10 +1,10 @@
-error[E0275]: overflow evaluating the requirement `<bool as Tr>::B == _`
+error[E0275]: overflow evaluating the requirement `<bool as Tr>::A == _`
   --> $DIR/defaults-cyclic-fail-1.rs:26:14
    |
 LL |     type A = Box<Self::B>;
    |              ^^^^^^^^^^^^
 
-error[E0275]: overflow evaluating the requirement `<usize as Tr>::A == _`
+error[E0275]: overflow evaluating the requirement `<usize as Tr>::B == _`
   --> $DIR/defaults-cyclic-fail-1.rs:32:14
    |
 LL |     type B = &'static Self::A;
diff --git a/tests/ui/associated-types/defaults-cyclic-fail-2.rs b/tests/ui/associated-types/defaults-cyclic-fail-2.rs
index e91c9f2d29a..bec1bde71a1 100644
--- a/tests/ui/associated-types/defaults-cyclic-fail-2.rs
+++ b/tests/ui/associated-types/defaults-cyclic-fail-2.rs
@@ -25,13 +25,13 @@ impl Tr for u32 {
 
 impl Tr for bool {
     type A = Box<Self::B>;
-    //~^ ERROR overflow evaluating the requirement `<bool as Tr>::B == _`
+    //~^ ERROR overflow evaluating the requirement `<bool as Tr>::A == _`
 }
 // (the error is shown twice for some reason)
 
 impl Tr for usize {
     type B = &'static Self::A;
-    //~^ ERROR overflow evaluating the requirement `<usize as Tr>::A == _`
+    //~^ ERROR overflow evaluating the requirement `<usize as Tr>::B == _`
 }
 
 fn main() {
diff --git a/tests/ui/associated-types/defaults-cyclic-fail-2.stderr b/tests/ui/associated-types/defaults-cyclic-fail-2.stderr
index d0fbab07715..ec0c9973c0a 100644
--- a/tests/ui/associated-types/defaults-cyclic-fail-2.stderr
+++ b/tests/ui/associated-types/defaults-cyclic-fail-2.stderr
@@ -1,10 +1,10 @@
-error[E0275]: overflow evaluating the requirement `<bool as Tr>::B == _`
+error[E0275]: overflow evaluating the requirement `<bool as Tr>::A == _`
   --> $DIR/defaults-cyclic-fail-2.rs:27:14
    |
 LL |     type A = Box<Self::B>;
    |              ^^^^^^^^^^^^
 
-error[E0275]: overflow evaluating the requirement `<usize as Tr>::A == _`
+error[E0275]: overflow evaluating the requirement `<usize as Tr>::B == _`
   --> $DIR/defaults-cyclic-fail-2.rs:33:14
    |
 LL |     type B = &'static Self::A;
diff --git a/tests/ui/associated-types/issue-23595-1.rs b/tests/ui/associated-types/issue-23595-1.rs
index 483c205f42d..9222f5b6650 100644
--- a/tests/ui/associated-types/issue-23595-1.rs
+++ b/tests/ui/associated-types/issue-23595-1.rs
@@ -7,6 +7,7 @@ trait Hierarchy {
     type ChildKey;
     type Children = dyn Index<Self::ChildKey, Output=dyn Hierarchy>;
     //~^ ERROR: the value of the associated types
+    //~| ERROR: the size for values of type
 
     fn data(&self) -> Option<(Self::Value, Self::Children)>;
 }
diff --git a/tests/ui/associated-types/issue-23595-1.stderr b/tests/ui/associated-types/issue-23595-1.stderr
index f9d58c23cbb..46906ab3fb7 100644
--- a/tests/ui/associated-types/issue-23595-1.stderr
+++ b/tests/ui/associated-types/issue-23595-1.stderr
@@ -8,6 +8,20 @@ LL |     type ChildKey;
 LL |     type Children = dyn Index<Self::ChildKey, Output=dyn Hierarchy>;
    |     ------------- `Children` defined here                ^^^^^^^^^ help: specify the associated types: `Hierarchy<Value = Type, ChildKey = Type, Children = Type>`
 
-error: aborting due to 1 previous error
+error[E0277]: the size for values of type `(dyn Index<<Self as Hierarchy>::ChildKey, Output = (dyn Hierarchy + 'static)> + 'static)` cannot be known at compilation time
+  --> $DIR/issue-23595-1.rs:8:21
+   |
+LL |     type Children = dyn Index<Self::ChildKey, Output=dyn Hierarchy>;
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `(dyn Index<<Self as Hierarchy>::ChildKey, Output = (dyn Hierarchy + 'static)> + 'static)`
+note: required by a bound in `Hierarchy::Children`
+  --> $DIR/issue-23595-1.rs:8:5
+   |
+LL |     type Children = dyn Index<Self::ChildKey, Output=dyn Hierarchy>;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Hierarchy::Children`
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0191`.
+Some errors have detailed explanations: E0191, E0277.
+For more information about an error, try `rustc --explain E0191`.
diff --git a/tests/ui/associated-types/issue-25700-1.rs b/tests/ui/associated-types/issue-25700-1.rs
index 5e71a52ba4e..79652dc882b 100644
--- a/tests/ui/associated-types/issue-25700-1.rs
+++ b/tests/ui/associated-types/issue-25700-1.rs
@@ -1,5 +1,5 @@
 // run-pass
-struct S<T: 'static>(#[allow(unused_tuple_struct_fields)] Option<&'static T>);
+struct S<T: 'static>(#[allow(dead_code)] Option<&'static T>);
 
 trait Tr { type Out; }
 impl<T> Tr for T { type Out = T; }
diff --git a/tests/ui/associated-types/issue-25700-2.rs b/tests/ui/associated-types/issue-25700-2.rs
index 89b1db496f9..f745da4a5cb 100644
--- a/tests/ui/associated-types/issue-25700-2.rs
+++ b/tests/ui/associated-types/issue-25700-2.rs
@@ -3,9 +3,9 @@ pub trait Parser {
     type Input;
 }
 
-pub struct Iter<P: Parser>(#[allow(unused_tuple_struct_fields)] P, P::Input);
+pub struct Iter<P: Parser>(#[allow(dead_code)] P, P::Input);
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 pub struct Map<P, F>(P, F);
 impl<P, F> Parser for Map<P, F> where F: FnMut(P) {
     type Input = u8;
diff --git a/tests/ui/associated-types/issue-25700.rs b/tests/ui/associated-types/issue-25700.rs
index e5b9a97523d..a377e37349d 100644
--- a/tests/ui/associated-types/issue-25700.rs
+++ b/tests/ui/associated-types/issue-25700.rs
@@ -1,4 +1,4 @@
-struct S<T: 'static>(#[allow(unused_tuple_struct_fields)] Option<&'static T>);
+struct S<T: 'static>(#[allow(dead_code)] Option<&'static T>);
 
 trait Tr { type Out; }
 impl<T> Tr for T { type Out = T; }
diff --git a/tests/ui/async-await/async-await.rs b/tests/ui/async-await/async-await.rs
index 9cabf16f8bb..63941a79139 100644
--- a/tests/ui/async-await/async-await.rs
+++ b/tests/ui/async-await/async-await.rs
@@ -1,8 +1,7 @@
 // run-pass
 
-// revisions: default nomiropt thirunsafeck
+// revisions: default nomiropt
 //[nomiropt]compile-flags: -Z mir-opt-level=0
-//[thirunsafeck]compile-flags: -Zthir-unsafeck
 
 #![allow(unused)]
 
diff --git a/tests/ui/async-await/async-fn-size-moved-locals.rs b/tests/ui/async-await/async-fn-size-moved-locals.rs
index 79b7239f359..fb64bb6db63 100644
--- a/tests/ui/async-await/async-fn-size-moved-locals.rs
+++ b/tests/ui/async-await/async-fn-size-moved-locals.rs
@@ -17,7 +17,7 @@ use std::pin::Pin;
 use std::task::{Context, Poll};
 
 const BIG_FUT_SIZE: usize = 1024;
-struct BigFut(#[allow(unused_tuple_struct_fields)] [u8; BIG_FUT_SIZE]);
+struct BigFut(#[allow(dead_code)] [u8; BIG_FUT_SIZE]);
 
 impl BigFut {
     fn new() -> Self {
diff --git a/tests/ui/async-await/async-fn-size-uninit-locals.rs b/tests/ui/async-await/async-fn-size-uninit-locals.rs
index 54617269354..fee3e27cfb8 100644
--- a/tests/ui/async-await/async-fn-size-uninit-locals.rs
+++ b/tests/ui/async-await/async-fn-size-uninit-locals.rs
@@ -17,7 +17,7 @@ use std::pin::Pin;
 use std::task::{Context, Poll};
 
 const BIG_FUT_SIZE: usize = 1024;
-struct Big(#[allow(unused_tuple_struct_fields)] [u8; BIG_FUT_SIZE]);
+struct Big(#[allow(dead_code)] [u8; BIG_FUT_SIZE]);
 
 impl Big {
     fn new() -> Self {
diff --git a/tests/ui/async-await/async-unsafe-fn-call-in-safe.mir.stderr b/tests/ui/async-await/async-unsafe-fn-call-in-safe.mir.stderr
deleted file mode 100644
index f9e5bf675cb..00000000000
--- a/tests/ui/async-await/async-unsafe-fn-call-in-safe.mir.stderr
+++ /dev/null
@@ -1,35 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/async-unsafe-fn-call-in-safe.rs:14:5
-   |
-LL |     S::f();
-   |     ^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/async-unsafe-fn-call-in-safe.rs:17:5
-   |
-LL |     f();
-   |     ^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/async-unsafe-fn-call-in-safe.rs:23:5
-   |
-LL |     S::f();
-   |     ^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/async-unsafe-fn-call-in-safe.rs:26:5
-   |
-LL |     f();
-   |     ^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs b/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs
index 14cc0dc614f..7695853000d 100644
--- a/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs
+++ b/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs
@@ -1,6 +1,4 @@
 // edition:2018
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 
 struct S;
 
@@ -12,18 +10,14 @@ async unsafe fn f() {}
 
 async fn g() {
     S::f();
-    //[mir]~^ ERROR call to unsafe function is unsafe
-    //[thir]~^^ ERROR call to unsafe function `S::f` is unsafe
+    //~^ ERROR call to unsafe function `S::f` is unsafe
     f();
-    //[mir]~^ ERROR call to unsafe function is unsafe
-    //[thir]~^^ ERROR call to unsafe function `f` is unsafe
+    //~^ ERROR call to unsafe function `f` is unsafe
 }
 
 fn main() {
     S::f();
-    //[mir]~^ ERROR call to unsafe function is unsafe
-    //[thir]~^^ ERROR call to unsafe function `S::f` is unsafe
+    //~^ ERROR call to unsafe function `S::f` is unsafe
     f();
-    //[mir]~^ ERROR call to unsafe function is unsafe
-    //[thir]~^^ ERROR call to unsafe function `f` is unsafe
+    //~^ ERROR call to unsafe function `f` is unsafe
 }
diff --git a/tests/ui/async-await/async-unsafe-fn-call-in-safe.thir.stderr b/tests/ui/async-await/async-unsafe-fn-call-in-safe.stderr
index ba3303fe793..b25794c0892 100644
--- a/tests/ui/async-await/async-unsafe-fn-call-in-safe.thir.stderr
+++ b/tests/ui/async-await/async-unsafe-fn-call-in-safe.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `S::f` is unsafe and requires unsafe function or block
-  --> $DIR/async-unsafe-fn-call-in-safe.rs:14:5
+  --> $DIR/async-unsafe-fn-call-in-safe.rs:12:5
    |
 LL |     S::f();
    |     ^^^^^^ call to unsafe function
@@ -7,7 +7,7 @@ LL |     S::f();
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function `f` is unsafe and requires unsafe function or block
-  --> $DIR/async-unsafe-fn-call-in-safe.rs:17:5
+  --> $DIR/async-unsafe-fn-call-in-safe.rs:14:5
    |
 LL |     f();
    |     ^^^ call to unsafe function
@@ -15,7 +15,7 @@ LL |     f();
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function `S::f` is unsafe and requires unsafe function or block
-  --> $DIR/async-unsafe-fn-call-in-safe.rs:23:5
+  --> $DIR/async-unsafe-fn-call-in-safe.rs:19:5
    |
 LL |     S::f();
    |     ^^^^^^ call to unsafe function
@@ -23,7 +23,7 @@ LL |     S::f();
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function `f` is unsafe and requires unsafe function or block
-  --> $DIR/async-unsafe-fn-call-in-safe.rs:26:5
+  --> $DIR/async-unsafe-fn-call-in-safe.rs:21:5
    |
 LL |     f();
    |     ^^^ call to unsafe function
diff --git a/tests/ui/async-await/in-trait/async-recursive-generic.rs b/tests/ui/async-await/in-trait/async-recursive-generic.rs
index c6031ce28d1..33eb2b2de13 100644
--- a/tests/ui/async-await/in-trait/async-recursive-generic.rs
+++ b/tests/ui/async-await/in-trait/async-recursive-generic.rs
@@ -6,7 +6,7 @@ trait MyTrait<T> {
 
 impl<T> MyTrait<T> for T where T: Copy {
     async fn foo_recursive(&self, n: usize) -> T {
-        //~^ ERROR recursion in an `async fn` requires boxing
+        //~^ ERROR recursion in an async fn requires boxing
         if n > 0 {
             self.foo_recursive(n - 1).await
         } else {
diff --git a/tests/ui/async-await/in-trait/async-recursive-generic.stderr b/tests/ui/async-await/in-trait/async-recursive-generic.stderr
index 11489c18ad4..d085747bc4b 100644
--- a/tests/ui/async-await/in-trait/async-recursive-generic.stderr
+++ b/tests/ui/async-await/in-trait/async-recursive-generic.stderr
@@ -1,11 +1,13 @@
-error[E0733]: recursion in an `async fn` requires boxing
+error[E0733]: recursion in an async fn requires boxing
   --> $DIR/async-recursive-generic.rs:8:5
    |
 LL |     async fn foo_recursive(&self, n: usize) -> T {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive `async fn`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |             self.foo_recursive(n - 1).await
+   |             ------------------------------- recursive call here
    |
-   = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
-   = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
+   = note: a recursive `async fn` call must introduce indirection such as `Box::pin` to avoid an infinitely sized future
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/async-await/in-trait/async-recursive.rs b/tests/ui/async-await/in-trait/async-recursive.rs
index 09f1ffe499e..2534c43413e 100644
--- a/tests/ui/async-await/in-trait/async-recursive.rs
+++ b/tests/ui/async-await/in-trait/async-recursive.rs
@@ -6,7 +6,7 @@ trait MyTrait {
 
 impl MyTrait for i32 {
     async fn foo_recursive(&self, n: usize) -> i32 {
-        //~^ ERROR recursion in an `async fn` requires boxing
+        //~^ ERROR recursion in an async fn requires boxing
         if n > 0 {
             self.foo_recursive(n - 1).await
         } else {
diff --git a/tests/ui/async-await/in-trait/async-recursive.stderr b/tests/ui/async-await/in-trait/async-recursive.stderr
index 58796285726..25ebc6e77c4 100644
--- a/tests/ui/async-await/in-trait/async-recursive.stderr
+++ b/tests/ui/async-await/in-trait/async-recursive.stderr
@@ -1,11 +1,13 @@
-error[E0733]: recursion in an `async fn` requires boxing
+error[E0733]: recursion in an async fn requires boxing
   --> $DIR/async-recursive.rs:8:5
    |
 LL |     async fn foo_recursive(&self, n: usize) -> i32 {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive `async fn`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |             self.foo_recursive(n - 1).await
+   |             ------------------------------- recursive call here
    |
-   = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
-   = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
+   = note: a recursive `async fn` call must introduce indirection such as `Box::pin` to avoid an infinitely sized future
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs
index 8443cbcf4ac..4b615343a05 100644
--- a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs
+++ b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.rs
@@ -1,6 +1,7 @@
 // edition: 2021
+
+// Test doesn't fail until monomorphization time, unfortunately.
 // build-fail
-//~^^ ERROR cycle detected when computing layout of
 
 fn main() {
     let _ = async {
@@ -31,6 +32,7 @@ where
     C: First,
 {
     async fn second(self) {
+        //~^ ERROR recursion in an async fn requires boxing
         self.first().await.second().await;
     }
 }
diff --git a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr
index 8e573b512ad..8126c6e1394 100644
--- a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr
+++ b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr
@@ -1,12 +1,11 @@
-error[E0391]: cycle detected when computing layout of `core::mem::maybe_uninit::MaybeUninit<{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}>`
+error[E0733]: recursion in an async fn requires boxing
+  --> $DIR/indirect-recursion-issue-112047.rs:34:5
    |
-   = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}>`...
-   = note: ...which requires computing layout of `{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}`...
-   = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<<<A as First>::Second as Second>::{opaque#0}>`...
-   = note: ...which again requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}>`, completing the cycle
-   = note: cycle used when computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:6:13: 8:6}`
-   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
+LL |     async fn second(self) {
+   |     ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: a recursive `async fn` call must introduce indirection such as `Box::pin` to avoid an infinitely sized future
 
 error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0391`.
+For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/async-await/issue-66312.stderr b/tests/ui/async-await/issue-66312.stderr
index dad5807cb50..2875af8a97e 100644
--- a/tests/ui/async-await/issue-66312.stderr
+++ b/tests/ui/async-await/issue-66312.stderr
@@ -1,3 +1,9 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-66312.rs:9:8
+   |
+LL |     if x.is_some() {
+   |        ^^^^^^^^^^^ expected `bool`, found `()`
+
 error[E0307]: invalid `self` parameter type: T
   --> $DIR/issue-66312.rs:4:22
    |
@@ -7,12 +13,6 @@ LL |     fn is_some(self: T);
    = note: type of `self` must be `Self` or a type that dereferences to it
    = help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
 
-error[E0308]: mismatched types
-  --> $DIR/issue-66312.rs:9:8
-   |
-LL |     if x.is_some() {
-   |        ^^^^^^^^^^^ expected `bool`, found `()`
-
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0307, E0308.
diff --git a/tests/ui/async-await/issues/issue-65159.rs b/tests/ui/async-await/issues/issue-65159.rs
index 6e547508bd4..aed111e2144 100644
--- a/tests/ui/async-await/issues/issue-65159.rs
+++ b/tests/ui/async-await/issues/issue-65159.rs
@@ -5,7 +5,7 @@
 async fn copy() -> Result<()>
 //~^ ERROR enum takes 2 generic arguments
 {
-    Ok(())
+    Ok(()) //~ ERROR: type annotations needed
 }
 
 fn main() { }
diff --git a/tests/ui/async-await/issues/issue-65159.stderr b/tests/ui/async-await/issues/issue-65159.stderr
index 19512116a66..77a0ea5027c 100644
--- a/tests/ui/async-await/issues/issue-65159.stderr
+++ b/tests/ui/async-await/issues/issue-65159.stderr
@@ -11,6 +11,18 @@ help: add missing generic argument
 LL | async fn copy() -> Result<(), E>
    |                             +++
 
-error: aborting due to 1 previous error
+error[E0282]: type annotations needed
+  --> $DIR/issue-65159.rs:8:5
+   |
+LL |     Ok(())
+   |     ^^ cannot infer type of the type parameter `E` declared on the enum `Result`
+   |
+help: consider specifying the generic arguments
+   |
+LL |     Ok::<(), E>(())
+   |       +++++++++
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0107, E0282.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs b/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs
index bb2a61f03ce..fedc814b041 100644
--- a/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs
+++ b/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs
@@ -2,11 +2,11 @@
 // Test that impl trait does not allow creating recursive types that are
 // otherwise forbidden when using `async` and `await`.
 
-async fn rec_1() { //~ ERROR recursion in an `async fn`
+async fn rec_1() { //~ ERROR recursion in an async fn
     rec_2().await;
 }
 
-async fn rec_2() { //~ ERROR recursion in an `async fn`
+async fn rec_2() {
     rec_1().await;
 }
 
diff --git a/tests/ui/async-await/mutually-recursive-async-impl-trait-type.stderr b/tests/ui/async-await/mutually-recursive-async-impl-trait-type.stderr
index 9442609e805..52fb41be1fb 100644
--- a/tests/ui/async-await/mutually-recursive-async-impl-trait-type.stderr
+++ b/tests/ui/async-await/mutually-recursive-async-impl-trait-type.stderr
@@ -1,21 +1,20 @@
-error[E0733]: recursion in an `async fn` requires boxing
+error[E0733]: recursion in an async fn requires boxing
   --> $DIR/mutually-recursive-async-impl-trait-type.rs:5:1
    |
 LL | async fn rec_1() {
-   | ^^^^^^^^^^^^^^^^ recursive `async fn`
+   | ^^^^^^^^^^^^^^^^
+LL |     rec_2().await;
+   |     ------------- recursive call here
    |
-   = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
-   = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
-
-error[E0733]: recursion in an `async fn` requires boxing
+note: which leads to this async fn
   --> $DIR/mutually-recursive-async-impl-trait-type.rs:9:1
    |
 LL | async fn rec_2() {
-   | ^^^^^^^^^^^^^^^^ recursive `async fn`
-   |
-   = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
-   = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
+   | ^^^^^^^^^^^^^^^^
+LL |     rec_1().await;
+   |     ------------- ...leading to this recursive call
+   = note: a recursive `async fn` call must introduce indirection such as `Box::pin` to avoid an infinitely sized future
 
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/async-await/pin-needed-to-poll-2.stderr b/tests/ui/async-await/pin-needed-to-poll-2.stderr
index 9c1ad32cc2c..8eb671531e7 100644
--- a/tests/ui/async-await/pin-needed-to-poll-2.stderr
+++ b/tests/ui/async-await/pin-needed-to-poll-2.stderr
@@ -13,7 +13,7 @@ note: required because it appears within the type `Sleep`
    |
 LL | struct Sleep(std::marker::PhantomPinned);
    |        ^^^^^
-note: required by a bound in `Pin::<P>::new`
+note: required by a bound in `Pin::<Ptr>::new`
   --> $SRC_DIR/core/src/pin.rs:LL:COL
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/async-await/recursive-async-impl-trait-type.rs b/tests/ui/async-await/recursive-async-impl-trait-type.rs
index edc4cb8ac5d..9351ee53f07 100644
--- a/tests/ui/async-await/recursive-async-impl-trait-type.rs
+++ b/tests/ui/async-await/recursive-async-impl-trait-type.rs
@@ -3,7 +3,7 @@
 // otherwise forbidden when using `async` and `await`.
 
 async fn recursive_async_function() -> () {
-    //~^ ERROR recursion in an `async fn` requires boxing
+    //~^ ERROR recursion in an async fn requires boxing
     recursive_async_function().await;
 }
 
diff --git a/tests/ui/async-await/recursive-async-impl-trait-type.stderr b/tests/ui/async-await/recursive-async-impl-trait-type.stderr
index 969258f84ed..5475469335f 100644
--- a/tests/ui/async-await/recursive-async-impl-trait-type.stderr
+++ b/tests/ui/async-await/recursive-async-impl-trait-type.stderr
@@ -1,11 +1,13 @@
-error[E0733]: recursion in an `async fn` requires boxing
+error[E0733]: recursion in an async fn requires boxing
   --> $DIR/recursive-async-impl-trait-type.rs:5:1
    |
 LL | async fn recursive_async_function() -> () {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive `async fn`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |
+LL |     recursive_async_function().await;
+   |     -------------------------------- recursive call here
    |
-   = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
-   = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
+   = note: a recursive `async fn` call must introduce indirection such as `Box::pin` to avoid an infinitely sized future
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.rs b/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.rs
index 1b16a492a7a..68a750778ad 100644
--- a/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.rs
+++ b/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.rs
@@ -9,5 +9,6 @@ trait Super1<'a> {
 
 impl Super1<'_, bar(): Send> for () {}
 //~^ ERROR associated type bindings are not allowed here
+//~| ERROR not all trait items implemented
 
 fn main() {}
diff --git a/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr b/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr
index 4321d876e16..d925c7316b6 100644
--- a/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr
+++ b/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr
@@ -13,6 +13,16 @@ error[E0229]: associated type bindings are not allowed here
 LL | impl Super1<'_, bar(): Send> for () {}
    |                 ^^^^^^^^^^^ associated type not allowed here
 
-error: aborting due to 1 previous error; 1 warning emitted
+error[E0046]: not all trait items implemented, missing: `bar`
+  --> $DIR/rtn-in-impl-signature.rs:10:1
+   |
+LL |     fn bar<'b>() -> bool;
+   |     --------------------- `bar` from trait
+...
+LL | impl Super1<'_, bar(): Send> for () {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation
+
+error: aborting due to 2 previous errors; 1 warning emitted
 
-For more information about this error, try `rustc --explain E0229`.
+Some errors have detailed explanations: E0046, E0229.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/async-await/track-caller/async-closure-gate.afn.stderr b/tests/ui/async-await/track-caller/async-closure-gate.afn.stderr
index 739c04a7673..e23fc459358 100644
--- a/tests/ui/async-await/track-caller/async-closure-gate.afn.stderr
+++ b/tests/ui/async-await/track-caller/async-closure-gate.afn.stderr
@@ -26,7 +26,7 @@ LL |     let _ = #[track_caller] || {
    = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
 
 error[E0658]: `#[track_caller]` on closures is currently unstable
-  --> $DIR/async-closure-gate.rs:28:17
+  --> $DIR/async-closure-gate.rs:29:17
    |
 LL |         let _ = #[track_caller] || {
    |                 ^^^^^^^^^^^^^^^
@@ -35,7 +35,7 @@ LL |         let _ = #[track_caller] || {
    = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
 
 error[E0658]: `#[track_caller]` on closures is currently unstable
-  --> $DIR/async-closure-gate.rs:36:9
+  --> $DIR/async-closure-gate.rs:37:9
    |
 LL |         #[track_caller] || {
    |         ^^^^^^^^^^^^^^^
@@ -44,7 +44,7 @@ LL |         #[track_caller] || {
    = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
 
 error[E0658]: `#[track_caller]` on closures is currently unstable
-  --> $DIR/async-closure-gate.rs:45:13
+  --> $DIR/async-closure-gate.rs:47:13
    |
 LL |             #[track_caller] || {
    |             ^^^^^^^^^^^^^^^
@@ -52,6 +52,40 @@ LL |             #[track_caller] || {
    = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
    = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
 
-error: aborting due to 6 previous errors
+error[E0308]: mismatched types
+  --> $DIR/async-closure-gate.rs:27:5
+   |
+LL |   fn foo3() {
+   |            - help: a return type might be missing here: `-> _`
+LL | /     async {
+LL | |
+LL | |         let _ = #[track_caller] || {
+LL | |
+LL | |         };
+LL | |     }
+   | |_____^ expected `()`, found `async` block
+   |
+   = note:  expected unit type `()`
+           found `async` block `{async block@$DIR/async-closure-gate.rs:27:5: 32:6}`
+
+error[E0308]: mismatched types
+  --> $DIR/async-closure-gate.rs:44:5
+   |
+LL |   fn foo5() {
+   |            - help: a return type might be missing here: `-> _`
+LL | /     async {
+LL | |
+LL | |         let _ = || {
+LL | |             #[track_caller] || {
+...  |
+LL | |         };
+LL | |     }
+   | |_____^ expected `()`, found `async` block
+   |
+   = note:  expected unit type `()`
+           found `async` block `{async block@$DIR/async-closure-gate.rs:44:5: 51:6}`
+
+error: aborting due to 8 previous errors
 
-For more information about this error, try `rustc --explain E0658`.
+Some errors have detailed explanations: E0308, E0658.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr b/tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr
index 739c04a7673..e23fc459358 100644
--- a/tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr
+++ b/tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr
@@ -26,7 +26,7 @@ LL |     let _ = #[track_caller] || {
    = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
 
 error[E0658]: `#[track_caller]` on closures is currently unstable
-  --> $DIR/async-closure-gate.rs:28:17
+  --> $DIR/async-closure-gate.rs:29:17
    |
 LL |         let _ = #[track_caller] || {
    |                 ^^^^^^^^^^^^^^^
@@ -35,7 +35,7 @@ LL |         let _ = #[track_caller] || {
    = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
 
 error[E0658]: `#[track_caller]` on closures is currently unstable
-  --> $DIR/async-closure-gate.rs:36:9
+  --> $DIR/async-closure-gate.rs:37:9
    |
 LL |         #[track_caller] || {
    |         ^^^^^^^^^^^^^^^
@@ -44,7 +44,7 @@ LL |         #[track_caller] || {
    = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
 
 error[E0658]: `#[track_caller]` on closures is currently unstable
-  --> $DIR/async-closure-gate.rs:45:13
+  --> $DIR/async-closure-gate.rs:47:13
    |
 LL |             #[track_caller] || {
    |             ^^^^^^^^^^^^^^^
@@ -52,6 +52,40 @@ LL |             #[track_caller] || {
    = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
    = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
 
-error: aborting due to 6 previous errors
+error[E0308]: mismatched types
+  --> $DIR/async-closure-gate.rs:27:5
+   |
+LL |   fn foo3() {
+   |            - help: a return type might be missing here: `-> _`
+LL | /     async {
+LL | |
+LL | |         let _ = #[track_caller] || {
+LL | |
+LL | |         };
+LL | |     }
+   | |_____^ expected `()`, found `async` block
+   |
+   = note:  expected unit type `()`
+           found `async` block `{async block@$DIR/async-closure-gate.rs:27:5: 32:6}`
+
+error[E0308]: mismatched types
+  --> $DIR/async-closure-gate.rs:44:5
+   |
+LL |   fn foo5() {
+   |            - help: a return type might be missing here: `-> _`
+LL | /     async {
+LL | |
+LL | |         let _ = || {
+LL | |             #[track_caller] || {
+...  |
+LL | |         };
+LL | |     }
+   | |_____^ expected `()`, found `async` block
+   |
+   = note:  expected unit type `()`
+           found `async` block `{async block@$DIR/async-closure-gate.rs:44:5: 51:6}`
+
+error: aborting due to 8 previous errors
 
-For more information about this error, try `rustc --explain E0658`.
+Some errors have detailed explanations: E0308, E0658.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/async-await/track-caller/async-closure-gate.rs b/tests/ui/async-await/track-caller/async-closure-gate.rs
index 8d8d081aa90..911934a2232 100644
--- a/tests/ui/async-await/track-caller/async-closure-gate.rs
+++ b/tests/ui/async-await/track-caller/async-closure-gate.rs
@@ -25,6 +25,7 @@ async fn foo2() {
 
 fn foo3() {
     async {
+        //~^ ERROR mismatched types
         let _ = #[track_caller] || {
             //~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
         };
@@ -41,6 +42,7 @@ async fn foo4() {
 
 fn foo5() {
     async {
+        //~^ ERROR mismatched types
         let _ = || {
             #[track_caller] || {
                 //~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
diff --git a/tests/ui/auto-traits/auto-traits.rs b/tests/ui/auto-traits/auto-traits.rs
index 7b52d9c176e..6d8e1a52ec1 100644
--- a/tests/ui/auto-traits/auto-traits.rs
+++ b/tests/ui/auto-traits/auto-traits.rs
@@ -9,7 +9,7 @@ unsafe auto trait AutoUnsafe {}
 impl !Auto for bool {}
 impl !AutoUnsafe for bool {}
 
-struct AutoBool(#[allow(unused_tuple_struct_fields)] bool);
+struct AutoBool(#[allow(dead_code)] bool);
 
 impl Auto for AutoBool {}
 unsafe impl AutoUnsafe for AutoBool {}
diff --git a/tests/ui/bench/issue-32062.rs b/tests/ui/bench/issue-32062.rs
index 7eb52196e16..99b8b7c6012 100644
--- a/tests/ui/bench/issue-32062.rs
+++ b/tests/ui/bench/issue-32062.rs
@@ -15,7 +15,7 @@ trait Parser {
     }
 }
 
-struct Token<T>(#[allow(unused_tuple_struct_fields)] T::Item) where T: Iterator;
+struct Token<T>(#[allow(dead_code)] T::Item) where T: Iterator;
 
 impl<T> Parser for Token<T> where T: Iterator {
     type Input = T;
@@ -25,7 +25,7 @@ impl<T> Parser for Token<T> where T: Iterator {
     }
 }
 
-struct Chain<L, R>(#[allow(unused_tuple_struct_fields)] L, #[allow(unused_tuple_struct_fields)] R);
+struct Chain<L, R>(#[allow(dead_code)] L, #[allow(dead_code)] R);
 
 impl<L, R> Parser for Chain<L, R> where L: Parser, R: Parser<Input = L::Input> {
     type Input = L::Input;
diff --git a/tests/ui/binding/issue-53114-safety-checks.stderr b/tests/ui/binding/issue-53114-safety-checks.stderr
index 349c4639a9e..b7d805d9171 100644
--- a/tests/ui/binding/issue-53114-safety-checks.stderr
+++ b/tests/ui/binding/issue-53114-safety-checks.stderr
@@ -1,63 +1,3 @@
-error[E0793]: reference to packed field is unaligned
-  --> $DIR/issue-53114-safety-checks.rs:23:13
-   |
-LL |     let _ = &p.b;
-   |             ^^^^
-   |
-   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
-   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
-   = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
-
-error[E0793]: reference to packed field is unaligned
-  --> $DIR/issue-53114-safety-checks.rs:28:17
-   |
-LL |     let (_,) = (&p.b,);
-   |                 ^^^^
-   |
-   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
-   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
-   = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
-
-error[E0793]: reference to packed field is unaligned
-  --> $DIR/issue-53114-safety-checks.rs:37:16
-   |
-LL |     let _: _ = &p.b;
-   |                ^^^^
-   |
-   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
-   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
-   = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
-
-error[E0793]: reference to packed field is unaligned
-  --> $DIR/issue-53114-safety-checks.rs:42:20
-   |
-LL |     let (_,): _ = (&p.b,);
-   |                    ^^^^
-   |
-   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
-   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
-   = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
-
-error[E0793]: reference to packed field is unaligned
-  --> $DIR/issue-53114-safety-checks.rs:51:11
-   |
-LL |     match &p.b  { _ => { } }
-   |           ^^^^
-   |
-   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
-   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
-   = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
-
-error[E0793]: reference to packed field is unaligned
-  --> $DIR/issue-53114-safety-checks.rs:56:12
-   |
-LL |     match (&p.b,)  { (_,) => { } }
-   |            ^^^^
-   |
-   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
-   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
-   = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
-
 error[E0133]: access to union field is unsafe and requires unsafe function or block
   --> $DIR/issue-53114-safety-checks.rs:24:13
    |
@@ -67,10 +7,10 @@ LL |     let _ = u1.a;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/issue-53114-safety-checks.rs:25:13
+  --> $DIR/issue-53114-safety-checks.rs:25:14
    |
 LL |     let _ = &u2.a;
-   |             ^^^^^ access to union field
+   |              ^^^^ access to union field
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
@@ -83,13 +23,33 @@ LL |     let (_,) = (u1.a,);
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/issue-53114-safety-checks.rs:30:17
+  --> $DIR/issue-53114-safety-checks.rs:30:18
    |
 LL |     let (_,) = (&u2.a,);
-   |                 ^^^^^ access to union field
+   |                  ^^^^ access to union field
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
+error[E0793]: reference to packed field is unaligned
+  --> $DIR/issue-53114-safety-checks.rs:23:13
+   |
+LL |     let _ = &p.b;
+   |             ^^^^
+   |
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
+
+error[E0793]: reference to packed field is unaligned
+  --> $DIR/issue-53114-safety-checks.rs:28:17
+   |
+LL |     let (_,) = (&p.b,);
+   |                 ^^^^
+   |
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
+
 error[E0133]: access to union field is unsafe and requires unsafe function or block
   --> $DIR/issue-53114-safety-checks.rs:38:16
    |
@@ -99,10 +59,10 @@ LL |     let _: _ = u1.a;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/issue-53114-safety-checks.rs:39:16
+  --> $DIR/issue-53114-safety-checks.rs:39:17
    |
 LL |     let _: _ = &u2.a;
-   |                ^^^^^ access to union field
+   |                 ^^^^ access to union field
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
@@ -115,13 +75,33 @@ LL |     let (_,): _ = (u1.a,);
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/issue-53114-safety-checks.rs:44:20
+  --> $DIR/issue-53114-safety-checks.rs:44:21
    |
 LL |     let (_,): _ = (&u2.a,);
-   |                    ^^^^^ access to union field
+   |                     ^^^^ access to union field
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
+error[E0793]: reference to packed field is unaligned
+  --> $DIR/issue-53114-safety-checks.rs:37:16
+   |
+LL |     let _: _ = &p.b;
+   |                ^^^^
+   |
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
+
+error[E0793]: reference to packed field is unaligned
+  --> $DIR/issue-53114-safety-checks.rs:42:20
+   |
+LL |     let (_,): _ = (&p.b,);
+   |                    ^^^^
+   |
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
+
 error[E0133]: access to union field is unsafe and requires unsafe function or block
   --> $DIR/issue-53114-safety-checks.rs:52:11
    |
@@ -131,10 +111,10 @@ LL |     match u1.a  { _ => { } }
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/issue-53114-safety-checks.rs:53:11
+  --> $DIR/issue-53114-safety-checks.rs:53:12
    |
 LL |     match &u2.a { _ => { } }
-   |           ^^^^^ access to union field
+   |            ^^^^ access to union field
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
@@ -147,13 +127,33 @@ LL |     match (u1.a,)  { (_,) => { } }
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/issue-53114-safety-checks.rs:58:12
+  --> $DIR/issue-53114-safety-checks.rs:58:13
    |
 LL |     match (&u2.a,) { (_,) => { } }
-   |            ^^^^^ access to union field
+   |             ^^^^ access to union field
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
+error[E0793]: reference to packed field is unaligned
+  --> $DIR/issue-53114-safety-checks.rs:51:11
+   |
+LL |     match &p.b  { _ => { } }
+   |           ^^^^
+   |
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
+
+error[E0793]: reference to packed field is unaligned
+  --> $DIR/issue-53114-safety-checks.rs:56:12
+   |
+LL |     match (&p.b,)  { (_,) => { } }
+   |            ^^^^
+   |
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
+
 error: aborting due to 18 previous errors
 
 Some errors have detailed explanations: E0133, E0793.
diff --git a/tests/ui/binding/match-tag.rs b/tests/ui/binding/match-tag.rs
index 407716aa28a..6914a1c6b6d 100644
--- a/tests/ui/binding/match-tag.rs
+++ b/tests/ui/binding/match-tag.rs
@@ -3,7 +3,7 @@
 #![allow(non_camel_case_types)]
 
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 enum color {
     rgb(isize, isize, isize),
     rgba(isize, isize, isize, isize),
diff --git a/tests/ui/binding/or-pattern.rs b/tests/ui/binding/or-pattern.rs
index 47623a3d722..07559e414dc 100644
--- a/tests/ui/binding/or-pattern.rs
+++ b/tests/ui/binding/or-pattern.rs
@@ -1,7 +1,7 @@
 // run-pass
 #![allow(non_camel_case_types)]
 
-enum blah { a(isize, isize, #[allow(unused_tuple_struct_fields)] usize), b(isize, isize), c, }
+enum blah { a(isize, isize, #[allow(dead_code)] usize), b(isize, isize), c, }
 
 fn or_alt(q: blah) -> isize {
     match q { blah::a(x, y, _) | blah::b(x, y) => { return x + y; } blah::c => { return 0; } }
diff --git a/tests/ui/binding/simple-generic-match.rs b/tests/ui/binding/simple-generic-match.rs
index 2cf050d011d..acac32b8231 100644
--- a/tests/ui/binding/simple-generic-match.rs
+++ b/tests/ui/binding/simple-generic-match.rs
@@ -3,6 +3,6 @@
 
 // pretty-expanded FIXME #23616
 
-enum clam<T> { a(#[allow(unused_tuple_struct_fields)] T), }
+enum clam<T> { a(#[allow(dead_code)] T), }
 
 pub fn main() { let c = clam::a(2); match c { clam::a::<isize>(_) => { } } }
diff --git a/tests/ui/binop/binary-op-suggest-deref.stderr b/tests/ui/binop/binary-op-suggest-deref.stderr
index f5de64e3ab1..68b5a24bf97 100644
--- a/tests/ui/binop/binary-op-suggest-deref.stderr
+++ b/tests/ui/binop/binary-op-suggest-deref.stderr
@@ -270,11 +270,6 @@ note: an implementation of `PartialEq<&&{integer}>` might be missing for `Foo`
    |
 LL |     struct Foo;
    |     ^^^^^^^^^^ must implement `PartialEq<&&{integer}>`
-help: consider annotating `Foo` with `#[derive(PartialEq)]`
-   |
-LL +     #[derive(PartialEq)]
-LL |     struct Foo;
-   |
 
 error[E0277]: can't compare `&String` with `str`
   --> $DIR/binary-op-suggest-deref.rs:69:20
diff --git a/tests/ui/borrowck/borrowck-access-permissions.rs b/tests/ui/borrowck/borrowck-access-permissions.rs
index 469ad508b0e..1638644103b 100644
--- a/tests/ui/borrowck/borrowck-access-permissions.rs
+++ b/tests/ui/borrowck/borrowck-access-permissions.rs
@@ -1,21 +1,27 @@
-static static_x : i32 = 1;
-static mut static_x_mut : i32 = 1;
+static static_x: i32 = 1;
+static mut static_x_mut: i32 = 1;
 
 fn main() {
     let x = 1;
     let mut x_mut = 1;
 
-    { // borrow of local
+    {
+        // borrow of local
         let _y1 = &mut x; //~ ERROR [E0596]
         let _y2 = &mut x_mut; // No error
     }
 
-    { // borrow of static
+    {
+        // borrow of static
         let _y1 = &mut static_x; //~ ERROR [E0596]
-        unsafe { let _y2 = &mut static_x_mut; } // No error
+        unsafe {
+            let _y2 = &mut static_x_mut;
+            //~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
+        }
     }
 
-    { // borrow of deref to box
+    {
+        // borrow of deref to box
         let box_x = Box::new(1);
         let mut box_x_mut = Box::new(1);
 
@@ -23,7 +29,8 @@ fn main() {
         let _y2 = &mut *box_x_mut; // No error
     }
 
-    { // borrow of deref to reference
+    {
+        // borrow of deref to reference
         let ref_x = &x;
         let ref_x_mut = &mut x_mut;
 
@@ -31,9 +38,10 @@ fn main() {
         let _y2 = &mut *ref_x_mut; // No error
     }
 
-    { // borrow of deref to pointer
-        let ptr_x : *const _ = &x;
-        let ptr_mut_x : *mut _ = &mut x_mut;
+    {
+        // borrow of deref to pointer
+        let ptr_x: *const _ = &x;
+        let ptr_mut_x: *mut _ = &mut x_mut;
 
         unsafe {
             let _y1 = &mut *ptr_x; //~ ERROR [E0596]
@@ -41,8 +49,12 @@ fn main() {
         }
     }
 
-    { // borrowing mutably through an immutable reference
-        struct Foo<'a> { f: &'a mut i32, g: &'a i32 };
+    {
+        // borrowing mutably through an immutable reference
+        struct Foo<'a> {
+            f: &'a mut i32,
+            g: &'a i32,
+        };
         let mut foo = Foo { f: &mut x_mut, g: &x };
         let foo_ref = &foo;
         let _y = &mut *foo_ref.f; //~ ERROR [E0596]
diff --git a/tests/ui/borrowck/borrowck-access-permissions.stderr b/tests/ui/borrowck/borrowck-access-permissions.stderr
index c161e2d95b4..93d92295dd9 100644
--- a/tests/ui/borrowck/borrowck-access-permissions.stderr
+++ b/tests/ui/borrowck/borrowck-access-permissions.stderr
@@ -1,5 +1,20 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/borrowck-access-permissions.rs:18:23
+   |
+LL |             let _y2 = &mut static_x_mut;
+   |                       ^^^^^^^^^^^^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |             let _y2 = addr_of_mut!(static_x_mut);
+   |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
-  --> $DIR/borrowck-access-permissions.rs:9:19
+  --> $DIR/borrowck-access-permissions.rs:10:19
    |
 LL |         let _y1 = &mut x;
    |                   ^^^^^^ cannot borrow as mutable
@@ -10,13 +25,13 @@ LL |     let mut x = 1;
    |         +++
 
 error[E0596]: cannot borrow immutable static item `static_x` as mutable
-  --> $DIR/borrowck-access-permissions.rs:14:19
+  --> $DIR/borrowck-access-permissions.rs:16:19
    |
 LL |         let _y1 = &mut static_x;
    |                   ^^^^^^^^^^^^^ cannot borrow as mutable
 
 error[E0596]: cannot borrow `*box_x` as mutable, as `box_x` is not declared as mutable
-  --> $DIR/borrowck-access-permissions.rs:22:19
+  --> $DIR/borrowck-access-permissions.rs:28:19
    |
 LL |         let _y1 = &mut *box_x;
    |                   ^^^^^^^^^^^ cannot borrow as mutable
@@ -27,7 +42,7 @@ LL |         let mut box_x = Box::new(1);
    |             +++
 
 error[E0596]: cannot borrow `*ref_x` as mutable, as it is behind a `&` reference
-  --> $DIR/borrowck-access-permissions.rs:30:19
+  --> $DIR/borrowck-access-permissions.rs:37:19
    |
 LL |         let _y1 = &mut *ref_x;
    |                   ^^^^^^^^^^^ `ref_x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
@@ -38,18 +53,18 @@ LL |         let ref_x = &mut x;
    |                      +++
 
 error[E0596]: cannot borrow `*ptr_x` as mutable, as it is behind a `*const` pointer
-  --> $DIR/borrowck-access-permissions.rs:39:23
+  --> $DIR/borrowck-access-permissions.rs:47:23
    |
 LL |             let _y1 = &mut *ptr_x;
    |                       ^^^^^^^^^^^ `ptr_x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable
    |
 help: consider changing this to be a mutable pointer
    |
-LL |         let ptr_x : *const _ = &mut x;
-   |                                 +++
+LL |         let ptr_x: *const _ = &mut x;
+   |                                +++
 
 error[E0596]: cannot borrow `*foo_ref.f` as mutable, as it is behind a `&` reference
-  --> $DIR/borrowck-access-permissions.rs:48:18
+  --> $DIR/borrowck-access-permissions.rs:60:18
    |
 LL |         let _y = &mut *foo_ref.f;
    |                  ^^^^^^^^^^^^^^^ `foo_ref` is a `&` reference, so the data it refers to cannot be borrowed as mutable
@@ -59,6 +74,6 @@ help: consider changing this to be a mutable reference
 LL |         let foo_ref = &mut foo;
    |                        +++
 
-error: aborting due to 6 previous errors
+error: aborting due to 6 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs b/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs
index adc7dfd541f..1bf079e24ca 100644
--- a/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs
+++ b/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.rs
@@ -2,17 +2,22 @@
 
 // Test file taken from issue 45129 (https://github.com/rust-lang/rust/issues/45129)
 
-struct Foo { x: [usize; 2] }
+struct Foo {
+    x: [usize; 2],
+}
 
 static mut SFOO: Foo = Foo { x: [23, 32] };
 
 impl Foo {
-    fn x(&mut self) -> &mut usize { &mut self.x[0] }
+    fn x(&mut self) -> &mut usize {
+        &mut self.x[0]
+    }
 }
 
 fn main() {
     unsafe {
         let sfoo: *mut Foo = &mut SFOO;
+        //~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
         let x = (*sfoo).x();
         (*sfoo).x[1] += 1;
         *x += 1;
diff --git a/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.stderr b/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.stderr
new file mode 100644
index 00000000000..7a3824f79a4
--- /dev/null
+++ b/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.stderr
@@ -0,0 +1,17 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/borrowck-unsafe-static-mutable-borrows.rs:19:30
+   |
+LL |         let sfoo: *mut Foo = &mut SFOO;
+   |                              ^^^^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |         let sfoo: *mut Foo = addr_of_mut!(SFOO);
+   |                              ~~~~~~~~~~~~~~~~~~
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/borrowck/issue-20801.rs b/tests/ui/borrowck/issue-20801.rs
index c3f136f2876..ec83af5d5df 100644
--- a/tests/ui/borrowck/issue-20801.rs
+++ b/tests/ui/borrowck/issue-20801.rs
@@ -12,6 +12,7 @@ fn imm_ref() -> &'static T {
 
 fn mut_ref() -> &'static mut T {
     unsafe { &mut GLOBAL_MUT_T }
+    //~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
 }
 
 fn mut_ptr() -> *mut T {
diff --git a/tests/ui/borrowck/issue-20801.stderr b/tests/ui/borrowck/issue-20801.stderr
index 215bf010063..b2bee2d8803 100644
--- a/tests/ui/borrowck/issue-20801.stderr
+++ b/tests/ui/borrowck/issue-20801.stderr
@@ -1,5 +1,20 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/issue-20801.rs:14:14
+   |
+LL |     unsafe { &mut GLOBAL_MUT_T }
+   |              ^^^^^^^^^^^^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |     unsafe { addr_of_mut!(GLOBAL_MUT_T) }
+   |              ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 error[E0507]: cannot move out of a mutable reference
-  --> $DIR/issue-20801.rs:26:22
+  --> $DIR/issue-20801.rs:27:22
    |
 LL |     let a = unsafe { *mut_ref() };
    |                      ^^^^^^^^^^ move occurs because value has type `T`, which does not implement the `Copy` trait
@@ -11,7 +26,7 @@ LL +     let a = unsafe { mut_ref() };
    |
 
 error[E0507]: cannot move out of a shared reference
-  --> $DIR/issue-20801.rs:29:22
+  --> $DIR/issue-20801.rs:30:22
    |
 LL |     let b = unsafe { *imm_ref() };
    |                      ^^^^^^^^^^ move occurs because value has type `T`, which does not implement the `Copy` trait
@@ -23,7 +38,7 @@ LL +     let b = unsafe { imm_ref() };
    |
 
 error[E0507]: cannot move out of a raw pointer
-  --> $DIR/issue-20801.rs:32:22
+  --> $DIR/issue-20801.rs:33:22
    |
 LL |     let c = unsafe { *mut_ptr() };
    |                      ^^^^^^^^^^ move occurs because value has type `T`, which does not implement the `Copy` trait
@@ -35,7 +50,7 @@ LL +     let c = unsafe { mut_ptr() };
    |
 
 error[E0507]: cannot move out of a raw pointer
-  --> $DIR/issue-20801.rs:35:22
+  --> $DIR/issue-20801.rs:36:22
    |
 LL |     let d = unsafe { *const_ptr() };
    |                      ^^^^^^^^^^^^ move occurs because value has type `T`, which does not implement the `Copy` trait
@@ -46,6 +61,6 @@ LL -     let d = unsafe { *const_ptr() };
 LL +     let d = unsafe { const_ptr() };
    |
 
-error: aborting due to 4 previous errors
+error: aborting due to 4 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.rs b/tests/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.rs
index b3cce1b3a06..9b172b41319 100644
--- a/tests/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.rs
+++ b/tests/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.rs
@@ -8,7 +8,10 @@ mod borrowck_closures_unique {
         static mut Y: isize = 3;
         let mut c1 = |y: &'static mut isize| x = y;
         //~^ ERROR is not declared as mutable
-        unsafe { c1(&mut Y); }
+        unsafe {
+            c1(&mut Y);
+            //~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
+        }
     }
 }
 
@@ -17,36 +20,50 @@ mod borrowck_closures_unique_grandparent {
         static mut Z: isize = 3;
         let mut c1 = |z: &'static mut isize| {
             let mut c2 = |y: &'static mut isize| x = y;
-        //~^ ERROR is not declared as mutable
+            //~^ ERROR is not declared as mutable
             c2(z);
         };
-        unsafe { c1(&mut Z); }
+        unsafe {
+            c1(&mut Z);
+            //~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
+        }
     }
 }
 
 // adapted from mutability_errors.rs
 mod mutability_errors {
     pub fn capture_assign_whole(x: (i32,)) {
-        || { x = (1,); };
-        //~^ ERROR is not declared as mutable
+        || {
+            x = (1,);
+            //~^ ERROR is not declared as mutable
+        };
     }
     pub fn capture_assign_part(x: (i32,)) {
-        || { x.0 = 1; };
-        //~^ ERROR is not declared as mutable
+        || {
+            x.0 = 1;
+            //~^ ERROR is not declared as mutable
+        };
     }
     pub fn capture_reborrow_whole(x: (i32,)) {
-        || { &mut x; };
-        //~^ ERROR is not declared as mutable
+        || {
+            &mut x;
+            //~^ ERROR is not declared as mutable
+        };
     }
     pub fn capture_reborrow_part(x: (i32,)) {
-        || { &mut x.0; };
-        //~^ ERROR is not declared as mutable
+        || {
+            &mut x.0;
+            //~^ ERROR is not declared as mutable
+        };
     }
 }
 
 fn main() {
     static mut X: isize = 2;
-    unsafe { borrowck_closures_unique::e(&mut X); }
+    unsafe {
+        borrowck_closures_unique::e(&mut X);
+        //~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
+    }
 
     mutability_errors::capture_assign_whole((1000,));
     mutability_errors::capture_assign_part((2000,));
diff --git a/tests/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.stderr b/tests/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.stderr
index 4c299cdc455..e4e4947fce1 100644
--- a/tests/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.stderr
+++ b/tests/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.stderr
@@ -1,3 +1,46 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:12:16
+   |
+LL |             c1(&mut Y);
+   |                ^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |             c1(addr_of_mut!(Y));
+   |                ~~~~~~~~~~~~~~~
+
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:27:16
+   |
+LL |             c1(&mut Z);
+   |                ^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |             c1(addr_of_mut!(Z));
+   |                ~~~~~~~~~~~~~~~
+
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:64:37
+   |
+LL |         borrowck_closures_unique::e(&mut X);
+   |                                     ^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |         borrowck_closures_unique::e(addr_of_mut!(X));
+   |                                     ~~~~~~~~~~~~~~~
+
 error[E0594]: cannot assign to `x`, as it is not declared as mutable
   --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:9:46
    |
@@ -8,7 +51,7 @@ LL |         let mut c1 = |y: &'static mut isize| x = y;
    |                                              ^^^^^ cannot assign
 
 error[E0594]: cannot assign to `x`, as it is not declared as mutable
-  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:19:50
+  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:22:50
    |
 LL |     pub fn ee(x: &'static mut isize) {
    |               - help: consider changing this to be mutable: `mut x`
@@ -17,38 +60,42 @@ LL |             let mut c2 = |y: &'static mut isize| x = y;
    |                                                  ^^^^^ cannot assign
 
 error[E0594]: cannot assign to `x`, as it is not declared as mutable
-  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:30:14
+  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:37:13
    |
 LL |     pub fn capture_assign_whole(x: (i32,)) {
    |                                 - help: consider changing this to be mutable: `mut x`
-LL |         || { x = (1,); };
-   |              ^^^^^^^^ cannot assign
+LL |         || {
+LL |             x = (1,);
+   |             ^^^^^^^^ cannot assign
 
 error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
-  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:34:14
+  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:43:13
    |
 LL |     pub fn capture_assign_part(x: (i32,)) {
    |                                - help: consider changing this to be mutable: `mut x`
-LL |         || { x.0 = 1; };
-   |              ^^^^^^^ cannot assign
+LL |         || {
+LL |             x.0 = 1;
+   |             ^^^^^^^ cannot assign
 
 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
-  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:38:14
+  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:49:13
    |
 LL |     pub fn capture_reborrow_whole(x: (i32,)) {
    |                                   - help: consider changing this to be mutable: `mut x`
-LL |         || { &mut x; };
-   |              ^^^^^^ cannot borrow as mutable
+LL |         || {
+LL |             &mut x;
+   |             ^^^^^^ cannot borrow as mutable
 
 error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable
-  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:42:14
+  --> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:55:13
    |
 LL |     pub fn capture_reborrow_part(x: (i32,)) {
    |                                  - help: consider changing this to be mutable: `mut x`
-LL |         || { &mut x.0; };
-   |              ^^^^^^^^ cannot borrow as mutable
+LL |         || {
+LL |             &mut x.0;
+   |             ^^^^^^^^ cannot borrow as mutable
 
-error: aborting due to 6 previous errors
+error: aborting due to 6 previous errors; 3 warnings emitted
 
 Some errors have detailed explanations: E0594, E0596.
 For more information about an error, try `rustc --explain E0594`.
diff --git a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs
index b52939ffc11..c10246eec64 100644
--- a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs
+++ b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs
@@ -17,6 +17,7 @@ async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
     //~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument was supplied
     //~^^ ERROR struct takes 1 generic argument but 0 generic arguments were supplied
     LockedMarket(coroutine.lock().unwrap().buy())
+    //~^ ERROR: cannot return value referencing temporary value
 }
 
 struct LockedMarket<T>(T);
diff --git a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr
index 516c1d065e6..2b10cf67d15 100644
--- a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr
+++ b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr
@@ -7,7 +7,7 @@ LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_>
    |                                                           expected 0 lifetime arguments
    |
 note: struct defined here, with 0 lifetime parameters
-  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:22:8
+  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:23:8
    |
 LL | struct LockedMarket<T>(T);
    |        ^^^^^^^^^^^^
@@ -19,7 +19,7 @@ LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_>
    |                                                           ^^^^^^^^^^^^ expected 1 generic argument
    |
 note: struct defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:22:8
+  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:23:8
    |
 LL | struct LockedMarket<T>(T);
    |        ^^^^^^^^^^^^ -
@@ -28,6 +28,16 @@ help: add missing generic argument
 LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_, T> {
    |                                                                          +++
 
-error: aborting due to 2 previous errors
+error[E0515]: cannot return value referencing temporary value
+  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:19:5
+   |
+LL |     LockedMarket(coroutine.lock().unwrap().buy())
+   |     ^^^^^^^^^^^^^-------------------------^^^^^^^
+   |     |            |
+   |     |            temporary value created here
+   |     returns a value referencing data owned by the current function
+
+error: aborting due to 3 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0107, E0515.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs
index cdde48871ea..2edc52c6f55 100644
--- a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs
+++ b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs
@@ -12,7 +12,7 @@ use trait_superkinds_in_metadata::RequiresCopy;
 use std::marker;
 
 #[derive(Copy, Clone)]
-struct X<T>(#[allow(unused_tuple_struct_fields)] T);
+struct X<T>(#[allow(dead_code)] T);
 
 impl<T:Sync> RequiresShare for X<T> { }
 
diff --git a/tests/ui/closures/2229_closure_analysis/issue-88118-2.stderr b/tests/ui/closures/2229_closure_analysis/issue-88118-2.stderr
index b3cb558f976..34b3eab2345 100644
--- a/tests/ui/closures/2229_closure_analysis/issue-88118-2.stderr
+++ b/tests/ui/closures/2229_closure_analysis/issue-88118-2.stderr
@@ -1,8 +1,8 @@
 warning: irrefutable `if let` guard pattern
-  --> $DIR/issue-88118-2.rs:10:29
+  --> $DIR/issue-88118-2.rs:10:25
    |
 LL |             Registry if let _ = registry.try_find_description() => { }
-   |                             ^
+   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this pattern will always match, so the guard is useless
    = help: consider removing the guard and adding a `let` inside the match arm
diff --git a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed
index b74b5e94e2b..e8ca5ccdc54 100644
--- a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed
+++ b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed
@@ -51,10 +51,10 @@ fn test_sync_trait() {
 }
 
 /* Test Clone Trait Migration */
-struct S(Foo);
+struct S(#[allow(dead_code)] Foo);
 struct T(i32);
 
-struct U(S, T);
+struct U(#[allow(dead_code)] S, T);
 
 impl Clone for U {
     fn clone(&self) -> Self {
diff --git a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs
index e4965e33cc1..fb464b7f1e1 100644
--- a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs
+++ b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.rs
@@ -51,10 +51,10 @@ fn test_sync_trait() {
 }
 
 /* Test Clone Trait Migration */
-struct S(Foo);
+struct S(#[allow(dead_code)] Foo);
 struct T(i32);
 
-struct U(S, T);
+struct U(#[allow(dead_code)] S, T);
 
 impl Clone for U {
     fn clone(&self) -> Self {
diff --git a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed
index bde8c749731..7c4e5c0f9a5 100644
--- a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed
+++ b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.fixed
@@ -18,10 +18,10 @@ impl Foo {
     }
 }
 
-struct S(#[allow(unused_tuple_struct_fields)] Foo);
+struct S(#[allow(dead_code)] Foo);
 
 #[derive(Clone)]
-struct T(#[allow(unused_tuple_struct_fields)] i32);
+struct T(#[allow(dead_code)] i32);
 
 struct U(S, T);
 
diff --git a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs
index 584c52ea134..f979db11b7e 100644
--- a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs
+++ b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.rs
@@ -18,10 +18,10 @@ impl Foo {
     }
 }
 
-struct S(#[allow(unused_tuple_struct_fields)] Foo);
+struct S(#[allow(dead_code)] Foo);
 
 #[derive(Clone)]
-struct T(#[allow(unused_tuple_struct_fields)] i32);
+struct T(#[allow(dead_code)] i32);
 
 struct U(S, T);
 
diff --git a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed
index e99dbb5ab3a..672aa4be686 100644
--- a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed
+++ b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed
@@ -13,7 +13,7 @@ impl Drop for Foo {
 }
 
 #[derive(Debug)]
-struct ConstainsDropField(Foo, #[allow(unused_tuple_struct_fields)] Foo);
+struct ConstainsDropField(Foo, #[allow(dead_code)] Foo);
 
 // `t` needs Drop because one of its elements needs drop,
 // therefore precise capture might affect drop ordering
diff --git a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs
index 62a984c9eeb..9c751064688 100644
--- a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs
+++ b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs
@@ -13,7 +13,7 @@ impl Drop for Foo {
 }
 
 #[derive(Debug)]
-struct ConstainsDropField(Foo, #[allow(unused_tuple_struct_fields)] Foo);
+struct ConstainsDropField(Foo, #[allow(dead_code)] Foo);
 
 // `t` needs Drop because one of its elements needs drop,
 // therefore precise capture might affect drop ordering
diff --git a/tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.rs b/tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.rs
index bdb3eb23c38..76a0f291410 100644
--- a/tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.rs
+++ b/tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 // Ensure we get unsafe function after coercion
 unsafe fn add(a: i32, b: i32) -> i32 {
     a + b
diff --git a/tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.mir.stderr b/tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.stderr
index 2f9c7973b5a..190b4792ebc 100644
--- a/tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.mir.stderr
+++ b/tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/closure_no_cap_coerce_many_unsafe_0.rs:15:23
+  --> $DIR/closure_no_cap_coerce_many_unsafe_0.rs:12:23
    |
 LL |     let result: i32 = foo(5, 5);
    |                       ^^^^^^^^^ call to unsafe function
@@ -7,7 +7,7 @@ LL |     let result: i32 = foo(5, 5);
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/closure_no_cap_coerce_many_unsafe_0.rs:24:23
+  --> $DIR/closure_no_cap_coerce_many_unsafe_0.rs:21:23
    |
 LL |     let result: i32 = foo(5, 5);
    |                       ^^^^^^^^^ call to unsafe function
diff --git a/tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.thir.stderr b/tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.thir.stderr
deleted file mode 100644
index 2f9c7973b5a..00000000000
--- a/tests/ui/closures/closure_no_cap_coerce_many_unsafe_0.thir.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/closure_no_cap_coerce_many_unsafe_0.rs:15:23
-   |
-LL |     let result: i32 = foo(5, 5);
-   |                       ^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/closure_no_cap_coerce_many_unsafe_0.rs:24:23
-   |
-LL |     let result: i32 = foo(5, 5);
-   |                       ^^^^^^^^^ 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/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.rs b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.rs
index 57358fbdd84..36777693fab 100644
--- a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.rs
+++ b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 fn main() {
     let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); };
     //~^ ERROR E0133
diff --git a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.stderr
index 57922770310..48fc8461882 100644
--- a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.mir.stderr
+++ b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.stderr
@@ -1,5 +1,5 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/coerce-unsafe-closure-to-unsafe-fn-ptr.rs:5:31
+error[E0133]: call to unsafe function `Pin::<Ptr>::new_unchecked` is unsafe and requires unsafe function or block
+  --> $DIR/coerce-unsafe-closure-to-unsafe-fn-ptr.rs:2:31
    |
 LL |     let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); };
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
diff --git a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr b/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr
deleted file mode 100644
index fb237231d65..00000000000
--- a/tests/ui/closures/coerce-unsafe-closure-to-unsafe-fn-ptr.thir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: call to unsafe function `Pin::<P>::new_unchecked` is unsafe and requires unsafe function or block
-  --> $DIR/coerce-unsafe-closure-to-unsafe-fn-ptr.rs:5:31
-   |
-LL |     let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); };
-   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/closures/thir-unsafeck-issue-85871.rs b/tests/ui/closures/thir-unsafeck-issue-85871.rs
index aea539b74df..a4a487c4dc2 100644
--- a/tests/ui/closures/thir-unsafeck-issue-85871.rs
+++ b/tests/ui/closures/thir-unsafeck-issue-85871.rs
@@ -1,6 +1,5 @@
 // Tests that no ICE occurs when a closure appears inside a node
 // that does not have a body when compiling with
-// compile-flags: -Zthir-unsafeck=yes
 // check-pass
 
 #![allow(dead_code)]
diff --git a/tests/ui/codegen/issue-16602-3.rs b/tests/ui/codegen/issue-16602-3.rs
index ca1ab3cc7fe..2307cfb81c7 100644
--- a/tests/ui/codegen/issue-16602-3.rs
+++ b/tests/ui/codegen/issue-16602-3.rs
@@ -2,7 +2,7 @@
 #![allow(unused_variables)]
 #![allow(unused_assignments)]
 #[derive(Debug)]
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 enum Foo {
     Bar(u32, u32),
     Baz(&'static u32, &'static u32)
diff --git a/tests/ui/coercion/issue-14589.rs b/tests/ui/coercion/issue-14589.rs
index d35ee5c731e..f92385f8d72 100644
--- a/tests/ui/coercion/issue-14589.rs
+++ b/tests/ui/coercion/issue-14589.rs
@@ -20,5 +20,5 @@ impl<T> Test<T> {
 }
 
 trait Foo { fn dummy(&self) { }}
-struct Output(#[allow(unused_tuple_struct_fields)] isize);
+struct Output(#[allow(dead_code)] isize);
 impl Foo for Output {}
diff --git a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs
index 01f7d6ce901..c50bbcec521 100644
--- a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs
+++ b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.rs
@@ -1,18 +1,15 @@
-#![deny(coinductive_overlap_in_coherence)]
-
 use std::borrow::Borrow;
 use std::cmp::Ordering;
 use std::marker::PhantomData;
 
 #[derive(PartialEq, Default)]
+//~^ ERROR conflicting implementations of trait `PartialEq<Interval<_>>` for type `Interval<_>`
 pub(crate) struct Interval<T>(PhantomData<T>);
 
 // This impl overlaps with the `derive` unless we reject the nested
 // `Interval<?1>: PartialOrd<Interval<?1>>` candidate which results
-// in a - currently inductive - cycle.
+// in a -- currently inductive -- cycle.
 impl<T, Q> PartialEq<Q> for Interval<T>
-//~^ ERROR implementations of `PartialEq<Interval<_>>` for `Interval<_>` will conflict in the future
-//~| WARN this was previously accepted by the compiler but is being phased out
 where
     T: Borrow<Q>,
     Q: ?Sized + PartialOrd,
diff --git a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
index 4535b6f6811..af4dbfcad0e 100644
--- a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
+++ b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
@@ -1,51 +1,17 @@
-error: implementations of `PartialEq<Interval<_>>` for `Interval<_>` will conflict in the future
-  --> $DIR/warn-when-cycle-is-error-in-coherence.rs:13:1
+error[E0119]: conflicting implementations of trait `PartialEq<Interval<_>>` for type `Interval<_>`
+  --> $DIR/warn-when-cycle-is-error-in-coherence.rs:5:10
    |
 LL |   #[derive(PartialEq, Default)]
-   |            --------- the second impl is here
+   |            ^^^^^^^^^ conflicting implementation for `Interval<_>`
 ...
 LL | / impl<T, Q> PartialEq<Q> for Interval<T>
-LL | |
-LL | |
 LL | | where
 LL | |     T: Borrow<Q>,
 LL | |     Q: ?Sized + PartialOrd,
-   | |___________________________^ the first impl is here
+   | |___________________________- first implementation here
    |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #114040 <https://github.com/rust-lang/rust/issues/114040>
-   = note: impls that are not considered to overlap may be considered to overlap in the future
-   = note: `Interval<_>: PartialOrd` may be considered to hold in future releases, causing the impls to overlap
-note: the lint level is defined here
-  --> $DIR/warn-when-cycle-is-error-in-coherence.rs:1:9
-   |
-LL | #![deny(coinductive_overlap_in_coherence)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 1 previous error
 
-Future incompatibility report: Future breakage diagnostic:
-error: implementations of `PartialEq<Interval<_>>` for `Interval<_>` will conflict in the future
-  --> $DIR/warn-when-cycle-is-error-in-coherence.rs:13:1
-   |
-LL |   #[derive(PartialEq, Default)]
-   |            --------- the second impl is here
-...
-LL | / impl<T, Q> PartialEq<Q> for Interval<T>
-LL | |
-LL | |
-LL | | where
-LL | |     T: Borrow<Q>,
-LL | |     Q: ?Sized + PartialOrd,
-   | |___________________________^ the first impl is here
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #114040 <https://github.com/rust-lang/rust/issues/114040>
-   = note: impls that are not considered to overlap may be considered to overlap in the future
-   = note: `Interval<_>: PartialOrd` may be considered to hold in future releases, causing the impls to overlap
-note: the lint level is defined here
-  --> $DIR/warn-when-cycle-is-error-in-coherence.rs:1:9
-   |
-LL | #![deny(coinductive_overlap_in_coherence)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/command/command-pre-exec.rs b/tests/ui/command/command-pre-exec.rs
index d366c5ffbfd..e8a909eecc1 100644
--- a/tests/ui/command/command-pre-exec.rs
+++ b/tests/ui/command/command-pre-exec.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
 
 #![allow(stable_features)]
 // ignore-windows - this is a unix-specific test
diff --git a/tests/ui/const-generics/assoc_const_eq_diagnostic.rs b/tests/ui/const-generics/assoc_const_eq_diagnostic.rs
index d51696f9ebd..573d8055a79 100644
--- a/tests/ui/const-generics/assoc_const_eq_diagnostic.rs
+++ b/tests/ui/const-generics/assoc_const_eq_diagnostic.rs
@@ -9,9 +9,10 @@ pub trait Parse {
 }
 
 pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
-//~^ ERROR expected type, found variant
+//~^ ERROR expected constant, found type
 //~| ERROR expected constant, found type
 //~| ERROR expected constant, found type
+//~| ERROR expected type
 
 fn no_help() -> Mode::Cool {}
 //~^ ERROR expected type, found variant
diff --git a/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr b/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
index 3d724bb1642..13f081940f3 100644
--- a/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
+++ b/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
@@ -8,7 +8,7 @@ LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
    |                                   help: try using the variant's enum: `Mode`
 
 error[E0573]: expected type, found variant `Mode::Cool`
-  --> $DIR/assoc_const_eq_diagnostic.rs:16:17
+  --> $DIR/assoc_const_eq_diagnostic.rs:17:17
    |
 LL | fn no_help() -> Mode::Cool {}
    |                 ^^^^^^^^^^
@@ -53,6 +53,25 @@ help: consider adding braces here
 LL | pub trait CoolStuff: Parse<MODE = { Mode::Cool }> {}
    |                                   +            +
 
-error: aborting due to 4 previous errors
+error: expected constant, found type
+  --> $DIR/assoc_const_eq_diagnostic.rs:11:35
+   |
+LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
+   |                            ----   ^^^^^^^^^^ unexpected type
+   |                            |
+   |                            expected a constant because of this associated constant
+   |
+note: the associated constant is defined here
+  --> $DIR/assoc_const_eq_diagnostic.rs:8:5
+   |
+LL |     const MODE: Mode;
+   |     ^^^^^^^^^^^^^^^^
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: consider adding braces here
+   |
+LL | pub trait CoolStuff: Parse<MODE = { Mode::Cool }> {}
+   |                                   +            +
+
+error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0573`.
diff --git a/tests/ui/const-generics/const-argument-cross-crate.rs b/tests/ui/const-generics/const-argument-cross-crate.rs
index 5693409e992..ff9cebdf7ec 100644
--- a/tests/ui/const-generics/const-argument-cross-crate.rs
+++ b/tests/ui/const-generics/const-argument-cross-crate.rs
@@ -4,7 +4,7 @@
 
 extern crate const_generic_lib;
 
-struct Container(#[allow(unused_tuple_struct_fields)] const_generic_lib::Alias);
+struct Container(#[allow(dead_code)] const_generic_lib::Alias);
 
 fn main() {
     let res = const_generic_lib::function(const_generic_lib::Struct([14u8, 1u8, 2u8]));
diff --git a/tests/ui/const-generics/generic_const_exprs/associated-consts.rs b/tests/ui/const-generics/generic_const_exprs/associated-consts.rs
index b839008d424..3bc72fe7faa 100644
--- a/tests/ui/const-generics/generic_const_exprs/associated-consts.rs
+++ b/tests/ui/const-generics/generic_const_exprs/associated-consts.rs
@@ -16,7 +16,7 @@ impl BlockCipher for BarCipher {
     const BLOCK_SIZE: usize = 32;
 }
 
-pub struct Block<C>(#[allow(unused_tuple_struct_fields)] C);
+pub struct Block<C>(#[allow(dead_code)] C);
 
 pub fn test<C: BlockCipher, const M: usize>()
 where
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-102768.rs b/tests/ui/const-generics/generic_const_exprs/issue-102768.rs
index 18a9b53cf76..f2ad7d7ce8b 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-102768.rs
+++ b/tests/ui/const-generics/generic_const_exprs/issue-102768.rs
@@ -9,6 +9,11 @@ const _: () = {
     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
     //~^ ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
     //~| ERROR associated type takes 0 generic arguments but 1 generic argument
+    //~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
+    //~| ERROR associated type takes 0 generic arguments but 1 generic argument
+    //~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
+    //~| ERROR associated type takes 0 generic arguments but 1 generic argument
+    //~| ERROR `X` cannot be made into an object
 };
 
 fn main() {}
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr b/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr
index 175d54e4184..a470c36134c 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr
@@ -28,6 +28,86 @@ note: associated type defined here, with 0 generic parameters
 LL |     type Y<'a>;
    |          ^
 
-error: aborting due to 2 previous errors
+error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
+  --> $DIR/issue-102768.rs:9:30
+   |
+LL |     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
+   |                              ^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/issue-102768.rs:5:10
+   |
+LL |     type Y<'a>;
+   |          ^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime argument
+   |
+LL |     fn f2<'a>(arg: Box<dyn X<Y<'_, 1> = &'a ()>>) {}
+   |                                +++
+
+error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/issue-102768.rs:9:30
+   |
+LL |     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
+   |                              ^--- help: remove these generics
+   |                              |
+   |                              expected 0 generic arguments
+   |
+note: associated type defined here, with 0 generic parameters
+  --> $DIR/issue-102768.rs:5:10
+   |
+LL |     type Y<'a>;
+   |          ^
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
+  --> $DIR/issue-102768.rs:9:30
+   |
+LL |     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
+   |                              ^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/issue-102768.rs:5:10
+   |
+LL |     type Y<'a>;
+   |          ^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime argument
+   |
+LL |     fn f2<'a>(arg: Box<dyn X<Y<'_, 1> = &'a ()>>) {}
+   |                                +++
+
+error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/issue-102768.rs:9:30
+   |
+LL |     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
+   |                              ^--- help: remove these generics
+   |                              |
+   |                              expected 0 generic arguments
+   |
+note: associated type defined here, with 0 generic parameters
+  --> $DIR/issue-102768.rs:5:10
+   |
+LL |     type Y<'a>;
+   |          ^
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0038]: the trait `X` cannot be made into an object
+  --> $DIR/issue-102768.rs:9:24
+   |
+LL |     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
+   |                        ^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/issue-102768.rs:5:10
+   |
+LL | trait X {
+   |       - this trait cannot be made into an object...
+LL |     type Y<'a>;
+   |          ^ ...because it contains the generic associated type `Y`
+   = help: consider moving `Y` to another trait
+
+error: aborting due to 7 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0038, E0107.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-105257.rs b/tests/ui/const-generics/generic_const_exprs/issue-105257.rs
index d8b23bc01a9..a107556fd79 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-105257.rs
+++ b/tests/ui/const-generics/generic_const_exprs/issue-105257.rs
@@ -3,6 +3,7 @@
 
 trait Trait<T> {
     fn fnc<const N: usize = "">(&self) {} //~ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+    //~^ ERROR: mismatched types
     fn foo<const N: usize = { std::mem::size_of::<T>() }>(&self) {} //~ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
 }
 
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-105257.stderr b/tests/ui/const-generics/generic_const_exprs/issue-105257.stderr
index ed7a8cb19a4..d7ded0f1f74 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-105257.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-105257.stderr
@@ -5,10 +5,17 @@ LL |     fn fnc<const N: usize = "">(&self) {}
    |            ^^^^^^^^^^^^^^^^^^^
 
 error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/issue-105257.rs:6:12
+  --> $DIR/issue-105257.rs:7:12
    |
 LL |     fn foo<const N: usize = { std::mem::size_of::<T>() }>(&self) {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 2 previous errors
+error[E0308]: mismatched types
+  --> $DIR/issue-105257.rs:5:29
+   |
+LL |     fn fnc<const N: usize = "">(&self) {}
+   |                             ^^ expected `usize`, found `&str`
+
+error: aborting due to 3 previous errors
 
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs b/tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs
index b385406b020..b4f44dac62d 100644
--- a/tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs
+++ b/tests/ui/const-generics/inhabited-assoc-ty-ice-1.rs
@@ -9,7 +9,7 @@ trait Foo {
     const ASSOC: usize = 1;
 }
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct Iced<T: Foo>(T, [(); T::ASSOC])
 where
     [(); T::ASSOC]: ;
diff --git a/tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs b/tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs
index 216d29c7cd4..d6d0a80ab11 100644
--- a/tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs
+++ b/tests/ui/const-generics/inhabited-assoc-ty-ice-2.rs
@@ -9,7 +9,7 @@ trait Foo {
     const ASSOC: usize = 1;
 }
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct Iced<T: Foo>(T, [(); T::ASSOC])
 where
     [(); T::ASSOC]: ;
diff --git a/tests/ui/const-generics/issues/issue-83765.rs b/tests/ui/const-generics/issues/issue-83765.rs
index 71c164ab0a5..0959f771c22 100644
--- a/tests/ui/const-generics/issues/issue-83765.rs
+++ b/tests/ui/const-generics/issues/issue-83765.rs
@@ -4,6 +4,7 @@
 trait TensorDimension {
     const DIM: usize;
     //~^ ERROR cycle detected when resolving instance
+    //~| ERROR cycle detected when resolving instance
     // FIXME Given the current state of the compiler its expected that we cycle here,
     // but the cycle is still wrong.
     const ISSCALAR: bool = Self::DIM == 0;
@@ -79,6 +80,7 @@ impl<'a, R, T: Broadcastable, F: Fn(T::Element) -> R, const DIM: usize> TensorSi
     for BMap<'a, R, T, F, DIM>
 {
     fn size(&self) -> [usize; DIM] {
+        //~^ ERROR: method not compatible with trait
         self.reference.size()
     }
 }
@@ -88,6 +90,7 @@ impl<'a, R, T: Broadcastable, F: Fn(T::Element) -> R, const DIM: usize> Broadcas
 {
     type Element = R;
     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
+        //~^ ERROR: method not compatible with trait
         self.reference.bget(index).map(&self.closure)
     }
 }
diff --git a/tests/ui/const-generics/issues/issue-83765.stderr b/tests/ui/const-generics/issues/issue-83765.stderr
index d9956875cf8..c3292314f23 100644
--- a/tests/ui/const-generics/issues/issue-83765.stderr
+++ b/tests/ui/const-generics/issues/issue-83765.stderr
@@ -17,6 +17,44 @@ LL | trait TensorDimension {
    | ^^^^^^^^^^^^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
-error: aborting due to 1 previous error
+error[E0391]: cycle detected when resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`
+  --> $DIR/issue-83765.rs:5:5
+   |
+LL |     const DIM: usize;
+   |     ^^^^^^^^^^^^^^^^
+   |
+note: ...which requires computing candidate for `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>`...
+  --> $DIR/issue-83765.rs:4:1
+   |
+LL | trait TensorDimension {
+   | ^^^^^^^^^^^^^^^^^^^^^
+   = note: ...which again requires resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`, completing the cycle
+note: cycle used when checking that `<impl at $DIR/issue-83765.rs:56:1: 56:97>` is well-formed
+  --> $DIR/issue-83765.rs:56:1
+   |
+LL | impl<'a, T: Broadcastable, const DIM: usize> Broadcastable for LazyUpdim<'a, T, { T::DIM }, DIM> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
+
+error[E0308]: method not compatible with trait
+  --> $DIR/issue-83765.rs:82:5
+   |
+LL |     fn size(&self) -> [usize; DIM] {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
+   |
+   = note: expected constant `Self::DIM`
+              found constant `DIM`
+
+error[E0308]: method not compatible with trait
+  --> $DIR/issue-83765.rs:92:5
+   |
+LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
+   |
+   = note: expected constant `Self::DIM`
+              found constant `DIM`
+
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0391`.
+Some errors have detailed explanations: E0308, E0391.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.stderr b/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.stderr
index 7bef98b1d5d..1fe0109771c 100644
--- a/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.stderr
+++ b/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.stderr
@@ -4,5 +4,14 @@ error: cannot capture late-bound lifetime in constant
 LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
    |        -- lifetime defined here                     ^^
 
-error: aborting due to 1 previous error
+error: overly complex generic constant
+  --> $DIR/late-bound-in-return-issue-77357.rs:9:46
+   |
+LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
+   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^ blocks are not supported in generic constants
+   |
+   = help: consider moving this anonymous constant into a `const` function
+   = note: this operation may be supported in the future
+
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/const-generics/min_const_generics/macro-fail.rs b/tests/ui/const-generics/min_const_generics/macro-fail.rs
index 7fb69032e6f..f3df96d468c 100644
--- a/tests/ui/const-generics/min_const_generics/macro-fail.rs
+++ b/tests/ui/const-generics/min_const_generics/macro-fail.rs
@@ -14,6 +14,7 @@ impl<const N: usize> Marker<N> for Example<N> {}
 fn make_marker() -> impl Marker<gimme_a_const!(marker)> {
   //~^ ERROR: type provided when a constant was expected
   Example::<gimme_a_const!(marker)>
+  //~^ ERROR: type provided when a constant was expected
 }
 
 fn from_marker(_: impl Marker<{
@@ -33,7 +34,9 @@ fn main() {
   }>;
 
   let _fail = Example::<external_macro!()>;
+  //~^ ERROR: type provided when a constant was expected
 
   let _fail = Example::<gimme_a_const!()>;
   //~^ ERROR unexpected end of macro invocation
+  //~| ERROR: type provided when a constant was expected
 }
diff --git a/tests/ui/const-generics/min_const_generics/macro-fail.stderr b/tests/ui/const-generics/min_const_generics/macro-fail.stderr
index cc629fd920f..06a111008a3 100644
--- a/tests/ui/const-generics/min_const_generics/macro-fail.stderr
+++ b/tests/ui/const-generics/min_const_generics/macro-fail.stderr
@@ -1,5 +1,5 @@
 error: expected type, found `{`
-  --> $DIR/macro-fail.rs:28:27
+  --> $DIR/macro-fail.rs:29:27
    |
 LL | fn make_marker() -> impl Marker<gimme_a_const!(marker)> {
    |                                 ----------------------
@@ -13,7 +13,7 @@ LL |       ($rusty: ident) => {{ let $rusty = 3; *&$rusty }}
    = note: this error originates in the macro `gimme_a_const` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: expected type, found `{`
-  --> $DIR/macro-fail.rs:28:27
+  --> $DIR/macro-fail.rs:29:27
    |
 LL |   Example::<gimme_a_const!(marker)>
    |             ----------------------
@@ -41,7 +41,7 @@ LL |   let _fail = Example::<external_macro!()>;
    = note: this error originates in the macro `external_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: unexpected end of macro invocation
-  --> $DIR/macro-fail.rs:37:25
+  --> $DIR/macro-fail.rs:39:25
    |
 LL |     macro_rules! gimme_a_const {
    |     -------------------------- when calling this macro
@@ -50,7 +50,7 @@ LL |   let _fail = Example::<gimme_a_const!()>;
    |                         ^^^^^^^^^^^^^^^^ missing tokens in macro arguments
    |
 note: while trying to match meta-variable `$rusty:ident`
-  --> $DIR/macro-fail.rs:28:8
+  --> $DIR/macro-fail.rs:29:8
    |
 LL |       ($rusty: ident) => {{ let $rusty = 3; *&$rusty }}
    |        ^^^^^^^^^^^^^
@@ -61,6 +61,24 @@ error[E0747]: type provided when a constant was expected
 LL | fn make_marker() -> impl Marker<gimme_a_const!(marker)> {
    |                                 ^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 5 previous errors
+error[E0747]: type provided when a constant was expected
+  --> $DIR/macro-fail.rs:16:13
+   |
+LL |   Example::<gimme_a_const!(marker)>
+   |             ^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0747]: type provided when a constant was expected
+  --> $DIR/macro-fail.rs:36:25
+   |
+LL |   let _fail = Example::<external_macro!()>;
+   |                         ^^^^^^^^^^^^^^^^^
+
+error[E0747]: type provided when a constant was expected
+  --> $DIR/macro-fail.rs:39:25
+   |
+LL |   let _fail = Example::<gimme_a_const!()>;
+   |                         ^^^^^^^^^^^^^^^^
+
+error: aborting due to 8 previous errors
 
 For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/ui/consts/assoc-const.rs b/tests/ui/consts/assoc-const.rs
index f542f2dcb52..021bcb40102 100644
--- a/tests/ui/consts/assoc-const.rs
+++ b/tests/ui/consts/assoc-const.rs
@@ -6,7 +6,7 @@ trait Nat {
 }
 
 struct Zero;
-struct Succ<N>(#[allow(unused_tuple_struct_fields)] N);
+struct Succ<N>(#[allow(dead_code)] N);
 
 impl Nat for Zero {
     const VALUE: usize = 0;
diff --git a/tests/ui/consts/const-eval/ub-enum.64bit.stderr b/tests/ui/consts/const-eval/ub-enum.64bit.stderr
deleted file mode 100644
index 6db43d379d1..00000000000
--- a/tests/ui/consts/const-eval/ub-enum.64bit.stderr
+++ /dev/null
@@ -1,134 +0,0 @@
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-enum.rs:27:1
-   |
-LL | const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x0000000000000001, but expected a valid enum tag
-   |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
-
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:30:1
-   |
-LL | const BAD_ENUM_PTR: Enum = unsafe { mem::transmute(&1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
-   |
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
-
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:33:1
-   |
-LL | const BAD_ENUM_WRAPPED: Wrap<Enum> = unsafe { mem::transmute(&1) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
-   |
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
-
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-enum.rs:45:1
-   |
-LL | const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x0000000000000000, but expected a valid enum tag
-   |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
-
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:47:1
-   |
-LL | const BAD_ENUM2_PTR: Enum2 = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
-   |
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
-
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:50:1
-   |
-LL | const BAD_ENUM2_WRAPPED: Wrap<Enum2> = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
-   |
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
-
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:59:42
-   |
-LL | const BAD_ENUM2_UNDEF : Enum2 = unsafe { MaybeUninit { uninit: () }.init };
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
-
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:64:1
-   |
-LL | const BAD_ENUM2_OPTION_PTR: Option<Enum2> = unsafe { mem::transmute(&0) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into integer
-   |
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
-
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-enum.rs:81:1
-   |
-LL | const BAD_UNINHABITED_VARIANT1: UninhDiscriminant = unsafe { mem::transmute(1u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
-   |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
-
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-enum.rs:83:1
-   |
-LL | const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
-   |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
-
-error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-enum.rs:91:1
-   |
-LL | const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::transmute(!0u32) }));
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0.1: encountered 0xffffffff, but expected a valid unicode scalar value (in `0..=0x10FFFF` but not in `0xD800..=0xDFFF`)
-   |
-   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
-   = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
-               HEX_DUMP
-           }
-
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:96:77
-   |
-LL | const BAD_UNINHABITED_WITH_DATA1: Result<(i32, Never), (i32, !)> = unsafe { mem::transmute(0u64) };
-   |                                                                             ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
-
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-enum.rs:98:77
-   |
-LL | const BAD_UNINHABITED_WITH_DATA2: Result<(i32, !), (i32, Never)> = unsafe { mem::transmute(0u64) };
-   |                                                                             ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered an uninhabited enum variant
-
-error[E0080]: evaluation of constant value failed
-  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
-   |
-   = note: read discriminant of an uninhabited enum variant
-   |
-note: inside `discriminant::<Never>`
-  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
-note: inside `TEST_ICE_89765`
-  --> $DIR/ub-enum.rs:103:14
-   |
-LL |     unsafe { std::mem::discriminant(&*(&() as *const () as *const Never)); };
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 14 previous errors
-
-For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/ub-enum.rs b/tests/ui/consts/const-eval/ub-enum.rs
index 72a0c9efed2..c11ace612f1 100644
--- a/tests/ui/consts/const-eval/ub-enum.rs
+++ b/tests/ui/consts/const-eval/ub-enum.rs
@@ -1,7 +1,7 @@
-// stderr-per-bitwidth
 // Strip out raw byte dumps to make comparison platform-independent:
 // normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
-// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
+// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
+// normalize-stderr-test "0x0+" -> "0x0"
 #![feature(never_type)]
 #![allow(invalid_value)]
 
diff --git a/tests/ui/consts/const-eval/ub-enum.32bit.stderr b/tests/ui/consts/const-eval/ub-enum.stderr
index c0ad6caecf2..a0712f64c7b 100644
--- a/tests/ui/consts/const-eval/ub-enum.32bit.stderr
+++ b/tests/ui/consts/const-eval/ub-enum.stderr
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:27:1
    |
 LL | const BAD_ENUM: Enum = unsafe { mem::transmute(1usize) };
-   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x00000001, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x01, but expected a valid enum tag
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
@@ -31,7 +31,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-enum.rs:45:1
    |
 LL | const BAD_ENUM2: Enum2 = unsafe { mem::transmute(0usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x00000000, but expected a valid enum tag
+   | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-tag>: encountered 0x0, but expected a valid enum tag
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
diff --git a/tests/ui/consts/const-eval/ub-uninhabit.rs b/tests/ui/consts/const-eval/ub-uninhabit.rs
index 01600f545ae..0eb9ab415d7 100644
--- a/tests/ui/consts/const-eval/ub-uninhabit.rs
+++ b/tests/ui/consts/const-eval/ub-uninhabit.rs
@@ -1,6 +1,6 @@
 // Strip out raw byte dumps to make comparison platform-independent:
 // normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
-// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
+// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
 #![feature(core_intrinsics)]
 #![feature(never_type)]
 
diff --git a/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs b/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs
index 6c4f0a5accf..95fb9ef4260 100644
--- a/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs
+++ b/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs
@@ -1,15 +1,12 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 #![feature(const_extern_fn)]
 
-const unsafe extern "C" fn foo() -> usize { 5 }
+const unsafe extern "C" fn foo() -> usize {
+    5
+}
 
 fn main() {
     let a: [u8; foo()];
-    //[mir]~^ call to unsafe function is unsafe and requires unsafe function or block
-    //[thir]~^^ call to unsafe function `foo` is unsafe and requires unsafe function or block
+    //~^ call to unsafe function `foo` is unsafe and requires unsafe function or block
     foo();
-    //[mir]~^ ERROR call to unsafe function is unsafe and requires unsafe function or block
-    //[thir]~^^ ERROR call to unsafe function `foo` is unsafe and requires unsafe function or block
+    //~^ ERROR call to unsafe function `foo` is unsafe and requires unsafe function or block
 }
diff --git a/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.stderr b/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.stderr
new file mode 100644
index 00000000000..6f59b2f2055
--- /dev/null
+++ b/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.stderr
@@ -0,0 +1,19 @@
+error[E0133]: call to unsafe function `foo` is unsafe and requires unsafe function or block
+  --> $DIR/const-extern-fn-requires-unsafe.rs:10:5
+   |
+LL |     foo();
+   |     ^^^^^ call to unsafe function
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function `foo` is unsafe and requires unsafe function or block
+  --> $DIR/const-extern-fn-requires-unsafe.rs:8:17
+   |
+LL |     let a: [u8; foo()];
+   |                 ^^^^^ 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/consts/const-needs_drop.rs b/tests/ui/consts/const-needs_drop.rs
index 11ee7084ce8..bf622e38939 100644
--- a/tests/ui/consts/const-needs_drop.rs
+++ b/tests/ui/consts/const-needs_drop.rs
@@ -2,10 +2,10 @@
 
 use std::mem;
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct Trivial(u8, f32);
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct NonTrivial(u8, String);
 
 const CONST_U8: bool = mem::needs_drop::<u8>();
diff --git a/tests/ui/consts/const-size_of_val-align_of_val.rs b/tests/ui/consts/const-size_of_val-align_of_val.rs
index e8323e4ae60..cd678176761 100644
--- a/tests/ui/consts/const-size_of_val-align_of_val.rs
+++ b/tests/ui/consts/const-size_of_val-align_of_val.rs
@@ -5,7 +5,7 @@
 
 use std::{mem, ptr};
 
-struct Foo(#[allow(unused_tuple_struct_fields)] u32);
+struct Foo(#[allow(dead_code)] u32);
 
 #[derive(Clone, Copy)]
 struct Bar {
diff --git a/tests/ui/consts/const-unsized.stderr b/tests/ui/consts/const-unsized.stderr
index 674f0cb99e7..f70c9b2e077 100644
--- a/tests/ui/consts/const-unsized.stderr
+++ b/tests/ui/consts/const-unsized.stderr
@@ -6,39 +6,23 @@ LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
    |
    = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
 
-error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/const-unsized.rs:7:18
-   |
-LL | const CONST_FOO: str = *"foo";
-   |                  ^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `str`
-
 error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
-  --> $DIR/const-unsized.rs:11:18
+  --> $DIR/const-unsized.rs:3:35
    |
-LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
-   |                  ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
+   = note: constant expressions must have a statically known size
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/const-unsized.rs:15:20
+  --> $DIR/const-unsized.rs:7:18
    |
-LL | static STATIC_BAR: str = *"bar";
-   |                    ^^^ doesn't have a size known at compile-time
+LL | const CONST_FOO: str = *"foo";
+   |                  ^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `str`
 
-error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
-  --> $DIR/const-unsized.rs:3:35
-   |
-LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
-   = note: constant expressions must have a statically known size
-
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/const-unsized.rs:7:24
    |
@@ -49,6 +33,14 @@ LL | const CONST_FOO: str = *"foo";
    = note: constant expressions must have a statically known size
 
 error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
+  --> $DIR/const-unsized.rs:11:18
+   |
+LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
+   |                  ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
+
+error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
   --> $DIR/const-unsized.rs:11:37
    |
 LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
@@ -58,6 +50,14 @@ LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
    = note: constant expressions must have a statically known size
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
+  --> $DIR/const-unsized.rs:15:20
+   |
+LL | static STATIC_BAR: str = *"bar";
+   |                    ^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `str`
+
+error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/const-unsized.rs:15:26
    |
 LL | static STATIC_BAR: str = *"bar";
diff --git a/tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs b/tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs
index 03e91f2b3b1..436a2d0de74 100644
--- a/tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs
+++ b/tests/ui/consts/const_in_pattern/null-raw-ptr-issue-119270.rs
@@ -1,7 +1,7 @@
 // run-pass
 // Eventually this will be rejected (when the future-compat lints are turned into hard errors), and
 // then this test can be removed. But meanwhile we should ensure that this works and does not ICE.
-struct NoDerive(i32);
+struct NoDerive(#[allow(dead_code)] i32);
 
 #[derive(PartialEq)]
 struct WrapEmbedded(*const NoDerive);
diff --git a/tests/ui/consts/const_in_pattern/warn_corner_cases.rs b/tests/ui/consts/const_in_pattern/warn_corner_cases.rs
index 15cf3c84d85..d23d85335f8 100644
--- a/tests/ui/consts/const_in_pattern/warn_corner_cases.rs
+++ b/tests/ui/consts/const_in_pattern/warn_corner_cases.rs
@@ -15,7 +15,7 @@
 #![warn(indirect_structural_match)]
 
 #[derive(Copy, Clone, Debug)]
-struct NoDerive(#[allow(unused_tuple_struct_fields)] u32);
+struct NoDerive(#[allow(dead_code)] u32);
 
 // This impl makes `NoDerive` irreflexive.
 impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
diff --git a/tests/ui/consts/const_let_assign2.rs b/tests/ui/consts/const_let_assign2.rs
index 28265c85dd1..1c7afe0e3d6 100644
--- a/tests/ui/consts/const_let_assign2.rs
+++ b/tests/ui/consts/const_let_assign2.rs
@@ -16,6 +16,7 @@ static mut BB: AA = AA::new();
 
 fn main() {
     let ptr = unsafe { &mut BB };
+    //~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
     for a in ptr.data.iter() {
         println!("{}", a);
     }
diff --git a/tests/ui/consts/const_let_assign2.stderr b/tests/ui/consts/const_let_assign2.stderr
new file mode 100644
index 00000000000..2764153a8a5
--- /dev/null
+++ b/tests/ui/consts/const_let_assign2.stderr
@@ -0,0 +1,17 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/const_let_assign2.rs:18:24
+   |
+LL |     let ptr = unsafe { &mut BB };
+   |                        ^^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |     let ptr = unsafe { addr_of_mut!(BB) };
+   |                        ~~~~~~~~~~~~~~~~
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/consts/escaping-bound-var.rs b/tests/ui/consts/escaping-bound-var.rs
index 7c1fbd24f55..a538d607d6c 100644
--- a/tests/ui/consts/escaping-bound-var.rs
+++ b/tests/ui/consts/escaping-bound-var.rs
@@ -3,7 +3,7 @@
 
 fn test<'a>(
     _: &'a (),
-) -> [(); {
+) -> [(); { //~ ERROR: mismatched types
     let x: &'a ();
     //~^ ERROR cannot capture late-bound lifetime in constant
     1
diff --git a/tests/ui/consts/escaping-bound-var.stderr b/tests/ui/consts/escaping-bound-var.stderr
index a943c84e3b2..bb0d285f4d0 100644
--- a/tests/ui/consts/escaping-bound-var.stderr
+++ b/tests/ui/consts/escaping-bound-var.stderr
@@ -16,5 +16,23 @@ LL | fn test<'a>(
 LL |     let x: &'a ();
    |             ^^
 
-error: aborting due to 1 previous error; 1 warning emitted
+error[E0308]: mismatched types
+  --> $DIR/escaping-bound-var.rs:6:6
+   |
+LL |   fn test<'a>(
+   |      ---- implicitly returns `()` as its body has no tail or `return` expression
+LL |       _: &'a (),
+LL |   ) -> [(); {
+   |  ______^
+LL | |     let x: &'a ();
+LL | |
+LL | |     1
+LL | | }] {
+   | |__^ expected `[(); {
+    let x: &'a ();
+    1
+}]`, found `()`
+
+error: aborting due to 2 previous errors; 1 warning emitted
 
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/issue-103790.rs b/tests/ui/consts/issue-103790.rs
index ea3cac605b1..5d130821dc8 100644
--- a/tests/ui/consts/issue-103790.rs
+++ b/tests/ui/consts/issue-103790.rs
@@ -6,5 +6,6 @@ struct S<const S: (), const S: S = { S }>;
 //~| ERROR missing generics for struct `S`
 //~| ERROR cycle detected when computing type of `S::S`
 //~| ERROR cycle detected when computing type of `S`
+//~| ERROR `()` is forbidden as the type of a const generic parameter
 
 fn main() {}
diff --git a/tests/ui/consts/issue-103790.stderr b/tests/ui/consts/issue-103790.stderr
index 67334469dcd..55bc9675401 100644
--- a/tests/ui/consts/issue-103790.stderr
+++ b/tests/ui/consts/issue-103790.stderr
@@ -61,7 +61,16 @@ LL | | fn main() {}
    | |____________^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
-error: aborting due to 4 previous errors
+error: `()` is forbidden as the type of a const generic parameter
+  --> $DIR/issue-103790.rs:4:19
+   |
+LL | struct S<const S: (), const S: S = { S }>;
+   |                   ^^
+   |
+   = note: the only supported types are integers, `bool` and `char`
+   = help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
+
+error: aborting due to 5 previous errors
 
 Some errors have detailed explanations: E0107, E0391, E0403.
 For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/consts/issue-16538.mir.stderr b/tests/ui/consts/issue-16538.mir.stderr
deleted file mode 100644
index e320df4b7ad..00000000000
--- a/tests/ui/consts/issue-16538.mir.stderr
+++ /dev/null
@@ -1,29 +0,0 @@
-error[E0015]: cannot call non-const fn `Y::foo` in statics
-  --> $DIR/issue-16538.rs:14:23
-   |
-LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
-   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
-   = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell
-
-error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/issue-16538.rs:14:30
-   |
-LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
-   |                              ^^^^ use of extern static
-   |
-   = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-16538.rs:14:21
-   |
-LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0015, E0133.
-For more information about an error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/issue-16538.rs b/tests/ui/consts/issue-16538.rs
index 270fa301414..31f334fb405 100644
--- a/tests/ui/consts/issue-16538.rs
+++ b/tests/ui/consts/issue-16538.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 mod Y {
     pub type X = usize;
     extern "C" {
diff --git a/tests/ui/consts/issue-16538.thir.stderr b/tests/ui/consts/issue-16538.stderr
index 4a862869274..834ffa8d3a0 100644
--- a/tests/ui/consts/issue-16538.thir.stderr
+++ b/tests/ui/consts/issue-16538.stderr
@@ -1,5 +1,5 @@
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-16538.rs:14:22
+  --> $DIR/issue-16538.rs:11:22
    |
 LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer
@@ -7,7 +7,7 @@ LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
    = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 
 error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/issue-16538.rs:14:30
+  --> $DIR/issue-16538.rs:11:30
    |
 LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
    |                              ^^^^ use of extern static
@@ -15,7 +15,7 @@ LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
    = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
 
 error[E0015]: cannot call non-const fn `Y::foo` in statics
-  --> $DIR/issue-16538.rs:14:23
+  --> $DIR/issue-16538.rs:11:23
    |
 LL | static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/consts/issue-17718-const-bad-values.rs b/tests/ui/consts/issue-17718-const-bad-values.rs
index 62bbb3b569c..4fedc48452b 100644
--- a/tests/ui/consts/issue-17718-const-bad-values.rs
+++ b/tests/ui/consts/issue-17718-const-bad-values.rs
@@ -3,7 +3,8 @@ const C1: &'static mut [usize] = &mut [];
 
 static mut S: usize = 3;
 const C2: &'static mut usize = unsafe { &mut S };
-//~^ ERROR: constants cannot refer to statics
+//~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
+//~^^ ERROR: constants cannot refer to statics
 //~| ERROR: constants cannot refer to statics
 
 fn main() {}
diff --git a/tests/ui/consts/issue-17718-const-bad-values.stderr b/tests/ui/consts/issue-17718-const-bad-values.stderr
index 405c2195dec..2dc91f52669 100644
--- a/tests/ui/consts/issue-17718-const-bad-values.stderr
+++ b/tests/ui/consts/issue-17718-const-bad-values.stderr
@@ -1,3 +1,18 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/issue-17718-const-bad-values.rs:5:41
+   |
+LL | const C2: &'static mut usize = unsafe { &mut S };
+   |                                         ^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL | const C2: &'static mut usize = unsafe { addr_of_mut!(S) };
+   |                                         ~~~~~~~~~~~~~~~
+
 error[E0764]: mutable references are not allowed in the final value of constants
   --> $DIR/issue-17718-const-bad-values.rs:1:34
    |
@@ -21,7 +36,7 @@ LL | const C2: &'static mut usize = unsafe { &mut S };
    = help: consider extracting the value of the `static` to a `const`, and referring to that
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 3 previous errors
+error: aborting due to 3 previous errors; 1 warning emitted
 
 Some errors have detailed explanations: E0013, E0764.
 For more information about an error, try `rustc --explain E0013`.
diff --git a/tests/ui/consts/issue-39974.stderr b/tests/ui/consts/issue-39974.stderr
index 4bde599039e..114c4cfeaf7 100644
--- a/tests/ui/consts/issue-39974.stderr
+++ b/tests/ui/consts/issue-39974.stderr
@@ -1,10 +1,4 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-39974.rs:5:19
-   |
-LL |     f: [[f64; 2]; LENGTH],
-   |                   ^^^^^^ expected `usize`, found `f64`
-
-error[E0308]: mismatched types
   --> $DIR/issue-39974.rs:1:21
    |
 LL | const LENGTH: f64 = 2;
@@ -13,6 +7,12 @@ LL | const LENGTH: f64 = 2;
    |                     expected `f64`, found integer
    |                     help: use a float literal: `2.0`
 
+error[E0308]: mismatched types
+  --> $DIR/issue-39974.rs:5:19
+   |
+LL |     f: [[f64; 2]; LENGTH],
+   |                   ^^^^^^ expected `usize`, found `f64`
+
 error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs b/tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs
index dd56faa3185..f82ec005a01 100644
--- a/tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs
+++ b/tests/ui/consts/issue-70773-mir-typeck-lt-norm.rs
@@ -1,7 +1,7 @@
 // run-pass
 
 const HASH_LEN: usize = 20;
-struct Hash(#[allow(unused_tuple_struct_fields)] [u8; HASH_LEN]);
+struct Hash(#[allow(dead_code)] [u8; HASH_LEN]);
 fn init_hash(_: &mut [u8; HASH_LEN]) {}
 
 fn foo<'a>() -> &'a () {
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
index 7960648ce3a..ed9db675426 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
@@ -1,3 +1,18 @@
+warning: shared reference of mutable static is discouraged
+  --> $DIR/const_refers_to_static_cross_crate.rs:13:14
+   |
+LL |     unsafe { &static_cross_crate::ZERO }
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     unsafe { addr_of!(static_cross_crate::ZERO) }
+   |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/const_refers_to_static_cross_crate.rs:10:1
    |
@@ -10,13 +25,13 @@ LL | const SLICE_MUT: &[u8; 1] = {
            }
 
 error: could not evaluate constant pattern
-  --> $DIR/const_refers_to_static_cross_crate.rs:34:9
+  --> $DIR/const_refers_to_static_cross_crate.rs:42:9
    |
 LL |         SLICE_MUT => true,
    |         ^^^^^^^^^
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/const_refers_to_static_cross_crate.rs:15:1
+  --> $DIR/const_refers_to_static_cross_crate.rs:17:1
    |
 LL | const U8_MUT: &u8 = {
    | ^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable in a constant
@@ -27,31 +42,31 @@ LL | const U8_MUT: &u8 = {
            }
 
 error: could not evaluate constant pattern
-  --> $DIR/const_refers_to_static_cross_crate.rs:42:9
+  --> $DIR/const_refers_to_static_cross_crate.rs:50:9
    |
 LL |         U8_MUT => true,
    |         ^^^^^^
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/const_refers_to_static_cross_crate.rs:22:15
+  --> $DIR/const_refers_to_static_cross_crate.rs:25:15
    |
 LL |     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
 
 error: could not evaluate constant pattern
-  --> $DIR/const_refers_to_static_cross_crate.rs:52:9
+  --> $DIR/const_refers_to_static_cross_crate.rs:60:9
    |
 LL |         U8_MUT2 => true,
    |         ^^^^^^^
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
    |
-LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
 
 error: could not evaluate constant pattern
-  --> $DIR/const_refers_to_static_cross_crate.rs:59:9
+  --> $DIR/const_refers_to_static_cross_crate.rs:67:9
    |
 LL |         U8_MUT3 => true,
    |         ^^^^^^^
@@ -59,61 +74,61 @@ LL |         U8_MUT3 => true,
 warning: skipping const checks
    |
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:12:15
+  --> $DIR/const_refers_to_static_cross_crate.rs:13:15
    |
 LL |     unsafe { &static_cross_crate::ZERO }
    |               ^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:12:15
+  --> $DIR/const_refers_to_static_cross_crate.rs:13:15
    |
 LL |     unsafe { &static_cross_crate::ZERO }
    |               ^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:17:15
+  --> $DIR/const_refers_to_static_cross_crate.rs:20:15
    |
 LL |     unsafe { &static_cross_crate::ZERO[0] }
    |               ^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:17:15
+  --> $DIR/const_refers_to_static_cross_crate.rs:20:15
    |
 LL |     unsafe { &static_cross_crate::ZERO[0] }
    |               ^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:17:15
+  --> $DIR/const_refers_to_static_cross_crate.rs:20:15
    |
 LL |     unsafe { &static_cross_crate::ZERO[0] }
    |               ^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:22:17
+  --> $DIR/const_refers_to_static_cross_crate.rs:25:17
    |
 LL |     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
    |
-LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
    |
-LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
    |
-LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
    |
-LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
    |
-LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 8 previous errors; 1 warning emitted
+error: aborting due to 8 previous errors; 2 warnings emitted
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
index 6ae0b2d1bfe..275323bc286 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
@@ -1,3 +1,18 @@
+warning: shared reference of mutable static is discouraged
+  --> $DIR/const_refers_to_static_cross_crate.rs:13:14
+   |
+LL |     unsafe { &static_cross_crate::ZERO }
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     unsafe { addr_of!(static_cross_crate::ZERO) }
+   |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/const_refers_to_static_cross_crate.rs:10:1
    |
@@ -10,13 +25,13 @@ LL | const SLICE_MUT: &[u8; 1] = {
            }
 
 error: could not evaluate constant pattern
-  --> $DIR/const_refers_to_static_cross_crate.rs:34:9
+  --> $DIR/const_refers_to_static_cross_crate.rs:42:9
    |
 LL |         SLICE_MUT => true,
    |         ^^^^^^^^^
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/const_refers_to_static_cross_crate.rs:15:1
+  --> $DIR/const_refers_to_static_cross_crate.rs:17:1
    |
 LL | const U8_MUT: &u8 = {
    | ^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to a static variable in a constant
@@ -27,31 +42,31 @@ LL | const U8_MUT: &u8 = {
            }
 
 error: could not evaluate constant pattern
-  --> $DIR/const_refers_to_static_cross_crate.rs:42:9
+  --> $DIR/const_refers_to_static_cross_crate.rs:50:9
    |
 LL |         U8_MUT => true,
    |         ^^^^^^
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/const_refers_to_static_cross_crate.rs:22:15
+  --> $DIR/const_refers_to_static_cross_crate.rs:25:15
    |
 LL |     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
 
 error: could not evaluate constant pattern
-  --> $DIR/const_refers_to_static_cross_crate.rs:52:9
+  --> $DIR/const_refers_to_static_cross_crate.rs:60:9
    |
 LL |         U8_MUT2 => true,
    |         ^^^^^^^
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
    |
-LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
 
 error: could not evaluate constant pattern
-  --> $DIR/const_refers_to_static_cross_crate.rs:59:9
+  --> $DIR/const_refers_to_static_cross_crate.rs:67:9
    |
 LL |         U8_MUT3 => true,
    |         ^^^^^^^
@@ -59,61 +74,61 @@ LL |         U8_MUT3 => true,
 warning: skipping const checks
    |
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:12:15
+  --> $DIR/const_refers_to_static_cross_crate.rs:13:15
    |
 LL |     unsafe { &static_cross_crate::ZERO }
    |               ^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:12:15
+  --> $DIR/const_refers_to_static_cross_crate.rs:13:15
    |
 LL |     unsafe { &static_cross_crate::ZERO }
    |               ^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:17:15
+  --> $DIR/const_refers_to_static_cross_crate.rs:20:15
    |
 LL |     unsafe { &static_cross_crate::ZERO[0] }
    |               ^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:17:15
+  --> $DIR/const_refers_to_static_cross_crate.rs:20:15
    |
 LL |     unsafe { &static_cross_crate::ZERO[0] }
    |               ^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:17:15
+  --> $DIR/const_refers_to_static_cross_crate.rs:20:15
    |
 LL |     unsafe { &static_cross_crate::ZERO[0] }
    |               ^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:22:17
+  --> $DIR/const_refers_to_static_cross_crate.rs:25:17
    |
 LL |     unsafe { &(*static_cross_crate::ZERO_REF)[0] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
    |
-LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
    |
-LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
    |
-LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
    |
-LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+  --> $DIR/const_refers_to_static_cross_crate.rs:31:15
    |
-LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         match static_cross_crate::OPT_ZERO {
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 8 previous errors; 1 warning emitted
+error: aborting due to 8 previous errors; 2 warnings emitted
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
index bbaa32ddfd1..3eafa58d9f9 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs
@@ -7,13 +7,16 @@ extern crate static_cross_crate;
 
 // Sneaky: reference to a mutable static.
 // Allowing this would be a disaster for pattern matching, we could violate exhaustiveness checking!
-const SLICE_MUT: &[u8; 1] = { //~ ERROR undefined behavior to use this value
-//~| encountered a reference pointing to a static variable
+const SLICE_MUT: &[u8; 1] = {
+    //~^ ERROR undefined behavior to use this value
+    //~| encountered a reference pointing to a static variable
     unsafe { &static_cross_crate::ZERO }
+    //~^ WARN shared reference of mutable static is discouraged [static_mut_ref]
 };
 
-const U8_MUT: &u8 = { //~ ERROR undefined behavior to use this value
-//~| encountered a reference pointing to a static variable
+const U8_MUT: &u8 = {
+    //~^ ERROR undefined behavior to use this value
+    //~| encountered a reference pointing to a static variable
     unsafe { &static_cross_crate::ZERO[0] }
 };
 
@@ -24,9 +27,14 @@ const U8_MUT2: &u8 = {
     //~| constant accesses static
 };
 const U8_MUT3: &u8 = {
-    unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
-    //~^ ERROR evaluation of constant value failed
-    //~| constant accesses static
+    unsafe {
+        match static_cross_crate::OPT_ZERO {
+            //~^ ERROR evaluation of constant value failed
+            //~| constant accesses static
+            Some(ref u) => u,
+            None => panic!(),
+        }
+    }
 };
 
 pub fn test(x: &[u8; 1]) -> bool {
diff --git a/tests/ui/consts/promoted_const_call4.rs b/tests/ui/consts/promoted_const_call4.rs
index 82a17b7bf86..bb97957179f 100644
--- a/tests/ui/consts/promoted_const_call4.rs
+++ b/tests/ui/consts/promoted_const_call4.rs
@@ -4,7 +4,7 @@ use std::sync::atomic::*;
 
 static FLAG: AtomicBool = AtomicBool::new(false);
 
-struct NoisyDrop(&'static str);
+struct NoisyDrop(#[allow(dead_code)] &'static str);
 impl Drop for NoisyDrop {
     fn drop(&mut self) {
         FLAG.store(true, Ordering::SeqCst);
diff --git a/tests/ui/consts/rvalue-static-promotion.rs b/tests/ui/consts/rvalue-static-promotion.rs
index c48d9eae928..f42e8b70593 100644
--- a/tests/ui/consts/rvalue-static-promotion.rs
+++ b/tests/ui/consts/rvalue-static-promotion.rs
@@ -4,7 +4,7 @@ use std::cell::Cell;
 
 const NONE_CELL_STRING: Option<Cell<String>> = None;
 
-struct Foo<T>(#[allow(unused_tuple_struct_fields)] T);
+struct Foo<T>(#[allow(dead_code)] T);
 impl<T> Foo<T> {
     const FOO: Option<Box<T>> = None;
 }
diff --git a/tests/ui/consts/static_mut_containing_mut_ref.rs b/tests/ui/consts/static_mut_containing_mut_ref.rs
index df09c76c558..874aa59df0b 100644
--- a/tests/ui/consts/static_mut_containing_mut_ref.rs
+++ b/tests/ui/consts/static_mut_containing_mut_ref.rs
@@ -3,5 +3,6 @@
 static mut STDERR_BUFFER_SPACE: [u8; 42] = [0u8; 42];
 
 pub static mut STDERR_BUFFER: *mut [u8] = unsafe { &mut STDERR_BUFFER_SPACE };
+//~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
 
 fn main() {}
diff --git a/tests/ui/consts/static_mut_containing_mut_ref.stderr b/tests/ui/consts/static_mut_containing_mut_ref.stderr
new file mode 100644
index 00000000000..56ceba41cf8
--- /dev/null
+++ b/tests/ui/consts/static_mut_containing_mut_ref.stderr
@@ -0,0 +1,17 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/static_mut_containing_mut_ref.rs:5:52
+   |
+LL | pub static mut STDERR_BUFFER: *mut [u8] = unsafe { &mut STDERR_BUFFER_SPACE };
+   |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL | pub static mut STDERR_BUFFER: *mut [u8] = unsafe { addr_of_mut!(STDERR_BUFFER_SPACE) };
+   |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/consts/static_mut_containing_mut_ref2.mut_refs.stderr b/tests/ui/consts/static_mut_containing_mut_ref2.mut_refs.stderr
index 3d0de233569..bc32ecc2c35 100644
--- a/tests/ui/consts/static_mut_containing_mut_ref2.mut_refs.stderr
+++ b/tests/ui/consts/static_mut_containing_mut_ref2.mut_refs.stderr
@@ -1,9 +1,24 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/static_mut_containing_mut_ref2.rs:8:6
+   |
+LL |     *(&mut STDERR_BUFFER_SPACE) = 42;
+   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |     *addr_of_mut!(STDERR_BUFFER_SPACE) = 42;
+   |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 error[E0080]: could not evaluate static initializer
-  --> $DIR/static_mut_containing_mut_ref2.rs:7:45
+  --> $DIR/static_mut_containing_mut_ref2.rs:8:5
    |
-LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
-   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ modifying a static's initial value from another static's initializer
+LL |     *(&mut STDERR_BUFFER_SPACE) = 42;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ modifying a static's initial value from another static's initializer
 
-error: aborting due to 1 previous error
+error: aborting due to 1 previous error; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/static_mut_containing_mut_ref2.rs b/tests/ui/consts/static_mut_containing_mut_ref2.rs
index 61368546083..fa79a78eab4 100644
--- a/tests/ui/consts/static_mut_containing_mut_ref2.rs
+++ b/tests/ui/consts/static_mut_containing_mut_ref2.rs
@@ -4,8 +4,12 @@
 
 static mut STDERR_BUFFER_SPACE: u8 = 0;
 
-pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
-//[mut_refs]~^ ERROR could not evaluate static initializer
-//[stock]~^^ ERROR mutable references are not allowed in statics
+pub static mut STDERR_BUFFER: () = unsafe {
+    *(&mut STDERR_BUFFER_SPACE) = 42;
+    //[mut_refs]~^ ERROR could not evaluate static initializer
+    //[stock]~^^ ERROR mutable references are not allowed in statics
+    //[mut_refs]~^^^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
+    //[stock]~^^^^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
+};
 
 fn main() {}
diff --git a/tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr b/tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr
index 3d5b012d42f..c6e5b07e3b7 100644
--- a/tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr
+++ b/tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr
@@ -1,12 +1,27 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/static_mut_containing_mut_ref2.rs:8:6
+   |
+LL |     *(&mut STDERR_BUFFER_SPACE) = 42;
+   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |     *addr_of_mut!(STDERR_BUFFER_SPACE) = 42;
+   |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 error[E0658]: mutable references are not allowed in statics
-  --> $DIR/static_mut_containing_mut_ref2.rs:7:46
+  --> $DIR/static_mut_containing_mut_ref2.rs:8:6
    |
-LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
-   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     *(&mut STDERR_BUFFER_SPACE) = 42;
+   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
-error: aborting due to 1 previous error
+error: aborting due to 1 previous error; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/consts/transmute-const.rs b/tests/ui/consts/transmute-const.rs
index c5c3dfc4cc7..65e5700d083 100644
--- a/tests/ui/consts/transmute-const.rs
+++ b/tests/ui/consts/transmute-const.rs
@@ -3,7 +3,7 @@
 use std::mem;
 
 #[repr(transparent)]
-struct Foo(#[allow(unused_tuple_struct_fields)] u32);
+struct Foo(#[allow(dead_code)] u32);
 
 const TRANSMUTED_U32: u32 = unsafe { mem::transmute(Foo(3)) };
 
diff --git a/tests/ui/consts/validate_never_arrays.rs b/tests/ui/consts/validate_never_arrays.rs
index f96ca683926..71c1340e5f8 100644
--- a/tests/ui/consts/validate_never_arrays.rs
+++ b/tests/ui/consts/validate_never_arrays.rs
@@ -1,6 +1,6 @@
 // Strip out raw byte dumps to make comparison platform-independent:
 // normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
-// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
+// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?(<imm>)?─*╼ )+ *│.*" -> "HEX_DUMP"
 #![feature(never_type)]
 
 const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior
diff --git a/tests/ui/coroutine/check-resume-ty-lifetimes-2.rs b/tests/ui/coroutine/check-resume-ty-lifetimes-2.rs
new file mode 100644
index 00000000000..a316c50e867
--- /dev/null
+++ b/tests/ui/coroutine/check-resume-ty-lifetimes-2.rs
@@ -0,0 +1,35 @@
+#![feature(coroutine_trait)]
+#![feature(coroutines)]
+
+use std::ops::Coroutine;
+
+struct Contravariant<'a>(fn(&'a ()));
+struct Covariant<'a>(fn() -> &'a ());
+
+fn bad1<'short, 'long: 'short>() -> impl Coroutine<Covariant<'short>> {
+    |_: Covariant<'short>| {
+        let a: Covariant<'long> = yield ();
+        //~^ ERROR lifetime may not live long enough
+    }
+}
+
+fn bad2<'short, 'long: 'short>() -> impl Coroutine<Contravariant<'long>> {
+    |_: Contravariant<'long>| {
+        let a: Contravariant<'short> = yield ();
+        //~^ ERROR lifetime may not live long enough
+    }
+}
+
+fn good1<'short, 'long: 'short>() -> impl Coroutine<Covariant<'long>> {
+    |_: Covariant<'long>| {
+        let a: Covariant<'short> = yield ();
+    }
+}
+
+fn good2<'short, 'long: 'short>() -> impl Coroutine<Contravariant<'short>> {
+    |_: Contravariant<'short>| {
+        let a: Contravariant<'long> = yield ();
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/coroutine/check-resume-ty-lifetimes-2.stderr b/tests/ui/coroutine/check-resume-ty-lifetimes-2.stderr
new file mode 100644
index 00000000000..e0cbca2dd52
--- /dev/null
+++ b/tests/ui/coroutine/check-resume-ty-lifetimes-2.stderr
@@ -0,0 +1,36 @@
+error: lifetime may not live long enough
+  --> $DIR/check-resume-ty-lifetimes-2.rs:11:16
+   |
+LL | fn bad1<'short, 'long: 'short>() -> impl Coroutine<Covariant<'short>> {
+   |         ------  ----- lifetime `'long` defined here
+   |         |
+   |         lifetime `'short` defined here
+LL |     |_: Covariant<'short>| {
+LL |         let a: Covariant<'long> = yield ();
+   |                ^^^^^^^^^^^^^^^^ type annotation requires that `'short` must outlive `'long`
+   |
+   = help: consider adding the following bound: `'short: 'long`
+help: consider adding 'move' keyword before the nested closure
+   |
+LL |     move |_: Covariant<'short>| {
+   |     ++++
+
+error: lifetime may not live long enough
+  --> $DIR/check-resume-ty-lifetimes-2.rs:18:40
+   |
+LL | fn bad2<'short, 'long: 'short>() -> impl Coroutine<Contravariant<'long>> {
+   |         ------  ----- lifetime `'long` defined here
+   |         |
+   |         lifetime `'short` defined here
+LL |     |_: Contravariant<'long>| {
+LL |         let a: Contravariant<'short> = yield ();
+   |                                        ^^^^^^^^ yielding this value requires that `'short` must outlive `'long`
+   |
+   = help: consider adding the following bound: `'short: 'long`
+help: consider adding 'move' keyword before the nested closure
+   |
+LL |     move |_: Contravariant<'long>| {
+   |     ++++
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/coroutine/check-resume-ty-lifetimes.rs b/tests/ui/coroutine/check-resume-ty-lifetimes.rs
new file mode 100644
index 00000000000..add0b5080a8
--- /dev/null
+++ b/tests/ui/coroutine/check-resume-ty-lifetimes.rs
@@ -0,0 +1,27 @@
+#![feature(coroutine_trait)]
+#![feature(coroutines)]
+#![allow(unused)]
+
+use std::ops::Coroutine;
+use std::ops::CoroutineState;
+use std::pin::pin;
+
+fn mk_static(s: &str) -> &'static str {
+    let mut storage: Option<&'static str> = None;
+
+    let mut coroutine = pin!(|_: &str| {
+        let x: &'static str = yield ();
+        //~^ ERROR lifetime may not live long enough
+        storage = Some(x);
+    });
+
+    coroutine.as_mut().resume(s);
+    coroutine.as_mut().resume(s);
+
+    storage.unwrap()
+}
+
+fn main() {
+    let s = mk_static(&String::from("hello, world"));
+    println!("{s}");
+}
diff --git a/tests/ui/coroutine/check-resume-ty-lifetimes.stderr b/tests/ui/coroutine/check-resume-ty-lifetimes.stderr
new file mode 100644
index 00000000000..f373aa778a8
--- /dev/null
+++ b/tests/ui/coroutine/check-resume-ty-lifetimes.stderr
@@ -0,0 +1,11 @@
+error: lifetime may not live long enough
+  --> $DIR/check-resume-ty-lifetimes.rs:13:16
+   |
+LL | fn mk_static(s: &str) -> &'static str {
+   |                 - let's call the lifetime of this reference `'1`
+...
+LL |         let x: &'static str = yield ();
+   |                ^^^^^^^^^^^^ type annotation requires that `'1` must outlive `'static`
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/coroutine/gen_block.e2024.stderr b/tests/ui/coroutine/gen_block.e2024.stderr
index f250e2f79c7..e32f80dafa0 100644
--- a/tests/ui/coroutine/gen_block.e2024.stderr
+++ b/tests/ui/coroutine/gen_block.e2024.stderr
@@ -8,10 +8,10 @@ LL |     let _ = || yield true;
    = help: add `#![feature(coroutines)]` to the crate attributes to enable
 
 error[E0282]: type annotations needed
-  --> $DIR/gen_block.rs:6:17
+  --> $DIR/gen_block.rs:6:13
    |
 LL |     let x = gen {};
-   |                 ^^ cannot infer type
+   |             ^^^^^^ cannot infer type
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.mir.stderr b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.mir.stderr
deleted file mode 100644
index 11dc57bcf46..00000000000
--- a/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-45729-unsafe-in-coroutine.rs:8:9
-   |
-LL |         *(1 as *mut u32) = 42;
-   |         ^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.rs b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.rs
index 7961b58597c..dab9c81bc8f 100644
--- a/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.rs
+++ b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 #![feature(coroutines)]
 
 fn main() {
diff --git a/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.thir.stderr b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.stderr
index a61689a0df5..19949b42939 100644
--- a/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.thir.stderr
+++ b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.stderr
@@ -1,5 +1,5 @@
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-45729-unsafe-in-coroutine.rs:8:9
+  --> $DIR/issue-45729-unsafe-in-coroutine.rs:5:9
    |
 LL |         *(1 as *mut u32) = 42;
    |         ^^^^^^^^^^^^^^^^ dereference of raw pointer
diff --git a/tests/ui/coroutine/size-moved-locals.rs b/tests/ui/coroutine/size-moved-locals.rs
index 10f988cc066..fa657e3b275 100644
--- a/tests/ui/coroutine/size-moved-locals.rs
+++ b/tests/ui/coroutine/size-moved-locals.rs
@@ -18,7 +18,7 @@
 use std::ops::Coroutine;
 
 const FOO_SIZE: usize = 1024;
-struct Foo(#[allow(unused_tuple_struct_fields)] [u8; FOO_SIZE]);
+struct Foo(#[allow(dead_code)] [u8; FOO_SIZE]);
 
 impl Drop for Foo {
     fn drop(&mut self) {}
diff --git a/tests/ui/coroutine/sized-yield.stderr b/tests/ui/coroutine/sized-yield.stderr
index 40663ac12de..bbecaffa95a 100644
--- a/tests/ui/coroutine/sized-yield.stderr
+++ b/tests/ui/coroutine/sized-yield.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/sized-yield.rs:8:27
+  --> $DIR/sized-yield.rs:8:19
    |
 LL |       let mut gen = move || {
-   |  ___________________________^
+   |  ___________________^
 LL | |
 LL | |         yield s[..];
 LL | |     };
diff --git a/tests/ui/coroutine/static-mut-reference-across-yield.rs b/tests/ui/coroutine/static-mut-reference-across-yield.rs
index 07f810856a7..0ed849e0e7d 100644
--- a/tests/ui/coroutine/static-mut-reference-across-yield.rs
+++ b/tests/ui/coroutine/static-mut-reference-across-yield.rs
@@ -1,6 +1,4 @@
 // build-pass
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
 
 #![feature(coroutines)]
 
diff --git a/tests/ui/derive-uninhabited-enum-38885.rs b/tests/ui/derive-uninhabited-enum-38885.rs
index 0089453ef0f..c11df030025 100644
--- a/tests/ui/derive-uninhabited-enum-38885.rs
+++ b/tests/ui/derive-uninhabited-enum-38885.rs
@@ -9,7 +9,7 @@ enum Void {}
 
 #[derive(Debug)]
 enum Foo {
-    Bar(u8),
+    Bar(#[allow(dead_code)] u8),
     Void(Void), //~ WARN variant `Void` is never constructed
 }
 
diff --git a/tests/ui/derive-uninhabited-enum-38885.stderr b/tests/ui/derive-uninhabited-enum-38885.stderr
index 3fabf446dc3..bcd8f6b7b53 100644
--- a/tests/ui/derive-uninhabited-enum-38885.stderr
+++ b/tests/ui/derive-uninhabited-enum-38885.stderr
@@ -3,7 +3,7 @@ warning: variant `Void` is never constructed
    |
 LL | enum Foo {
    |      --- variant in this enum
-LL |     Bar(u8),
+LL |     Bar(#[allow(dead_code)] u8),
 LL |     Void(Void),
    |     ^^^^
    |
diff --git a/tests/ui/derives/issue-97343.rs b/tests/ui/derives/issue-97343.rs
index 6f0e4d55aeb..91f0aa376e9 100644
--- a/tests/ui/derives/issue-97343.rs
+++ b/tests/ui/derives/issue-97343.rs
@@ -2,6 +2,7 @@ use std::fmt::Debug;
 
 #[derive(Debug)]
 pub struct Irrelevant<Irrelevant> { //~ ERROR type arguments are not allowed on type parameter
+    //~^ ERROR `Irrelevant` must be used
     irrelevant: Irrelevant,
 }
 
diff --git a/tests/ui/derives/issue-97343.stderr b/tests/ui/derives/issue-97343.stderr
index efb2fb70f5a..45612ae6f47 100644
--- a/tests/ui/derives/issue-97343.stderr
+++ b/tests/ui/derives/issue-97343.stderr
@@ -16,6 +16,16 @@ LL | pub struct Irrelevant<Irrelevant> {
    |                       ^^^^^^^^^^
    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 1 previous error
+error[E0210]: type parameter `Irrelevant` must be used as the type parameter for some local type (e.g., `MyStruct<Irrelevant>`)
+  --> $DIR/issue-97343.rs:4:23
+   |
+LL | pub struct Irrelevant<Irrelevant> {
+   |                       ^^^^^^^^^^ type parameter `Irrelevant` must be used as the type parameter for some local type
+   |
+   = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
+   = note: only traits defined in the current crate can be implemented for a type parameter
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0109`.
+Some errors have detailed explanations: E0109, E0210.
+For more information about an error, try `rustc --explain E0109`.
diff --git a/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs b/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs
index 3480ccc1089..331d7298216 100644
--- a/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs
+++ b/tests/ui/deriving/deriving-clone-generic-tuple-struct.rs
@@ -2,7 +2,7 @@
 // pretty-expanded FIXME #23616
 
 #[derive(Clone)]
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct S<T>(T, ());
 
 pub fn main() {
diff --git a/tests/ui/deriving/deriving-copyclone.rs b/tests/ui/deriving/deriving-copyclone.rs
index f8403b1feac..099feceae81 100644
--- a/tests/ui/deriving/deriving-copyclone.rs
+++ b/tests/ui/deriving/deriving-copyclone.rs
@@ -23,7 +23,7 @@ impl Clone for Liar {
 
 /// This struct is actually Copy... at least, it thinks it is!
 #[derive(Copy, Clone)]
-struct Innocent(#[allow(unused_tuple_struct_fields)] Liar);
+struct Innocent(#[allow(dead_code)] Liar);
 
 impl Innocent {
     fn new() -> Self {
diff --git a/tests/ui/deriving/issue-58319.rs b/tests/ui/deriving/issue-58319.rs
index 8041bd5bb3c..754f5032d16 100644
--- a/tests/ui/deriving/issue-58319.rs
+++ b/tests/ui/deriving/issue-58319.rs
@@ -3,7 +3,7 @@ fn main() {}
 #[derive(Clone)]
 pub struct Little;
 #[derive(Clone)]
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 pub struct Big(
     Little,
     Little,
diff --git a/tests/ui/destructuring-assignment/struct_destructure_fail.stderr b/tests/ui/destructuring-assignment/struct_destructure_fail.stderr
index ae7b3d1e5a9..57851ed417e 100644
--- a/tests/ui/destructuring-assignment/struct_destructure_fail.stderr
+++ b/tests/ui/destructuring-assignment/struct_destructure_fail.stderr
@@ -12,11 +12,16 @@ error: functional record updates are not allowed in destructuring assignments
 LL |     Struct { a, ..d } = Struct { a: 1, b: 2 };
    |                   ^ help: consider removing the trailing pattern
 
-error: base expression required after `..`
+error[E0797]: base expression required after `..`
   --> $DIR/struct_destructure_fail.rs:15:19
    |
 LL |     Struct { a, .. };
-   |                   ^ add a base expression here
+   |                   ^
+   |
+help: add a base expression here
+   |
+LL |     Struct { a, ../* expr */ };
+   |                   ++++++++++
 
 error[E0026]: struct `Struct` does not have a field named `c`
   --> $DIR/struct_destructure_fail.rs:10:20
@@ -41,5 +46,5 @@ LL |     Struct { a, .. } = Struct { a: 1, b: 2 };
 
 error: aborting due to 5 previous errors
 
-Some errors have detailed explanations: E0026, E0027.
+Some errors have detailed explanations: E0026, E0027, E0797.
 For more information about an error, try `rustc --explain E0026`.
diff --git a/tests/ui/diagnostic-width/flag-json.rs b/tests/ui/diagnostic-width/flag-json.rs
index 51a1fb447c7..820f1a049e1 100644
--- a/tests/ui/diagnostic-width/flag-json.rs
+++ b/tests/ui/diagnostic-width/flag-json.rs
@@ -1,9 +1,9 @@
 // compile-flags: --diagnostic-width=20 --error-format=json
+// error-pattern:expected `()`, found integer
 
 // This test checks that `-Z output-width` effects the JSON error output by restricting it to an
 // arbitrarily low value so that the effect is visible.
 
 fn main() {
     let _: () = 42;
-    //~^ ERROR arguments to this function are incorrect
 }
diff --git a/tests/ui/diagnostic-width/flag-json.stderr b/tests/ui/diagnostic-width/flag-json.stderr
index f3bf4f97942..0a4b54ebc85 100644
--- a/tests/ui/diagnostic-width/flag-json.stderr
+++ b/tests/ui/diagnostic-width/flag-json.stderr
@@ -24,8 +24,8 @@ This error occurs when an expression was used in a place where the compiler
 expected an expression of a different type. It can occur in several cases, the
 most common being when calling a function and passing an argument which has a
 different type than the matching type in the function declaration.
-"},"level":"error","spans":[{"file_name":"$DIR/flag-json.rs","byte_start":243,"byte_end":245,"line_start":7,"line_end":7,"column_start":17,"column_end":19,"is_primary":true,"text":[{"text":"    let _: () = 42;","highlight_start":17,"highlight_end":19}],"label":"expected `()`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/flag-json.rs","byte_start":238,"byte_end":240,"line_start":7,"line_end":7,"column_start":12,"column_end":14,"is_primary":false,"text":[{"text":"    let _: () = 42;","highlight_start":12,"highlight_end":14}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0308]: mismatched types
-  --> $DIR/flag-json.rs:7:17
+"},"level":"error","spans":[{"file_name":"$DIR/flag-json.rs","byte_start":289,"byte_end":291,"line_start":8,"line_end":8,"column_start":17,"column_end":19,"is_primary":true,"text":[{"text":"    let _: () = 42;","highlight_start":17,"highlight_end":19}],"label":"expected `()`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/flag-json.rs","byte_start":284,"byte_end":286,"line_start":8,"line_end":8,"column_start":12,"column_end":14,"is_primary":false,"text":[{"text":"    let _: () = 42;","highlight_start":12,"highlight_end":14}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0308]: mismatched types
+  --> $DIR/flag-json.rs:8:17
    |
 LL | ..._: () = 42;
    |       --   ^^ expected `()`, found integer
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/auxiliary/other.rs b/tests/ui/diagnostic_namespace/on_unimplemented/auxiliary/other.rs
new file mode 100644
index 00000000000..884bab2800a
--- /dev/null
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/auxiliary/other.rs
@@ -0,0 +1,8 @@
+#![feature(diagnostic_namespace)]
+
+#[diagnostic::on_unimplemented(
+    message = "Message",
+    note = "Note",
+    label = "label"
+)]
+pub trait Foo {}
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs b/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs
new file mode 100644
index 00000000000..b39375a09f3
--- /dev/null
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.rs
@@ -0,0 +1,12 @@
+// aux-build:other.rs
+
+extern crate other;
+
+use other::Foo;
+
+fn take_foo(_: impl Foo) {}
+
+fn main() {
+    take_foo(());
+    //~^ERROR Message
+}
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.stderr
new file mode 100644
index 00000000000..a9968538d0d
--- /dev/null
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/error_is_shown_in_downstream_crates.stderr
@@ -0,0 +1,19 @@
+error[E0277]: Message
+  --> $DIR/error_is_shown_in_downstream_crates.rs:10:14
+   |
+LL |     take_foo(());
+   |     -------- ^^ label
+   |     |
+   |     required by a bound introduced by this call
+   |
+   = help: the trait `Foo` is not implemented for `()`
+   = note: Note
+note: required by a bound in `take_foo`
+  --> $DIR/error_is_shown_in_downstream_crates.rs:7:21
+   |
+LL | fn take_foo(_: impl Foo) {}
+   |                     ^^^ required by this bound in `take_foo`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/did_you_mean/bad-assoc-ty.rs b/tests/ui/did_you_mean/bad-assoc-ty.rs
index f787c416c2d..5a559b01ea2 100644
--- a/tests/ui/did_you_mean/bad-assoc-ty.rs
+++ b/tests/ui/did_you_mean/bad-assoc-ty.rs
@@ -71,6 +71,7 @@ enum N<F> where F: Fn() -> _ {
 union O<F> where F: Fn() -> _ {
 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for unions
     foo: F,
+    //~^ ERROR must implement `Copy`
 }
 
 trait P<F> where F: Fn() -> _ {
diff --git a/tests/ui/did_you_mean/bad-assoc-ty.stderr b/tests/ui/did_you_mean/bad-assoc-ty.stderr
index 5c0c7a0b94f..3c474d19d1d 100644
--- a/tests/ui/did_you_mean/bad-assoc-ty.stderr
+++ b/tests/ui/did_you_mean/bad-assoc-ty.stderr
@@ -299,7 +299,7 @@ LL | union O<F, T> where F: Fn() -> T {
    |          +++                   ~
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for traits
-  --> $DIR/bad-assoc-ty.rs:76:29
+  --> $DIR/bad-assoc-ty.rs:77:29
    |
 LL | trait P<F> where F: Fn() -> _ {
    |                             ^ not allowed in type signatures
@@ -310,7 +310,7 @@ LL | trait P<F, T> where F: Fn() -> T {
    |          +++                   ~
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
-  --> $DIR/bad-assoc-ty.rs:81:38
+  --> $DIR/bad-assoc-ty.rs:82:38
    |
 LL |     fn foo<F>(_: F) where F: Fn() -> _ {}
    |                                      ^ not allowed in type signatures
@@ -320,7 +320,19 @@ help: use type parameters instead
 LL |     fn foo<F, T>(_: F) where F: Fn() -> T {}
    |             +++                         ~
 
-error: aborting due to 28 previous errors; 1 warning emitted
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/bad-assoc-ty.rs:73:5
+   |
+LL |     foo: F,
+   |     ^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL |     foo: std::mem::ManuallyDrop<F>,
+   |          +++++++++++++++++++++++ +
+
+error: aborting due to 29 previous errors; 1 warning emitted
 
-Some errors have detailed explanations: E0121, E0223.
+Some errors have detailed explanations: E0121, E0223, E0740.
 For more information about an error, try `rustc --explain E0121`.
diff --git a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed
index 4963790c35d..eebe8d6e3f3 100644
--- a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed
+++ b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed
@@ -8,6 +8,7 @@ trait Foo<T>: Sized {
 impl Foo<usize> for () {
     fn bar(i: i32, t: usize, s: &()) -> (usize, i32) {
         //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
+        //~| ERROR type annotations needed
         (1, 2)
     }
 }
diff --git a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs
index ddf39c9c861..aa7510821af 100644
--- a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs
+++ b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.rs
@@ -8,6 +8,7 @@ trait Foo<T>: Sized {
 impl Foo<usize> for () {
     fn bar(i: _, t: _, s: _) -> _ {
         //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
+        //~| ERROR type annotations needed
         (1, 2)
     }
 }
diff --git a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.stderr b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.stderr
index 2ca6436bb99..6f38def6998 100644
--- a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.stderr
+++ b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.stderr
@@ -13,6 +13,13 @@ help: try replacing `_` with the types in the corresponding trait method signatu
 LL |     fn bar(i: i32, t: usize, s: &()) -> (usize, i32) {
    |               ~~~     ~~~~~     ~~~     ~~~~~~~~~~~~
 
-error: aborting due to 1 previous error
+error[E0282]: type annotations needed
+  --> $DIR/replace-impl-infer-ty-from-trait.rs:9:12
+   |
+LL |     fn bar(i: _, t: _, s: _) -> _ {
+   |            ^ cannot infer type
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0121`.
+Some errors have detailed explanations: E0121, E0282.
+For more information about an error, try `rustc --explain E0121`.
diff --git a/tests/ui/drop/dropck-eyepatch-reorder.rs b/tests/ui/drop/dropck-eyepatch-reorder.rs
index 0d7af3d4f61..4a56c45aa92 100644
--- a/tests/ui/drop/dropck-eyepatch-reorder.rs
+++ b/tests/ui/drop/dropck-eyepatch-reorder.rs
@@ -12,10 +12,10 @@ trait Foo { fn foo(&self, _: &str); }
 
 struct Dt<A: Foo>(&'static str, A);
 struct Dr<'a, B:'a+Foo>(&'static str, &'a B);
-struct Pt<A: Foo, B: Foo>(&'static str, #[allow(unused_tuple_struct_fields)] A, B);
-struct Pr<'a, 'b, B:'a+'b+Foo>(&'static str, #[allow(unused_tuple_struct_fields)] &'a B, &'b B);
-struct St<A: Foo>(&'static str, #[allow(unused_tuple_struct_fields)] A);
-struct Sr<'a, B:'a+Foo>(&'static str, #[allow(unused_tuple_struct_fields)] &'a B);
+struct Pt<A: Foo, B: Foo>(&'static str, #[allow(dead_code)] A, B);
+struct Pr<'a, 'b, B:'a+'b+Foo>(&'static str, #[allow(dead_code)] &'a B, &'b B);
+struct St<A: Foo>(&'static str, #[allow(dead_code)] A);
+struct Sr<'a, B:'a+Foo>(&'static str, #[allow(dead_code)] &'a B);
 
 impl<A: Foo> Drop for Dt<A> {
     fn drop(&mut self) { println!("drop {}", self.0); self.1.foo(self.0); }
diff --git a/tests/ui/drop/dropck-eyepatch.rs b/tests/ui/drop/dropck-eyepatch.rs
index 3c4840d5c7a..ff5a52b906b 100644
--- a/tests/ui/drop/dropck-eyepatch.rs
+++ b/tests/ui/drop/dropck-eyepatch.rs
@@ -35,10 +35,10 @@ trait Foo { fn foo(&self, _: &str); }
 
 struct Dt<A: Foo>(&'static str, A);
 struct Dr<'a, B:'a+Foo>(&'static str, &'a B);
-struct Pt<A,B: Foo>(&'static str, #[allow(unused_tuple_struct_fields)] A, B);
-struct Pr<'a, 'b, B:'a+'b+Foo>(&'static str, #[allow(unused_tuple_struct_fields)] &'a B, &'b B);
-struct St<A: Foo>(&'static str, #[allow(unused_tuple_struct_fields)] A);
-struct Sr<'a, B:'a+Foo>(&'static str, #[allow(unused_tuple_struct_fields)] &'a B);
+struct Pt<A,B: Foo>(&'static str, #[allow(dead_code)] A, B);
+struct Pr<'a, 'b, B:'a+'b+Foo>(&'static str, #[allow(dead_code)] &'a B, &'b B);
+struct St<A: Foo>(&'static str, #[allow(dead_code)] A);
+struct Sr<'a, B:'a+Foo>(&'static str, #[allow(dead_code)] &'a B);
 
 impl<A: Foo> Drop for Dt<A> {
     fn drop(&mut self) { println!("drop {}", self.0); self.1.foo(self.0); }
diff --git a/tests/ui/drop/dynamic-drop.rs b/tests/ui/drop/dynamic-drop.rs
index d35913ed641..4745cceb516 100644
--- a/tests/ui/drop/dynamic-drop.rs
+++ b/tests/ui/drop/dynamic-drop.rs
@@ -103,7 +103,7 @@ fn dynamic_drop(a: &Allocator, c: bool) {
     };
 }
 
-struct TwoPtrs<'a>(Ptr<'a>, #[allow(unused_tuple_struct_fields)] Ptr<'a>);
+struct TwoPtrs<'a>(Ptr<'a>, #[allow(dead_code)] Ptr<'a>);
 fn struct_dynamic_drop(a: &Allocator, c0: bool, c1: bool, c: bool) {
     for i in 0..2 {
         let x;
diff --git a/tests/ui/drop/issue-23338-ensure-param-drop-order.rs b/tests/ui/drop/issue-23338-ensure-param-drop-order.rs
index a99f260dde3..52603744c45 100644
--- a/tests/ui/drop/issue-23338-ensure-param-drop-order.rs
+++ b/tests/ui/drop/issue-23338-ensure-param-drop-order.rs
@@ -13,38 +13,39 @@ pub fn main() {
     d::println("created empty log");
     test(&log);
 
-    assert_eq!(&log.borrow()[..],
-               [
-                   //                                    created empty log
-                   //    +-- Make D(da_0, 0)
-                   //    | +-- Make D(de_1, 1)
-                   //    | |                             calling foo
-                   //    | |                             entered foo
-                   //    | | +-- Make D(de_2, 2)
-                   //    | | | +-- Make D(da_1, 3)
-                   //    | | | | +-- Make D(de_3, 4)
-                   //    | | | | | +-- Make D(de_4, 5)
-                   3, // | | | +-- Drop D(da_1, 3)
-                   //    | | |   | |
-                   4, // | | |   +-- Drop D(de_3, 4)
-                   //    | | |     |
-                   //    | | |     |                     eval tail of foo
-                   //    | | | +-- Make D(de_5, 6)
-                   //    | | | | +-- Make D(de_6, 7)
-                   5, // | | | | | +-- Drop D(de_4, 5)
-                   //    | | | | |
-                   2, // | | +-- Drop D(de_2, 2)
-                   //    | |   | |
-                   6, // | |   +-- Drop D(de_5, 6)
-                   //    | |     |
-                   1, // | +-- Drop D(de_1, 1)
-                   //    |       |
-                   0, // +-- Drop D(da_0, 0)
-                   //            |
-                   //            |                       result D(de_6, 7)
-                   7 //          +-- Drop D(de_6, 7)
-
-                       ]);
+    assert_eq!(
+        &log.borrow()[..],
+        [
+            //                                    created empty log
+            //    +-- Make D(da_0, 0)
+            //    | +-- Make D(de_1, 1)
+            //    | |                             calling foo
+            //    | |                             entered foo
+            //    | | +-- Make D(de_2, 2)
+            //    | | | +-- Make D(da_1, 3)
+            //    | | | | +-- Make D(de_3, 4)
+            //    | | | | | +-- Make D(de_4, 5)
+            3, // | | | +-- Drop D(da_1, 3)
+            //    | | |   | |
+            4, // | | |   +-- Drop D(de_3, 4)
+            //    | | |     |
+            //    | | |     |                     eval tail of foo
+            //    | | | +-- Make D(de_5, 6)
+            //    | | | | +-- Make D(de_6, 7)
+            5, // | | | | | +-- Drop D(de_4, 5)
+            //    | | | | |
+            2, // | | +-- Drop D(de_2, 2)
+            //    | |   | |
+            6, // | |   +-- Drop D(de_5, 6)
+            //    | |     |
+            1, // | +-- Drop D(de_1, 1)
+            //    |       |
+            0, // +-- Drop D(da_0, 0)
+            //            |
+            //            |                       result D(de_6, 7)
+            7 //          +-- Drop D(de_6, 7)
+        ]
+    );
 }
 
 fn test<'a>(log: d::Log<'a>) {
@@ -57,13 +58,13 @@ fn test<'a>(log: d::Log<'a>) {
 
 fn foo<'a>(da0: D<'a>, de1: D<'a>) -> D<'a> {
     d::println("entered foo");
-    let de2 = de1.incr();      // creates D(de_2, 2)
+    let de2 = de1.incr(); // creates D(de_2, 2)
     let de4 = {
         let _da1 = da0.incr(); // creates D(da_1, 3)
-        de2.incr().incr()      // creates D(de_3, 4) and D(de_4, 5)
+        de2.incr().incr() // creates D(de_3, 4) and D(de_4, 5)
     };
     d::println("eval tail of foo");
-    de4.incr().incr()          // creates D(de_5, 6) and D(de_6, 7)
+    de4.incr().incr() // creates D(de_5, 6) and D(de_6, 7)
 }
 
 // This module provides simultaneous printouts of the dynamic extents
@@ -74,9 +75,9 @@ const PREF_INDENT: u32 = 16;
 
 pub mod d {
     #![allow(unused_parens)]
+    use std::cell::RefCell;
     use std::fmt;
     use std::mem;
-    use std::cell::RefCell;
 
     static mut counter: u32 = 0;
     static mut trails: u64 = 0;
@@ -89,7 +90,8 @@ pub mod d {
 
     pub fn max_width() -> u32 {
         unsafe {
-            (mem::size_of_val(&trails)*8) as u32
+            (mem::size_of_val(&trails) * 8) as u32
+            //~^ WARN shared reference of mutable static is discouraged [static_mut_ref]
         }
     }
 
@@ -123,7 +125,11 @@ pub mod d {
     }
 
     pub struct D<'a> {
-        name: &'static str, i: u32, uid: u32, trail: u32, log: Log<'a>
+        name: &'static str,
+        i: u32,
+        uid: u32,
+        trail: u32,
+        log: Log<'a>,
     }
 
     impl<'a> fmt::Display for D<'a> {
@@ -139,9 +145,7 @@ pub mod d {
                 let ctr = counter;
                 counter += 1;
                 trails |= (1 << trail);
-                let ret = D {
-                    name: name, i: i, log: log, uid: ctr, trail: trail
-                };
+                let ret = D { name: name, i: i, log: log, uid: ctr, trail: trail };
                 indent_println(trail, &format!("+-- Make {}", ret));
                 ret
             }
@@ -153,7 +157,9 @@ pub mod d {
 
     impl<'a> Drop for D<'a> {
         fn drop(&mut self) {
-            unsafe { trails &= !(1 << self.trail); };
+            unsafe {
+                trails &= !(1 << self.trail);
+            };
             self.log.borrow_mut().push(self.uid);
             indent_println(self.trail, &format!("+-- Drop {}", self));
             indent_println(::PREF_INDENT, "");
diff --git a/tests/ui/drop/issue-23338-ensure-param-drop-order.stderr b/tests/ui/drop/issue-23338-ensure-param-drop-order.stderr
new file mode 100644
index 00000000000..fd36ccbcbee
--- /dev/null
+++ b/tests/ui/drop/issue-23338-ensure-param-drop-order.stderr
@@ -0,0 +1,17 @@
+warning: shared reference of mutable static is discouraged
+  --> $DIR/issue-23338-ensure-param-drop-order.rs:93:31
+   |
+LL |             (mem::size_of_val(&trails) * 8) as u32
+   |                               ^^^^^^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |             (mem::size_of_val(addr_of!(trails)) * 8) as u32
+   |                               ~~~~~~~~~~~~~~~~
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/dropck/issue-24805-dropck-itemless.rs b/tests/ui/dropck/issue-24805-dropck-itemless.rs
index 45761b61c3e..4d71389351b 100644
--- a/tests/ui/dropck/issue-24805-dropck-itemless.rs
+++ b/tests/ui/dropck/issue-24805-dropck-itemless.rs
@@ -19,7 +19,7 @@ impl<'a, T> UserDefined for &'a T { }
 //   ```
 macro_rules! impl_drop {
     ($Bound:ident, $Id:ident) => {
-        struct $Id<T: $Bound>(#[allow(unused_tuple_struct_fields)] T);
+        struct $Id<T: $Bound>(#[allow(dead_code)] T);
         unsafe impl <#[may_dangle] T: $Bound> Drop for $Id<T> {
             fn drop(&mut self) { }
         }
diff --git a/tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs b/tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs
index 04d0d32033a..d2b620f6940 100644
--- a/tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs
+++ b/tests/ui/dropck/issue-28498-ugeh-with-passed-to-fn.rs
@@ -21,7 +21,7 @@ impl Drop for ScribbleOnDrop {
     }
 }
 
-struct Foo<T>(u32, T, #[allow(unused_tuple_struct_fields)] Box<for <'r> fn(&'r T) -> String>);
+struct Foo<T>(u32, T, #[allow(dead_code)] Box<for <'r> fn(&'r T) -> String>);
 
 unsafe impl<#[may_dangle] T> Drop for Foo<T> {
     fn drop(&mut self) {
diff --git a/tests/ui/dyn-keyword/dyn-2021-edition-error.rs b/tests/ui/dyn-keyword/dyn-2021-edition-error.rs
index 0f05d8753ea..bc1bed8a9a4 100644
--- a/tests/ui/dyn-keyword/dyn-2021-edition-error.rs
+++ b/tests/ui/dyn-keyword/dyn-2021-edition-error.rs
@@ -4,6 +4,7 @@ fn function(x: &SomeTrait, y: Box<SomeTrait>) {
     //~^ ERROR trait objects must include the `dyn` keyword
     //~| ERROR trait objects must include the `dyn` keyword
     let _x: &SomeTrait = todo!();
+    //~^ ERROR trait objects must include the `dyn` keyword
 }
 
 trait SomeTrait {}
diff --git a/tests/ui/dyn-keyword/dyn-2021-edition-error.stderr b/tests/ui/dyn-keyword/dyn-2021-edition-error.stderr
index 08ee77116f0..b39689afd1c 100644
--- a/tests/ui/dyn-keyword/dyn-2021-edition-error.stderr
+++ b/tests/ui/dyn-keyword/dyn-2021-edition-error.stderr
@@ -20,6 +20,17 @@ help: add `dyn` keyword before this trait
 LL | fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
    |                                   +++
 
-error: aborting due to 2 previous errors
+error[E0782]: trait objects must include the `dyn` keyword
+  --> $DIR/dyn-2021-edition-error.rs:6:14
+   |
+LL |     let _x: &SomeTrait = todo!();
+   |              ^^^^^^^^^
+   |
+help: add `dyn` keyword before this trait
+   |
+LL |     let _x: &dyn SomeTrait = todo!();
+   |              +++
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0782`.
diff --git a/tests/ui/dyn-star/drop.rs b/tests/ui/dyn-star/drop.rs
index 1478498c0a9..1acfe2f2d1c 100644
--- a/tests/ui/dyn-star/drop.rs
+++ b/tests/ui/dyn-star/drop.rs
@@ -6,7 +6,7 @@
 use std::fmt::Debug;
 
 #[derive(Debug)]
-struct Foo(usize);
+struct Foo(#[allow(dead_code)] usize);
 
 impl Drop for Foo {
     fn drop(&mut self) {
diff --git a/tests/ui/dyn-star/union.rs b/tests/ui/dyn-star/union.rs
new file mode 100644
index 00000000000..ad3a85a937a
--- /dev/null
+++ b/tests/ui/dyn-star/union.rs
@@ -0,0 +1,16 @@
+#![feature(dyn_star)]
+//~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
+
+union Union {
+    x: usize,
+}
+
+trait Trait {}
+impl Trait for Union {}
+
+fn bar(_: dyn* Trait) {}
+
+fn main() {
+    bar(Union { x: 0usize });
+    //~^ ERROR `Union` needs to have the same ABI as a pointer
+}
diff --git a/tests/ui/dyn-star/union.stderr b/tests/ui/dyn-star/union.stderr
new file mode 100644
index 00000000000..906eb4f5163
--- /dev/null
+++ b/tests/ui/dyn-star/union.stderr
@@ -0,0 +1,20 @@
+warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/union.rs:1:12
+   |
+LL | #![feature(dyn_star)]
+   |            ^^^^^^^^
+   |
+   = note: see issue #102425 <https://github.com/rust-lang/rust/issues/102425> for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+error[E0277]: `Union` needs to have the same ABI as a pointer
+  --> $DIR/union.rs:14:9
+   |
+LL |     bar(Union { x: 0usize });
+   |         ^^^^^^^^^^^^^^^^^^^ `Union` needs to be a pointer-like type
+   |
+   = help: the trait `PointerLike` is not implemented for `Union`
+
+error: aborting due to 1 previous error; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/editions/auxiliary/edition-kw-macro-2015.rs b/tests/ui/editions/auxiliary/edition-kw-macro-2015.rs
index 7cfd128f2bf..a4a2b156e13 100644
--- a/tests/ui/editions/auxiliary/edition-kw-macro-2015.rs
+++ b/tests/ui/editions/auxiliary/edition-kw-macro-2015.rs
@@ -26,3 +26,8 @@ macro_rules! consumes_async_raw {
 macro_rules! passes_ident {
     ($i: ident) => ($i)
 }
+
+#[macro_export]
+macro_rules! passes_tt {
+    ($i: tt) => ($i)
+}
diff --git a/tests/ui/editions/auxiliary/edition-kw-macro-2018.rs b/tests/ui/editions/auxiliary/edition-kw-macro-2018.rs
index d07c0218db3..02db38103d2 100644
--- a/tests/ui/editions/auxiliary/edition-kw-macro-2018.rs
+++ b/tests/ui/editions/auxiliary/edition-kw-macro-2018.rs
@@ -26,3 +26,8 @@ macro_rules! consumes_async_raw {
 macro_rules! passes_ident {
     ($i: ident) => ($i)
 }
+
+#[macro_export]
+macro_rules! passes_tt {
+    ($i: tt) => ($i)
+}
diff --git a/tests/ui/editions/edition-keywords-2015-2015-parsing.rs b/tests/ui/editions/edition-keywords-2015-2015-parsing.rs
index d1752a7ec71..3574bc81515 100644
--- a/tests/ui/editions/edition-keywords-2015-2015-parsing.rs
+++ b/tests/ui/editions/edition-keywords-2015-2015-parsing.rs
@@ -19,6 +19,8 @@ pub fn check_async() {
 
     if passes_ident!(async) == 1 {} // OK
     if passes_ident!(r#async) == 1 {} // OK
+    if passes_tt!(async) == 1 {} // OK
+    if passes_tt!(r#async) == 1 {} // OK
     module::async(); // OK
     module::r#async(); // OK
 }
diff --git a/tests/ui/editions/edition-keywords-2015-2015.rs b/tests/ui/editions/edition-keywords-2015-2015.rs
index 943d203b806..77a2cb2e6de 100644
--- a/tests/ui/editions/edition-keywords-2015-2015.rs
+++ b/tests/ui/editions/edition-keywords-2015-2015.rs
@@ -20,6 +20,8 @@ pub fn check_async() {
 
     if passes_ident!(async) == 1 {} // OK
     if passes_ident!(r#async) == 1 {} // OK
+    if passes_tt!(async) == 1 {} // OK
+    if passes_tt!(r#async) == 1 {} // OK
     one_async::async(); // OK
     one_async::r#async(); // OK
     two_async::async(); // OK
diff --git a/tests/ui/editions/edition-keywords-2015-2018-parsing.rs b/tests/ui/editions/edition-keywords-2015-2018-parsing.rs
index 44455f43856..49f8562a6b1 100644
--- a/tests/ui/editions/edition-keywords-2015-2018-parsing.rs
+++ b/tests/ui/editions/edition-keywords-2015-2018-parsing.rs
@@ -19,6 +19,8 @@ pub fn check_async() {
 
     if passes_ident!(async) == 1 {} // OK
     if passes_ident!(r#async) == 1 {} // OK
+    if passes_tt!(async) == 1 {} // OK
+    if passes_tt!(r#async) == 1 {} // OK
     module::async(); // OK
     module::r#async(); // OK
 }
diff --git a/tests/ui/editions/edition-keywords-2015-2018.rs b/tests/ui/editions/edition-keywords-2015-2018.rs
index 8c3397c951d..a431a06bd10 100644
--- a/tests/ui/editions/edition-keywords-2015-2018.rs
+++ b/tests/ui/editions/edition-keywords-2015-2018.rs
@@ -20,6 +20,8 @@ pub fn check_async() {
 
     if passes_ident!(async) == 1 {} // OK
     if passes_ident!(r#async) == 1 {} // OK
+    if passes_tt!(async) == 1 {} // OK
+    if passes_tt!(r#async) == 1 {} // OK
     // one_async::async(); // ERROR, unresolved name
     // one_async::r#async(); // ERROR, unresolved name
     two_async::async(); // OK
diff --git a/tests/ui/editions/edition-keywords-2018-2015-parsing.rs b/tests/ui/editions/edition-keywords-2018-2015-parsing.rs
index d5ed9fb9a28..8472430361f 100644
--- a/tests/ui/editions/edition-keywords-2018-2015-parsing.rs
+++ b/tests/ui/editions/edition-keywords-2018-2015-parsing.rs
@@ -21,8 +21,10 @@ pub fn check_async() {
     r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
     r#async = consumes_async_raw!(r#async); // OK
 
-    if passes_ident!(async) == 1 {}
+    if passes_ident!(async) == 1 {} // FIXME: Edition hygiene bug, async here is 2018 and reserved
     if passes_ident!(r#async) == 1 {} // OK
+    if passes_tt!(async) == 1 {} //~ ERROR macro expansion ends with an incomplete expression
+    if passes_tt!(r#async) == 1 {} // OK
     module::async(); //~ ERROR expected identifier, found keyword `async`
     module::r#async(); // OK
 
diff --git a/tests/ui/editions/edition-keywords-2018-2015-parsing.stderr b/tests/ui/editions/edition-keywords-2018-2015-parsing.stderr
index 1a4a94e9733..42db75f6659 100644
--- a/tests/ui/editions/edition-keywords-2018-2015-parsing.stderr
+++ b/tests/ui/editions/edition-keywords-2018-2015-parsing.stderr
@@ -10,7 +10,7 @@ LL |     let mut r#async = 1;
    |             ++
 
 error: expected identifier, found keyword `async`
-  --> $DIR/edition-keywords-2018-2015-parsing.rs:26:13
+  --> $DIR/edition-keywords-2018-2015-parsing.rs:28:13
    |
 LL |     module::async();
    |             ^^^^^ expected identifier, found keyword
@@ -52,17 +52,23 @@ LL |     ($i: ident) => ($i)
    |
   ::: $DIR/edition-keywords-2018-2015-parsing.rs:24:8
    |
-LL |     if passes_ident!(async) == 1 {}
+LL |     if passes_ident!(async) == 1 {} // FIXME: Edition hygiene bug, async here is 2018 and reserved
    |        -------------------- in this macro invocation
 
+error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
+  --> $DIR/edition-keywords-2018-2015-parsing.rs:26:24
+   |
+LL |     if passes_tt!(async) == 1 {}
+   |                        ^ expected one of `move`, `|`, or `||`
+
 error[E0308]: mismatched types
-  --> $DIR/edition-keywords-2018-2015-parsing.rs:29:33
+  --> $DIR/edition-keywords-2018-2015-parsing.rs:31:33
    |
 LL |     let _recovery_witness: () = 0;
    |                            --   ^ expected `()`, found integer
    |                            |
    |                            expected due to this
 
-error: aborting due to 6 previous errors
+error: aborting due to 7 previous errors
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/editions/edition-keywords-2018-2015.rs b/tests/ui/editions/edition-keywords-2018-2015.rs
index 2cb2dfb18a0..4a02f867172 100644
--- a/tests/ui/editions/edition-keywords-2018-2015.rs
+++ b/tests/ui/editions/edition-keywords-2018-2015.rs
@@ -18,6 +18,8 @@ pub fn check_async() {
 
     // if passes_ident!(async) == 1 {} // ERROR, reserved
     if passes_ident!(r#async) == 1 {} // OK
+    // if passes_tt!(async) == 1 {} // ERROR, reserved
+    if passes_tt!(r#async) == 1 {} // OK
     // one_async::async(); // ERROR, reserved
     one_async::r#async(); // OK
     // two_async::async(); // ERROR, reserved
diff --git a/tests/ui/editions/edition-keywords-2018-2018-parsing.rs b/tests/ui/editions/edition-keywords-2018-2018-parsing.rs
index 044ab249f2c..c0d8927d059 100644
--- a/tests/ui/editions/edition-keywords-2018-2018-parsing.rs
+++ b/tests/ui/editions/edition-keywords-2018-2018-parsing.rs
@@ -12,6 +12,13 @@ mod module {
     pub fn r#async() {}
 }
 
+macro_rules! local_passes_ident {
+    ($i: ident) => ($i) //~ ERROR macro expansion ends with an incomplete expression
+}
+macro_rules! local_passes_tt {
+    ($i: tt) => ($i) //~ ERROR macro expansion ends with an incomplete expression
+}
+
 pub fn check_async() {
     let mut async = 1; //~ ERROR expected identifier, found keyword `async`
     let mut r#async = 1; // OK
@@ -21,8 +28,14 @@ pub fn check_async() {
     r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
     r#async = consumes_async_raw!(r#async); // OK
 
-    if passes_ident!(async) == 1 {}
+    if passes_ident!(async) == 1 {} // FIXME: Edition hygiene bug, async here is 2018 and reserved
     if passes_ident!(r#async) == 1 {} // OK
+    if passes_tt!(async) == 1 {} //~ ERROR macro expansion ends with an incomplete expression
+    if passes_tt!(r#async) == 1 {} // OK
+    if local_passes_ident!(async) == 1 {} // Error reported above in the macro
+    if local_passes_ident!(r#async) == 1 {} // OK
+    if local_passes_tt!(async) == 1 {} // Error reported above in the macro
+    if local_passes_tt!(r#async) == 1 {} // OK
     module::async(); //~ ERROR expected identifier, found keyword `async`
     module::r#async(); // OK
 
diff --git a/tests/ui/editions/edition-keywords-2018-2018-parsing.stderr b/tests/ui/editions/edition-keywords-2018-2018-parsing.stderr
index 19eb7ac9823..6f08cff433b 100644
--- a/tests/ui/editions/edition-keywords-2018-2018-parsing.stderr
+++ b/tests/ui/editions/edition-keywords-2018-2018-parsing.stderr
@@ -1,5 +1,5 @@
 error: expected identifier, found keyword `async`
-  --> $DIR/edition-keywords-2018-2018-parsing.rs:16:13
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:23:13
    |
 LL |     let mut async = 1;
    |             ^^^^^ expected identifier, found keyword
@@ -10,7 +10,7 @@ LL |     let mut r#async = 1;
    |             ++
 
 error: expected identifier, found keyword `async`
-  --> $DIR/edition-keywords-2018-2018-parsing.rs:26:13
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:39:13
    |
 LL |     module::async();
    |             ^^^^^ expected identifier, found keyword
@@ -21,7 +21,7 @@ LL |     module::r#async();
    |             ++
 
 error: no rules expected the token `r#async`
-  --> $DIR/edition-keywords-2018-2018-parsing.rs:20:31
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:27:31
    |
 LL |     r#async = consumes_async!(r#async);
    |                               ^^^^^^^ no rules expected this token in macro call
@@ -33,7 +33,7 @@ LL |     (async) => (1)
    |      ^^^^^
 
 error: no rules expected the token `async`
-  --> $DIR/edition-keywords-2018-2018-parsing.rs:21:35
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:28:35
    |
 LL |     r#async = consumes_async_raw!(async);
    |                                   ^^^^^ no rules expected this token in macro call
@@ -50,19 +50,37 @@ error: macro expansion ends with an incomplete expression: expected one of `move
 LL |     ($i: ident) => ($i)
    |                       ^ expected one of `move`, `|`, or `||`
    |
-  ::: $DIR/edition-keywords-2018-2018-parsing.rs:24:8
+  ::: $DIR/edition-keywords-2018-2018-parsing.rs:31:8
    |
-LL |     if passes_ident!(async) == 1 {}
+LL |     if passes_ident!(async) == 1 {} // FIXME: Edition hygiene bug, async here is 2018 and reserved
    |        -------------------- in this macro invocation
 
+error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:33:24
+   |
+LL |     if passes_tt!(async) == 1 {}
+   |                        ^ expected one of `move`, `|`, or `||`
+
+error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:16:23
+   |
+LL |     ($i: ident) => ($i)
+   |                       ^ expected one of `move`, `|`, or `||`
+
+error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:19:20
+   |
+LL |     ($i: tt) => ($i)
+   |                    ^ expected one of `move`, `|`, or `||`
+
 error[E0308]: mismatched types
-  --> $DIR/edition-keywords-2018-2018-parsing.rs:29:33
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:42:33
    |
 LL |     let _recovery_witness: () = 0;
    |                            --   ^ expected `()`, found integer
    |                            |
    |                            expected due to this
 
-error: aborting due to 6 previous errors
+error: aborting due to 9 previous errors
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/editions/edition-keywords-2018-2018.rs b/tests/ui/editions/edition-keywords-2018-2018.rs
index 5043440aa16..e7294326137 100644
--- a/tests/ui/editions/edition-keywords-2018-2018.rs
+++ b/tests/ui/editions/edition-keywords-2018-2018.rs
@@ -18,6 +18,8 @@ pub fn check_async() {
 
     // if passes_ident!(async) == 1 {} // ERROR, reserved
     if passes_ident!(r#async) == 1 {} // OK
+    // if passes_tt!(async) == 1 {} // ERROR, reserved
+    if passes_tt!(r#async) == 1 {} // OK
     // one_async::async(); // ERROR, reserved
     // one_async::r#async(); // ERROR, unresolved name
     // two_async::async(); // ERROR, reserved
diff --git a/tests/ui/enum-discriminant/discriminant_value-wrapper.rs b/tests/ui/enum-discriminant/discriminant_value-wrapper.rs
index 8e162d5c455..1f6bb0cdc3a 100644
--- a/tests/ui/enum-discriminant/discriminant_value-wrapper.rs
+++ b/tests/ui/enum-discriminant/discriminant_value-wrapper.rs
@@ -4,7 +4,7 @@
 
 use std::mem;
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 enum ADT {
     First(u32, u32),
     Second(u64)
diff --git a/tests/ui/enum-discriminant/discriminant_value.rs b/tests/ui/enum-discriminant/discriminant_value.rs
index f3dfac298ad..2864cd40da0 100644
--- a/tests/ui/enum-discriminant/discriminant_value.rs
+++ b/tests/ui/enum-discriminant/discriminant_value.rs
@@ -27,14 +27,14 @@ enum CLike3 {
     D
 }
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 enum ADT {
     First(u32, u32),
     Second(u64)
 }
 
 enum NullablePointer {
-    Something(#[allow(unused_tuple_struct_fields)] &'static u32),
+    Something(#[allow(dead_code)] &'static u32),
     Nothing
 }
 
diff --git a/tests/ui/error-codes/E0017.rs b/tests/ui/error-codes/E0017.rs
index c211ad1a2f8..9d3433fa543 100644
--- a/tests/ui/error-codes/E0017.rs
+++ b/tests/ui/error-codes/E0017.rs
@@ -3,12 +3,16 @@ const C: i32 = 2;
 static mut M: i32 = 3;
 
 const CR: &'static mut i32 = &mut C; //~ ERROR mutable references are not allowed
-                                     //~| WARN taking a mutable
+//~| WARN taking a mutable
+
 static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0658
-                                              //~| ERROR cannot borrow
-                                              //~| ERROR mutable references are not allowed
+//~| ERROR cannot borrow
+//~| ERROR mutable references are not allowed
 
 static CONST_REF: &'static mut i32 = &mut C; //~ ERROR mutable references are not allowed
-                                              //~| WARN taking a mutable
+//~| WARN taking a mutable
+
 static STATIC_MUT_REF: &'static mut i32 = unsafe { &mut M }; //~ ERROR mutable references are not
+//~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
+
 fn main() {}
diff --git a/tests/ui/error-codes/E0017.stderr b/tests/ui/error-codes/E0017.stderr
index 6e48f9582f1..ea6055da1c1 100644
--- a/tests/ui/error-codes/E0017.stderr
+++ b/tests/ui/error-codes/E0017.stderr
@@ -1,3 +1,18 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/E0017.rs:15:52
+   |
+LL | static STATIC_MUT_REF: &'static mut i32 = unsafe { &mut M };
+   |                                                    ^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL | static STATIC_MUT_REF: &'static mut i32 = unsafe { addr_of_mut!(M) };
+   |                                                    ~~~~~~~~~~~~~~~
+
 warning: taking a mutable reference to a `const` item
   --> $DIR/E0017.rs:5:30
    |
@@ -20,7 +35,7 @@ LL | const CR: &'static mut i32 = &mut C;
    |                              ^^^^^^
 
 error[E0658]: mutation through a reference is not allowed in statics
-  --> $DIR/E0017.rs:7:39
+  --> $DIR/E0017.rs:8:39
    |
 LL | static STATIC_REF: &'static mut i32 = &mut X;
    |                                       ^^^^^^
@@ -29,19 +44,19 @@ LL | static STATIC_REF: &'static mut i32 = &mut X;
    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error[E0764]: mutable references are not allowed in the final value of statics
-  --> $DIR/E0017.rs:7:39
+  --> $DIR/E0017.rs:8:39
    |
 LL | static STATIC_REF: &'static mut i32 = &mut X;
    |                                       ^^^^^^
 
 error[E0596]: cannot borrow immutable static item `X` as mutable
-  --> $DIR/E0017.rs:7:39
+  --> $DIR/E0017.rs:8:39
    |
 LL | static STATIC_REF: &'static mut i32 = &mut X;
    |                                       ^^^^^^ cannot borrow as mutable
 
 warning: taking a mutable reference to a `const` item
-  --> $DIR/E0017.rs:11:38
+  --> $DIR/E0017.rs:12:38
    |
 LL | static CONST_REF: &'static mut i32 = &mut C;
    |                                      ^^^^^^
@@ -55,18 +70,18 @@ LL | const C: i32 = 2;
    | ^^^^^^^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of statics
-  --> $DIR/E0017.rs:11:38
+  --> $DIR/E0017.rs:12:38
    |
 LL | static CONST_REF: &'static mut i32 = &mut C;
    |                                      ^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of statics
-  --> $DIR/E0017.rs:13:52
+  --> $DIR/E0017.rs:15:52
    |
 LL | static STATIC_MUT_REF: &'static mut i32 = unsafe { &mut M };
    |                                                    ^^^^^^
 
-error: aborting due to 6 previous errors; 2 warnings emitted
+error: aborting due to 6 previous errors; 3 warnings emitted
 
 Some errors have detailed explanations: E0596, E0658, E0764.
 For more information about an error, try `rustc --explain E0596`.
diff --git a/tests/ui/error-codes/E0133.mir.stderr b/tests/ui/error-codes/E0133.mir.stderr
deleted file mode 100644
index f8703ef0633..00000000000
--- a/tests/ui/error-codes/E0133.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/E0133.rs:7:5
-   |
-LL |     f();
-   |     ^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/error-codes/E0133.rs b/tests/ui/error-codes/E0133.rs
index dee1475ba21..52494ce6078 100644
--- a/tests/ui/error-codes/E0133.rs
+++ b/tests/ui/error-codes/E0133.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 unsafe fn f() { return; }
 
 fn main() {
diff --git a/tests/ui/error-codes/E0133.thir.stderr b/tests/ui/error-codes/E0133.stderr
index fd4d42bcb8b..5e3e49fb644 100644
--- a/tests/ui/error-codes/E0133.thir.stderr
+++ b/tests/ui/error-codes/E0133.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `f` is unsafe and requires unsafe function or block
-  --> $DIR/E0133.rs:7:5
+  --> $DIR/E0133.rs:4:5
    |
 LL |     f();
    |     ^^^ call to unsafe function
diff --git a/tests/ui/error-codes/E0227.rs b/tests/ui/error-codes/E0227.rs
index 0f0a781d2f9..4dd4da55fa3 100644
--- a/tests/ui/error-codes/E0227.rs
+++ b/tests/ui/error-codes/E0227.rs
@@ -6,6 +6,7 @@ trait FooBar<'foo, 'bar>: Foo<'foo> + Bar<'bar> {}
 struct Baz<'foo, 'bar> {
     baz: dyn FooBar<'foo, 'bar>,
     //~^ ERROR ambiguous lifetime bound, explicit lifetime bound required
+    //~| ERROR lifetime bound not satisfied
 }
 
 fn main() {
diff --git a/tests/ui/error-codes/E0227.stderr b/tests/ui/error-codes/E0227.stderr
index c77a2e98af7..6338034a022 100644
--- a/tests/ui/error-codes/E0227.stderr
+++ b/tests/ui/error-codes/E0227.stderr
@@ -4,6 +4,24 @@ error[E0227]: ambiguous lifetime bound, explicit lifetime bound required
 LL |     baz: dyn FooBar<'foo, 'bar>,
    |          ^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 1 previous error
+error[E0478]: lifetime bound not satisfied
+  --> $DIR/E0227.rs:7:10
+   |
+LL |     baz: dyn FooBar<'foo, 'bar>,
+   |          ^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: lifetime parameter instantiated with the lifetime `'bar` as defined here
+  --> $DIR/E0227.rs:6:18
+   |
+LL | struct Baz<'foo, 'bar> {
+   |                  ^^^^
+note: but lifetime parameter must outlive the lifetime `'foo` as defined here
+  --> $DIR/E0227.rs:6:12
+   |
+LL | struct Baz<'foo, 'bar> {
+   |            ^^^^
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0227`.
+Some errors have detailed explanations: E0227, E0478.
+For more information about an error, try `rustc --explain E0227`.
diff --git a/tests/ui/error-codes/E0229.rs b/tests/ui/error-codes/E0229.rs
index 4c1934107a6..b7cdb1737b0 100644
--- a/tests/ui/error-codes/E0229.rs
+++ b/tests/ui/error-codes/E0229.rs
@@ -12,6 +12,9 @@ impl Foo for isize {
 
 fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
 //~^ ERROR associated type bindings are not allowed here [E0229]
+//~| ERROR associated type bindings are not allowed here [E0229]
+//~| ERROR associated type bindings are not allowed here [E0229]
+//~| ERROR the trait bound `I: Foo` is not satisfied
 
 fn main() {
 }
diff --git a/tests/ui/error-codes/E0229.stderr b/tests/ui/error-codes/E0229.stderr
index e981fb91ce8..a7a2904bb89 100644
--- a/tests/ui/error-codes/E0229.stderr
+++ b/tests/ui/error-codes/E0229.stderr
@@ -4,6 +4,34 @@ error[E0229]: associated type bindings are not allowed here
 LL | fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
    |                         ^^^^^ associated type not allowed here
 
-error: aborting due to 1 previous error
+error[E0229]: associated type bindings are not allowed here
+  --> $DIR/E0229.rs:13:25
+   |
+LL | fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
+   |                         ^^^^^ associated type not allowed here
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0229]: associated type bindings are not allowed here
+  --> $DIR/E0229.rs:13:25
+   |
+LL | fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
+   |                         ^^^^^ associated type not allowed here
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0277]: the trait bound `I: Foo` is not satisfied
+  --> $DIR/E0229.rs:13:15
+   |
+LL | fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
+   |               ^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `I`
+   |
+help: consider restricting type parameter `I`
+   |
+LL | fn baz<I: Foo>(x: &<I as Foo<A=Bar>>::A) {}
+   |         +++++
+
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0229`.
+Some errors have detailed explanations: E0229, E0277.
+For more information about an error, try `rustc --explain E0229`.
diff --git a/tests/ui/error-codes/E0719.rs b/tests/ui/error-codes/E0719.rs
index cbf1bb219a0..0ea6d19000b 100644
--- a/tests/ui/error-codes/E0719.rs
+++ b/tests/ui/error-codes/E0719.rs
@@ -1,6 +1,7 @@
 trait Foo: Iterator<Item = i32, Item = i32> {}
 //~^ ERROR is already specified
 //~| ERROR is already specified
+//~| ERROR is already specified
 
 type Unit = ();
 
@@ -11,5 +12,6 @@ fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
 
 fn main() {
     let _: &dyn Iterator<Item = i32, Item = i32>;
+    //~^ ERROR already specified
     test();
 }
diff --git a/tests/ui/error-codes/E0719.stderr b/tests/ui/error-codes/E0719.stderr
index 00aea97139a..f048a8aabd4 100644
--- a/tests/ui/error-codes/E0719.stderr
+++ b/tests/ui/error-codes/E0719.stderr
@@ -17,13 +17,31 @@ LL | trait Foo: Iterator<Item = i32, Item = i32> {}
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
-  --> $DIR/E0719.rs:7:42
+  --> $DIR/E0719.rs:8:42
    |
 LL | fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
    |                               ---------  ^^^^^^^^^^^ re-bound here
    |                               |
    |                               `Item` bound here first
 
-error: aborting due to 3 previous errors
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
+  --> $DIR/E0719.rs:1:33
+   |
+LL | trait Foo: Iterator<Item = i32, Item = i32> {}
+   |                     ----------  ^^^^^^^^^^ re-bound here
+   |                     |
+   |                     `Item` bound here first
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
+  --> $DIR/E0719.rs:14:38
+   |
+LL |     let _: &dyn Iterator<Item = i32, Item = i32>;
+   |                          ----------  ^^^^^^^^^^ re-bound here
+   |                          |
+   |                          `Item` bound here first
+
+error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0719`.
diff --git a/tests/ui/extern-flag/empty-extern-arg.stderr b/tests/ui/extern-flag/empty-extern-arg.stderr
index 54b5e66fc21..79efcc5d8b0 100644
--- a/tests/ui/extern-flag/empty-extern-arg.stderr
+++ b/tests/ui/extern-flag/empty-extern-arg.stderr
@@ -2,10 +2,10 @@ error: extern location for std does not exist:
 
 error: `#[panic_handler]` function required, but not found
 
-error: language item required, but not found: `eh_personality`
+error: unwinding panics are not supported without std
    |
-   = note: this can occur when a binary crate with `#![no_std]` is compiled for a target where `eh_personality` is defined in the standard library
-   = help: you may be able to compile for a target that doesn't need `eh_personality`, specify a target with `--target` or in `.cargo/config`
+   = help: using nightly cargo, use -Zbuild-std with panic="abort" to avoid unwinding
+   = note: since the core library is usually precompiled with panic="unwind", rebuilding your crate with panic="abort" may not be enough to fix the problem
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/extern/issue-28324.mir.stderr b/tests/ui/extern/issue-28324.mir.stderr
deleted file mode 100644
index 9376ac35e21..00000000000
--- a/tests/ui/extern/issue-28324.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/issue-28324.rs:8:24
-   |
-LL | pub static BAZ: u32 = *&error_message_count;
-   |                        ^^^^^^^^^^^^^^^^^^^^ use of extern static
-   |
-   = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/extern/issue-28324.rs b/tests/ui/extern/issue-28324.rs
index fbe83e325ed..f74726e8166 100644
--- a/tests/ui/extern/issue-28324.rs
+++ b/tests/ui/extern/issue-28324.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 extern "C" {
     static error_message_count: u32;
 }
diff --git a/tests/ui/extern/issue-28324.thir.stderr b/tests/ui/extern/issue-28324.stderr
index 8857f379ad1..94ff2131993 100644
--- a/tests/ui/extern/issue-28324.thir.stderr
+++ b/tests/ui/extern/issue-28324.stderr
@@ -1,5 +1,5 @@
 error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/issue-28324.rs:8:25
+  --> $DIR/issue-28324.rs:5:25
    |
 LL | pub static BAZ: u32 = *&error_message_count;
    |                         ^^^^^^^^^^^^^^^^^^^ use of extern static
diff --git a/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs b/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs
index 233120c92f3..24fc512dfbf 100644
--- a/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs
+++ b/tests/ui/extern/issue-64655-allow-unwind-when-calling-panic-directly.rs
@@ -22,7 +22,7 @@
 //[thin]compile-flags: -C lto=thin
 //[fat]compile-flags: -C lto=fat
 
-#![feature(core_panic)]
+#![feature(panic_internals)]
 
 // (For some reason, reproducing the LTO issue requires pulling in std
 // explicitly this way.)
diff --git a/tests/ui/feature-gates/feature-gate-associated_type_bounds.rs b/tests/ui/feature-gates/feature-gate-associated_type_bounds.rs
index 152c7a8de66..073599edad7 100644
--- a/tests/ui/feature-gates/feature-gate-associated_type_bounds.rs
+++ b/tests/ui/feature-gates/feature-gate-associated_type_bounds.rs
@@ -54,20 +54,20 @@ fn _rpit_dyn() -> Box<dyn Tr1<As1: Copy>> { Box::new(S1) }
 
 const _cdef: impl Tr1<As1: Copy> = S1;
 //~^ ERROR associated type bounds are unstable
-//~| ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~| ERROR `impl Trait` is not allowed in const types
 // FIXME: uncomment when `impl_trait_in_bindings` feature is fixed.
 // const _cdef_dyn: &dyn Tr1<As1: Copy> = &S1;
 
 static _sdef: impl Tr1<As1: Copy> = S1;
 //~^ ERROR associated type bounds are unstable
-//~| ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~| ERROR `impl Trait` is not allowed in static types
 // FIXME: uncomment when `impl_trait_in_bindings` feature is fixed.
 // static _sdef_dyn: &dyn Tr1<As1: Copy> = &S1;
 
 fn main() {
     let _: impl Tr1<As1: Copy> = S1;
     //~^ ERROR associated type bounds are unstable
-    //~| ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~| ERROR `impl Trait` is not allowed in the type of variable bindings
     // FIXME: uncomment when `impl_trait_in_bindings` feature is fixed.
     // let _: &dyn Tr1<As1: Copy> = &S1;
 }
diff --git a/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr b/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr
index f2bceda9bea..4a643d31259 100644
--- a/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr
+++ b/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr
@@ -115,23 +115,29 @@ LL |     let _: impl Tr1<As1: Copy> = S1;
    = note: see issue #52662 <https://github.com/rust-lang/rust/issues/52662> for more information
    = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in const types
+error[E0562]: `impl Trait` is not allowed in const types
   --> $DIR/feature-gate-associated_type_bounds.rs:55:14
    |
 LL | const _cdef: impl Tr1<As1: Copy> = S1;
    |              ^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in const types
+error[E0562]: `impl Trait` is not allowed in static types
   --> $DIR/feature-gate-associated_type_bounds.rs:61:15
    |
 LL | static _sdef: impl Tr1<As1: Copy> = S1;
    |               ^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in variable bindings
+error[E0562]: `impl Trait` is not allowed in the type of variable bindings
   --> $DIR/feature-gate-associated_type_bounds.rs:68:12
    |
 LL |     let _: impl Tr1<As1: Copy> = S1;
    |            ^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error[E0277]: the trait bound `<<Self as _Tr3>::A as Iterator>::Item: Copy` is not satisfied
   --> $DIR/feature-gate-associated_type_bounds.rs:12:28
diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr b/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr
index c582ca7ba3d..526354f6cfb 100644
--- a/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr
+++ b/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr
@@ -35,16 +35,16 @@ LL |     async gen {};
    = help: add `#![feature(gen_blocks)]` to the crate attributes to enable
 
 error[E0282]: type annotations needed
-  --> $DIR/feature-gate-gen_blocks.rs:5:9
+  --> $DIR/feature-gate-gen_blocks.rs:5:5
    |
 LL |     gen {};
-   |         ^^ cannot infer type
+   |     ^^^^^^ cannot infer type
 
 error[E0282]: type annotations needed
-  --> $DIR/feature-gate-gen_blocks.rs:12:15
+  --> $DIR/feature-gate-gen_blocks.rs:12:5
    |
 LL |     async gen {};
-   |               ^^ cannot infer type
+   |     ^^^^^^^^^^^^ cannot infer type
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.rs b/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.rs
index de0487cdb20..2c130664e9a 100644
--- a/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.rs
+++ b/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.rs
@@ -5,6 +5,7 @@ trait Foo {
 impl Foo for () {
     type Bar = impl std::fmt::Debug;
     //~^ ERROR: `impl Trait` in associated types is unstable
+    //~| ERROR: unconstrained opaque type
 }
 
 struct Mop;
@@ -13,6 +14,7 @@ impl Mop {
     type Bop = impl std::fmt::Debug;
     //~^ ERROR: `impl Trait` in associated types is unstable
     //~| ERROR: inherent associated types are unstable
+    //~| ERROR: unconstrained opaque type
 }
 
 fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr b/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr
index 9a1ded96822..420363ced6f 100644
--- a/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr
+++ b/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr
@@ -8,7 +8,7 @@ LL |     type Bar = impl std::fmt::Debug;
    = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in associated types is unstable
-  --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:13:16
+  --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:14:16
    |
 LL |     type Bop = impl std::fmt::Debug;
    |                ^^^^^^^^^^^^^^^^^^^^
@@ -17,7 +17,7 @@ LL |     type Bop = impl std::fmt::Debug;
    = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable
 
 error[E0658]: inherent associated types are unstable
-  --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:13:5
+  --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:14:5
    |
 LL |     type Bop = impl std::fmt::Debug;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -25,6 +25,22 @@ LL |     type Bop = impl std::fmt::Debug;
    = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
    = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable
 
-error: aborting due to 3 previous errors
+error: unconstrained opaque type
+  --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:6:16
+   |
+LL |     type Bar = impl std::fmt::Debug;
+   |                ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `Bar` must be used in combination with a concrete type within the same impl
+
+error: unconstrained opaque type
+  --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:14:16
+   |
+LL |     type Bop = impl std::fmt::Debug;
+   |                ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `Bop` must be used in combination with a concrete type within the same impl
+
+error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.rs b/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.rs
index 1b9530fa82f..c75eabd6ac8 100644
--- a/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.rs
+++ b/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.rs
@@ -1,6 +1,6 @@
 fn f() -> impl Fn() -> impl Sized { || () }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait return
+//~^ ERROR `impl Trait` is not allowed in the return type of `Fn` trait bounds
 fn g() -> &'static dyn Fn() -> impl Sized { &|| () }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait return
+//~^ ERROR `impl Trait` is not allowed in the return type of `Fn` trait bounds
 
 fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr b/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr
index f0c0cd040e0..dacf1ca4c37 100644
--- a/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr
+++ b/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr
@@ -1,18 +1,20 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait return types
+error[E0562]: `impl Trait` is not allowed in the return type of `Fn` trait bounds
   --> $DIR/feature-gate-impl_trait_in_fn_trait_return.rs:1:24
    |
 LL | fn f() -> impl Fn() -> impl Sized { || () }
    |                        ^^^^^^^^^^
    |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
    = note: see issue #99697 <https://github.com/rust-lang/rust/issues/99697> for more information
    = help: add `#![feature(impl_trait_in_fn_trait_return)]` to the crate attributes to enable
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait return types
+error[E0562]: `impl Trait` is not allowed in the return type of `Fn` trait bounds
   --> $DIR/feature-gate-impl_trait_in_fn_trait_return.rs:3:32
    |
 LL | fn g() -> &'static dyn Fn() -> impl Sized { &|| () }
    |                                ^^^^^^^^^^
    |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
    = note: see issue #99697 <https://github.com/rust-lang/rust/issues/99697> for more information
    = help: add `#![feature(impl_trait_in_fn_trait_return)]` to the crate attributes to enable
 
diff --git a/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs b/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs
index eecf2046ccb..b8ce9c85b72 100644
--- a/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs
+++ b/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs
@@ -7,29 +7,35 @@
 
 struct Foo;
 impl Fn<()> for Foo {
-//~^ ERROR the precise format of `Fn`-family traits' type parameters is subject to change
-//~| ERROR manual implementations of `Fn` are experimental
+    //~^ ERROR the precise format of `Fn`-family traits' type parameters is subject to change
+    //~| ERROR manual implementations of `Fn` are experimental
+    //~| ERROR expected a `FnMut()` closure, found `Foo`
     extern "rust-call" fn call(self, args: ()) -> () {}
     //~^ ERROR rust-call ABI is subject to change
+    //~| ERROR `call` has an incompatible type for trait
 }
 struct Foo1;
 impl FnOnce() for Foo1 {
-//~^ ERROR associated type bindings are not allowed here
-//~| ERROR manual implementations of `FnOnce` are experimental
+    //~^ ERROR associated type bindings are not allowed here
+    //~| ERROR manual implementations of `FnOnce` are experimental
+    //~| ERROR not all trait items implemented
     extern "rust-call" fn call_once(self, args: ()) -> () {}
     //~^ ERROR rust-call ABI is subject to change
 }
 struct Bar;
 impl FnMut<()> for Bar {
-//~^ ERROR the precise format of `Fn`-family traits' type parameters is subject to change
-//~| ERROR manual implementations of `FnMut` are experimental
+    //~^ ERROR the precise format of `Fn`-family traits' type parameters is subject to change
+    //~| ERROR manual implementations of `FnMut` are experimental
+    //~| ERROR expected a `FnOnce()` closure, found `Bar`
     extern "rust-call" fn call_mut(&self, args: ()) -> () {}
     //~^ ERROR rust-call ABI is subject to change
+    //~| ERROR incompatible type for trait
 }
 struct Baz;
 impl FnOnce<()> for Baz {
-//~^ ERROR the precise format of `Fn`-family traits' type parameters is subject to change
-//~| ERROR manual implementations of `FnOnce` are experimental
+    //~^ ERROR the precise format of `Fn`-family traits' type parameters is subject to change
+    //~| ERROR manual implementations of `FnOnce` are experimental
+    //~| ERROR not all trait items implemented
     extern "rust-call" fn call_once(&self, args: ()) -> () {}
     //~^ ERROR rust-call ABI is subject to change
 }
diff --git a/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr b/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr
index b1613f638d3..b417dfb506a 100644
--- a/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr
+++ b/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr
@@ -1,5 +1,5 @@
 error[E0658]: rust-call ABI is subject to change
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:12:12
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:13:12
    |
 LL |     extern "rust-call" fn call(self, args: ()) -> () {}
    |            ^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL |     extern "rust-call" fn call(self, args: ()) -> () {}
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
 error[E0658]: rust-call ABI is subject to change
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:19:12
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:22:12
    |
 LL |     extern "rust-call" fn call_once(self, args: ()) -> () {}
    |            ^^^^^^^^^^^
@@ -17,7 +17,7 @@ LL |     extern "rust-call" fn call_once(self, args: ()) -> () {}
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
 error[E0658]: rust-call ABI is subject to change
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:26:12
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:12
    |
 LL |     extern "rust-call" fn call_mut(&self, args: ()) -> () {}
    |            ^^^^^^^^^^^
@@ -26,7 +26,7 @@ LL |     extern "rust-call" fn call_mut(&self, args: ()) -> () {}
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
 error[E0658]: rust-call ABI is subject to change
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:33:12
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:39:12
    |
 LL |     extern "rust-call" fn call_once(&self, args: ()) -> () {}
    |            ^^^^^^^^^^^
@@ -52,7 +52,7 @@ LL | impl Fn<()> for Foo {
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
 error[E0183]: manual implementations of `FnOnce` are experimental
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:16:6
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:18:6
    |
 LL | impl FnOnce() for Foo1 {
    |      ^^^^^^^^ manual implementations of `FnOnce` are experimental
@@ -60,19 +60,19 @@ LL | impl FnOnce() for Foo1 {
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
 error[E0229]: associated type bindings are not allowed here
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:16:6
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:18:6
    |
 LL | impl FnOnce() for Foo1 {
    |      ^^^^^^^^ associated type not allowed here
    |
 help: parenthesized trait syntax expands to `FnOnce<(), Output=()>`
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:16:6
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:18:6
    |
 LL | impl FnOnce() for Foo1 {
    |      ^^^^^^^^
 
 error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:23:6
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:26:6
    |
 LL | impl FnMut<()> for Bar {
    |      ^^^^^^^^^
@@ -81,7 +81,7 @@ LL | impl FnMut<()> for Bar {
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
 error[E0183]: manual implementations of `FnMut` are experimental
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:23:6
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:26:6
    |
 LL | impl FnMut<()> for Bar {
    |      ^^^^^^^^^ manual implementations of `FnMut` are experimental
@@ -89,7 +89,7 @@ LL | impl FnMut<()> for Bar {
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
 error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:6
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:35:6
    |
 LL | impl FnOnce<()> for Baz {
    |      ^^^^^^^^^^
@@ -98,14 +98,76 @@ LL | impl FnOnce<()> for Baz {
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
 error[E0183]: manual implementations of `FnOnce` are experimental
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:6
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:35:6
    |
 LL | impl FnOnce<()> for Baz {
    |      ^^^^^^^^^^ manual implementations of `FnOnce` are experimental
    |
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
-error: aborting due to 12 previous errors
+error[E0277]: expected a `FnMut()` closure, found `Foo`
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:9:17
+   |
+LL | impl Fn<()> for Foo {
+   |                 ^^^ expected an `FnMut()` closure, found `Foo`
+   |
+   = help: the trait `FnMut<()>` is not implemented for `Foo`
+   = note: wrap the `Foo` in a closure with no arguments: `|| { /* code */ }`
+note: required by a bound in `Fn`
+  --> $SRC_DIR/core/src/ops/function.rs:LL:COL
+
+error[E0053]: method `call` has an incompatible type for trait
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:13:32
+   |
+LL |     extern "rust-call" fn call(self, args: ()) -> () {}
+   |                                ^^^^
+   |                                |
+   |                                expected `&Foo`, found `Foo`
+   |                                help: change the self-receiver type to match the trait: `&self`
+   |
+   = note: expected signature `extern "rust-call" fn(&Foo, ()) -> _`
+              found signature `extern "rust-call" fn(Foo, ())`
+
+error[E0046]: not all trait items implemented, missing: `Output`
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:18:1
+   |
+LL | impl FnOnce() for Foo1 {
+   | ^^^^^^^^^^^^^^^^^^^^^^ missing `Output` in implementation
+   |
+   = help: implement the missing item: `type Output = /* Type */;`
+
+error[E0277]: expected a `FnOnce()` closure, found `Bar`
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:26:20
+   |
+LL | impl FnMut<()> for Bar {
+   |                    ^^^ expected an `FnOnce()` closure, found `Bar`
+   |
+   = help: the trait `FnOnce<()>` is not implemented for `Bar`
+   = note: wrap the `Bar` in a closure with no arguments: `|| { /* code */ }`
+note: required by a bound in `FnMut`
+  --> $SRC_DIR/core/src/ops/function.rs:LL:COL
+
+error[E0053]: method `call_mut` has an incompatible type for trait
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:36
+   |
+LL |     extern "rust-call" fn call_mut(&self, args: ()) -> () {}
+   |                                    ^^^^^
+   |                                    |
+   |                                    types differ in mutability
+   |                                    help: change the self-receiver type to match the trait: `&mut self`
+   |
+   = note: expected signature `extern "rust-call" fn(&mut Bar, ()) -> _`
+              found signature `extern "rust-call" fn(&Bar, ())`
+
+error[E0046]: not all trait items implemented, missing: `Output`
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:35:1
+   |
+LL | impl FnOnce<()> for Baz {
+   | ^^^^^^^^^^^^^^^^^^^^^^^ missing `Output` in implementation
+   |
+   = help: implement the missing item: `type Output = /* Type */;`
+
+error: aborting due to 18 previous errors
 
-Some errors have detailed explanations: E0183, E0229, E0658.
-For more information about an error, try `rustc --explain E0183`.
+Some errors have detailed explanations: E0046, E0053, E0183, E0229, E0277, E0658.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/feature-gates/feature-gate-unsized_fn_params.stderr b/tests/ui/feature-gates/feature-gate-unsized_fn_params.stderr
index 92c71392672..b11c30eaad4 100644
--- a/tests/ui/feature-gates/feature-gate-unsized_fn_params.stderr
+++ b/tests/ui/feature-gates/feature-gate-unsized_fn_params.stderr
@@ -29,8 +29,8 @@ LL | fn bar(x: impl Foo) {
    |           ++++
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
-LL | fn bar(x: &Foo) {
-   |           +
+LL | fn bar(x: &dyn Foo) {
+   |           ++++
 
 error[E0277]: the size for values of type `[()]` cannot be known at compilation time
   --> $DIR/feature-gate-unsized_fn_params.rs:25:8
@@ -40,7 +40,7 @@ LL | fn qux(_: [()]) {}
    |
    = help: the trait `Sized` is not implemented for `[()]`
    = help: unsized fn params are gated as an unstable feature
-help: function arguments must have a statically known size, borrowed types always have a known size
+help: function arguments must have a statically known size, borrowed slices always have a known size
    |
 LL | fn qux(_: &[()]) {}
    |           +
diff --git a/tests/ui/fmt/format-string-wrong-order.rs b/tests/ui/fmt/format-string-wrong-order.rs
index 0bad5402396..da775be3ffd 100644
--- a/tests/ui/fmt/format-string-wrong-order.rs
+++ b/tests/ui/fmt/format-string-wrong-order.rs
@@ -12,4 +12,10 @@ fn main() {
     //~^ ERROR invalid format string: expected `'}'`, found `'?'`
     format!("{?:#?}", bar);
     //~^ ERROR invalid format string: expected format parameter to occur after `:`
+    format!("Hello {<5:}!", "x");
+    //~^ ERROR invalid format string: expected format parameter to occur after `:`
+    format!("Hello {^5:}!", "x");
+    //~^ ERROR invalid format string: expected format parameter to occur after `:`
+    format!("Hello {>5:}!", "x");
+    //~^ ERROR invalid format string: expected format parameter to occur after `:`
 }
diff --git a/tests/ui/fmt/format-string-wrong-order.stderr b/tests/ui/fmt/format-string-wrong-order.stderr
index 0a2e04026d9..3ef07720c15 100644
--- a/tests/ui/fmt/format-string-wrong-order.stderr
+++ b/tests/ui/fmt/format-string-wrong-order.stderr
@@ -50,5 +50,23 @@ LL |     format!("{?:#?}", bar);
    |
    = note: `?` comes after `:`, try `:?` instead
 
-error: aborting due to 6 previous errors
+error: invalid format string: expected format parameter to occur after `:`
+  --> $DIR/format-string-wrong-order.rs:15:21
+   |
+LL |     format!("Hello {<5:}!", "x");
+   |                     ^ expected `<` to occur after `:` in format string
+
+error: invalid format string: expected format parameter to occur after `:`
+  --> $DIR/format-string-wrong-order.rs:17:21
+   |
+LL |     format!("Hello {^5:}!", "x");
+   |                     ^ expected `^` to occur after `:` in format string
+
+error: invalid format string: expected format parameter to occur after `:`
+  --> $DIR/format-string-wrong-order.rs:19:21
+   |
+LL |     format!("Hello {>5:}!", "x");
+   |                     ^ expected `>` to occur after `:` in format string
+
+error: aborting due to 9 previous errors
 
diff --git a/tests/ui/fn/issue-39259.rs b/tests/ui/fn/issue-39259.rs
index 5872f1007b0..16983b652fc 100644
--- a/tests/ui/fn/issue-39259.rs
+++ b/tests/ui/fn/issue-39259.rs
@@ -4,8 +4,10 @@
 struct S;
 
 impl Fn(u32) -> u32 for S {
-//~^ ERROR associated type bindings are not allowed here [E0229]
+    //~^ ERROR associated type bindings are not allowed here [E0229]
+    //~| ERROR expected a `FnMut(u32)` closure, found `S`
     fn call(&self) -> u32 {
+        //~^ ERROR method `call` has 1 parameter but the declaration in trait `call` has 2
         5
     }
 }
diff --git a/tests/ui/fn/issue-39259.stderr b/tests/ui/fn/issue-39259.stderr
index bd102e58135..47150a3c155 100644
--- a/tests/ui/fn/issue-39259.stderr
+++ b/tests/ui/fn/issue-39259.stderr
@@ -10,6 +10,25 @@ help: parenthesized trait syntax expands to `Fn<(u32,), Output=u32>`
 LL | impl Fn(u32) -> u32 for S {
    |      ^^^^^^^^^^^^^^
 
-error: aborting due to 1 previous error
+error[E0277]: expected a `FnMut(u32)` closure, found `S`
+  --> $DIR/issue-39259.rs:6:25
+   |
+LL | impl Fn(u32) -> u32 for S {
+   |                         ^ expected an `FnMut(u32)` closure, found `S`
+   |
+   = help: the trait `FnMut<(u32,)>` is not implemented for `S`
+note: required by a bound in `Fn`
+  --> $SRC_DIR/core/src/ops/function.rs:LL:COL
+
+error[E0050]: method `call` has 1 parameter but the declaration in trait `call` has 2
+  --> $DIR/issue-39259.rs:9:13
+   |
+LL |     fn call(&self) -> u32 {
+   |             ^^^^^ expected 2 parameters, found 1
+   |
+   = note: `call` from trait: `extern "rust-call" fn(&Self, Args) -> <Self as FnOnce<Args>>::Output`
+
+error: aborting due to 3 previous errors
 
-For more information about this error, try `rustc --explain E0229`.
+Some errors have detailed explanations: E0050, E0229, E0277.
+For more information about an error, try `rustc --explain E0050`.
diff --git a/tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.rs b/tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.rs
index 86b164ba7d8..1a4678c7e70 100644
--- a/tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.rs
+++ b/tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.rs
@@ -6,4 +6,7 @@ fn main() {
   fn _f(arg : Box<dyn for<'a> X<Y<'x> = &'a [u32]>>) {}
     //~^ ERROR: use of undeclared lifetime name `'x`
     //~| ERROR: binding for associated type `Y` references lifetime
+    //~| ERROR: binding for associated type `Y` references lifetime
+    //~| ERROR: binding for associated type `Y` references lifetime
+    //~| ERROR: the trait `X` cannot be made into an object
 }
diff --git a/tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr b/tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr
index b77f10084c9..4a56b20eb59 100644
--- a/tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr
+++ b/tests/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr
@@ -20,7 +20,38 @@ error[E0582]: binding for associated type `Y` references lifetime `'a`, which do
 LL |   fn _f(arg : Box<dyn for<'a> X<Y<'x> = &'a [u32]>>) {}
    |                                 ^^^^^^^^^^^^^^^^^
 
-error: aborting due to 2 previous errors
+error[E0582]: binding for associated type `Y` references lifetime `'a`, which does not appear in the trait input types
+  --> $DIR/gat-in-trait-path-undeclared-lifetime.rs:6:33
+   |
+LL |   fn _f(arg : Box<dyn for<'a> X<Y<'x> = &'a [u32]>>) {}
+   |                                 ^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0582]: binding for associated type `Y` references lifetime `'a`, which does not appear in the trait input types
+  --> $DIR/gat-in-trait-path-undeclared-lifetime.rs:6:33
+   |
+LL |   fn _f(arg : Box<dyn for<'a> X<Y<'x> = &'a [u32]>>) {}
+   |                                 ^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0038]: the trait `X` cannot be made into an object
+  --> $DIR/gat-in-trait-path-undeclared-lifetime.rs:6:19
+   |
+LL |   fn _f(arg : Box<dyn for<'a> X<Y<'x> = &'a [u32]>>) {}
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/gat-in-trait-path-undeclared-lifetime.rs:2:8
+   |
+LL | trait X {
+   |       - this trait cannot be made into an object...
+LL |   type Y<'x>;
+   |        ^ ...because it contains the generic associated type `Y`
+   = help: consider moving `Y` to another trait
+
+error: aborting due to 5 previous errors
 
-Some errors have detailed explanations: E0261, E0582.
-For more information about an error, try `rustc --explain E0261`.
+Some errors have detailed explanations: E0038, E0261, E0582.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-associated-types/gat-trait-path-missing-lifetime.rs b/tests/ui/generic-associated-types/gat-trait-path-missing-lifetime.rs
index 83b86f04a95..285493132b6 100644
--- a/tests/ui/generic-associated-types/gat-trait-path-missing-lifetime.rs
+++ b/tests/ui/generic-associated-types/gat-trait-path-missing-lifetime.rs
@@ -4,10 +4,11 @@ trait X {
   fn foo<'a>(t : Self::Y<'a>) -> Self::Y<'a> { t }
 }
 
-impl<T> X for T {
+impl<T> X for T { //~ ERROR: not all trait items implemented
   fn foo<'a, T1: X<Y = T1>>(t : T1) -> T1::Y<'a> {
     //~^ ERROR missing generics for associated type
     //~^^ ERROR missing generics for associated type
+    //~| ERROR method `foo` has 1 type parameter but its trait declaration has 0 type parameters
     t
   }
 }
diff --git a/tests/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr b/tests/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr
index 7f535ec432c..74ce93a613c 100644
--- a/tests/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr
+++ b/tests/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr
@@ -31,6 +31,27 @@ help: add missing lifetime argument
 LL |   fn foo<'a, T1: X<Y<'a> = T1>>(t : T1) -> T1::Y<'a> {
    |                     ++++
 
-error: aborting due to 2 previous errors
+error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters
+  --> $DIR/gat-trait-path-missing-lifetime.rs:8:10
+   |
+LL |   fn foo<'a>(t : Self::Y<'a>) -> Self::Y<'a> { t }
+   |          -- expected 0 type parameters
+...
+LL |   fn foo<'a, T1: X<Y = T1>>(t : T1) -> T1::Y<'a> {
+   |          ^^  ^^
+   |          |
+   |          found 1 type parameter
+
+error[E0046]: not all trait items implemented, missing: `Y`
+  --> $DIR/gat-trait-path-missing-lifetime.rs:7:1
+   |
+LL |   type Y<'a>;
+   |   ---------- `Y` from trait
+...
+LL | impl<T> X for T {
+   | ^^^^^^^^^^^^^^^ missing `Y` in implementation
+
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0046, E0049, E0107.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs b/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs
index 5738dfa83ee..c4134427013 100644
--- a/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs
+++ b/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs
@@ -7,10 +7,19 @@ fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
   //~| ERROR: parenthesized generic arguments cannot be used
   //~| ERROR associated type takes 0 generic arguments but 1 generic argument
   //~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
+  //~| ERROR associated type takes 0 generic arguments but 1 generic argument
+  //~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
+  //~| ERROR associated type takes 0 generic arguments but 1 generic argument
+  //~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
+  //~| ERROR at least one trait is required
+  //~| ERROR: the trait `X` cannot be made into an object
 
 
 fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
   //~^ ERROR: parenthesized generic arguments cannot be used
   //~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
+  //~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
+  //~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
+  //~| ERROR: the trait `X` cannot be made into an object
 
 fn main() {}
diff --git a/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr b/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr
index 461853379b5..bad2ae9c918 100644
--- a/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr
+++ b/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr
@@ -16,7 +16,7 @@ LL | fn foo<'a>(arg: Box<dyn X<Y<'a> = &'a ()>>) {}
    |                            ~  ~
 
 error: parenthesized generic arguments cannot be used in associated type constraints
-  --> $DIR/gat-trait-path-parenthesised-args.rs:12:27
+  --> $DIR/gat-trait-path-parenthesised-args.rs:18:27
    |
 LL | fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
    |                           ^--
@@ -54,7 +54,7 @@ LL |   type Y<'a>;
    |        ^
 
 error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
-  --> $DIR/gat-trait-path-parenthesised-args.rs:12:27
+  --> $DIR/gat-trait-path-parenthesised-args.rs:18:27
    |
 LL | fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
    |                           ^ expected 1 lifetime argument
@@ -69,6 +69,141 @@ help: add missing lifetime argument
 LL | fn bar<'a>(arg: Box<dyn X<Y('_) = ()>>) {}
    |                             ++
 
-error: aborting due to 6 previous errors
+error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
+  --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
+   |
+LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
+   |                           ^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
+   |
+LL |   type Y<'a>;
+   |        ^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime argument
+   |
+LL | fn foo<'a>(arg: Box<dyn X<Y('_, 'a) = &'a ()>>) {}
+   |                             +++
+
+error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
+   |
+LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
+   |                           ^---- help: remove these generics
+   |                           |
+   |                           expected 0 generic arguments
+   |
+note: associated type defined here, with 0 generic parameters
+  --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
+   |
+LL |   type Y<'a>;
+   |        ^
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
+  --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
+   |
+LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
+   |                           ^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
+   |
+LL |   type Y<'a>;
+   |        ^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime argument
+   |
+LL | fn foo<'a>(arg: Box<dyn X<Y('_, 'a) = &'a ()>>) {}
+   |                             +++
+
+error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
+   |
+LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
+   |                           ^---- help: remove these generics
+   |                           |
+   |                           expected 0 generic arguments
+   |
+note: associated type defined here, with 0 generic parameters
+  --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
+   |
+LL |   type Y<'a>;
+   |        ^
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0224]: at least one trait is required for an object type
+  --> $DIR/gat-trait-path-parenthesised-args.rs:5:29
+   |
+LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
+   |                             ^^
+
+error[E0038]: the trait `X` cannot be made into an object
+  --> $DIR/gat-trait-path-parenthesised-args.rs:5:21
+   |
+LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
+   |                     ^^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
+   |
+LL | trait X {
+   |       - this trait cannot be made into an object...
+LL |   type Y<'a>;
+   |        ^ ...because it contains the generic associated type `Y`
+   = help: consider moving `Y` to another trait
+
+error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
+  --> $DIR/gat-trait-path-parenthesised-args.rs:18:27
+   |
+LL | fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
+   |                           ^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
+   |
+LL |   type Y<'a>;
+   |        ^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime argument
+   |
+LL | fn bar<'a>(arg: Box<dyn X<Y('_) = ()>>) {}
+   |                             ++
+
+error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
+  --> $DIR/gat-trait-path-parenthesised-args.rs:18:27
+   |
+LL | fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
+   |                           ^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
+   |
+LL |   type Y<'a>;
+   |        ^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime argument
+   |
+LL | fn bar<'a>(arg: Box<dyn X<Y('_) = ()>>) {}
+   |                             ++
+
+error[E0038]: the trait `X` cannot be made into an object
+  --> $DIR/gat-trait-path-parenthesised-args.rs:18:21
+   |
+LL | fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
+   |                     ^^^^^^^^^^^^^^^ `X` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
+   |
+LL | trait X {
+   |       - this trait cannot be made into an object...
+LL |   type Y<'a>;
+   |        ^ ...because it contains the generic associated type `Y`
+   = help: consider moving `Y` to another trait
+
+error: aborting due to 15 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0038, E0107, E0224.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-associated-types/issue-71176.rs b/tests/ui/generic-associated-types/issue-71176.rs
index f0e162d825f..e58b6f6091e 100644
--- a/tests/ui/generic-associated-types/issue-71176.rs
+++ b/tests/ui/generic-associated-types/issue-71176.rs
@@ -9,6 +9,9 @@ impl Provider for () {
 struct Holder<B> {
   inner: Box<dyn Provider<A = B>>,
   //~^ ERROR: missing generics for associated type
+  //~| ERROR: missing generics for associated type
+  //~| ERROR: missing generics for associated type
+  //~| ERROR: the trait `Provider` cannot be made into an object
 }
 
 fn main() {
diff --git a/tests/ui/generic-associated-types/issue-71176.stderr b/tests/ui/generic-associated-types/issue-71176.stderr
index ed837f34753..a1913bb618b 100644
--- a/tests/ui/generic-associated-types/issue-71176.stderr
+++ b/tests/ui/generic-associated-types/issue-71176.stderr
@@ -14,6 +14,57 @@ help: add missing lifetime argument
 LL |   inner: Box<dyn Provider<A<'a> = B>>,
    |                            ++++
 
-error: aborting due to 1 previous error
+error[E0107]: missing generics for associated type `Provider::A`
+  --> $DIR/issue-71176.rs:10:27
+   |
+LL |   inner: Box<dyn Provider<A = B>>,
+   |                           ^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/issue-71176.rs:2:10
+   |
+LL |     type A<'a>;
+   |          ^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime argument
+   |
+LL |   inner: Box<dyn Provider<A<'a> = B>>,
+   |                            ++++
+
+error[E0107]: missing generics for associated type `Provider::A`
+  --> $DIR/issue-71176.rs:10:27
+   |
+LL |   inner: Box<dyn Provider<A = B>>,
+   |                           ^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/issue-71176.rs:2:10
+   |
+LL |     type A<'a>;
+   |          ^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime argument
+   |
+LL |   inner: Box<dyn Provider<A<'a> = B>>,
+   |                            ++++
+
+error[E0038]: the trait `Provider` cannot be made into an object
+  --> $DIR/issue-71176.rs:10:14
+   |
+LL |   inner: Box<dyn Provider<A = B>>,
+   |              ^^^^^^^^^^^^^^^^^^^ `Provider` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/issue-71176.rs:2:10
+   |
+LL | trait Provider {
+   |       -------- this trait cannot be made into an object...
+LL |     type A<'a>;
+   |          ^ ...because it contains the generic associated type `A`
+   = help: consider moving `A` to another trait
+   = help: only type `()` implements the trait, consider using it directly instead
+
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0038, E0107.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-associated-types/issue-79636-1.rs b/tests/ui/generic-associated-types/issue-79636-1.rs
index a89039b5c72..a05311d59c1 100644
--- a/tests/ui/generic-associated-types/issue-79636-1.rs
+++ b/tests/ui/generic-associated-types/issue-79636-1.rs
@@ -3,6 +3,7 @@ trait Monad {
     type Wrapped<B>;
 
     fn bind<B, F>(self, f: F) -> Self::Wrapped<B> {
+        //~^ ERROR: the size for values of type `Self` cannot be known
         todo!()
     }
 }
@@ -14,8 +15,10 @@ where
     //~^ ERROR: missing generics for associated type `Monad::Wrapped`
 {
     outer.bind(|inner| inner)
+    //~^ ERROR type annotations needed
 }
 
 fn main() {
     assert_eq!(join(Some(Some(true))), Some(true));
+    //~^ ERROR: `Option<Option<bool>>: Monad` is not satisfied
 }
diff --git a/tests/ui/generic-associated-types/issue-79636-1.stderr b/tests/ui/generic-associated-types/issue-79636-1.stderr
index 4076e951875..743d8b7d462 100644
--- a/tests/ui/generic-associated-types/issue-79636-1.stderr
+++ b/tests/ui/generic-associated-types/issue-79636-1.stderr
@@ -1,5 +1,5 @@
 error[E0107]: missing generics for associated type `Monad::Wrapped`
-  --> $DIR/issue-79636-1.rs:13:34
+  --> $DIR/issue-79636-1.rs:14:34
    |
 LL |     MInner: Monad<Unwrapped = A, Wrapped = MOuter::Wrapped<A>>,
    |                                  ^^^^^^^ expected 1 generic argument
@@ -14,6 +14,56 @@ help: add missing generic argument
 LL |     MInner: Monad<Unwrapped = A, Wrapped<B> = MOuter::Wrapped<A>>,
    |                                         +++
 
-error: aborting due to 1 previous error
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+  --> $DIR/issue-79636-1.rs:5:19
+   |
+LL |     fn bind<B, F>(self, f: F) -> Self::Wrapped<B> {
+   |                   ^^^^ doesn't have a size known at compile-time
+   |
+   = help: unsized fn params are gated as an unstable feature
+help: consider further restricting `Self`
+   |
+LL |     fn bind<B, F>(self, f: F) -> Self::Wrapped<B> where Self: Sized {
+   |                                                   +++++++++++++++++
+help: function arguments must have a statically known size, borrowed types always have a known size
+   |
+LL |     fn bind<B, F>(&self, f: F) -> Self::Wrapped<B> {
+   |                   +
+
+error[E0282]: type annotations needed
+  --> $DIR/issue-79636-1.rs:17:17
+   |
+LL |     outer.bind(|inner| inner)
+   |                 ^^^^^
+   |
+help: consider giving this closure parameter an explicit type
+   |
+LL |     outer.bind(|inner: /* Type */| inner)
+   |                      ++++++++++++
+
+error[E0277]: the trait bound `Option<Option<bool>>: Monad` is not satisfied
+  --> $DIR/issue-79636-1.rs:22:21
+   |
+LL |     assert_eq!(join(Some(Some(true))), Some(true));
+   |                ---- ^^^^^^^^^^^^^^^^ the trait `Monad` is not implemented for `Option<Option<bool>>`
+   |                |
+   |                required by a bound introduced by this call
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/issue-79636-1.rs:1:1
+   |
+LL | trait Monad {
+   | ^^^^^^^^^^^
+note: required by a bound in `join`
+  --> $DIR/issue-79636-1.rs:13:13
+   |
+LL | fn join<MOuter, MInner, A>(outer: MOuter) -> MOuter::Wrapped<A>
+   |    ---- required by a bound in this function
+LL | where
+LL |     MOuter: Monad<Unwrapped = MInner>,
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `join`
+
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0107, E0277, E0282.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/generic-associated-types/issue-80433.rs b/tests/ui/generic-associated-types/issue-80433.rs
index 05ff82fa7d5..bdba78c2ccd 100644
--- a/tests/ui/generic-associated-types/issue-80433.rs
+++ b/tests/ui/generic-associated-types/issue-80433.rs
@@ -4,7 +4,7 @@ struct E<T> {
 }
 
 trait TestMut {
-    type Output<'a>;
+    type Output<'a>; //~ ERROR missing required bound
     fn test_mut<'a>(&'a mut self) -> Self::Output<'a>;
 }
 
diff --git a/tests/ui/generic-associated-types/issue-80433.stderr b/tests/ui/generic-associated-types/issue-80433.stderr
index 488fbeceddd..ab1fb794418 100644
--- a/tests/ui/generic-associated-types/issue-80433.stderr
+++ b/tests/ui/generic-associated-types/issue-80433.stderr
@@ -14,6 +14,17 @@ help: add missing lifetime argument
 LL | fn test_simpler<'a>(dst: &'a mut impl TestMut<Output<'a> = &'a mut f32>)
    |                                                     ++++
 
-error: aborting due to 1 previous error
+error: missing required bound on `Output`
+  --> $DIR/issue-80433.rs:7:5
+   |
+LL |     type Output<'a>;
+   |     ^^^^^^^^^^^^^^^-
+   |                    |
+   |                    help: add the required where clause: `where Self: 'a`
+   |
+   = note: this bound is currently required to ensure that impls have maximum flexibility
+   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generic-associated-types/issue-84931.stderr b/tests/ui/generic-associated-types/issue-84931.stderr
index 04e14b9c746..71d112277a3 100644
--- a/tests/ui/generic-associated-types/issue-84931.stderr
+++ b/tests/ui/generic-associated-types/issue-84931.stderr
@@ -1,16 +1,3 @@
-error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/issue-84931.rs:14:21
-   |
-LL |     type Item<'a> = &'a mut T;
-   |               --    ^^^^^^^^^ ...so that the reference type `&'a mut T` does not outlive the data it points at
-   |               |
-   |               the parameter type `T` must be valid for the lifetime `'a` as defined here...
-   |
-help: consider adding an explicit lifetime bound
-   |
-LL |     type Item<'a> = &'a mut T where T: 'a;
-   |                               +++++++++++
-
 error[E0477]: the type `StreamingSliceIter<'b, T>` does not fulfill the required lifetime
   --> $DIR/issue-84931.rs:14:21
    |
@@ -30,6 +17,19 @@ help: copy the `where` clause predicates from the trait
 LL |     type Item<'a> = &'a mut T where Self: 'a;
    |                               ++++++++++++++
 
+error[E0309]: the parameter type `T` may not live long enough
+  --> $DIR/issue-84931.rs:14:21
+   |
+LL |     type Item<'a> = &'a mut T;
+   |               --    ^^^^^^^^^ ...so that the reference type `&'a mut T` does not outlive the data it points at
+   |               |
+   |               the parameter type `T` must be valid for the lifetime `'a` as defined here...
+   |
+help: consider adding an explicit lifetime bound
+   |
+LL |     type Item<'a> = &'a mut T where T: 'a;
+   |                               +++++++++++
+
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0309, E0477.
diff --git a/tests/ui/generic-associated-types/missing_lifetime_args.rs b/tests/ui/generic-associated-types/missing_lifetime_args.rs
index 331511ba61a..470db5412b2 100644
--- a/tests/ui/generic-associated-types/missing_lifetime_args.rs
+++ b/tests/ui/generic-associated-types/missing_lifetime_args.rs
@@ -10,6 +10,9 @@ struct Foo<'a, 'b, 'c> {
 
 fn foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>) {}
 //~^ ERROR missing generics for associated type
+//~| ERROR missing generics for associated type
+//~| ERROR missing generics for associated type
+//~| ERROR the trait `X` cannot be made into an object
 
 fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
 //~^ ERROR struct takes 3 lifetime arguments but 2 lifetime
diff --git a/tests/ui/generic-associated-types/missing_lifetime_args.stderr b/tests/ui/generic-associated-types/missing_lifetime_args.stderr
index 1a7a2e787a1..5980c60c51c 100644
--- a/tests/ui/generic-associated-types/missing_lifetime_args.stderr
+++ b/tests/ui/generic-associated-types/missing_lifetime_args.stderr
@@ -15,7 +15,7 @@ LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y<'_, '_> = (&'c u32, &'d u32)>>) {}
    |                                 ++++++++
 
 error[E0107]: struct takes 3 lifetime arguments but 2 lifetime arguments were supplied
-  --> $DIR/missing_lifetime_args.rs:14:26
+  --> $DIR/missing_lifetime_args.rs:17:26
    |
 LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
    |                          ^^^ --  -- supplied 2 lifetime arguments
@@ -33,7 +33,7 @@ LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b, 'a>) {}
    |                                    ++++
 
 error[E0107]: struct takes 3 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/missing_lifetime_args.rs:17:16
+  --> $DIR/missing_lifetime_args.rs:20:16
    |
 LL | fn f<'a>(_arg: Foo<'a>) {}
    |                ^^^ -- supplied 1 lifetime argument
@@ -50,6 +50,56 @@ help: add missing lifetime arguments
 LL | fn f<'a>(_arg: Foo<'a, 'a, 'a>) {}
    |                      ++++++++
 
-error: aborting due to 3 previous errors
+error[E0107]: missing generics for associated type `X::Y`
+  --> $DIR/missing_lifetime_args.rs:11:32
+   |
+LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>) {}
+   |                                ^ expected 2 lifetime arguments
+   |
+note: associated type defined here, with 2 lifetime parameters: `'a`, `'b`
+  --> $DIR/missing_lifetime_args.rs:2:10
+   |
+LL |     type Y<'a, 'b>;
+   |          ^ --  --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime arguments
+   |
+LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y<'_, '_> = (&'c u32, &'d u32)>>) {}
+   |                                 ++++++++
+
+error[E0107]: missing generics for associated type `X::Y`
+  --> $DIR/missing_lifetime_args.rs:11:32
+   |
+LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>) {}
+   |                                ^ expected 2 lifetime arguments
+   |
+note: associated type defined here, with 2 lifetime parameters: `'a`, `'b`
+  --> $DIR/missing_lifetime_args.rs:2:10
+   |
+LL |     type Y<'a, 'b>;
+   |          ^ --  --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime arguments
+   |
+LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y<'_, '_> = (&'c u32, &'d u32)>>) {}
+   |                                 ++++++++
+
+error[E0038]: the trait `X` cannot be made into an object
+  --> $DIR/missing_lifetime_args.rs:11:26
+   |
+LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>) {}
+   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/missing_lifetime_args.rs:2:10
+   |
+LL | trait X {
+   |       - this trait cannot be made into an object...
+LL |     type Y<'a, 'b>;
+   |          ^ ...because it contains the generic associated type `Y`
+   = help: consider moving `Y` to another trait
+
+error: aborting due to 6 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0038, E0107.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs
index c58f9cf1dfc..d6fc3df1026 100644
--- a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs
+++ b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs
@@ -6,6 +6,11 @@ const _: () = {
   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
       //~^ ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
       //~| ERROR associated type takes 0 generic arguments but 1 generic argument
+      //~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
+      //~| ERROR associated type takes 0 generic arguments but 1 generic argument
+      //~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
+      //~| ERROR associated type takes 0 generic arguments but 1 generic argument
+      //~| ERROR the trait `X` cannot be made into an object
 };
 
 fn main() {}
diff --git a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr
index fab5b474d92..2090f75aed3 100644
--- a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr
+++ b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr
@@ -28,6 +28,86 @@ note: associated type defined here, with 0 generic parameters
 LL |     type Y<'a>;
    |          ^
 
-error: aborting due to 2 previous errors
+error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
+  --> $DIR/trait-path-type-error-once-implemented.rs:6:29
+   |
+LL |   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+   |                             ^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/trait-path-type-error-once-implemented.rs:2:10
+   |
+LL |     type Y<'a>;
+   |          ^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime argument
+   |
+LL |   fn f2<'a>(arg : Box<dyn X<Y<'_, 1> = &'a ()>>) {}
+   |                               +++
+
+error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/trait-path-type-error-once-implemented.rs:6:29
+   |
+LL |   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+   |                             ^--- help: remove these generics
+   |                             |
+   |                             expected 0 generic arguments
+   |
+note: associated type defined here, with 0 generic parameters
+  --> $DIR/trait-path-type-error-once-implemented.rs:2:10
+   |
+LL |     type Y<'a>;
+   |          ^
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
+  --> $DIR/trait-path-type-error-once-implemented.rs:6:29
+   |
+LL |   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+   |                             ^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/trait-path-type-error-once-implemented.rs:2:10
+   |
+LL |     type Y<'a>;
+   |          ^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime argument
+   |
+LL |   fn f2<'a>(arg : Box<dyn X<Y<'_, 1> = &'a ()>>) {}
+   |                               +++
+
+error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/trait-path-type-error-once-implemented.rs:6:29
+   |
+LL |   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+   |                             ^--- help: remove these generics
+   |                             |
+   |                             expected 0 generic arguments
+   |
+note: associated type defined here, with 0 generic parameters
+  --> $DIR/trait-path-type-error-once-implemented.rs:2:10
+   |
+LL |     type Y<'a>;
+   |          ^
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0038]: the trait `X` cannot be made into an object
+  --> $DIR/trait-path-type-error-once-implemented.rs:6:23
+   |
+LL |   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+   |                       ^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/trait-path-type-error-once-implemented.rs:2:10
+   |
+LL | trait X {
+   |       - this trait cannot be made into an object...
+LL |     type Y<'a>;
+   |          ^ ...because it contains the generic associated type `Y`
+   = help: consider moving `Y` to another trait
+
+error: aborting due to 7 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0038, E0107.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/generic-associated-types/type-param-defaults.rs b/tests/ui/generic-associated-types/type-param-defaults.rs
index f034076b010..a9c8c5c12d9 100644
--- a/tests/ui/generic-associated-types/type-param-defaults.rs
+++ b/tests/ui/generic-associated-types/type-param-defaults.rs
@@ -29,6 +29,8 @@ where
 fn main() {
     // errors
     foo::<()>();
+    //~^ ERROR type mismatch
+    //~| ERROR `u64: Other` is not satisfied
     // works
     foo::<u32>();
 }
diff --git a/tests/ui/generic-associated-types/type-param-defaults.stderr b/tests/ui/generic-associated-types/type-param-defaults.stderr
index 85ccaba0e69..3c094d45fff 100644
--- a/tests/ui/generic-associated-types/type-param-defaults.stderr
+++ b/tests/ui/generic-associated-types/type-param-defaults.stderr
@@ -16,5 +16,43 @@ error: defaults for type parameters are only allowed in `struct`, `enum`, `type`
 LL |     type Assoc<T = u32> = T;
    |                ^^^^^^^
 
-error: aborting due to 3 previous errors
+error[E0271]: type mismatch resolving `<() as Trait>::Assoc == u32`
+  --> $DIR/type-param-defaults.rs:31:11
+   |
+LL |     foo::<()>();
+   |           ^^ type mismatch resolving `<() as Trait>::Assoc == u32`
+   |
+note: expected this to be `u32`
+  --> $DIR/type-param-defaults.rs:11:27
+   |
+LL |     type Assoc<T = u32> = u64;
+   |                           ^^^
+note: required by a bound in `foo`
+  --> $DIR/type-param-defaults.rs:25:14
+   |
+LL | fn foo<T>()
+   |    --- required by a bound in this function
+LL | where
+LL |     T: Trait<Assoc = u32>,
+   |              ^^^^^^^^^^^ required by this bound in `foo`
+
+error[E0277]: the trait bound `u64: Other` is not satisfied
+  --> $DIR/type-param-defaults.rs:31:11
+   |
+LL |     foo::<()>();
+   |           ^^ the trait `Other` is not implemented for `u64`
+   |
+   = help: the trait `Other` is implemented for `u32`
+note: required by a bound in `foo`
+  --> $DIR/type-param-defaults.rs:26:15
+   |
+LL | fn foo<T>()
+   |    --- required by a bound in this function
+...
+LL |     T::Assoc: Other {
+   |               ^^^^^ required by this bound in `foo`
+
+error: aborting due to 5 previous errors
 
+Some errors have detailed explanations: E0271, E0277.
+For more information about an error, try `rustc --explain E0271`.
diff --git a/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr b/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr
index f73ed5956da..8d21b9172c8 100644
--- a/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr
+++ b/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr
@@ -12,6 +12,26 @@ LL | #![warn(unused_lifetimes)]
    |         ^^^^^^^^^^^^^^^^
 
 error[E0478]: lifetime bound not satisfied
+  --> $DIR/unsatisfied-item-lifetime-bound.rs:9:18
+   |
+LL |     type Y<'a: 'static>;
+   |     ------------------- definition of `Y` from trait
+...
+LL |     type Y<'a> = &'a ();
+   |                  ^^^^^^
+   |
+note: lifetime parameter instantiated with the lifetime `'a` as defined here
+  --> $DIR/unsatisfied-item-lifetime-bound.rs:9:12
+   |
+LL |     type Y<'a> = &'a ();
+   |            ^^
+   = note: but lifetime parameter must outlive the static lifetime
+help: copy the `where` clause predicates from the trait
+   |
+LL |     type Y<'a> = &'a () where 'a: 'static;
+   |                         +++++++++++++++++
+
+error[E0478]: lifetime bound not satisfied
   --> $DIR/unsatisfied-item-lifetime-bound.rs:14:8
    |
 LL |     f: <T as X>::Y<'a>,
@@ -50,26 +70,6 @@ LL | struct D<'a> {
    |          ^^
    = note: but lifetime parameter must outlive the static lifetime
 
-error[E0478]: lifetime bound not satisfied
-  --> $DIR/unsatisfied-item-lifetime-bound.rs:9:18
-   |
-LL |     type Y<'a: 'static>;
-   |     ------------------- definition of `Y` from trait
-...
-LL |     type Y<'a> = &'a ();
-   |                  ^^^^^^
-   |
-note: lifetime parameter instantiated with the lifetime `'a` as defined here
-  --> $DIR/unsatisfied-item-lifetime-bound.rs:9:12
-   |
-LL |     type Y<'a> = &'a ();
-   |            ^^
-   = note: but lifetime parameter must outlive the static lifetime
-help: copy the `where` clause predicates from the trait
-   |
-LL |     type Y<'a> = &'a () where 'a: 'static;
-   |                         +++++++++++++++++
-
 error: aborting due to 4 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0478`.
diff --git a/tests/ui/generic-const-items/parameter-defaults.rs b/tests/ui/generic-const-items/parameter-defaults.rs
index a6f82c249fe..c933db17fa2 100644
--- a/tests/ui/generic-const-items/parameter-defaults.rs
+++ b/tests/ui/generic-const-items/parameter-defaults.rs
@@ -11,4 +11,5 @@ const NONE<T = ()>: Option<T> = None::<T>; //~ ERROR defaults for type parameter
 
 fn main() {
     let _ = NONE;
+    //~^ ERROR type annotations needed
 }
diff --git a/tests/ui/generic-const-items/parameter-defaults.stderr b/tests/ui/generic-const-items/parameter-defaults.stderr
index 59862286945..697423e8dc3 100644
--- a/tests/ui/generic-const-items/parameter-defaults.stderr
+++ b/tests/ui/generic-const-items/parameter-defaults.stderr
@@ -4,5 +4,17 @@ error: defaults for type parameters are only allowed in `struct`, `enum`, `type`
 LL | const NONE<T = ()>: Option<T> = None::<T>;
    |            ^^^^^^
 
-error: aborting due to 1 previous error
+error[E0282]: type annotations needed for `Option<T>`
+  --> $DIR/parameter-defaults.rs:13:9
+   |
+LL |     let _ = NONE;
+   |         ^
+   |
+help: consider giving this pattern a type, where the type for type parameter `T` is specified
+   |
+LL |     let _: Option<T> = NONE;
+   |          +++++++++++
+
+error: aborting due to 2 previous errors
 
+For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/generics/generic-default-type-params-cross-crate.rs b/tests/ui/generics/generic-default-type-params-cross-crate.rs
index 834b15be1c5..f798901132b 100644
--- a/tests/ui/generics/generic-default-type-params-cross-crate.rs
+++ b/tests/ui/generics/generic-default-type-params-cross-crate.rs
@@ -5,7 +5,7 @@
 
 extern crate default_type_params_xc;
 
-struct Vec<T, A = default_type_params_xc::Heap>(#[allow(unused_tuple_struct_fields)] Option<(T,A)>);
+struct Vec<T, A = default_type_params_xc::Heap>(#[allow(dead_code)] Option<(T,A)>);
 
 struct Foo;
 
diff --git a/tests/ui/generics/generic-ivec-leak.rs b/tests/ui/generics/generic-ivec-leak.rs
index 9610bdcb338..7a1d10a646d 100644
--- a/tests/ui/generics/generic-ivec-leak.rs
+++ b/tests/ui/generics/generic-ivec-leak.rs
@@ -1,5 +1,5 @@
 // run-pass
 #![allow(non_camel_case_types)]
-enum wrapper<T> { wrapped(#[allow(unused_tuple_struct_fields)] T), }
+enum wrapper<T> { wrapped(#[allow(dead_code)] T), }
 
 pub fn main() { let _w = wrapper::wrapped(vec![1, 2, 3, 4, 5]); }
diff --git a/tests/ui/generics/generic-newtype-struct.rs b/tests/ui/generics/generic-newtype-struct.rs
index aa879f01a58..92523b76f98 100644
--- a/tests/ui/generics/generic-newtype-struct.rs
+++ b/tests/ui/generics/generic-newtype-struct.rs
@@ -1,7 +1,7 @@
 // run-pass
 // pretty-expanded FIXME #23616
 
-struct S<T>(#[allow(unused_tuple_struct_fields)] T);
+struct S<T>(#[allow(dead_code)] T);
 
 pub fn main() {
     let _s = S(2);
diff --git a/tests/ui/generics/generic-no-mangle.fixed b/tests/ui/generics/generic-no-mangle.fixed
index 501acb6e163..aa6d6310f5f 100644
--- a/tests/ui/generics/generic-no-mangle.fixed
+++ b/tests/ui/generics/generic-no-mangle.fixed
@@ -76,7 +76,7 @@ impl<T> Trait2<T> for Foo {
     fn qux<'a>(x: &'a i32) -> &i32 { x } //~ ERROR functions generic over types or consts must be mangled
 }
 
-pub struct Bar<T>(#[allow(unused_tuple_struct_fields)] T);
+pub struct Bar<T>(#[allow(dead_code)] T);
 
 impl<T> Bar<T> {
     
@@ -111,7 +111,7 @@ impl<T> Trait3 for Bar<T> {
     fn baz<U>() {} //~ ERROR functions generic over types or consts must be mangled
 }
 
-pub struct Baz<'a>(#[allow(unused_tuple_struct_fields)] &'a i32);
+pub struct Baz<'a>(#[allow(dead_code)] &'a i32);
 
 impl<'a> Baz<'a> {
     #[no_mangle]
diff --git a/tests/ui/generics/generic-no-mangle.rs b/tests/ui/generics/generic-no-mangle.rs
index 74e407078e8..8a59ca75aaf 100644
--- a/tests/ui/generics/generic-no-mangle.rs
+++ b/tests/ui/generics/generic-no-mangle.rs
@@ -76,7 +76,7 @@ impl<T> Trait2<T> for Foo {
     fn qux<'a>(x: &'a i32) -> &i32 { x } //~ ERROR functions generic over types or consts must be mangled
 }
 
-pub struct Bar<T>(#[allow(unused_tuple_struct_fields)] T);
+pub struct Bar<T>(#[allow(dead_code)] T);
 
 impl<T> Bar<T> {
     #[no_mangle]
@@ -111,7 +111,7 @@ impl<T> Trait3 for Bar<T> {
     fn baz<U>() {} //~ ERROR functions generic over types or consts must be mangled
 }
 
-pub struct Baz<'a>(#[allow(unused_tuple_struct_fields)] &'a i32);
+pub struct Baz<'a>(#[allow(dead_code)] &'a i32);
 
 impl<'a> Baz<'a> {
     #[no_mangle]
diff --git a/tests/ui/generics/generic-recursive-tag.rs b/tests/ui/generics/generic-recursive-tag.rs
index b344da1c7dd..5490822975a 100644
--- a/tests/ui/generics/generic-recursive-tag.rs
+++ b/tests/ui/generics/generic-recursive-tag.rs
@@ -1,7 +1,7 @@
 // run-pass
 #![allow(non_camel_case_types)]
 
-enum list<T> { #[allow(unused_tuple_struct_fields)] cons(Box<T>, Box<list<T>>), nil, }
+enum list<T> { #[allow(dead_code)] cons(Box<T>, Box<list<T>>), nil, }
 
 pub fn main() {
     let _a: list<isize> =
diff --git a/tests/ui/generics/generic-tag-corruption.rs b/tests/ui/generics/generic-tag-corruption.rs
index 35de3c1f712..ae20a94d9fd 100644
--- a/tests/ui/generics/generic-tag-corruption.rs
+++ b/tests/ui/generics/generic-tag-corruption.rs
@@ -5,6 +5,6 @@
 // This used to cause memory corruption in stage 0.
 // pretty-expanded FIXME #23616
 
-enum thing<K> { some(#[allow(unused_tuple_struct_fields)] K), }
+enum thing<K> { some(#[allow(dead_code)] K), }
 
 pub fn main() { let _x = thing::some("hi".to_string()); }
diff --git a/tests/ui/generics/generic-tag-local.rs b/tests/ui/generics/generic-tag-local.rs
index c5772e84193..121ec74f8b7 100644
--- a/tests/ui/generics/generic-tag-local.rs
+++ b/tests/ui/generics/generic-tag-local.rs
@@ -3,6 +3,6 @@
 
 // pretty-expanded FIXME #23616
 
-enum clam<T> { a(#[allow(unused_tuple_struct_fields)] T), }
+enum clam<T> { a(#[allow(dead_code)] T), }
 
 pub fn main() { let _c = clam::a(3); }
diff --git a/tests/ui/generics/generic-tag.rs b/tests/ui/generics/generic-tag.rs
index 31fc2178d6d..9e844c72552 100644
--- a/tests/ui/generics/generic-tag.rs
+++ b/tests/ui/generics/generic-tag.rs
@@ -6,7 +6,7 @@
 
 #![allow(unused_variables)]
 
-enum option<T> { some(#[allow(unused_tuple_struct_fields)] Box<T>), none, }
+enum option<T> { some(#[allow(dead_code)] Box<T>), none, }
 
 pub fn main() {
     let mut a: option<isize> = option::some::<isize>(Box::new(10));
diff --git a/tests/ui/generics/wrong-number-of-args.rs b/tests/ui/generics/wrong-number-of-args.rs
index e4eaff21af1..95463d1c32c 100644
--- a/tests/ui/generics/wrong-number-of-args.rs
+++ b/tests/ui/generics/wrong-number-of-args.rs
@@ -21,7 +21,7 @@ mod no_generics {
 }
 
 mod type_and_type {
-    struct Ty<A, B>;
+    struct Ty<A, B>(A, B);
 
     type A = Ty;
     //~^ ERROR missing generics for struct `type_and_type::Ty`
@@ -43,7 +43,7 @@ mod type_and_type {
 }
 
 mod lifetime_and_type {
-    struct Ty<'a, T>;
+    struct Ty<'a, T>(&'a T);
 
     type A = Ty;
     //~^ ERROR missing generics for struct
@@ -75,7 +75,7 @@ mod lifetime_and_type {
 }
 
 mod type_and_type_and_type {
-    struct Ty<A, B, C = &'static str>;
+    struct Ty<A, B, C = &'static str>(A, B, C);
 
     type A = Ty;
     //~^ ERROR missing generics for struct `type_and_type_and_type::Ty`
diff --git a/tests/ui/generics/wrong-number-of-args.stderr b/tests/ui/generics/wrong-number-of-args.stderr
index 9006fb10b67..e04408a0fdf 100644
--- a/tests/ui/generics/wrong-number-of-args.stderr
+++ b/tests/ui/generics/wrong-number-of-args.stderr
@@ -246,7 +246,7 @@ LL |     type A = Ty;
 note: struct defined here, with 2 generic parameters: `A`, `B`
   --> $DIR/wrong-number-of-args.rs:24:12
    |
-LL |     struct Ty<A, B>;
+LL |     struct Ty<A, B>(A, B);
    |            ^^ -  -
 help: add missing generic arguments
    |
@@ -264,7 +264,7 @@ LL |     type B = Ty<usize>;
 note: struct defined here, with 2 generic parameters: `A`, `B`
   --> $DIR/wrong-number-of-args.rs:24:12
    |
-LL |     struct Ty<A, B>;
+LL |     struct Ty<A, B>(A, B);
    |            ^^ -  -
 help: add missing generic argument
    |
@@ -282,7 +282,7 @@ LL |     type D = Ty<usize, String, char>;
 note: struct defined here, with 2 generic parameters: `A`, `B`
   --> $DIR/wrong-number-of-args.rs:24:12
    |
-LL |     struct Ty<A, B>;
+LL |     struct Ty<A, B>(A, B);
    |            ^^ -  -
 
 error[E0107]: struct takes 2 generic arguments but 0 generic arguments were supplied
@@ -294,7 +294,7 @@ LL |     type E = Ty<>;
 note: struct defined here, with 2 generic parameters: `A`, `B`
   --> $DIR/wrong-number-of-args.rs:24:12
    |
-LL |     struct Ty<A, B>;
+LL |     struct Ty<A, B>(A, B);
    |            ^^ -  -
 help: add missing generic arguments
    |
@@ -310,7 +310,7 @@ LL |     type A = Ty;
 note: struct defined here, with 1 generic parameter: `T`
   --> $DIR/wrong-number-of-args.rs:46:12
    |
-LL |     struct Ty<'a, T>;
+LL |     struct Ty<'a, T>(&'a T);
    |            ^^     -
 help: add missing generic argument
    |
@@ -326,7 +326,7 @@ LL |     type B = Ty<'static>;
 note: struct defined here, with 1 generic parameter: `T`
   --> $DIR/wrong-number-of-args.rs:46:12
    |
-LL |     struct Ty<'a, T>;
+LL |     struct Ty<'a, T>(&'a T);
    |            ^^     -
 help: add missing generic argument
    |
@@ -342,7 +342,7 @@ LL |     type E = Ty<>;
 note: struct defined here, with 1 generic parameter: `T`
   --> $DIR/wrong-number-of-args.rs:46:12
    |
-LL |     struct Ty<'a, T>;
+LL |     struct Ty<'a, T>(&'a T);
    |            ^^     -
 help: add missing generic argument
    |
@@ -360,7 +360,7 @@ LL |     type F = Ty<'static, usize, 'static, usize>;
 note: struct defined here, with 1 lifetime parameter: `'a`
   --> $DIR/wrong-number-of-args.rs:46:12
    |
-LL |     struct Ty<'a, T>;
+LL |     struct Ty<'a, T>(&'a T);
    |            ^^ --
 
 error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied
@@ -374,7 +374,7 @@ LL |     type F = Ty<'static, usize, 'static, usize>;
 note: struct defined here, with 1 generic parameter: `T`
   --> $DIR/wrong-number-of-args.rs:46:12
    |
-LL |     struct Ty<'a, T>;
+LL |     struct Ty<'a, T>(&'a T);
    |            ^^     -
 
 error[E0107]: missing generics for struct `type_and_type_and_type::Ty`
@@ -386,7 +386,7 @@ LL |     type A = Ty;
 note: struct defined here, with at least 2 generic parameters: `A`, `B`
   --> $DIR/wrong-number-of-args.rs:78:12
    |
-LL |     struct Ty<A, B, C = &'static str>;
+LL |     struct Ty<A, B, C = &'static str>(A, B, C);
    |            ^^ -  -
 help: add missing generic arguments
    |
@@ -404,7 +404,7 @@ LL |     type B = Ty<usize>;
 note: struct defined here, with at least 2 generic parameters: `A`, `B`
   --> $DIR/wrong-number-of-args.rs:78:12
    |
-LL |     struct Ty<A, B, C = &'static str>;
+LL |     struct Ty<A, B, C = &'static str>(A, B, C);
    |            ^^ -  -
 help: add missing generic argument
    |
@@ -422,7 +422,7 @@ LL |     type E = Ty<usize, String, char, f64>;
 note: struct defined here, with at most 3 generic parameters: `A`, `B`, `C`
   --> $DIR/wrong-number-of-args.rs:78:12
    |
-LL |     struct Ty<A, B, C = &'static str>;
+LL |     struct Ty<A, B, C = &'static str>(A, B, C);
    |            ^^ -  -  ----------------
 
 error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied
@@ -434,7 +434,7 @@ LL |     type F = Ty<>;
 note: struct defined here, with at least 2 generic parameters: `A`, `B`
   --> $DIR/wrong-number-of-args.rs:78:12
    |
-LL |     struct Ty<A, B, C = &'static str>;
+LL |     struct Ty<A, B, C = &'static str>(A, B, C);
    |            ^^ -  -
 help: add missing generic arguments
    |
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions2.rs b/tests/ui/half-open-range-patterns/range_pat_interactions2.rs
index 4615ebd688a..0e96cfe7858 100644
--- a/tests/ui/half-open-range-patterns/range_pat_interactions2.rs
+++ b/tests/ui/half-open-range-patterns/range_pat_interactions2.rs
@@ -8,8 +8,7 @@ fn main() {
     for x in -9 + 1..=(9 - 2) {
         match x as i32 {
             0..=(5+1) => errors_only.push(x),
-            //~^ error: inclusive range with no end
-            //~| error: expected one of `=>`, `if`, or `|`, found `(`
+            //~^ error: expected `)`, found `+`
             1 | -3..0 => first_or.push(x),
             y @ (0..5 | 6) => or_two.push(y),
             y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions2.stderr b/tests/ui/half-open-range-patterns/range_pat_interactions2.stderr
index 13a5542a474..a54f29a3b32 100644
--- a/tests/ui/half-open-range-patterns/range_pat_interactions2.stderr
+++ b/tests/ui/half-open-range-patterns/range_pat_interactions2.stderr
@@ -1,17 +1,8 @@
-error[E0586]: inclusive range with no end
-  --> $DIR/range_pat_interactions2.rs:10:14
+error: expected `)`, found `+`
+  --> $DIR/range_pat_interactions2.rs:10:19
    |
 LL |             0..=(5+1) => errors_only.push(x),
-   |              ^^^ help: use `..` instead
-   |
-   = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
-
-error: expected one of `=>`, `if`, or `|`, found `(`
-  --> $DIR/range_pat_interactions2.rs:10:17
-   |
-LL |             0..=(5+1) => errors_only.push(x),
-   |                 ^ expected one of `=>`, `if`, or `|`
+   |                   ^ expected `)`
 
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0586`.
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-cache-issue-54302.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-cache-issue-54302.stderr
index 7f81ee331bf..186af160d90 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-cache-issue-54302.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-cache-issue-54302.stderr
@@ -4,7 +4,7 @@ error: implementation of `Deserialize` is not general enough
 LL |     assert_deserialize_owned::<&'static str>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Deserialize` is not general enough
    |
-   = note: `&'static str` must implement `Deserialize<'0>`, for any lifetime `'0`...
+   = note: `&str` must implement `Deserialize<'0>`, for any lifetime `'0`...
    = note: ...but `&str` actually implements `Deserialize<'1>`, for some specific lifetime `'1`
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/higher-ranked/trait-bounds/issue-59311.stderr b/tests/ui/higher-ranked/trait-bounds/issue-59311.stderr
index 28c259be35f..e50aad876d8 100644
--- a/tests/ui/higher-ranked/trait-bounds/issue-59311.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/issue-59311.stderr
@@ -12,7 +12,7 @@ error: higher-ranked lifetime error
 LL |     v.t(|| {});
    |         ^^^^^
    |
-   = note: could not prove `for<'a> &'a V: 'static`
+   = note: could not prove `for<'a> &'a V: 'b`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/issues/issue-20616.rs b/tests/ui/impl-header-lifetime-elision/bare_type.rs
index 6c24d437272..9af98f870d2 100644
--- a/tests/ui/issues/issue-20616.rs
+++ b/tests/ui/impl-header-lifetime-elision/bare_type.rs
@@ -33,12 +33,11 @@ type TypeI<T,> = T;
 static STATIC: () = ();
 
 fn main() {
-
     // ensure token `>=` works fine
-    let _: TypeA<'static>= &STATIC;
-    let _: TypeA<'static,>= &STATIC;
+    let _: TypeA<'static> = &STATIC;
+    let _: TypeA<'static,> = &STATIC;
 
     // ensure token `>>=` works fine
-    let _: Box<TypeA<'static>>= Box::new(&STATIC);
-    let _: Box<TypeA<'static,>>= Box::new(&STATIC);
+    let _: Box<TypeA<'static>> = Box::new(&STATIC);
+    let _: Box<TypeA<'static,>> = Box::new(&STATIC);
 }
diff --git a/tests/ui/impl-trait/bounds_regression.rs b/tests/ui/impl-trait/bounds_regression.rs
index f32d83c0c40..89b0e3c55f9 100644
--- a/tests/ui/impl-trait/bounds_regression.rs
+++ b/tests/ui/impl-trait/bounds_regression.rs
@@ -15,7 +15,7 @@ pub fn future_from_coroutine<
     GenFuture(x)
 }
 
-struct GenFuture<T: FakeCoroutine<Yield = ()>>(#[allow(unused_tuple_struct_fields)] T);
+struct GenFuture<T: FakeCoroutine<Yield = ()>>(#[allow(dead_code)] T);
 
 impl<T: FakeCoroutine<Yield = ()>> FakeFuture for GenFuture<T> {
     type Output = T::Return;
diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
index 2e13ca753fc..7917fa991ee 100644
--- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
+++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
@@ -1,3 +1,9 @@
+error[E0277]: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied
+  --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13
+   |
+LL | fn ice() -> impl AsRef<Fn(&())> {
+   |             ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()`
+
 error[E0782]: trait objects must include the `dyn` keyword
   --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24
    |
@@ -9,6 +15,7 @@ help: add `dyn` keyword before this trait
 LL | fn ice() -> impl AsRef<dyn Fn(&())> {
    |                        +++
 
-error: aborting due to 1 previous error
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0782`.
+Some errors have detailed explanations: E0277, E0782.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs
index bed81c4bca7..55d69069afb 100644
--- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs
+++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs
@@ -6,6 +6,7 @@
 fn ice() -> impl AsRef<Fn(&())> {
     //[edition2015]~^ ERROR: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied [E0277]
     //[edition2021]~^^ ERROR: trait objects must include the `dyn` keyword [E0782]
+    //[edition2021]~| ERROR: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied [E0277]
     todo!()
 }
 
diff --git a/tests/ui/impl-trait/impl-fn-hrtb-bounds.rs b/tests/ui/impl-trait/impl-fn-hrtb-bounds.rs
index 527a4586fd7..06c3d9ad434 100644
--- a/tests/ui/impl-trait/impl-fn-hrtb-bounds.rs
+++ b/tests/ui/impl-trait/impl-fn-hrtb-bounds.rs
@@ -4,16 +4,19 @@ use std::fmt::Debug;
 fn a() -> impl Fn(&u8) -> (impl Debug + '_) {
     //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
     |x| x
+    //~^ ERROR lifetime may not live long enough
 }
 
 fn b() -> impl for<'a> Fn(&'a u8) -> (impl Debug + 'a) {
     //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
     |x| x
+    //~^ ERROR lifetime may not live long enough
 }
 
 fn c() -> impl for<'a> Fn(&'a u8) -> (impl Debug + '_) {
     //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
     |x| x
+    //~^ ERROR lifetime may not live long enough
 }
 
 fn d() -> impl Fn() -> (impl Debug + '_) {
diff --git a/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr b/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr
index a5982a5542a..ebab9940493 100644
--- a/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr
+++ b/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr
@@ -1,5 +1,5 @@
 error[E0106]: missing lifetime specifier
-  --> $DIR/impl-fn-hrtb-bounds.rs:19:38
+  --> $DIR/impl-fn-hrtb-bounds.rs:22:38
    |
 LL | fn d() -> impl Fn() -> (impl Debug + '_) {
    |                                      ^^ expected named lifetime parameter
@@ -23,29 +23,56 @@ LL | fn a() -> impl Fn(&u8) -> (impl Debug + '_) {
    |                   ^
 
 error: higher kinded lifetime bounds on nested opaque types are not supported yet
-  --> $DIR/impl-fn-hrtb-bounds.rs:9:52
+  --> $DIR/impl-fn-hrtb-bounds.rs:10:52
    |
 LL | fn b() -> impl for<'a> Fn(&'a u8) -> (impl Debug + 'a) {
    |                                                    ^^
    |
 note: lifetime declared here
-  --> $DIR/impl-fn-hrtb-bounds.rs:9:20
+  --> $DIR/impl-fn-hrtb-bounds.rs:10:20
    |
 LL | fn b() -> impl for<'a> Fn(&'a u8) -> (impl Debug + 'a) {
    |                    ^^
 
 error: higher kinded lifetime bounds on nested opaque types are not supported yet
-  --> $DIR/impl-fn-hrtb-bounds.rs:14:52
+  --> $DIR/impl-fn-hrtb-bounds.rs:16:52
    |
 LL | fn c() -> impl for<'a> Fn(&'a u8) -> (impl Debug + '_) {
    |                                                    ^^
    |
 note: lifetime declared here
-  --> $DIR/impl-fn-hrtb-bounds.rs:14:20
+  --> $DIR/impl-fn-hrtb-bounds.rs:16:20
    |
 LL | fn c() -> impl for<'a> Fn(&'a u8) -> (impl Debug + '_) {
    |                    ^^
 
-error: aborting due to 4 previous errors
+error: lifetime may not live long enough
+  --> $DIR/impl-fn-hrtb-bounds.rs:6:9
+   |
+LL |     |x| x
+   |      -- ^ returning this value requires that `'1` must outlive `'2`
+   |      ||
+   |      |return type of closure is impl Debug + '2
+   |      has type `&'1 u8`
+
+error: lifetime may not live long enough
+  --> $DIR/impl-fn-hrtb-bounds.rs:12:9
+   |
+LL |     |x| x
+   |      -- ^ returning this value requires that `'1` must outlive `'2`
+   |      ||
+   |      |return type of closure is impl Debug + '2
+   |      has type `&'1 u8`
+
+error: lifetime may not live long enough
+  --> $DIR/impl-fn-hrtb-bounds.rs:18:9
+   |
+LL |     |x| x
+   |      -- ^ returning this value requires that `'1` must outlive `'2`
+   |      ||
+   |      |return type of closure is impl Debug + '2
+   |      has type `&'1 u8`
+
+error: aborting due to 7 previous errors
 
 For more information about this error, try `rustc --explain E0106`.
diff --git a/tests/ui/impl-trait/impl-fn-parsing-ambiguities.rs b/tests/ui/impl-trait/impl-fn-parsing-ambiguities.rs
index 61303a5b2cb..a4a1f1dcee1 100644
--- a/tests/ui/impl-trait/impl-fn-parsing-ambiguities.rs
+++ b/tests/ui/impl-trait/impl-fn-parsing-ambiguities.rs
@@ -5,6 +5,7 @@ fn a() -> impl Fn(&u8) -> impl Debug + '_ {
     //~^ ERROR ambiguous `+` in a type
     //~| ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
     |x| x
+    //~^ ERROR lifetime may not live long enough
 }
 
 fn b() -> impl Fn() -> impl Debug + Send {
diff --git a/tests/ui/impl-trait/impl-fn-parsing-ambiguities.stderr b/tests/ui/impl-trait/impl-fn-parsing-ambiguities.stderr
index cf6e5ef7bac..e18e89700b4 100644
--- a/tests/ui/impl-trait/impl-fn-parsing-ambiguities.stderr
+++ b/tests/ui/impl-trait/impl-fn-parsing-ambiguities.stderr
@@ -5,7 +5,7 @@ LL | fn a() -> impl Fn(&u8) -> impl Debug + '_ {
    |                           ^^^^^^^^^^^^^^^ help: use parentheses to disambiguate: `(impl Debug + '_)`
 
 error: ambiguous `+` in a type
-  --> $DIR/impl-fn-parsing-ambiguities.rs:10:24
+  --> $DIR/impl-fn-parsing-ambiguities.rs:11:24
    |
 LL | fn b() -> impl Fn() -> impl Debug + Send {
    |                        ^^^^^^^^^^^^^^^^^ help: use parentheses to disambiguate: `(impl Debug + Send)`
@@ -22,5 +22,14 @@ note: lifetime declared here
 LL | fn a() -> impl Fn(&u8) -> impl Debug + '_ {
    |                   ^
 
-error: aborting due to 3 previous errors
+error: lifetime may not live long enough
+  --> $DIR/impl-fn-parsing-ambiguities.rs:7:9
+   |
+LL |     |x| x
+   |      -- ^ returning this value requires that `'1` must outlive `'2`
+   |      ||
+   |      |return type of closure is impl Debug + '2
+   |      has type `&'1 u8`
+
+error: aborting due to 4 previous errors
 
diff --git a/tests/ui/impl-trait/impl_trait_projections.rs b/tests/ui/impl-trait/impl_trait_projections.rs
index b3ff2ce5a7b..365ac85e2f6 100644
--- a/tests/ui/impl-trait/impl_trait_projections.rs
+++ b/tests/ui/impl-trait/impl_trait_projections.rs
@@ -15,7 +15,7 @@ fn projection_is_disallowed(x: impl Iterator) -> <impl Iterator>::Item {
     x.next().unwrap()
 }
 
-fn projection_with_named_trait_is_disallowed(x: impl Iterator)
+fn projection_with_named_trait_is_disallowed(mut x: impl Iterator)
     -> <impl Iterator as Iterator>::Item
 //~^ ERROR `impl Trait` is not allowed in path parameters
 {
@@ -25,7 +25,9 @@ fn projection_with_named_trait_is_disallowed(x: impl Iterator)
 fn projection_with_named_trait_inside_path_is_disallowed()
     -> <::std::ops::Range<impl Debug> as Iterator>::Item
 //~^ ERROR `impl Trait` is not allowed in path parameters
+//~| ERROR `impl Debug: Step` is not satisfied
 {
+    //~^ ERROR `impl Debug: Step` is not satisfied
     (1i32..100).next().unwrap()
 }
 
diff --git a/tests/ui/impl-trait/impl_trait_projections.stderr b/tests/ui/impl-trait/impl_trait_projections.stderr
index 4deb24731bc..700aff36aa5 100644
--- a/tests/ui/impl-trait/impl_trait_projections.stderr
+++ b/tests/ui/impl-trait/impl_trait_projections.stderr
@@ -17,7 +17,7 @@ LL |     -> <::std::ops::Range<impl Debug> as Iterator>::Item
    |                           ^^^^^^^^^^
 
 error[E0667]: `impl Trait` is not allowed in path parameters
-  --> $DIR/impl_trait_projections.rs:33:29
+  --> $DIR/impl_trait_projections.rs:35:29
    |
 LL |     -> <dyn Iterator<Item = impl Debug> as Iterator>::Item
    |                             ^^^^^^^^^^
@@ -28,6 +28,46 @@ error[E0667]: `impl Trait` is not allowed in path parameters
 LL | fn projection_is_disallowed(x: impl Iterator) -> <impl Iterator>::Item {
    |                                                   ^^^^^^^^^^^^^
 
-error: aborting due to 5 previous errors
+error[E0277]: the trait bound `impl Debug: Step` is not satisfied
+  --> $DIR/impl_trait_projections.rs:26:8
+   |
+LL |     -> <::std::ops::Range<impl Debug> as Iterator>::Item
+   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Step` is not implemented for `impl Debug`
+   |
+   = help: the following other types implement trait `Step`:
+             char
+             isize
+             i8
+             i16
+             i32
+             i64
+             i128
+             usize
+           and 8 others
+   = note: required for `std::ops::Range<impl Debug>` to implement `Iterator`
+
+error[E0277]: the trait bound `impl Debug: Step` is not satisfied
+  --> $DIR/impl_trait_projections.rs:29:1
+   |
+LL | / {
+LL | |
+LL | |     (1i32..100).next().unwrap()
+LL | | }
+   | |_^ the trait `Step` is not implemented for `impl Debug`
+   |
+   = help: the following other types implement trait `Step`:
+             char
+             isize
+             i8
+             i16
+             i32
+             i64
+             i128
+             usize
+           and 8 others
+   = note: required for `std::ops::Range<impl Debug>` to implement `Iterator`
+
+error: aborting due to 7 previous errors
 
-For more information about this error, try `rustc --explain E0667`.
+Some errors have detailed explanations: E0277, E0667.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/implicit-capture-late.stderr b/tests/ui/impl-trait/implicit-capture-late.stderr
index 9b3a4ff5f42..2fb5ebb6541 100644
--- a/tests/ui/impl-trait/implicit-capture-late.stderr
+++ b/tests/ui/impl-trait/implicit-capture-late.stderr
@@ -4,6 +4,12 @@ error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl le
 LL | fn foo(x: Vec<i32>) -> Box<dyn for<'a> Deref<Target = impl ?Sized>> {
    |                                    ^^
 
-error: aborting due to 1 previous error
+error: [o]
+  --> $DIR/implicit-capture-late.rs:10:55
+   |
+LL | fn foo(x: Vec<i32>) -> Box<dyn for<'a> Deref<Target = impl ?Sized>> {
+   |                                                       ^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0657`.
diff --git a/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs
new file mode 100644
index 00000000000..650cb3870d5
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs
@@ -0,0 +1,28 @@
+trait Marker {}
+impl Marker for u32 {}
+
+trait MyTrait {
+    fn foo(&self) -> impl Marker;
+}
+
+struct Outer;
+
+impl MyTrait for Outer {
+    fn foo(&self) -> impl Marker {
+        42
+    }
+}
+
+impl dyn MyTrait {
+    //~^ ERROR the trait `MyTrait` cannot be made into an object
+    fn other(&self) -> impl Marker {
+        //~^ ERROR the trait `MyTrait` cannot be made into an object
+        MyTrait::foo(&self)
+        //~^ ERROR the trait bound `&dyn MyTrait: MyTrait` is not satisfied
+        //~| ERROR the trait bound `&dyn MyTrait: MyTrait` is not satisfied
+        //~| ERROR the trait bound `&dyn MyTrait: MyTrait` is not satisfied
+        //~| ERROR the trait `MyTrait` cannot be made into an object
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.stderr b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.stderr
new file mode 100644
index 00000000000..01de3e53195
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.stderr
@@ -0,0 +1,78 @@
+error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
+  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:20:22
+   |
+LL |         MyTrait::foo(&self)
+   |         ------------ ^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
+   |         |
+   |         required by a bound introduced by this call
+   |
+   = help: the trait `MyTrait` is implemented for `Outer`
+
+error[E0038]: the trait `MyTrait` cannot be made into an object
+  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:20:9
+   |
+LL |         MyTrait::foo(&self)
+   |         ^^^^^^^^^^^^ `MyTrait` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
+   |
+LL | trait MyTrait {
+   |       ------- this trait cannot be made into an object...
+LL |     fn foo(&self) -> impl Marker;
+   |                      ^^^^^^^^^^^ ...because method `foo` references an `impl Trait` type in its return type
+   = help: consider moving `foo` to another trait
+   = help: only type `Outer` implements the trait, consider using it directly instead
+
+error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
+  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:20:9
+   |
+LL |         MyTrait::foo(&self)
+   |         ^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
+   |
+   = help: the trait `MyTrait` is implemented for `Outer`
+
+error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
+  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:20:9
+   |
+LL |         MyTrait::foo(&self)
+   |         ^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
+   |
+   = help: the trait `MyTrait` is implemented for `Outer`
+
+error[E0038]: the trait `MyTrait` cannot be made into an object
+  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:16:6
+   |
+LL | impl dyn MyTrait {
+   |      ^^^^^^^^^^^ `MyTrait` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
+   |
+LL | trait MyTrait {
+   |       ------- this trait cannot be made into an object...
+LL |     fn foo(&self) -> impl Marker;
+   |                      ^^^^^^^^^^^ ...because method `foo` references an `impl Trait` type in its return type
+   = help: consider moving `foo` to another trait
+   = help: only type `Outer` implements the trait, consider using it directly instead
+
+error[E0038]: the trait `MyTrait` cannot be made into an object
+  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:18:15
+   |
+LL |     fn other(&self) -> impl Marker {
+   |               ^^^^ `MyTrait` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
+   |
+LL | trait MyTrait {
+   |       ------- this trait cannot be made into an object...
+LL |     fn foo(&self) -> impl Marker;
+   |                      ^^^^^^^^^^^ ...because method `foo` references an `impl Trait` type in its return type
+   = help: consider moving `foo` to another trait
+   = help: only type `Outer` implements the trait, consider using it directly instead
+
+error: aborting due to 6 previous errors
+
+Some errors have detailed explanations: E0038, E0277.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/impl-trait/issues/issue-54600.rs b/tests/ui/impl-trait/issues/issue-54600.rs
index ccf2767012e..62bfd7cd968 100644
--- a/tests/ui/impl-trait/issues/issue-54600.rs
+++ b/tests/ui/impl-trait/issues/issue-54600.rs
@@ -2,6 +2,6 @@ use std::fmt::Debug;
 
 fn main() {
     let x: Option<impl Debug> = Some(44_u32);
-    //~^ `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ `impl Trait` is not allowed in the type of variable bindings
     println!("{:?}", x);
 }
diff --git a/tests/ui/impl-trait/issues/issue-54600.stderr b/tests/ui/impl-trait/issues/issue-54600.stderr
index 946ad74b872..c75c0fa0f05 100644
--- a/tests/ui/impl-trait/issues/issue-54600.stderr
+++ b/tests/ui/impl-trait/issues/issue-54600.stderr
@@ -1,8 +1,10 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in variable bindings
+error[E0562]: `impl Trait` is not allowed in the type of variable bindings
   --> $DIR/issue-54600.rs:4:19
    |
 LL |     let x: Option<impl Debug> = Some(44_u32);
    |                   ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/issues/issue-54840.rs b/tests/ui/impl-trait/issues/issue-54840.rs
index 910d23f1d93..65257d2f7f1 100644
--- a/tests/ui/impl-trait/issues/issue-54840.rs
+++ b/tests/ui/impl-trait/issues/issue-54840.rs
@@ -3,5 +3,5 @@ use std::ops::Add;
 fn main() {
     let i: i32 = 0;
     let j: &impl Add = &i;
-    //~^ `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ `impl Trait` is not allowed in the type of variable bindings
 }
diff --git a/tests/ui/impl-trait/issues/issue-54840.stderr b/tests/ui/impl-trait/issues/issue-54840.stderr
index c4ab79f110d..de75256d5a9 100644
--- a/tests/ui/impl-trait/issues/issue-54840.stderr
+++ b/tests/ui/impl-trait/issues/issue-54840.stderr
@@ -1,8 +1,10 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in variable bindings
+error[E0562]: `impl Trait` is not allowed in the type of variable bindings
   --> $DIR/issue-54840.rs:5:13
    |
 LL |     let j: &impl Add = &i;
    |             ^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/issues/issue-58504.rs b/tests/ui/impl-trait/issues/issue-58504.rs
index 03b51ae92d1..4f7a35e81b8 100644
--- a/tests/ui/impl-trait/issues/issue-58504.rs
+++ b/tests/ui/impl-trait/issues/issue-58504.rs
@@ -8,5 +8,5 @@ fn mk_gen() -> impl Coroutine<Return=!, Yield=()> {
 
 fn main() {
     let gens: [impl Coroutine<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ];
-    //~^ `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ `impl Trait` is not allowed in the type of variable bindings
 }
diff --git a/tests/ui/impl-trait/issues/issue-58504.stderr b/tests/ui/impl-trait/issues/issue-58504.stderr
index e67e48728ed..8231732bba1 100644
--- a/tests/ui/impl-trait/issues/issue-58504.stderr
+++ b/tests/ui/impl-trait/issues/issue-58504.stderr
@@ -1,8 +1,10 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in variable bindings
+error[E0562]: `impl Trait` is not allowed in the type of variable bindings
   --> $DIR/issue-58504.rs:10:16
    |
 LL |     let gens: [impl Coroutine<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ];
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/issues/issue-58956.rs b/tests/ui/impl-trait/issues/issue-58956.rs
index 5d5566860c0..a59de2379d8 100644
--- a/tests/ui/impl-trait/issues/issue-58956.rs
+++ b/tests/ui/impl-trait/issues/issue-58956.rs
@@ -5,9 +5,9 @@ impl Lam for B {}
 pub struct Wrap<T>(T);
 
 const _A: impl Lam = {
-    //~^ `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ `impl Trait` is not allowed in const types
     let x: Wrap<impl Lam> = Wrap(B);
-    //~^ `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ `impl Trait` is not allowed in the type of variable bindings
     x.0
 };
 
diff --git a/tests/ui/impl-trait/issues/issue-58956.stderr b/tests/ui/impl-trait/issues/issue-58956.stderr
index 5ee33352afa..0c81c69def3 100644
--- a/tests/ui/impl-trait/issues/issue-58956.stderr
+++ b/tests/ui/impl-trait/issues/issue-58956.stderr
@@ -1,14 +1,18 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in const types
+error[E0562]: `impl Trait` is not allowed in const types
   --> $DIR/issue-58956.rs:7:11
    |
 LL | const _A: impl Lam = {
    |           ^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in variable bindings
+error[E0562]: `impl Trait` is not allowed in the type of variable bindings
   --> $DIR/issue-58956.rs:9:17
    |
 LL |     let x: Wrap<impl Lam> = Wrap(B);
    |                 ^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/impl-trait/issues/issue-67830.rs b/tests/ui/impl-trait/issues/issue-67830.rs
index 92f7e005dbf..6dc8935c777 100644
--- a/tests/ui/impl-trait/issues/issue-67830.rs
+++ b/tests/ui/impl-trait/issues/issue-67830.rs
@@ -21,6 +21,8 @@ struct A;
 fn test() -> impl for<'a> MyFn<&'a A, Output=impl Iterator + 'a> {
     //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
     Wrap(|a| Some(a).into_iter())
+    //~^ ERROR implementation of `FnOnce` is not general enough
+    //~| ERROR implementation of `FnOnce` is not general enough
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/issues/issue-67830.stderr b/tests/ui/impl-trait/issues/issue-67830.stderr
index 17cfa151a68..546198b8a10 100644
--- a/tests/ui/impl-trait/issues/issue-67830.stderr
+++ b/tests/ui/impl-trait/issues/issue-67830.stderr
@@ -10,5 +10,24 @@ note: lifetime declared here
 LL | fn test() -> impl for<'a> MyFn<&'a A, Output=impl Iterator + 'a> {
    |                       ^^
 
-error: aborting due to 1 previous error
+error: implementation of `FnOnce` is not general enough
+  --> $DIR/issue-67830.rs:23:5
+   |
+LL |     Wrap(|a| Some(a).into_iter())
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
+   |
+   = note: closure with signature `fn(&'2 A) -> std::option::IntoIter<&A>` must implement `FnOnce<(&'1 A,)>`, for any lifetime `'1`...
+   = note: ...but it actually implements `FnOnce<(&'2 A,)>`, for some specific lifetime `'2`
+
+error: implementation of `FnOnce` is not general enough
+  --> $DIR/issue-67830.rs:23:5
+   |
+LL |     Wrap(|a| Some(a).into_iter())
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
+   |
+   = note: closure with signature `fn(&'2 A) -> std::option::IntoIter<&A>` must implement `FnOnce<(&'1 A,)>`, for any lifetime `'1`...
+   = note: ...but it actually implements `FnOnce<(&'2 A,)>`, for some specific lifetime `'2`
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/impl-trait/issues/issue-70971.rs b/tests/ui/impl-trait/issues/issue-70971.rs
index c24259a71eb..2f2c2e8f441 100644
--- a/tests/ui/impl-trait/issues/issue-70971.rs
+++ b/tests/ui/impl-trait/issues/issue-70971.rs
@@ -1,4 +1,4 @@
 fn main() {
     let x : (impl Copy,) = (true,);
-    //~^ `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ `impl Trait` is not allowed in the type of variable bindings
 }
diff --git a/tests/ui/impl-trait/issues/issue-70971.stderr b/tests/ui/impl-trait/issues/issue-70971.stderr
index fcc67291e4d..28c463cea85 100644
--- a/tests/ui/impl-trait/issues/issue-70971.stderr
+++ b/tests/ui/impl-trait/issues/issue-70971.stderr
@@ -1,8 +1,10 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in variable bindings
+error[E0562]: `impl Trait` is not allowed in the type of variable bindings
   --> $DIR/issue-70971.rs:2:14
    |
 LL |     let x : (impl Copy,) = (true,);
    |              ^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/issues/issue-78722-2.stderr b/tests/ui/impl-trait/issues/issue-78722-2.stderr
index 8817eb7d243..69c734530f2 100644
--- a/tests/ui/impl-trait/issues/issue-78722-2.stderr
+++ b/tests/ui/impl-trait/issues/issue-78722-2.stderr
@@ -1,12 +1,3 @@
-error[E0658]: `async` blocks are not allowed in constants
-  --> $DIR/issue-78722-2.rs:15:20
-   |
-LL |         let f: F = async { 1 };
-   |                    ^^^^^^^^^^^
-   |
-   = note: see issue #85368 <https://github.com/rust-lang/rust/issues/85368> for more information
-   = help: add `#![feature(const_async_blocks)]` to the crate attributes to enable
-
 error[E0271]: expected `{async block@$DIR/issue-78722-2.rs:13:13: 13:21}` to be a future that resolves to `u8`, but it resolves to `()`
   --> $DIR/issue-78722-2.rs:11:30
    |
@@ -26,6 +17,15 @@ note: this item must mention the opaque type in its signature in order to be abl
 LL |         let f: F = async { 1 };
    |                    ^^^^^^^^^^^
 
+error[E0658]: `async` blocks are not allowed in constants
+  --> $DIR/issue-78722-2.rs:15:20
+   |
+LL |         let f: F = async { 1 };
+   |                    ^^^^^^^^^^^
+   |
+   = note: see issue #85368 <https://github.com/rust-lang/rust/issues/85368> for more information
+   = help: add `#![feature(const_async_blocks)]` to the crate attributes to enable
+
 error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0271, E0658.
diff --git a/tests/ui/impl-trait/issues/issue-79099.rs b/tests/ui/impl-trait/issues/issue-79099.rs
index 22c66491ce9..757e61fb631 100644
--- a/tests/ui/impl-trait/issues/issue-79099.rs
+++ b/tests/ui/impl-trait/issues/issue-79099.rs
@@ -1,7 +1,7 @@
 struct Bug {
     V1: [(); {
         let f: impl core::future::Future<Output = u8> = async { 1 };
-        //~^ `impl Trait` only allowed in function and inherent method argument and return types
+        //~^ `impl Trait` is not allowed in the type of variable bindings
         //~| expected identifier
         1
     }],
diff --git a/tests/ui/impl-trait/issues/issue-79099.stderr b/tests/ui/impl-trait/issues/issue-79099.stderr
index 82fc03c61b3..6c26d5bd1b7 100644
--- a/tests/ui/impl-trait/issues/issue-79099.stderr
+++ b/tests/ui/impl-trait/issues/issue-79099.stderr
@@ -9,11 +9,13 @@ LL |         let f: impl core::future::Future<Output = u8> = async { 1 };
    = help: pass `--edition 2021` to `rustc`
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in variable bindings
+error[E0562]: `impl Trait` is not allowed in the type of variable bindings
   --> $DIR/issue-79099.rs:3:16
    |
 LL |         let f: impl core::future::Future<Output = u8> = async { 1 };
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.rs b/tests/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.rs
index 3224145bffe..771b29f3c7e 100644
--- a/tests/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.rs
+++ b/tests/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.rs
@@ -1,8 +1,8 @@
 struct Foo<T = impl Copy>(T);
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in generic parameter defaults
 
 type Result<T, E = impl std::error::Error> = std::result::Result<T, E>;
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in generic parameter defaults
 
 // should not cause ICE
 fn x() -> Foo {
diff --git a/tests/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.stderr b/tests/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.stderr
index 56be4577d51..07d6c5b6b1c 100644
--- a/tests/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.stderr
+++ b/tests/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.stderr
@@ -1,14 +1,18 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generic parameter defaults
+error[E0562]: `impl Trait` is not allowed in generic parameter defaults
   --> $DIR/issue-83929-impl-trait-in-generic-default.rs:1:16
    |
 LL | struct Foo<T = impl Copy>(T);
    |                ^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generic parameter defaults
+error[E0562]: `impl Trait` is not allowed in generic parameter defaults
   --> $DIR/issue-83929-impl-trait-in-generic-default.rs:4:20
    |
 LL | type Result<T, E = impl std::error::Error> = std::result::Result<T, E>;
    |                    ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/impl-trait/issues/issue-84919.rs b/tests/ui/impl-trait/issues/issue-84919.rs
index 77d27d7c06b..0f911ba23ae 100644
--- a/tests/ui/impl-trait/issues/issue-84919.rs
+++ b/tests/ui/impl-trait/issues/issue-84919.rs
@@ -3,7 +3,7 @@ impl Trait for () {}
 
 fn foo<'a: 'a>() {
     let _x: impl Trait = ();
-    //~^ `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ `impl Trait` is not allowed in the type of variable bindings
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/issues/issue-84919.stderr b/tests/ui/impl-trait/issues/issue-84919.stderr
index 963865efa69..02d2ce28fb3 100644
--- a/tests/ui/impl-trait/issues/issue-84919.stderr
+++ b/tests/ui/impl-trait/issues/issue-84919.stderr
@@ -1,8 +1,10 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in variable bindings
+error[E0562]: `impl Trait` is not allowed in the type of variable bindings
   --> $DIR/issue-84919.rs:5:13
    |
 LL |     let _x: impl Trait = ();
    |             ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/issues/issue-86642.rs b/tests/ui/impl-trait/issues/issue-86642.rs
index 49f8944ac4a..74be8779d44 100644
--- a/tests/ui/impl-trait/issues/issue-86642.rs
+++ b/tests/ui/impl-trait/issues/issue-86642.rs
@@ -1,5 +1,5 @@
 static x: impl Fn(&str) -> Result<&str, ()> = move |source| {
-    //~^ `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ `impl Trait` is not allowed in static types
     let res = (move |source| Ok(source))(source);
     let res = res.or((move |source| Ok(source))(source));
     res
diff --git a/tests/ui/impl-trait/issues/issue-86642.stderr b/tests/ui/impl-trait/issues/issue-86642.stderr
index 3ad18a13290..19fd5bc0c1c 100644
--- a/tests/ui/impl-trait/issues/issue-86642.stderr
+++ b/tests/ui/impl-trait/issues/issue-86642.stderr
@@ -1,8 +1,10 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in const types
+error[E0562]: `impl Trait` is not allowed in static types
   --> $DIR/issue-86642.rs:1:11
    |
 LL | static x: impl Fn(&str) -> Result<&str, ()> = move |source| {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/issues/issue-86800.rs b/tests/ui/impl-trait/issues/issue-86800.rs
index df70b324c5e..297b012d90a 100644
--- a/tests/ui/impl-trait/issues/issue-86800.rs
+++ b/tests/ui/impl-trait/issues/issue-86800.rs
@@ -1,8 +1,8 @@
 #![feature(type_alias_impl_trait)]
 
 // edition:2021
-// compile-flags:-Z treat-err-as-bug=1
-// error-pattern: aborting due to `-Z treat-err-as-bug=1`
+// compile-flags:-Z treat-err-as-bug=2
+// error-pattern: due to `-Z treat-err-as-bug=2
 // failure-status:101
 // normalize-stderr-test ".*note: .*\n\n" -> ""
 // normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> ""
diff --git a/tests/ui/impl-trait/issues/issue-86800.stderr b/tests/ui/impl-trait/issues/issue-86800.stderr
index 8228f8ace9d..07ba8eb021b 100644
--- a/tests/ui/impl-trait/issues/issue-86800.stderr
+++ b/tests/ui/impl-trait/issues/issue-86800.stderr
@@ -4,9 +4,18 @@ error: unconstrained opaque type
 LL | type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResult<O>>;
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
+error[E0792]: expected generic lifetime parameter, found `'_`
+  --> $DIR/issue-86800.rs:39:5
+   |
+LL | type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResult<O>>;
+   |                        --- this generic parameter must be used with a generic lifetime parameter
+...
+LL |     f
+   |     ^
+
 error: the compiler unexpectedly panicked. this is a bug.
 
 query stack during panic:
-#0 [type_of_opaque] computing type of opaque `TransactionFuture::{opaque#0}`
-#1 [type_of] computing type of `TransactionFuture::{opaque#0}`
+#0 [mir_borrowck] borrow-checking `execute_transaction_fut`
+#1 [type_of_opaque] computing type of opaque `execute_transaction_fut::{opaque#0}`
 end of query stack
diff --git a/tests/ui/impl-trait/issues/issue-87295.rs b/tests/ui/impl-trait/issues/issue-87295.rs
index eb44020ac0e..a765e14884b 100644
--- a/tests/ui/impl-trait/issues/issue-87295.rs
+++ b/tests/ui/impl-trait/issues/issue-87295.rs
@@ -14,5 +14,5 @@ impl<F> Struct<F> {
 
 fn main() {
     let _do_not_waste: Struct<impl Trait<Output = i32>> = Struct::new(());
-    //~^ `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ `impl Trait` is not allowed in the type of variable bindings
 }
diff --git a/tests/ui/impl-trait/issues/issue-87295.stderr b/tests/ui/impl-trait/issues/issue-87295.stderr
index e9a635f244b..78274a056ec 100644
--- a/tests/ui/impl-trait/issues/issue-87295.stderr
+++ b/tests/ui/impl-trait/issues/issue-87295.stderr
@@ -1,8 +1,10 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in variable bindings
+error[E0562]: `impl Trait` is not allowed in the type of variable bindings
   --> $DIR/issue-87295.rs:16:31
    |
 LL |     let _do_not_waste: Struct<impl Trait<Output = i32>> = Struct::new(());
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/issues/issue-88236-2.rs b/tests/ui/impl-trait/issues/issue-88236-2.rs
index fde8a6704cc..f4354d1b2ae 100644
--- a/tests/ui/impl-trait/issues/issue-88236-2.rs
+++ b/tests/ui/impl-trait/issues/issue-88236-2.rs
@@ -18,11 +18,16 @@ fn make_impl() -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {}
 fn make_weird_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {
     //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
     &()
+    //~^ ERROR implementation of `Hrtb` is not general enough
+    //~| ERROR implementation of `Hrtb` is not general enough
 }
 
 fn make_bad_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {
     //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
     x
+    //~^ ERROR implementation of `Hrtb` is not general enough
+    //~| ERROR implementation of `Hrtb` is not general enough
+    //~| ERROR lifetime may not live long enough
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/issues/issue-88236-2.stderr b/tests/ui/impl-trait/issues/issue-88236-2.stderr
index 8605d07abe9..1e63338d6d1 100644
--- a/tests/ui/impl-trait/issues/issue-88236-2.stderr
+++ b/tests/ui/impl-trait/issues/issue-88236-2.stderr
@@ -23,16 +23,70 @@ LL | fn make_weird_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Sen
    |                                               ^^
 
 error: higher kinded lifetime bounds on nested opaque types are not supported yet
-  --> $DIR/issue-88236-2.rs:23:78
+  --> $DIR/issue-88236-2.rs:25:78
    |
 LL | fn make_bad_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {
    |                                                                              ^^
    |
 note: lifetime declared here
-  --> $DIR/issue-88236-2.rs:23:45
+  --> $DIR/issue-88236-2.rs:25:45
    |
 LL | fn make_bad_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {
    |                                             ^^
 
-error: aborting due to 3 previous errors
+error: implementation of `Hrtb` is not general enough
+  --> $DIR/issue-88236-2.rs:20:5
+   |
+LL |     &()
+   |     ^^^ implementation of `Hrtb` is not general enough
+   |
+   = note: `Hrtb<'0>` would have to be implemented for the type `&()`, for any lifetime `'0`...
+   = note: ...but `Hrtb<'1>` is actually implemented for the type `&'1 ()`, for some specific lifetime `'1`
+
+error: implementation of `Hrtb` is not general enough
+  --> $DIR/issue-88236-2.rs:20:5
+   |
+LL |     &()
+   |     ^^^ implementation of `Hrtb` is not general enough
+   |
+   = note: `Hrtb<'a>` would have to be implemented for the type `&()`
+   = note: ...but `Hrtb<'0>` is actually implemented for the type `&'0 ()`, for some specific lifetime `'0`
+
+error: lifetime may not live long enough
+  --> $DIR/issue-88236-2.rs:27:5
+   |
+LL | fn make_bad_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {
+   |                  -- lifetime `'b` defined here
+LL |
+LL |     x
+   |     ^ returning this value requires that `'b` must outlive `'static`
+   |
+help: to declare that `impl for<'a> Hrtb<'a, Assoc = impl Send + '_>` captures data from argument `x`, you can add an explicit `'b` lifetime bound
+   |
+LL | fn make_bad_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> + 'b {
+   |                                                                                  ++++
+help: to declare that `impl Send + 'a` captures data from argument `x`, you can add an explicit `'b` lifetime bound
+   |
+LL | fn make_bad_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a + 'b> {
+   |                                                                                 ++++
+
+error: implementation of `Hrtb` is not general enough
+  --> $DIR/issue-88236-2.rs:27:5
+   |
+LL |     x
+   |     ^ implementation of `Hrtb` is not general enough
+   |
+   = note: `Hrtb<'0>` would have to be implemented for the type `&()`, for any lifetime `'0`...
+   = note: ...but `Hrtb<'1>` is actually implemented for the type `&'1 ()`, for some specific lifetime `'1`
+
+error: implementation of `Hrtb` is not general enough
+  --> $DIR/issue-88236-2.rs:27:5
+   |
+LL |     x
+   |     ^ implementation of `Hrtb` is not general enough
+   |
+   = note: `Hrtb<'a>` would have to be implemented for the type `&()`
+   = note: ...but `Hrtb<'0>` is actually implemented for the type `&'0 ()`, for some specific lifetime `'0`
+
+error: aborting due to 8 previous errors
 
diff --git a/tests/ui/impl-trait/issues/issue-92305.rs b/tests/ui/impl-trait/issues/issue-92305.rs
index 4a89238d07e..e16199caaaa 100644
--- a/tests/ui/impl-trait/issues/issue-92305.rs
+++ b/tests/ui/impl-trait/issues/issue-92305.rs
@@ -5,6 +5,7 @@ use std::iter;
 fn f<T>(data: &[T]) -> impl Iterator<Item = Vec> {
     //~^ ERROR: missing generics for struct `Vec` [E0107]
     iter::empty()
+    //~^ ERROR: type annotations needed
 }
 
 fn g<T>(data: &[T], target: T) -> impl Iterator<Item = Vec<T>> {
diff --git a/tests/ui/impl-trait/issues/issue-92305.stderr b/tests/ui/impl-trait/issues/issue-92305.stderr
index 88fb1fb2707..55e966bd7bf 100644
--- a/tests/ui/impl-trait/issues/issue-92305.stderr
+++ b/tests/ui/impl-trait/issues/issue-92305.stderr
@@ -9,6 +9,18 @@ help: add missing generic argument
 LL | fn f<T>(data: &[T]) -> impl Iterator<Item = Vec<T>> {
    |                                                +++
 
-error: aborting due to 1 previous error
+error[E0282]: type annotations needed
+  --> $DIR/issue-92305.rs:7:5
+   |
+LL |     iter::empty()
+   |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
+   |
+help: consider specifying the generic argument
+   |
+LL |     iter::empty::<T>()
+   |                +++++
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0107, E0282.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/impl-trait/nested-rpit-hrtb.rs b/tests/ui/impl-trait/nested-rpit-hrtb.rs
index a5db10d3a22..a3eca741daa 100644
--- a/tests/ui/impl-trait/nested-rpit-hrtb.rs
+++ b/tests/ui/impl-trait/nested-rpit-hrtb.rs
@@ -31,9 +31,11 @@ fn one_hrtb_trait_param() -> impl for<'a> Foo<'a, Assoc = impl Qux<'a>> {}
 
 fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a> {}
 //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
+//~| ERROR implementation of `Bar` is not general enough
 
 fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {}
 //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
+//~| ERROR: the trait bound `for<'a> &'a (): Qux<'_>` is not satisfied
 
 // This should resolve.
 fn one_hrtb_mention_fn_trait_param<'b>() -> impl for<'a> Foo<'a, Assoc = impl Qux<'b>> {}
@@ -43,9 +45,11 @@ fn one_hrtb_mention_fn_outlives<'b>() -> impl for<'a> Foo<'a, Assoc = impl Sized
 
 // This should resolve.
 fn one_hrtb_mention_fn_trait_param_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Qux<'b>> {}
+//~^ ERROR: the trait bound `for<'a> &'a (): Qux<'b>` is not satisfied
 
 // This should resolve.
 fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'b> {}
+//~^ ERROR implementation of `Bar` is not general enough
 
 // This should resolve.
 fn two_htrb_trait_param() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Qux<'b>> {}
@@ -56,9 +60,11 @@ fn two_htrb_outlives() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Sized + 'b>
 
 // This should resolve.
 fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Qux<'b>> {}
+//~^ ERROR: the trait bound `for<'a, 'b> &'a (): Qux<'b>` is not satisfied
 
 // `'b` is not in scope for the outlives bound.
 fn two_htrb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {}
 //~^ ERROR use of undeclared lifetime name `'b` [E0261]
+//~| ERROR implementation of `Bar` is not general enough
 
 fn main() {}
diff --git a/tests/ui/impl-trait/nested-rpit-hrtb.stderr b/tests/ui/impl-trait/nested-rpit-hrtb.stderr
index 3dbe6ebadfb..0e0f76874e3 100644
--- a/tests/ui/impl-trait/nested-rpit-hrtb.stderr
+++ b/tests/ui/impl-trait/nested-rpit-hrtb.stderr
@@ -1,5 +1,5 @@
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/nested-rpit-hrtb.rs:54:77
+  --> $DIR/nested-rpit-hrtb.rs:58:77
    |
 LL | fn two_htrb_outlives() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Sized + 'b> {}
    |                                                                             ^^ undeclared lifetime
@@ -15,7 +15,7 @@ LL | fn two_htrb_outlives<'b>() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Siz
    |                     ++++
 
 error[E0261]: use of undeclared lifetime name `'b`
-  --> $DIR/nested-rpit-hrtb.rs:61:82
+  --> $DIR/nested-rpit-hrtb.rs:66:82
    |
 LL | fn two_htrb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {}
    |                                                                                  ^^ undeclared lifetime
@@ -66,17 +66,72 @@ LL | fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a
    |                                         ^^
 
 error: higher kinded lifetime bounds on nested opaque types are not supported yet
-  --> $DIR/nested-rpit-hrtb.rs:35:73
+  --> $DIR/nested-rpit-hrtb.rs:36:73
    |
 LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {}
    |                                                                         ^^
    |
 note: lifetime declared here
-  --> $DIR/nested-rpit-hrtb.rs:35:44
+  --> $DIR/nested-rpit-hrtb.rs:36:44
    |
 LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {}
    |                                            ^^
 
-error: aborting due to 6 previous errors
+error: implementation of `Bar` is not general enough
+  --> $DIR/nested-rpit-hrtb.rs:32:78
+   |
+LL | fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a> {}
+   |                                                                              ^^ implementation of `Bar` is not general enough
+   |
+   = note: `()` must implement `Bar<'a>`
+   = note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0`
+
+error[E0277]: the trait bound `for<'a> &'a (): Qux<'_>` is not satisfied
+  --> $DIR/nested-rpit-hrtb.rs:36:64
+   |
+LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {}
+   |                                                                ^^^^^^^^^^^^ the trait `for<'a> Qux<'_>` is not implemented for `&'a ()`
+   |
+   = help: the trait `Qux<'_>` is implemented for `()`
+   = help: for that trait implementation, expected `()`, found `&'a ()`
+
+error[E0277]: the trait bound `for<'a> &'a (): Qux<'b>` is not satisfied
+  --> $DIR/nested-rpit-hrtb.rs:47:79
+   |
+LL | fn one_hrtb_mention_fn_trait_param_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Qux<'b>> {}
+   |                                                                               ^^^^^^^^^^^^ the trait `for<'a> Qux<'b>` is not implemented for `&'a ()`
+   |
+   = help: the trait `Qux<'_>` is implemented for `()`
+   = help: for that trait implementation, expected `()`, found `&'a ()`
+
+error: implementation of `Bar` is not general enough
+  --> $DIR/nested-rpit-hrtb.rs:51:93
+   |
+LL | fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'b> {}
+   |                                                                                             ^^ implementation of `Bar` is not general enough
+   |
+   = note: `()` must implement `Bar<'a>`
+   = note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0`
+
+error[E0277]: the trait bound `for<'a, 'b> &'a (): Qux<'b>` is not satisfied
+  --> $DIR/nested-rpit-hrtb.rs:62:64
+   |
+LL | fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Qux<'b>> {}
+   |                                                                ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a, 'b> Qux<'b>` is not implemented for `&'a ()`
+   |
+   = help: the trait `Qux<'_>` is implemented for `()`
+   = help: for that trait implementation, expected `()`, found `&'a ()`
+
+error: implementation of `Bar` is not general enough
+  --> $DIR/nested-rpit-hrtb.rs:66:86
+   |
+LL | fn two_htrb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {}
+   |                                                                                      ^^ implementation of `Bar` is not general enough
+   |
+   = note: `()` must implement `Bar<'a>`
+   = note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0`
+
+error: aborting due to 12 previous errors
 
-For more information about this error, try `rustc --explain E0261`.
+Some errors have detailed explanations: E0261, E0277.
+For more information about an error, try `rustc --explain E0261`.
diff --git a/tests/ui/impl-trait/nested_impl_trait.rs b/tests/ui/impl-trait/nested_impl_trait.rs
index c036b9e367a..760102794c3 100644
--- a/tests/ui/impl-trait/nested_impl_trait.rs
+++ b/tests/ui/impl-trait/nested_impl_trait.rs
@@ -9,7 +9,7 @@ fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
 
 fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
 //~^ ERROR nested `impl Trait` is not allowed
-//~| `impl Trait` only allowed in function and inherent method argument and return types
+//~| `impl Trait` is not allowed in `fn` pointer
 
 fn bad_in_arg_position(_: impl Into<impl Debug>) { }
 //~^ ERROR nested `impl Trait` is not allowed
diff --git a/tests/ui/impl-trait/nested_impl_trait.stderr b/tests/ui/impl-trait/nested_impl_trait.stderr
index f1cafd958b0..31c3e0c9013 100644
--- a/tests/ui/impl-trait/nested_impl_trait.stderr
+++ b/tests/ui/impl-trait/nested_impl_trait.stderr
@@ -34,11 +34,13 @@ LL |     fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
    |                                  |         nested `impl Trait` here
    |                                  outer `impl Trait`
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `fn` pointer return types
+error[E0562]: `impl Trait` is not allowed in `fn` pointer return types
   --> $DIR/nested_impl_trait.rs:10:32
    |
 LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
    |                                ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
   --> $DIR/nested_impl_trait.rs:6:46
diff --git a/tests/ui/impl-trait/recursive-coroutine.rs b/tests/ui/impl-trait/recursive-coroutine-boxed.rs
index b82fe134a40..b9291f07e21 100644
--- a/tests/ui/impl-trait/recursive-coroutine.rs
+++ b/tests/ui/impl-trait/recursive-coroutine-boxed.rs
@@ -1,3 +1,4 @@
+// check-pass
 // revisions: current next
 //[next] compile-flags: -Znext-solver
 #![feature(coroutines, coroutine_trait)]
@@ -5,12 +6,8 @@
 use std::ops::{Coroutine, CoroutineState};
 
 fn foo() -> impl Coroutine<Yield = (), Return = ()> {
-    //~^ ERROR cannot resolve opaque type
-    //~| NOTE recursive opaque type
-    //~| NOTE in this expansion of desugaring of
     || {
         let mut gen = Box::pin(foo());
-        //~^ NOTE coroutine captures itself here
         let mut r = gen.as_mut().resume(());
         while let CoroutineState::Yielded(v) = r {
             yield v;
diff --git a/tests/ui/impl-trait/recursive-coroutine-indirect.current.stderr b/tests/ui/impl-trait/recursive-coroutine-indirect.current.stderr
new file mode 100644
index 00000000000..11b3c4ef007
--- /dev/null
+++ b/tests/ui/impl-trait/recursive-coroutine-indirect.current.stderr
@@ -0,0 +1,11 @@
+error[E0733]: recursion in a coroutine requires boxing
+  --> $DIR/recursive-coroutine-indirect.rs:6:5
+   |
+LL |     move || {
+   |     ^^^^^^^
+LL |         let x = coroutine_hold();
+   |             - recursive call here
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/impl-trait/recursive-coroutine-indirect.next.stderr b/tests/ui/impl-trait/recursive-coroutine-indirect.next.stderr
new file mode 100644
index 00000000000..11b3c4ef007
--- /dev/null
+++ b/tests/ui/impl-trait/recursive-coroutine-indirect.next.stderr
@@ -0,0 +1,11 @@
+error[E0733]: recursion in a coroutine requires boxing
+  --> $DIR/recursive-coroutine-indirect.rs:6:5
+   |
+LL |     move || {
+   |     ^^^^^^^
+LL |         let x = coroutine_hold();
+   |             - recursive call here
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/impl-trait/recursive-coroutine-indirect.rs b/tests/ui/impl-trait/recursive-coroutine-indirect.rs
new file mode 100644
index 00000000000..4f8d4d33050
--- /dev/null
+++ b/tests/ui/impl-trait/recursive-coroutine-indirect.rs
@@ -0,0 +1,13 @@
+// revisions: current next
+//[next] compile-flags: -Znext-solver
+#![feature(coroutines)]
+#![allow(unconditional_recursion)]
+fn coroutine_hold() -> impl Sized {
+    move || { //~ ERROR recursion in a coroutine requires boxing
+        let x = coroutine_hold();
+        yield;
+        x;
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/recursive-coroutine.current.stderr b/tests/ui/impl-trait/recursive-coroutine.current.stderr
deleted file mode 100644
index e838634ed08..00000000000
--- a/tests/ui/impl-trait/recursive-coroutine.current.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-coroutine.rs:7:13
-   |
-LL | fn foo() -> impl Coroutine<Yield = (), Return = ()> {
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type
-...
-LL |         let mut gen = Box::pin(foo());
-   |             ------- coroutine captures itself here
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/impl-trait/recursive-coroutine.next.stderr b/tests/ui/impl-trait/recursive-coroutine.next.stderr
deleted file mode 100644
index e838634ed08..00000000000
--- a/tests/ui/impl-trait/recursive-coroutine.next.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-coroutine.rs:7:13
-   |
-LL | fn foo() -> impl Coroutine<Yield = (), Return = ()> {
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type
-...
-LL |         let mut gen = Box::pin(foo());
-   |             ------- coroutine captures itself here
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs b/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs
index 8331eec906e..432f80a1763 100644
--- a/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs
+++ b/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs
@@ -1,6 +1,5 @@
 // Test that impl trait does not allow creating recursive types that are
 // otherwise forbidden.
-
 #![feature(coroutines)]
 #![allow(unconditional_recursion)]
 
@@ -69,15 +68,6 @@ fn substs_change<T: 'static>() -> impl Sized {
     (substs_change::<&T>(),)
 }
 
-fn coroutine_hold() -> impl Sized {
-    //~^ ERROR
-    move || {
-        let x = coroutine_hold();
-        yield;
-        x;
-    }
-}
-
 fn use_fn_ptr() -> impl Sized {
     // OK, error already reported
     fn_ptr()
diff --git a/tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr b/tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr
index 8e9aa8ad0a6..d5b8c531fd6 100644
--- a/tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr
+++ b/tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr
@@ -1,5 +1,5 @@
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:7:22
+  --> $DIR/recursive-impl-trait-type-indirect.rs:6:22
    |
 LL | fn option(i: i32) -> impl Sized {
    |                      ^^^^^^^^^^ recursive opaque type
@@ -10,7 +10,7 @@ LL |     if i < 0 { None } else { Some((option(i - 1), i)) }
    |                returning here with type `Option<(impl Sized, i32)>`
 
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:12:15
+  --> $DIR/recursive-impl-trait-type-indirect.rs:11:15
    |
 LL | fn tuple() -> impl Sized {
    |               ^^^^^^^^^^ recursive opaque type
@@ -19,7 +19,7 @@ LL |     (tuple(),)
    |     ---------- returning here with type `(impl Sized,)`
 
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:17:15
+  --> $DIR/recursive-impl-trait-type-indirect.rs:16:15
    |
 LL | fn array() -> impl Sized {
    |               ^^^^^^^^^^ recursive opaque type
@@ -28,7 +28,7 @@ LL |     [array()]
    |     --------- returning here with type `[impl Sized; 1]`
 
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:22:13
+  --> $DIR/recursive-impl-trait-type-indirect.rs:21:13
    |
 LL | fn ptr() -> impl Sized {
    |             ^^^^^^^^^^ recursive opaque type
@@ -37,7 +37,7 @@ LL |     &ptr() as *const _
    |     ------------------ returning here with type `*const impl Sized`
 
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:27:16
+  --> $DIR/recursive-impl-trait-type-indirect.rs:26:16
    |
 LL | fn fn_ptr() -> impl Sized {
    |                ^^^^^^^^^^ recursive opaque type
@@ -46,7 +46,7 @@ LL |     fn_ptr as fn() -> _
    |     ------------------- returning here with type `fn() -> impl Sized`
 
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:32:25
+  --> $DIR/recursive-impl-trait-type-indirect.rs:31:25
    |
 LL |   fn closure_capture() -> impl Sized {
    |                           ^^^^^^^^^^ recursive opaque type
@@ -55,10 +55,10 @@ LL | /     move || {
 LL | |         x;
    | |         - closure captures itself here
 LL | |     }
-   | |_____- returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:35:5: 35:12}`
+   | |_____- returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:34:5: 34:12}`
 
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:40:29
+  --> $DIR/recursive-impl-trait-type-indirect.rs:39:29
    |
 LL |   fn closure_ref_capture() -> impl Sized {
    |                               ^^^^^^^^^^ recursive opaque type
@@ -67,28 +67,28 @@ LL | /     move || {
 LL | |         &x;
    | |          - closure captures itself here
 LL | |     }
-   | |_____- returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:43:5: 43:12}`
+   | |_____- returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:42:5: 42:12}`
 
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:48:21
+  --> $DIR/recursive-impl-trait-type-indirect.rs:47:21
    |
 LL | fn closure_sig() -> impl Sized {
    |                     ^^^^^^^^^^ recursive opaque type
 LL |
 LL |     || closure_sig()
-   |     ---------------- returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:50:5: 50:7}`
+   |     ---------------- returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:49:5: 49:7}`
 
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:53:23
+  --> $DIR/recursive-impl-trait-type-indirect.rs:52:23
    |
 LL | fn coroutine_sig() -> impl Sized {
    |                       ^^^^^^^^^^ recursive opaque type
 LL |
 LL |     || coroutine_sig()
-   |     ------------------ returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:55:5: 55:7}`
+   |     ------------------ returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:54:5: 54:7}`
 
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:58:27
+  --> $DIR/recursive-impl-trait-type-indirect.rs:57:27
    |
 LL |   fn coroutine_capture() -> impl Sized {
    |                             ^^^^^^^^^^ recursive opaque type
@@ -98,10 +98,10 @@ LL | |         yield;
 LL | |         x;
    | |         - coroutine captures itself here
 LL | |     }
-   | |_____- returning here with type `{coroutine@$DIR/recursive-impl-trait-type-indirect.rs:61:5: 61:12}`
+   | |_____- returning here with type `{coroutine@$DIR/recursive-impl-trait-type-indirect.rs:60:5: 60:12}`
 
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:67:35
+  --> $DIR/recursive-impl-trait-type-indirect.rs:66:35
    |
 LL | fn substs_change<T: 'static>() -> impl Sized {
    |                                   ^^^^^^^^^^ recursive opaque type
@@ -110,16 +110,7 @@ LL |     (substs_change::<&T>(),)
    |     ------------------------ returning here with type `(impl Sized,)`
 
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:72:24
-   |
-LL | fn coroutine_hold() -> impl Sized {
-   |                        ^^^^^^^^^^ recursive opaque type
-...
-LL |         let x = coroutine_hold();
-   |             - coroutine captures itself here
-
-error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:86:26
+  --> $DIR/recursive-impl-trait-type-indirect.rs:76:26
    |
 LL | fn mutual_recursion() -> impl Sync {
    |                          ^^^^^^^^^ recursive opaque type
@@ -131,7 +122,7 @@ LL | fn mutual_recursion_b() -> impl Sized {
    |                            ---------- returning this opaque type `impl Sized`
 
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-impl-trait-type-indirect.rs:91:28
+  --> $DIR/recursive-impl-trait-type-indirect.rs:81:28
    |
 LL | fn mutual_recursion() -> impl Sync {
    |                          --------- returning this opaque type `impl Sync`
@@ -142,6 +133,6 @@ LL |
 LL |     mutual_recursion()
    |     ------------------ returning here with type `impl Sync`
 
-error: aborting due to 14 previous errors
+error: aborting due to 13 previous errors
 
 For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/impl-trait/where-allowed.rs b/tests/ui/impl-trait/where-allowed.rs
index 158dc5ab974..5ce63db684f 100644
--- a/tests/ui/impl-trait/where-allowed.rs
+++ b/tests/ui/impl-trait/where-allowed.rs
@@ -16,47 +16,47 @@ fn in_adt_in_parameters(_: Vec<impl Debug>) { panic!() }
 
 // Disallowed
 fn in_fn_parameter_in_parameters(_: fn(impl Debug)) { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in `fn` pointer
 
 // Disallowed
 fn in_fn_return_in_parameters(_: fn() -> impl Debug) { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in `fn` pointer
 
 // Disallowed
 fn in_fn_parameter_in_return() -> fn(impl Debug) { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in `fn` pointer
 
 // Disallowed
 fn in_fn_return_in_return() -> fn() -> impl Debug { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in `fn` pointer
 
 // Disallowed
 fn in_dyn_Fn_parameter_in_parameters(_: &dyn Fn(impl Debug)) { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in the parameters of `Fn` trait bounds
 
 // Disallowed
 fn in_dyn_Fn_return_in_parameters(_: &dyn Fn() -> impl Debug) { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in the return type of `Fn` trait bounds
 
 // Disallowed
 fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in the parameters of `Fn` trait bounds
 
 // Allowed
 fn in_dyn_Fn_return_in_return() -> &'static dyn Fn() -> impl Debug { panic!() }
 
 // Disallowed
 fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in the parameters of `Fn` trait bounds
 //~^^ ERROR nested `impl Trait` is not allowed
 
 // Disallowed
 fn in_impl_Fn_return_in_parameters(_: &impl Fn() -> impl Debug) { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in the return type of `Fn` trait bounds
 
 // Disallowed
 fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in the parameters of `Fn` trait bounds
 //~| ERROR nested `impl Trait` is not allowed
 
 // Allowed
@@ -64,11 +64,11 @@ fn in_impl_Fn_return_in_return() -> &'static impl Fn() -> impl Debug { panic!()
 
 // Disallowed
 fn in_Fn_parameter_in_generics<F: Fn(impl Debug)> (_: F) { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in the parameters of `Fn` trait bounds
 
 // Disallowed
 fn in_Fn_return_in_generics<F: Fn() -> impl Debug> (_: F) { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in the return type of `Fn` trait bounds
 
 
 // Allowed
@@ -81,22 +81,22 @@ fn in_impl_Trait_in_return() -> impl IntoIterator<Item = impl IntoIterator> {
 
 // Disallowed
 struct InBraceStructField { x: impl Debug }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in field types
 
 // Disallowed
 struct InAdtInBraceStructField { x: Vec<impl Debug> }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in field types
 
 // Disallowed
 struct InTupleStructField(impl Debug);
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in field types
 
 // Disallowed
 enum InEnum {
     InBraceVariant { x: impl Debug },
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in field types
     InTupleVariant(impl Debug),
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in field types
 }
 
 // Allowed
@@ -136,10 +136,10 @@ impl DummyType {
 // Disallowed
 extern "C" {
     fn in_foreign_parameters(_: impl Debug);
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in `extern fn`
 
     fn in_foreign_return() -> impl Debug;
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in `extern fn`
 }
 
 // Allowed
@@ -155,97 +155,97 @@ type InTypeAlias<R> = impl Debug;
 //~^ ERROR `impl Trait` in type aliases is unstable
 
 type InReturnInTypeAlias<R> = fn() -> impl Debug;
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in `fn` pointer
 //~| ERROR `impl Trait` in type aliases is unstable
 
 // Disallowed in impl headers
 impl PartialEq<impl Debug> for () {
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in traits
 }
 
 // Disallowed in impl headers
 impl PartialEq<()> for impl Debug {
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in impl headers
 }
 
 // Disallowed in inherent impls
 impl impl Debug {
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in impl headers
 }
 
 // Disallowed in inherent impls
 struct InInherentImplAdt<T> { t: T }
 impl InInherentImplAdt<impl Debug> {
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in impl headers
 }
 
 // Disallowed in where clauses
 fn in_fn_where_clause()
     where impl Debug: Debug
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in bounds
 {
 }
 
 // Disallowed in where clauses
 fn in_adt_in_fn_where_clause()
     where Vec<impl Debug>: Debug
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in bounds
 {
 }
 
 // Disallowed
 fn in_trait_parameter_in_fn_where_clause<T>()
     where T: PartialEq<impl Debug>
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in bounds
 {
 }
 
 // Disallowed
 fn in_Fn_parameter_in_fn_where_clause<T>()
     where T: Fn(impl Debug)
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in the parameters of `Fn` trait bounds
 {
 }
 
 // Disallowed
 fn in_Fn_return_in_fn_where_clause<T>()
     where T: Fn() -> impl Debug
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in the return type of `Fn` trait bounds
 {
 }
 
 // Disallowed
 struct InStructGenericParamDefault<T = impl Debug>(T);
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in generic parameter defaults
 
 // Disallowed
 enum InEnumGenericParamDefault<T = impl Debug> { Variant(T) }
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in generic parameter defaults
 
 // Disallowed
 trait InTraitGenericParamDefault<T = impl Debug> {}
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in generic parameter defaults
 
 // Disallowed
 type InTypeAliasGenericParamDefault<T = impl Debug> = T;
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in generic parameter defaults
 
 // Disallowed
 impl <T = impl Debug> T {}
 //~^ ERROR defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
 //~| WARNING this was previously accepted by the compiler but is being phased out
-//~| ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~| ERROR `impl Trait` is not allowed in generic parameter defaults
 //~| ERROR no nominal type found
 
 // Disallowed
 fn in_method_generic_param_default<T = impl Debug>(_: T) {}
 //~^ ERROR defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
 //~| WARNING this was previously accepted by the compiler but is being phased out
-//~| ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~| ERROR `impl Trait` is not allowed in generic parameter defaults
 
 fn main() {
     let _in_local_variable: impl Fn() = || {};
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in the type of variable bindings
     let _in_return_in_local_variable = || -> impl Fn() { || {} };
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in closure return types
 }
diff --git a/tests/ui/impl-trait/where-allowed.stderr b/tests/ui/impl-trait/where-allowed.stderr
index 2d8895030f2..5e8a8637d04 100644
--- a/tests/ui/impl-trait/where-allowed.stderr
+++ b/tests/ui/impl-trait/where-allowed.stderr
@@ -43,227 +43,301 @@ LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
    = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `fn` pointer params
+error[E0562]: `impl Trait` is not allowed in `fn` pointer parameters
   --> $DIR/where-allowed.rs:18:40
    |
 LL | fn in_fn_parameter_in_parameters(_: fn(impl Debug)) { panic!() }
    |                                        ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `fn` pointer return types
+error[E0562]: `impl Trait` is not allowed in `fn` pointer return types
   --> $DIR/where-allowed.rs:22:42
    |
 LL | fn in_fn_return_in_parameters(_: fn() -> impl Debug) { panic!() }
    |                                          ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `fn` pointer params
+error[E0562]: `impl Trait` is not allowed in `fn` pointer parameters
   --> $DIR/where-allowed.rs:26:38
    |
 LL | fn in_fn_parameter_in_return() -> fn(impl Debug) { panic!() }
    |                                      ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `fn` pointer return types
+error[E0562]: `impl Trait` is not allowed in `fn` pointer return types
   --> $DIR/where-allowed.rs:30:40
    |
 LL | fn in_fn_return_in_return() -> fn() -> impl Debug { panic!() }
    |                                        ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait params
+error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
   --> $DIR/where-allowed.rs:34:49
    |
 LL | fn in_dyn_Fn_parameter_in_parameters(_: &dyn Fn(impl Debug)) { panic!() }
    |                                                 ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait return types
+error[E0562]: `impl Trait` is not allowed in the return type of `Fn` trait bounds
   --> $DIR/where-allowed.rs:38:51
    |
 LL | fn in_dyn_Fn_return_in_parameters(_: &dyn Fn() -> impl Debug) { panic!() }
    |                                                   ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait params
+error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
   --> $DIR/where-allowed.rs:42:55
    |
 LL | fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() }
    |                                                       ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait params
+error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
   --> $DIR/where-allowed.rs:49:51
    |
 LL | fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
    |                                                   ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait return types
+error[E0562]: `impl Trait` is not allowed in the return type of `Fn` trait bounds
   --> $DIR/where-allowed.rs:54:53
    |
 LL | fn in_impl_Fn_return_in_parameters(_: &impl Fn() -> impl Debug) { panic!() }
    |                                                     ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait params
+error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
   --> $DIR/where-allowed.rs:58:57
    |
 LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
    |                                                         ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait params
+error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
   --> $DIR/where-allowed.rs:66:38
    |
 LL | fn in_Fn_parameter_in_generics<F: Fn(impl Debug)> (_: F) { panic!() }
    |                                      ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait return types
+error[E0562]: `impl Trait` is not allowed in the return type of `Fn` trait bounds
   --> $DIR/where-allowed.rs:70:40
    |
 LL | fn in_Fn_return_in_generics<F: Fn() -> impl Debug> (_: F) { panic!() }
    |                                        ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in field types
+error[E0562]: `impl Trait` is not allowed in field types
   --> $DIR/where-allowed.rs:83:32
    |
 LL | struct InBraceStructField { x: impl Debug }
    |                                ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in field types
+error[E0562]: `impl Trait` is not allowed in field types
   --> $DIR/where-allowed.rs:87:41
    |
 LL | struct InAdtInBraceStructField { x: Vec<impl Debug> }
    |                                         ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in field types
+error[E0562]: `impl Trait` is not allowed in field types
   --> $DIR/where-allowed.rs:91:27
    |
 LL | struct InTupleStructField(impl Debug);
    |                           ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in field types
+error[E0562]: `impl Trait` is not allowed in field types
   --> $DIR/where-allowed.rs:96:25
    |
 LL |     InBraceVariant { x: impl Debug },
    |                         ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in field types
+error[E0562]: `impl Trait` is not allowed in field types
   --> $DIR/where-allowed.rs:98:20
    |
 LL |     InTupleVariant(impl Debug),
    |                    ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `extern fn` params
+error[E0562]: `impl Trait` is not allowed in `extern fn` parameters
   --> $DIR/where-allowed.rs:138:33
    |
 LL |     fn in_foreign_parameters(_: impl Debug);
    |                                 ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `extern fn` return types
+error[E0562]: `impl Trait` is not allowed in `extern fn` return types
   --> $DIR/where-allowed.rs:141:31
    |
 LL |     fn in_foreign_return() -> impl Debug;
    |                               ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `fn` pointer return types
+error[E0562]: `impl Trait` is not allowed in `fn` pointer return types
   --> $DIR/where-allowed.rs:157:39
    |
 LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
    |                                       ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in traits
+error[E0562]: `impl Trait` is not allowed in traits
   --> $DIR/where-allowed.rs:162:16
    |
 LL | impl PartialEq<impl Debug> for () {
    |                ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in impl headers
+error[E0562]: `impl Trait` is not allowed in impl headers
   --> $DIR/where-allowed.rs:167:24
    |
 LL | impl PartialEq<()> for impl Debug {
    |                        ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in impl headers
+error[E0562]: `impl Trait` is not allowed in impl headers
   --> $DIR/where-allowed.rs:172:6
    |
 LL | impl impl Debug {
    |      ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in impl headers
+error[E0562]: `impl Trait` is not allowed in impl headers
   --> $DIR/where-allowed.rs:178:24
    |
 LL | impl InInherentImplAdt<impl Debug> {
    |                        ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in bounds
+error[E0562]: `impl Trait` is not allowed in bounds
   --> $DIR/where-allowed.rs:184:11
    |
 LL |     where impl Debug: Debug
    |           ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in bounds
+error[E0562]: `impl Trait` is not allowed in bounds
   --> $DIR/where-allowed.rs:191:15
    |
 LL |     where Vec<impl Debug>: Debug
    |               ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in bounds
+error[E0562]: `impl Trait` is not allowed in bounds
   --> $DIR/where-allowed.rs:198:24
    |
 LL |     where T: PartialEq<impl Debug>
    |                        ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait params
+error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
   --> $DIR/where-allowed.rs:205:17
    |
 LL |     where T: Fn(impl Debug)
    |                 ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait return types
+error[E0562]: `impl Trait` is not allowed in the return type of `Fn` trait bounds
   --> $DIR/where-allowed.rs:212:22
    |
 LL |     where T: Fn() -> impl Debug
    |                      ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generic parameter defaults
+error[E0562]: `impl Trait` is not allowed in generic parameter defaults
   --> $DIR/where-allowed.rs:218:40
    |
 LL | struct InStructGenericParamDefault<T = impl Debug>(T);
    |                                        ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generic parameter defaults
+error[E0562]: `impl Trait` is not allowed in generic parameter defaults
   --> $DIR/where-allowed.rs:222:36
    |
 LL | enum InEnumGenericParamDefault<T = impl Debug> { Variant(T) }
    |                                    ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generic parameter defaults
+error[E0562]: `impl Trait` is not allowed in generic parameter defaults
   --> $DIR/where-allowed.rs:226:38
    |
 LL | trait InTraitGenericParamDefault<T = impl Debug> {}
    |                                      ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generic parameter defaults
+error[E0562]: `impl Trait` is not allowed in generic parameter defaults
   --> $DIR/where-allowed.rs:230:41
    |
 LL | type InTypeAliasGenericParamDefault<T = impl Debug> = T;
    |                                         ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generic parameter defaults
+error[E0562]: `impl Trait` is not allowed in generic parameter defaults
   --> $DIR/where-allowed.rs:234:11
    |
 LL | impl <T = impl Debug> T {}
    |           ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generic parameter defaults
+error[E0562]: `impl Trait` is not allowed in generic parameter defaults
   --> $DIR/where-allowed.rs:241:40
    |
 LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
    |                                        ^^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in variable bindings
+error[E0562]: `impl Trait` is not allowed in the type of variable bindings
   --> $DIR/where-allowed.rs:247:29
    |
 LL |     let _in_local_variable: impl Fn() = || {};
    |                             ^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in closure return types
+error[E0562]: `impl Trait` is not allowed in closure return types
   --> $DIR/where-allowed.rs:249:46
    |
 LL |     let _in_return_in_local_variable = || -> impl Fn() { || {} };
    |                                              ^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
   --> $DIR/where-allowed.rs:234:7
diff --git a/tests/ui/inference/issue-36053.rs b/tests/ui/inference/issue-36053.rs
index 5c6d0780416..8eee1c33b0e 100644
--- a/tests/ui/inference/issue-36053.rs
+++ b/tests/ui/inference/issue-36053.rs
@@ -7,7 +7,7 @@
 
 use std::iter::FusedIterator;
 
-struct Thing<'a>(#[allow(unused_tuple_struct_fields)] &'a str);
+struct Thing<'a>(#[allow(dead_code)] &'a str);
 impl<'a> Iterator for Thing<'a> {
     type Item = &'a str;
     fn next(&mut self) -> Option<&'a str> {
diff --git a/tests/ui/inline-const/expr-unsafe-err.mir.stderr b/tests/ui/inline-const/expr-unsafe-err.mir.stderr
deleted file mode 100644
index ebd18f89d9c..00000000000
--- a/tests/ui/inline-const/expr-unsafe-err.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/expr-unsafe-err.rs:8:9
-   |
-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 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/inline-const/expr-unsafe-err.rs b/tests/ui/inline-const/expr-unsafe-err.rs
index adf05d352ea..a05a2945168 100644
--- a/tests/ui/inline-const/expr-unsafe-err.rs
+++ b/tests/ui/inline-const/expr-unsafe-err.rs
@@ -1,7 +1,7 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 #![feature(inline_const)]
-const unsafe fn require_unsafe() -> usize { 1 }
+const unsafe fn require_unsafe() -> usize {
+    1
+}
 
 fn main() {
     const {
diff --git a/tests/ui/inline-const/expr-unsafe-err.thir.stderr b/tests/ui/inline-const/expr-unsafe-err.stderr
index 45f850d1f99..45f850d1f99 100644
--- a/tests/ui/inline-const/expr-unsafe-err.thir.stderr
+++ b/tests/ui/inline-const/expr-unsafe-err.stderr
diff --git a/tests/ui/inline-const/expr-unsafe.rs b/tests/ui/inline-const/expr-unsafe.rs
index d71efd33db1..2370c58a712 100644
--- a/tests/ui/inline-const/expr-unsafe.rs
+++ b/tests/ui/inline-const/expr-unsafe.rs
@@ -1,6 +1,5 @@
 // check-pass
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
+
 #![warn(unused_unsafe)]
 #![feature(inline_const)]
 const unsafe fn require_unsafe() -> usize { 1 }
diff --git a/tests/ui/inline-const/expr-unsafe.mir.stderr b/tests/ui/inline-const/expr-unsafe.stderr
index 1ab6e42fba0..47334aaab83 100644
--- a/tests/ui/inline-const/expr-unsafe.mir.stderr
+++ b/tests/ui/inline-const/expr-unsafe.stderr
@@ -1,11 +1,11 @@
 warning: unnecessary `unsafe` block
-  --> $DIR/expr-unsafe.rs:12:13
+  --> $DIR/expr-unsafe.rs:11:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/expr-unsafe.rs:4:9
+  --> $DIR/expr-unsafe.rs:3:9
    |
 LL | #![warn(unused_unsafe)]
    |         ^^^^^^^^^^^^^
diff --git a/tests/ui/inline-const/expr-unsafe.thir.stderr b/tests/ui/inline-const/expr-unsafe.thir.stderr
deleted file mode 100644
index 1ab6e42fba0..00000000000
--- a/tests/ui/inline-const/expr-unsafe.thir.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-warning: unnecessary `unsafe` block
-  --> $DIR/expr-unsafe.rs:12:13
-   |
-LL |             unsafe {}
-   |             ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/expr-unsafe.rs:4:9
-   |
-LL | #![warn(unused_unsafe)]
-   |         ^^^^^^^^^^^^^
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/inline-const/pat-unsafe-err.rs b/tests/ui/inline-const/pat-unsafe-err.rs
index 6df281c6d94..0db18dd3260 100644
--- a/tests/ui/inline-const/pat-unsafe-err.rs
+++ b/tests/ui/inline-const/pat-unsafe-err.rs
@@ -1,6 +1,4 @@
-// revisions: mir thir
-// [mir]ignore-test This is currently broken
-// [thir]compile-flags: -Z thir-unsafeck
+// ignore-test This is currently broken
 
 #![allow(incomplete_features)]
 #![feature(inline_const_pat)]
diff --git a/tests/ui/inline-const/pat-unsafe-err.thir.stderr b/tests/ui/inline-const/pat-unsafe-err.thir.stderr
deleted file mode 100644
index 48a2cb4c704..00000000000
--- a/tests/ui/inline-const/pat-unsafe-err.thir.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:15: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:22: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
index 36f8632af67..cfef9ad6a56 100644
--- a/tests/ui/inline-const/pat-unsafe.rs
+++ b/tests/ui/inline-const/pat-unsafe.rs
@@ -1,7 +1,5 @@
 // check-pass
-// revisions: mir thir
-// [mir]ignore-test This is currently broken
-// [thir]compile-flags: -Z thir-unsafeck
+// ignore-test This is currently broken
 
 #![allow(incomplete_features)]
 #![warn(unused_unsafe)]
diff --git a/tests/ui/inline-const/pat-unsafe.thir.stderr b/tests/ui/inline-const/pat-unsafe.thir.stderr
deleted file mode 100644
index 0318b3ff2cc..00000000000
--- a/tests/ui/inline-const/pat-unsafe.thir.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-warning: unnecessary `unsafe` block
-  --> $DIR/pat-unsafe.rs:19:17
-   |
-LL |                 unsafe {}
-   |                 ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/pat-unsafe.rs:7:9
-   |
-LL | #![warn(unused_unsafe)]
-   |         ^^^^^^^^^^^^^
-
-warning: unnecessary `unsafe` block
-  --> $DIR/pat-unsafe.rs:26:17
-   |
-LL |                 unsafe {}
-   |                 ^^^^^^ unnecessary `unsafe` block
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/intrinsics/issue-28575.rs b/tests/ui/intrinsics/issue-28575.rs
index 410f664f89d..141136d25b2 100644
--- a/tests/ui/intrinsics/issue-28575.rs
+++ b/tests/ui/intrinsics/issue-28575.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 #![feature(intrinsics)]
 
 extern "C" {
diff --git a/tests/ui/intrinsics/issue-28575.mir.stderr b/tests/ui/intrinsics/issue-28575.stderr
index 4b29b4c1b6a..8a7816f231f 100644
--- a/tests/ui/intrinsics/issue-28575.mir.stderr
+++ b/tests/ui/intrinsics/issue-28575.stderr
@@ -1,5 +1,5 @@
 error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/issue-28575.rs:11:5
+  --> $DIR/issue-28575.rs:8:5
    |
 LL |     FOO()
    |     ^^^ use of extern static
diff --git a/tests/ui/intrinsics/issue-28575.thir.stderr b/tests/ui/intrinsics/issue-28575.thir.stderr
deleted file mode 100644
index 4b29b4c1b6a..00000000000
--- a/tests/ui/intrinsics/issue-28575.thir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/issue-28575.rs:11:5
-   |
-LL |     FOO()
-   |     ^^^ use of extern static
-   |
-   = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/intrinsics/safe-intrinsic-mismatch.rs b/tests/ui/intrinsics/safe-intrinsic-mismatch.rs
index 50e12eaeb5c..b0688e530ae 100644
--- a/tests/ui/intrinsics/safe-intrinsic-mismatch.rs
+++ b/tests/ui/intrinsics/safe-intrinsic-mismatch.rs
@@ -3,9 +3,11 @@
 
 extern "rust-intrinsic" {
     fn size_of<T>() -> usize; //~ ERROR intrinsic safety mismatch
+    //~^ ERROR intrinsic safety mismatch
 
     #[rustc_safe_intrinsic]
     fn assume(b: bool); //~ ERROR intrinsic safety mismatch
+    //~^ ERROR intrinsic safety mismatch
 }
 
 fn main() {}
diff --git a/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr b/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr
index 0c2f3be491d..b6961275e18 100644
--- a/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr
+++ b/tests/ui/intrinsics/safe-intrinsic-mismatch.stderr
@@ -5,10 +5,26 @@ LL |     fn size_of<T>() -> usize;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assume`
-  --> $DIR/safe-intrinsic-mismatch.rs:8:5
+  --> $DIR/safe-intrinsic-mismatch.rs:9:5
    |
 LL |     fn assume(b: bool);
    |     ^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 2 previous errors
+error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of`
+  --> $DIR/safe-intrinsic-mismatch.rs:5:5
+   |
+LL |     fn size_of<T>() -> usize;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assume`
+  --> $DIR/safe-intrinsic-mismatch.rs:9:5
+   |
+LL |     fn assume(b: bool);
+   |     ^^^^^^^^^^^^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 4 previous errors
 
diff --git a/tests/ui/intrinsics/unchecked_math_unsafe.mir.stderr b/tests/ui/intrinsics/unchecked_math_unsafe.mir.stderr
deleted file mode 100644
index 26b2f9f2713..00000000000
--- a/tests/ui/intrinsics/unchecked_math_unsafe.mir.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/unchecked_math_unsafe.rs:8:15
-   |
-LL |     let add = std::intrinsics::unchecked_add(x, y);
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/unchecked_math_unsafe.rs:9:15
-   |
-LL |     let sub = std::intrinsics::unchecked_sub(x, y);
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/unchecked_math_unsafe.rs:10:15
-   |
-LL |     let mul = std::intrinsics::unchecked_mul(x, y);
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/intrinsics/unchecked_math_unsafe.rs b/tests/ui/intrinsics/unchecked_math_unsafe.rs
index 98d3a11ad02..a034b45f530 100644
--- a/tests/ui/intrinsics/unchecked_math_unsafe.rs
+++ b/tests/ui/intrinsics/unchecked_math_unsafe.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 #![feature(core_intrinsics)]
 
 fn main() {
diff --git a/tests/ui/intrinsics/unchecked_math_unsafe.thir.stderr b/tests/ui/intrinsics/unchecked_math_unsafe.stderr
index 5c3728ccdf8..31da1a86ca1 100644
--- a/tests/ui/intrinsics/unchecked_math_unsafe.thir.stderr
+++ b/tests/ui/intrinsics/unchecked_math_unsafe.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `unchecked_add` is unsafe and requires unsafe function or block
-  --> $DIR/unchecked_math_unsafe.rs:8:15
+  --> $DIR/unchecked_math_unsafe.rs:5:15
    |
 LL |     let add = std::intrinsics::unchecked_add(x, y);
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
@@ -7,7 +7,7 @@ LL |     let add = std::intrinsics::unchecked_add(x, y);
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function `unchecked_sub` is unsafe and requires unsafe function or block
-  --> $DIR/unchecked_math_unsafe.rs:9:15
+  --> $DIR/unchecked_math_unsafe.rs:6:15
    |
 LL |     let sub = std::intrinsics::unchecked_sub(x, y);
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
@@ -15,7 +15,7 @@ LL |     let sub = std::intrinsics::unchecked_sub(x, y);
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function `unchecked_mul` is unsafe and requires unsafe function or block
-  --> $DIR/unchecked_math_unsafe.rs:10:15
+  --> $DIR/unchecked_math_unsafe.rs:7:15
    |
 LL |     let mul = std::intrinsics::unchecked_mul(x, y);
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
diff --git a/tests/ui/issues/issue-11740.rs b/tests/ui/issues/issue-11740.rs
index fa80f509b32..c3badfd9b49 100644
--- a/tests/ui/issues/issue-11740.rs
+++ b/tests/ui/issues/issue-11740.rs
@@ -1,6 +1,4 @@
 // check-pass
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
 
 struct Attr {
     name: String,
diff --git a/tests/ui/issues/issue-13027.rs b/tests/ui/issues/issue-13027.rs
index 64bf2a11d0e..ac0d1f11bd7 100644
--- a/tests/ui/issues/issue-13027.rs
+++ b/tests/ui/issues/issue-13027.rs
@@ -164,7 +164,7 @@ fn range_shadow_multi_pats() {
 
 fn misc() {
     enum Foo {
-        Bar(#[allow(unused_tuple_struct_fields)] usize, bool)
+        Bar(#[allow(dead_code)] usize, bool)
     }
     // This test basically mimics how trace_macros! macro is implemented,
     // which is a rare combination of vector patterns, multiple wild-card
diff --git a/tests/ui/issues/issue-14382.rs b/tests/ui/issues/issue-14382.rs
index dca24d0be8a..b5c2362f05c 100644
--- a/tests/ui/issues/issue-14382.rs
+++ b/tests/ui/issues/issue-14382.rs
@@ -1,6 +1,6 @@
 // run-pass
 #[derive(Debug)]
-struct Matrix4<S>(#[allow(unused_tuple_struct_fields)] S);
+struct Matrix4<S>(#[allow(dead_code)] S);
 trait POrd<S> {}
 
 fn translate<S: POrd<S>>(s: S) -> Matrix4<S> { Matrix4(s) }
diff --git a/tests/ui/issues/issue-15858.rs b/tests/ui/issues/issue-15858.rs
index 8d65afc4883..77941c07671 100644
--- a/tests/ui/issues/issue-15858.rs
+++ b/tests/ui/issues/issue-15858.rs
@@ -12,7 +12,7 @@ impl Bar for BarImpl {
 }
 
 
-struct Foo<B: Bar>(#[allow(unused_tuple_struct_fields)] B);
+struct Foo<B: Bar>(#[allow(dead_code)] B);
 
 impl<B: Bar> Drop for Foo<B> {
     fn drop(&mut self) {
diff --git a/tests/ui/issues/issue-17905.rs b/tests/ui/issues/issue-17905.rs
index dae9648b917..83cea8b4395 100644
--- a/tests/ui/issues/issue-17905.rs
+++ b/tests/ui/issues/issue-17905.rs
@@ -1,7 +1,7 @@
 // run-pass
 
 #[derive(Debug)]
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct Pair<T, V> (T, V);
 
 impl Pair<
diff --git a/tests/ui/issues/issue-23122-2.stderr b/tests/ui/issues/issue-23122-2.stderr
index b8aa587a739..10463ab2c33 100644
--- a/tests/ui/issues/issue-23122-2.stderr
+++ b/tests/ui/issues/issue-23122-2.stderr
@@ -5,7 +5,7 @@ LL |     type Next = <GetNext<T::Next> as Next>::Next;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_23122_2`)
-note: required for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>` to implement `Next`
+note: required for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>` to implement `Next`
   --> $DIR/issue-23122-2.rs:10:15
    |
 LL | impl<T: Next> Next for GetNext<T> {
diff --git a/tests/ui/issues/issue-23491.rs b/tests/ui/issues/issue-23491.rs
index e5f9dd3efbd..efd83112353 100644
--- a/tests/ui/issues/issue-23491.rs
+++ b/tests/ui/issues/issue-23491.rs
@@ -1,7 +1,7 @@
 // run-pass
 #![allow(unused_variables)]
 
-struct Node<T: ?Sized>(#[allow(unused_tuple_struct_fields)] T);
+struct Node<T: ?Sized>(#[allow(dead_code)] T);
 
 fn main() {
     let x: Box<Node<[isize]>> = Box::new(Node([]));
diff --git a/tests/ui/issues/issue-23611-enum-swap-in-drop.rs b/tests/ui/issues/issue-23611-enum-swap-in-drop.rs
index cdb130d600c..b967e6aecdd 100644
--- a/tests/ui/issues/issue-23611-enum-swap-in-drop.rs
+++ b/tests/ui/issues/issue-23611-enum-swap-in-drop.rs
@@ -37,11 +37,9 @@ pub fn main() {
             // | | | +-- Make D(g_b_5, 50000005)
             // | | | |                                 in g_B(b4b2) from GaspB::drop
             // | | | +-- Drop D(g_b_5, 50000005)
-            50000005,
-            // | | |
+            50000005, // | | |
             // | | +-- Drop D(GaspB::drop_3, 30000004)
-            30000004,
-            // | |
+            30000004, // | |
             // +-- Drop D(test_1, 10000000)
             10000000,
             //   |
@@ -49,15 +47,13 @@ pub fn main() {
             // | | +-- Make D(f_a_4, 40000007)
             // | | |                                   in f_A(a3a0) from GaspA::drop
             // | | +-- Drop D(f_a_4, 40000007)
-            40000007,
-            // | |
+            40000007, // | |
             // +-- Drop D(GaspA::drop_2, 20000006)
-            20000006,
-            //   |
+            20000006, //   |
             //   +-- Drop D(drop_6, 60000002)
-            60000002
-            //
-                ]);
+            60000002 //
+        ]
+    );
 
     // For reference purposes, the old (incorrect) behavior would produce the following
     // output, which you can compare to the above:
@@ -106,8 +102,8 @@ fn test<'a>(log: d::Log<'a>) {
     let _e = E::B(GaspB(g_b, 0xB4B0, log, D::new("test", 1, log)), true);
 }
 
-struct GaspA<'a>(for <'b> fn(u32, &'b str, d::Log<'a>), u32, d::Log<'a>, d::D<'a>);
-struct GaspB<'a>(for <'b> fn(u32, &'b str, d::Log<'a>), u32, d::Log<'a>, d::D<'a>);
+struct GaspA<'a>(for<'b> fn(u32, &'b str, d::Log<'a>), u32, d::Log<'a>, d::D<'a>);
+struct GaspB<'a>(for<'b> fn(u32, &'b str, d::Log<'a>), u32, d::Log<'a>, d::D<'a>);
 
 impl<'a> Drop for GaspA<'a> {
     fn drop(&mut self) {
@@ -124,7 +120,8 @@ impl<'a> Drop for GaspB<'a> {
 }
 
 enum E<'a> {
-    A(GaspA<'a>, bool), B(GaspB<'a>, bool),
+    A(GaspA<'a>, bool),
+    B(GaspB<'a>, bool),
 }
 
 fn f_a(x: u32, ctxt: &str, log: d::Log) {
@@ -174,9 +171,9 @@ const PREF_INDENT: u32 = 20;
 
 pub mod d {
     #![allow(unused_parens)]
+    use std::cell::RefCell;
     use std::fmt;
     use std::mem;
-    use std::cell::RefCell;
 
     static mut counter: u16 = 0;
     static mut trails: u64 = 0;
@@ -189,7 +186,8 @@ pub mod d {
 
     pub fn max_width() -> u32 {
         unsafe {
-            (mem::size_of_val(&trails)*8) as u32
+            (mem::size_of_val(&trails) * 8) as u32
+            //~^ WARN shared reference of mutable static is discouraged [static_mut_ref]
         }
     }
 
@@ -223,7 +221,11 @@ pub mod d {
     }
 
     pub struct D<'a> {
-        name: &'static str, i: u8, uid: u32, trail: u32, log: Log<'a>
+        name: &'static str,
+        i: u8,
+        uid: u32,
+        trail: u32,
+        log: Log<'a>,
     }
 
     impl<'a> fmt::Display for D<'a> {
@@ -239,9 +241,7 @@ pub mod d {
                 let ctr = ((i as u32) * 10_000_000) + (counter as u32);
                 counter += 1;
                 trails |= (1 << trail);
-                let ret = D {
-                    name: name, i: i, log: log, uid: ctr, trail: trail
-                };
+                let ret = D { name: name, i: i, log: log, uid: ctr, trail: trail };
                 indent_println(trail, &format!("+-- Make {}", ret));
                 ret
             }
@@ -250,7 +250,9 @@ pub mod d {
 
     impl<'a> Drop for D<'a> {
         fn drop(&mut self) {
-            unsafe { trails &= !(1 << self.trail); };
+            unsafe {
+                trails &= !(1 << self.trail);
+            };
             self.log.borrow_mut().push(self.uid);
             indent_println(self.trail, &format!("+-- Drop {}", self));
             indent_println(::PREF_INDENT, "");
diff --git a/tests/ui/issues/issue-23611-enum-swap-in-drop.stderr b/tests/ui/issues/issue-23611-enum-swap-in-drop.stderr
new file mode 100644
index 00000000000..14a986a3332
--- /dev/null
+++ b/tests/ui/issues/issue-23611-enum-swap-in-drop.stderr
@@ -0,0 +1,17 @@
+warning: shared reference of mutable static is discouraged
+  --> $DIR/issue-23611-enum-swap-in-drop.rs:189:31
+   |
+LL |             (mem::size_of_val(&trails) * 8) as u32
+   |                               ^^^^^^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |             (mem::size_of_val(addr_of!(trails)) * 8) as u32
+   |                               ~~~~~~~~~~~~~~~~
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/issues/issue-24308.rs b/tests/ui/issues/issue-24308.rs
index 4a582c68efc..40950938fc7 100644
--- a/tests/ui/issues/issue-24308.rs
+++ b/tests/ui/issues/issue-24308.rs
@@ -4,7 +4,7 @@ pub trait Foo {
     fn method2();
 }
 
-struct Slice<'a, T: 'a>(#[allow(unused_tuple_struct_fields)] &'a [T]);
+struct Slice<'a, T: 'a>(#[allow(dead_code)] &'a [T]);
 
 impl<'a, T: 'a> Foo for Slice<'a, T> {
     fn method2() {
diff --git a/tests/ui/issues/issue-25089.rs b/tests/ui/issues/issue-25089.rs
index c988f8f55fa..c7063b24608 100644
--- a/tests/ui/issues/issue-25089.rs
+++ b/tests/ui/issues/issue-25089.rs
@@ -4,7 +4,7 @@
 
 use std::thread;
 
-struct Foo(#[allow(unused_tuple_struct_fields)] i32);
+struct Foo(#[allow(dead_code)] i32);
 
 impl Drop for Foo {
     fn drop(&mut self) {
diff --git a/tests/ui/issues/issue-25679.rs b/tests/ui/issues/issue-25679.rs
index b548da98888..8415eba887b 100644
--- a/tests/ui/issues/issue-25679.rs
+++ b/tests/ui/issues/issue-25679.rs
@@ -2,7 +2,7 @@
 trait Device {
     type Resources;
 }
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct Foo<D, R>(D, R);
 
 impl<D: Device> Foo<D, D::Resources> {
diff --git a/tests/ui/issues/issue-26127.rs b/tests/ui/issues/issue-26127.rs
index f3f9c1d9ae8..b76f1ba51a4 100644
--- a/tests/ui/issues/issue-26127.rs
+++ b/tests/ui/issues/issue-26127.rs
@@ -1,7 +1,7 @@
 // run-pass
 trait Tr { type T; }
 impl Tr for u8 { type T=(); }
-struct S<I: Tr>(#[allow(unused_tuple_struct_fields)] I::T);
+struct S<I: Tr>(#[allow(dead_code)] I::T);
 
 fn foo<I: Tr>(i: I::T) {
     S::<I>(i);
diff --git a/tests/ui/issues/issue-26641.rs b/tests/ui/issues/issue-26641.rs
index e08edd0b5cb..3256b71660f 100644
--- a/tests/ui/issues/issue-26641.rs
+++ b/tests/ui/issues/issue-26641.rs
@@ -1,5 +1,5 @@
 // run-pass
-struct Parser<'a>(#[allow(unused_tuple_struct_fields)] Box<dyn FnMut(Parser) + 'a>);
+struct Parser<'a>(#[allow(dead_code)] Box<dyn FnMut(Parser) + 'a>);
 
 fn main() {
     let _x = Parser(Box::new(|_|{}));
diff --git a/tests/ui/issues/issue-26709.rs b/tests/ui/issues/issue-26709.rs
index 1bd2651dd6c..8a8186de5cc 100644
--- a/tests/ui/issues/issue-26709.rs
+++ b/tests/ui/issues/issue-26709.rs
@@ -1,5 +1,5 @@
 // run-pass
-struct Wrapper<'a, T: ?Sized>(&'a mut i32, #[allow(unused_tuple_struct_fields)] T);
+struct Wrapper<'a, T: ?Sized>(&'a mut i32, #[allow(dead_code)] T);
 
 impl<'a, T: ?Sized> Drop for Wrapper<'a, T> {
     fn drop(&mut self) {
diff --git a/tests/ui/issues/issue-27240.rs b/tests/ui/issues/issue-27240.rs
index eaf254f3361..b518e58d194 100644
--- a/tests/ui/issues/issue-27240.rs
+++ b/tests/ui/issues/issue-27240.rs
@@ -2,12 +2,12 @@
 #![allow(unused_assignments)]
 #![allow(unused_variables)]
 use std::fmt;
-struct NoisyDrop<T: fmt::Debug>(#[allow(unused_tuple_struct_fields)] T);
+struct NoisyDrop<T: fmt::Debug>(#[allow(dead_code)] T);
 impl<T: fmt::Debug> Drop for NoisyDrop<T> {
     fn drop(&mut self) {}
 }
 
-struct Bar<T: fmt::Debug>(#[allow(unused_tuple_struct_fields)] [*const NoisyDrop<T>; 2]);
+struct Bar<T: fmt::Debug>(#[allow(dead_code)] [*const NoisyDrop<T>; 2]);
 
 fn fine() {
     let (u,b);
@@ -15,7 +15,7 @@ fn fine() {
     b = Bar([&NoisyDrop(&u), &NoisyDrop(&u)]);
 }
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct Bar2<T: fmt::Debug>(*const NoisyDrop<T>, *const NoisyDrop<T>);
 
 fn lolwut() {
diff --git a/tests/ui/issues/issue-28498-must-work-ex1.rs b/tests/ui/issues/issue-28498-must-work-ex1.rs
index ab6d190e0a1..37234699893 100644
--- a/tests/ui/issues/issue-28498-must-work-ex1.rs
+++ b/tests/ui/issues/issue-28498-must-work-ex1.rs
@@ -6,7 +6,7 @@
 
 use std::cell::Cell;
 
-struct Concrete<'a>(#[allow(unused_tuple_struct_fields)] u32, Cell<Option<&'a Concrete<'a>>>);
+struct Concrete<'a>(#[allow(dead_code)] u32, Cell<Option<&'a Concrete<'a>>>);
 
 fn main() {
     let mut data = Vec::new();
diff --git a/tests/ui/issues/issue-28498-must-work-ex2.rs b/tests/ui/issues/issue-28498-must-work-ex2.rs
index 378d736ee3d..ab0b7196082 100644
--- a/tests/ui/issues/issue-28498-must-work-ex2.rs
+++ b/tests/ui/issues/issue-28498-must-work-ex2.rs
@@ -6,7 +6,7 @@
 
 use std::cell::Cell;
 
-struct Concrete<'a>(#[allow(unused_tuple_struct_fields)] u32, Cell<Option<&'a Concrete<'a>>>);
+struct Concrete<'a>(#[allow(dead_code)] u32, Cell<Option<&'a Concrete<'a>>>);
 
 struct Foo<T> { data: Vec<T> }
 
diff --git a/tests/ui/issues/issue-28498-ugeh-ex1.rs b/tests/ui/issues/issue-28498-ugeh-ex1.rs
index 24bf706cef9..ce49cf1ff99 100644
--- a/tests/ui/issues/issue-28498-ugeh-ex1.rs
+++ b/tests/ui/issues/issue-28498-ugeh-ex1.rs
@@ -8,7 +8,7 @@
 #![feature(dropck_eyepatch)]
 use std::cell::Cell;
 
-struct Concrete<'a>(#[allow(unused_tuple_struct_fields)] u32, Cell<Option<&'a Concrete<'a>>>);
+struct Concrete<'a>(#[allow(dead_code)] u32, Cell<Option<&'a Concrete<'a>>>);
 
 struct Foo<T> { data: Vec<T> }
 
diff --git a/tests/ui/issues/issue-28776.mir.stderr b/tests/ui/issues/issue-28776.mir.stderr
deleted file mode 100644
index e7b7ba08268..00000000000
--- a/tests/ui/issues/issue-28776.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/issue-28776.rs:7:5
-   |
-LL |     (&ptr::write)(1 as *mut _, 42);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/issues/issue-28776.rs b/tests/ui/issues/issue-28776.rs
index 19df3c4a425..e564ebcd110 100644
--- a/tests/ui/issues/issue-28776.rs
+++ b/tests/ui/issues/issue-28776.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 use std::ptr;
 
 fn main() {
diff --git a/tests/ui/issues/issue-28776.thir.stderr b/tests/ui/issues/issue-28776.stderr
index 63172b85424..3db94ee1810 100644
--- a/tests/ui/issues/issue-28776.thir.stderr
+++ b/tests/ui/issues/issue-28776.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `std::ptr::write` is unsafe and requires unsafe function or block
-  --> $DIR/issue-28776.rs:7:5
+  --> $DIR/issue-28776.rs:4:5
    |
 LL |     (&ptr::write)(1 as *mut _, 42);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
diff --git a/tests/ui/issues/issue-31267-additional.rs b/tests/ui/issues/issue-31267-additional.rs
index 7f0cbd658f1..c6e93533e7c 100644
--- a/tests/ui/issues/issue-31267-additional.rs
+++ b/tests/ui/issues/issue-31267-additional.rs
@@ -6,7 +6,7 @@ struct Bar;
 const BAZ: Bar = Bar;
 
 #[derive(Debug)]
-struct Foo(#[allow(unused_tuple_struct_fields)] [Bar; 1]);
+struct Foo(#[allow(dead_code)] [Bar; 1]);
 
 struct Biz;
 
diff --git a/tests/ui/issues/issue-31299.rs b/tests/ui/issues/issue-31299.rs
index 78c3252d32e..e3c422cb97c 100644
--- a/tests/ui/issues/issue-31299.rs
+++ b/tests/ui/issues/issue-31299.rs
@@ -25,9 +25,9 @@ impl<T> Front for Vec<T> {
     type Back = Vec<T>;
 }
 
-struct PtrBack<T: Front>(#[allow(unused_tuple_struct_fields)] Vec<T::Back>);
+struct PtrBack<T: Front>(#[allow(dead_code)] Vec<T::Back>);
 
-struct M(#[allow(unused_tuple_struct_fields)] PtrBack<Vec<M>>);
+struct M(#[allow(dead_code)] PtrBack<Vec<M>>);
 
 #[allow(unused_must_use)]
 fn main() {
diff --git a/tests/ui/issues/issue-31910.rs b/tests/ui/issues/issue-31910.rs
index e0655d3f6db..19cfc4627c7 100644
--- a/tests/ui/issues/issue-31910.rs
+++ b/tests/ui/issues/issue-31910.rs
@@ -1,4 +1,5 @@
 enum Enum<T: Trait> {
+    //~^ ERROR: `T` is never used
     X = Trait::Number,
     //~^ ERROR mismatched types
     //~| expected `isize`, found `i32`
diff --git a/tests/ui/issues/issue-31910.stderr b/tests/ui/issues/issue-31910.stderr
index 6ef84d7daef..89a6d5574a1 100644
--- a/tests/ui/issues/issue-31910.stderr
+++ b/tests/ui/issues/issue-31910.stderr
@@ -1,9 +1,18 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-31910.rs:2:9
+  --> $DIR/issue-31910.rs:3:9
    |
 LL |     X = Trait::Number,
    |         ^^^^^^^^^^^^^ expected `isize`, found `i32`
 
-error: aborting due to 1 previous error
+error[E0392]: parameter `T` is never used
+  --> $DIR/issue-31910.rs:1:11
+   |
+LL | enum Enum<T: Trait> {
+   |           ^ unused parameter
+   |
+   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0308`.
+Some errors have detailed explanations: E0308, E0392.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-3214.rs b/tests/ui/issues/issue-3214.rs
index b2c27f5be95..03d8d6ba246 100644
--- a/tests/ui/issues/issue-3214.rs
+++ b/tests/ui/issues/issue-3214.rs
@@ -5,6 +5,7 @@ fn foo<T>() {
 
     impl<T> Drop for Foo<T> {
         //~^ ERROR struct takes 0 generic arguments but 1 generic argument
+        //~| ERROR `T` is not constrained
         fn drop(&mut self) {}
     }
 }
diff --git a/tests/ui/issues/issue-3214.stderr b/tests/ui/issues/issue-3214.stderr
index 5b57c1baf90..26ac6d39f60 100644
--- a/tests/ui/issues/issue-3214.stderr
+++ b/tests/ui/issues/issue-3214.stderr
@@ -22,7 +22,13 @@ note: struct defined here, with 0 generic parameters
 LL |     struct Foo {
    |            ^^^
 
-error: aborting due to 2 previous errors
+error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/issue-3214.rs:6:10
+   |
+LL |     impl<T> Drop for Foo<T> {
+   |          ^ unconstrained type parameter
+
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0107, E0401.
+Some errors have detailed explanations: E0107, E0207, E0401.
 For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/issues/issue-34373.rs b/tests/ui/issues/issue-34373.rs
index ca24e37d9bb..dc20c5589b3 100644
--- a/tests/ui/issues/issue-34373.rs
+++ b/tests/ui/issues/issue-34373.rs
@@ -5,6 +5,8 @@ trait Trait<T> {
 }
 
 pub struct Foo<T = Box<Trait<DefaultFoo>>>;  //~ ERROR cycle detected
+//~^ ERROR `T` is never used
+//~| ERROR `Trait` cannot be made into an object
 type DefaultFoo = Foo;
 
 fn main() {
diff --git a/tests/ui/issues/issue-34373.stderr b/tests/ui/issues/issue-34373.stderr
index c6906734b2d..1a1cfc925b7 100644
--- a/tests/ui/issues/issue-34373.stderr
+++ b/tests/ui/issues/issue-34373.stderr
@@ -5,7 +5,7 @@ LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
    |                              ^^^^^^^^^^
    |
 note: ...which requires expanding type alias `DefaultFoo`...
-  --> $DIR/issue-34373.rs:8:19
+  --> $DIR/issue-34373.rs:10:19
    |
 LL | type DefaultFoo = Foo;
    |                   ^^^
@@ -23,6 +23,38 @@ LL | | }
    | |_^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
-error: aborting due to 1 previous error
+error[E0038]: the trait `Trait` cannot be made into an object
+  --> $DIR/issue-34373.rs:7:24
+   |
+LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
+   |                        ^^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/issue-34373.rs:4:8
+   |
+LL | trait Trait<T> {
+   |       ----- this trait cannot be made into an object...
+LL |     fn foo(_: T) {}
+   |        ^^^ ...because associated function `foo` has no `self` parameter
+help: consider turning `foo` into a method by giving it a `&self` argument
+   |
+LL |     fn foo(&self, _: T) {}
+   |            ++++++
+help: alternatively, consider constraining `foo` so it does not apply to trait objects
+   |
+LL |     fn foo(_: T) where Self: Sized {}
+   |                  +++++++++++++++++
+
+error[E0392]: parameter `T` is never used
+  --> $DIR/issue-34373.rs:7:16
+   |
+LL | pub struct Foo<T = Box<Trait<DefaultFoo>>>;
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^ unused parameter
+   |
+   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
+   = help: if you intended `T` to be a const parameter, use `const T: usize` instead
+
+error: aborting due to 3 previous errors
 
-For more information about this error, try `rustc --explain E0391`.
+Some errors have detailed explanations: E0038, E0391, E0392.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/issues/issue-34571.rs b/tests/ui/issues/issue-34571.rs
index 5498091da58..c392f59d8da 100644
--- a/tests/ui/issues/issue-34571.rs
+++ b/tests/ui/issues/issue-34571.rs
@@ -1,7 +1,7 @@
 // run-pass
 #[repr(u8)]
 enum Foo {
-    Foo(#[allow(unused_tuple_struct_fields)] u8),
+    Foo(#[allow(dead_code)] u8),
 }
 
 fn main() {
diff --git a/tests/ui/issues/issue-36278-prefix-nesting.rs b/tests/ui/issues/issue-36278-prefix-nesting.rs
index a809f7f1329..5f476932018 100644
--- a/tests/ui/issues/issue-36278-prefix-nesting.rs
+++ b/tests/ui/issues/issue-36278-prefix-nesting.rs
@@ -5,7 +5,7 @@
 use std::mem;
 
 const SZ: usize = 100;
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct P<T: ?Sized>([u8; SZ], T);
 
 type Ack<T> = P<P<T>>;
diff --git a/tests/ui/issues/issue-39367.rs b/tests/ui/issues/issue-39367.rs
index e7beb8a0392..039b47ae780 100644
--- a/tests/ui/issues/issue-39367.rs
+++ b/tests/ui/issues/issue-39367.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
 
 use std::ops::Deref;
 
diff --git a/tests/ui/issues/issue-4252.rs b/tests/ui/issues/issue-4252.rs
index 0d47a7f0c16..9b82121baa2 100644
--- a/tests/ui/issues/issue-4252.rs
+++ b/tests/ui/issues/issue-4252.rs
@@ -7,7 +7,7 @@ trait X {
 }
 
 #[derive(Debug)]
-struct Y(#[allow(unused_tuple_struct_fields)] isize);
+struct Y(#[allow(dead_code)] isize);
 
 #[derive(Debug)]
 struct Z<T: X+std::fmt::Debug> {
diff --git a/tests/ui/issues/issue-46069.rs b/tests/ui/issues/issue-46069.rs
index c418128c186..f80ea932001 100644
--- a/tests/ui/issues/issue-46069.rs
+++ b/tests/ui/issues/issue-46069.rs
@@ -2,7 +2,7 @@
 use std::iter::{Fuse, Cloned};
 use std::slice::Iter;
 
-struct Foo<'a, T: 'a>(#[allow(unused_tuple_struct_fields)] &'a T);
+struct Foo<'a, T: 'a>(#[allow(dead_code)] &'a T);
 impl<'a, T: 'a> Copy for Foo<'a, T> {}
 impl<'a, T: 'a> Clone for Foo<'a, T> {
     fn clone(&self) -> Self { *self }
diff --git a/tests/ui/issues/issue-47715.rs b/tests/ui/issues/issue-47715.rs
index 0a770593bc9..bf2b03351b2 100644
--- a/tests/ui/issues/issue-47715.rs
+++ b/tests/ui/issues/issue-47715.rs
@@ -7,22 +7,22 @@ trait Iterable {
 }
 
 struct Container<T: Iterable<Item = impl Foo>> {
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in generics
     field: T
 }
 
 enum Enum<T: Iterable<Item = impl Foo>> {
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in generics
     A(T),
 }
 
 union Union<T: Iterable<Item = impl Foo> + Copy> {
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in generics
     x: T,
 }
 
 type Type<T: Iterable<Item = impl Foo>> = T;
-//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR `impl Trait` is not allowed in generics
 
 fn main() {
 }
diff --git a/tests/ui/issues/issue-47715.stderr b/tests/ui/issues/issue-47715.stderr
index 2ded98781c6..8ed9ff43952 100644
--- a/tests/ui/issues/issue-47715.stderr
+++ b/tests/ui/issues/issue-47715.stderr
@@ -1,26 +1,34 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generics
+error[E0562]: `impl Trait` is not allowed in generics
   --> $DIR/issue-47715.rs:9:37
    |
 LL | struct Container<T: Iterable<Item = impl Foo>> {
    |                                     ^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generics
+error[E0562]: `impl Trait` is not allowed in generics
   --> $DIR/issue-47715.rs:14:30
    |
 LL | enum Enum<T: Iterable<Item = impl Foo>> {
    |                              ^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generics
+error[E0562]: `impl Trait` is not allowed in generics
   --> $DIR/issue-47715.rs:19:32
    |
 LL | union Union<T: Iterable<Item = impl Foo> + Copy> {
    |                                ^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generics
+error[E0562]: `impl Trait` is not allowed in generics
   --> $DIR/issue-47715.rs:24:30
    |
 LL | type Type<T: Iterable<Item = impl Foo>> = T;
    |                              ^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/issues/issue-48131.mir.stderr b/tests/ui/issues/issue-48131.mir.stderr
deleted file mode 100644
index 6817e8830c5..00000000000
--- a/tests/ui/issues/issue-48131.mir.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: unnecessary `unsafe` block
-  --> $DIR/issue-48131.rs:12:9
-   |
-LL |         unsafe { /* unnecessary */ }
-   |         ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/issue-48131.rs:6:9
-   |
-LL | #![deny(unused_unsafe)]
-   |         ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/issue-48131.rs:23:13
-   |
-LL |             unsafe { /* unnecessary */ }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/issues/issue-48131.rs b/tests/ui/issues/issue-48131.rs
index df98547084d..85664e62ead 100644
--- a/tests/ui/issues/issue-48131.rs
+++ b/tests/ui/issues/issue-48131.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 // This note is annotated because the purpose of the test
 // is to ensure that certain other notes are not generated.
 #![deny(unused_unsafe)] //~ NOTE
diff --git a/tests/ui/issues/issue-48131.thir.stderr b/tests/ui/issues/issue-48131.stderr
index 6817e8830c5..5acc4f16e9f 100644
--- a/tests/ui/issues/issue-48131.thir.stderr
+++ b/tests/ui/issues/issue-48131.stderr
@@ -1,17 +1,17 @@
 error: unnecessary `unsafe` block
-  --> $DIR/issue-48131.rs:12:9
+  --> $DIR/issue-48131.rs:9:9
    |
 LL |         unsafe { /* unnecessary */ }
    |         ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/issue-48131.rs:6:9
+  --> $DIR/issue-48131.rs:3:9
    |
 LL | #![deny(unused_unsafe)]
    |         ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/issue-48131.rs:23:13
+  --> $DIR/issue-48131.rs:20:13
    |
 LL |             unsafe { /* unnecessary */ }
    |             ^^^^^^ unnecessary `unsafe` block
diff --git a/tests/ui/issues/issue-5315.rs b/tests/ui/issues/issue-5315.rs
index 0c121a5eee6..81d075a98a9 100644
--- a/tests/ui/issues/issue-5315.rs
+++ b/tests/ui/issues/issue-5315.rs
@@ -1,7 +1,7 @@
 // run-pass
 // pretty-expanded FIXME #23616
 
-struct A(#[allow(unused_tuple_struct_fields)] bool);
+struct A(#[allow(dead_code)] bool);
 
 pub fn main() {
     let f = A;
diff --git a/tests/ui/issues/issue-5844.mir.stderr b/tests/ui/issues/issue-5844.mir.stderr
deleted file mode 100644
index 4434f5a0ff2..00000000000
--- a/tests/ui/issues/issue-5844.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/issue-5844.rs:8:5
-   |
-LL |     issue_5844_aux::rand();
-   |     ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/issues/issue-5844.rs b/tests/ui/issues/issue-5844.rs
index 4f90a9c6645..0db1ccf76d9 100644
--- a/tests/ui/issues/issue-5844.rs
+++ b/tests/ui/issues/issue-5844.rs
@@ -1,9 +1,7 @@
 //aux-build:issue-5844-aux.rs
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 
 extern crate issue_5844_aux;
 
-fn main () {
+fn main() {
     issue_5844_aux::rand(); //~ ERROR: requires unsafe
 }
diff --git a/tests/ui/issues/issue-5844.thir.stderr b/tests/ui/issues/issue-5844.stderr
index 6074f7d0ed4..bae917fa72c 100644
--- a/tests/ui/issues/issue-5844.thir.stderr
+++ b/tests/ui/issues/issue-5844.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `rand` is unsafe and requires unsafe function or block
-  --> $DIR/issue-5844.rs:8:5
+  --> $DIR/issue-5844.rs:6:5
    |
 LL |     issue_5844_aux::rand();
    |     ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
diff --git a/tests/ui/issues/issue-61894.rs b/tests/ui/issues/issue-61894.rs
index 776fdbb7466..fe934bdeb60 100644
--- a/tests/ui/issues/issue-61894.rs
+++ b/tests/ui/issues/issue-61894.rs
@@ -4,7 +4,7 @@
 
 use std::any::type_name;
 
-struct Bar<M>(#[allow(unused_tuple_struct_fields)] M);
+struct Bar<M>(#[allow(dead_code)] M);
 
 impl<M> Bar<M> {
     fn foo(&self) -> &'static str {
diff --git a/tests/ui/issues/issue-62375.stderr b/tests/ui/issues/issue-62375.stderr
index 8750fbcf4cf..faca94a03f0 100644
--- a/tests/ui/issues/issue-62375.stderr
+++ b/tests/ui/issues/issue-62375.stderr
@@ -11,11 +11,6 @@ note: an implementation of `PartialEq<fn(()) -> A {A::Value}>` might be missing
    |
 LL | enum A {
    | ^^^^^^ must implement `PartialEq<fn(()) -> A {A::Value}>`
-help: consider annotating `A` with `#[derive(PartialEq)]`
-   |
-LL + #[derive(PartialEq)]
-LL | enum A {
-   |
 help: use parentheses to construct this tuple variant
    |
 LL |     a == A::Value(/* () */);
diff --git a/tests/ui/issues/issue-7911.rs b/tests/ui/issues/issue-7911.rs
index f64887136ca..d4db3b0776b 100644
--- a/tests/ui/issues/issue-7911.rs
+++ b/tests/ui/issues/issue-7911.rs
@@ -6,7 +6,7 @@
 trait FooBar {
     fn dummy(&self) { }
 }
-struct Bar(#[allow(unused_tuple_struct_fields)] i32);
+struct Bar(#[allow(dead_code)] i32);
 struct Foo { bar: Bar }
 
 impl FooBar for Bar {}
diff --git a/tests/ui/issues/issue-99838.rs b/tests/ui/issues/issue-99838.rs
index 2e81d5e8221..3bddca43daa 100644
--- a/tests/ui/issues/issue-99838.rs
+++ b/tests/ui/issues/issue-99838.rs
@@ -2,7 +2,7 @@
 
 use std::hint;
 
-struct U16(u16);
+struct U16(#[allow(dead_code)] u16);
 
 impl Drop for U16 {
     fn drop(&mut self) {
@@ -23,7 +23,7 @@ struct Wrapper {
 }
 
 #[repr(packed)]
-struct Misalign(u8, Wrapper);
+struct Misalign(#[allow(dead_code)] u8, Wrapper);
 
 fn main() {
     let m = Misalign(
diff --git a/tests/ui/lang-items/lang-item-generic-requirements.rs b/tests/ui/lang-items/lang-item-generic-requirements.rs
index 21bd7187e15..697790023d6 100644
--- a/tests/ui/lang-items/lang-item-generic-requirements.rs
+++ b/tests/ui/lang-items/lang-item-generic-requirements.rs
@@ -22,8 +22,8 @@ trait MyIndex<'a, T> {}
 #[lang = "phantom_data"]
 //~^ ERROR `phantom_data` language item must be applied to a struct with 1 generic argument
 struct MyPhantomData<T, U>;
-//~^ ERROR parameter `T` is never used
-//~| ERROR parameter `U` is never used
+//~^ ERROR `T` is never used
+//~| ERROR `U` is never used
 
 #[lang = "owned_box"]
 //~^ ERROR `owned_box` language item must be applied to a struct with at least 1 generic argument
@@ -41,8 +41,7 @@ fn ice() {
     // Use add
     let r = 5;
     let a = 6;
-    r + a;
-    //~^ ERROR cannot add `{integer}` to `{integer}`
+    r + a; //~ ERROR cannot add
 
     // Use drop in place
     my_ptr_drop();
diff --git a/tests/ui/lang-items/required-lang-item.rs b/tests/ui/lang-items/required-lang-item.rs
index 3b17c5b7255..7f8933ac2ad 100644
--- a/tests/ui/lang-items/required-lang-item.rs
+++ b/tests/ui/lang-items/required-lang-item.rs
@@ -1,11 +1,10 @@
-// build-fail
+// edition: 2018
 
 #![feature(lang_items, no_core)]
 #![no_core]
+#![no_main]
 
 #[lang="copy"] pub trait Copy { }
 #[lang="sized"] pub trait Sized { }
 
-// error-pattern:requires `start` lang_item
-
-fn main() {}
+async fn x() {} //~ ERROR requires `ResumeTy` lang_item
diff --git a/tests/ui/lang-items/required-lang-item.stderr b/tests/ui/lang-items/required-lang-item.stderr
index bb53d336bb2..13c07ee6529 100644
--- a/tests/ui/lang-items/required-lang-item.stderr
+++ b/tests/ui/lang-items/required-lang-item.stderr
@@ -1,4 +1,8 @@
-error: requires `start` lang_item
+error: requires `ResumeTy` lang_item
+  --> $DIR/required-lang-item.rs:10:14
+   |
+LL | async fn x() {}
+   |              ^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/layout/issue-84108.stderr b/tests/ui/layout/issue-84108.stderr
index 3a02e73f96b..d6d75851034 100644
--- a/tests/ui/layout/issue-84108.stderr
+++ b/tests/ui/layout/issue-84108.stderr
@@ -29,15 +29,6 @@ LL | const BAR: (&Path, [u8], usize) = ("hello", [], 42);
    = help: the trait `Sized` is not implemented for `[u8]`
    = note: only the last element of a tuple may have a dynamically sized type
 
-error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
-  --> $DIR/issue-84108.rs:14:13
-   |
-LL | static BAZ: ([u8], usize) = ([], 0);
-   |             ^^^^^^^^^^^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `[u8]`
-   = note: only the last element of a tuple may have a dynamically sized type
-
 error[E0308]: mismatched types
   --> $DIR/issue-84108.rs:9:45
    |
@@ -47,6 +38,15 @@ LL | const BAR: (&Path, [u8], usize) = ("hello", [], 42);
    = note: expected slice `[u8]`
               found array `[_; 0]`
 
+error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
+  --> $DIR/issue-84108.rs:14:13
+   |
+LL | static BAZ: ([u8], usize) = ([], 0);
+   |             ^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `[u8]`
+   = note: only the last element of a tuple may have a dynamically sized type
+
 error[E0308]: mismatched types
   --> $DIR/issue-84108.rs:14:30
    |
diff --git a/tests/ui/layout/unsafe-cell-hides-niche.rs b/tests/ui/layout/unsafe-cell-hides-niche.rs
index 68bcc3c1aff..8d6cea10933 100644
--- a/tests/ui/layout/unsafe-cell-hides-niche.rs
+++ b/tests/ui/layout/unsafe-cell-hides-niche.rs
@@ -14,10 +14,10 @@ use std::mem::size_of;
 use std::num::NonZeroU32 as N32;
 use std::sync::{Mutex, RwLock};
 
-struct Wrapper<T>(#[allow(unused_tuple_struct_fields)] T);
+struct Wrapper<T>(#[allow(dead_code)] T);
 
 #[repr(transparent)]
-struct Transparent<T>(#[allow(unused_tuple_struct_fields)] T);
+struct Transparent<T>(#[allow(dead_code)] T);
 
 struct NoNiche<T>(UnsafeCell<T>);
 
diff --git a/tests/ui/lazy-type-alias/implied-outlives-bounds.neg.stderr b/tests/ui/lazy-type-alias/implied-outlives-bounds.neg.stderr
new file mode 100644
index 00000000000..a2dbb58ecd0
--- /dev/null
+++ b/tests/ui/lazy-type-alias/implied-outlives-bounds.neg.stderr
@@ -0,0 +1,34 @@
+error: lifetime may not live long enough
+  --> $DIR/implied-outlives-bounds.rs:21:12
+   |
+LL | fn env0<'any>() {
+   |         ---- lifetime `'any` defined here
+LL |     let _: TypeOutlives<'static, &'any ()>;
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'any` must outlive `'static`
+
+error: lifetime may not live long enough
+  --> $DIR/implied-outlives-bounds.rs:26:12
+   |
+LL | fn env1<'any>() {
+   |         ---- lifetime `'any` defined here
+LL |     let _: RegionOutlives<'static, 'any>;
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'any` must outlive `'static`
+
+error: lifetime may not live long enough
+  --> $DIR/implied-outlives-bounds.rs:31:12
+   |
+LL | fn env2<'any>() {
+   |         ---- lifetime `'any` defined here
+LL |     let _: Outer0<'static, &'any ()>;
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'any` must outlive `'static`
+
+error: lifetime may not live long enough
+  --> $DIR/implied-outlives-bounds.rs:36:12
+   |
+LL | fn env3<'any>() {
+   |         ---- lifetime `'any` defined here
+LL |     let _: Outer1<'static, &'any ()>;
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'any` must outlive `'static`
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/lazy-type-alias/implied-outlives-bounds.rs b/tests/ui/lazy-type-alias/implied-outlives-bounds.rs
new file mode 100644
index 00000000000..c08e45975de
--- /dev/null
+++ b/tests/ui/lazy-type-alias/implied-outlives-bounds.rs
@@ -0,0 +1,39 @@
+// Check that we imply outlives-bounds on lazy type aliases.
+
+// revisions: pos neg
+//[pos] check-pass
+
+#![feature(lazy_type_alias)]
+#![allow(incomplete_features)]
+
+type TypeOutlives<'a, T> = &'a T;
+type RegionOutlives<'a, 'b> = &'a &'b ();
+
+// Ensure that we imply bounds from the explicit bounds of weak aliases.
+struct Outer0<'a, T>(ExplicitTypeOutlives<'a, T>);
+type ExplicitTypeOutlives<'a, T: 'a> = (&'a (), T);
+
+// Ensure that we imply bounds from the implied bounds of weak aliases.
+type Outer1<'b, U> = TypeOutlives<'b, U>;
+
+#[cfg(neg)]
+fn env0<'any>() {
+    let _: TypeOutlives<'static, &'any ()>; //[neg]~ ERROR lifetime may not live long enough
+}
+
+#[cfg(neg)]
+fn env1<'any>() {
+    let _: RegionOutlives<'static, 'any>; //[neg]~ ERROR lifetime may not live long enough
+}
+
+#[cfg(neg)]
+fn env2<'any>() {
+    let _: Outer0<'static, &'any ()>; //[neg]~ ERROR lifetime may not live long enough
+}
+
+#[cfg(neg)]
+fn env3<'any>() {
+    let _: Outer1<'static, &'any ()>; //[neg]~ ERROR lifetime may not live long enough
+}
+
+fn main() {}
diff --git a/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs b/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs
index b0b6b318d8f..782c38200a0 100644
--- a/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs
+++ b/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs
@@ -6,10 +6,9 @@ use std::future::Future;
 async fn wrapper<F>(f: F)
 //~^ ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
 //~| ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
-//~| ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
 where
-    F:,
-    for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
+F:,
+for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
 {
     //~^ ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
     let mut i = 41;
diff --git a/tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr b/tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr
index 5b77051dc88..89ebdb57f3c 100644
--- a/tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr
+++ b/tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr
@@ -4,11 +4,10 @@ error[E0277]: expected a `FnOnce(&'a mut i32)` closure, found `i32`
 LL | / async fn wrapper<F>(f: F)
 LL | |
 LL | |
-LL | |
 LL | | where
-LL | |     F:,
-LL | |     for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
-   | |______________________________________________________________________________^ expected an `FnOnce(&'a mut i32)` closure, found `i32`
+LL | | F:,
+LL | | for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
+   | |__________________________________________________________________________^ expected an `FnOnce(&'a mut i32)` closure, found `i32`
    |
    = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32`
 
@@ -21,7 +20,7 @@ LL | async fn wrapper<F>(f: F)
    = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32`
 
 error[E0277]: expected a `FnOnce(&'a mut i32)` closure, found `i32`
-  --> $DIR/issue-76168-hr-outlives-3.rs:13:1
+  --> $DIR/issue-76168-hr-outlives-3.rs:12:1
    |
 LL | / {
 LL | |
@@ -32,20 +31,6 @@ LL | | }
    |
    = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32`
 
-error[E0277]: expected a `FnOnce(&'a mut i32)` closure, found `i32`
-  --> $DIR/issue-76168-hr-outlives-3.rs:6:1
-   |
-LL | / async fn wrapper<F>(f: F)
-LL | |
-LL | |
-LL | |
-LL | | where
-LL | |     F:,
-LL | |     for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
-   | |______________________________________________________________________________^ expected an `FnOnce(&'a mut i32)` closure, found `i32`
-   |
-   = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32`
-
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/lifetimes/issue-95023.rs b/tests/ui/lifetimes/issue-95023.rs
index 3fba8c00c57..e35f1a36e2a 100644
--- a/tests/ui/lifetimes/issue-95023.rs
+++ b/tests/ui/lifetimes/issue-95023.rs
@@ -3,7 +3,9 @@ struct Error(ErrorKind);
 impl Fn(&isize) for Error {
     //~^ ERROR manual implementations of `Fn` are experimental [E0183]
     //~^^ ERROR associated type bindings are not allowed here [E0229]
-    fn foo<const N: usize>(&self) -> Self::B<{N}>;
+    //~| ERROR not all trait items implemented
+    //~| ERROR expected a `FnMut(&isize)` closure, found `Error`
+    fn foo<const N: usize>(&self) -> Self::B<{ N }>;
     //~^ ERROR associated function in `impl` without body
     //~^^ ERROR method `foo` is not a member of trait `Fn` [E0407]
     //~^^^ ERROR associated type `B` not found for `Self` [E0220]
diff --git a/tests/ui/lifetimes/issue-95023.stderr b/tests/ui/lifetimes/issue-95023.stderr
index 6361d8ad30b..b9c95d3e49a 100644
--- a/tests/ui/lifetimes/issue-95023.stderr
+++ b/tests/ui/lifetimes/issue-95023.stderr
@@ -1,16 +1,16 @@
 error: associated function in `impl` without body
-  --> $DIR/issue-95023.rs:6:5
+  --> $DIR/issue-95023.rs:8:5
    |
-LL |     fn foo<const N: usize>(&self) -> Self::B<{N}>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
-   |                                                  |
-   |                                                  help: provide a definition for the function: `{ <body> }`
+LL |     fn foo<const N: usize>(&self) -> Self::B<{ N }>;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
+   |                                                    |
+   |                                                    help: provide a definition for the function: `{ <body> }`
 
 error[E0407]: method `foo` is not a member of trait `Fn`
-  --> $DIR/issue-95023.rs:6:5
+  --> $DIR/issue-95023.rs:8:5
    |
-LL |     fn foo<const N: usize>(&self) -> Self::B<{N}>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Fn`
+LL |     fn foo<const N: usize>(&self) -> Self::B<{ N }>;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Fn`
 
 error[E0183]: manual implementations of `Fn` are experimental
   --> $DIR/issue-95023.rs:3:6
@@ -33,12 +33,30 @@ LL | impl Fn(&isize) for Error {
    |      ^^^^^^^^^^
 
 error[E0220]: associated type `B` not found for `Self`
-  --> $DIR/issue-95023.rs:6:44
+  --> $DIR/issue-95023.rs:8:44
    |
-LL |     fn foo<const N: usize>(&self) -> Self::B<{N}>;
+LL |     fn foo<const N: usize>(&self) -> Self::B<{ N }>;
    |                                            ^ help: `Self` has the following associated type: `Output`
 
-error: aborting due to 5 previous errors
+error[E0277]: expected a `FnMut(&isize)` closure, found `Error`
+  --> $DIR/issue-95023.rs:3:21
+   |
+LL | impl Fn(&isize) for Error {
+   |                     ^^^^^ expected an `FnMut(&isize)` closure, found `Error`
+   |
+   = help: the trait `FnMut<(&isize,)>` is not implemented for `Error`
+note: required by a bound in `Fn`
+  --> $SRC_DIR/core/src/ops/function.rs:LL:COL
+
+error[E0046]: not all trait items implemented, missing: `call`
+  --> $DIR/issue-95023.rs:3:1
+   |
+LL | impl Fn(&isize) for Error {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation
+   |
+   = help: implement the missing item: `fn call(&self, _: (&isize,)) -> <Self as FnOnce<(&isize,)>>::Output { todo!() }`
+
+error: aborting due to 7 previous errors
 
-Some errors have detailed explanations: E0183, E0220, E0229, E0407.
-For more information about an error, try `rustc --explain E0183`.
+Some errors have detailed explanations: E0046, E0183, E0220, E0229, E0277, E0407.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/lifetimes/missing-lifetime-in-alias.rs b/tests/ui/lifetimes/missing-lifetime-in-alias.rs
index 51c564c011a..a0887b36b8a 100644
--- a/tests/ui/lifetimes/missing-lifetime-in-alias.rs
+++ b/tests/ui/lifetimes/missing-lifetime-in-alias.rs
@@ -4,6 +4,7 @@ trait Trait<'a> {
     type Bar<'b>
     //~^ NOTE associated type defined here, with 1 lifetime parameter
     //~| NOTE
+    //~| NOTE
     where
         Self: 'b;
 }
@@ -13,6 +14,8 @@ struct Impl<'a>(&'a ());
 impl<'a> Trait<'a> for Impl<'a> {
     type Foo = &'a ();
     type Bar<'b> = &'b ();
+    //~^ ERROR: does not fulfill the required lifetime
+    //~| NOTE: type must outlive the lifetime `'b`
 }
 
 type A<'a> = Impl<'a>;
diff --git a/tests/ui/lifetimes/missing-lifetime-in-alias.stderr b/tests/ui/lifetimes/missing-lifetime-in-alias.stderr
index 20159e14407..9183e6302ee 100644
--- a/tests/ui/lifetimes/missing-lifetime-in-alias.stderr
+++ b/tests/ui/lifetimes/missing-lifetime-in-alias.stderr
@@ -1,5 +1,5 @@
 error[E0106]: missing lifetime specifier
-  --> $DIR/missing-lifetime-in-alias.rs:20:24
+  --> $DIR/missing-lifetime-in-alias.rs:23:24
    |
 LL | type B<'a> = <A<'a> as Trait>::Foo;
    |                        ^^^^^ expected named lifetime parameter
@@ -10,13 +10,13 @@ LL | type B<'a> = <A<'a> as Trait<'a>>::Foo;
    |                             ++++
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/missing-lifetime-in-alias.rs:24:28
+  --> $DIR/missing-lifetime-in-alias.rs:27:28
    |
 LL | type C<'a, 'b> = <A<'a> as Trait>::Bar;
    |                            ^^^^^ expected named lifetime parameter
    |
 note: these named lifetimes are available to use
-  --> $DIR/missing-lifetime-in-alias.rs:24:8
+  --> $DIR/missing-lifetime-in-alias.rs:27:8
    |
 LL | type C<'a, 'b> = <A<'a> as Trait>::Bar;
    |        ^^  ^^
@@ -26,7 +26,7 @@ LL | type C<'a, 'b> = <A<'a> as Trait<'lifetime>>::Bar;
    |                                 +++++++++++
 
 error[E0107]: missing generics for associated type `Trait::Bar`
-  --> $DIR/missing-lifetime-in-alias.rs:24:36
+  --> $DIR/missing-lifetime-in-alias.rs:27:36
    |
 LL | type C<'a, 'b> = <A<'a> as Trait>::Bar;
    |                                    ^^^ expected 1 lifetime argument
@@ -41,7 +41,26 @@ help: add missing lifetime argument
 LL | type C<'a, 'b> = <A<'a> as Trait>::Bar<'a>;
    |                                       ++++
 
-error: aborting due to 3 previous errors
+error[E0477]: the type `Impl<'a>` does not fulfill the required lifetime
+  --> $DIR/missing-lifetime-in-alias.rs:16:20
+   |
+LL |     type Bar<'b>
+   |     ------------ definition of `Bar` from trait
+...
+LL |     type Bar<'b> = &'b ();
+   |                    ^^^^^^
+   |
+note: type must outlive the lifetime `'b` as defined here
+  --> $DIR/missing-lifetime-in-alias.rs:16:14
+   |
+LL |     type Bar<'b> = &'b ();
+   |              ^^
+help: copy the `where` clause predicates from the trait
+   |
+LL |     type Bar<'b> = &'b () where Self: 'b;
+   |                           ++++++++++++++
+
+error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0106, E0107.
+Some errors have detailed explanations: E0106, E0107, E0477.
 For more information about an error, try `rustc --explain E0106`.
diff --git a/tests/ui/lint/dead-code/lint-dead-code-1.rs b/tests/ui/lint/dead-code/lint-dead-code-1.rs
index 8f5a4c41ef2..ddcafedf7bc 100644
--- a/tests/ui/lint/dead-code/lint-dead-code-1.rs
+++ b/tests/ui/lint/dead-code/lint-dead-code-1.rs
@@ -37,7 +37,7 @@ struct UsedStruct1 {
     #[allow(dead_code)]
     x: isize
 }
-struct UsedStruct2(isize);
+struct UsedStruct2(#[allow(dead_code)] isize);
 struct UsedStruct3;
 pub struct UsedStruct4;
 // this struct is never used directly, but its method is, so we don't want
diff --git a/tests/ui/lint/dead-code/lint-dead-code-5.rs b/tests/ui/lint/dead-code/lint-dead-code-5.rs
index ed90fb46429..76067d114a1 100644
--- a/tests/ui/lint/dead-code/lint-dead-code-5.rs
+++ b/tests/ui/lint/dead-code/lint-dead-code-5.rs
@@ -2,12 +2,12 @@
 #![deny(dead_code)]
 
 enum Enum1 {
-    Variant1(isize),
+    Variant1(#[allow(dead_code)] isize),
     Variant2 //~ ERROR: variant `Variant2` is never constructed
 }
 
 enum Enum2 {
-    Variant3(bool),
+    Variant3(#[allow(dead_code)] bool),
     #[allow(dead_code)]
     Variant4(isize),
     Variant5 { _x: isize }, //~ ERROR: variants `Variant5` and `Variant6` are never constructed
@@ -15,7 +15,7 @@ enum Enum2 {
     _Variant7,
     Variant8 { _field: bool },
     Variant9,
-    Variant10(usize)
+    Variant10(#[allow(dead_code)] usize)
 }
 
 impl Enum2 {
diff --git a/tests/ui/lint/dead-code/lint-dead-code-5.stderr b/tests/ui/lint/dead-code/lint-dead-code-5.stderr
index eaf43e45361..a583f234a3d 100644
--- a/tests/ui/lint/dead-code/lint-dead-code-5.stderr
+++ b/tests/ui/lint/dead-code/lint-dead-code-5.stderr
@@ -3,7 +3,7 @@ error: variant `Variant2` is never constructed
    |
 LL | enum Enum1 {
    |      ----- variant in this enum
-LL |     Variant1(isize),
+LL |     Variant1(#[allow(dead_code)] isize),
 LL |     Variant2
    |     ^^^^^^^^
    |
diff --git a/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.rs b/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.rs
index a478153b3f4..942c5516500 100644
--- a/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.rs
+++ b/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.rs
@@ -17,7 +17,7 @@ struct Bar {
 
 // Issue 119267: this should not ICE.
 #[derive(Debug)]
-struct Foo(usize, #[allow(unused)] usize);
+struct Foo(usize, #[allow(unused)] usize); //~ WARN field `0` is never read
 
 fn main() {
     Bar {
diff --git a/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr b/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
index 0e5c78a7167..06f9b229c18 100644
--- a/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
+++ b/tests/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
@@ -51,5 +51,19 @@ note: the lint level is defined here
 LL |     #[forbid(dead_code)]
    |              ^^^^^^^^^
 
-error: aborting due to 2 previous errors; 1 warning emitted
+warning: field `0` is never read
+  --> $DIR/multiple-dead-codes-in-the-same-struct.rs:20:12
+   |
+LL | struct Foo(usize, #[allow(unused)] usize);
+   |        --- ^^^^^
+   |        |
+   |        field in this struct
+   |
+   = note: `Foo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
+help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
+   |
+LL | struct Foo((), #[allow(unused)] usize);
+   |            ~~
+
+error: aborting due to 2 previous errors; 2 warnings emitted
 
diff --git a/tests/ui/lint/dead-code/tuple-struct-field.rs b/tests/ui/lint/dead-code/tuple-struct-field.rs
index 14fb30be949..d13fe029289 100644
--- a/tests/ui/lint/dead-code/tuple-struct-field.rs
+++ b/tests/ui/lint/dead-code/tuple-struct-field.rs
@@ -1,4 +1,4 @@
-#![deny(unused_tuple_struct_fields)]
+#![deny(dead_code)]
 //~^ NOTE: the lint level is defined here
 
 use std::marker::PhantomData;
diff --git a/tests/ui/lint/dead-code/tuple-struct-field.stderr b/tests/ui/lint/dead-code/tuple-struct-field.stderr
index b8ad5cbe4e9..0154d5489f9 100644
--- a/tests/ui/lint/dead-code/tuple-struct-field.stderr
+++ b/tests/ui/lint/dead-code/tuple-struct-field.stderr
@@ -9,8 +9,8 @@ LL | struct SingleUnused(i32, [u8; LEN], String);
 note: the lint level is defined here
   --> $DIR/tuple-struct-field.rs:1:9
    |
-LL | #![deny(unused_tuple_struct_fields)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #![deny(dead_code)]
+   |         ^^^^^^^^^
 help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
    |
 LL | struct SingleUnused(i32, (), String);
diff --git a/tests/ui/lint/dead-code/with-impl.rs b/tests/ui/lint/dead-code/with-impl.rs
index 812fcdd09b6..147ec7b9e2e 100644
--- a/tests/ui/lint/dead-code/with-impl.rs
+++ b/tests/ui/lint/dead-code/with-impl.rs
@@ -2,7 +2,7 @@
 
 #![deny(dead_code)]
 
-pub struct GenericFoo<T>(#[allow(unused_tuple_struct_fields)] T);
+pub struct GenericFoo<T>(#[allow(dead_code)] T);
 
 type Foo = GenericFoo<u32>;
 
diff --git a/tests/ui/lint/let_underscore/issue-119696-err-on-fn.rs b/tests/ui/lint/let_underscore/issue-119696-err-on-fn.rs
new file mode 100644
index 00000000000..8e15b4da35a
--- /dev/null
+++ b/tests/ui/lint/let_underscore/issue-119696-err-on-fn.rs
@@ -0,0 +1,21 @@
+// edition: 2021
+
+#![deny(let_underscore_drop)]
+fn main() {
+    let _ = foo(); //~ ERROR non-binding let on a type that implements `Drop`
+}
+
+async fn from_config(_: Config) {}
+
+async fn foo() {
+    from_config(Config {
+        nickname: None,
+        ..Default::default()
+    })
+    .await;
+}
+
+#[derive(Default)]
+struct Config {
+    nickname: Option<Box<u8>>,
+}
diff --git a/tests/ui/lint/let_underscore/issue-119696-err-on-fn.stderr b/tests/ui/lint/let_underscore/issue-119696-err-on-fn.stderr
new file mode 100644
index 00000000000..86e521580b8
--- /dev/null
+++ b/tests/ui/lint/let_underscore/issue-119696-err-on-fn.stderr
@@ -0,0 +1,22 @@
+error: non-binding let on a type that implements `Drop`
+  --> $DIR/issue-119696-err-on-fn.rs:5:5
+   |
+LL |     let _ = foo();
+   |     ^^^^^^^^^^^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/issue-119696-err-on-fn.rs:3:9
+   |
+LL | #![deny(let_underscore_drop)]
+   |         ^^^^^^^^^^^^^^^^^^^
+help: consider binding to an unused variable to avoid immediately dropping the value
+   |
+LL |     let _unused = foo();
+   |         ~~~~~~~
+help: consider immediately dropping the value
+   |
+LL |     drop(foo());
+   |     ~~~~~     +
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/lint/let_underscore/issue-119697-extra-let.rs b/tests/ui/lint/let_underscore/issue-119697-extra-let.rs
new file mode 100644
index 00000000000..1dc80a123f6
--- /dev/null
+++ b/tests/ui/lint/let_underscore/issue-119697-extra-let.rs
@@ -0,0 +1,21 @@
+#![deny(let_underscore_drop)]
+#![feature(type_alias_impl_trait)]
+
+pub struct Foo {
+    /// This type must have nontrivial drop glue
+    field: String,
+}
+
+pub type Tait = impl Sized;
+
+pub fn ice_cold(beverage: Tait) {
+    // Must destructure at least one field of `Foo`
+    let Foo { field } = beverage;
+    // boom
+    _ = field; //~ ERROR non-binding let on a type that implements `Drop`
+
+    let _ = field; //~ ERROR non-binding let on a type that implements `Drop`
+}
+
+
+pub fn main() {}
diff --git a/tests/ui/lint/let_underscore/issue-119697-extra-let.stderr b/tests/ui/lint/let_underscore/issue-119697-extra-let.stderr
new file mode 100644
index 00000000000..16df2c720ea
--- /dev/null
+++ b/tests/ui/lint/let_underscore/issue-119697-extra-let.stderr
@@ -0,0 +1,37 @@
+error: non-binding let on a type that implements `Drop`
+  --> $DIR/issue-119697-extra-let.rs:15:5
+   |
+LL |     _ = field;
+   |     ^^^^^^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/issue-119697-extra-let.rs:1:9
+   |
+LL | #![deny(let_underscore_drop)]
+   |         ^^^^^^^^^^^^^^^^^^^
+help: consider binding to an unused variable to avoid immediately dropping the value
+   |
+LL |     let _unused = field;
+   |     ~~~~~~~~~~~
+help: consider immediately dropping the value
+   |
+LL |     drop(field);
+   |     ~~~~~     +
+
+error: non-binding let on a type that implements `Drop`
+  --> $DIR/issue-119697-extra-let.rs:17:5
+   |
+LL |     let _ = field;
+   |     ^^^^^^^^^^^^^^
+   |
+help: consider binding to an unused variable to avoid immediately dropping the value
+   |
+LL |     let _unused = field;
+   |         ~~~~~~~
+help: consider immediately dropping the value
+   |
+LL |     drop(field);
+   |     ~~~~~     +
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/lint/lint-match-arms-2.stderr b/tests/ui/lint/lint-match-arms-2.stderr
index 062d5c12e96..5e803ef1934 100644
--- a/tests/ui/lint/lint-match-arms-2.stderr
+++ b/tests/ui/lint/lint-match-arms-2.stderr
@@ -11,10 +11,10 @@ LL |         #[deny(bindings_with_variant_name)]
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: irrefutable `if let` guard pattern
-  --> $DIR/lint-match-arms-2.rs:18:18
+  --> $DIR/lint-match-arms-2.rs:18:14
    |
 LL |         a if let b = a => {}
-   |                  ^
+   |              ^^^^^^^^^
    |
    = note: this pattern will always match, so the guard is useless
    = help: consider removing the guard and adding a `let` inside the match arm
diff --git a/tests/ui/lint/unused/issue-104397.rs b/tests/ui/lint/unused/issue-104397.rs
index 94e15cd96bc..c17e532c17f 100644
--- a/tests/ui/lint/unused/issue-104397.rs
+++ b/tests/ui/lint/unused/issue-104397.rs
@@ -3,7 +3,7 @@
 #![warn(unused)]
 #![deny(warnings)]
 
-struct Inv<'a>(&'a mut &'a ());
+struct Inv<'a>(#[allow(dead_code)] &'a mut &'a ());
 
 trait Trait {}
 impl Trait for for<'a> fn(Inv<'a>) {}
diff --git a/tests/ui/lint/unused/issue-105061-should-lint.rs b/tests/ui/lint/unused/issue-105061-should-lint.rs
index 7e4e0947349..433c2882089 100644
--- a/tests/ui/lint/unused/issue-105061-should-lint.rs
+++ b/tests/ui/lint/unused/issue-105061-should-lint.rs
@@ -1,7 +1,7 @@
 #![warn(unused)]
 #![deny(warnings)]
 
-struct Inv<'a>(&'a mut &'a ());
+struct Inv<'a>(#[allow(dead_code)] &'a mut &'a ());
 
 trait Trait<'a> {}
 impl<'b> Trait<'b> for for<'a> fn(Inv<'a>) {}
diff --git a/tests/ui/lint/unused/issue-105061.rs b/tests/ui/lint/unused/issue-105061.rs
index 92d636d0ac6..6043daf209d 100644
--- a/tests/ui/lint/unused/issue-105061.rs
+++ b/tests/ui/lint/unused/issue-105061.rs
@@ -1,7 +1,7 @@
 #![warn(unused)]
 #![deny(warnings)]
 
-struct Inv<'a>(&'a mut &'a ());
+struct Inv<'a>(#[allow(dead_code)] &'a mut &'a ());
 
 trait Trait {}
 impl Trait for (for<'a> fn(Inv<'a>),) {}
diff --git a/tests/ui/lint/unused_parens_json_suggestion.fixed b/tests/ui/lint/unused_parens_json_suggestion.fixed
index c4004540467..b73197ef1bd 100644
--- a/tests/ui/lint/unused_parens_json_suggestion.fixed
+++ b/tests/ui/lint/unused_parens_json_suggestion.fixed
@@ -1,4 +1,5 @@
 // compile-flags: --error-format json
+// error-pattern:unnecessary parentheses
 // run-rustfix
 
 // The output for humans should just highlight the whole span without showing
@@ -13,7 +14,7 @@
 fn main() {
     // We want to suggest the properly-balanced expression `1 / (2 + 3)`, not
     // the malformed `1 / (2 + 3`
-    let _a = 1 / (2 + 3); //~ERROR unnecessary parentheses
+    let _a = 1 / (2 + 3);
     f();
 }
 
diff --git a/tests/ui/lint/unused_parens_json_suggestion.rs b/tests/ui/lint/unused_parens_json_suggestion.rs
index 962c8bdd7d7..4339655cf9d 100644
--- a/tests/ui/lint/unused_parens_json_suggestion.rs
+++ b/tests/ui/lint/unused_parens_json_suggestion.rs
@@ -1,4 +1,5 @@
 // compile-flags: --error-format json
+// error-pattern:unnecessary parentheses
 // run-rustfix
 
 // The output for humans should just highlight the whole span without showing
@@ -13,7 +14,7 @@
 fn main() {
     // We want to suggest the properly-balanced expression `1 / (2 + 3)`, not
     // the malformed `1 / (2 + 3`
-    let _a = (1 / (2 + 3)); //~ERROR unnecessary parentheses
+    let _a = (1 / (2 + 3));
     f();
 }
 
diff --git a/tests/ui/lint/unused_parens_json_suggestion.stderr b/tests/ui/lint/unused_parens_json_suggestion.stderr
index 4bdfee9159b..88f6be4236b 100644
--- a/tests/ui/lint/unused_parens_json_suggestion.stderr
+++ b/tests/ui/lint/unused_parens_json_suggestion.stderr
@@ -1,11 +1,11 @@
-{"$message_type":"diagnostic","message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":577,"byte_end":578,"line_start":16,"line_end":16,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"    let _a = (1 / (2 + 3));
-  --> $DIR/unused_parens_json_suggestion.rs:16:14
+{"$message_type":"diagnostic","message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":618,"byte_end":619,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"    let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":630,"byte_end":631,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":"    let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":436,"byte_end":449,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":618,"byte_end":619,"line_start":17,"line_end":17,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"    let _a = (1 / (2 + 3));","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":630,"byte_end":631,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":"    let _a = (1 / (2 + 3));","highlight_start":26,"highlight_end":27}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around assigned value
+  --> $DIR/unused_parens_json_suggestion.rs:17:14
    |
 LL |     let _a = (1 / (2 + 3));
    |              ^           ^
    |
 note: the lint level is defined here
-  --> $DIR/unused_parens_json_suggestion.rs:10:9
+  --> $DIR/unused_parens_json_suggestion.rs:11:9
    |
 LL | #![deny(unused_parens)]
    |         ^^^^^^^^^^^^^
diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.fixed b/tests/ui/lint/unused_parens_remove_json_suggestion.fixed
index 8a57cd57385..39d7a1127b6 100644
--- a/tests/ui/lint/unused_parens_remove_json_suggestion.fixed
+++ b/tests/ui/lint/unused_parens_remove_json_suggestion.fixed
@@ -1,4 +1,5 @@
 // compile-flags: --error-format json
+// error-pattern:unnecessary parentheses
 // run-rustfix
 
 // The output for humans should just highlight the whole span without showing
@@ -14,7 +15,7 @@ fn main() {
 
     let _b = false;
 
-    if _b { //~ ERROR unnecessary parentheses
+    if _b {
         println!("hello");
     }
 
@@ -25,29 +26,29 @@ fn main() {
 fn f() -> bool {
     let c = false;
 
-    if c { //~ ERROR unnecessary parentheses
+    if c {
         println!("next");
     }
 
-    if c { //~ ERROR unnecessary parentheses
+    if c {
         println!("prev");
     }
 
     while false && true {
-        if c { //~ ERROR unnecessary parentheses
+        if c {
             println!("norm");
         }
 
     }
 
-    while true && false { //~ ERROR unnecessary parentheses
-        for _ in 0 .. 3 { //~ ERROR unnecessary parentheses
+    while true && false {
+        for _ in 0 .. 3 {
             println!("e~")
         }
     }
 
-    for _ in 0 .. 3 { //~ ERROR unnecessary parentheses
-        while true && false { //~ ERROR unnecessary parentheses
+    for _ in 0 .. 3 {
+        while true && false {
             println!("e~")
         }
     }
diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.rs b/tests/ui/lint/unused_parens_remove_json_suggestion.rs
index 952332d54e9..2748bd3f73d 100644
--- a/tests/ui/lint/unused_parens_remove_json_suggestion.rs
+++ b/tests/ui/lint/unused_parens_remove_json_suggestion.rs
@@ -1,4 +1,5 @@
 // compile-flags: --error-format json
+// error-pattern:unnecessary parentheses
 // run-rustfix
 
 // The output for humans should just highlight the whole span without showing
@@ -14,7 +15,7 @@ fn main() {
 
     let _b = false;
 
-    if (_b) { //~ ERROR unnecessary parentheses
+    if (_b) {
         println!("hello");
     }
 
@@ -25,29 +26,29 @@ fn main() {
 fn f() -> bool {
     let c = false;
 
-    if(c) { //~ ERROR unnecessary parentheses
+    if(c) {
         println!("next");
     }
 
-    if (c){ //~ ERROR unnecessary parentheses
+    if (c){
         println!("prev");
     }
 
     while (false && true){
-        if (c) { //~ ERROR unnecessary parentheses
+        if (c) {
             println!("norm");
         }
 
     }
 
-    while(true && false) { //~ ERROR unnecessary parentheses
-        for _ in (0 .. 3){ //~ ERROR unnecessary parentheses
+    while(true && false) {
+        for _ in (0 .. 3){
             println!("e~")
         }
     }
 
-    for _ in (0 .. 3) { //~ ERROR unnecessary parentheses
-        while (true && false) { //~ ERROR unnecessary parentheses
+    for _ in (0 .. 3) {
+        while (true && false) {
             println!("e~")
         }
     }
diff --git a/tests/ui/lint/unused_parens_remove_json_suggestion.stderr b/tests/ui/lint/unused_parens_remove_json_suggestion.stderr
index 7521d41cc93..80371c1594f 100644
--- a/tests/ui/lint/unused_parens_remove_json_suggestion.stderr
+++ b/tests/ui/lint/unused_parens_remove_json_suggestion.stderr
@@ -1,11 +1,11 @@
-{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":481,"byte_end":482,"line_start":17,"line_end":17,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":"    if (_b) {
-  --> $DIR/unused_parens_remove_json_suggestion.rs:17:8
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":522,"byte_end":523,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":"    if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":525,"byte_end":526,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":"    if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":436,"byte_end":449,"line_start":11,"line_end":11,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"#![deny(unused_parens)]","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":522,"byte_end":523,"line_start":18,"line_end":18,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":"    if (_b) {","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":525,"byte_end":526,"line_start":18,"line_end":18,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":"    if (_b) {","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition
+  --> $DIR/unused_parens_remove_json_suggestion.rs:18:8
    |
 LL |     if (_b) {
    |        ^  ^
    |
 note: the lint level is defined here
-  --> $DIR/unused_parens_remove_json_suggestion.rs:10:9
+  --> $DIR/unused_parens_remove_json_suggestion.rs:11:9
    |
 LL | #![deny(unused_parens)]
    |         ^^^^^^^^^^^^^
@@ -16,8 +16,8 @@ LL +     if _b {
    |
 
 "}
-{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":612,"byte_end":613,"line_start":28,"line_end":28,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":"    if(c) {
-  --> $DIR/unused_parens_remove_json_suggestion.rs:28:7
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":619,"byte_end":620,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":"    if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":621,"byte_end":622,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"    if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":619,"byte_end":620,"line_start":29,"line_end":29,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":"    if(c) {","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":621,"byte_end":622,"line_start":29,"line_end":29,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"    if(c) {","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition
+  --> $DIR/unused_parens_remove_json_suggestion.rs:29:7
    |
 LL |     if(c) {
    |       ^ ^
@@ -29,8 +29,8 @@ LL +     if c {
    |
 
 "}
-{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":692,"byte_end":693,"line_start":32,"line_end":32,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":"    if (c){
-  --> $DIR/unused_parens_remove_json_suggestion.rs:32:8
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":665,"byte_end":666,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":"    if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":667,"byte_end":668,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":"    if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":665,"byte_end":666,"line_start":33,"line_end":33,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":"    if (c){","highlight_start":8,"highlight_end":9}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":667,"byte_end":668,"line_start":33,"line_end":33,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":"    if (c){","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition
+  --> $DIR/unused_parens_remove_json_suggestion.rs:33:8
    |
 LL |     if (c){
    |        ^ ^
@@ -42,8 +42,8 @@ LL +     if c {
    |
 
 "}
-{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":774,"byte_end":775,"line_start":36,"line_end":36,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":"    while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":788,"byte_end":789,"line_start":36,"line_end":36,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":"    while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":774,"byte_end":775,"line_start":36,"line_end":36,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":"    while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":788,"byte_end":789,"line_start":36,"line_end":36,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":"    while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition
-  --> $DIR/unused_parens_remove_json_suggestion.rs:36:11
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":713,"byte_end":714,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":"    while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":727,"byte_end":728,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":"    while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":713,"byte_end":714,"line_start":37,"line_end":37,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":"    while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":727,"byte_end":728,"line_start":37,"line_end":37,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":"    while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition
+  --> $DIR/unused_parens_remove_json_suggestion.rs:37:11
    |
 LL |     while (false && true){
    |           ^             ^
@@ -55,8 +55,8 @@ LL +     while false && true {
    |
 
 "}
-{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":802,"byte_end":803,"line_start":37,"line_end":37,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        if (c) {
-  --> $DIR/unused_parens_remove_json_suggestion.rs:37:12
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":741,"byte_end":742,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":743,"byte_end":744,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"        if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":741,"byte_end":742,"line_start":38,"line_end":38,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        if (c) {","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":743,"byte_end":744,"line_start":38,"line_end":38,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"        if (c) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `if` condition
+  --> $DIR/unused_parens_remove_json_suggestion.rs:38:12
    |
 LL |         if (c) {
    |            ^ ^
@@ -68,8 +68,8 @@ LL +         if c {
    |
 
 "}
-{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":899,"byte_end":900,"line_start":43,"line_end":43,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":"    while(true && false) {
-  --> $DIR/unused_parens_remove_json_suggestion.rs:43:10
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":804,"byte_end":805,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":"    while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":818,"byte_end":819,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":"    while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":804,"byte_end":805,"line_start":44,"line_end":44,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":"    while(true && false) {","highlight_start":10,"highlight_end":11}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":818,"byte_end":819,"line_start":44,"line_end":44,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":"    while(true && false) {","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition
+  --> $DIR/unused_parens_remove_json_suggestion.rs:44:10
    |
 LL |     while(true && false) {
    |          ^             ^
@@ -81,8 +81,8 @@ LL +     while true && false {
    |
 
 "}
-{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":968,"byte_end":969,"line_start":44,"line_end":44,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":"        for _ in (0 .. 3){
-  --> $DIR/unused_parens_remove_json_suggestion.rs:44:18
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":839,"byte_end":840,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":"        for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":846,"byte_end":847,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":"        for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":839,"byte_end":840,"line_start":45,"line_end":45,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":"        for _ in (0 .. 3){","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":846,"byte_end":847,"line_start":45,"line_end":45,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":"        for _ in (0 .. 3){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression
+  --> $DIR/unused_parens_remove_json_suggestion.rs:45:18
    |
 LL |         for _ in (0 .. 3){
    |                  ^      ^
@@ -94,8 +94,8 @@ LL +         for _ in 0 .. 3 {
    |
 
 "}
-{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":1069,"byte_end":1070,"line_start":49,"line_end":49,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"    for _ in (0 .. 3) {
-  --> $DIR/unused_parens_remove_json_suggestion.rs:49:14
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":906,"byte_end":907,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"    for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":913,"byte_end":914,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":"    for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":906,"byte_end":907,"line_start":50,"line_end":50,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"    for _ in (0 .. 3) {","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":913,"byte_end":914,"line_start":50,"line_end":50,"column_start":21,"column_end":22,"is_primary":true,"text":[{"text":"    for _ in (0 .. 3) {","highlight_start":21,"highlight_end":22}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `for` iterator expression
+  --> $DIR/unused_parens_remove_json_suggestion.rs:50:14
    |
 LL |     for _ in (0 .. 3) {
    |              ^      ^
@@ -107,8 +107,8 @@ LL +     for _ in 0 .. 3 {
    |
 
 "}
-{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":1128,"byte_end":1129,"line_start":50,"line_end":50,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":"        while (true && false) {
-  --> $DIR/unused_parens_remove_json_suggestion.rs:50:15
+{"$message_type":"diagnostic","message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":931,"byte_end":932,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":"        while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":945,"byte_end":946,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":"        while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":931,"byte_end":932,"line_start":51,"line_end":51,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":"        while (true && false) {","highlight_start":15,"highlight_end":16}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":945,"byte_end":946,"line_start":51,"line_end":51,"column_start":29,"column_end":30,"is_primary":true,"text":[{"text":"        while (true && false) {","highlight_start":29,"highlight_end":30}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition
+  --> $DIR/unused_parens_remove_json_suggestion.rs:51:15
    |
 LL |         while (true && false) {
    |               ^             ^
diff --git a/tests/ui/lint/use_suggestion_json.rs b/tests/ui/lint/use_suggestion_json.rs
index 7d641e08bf0..6a947f14302 100644
--- a/tests/ui/lint/use_suggestion_json.rs
+++ b/tests/ui/lint/use_suggestion_json.rs
@@ -1,6 +1,6 @@
 // ignore-windows
 // ignore-sgx std::os::fortanix_sgx::usercalls::alloc::Iter changes compiler suggestions
-// compile-flags: --error-format pretty-json --json=diagnostic-rendered-ansi
+// compile-flags: --error-format pretty-json --json=diagnostic-rendered-ansi -Z unstable-options
 
 // The output for humans should just highlight the whole span without showing
 // the suggested replacement, but we also want to test that suggested
diff --git a/tests/ui/lint/use_suggestion_json.stderr b/tests/ui/lint/use_suggestion_json.stderr
index 7dfd269a4e2..b3c973680b7 100644
--- a/tests/ui/lint/use_suggestion_json.stderr
+++ b/tests/ui/lint/use_suggestion_json.stderr
@@ -1,3 +1,423 @@
-{"$message_type":"diagnostic","message":"`--error-format=pretty-json` is unstable","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: `--error-format=pretty-json` is unstable\u001b[0m
+{
+  "$message_type": "diagnostic",
+  "message": "cannot find type `Iter` in this scope",
+  "code": {
+    "code": "E0412",
+    "explanation": "A used type name is not in scope.
 
-"}
+Erroneous code examples:
+
+```compile_fail,E0412
+impl Something {} // error: type name `Something` is not in scope
+
+// or:
+
+trait Foo {
+    fn bar(N); // error: type name `N` is not in scope
+}
+
+// or:
+
+fn foo(x: T) {} // type name `T` is not in scope
+```
+
+To fix this error, please verify you didn't misspell the type name, you did
+declare it or imported it into the scope. Examples:
+
+```
+struct Something;
+
+impl Something {} // ok!
+
+// or:
+
+trait Foo {
+    type N;
+
+    fn bar(_: Self::N); // ok!
+}
+
+// or:
+
+fn foo<T>(x: T) {} // ok!
+```
+
+Another case that causes this error is when a type is imported into a parent
+module. To fix this, you can follow the suggestion and use File directly or
+`use super::File;` which will import the types from the parent namespace. An
+example that causes this error is below:
+
+```compile_fail,E0412
+use std::fs::File;
+
+mod foo {
+    fn some_function(f: File) {}
+}
+```
+
+```
+use std::fs::File;
+
+mod foo {
+    // either
+    use super::File;
+    // or
+    // use std::fs::File;
+    fn foo(f: File) {}
+}
+# fn main() {} // don't insert it for us; that'll break imports
+```
+"
+  },
+  "level": "error",
+  "spans": [
+    {
+      "file_name": "$DIR/use_suggestion_json.rs",
+      "byte_start": 561,
+      "byte_end": 565,
+      "line_start": 12,
+      "line_end": 12,
+      "column_start": 12,
+      "column_end": 16,
+      "is_primary": true,
+      "text": [
+        {
+          "text": "    let x: Iter;",
+          "highlight_start": 12,
+          "highlight_end": 16
+        }
+      ],
+      "label": "not found in this scope",
+      "suggested_replacement": null,
+      "suggestion_applicability": null,
+      "expansion": null
+    }
+  ],
+  "children": [
+    {
+      "message": "consider importing one of these items",
+      "code": null,
+      "level": "help",
+      "spans": [
+        {
+          "file_name": "$DIR/use_suggestion_json.rs",
+          "byte_start": 538,
+          "byte_end": 538,
+          "line_start": 11,
+          "line_end": 11,
+          "column_start": 1,
+          "column_end": 1,
+          "is_primary": true,
+          "text": [
+            {
+              "text": "fn main() {",
+              "highlight_start": 1,
+              "highlight_end": 1
+            }
+          ],
+          "label": null,
+          "suggested_replacement": "use std::collections::binary_heap::Iter;
+
+",
+          "suggestion_applicability": "MaybeIncorrect",
+          "expansion": null
+        },
+        {
+          "file_name": "$DIR/use_suggestion_json.rs",
+          "byte_start": 538,
+          "byte_end": 538,
+          "line_start": 11,
+          "line_end": 11,
+          "column_start": 1,
+          "column_end": 1,
+          "is_primary": true,
+          "text": [
+            {
+              "text": "fn main() {",
+              "highlight_start": 1,
+              "highlight_end": 1
+            }
+          ],
+          "label": null,
+          "suggested_replacement": "use std::collections::btree_map::Iter;
+
+",
+          "suggestion_applicability": "MaybeIncorrect",
+          "expansion": null
+        },
+        {
+          "file_name": "$DIR/use_suggestion_json.rs",
+          "byte_start": 538,
+          "byte_end": 538,
+          "line_start": 11,
+          "line_end": 11,
+          "column_start": 1,
+          "column_end": 1,
+          "is_primary": true,
+          "text": [
+            {
+              "text": "fn main() {",
+              "highlight_start": 1,
+              "highlight_end": 1
+            }
+          ],
+          "label": null,
+          "suggested_replacement": "use std::collections::btree_set::Iter;
+
+",
+          "suggestion_applicability": "MaybeIncorrect",
+          "expansion": null
+        },
+        {
+          "file_name": "$DIR/use_suggestion_json.rs",
+          "byte_start": 538,
+          "byte_end": 538,
+          "line_start": 11,
+          "line_end": 11,
+          "column_start": 1,
+          "column_end": 1,
+          "is_primary": true,
+          "text": [
+            {
+              "text": "fn main() {",
+              "highlight_start": 1,
+              "highlight_end": 1
+            }
+          ],
+          "label": null,
+          "suggested_replacement": "use std::collections::hash_map::Iter;
+
+",
+          "suggestion_applicability": "MaybeIncorrect",
+          "expansion": null
+        },
+        {
+          "file_name": "$DIR/use_suggestion_json.rs",
+          "byte_start": 538,
+          "byte_end": 538,
+          "line_start": 11,
+          "line_end": 11,
+          "column_start": 1,
+          "column_end": 1,
+          "is_primary": true,
+          "text": [
+            {
+              "text": "fn main() {",
+              "highlight_start": 1,
+              "highlight_end": 1
+            }
+          ],
+          "label": null,
+          "suggested_replacement": "use std::collections::hash_set::Iter;
+
+",
+          "suggestion_applicability": "MaybeIncorrect",
+          "expansion": null
+        },
+        {
+          "file_name": "$DIR/use_suggestion_json.rs",
+          "byte_start": 538,
+          "byte_end": 538,
+          "line_start": 11,
+          "line_end": 11,
+          "column_start": 1,
+          "column_end": 1,
+          "is_primary": true,
+          "text": [
+            {
+              "text": "fn main() {",
+              "highlight_start": 1,
+              "highlight_end": 1
+            }
+          ],
+          "label": null,
+          "suggested_replacement": "use std::collections::linked_list::Iter;
+
+",
+          "suggestion_applicability": "MaybeIncorrect",
+          "expansion": null
+        },
+        {
+          "file_name": "$DIR/use_suggestion_json.rs",
+          "byte_start": 538,
+          "byte_end": 538,
+          "line_start": 11,
+          "line_end": 11,
+          "column_start": 1,
+          "column_end": 1,
+          "is_primary": true,
+          "text": [
+            {
+              "text": "fn main() {",
+              "highlight_start": 1,
+              "highlight_end": 1
+            }
+          ],
+          "label": null,
+          "suggested_replacement": "use std::collections::vec_deque::Iter;
+
+",
+          "suggestion_applicability": "MaybeIncorrect",
+          "expansion": null
+        },
+        {
+          "file_name": "$DIR/use_suggestion_json.rs",
+          "byte_start": 538,
+          "byte_end": 538,
+          "line_start": 11,
+          "line_end": 11,
+          "column_start": 1,
+          "column_end": 1,
+          "is_primary": true,
+          "text": [
+            {
+              "text": "fn main() {",
+              "highlight_start": 1,
+              "highlight_end": 1
+            }
+          ],
+          "label": null,
+          "suggested_replacement": "use std::option::Iter;
+
+",
+          "suggestion_applicability": "MaybeIncorrect",
+          "expansion": null
+        },
+        {
+          "file_name": "$DIR/use_suggestion_json.rs",
+          "byte_start": 538,
+          "byte_end": 538,
+          "line_start": 11,
+          "line_end": 11,
+          "column_start": 1,
+          "column_end": 1,
+          "is_primary": true,
+          "text": [
+            {
+              "text": "fn main() {",
+              "highlight_start": 1,
+              "highlight_end": 1
+            }
+          ],
+          "label": null,
+          "suggested_replacement": "use std::path::Iter;
+
+",
+          "suggestion_applicability": "MaybeIncorrect",
+          "expansion": null
+        },
+        {
+          "file_name": "$DIR/use_suggestion_json.rs",
+          "byte_start": 538,
+          "byte_end": 538,
+          "line_start": 11,
+          "line_end": 11,
+          "column_start": 1,
+          "column_end": 1,
+          "is_primary": true,
+          "text": [
+            {
+              "text": "fn main() {",
+              "highlight_start": 1,
+              "highlight_end": 1
+            }
+          ],
+          "label": null,
+          "suggested_replacement": "use std::result::Iter;
+
+",
+          "suggestion_applicability": "MaybeIncorrect",
+          "expansion": null
+        },
+        {
+          "file_name": "$DIR/use_suggestion_json.rs",
+          "byte_start": 538,
+          "byte_end": 538,
+          "line_start": 11,
+          "line_end": 11,
+          "column_start": 1,
+          "column_end": 1,
+          "is_primary": true,
+          "text": [
+            {
+              "text": "fn main() {",
+              "highlight_start": 1,
+              "highlight_end": 1
+            }
+          ],
+          "label": null,
+          "suggested_replacement": "use std::slice::Iter;
+
+",
+          "suggestion_applicability": "MaybeIncorrect",
+          "expansion": null
+        },
+        {
+          "file_name": "$DIR/use_suggestion_json.rs",
+          "byte_start": 538,
+          "byte_end": 538,
+          "line_start": 11,
+          "line_end": 11,
+          "column_start": 1,
+          "column_end": 1,
+          "is_primary": true,
+          "text": [
+            {
+              "text": "fn main() {",
+              "highlight_start": 1,
+              "highlight_end": 1
+            }
+          ],
+          "label": null,
+          "suggested_replacement": "use std::sync::mpsc::Iter;
+
+",
+          "suggestion_applicability": "MaybeIncorrect",
+          "expansion": null
+        }
+      ],
+      "children": [],
+      "rendered": null
+    }
+  ],
+  "rendered": "\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `Iter` in this scope\u001b[0m
+\u001b[0m  \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0m$DIR/use_suggestion_json.rs:12:12\u001b[0m
+\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
+\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m    let x: Iter;\u001b[0m
+\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m           \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in this scope\u001b[0m
+\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
+\u001b[0m\u001b[1m\u001b[38;5;14mhelp\u001b[0m\u001b[0m: consider importing one of these items\u001b[0m
+\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
+\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+ use std::collections::binary_heap::Iter;\u001b[0m
+\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
+\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+ use std::collections::btree_map::Iter;\u001b[0m
+\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
+\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+ use std::collections::btree_set::Iter;\u001b[0m
+\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
+\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+ use std::collections::hash_map::Iter;\u001b[0m
+\u001b[0m   \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
+\u001b[0m     and 8 other candidates\u001b[0m
+
+"
+}
+{
+  "$message_type": "diagnostic",
+  "message": "aborting due to 1 previous error",
+  "code": null,
+  "level": "error",
+  "spans": [],
+  "children": [],
+  "rendered": "\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 1 previous error\u001b[0m
+
+"
+}
+{
+  "$message_type": "diagnostic",
+  "message": "For more information about this error, try `rustc --explain E0412`.",
+  "code": null,
+  "level": "failure-note",
+  "spans": [],
+  "children": [],
+  "rendered": "\u001b[0m\u001b[1mFor more information about this error, try `rustc --explain E0412`.\u001b[0m
+"
+}
diff --git a/tests/ui/lint/wide_pointer_comparisons.rs b/tests/ui/lint/wide_pointer_comparisons.rs
index 8334575cf52..961b998c956 100644
--- a/tests/ui/lint/wide_pointer_comparisons.rs
+++ b/tests/ui/lint/wide_pointer_comparisons.rs
@@ -109,6 +109,15 @@ fn main() {
 
     {
         macro_rules! cmp {
+            ($a:tt, $b:tt) => { $a == $b }
+            //~^ WARN ambiguous wide pointer comparison
+        }
+
+        cmp!(a, b);
+    }
+
+    {
+        macro_rules! cmp {
             ($a:ident, $b:ident) => { $a == $b }
             //~^ WARN ambiguous wide pointer comparison
         }
diff --git a/tests/ui/lint/wide_pointer_comparisons.stderr b/tests/ui/lint/wide_pointer_comparisons.stderr
index 926b8775902..349ff467d0f 100644
--- a/tests/ui/lint/wide_pointer_comparisons.stderr
+++ b/tests/ui/lint/wide_pointer_comparisons.stderr
@@ -421,7 +421,18 @@ LL |         std::ptr::eq(*a, *b)
    |         ~~~~~~~~~~~~~  ~   +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
-  --> $DIR/wide_pointer_comparisons.rs:112:39
+  --> $DIR/wide_pointer_comparisons.rs:112:33
+   |
+LL |             ($a:tt, $b:tt) => { $a == $b }
+   |                                 ^^^^^^^^
+   |
+help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
+   |
+LL |             ($a:tt, $b:tt) => { std::ptr::addr_eq($a, $b) }
+   |                                 ++++++++++++++++++  ~   +
+
+warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
+  --> $DIR/wide_pointer_comparisons.rs:121:39
    |
 LL |             ($a:ident, $b:ident) => { $a == $b }
    |                                       ^^^^^^^^
@@ -436,7 +447,7 @@ LL |             ($a:ident, $b:ident) => { std::ptr::addr_eq($a, $b) }
    |                                       ++++++++++++++++++  ~   +
 
 warning: ambiguous wide pointer comparison, the comparison includes metadata which may not be expected
-  --> $DIR/wide_pointer_comparisons.rs:122:37
+  --> $DIR/wide_pointer_comparisons.rs:131:37
    |
 LL |             ($a:expr, $b:expr) => { $a == $b }
    |                                     ^^
@@ -448,5 +459,5 @@ LL |         cmp!(&a, &b);
    = help: use `std::ptr::addr_eq` or untyped pointers to only compare their addresses
    = note: this warning originates in the macro `cmp` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-warning: 37 warnings emitted
+warning: 38 warnings emitted
 
diff --git a/tests/ui/list.rs b/tests/ui/list.rs
index ffe9f93860a..e44c94b3219 100644
--- a/tests/ui/list.rs
+++ b/tests/ui/list.rs
@@ -3,7 +3,7 @@
 #![allow(non_camel_case_types)]
 // pretty-expanded FIXME #23616
 
-enum list { #[allow(unused_tuple_struct_fields)] cons(isize, Box<list>), nil, }
+enum list { #[allow(dead_code)] cons(isize, Box<list>), nil, }
 
 pub fn main() {
     list::cons(10, Box::new(list::cons(11, Box::new(list::cons(12, Box::new(list::nil))))));
diff --git a/tests/ui/lto/lto-still-runs-thread-dtors.rs b/tests/ui/lto/lto-still-runs-thread-dtors.rs
index 1c7368b36e1..635ad783b31 100644
--- a/tests/ui/lto/lto-still-runs-thread-dtors.rs
+++ b/tests/ui/lto/lto-still-runs-thread-dtors.rs
@@ -2,8 +2,6 @@
 // compile-flags: -C lto
 // no-prefer-dynamic
 // ignore-emscripten no threads support
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
 
 use std::thread;
 
diff --git a/tests/ui/macros/html-literals.rs b/tests/ui/macros/html-literals.rs
index 26f00fed9c4..e5ff425041a 100644
--- a/tests/ui/macros/html-literals.rs
+++ b/tests/ui/macros/html-literals.rs
@@ -88,7 +88,7 @@ pub fn main() {
     );
 }
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 enum HTMLFragment {
     tag(String, Vec<HTMLFragment> ),
     text(String),
diff --git a/tests/ui/macros/issue-118786.stderr b/tests/ui/macros/issue-118786.stderr
index ca3a40f31c1..1a8ac9340da 100644
--- a/tests/ui/macros/issue-118786.stderr
+++ b/tests/ui/macros/issue-118786.stderr
@@ -6,8 +6,8 @@ LL |         macro_rules! $macro_name {
    |
 help: change the delimiters to curly braces
    |
-LL |         macro_rules! {} {
-   |                      ~          +
+LL |         macro_rules! {$macro_name} {
+   |                      +           +
 help: add a semicolon
    |
 LL |         macro_rules! $macro_name; {
diff --git a/tests/ui/macros/macro-tt-followed-by-seq.rs b/tests/ui/macros/macro-tt-followed-by-seq.rs
index 080dbcfdd41..67238df8524 100644
--- a/tests/ui/macros/macro-tt-followed-by-seq.rs
+++ b/tests/ui/macros/macro-tt-followed-by-seq.rs
@@ -5,7 +5,7 @@
 use self::Join::*;
 
 #[derive(Debug)]
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 enum Join<A,B> {
   Keep(A,B),
   Skip(A,B),
diff --git a/tests/ui/methods/method-argument-inference-associated-type.rs b/tests/ui/methods/method-argument-inference-associated-type.rs
index a3c31fab1c2..852747d06b5 100644
--- a/tests/ui/methods/method-argument-inference-associated-type.rs
+++ b/tests/ui/methods/method-argument-inference-associated-type.rs
@@ -7,7 +7,7 @@ pub trait Service {
     fn call(&self, _req: Self::Request);
 }
 
-pub struct S<T>(#[allow(unused_tuple_struct_fields)] T);
+pub struct S<T>(#[allow(dead_code)] T);
 
 impl Service for ClientMap {
     type Request = S<Box<dyn Fn(i32)>>;
diff --git a/tests/ui/methods/method-on-ambiguous-numeric-type.rs b/tests/ui/methods/method-on-ambiguous-numeric-type.rs
index 82f47438d50..f42b72e9f9c 100644
--- a/tests/ui/methods/method-on-ambiguous-numeric-type.rs
+++ b/tests/ui/methods/method-on-ambiguous-numeric-type.rs
@@ -5,6 +5,9 @@
 macro_rules! local_mac {
     ($ident:ident) => { let $ident = 42; }
 }
+macro_rules! local_mac_tt {
+    ($tt:tt) => { let $tt = 42; }
+}
 
 fn main() {
     let x = 2.0.neg();
@@ -23,6 +26,10 @@ fn main() {
     local_mac!(local_bar);
     local_bar.pow(2);
     //~^ ERROR can't call method `pow` on ambiguous numeric type `{integer}`
+
+    local_mac_tt!(local_bar_tt);
+    local_bar_tt.pow(2);
+    //~^ ERROR can't call method `pow` on ambiguous numeric type `{integer}`
 }
 
 fn qux() {
diff --git a/tests/ui/methods/method-on-ambiguous-numeric-type.stderr b/tests/ui/methods/method-on-ambiguous-numeric-type.stderr
index 91733411637..060595e1d40 100644
--- a/tests/ui/methods/method-on-ambiguous-numeric-type.stderr
+++ b/tests/ui/methods/method-on-ambiguous-numeric-type.stderr
@@ -1,5 +1,5 @@
 error[E0689]: can't call method `neg` on ambiguous numeric type `{float}`
-  --> $DIR/method-on-ambiguous-numeric-type.rs:10:17
+  --> $DIR/method-on-ambiguous-numeric-type.rs:13:17
    |
 LL |     let x = 2.0.neg();
    |                 ^^^
@@ -10,7 +10,7 @@ LL |     let x = 2.0_f32.neg();
    |             ~~~~~~~
 
 error[E0689]: can't call method `neg` on ambiguous numeric type `{float}`
-  --> $DIR/method-on-ambiguous-numeric-type.rs:14:15
+  --> $DIR/method-on-ambiguous-numeric-type.rs:17:15
    |
 LL |     let x = y.neg();
    |               ^^^
@@ -21,7 +21,7 @@ LL |     let y: f32 = 2.0;
    |          +++++
 
 error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
-  --> $DIR/method-on-ambiguous-numeric-type.rs:19:26
+  --> $DIR/method-on-ambiguous-numeric-type.rs:22:26
    |
 LL |     for i in 0..100 {
    |         - you must specify a type for this binding, like `i32`
@@ -29,7 +29,7 @@ LL |         println!("{}", i.pow(2));
    |                          ^^^
 
 error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
-  --> $DIR/method-on-ambiguous-numeric-type.rs:24:15
+  --> $DIR/method-on-ambiguous-numeric-type.rs:27:15
    |
 LL |     local_bar.pow(2);
    |               ^^^
@@ -40,7 +40,18 @@ LL |     ($ident:ident) => { let $ident: i32 = 42; }
    |                                   +++++
 
 error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
-  --> $DIR/method-on-ambiguous-numeric-type.rs:30:9
+  --> $DIR/method-on-ambiguous-numeric-type.rs:31:18
+   |
+LL |     local_bar_tt.pow(2);
+   |                  ^^^
+   |
+help: you must specify a type for this binding, like `i32`
+   |
+LL |     ($tt:tt) => { let $tt: i32 = 42; }
+   |                          +++++
+
+error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
+  --> $DIR/method-on-ambiguous-numeric-type.rs:37:9
    |
 LL |     bar.pow(2);
    |         ^^^
@@ -51,6 +62,6 @@ help: you must specify a type for this binding, like `i32`
 LL |     ($ident:ident) => { let $ident: i32 = 42; }
    |                                   +++++
 
-error: aborting due to 5 previous errors
+error: aborting due to 6 previous errors
 
 For more information about this error, try `rustc --explain E0689`.
diff --git a/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs b/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs
index ec41b711709..787191a26fb 100644
--- a/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs
+++ b/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs
@@ -15,7 +15,7 @@ trait MyTrait1 {
 
 impl MyTrait1 for Foo<u32> {}
 
-struct Foo<T>(#[allow(unused_tuple_struct_fields)] T);
+struct Foo<T>(#[allow(dead_code)] T);
 
 impl Deref for Foo<()> {
     type Target = dyn MyTrait1 + 'static;
@@ -33,7 +33,7 @@ trait MyTrait2 {
 }
 
 impl MyTrait2 for u32 {}
-struct Bar<T>(#[allow(unused_tuple_struct_fields)] T, u32);
+struct Bar<T>(#[allow(dead_code)] T, u32);
 impl Deref for Bar<u8> {
     type Target = dyn MyTrait2 + 'static;
     fn deref(&self) -> &(dyn MyTrait2 + 'static) {
diff --git a/tests/ui/mir/lint/assignment-overlap.rs b/tests/ui/mir/lint/assignment-overlap.rs
new file mode 100644
index 00000000000..0e4a11467dc
--- /dev/null
+++ b/tests/ui/mir/lint/assignment-overlap.rs
@@ -0,0 +1,19 @@
+// compile-flags: --crate-type=lib -Zlint-mir -Ztreat-err-as-bug
+// build-fail
+// failure-status: 101
+// dont-check-compiler-stderr
+// error-pattern: encountered `Assign` statement with overlapping memory
+#![feature(custom_mir, core_intrinsics)]
+extern crate core;
+use core::intrinsics::mir::*;
+
+#[custom_mir(dialect = "runtime", phase = "optimized")]
+pub fn main() {
+    mir!(
+        let a: [u8; 1024];
+        {
+            a = a;
+            Return()
+        }
+    )
+}
diff --git a/tests/ui/mir/lint/call-overlap.rs b/tests/ui/mir/lint/call-overlap.rs
new file mode 100644
index 00000000000..df38e901e73
--- /dev/null
+++ b/tests/ui/mir/lint/call-overlap.rs
@@ -0,0 +1,23 @@
+// compile-flags: -Zlint-mir -Ztreat-err-as-bug
+// build-fail
+// failure-status: 101
+// dont-check-compiler-stderr
+// error-pattern: encountered overlapping memory in `Move` arguments to `Call`
+#![feature(custom_mir, core_intrinsics)]
+extern crate core;
+use core::intrinsics::mir::*;
+
+#[custom_mir(dialect = "runtime", phase = "optimized")]
+pub fn main() {
+    mir!(
+        let a: [u8; 1024];
+        {
+            Call(a = f(Move(a)), ReturnTo(bb1), UnwindUnreachable())
+        }
+        bb1 = {
+            Return()
+        }
+    )
+}
+
+pub fn f<T: Copy>(a: T) -> T { a }
diff --git a/tests/ui/mir/mir_codegen_switch.rs b/tests/ui/mir/mir_codegen_switch.rs
index 9c93499d948..afdcd36f4bc 100644
--- a/tests/ui/mir/mir_codegen_switch.rs
+++ b/tests/ui/mir/mir_codegen_switch.rs
@@ -1,7 +1,7 @@
 // run-pass
 enum Abc {
-    A(#[allow(unused_tuple_struct_fields)] u8),
-    B(#[allow(unused_tuple_struct_fields)] i8),
+    A(#[allow(dead_code)] u8),
+    B(#[allow(dead_code)] i8),
     C,
     D,
 }
diff --git a/tests/ui/mir/mir_fat_ptr.rs b/tests/ui/mir/mir_fat_ptr.rs
index 7c3e07c9e34..0c07fba6e94 100644
--- a/tests/ui/mir/mir_fat_ptr.rs
+++ b/tests/ui/mir/mir_fat_ptr.rs
@@ -1,7 +1,7 @@
 // run-pass
 // test that ordinary fat pointer operations work.
 
-struct Wrapper<T: ?Sized>(#[allow(unused_tuple_struct_fields)] u32, T);
+struct Wrapper<T: ?Sized>(#[allow(dead_code)] u32, T);
 
 struct FatPtrContainer<'a> {
     ptr: &'a [u8]
diff --git a/tests/ui/mir/mir_raw_fat_ptr.rs b/tests/ui/mir/mir_raw_fat_ptr.rs
index f4a9afd2308..8e5a2043dc6 100644
--- a/tests/ui/mir/mir_raw_fat_ptr.rs
+++ b/tests/ui/mir/mir_raw_fat_ptr.rs
@@ -105,7 +105,7 @@ impl<T> Foo for T {
     }
 }
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct S<T:?Sized>(u32, T);
 
 fn main_ref() {
diff --git a/tests/ui/mir/mir_refs_correct.rs b/tests/ui/mir/mir_refs_correct.rs
index 6cd9526b749..c5b57f52743 100644
--- a/tests/ui/mir/mir_refs_correct.rs
+++ b/tests/ui/mir/mir_refs_correct.rs
@@ -3,7 +3,7 @@
 
 extern crate mir_external_refs as ext;
 
-struct S(#[allow(unused_tuple_struct_fields)] u8);
+struct S(#[allow(dead_code)] u8);
 #[derive(Debug, PartialEq, Eq)]
 struct Unit;
 
@@ -46,7 +46,7 @@ impl<I, O> T<I, O> for O {}
 impl X for S {}
 
 enum E {
-    U(#[allow(unused_tuple_struct_fields)] u8)
+    U(#[allow(dead_code)] u8)
 }
 
 #[derive(PartialEq, Debug, Eq)]
diff --git a/tests/ui/mir/ssa_call_ret.rs b/tests/ui/mir/ssa_call_ret.rs
index 6132a6691de..f8a83249225 100644
--- a/tests/ui/mir/ssa_call_ret.rs
+++ b/tests/ui/mir/ssa_call_ret.rs
@@ -13,7 +13,7 @@ pub fn f() -> u32 {
     mir!(
         let a: u32;
         {
-            Call(a = g(), bb1, UnwindCleanup(bb2))
+            Call(a = g(), ReturnTo(bb1), UnwindCleanup(bb2))
         }
         bb1 = {
             RET = a;
diff --git a/tests/ui/mir/validate/critical-edge.rs b/tests/ui/mir/validate/critical-edge.rs
index 9ef655cd1bb..3bb732ad3f7 100644
--- a/tests/ui/mir/validate/critical-edge.rs
+++ b/tests/ui/mir/validate/critical-edge.rs
@@ -20,7 +20,7 @@ pub fn f(a: u32) -> u32 {
             }
         }
         bb1 = {
-            Call(RET = f(1), bb2, UnwindTerminate(ReasonAbi))
+            Call(RET = f(1), ReturnTo(bb2), UnwindTerminate(ReasonAbi))
         }
 
         bb2 = {
diff --git a/tests/ui/mir/validate/noncleanup-cleanup.rs b/tests/ui/mir/validate/noncleanup-cleanup.rs
index 0a1c4528aa6..a14ab44257f 100644
--- a/tests/ui/mir/validate/noncleanup-cleanup.rs
+++ b/tests/ui/mir/validate/noncleanup-cleanup.rs
@@ -11,7 +11,7 @@ use core::intrinsics::mir::*;
 pub fn main() {
     mir!(
         {
-            Call(RET = main(), block, UnwindCleanup(block))
+            Call(RET = main(), ReturnTo(block), UnwindCleanup(block))
         }
         block = {
             Return()
diff --git a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed
index 63b65ab20fe..b8eeb3d5cae 100644
--- a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed
+++ b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed
@@ -4,7 +4,7 @@ macro_rules! my_wrapper {
     ($expr:expr) => { MyWrapper($expr) }
 }
 
-pub struct MyWrapper(u32);
+pub struct MyWrapper(#[allow(dead_code)] u32);
 
 fn main() {
     let value = MyWrapper(123);
diff --git a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs
index 2ab4e3955f3..54a13c67350 100644
--- a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs
+++ b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs
@@ -4,7 +4,7 @@ macro_rules! my_wrapper {
     ($expr:expr) => { MyWrapper($expr) }
 }
 
-pub struct MyWrapper(u32);
+pub struct MyWrapper(#[allow(dead_code)] u32);
 
 fn main() {
     let value = MyWrapper(123);
diff --git a/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs
index 7d3b00dfc71..8eb544e8ab9 100644
--- a/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs
+++ b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs
@@ -14,9 +14,8 @@ struct S1 {
 
 impl S1 {
     fn new(_x: u64) -> S1 {
-        S1 {
-            a: unsafe { &mut X1 },
-        }
+        S1 { a: unsafe { &mut X1 } }
+        //~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
     }
 }
 
diff --git a/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.stderr b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.stderr
new file mode 100644
index 00000000000..17217cd5859
--- /dev/null
+++ b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.stderr
@@ -0,0 +1,17 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/borrowck-thread-local-static-mut-borrow-outlives-fn.rs:17:26
+   |
+LL |         S1 { a: unsafe { &mut X1 } }
+   |                          ^^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |         S1 { a: unsafe { addr_of_mut!(X1) } }
+   |                          ~~~~~~~~~~~~~~~~
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/nll/issue-54302.stderr b/tests/ui/nll/issue-54302.stderr
index 269739af602..a1e2d401429 100644
--- a/tests/ui/nll/issue-54302.stderr
+++ b/tests/ui/nll/issue-54302.stderr
@@ -4,7 +4,7 @@ error: implementation of `Deserialize` is not general enough
 LL |     assert_deserialize_owned::<&'static str>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Deserialize` is not general enough
    |
-   = note: `&'static str` must implement `Deserialize<'0>`, for any lifetime `'0`...
+   = note: `&str` must implement `Deserialize<'0>`, for any lifetime `'0`...
    = note: ...but `&str` actually implements `Deserialize<'1>`, for some specific lifetime `'1`
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/no_std/no-std-no-start-binary.rs b/tests/ui/no_std/no-std-no-start-binary.rs
new file mode 100644
index 00000000000..ce1c871f6a6
--- /dev/null
+++ b/tests/ui/no_std/no-std-no-start-binary.rs
@@ -0,0 +1,13 @@
+// compile-flags: -Cpanic=abort --emit link
+// error-pattern:using `fn main` requires the standard library
+
+// Make sure that we don't emit an error message mentioning internal lang items.
+
+#![no_std]
+
+#[panic_handler]
+fn handler(_info: &core::panic::PanicInfo<'_>) -> ! {
+    loop {}
+}
+
+fn main() {}
diff --git a/tests/ui/no_std/no-std-no-start-binary.stderr b/tests/ui/no_std/no-std-no-start-binary.stderr
new file mode 100644
index 00000000000..dd06c234da2
--- /dev/null
+++ b/tests/ui/no_std/no-std-no-start-binary.stderr
@@ -0,0 +1,6 @@
+error: using `fn main` requires the standard library
+   |
+   = help: use `#![no_main]` to bypass the Rust generated entrypoint and declare a platform specific entrypoint yourself, usually with `#[no_mangle]`
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/no_std/no-std-unwind-binary.rs b/tests/ui/no_std/no-std-unwind-binary.rs
new file mode 100644
index 00000000000..7a9dfd7a48d
--- /dev/null
+++ b/tests/ui/no_std/no-std-unwind-binary.rs
@@ -0,0 +1,15 @@
+// error-pattern:unwinding panics are not supported without std
+// needs-unwind
+// compile-flags: -Cpanic=unwind
+
+// Make sure that we don't emit an error message mentioning internal lang items.
+
+#![no_std]
+#![no_main]
+
+#[panic_handler]
+fn handler(_info: &core::panic::PanicInfo<'_>) -> ! {
+    loop {}
+}
+
+fn main() {}
diff --git a/tests/ui/no_std/no-std-unwind-binary.stderr b/tests/ui/no_std/no-std-unwind-binary.stderr
new file mode 100644
index 00000000000..a3b54fe33ab
--- /dev/null
+++ b/tests/ui/no_std/no-std-unwind-binary.stderr
@@ -0,0 +1,7 @@
+error: unwinding panics are not supported without std
+   |
+   = help: using nightly cargo, use -Zbuild-std with panic="abort" to avoid unwinding
+   = note: since the core library is usually precompiled with panic="unwind", rebuilding your crate with panic="abort" may not be enough to fix the problem
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/nullable-pointer-iotareduction.rs b/tests/ui/nullable-pointer-iotareduction.rs
index d345fec8118..3f3a962664e 100644
--- a/tests/ui/nullable-pointer-iotareduction.rs
+++ b/tests/ui/nullable-pointer-iotareduction.rs
@@ -8,7 +8,7 @@
 // trying to get assert failure messages that at least identify which case
 // failed.
 
-enum E<T> { Thing(isize, T), #[allow(unused_tuple_struct_fields)] Nothing((), ((), ()), [i8; 0]) }
+enum E<T> { Thing(isize, T), #[allow(dead_code)] Nothing((), ((), ()), [i8; 0]) }
 impl<T> E<T> {
     fn is_none(&self) -> bool {
         match *self {
diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-6.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-6.rs
deleted file mode 100644
index f75e779ed15..00000000000
--- a/tests/ui/numbers-arithmetic/overflowing-rsh-6.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// build-fail
-// compile-flags: -C debug-assertions
-
-#![deny(arithmetic_overflow)]
-
-fn main() {
-    let _n = 1i64 >> [64][0];
-    //~^ ERROR: this arithmetic operation will overflow
-}
diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-6.stderr b/tests/ui/numbers-arithmetic/overflowing-rsh-6.stderr
deleted file mode 100644
index 005f7378226..00000000000
--- a/tests/ui/numbers-arithmetic/overflowing-rsh-6.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: this arithmetic operation will overflow
-  --> $DIR/overflowing-rsh-6.rs:7:14
-   |
-LL |     let _n = 1i64 >> [64][0];
-   |              ^^^^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow
-   |
-note: the lint level is defined here
-  --> $DIR/overflowing-rsh-6.rs:4:9
-   |
-LL | #![deny(arithmetic_overflow)]
-   |         ^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.rs b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.rs
index 51be999a632..345c8a25f79 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.rs
+++ b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.rs
@@ -15,6 +15,7 @@ fn is_static<T>(_: T) where T: 'static { }
 // code forces us into a conservative, hacky path.
 fn bar(x: &str) -> &dyn Foo<Item = dyn Bar> { &() }
 //~^ ERROR please supply an explicit bound
+//~| ERROR `(): Foo<'_>` is not satisfied
 
 fn main() {
     let s = format!("foo");
diff --git a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr
index 688f8af0822..d227c8778fe 100644
--- a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr
+++ b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr
@@ -4,6 +4,20 @@ error[E0228]: the lifetime bound for this object type cannot be deduced from con
 LL | fn bar(x: &str) -> &dyn Foo<Item = dyn Bar> { &() }
    |                                    ^^^^^^^
 
-error: aborting due to 1 previous error
+error[E0277]: the trait bound `(): Foo<'_>` is not satisfied
+  --> $DIR/object-lifetime-default-dyn-binding-nonstatic3.rs:16:47
+   |
+LL | fn bar(x: &str) -> &dyn Foo<Item = dyn Bar> { &() }
+   |                                               ^^^ the trait `Foo<'_>` is not implemented for `()`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/object-lifetime-default-dyn-binding-nonstatic3.rs:4:1
+   |
+LL | trait Foo<'a> {
+   | ^^^^^^^^^^^^^
+   = note: required for the cast from `&()` to `&dyn Foo<'_, Item = dyn Bar>`
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0228`.
+Some errors have detailed explanations: E0228, E0277.
+For more information about an error, try `rustc --explain E0228`.
diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.fixed b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.fixed
new file mode 100644
index 00000000000..e95b982966d
--- /dev/null
+++ b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.fixed
@@ -0,0 +1,9 @@
+// run-rustfix
+#![deny(bare_trait_objects)]
+fn ord_prefer_dot(s: String) -> impl Ord {
+    //~^ ERROR the trait `Ord` cannot be made into an object
+    (s.starts_with("."), s)
+}
+fn main() {
+    let _ = ord_prefer_dot(String::new());
+}
diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs
new file mode 100644
index 00000000000..fdf7e0a77aa
--- /dev/null
+++ b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs
@@ -0,0 +1,9 @@
+// run-rustfix
+#![deny(bare_trait_objects)]
+fn ord_prefer_dot(s: String) -> Ord {
+    //~^ ERROR the trait `Ord` cannot be made into an object
+    (s.starts_with("."), s)
+}
+fn main() {
+    let _ = ord_prefer_dot(String::new());
+}
diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.stderr b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.stderr
new file mode 100644
index 00000000000..2c499d240ab
--- /dev/null
+++ b/tests/ui/object-safety/bare-trait-dont-suggest-dyn.stderr
@@ -0,0 +1,21 @@
+error[E0038]: the trait `Ord` cannot be made into an object
+  --> $DIR/bare-trait-dont-suggest-dyn.rs:3:33
+   |
+LL | fn ord_prefer_dot(s: String) -> Ord {
+   |                                 ^^^ `Ord` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $SRC_DIR/core/src/cmp.rs:LL:COL
+   |
+   = note: the trait cannot be made into an object because it uses `Self` as a type parameter
+  ::: $SRC_DIR/core/src/cmp.rs:LL:COL
+   |
+   = note: the trait cannot be made into an object because it uses `Self` as a type parameter
+help: consider using an opaque type instead
+   |
+LL | fn ord_prefer_dot(s: String) -> impl Ord {
+   |                                 ++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.rs b/tests/ui/object-safety/object-safety-supertrait-mentions-Self.rs
index 2445b33c814..d96c7ba72a3 100644
--- a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.rs
+++ b/tests/ui/object-safety/object-safety-supertrait-mentions-Self.rs
@@ -6,6 +6,7 @@ trait Bar<T> {
 }
 
 trait Baz : Bar<Self> {
+    //~^ ERROR the size for values of type `Self` cannot be known
 }
 
 fn make_bar<T:Bar<u32>>(t: &T) -> &dyn Bar<u32> {
diff --git a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr b/tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr
index 08df069275a..22adc19c802 100644
--- a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr
+++ b/tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr
@@ -1,5 +1,5 @@
 error[E0038]: the trait `Baz` cannot be made into an object
-  --> $DIR/object-safety-supertrait-mentions-Self.rs:15:31
+  --> $DIR/object-safety-supertrait-mentions-Self.rs:16:31
    |
 LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
    |                               ^^^^^^^ `Baz` cannot be made into an object
@@ -11,7 +11,32 @@ LL | trait Baz : Bar<Self> {
    |       ---   ^^^^^^^^^ ...because it uses `Self` as a type parameter
    |       |
    |       this trait cannot be made into an object...
+help: consider using an opaque type instead
+   |
+LL | fn make_baz<T:Baz>(t: &T) -> &impl Baz {
+   |                               ~~~~
+
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+  --> $DIR/object-safety-supertrait-mentions-Self.rs:8:13
+   |
+LL | trait Baz : Bar<Self> {
+   |             ^^^^^^^^^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `Bar`
+  --> $DIR/object-safety-supertrait-mentions-Self.rs:4:11
+   |
+LL | trait Bar<T> {
+   |           ^ required by this bound in `Bar`
+help: consider further restricting `Self`
+   |
+LL | trait Baz : Bar<Self> + Sized {
+   |                       +++++++
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL | trait Bar<T: ?Sized> {
+   |            ++++++++
 
-error: aborting due to 1 previous error
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0038`.
+Some errors have detailed explanations: E0038, E0277.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/offset-of/offset-of-arg-count.rs b/tests/ui/offset-of/offset-of-arg-count.rs
index 31de45bc756..7b92698c25e 100644
--- a/tests/ui/offset-of/offset-of-arg-count.rs
+++ b/tests/ui/offset-of/offset-of-arg-count.rs
@@ -8,10 +8,10 @@ fn main() {
     offset_of!(Container, field, too many arguments); //~ ERROR no rules expected the token `too`
     offset_of!(S, f); // compiles fine
     offset_of!(S, f,); // also compiles fine
-    offset_of!(S, f.); //~ ERROR unexpected end of macro invocation
-    offset_of!(S, f.,); //~ ERROR expected identifier
-    offset_of!(S, f..); //~ ERROR no rules expected the token
-    offset_of!(S, f..,); //~ ERROR no rules expected the token
+    offset_of!(S, f.); //~ ERROR unexpected token: `)`
+    offset_of!(S, f.,); //~ ERROR unexpected token: `,`
+    offset_of!(S, f..); //~ ERROR offset_of expects dot-separated field and variant names
+    offset_of!(S, f..,); //~ ERROR offset_of expects dot-separated field and variant names
     offset_of!(Lt<'static>, bar); // issue #111657
     offset_of!(Lt<'_>, bar); // issue #111678
 }
diff --git a/tests/ui/offset-of/offset-of-arg-count.stderr b/tests/ui/offset-of/offset-of-arg-count.stderr
index 4275a89545f..af0d42de30d 100644
--- a/tests/ui/offset-of/offset-of-arg-count.stderr
+++ b/tests/ui/offset-of/offset-of-arg-count.stderr
@@ -13,7 +13,7 @@ error: unexpected end of macro invocation
 LL |     offset_of!(NotEnoughArgumentsWithAComma, );
    |                                             ^ missing tokens in macro arguments
    |
-note: while trying to match meta-variable `$fields:tt`
+note: while trying to match meta-variable `$fields:expr`
   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
 
 error: no rules expected the token `too`
@@ -24,36 +24,29 @@ LL |     offset_of!(Container, field, too many arguments);
    |
    = note: while trying to match sequence end
 
-error: unexpected end of macro invocation
+error: unexpected token: `)`
   --> $DIR/offset-of-arg-count.rs:11:21
    |
 LL |     offset_of!(S, f.);
-   |                     ^ missing tokens in macro arguments
-   |
-note: while trying to match meta-variable `$fields:tt`
-  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+   |                     ^
 
-error: expected identifier, found `,`
+error: unexpected token: `,`
   --> $DIR/offset-of-arg-count.rs:12:21
    |
 LL |     offset_of!(S, f.,);
-   |                     ^ expected identifier
+   |                     ^
 
-error: no rules expected the token `..`
-  --> $DIR/offset-of-arg-count.rs:13:20
+error: offset_of expects dot-separated field and variant names
+  --> $DIR/offset-of-arg-count.rs:13:19
    |
 LL |     offset_of!(S, f..);
-   |                    ^^ no rules expected this token in macro call
-   |
-   = note: while trying to match sequence start
+   |                   ^^^
 
-error: no rules expected the token `..`
-  --> $DIR/offset-of-arg-count.rs:14:20
+error: offset_of expects dot-separated field and variant names
+  --> $DIR/offset-of-arg-count.rs:14:19
    |
 LL |     offset_of!(S, f..,);
-   |                    ^^ no rules expected this token in macro call
-   |
-   = note: while trying to match sequence start
+   |                   ^^^
 
 error: aborting due to 7 previous errors
 
diff --git a/tests/ui/offset-of/offset-of-builtin.rs b/tests/ui/offset-of/offset-of-builtin.rs
index 1be9899887b..6664c10f905 100644
--- a/tests/ui/offset-of/offset-of-builtin.rs
+++ b/tests/ui/offset-of/offset-of-builtin.rs
@@ -8,37 +8,25 @@ fn main() {
     builtin # offset_of(NotEnoughArguments); //~ ERROR expected one of
 }
 fn t1() {
-    // Already errored upon at the macro level. Yielding an error would require
-    // extra effort.
-    builtin # offset_of(NotEnoughArgumentsWithAComma, );
+    builtin # offset_of(NotEnoughArgumentsWithAComma, ); //~ ERROR expected expression
 }
 fn t2() {
-    builtin # offset_of(Container, field, too many arguments); //~ ERROR expected identifier, found
-    //~| ERROR found `,`
-    //~| ERROR found `many`
-    //~| ERROR found `arguments`
+    builtin # offset_of(S, f, too many arguments); //~ ERROR expected `)`, found `too`
 }
 fn t3() {
     builtin # offset_of(S, f); // compiles fine
 }
 fn t4() {
-    // Already errored upon at the macro level. Yielding an error would require
-    // extra effort.
-    builtin # offset_of(S, f);
+    builtin # offset_of(S, f.); //~ ERROR unexpected token
 }
 fn t5() {
-    builtin # offset_of(S, f.); //~ ERROR expected identifier
+    builtin # offset_of(S, f.,); //~ ERROR unexpected token
 }
 fn t6() {
-    builtin # offset_of(S, f.,); //~ ERROR expected identifier
+    builtin # offset_of(S, f..); //~ ERROR offset_of expects dot-separated field and variant names
 }
 fn t7() {
-    builtin # offset_of(S, f..); //~ ERROR expected one of
-}
-fn t8() {
-    // Already errored upon at the macro level. Yielding an error would require
-    // extra effort.
-    builtin # offset_of(S, f..,);
+    builtin # offset_of(S, f..,); //~ ERROR offset_of expects dot-separated field and variant names
 }
 
 struct S { f: u8, }
diff --git a/tests/ui/offset-of/offset-of-builtin.stderr b/tests/ui/offset-of/offset-of-builtin.stderr
index 1a1f33cc613..5917ee29363 100644
--- a/tests/ui/offset-of/offset-of-builtin.stderr
+++ b/tests/ui/offset-of/offset-of-builtin.stderr
@@ -4,62 +4,43 @@ error: expected one of `!`, `(`, `+`, `,`, `::`, or `<`, found `)`
 LL |     builtin # offset_of(NotEnoughArguments);
    |                                           ^ expected one of `!`, `(`, `+`, `,`, `::`, or `<`
 
-error: expected identifier, found `,`
-  --> $DIR/offset-of-builtin.rs:16:41
+error: expected expression, found `)`
+  --> $DIR/offset-of-builtin.rs:11:55
    |
-LL |     builtin # offset_of(Container, field, too many arguments);
-   |                                         ^
-   |                                         |
-   |                                         expected identifier
-   |                                         help: remove this comma
+LL |     builtin # offset_of(NotEnoughArgumentsWithAComma, );
+   |                                                       ^ expected expression
 
-error: expected one of `)` or `.`, found `,`
-  --> $DIR/offset-of-builtin.rs:16:41
+error: expected `)`, found `too`
+  --> $DIR/offset-of-builtin.rs:14:31
    |
-LL |     builtin # offset_of(Container, field, too many arguments);
-   |                                         ^
-   |                                         |
-   |                                         expected one of `)` or `.`
-   |                                         help: missing `.`
-
-error: expected one of `)` or `.`, found `many`
-  --> $DIR/offset-of-builtin.rs:16:47
-   |
-LL |     builtin # offset_of(Container, field, too many arguments);
-   |                                              -^^^^ expected one of `)` or `.`
-   |                                              |
-   |                                              help: missing `.`
-
-error: expected one of `)` or `.`, found `arguments`
-  --> $DIR/offset-of-builtin.rs:16:52
+LL |     builtin # offset_of(S, f, too many arguments);
+   |                               ^^^ expected `)`
    |
-LL |     builtin # offset_of(Container, field, too many arguments);
-   |                                                   -^^^^^^^^^ expected one of `)` or `.`
-   |                                                   |
-   |                                                   help: missing `.`
+   = note: unexpected third argument to offset_of
 
-error: expected identifier, found `)`
-  --> $DIR/offset-of-builtin.rs:30:30
+error: unexpected token: `)`
+  --> $DIR/offset-of-builtin.rs:20:30
    |
 LL |     builtin # offset_of(S, f.);
-   |                              ^ expected identifier
+   |                              ^
 
-error: expected identifier, found `,`
-  --> $DIR/offset-of-builtin.rs:33:30
+error: unexpected token: `,`
+  --> $DIR/offset-of-builtin.rs:23:30
    |
 LL |     builtin # offset_of(S, f.,);
-   |                              ^ expected identifier
+   |                              ^
 
-error: expected one of `)` or `.`, found `..`
-  --> $DIR/offset-of-builtin.rs:36:29
+error: offset_of expects dot-separated field and variant names
+  --> $DIR/offset-of-builtin.rs:26:28
    |
 LL |     builtin # offset_of(S, f..);
-   |                             ^^ expected one of `)` or `.`
-   |
-help: if you meant to bind the contents of the rest of the array pattern into `f`, use `@`
+   |                            ^^^
+
+error: offset_of expects dot-separated field and variant names
+  --> $DIR/offset-of-builtin.rs:29:28
    |
-LL |     builtin # offset_of(S, f @ ..);
-   |                              +
+LL |     builtin # offset_of(S, f..,);
+   |                            ^^^
 
-error: aborting due to 8 previous errors
+error: aborting due to 7 previous errors
 
diff --git a/tests/ui/offset-of/offset-of-self.rs b/tests/ui/offset-of/offset-of-self.rs
index dbeef0e74dc..04dcaf7c0a6 100644
--- a/tests/ui/offset-of/offset-of-self.rs
+++ b/tests/ui/offset-of/offset-of-self.rs
@@ -17,9 +17,8 @@ impl S {
         offset_of!(Self, v)
     }
     fn v_offs_wrong_syntax() {
-        offset_of!(Self, Self::v); //~ ERROR no rules expected the token `::`
-        offset_of!(S, Self); //~ ERROR expected identifier, found keyword `Self`
-        //~| no field `Self` on type `S`
+        offset_of!(Self, Self::v); //~ offset_of expects dot-separated field and variant names
+        offset_of!(S, Self); //~ no field `Self` on type `S`
     }
     fn offs_in_c() -> usize {
         offset_of!(C<Self>, w)
@@ -51,8 +50,6 @@ fn main() {
     offset_of!(self::S, v);
     offset_of!(Self, v); //~ ERROR cannot find type `Self` in this scope
 
-    offset_of!(S, self); //~ ERROR expected identifier, found keyword `self`
-    //~| no field `self` on type `S`
-    offset_of!(S, v.self); //~ ERROR expected identifier, found keyword `self`
-    //~| no field `self` on type `u8`
+    offset_of!(S, self); //~ no field `self` on type `S`
+    offset_of!(S, v.self); //~ no field `self` on type `u8`
 }
diff --git a/tests/ui/offset-of/offset-of-self.stderr b/tests/ui/offset-of/offset-of-self.stderr
index 2dc17189a70..7c7576e066b 100644
--- a/tests/ui/offset-of/offset-of-self.stderr
+++ b/tests/ui/offset-of/offset-of-self.stderr
@@ -1,31 +1,11 @@
-error: no rules expected the token `::`
-  --> $DIR/offset-of-self.rs:20:30
+error: offset_of expects dot-separated field and variant names
+  --> $DIR/offset-of-self.rs:20:26
    |
 LL |         offset_of!(Self, Self::v);
-   |                              ^^ no rules expected this token in macro call
-   |
-   = note: while trying to match sequence start
-
-error: expected identifier, found keyword `Self`
-  --> $DIR/offset-of-self.rs:21:23
-   |
-LL |         offset_of!(S, Self);
-   |                       ^^^^ expected identifier, found keyword
-
-error: expected identifier, found keyword `self`
-  --> $DIR/offset-of-self.rs:54:19
-   |
-LL |     offset_of!(S, self);
-   |                   ^^^^ expected identifier, found keyword
-
-error: expected identifier, found keyword `self`
-  --> $DIR/offset-of-self.rs:56:21
-   |
-LL |     offset_of!(S, v.self);
-   |                     ^^^^ expected identifier, found keyword
+   |                          ^^^^^^^
 
 error[E0412]: cannot find type `S` in module `self`
-  --> $DIR/offset-of-self.rs:35:26
+  --> $DIR/offset-of-self.rs:34:26
    |
 LL |         offset_of!(self::S, v);
    |                          ^ not found in `self`
@@ -41,7 +21,7 @@ LL +         offset_of!(S, v);
    |
 
 error[E0411]: cannot find type `Self` in this scope
-  --> $DIR/offset-of-self.rs:52:16
+  --> $DIR/offset-of-self.rs:51:16
    |
 LL | fn main() {
    |    ---- `Self` not allowed in a function
@@ -58,13 +38,13 @@ LL |         offset_of!(S, Self);
    = note: available fields are: `v`, `w`
 
 error[E0616]: field `v` of struct `T` is private
-  --> $DIR/offset-of-self.rs:41:30
+  --> $DIR/offset-of-self.rs:40:30
    |
 LL |             offset_of!(Self, v)
    |                              ^ private field
 
 error[E0609]: no field `self` on type `S`
-  --> $DIR/offset-of-self.rs:54:19
+  --> $DIR/offset-of-self.rs:53:19
    |
 LL |     offset_of!(S, self);
    |                   ^^^^
@@ -72,12 +52,12 @@ LL |     offset_of!(S, self);
    = note: available fields are: `v`, `w`
 
 error[E0609]: no field `self` on type `u8`
-  --> $DIR/offset-of-self.rs:56:21
+  --> $DIR/offset-of-self.rs:54:21
    |
 LL |     offset_of!(S, v.self);
    |                     ^^^^
 
-error: aborting due to 10 previous errors
+error: aborting due to 7 previous errors
 
 Some errors have detailed explanations: E0411, E0412, E0609, E0616.
 For more information about an error, try `rustc --explain E0411`.
diff --git a/tests/ui/offset-of/offset-of-tuple-nested.rs b/tests/ui/offset-of/offset-of-tuple-nested.rs
index 00fbb6bf8f4..59b02e3c5c4 100644
--- a/tests/ui/offset-of/offset-of-tuple-nested.rs
+++ b/tests/ui/offset-of/offset-of-tuple-nested.rs
@@ -3,7 +3,6 @@
 // similar to why `offset-of-unsized.rs` is also build-pass
 
 #![feature(offset_of)]
-#![feature(builtin_syntax)]
 
 use std::mem::offset_of;
 
@@ -17,13 +16,13 @@ fn main() {
     // Complex case: do all combinations of spacings because the spacing determines what gets
     // sent to the lexer.
     println!("{}", offset_of!(ComplexTup, 0.1.1.1));
-    println!("{}", builtin # offset_of(ComplexTup, 0. 1.1.1));
+    println!("{}", offset_of!(ComplexTup, 0. 1.1.1));
     println!("{}", offset_of!(ComplexTup, 0 . 1.1.1));
     println!("{}", offset_of!(ComplexTup, 0 .1.1.1));
     println!("{}", offset_of!(ComplexTup, 0.1 .1.1));
     println!("{}", offset_of!(ComplexTup, 0.1 . 1.1));
     println!("{}", offset_of!(ComplexTup, 0.1. 1.1));
-    println!("{}", builtin # offset_of(ComplexTup, 0.1.1. 1));
+    println!("{}", offset_of!(ComplexTup, 0.1.1. 1));
     println!("{}", offset_of!(ComplexTup, 0.1.1 . 1));
     println!("{}", offset_of!(ComplexTup, 0.1.1 .1));
 
diff --git a/tests/ui/offset-of/offset-of-tuple.rs b/tests/ui/offset-of/offset-of-tuple.rs
index e31b037ee3e..b6fc1e32229 100644
--- a/tests/ui/offset-of/offset-of-tuple.rs
+++ b/tests/ui/offset-of/offset-of-tuple.rs
@@ -10,9 +10,9 @@ fn main() {
     offset_of!((u8, u8), 1_u8); //~ ERROR no field `1_`
     //~| ERROR suffixes on a tuple index
     offset_of!((u8, u8), +1); //~ ERROR no rules expected
-    offset_of!((u8, u8), -1); //~ ERROR no rules expected
-    offset_of!((u8, u8), 1.); //~ ERROR expected identifier, found `)`
-    offset_of!((u8, u8), 1 .); //~ ERROR unexpected end of macro
+    offset_of!((u8, u8), -1); //~ ERROR offset_of expects dot-separated field and variant names
+    offset_of!((u8, u8), 1.); //~ ERROR offset_of expects dot-separated field and variant names
+    offset_of!((u8, u8), 1 .); //~ unexpected token: `)`
     builtin # offset_of((u8, u8), 1e2); //~ ERROR no field `1e2`
     builtin # offset_of((u8, u8), _0); //~ ERROR no field `_0`
     builtin # offset_of((u8, u8), 01); //~ ERROR no field `01`
@@ -20,12 +20,12 @@ fn main() {
     //~| ERROR suffixes on a tuple index
     // We need to put these into curly braces, otherwise only one of the
     // errors will be emitted and the others suppressed.
-    { builtin # offset_of((u8, u8), +1) }; //~ ERROR expected identifier, found `+`
-    { builtin # offset_of((u8, u8), 1.) }; //~ ERROR expected identifier, found `)`
-    { builtin # offset_of((u8, u8), 1 .) }; //~ ERROR expected identifier, found `)`
+    { builtin # offset_of((u8, u8), +1) }; //~ ERROR leading `+` is not supported
+    { builtin # offset_of((u8, u8), 1.) }; //~ ERROR offset_of expects dot-separated field and variant names
+    { builtin # offset_of((u8, u8), 1 .) }; //~ ERROR unexpected token: `)`
 }
 
-type ComplexTup = ((u8, (u8, u8)), u8);
+type ComplexTup = (((u8, u8), u8), u8);
 
 fn nested() {
     offset_of!(((u8, u16), (u32, u16, u8)), 0.2); //~ ERROR no field `2`
@@ -33,22 +33,22 @@ fn nested() {
     offset_of!(((u8, u16), (u32, u16, u8)), 1.2.0); //~ ERROR no field `0`
 
     // All combinations of spaces (this sends different tokens to the parser)
-    offset_of!(ComplexTup, 0.0.1.); //~ ERROR expected identifier
-    offset_of!(ComplexTup, 0 .0.1.); //~ ERROR unexpected end of macro
-    offset_of!(ComplexTup, 0 . 0.1.); //~ ERROR unexpected end of macro
-    offset_of!(ComplexTup, 0. 0.1.); //~ ERROR no rules expected
-    offset_of!(ComplexTup, 0.0 .1.); //~ ERROR expected identifier, found `)`
-    offset_of!(ComplexTup, 0.0 . 1.); //~ ERROR expected identifier, found `)`
-    offset_of!(ComplexTup, 0.0. 1.); //~ ERROR expected identifier, found `)`
+    offset_of!(ComplexTup, 0.0.1.); //~ ERROR unexpected token: `)`
+    offset_of!(ComplexTup, 0 .0.1.); //~ ERROR unexpected token: `)`
+    offset_of!(ComplexTup, 0 . 0.1.); //~ ERROR unexpected token: `)`
+    offset_of!(ComplexTup, 0. 0.1.); //~ ERROR unexpected token: `)`
+    offset_of!(ComplexTup, 0.0 .1.); //~ ERROR unexpected token: `)`
+    offset_of!(ComplexTup, 0.0 . 1.); //~ ERROR unexpected token: `)`
+    offset_of!(ComplexTup, 0.0. 1.); //~ ERROR unexpected token: `)`
 
     // Test for builtin too to ensure that the builtin syntax can also handle these cases
     // We need to put these into curly braces, otherwise only one of the
     // errors will be emitted and the others suppressed.
-    { builtin # offset_of(ComplexTup, 0.0.1.) }; //~ ERROR expected identifier, found `)`
-    { builtin # offset_of(ComplexTup, 0 .0.1.) }; //~ ERROR expected identifier, found `)`
-    { builtin # offset_of(ComplexTup, 0 . 0.1.) }; //~ ERROR expected identifier, found `)`
-    { builtin # offset_of(ComplexTup, 0. 0.1.) }; //~ ERROR expected identifier, found `)`
-    { builtin # offset_of(ComplexTup, 0.0 .1.) }; //~ ERROR expected identifier, found `)`
-    { builtin # offset_of(ComplexTup, 0.0 . 1.) }; //~ ERROR expected identifier, found `)`
-    { builtin # offset_of(ComplexTup, 0.0. 1.) }; //~ ERROR expected identifier, found `)`
+    { builtin # offset_of(ComplexTup, 0.0.1.) }; //~ ERROR unexpected token: `)`
+    { builtin # offset_of(ComplexTup, 0 .0.1.) }; //~ ERROR unexpected token: `)`
+    { builtin # offset_of(ComplexTup, 0 . 0.1.) }; //~ ERROR unexpected token: `)`
+    { builtin # offset_of(ComplexTup, 0. 0.1.) }; //~ ERROR unexpected token: `)`
+    { builtin # offset_of(ComplexTup, 0.0 .1.) }; //~ ERROR unexpected token: `)`
+    { builtin # offset_of(ComplexTup, 0.0 . 1.) }; //~ ERROR unexpected token: `)`
+    { builtin # offset_of(ComplexTup, 0.0. 1.) }; //~ ERROR unexpected token: `)`
 }
diff --git a/tests/ui/offset-of/offset-of-tuple.stderr b/tests/ui/offset-of/offset-of-tuple.stderr
index ed952345806..e9aa495becd 100644
--- a/tests/ui/offset-of/offset-of-tuple.stderr
+++ b/tests/ui/offset-of/offset-of-tuple.stderr
@@ -4,65 +4,71 @@ error: suffixes on a tuple index are invalid
 LL |     builtin # offset_of((u8, u8), 1_u8);
    |                                   ^^^^ invalid suffix `u8`
 
-error: expected identifier, found `+`
+error: leading `+` is not supported
   --> $DIR/offset-of-tuple.rs:23:37
    |
 LL |     { builtin # offset_of((u8, u8), +1) };
-   |                                     ^ expected identifier
+   |                                     ^ unexpected `+`
+   |
+help: try removing the `+`
+   |
+LL -     { builtin # offset_of((u8, u8), +1) };
+LL +     { builtin # offset_of((u8, u8), 1) };
+   |
 
-error: expected identifier, found `)`
-  --> $DIR/offset-of-tuple.rs:24:39
+error: offset_of expects dot-separated field and variant names
+  --> $DIR/offset-of-tuple.rs:24:38
    |
 LL |     { builtin # offset_of((u8, u8), 1.) };
-   |                                       ^ expected identifier
+   |                                      ^
 
-error: expected identifier, found `)`
+error: unexpected token: `)`
   --> $DIR/offset-of-tuple.rs:25:40
    |
 LL |     { builtin # offset_of((u8, u8), 1 .) };
-   |                                        ^ expected identifier
+   |                                        ^
 
-error: expected identifier, found `)`
+error: unexpected token: `)`
   --> $DIR/offset-of-tuple.rs:47:45
    |
 LL |     { builtin # offset_of(ComplexTup, 0.0.1.) };
-   |                                             ^ expected identifier
+   |                                             ^
 
-error: expected identifier, found `)`
+error: unexpected token: `)`
   --> $DIR/offset-of-tuple.rs:48:46
    |
 LL |     { builtin # offset_of(ComplexTup, 0 .0.1.) };
-   |                                              ^ expected identifier
+   |                                              ^
 
-error: expected identifier, found `)`
+error: unexpected token: `)`
   --> $DIR/offset-of-tuple.rs:49:47
    |
 LL |     { builtin # offset_of(ComplexTup, 0 . 0.1.) };
-   |                                               ^ expected identifier
+   |                                               ^
 
-error: expected identifier, found `)`
+error: unexpected token: `)`
   --> $DIR/offset-of-tuple.rs:50:46
    |
 LL |     { builtin # offset_of(ComplexTup, 0. 0.1.) };
-   |                                              ^ expected identifier
+   |                                              ^
 
-error: expected identifier, found `)`
+error: unexpected token: `)`
   --> $DIR/offset-of-tuple.rs:51:46
    |
 LL |     { builtin # offset_of(ComplexTup, 0.0 .1.) };
-   |                                              ^ expected identifier
+   |                                              ^
 
-error: expected identifier, found `)`
+error: unexpected token: `)`
   --> $DIR/offset-of-tuple.rs:52:47
    |
 LL |     { builtin # offset_of(ComplexTup, 0.0 . 1.) };
-   |                                               ^ expected identifier
+   |                                               ^
 
-error: expected identifier, found `)`
+error: unexpected token: `)`
   --> $DIR/offset-of-tuple.rs:53:46
    |
 LL |     { builtin # offset_of(ComplexTup, 0.0. 1.) };
-   |                                              ^ expected identifier
+   |                                              ^
 
 error: suffixes on a tuple index are invalid
   --> $DIR/offset-of-tuple.rs:10:26
@@ -70,96 +76,74 @@ error: suffixes on a tuple index are invalid
 LL |     offset_of!((u8, u8), 1_u8);
    |                          ^^^^ invalid suffix `u8`
 
-error: no rules expected the token `1`
-  --> $DIR/offset-of-tuple.rs:12:27
+error: no rules expected the token `+`
+  --> $DIR/offset-of-tuple.rs:12:26
    |
 LL |     offset_of!((u8, u8), +1);
-   |                           ^ no rules expected this token in macro call
+   |                          ^ no rules expected this token in macro call
    |
-   = note: while trying to match sequence start
+note: while trying to match meta-variable `$fields:expr`
+  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
 
-error: no rules expected the token `1`
-  --> $DIR/offset-of-tuple.rs:13:27
+error: offset_of expects dot-separated field and variant names
+  --> $DIR/offset-of-tuple.rs:13:26
    |
 LL |     offset_of!((u8, u8), -1);
-   |                           ^ no rules expected this token in macro call
-   |
-   = note: while trying to match sequence start
+   |                          ^^
 
-error: expected identifier, found `)`
-  --> $DIR/offset-of-tuple.rs:14:5
+error: offset_of expects dot-separated field and variant names
+  --> $DIR/offset-of-tuple.rs:14:27
    |
 LL |     offset_of!((u8, u8), 1.);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ expected identifier
-   |
-   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
+   |                           ^
 
-error: unexpected end of macro invocation
+error: unexpected token: `)`
   --> $DIR/offset-of-tuple.rs:15:29
    |
 LL |     offset_of!((u8, u8), 1 .);
-   |                             ^ missing tokens in macro arguments
-   |
-note: while trying to match meta-variable `$fields:tt`
-  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+   |                             ^
 
-error: expected identifier, found `)`
-  --> $DIR/offset-of-tuple.rs:36:5
+error: unexpected token: `)`
+  --> $DIR/offset-of-tuple.rs:36:34
    |
 LL |     offset_of!(ComplexTup, 0.0.1.);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected identifier
-   |
-   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
+   |                                  ^
 
-error: unexpected end of macro invocation
+error: unexpected token: `)`
   --> $DIR/offset-of-tuple.rs:37:35
    |
 LL |     offset_of!(ComplexTup, 0 .0.1.);
-   |                                   ^ missing tokens in macro arguments
-   |
-note: while trying to match meta-variable `$fields:tt`
-  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+   |                                   ^
 
-error: unexpected end of macro invocation
+error: unexpected token: `)`
   --> $DIR/offset-of-tuple.rs:38:36
    |
 LL |     offset_of!(ComplexTup, 0 . 0.1.);
-   |                                    ^ missing tokens in macro arguments
-   |
-note: while trying to match meta-variable `$fields:tt`
-  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+   |                                    ^
 
-error: no rules expected the token `0.1`
-  --> $DIR/offset-of-tuple.rs:39:31
+error: unexpected token: `)`
+  --> $DIR/offset-of-tuple.rs:39:35
    |
 LL |     offset_of!(ComplexTup, 0. 0.1.);
-   |                               ^^^ no rules expected this token in macro call
-   |
-   = note: while trying to match sequence start
+   |                                   ^
 
-error: expected identifier, found `)`
-  --> $DIR/offset-of-tuple.rs:40:5
+error: unexpected token: `)`
+  --> $DIR/offset-of-tuple.rs:40:35
    |
 LL |     offset_of!(ComplexTup, 0.0 .1.);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected identifier
-   |
-   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
+   |                                   ^
 
-error: expected identifier, found `)`
-  --> $DIR/offset-of-tuple.rs:41:5
+error: unexpected token: `)`
+  --> $DIR/offset-of-tuple.rs:41:36
    |
 LL |     offset_of!(ComplexTup, 0.0 . 1.);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected identifier
-   |
-   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
+   |                                    ^
 
-error: expected identifier, found `)`
-  --> $DIR/offset-of-tuple.rs:42:5
+error: unexpected token: `)`
+  --> $DIR/offset-of-tuple.rs:42:35
    |
 LL |     offset_of!(ComplexTup, 0.0. 1.);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected identifier
-   |
-   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
+   |                                   ^
 
 error[E0609]: no field `_0` on type `(u8, u8)`
   --> $DIR/offset-of-tuple.rs:7:26
@@ -212,8 +196,16 @@ LL |     builtin # offset_of((u8, u8), 1_u8);
 error[E0609]: no field `2` on type `(u8, u16)`
   --> $DIR/offset-of-tuple.rs:31:47
    |
-LL |     offset_of!(((u8, u16), (u32, u16, u8)), 0.2);
-   |                                               ^
+LL |       offset_of!(((u8, u16), (u32, u16, u8)), 0.2);
+   |  _____------------------------------------------^-
+   | |     |
+   | |     in this macro invocation
+LL | |     offset_of!(((u8, u16), (u32, u16, u8)), 1.2);
+LL | |     offset_of!(((u8, u16), (u32, u16, u8)), 1.2.0);
+LL | |
+...  |
+   |
+   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0609]: no field `0` on type `u8`
   --> $DIR/offset-of-tuple.rs:33:49
diff --git a/tests/ui/optimization-fuel-0.rs b/tests/ui/optimization-fuel-0.rs
index 2643dbea1c4..77c727ad0f7 100644
--- a/tests/ui/optimization-fuel-0.rs
+++ b/tests/ui/optimization-fuel-0.rs
@@ -6,9 +6,9 @@ use std::mem::size_of;
 
 // compile-flags: -Z fuel=foo=0
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct S1(u8, u16, u8);
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct S2(u8, u16, u8);
 
 fn main() {
diff --git a/tests/ui/optimization-fuel-1.rs b/tests/ui/optimization-fuel-1.rs
index d5e2255d9f0..8b3d139201e 100644
--- a/tests/ui/optimization-fuel-1.rs
+++ b/tests/ui/optimization-fuel-1.rs
@@ -6,9 +6,9 @@ use std::mem::size_of;
 
 // compile-flags: -Z fuel=foo=1
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct S1(u8, u16, u8);
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct S2(u8, u16, u8);
 
 fn main() {
diff --git a/tests/ui/packed/issue-118537-field-offset-ice.rs b/tests/ui/packed/issue-118537-field-offset-ice.rs
index 657aec64003..679d9d754e3 100644
--- a/tests/ui/packed/issue-118537-field-offset-ice.rs
+++ b/tests/ui/packed/issue-118537-field-offset-ice.rs
@@ -3,7 +3,7 @@
 use std::mem;
 
 #[repr(packed(4))]
-struct Slice([u32]);
+struct Slice(#[allow(dead_code)] [u32]);
 
 #[repr(packed(2), C)]
 struct PackedSized {
diff --git a/tests/ui/packed/packed-struct-drop-aligned.rs b/tests/ui/packed/packed-struct-drop-aligned.rs
index 4fec72763a4..6c2907c86e9 100644
--- a/tests/ui/packed/packed-struct-drop-aligned.rs
+++ b/tests/ui/packed/packed-struct-drop-aligned.rs
@@ -24,7 +24,7 @@ impl<'a> Drop for Aligned<'a> {
 }
 
 #[repr(transparent)]
-struct NotCopy(#[allow(unused_tuple_struct_fields)] u8);
+struct NotCopy(#[allow(dead_code)] u8);
 
 #[repr(packed)]
 struct Packed<'a>(NotCopy, Aligned<'a>);
diff --git a/tests/ui/packed/packed-struct-optimized-enum.rs b/tests/ui/packed/packed-struct-optimized-enum.rs
index 5e1a1f518c5..c3540f7619b 100644
--- a/tests/ui/packed/packed-struct-optimized-enum.rs
+++ b/tests/ui/packed/packed-struct-optimized-enum.rs
@@ -1,6 +1,6 @@
 // run-pass
 #[repr(packed)]
-struct Packed<T: Copy>(#[allow(unused_tuple_struct_fields)] T);
+struct Packed<T: Copy>(#[allow(dead_code)] T);
 
 impl<T: Copy> Copy for Packed<T> {}
 impl<T: Copy> Clone for Packed<T> {
diff --git a/tests/ui/packed/packed-tuple-struct-layout.rs b/tests/ui/packed/packed-tuple-struct-layout.rs
index 931be5b9414..879553142da 100644
--- a/tests/ui/packed/packed-tuple-struct-layout.rs
+++ b/tests/ui/packed/packed-tuple-struct-layout.rs
@@ -2,11 +2,11 @@
 use std::mem;
 
 #[repr(packed)]
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct S4(u8,[u8; 3]);
 
 #[repr(packed)]
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct S5(u8,u32);
 
 pub fn main() {
diff --git a/tests/ui/panic-handler/weak-lang-item.rs b/tests/ui/panic-handler/weak-lang-item.rs
index 14a07a9ef1b..296a2c1514f 100644
--- a/tests/ui/panic-handler/weak-lang-item.rs
+++ b/tests/ui/panic-handler/weak-lang-item.rs
@@ -1,6 +1,6 @@
 // aux-build:weak-lang-items.rs
 // error-pattern: `#[panic_handler]` function required, but not found
-// error-pattern: language item required, but not found: `eh_personality`
+// 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
 
diff --git a/tests/ui/panic-handler/weak-lang-item.stderr b/tests/ui/panic-handler/weak-lang-item.stderr
index 202f3309d03..de351d2c3e4 100644
--- a/tests/ui/panic-handler/weak-lang-item.stderr
+++ b/tests/ui/panic-handler/weak-lang-item.stderr
@@ -12,10 +12,10 @@ LL | extern crate core as other_core;
 
 error: `#[panic_handler]` function required, but not found
 
-error: language item required, but not found: `eh_personality`
+error: unwinding panics are not supported without std
    |
-   = note: this can occur when a binary crate with `#![no_std]` is compiled for a target where `eh_personality` is defined in the standard library
-   = help: you may be able to compile for a target that doesn't need `eh_personality`, specify a target with `--target` or in `.cargo/config`
+   = help: using nightly cargo, use -Zbuild-std with panic="abort" to avoid unwinding
+   = note: since the core library is usually precompiled with panic="unwind", rebuilding your crate with panic="abort" may not be enough to fix the problem
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/parser/impl-item-type-no-body-semantic-fail.rs b/tests/ui/parser/impl-item-type-no-body-semantic-fail.rs
index 1291a021bef..5582e82d11d 100644
--- a/tests/ui/parser/impl-item-type-no-body-semantic-fail.rs
+++ b/tests/ui/parser/impl-item-type-no-body-semantic-fail.rs
@@ -17,4 +17,5 @@ impl X {
     type W where Self: Eq;
     //~^ ERROR associated type in `impl` without body
     //~| ERROR inherent associated types are unstable
+    //~| ERROR duplicate definitions
 }
diff --git a/tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr b/tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr
index 3856754e080..5bcbbb9deb7 100644
--- a/tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr
+++ b/tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr
@@ -78,6 +78,16 @@ LL |     type W where Self: Eq;
    = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
    = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable
 
-error: aborting due to 10 previous errors
+error[E0592]: duplicate definitions with name `W`
+  --> $DIR/impl-item-type-no-body-semantic-fail.rs:17:5
+   |
+LL |     type W: Ord where Self: Eq;
+   |     ------ other definition for `W`
+...
+LL |     type W where Self: Eq;
+   |     ^^^^^^ duplicate definitions for `W`
+
+error: aborting due to 11 previous errors
 
-For more information about this error, try `rustc --explain E0658`.
+Some errors have detailed explanations: E0592, E0658.
+For more information about an error, try `rustc --explain E0592`.
diff --git a/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr b/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr
index 2423a7526be..8e125864b8b 100644
--- a/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr
+++ b/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr
@@ -1,10 +1,10 @@
 error: missing condition for `if` expression
-  --> $DIR/issue-68091-unicode-ident-after-if.rs:3:14
+  --> $DIR/issue-68091-unicode-ident-after-if.rs:3:13
    |
 LL |         $($c)ö* {}
-   |              ^  - if this block is the condition of the `if` expression, then it must be followed by another block
-   |              |
-   |              expected condition here
+   |             ^   - if this block is the condition of the `if` expression, then it must be followed by another block
+   |             |
+   |             expected condition here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr b/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr
index 43047ff8802..15aa62e0810 100644
--- a/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr
+++ b/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr
@@ -1,8 +1,8 @@
 error: macro expansion ends with an incomplete expression: expected expression
-  --> $DIR/issue-68092-unicode-ident-after-incomplete-expr.rs:3:14
+  --> $DIR/issue-68092-unicode-ident-after-incomplete-expr.rs:3:13
    |
 LL |         $($c)ö*
-   |              ^ expected expression
+   |             ^ expected expression
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/issues/issue-70388-without-witness.fixed b/tests/ui/parser/issues/issue-70388-without-witness.fixed
index 8d981405ea1..58721495dcd 100644
--- a/tests/ui/parser/issues/issue-70388-without-witness.fixed
+++ b/tests/ui/parser/issues/issue-70388-without-witness.fixed
@@ -1,7 +1,7 @@
 // run-rustfix
 // This is for checking if we can apply suggestions as-is.
 
-pub struct Foo(#[allow(unused_tuple_struct_fields)] i32);
+pub struct Foo(#[allow(dead_code)] i32);
 
 fn main() {
     let Foo(..) = Foo(0); //~ ERROR unexpected `...`
diff --git a/tests/ui/parser/issues/issue-70388-without-witness.rs b/tests/ui/parser/issues/issue-70388-without-witness.rs
index bf36073083a..2e679db5464 100644
--- a/tests/ui/parser/issues/issue-70388-without-witness.rs
+++ b/tests/ui/parser/issues/issue-70388-without-witness.rs
@@ -1,7 +1,7 @@
 // run-rustfix
 // This is for checking if we can apply suggestions as-is.
 
-pub struct Foo(#[allow(unused_tuple_struct_fields)] i32);
+pub struct Foo(#[allow(dead_code)] i32);
 
 fn main() {
     let Foo(...) = Foo(0); //~ ERROR unexpected `...`
diff --git a/tests/ui/parser/issues/issue-73568-lifetime-after-mut.rs b/tests/ui/parser/issues/issue-73568-lifetime-after-mut.rs
index 5f731f8db77..cf754a6854e 100644
--- a/tests/ui/parser/issues/issue-73568-lifetime-after-mut.rs
+++ b/tests/ui/parser/issues/issue-73568-lifetime-after-mut.rs
@@ -16,4 +16,5 @@ fn y<'a>(y: &mut 'a + Send) {
     //~| ERROR at least one trait is required for an object type
     let z = y as &mut 'a + Send;
     //~^ ERROR expected value, found trait `Send`
+    //~| ERROR at least one trait is required for an object type
 }
diff --git a/tests/ui/parser/issues/issue-73568-lifetime-after-mut.stderr b/tests/ui/parser/issues/issue-73568-lifetime-after-mut.stderr
index 799bc16bd6a..652aeff5dd4 100644
--- a/tests/ui/parser/issues/issue-73568-lifetime-after-mut.stderr
+++ b/tests/ui/parser/issues/issue-73568-lifetime-after-mut.stderr
@@ -33,7 +33,13 @@ error[E0224]: at least one trait is required for an object type
 LL | fn y<'a>(y: &mut 'a + Send) {
    |                  ^^
 
-error: aborting due to 5 previous errors
+error[E0224]: at least one trait is required for an object type
+  --> $DIR/issue-73568-lifetime-after-mut.rs:17:23
+   |
+LL |     let z = y as &mut 'a + Send;
+   |                       ^^
+
+error: aborting due to 6 previous errors
 
 Some errors have detailed explanations: E0178, E0224, E0423.
 For more information about an error, try `rustc --explain E0178`.
diff --git a/tests/ui/parser/pat-recover-ranges.rs b/tests/ui/parser/pat-recover-ranges.rs
new file mode 100644
index 00000000000..65a6fc6fe21
--- /dev/null
+++ b/tests/ui/parser/pat-recover-ranges.rs
@@ -0,0 +1,19 @@
+fn main() {
+    match -1 {
+        0..=1 => (),
+        0..=(1) => (),
+        //~^ error: range pattern bounds cannot have parentheses
+        (-12)..=4 => (),
+        //~^ error: range pattern bounds cannot have parentheses
+        (0)..=(-4) => (),
+        //~^ error: range pattern bounds cannot have parentheses
+        //~| error: range pattern bounds cannot have parentheses
+    };
+}
+
+macro_rules! m {
+    ($pat:pat) => {};
+    (($s:literal)..($e:literal)) => {};
+}
+
+m!((7)..(7));
diff --git a/tests/ui/parser/pat-recover-ranges.stderr b/tests/ui/parser/pat-recover-ranges.stderr
new file mode 100644
index 00000000000..0d722b5aa95
--- /dev/null
+++ b/tests/ui/parser/pat-recover-ranges.stderr
@@ -0,0 +1,50 @@
+error: range pattern bounds cannot have parentheses
+  --> $DIR/pat-recover-ranges.rs:4:13
+   |
+LL |         0..=(1) => (),
+   |             ^ ^
+   |
+help: remove these parentheses
+   |
+LL -         0..=(1) => (),
+LL +         0..=1 => (),
+   |
+
+error: range pattern bounds cannot have parentheses
+  --> $DIR/pat-recover-ranges.rs:6:9
+   |
+LL |         (-12)..=4 => (),
+   |         ^   ^
+   |
+help: remove these parentheses
+   |
+LL -         (-12)..=4 => (),
+LL +         -12..=4 => (),
+   |
+
+error: range pattern bounds cannot have parentheses
+  --> $DIR/pat-recover-ranges.rs:8:9
+   |
+LL |         (0)..=(-4) => (),
+   |         ^ ^
+   |
+help: remove these parentheses
+   |
+LL -         (0)..=(-4) => (),
+LL +         0..=(-4) => (),
+   |
+
+error: range pattern bounds cannot have parentheses
+  --> $DIR/pat-recover-ranges.rs:8:15
+   |
+LL |         (0)..=(-4) => (),
+   |               ^  ^
+   |
+help: remove these parentheses
+   |
+LL -         (0)..=(-4) => (),
+LL +         (0)..=-4 => (),
+   |
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed
index 227c40e97c0..a09ff3e5417 100644
--- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed
@@ -1,7 +1,7 @@
 // Regression test for issues #100790 and #106439.
 // run-rustfix
 
-pub struct Example(usize)
+pub struct Example(#[allow(dead_code)] usize)
 where
     (): Sized;
 //~^^^ ERROR where clauses are not allowed before tuple struct bodies
diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs
index 3699e6fe572..e86f2a8acb8 100644
--- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs
@@ -4,7 +4,7 @@
 pub struct Example
 where
     (): Sized,
-(usize);
+(#[allow(dead_code)] usize);
 //~^^^ ERROR where clauses are not allowed before tuple struct bodies
 
 struct _Demo
diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr
index 18aa5fadb6b..ddbf237e866 100644
--- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr
+++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr
@@ -6,12 +6,12 @@ LL |   pub struct Example
 LL | / where
 LL | |     (): Sized,
    | |______________^ unexpected where clause
-LL |   (usize);
-   |   ------- the struct body
+LL |   (#[allow(dead_code)] usize);
+   |   --------------------------- the struct body
    |
 help: move the body before the where clause
    |
-LL ~ pub struct Example(usize)
+LL ~ pub struct Example(#[allow(dead_code)] usize)
 LL | where
 LL ~     (): Sized;
    |
diff --git a/tests/ui/pattern/issue-117626.rs b/tests/ui/pattern/issue-117626.rs
new file mode 100644
index 00000000000..f87147a5d88
--- /dev/null
+++ b/tests/ui/pattern/issue-117626.rs
@@ -0,0 +1,21 @@
+// check-pass
+
+#[derive(PartialEq)]
+struct NonMatchable;
+
+impl Eq for NonMatchable {}
+
+#[derive(PartialEq, Eq)]
+enum Foo {
+    A(NonMatchable),
+    B(*const u8),
+}
+
+const CONST: Foo = Foo::B(std::ptr::null());
+
+fn main() {
+    match CONST {
+        CONST => 0,
+        _ => 1,
+    };
+}
diff --git a/tests/ui/pattern/non-structural-match-types.mir.stderr b/tests/ui/pattern/non-structural-match-types.mir.stderr
deleted file mode 100644
index 7a9e5b7e02e..00000000000
--- a/tests/ui/pattern/non-structural-match-types.mir.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: `{closure@$DIR/non-structural-match-types.rs:12:17: 12:19}` cannot be used in patterns
-  --> $DIR/non-structural-match-types.rs:12:9
-   |
-LL |         const { || {} } => {}
-   |         ^^^^^^^^^^^^^^^
-
-error: `{async block@$DIR/non-structural-match-types.rs:15:17: 15:25}` cannot be used in patterns
-  --> $DIR/non-structural-match-types.rs:15:9
-   |
-LL |         const { async {} } => {}
-   |         ^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/pattern/non-structural-match-types.rs b/tests/ui/pattern/non-structural-match-types.rs
index fb7779fa808..b4f19bb8294 100644
--- a/tests/ui/pattern/non-structural-match-types.rs
+++ b/tests/ui/pattern/non-structural-match-types.rs
@@ -1,6 +1,4 @@
 // edition:2021
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 
 #![allow(incomplete_features)]
 #![allow(unreachable_code)]
diff --git a/tests/ui/pattern/non-structural-match-types.stderr b/tests/ui/pattern/non-structural-match-types.stderr
new file mode 100644
index 00000000000..4a6990da56f
--- /dev/null
+++ b/tests/ui/pattern/non-structural-match-types.stderr
@@ -0,0 +1,14 @@
+error: `{closure@$DIR/non-structural-match-types.rs:10:17: 10:19}` cannot be used in patterns
+  --> $DIR/non-structural-match-types.rs:10:9
+   |
+LL |         const { || {} } => {}
+   |         ^^^^^^^^^^^^^^^
+
+error: `{async block@$DIR/non-structural-match-types.rs:13:17: 13:25}` cannot be used in patterns
+  --> $DIR/non-structural-match-types.rs:13:9
+   |
+LL |         const { async {} } => {}
+   |         ^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/pattern/non-structural-match-types.thir.stderr b/tests/ui/pattern/non-structural-match-types.thir.stderr
deleted file mode 100644
index 7a9e5b7e02e..00000000000
--- a/tests/ui/pattern/non-structural-match-types.thir.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: `{closure@$DIR/non-structural-match-types.rs:12:17: 12:19}` cannot be used in patterns
-  --> $DIR/non-structural-match-types.rs:12:9
-   |
-LL |         const { || {} } => {}
-   |         ^^^^^^^^^^^^^^^
-
-error: `{async block@$DIR/non-structural-match-types.rs:15:17: 15:25}` cannot be used in patterns
-  --> $DIR/non-structural-match-types.rs:15:9
-   |
-LL |         const { async {} } => {}
-   |         ^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/pattern/usefulness/deny-irrefutable-let-patterns.stderr b/tests/ui/pattern/usefulness/deny-irrefutable-let-patterns.stderr
index cdb6b5c7a49..e8b7f40c70e 100644
--- a/tests/ui/pattern/usefulness/deny-irrefutable-let-patterns.stderr
+++ b/tests/ui/pattern/usefulness/deny-irrefutable-let-patterns.stderr
@@ -22,10 +22,10 @@ LL |     while let _ = 5 {
    = help: consider instead using a `loop { ... }` with a `let` inside it
 
 error: irrefutable `if let` guard pattern
-  --> $DIR/deny-irrefutable-let-patterns.rs:13:18
+  --> $DIR/deny-irrefutable-let-patterns.rs:13:14
    |
 LL |         _ if let _ = 2 => {}
-   |                  ^
+   |              ^^^^^^^^^
    |
    = note: this pattern will always match, so the guard is useless
    = help: consider removing the guard and adding a `let` inside the match arm
diff --git a/tests/ui/pattern/usefulness/issue-119493-type-error-ice.rs b/tests/ui/pattern/usefulness/issue-119493-type-error-ice.rs
new file mode 100644
index 00000000000..6cf459eb82e
--- /dev/null
+++ b/tests/ui/pattern/usefulness/issue-119493-type-error-ice.rs
@@ -0,0 +1,13 @@
+fn main() {}
+
+fn foo() {
+    #[derive(Copy, Clone)]
+    struct Foo(NonExistent);
+    //~^ ERROR cannot find type
+    //~| ERROR cannot find type
+
+    type U = impl Copy;
+    //~^ ERROR `impl Trait` in type aliases is unstable
+    let foo: U = Foo(());
+    let Foo(()) = foo;
+}
diff --git a/tests/ui/pattern/usefulness/issue-119493-type-error-ice.stderr b/tests/ui/pattern/usefulness/issue-119493-type-error-ice.stderr
new file mode 100644
index 00000000000..6d74feb7a9f
--- /dev/null
+++ b/tests/ui/pattern/usefulness/issue-119493-type-error-ice.stderr
@@ -0,0 +1,30 @@
+error[E0412]: cannot find type `NonExistent` in this scope
+  --> $DIR/issue-119493-type-error-ice.rs:5:16
+   |
+LL |     struct Foo(NonExistent);
+   |                ^^^^^^^^^^^ not found in this scope
+
+error[E0412]: cannot find type `NonExistent` in this scope
+  --> $DIR/issue-119493-type-error-ice.rs:5:16
+   |
+LL |     struct Foo(NonExistent);
+   |                ^^^^^^^^^^^ not found in this scope
+   |
+help: you might be missing a type parameter
+   |
+LL |     struct Foo<NonExistent>(NonExistent);
+   |               +++++++++++++
+
+error[E0658]: `impl Trait` in type aliases is unstable
+  --> $DIR/issue-119493-type-error-ice.rs:9:14
+   |
+LL |     type U = impl Copy;
+   |              ^^^^^^^^^
+   |
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0412, E0658.
+For more information about an error, try `rustc --explain E0412`.
diff --git a/tests/ui/pattern/usefulness/issue-119778-type-error-ice.rs b/tests/ui/pattern/usefulness/issue-119778-type-error-ice.rs
new file mode 100644
index 00000000000..47333385bc1
--- /dev/null
+++ b/tests/ui/pattern/usefulness/issue-119778-type-error-ice.rs
@@ -0,0 +1,13 @@
+fn main() {}
+
+fn foo() {
+    #[derive(Copy, Clone)]
+    struct Foo([u8; S]);
+    //~^ ERROR cannot find value `S`
+    //~| ERROR cannot find value `S`
+
+    type U = impl Copy;
+    //~^ ERROR `impl Trait` in type aliases is unstable
+    let foo: U = Foo(());
+    let Foo(()) = foo;
+}
diff --git a/tests/ui/pattern/usefulness/issue-119778-type-error-ice.stderr b/tests/ui/pattern/usefulness/issue-119778-type-error-ice.stderr
new file mode 100644
index 00000000000..93ef05decd2
--- /dev/null
+++ b/tests/ui/pattern/usefulness/issue-119778-type-error-ice.stderr
@@ -0,0 +1,35 @@
+error[E0425]: cannot find value `S` in this scope
+  --> $DIR/issue-119778-type-error-ice.rs:5:21
+   |
+LL |     struct Foo([u8; S]);
+   |                     ^ not found in this scope
+   |
+help: you might be missing a const parameter
+   |
+LL |     struct Foo<const S: /* Type */>([u8; S]);
+   |               +++++++++++++++++++++
+
+error[E0425]: cannot find value `S` in this scope
+  --> $DIR/issue-119778-type-error-ice.rs:5:21
+   |
+LL |     struct Foo([u8; S]);
+   |                     ^ not found in this scope
+   |
+help: you might be missing a const parameter
+   |
+LL |     struct Foo<const S: /* Type */>([u8; S]);
+   |               +++++++++++++++++++++
+
+error[E0658]: `impl Trait` in type aliases is unstable
+  --> $DIR/issue-119778-type-error-ice.rs:9:14
+   |
+LL |     type U = impl Copy;
+   |              ^^^^^^^^^
+   |
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0425, E0658.
+For more information about an error, try `rustc --explain E0425`.
diff --git a/tests/ui/pattern/usefulness/issue-57472.rs b/tests/ui/pattern/usefulness/issue-57472.rs
index 1131006374c..17c252de2be 100644
--- a/tests/ui/pattern/usefulness/issue-57472.rs
+++ b/tests/ui/pattern/usefulness/issue-57472.rs
@@ -1,4 +1,4 @@
-#![crate_type="lib"]
+#![crate_type = "lib"]
 #![deny(unreachable_patterns)]
 
 mod test_struct {
@@ -26,10 +26,12 @@ mod test_union {
     }
 
     pub fn test(punned: Punned) {
-        match punned {
-            Punned { foo: [_] } => println!("foo"),
-            Punned { bar: [_] } => println!("bar"),
-            //~^ ERROR unreachable pattern [unreachable_patterns]
+        unsafe {
+            match punned {
+                Punned { foo: [_] } => println!("foo"),
+                Punned { bar: [_] } => println!("bar"),
+                //~^ ERROR unreachable pattern [unreachable_patterns]
+            }
         }
     }
 }
diff --git a/tests/ui/pattern/usefulness/issue-57472.stderr b/tests/ui/pattern/usefulness/issue-57472.stderr
index 26efdf6dbaf..c814eaec0d1 100644
--- a/tests/ui/pattern/usefulness/issue-57472.stderr
+++ b/tests/ui/pattern/usefulness/issue-57472.stderr
@@ -11,10 +11,10 @@ LL | #![deny(unreachable_patterns)]
    |         ^^^^^^^^^^^^^^^^^^^^
 
 error: unreachable pattern
-  --> $DIR/issue-57472.rs:31:13
+  --> $DIR/issue-57472.rs:32:17
    |
-LL |             Punned { bar: [_] } => println!("bar"),
-   |             ^^^^^^^^^^^^^^^^^^^
+LL |                 Punned { bar: [_] } => println!("bar"),
+   |                 ^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/privacy/auxiliary/issue-119463-extern.rs b/tests/ui/privacy/auxiliary/issue-119463-extern.rs
new file mode 100644
index 00000000000..e703a1fb2c2
--- /dev/null
+++ b/tests/ui/privacy/auxiliary/issue-119463-extern.rs
@@ -0,0 +1,3 @@
+trait PrivateTrait {
+    const FOO: usize;
+}
diff --git a/tests/ui/privacy/issue-119463.rs b/tests/ui/privacy/issue-119463.rs
new file mode 100644
index 00000000000..e010bc9f536
--- /dev/null
+++ b/tests/ui/privacy/issue-119463.rs
@@ -0,0 +1,15 @@
+// aux-build:issue-119463-extern.rs
+
+extern crate issue_119463_extern;
+
+struct S;
+
+impl issue_119463_extern::PrivateTrait for S {
+    //~^ ERROR: trait `PrivateTrait` is private
+    const FOO: usize = 1;
+
+    fn nonexistent() {}
+    //~^ ERROR: method `nonexistent` is not a member of trait
+}
+
+fn main() {}
diff --git a/tests/ui/privacy/issue-119463.stderr b/tests/ui/privacy/issue-119463.stderr
new file mode 100644
index 00000000000..4a0684de613
--- /dev/null
+++ b/tests/ui/privacy/issue-119463.stderr
@@ -0,0 +1,22 @@
+error[E0407]: method `nonexistent` is not a member of trait `issue_119463_extern::PrivateTrait`
+  --> $DIR/issue-119463.rs:11:5
+   |
+LL |     fn nonexistent() {}
+   |     ^^^^^^^^^^^^^^^^^^^ not a member of trait `issue_119463_extern::PrivateTrait`
+
+error[E0603]: trait `PrivateTrait` is private
+  --> $DIR/issue-119463.rs:7:27
+   |
+LL | impl issue_119463_extern::PrivateTrait for S {
+   |                           ^^^^^^^^^^^^ private trait
+   |
+note: the trait `PrivateTrait` is defined here
+  --> $DIR/auxiliary/issue-119463-extern.rs:1:1
+   |
+LL | trait PrivateTrait {
+   | ^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0407, E0603.
+For more information about an error, try `rustc --explain E0407`.
diff --git a/tests/ui/proc-macro/capture-macro-rules-invoke.stdout b/tests/ui/proc-macro/capture-macro-rules-invoke.stdout
index 71e34119ba7..bbab08bca49 100644
--- a/tests/ui/proc-macro/capture-macro-rules-invoke.stdout
+++ b/tests/ui/proc-macro/capture-macro-rules-invoke.stdout
@@ -271,7 +271,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
                 span: $DIR/capture-macro-rules-invoke.rs:47:19: 47:20 (#0),
             },
         ],
-        span: $DIR/capture-macro-rules-invoke.rs:47:13: 47:22 (#0),
+        span: $DIR/capture-macro-rules-invoke.rs:15:60: 15:63 (#0),
     },
     Punct {
         ch: ',',
diff --git a/tests/ui/proc-macro/expand-expr.rs b/tests/ui/proc-macro/expand-expr.rs
index 700aac41c44..89cd1d767a5 100644
--- a/tests/ui/proc-macro/expand-expr.rs
+++ b/tests/ui/proc-macro/expand-expr.rs
@@ -37,7 +37,7 @@ expand_expr_is!("hello", stringify!(hello));
 expand_expr_is!("10 + 20", stringify!(10 + 20));
 
 macro_rules! echo_tts {
-    ($($t:tt)*) => { $($t)* };  //~ ERROR: expected expression, found `$`
+    ($($t:tt)*) => { $($t)* };
 }
 
 macro_rules! echo_lit {
@@ -109,7 +109,7 @@ expand_expr_fail!("string"; hello); //~ ERROR: expected one of `.`, `?`, or an o
 
 // Invalid expressions produce errors in addition to returning `Err(())`.
 expand_expr_fail!($); //~ ERROR: expected expression, found `$`
-expand_expr_fail!(echo_tts!($));
+expand_expr_fail!(echo_tts!($)); //~ ERROR: expected expression, found `$`
 expand_expr_fail!(echo_pm!($)); //~ ERROR: expected expression, found `$`
 
 // We get errors reported and recover during macro expansion if the macro
diff --git a/tests/ui/proc-macro/expand-expr.stderr b/tests/ui/proc-macro/expand-expr.stderr
index df61e997289..2b92472e5ab 100644
--- a/tests/ui/proc-macro/expand-expr.stderr
+++ b/tests/ui/proc-macro/expand-expr.stderr
@@ -11,10 +11,10 @@ LL | expand_expr_fail!($);
    |                   ^ expected expression
 
 error: expected expression, found `$`
-  --> $DIR/expand-expr.rs:40:23
+  --> $DIR/expand-expr.rs:112:29
    |
-LL |     ($($t:tt)*) => { $($t)* };
-   |                       ^^^^ expected expression
+LL | expand_expr_fail!(echo_tts!($));
+   |                             ^ expected expression
 
 error: expected expression, found `$`
   --> $DIR/expand-expr.rs:113:28
diff --git a/tests/ui/proc-macro/inner-attrs.rs b/tests/ui/proc-macro/inner-attrs.rs
index 1000c9c755f..c448294e0f6 100644
--- a/tests/ui/proc-macro/inner-attrs.rs
+++ b/tests/ui/proc-macro/inner-attrs.rs
@@ -1,5 +1,6 @@
 // gate-test-custom_inner_attributes
 // compile-flags: -Z span-debug --error-format human
+// error-pattern:expected non-macro inner attribute
 // aux-build:test-macros.rs
 // edition:2018
 
@@ -61,19 +62,19 @@ fn bar() {
     );
 
     for _ in &[true] {
-        #![print_attr] //~ ERROR expected non-macro inner attribute
+        #![print_attr]
     }
 
     let _ = {
-        #![print_attr] //~ ERROR expected non-macro inner attribute
+        #![print_attr]
     };
 
     let _ = async {
-        #![print_attr] //~ ERROR expected non-macro inner attribute
+        #![print_attr]
     };
 
     {
-        #![print_attr] //~ ERROR expected non-macro inner attribute
+        #![print_attr]
     };
 }
 
diff --git a/tests/ui/proc-macro/inner-attrs.stderr b/tests/ui/proc-macro/inner-attrs.stderr
index a332e143a79..ee8732c650d 100644
--- a/tests/ui/proc-macro/inner-attrs.stderr
+++ b/tests/ui/proc-macro/inner-attrs.stderr
@@ -1,23 +1,23 @@
 error: expected non-macro inner attribute, found attribute macro `print_attr`
-  --> $DIR/inner-attrs.rs:64:12
+  --> $DIR/inner-attrs.rs:65:12
    |
 LL |         #![print_attr]
    |            ^^^^^^^^^^ not a non-macro inner attribute
 
 error: expected non-macro inner attribute, found attribute macro `print_attr`
-  --> $DIR/inner-attrs.rs:68:12
+  --> $DIR/inner-attrs.rs:69:12
    |
 LL |         #![print_attr]
    |            ^^^^^^^^^^ not a non-macro inner attribute
 
 error: expected non-macro inner attribute, found attribute macro `print_attr`
-  --> $DIR/inner-attrs.rs:72:12
+  --> $DIR/inner-attrs.rs:73:12
    |
 LL |         #![print_attr]
    |            ^^^^^^^^^^ not a non-macro inner attribute
 
 error: expected non-macro inner attribute, found attribute macro `print_attr`
-  --> $DIR/inner-attrs.rs:76:12
+  --> $DIR/inner-attrs.rs:77:12
    |
 LL |         #![print_attr]
    |            ^^^^^^^^^^ not a non-macro inner attribute
diff --git a/tests/ui/proc-macro/inner-attrs.stdout b/tests/ui/proc-macro/inner-attrs.stdout
index 037ec044e42..39ec6834f06 100644
--- a/tests/ui/proc-macro/inner-attrs.stdout
+++ b/tests/ui/proc-macro/inner-attrs.stdout
@@ -2,7 +2,7 @@ PRINT-ATTR_ARGS INPUT (DISPLAY): first
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "first",
-        span: $DIR/inner-attrs.rs:17:25: 17:30 (#0),
+        span: $DIR/inner-attrs.rs:18:25: 18:30 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(second)] fn foo()
@@ -13,40 +13,40 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
     Punct {
         ch: '#',
         spacing: Alone,
-        span: $DIR/inner-attrs.rs:18:1: 18:2 (#0),
+        span: $DIR/inner-attrs.rs:19:1: 19:2 (#0),
     },
     Group {
         delimiter: Bracket,
         stream: TokenStream [
             Ident {
                 ident: "print_target_and_args",
-                span: $DIR/inner-attrs.rs:18:3: 18:24 (#0),
+                span: $DIR/inner-attrs.rs:19:3: 19:24 (#0),
             },
             Group {
                 delimiter: Parenthesis,
                 stream: TokenStream [
                     Ident {
                         ident: "second",
-                        span: $DIR/inner-attrs.rs:18:25: 18:31 (#0),
+                        span: $DIR/inner-attrs.rs:19:25: 19:31 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:18:24: 18:32 (#0),
+                span: $DIR/inner-attrs.rs:19:24: 19:32 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:18:2: 18:33 (#0),
+        span: $DIR/inner-attrs.rs:19:2: 19:33 (#0),
     },
     Ident {
         ident: "fn",
-        span: $DIR/inner-attrs.rs:19:1: 19:3 (#0),
+        span: $DIR/inner-attrs.rs:20:1: 20:3 (#0),
     },
     Ident {
         ident: "foo",
-        span: $DIR/inner-attrs.rs:19:4: 19:7 (#0),
+        span: $DIR/inner-attrs.rs:20:4: 20:7 (#0),
     },
     Group {
         delimiter: Parenthesis,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:19:7: 19:9 (#0),
+        span: $DIR/inner-attrs.rs:20:7: 20:9 (#0),
     },
     Group {
         delimiter: Brace,
@@ -54,72 +54,72 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:20:5: 20:6 (#0),
+                span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:20:6: 20:7 (#0),
+                span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:20:8: 20:29 (#0),
+                        span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "third",
-                                span: $DIR/inner-attrs.rs:20:30: 20:35 (#0),
+                                span: $DIR/inner-attrs.rs:21:30: 21:35 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:20:29: 20:36 (#0),
+                        span: $DIR/inner-attrs.rs:21:29: 21:36 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:20:7: 20:37 (#0),
+                span: $DIR/inner-attrs.rs:21:7: 21:37 (#0),
             },
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
+                span: $DIR/inner-attrs.rs:22:5: 22:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
+                span: $DIR/inner-attrs.rs:22:6: 22:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
+                        span: $DIR/inner-attrs.rs:22:8: 22:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "fourth",
-                                span: $DIR/inner-attrs.rs:21:30: 21:36 (#0),
+                                span: $DIR/inner-attrs.rs:22:30: 22:36 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:21:29: 21:37 (#0),
+                        span: $DIR/inner-attrs.rs:22:29: 22:37 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:21:7: 21:38 (#0),
+                span: $DIR/inner-attrs.rs:22:7: 22:38 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:19:10: 22:2 (#0),
+        span: $DIR/inner-attrs.rs:20:10: 23:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): second
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "second",
-        span: $DIR/inner-attrs.rs:18:25: 18:31 (#0),
+        span: $DIR/inner-attrs.rs:19:25: 19:31 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): fn foo()
@@ -129,16 +129,16 @@ PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): fn foo()
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "fn",
-        span: $DIR/inner-attrs.rs:19:1: 19:3 (#0),
+        span: $DIR/inner-attrs.rs:20:1: 20:3 (#0),
     },
     Ident {
         ident: "foo",
-        span: $DIR/inner-attrs.rs:19:4: 19:7 (#0),
+        span: $DIR/inner-attrs.rs:20:4: 20:7 (#0),
     },
     Group {
         delimiter: Parenthesis,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:19:7: 19:9 (#0),
+        span: $DIR/inner-attrs.rs:20:7: 20:9 (#0),
     },
     Group {
         delimiter: Brace,
@@ -146,72 +146,72 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:20:5: 20:6 (#0),
+                span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:20:6: 20:7 (#0),
+                span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:20:8: 20:29 (#0),
+                        span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "third",
-                                span: $DIR/inner-attrs.rs:20:30: 20:35 (#0),
+                                span: $DIR/inner-attrs.rs:21:30: 21:35 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:20:29: 20:36 (#0),
+                        span: $DIR/inner-attrs.rs:21:29: 21:36 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:20:7: 20:37 (#0),
+                span: $DIR/inner-attrs.rs:21:7: 21:37 (#0),
             },
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
+                span: $DIR/inner-attrs.rs:22:5: 22:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
+                span: $DIR/inner-attrs.rs:22:6: 22:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
+                        span: $DIR/inner-attrs.rs:22:8: 22:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "fourth",
-                                span: $DIR/inner-attrs.rs:21:30: 21:36 (#0),
+                                span: $DIR/inner-attrs.rs:22:30: 22:36 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:21:29: 21:37 (#0),
+                        span: $DIR/inner-attrs.rs:22:29: 22:37 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:21:7: 21:38 (#0),
+                span: $DIR/inner-attrs.rs:22:7: 22:38 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:19:10: 22:2 (#0),
+        span: $DIR/inner-attrs.rs:20:10: 23:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): third
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "third",
-        span: $DIR/inner-attrs.rs:20:30: 20:35 (#0),
+        span: $DIR/inner-attrs.rs:21:30: 21:35 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): fn foo() { #![print_target_and_args(fourth)] }
@@ -219,16 +219,16 @@ PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): fn foo() { #! [print_target_and_args(fou
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "fn",
-        span: $DIR/inner-attrs.rs:19:1: 19:3 (#0),
+        span: $DIR/inner-attrs.rs:20:1: 20:3 (#0),
     },
     Ident {
         ident: "foo",
-        span: $DIR/inner-attrs.rs:19:4: 19:7 (#0),
+        span: $DIR/inner-attrs.rs:20:4: 20:7 (#0),
     },
     Group {
         delimiter: Parenthesis,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:19:7: 19:9 (#0),
+        span: $DIR/inner-attrs.rs:20:7: 20:9 (#0),
     },
     Group {
         delimiter: Brace,
@@ -236,70 +236,70 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
+                span: $DIR/inner-attrs.rs:22:5: 22:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
+                span: $DIR/inner-attrs.rs:22:6: 22:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
+                        span: $DIR/inner-attrs.rs:22:8: 22:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "fourth",
-                                span: $DIR/inner-attrs.rs:21:30: 21:36 (#0),
+                                span: $DIR/inner-attrs.rs:22:30: 22:36 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:21:29: 21:37 (#0),
+                        span: $DIR/inner-attrs.rs:22:29: 22:37 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:21:7: 21:38 (#0),
+                span: $DIR/inner-attrs.rs:22:7: 22:38 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:19:10: 22:2 (#0),
+        span: $DIR/inner-attrs.rs:20:10: 23:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): fourth
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "fourth",
-        span: $DIR/inner-attrs.rs:21:30: 21:36 (#0),
+        span: $DIR/inner-attrs.rs:22:30: 22:36 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): fn foo() {}
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "fn",
-        span: $DIR/inner-attrs.rs:19:1: 19:3 (#0),
+        span: $DIR/inner-attrs.rs:20:1: 20:3 (#0),
     },
     Ident {
         ident: "foo",
-        span: $DIR/inner-attrs.rs:19:4: 19:7 (#0),
+        span: $DIR/inner-attrs.rs:20:4: 20:7 (#0),
     },
     Group {
         delimiter: Parenthesis,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:19:7: 19:9 (#0),
+        span: $DIR/inner-attrs.rs:20:7: 20:9 (#0),
     },
     Group {
         delimiter: Brace,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:19:10: 22:2 (#0),
+        span: $DIR/inner-attrs.rs:20:10: 23:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): mod_first
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod_first",
-        span: $DIR/inner-attrs.rs:24:25: 24:34 (#0),
+        span: $DIR/inner-attrs.rs:25:25: 25:34 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(mod_second)] mod inline_mod
@@ -313,35 +313,35 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
     Punct {
         ch: '#',
         spacing: Alone,
-        span: $DIR/inner-attrs.rs:25:1: 25:2 (#0),
+        span: $DIR/inner-attrs.rs:26:1: 26:2 (#0),
     },
     Group {
         delimiter: Bracket,
         stream: TokenStream [
             Ident {
                 ident: "print_target_and_args",
-                span: $DIR/inner-attrs.rs:25:3: 25:24 (#0),
+                span: $DIR/inner-attrs.rs:26:3: 26:24 (#0),
             },
             Group {
                 delimiter: Parenthesis,
                 stream: TokenStream [
                     Ident {
                         ident: "mod_second",
-                        span: $DIR/inner-attrs.rs:25:25: 25:35 (#0),
+                        span: $DIR/inner-attrs.rs:26:25: 26:35 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:25:24: 25:36 (#0),
+                span: $DIR/inner-attrs.rs:26:24: 26:36 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:25:2: 25:37 (#0),
+        span: $DIR/inner-attrs.rs:26:2: 26:37 (#0),
     },
     Ident {
         ident: "mod",
-        span: $DIR/inner-attrs.rs:26:1: 26:4 (#0),
+        span: $DIR/inner-attrs.rs:27:1: 27:4 (#0),
     },
     Ident {
         ident: "inline_mod",
-        span: $DIR/inner-attrs.rs:26:5: 26:15 (#0),
+        span: $DIR/inner-attrs.rs:27:5: 27:15 (#0),
     },
     Group {
         delimiter: Brace,
@@ -349,72 +349,72 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:27:5: 27:6 (#0),
+                span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:27:6: 27:7 (#0),
+                span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:27:8: 27:29 (#0),
+                        span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "mod_third",
-                                span: $DIR/inner-attrs.rs:27:30: 27:39 (#0),
+                                span: $DIR/inner-attrs.rs:28:30: 28:39 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:27:29: 27:40 (#0),
+                        span: $DIR/inner-attrs.rs:28:29: 28:40 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:27:7: 27:41 (#0),
+                span: $DIR/inner-attrs.rs:28:7: 28:41 (#0),
             },
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
+                span: $DIR/inner-attrs.rs:29:5: 29:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
+                span: $DIR/inner-attrs.rs:29:6: 29:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
+                        span: $DIR/inner-attrs.rs:29:8: 29:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "mod_fourth",
-                                span: $DIR/inner-attrs.rs:28:30: 28:40 (#0),
+                                span: $DIR/inner-attrs.rs:29:30: 29:40 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:28:29: 28:41 (#0),
+                        span: $DIR/inner-attrs.rs:29:29: 29:41 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:28:7: 28:42 (#0),
+                span: $DIR/inner-attrs.rs:29:7: 29:42 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:26:16: 29:2 (#0),
+        span: $DIR/inner-attrs.rs:27:16: 30:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): mod_second
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod_second",
-        span: $DIR/inner-attrs.rs:25:25: 25:35 (#0),
+        span: $DIR/inner-attrs.rs:26:25: 26:35 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): mod inline_mod
@@ -427,11 +427,11 @@ PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): mod inline_mod
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod",
-        span: $DIR/inner-attrs.rs:26:1: 26:4 (#0),
+        span: $DIR/inner-attrs.rs:27:1: 27:4 (#0),
     },
     Ident {
         ident: "inline_mod",
-        span: $DIR/inner-attrs.rs:26:5: 26:15 (#0),
+        span: $DIR/inner-attrs.rs:27:5: 27:15 (#0),
     },
     Group {
         delimiter: Brace,
@@ -439,72 +439,72 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:27:5: 27:6 (#0),
+                span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:27:6: 27:7 (#0),
+                span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:27:8: 27:29 (#0),
+                        span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "mod_third",
-                                span: $DIR/inner-attrs.rs:27:30: 27:39 (#0),
+                                span: $DIR/inner-attrs.rs:28:30: 28:39 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:27:29: 27:40 (#0),
+                        span: $DIR/inner-attrs.rs:28:29: 28:40 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:27:7: 27:41 (#0),
+                span: $DIR/inner-attrs.rs:28:7: 28:41 (#0),
             },
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
+                span: $DIR/inner-attrs.rs:29:5: 29:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
+                span: $DIR/inner-attrs.rs:29:6: 29:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
+                        span: $DIR/inner-attrs.rs:29:8: 29:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "mod_fourth",
-                                span: $DIR/inner-attrs.rs:28:30: 28:40 (#0),
+                                span: $DIR/inner-attrs.rs:29:30: 29:40 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:28:29: 28:41 (#0),
+                        span: $DIR/inner-attrs.rs:29:29: 29:41 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:28:7: 28:42 (#0),
+                span: $DIR/inner-attrs.rs:29:7: 29:42 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:26:16: 29:2 (#0),
+        span: $DIR/inner-attrs.rs:27:16: 30:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): mod_third
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod_third",
-        span: $DIR/inner-attrs.rs:27:30: 27:39 (#0),
+        span: $DIR/inner-attrs.rs:28:30: 28:39 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): mod inline_mod { #![print_target_and_args(mod_fourth)] }
@@ -512,11 +512,11 @@ PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): mod inline_mod { #! [print_target_and_ar
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod",
-        span: $DIR/inner-attrs.rs:26:1: 26:4 (#0),
+        span: $DIR/inner-attrs.rs:27:1: 27:4 (#0),
     },
     Ident {
         ident: "inline_mod",
-        span: $DIR/inner-attrs.rs:26:5: 26:15 (#0),
+        span: $DIR/inner-attrs.rs:27:5: 27:15 (#0),
     },
     Group {
         delimiter: Brace,
@@ -524,58 +524,58 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
+                span: $DIR/inner-attrs.rs:29:5: 29:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
+                span: $DIR/inner-attrs.rs:29:6: 29:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
+                        span: $DIR/inner-attrs.rs:29:8: 29:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "mod_fourth",
-                                span: $DIR/inner-attrs.rs:28:30: 28:40 (#0),
+                                span: $DIR/inner-attrs.rs:29:30: 29:40 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:28:29: 28:41 (#0),
+                        span: $DIR/inner-attrs.rs:29:29: 29:41 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:28:7: 28:42 (#0),
+                span: $DIR/inner-attrs.rs:29:7: 29:42 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:26:16: 29:2 (#0),
+        span: $DIR/inner-attrs.rs:27:16: 30:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): mod_fourth
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod_fourth",
-        span: $DIR/inner-attrs.rs:28:30: 28:40 (#0),
+        span: $DIR/inner-attrs.rs:29:30: 29:40 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): mod inline_mod {}
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod",
-        span: $DIR/inner-attrs.rs:26:1: 26:4 (#0),
+        span: $DIR/inner-attrs.rs:27:1: 27:4 (#0),
     },
     Ident {
         ident: "inline_mod",
-        span: $DIR/inner-attrs.rs:26:5: 26:15 (#0),
+        span: $DIR/inner-attrs.rs:27:5: 27:15 (#0),
     },
     Group {
         delimiter: Brace,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:26:16: 29:2 (#0),
+        span: $DIR/inner-attrs.rs:27:16: 30:2 (#0),
     },
 ]
 PRINT-DERIVE INPUT (DISPLAY): struct MyDerivePrint
@@ -588,63 +588,63 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): struct MyDerivePrint
 PRINT-DERIVE INPUT (DEBUG): TokenStream [
     Ident {
         ident: "struct",
-        span: $DIR/inner-attrs.rs:36:1: 36:7 (#0),
+        span: $DIR/inner-attrs.rs:37:1: 37:7 (#0),
     },
     Ident {
         ident: "MyDerivePrint",
-        span: $DIR/inner-attrs.rs:36:8: 36:21 (#0),
+        span: $DIR/inner-attrs.rs:37:8: 37:21 (#0),
     },
     Group {
         delimiter: Brace,
         stream: TokenStream [
             Ident {
                 ident: "field",
-                span: $DIR/inner-attrs.rs:37:5: 37:10 (#0),
+                span: $DIR/inner-attrs.rs:38:5: 38:10 (#0),
             },
             Punct {
                 ch: ':',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:37:10: 37:11 (#0),
+                span: $DIR/inner-attrs.rs:38:10: 38:11 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "u8",
-                        span: $DIR/inner-attrs.rs:37:13: 37:15 (#0),
+                        span: $DIR/inner-attrs.rs:38:13: 38:15 (#0),
                     },
                     Punct {
                         ch: ';',
                         spacing: Alone,
-                        span: $DIR/inner-attrs.rs:37:15: 37:16 (#0),
+                        span: $DIR/inner-attrs.rs:38:15: 38:16 (#0),
                     },
                     Group {
                         delimiter: Brace,
                         stream: TokenStream [
                             Ident {
                                 ident: "match",
-                                span: $DIR/inner-attrs.rs:38:9: 38:14 (#0),
+                                span: $DIR/inner-attrs.rs:39:9: 39:14 (#0),
                             },
                             Ident {
                                 ident: "true",
-                                span: $DIR/inner-attrs.rs:38:15: 38:19 (#0),
+                                span: $DIR/inner-attrs.rs:39:15: 39:19 (#0),
                             },
                             Group {
                                 delimiter: Brace,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "_",
-                                        span: $DIR/inner-attrs.rs:39:13: 39:14 (#0),
+                                        span: $DIR/inner-attrs.rs:40:13: 40:14 (#0),
                                     },
                                     Punct {
                                         ch: '=',
                                         spacing: Joint,
-                                        span: $DIR/inner-attrs.rs:39:15: 39:16 (#0),
+                                        span: $DIR/inner-attrs.rs:40:15: 40:16 (#0),
                                     },
                                     Punct {
                                         ch: '>',
                                         spacing: Alone,
-                                        span: $DIR/inner-attrs.rs:39:16: 39:17 (#0),
+                                        span: $DIR/inner-attrs.rs:40:16: 40:17 (#0),
                                     },
                                     Group {
                                         delimiter: Brace,
@@ -652,69 +652,69 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
                                             Punct {
                                                 ch: '#',
                                                 spacing: Joint,
-                                                span: $DIR/inner-attrs.rs:40:17: 40:18 (#0),
+                                                span: $DIR/inner-attrs.rs:41:17: 41:18 (#0),
                                             },
                                             Punct {
                                                 ch: '!',
                                                 spacing: Alone,
-                                                span: $DIR/inner-attrs.rs:40:18: 40:19 (#0),
+                                                span: $DIR/inner-attrs.rs:41:18: 41:19 (#0),
                                             },
                                             Group {
                                                 delimiter: Bracket,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "rustc_dummy",
-                                                        span: $DIR/inner-attrs.rs:40:41: 40:52 (#0),
+                                                        span: $DIR/inner-attrs.rs:41:41: 41:52 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "third",
-                                                                span: $DIR/inner-attrs.rs:40:53: 40:58 (#0),
+                                                                span: $DIR/inner-attrs.rs:41:53: 41:58 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/inner-attrs.rs:40:52: 40:59 (#0),
+                                                        span: $DIR/inner-attrs.rs:41:52: 41:59 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/inner-attrs.rs:40:17: 40:18 (#0),
+                                                span: $DIR/inner-attrs.rs:41:17: 41:18 (#0),
                                             },
                                             Ident {
                                                 ident: "true",
-                                                span: $DIR/inner-attrs.rs:41:17: 41:21 (#0),
+                                                span: $DIR/inner-attrs.rs:42:17: 42:21 (#0),
                                             },
                                         ],
-                                        span: $DIR/inner-attrs.rs:39:18: 42:14 (#0),
+                                        span: $DIR/inner-attrs.rs:40:18: 43:14 (#0),
                                     },
                                 ],
-                                span: $DIR/inner-attrs.rs:38:20: 43:10 (#0),
+                                span: $DIR/inner-attrs.rs:39:20: 44:10 (#0),
                             },
                             Punct {
                                 ch: ';',
                                 spacing: Alone,
-                                span: $DIR/inner-attrs.rs:43:10: 43:11 (#0),
+                                span: $DIR/inner-attrs.rs:44:10: 44:11 (#0),
                             },
                             Literal {
                                 kind: Integer,
                                 symbol: "0",
                                 suffix: None,
-                                span: $DIR/inner-attrs.rs:44:9: 44:10 (#0),
+                                span: $DIR/inner-attrs.rs:45:9: 45:10 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:37:17: 45:6 (#0),
+                        span: $DIR/inner-attrs.rs:38:17: 46:6 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:37:12: 45:7 (#0),
+                span: $DIR/inner-attrs.rs:38:12: 46:7 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:36:22: 46:2 (#0),
+        span: $DIR/inner-attrs.rs:37:22: 47:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): tuple_attrs
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "tuple_attrs",
-        span: $DIR/inner-attrs.rs:49:29: 49:40 (#0),
+        span: $DIR/inner-attrs.rs:50:29: 50:40 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): (3, 4, { #![cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 });
@@ -728,23 +728,23 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                 kind: Integer,
                 symbol: "3",
                 suffix: None,
-                span: $DIR/inner-attrs.rs:50:9: 50:10 (#0),
+                span: $DIR/inner-attrs.rs:51:9: 51:10 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:50:10: 50:11 (#0),
+                span: $DIR/inner-attrs.rs:51:10: 51:11 (#0),
             },
             Literal {
                 kind: Integer,
                 symbol: "4",
                 suffix: None,
-                span: $DIR/inner-attrs.rs:50:12: 50:13 (#0),
+                span: $DIR/inner-attrs.rs:51:12: 51:13 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:50:13: 50:14 (#0),
+                span: $DIR/inner-attrs.rs:51:13: 51:14 (#0),
             },
             Group {
                 delimiter: Brace,
@@ -752,85 +752,85 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                     Punct {
                         ch: '#',
                         spacing: Joint,
-                        span: $DIR/inner-attrs.rs:51:13: 51:14 (#0),
+                        span: $DIR/inner-attrs.rs:52:13: 52:14 (#0),
                     },
                     Punct {
                         ch: '!',
                         spacing: Alone,
-                        span: $DIR/inner-attrs.rs:51:14: 51:15 (#0),
+                        span: $DIR/inner-attrs.rs:52:14: 52:15 (#0),
                     },
                     Group {
                         delimiter: Bracket,
                         stream: TokenStream [
                             Ident {
                                 ident: "cfg_attr",
-                                span: $DIR/inner-attrs.rs:51:16: 51:24 (#0),
+                                span: $DIR/inner-attrs.rs:52:16: 52:24 (#0),
                             },
                             Group {
                                 delimiter: Parenthesis,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "not",
-                                        span: $DIR/inner-attrs.rs:51:25: 51:28 (#0),
+                                        span: $DIR/inner-attrs.rs:52:25: 52:28 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "FALSE",
-                                                span: $DIR/inner-attrs.rs:51:29: 51:34 (#0),
+                                                span: $DIR/inner-attrs.rs:52:29: 52:34 (#0),
                                             },
                                         ],
-                                        span: $DIR/inner-attrs.rs:51:28: 51:35 (#0),
+                                        span: $DIR/inner-attrs.rs:52:28: 52:35 (#0),
                                     },
                                     Punct {
                                         ch: ',',
                                         spacing: Alone,
-                                        span: $DIR/inner-attrs.rs:51:35: 51:36 (#0),
+                                        span: $DIR/inner-attrs.rs:52:35: 52:36 (#0),
                                     },
                                     Ident {
                                         ident: "rustc_dummy",
-                                        span: $DIR/inner-attrs.rs:51:37: 51:48 (#0),
+                                        span: $DIR/inner-attrs.rs:52:37: 52:48 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "innermost",
-                                                span: $DIR/inner-attrs.rs:51:49: 51:58 (#0),
+                                                span: $DIR/inner-attrs.rs:52:49: 52:58 (#0),
                                             },
                                         ],
-                                        span: $DIR/inner-attrs.rs:51:48: 51:59 (#0),
+                                        span: $DIR/inner-attrs.rs:52:48: 52:59 (#0),
                                     },
                                 ],
-                                span: $DIR/inner-attrs.rs:51:24: 51:60 (#0),
+                                span: $DIR/inner-attrs.rs:52:24: 52:60 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:51:15: 51:61 (#0),
+                        span: $DIR/inner-attrs.rs:52:15: 52:61 (#0),
                     },
                     Literal {
                         kind: Integer,
                         symbol: "5",
                         suffix: None,
-                        span: $DIR/inner-attrs.rs:52:13: 52:14 (#0),
+                        span: $DIR/inner-attrs.rs:53:13: 53:14 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:50:15: 53:10 (#0),
+                span: $DIR/inner-attrs.rs:51:15: 54:10 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:49:43: 54:6 (#0),
+        span: $DIR/inner-attrs.rs:50:43: 55:6 (#0),
     },
     Punct {
         ch: ';',
         spacing: Alone,
-        span: $DIR/inner-attrs.rs:54:6: 54:7 (#0),
+        span: $DIR/inner-attrs.rs:55:6: 55:7 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): tuple_attrs
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "tuple_attrs",
-        span: $DIR/inner-attrs.rs:56:29: 56:40 (#0),
+        span: $DIR/inner-attrs.rs:57:29: 57:40 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): (3, 4, { #![cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 });
@@ -844,23 +844,23 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                 kind: Integer,
                 symbol: "3",
                 suffix: None,
-                span: $DIR/inner-attrs.rs:57:9: 57:10 (#0),
+                span: $DIR/inner-attrs.rs:58:9: 58:10 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:57:10: 57:11 (#0),
+                span: $DIR/inner-attrs.rs:58:10: 58:11 (#0),
             },
             Literal {
                 kind: Integer,
                 symbol: "4",
                 suffix: None,
-                span: $DIR/inner-attrs.rs:57:12: 57:13 (#0),
+                span: $DIR/inner-attrs.rs:58:12: 58:13 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:57:13: 57:14 (#0),
+                span: $DIR/inner-attrs.rs:58:13: 58:14 (#0),
             },
             Group {
                 delimiter: Brace,
@@ -868,105 +868,105 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                     Punct {
                         ch: '#',
                         spacing: Joint,
-                        span: $DIR/inner-attrs.rs:58:13: 58:14 (#0),
+                        span: $DIR/inner-attrs.rs:59:13: 59:14 (#0),
                     },
                     Punct {
                         ch: '!',
                         spacing: Alone,
-                        span: $DIR/inner-attrs.rs:58:14: 58:15 (#0),
+                        span: $DIR/inner-attrs.rs:59:14: 59:15 (#0),
                     },
                     Group {
                         delimiter: Bracket,
                         stream: TokenStream [
                             Ident {
                                 ident: "cfg_attr",
-                                span: $DIR/inner-attrs.rs:58:16: 58:24 (#0),
+                                span: $DIR/inner-attrs.rs:59:16: 59:24 (#0),
                             },
                             Group {
                                 delimiter: Parenthesis,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "not",
-                                        span: $DIR/inner-attrs.rs:58:25: 58:28 (#0),
+                                        span: $DIR/inner-attrs.rs:59:25: 59:28 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "FALSE",
-                                                span: $DIR/inner-attrs.rs:58:29: 58:34 (#0),
+                                                span: $DIR/inner-attrs.rs:59:29: 59:34 (#0),
                                             },
                                         ],
-                                        span: $DIR/inner-attrs.rs:58:28: 58:35 (#0),
+                                        span: $DIR/inner-attrs.rs:59:28: 59:35 (#0),
                                     },
                                     Punct {
                                         ch: ',',
                                         spacing: Alone,
-                                        span: $DIR/inner-attrs.rs:58:35: 58:36 (#0),
+                                        span: $DIR/inner-attrs.rs:59:35: 59:36 (#0),
                                     },
                                     Ident {
                                         ident: "rustc_dummy",
-                                        span: $DIR/inner-attrs.rs:58:37: 58:48 (#0),
+                                        span: $DIR/inner-attrs.rs:59:37: 59:48 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "innermost",
-                                                span: $DIR/inner-attrs.rs:58:49: 58:58 (#0),
+                                                span: $DIR/inner-attrs.rs:59:49: 59:58 (#0),
                                             },
                                         ],
-                                        span: $DIR/inner-attrs.rs:58:48: 58:59 (#0),
+                                        span: $DIR/inner-attrs.rs:59:48: 59:59 (#0),
                                     },
                                 ],
-                                span: $DIR/inner-attrs.rs:58:24: 58:60 (#0),
+                                span: $DIR/inner-attrs.rs:59:24: 59:60 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:58:15: 58:61 (#0),
+                        span: $DIR/inner-attrs.rs:59:15: 59:61 (#0),
                     },
                     Literal {
                         kind: Integer,
                         symbol: "5",
                         suffix: None,
-                        span: $DIR/inner-attrs.rs:59:13: 59:14 (#0),
+                        span: $DIR/inner-attrs.rs:60:13: 60:14 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:57:15: 60:10 (#0),
+                span: $DIR/inner-attrs.rs:58:15: 61:10 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:56:43: 61:6 (#0),
+        span: $DIR/inner-attrs.rs:57:43: 62:6 (#0),
     },
     Punct {
         ch: ';',
         spacing: Alone,
-        span: $DIR/inner-attrs.rs:61:6: 61:7 (#0),
+        span: $DIR/inner-attrs.rs:62:6: 62:7 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): tenth
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "tenth",
-        span: $DIR/inner-attrs.rs:83:42: 83:47 (#0),
+        span: $DIR/inner-attrs.rs:84:42: 84:47 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): fn weird_extern() {}
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "fn",
-        span: $DIR/inner-attrs.rs:82:5: 82:7 (#0),
+        span: $DIR/inner-attrs.rs:83:5: 83:7 (#0),
     },
     Ident {
         ident: "weird_extern",
-        span: $DIR/inner-attrs.rs:82:8: 82:20 (#0),
+        span: $DIR/inner-attrs.rs:83:8: 83:20 (#0),
     },
     Group {
         delimiter: Parenthesis,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:82:20: 82:22 (#0),
+        span: $DIR/inner-attrs.rs:83:20: 83:22 (#0),
     },
     Group {
         delimiter: Brace,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:82:23: 84:6 (#0),
+        span: $DIR/inner-attrs.rs:83:23: 85:6 (#0),
     },
 ]
diff --git a/tests/ui/proc-macro/issue-75930-derive-cfg.rs b/tests/ui/proc-macro/issue-75930-derive-cfg.rs
index e0213527c50..1e37b40c954 100644
--- a/tests/ui/proc-macro/issue-75930-derive-cfg.rs
+++ b/tests/ui/proc-macro/issue-75930-derive-cfg.rs
@@ -1,13 +1,10 @@
 // check-pass
-// compile-flags: -Z span-debug --error-format human
+// compile-flags: -Z span-debug
 // aux-build:test-macros.rs
 
 // Regression test for issue #75930
 // Tests that we cfg-strip all targets before invoking
 // a derive macro
-// We need '--error-format human' to stop compiletest from
-// trying to interpret proc-macro output as JSON messages
-// (a pretty-printed struct may cause a line to start with '{' )
 // FIXME: We currently lose spans here (see issue #43081)
 
 #![no_std] // Don't load unnecessary hygiene information from std
@@ -47,6 +44,8 @@ extern crate test_macros;
 // that kind of correction caused the problem seen in #76399, so maybe not.
 
 #[print_helper(a)] //~ WARN derive helper attribute is used before it is introduced
+                   //~| WARN derive helper attribute is used before it is introduced
+                   //~| WARN this was previously accepted
                    //~| WARN this was previously accepted
 #[cfg_attr(not(FALSE), allow(dead_code))]
 #[print_attr]
diff --git a/tests/ui/proc-macro/issue-75930-derive-cfg.stderr b/tests/ui/proc-macro/issue-75930-derive-cfg.stderr
index 1017745de6f..df1e36d7390 100644
--- a/tests/ui/proc-macro/issue-75930-derive-cfg.stderr
+++ b/tests/ui/proc-macro/issue-75930-derive-cfg.stderr
@@ -1,5 +1,5 @@
 warning: derive helper attribute is used before it is introduced
-  --> $DIR/issue-75930-derive-cfg.rs:49:3
+  --> $DIR/issue-75930-derive-cfg.rs:46:3
    |
 LL | #[print_helper(a)]
    |   ^^^^^^^^^^^^
@@ -12,7 +12,7 @@ LL | #[derive(Print)]
    = note: `#[warn(legacy_derive_helpers)]` on by default
 
 warning: derive helper attribute is used before it is introduced
-  --> $DIR/issue-75930-derive-cfg.rs:49:3
+  --> $DIR/issue-75930-derive-cfg.rs:46:3
    |
 LL | #[print_helper(a)]
    |   ^^^^^^^^^^^^
diff --git a/tests/ui/proc-macro/issue-75930-derive-cfg.stdout b/tests/ui/proc-macro/issue-75930-derive-cfg.stdout
index 47f26451d1c..093e37f8a8d 100644
--- a/tests/ui/proc-macro/issue-75930-derive-cfg.stdout
+++ b/tests/ui/proc-macro/issue-75930-derive-cfg.stdout
@@ -74,158 +74,158 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
     Punct {
         ch: '#',
         spacing: Alone,
-        span: $DIR/issue-75930-derive-cfg.rs:49:1: 49:2 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:46:1: 46:2 (#0),
     },
     Group {
         delimiter: Bracket,
         stream: TokenStream [
             Ident {
                 ident: "print_helper",
-                span: $DIR/issue-75930-derive-cfg.rs:49:3: 49:15 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:46:3: 46:15 (#0),
             },
             Group {
                 delimiter: Parenthesis,
                 stream: TokenStream [
                     Ident {
                         ident: "a",
-                        span: $DIR/issue-75930-derive-cfg.rs:49:16: 49:17 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:46:16: 46:17 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:49:15: 49:18 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:46:15: 46:18 (#0),
             },
         ],
-        span: $DIR/issue-75930-derive-cfg.rs:49:2: 49:19 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:46:2: 46:19 (#0),
     },
     Punct {
         ch: '#',
         spacing: Alone,
-        span: $DIR/issue-75930-derive-cfg.rs:51:1: 51:2 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:50:1: 50:2 (#0),
     },
     Group {
         delimiter: Bracket,
         stream: TokenStream [
             Ident {
                 ident: "allow",
-                span: $DIR/issue-75930-derive-cfg.rs:51:24: 51:29 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:50:24: 50:29 (#0),
             },
             Group {
                 delimiter: Parenthesis,
                 stream: TokenStream [
                     Ident {
                         ident: "dead_code",
-                        span: $DIR/issue-75930-derive-cfg.rs:51:30: 51:39 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:50:30: 50:39 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:51:29: 51:40 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:50:29: 50:40 (#0),
             },
         ],
-        span: $DIR/issue-75930-derive-cfg.rs:51:1: 51:2 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:50:1: 50:2 (#0),
     },
     Punct {
         ch: '#',
         spacing: Alone,
-        span: $DIR/issue-75930-derive-cfg.rs:53:1: 53:2 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:52:1: 52:2 (#0),
     },
     Group {
         delimiter: Bracket,
         stream: TokenStream [
             Ident {
                 ident: "derive",
-                span: $DIR/issue-75930-derive-cfg.rs:53:3: 53:9 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:52:3: 52:9 (#0),
             },
             Group {
                 delimiter: Parenthesis,
                 stream: TokenStream [
                     Ident {
                         ident: "Print",
-                        span: $DIR/issue-75930-derive-cfg.rs:53:10: 53:15 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:52:10: 52:15 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:53:9: 53:16 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:52:9: 52:16 (#0),
             },
         ],
-        span: $DIR/issue-75930-derive-cfg.rs:53:2: 53:17 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:52:2: 52:17 (#0),
     },
     Punct {
         ch: '#',
         spacing: Alone,
-        span: $DIR/issue-75930-derive-cfg.rs:54:1: 54:2 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:53:1: 53:2 (#0),
     },
     Group {
         delimiter: Bracket,
         stream: TokenStream [
             Ident {
                 ident: "print_helper",
-                span: $DIR/issue-75930-derive-cfg.rs:54:3: 54:15 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:53:3: 53:15 (#0),
             },
             Group {
                 delimiter: Parenthesis,
                 stream: TokenStream [
                     Ident {
                         ident: "b",
-                        span: $DIR/issue-75930-derive-cfg.rs:54:16: 54:17 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:53:16: 53:17 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:54:15: 54:18 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:53:15: 53:18 (#0),
             },
         ],
-        span: $DIR/issue-75930-derive-cfg.rs:54:2: 54:19 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:53:2: 53:19 (#0),
     },
     Ident {
         ident: "struct",
-        span: $DIR/issue-75930-derive-cfg.rs:55:1: 55:7 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:1: 54:7 (#0),
     },
     Ident {
         ident: "Foo",
-        span: $DIR/issue-75930-derive-cfg.rs:55:8: 55:11 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:8: 54:11 (#0),
     },
     Punct {
         ch: '<',
         spacing: Joint,
-        span: $DIR/issue-75930-derive-cfg.rs:55:11: 55:12 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:11: 54:12 (#0),
     },
     Punct {
         ch: '#',
         spacing: Alone,
-        span: $DIR/issue-75930-derive-cfg.rs:55:12: 55:13 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:12: 54:13 (#0),
     },
     Group {
         delimiter: Bracket,
         stream: TokenStream [
             Ident {
                 ident: "cfg",
-                span: $DIR/issue-75930-derive-cfg.rs:55:14: 55:17 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:54:14: 54:17 (#0),
             },
             Group {
                 delimiter: Parenthesis,
                 stream: TokenStream [
                     Ident {
                         ident: "FALSE",
-                        span: $DIR/issue-75930-derive-cfg.rs:55:18: 55:23 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:54:18: 54:23 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:55:17: 55:24 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:54:17: 54:24 (#0),
             },
         ],
-        span: $DIR/issue-75930-derive-cfg.rs:55:13: 55:25 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:13: 54:25 (#0),
     },
     Ident {
         ident: "A",
-        span: $DIR/issue-75930-derive-cfg.rs:55:26: 55:27 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:26: 54:27 (#0),
     },
     Punct {
         ch: ',',
         spacing: Alone,
-        span: $DIR/issue-75930-derive-cfg.rs:55:27: 55:28 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:27: 54:28 (#0),
     },
     Ident {
         ident: "B",
-        span: $DIR/issue-75930-derive-cfg.rs:55:29: 55:30 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:29: 54:30 (#0),
     },
     Punct {
         ch: '>',
         spacing: Alone,
-        span: $DIR/issue-75930-derive-cfg.rs:55:30: 55:31 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:30: 54:31 (#0),
     },
     Group {
         delimiter: Brace,
@@ -233,128 +233,128 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:56:5: 56:6 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:55:5: 55:6 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "cfg",
-                        span: $DIR/issue-75930-derive-cfg.rs:56:7: 56:10 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:55:7: 55:10 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "FALSE",
-                                span: $DIR/issue-75930-derive-cfg.rs:56:11: 56:16 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:55:11: 55:16 (#0),
                             },
                         ],
-                        span: $DIR/issue-75930-derive-cfg.rs:56:10: 56:17 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:55:10: 55:17 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:56:6: 56:18 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:55:6: 55:18 (#0),
             },
             Ident {
                 ident: "first",
-                span: $DIR/issue-75930-derive-cfg.rs:56:19: 56:24 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:55:19: 55:24 (#0),
             },
             Punct {
                 ch: ':',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:56:24: 56:25 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:55:24: 55:25 (#0),
             },
             Ident {
                 ident: "String",
-                span: $DIR/issue-75930-derive-cfg.rs:56:26: 56:32 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:55:26: 55:32 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:56:32: 56:33 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:55:32: 55:33 (#0),
             },
             Punct {
                 ch: '#',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:57:5: 57:6 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:56:5: 56:6 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "cfg_attr",
-                        span: $DIR/issue-75930-derive-cfg.rs:57:7: 57:15 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:56:7: 56:15 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "FALSE",
-                                span: $DIR/issue-75930-derive-cfg.rs:57:16: 57:21 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:56:16: 56:21 (#0),
                             },
                             Punct {
                                 ch: ',',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:57:21: 57:22 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:56:21: 56:22 (#0),
                             },
                             Ident {
                                 ident: "deny",
-                                span: $DIR/issue-75930-derive-cfg.rs:57:23: 57:27 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:56:23: 56:27 (#0),
                             },
                             Group {
                                 delimiter: Parenthesis,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "warnings",
-                                        span: $DIR/issue-75930-derive-cfg.rs:57:28: 57:36 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:56:28: 56:36 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:57:27: 57:37 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:56:27: 56:37 (#0),
                             },
                         ],
-                        span: $DIR/issue-75930-derive-cfg.rs:57:15: 57:38 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:56:15: 56:38 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:57:6: 57:39 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:56:6: 56:39 (#0),
             },
             Ident {
                 ident: "second",
-                span: $DIR/issue-75930-derive-cfg.rs:57:40: 57:46 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:56:40: 56:46 (#0),
             },
             Punct {
                 ch: ':',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:57:46: 57:47 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:56:46: 56:47 (#0),
             },
             Ident {
                 ident: "bool",
-                span: $DIR/issue-75930-derive-cfg.rs:57:48: 57:52 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:56:48: 56:52 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:57:52: 57:53 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:56:52: 56:53 (#0),
             },
             Ident {
                 ident: "third",
-                span: $DIR/issue-75930-derive-cfg.rs:58:5: 58:10 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:57:5: 57:10 (#0),
             },
             Punct {
                 ch: ':',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:58:10: 58:11 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:57:10: 57:11 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "u8",
-                        span: $DIR/issue-75930-derive-cfg.rs:58:13: 58:15 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:57:13: 57:15 (#0),
                     },
                     Punct {
                         ch: ';',
                         spacing: Alone,
-                        span: $DIR/issue-75930-derive-cfg.rs:58:15: 58:16 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:57:15: 57:16 (#0),
                     },
                     Group {
                         delimiter: Brace,
@@ -362,145 +362,145 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                             Punct {
                                 ch: '#',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:59:9: 59:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:58:9: 58:10 (#0),
                             },
                             Group {
                                 delimiter: Bracket,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "cfg",
-                                        span: $DIR/issue-75930-derive-cfg.rs:59:11: 59:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:58:11: 58:14 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "FALSE",
-                                                span: $DIR/issue-75930-derive-cfg.rs:59:15: 59:20 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:58:15: 58:20 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:59:14: 59:21 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:58:14: 58:21 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:59:10: 59:22 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:58:10: 58:22 (#0),
                             },
                             Ident {
                                 ident: "struct",
-                                span: $DIR/issue-75930-derive-cfg.rs:59:23: 59:29 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:58:23: 58:29 (#0),
                             },
                             Ident {
                                 ident: "Bar",
-                                span: $DIR/issue-75930-derive-cfg.rs:59:30: 59:33 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:58:30: 58:33 (#0),
                             },
                             Punct {
                                 ch: ';',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:59:33: 59:34 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:58:33: 58:34 (#0),
                             },
                             Punct {
                                 ch: '#',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:60:9: 60:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:59:9: 59:10 (#0),
                             },
                             Group {
                                 delimiter: Bracket,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "cfg",
-                                        span: $DIR/issue-75930-derive-cfg.rs:60:11: 60:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:59:11: 59:14 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "not",
-                                                span: $DIR/issue-75930-derive-cfg.rs:60:15: 60:18 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:59:15: 59:18 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "FALSE",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:60:19: 60:24 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:59:19: 59:24 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:60:18: 60:25 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:59:18: 59:25 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:60:14: 60:26 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:59:14: 59:26 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:60:10: 60:27 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:59:10: 59:27 (#0),
                             },
                             Ident {
                                 ident: "struct",
-                                span: $DIR/issue-75930-derive-cfg.rs:60:28: 60:34 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:59:28: 59:34 (#0),
                             },
                             Ident {
                                 ident: "Inner",
-                                span: $DIR/issue-75930-derive-cfg.rs:60:35: 60:40 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:59:35: 59:40 (#0),
                             },
                             Punct {
                                 ch: ';',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:60:40: 60:41 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:59:40: 59:41 (#0),
                             },
                             Punct {
                                 ch: '#',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:61:9: 61:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:60:9: 60:10 (#0),
                             },
                             Group {
                                 delimiter: Bracket,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "cfg",
-                                        span: $DIR/issue-75930-derive-cfg.rs:61:11: 61:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:60:11: 60:14 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "FALSE",
-                                                span: $DIR/issue-75930-derive-cfg.rs:61:15: 61:20 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:60:15: 60:20 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:61:14: 61:21 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:60:14: 60:21 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:61:10: 61:22 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:60:10: 60:22 (#0),
                             },
                             Ident {
                                 ident: "let",
-                                span: $DIR/issue-75930-derive-cfg.rs:61:23: 61:26 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:60:23: 60:26 (#0),
                             },
                             Ident {
                                 ident: "a",
-                                span: $DIR/issue-75930-derive-cfg.rs:61:27: 61:28 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:60:27: 60:28 (#0),
                             },
                             Punct {
                                 ch: '=',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:61:29: 61:30 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:60:29: 60:30 (#0),
                             },
                             Literal {
                                 kind: Integer,
                                 symbol: "25",
                                 suffix: None,
-                                span: $DIR/issue-75930-derive-cfg.rs:61:31: 61:33 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:60:31: 60:33 (#0),
                             },
                             Punct {
                                 ch: ';',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:61:33: 61:34 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:60:33: 60:34 (#0),
                             },
                             Ident {
                                 ident: "match",
-                                span: $DIR/issue-75930-derive-cfg.rs:62:9: 62:14 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:61:9: 61:14 (#0),
                             },
                             Ident {
                                 ident: "true",
-                                span: $DIR/issue-75930-derive-cfg.rs:62:15: 62:19 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:61:15: 61:19 (#0),
                             },
                             Group {
                                 delimiter: Brace,
@@ -508,194 +508,194 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                                     Punct {
                                         ch: '#',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:63:13: 63:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:62:13: 62:14 (#0),
                                     },
                                     Group {
                                         delimiter: Bracket,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "cfg",
-                                                span: $DIR/issue-75930-derive-cfg.rs:63:15: 63:18 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:62:15: 62:18 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "FALSE",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:63:19: 63:24 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:62:19: 62:24 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:63:18: 63:25 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:62:18: 62:25 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:63:14: 63:26 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:62:14: 62:26 (#0),
                                     },
                                     Ident {
                                         ident: "true",
-                                        span: $DIR/issue-75930-derive-cfg.rs:63:27: 63:31 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:62:27: 62:31 (#0),
                                     },
                                     Punct {
                                         ch: '=',
                                         spacing: Joint,
-                                        span: $DIR/issue-75930-derive-cfg.rs:63:32: 63:33 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:62:32: 62:33 (#0),
                                     },
                                     Punct {
                                         ch: '>',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:63:33: 63:34 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:62:33: 62:34 (#0),
                                     },
                                     Group {
                                         delimiter: Brace,
                                         stream: TokenStream [],
-                                        span: $DIR/issue-75930-derive-cfg.rs:63:35: 63:37 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:62:35: 62:37 (#0),
                                     },
                                     Punct {
                                         ch: ',',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:63:37: 63:38 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:62:37: 62:38 (#0),
                                     },
                                     Punct {
                                         ch: '#',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:13: 64:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:13: 63:14 (#0),
                                     },
                                     Group {
                                         delimiter: Bracket,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "cfg_attr",
-                                                span: $DIR/issue-75930-derive-cfg.rs:64:15: 64:23 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:63:15: 63:23 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "not",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:64:24: 64:27 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:63:24: 63:27 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "FALSE",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:64:28: 64:33 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:63:28: 63:33 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:64:27: 64:34 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:63:27: 63:34 (#0),
                                                     },
                                                     Punct {
                                                         ch: ',',
                                                         spacing: Alone,
-                                                        span: $DIR/issue-75930-derive-cfg.rs:64:34: 64:35 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:63:34: 63:35 (#0),
                                                     },
                                                     Ident {
                                                         ident: "allow",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:64:36: 64:41 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:63:36: 63:41 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "warnings",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:64:42: 64:50 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:63:42: 63:50 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:64:41: 64:51 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:63:41: 63:51 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:64:23: 64:52 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:63:23: 63:52 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:14: 64:53 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:14: 63:53 (#0),
                                     },
                                     Ident {
                                         ident: "false",
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:54: 64:59 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:54: 63:59 (#0),
                                     },
                                     Punct {
                                         ch: '=',
                                         spacing: Joint,
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:60: 64:61 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:60: 63:61 (#0),
                                     },
                                     Punct {
                                         ch: '>',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:61: 64:62 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:61: 63:62 (#0),
                                     },
                                     Group {
                                         delimiter: Brace,
                                         stream: TokenStream [],
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:63: 64:65 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:63: 63:65 (#0),
                                     },
                                     Punct {
                                         ch: ',',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:65: 64:66 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:65: 63:66 (#0),
                                     },
                                     Ident {
                                         ident: "_",
-                                        span: $DIR/issue-75930-derive-cfg.rs:65:13: 65:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:64:13: 64:14 (#0),
                                     },
                                     Punct {
                                         ch: '=',
                                         spacing: Joint,
-                                        span: $DIR/issue-75930-derive-cfg.rs:65:15: 65:16 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:64:15: 64:16 (#0),
                                     },
                                     Punct {
                                         ch: '>',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:65:16: 65:17 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:64:16: 64:17 (#0),
                                     },
                                     Group {
                                         delimiter: Brace,
                                         stream: TokenStream [],
-                                        span: $DIR/issue-75930-derive-cfg.rs:65:18: 65:20 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:64:18: 64:20 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:62:20: 66:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:61:20: 65:10 (#0),
                             },
                             Punct {
                                 ch: ';',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:66:10: 66:11 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:65:10: 65:11 (#0),
                             },
                             Punct {
                                 ch: '#',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:68:9: 68:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:67:9: 67:10 (#0),
                             },
                             Group {
                                 delimiter: Bracket,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "print_helper",
-                                        span: $DIR/issue-75930-derive-cfg.rs:68:11: 68:23 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:67:11: 67:23 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "should_be_removed",
-                                                span: $DIR/issue-75930-derive-cfg.rs:68:24: 68:41 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:67:24: 67:41 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:68:23: 68:42 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:67:23: 67:42 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:68:10: 68:43 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:67:10: 67:43 (#0),
                             },
                             Ident {
                                 ident: "fn",
-                                span: $DIR/issue-75930-derive-cfg.rs:69:9: 69:11 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:68:9: 68:11 (#0),
                             },
                             Ident {
                                 ident: "removed_fn",
-                                span: $DIR/issue-75930-derive-cfg.rs:69:12: 69:22 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:68:12: 68:22 (#0),
                             },
                             Group {
                                 delimiter: Parenthesis,
                                 stream: TokenStream [],
-                                span: $DIR/issue-75930-derive-cfg.rs:69:22: 69:24 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:68:22: 68:24 (#0),
                             },
                             Group {
                                 delimiter: Brace,
@@ -703,108 +703,108 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                                     Punct {
                                         ch: '#',
                                         spacing: Joint,
-                                        span: $DIR/issue-75930-derive-cfg.rs:70:13: 70:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:69:13: 69:14 (#0),
                                     },
                                     Punct {
                                         ch: '!',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:70:14: 70:15 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:69:14: 69:15 (#0),
                                     },
                                     Group {
                                         delimiter: Bracket,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "cfg",
-                                                span: $DIR/issue-75930-derive-cfg.rs:70:16: 70:19 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:69:16: 69:19 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "FALSE",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:70:20: 70:25 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:69:20: 69:25 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:70:19: 70:26 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:69:19: 69:26 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:70:15: 70:27 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:69:15: 69:27 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:69:25: 71:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:68:25: 70:10 (#0),
                             },
                             Punct {
                                 ch: '#',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:73:9: 73:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:9: 72:10 (#0),
                             },
                             Group {
                                 delimiter: Bracket,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "print_helper",
-                                        span: $DIR/issue-75930-derive-cfg.rs:73:11: 73:23 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:72:11: 72:23 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "c",
-                                                span: $DIR/issue-75930-derive-cfg.rs:73:24: 73:25 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:72:24: 72:25 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:73:23: 73:26 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:72:23: 72:26 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:73:10: 73:27 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:10: 72:27 (#0),
                             },
                             Punct {
                                 ch: '#',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:73:28: 73:29 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:28: 72:29 (#0),
                             },
                             Group {
                                 delimiter: Bracket,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "cfg",
-                                        span: $DIR/issue-75930-derive-cfg.rs:73:30: 73:33 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:72:30: 72:33 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "not",
-                                                span: $DIR/issue-75930-derive-cfg.rs:73:34: 73:37 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:72:34: 72:37 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "FALSE",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:73:38: 73:43 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:72:38: 72:43 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:73:37: 73:44 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:72:37: 72:44 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:73:33: 73:45 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:72:33: 72:45 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:73:29: 73:46 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:29: 72:46 (#0),
                             },
                             Ident {
                                 ident: "fn",
-                                span: $DIR/issue-75930-derive-cfg.rs:73:47: 73:49 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:47: 72:49 (#0),
                             },
                             Ident {
                                 ident: "kept_fn",
-                                span: $DIR/issue-75930-derive-cfg.rs:73:50: 73:57 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:50: 72:57 (#0),
                             },
                             Group {
                                 delimiter: Parenthesis,
                                 stream: TokenStream [],
-                                span: $DIR/issue-75930-derive-cfg.rs:73:57: 73:59 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:57: 72:59 (#0),
                             },
                             Group {
                                 delimiter: Brace,
@@ -812,82 +812,82 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                                     Punct {
                                         ch: '#',
                                         spacing: Joint,
-                                        span: $DIR/issue-75930-derive-cfg.rs:74:13: 74:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:73:13: 73:14 (#0),
                                     },
                                     Punct {
                                         ch: '!',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:74:14: 74:15 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:73:14: 73:15 (#0),
                                     },
                                     Group {
                                         delimiter: Bracket,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "cfg",
-                                                span: $DIR/issue-75930-derive-cfg.rs:74:16: 74:19 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:73:16: 73:19 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "not",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:74:20: 74:23 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:73:20: 73:23 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "FALSE",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:74:24: 74:29 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:73:24: 73:29 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:74:23: 74:30 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:73:23: 73:30 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:74:19: 74:31 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:73:19: 73:31 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:74:15: 74:32 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:73:15: 73:32 (#0),
                                     },
                                     Ident {
                                         ident: "let",
-                                        span: $DIR/issue-75930-derive-cfg.rs:75:13: 75:16 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:74:13: 74:16 (#0),
                                     },
                                     Ident {
                                         ident: "my_val",
-                                        span: $DIR/issue-75930-derive-cfg.rs:75:17: 75:23 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:74:17: 74:23 (#0),
                                     },
                                     Punct {
                                         ch: '=',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:75:24: 75:25 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:74:24: 74:25 (#0),
                                     },
                                     Ident {
                                         ident: "true",
-                                        span: $DIR/issue-75930-derive-cfg.rs:75:26: 75:30 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:74:26: 74:30 (#0),
                                     },
                                     Punct {
                                         ch: ';',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:75:30: 75:31 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:74:30: 74:31 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:73:60: 76:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:60: 75:10 (#0),
                             },
                             Ident {
                                 ident: "enum",
-                                span: $DIR/issue-75930-derive-cfg.rs:78:9: 78:13 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:77:9: 77:13 (#0),
                             },
                             Ident {
                                 ident: "TupleEnum",
-                                span: $DIR/issue-75930-derive-cfg.rs:78:14: 78:23 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:77:14: 77:23 (#0),
                             },
                             Group {
                                 delimiter: Brace,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "Foo",
-                                        span: $DIR/issue-75930-derive-cfg.rs:79:13: 79:16 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:78:13: 78:16 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
@@ -895,166 +895,166 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                                             Punct {
                                                 ch: '#',
                                                 spacing: Alone,
-                                                span: $DIR/issue-75930-derive-cfg.rs:80:17: 80:18 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:79:17: 79:18 (#0),
                                             },
                                             Group {
                                                 delimiter: Bracket,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "cfg",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:80:19: 80:22 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:79:19: 79:22 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "FALSE",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:80:23: 80:28 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:79:23: 79:28 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:80:22: 80:29 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:79:22: 79:29 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:80:18: 80:30 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:79:18: 79:30 (#0),
                                             },
                                             Ident {
                                                 ident: "u8",
-                                                span: $DIR/issue-75930-derive-cfg.rs:80:31: 80:33 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:79:31: 79:33 (#0),
                                             },
                                             Punct {
                                                 ch: ',',
                                                 spacing: Alone,
-                                                span: $DIR/issue-75930-derive-cfg.rs:80:33: 80:34 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:79:33: 79:34 (#0),
                                             },
                                             Punct {
                                                 ch: '#',
                                                 spacing: Alone,
-                                                span: $DIR/issue-75930-derive-cfg.rs:81:17: 81:18 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:80:17: 80:18 (#0),
                                             },
                                             Group {
                                                 delimiter: Bracket,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "cfg",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:81:19: 81:22 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:80:19: 80:22 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "FALSE",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:81:23: 81:28 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:80:23: 80:28 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:81:22: 81:29 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:80:22: 80:29 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:81:18: 81:30 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:80:18: 80:30 (#0),
                                             },
                                             Ident {
                                                 ident: "bool",
-                                                span: $DIR/issue-75930-derive-cfg.rs:81:31: 81:35 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:80:31: 80:35 (#0),
                                             },
                                             Punct {
                                                 ch: ',',
                                                 spacing: Alone,
-                                                span: $DIR/issue-75930-derive-cfg.rs:81:35: 81:36 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:80:35: 80:36 (#0),
                                             },
                                             Punct {
                                                 ch: '#',
                                                 spacing: Alone,
-                                                span: $DIR/issue-75930-derive-cfg.rs:82:17: 82:18 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:81:17: 81:18 (#0),
                                             },
                                             Group {
                                                 delimiter: Bracket,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "cfg",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:82:19: 82:22 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:81:19: 81:22 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "not",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:82:23: 82:26 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:81:23: 81:26 (#0),
                                                             },
                                                             Group {
                                                                 delimiter: Parenthesis,
                                                                 stream: TokenStream [
                                                                     Ident {
                                                                         ident: "FALSE",
-                                                                        span: $DIR/issue-75930-derive-cfg.rs:82:27: 82:32 (#0),
+                                                                        span: $DIR/issue-75930-derive-cfg.rs:81:27: 81:32 (#0),
                                                                     },
                                                                 ],
-                                                                span: $DIR/issue-75930-derive-cfg.rs:82:26: 82:33 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:81:26: 81:33 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:82:22: 82:34 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:81:22: 81:34 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:82:18: 82:35 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:81:18: 81:35 (#0),
                                             },
                                             Ident {
                                                 ident: "i32",
-                                                span: $DIR/issue-75930-derive-cfg.rs:82:36: 82:39 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:81:36: 81:39 (#0),
                                             },
                                             Punct {
                                                 ch: ',',
                                                 spacing: Alone,
-                                                span: $DIR/issue-75930-derive-cfg.rs:82:39: 82:40 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:81:39: 81:40 (#0),
                                             },
                                             Punct {
                                                 ch: '#',
                                                 spacing: Alone,
-                                                span: $DIR/issue-75930-derive-cfg.rs:83:17: 83:18 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:82:17: 82:18 (#0),
                                             },
                                             Group {
                                                 delimiter: Bracket,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "cfg",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:83:19: 83:22 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:82:19: 82:22 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "FALSE",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:83:23: 83:28 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:82:23: 82:28 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:83:22: 83:29 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:82:22: 82:29 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:83:18: 83:30 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:82:18: 82:30 (#0),
                                             },
                                             Ident {
                                                 ident: "String",
-                                                span: $DIR/issue-75930-derive-cfg.rs:83:31: 83:37 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:82:31: 82:37 (#0),
                                             },
                                             Punct {
                                                 ch: ',',
                                                 spacing: Alone,
-                                                span: $DIR/issue-75930-derive-cfg.rs:83:37: 83:38 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:82:37: 82:38 (#0),
                                             },
                                             Ident {
                                                 ident: "u8",
-                                                span: $DIR/issue-75930-derive-cfg.rs:83:39: 83:41 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:82:39: 82:41 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:79:16: 84:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:78:16: 83:14 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:78:24: 85:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:77:24: 84:10 (#0),
                             },
                             Ident {
                                 ident: "struct",
-                                span: $DIR/issue-75930-derive-cfg.rs:87:9: 87:15 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:86:9: 86:15 (#0),
                             },
                             Ident {
                                 ident: "TupleStruct",
-                                span: $DIR/issue-75930-derive-cfg.rs:87:16: 87:27 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:86:16: 86:27 (#0),
                             },
                             Group {
                                 delimiter: Parenthesis,
@@ -1062,139 +1062,139 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                                     Punct {
                                         ch: '#',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:88:13: 88:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:87:13: 87:14 (#0),
                                     },
                                     Group {
                                         delimiter: Bracket,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "cfg",
-                                                span: $DIR/issue-75930-derive-cfg.rs:88:15: 88:18 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:87:15: 87:18 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "FALSE",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:88:19: 88:24 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:87:19: 87:24 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:88:18: 88:25 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:87:18: 87:25 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:88:14: 88:26 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:87:14: 87:26 (#0),
                                     },
                                     Ident {
                                         ident: "String",
-                                        span: $DIR/issue-75930-derive-cfg.rs:88:27: 88:33 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:87:27: 87:33 (#0),
                                     },
                                     Punct {
                                         ch: ',',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:88:33: 88:34 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:87:33: 87:34 (#0),
                                     },
                                     Punct {
                                         ch: '#',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:89:13: 89:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:88:13: 88:14 (#0),
                                     },
                                     Group {
                                         delimiter: Bracket,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "cfg",
-                                                span: $DIR/issue-75930-derive-cfg.rs:89:15: 89:18 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:88:15: 88:18 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "not",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:89:19: 89:22 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:88:19: 88:22 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "FALSE",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:89:23: 89:28 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:88:23: 88:28 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:89:22: 89:29 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:88:22: 88:29 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:89:18: 89:30 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:88:18: 88:30 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:89:14: 89:31 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:88:14: 88:31 (#0),
                                     },
                                     Ident {
                                         ident: "i32",
-                                        span: $DIR/issue-75930-derive-cfg.rs:89:32: 89:35 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:88:32: 88:35 (#0),
                                     },
                                     Punct {
                                         ch: ',',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:89:35: 89:36 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:88:35: 88:36 (#0),
                                     },
                                     Punct {
                                         ch: '#',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:90:13: 90:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:89:13: 89:14 (#0),
                                     },
                                     Group {
                                         delimiter: Bracket,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "cfg",
-                                                span: $DIR/issue-75930-derive-cfg.rs:90:15: 90:18 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:89:15: 89:18 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "FALSE",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:90:19: 90:24 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:89:19: 89:24 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:90:18: 90:25 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:89:18: 89:25 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:90:14: 90:26 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:89:14: 89:26 (#0),
                                     },
                                     Ident {
                                         ident: "bool",
-                                        span: $DIR/issue-75930-derive-cfg.rs:90:27: 90:31 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:89:27: 89:31 (#0),
                                     },
                                     Punct {
                                         ch: ',',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:90:31: 90:32 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:89:31: 89:32 (#0),
                                     },
                                     Ident {
                                         ident: "u8",
-                                        span: $DIR/issue-75930-derive-cfg.rs:91:13: 91:15 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:90:13: 90:15 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:87:27: 92:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:86:27: 91:10 (#0),
                             },
                             Punct {
                                 ch: ';',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:92:10: 92:11 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:91:10: 91:11 (#0),
                             },
                             Ident {
                                 ident: "fn",
-                                span: $DIR/issue-75930-derive-cfg.rs:94:9: 94:11 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:93:9: 93:11 (#0),
                             },
                             Ident {
                                 ident: "plain_removed_fn",
-                                span: $DIR/issue-75930-derive-cfg.rs:94:12: 94:28 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:93:12: 93:28 (#0),
                             },
                             Group {
                                 delimiter: Parenthesis,
                                 stream: TokenStream [],
-                                span: $DIR/issue-75930-derive-cfg.rs:94:28: 94:30 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:93:28: 93:30 (#0),
                             },
                             Group {
                                 delimiter: Brace,
@@ -1202,122 +1202,122 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                                     Punct {
                                         ch: '#',
                                         spacing: Joint,
-                                        span: $DIR/issue-75930-derive-cfg.rs:95:13: 95:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:94:13: 94:14 (#0),
                                     },
                                     Punct {
                                         ch: '!',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:95:14: 95:15 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:94:14: 94:15 (#0),
                                     },
                                     Group {
                                         delimiter: Bracket,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "cfg_attr",
-                                                span: $DIR/issue-75930-derive-cfg.rs:95:16: 95:24 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:94:16: 94:24 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "not",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:95:25: 95:28 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:94:25: 94:28 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "FALSE",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:95:29: 95:34 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:94:29: 94:34 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:95:28: 95:35 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:94:28: 94:35 (#0),
                                                     },
                                                     Punct {
                                                         ch: ',',
                                                         spacing: Alone,
-                                                        span: $DIR/issue-75930-derive-cfg.rs:95:35: 95:36 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:94:35: 94:36 (#0),
                                                     },
                                                     Ident {
                                                         ident: "cfg",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:95:37: 95:40 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:94:37: 94:40 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "FALSE",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:95:41: 95:46 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:94:41: 94:46 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:95:40: 95:47 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:94:40: 94:47 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:95:24: 95:48 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:94:24: 94:48 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:95:15: 95:49 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:94:15: 94:49 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:94:31: 96:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:93:31: 95:10 (#0),
                             },
                             Literal {
                                 kind: Integer,
                                 symbol: "0",
                                 suffix: None,
-                                span: $DIR/issue-75930-derive-cfg.rs:98:9: 98:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:97:9: 97:10 (#0),
                             },
                         ],
-                        span: $DIR/issue-75930-derive-cfg.rs:58:17: 99:6 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:57:17: 98:6 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:58:12: 99:7 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:57:12: 98:7 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:99:7: 99:8 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:98:7: 98:8 (#0),
             },
             Punct {
                 ch: '#',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:100:5: 100:6 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:99:5: 99:6 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_helper",
-                        span: $DIR/issue-75930-derive-cfg.rs:100:7: 100:19 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:99:7: 99:19 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "d",
-                                span: $DIR/issue-75930-derive-cfg.rs:100:20: 100:21 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:99:20: 99:21 (#0),
                             },
                         ],
-                        span: $DIR/issue-75930-derive-cfg.rs:100:19: 100:22 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:99:19: 99:22 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:100:6: 100:23 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:99:6: 99:23 (#0),
             },
             Ident {
                 ident: "fourth",
-                span: $DIR/issue-75930-derive-cfg.rs:101:5: 101:11 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:100:5: 100:11 (#0),
             },
             Punct {
                 ch: ':',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:101:11: 101:12 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:100:11: 100:12 (#0),
             },
             Ident {
                 ident: "B",
-                span: $DIR/issue-75930-derive-cfg.rs:101:13: 101:14 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:100:13: 100:14 (#0),
             },
         ],
-        span: $DIR/issue-75930-derive-cfg.rs:55:32: 102:2 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:32: 101:2 (#0),
     },
 ]
 PRINT-DERIVE INPUT (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[print_helper(b)] struct Foo <B >
@@ -1350,141 +1350,141 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
     Punct {
         ch: '#',
         spacing: Alone,
-        span: $DIR/issue-75930-derive-cfg.rs:49:1: 49:2 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:46:1: 46:2 (#0),
     },
     Group {
         delimiter: Bracket,
         stream: TokenStream [
             Ident {
                 ident: "print_helper",
-                span: $DIR/issue-75930-derive-cfg.rs:49:3: 49:15 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:46:3: 46:15 (#0),
             },
             Group {
                 delimiter: Parenthesis,
                 stream: TokenStream [
                     Ident {
                         ident: "a",
-                        span: $DIR/issue-75930-derive-cfg.rs:49:16: 49:17 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:46:16: 46:17 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:49:15: 49:18 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:46:15: 46:18 (#0),
             },
         ],
-        span: $DIR/issue-75930-derive-cfg.rs:49:2: 49:19 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:46:2: 46:19 (#0),
     },
     Punct {
         ch: '#',
         spacing: Alone,
-        span: $DIR/issue-75930-derive-cfg.rs:51:1: 51:2 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:50:1: 50:2 (#0),
     },
     Group {
         delimiter: Bracket,
         stream: TokenStream [
             Ident {
                 ident: "allow",
-                span: $DIR/issue-75930-derive-cfg.rs:51:24: 51:29 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:50:24: 50:29 (#0),
             },
             Group {
                 delimiter: Parenthesis,
                 stream: TokenStream [
                     Ident {
                         ident: "dead_code",
-                        span: $DIR/issue-75930-derive-cfg.rs:51:30: 51:39 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:50:30: 50:39 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:51:29: 51:40 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:50:29: 50:40 (#0),
             },
         ],
-        span: $DIR/issue-75930-derive-cfg.rs:51:1: 51:2 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:50:1: 50:2 (#0),
     },
     Punct {
         ch: '#',
         spacing: Alone,
-        span: $DIR/issue-75930-derive-cfg.rs:54:1: 54:2 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:53:1: 53:2 (#0),
     },
     Group {
         delimiter: Bracket,
         stream: TokenStream [
             Ident {
                 ident: "print_helper",
-                span: $DIR/issue-75930-derive-cfg.rs:54:3: 54:15 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:53:3: 53:15 (#0),
             },
             Group {
                 delimiter: Parenthesis,
                 stream: TokenStream [
                     Ident {
                         ident: "b",
-                        span: $DIR/issue-75930-derive-cfg.rs:54:16: 54:17 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:53:16: 53:17 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:54:15: 54:18 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:53:15: 53:18 (#0),
             },
         ],
-        span: $DIR/issue-75930-derive-cfg.rs:54:2: 54:19 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:53:2: 53:19 (#0),
     },
     Ident {
         ident: "struct",
-        span: $DIR/issue-75930-derive-cfg.rs:55:1: 55:7 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:1: 54:7 (#0),
     },
     Ident {
         ident: "Foo",
-        span: $DIR/issue-75930-derive-cfg.rs:55:8: 55:11 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:8: 54:11 (#0),
     },
     Punct {
         ch: '<',
         spacing: Joint,
-        span: $DIR/issue-75930-derive-cfg.rs:55:11: 55:12 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:11: 54:12 (#0),
     },
     Ident {
         ident: "B",
-        span: $DIR/issue-75930-derive-cfg.rs:55:29: 55:30 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:29: 54:30 (#0),
     },
     Punct {
         ch: '>',
         spacing: Alone,
-        span: $DIR/issue-75930-derive-cfg.rs:55:30: 55:31 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:30: 54:31 (#0),
     },
     Group {
         delimiter: Brace,
         stream: TokenStream [
             Ident {
                 ident: "second",
-                span: $DIR/issue-75930-derive-cfg.rs:57:40: 57:46 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:56:40: 56:46 (#0),
             },
             Punct {
                 ch: ':',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:57:46: 57:47 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:56:46: 56:47 (#0),
             },
             Ident {
                 ident: "bool",
-                span: $DIR/issue-75930-derive-cfg.rs:57:48: 57:52 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:56:48: 56:52 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:57:52: 57:53 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:56:52: 56:53 (#0),
             },
             Ident {
                 ident: "third",
-                span: $DIR/issue-75930-derive-cfg.rs:58:5: 58:10 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:57:5: 57:10 (#0),
             },
             Punct {
                 ch: ':',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:58:10: 58:11 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:57:10: 57:11 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "u8",
-                        span: $DIR/issue-75930-derive-cfg.rs:58:13: 58:15 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:57:13: 57:15 (#0),
                     },
                     Punct {
                         ch: ';',
                         spacing: Alone,
-                        span: $DIR/issue-75930-derive-cfg.rs:58:15: 58:16 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:57:15: 57:16 (#0),
                     },
                     Group {
                         delimiter: Brace,
@@ -1492,58 +1492,58 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
                             Punct {
                                 ch: '#',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:60:9: 60:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:59:9: 59:10 (#0),
                             },
                             Group {
                                 delimiter: Bracket,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "cfg",
-                                        span: $DIR/issue-75930-derive-cfg.rs:60:11: 60:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:59:11: 59:14 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "not",
-                                                span: $DIR/issue-75930-derive-cfg.rs:60:15: 60:18 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:59:15: 59:18 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "FALSE",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:60:19: 60:24 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:59:19: 59:24 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:60:18: 60:25 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:59:18: 59:25 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:60:14: 60:26 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:59:14: 59:26 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:60:10: 60:27 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:59:10: 59:27 (#0),
                             },
                             Ident {
                                 ident: "struct",
-                                span: $DIR/issue-75930-derive-cfg.rs:60:28: 60:34 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:59:28: 59:34 (#0),
                             },
                             Ident {
                                 ident: "Inner",
-                                span: $DIR/issue-75930-derive-cfg.rs:60:35: 60:40 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:59:35: 59:40 (#0),
                             },
                             Punct {
                                 ch: ';',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:60:40: 60:41 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:59:40: 59:41 (#0),
                             },
                             Ident {
                                 ident: "match",
-                                span: $DIR/issue-75930-derive-cfg.rs:62:9: 62:14 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:61:9: 61:14 (#0),
                             },
                             Ident {
                                 ident: "true",
-                                span: $DIR/issue-75930-derive-cfg.rs:62:15: 62:19 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:61:15: 61:19 (#0),
                             },
                             Group {
                                 delimiter: Brace,
@@ -1551,151 +1551,151 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
                                     Punct {
                                         ch: '#',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:13: 64:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:13: 63:14 (#0),
                                     },
                                     Group {
                                         delimiter: Bracket,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "allow",
-                                                span: $DIR/issue-75930-derive-cfg.rs:64:36: 64:41 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:63:36: 63:41 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "warnings",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:64:42: 64:50 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:63:42: 63:50 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:64:41: 64:51 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:63:41: 63:51 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:13: 64:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:13: 63:14 (#0),
                                     },
                                     Ident {
                                         ident: "false",
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:54: 64:59 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:54: 63:59 (#0),
                                     },
                                     Punct {
                                         ch: '=',
                                         spacing: Joint,
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:60: 64:61 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:60: 63:61 (#0),
                                     },
                                     Punct {
                                         ch: '>',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:61: 64:62 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:61: 63:62 (#0),
                                     },
                                     Group {
                                         delimiter: Brace,
                                         stream: TokenStream [],
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:63: 64:65 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:63: 63:65 (#0),
                                     },
                                     Punct {
                                         ch: ',',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:64:65: 64:66 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:63:65: 63:66 (#0),
                                     },
                                     Ident {
                                         ident: "_",
-                                        span: $DIR/issue-75930-derive-cfg.rs:65:13: 65:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:64:13: 64:14 (#0),
                                     },
                                     Punct {
                                         ch: '=',
                                         spacing: Joint,
-                                        span: $DIR/issue-75930-derive-cfg.rs:65:15: 65:16 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:64:15: 64:16 (#0),
                                     },
                                     Punct {
                                         ch: '>',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:65:16: 65:17 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:64:16: 64:17 (#0),
                                     },
                                     Group {
                                         delimiter: Brace,
                                         stream: TokenStream [],
-                                        span: $DIR/issue-75930-derive-cfg.rs:65:18: 65:20 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:64:18: 64:20 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:62:20: 66:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:61:20: 65:10 (#0),
                             },
                             Punct {
                                 ch: ';',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:66:10: 66:11 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:65:10: 65:11 (#0),
                             },
                             Punct {
                                 ch: '#',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:73:9: 73:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:9: 72:10 (#0),
                             },
                             Group {
                                 delimiter: Bracket,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "print_helper",
-                                        span: $DIR/issue-75930-derive-cfg.rs:73:11: 73:23 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:72:11: 72:23 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "c",
-                                                span: $DIR/issue-75930-derive-cfg.rs:73:24: 73:25 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:72:24: 72:25 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:73:23: 73:26 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:72:23: 72:26 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:73:10: 73:27 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:10: 72:27 (#0),
                             },
                             Punct {
                                 ch: '#',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:73:28: 73:29 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:28: 72:29 (#0),
                             },
                             Group {
                                 delimiter: Bracket,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "cfg",
-                                        span: $DIR/issue-75930-derive-cfg.rs:73:30: 73:33 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:72:30: 72:33 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "not",
-                                                span: $DIR/issue-75930-derive-cfg.rs:73:34: 73:37 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:72:34: 72:37 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "FALSE",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:73:38: 73:43 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:72:38: 72:43 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:73:37: 73:44 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:72:37: 72:44 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:73:33: 73:45 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:72:33: 72:45 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:73:29: 73:46 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:29: 72:46 (#0),
                             },
                             Ident {
                                 ident: "fn",
-                                span: $DIR/issue-75930-derive-cfg.rs:73:47: 73:49 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:47: 72:49 (#0),
                             },
                             Ident {
                                 ident: "kept_fn",
-                                span: $DIR/issue-75930-derive-cfg.rs:73:50: 73:57 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:50: 72:57 (#0),
                             },
                             Group {
                                 delimiter: Parenthesis,
                                 stream: TokenStream [],
-                                span: $DIR/issue-75930-derive-cfg.rs:73:57: 73:59 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:57: 72:59 (#0),
                             },
                             Group {
                                 delimiter: Brace,
@@ -1703,82 +1703,82 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
                                     Punct {
                                         ch: '#',
                                         spacing: Joint,
-                                        span: $DIR/issue-75930-derive-cfg.rs:74:13: 74:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:73:13: 73:14 (#0),
                                     },
                                     Punct {
                                         ch: '!',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:74:14: 74:15 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:73:14: 73:15 (#0),
                                     },
                                     Group {
                                         delimiter: Bracket,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "cfg",
-                                                span: $DIR/issue-75930-derive-cfg.rs:74:16: 74:19 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:73:16: 73:19 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "not",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:74:20: 74:23 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:73:20: 73:23 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "FALSE",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:74:24: 74:29 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:73:24: 73:29 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:74:23: 74:30 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:73:23: 73:30 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:74:19: 74:31 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:73:19: 73:31 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:74:15: 74:32 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:73:15: 73:32 (#0),
                                     },
                                     Ident {
                                         ident: "let",
-                                        span: $DIR/issue-75930-derive-cfg.rs:75:13: 75:16 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:74:13: 74:16 (#0),
                                     },
                                     Ident {
                                         ident: "my_val",
-                                        span: $DIR/issue-75930-derive-cfg.rs:75:17: 75:23 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:74:17: 74:23 (#0),
                                     },
                                     Punct {
                                         ch: '=',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:75:24: 75:25 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:74:24: 74:25 (#0),
                                     },
                                     Ident {
                                         ident: "true",
-                                        span: $DIR/issue-75930-derive-cfg.rs:75:26: 75:30 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:74:26: 74:30 (#0),
                                     },
                                     Punct {
                                         ch: ';',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:75:30: 75:31 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:74:30: 74:31 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:73:60: 76:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:72:60: 75:10 (#0),
                             },
                             Ident {
                                 ident: "enum",
-                                span: $DIR/issue-75930-derive-cfg.rs:78:9: 78:13 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:77:9: 77:13 (#0),
                             },
                             Ident {
                                 ident: "TupleEnum",
-                                span: $DIR/issue-75930-derive-cfg.rs:78:14: 78:23 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:77:14: 77:23 (#0),
                             },
                             Group {
                                 delimiter: Brace,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "Foo",
-                                        span: $DIR/issue-75930-derive-cfg.rs:79:13: 79:16 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:78:13: 78:16 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
@@ -1786,64 +1786,64 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
                                             Punct {
                                                 ch: '#',
                                                 spacing: Alone,
-                                                span: $DIR/issue-75930-derive-cfg.rs:82:17: 82:18 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:81:17: 81:18 (#0),
                                             },
                                             Group {
                                                 delimiter: Bracket,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "cfg",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:82:19: 82:22 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:81:19: 81:22 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "not",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:82:23: 82:26 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:81:23: 81:26 (#0),
                                                             },
                                                             Group {
                                                                 delimiter: Parenthesis,
                                                                 stream: TokenStream [
                                                                     Ident {
                                                                         ident: "FALSE",
-                                                                        span: $DIR/issue-75930-derive-cfg.rs:82:27: 82:32 (#0),
+                                                                        span: $DIR/issue-75930-derive-cfg.rs:81:27: 81:32 (#0),
                                                                     },
                                                                 ],
-                                                                span: $DIR/issue-75930-derive-cfg.rs:82:26: 82:33 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:81:26: 81:33 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:82:22: 82:34 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:81:22: 81:34 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:82:18: 82:35 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:81:18: 81:35 (#0),
                                             },
                                             Ident {
                                                 ident: "i32",
-                                                span: $DIR/issue-75930-derive-cfg.rs:82:36: 82:39 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:81:36: 81:39 (#0),
                                             },
                                             Punct {
                                                 ch: ',',
                                                 spacing: Alone,
-                                                span: $DIR/issue-75930-derive-cfg.rs:82:39: 82:40 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:81:39: 81:40 (#0),
                                             },
                                             Ident {
                                                 ident: "u8",
-                                                span: $DIR/issue-75930-derive-cfg.rs:83:39: 83:41 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:82:39: 82:41 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:79:16: 84:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:78:16: 83:14 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:78:24: 85:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:77:24: 84:10 (#0),
                             },
                             Ident {
                                 ident: "struct",
-                                span: $DIR/issue-75930-derive-cfg.rs:87:9: 87:15 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:86:9: 86:15 (#0),
                             },
                             Ident {
                                 ident: "TupleStruct",
-                                span: $DIR/issue-75930-derive-cfg.rs:87:16: 87:27 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:86:16: 86:27 (#0),
                             },
                             Group {
                                 delimiter: Parenthesis,
@@ -1851,115 +1851,115 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
                                     Punct {
                                         ch: '#',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:89:13: 89:14 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:88:13: 88:14 (#0),
                                     },
                                     Group {
                                         delimiter: Bracket,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "cfg",
-                                                span: $DIR/issue-75930-derive-cfg.rs:89:15: 89:18 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:88:15: 88:18 (#0),
                                             },
                                             Group {
                                                 delimiter: Parenthesis,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "not",
-                                                        span: $DIR/issue-75930-derive-cfg.rs:89:19: 89:22 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:88:19: 88:22 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "FALSE",
-                                                                span: $DIR/issue-75930-derive-cfg.rs:89:23: 89:28 (#0),
+                                                                span: $DIR/issue-75930-derive-cfg.rs:88:23: 88:28 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/issue-75930-derive-cfg.rs:89:22: 89:29 (#0),
+                                                        span: $DIR/issue-75930-derive-cfg.rs:88:22: 88:29 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/issue-75930-derive-cfg.rs:89:18: 89:30 (#0),
+                                                span: $DIR/issue-75930-derive-cfg.rs:88:18: 88:30 (#0),
                                             },
                                         ],
-                                        span: $DIR/issue-75930-derive-cfg.rs:89:14: 89:31 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:88:14: 88:31 (#0),
                                     },
                                     Ident {
                                         ident: "i32",
-                                        span: $DIR/issue-75930-derive-cfg.rs:89:32: 89:35 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:88:32: 88:35 (#0),
                                     },
                                     Punct {
                                         ch: ',',
                                         spacing: Alone,
-                                        span: $DIR/issue-75930-derive-cfg.rs:89:35: 89:36 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:88:35: 88:36 (#0),
                                     },
                                     Ident {
                                         ident: "u8",
-                                        span: $DIR/issue-75930-derive-cfg.rs:91:13: 91:15 (#0),
+                                        span: $DIR/issue-75930-derive-cfg.rs:90:13: 90:15 (#0),
                                     },
                                 ],
-                                span: $DIR/issue-75930-derive-cfg.rs:87:27: 92:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:86:27: 91:10 (#0),
                             },
                             Punct {
                                 ch: ';',
                                 spacing: Alone,
-                                span: $DIR/issue-75930-derive-cfg.rs:92:10: 92:11 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:91:10: 91:11 (#0),
                             },
                             Literal {
                                 kind: Integer,
                                 symbol: "0",
                                 suffix: None,
-                                span: $DIR/issue-75930-derive-cfg.rs:98:9: 98:10 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:97:9: 97:10 (#0),
                             },
                         ],
-                        span: $DIR/issue-75930-derive-cfg.rs:58:17: 99:6 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:57:17: 98:6 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:58:12: 99:7 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:57:12: 98:7 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:99:7: 99:8 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:98:7: 98:8 (#0),
             },
             Punct {
                 ch: '#',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:100:5: 100:6 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:99:5: 99:6 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_helper",
-                        span: $DIR/issue-75930-derive-cfg.rs:100:7: 100:19 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:99:7: 99:19 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "d",
-                                span: $DIR/issue-75930-derive-cfg.rs:100:20: 100:21 (#0),
+                                span: $DIR/issue-75930-derive-cfg.rs:99:20: 99:21 (#0),
                             },
                         ],
-                        span: $DIR/issue-75930-derive-cfg.rs:100:19: 100:22 (#0),
+                        span: $DIR/issue-75930-derive-cfg.rs:99:19: 99:22 (#0),
                     },
                 ],
-                span: $DIR/issue-75930-derive-cfg.rs:100:6: 100:23 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:99:6: 99:23 (#0),
             },
             Ident {
                 ident: "fourth",
-                span: $DIR/issue-75930-derive-cfg.rs:101:5: 101:11 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:100:5: 100:11 (#0),
             },
             Punct {
                 ch: ':',
                 spacing: Alone,
-                span: $DIR/issue-75930-derive-cfg.rs:101:11: 101:12 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:100:11: 100:12 (#0),
             },
             Ident {
                 ident: "B",
-                span: $DIR/issue-75930-derive-cfg.rs:101:13: 101:14 (#0),
+                span: $DIR/issue-75930-derive-cfg.rs:100:13: 100:14 (#0),
             },
         ],
-        span: $DIR/issue-75930-derive-cfg.rs:55:32: 102:2 (#0),
+        span: $DIR/issue-75930-derive-cfg.rs:54:32: 101:2 (#0),
     },
 ]
diff --git a/tests/ui/proc-macro/meta-macro-hygiene.stdout b/tests/ui/proc-macro/meta-macro-hygiene.stdout
index 6d10cc604c2..3672a3590fd 100644
--- a/tests/ui/proc-macro/meta-macro-hygiene.stdout
+++ b/tests/ui/proc-macro/meta-macro-hygiene.stdout
@@ -50,6 +50,9 @@ crate0::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt:
 crate0::{{expn2}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "produce_it")
 crate0::{{expn3}}: parent: crate0::{{expn2}}, call_site_ctxt: #3, def_site_ctxt: #0, kind: Macro(Bang, "meta_macro::print_def_site")
 crate0::{{expn4}}: parent: crate0::{{expn3}}, call_site_ctxt: #4, def_site_ctxt: #0, kind: Macro(Bang, "$crate::dummy")
+crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "diagnostic::on_unimplemented")
+crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "diagnostic::on_unimplemented")
+crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "diagnostic::on_unimplemented")
 crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive")
 crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive")
 crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "include")
diff --git a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout
index 5c70e780f74..d3c2c46ac75 100644
--- a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout
+++ b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout
@@ -73,6 +73,9 @@ crate0::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt:
 crate0::{{expn2}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "outer")
 crate0::{{expn3}}: parent: crate0::{{expn2}}, call_site_ctxt: #3, def_site_ctxt: #3, kind: Macro(Bang, "inner")
 crate0::{{expn4}}: parent: crate0::{{expn3}}, call_site_ctxt: #5, def_site_ctxt: #0, kind: Macro(Bang, "print_bang")
+crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "diagnostic::on_unimplemented")
+crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "diagnostic::on_unimplemented")
+crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "diagnostic::on_unimplemented")
 crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive")
 crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive")
 crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "include")
diff --git a/tests/ui/process/no-stdio.rs b/tests/ui/process/no-stdio.rs
index 24985386a97..68e6fa838b4 100644
--- a/tests/ui/process/no-stdio.rs
+++ b/tests/ui/process/no-stdio.rs
@@ -2,8 +2,6 @@
 // ignore-android
 // ignore-emscripten no processes
 // ignore-sgx no processes
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
 
 #![feature(rustc_private)]
 
diff --git a/tests/ui/pub/pub-ident-struct-4.fixed b/tests/ui/pub/pub-ident-struct-4.fixed
index b49fa678e1b..71c6f0a6994 100644
--- a/tests/ui/pub/pub-ident-struct-4.fixed
+++ b/tests/ui/pub/pub-ident-struct-4.fixed
@@ -1,6 +1,6 @@
 // run-rustfix
 
-pub struct T(String);
+pub struct T(#[allow(dead_code)] String);
 //~^ ERROR missing `struct` for struct definition
 
 fn main() {}
diff --git a/tests/ui/pub/pub-ident-struct-4.rs b/tests/ui/pub/pub-ident-struct-4.rs
index 20bc94b0acb..971f39a8ce1 100644
--- a/tests/ui/pub/pub-ident-struct-4.rs
+++ b/tests/ui/pub/pub-ident-struct-4.rs
@@ -1,6 +1,6 @@
 // run-rustfix
 
-pub T(String);
+pub T(#[allow(dead_code)] String);
 //~^ ERROR missing `struct` for struct definition
 
 fn main() {}
diff --git a/tests/ui/pub/pub-ident-struct-4.stderr b/tests/ui/pub/pub-ident-struct-4.stderr
index 470874e0637..5fbb02c8673 100644
--- a/tests/ui/pub/pub-ident-struct-4.stderr
+++ b/tests/ui/pub/pub-ident-struct-4.stderr
@@ -1,12 +1,12 @@
 error: missing `struct` for struct definition
   --> $DIR/pub-ident-struct-4.rs:3:4
    |
-LL | pub T(String);
+LL | pub T(#[allow(dead_code)] String);
    |    ^
    |
 help: add `struct` here to parse `T` as a public struct
    |
-LL | pub struct T(String);
+LL | pub struct T(#[allow(dead_code)] String);
    |     ++++++
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/range_inclusive.rs b/tests/ui/range_inclusive.rs
index c9107d24ed0..2425113b904 100644
--- a/tests/ui/range_inclusive.rs
+++ b/tests/ui/range_inclusive.rs
@@ -11,7 +11,7 @@ fn foo() -> isize { 42 }
 pub fn return_range_to() -> RangeToInclusive<i32> { return ..=1; }
 
 #[derive(Debug)]
-struct P(#[allow(unused_tuple_struct_fields)] u8);
+struct P(#[allow(dead_code)] u8);
 
 pub fn main() {
     let mut count = 0;
diff --git a/tests/ui/recursion_limit/issue-40003.rs b/tests/ui/recursion_limit/issue-40003.rs
index 5e61361f987..01a2aaffb9e 100644
--- a/tests/ui/recursion_limit/issue-40003.rs
+++ b/tests/ui/recursion_limit/issue-40003.rs
@@ -153,7 +153,7 @@ mod stream {
     }
 
     enum Slot<T> {
-        Next(#[allow(unused_tuple_struct_fields)] usize),
+        Next(#[allow(dead_code)] usize),
         _Data { _a: T },
     }
 
diff --git a/tests/ui/repr/align-with-extern-c-fn.rs b/tests/ui/repr/align-with-extern-c-fn.rs
index 9e490e27ad1..659ef88fce6 100644
--- a/tests/ui/repr/align-with-extern-c-fn.rs
+++ b/tests/ui/repr/align-with-extern-c-fn.rs
@@ -8,7 +8,7 @@
 #![feature(repr_align)]
 
 #[repr(align(16))]
-pub struct A(#[allow(unused_tuple_struct_fields)] i64);
+pub struct A(#[allow(dead_code)] i64);
 
 #[allow(improper_ctypes_definitions)]
 pub extern "C" fn foo(x: A) {}
diff --git a/tests/ui/resolve/auxiliary/suggest-constructor-cycle-error.rs b/tests/ui/resolve/auxiliary/suggest-constructor-cycle-error.rs
new file mode 100644
index 00000000000..8de68c38bc3
--- /dev/null
+++ b/tests/ui/resolve/auxiliary/suggest-constructor-cycle-error.rs
@@ -0,0 +1,12 @@
+mod m {
+    pub struct Uuid(());
+
+    impl Uuid {
+        pub fn encode_buffer() -> [u8; LENGTH] {
+            []
+        }
+    }
+    const LENGTH: usize = 0;
+}
+
+pub use m::Uuid;
diff --git a/tests/ui/resolve/issue-5035-2.stderr b/tests/ui/resolve/issue-5035-2.stderr
index 8eeb398f077..30721c0a206 100644
--- a/tests/ui/resolve/issue-5035-2.stderr
+++ b/tests/ui/resolve/issue-5035-2.stderr
@@ -6,10 +6,6 @@ LL | fn foo(_x: K) {}
    |
    = help: the trait `Sized` is not implemented for `(dyn I + 'static)`
    = help: unsized fn params are gated as an unstable feature
-help: you can use `impl Trait` as the argument type
-   |
-LL | fn foo(_x: impl K) {}
-   |            ++++
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
 LL | fn foo(_x: &K) {}
diff --git a/tests/ui/resolve/suggest-constructor-cycle-error.rs b/tests/ui/resolve/suggest-constructor-cycle-error.rs
new file mode 100644
index 00000000000..e36fffd97d1
--- /dev/null
+++ b/tests/ui/resolve/suggest-constructor-cycle-error.rs
@@ -0,0 +1,10 @@
+// aux-build:suggest-constructor-cycle-error.rs
+
+// Regression test for https://github.com/rust-lang/rust/issues/119625
+
+extern crate suggest_constructor_cycle_error as a;
+
+const CONST_NAME: a::Uuid = a::Uuid(());
+//~^ ERROR: cannot initialize a tuple struct which contains private fields [E0423]
+
+fn main() {}
diff --git a/tests/ui/resolve/suggest-constructor-cycle-error.stderr b/tests/ui/resolve/suggest-constructor-cycle-error.stderr
new file mode 100644
index 00000000000..c6ec2465a43
--- /dev/null
+++ b/tests/ui/resolve/suggest-constructor-cycle-error.stderr
@@ -0,0 +1,15 @@
+error[E0423]: cannot initialize a tuple struct which contains private fields
+  --> $DIR/suggest-constructor-cycle-error.rs:7:29
+   |
+LL | const CONST_NAME: a::Uuid = a::Uuid(());
+   |                             ^^^^^^^
+   |
+note: constructor is not visible here due to private fields
+  --> $DIR/auxiliary/suggest-constructor-cycle-error.rs:2:21
+   |
+LL |     pub struct Uuid(());
+   |                     ^^ private field
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/macros.rs b/tests/ui/rfcs/rfc-0000-never_patterns/macros.rs
new file mode 100644
index 00000000000..3c04b4517cb
--- /dev/null
+++ b/tests/ui/rfcs/rfc-0000-never_patterns/macros.rs
@@ -0,0 +1,49 @@
+// check-pass
+// revisions: e2018 e2021
+//[e2018] edition:2018
+//[e2021] edition:2021
+#![feature(never_patterns)]
+#![allow(incomplete_features)]
+
+#[derive(Debug, PartialEq, Eq)]
+struct Pattern;
+#[derive(Debug, PartialEq, Eq)]
+struct Never;
+#[derive(Debug, PartialEq, Eq)]
+struct Other;
+
+macro_rules! detect_pat {
+    ($p:pat) => {
+        Pattern
+    };
+    (!) => {
+        Never
+    };
+    ($($x:tt)*) => {
+        Other
+    };
+}
+
+// For backwards-compatibility, all the cases that parse as `Pattern` under the feature gate must
+// have been parse errors before.
+fn main() {
+    // For backwards compatibility this does not match `$p:pat`.
+    assert_eq!(detect_pat!(!), Never);
+
+    // Edition 2018 parses both of these cases as `Other`. Both editions have been parsing the
+    // first case as `Other` before, so we mustn't change that.
+    assert_eq!(detect_pat!(! | true), Other);
+    #[cfg(e2018)]
+    assert_eq!(detect_pat!(true | !), Other);
+    #[cfg(e2021)]
+    assert_eq!(detect_pat!(true | !), Pattern);
+
+    // These are never patterns; they take no body when they're in a match arm.
+    assert_eq!(detect_pat!((!)), Pattern);
+    assert_eq!(detect_pat!((true, !)), Pattern);
+    assert_eq!(detect_pat!(Some(!)), Pattern);
+
+    // These count as normal patterns.
+    assert_eq!(detect_pat!((! | true)), Pattern);
+    assert_eq!(detect_pat!((Ok(x) | Err(&!))), Pattern);
+}
diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/parse.rs b/tests/ui/rfcs/rfc-0000-never_patterns/parse.rs
index 1b23e60e0ca..f254b9c201c 100644
--- a/tests/ui/rfcs/rfc-0000-never_patterns/parse.rs
+++ b/tests/ui/rfcs/rfc-0000-never_patterns/parse.rs
@@ -68,4 +68,9 @@ fn parse(x: Void) {
     //~^ ERROR top-level or-patterns are not allowed in `let` bindings
     let (Ok(_) | Err(!)) = &res;
     let (Ok(_) | Err(&!)) = res.as_ref();
+
+    let ! = x;
+    let y @ ! = x;
 }
+
+fn foo(!: Void) {}
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs
index 1914e155493..c95777b0ef1 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs
@@ -5,7 +5,7 @@
 
 #![warn(pointer_structural_match)]
 
-struct NoDerive(#[allow(unused_tuple_struct_fields)] i32);
+struct NoDerive(#[allow(dead_code)] i32);
 
 // This impl makes NoDerive irreflexive
 // (which doesn't matter here because `<*const T>::eq` won't recur on `T`).
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs
index e713b003b00..3f663fd09f8 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs
@@ -5,7 +5,7 @@
 
 #![warn(pointer_structural_match)]
 
-struct NoDerive(#[allow(unused_tuple_struct_fields)] i32);
+struct NoDerive(#[allow(dead_code)] i32);
 
 // This impl makes NoDerive irreflexive
 // (which doesn't matter here because `<*const T>::eq` won't recur on `T`).
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs
index 04da14c5419..56b7988e0e4 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs
@@ -5,7 +5,7 @@
 
 #![warn(pointer_structural_match)]
 
-struct NoDerive(#[allow(unused_tuple_struct_fields)] i32);
+struct NoDerive(#[allow(dead_code)] i32);
 
 // This impl makes NoDerive irreflexive
 // (which doesn't matter here because `<*const T>::eq` won't recur on `T`).
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs
index 8313c25e753..3ebe3225437 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs
@@ -5,7 +5,7 @@
 
 #![warn(pointer_structural_match)]
 
-struct NoDerive(#[allow(unused_tuple_struct_fields)] i32);
+struct NoDerive(#[allow(dead_code)] i32);
 
 // This impl makes NoDerive irreflexive
 // (which doesn't matter here because `<*const T>::eq` won't recur on `T`).
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.rs
index 7623839fdd1..bb5e243d934 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-direct-struct-embedded.rs
@@ -5,7 +5,7 @@
 //
 // See discussion on rust-lang/rust#62307 and rust-lang/rust#62339
 
-struct NoDerive(#[allow(unused_tuple_struct_fields)] i32);
+struct NoDerive(#[allow(dead_code)] i32);
 
 // This impl makes NoDerive irreflexive.
 impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs
index 894739ff705..e3abb47cf73 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-embedded.rs
@@ -7,7 +7,7 @@
 #![warn(indirect_structural_match)]
 // run-pass
 
-struct NoDerive(#[allow(unused_tuple_struct_fields)] i32);
+struct NoDerive(#[allow(dead_code)] i32);
 
 // This impl makes NoDerive irreflexive.
 impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs
index 1699dae4624..2d3788eea8a 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-doubly-indirect-param.rs
@@ -7,7 +7,7 @@
 #![warn(indirect_structural_match)]
 // run-pass
 
-struct NoDerive(#[allow(unused_tuple_struct_fields)] i32);
+struct NoDerive(#[allow(dead_code)] i32);
 
 // This impl makes NoDerive irreflexive.
 impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs
index 2672bdd9e56..65df7788d90 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-embedded.rs
@@ -7,7 +7,7 @@
 #![warn(indirect_structural_match)]
 // run-pass
 
-struct NoDerive(#[allow(unused_tuple_struct_fields)] i32);
+struct NoDerive(#[allow(dead_code)] i32);
 
 // This impl makes NoDerive irreflexive.
 impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs
index 3489995ae71..88260fd1081 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/cant-hide-behind-indirect-struct-param.rs
@@ -7,7 +7,7 @@
 #![warn(indirect_structural_match)]
 // run-pass
 
-struct NoDerive(#[allow(unused_tuple_struct_fields)] i32);
+struct NoDerive(#[allow(dead_code)] i32);
 
 // This impl makes NoDerive irreflexive.
 impl PartialEq for NoDerive { fn eq(&self, _: &Self) -> bool { false } }
diff --git a/tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs b/tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs
index d359067f627..0deb8c7f119 100644
--- a/tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs
+++ b/tests/ui/rfcs/rfc-2151-raw-identifiers/attr.rs
@@ -7,7 +7,7 @@ struct Test {
 }
 
 #[r#derive(r#Debug)]
-struct Test2(#[allow(unused_tuple_struct_fields)] u32);
+struct Test2(#[allow(dead_code)] u32);
 
 pub fn main() {
     assert_eq!(mem::size_of::<Test>(), 9);
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs
new file mode 100644
index 00000000000..9e6e23e8882
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/drop-scope.rs
@@ -0,0 +1,72 @@
+// Ensure that temporaries in if-let guards live for the arm
+// regression test for #118593
+
+// check-pass
+
+#![feature(if_let_guard)]
+#![feature(let_chains)]
+
+fn get_temp() -> Option<String> {
+    None
+}
+
+fn let_guard(num: u8) {
+    match num {
+        1 | 2 if let Some(ref a) = get_temp() => {
+            let _b = a;
+        }
+        _ => {}
+    }
+    match num {
+        3 | 4 if let Some(ref mut c) = get_temp() => {
+            let _d = c;
+        }
+        _ => {}
+    }
+}
+
+fn let_let_chain_guard(num: u8) {
+    match num {
+        5 | 6
+            if let Some(ref a) = get_temp()
+                && let Some(ref b) = get_temp() =>
+        {
+            let _x = a;
+            let _y = b;
+        }
+        _ => {}
+    }
+    match num {
+        7 | 8
+            if let Some(ref mut c) = get_temp()
+                && let Some(ref mut d) = get_temp() =>
+        {
+            let _w = c;
+            let _z = d;
+        }
+        _ => {}
+    }
+}
+
+fn let_cond_chain_guard(num: u8) {
+    match num {
+        9 | 10
+            if let Some(ref a) = get_temp()
+                && true =>
+        {
+            let _x = a;
+        }
+        _ => {}
+    }
+    match num {
+        11 | 12
+            if let Some(ref mut b) = get_temp()
+                && true =>
+        {
+            let _w = b;
+        }
+        _ => {}
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs
new file mode 100644
index 00000000000..9a3520661a6
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/scope.rs
@@ -0,0 +1,30 @@
+// Tests for #88015 when using if let chains in match guards
+
+//run-pass
+
+#![feature(if_let_guard)]
+#![feature(let_chains)]
+#![allow(irrefutable_let_patterns)]
+
+fn lhs_let(opt: Option<bool>) {
+    match opt {
+        None | Some(false) | Some(true) if let x = 42 && true => assert_eq!(x, 42),
+        _ => panic!()
+    }
+}
+
+fn rhs_let(opt: Option<bool>) {
+    match opt {
+        None | Some(false) | Some(true) if true && let x = 41 => assert_eq!(x, 41),
+        _ => panic!()
+    }
+}
+
+fn main() {
+    lhs_let(None);
+    lhs_let(Some(false));
+    lhs_let(Some(true));
+    rhs_let(None);
+    rhs_let(Some(false));
+    rhs_let(Some(true));
+}
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/warns.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/warns.stderr
index 75f22ac8dc0..eed5dbb88de 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/warns.stderr
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/warns.stderr
@@ -1,8 +1,8 @@
 error: irrefutable `if let` guard pattern
-  --> $DIR/warns.rs:6:24
+  --> $DIR/warns.rs:6:20
    |
 LL |         Some(x) if let () = x => {}
-   |                        ^^
+   |                    ^^^^^^^^^^
    |
    = note: this pattern will always match, so the guard is useless
    = help: consider removing the guard and adding a `let` inside the match arm
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs
index e0842bfa4cd..58a2c271ecf 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/check-pass.rs
@@ -8,8 +8,6 @@
 
 // check-pass
 // only-x86_64
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 
 #![feature(target_feature_11)]
 
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs
index a59d7c2d784..fefe100ba0e 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs
@@ -1,18 +1,16 @@
 // Tests #73631: closures inherit `#[target_feature]` annotations
 
 // check-pass
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 // only-x86_64
 
 #![feature(target_feature_11)]
 
-#[target_feature(enable="avx")]
+#[target_feature(enable = "avx")]
 fn also_use_avx() {
     println!("Hello from AVX")
 }
 
-#[target_feature(enable="avx")]
+#[target_feature(enable = "avx")]
 fn use_avx() -> Box<dyn Fn()> {
     Box::new(|| also_use_avx())
 }
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs
index c95d4a08e48..3ecea5c5313 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.rs
@@ -1,5 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 // only-x86_64
 
 #![feature(target_feature_11)]
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.stderr
new file mode 100644
index 00000000000..cc941be5479
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-ptr.stderr
@@ -0,0 +1,23 @@
+error[E0308]: mismatched types
+  --> $DIR/fn-ptr.rs:9:21
+   |
+LL | #[target_feature(enable = "sse2")]
+   | ---------------------------------- `#[target_feature]` added here
+...
+LL |     let foo: fn() = foo;
+   |              ----   ^^^ cannot coerce functions with `#[target_feature]` to safe function pointers
+   |              |
+   |              expected due to this
+   |
+   = note: expected fn pointer `fn()`
+                 found fn item `fn() {foo}`
+   = note: fn items are distinct from fn pointers
+   = note: functions with `#[target_feature]` can only be coerced to `unsafe` function pointers
+help: consider casting to a fn pointer
+   |
+LL |     let foo: fn() = foo as fn();
+   |                     ~~~~~~~~~~~
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs
index bc886400099..115f00b3f4e 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs
@@ -1,8 +1,6 @@
 // Tests #108655: closures in `#[target_feature]` functions can still be marked #[inline(always)]
 
 // check-pass
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 // only-x86_64
 
 #![feature(target_feature_11)]
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs
index f17dab269bc..788c79adc1f 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.rs
@@ -1,5 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 // only-x86_64
 
 #![feature(target_feature_11)]
@@ -11,7 +9,6 @@ const fn sse2() {}
 #[target_feature(enable = "fxsr")]
 const fn sse2_and_fxsr() {}
 
-
 #[target_feature(enable = "avx")]
 #[target_feature(enable = "bmi2")]
 fn avx_bmi2() {}
@@ -26,62 +23,50 @@ impl Quux {
 
 fn foo() {
     sse2();
-    //[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
-    //[thir]~^^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
+    //~^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
     avx_bmi2();
-    //[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
-    //[thir]~^^ ERROR call to function `avx_bmi2` with `#[target_feature]` is unsafe
+    //~^ ERROR call to function `avx_bmi2` with `#[target_feature]` is unsafe
     Quux.avx_bmi2();
-    //[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
-    //[thir]~^^ ERROR call to function `Quux::avx_bmi2` with `#[target_feature]` is unsafe
+    //~^ ERROR call to function `Quux::avx_bmi2` with `#[target_feature]` is unsafe
 }
 
 #[target_feature(enable = "sse2")]
 fn bar() {
     avx_bmi2();
-    //[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
-    //[thir]~^^ ERROR call to function `avx_bmi2` with `#[target_feature]` is unsafe
+    //~^ ERROR call to function `avx_bmi2` with `#[target_feature]` is unsafe
     Quux.avx_bmi2();
-    //[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
-    //[thir]~^^ ERROR call to function `Quux::avx_bmi2` with `#[target_feature]` is unsafe
+    //~^ ERROR call to function `Quux::avx_bmi2` with `#[target_feature]` is unsafe
 }
 
 #[target_feature(enable = "avx")]
 fn baz() {
     sse2();
-    //[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
-    //[thir]~^^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
+    //~^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
     avx_bmi2();
-    //[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
-    //[thir]~^^ ERROR call to function `avx_bmi2` with `#[target_feature]` is unsafe
+    //~^ ERROR call to function `avx_bmi2` with `#[target_feature]` is unsafe
     Quux.avx_bmi2();
-    //[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
-    //[thir]~^^ ERROR call to function `Quux::avx_bmi2` with `#[target_feature]` is unsafe
+    //~^ ERROR call to function `Quux::avx_bmi2` with `#[target_feature]` is unsafe
 }
 
 #[target_feature(enable = "avx")]
 #[target_feature(enable = "bmi2")]
 fn qux() {
     sse2();
-    //[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
-    //[thir]~^^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
+    //~^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
 }
 
 const _: () = sse2();
-//[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
-//[thir]~^^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
+//~^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
 
 const _: () = sse2_and_fxsr();
-//[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
-//[thir]~^^ ERROR call to function `sse2_and_fxsr` with `#[target_feature]` is unsafe
+//~^ ERROR call to function `sse2_and_fxsr` with `#[target_feature]` is unsafe
 
 #[deny(unsafe_op_in_unsafe_fn)]
 #[target_feature(enable = "avx")]
 #[target_feature(enable = "bmi2")]
 unsafe fn needs_unsafe_block() {
     sse2();
-    //[mir]~^ ERROR call to function with `#[target_feature]` is unsafe
-    //[thir]~^^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
+    //~^ ERROR call to function `sse2` with `#[target_feature]` is unsafe
 }
 
 fn main() {}
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.stderr
new file mode 100644
index 00000000000..e17859eb40f
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.stderr
@@ -0,0 +1,115 @@
+error[E0133]: call to function `sse2` with `#[target_feature]` is unsafe and requires unsafe function or block
+  --> $DIR/safe-calls.rs:25:5
+   |
+LL |     sse2();
+   |     ^^^^^^ call to function with `#[target_feature]`
+   |
+   = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+   = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
+
+error[E0133]: call to function `avx_bmi2` with `#[target_feature]` is unsafe and requires unsafe function or block
+  --> $DIR/safe-calls.rs:27:5
+   |
+LL |     avx_bmi2();
+   |     ^^^^^^^^^^ call to function with `#[target_feature]`
+   |
+   = help: in order for the call to be safe, the context requires the following additional target features: avx and bmi2
+
+error[E0133]: call to function `Quux::avx_bmi2` with `#[target_feature]` is unsafe and requires unsafe function or block
+  --> $DIR/safe-calls.rs:29:5
+   |
+LL |     Quux.avx_bmi2();
+   |     ^^^^^^^^^^^^^^^ call to function with `#[target_feature]`
+   |
+   = help: in order for the call to be safe, the context requires the following additional target features: avx and bmi2
+
+error[E0133]: call to function `avx_bmi2` with `#[target_feature]` is unsafe and requires unsafe function or block
+  --> $DIR/safe-calls.rs:35:5
+   |
+LL |     avx_bmi2();
+   |     ^^^^^^^^^^ call to function with `#[target_feature]`
+   |
+   = help: in order for the call to be safe, the context requires the following additional target features: avx and bmi2
+
+error[E0133]: call to function `Quux::avx_bmi2` with `#[target_feature]` is unsafe and requires unsafe function or block
+  --> $DIR/safe-calls.rs:37:5
+   |
+LL |     Quux.avx_bmi2();
+   |     ^^^^^^^^^^^^^^^ call to function with `#[target_feature]`
+   |
+   = help: in order for the call to be safe, the context requires the following additional target features: avx and bmi2
+
+error[E0133]: call to function `sse2` with `#[target_feature]` is unsafe and requires unsafe function or block
+  --> $DIR/safe-calls.rs:43:5
+   |
+LL |     sse2();
+   |     ^^^^^^ call to function with `#[target_feature]`
+   |
+   = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+   = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
+
+error[E0133]: call to function `avx_bmi2` with `#[target_feature]` is unsafe and requires unsafe function or block
+  --> $DIR/safe-calls.rs:45:5
+   |
+LL |     avx_bmi2();
+   |     ^^^^^^^^^^ call to function with `#[target_feature]`
+   |
+   = help: in order for the call to be safe, the context requires the following additional target feature: bmi2
+
+error[E0133]: call to function `Quux::avx_bmi2` with `#[target_feature]` is unsafe and requires unsafe function or block
+  --> $DIR/safe-calls.rs:47:5
+   |
+LL |     Quux.avx_bmi2();
+   |     ^^^^^^^^^^^^^^^ call to function with `#[target_feature]`
+   |
+   = help: in order for the call to be safe, the context requires the following additional target feature: bmi2
+
+error[E0133]: call to function `sse2` with `#[target_feature]` is unsafe and requires unsafe function or block
+  --> $DIR/safe-calls.rs:54:5
+   |
+LL |     sse2();
+   |     ^^^^^^ call to function with `#[target_feature]`
+   |
+   = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+   = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
+
+error[E0133]: call to function `sse2` with `#[target_feature]` is unsafe and requires unsafe function or block
+  --> $DIR/safe-calls.rs:58:15
+   |
+LL | const _: () = sse2();
+   |               ^^^^^^ call to function with `#[target_feature]`
+   |
+   = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+   = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
+
+error[E0133]: call to function `sse2_and_fxsr` with `#[target_feature]` is unsafe and requires unsafe function or block
+  --> $DIR/safe-calls.rs:61:15
+   |
+LL | const _: () = sse2_and_fxsr();
+   |               ^^^^^^^^^^^^^^^ call to function with `#[target_feature]`
+   |
+   = help: in order for the call to be safe, the context requires the following additional target features: sse2 and fxsr
+   = note: the fxsr and sse2 target features being enabled in the build configuration does not remove the requirement to list them in `#[target_feature]`
+
+error: call to function `sse2` with `#[target_feature]` is unsafe and requires unsafe block (error E0133)
+  --> $DIR/safe-calls.rs:68:5
+   |
+LL |     sse2();
+   |     ^^^^^^ call to function with `#[target_feature]`
+   |
+   = help: in order for the call to be safe, the context requires the following additional target feature: sse2
+   = note: the sse2 target feature being enabled in the build configuration does not remove the requirement to list it in `#[target_feature]`
+note: an unsafe function restricts its caller, but its body is safe by default
+  --> $DIR/safe-calls.rs:67:1
+   |
+LL | unsafe fn needs_unsafe_block() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: the lint level is defined here
+  --> $DIR/safe-calls.rs:64:8
+   |
+LL | #[deny(unsafe_op_in_unsafe_fn)]
+   |        ^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 12 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs
index f41c1051fce..16b717bc181 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs
@@ -9,7 +9,7 @@ trait Foo {
 }
 
 const fn foo<T: ~const Foo>() {
-    <T as Foo>::Assoc::foo();
+    <T as /* FIXME: ~const */ Foo>::Assoc::foo();
 }
 
 fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr
index 1b88839984f..268e337ee93 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr
@@ -6,15 +6,17 @@ LL |     type Assoc: ~const Foo;
    |
    = note: this item cannot have `~const` trait bounds
 
-error[E0308]: mismatched types
-  --> $DIR/assoc-type-const-bound-usage.rs:12:5
+error[E0277]: the trait bound `T: Foo` is not satisfied
+  --> $DIR/assoc-type-const-bound-usage.rs:12:6
    |
-LL |     <T as Foo>::Assoc::foo();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ expected `host`, found `true`
+LL |     <T as /* FIXME: ~const */ Foo>::Assoc::foo();
+   |      ^ the trait `Foo` is not implemented for `T`
    |
-   = note: expected constant `host`
-              found constant `true`
+help: consider further restricting this bound
+   |
+LL | const fn foo<T: ~const Foo + Foo>() {
+   |                            +++++
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0308`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs
index 4836d2b02ce..75797b1cbfe 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.rs
@@ -100,7 +100,7 @@ implements_const_drop! {
 }
 
 fn main() {
-    struct HasDropGlue(#[allow(unused_tuple_struct_fields)] Box<u8>);
+    struct HasDropGlue(#[allow(dead_code)] Box<u8>);
     struct HasDropImpl;
     impl Drop for HasDropImpl {
         fn drop(&mut self) {
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs
new file mode 100644
index 00000000000..f3480fcc9ee
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-fns-are-early-bound.rs
@@ -0,0 +1,86 @@
+// check-pass
+
+#![crate_type = "lib"]
+#![allow(internal_features)]
+#![no_std]
+#![no_core]
+#![feature(
+    auto_traits,
+    const_trait_impl,
+    effects,
+    lang_items,
+    no_core,
+    staged_api,
+    unboxed_closures
+)]
+#![stable(feature = "minicore", since = "1.0.0")]
+
+fn test() {
+    fn is_const_fn<F>(_: F)
+    where
+        F: const FnOnce<()>,
+    {
+    }
+
+    const fn foo() {}
+
+    is_const_fn(foo);
+}
+
+/// ---------------------------------------------------------------------- ///
+/// Const fn trait definitions
+
+#[const_trait]
+#[lang = "fn"]
+#[rustc_paren_sugar]
+trait Fn<Args: Tuple>: ~const FnMut<Args> {
+    extern "rust-call" fn call(&self, args: Args) -> Self::Output;
+}
+
+#[const_trait]
+#[lang = "fn_mut"]
+#[rustc_paren_sugar]
+trait FnMut<Args: Tuple>: ~const FnOnce<Args> {
+    extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output;
+}
+
+#[const_trait]
+#[lang = "fn_once"]
+#[rustc_paren_sugar]
+trait FnOnce<Args: Tuple> {
+    #[lang = "fn_once_output"]
+    type Output;
+
+    extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
+}
+
+/// ---------------------------------------------------------------------- ///
+/// All this other stuff needed for core. Unrelated to test.
+
+#[lang = "destruct"]
+#[const_trait]
+trait Destruct {}
+
+#[lang = "freeze"]
+unsafe auto trait Freeze {}
+
+#[lang = "drop"]
+#[const_trait]
+trait Drop {
+    fn drop(&mut self);
+}
+
+#[lang = "sized"]
+trait Sized {}
+#[lang = "copy"]
+trait Copy {}
+
+#[lang = "tuple_trait"]
+trait Tuple {}
+
+#[lang = "receiver"]
+trait Receiver {}
+
+impl<T: ?Sized> Receiver for &T {}
+
+impl<T: ?Sized> Receiver for &mut T {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr
index f0b6e2b1c25..d20404e63b3 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr
@@ -10,5 +10,15 @@ LL | impl const A for () {}
    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change
 
-error: aborting due to 1 previous error
+error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/const-impl-requires-const-trait.rs:8:6
+   |
+LL | impl const A for () {}
+   |      ^^^^^ unconstrained const parameter
+   |
+   = note: expressions using a const parameter must map each value to a distinct output value
+   = note: proving the result of expressions other than the parameter are unique is not supported
+
+error: aborting due to 2 previous errors
 
+For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs
index 14d306fc31f..9d579e67a4b 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs
@@ -1,4 +1,6 @@
 // known-bug: #110395
+// Broken until we have `&T: const Deref` impl in stdlib
+
 #![allow(incomplete_features)]
 #![feature(
     associated_type_bounds,
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr
index ddedf8f1d8d..d4be71f2f46 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr
@@ -1,28 +1,28 @@
-error[E0277]: can't compare `impl PartialEq + Destruct + Copy` with `impl PartialEq + Destruct + Copy`
-  --> $DIR/const-impl-trait.rs:28:17
+error[E0277]: can't compare `()` with `()`
+  --> $DIR/const-impl-trait.rs:37:17
    |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `impl PartialEq + Destruct + Copy == impl PartialEq + Destruct + Copy`
+LL |     assert!(cmp(&()));
+   |             --- ^^^ no implementation for `() == ()`
+   |             |
+   |             required by a bound introduced by this call
    |
-   = help: the trait `~const PartialEq` is not implemented for `impl PartialEq + Destruct + Copy`
-note: required by a bound in `Foo::{opaque#0}`
-  --> $DIR/const-impl-trait.rs:24:22
+   = help: the trait `const PartialEq` is not implemented for `()`
+   = help: the trait `PartialEq` is implemented for `()`
+note: required by a bound in `cmp`
+  --> $DIR/const-impl-trait.rs:14:23
    |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
-   |                      ^^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}`
+LL | const fn cmp(a: &impl ~const PartialEq) -> bool {
+   |                       ^^^^^^^^^^^^^^^^ required by this bound in `cmp`
 
-error[E0277]: can't drop `impl PartialEq + Destruct + Copy`
-  --> $DIR/const-impl-trait.rs:28:17
+error[E0369]: binary operation `==` cannot be applied to type `&impl ~const PartialEq`
+  --> $DIR/const-impl-trait.rs:15:7
    |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `impl PartialEq + Destruct + Copy`
-   |
-note: required by a bound in `Foo::{opaque#0}`
-  --> $DIR/const-impl-trait.rs:24:41
-   |
-LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
-   |                                         ^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}`
+LL |     a == a
+   |     - ^^ - &impl ~const PartialEq
+   |     |
+   |     &impl ~const PartialEq
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0277, E0369.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs
index 86706671316..a00a6d48105 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs
@@ -1,4 +1,4 @@
-#![feature(const_trait_impl)]
+#![feature(const_trait_impl, effects)]
 // edition: 2021
 
 #[const_trait]
@@ -6,4 +6,12 @@ trait Trait {}
 
 fn main() {
     let _: &dyn const Trait; //~ ERROR const trait bounds are not allowed in trait object types
+    let _: &dyn ~const Trait; //~ ERROR `~const` is not allowed here
 }
+
+// Regression test for issue #119525.
+trait NonConst {}
+const fn handle(_: &dyn const NonConst) {}
+//~^ ERROR const trait bounds are not allowed in trait object types
+const fn take(_: &dyn ~const NonConst) {}
+//~^ ERROR `~const` is not allowed here
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.stderr
index 8b9ba94d099..04c2dc2e2e0 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.stderr
@@ -4,5 +4,27 @@ error: const trait bounds are not allowed in trait object types
 LL |     let _: &dyn const Trait;
    |                 ^^^^^^^^^^^
 
-error: aborting due to 1 previous error
+error: `~const` is not allowed here
+  --> $DIR/const-trait-bounds-trait-objects.rs:9:17
+   |
+LL |     let _: &dyn ~const Trait;
+   |                 ^^^^^^
+   |
+   = note: trait objects cannot have `~const` trait bounds
+
+error: const trait bounds are not allowed in trait object types
+  --> $DIR/const-trait-bounds-trait-objects.rs:14:25
+   |
+LL | const fn handle(_: &dyn const NonConst) {}
+   |                         ^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+  --> $DIR/const-trait-bounds-trait-objects.rs:16:23
+   |
+LL | const fn take(_: &dyn ~const NonConst) {}
+   |                       ^^^^^^
+   |
+   = note: trait objects cannot have `~const` trait bounds
+
+error: aborting due to 4 previous errors
 
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr
index dfe8fa79e26..4b009446dbc 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.stderr
@@ -8,5 +8,11 @@ LL | #[derive_const(Default)]
    = note: adding a non-const method body in the future would be a breaking change
    = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 1 previous error
+error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
+   |
+   = note: expressions using a const parameter must map each value to a distinct output value
+   = note: proving the result of expressions other than the parameter are unique is not supported
+
+error: aborting due to 2 previous errors
 
+For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr
index c561f80653c..8f374bc4d8f 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.stderr
@@ -23,6 +23,21 @@ LL | #[derive_const(Default, PartialEq)]
    = note: adding a non-const method body in the future would be a breaking change
    = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 3 previous errors
+error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/derive-const-use.rs:7:6
+   |
+LL | impl const Default for A {
+   |      ^^^^^ unconstrained const parameter
+   |
+   = note: expressions using a const parameter must map each value to a distinct output value
+   = note: proving the result of expressions other than the parameter are unique is not supported
+
+error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
+   |
+   = note: expressions using a const parameter must map each value to a distinct output value
+   = note: proving the result of expressions other than the parameter are unique is not supported
+
+error: aborting due to 5 previous errors
 
-For more information about this error, try `rustc --explain E0635`.
+Some errors have detailed explanations: E0207, E0635.
+For more information about an error, try `rustc --explain E0207`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.rs
index c6be75a6a2f..7d817d09c7f 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.rs
@@ -1,12 +1,14 @@
 #![feature(const_trait_impl, effects)]
 
 const fn test() -> impl ~const Fn() { //~ ERROR `~const` can only be applied to `#[const_trait]` traits
+    //~^ ERROR cycle detected
     const move || { //~ ERROR const closures are experimental
         let sl: &[u8] = b"foo";
 
         match sl {
             [first, remainder @ ..] => {
                 assert_eq!(first, &b'f');
+                //~^ ERROR can't compare `&u8` with `&u8`
             }
             [] => panic!(),
         }
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr
index fe6b613d154..7e268f50dca 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr
@@ -1,5 +1,5 @@
 error[E0658]: const closures are experimental
-  --> $DIR/ice-112822-expected-type-for-param.rs:4:5
+  --> $DIR/ice-112822-expected-type-for-param.rs:5:5
    |
 LL |     const move || {
    |     ^^^^^
@@ -13,6 +13,47 @@ error: `~const` can only be applied to `#[const_trait]` traits
 LL | const fn test() -> impl ~const Fn() {
    |                                ^^^^
 
-error: aborting due to 2 previous errors
+error[E0277]: can't compare `&u8` with `&u8`
+  --> $DIR/ice-112822-expected-type-for-param.rs:10:17
+   |
+LL |                 assert_eq!(first, &b'f');
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `&u8 == &u8`
+   |
+   = help: the trait `~const PartialEq<&u8>` is not implemented for `&u8`
+   = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0391]: cycle detected when computing type of opaque `test::{opaque#0}`
+  --> $DIR/ice-112822-expected-type-for-param.rs:3:20
+   |
+LL | const fn test() -> impl ~const Fn() {
+   |                    ^^^^^^^^^^^^^^^^
+   |
+note: ...which requires borrow-checking `test`...
+  --> $DIR/ice-112822-expected-type-for-param.rs:3:1
+   |
+LL | const fn test() -> impl ~const Fn() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires promoting constants in MIR for `test`...
+  --> $DIR/ice-112822-expected-type-for-param.rs:3:1
+   |
+LL | const fn test() -> impl ~const Fn() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires const checking `test`...
+  --> $DIR/ice-112822-expected-type-for-param.rs:3:1
+   |
+LL | const fn test() -> impl ~const Fn() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = note: ...which requires computing whether `test::{opaque#0}` is freeze...
+   = note: ...which requires evaluating trait selection obligation `test::{opaque#0}: core::marker::Freeze`...
+   = note: ...which again requires computing type of opaque `test::{opaque#0}`, completing the cycle
+note: cycle used when computing type of `test::{opaque#0}`
+  --> $DIR/ice-112822-expected-type-for-param.rs:3:20
+   |
+LL | const fn test() -> impl ~const Fn() {
+   |                    ^^^^^^^^^^^^^^^^
+   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
+
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0658`.
+Some errors have detailed explanations: E0277, E0391, E0658.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs
index 59fb48e794c..84d9bcd7ac9 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs
@@ -40,7 +40,7 @@ const fn bar() {
 
 #[lang = "Try"]
 #[const_trait]
-trait Try: FromResidual {
+trait Try: FromResidual<Self::Residual> {
     type Output;
     type Residual;
 
@@ -53,7 +53,7 @@ trait Try: FromResidual {
 
 // FIXME
 // #[const_trait]
-trait FromResidual<R = <Self as Try>::Residual> {
+trait FromResidual<R = <Self as /* FIXME: ~const */ Try>::Residual> {
     #[lang = "from_residual"]
     fn from_residual(residual: R) -> Self;
 }
@@ -519,9 +519,14 @@ extern "rust-intrinsic" {
         called_in_const: F,
         called_at_rt: G,
     ) -> RET
-    /* where clauses enforced by built-in method confirmation:
     where
-        F: const FnOnce<Arg, Output = RET>,
-        G: FnOnce<Arg, Output = RET>,
-     */;
+        F: const FnOnce<ARG, Output = RET>,
+        G: FnOnce<ARG, Output = RET>;
+}
+
+fn test_const_eval_select() {
+    const fn const_fn() {}
+    fn rt_fn() {}
+
+    unsafe { const_eval_select((), const_fn, rt_fn); }
 }
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs
index b30d7743edf..e22eed3e0ef 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs
@@ -1,7 +1,12 @@
-// check-pass
+// known-bug: #110395
+// FIXME: effects
+
 #![feature(const_trait_impl, effects)]
 
-pub trait Owo<X = <Self as Uwu>::T> {}
+// This fails because `~const Uwu` doesn't imply (non-const) `Uwu`.
+
+// FIXME: #[const_trait]
+pub trait Owo<X = <Self as /* FIXME: ~const */ Uwu>::T> {}
 
 #[const_trait]
 pub trait Uwu: Owo {
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.stderr
new file mode 100644
index 00000000000..eac3ee9e4e2
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.stderr
@@ -0,0 +1,65 @@
+error[E0277]: the trait bound `Self: Uwu` is not satisfied
+  --> $DIR/project.rs:12:1
+   |
+LL | pub trait Uwu: Owo {
+   | ^^^^^^^^^^^^^^^^^^ the trait `Uwu` is not implemented for `Self`
+   |
+help: consider further restricting `Self`
+   |
+LL | pub trait Uwu: Owo + Uwu {
+   |                    +++++
+
+error[E0277]: the trait bound `Self: Uwu` is not satisfied
+  --> $DIR/project.rs:12:1
+   |
+LL | / pub trait Uwu: Owo {
+LL | |     type T;
+LL | | }
+   | |_^ the trait `Uwu` is not implemented for `Self`
+   |
+help: consider further restricting `Self`
+   |
+LL | pub trait Uwu: Owo + Uwu {
+   |                    +++++
+
+error[E0277]: the trait bound `Self: Uwu` is not satisfied
+  --> $DIR/project.rs:12:16
+   |
+LL | pub trait Uwu: Owo {
+   |                ^^^ the trait `Uwu` is not implemented for `Self`
+   |
+note: required by a bound in `Owo`
+  --> $DIR/project.rs:9:15
+   |
+LL | pub trait Owo<X = <Self as /* FIXME: ~const */ Uwu>::T> {}
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Owo`
+help: consider further restricting `Self`
+   |
+LL | pub trait Uwu: Owo + Uwu {
+   |                    +++++
+
+error[E0277]: the trait bound `Self: Uwu` is not satisfied
+  --> $DIR/project.rs:13:5
+   |
+LL |     type T;
+   |     ^^^^^^ the trait `Uwu` is not implemented for `Self`
+   |
+help: consider further restricting `Self`
+   |
+LL | pub trait Uwu: Owo + Uwu {
+   |                    +++++
+
+error[E0277]: the trait bound `Self: Uwu` is not satisfied
+  --> $DIR/project.rs:13:5
+   |
+LL |     type T;
+   |     ^^^^^^^ the trait `Uwu` is not implemented for `Self`
+   |
+help: consider further restricting `Self`
+   |
+LL | pub trait Uwu: Owo + Uwu {
+   |                    +++++
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr
index eae313ef087..ac25812c42d 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr
@@ -24,5 +24,13 @@ LL | trait Bar: ~const Foo {}
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 3 previous errors
+error: `~const` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-2.rs:10:19
+   |
+LL | trait Bar: ~const Foo {}
+   |                   ^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 4 previous errors
 
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.ny.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.ny.stderr
index be3153d6a08..5273f7e48eb 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.ny.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.ny.stderr
@@ -12,5 +12,13 @@ LL | trait Bar: ~const Foo {}
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 2 previous errors
+error: `~const` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-2.rs:10:19
+   |
+LL | trait Bar: ~const Foo {}
+   |                   ^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs
index abdf0feee03..120399f0c78 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.rs
@@ -10,7 +10,8 @@ trait Foo {
 trait Bar: ~const Foo {}
 //[ny,nn]~^ ERROR: `~const` can only be applied to `#[const_trait]`
 //[ny,nn]~| ERROR: `~const` can only be applied to `#[const_trait]`
-//[yn,nn]~^^^ ERROR: `~const` is not allowed here
+//[ny,nn]~| ERROR: `~const` can only be applied to `#[const_trait]`
+//[yn,nn]~^^^^ ERROR: `~const` is not allowed here
 
 const fn foo<T: Bar>(x: &T) {
     x.a();
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr
index c05c4d50a33..53445d25590 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr
@@ -11,7 +11,7 @@ LL | trait Bar: ~const Foo {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0308]: mismatched types
-  --> $DIR/super-traits-fail-2.rs:16:5
+  --> $DIR/super-traits-fail-2.rs:17:5
    |
 LL |     x.a();
    |     ^^^^^ expected `host`, found `true`
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr
index 852c02cad5c..681647945d0 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/super-traits-fail-2.rs:16:5
+  --> $DIR/super-traits-fail-2.rs:17:5
    |
 LL |     x.a();
    |     ^^^^^ expected `host`, found `true`
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr
index 834d6f4dcf3..2c63c0217ab 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr
@@ -25,10 +25,18 @@ LL | trait Bar: ~const Foo {}
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:17:24
+  --> $DIR/super-traits-fail-3.rs:18:24
    |
 LL | const fn foo<T: ~const Bar>(x: &T) {
    |                        ^^^
 
-error: aborting due to 4 previous errors
+error: `~const` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:12:19
+   |
+LL | trait Bar: ~const Foo {}
+   |                   ^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 5 previous errors
 
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.ny.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.ny.stderr
index 4fdd2284c47..f737cb243df 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.ny.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.ny.stderr
@@ -12,5 +12,13 @@ LL | trait Bar: ~const Foo {}
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 2 previous errors
+error: `~const` can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:12:19
+   |
+LL | trait Bar: ~const Foo {}
+   |                   ^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs
index 30131d5849c..745668c4dd4 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.rs
@@ -12,11 +12,13 @@ trait Foo {
 trait Bar: ~const Foo {}
 //[ny,nn]~^ ERROR: `~const` can only be applied to `#[const_trait]`
 //[ny,nn]~| ERROR: `~const` can only be applied to `#[const_trait]`
-//[yn,nn]~^^^ ERROR: `~const` is not allowed here
+//[ny,nn]~| ERROR: `~const` can only be applied to `#[const_trait]`
+//[yn,nn]~^^^^ ERROR: `~const` is not allowed here
 
 const fn foo<T: ~const Bar>(x: &T) {
     //[yn,nn]~^ ERROR: `~const` can only be applied to `#[const_trait]`
     x.a();
+    //[yn]~^ ERROR: mismatched types
 }
 
 fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr
index ab7c814eb49..de7a11cf155 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr
@@ -11,10 +11,20 @@ LL | trait Bar: ~const Foo {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:17:24
+  --> $DIR/super-traits-fail-3.rs:18:24
    |
 LL | const fn foo<T: ~const Bar>(x: &T) {
    |                        ^^^
 
-error: aborting due to 2 previous errors
+error[E0308]: mismatched types
+  --> $DIR/super-traits-fail-3.rs:20:5
+   |
+LL |     x.a();
+   |     ^^^^^ expected `host`, found `true`
+   |
+   = note: expected constant `host`
+              found constant `true`
+
+error: aborting due to 3 previous errors
 
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs
new file mode 100644
index 00000000000..a848b6d2fc9
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-assoc-fn-in-trait-impl.rs
@@ -0,0 +1,29 @@
+// Regression test for issue #119700.
+// check-pass
+
+#![feature(const_trait_impl, effects)]
+
+#[const_trait]
+trait Main {
+    fn compute<T: ~const Aux>() -> u32;
+}
+
+impl const Main for () {
+    fn compute<T: ~const Aux>() -> u32 {
+        T::generate()
+    }
+}
+
+#[const_trait]
+trait Aux {
+    fn generate() -> u32;
+}
+
+impl const Aux for () {
+    fn generate() -> u32 { 1024 }
+}
+
+fn main() {
+    const _: u32 = <()>::compute::<()>();
+    let _ = <()>::compute::<()>();
+}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs
index bfd9fe42e67..bfd9fe42e67 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-inherent-assoc-const-fn.rs
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs
index 5ecb75094f0..9d220686771 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.rs
@@ -9,10 +9,12 @@ fn non_const_function<T: ~const Trait>() {} //~ ERROR `~const` is not allowed
 struct Struct<T: ~const Trait> { field: T } //~ ERROR `~const` is not allowed here
 struct TupleStruct<T: ~const Trait>(T); //~ ERROR `~const` is not allowed here
 struct UnitStruct<T: ~const Trait>; //~ ERROR `~const` is not allowed here
+//~^ ERROR  parameter `T` is never used
 
 enum Enum<T: ~const Trait> { Variant(T) } //~ ERROR `~const` is not allowed here
 
 union Union<T: ~const Trait> { field: T } //~ ERROR `~const` is not allowed here
+//~^ ERROR field must implement `Copy`
 
 type Type<T: ~const Trait> = T; //~ ERROR `~const` is not allowed here
 
@@ -30,6 +32,7 @@ trait NonConstTrait {
 
 impl NonConstTrait for () {
     type Type<T: ~const Trait> = (); //~ ERROR `~const` is not allowed
+    //~^ ERROR overflow evaluating the requirement `(): Trait`
     fn non_const_function<T: ~const Trait>() {} //~ ERROR `~const` is not allowed
     const CONSTANT<T: ~const Trait>: () = (); //~ ERROR `~const` is not allowed
     //~^ ERROR generic const items are experimental
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
index 497ec5bcf84..a54ba7a94b4 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
@@ -35,7 +35,7 @@ LL | struct UnitStruct<T: ~const Trait>;
    = note: this item cannot have `~const` trait bounds
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:13:14
+  --> $DIR/tilde-const-invalid-places.rs:14:14
    |
 LL | enum Enum<T: ~const Trait> { Variant(T) }
    |              ^^^^^^
@@ -43,7 +43,7 @@ LL | enum Enum<T: ~const Trait> { Variant(T) }
    = note: this item cannot have `~const` trait bounds
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:15:16
+  --> $DIR/tilde-const-invalid-places.rs:16:16
    |
 LL | union Union<T: ~const Trait> { field: T }
    |                ^^^^^^
@@ -51,7 +51,7 @@ LL | union Union<T: ~const Trait> { field: T }
    = note: this item cannot have `~const` trait bounds
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:17:14
+  --> $DIR/tilde-const-invalid-places.rs:19:14
    |
 LL | type Type<T: ~const Trait> = T;
    |              ^^^^^^
@@ -59,7 +59,7 @@ LL | type Type<T: ~const Trait> = T;
    = note: this item cannot have `~const` trait bounds
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:19:19
+  --> $DIR/tilde-const-invalid-places.rs:21:19
    |
 LL | const CONSTANT<T: ~const Trait>: () = ();
    |                   ^^^^^^
@@ -67,7 +67,7 @@ LL | const CONSTANT<T: ~const Trait>: () = ();
    = note: this item cannot have `~const` trait bounds
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:23:18
+  --> $DIR/tilde-const-invalid-places.rs:25:18
    |
 LL |     type Type<T: ~const Trait>: ~const Trait;
    |                  ^^^^^^
@@ -75,7 +75,7 @@ LL |     type Type<T: ~const Trait>: ~const Trait;
    = note: this item cannot have `~const` trait bounds
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:23:33
+  --> $DIR/tilde-const-invalid-places.rs:25:33
    |
 LL |     type Type<T: ~const Trait>: ~const Trait;
    |                                 ^^^^^^
@@ -83,19 +83,19 @@ LL |     type Type<T: ~const Trait>: ~const Trait;
    = note: this item cannot have `~const` trait bounds
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:26:30
+  --> $DIR/tilde-const-invalid-places.rs:28:30
    |
 LL |     fn non_const_function<T: ~const Trait>();
    |                              ^^^^^^
    |
 note: this function is not `const`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:26:8
+  --> $DIR/tilde-const-invalid-places.rs:28:8
    |
 LL |     fn non_const_function<T: ~const Trait>();
    |        ^^^^^^^^^^^^^^^^^^
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:27:23
+  --> $DIR/tilde-const-invalid-places.rs:29:23
    |
 LL |     const CONSTANT<T: ~const Trait>: ();
    |                       ^^^^^^
@@ -103,7 +103,7 @@ LL |     const CONSTANT<T: ~const Trait>: ();
    = note: this item cannot have `~const` trait bounds
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:32:18
+  --> $DIR/tilde-const-invalid-places.rs:34:18
    |
 LL |     type Type<T: ~const Trait> = ();
    |                  ^^^^^^
@@ -111,19 +111,19 @@ LL |     type Type<T: ~const Trait> = ();
    = note: this item cannot have `~const` trait bounds
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:33:30
+  --> $DIR/tilde-const-invalid-places.rs:36:30
    |
 LL |     fn non_const_function<T: ~const Trait>() {}
    |                              ^^^^^^
    |
 note: this function is not `const`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:33:8
+  --> $DIR/tilde-const-invalid-places.rs:36:8
    |
 LL |     fn non_const_function<T: ~const Trait>() {}
    |        ^^^^^^^^^^^^^^^^^^
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:34:23
+  --> $DIR/tilde-const-invalid-places.rs:37:23
    |
 LL |     const CONSTANT<T: ~const Trait>: () = ();
    |                       ^^^^^^
@@ -131,7 +131,7 @@ LL |     const CONSTANT<T: ~const Trait>: () = ();
    = note: this item cannot have `~const` trait bounds
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:41:18
+  --> $DIR/tilde-const-invalid-places.rs:44:18
    |
 LL |     type Type<T: ~const Trait> = ();
    |                  ^^^^^^
@@ -139,19 +139,19 @@ LL |     type Type<T: ~const Trait> = ();
    = note: this item cannot have `~const` trait bounds
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:43:30
+  --> $DIR/tilde-const-invalid-places.rs:46:30
    |
 LL |     fn non_const_function<T: ~const Trait>() {}
    |                              ^^^^^^
    |
 note: this function is not `const`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:43:8
+  --> $DIR/tilde-const-invalid-places.rs:46:8
    |
 LL |     fn non_const_function<T: ~const Trait>() {}
    |        ^^^^^^^^^^^^^^^^^^
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:44:23
+  --> $DIR/tilde-const-invalid-places.rs:47:23
    |
 LL |     const CONSTANT<T: ~const Trait>: () = ();
    |                       ^^^^^^
@@ -159,55 +159,55 @@ LL |     const CONSTANT<T: ~const Trait>: () = ();
    = note: this item cannot have `~const` trait bounds
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:49:15
+  --> $DIR/tilde-const-invalid-places.rs:52:15
    |
 LL | trait Child0: ~const Trait {}
    |               ^^^^^^
    |
 note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:49:1
+  --> $DIR/tilde-const-invalid-places.rs:52:1
    |
 LL | trait Child0: ~const Trait {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:50:26
+  --> $DIR/tilde-const-invalid-places.rs:53:26
    |
 LL | trait Child1 where Self: ~const Trait {}
    |                          ^^^^^^
    |
 note: this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:50:1
+  --> $DIR/tilde-const-invalid-places.rs:53:1
    |
 LL | trait Child1 where Self: ~const Trait {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:53:9
+  --> $DIR/tilde-const-invalid-places.rs:56:9
    |
 LL | impl<T: ~const Trait> Trait for T {}
    |         ^^^^^^
    |
 note: this impl is not `const`, so it cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:53:1
+  --> $DIR/tilde-const-invalid-places.rs:56:1
    |
 LL | impl<T: ~const Trait> Trait for T {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `~const` is not allowed here
-  --> $DIR/tilde-const-invalid-places.rs:56:9
+  --> $DIR/tilde-const-invalid-places.rs:59:9
    |
 LL | impl<T: ~const Trait> Struct<T> {}
    |         ^^^^^^
    |
 note: inherent impls cannot have `~const` trait bounds
-  --> $DIR/tilde-const-invalid-places.rs:56:1
+  --> $DIR/tilde-const-invalid-places.rs:59:1
    |
 LL | impl<T: ~const Trait> Struct<T> {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0658]: generic const items are experimental
-  --> $DIR/tilde-const-invalid-places.rs:19:15
+  --> $DIR/tilde-const-invalid-places.rs:21:15
    |
 LL | const CONSTANT<T: ~const Trait>: () = ();
    |               ^^^^^^^^^^^^^^^^^
@@ -216,7 +216,7 @@ LL | const CONSTANT<T: ~const Trait>: () = ();
    = help: add `#![feature(generic_const_items)]` to the crate attributes to enable
 
 error[E0658]: generic const items are experimental
-  --> $DIR/tilde-const-invalid-places.rs:27:19
+  --> $DIR/tilde-const-invalid-places.rs:29:19
    |
 LL |     const CONSTANT<T: ~const Trait>: ();
    |                   ^^^^^^^^^^^^^^^^^
@@ -225,7 +225,7 @@ LL |     const CONSTANT<T: ~const Trait>: ();
    = help: add `#![feature(generic_const_items)]` to the crate attributes to enable
 
 error[E0658]: generic const items are experimental
-  --> $DIR/tilde-const-invalid-places.rs:34:19
+  --> $DIR/tilde-const-invalid-places.rs:37:19
    |
 LL |     const CONSTANT<T: ~const Trait>: () = ();
    |                   ^^^^^^^^^^^^^^^^^
@@ -234,7 +234,7 @@ LL |     const CONSTANT<T: ~const Trait>: () = ();
    = help: add `#![feature(generic_const_items)]` to the crate attributes to enable
 
 error[E0658]: generic const items are experimental
-  --> $DIR/tilde-const-invalid-places.rs:44:19
+  --> $DIR/tilde-const-invalid-places.rs:47:19
    |
 LL |     const CONSTANT<T: ~const Trait>: () = ();
    |                   ^^^^^^^^^^^^^^^^^
@@ -243,7 +243,7 @@ LL |     const CONSTANT<T: ~const Trait>: () = ();
    = help: add `#![feature(generic_const_items)]` to the crate attributes to enable
 
 error[E0658]: inherent associated types are unstable
-  --> $DIR/tilde-const-invalid-places.rs:41:5
+  --> $DIR/tilde-const-invalid-places.rs:44:5
    |
 LL |     type Type<T: ~const Trait> = ();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -251,6 +251,39 @@ LL |     type Type<T: ~const Trait> = ();
    = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
    = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable
 
-error: aborting due to 27 previous errors
+error[E0392]: parameter `T` is never used
+  --> $DIR/tilde-const-invalid-places.rs:11:19
+   |
+LL | struct UnitStruct<T: ~const Trait>;
+   |                   ^ unused parameter
+   |
+   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
+
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/tilde-const-invalid-places.rs:16:32
+   |
+LL | union Union<T: ~const Trait> { field: T }
+   |                                ^^^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL | union Union<T: ~const Trait> { field: std::mem::ManuallyDrop<T> }
+   |                                       +++++++++++++++++++++++ +
+
+error[E0275]: overflow evaluating the requirement `(): Trait`
+  --> $DIR/tilde-const-invalid-places.rs:34:34
+   |
+LL |     type Type<T: ~const Trait> = ();
+   |                                  ^^
+   |
+note: required by a bound in `NonConstTrait::Type`
+  --> $DIR/tilde-const-invalid-places.rs:25:33
+   |
+LL |     type Type<T: ~const Trait>: ~const Trait;
+   |                                 ^^^^^^^^^^^^ required by this bound in `NonConstTrait::Type`
+
+error: aborting due to 30 previous errors
 
-For more information about this error, try `rustc --explain E0658`.
+Some errors have detailed explanations: E0275, E0392, E0658, E0740.
+For more information about an error, try `rustc --explain E0275`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr
index 2a9647da782..0141dcfb06f 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr
@@ -1,21 +1,35 @@
-error[E0308]: mismatched types
+error[E0277]: the trait bound `T: ~const Bar` is not satisfied
   --> $DIR/trait-where-clause-const.rs:21:5
    |
 LL |     T::b();
-   |     ^^^^^^ expected `host`, found `true`
+   |     ^ the trait `~const Bar` is not implemented for `T`
    |
-   = note: expected constant `host`
-              found constant `true`
+note: required by a bound in `Foo::b`
+  --> $DIR/trait-where-clause-const.rs:15:24
+   |
+LL |     fn b() where Self: ~const Bar;
+   |                        ^^^^^^^^^^ required by this bound in `Foo::b`
+help: consider further restricting this bound
+   |
+LL | const fn test1<T: ~const Foo + Bar + ~const Bar>() {
+   |                                    ++++++++++++
 
-error[E0308]: mismatched types
-  --> $DIR/trait-where-clause-const.rs:23:5
+error[E0277]: the trait bound `T: ~const Bar` is not satisfied
+  --> $DIR/trait-where-clause-const.rs:23:12
    |
 LL |     T::c::<T>();
-   |     ^^^^^^^^^^^ expected `host`, found `true`
+   |            ^ the trait `~const Bar` is not implemented for `T`
+   |
+note: required by a bound in `Foo::c`
+  --> $DIR/trait-where-clause-const.rs:16:13
+   |
+LL |     fn c<T: ~const Bar>();
+   |             ^^^^^^^^^^ required by this bound in `Foo::c`
+help: consider further restricting this bound
    |
-   = note: expected constant `host`
-              found constant `true`
+LL | const fn test1<T: ~const Foo + Bar + ~const Bar>() {
+   |                                    ++++++++++++
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0308`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs
index 62a7b312378..8f441410c17 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs
@@ -30,4 +30,4 @@ fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
 // FIXME(effects): Instead of suggesting `+ const Trait`, suggest
 //                 changing `~const Trait` to `const Trait`.
 const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-//~^ ERROR the trait bound `T: const Trait` is not satisfied
+//~^ ERROR mismatched types
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr
index 2fb4fc1aa2b..258f95b5c4a 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr
@@ -7,16 +7,14 @@ LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
    = note: expected constant `false`
               found constant `true`
 
-error[E0277]: the trait bound `T: const Trait` is not satisfied
+error[E0308]: mismatched types
   --> $DIR/unsatisfied-const-trait-bound.rs:32:50
    |
 LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
-   |                                                  ^ the trait `const Trait` is not implemented for `T`
-   |
-help: consider further restricting this bound
+   |                                                  ^^^^^^^^^ expected `false`, found `host`
    |
-LL | const fn accept1<T: ~const Trait + const Trait>(_: Container<{ T::make() }>) {}
-   |                                  +++++++++++++
+   = note: expected constant `false`
+              found constant `host`
 
 error[E0277]: the trait bound `Ty: const Trait` is not satisfied
   --> $DIR/unsatisfied-const-trait-bound.rs:20:15
diff --git a/tests/ui/runtime/running-with-no-runtime.rs b/tests/ui/runtime/running-with-no-runtime.rs
index c575a6bec8e..c321e86dc18 100644
--- a/tests/ui/runtime/running-with-no-runtime.rs
+++ b/tests/ui/runtime/running-with-no-runtime.rs
@@ -1,8 +1,6 @@
 // run-pass
 // ignore-emscripten spawning processes is not supported
 // ignore-sgx no processes
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
 
 #![feature(start)]
 
diff --git a/tests/ui/sanitize/badfree.rs b/tests/ui/sanitize/badfree.rs
index c8d1ce7dff2..4a230e11d95 100644
--- a/tests/ui/sanitize/badfree.rs
+++ b/tests/ui/sanitize/badfree.rs
@@ -5,7 +5,7 @@
 // compile-flags: -Z sanitizer=address -O
 //
 // run-fail
-// error-pattern: AddressSanitizer: SEGV
+// regex-error-pattern: AddressSanitizer: (SEGV|attempting free on address which was not malloc)
 
 use std::ffi::c_void;
 
diff --git a/tests/ui/self/arbitrary_self_types_pin_needing_borrow.stderr b/tests/ui/self/arbitrary_self_types_pin_needing_borrow.stderr
index ec985b254b3..1811cd6753f 100644
--- a/tests/ui/self/arbitrary_self_types_pin_needing_borrow.stderr
+++ b/tests/ui/self/arbitrary_self_types_pin_needing_borrow.stderr
@@ -6,7 +6,7 @@ LL |     Pin::new(S).x();
    |     |
    |     required by a bound introduced by this call
    |
-note: required by a bound in `Pin::<P>::new`
+note: required by a bound in `Pin::<Ptr>::new`
   --> $SRC_DIR/core/src/pin.rs:LL:COL
 help: consider borrowing here
    |
diff --git a/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.rs b/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.rs
new file mode 100644
index 00000000000..800735cf3a7
--- /dev/null
+++ b/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.rs
@@ -0,0 +1,11 @@
+// Check to see if we can get parameters from an @argsfile file
+//
+// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path
+// separators. This test uses backslash as the path separator for the command
+// line arguments and is only run on windows.
+//
+// only-windows
+// compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}\shell-argfiles\shell-argfiles-badquotes.args
+
+fn main() {
+}
diff --git a/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.stderr b/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.stderr
new file mode 100644
index 00000000000..14adb1f740a
--- /dev/null
+++ b/tests/ui/shell-argfiles/shell-argfiles-badquotes-windows.stderr
@@ -0,0 +1,2 @@
+error: Failed to load argument file: Invalid shell-style arguments in $DIR/shell-argfiles-badquotes.args
+
diff --git a/tests/ui/shell-argfiles/shell-argfiles-badquotes.args b/tests/ui/shell-argfiles/shell-argfiles-badquotes.args
new file mode 100644
index 00000000000..c0d531adf3f
--- /dev/null
+++ b/tests/ui/shell-argfiles/shell-argfiles-badquotes.args
@@ -0,0 +1 @@
+"--cfg" "unquoted_set
diff --git a/tests/ui/shell-argfiles/shell-argfiles-badquotes.rs b/tests/ui/shell-argfiles/shell-argfiles-badquotes.rs
new file mode 100644
index 00000000000..f9160143a04
--- /dev/null
+++ b/tests/ui/shell-argfiles/shell-argfiles-badquotes.rs
@@ -0,0 +1,12 @@
+// Check to see if we can get parameters from an @argsfile file
+//
+// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path
+// separators. We have a duplicated version of this test that uses backslash as
+// the path separator for the command line arguments that is only run on
+// windows.
+//
+// ignore-windows
+// compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}/shell-argfiles/shell-argfiles-badquotes.args
+
+fn main() {
+}
diff --git a/tests/ui/shell-argfiles/shell-argfiles-badquotes.stderr b/tests/ui/shell-argfiles/shell-argfiles-badquotes.stderr
new file mode 100644
index 00000000000..14adb1f740a
--- /dev/null
+++ b/tests/ui/shell-argfiles/shell-argfiles-badquotes.stderr
@@ -0,0 +1,2 @@
+error: Failed to load argument file: Invalid shell-style arguments in $DIR/shell-argfiles-badquotes.args
+
diff --git a/tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args b/tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args
new file mode 100644
index 00000000000..4e66d5a0395
--- /dev/null
+++ b/tests/ui/shell-argfiles/shell-argfiles-via-argfile-shell.args
@@ -0,0 +1 @@
+"--cfg" "shell_args_set"
\ No newline at end of file
diff --git a/tests/ui/shell-argfiles/shell-argfiles-via-argfile.args b/tests/ui/shell-argfiles/shell-argfiles-via-argfile.args
new file mode 100644
index 00000000000..d0af54e24e3
--- /dev/null
+++ b/tests/ui/shell-argfiles/shell-argfiles-via-argfile.args
@@ -0,0 +1 @@
+-Zshell-argfiles
\ No newline at end of file
diff --git a/tests/ui/shell-argfiles/shell-argfiles-via-argfile.rs b/tests/ui/shell-argfiles/shell-argfiles-via-argfile.rs
new file mode 100644
index 00000000000..d71e3218f53
--- /dev/null
+++ b/tests/ui/shell-argfiles/shell-argfiles-via-argfile.rs
@@ -0,0 +1,10 @@
+// Check to see if we can get parameters from an @argsfile file
+//
+// build-pass
+// compile-flags: @{{src-base}}/shell-argfiles/shell-argfiles-via-argfile.args @shell:{{src-base}}/shell-argfiles/shell-argfiles-via-argfile-shell.args
+
+#[cfg(not(shell_args_set))]
+compile_error!("shell_args_set not set");
+
+fn main() {
+}
diff --git a/tests/ui/shell-argfiles/shell-argfiles.args b/tests/ui/shell-argfiles/shell-argfiles.args
new file mode 100644
index 00000000000..e5bb4b807ec
--- /dev/null
+++ b/tests/ui/shell-argfiles/shell-argfiles.args
@@ -0,0 +1,3 @@
+--cfg unquoted_set
+'--cfg' 'single_quoted_set'
+"--cfg" "double_quoted_set"
diff --git a/tests/ui/shell-argfiles/shell-argfiles.rs b/tests/ui/shell-argfiles/shell-argfiles.rs
new file mode 100644
index 00000000000..9bc252ea628
--- /dev/null
+++ b/tests/ui/shell-argfiles/shell-argfiles.rs
@@ -0,0 +1,19 @@
+// Check to see if we can get parameters from an @argsfile file
+//
+// build-pass
+// compile-flags: --cfg cmdline_set -Z shell-argfiles @shell:{{src-base}}/shell-argfiles/shell-argfiles.args
+
+#[cfg(not(cmdline_set))]
+compile_error!("cmdline_set not set");
+
+#[cfg(not(unquoted_set))]
+compile_error!("unquoted_set not set");
+
+#[cfg(not(single_quoted_set))]
+compile_error!("single_quoted_set not set");
+
+#[cfg(not(double_quoted_set))]
+compile_error!("double_quoted_set not set");
+
+fn main() {
+}
diff --git a/tests/ui/simd/intrinsic/generic-comparison-pass.rs b/tests/ui/simd/intrinsic/generic-comparison-pass.rs
index da5c42a1a98..103132c18ae 100644
--- a/tests/ui/simd/intrinsic/generic-comparison-pass.rs
+++ b/tests/ui/simd/intrinsic/generic-comparison-pass.rs
@@ -1,7 +1,5 @@
 // run-pass
 // ignore-emscripten FIXME(#45351) hits an LLVM assert
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
 
 #![feature(repr_simd, platform_intrinsics, concat_idents)]
 #![allow(non_camel_case_types)]
diff --git a/tests/ui/span/lint-unused-unsafe.rs b/tests/ui/span/lint-unused-unsafe.rs
index ca615f64f22..94bdd114007 100644
--- a/tests/ui/span/lint-unused-unsafe.rs
+++ b/tests/ui/span/lint-unused-unsafe.rs
@@ -3,9 +3,6 @@
 
 // edition:2018
 
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
-
 #![allow(dead_code)]
 #![deny(unused_unsafe)]
 
diff --git a/tests/ui/span/lint-unused-unsafe.mir.stderr b/tests/ui/span/lint-unused-unsafe.stderr
index 9e8d3359242..d8bd7cc7475 100644
--- a/tests/ui/span/lint-unused-unsafe.mir.stderr
+++ b/tests/ui/span/lint-unused-unsafe.stderr
@@ -1,77 +1,77 @@
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:22:13
+  --> $DIR/lint-unused-unsafe.rs:19:13
    |
 LL | fn bad1() { unsafe {} }
    |             ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:10:9
+  --> $DIR/lint-unused-unsafe.rs:7:9
    |
 LL | #![deny(unused_unsafe)]
    |         ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:23:13
+  --> $DIR/lint-unused-unsafe.rs:20:13
    |
 LL | fn bad2() { unsafe { bad1() } }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:24:20
+  --> $DIR/lint-unused-unsafe.rs:21:20
    |
 LL | unsafe fn bad3() { unsafe {} }
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:25:13
+  --> $DIR/lint-unused-unsafe.rs:22:13
    |
 LL | fn bad4() { unsafe { callback(||{}) } }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:28:5
+  --> $DIR/lint-unused-unsafe.rs:25:5
    |
 LL |     unsafe {
    |     ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:35:5
+  --> $DIR/lint-unused-unsafe.rs:32:5
    |
 LL |     unsafe {
    |     ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:70:9
+  --> $DIR/lint-unused-unsafe.rs:67:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:79:9
+  --> $DIR/lint-unused-unsafe.rs:76:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:80:13
+  --> $DIR/lint-unused-unsafe.rs:77:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:81:13
+  --> $DIR/lint-unused-unsafe.rs:78:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:86:9
+  --> $DIR/lint-unused-unsafe.rs:83:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:96:13
+  --> $DIR/lint-unused-unsafe.rs:93:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -80,7 +80,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:97:13
+  --> $DIR/lint-unused-unsafe.rs:94:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -89,7 +89,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:98:13
+  --> $DIR/lint-unused-unsafe.rs:95:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -98,7 +98,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:108:17
+  --> $DIR/lint-unused-unsafe.rs:105:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -107,13 +107,13 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:106:20
+  --> $DIR/lint-unused-unsafe.rs:103:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:109:17
+  --> $DIR/lint-unused-unsafe.rs:106:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -122,7 +122,7 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:110:17
+  --> $DIR/lint-unused-unsafe.rs:107:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -131,37 +131,37 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:120:9
+  --> $DIR/lint-unused-unsafe.rs:117:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:130:9
+  --> $DIR/lint-unused-unsafe.rs:127:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:131:13
+  --> $DIR/lint-unused-unsafe.rs:128:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:132:13
+  --> $DIR/lint-unused-unsafe.rs:129:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:138:9
+  --> $DIR/lint-unused-unsafe.rs:135:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:149:13
+  --> $DIR/lint-unused-unsafe.rs:146:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -170,7 +170,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:150:13
+  --> $DIR/lint-unused-unsafe.rs:147:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -179,7 +179,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:151:13
+  --> $DIR/lint-unused-unsafe.rs:148:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -188,7 +188,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:162:17
+  --> $DIR/lint-unused-unsafe.rs:159:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -197,13 +197,13 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:160:20
+  --> $DIR/lint-unused-unsafe.rs:157:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:163:17
+  --> $DIR/lint-unused-unsafe.rs:160:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -212,7 +212,7 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:164:17
+  --> $DIR/lint-unused-unsafe.rs:161:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -221,37 +221,37 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:174:9
+  --> $DIR/lint-unused-unsafe.rs:171:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:184:9
+  --> $DIR/lint-unused-unsafe.rs:181:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:185:13
+  --> $DIR/lint-unused-unsafe.rs:182:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:186:13
+  --> $DIR/lint-unused-unsafe.rs:183:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:192:9
+  --> $DIR/lint-unused-unsafe.rs:189:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:203:13
+  --> $DIR/lint-unused-unsafe.rs:200:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -260,7 +260,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:204:13
+  --> $DIR/lint-unused-unsafe.rs:201:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -269,7 +269,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:205:13
+  --> $DIR/lint-unused-unsafe.rs:202:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -278,7 +278,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:216:17
+  --> $DIR/lint-unused-unsafe.rs:213:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -287,13 +287,13 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:214:20
+  --> $DIR/lint-unused-unsafe.rs:211:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:217:17
+  --> $DIR/lint-unused-unsafe.rs:214:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -302,7 +302,7 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:218:17
+  --> $DIR/lint-unused-unsafe.rs:215:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -311,13 +311,13 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:238:9
+  --> $DIR/lint-unused-unsafe.rs:235:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:251:13
+  --> $DIR/lint-unused-unsafe.rs:248:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -325,7 +325,7 @@ LL |             unsafe {
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:264:13
+  --> $DIR/lint-unused-unsafe.rs:261:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -333,37 +333,37 @@ LL |             unsafe {
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:282:20
+  --> $DIR/lint-unused-unsafe.rs:279:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:291:20
+  --> $DIR/lint-unused-unsafe.rs:288:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:292:24
+  --> $DIR/lint-unused-unsafe.rs:289:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:293:24
+  --> $DIR/lint-unused-unsafe.rs:290:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:298:20
+  --> $DIR/lint-unused-unsafe.rs:295:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:308:24
+  --> $DIR/lint-unused-unsafe.rs:305:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -372,7 +372,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:309:24
+  --> $DIR/lint-unused-unsafe.rs:306:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -381,7 +381,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:310:24
+  --> $DIR/lint-unused-unsafe.rs:307:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -390,7 +390,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:320:28
+  --> $DIR/lint-unused-unsafe.rs:317:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -399,13 +399,13 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:318:20
+  --> $DIR/lint-unused-unsafe.rs:315:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:321:28
+  --> $DIR/lint-unused-unsafe.rs:318:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -414,7 +414,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:322:28
+  --> $DIR/lint-unused-unsafe.rs:319:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -423,37 +423,37 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:332:20
+  --> $DIR/lint-unused-unsafe.rs:329:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:342:20
+  --> $DIR/lint-unused-unsafe.rs:339:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:343:24
+  --> $DIR/lint-unused-unsafe.rs:340:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:344:24
+  --> $DIR/lint-unused-unsafe.rs:341:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:350:20
+  --> $DIR/lint-unused-unsafe.rs:347:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:361:24
+  --> $DIR/lint-unused-unsafe.rs:358:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -462,7 +462,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:362:24
+  --> $DIR/lint-unused-unsafe.rs:359:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -471,7 +471,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:363:24
+  --> $DIR/lint-unused-unsafe.rs:360:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -480,7 +480,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:374:28
+  --> $DIR/lint-unused-unsafe.rs:371:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -489,13 +489,13 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:372:20
+  --> $DIR/lint-unused-unsafe.rs:369:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:375:28
+  --> $DIR/lint-unused-unsafe.rs:372:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -504,7 +504,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:376:28
+  --> $DIR/lint-unused-unsafe.rs:373:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -513,37 +513,37 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:386:20
+  --> $DIR/lint-unused-unsafe.rs:383:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:396:20
+  --> $DIR/lint-unused-unsafe.rs:393:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:397:24
+  --> $DIR/lint-unused-unsafe.rs:394:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:398:24
+  --> $DIR/lint-unused-unsafe.rs:395:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:404:20
+  --> $DIR/lint-unused-unsafe.rs:401:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:415:24
+  --> $DIR/lint-unused-unsafe.rs:412:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -552,7 +552,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:416:24
+  --> $DIR/lint-unused-unsafe.rs:413:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -561,7 +561,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:417:24
+  --> $DIR/lint-unused-unsafe.rs:414:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -570,7 +570,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:428:28
+  --> $DIR/lint-unused-unsafe.rs:425:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -579,13 +579,13 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:426:20
+  --> $DIR/lint-unused-unsafe.rs:423:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:429:28
+  --> $DIR/lint-unused-unsafe.rs:426:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -594,7 +594,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:430:28
+  --> $DIR/lint-unused-unsafe.rs:427:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -603,13 +603,13 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:450:20
+  --> $DIR/lint-unused-unsafe.rs:447:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:463:24
+  --> $DIR/lint-unused-unsafe.rs:460:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -617,7 +617,7 @@ LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:476:24
+  --> $DIR/lint-unused-unsafe.rs:473:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -625,37 +625,37 @@ LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:495:20
+  --> $DIR/lint-unused-unsafe.rs:492:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:504:20
+  --> $DIR/lint-unused-unsafe.rs:501:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:505:24
+  --> $DIR/lint-unused-unsafe.rs:502:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:506:24
+  --> $DIR/lint-unused-unsafe.rs:503:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:511:20
+  --> $DIR/lint-unused-unsafe.rs:508:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:521:24
+  --> $DIR/lint-unused-unsafe.rs:518:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -664,7 +664,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:522:24
+  --> $DIR/lint-unused-unsafe.rs:519:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -673,7 +673,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:523:24
+  --> $DIR/lint-unused-unsafe.rs:520:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -682,7 +682,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:533:28
+  --> $DIR/lint-unused-unsafe.rs:530:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -691,13 +691,13 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:531:20
+  --> $DIR/lint-unused-unsafe.rs:528:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:534:28
+  --> $DIR/lint-unused-unsafe.rs:531:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -706,7 +706,7 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:535:28
+  --> $DIR/lint-unused-unsafe.rs:532:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -715,37 +715,37 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:545:20
+  --> $DIR/lint-unused-unsafe.rs:542:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:555:20
+  --> $DIR/lint-unused-unsafe.rs:552:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:556:24
+  --> $DIR/lint-unused-unsafe.rs:553:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:557:24
+  --> $DIR/lint-unused-unsafe.rs:554:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:563:20
+  --> $DIR/lint-unused-unsafe.rs:560:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:574:24
+  --> $DIR/lint-unused-unsafe.rs:571:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -754,7 +754,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:575:24
+  --> $DIR/lint-unused-unsafe.rs:572:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -763,7 +763,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:576:24
+  --> $DIR/lint-unused-unsafe.rs:573:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -772,7 +772,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:587:28
+  --> $DIR/lint-unused-unsafe.rs:584:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -781,13 +781,13 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:585:20
+  --> $DIR/lint-unused-unsafe.rs:582:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:588:28
+  --> $DIR/lint-unused-unsafe.rs:585:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -796,7 +796,7 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:589:28
+  --> $DIR/lint-unused-unsafe.rs:586:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -805,37 +805,37 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:599:20
+  --> $DIR/lint-unused-unsafe.rs:596:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:609:20
+  --> $DIR/lint-unused-unsafe.rs:606:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:610:24
+  --> $DIR/lint-unused-unsafe.rs:607:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:611:24
+  --> $DIR/lint-unused-unsafe.rs:608:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:617:20
+  --> $DIR/lint-unused-unsafe.rs:614:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:628:24
+  --> $DIR/lint-unused-unsafe.rs:625:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -844,7 +844,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:629:24
+  --> $DIR/lint-unused-unsafe.rs:626:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -853,7 +853,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:630:24
+  --> $DIR/lint-unused-unsafe.rs:627:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -862,7 +862,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:641:28
+  --> $DIR/lint-unused-unsafe.rs:638:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -871,13 +871,13 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:639:20
+  --> $DIR/lint-unused-unsafe.rs:636:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:642:28
+  --> $DIR/lint-unused-unsafe.rs:639:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -886,7 +886,7 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:643:28
+  --> $DIR/lint-unused-unsafe.rs:640:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -895,13 +895,13 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:663:20
+  --> $DIR/lint-unused-unsafe.rs:660:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:676:24
+  --> $DIR/lint-unused-unsafe.rs:673:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -909,7 +909,7 @@ LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:689:24
+  --> $DIR/lint-unused-unsafe.rs:686:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -917,37 +917,37 @@ LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:707:24
+  --> $DIR/lint-unused-unsafe.rs:704:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:717:24
+  --> $DIR/lint-unused-unsafe.rs:714:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:718:28
+  --> $DIR/lint-unused-unsafe.rs:715:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:719:28
+  --> $DIR/lint-unused-unsafe.rs:716:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:725:24
+  --> $DIR/lint-unused-unsafe.rs:722:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:736:28
+  --> $DIR/lint-unused-unsafe.rs:733:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -956,7 +956,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:737:28
+  --> $DIR/lint-unused-unsafe.rs:734:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -965,7 +965,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:738:28
+  --> $DIR/lint-unused-unsafe.rs:735:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -974,7 +974,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:749:32
+  --> $DIR/lint-unused-unsafe.rs:746:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -983,13 +983,13 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:747:24
+  --> $DIR/lint-unused-unsafe.rs:744:24
    |
 LL |                 #[deny(unused_unsafe)]
    |                        ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:750:32
+  --> $DIR/lint-unused-unsafe.rs:747:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -998,7 +998,7 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:751:32
+  --> $DIR/lint-unused-unsafe.rs:748:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1007,37 +1007,37 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:761:24
+  --> $DIR/lint-unused-unsafe.rs:758:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:771:24
+  --> $DIR/lint-unused-unsafe.rs:768:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:772:28
+  --> $DIR/lint-unused-unsafe.rs:769:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:773:28
+  --> $DIR/lint-unused-unsafe.rs:770:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:779:24
+  --> $DIR/lint-unused-unsafe.rs:776:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:790:28
+  --> $DIR/lint-unused-unsafe.rs:787:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1046,7 +1046,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:791:28
+  --> $DIR/lint-unused-unsafe.rs:788:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1055,7 +1055,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:792:28
+  --> $DIR/lint-unused-unsafe.rs:789:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1064,7 +1064,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:803:32
+  --> $DIR/lint-unused-unsafe.rs:800:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1073,13 +1073,13 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:801:24
+  --> $DIR/lint-unused-unsafe.rs:798:24
    |
 LL |                 #[deny(unused_unsafe)]
    |                        ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:804:32
+  --> $DIR/lint-unused-unsafe.rs:801:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1088,7 +1088,7 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:805:32
+  --> $DIR/lint-unused-unsafe.rs:802:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1097,13 +1097,13 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:825:24
+  --> $DIR/lint-unused-unsafe.rs:822:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:838:28
+  --> $DIR/lint-unused-unsafe.rs:835:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1111,7 +1111,7 @@ LL |                 let _ = || unsafe {
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:851:28
+  --> $DIR/lint-unused-unsafe.rs:848:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1119,37 +1119,37 @@ LL |                 let _ = || unsafe {
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:865:24
+  --> $DIR/lint-unused-unsafe.rs:862:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:875:24
+  --> $DIR/lint-unused-unsafe.rs:872:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:876:28
+  --> $DIR/lint-unused-unsafe.rs:873:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:877:28
+  --> $DIR/lint-unused-unsafe.rs:874:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:883:24
+  --> $DIR/lint-unused-unsafe.rs:880:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:894:28
+  --> $DIR/lint-unused-unsafe.rs:891:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1158,7 +1158,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:895:28
+  --> $DIR/lint-unused-unsafe.rs:892:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1167,7 +1167,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:896:28
+  --> $DIR/lint-unused-unsafe.rs:893:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1176,7 +1176,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:907:32
+  --> $DIR/lint-unused-unsafe.rs:904:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1185,13 +1185,13 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:905:24
+  --> $DIR/lint-unused-unsafe.rs:902:24
    |
 LL |                 #[deny(unused_unsafe)]
    |                        ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:908:32
+  --> $DIR/lint-unused-unsafe.rs:905:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1200,7 +1200,7 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:909:32
+  --> $DIR/lint-unused-unsafe.rs:906:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1209,37 +1209,37 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:919:24
+  --> $DIR/lint-unused-unsafe.rs:916:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:929:24
+  --> $DIR/lint-unused-unsafe.rs:926:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:930:28
+  --> $DIR/lint-unused-unsafe.rs:927:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:931:28
+  --> $DIR/lint-unused-unsafe.rs:928:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:937:24
+  --> $DIR/lint-unused-unsafe.rs:934:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:948:28
+  --> $DIR/lint-unused-unsafe.rs:945:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1248,7 +1248,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:949:28
+  --> $DIR/lint-unused-unsafe.rs:946:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1257,7 +1257,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:950:28
+  --> $DIR/lint-unused-unsafe.rs:947:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1266,7 +1266,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:961:32
+  --> $DIR/lint-unused-unsafe.rs:958:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1275,13 +1275,13 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:959:24
+  --> $DIR/lint-unused-unsafe.rs:956:24
    |
 LL |                 #[deny(unused_unsafe)]
    |                        ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:962:32
+  --> $DIR/lint-unused-unsafe.rs:959:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1290,7 +1290,7 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:963:32
+  --> $DIR/lint-unused-unsafe.rs:960:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1299,13 +1299,13 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:983:24
+  --> $DIR/lint-unused-unsafe.rs:980:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:996:28
+  --> $DIR/lint-unused-unsafe.rs:993:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1313,7 +1313,7 @@ LL |                 let _ = || unsafe {
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1009:28
+  --> $DIR/lint-unused-unsafe.rs:1006:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1321,13 +1321,13 @@ LL |                 let _ = || unsafe {
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1055:29
+  --> $DIR/lint-unused-unsafe.rs:1052:29
    |
 LL |             let _ = async { unsafe {
    |                             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1062:33
+  --> $DIR/lint-unused-unsafe.rs:1059:33
    |
 LL |             let _ = async { unsafe {
    |                             ------ because it's nested under this `unsafe` block
@@ -1336,7 +1336,7 @@ LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
    |                                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1063:33
+  --> $DIR/lint-unused-unsafe.rs:1060:33
    |
 LL |             let _ = async { unsafe {
    |                             ------ because it's nested under this `unsafe` block
@@ -1345,7 +1345,7 @@ LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
    |                                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1064:33
+  --> $DIR/lint-unused-unsafe.rs:1061:33
    |
 LL |             let _ = async { unsafe {
    |                             ------ because it's nested under this `unsafe` block
@@ -1354,13 +1354,13 @@ LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
    |                                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1069:29
+  --> $DIR/lint-unused-unsafe.rs:1066:29
    |
 LL |             let _ = async { unsafe {
    |                             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1076:33
+  --> $DIR/lint-unused-unsafe.rs:1073:33
    |
 LL |             let _ = async { unsafe {
    |                             ------ because it's nested under this `unsafe` block
@@ -1369,7 +1369,7 @@ LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
    |                                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1077:33
+  --> $DIR/lint-unused-unsafe.rs:1074:33
    |
 LL |             let _ = async { unsafe {
    |                             ------ because it's nested under this `unsafe` block
@@ -1378,7 +1378,7 @@ LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
    |                                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1078:33
+  --> $DIR/lint-unused-unsafe.rs:1075:33
    |
 LL |             let _ = async { unsafe {
    |                             ------ because it's nested under this `unsafe` block
@@ -1387,13 +1387,13 @@ LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
    |                                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1088:22
+  --> $DIR/lint-unused-unsafe.rs:1085:22
    |
 LL |         let _x: [(); unsafe { 0 }] = [];
    |                      ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1092:22
+  --> $DIR/lint-unused-unsafe.rs:1089:22
    |
 LL |         let _x: [(); unsafe { unsafe { size() } }] = [];
    |                      ^^^^^^ unnecessary `unsafe` block
diff --git a/tests/ui/span/lint-unused-unsafe.thir.stderr b/tests/ui/span/lint-unused-unsafe.thir.stderr
deleted file mode 100644
index 9e8d3359242..00000000000
--- a/tests/ui/span/lint-unused-unsafe.thir.stderr
+++ /dev/null
@@ -1,1402 +0,0 @@
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:22:13
-   |
-LL | fn bad1() { unsafe {} }
-   |             ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:10:9
-   |
-LL | #![deny(unused_unsafe)]
-   |         ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:23:13
-   |
-LL | fn bad2() { unsafe { bad1() } }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:24:20
-   |
-LL | unsafe fn bad3() { unsafe {} }
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:25:13
-   |
-LL | fn bad4() { unsafe { callback(||{}) } }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:28:5
-   |
-LL |     unsafe {
-   |     ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:35:5
-   |
-LL |     unsafe {
-   |     ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:70:9
-   |
-LL |         unsafe {
-   |         ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:79:9
-   |
-LL |         unsafe {
-   |         ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:80:13
-   |
-LL |             unsafe {}
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:81:13
-   |
-LL |             unsafe {}
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:86:9
-   |
-LL |         unsafe {
-   |         ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:96:13
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-LL |             unsf();
-LL |             unsafe { unsf() }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:97:13
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |             unsafe { unsf() }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:98:13
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |             unsafe { unsf() }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:108:17
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |                 unsafe { unsf() }
-   |                 ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:106:20
-   |
-LL |             #[deny(unused_unsafe)]
-   |                    ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:109:17
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |                 unsafe { unsf() }
-   |                 ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:110:17
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |                 unsafe { unsf() }
-   |                 ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:120:9
-   |
-LL |         unsafe {
-   |         ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:130:9
-   |
-LL |         unsafe {
-   |         ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:131:13
-   |
-LL |             unsafe {}
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:132:13
-   |
-LL |             unsafe {}
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:138:9
-   |
-LL |         unsafe {
-   |         ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:149:13
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-LL |             unsf();
-LL |             unsafe { unsf() }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:150:13
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |             unsafe { unsf() }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:151:13
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |             unsafe { unsf() }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:162:17
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |                 unsafe { unsf() }
-   |                 ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:160:20
-   |
-LL |             #[deny(unused_unsafe)]
-   |                    ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:163:17
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |                 unsafe { unsf() }
-   |                 ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:164:17
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |                 unsafe { unsf() }
-   |                 ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:174:9
-   |
-LL |         unsafe {
-   |         ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:184:9
-   |
-LL |         unsafe {
-   |         ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:185:13
-   |
-LL |             unsafe {}
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:186:13
-   |
-LL |             unsafe {}
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:192:9
-   |
-LL |         unsafe {
-   |         ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:203:13
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-LL |             unsf();
-LL |             unsafe { unsf() }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:204:13
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |             unsafe { unsf() }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:205:13
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |             unsafe { unsf() }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:216:17
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |                 unsafe { unsf() }
-   |                 ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:214:20
-   |
-LL |             #[deny(unused_unsafe)]
-   |                    ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:217:17
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |                 unsafe { unsf() }
-   |                 ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:218:17
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-...
-LL |                 unsafe { unsf() }
-   |                 ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:238:9
-   |
-LL |         unsafe {
-   |         ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:251:13
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-LL |             unsafe {
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:264:13
-   |
-LL |         unsafe {
-   |         ------ because it's nested under this `unsafe` block
-LL |             unsafe {
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:282:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:291:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:292:24
-   |
-LL |             let _ = || unsafe {};
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:293:24
-   |
-LL |             let _ = || unsafe {};
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:298:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:308:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-LL |             unsf();
-LL |             let _ = || unsafe { unsf() };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:309:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |             let _ = || unsafe { unsf() };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:310:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |             let _ = || unsafe { unsf() };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:320:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:318:20
-   |
-LL |             #[deny(unused_unsafe)]
-   |                    ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:321:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:322:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:332:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:342:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:343:24
-   |
-LL |             let _ = || unsafe {};
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:344:24
-   |
-LL |             let _ = || unsafe {};
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:350:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:361:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-LL |             unsf();
-LL |             let _ = || unsafe { unsf() };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:362:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |             let _ = || unsafe { unsf() };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:363:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |             let _ = || unsafe { unsf() };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:374:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:372:20
-   |
-LL |             #[deny(unused_unsafe)]
-   |                    ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:375:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:376:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:386:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:396:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:397:24
-   |
-LL |             let _ = || unsafe {};
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:398:24
-   |
-LL |             let _ = || unsafe {};
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:404:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:415:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-LL |             unsf();
-LL |             let _ = || unsafe { unsf() };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:416:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |             let _ = || unsafe { unsf() };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:417:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |             let _ = || unsafe { unsf() };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:428:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:426:20
-   |
-LL |             #[deny(unused_unsafe)]
-   |                    ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:429:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:430:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:450:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:463:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:476:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:495:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:504:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:505:24
-   |
-LL |             let _ = || unsafe {};
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:506:24
-   |
-LL |             let _ = || unsafe {};
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:511:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:521:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-LL |             let _ = || unsf();
-LL |             let _ = || unsafe { let _ = || unsf(); };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:522:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |             let _ = || unsafe { let _ = || unsf(); };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:523:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |             let _ = || unsafe { let _ = || unsf(); };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:533:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { let _ = || unsf(); };
-   |                            ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:531:20
-   |
-LL |             #[deny(unused_unsafe)]
-   |                    ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:534:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { let _ = || unsf(); };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:535:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { let _ = || unsf(); };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:545:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:555:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:556:24
-   |
-LL |             let _ = || unsafe {};
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:557:24
-   |
-LL |             let _ = || unsafe {};
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:563:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:574:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-LL |             let _ = || unsf();
-LL |             let _ = || unsafe { let _ = || unsf(); };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:575:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |             let _ = || unsafe { let _ = || unsf(); };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:576:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |             let _ = || unsafe { let _ = || unsf(); };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:587:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { let _ = || unsf(); };
-   |                            ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:585:20
-   |
-LL |             #[deny(unused_unsafe)]
-   |                    ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:588:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { let _ = || unsf(); };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:589:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { let _ = || unsf(); };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:599:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:609:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:610:24
-   |
-LL |             let _ = || unsafe {};
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:611:24
-   |
-LL |             let _ = || unsafe {};
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:617:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:628:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-LL |             let _ = || unsf();
-LL |             let _ = || unsafe { let _ = || unsf(); };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:629:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |             let _ = || unsafe { let _ = || unsf(); };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:630:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |             let _ = || unsafe { let _ = || unsf(); };
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:641:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { let _ = || unsf(); };
-   |                            ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:639:20
-   |
-LL |             #[deny(unused_unsafe)]
-   |                    ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:642:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { let _ = || unsf(); };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:643:28
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { let _ = || unsf(); };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:663:20
-   |
-LL |         let _ = || unsafe {
-   |                    ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:676:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:689:24
-   |
-LL |         let _ = || unsafe {
-   |                    ------ because it's nested under this `unsafe` block
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:707:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:717:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:718:28
-   |
-LL |                 let _ = || unsafe {};
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:719:28
-   |
-LL |                 let _ = || unsafe {};
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:725:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:736:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-LL |                 unsf();
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:737:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:738:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:749:32
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                     let _ = || unsafe { unsf() };
-   |                                ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:747:24
-   |
-LL |                 #[deny(unused_unsafe)]
-   |                        ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:750:32
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                     let _ = || unsafe { unsf() };
-   |                                ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:751:32
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                     let _ = || unsafe { unsf() };
-   |                                ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:761:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:771:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:772:28
-   |
-LL |                 let _ = || unsafe {};
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:773:28
-   |
-LL |                 let _ = || unsafe {};
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:779:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:790:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-LL |                 unsf();
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:791:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:792:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:803:32
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                     let _ = || unsafe { unsf() };
-   |                                ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:801:24
-   |
-LL |                 #[deny(unused_unsafe)]
-   |                        ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:804:32
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                     let _ = || unsafe { unsf() };
-   |                                ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:805:32
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                     let _ = || unsafe { unsf() };
-   |                                ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:825:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:838:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-LL |                 let _ = || unsafe {
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:851:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-LL |                 let _ = || unsafe {
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:865:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:875:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:876:28
-   |
-LL |                 let _ = || unsafe {};
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:877:28
-   |
-LL |                 let _ = || unsafe {};
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:883:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:894:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-LL |                 unsf();
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:895:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:896:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:907:32
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                     let _ = || unsafe { unsf() };
-   |                                ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:905:24
-   |
-LL |                 #[deny(unused_unsafe)]
-   |                        ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:908:32
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                     let _ = || unsafe { unsf() };
-   |                                ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:909:32
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                     let _ = || unsafe { unsf() };
-   |                                ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:919:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:929:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:930:28
-   |
-LL |                 let _ = || unsafe {};
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:931:28
-   |
-LL |                 let _ = || unsafe {};
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:937:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:948:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-LL |                 unsf();
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:949:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:950:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = || unsafe { unsf() };
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:961:32
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                     let _ = || unsafe { unsf() };
-   |                                ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:959:24
-   |
-LL |                 #[deny(unused_unsafe)]
-   |                        ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:962:32
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                     let _ = || unsafe { unsf() };
-   |                                ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:963:32
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-...
-LL |                     let _ = || unsafe { unsf() };
-   |                                ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:983:24
-   |
-LL |             let _ = || unsafe {
-   |                        ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:996:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-LL |                 let _ = || unsafe {
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1009:28
-   |
-LL |             let _ = || unsafe {
-   |                        ------ because it's nested under this `unsafe` block
-LL |                 let _ = || unsafe {
-   |                            ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1055:29
-   |
-LL |             let _ = async { unsafe {
-   |                             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1062:33
-   |
-LL |             let _ = async { unsafe {
-   |                             ------ because it's nested under this `unsafe` block
-LL |                 let _ = async { unsf() };
-LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
-   |                                 ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1063:33
-   |
-LL |             let _ = async { unsafe {
-   |                             ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
-   |                                 ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1064:33
-   |
-LL |             let _ = async { unsafe {
-   |                             ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
-   |                                 ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1069:29
-   |
-LL |             let _ = async { unsafe {
-   |                             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1076:33
-   |
-LL |             let _ = async { unsafe {
-   |                             ------ because it's nested under this `unsafe` block
-LL |                 let _ = async { unsf() };
-LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
-   |                                 ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1077:33
-   |
-LL |             let _ = async { unsafe {
-   |                             ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
-   |                                 ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1078:33
-   |
-LL |             let _ = async { unsafe {
-   |                             ------ because it's nested under this `unsafe` block
-...
-LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
-   |                                 ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1088:22
-   |
-LL |         let _x: [(); unsafe { 0 }] = [];
-   |                      ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1092:22
-   |
-LL |         let _x: [(); unsafe { unsafe { size() } }] = [];
-   |                      ^^^^^^ unnecessary `unsafe` block
-
-error: aborting due to 174 previous errors
-
diff --git a/tests/ui/specialization/min_specialization/issue-79224.stderr b/tests/ui/specialization/min_specialization/issue-79224.stderr
index 7541579498e..37ced4cf267 100644
--- a/tests/ui/specialization/min_specialization/issue-79224.stderr
+++ b/tests/ui/specialization/min_specialization/issue-79224.stderr
@@ -11,10 +11,10 @@ LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
    |                +++++++++++++++++++
 
 error[E0277]: the trait bound `B: Clone` is not satisfied
-  --> $DIR/issue-79224.rs:20:13
+  --> $DIR/issue-79224.rs:20:5
    |
 LL |     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-   |             ^^^^ the trait `Clone` is not implemented for `B`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B`
    |
    = note: required for `B` to implement `ToOwned`
 help: consider further restricting this bound
@@ -23,10 +23,10 @@ LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
    |                +++++++++++++++++++
 
 error[E0277]: the trait bound `B: Clone` is not satisfied
-  --> $DIR/issue-79224.rs:20:5
+  --> $DIR/issue-79224.rs:20:13
    |
 LL |     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B`
+   |             ^^^^ the trait `Clone` is not implemented for `B`
    |
    = note: required for `B` to implement `ToOwned`
 help: consider further restricting this bound
diff --git a/tests/ui/specialization/specialization-cross-crate.rs b/tests/ui/specialization/specialization-cross-crate.rs
index d9381d66152..4b2ac07378d 100644
--- a/tests/ui/specialization/specialization-cross-crate.rs
+++ b/tests/ui/specialization/specialization-cross-crate.rs
@@ -14,7 +14,7 @@ struct NotClone;
 struct MarkedAndClone;
 impl MyMarker for MarkedAndClone {}
 
-struct MyType<T>(#[allow(unused_tuple_struct_fields)] T);
+struct MyType<T>(#[allow(dead_code)] T);
 impl<T> Foo for MyType<T> {
     default fn foo(&self) -> &'static str {
         "generic MyType"
diff --git a/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs b/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs
index 904aeaa088b..f06afc8ba41 100644
--- a/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs
+++ b/tests/ui/specialization/specialization-translate-projections-with-lifetimes.rs
@@ -14,7 +14,7 @@ impl<'a> WithAssoc for &'a () {
     type Item = &'a u32;
 }
 
-struct Cloned<I>(#[allow(unused_tuple_struct_fields)] I);
+struct Cloned<I>(#[allow(dead_code)] I);
 
 impl<'a, I, T: 'a> Iterator for Cloned<I>
     where I: WithAssoc<Item=&'a T>, T: Clone
diff --git a/tests/ui/stability-attribute/generics-default-stability-where.rs b/tests/ui/stability-attribute/generics-default-stability-where.rs
index 4afbca26264..142de12e152 100644
--- a/tests/ui/stability-attribute/generics-default-stability-where.rs
+++ b/tests/ui/stability-attribute/generics-default-stability-where.rs
@@ -5,6 +5,7 @@ extern crate unstable_generic_param;
 use unstable_generic_param::*;
 
 impl<T> Trait3<usize> for T where T: Trait2<usize> { //~ ERROR use of unstable library feature 'unstable_default'
+//~^ ERROR `T` must be used as the type parameter for some local type
     fn foo() -> usize { T::foo() }
 }
 
diff --git a/tests/ui/stability-attribute/generics-default-stability-where.stderr b/tests/ui/stability-attribute/generics-default-stability-where.stderr
index ce34f96771c..16b560e8a4b 100644
--- a/tests/ui/stability-attribute/generics-default-stability-where.stderr
+++ b/tests/ui/stability-attribute/generics-default-stability-where.stderr
@@ -6,6 +6,16 @@ LL | impl<T> Trait3<usize> for T where T: Trait2<usize> {
    |
    = help: add `#![feature(unstable_default)]` to the crate attributes to enable
 
-error: aborting due to 1 previous error
+error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
+  --> $DIR/generics-default-stability-where.rs:7:6
+   |
+LL | impl<T> Trait3<usize> for T where T: Trait2<usize> {
+   |      ^ type parameter `T` must be used as the type parameter for some local type
+   |
+   = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
+   = note: only traits defined in the current crate can be implemented for a type parameter
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0658`.
+Some errors have detailed explanations: E0210, E0658.
+For more information about an error, try `rustc --explain E0210`.
diff --git a/tests/ui/static/reference-of-mut-static-safe.e2021.stderr b/tests/ui/static/reference-of-mut-static-safe.e2021.stderr
new file mode 100644
index 00000000000..16f47ace3a9
--- /dev/null
+++ b/tests/ui/static/reference-of-mut-static-safe.e2021.stderr
@@ -0,0 +1,26 @@
+warning: shared reference of mutable static is discouraged
+  --> $DIR/reference-of-mut-static-safe.rs:9:14
+   |
+LL |     let _x = &X;
+   |              ^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     let _x = addr_of!(X);
+   |              ~~~~~~~~~~~
+
+error[E0133]: use of mutable static is unsafe and requires unsafe function or block
+  --> $DIR/reference-of-mut-static-safe.rs:9:15
+   |
+LL |     let _x = &X;
+   |               ^ use of mutable static
+   |
+   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
+
+error: aborting due to 1 previous error; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/static/reference-of-mut-static-safe.e2024.stderr b/tests/ui/static/reference-of-mut-static-safe.e2024.stderr
new file mode 100644
index 00000000000..53f81179de5
--- /dev/null
+++ b/tests/ui/static/reference-of-mut-static-safe.e2024.stderr
@@ -0,0 +1,15 @@
+error[E0796]: reference of mutable static is disallowed
+  --> $DIR/reference-of-mut-static-safe.rs:9:14
+   |
+LL |     let _x = &X;
+   |              ^^ reference of mutable static
+   |
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     let _x = addr_of!(X);
+   |              ~~~~~~~~~~~
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0796`.
diff --git a/tests/ui/static/reference-of-mut-static-safe.rs b/tests/ui/static/reference-of-mut-static-safe.rs
new file mode 100644
index 00000000000..5cb1a03bef5
--- /dev/null
+++ b/tests/ui/static/reference-of-mut-static-safe.rs
@@ -0,0 +1,13 @@
+// revisions: e2021 e2024
+
+// [e2021] edition:2021
+// [e2024] compile-flags: --edition 2024 -Z unstable-options
+
+fn main() {
+    static mut X: i32 = 1;
+
+    let _x = &X;
+    //[e2024]~^ reference of mutable static is disallowed [E0796]
+    //[e2021]~^^ use of mutable static is unsafe and requires unsafe function or block [E0133]
+    //[e2021]~^^^ shared reference of mutable static is discouraged [static_mut_ref]
+}
diff --git a/tests/ui/static/reference-of-mut-static-unsafe-fn.rs b/tests/ui/static/reference-of-mut-static-unsafe-fn.rs
new file mode 100644
index 00000000000..6b1e77850e5
--- /dev/null
+++ b/tests/ui/static/reference-of-mut-static-unsafe-fn.rs
@@ -0,0 +1,23 @@
+// compile-flags: --edition 2024 -Z unstable-options
+
+fn main() {}
+
+unsafe fn _foo() {
+    static mut X: i32 = 1;
+    static mut Y: i32 = 1;
+
+    let _y = &X;
+    //~^ ERROR reference of mutable static is disallowed
+
+    let ref _a = X;
+    //~^ ERROR reference of mutable static is disallowed
+
+    let (_b, _c) = (&X, &Y);
+    //~^ ERROR reference of mutable static is disallowed
+    //~^^ ERROR reference of mutable static is disallowed
+
+    foo(&X);
+    //~^ ERROR reference of mutable static is disallowed
+}
+
+fn foo<'a>(_x: &'a i32) {}
diff --git a/tests/ui/static/reference-of-mut-static-unsafe-fn.stderr b/tests/ui/static/reference-of-mut-static-unsafe-fn.stderr
new file mode 100644
index 00000000000..5c6fdedfa96
--- /dev/null
+++ b/tests/ui/static/reference-of-mut-static-unsafe-fn.stderr
@@ -0,0 +1,63 @@
+error[E0796]: reference of mutable static is disallowed
+  --> $DIR/reference-of-mut-static-unsafe-fn.rs:9:14
+   |
+LL |     let _y = &X;
+   |              ^^ reference of mutable static
+   |
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     let _y = addr_of!(X);
+   |              ~~~~~~~~~~~
+
+error[E0796]: reference of mutable static is disallowed
+  --> $DIR/reference-of-mut-static-unsafe-fn.rs:12:18
+   |
+LL |     let ref _a = X;
+   |                  ^ reference of mutable static
+   |
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     let ref _a = addr_of!(X);
+   |                  ~~~~~~~~~~~
+
+error[E0796]: reference of mutable static is disallowed
+  --> $DIR/reference-of-mut-static-unsafe-fn.rs:15:21
+   |
+LL |     let (_b, _c) = (&X, &Y);
+   |                     ^^ reference of mutable static
+   |
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     let (_b, _c) = (addr_of!(X), &Y);
+   |                     ~~~~~~~~~~~
+
+error[E0796]: reference of mutable static is disallowed
+  --> $DIR/reference-of-mut-static-unsafe-fn.rs:15:25
+   |
+LL |     let (_b, _c) = (&X, &Y);
+   |                         ^^ reference of mutable static
+   |
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     let (_b, _c) = (&X, addr_of!(Y));
+   |                         ~~~~~~~~~~~
+
+error[E0796]: reference of mutable static is disallowed
+  --> $DIR/reference-of-mut-static-unsafe-fn.rs:19:9
+   |
+LL |     foo(&X);
+   |         ^^ reference of mutable static
+   |
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     foo(addr_of!(X));
+   |         ~~~~~~~~~~~
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0796`.
diff --git a/tests/ui/static/reference-of-mut-static.e2021.stderr b/tests/ui/static/reference-of-mut-static.e2021.stderr
new file mode 100644
index 00000000000..77a6b3d304b
--- /dev/null
+++ b/tests/ui/static/reference-of-mut-static.e2021.stderr
@@ -0,0 +1,91 @@
+error: shared reference of mutable static is discouraged
+  --> $DIR/reference-of-mut-static.rs:16:18
+   |
+LL |         let _y = &X;
+   |                  ^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+note: the lint level is defined here
+  --> $DIR/reference-of-mut-static.rs:6:9
+   |
+LL | #![deny(static_mut_ref)]
+   |         ^^^^^^^^^^^^^^
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |         let _y = addr_of!(X);
+   |                  ~~~~~~~~~~~
+
+error: mutable reference of mutable static is discouraged
+  --> $DIR/reference-of-mut-static.rs:20:18
+   |
+LL |         let _y = &mut X;
+   |                  ^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |         let _y = addr_of_mut!(X);
+   |                  ~~~~~~~~~~~~~~~
+
+error: shared reference of mutable static is discouraged
+  --> $DIR/reference-of-mut-static.rs:28:22
+   |
+LL |         let ref _a = X;
+   |                      ^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |         let ref _a = addr_of!(X);
+   |                      ~~~~~~~~~~~
+
+error: shared reference of mutable static is discouraged
+  --> $DIR/reference-of-mut-static.rs:32:25
+   |
+LL |         let (_b, _c) = (&X, &Y);
+   |                         ^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |         let (_b, _c) = (addr_of!(X), &Y);
+   |                         ~~~~~~~~~~~
+
+error: shared reference of mutable static is discouraged
+  --> $DIR/reference-of-mut-static.rs:32:29
+   |
+LL |         let (_b, _c) = (&X, &Y);
+   |                             ^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |         let (_b, _c) = (&X, addr_of!(Y));
+   |                             ~~~~~~~~~~~
+
+error: shared reference of mutable static is discouraged
+  --> $DIR/reference-of-mut-static.rs:38:13
+   |
+LL |         foo(&X);
+   |             ^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |         foo(addr_of!(X));
+   |             ~~~~~~~~~~~
+
+error: aborting due to 6 previous errors
+
diff --git a/tests/ui/static/reference-of-mut-static.e2024.stderr b/tests/ui/static/reference-of-mut-static.e2024.stderr
new file mode 100644
index 00000000000..f445ec65a5d
--- /dev/null
+++ b/tests/ui/static/reference-of-mut-static.e2024.stderr
@@ -0,0 +1,75 @@
+error[E0796]: reference of mutable static is disallowed
+  --> $DIR/reference-of-mut-static.rs:16:18
+   |
+LL |         let _y = &X;
+   |                  ^^ reference of mutable static
+   |
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |         let _y = addr_of!(X);
+   |                  ~~~~~~~~~~~
+
+error[E0796]: reference of mutable static is disallowed
+  --> $DIR/reference-of-mut-static.rs:20:18
+   |
+LL |         let _y = &mut X;
+   |                  ^^^^^^ reference of mutable static
+   |
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |         let _y = addr_of_mut!(X);
+   |                  ~~~~~~~~~~~~~~~
+
+error[E0796]: reference of mutable static is disallowed
+  --> $DIR/reference-of-mut-static.rs:28:22
+   |
+LL |         let ref _a = X;
+   |                      ^ reference of mutable static
+   |
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |         let ref _a = addr_of!(X);
+   |                      ~~~~~~~~~~~
+
+error[E0796]: reference of mutable static is disallowed
+  --> $DIR/reference-of-mut-static.rs:32:25
+   |
+LL |         let (_b, _c) = (&X, &Y);
+   |                         ^^ reference of mutable static
+   |
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |         let (_b, _c) = (addr_of!(X), &Y);
+   |                         ~~~~~~~~~~~
+
+error[E0796]: reference of mutable static is disallowed
+  --> $DIR/reference-of-mut-static.rs:32:29
+   |
+LL |         let (_b, _c) = (&X, &Y);
+   |                             ^^ reference of mutable static
+   |
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |         let (_b, _c) = (&X, addr_of!(Y));
+   |                             ~~~~~~~~~~~
+
+error[E0796]: reference of mutable static is disallowed
+  --> $DIR/reference-of-mut-static.rs:38:13
+   |
+LL |         foo(&X);
+   |             ^^ reference of mutable static
+   |
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |         foo(addr_of!(X));
+   |             ~~~~~~~~~~~
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0796`.
diff --git a/tests/ui/static/reference-of-mut-static.rs b/tests/ui/static/reference-of-mut-static.rs
new file mode 100644
index 00000000000..01a3b1fbd9b
--- /dev/null
+++ b/tests/ui/static/reference-of-mut-static.rs
@@ -0,0 +1,50 @@
+// revisions: e2021 e2024
+
+// [e2021] edition:2021
+// [e2024] compile-flags: --edition 2024 -Z unstable-options
+
+#![deny(static_mut_ref)]
+
+use std::ptr::{addr_of, addr_of_mut};
+
+fn main() {
+    static mut X: i32 = 1;
+
+    static mut Y: i32 = 1;
+
+    unsafe {
+        let _y = &X;
+        //[e2024]~^ ERROR reference of mutable static is disallowed
+        //[e2021]~^^ ERROR shared reference of mutable static is discouraged [static_mut_ref]
+
+        let _y = &mut X;
+        //[e2024]~^ ERROR reference of mutable static is disallowed
+        //[e2021]~^^ ERROR mutable reference of mutable static is discouraged [static_mut_ref]
+
+        let _z = addr_of_mut!(X);
+
+        let _p = addr_of!(X);
+
+        let ref _a = X;
+        //[e2024]~^ ERROR reference of mutable static is disallowed
+        //[e2021]~^^ ERROR shared reference of mutable static is discouraged [static_mut_ref]
+
+        let (_b, _c) = (&X, &Y);
+        //[e2024]~^ ERROR reference of mutable static is disallowed
+        //[e2021]~^^ ERROR shared reference of mutable static is discouraged [static_mut_ref]
+        //[e2024]~^^^ ERROR reference of mutable static is disallowed
+        //[e2021]~^^^^ ERROR shared reference of mutable static is discouraged [static_mut_ref]
+
+        foo(&X);
+        //[e2024]~^ ERROR reference of mutable static is disallowed
+        //[e2021]~^^ ERROR shared reference of mutable static is discouraged [static_mut_ref]
+
+        static mut Z: &[i32; 3] = &[0, 1, 2];
+
+        let _ = Z.len();
+        let _ = Z[0];
+        let _ = format!("{:?}", Z);
+    }
+}
+
+fn foo<'a>(_x: &'a i32) {}
diff --git a/tests/ui/static/safe-extern-statics-mut.mir.stderr b/tests/ui/static/safe-extern-statics-mut.mir.stderr
deleted file mode 100644
index cec5f9d9c9f..00000000000
--- a/tests/ui/static/safe-extern-statics-mut.mir.stderr
+++ /dev/null
@@ -1,35 +0,0 @@
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics-mut.rs:13:13
-   |
-LL |     let b = B;
-   |             ^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics-mut.rs:14:14
-   |
-LL |     let rb = &B;
-   |              ^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics-mut.rs:15:14
-   |
-LL |     let xb = XB;
-   |              ^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics-mut.rs:16:15
-   |
-LL |     let xrb = &XB;
-   |               ^^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/static/safe-extern-statics-mut.rs b/tests/ui/static/safe-extern-statics-mut.rs
index 389a4589a71..1c0662e0a6c 100644
--- a/tests/ui/static/safe-extern-statics-mut.rs
+++ b/tests/ui/static/safe-extern-statics-mut.rs
@@ -1,6 +1,4 @@
 // aux-build:extern-statics.rs
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 
 extern crate extern_statics;
 use extern_statics::*;
@@ -12,6 +10,8 @@ extern "C" {
 fn main() {
     let b = B; //~ ERROR use of mutable static is unsafe
     let rb = &B; //~ ERROR use of mutable static is unsafe
+    //~^ WARN shared reference of mutable static is discouraged [static_mut_ref]
     let xb = XB; //~ ERROR use of mutable static is unsafe
     let xrb = &XB; //~ ERROR use of mutable static is unsafe
+    //~^ WARN shared reference of mutable static is discouraged [static_mut_ref]
 }
diff --git a/tests/ui/static/safe-extern-statics-mut.stderr b/tests/ui/static/safe-extern-statics-mut.stderr
new file mode 100644
index 00000000000..eda353ce673
--- /dev/null
+++ b/tests/ui/static/safe-extern-statics-mut.stderr
@@ -0,0 +1,64 @@
+warning: shared reference of mutable static is discouraged
+  --> $DIR/safe-extern-statics-mut.rs:12:14
+   |
+LL |     let rb = &B;
+   |              ^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     let rb = addr_of!(B);
+   |              ~~~~~~~~~~~
+
+warning: shared reference of mutable static is discouraged
+  --> $DIR/safe-extern-statics-mut.rs:15:15
+   |
+LL |     let xrb = &XB;
+   |               ^^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     let xrb = addr_of!(XB);
+   |               ~~~~~~~~~~~~
+
+error[E0133]: use of mutable static is unsafe and requires unsafe function or block
+  --> $DIR/safe-extern-statics-mut.rs:11:13
+   |
+LL |     let b = B;
+   |             ^ use of mutable static
+   |
+   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
+
+error[E0133]: use of mutable static is unsafe and requires unsafe function or block
+  --> $DIR/safe-extern-statics-mut.rs:12:15
+   |
+LL |     let rb = &B;
+   |               ^ use of mutable static
+   |
+   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
+
+error[E0133]: use of mutable static is unsafe and requires unsafe function or block
+  --> $DIR/safe-extern-statics-mut.rs:14:14
+   |
+LL |     let xb = XB;
+   |              ^^ use of mutable static
+   |
+   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
+
+error[E0133]: use of mutable static is unsafe and requires unsafe function or block
+  --> $DIR/safe-extern-statics-mut.rs:15:16
+   |
+LL |     let xrb = &XB;
+   |                ^^ use of mutable static
+   |
+   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
+
+error: aborting due to 4 previous errors; 2 warnings emitted
+
+For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/static/safe-extern-statics-mut.thir.stderr b/tests/ui/static/safe-extern-statics-mut.thir.stderr
deleted file mode 100644
index 8e6d2805a0b..00000000000
--- a/tests/ui/static/safe-extern-statics-mut.thir.stderr
+++ /dev/null
@@ -1,35 +0,0 @@
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics-mut.rs:13:13
-   |
-LL |     let b = B;
-   |             ^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics-mut.rs:14:15
-   |
-LL |     let rb = &B;
-   |               ^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics-mut.rs:15:14
-   |
-LL |     let xb = XB;
-   |              ^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics-mut.rs:16:16
-   |
-LL |     let xrb = &XB;
-   |                ^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/static/safe-extern-statics.mir.stderr b/tests/ui/static/safe-extern-statics.mir.stderr
deleted file mode 100644
index 102abd0816f..00000000000
--- a/tests/ui/static/safe-extern-statics.mir.stderr
+++ /dev/null
@@ -1,35 +0,0 @@
-error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics.rs:13:13
-   |
-LL |     let a = A;
-   |             ^ use of extern static
-   |
-   = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics.rs:14:14
-   |
-LL |     let ra = &A;
-   |              ^^ use of extern static
-   |
-   = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics.rs:15:14
-   |
-LL |     let xa = XA;
-   |              ^^ use of extern static
-   |
-   = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics.rs:16:15
-   |
-LL |     let xra = &XA;
-   |               ^^^ use of extern static
-   |
-   = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/static/safe-extern-statics.rs b/tests/ui/static/safe-extern-statics.rs
index 0aa90c442ea..6fa4c4aaca5 100644
--- a/tests/ui/static/safe-extern-statics.rs
+++ b/tests/ui/static/safe-extern-statics.rs
@@ -1,6 +1,4 @@
 // aux-build:extern-statics.rs
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 
 extern crate extern_statics;
 use extern_statics::*;
diff --git a/tests/ui/static/safe-extern-statics.thir.stderr b/tests/ui/static/safe-extern-statics.stderr
index 7fd2182c4c6..6be6c074c26 100644
--- a/tests/ui/static/safe-extern-statics.thir.stderr
+++ b/tests/ui/static/safe-extern-statics.stderr
@@ -1,5 +1,5 @@
 error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics.rs:13:13
+  --> $DIR/safe-extern-statics.rs:11:13
    |
 LL |     let a = A;
    |             ^ use of extern static
@@ -7,7 +7,7 @@ LL |     let a = A;
    = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
 
 error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics.rs:14:15
+  --> $DIR/safe-extern-statics.rs:12:15
    |
 LL |     let ra = &A;
    |               ^ use of extern static
@@ -15,7 +15,7 @@ LL |     let ra = &A;
    = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
 
 error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics.rs:15:14
+  --> $DIR/safe-extern-statics.rs:13:14
    |
 LL |     let xa = XA;
    |              ^^ use of extern static
@@ -23,7 +23,7 @@ LL |     let xa = XA;
    = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
 
 error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/safe-extern-statics.rs:16:16
+  --> $DIR/safe-extern-statics.rs:14:16
    |
 LL |     let xra = &XA;
    |                ^^ use of extern static
diff --git a/tests/ui/static/static-mut-foreign-requires-unsafe.mir.stderr b/tests/ui/static/static-mut-foreign-requires-unsafe.mir.stderr
deleted file mode 100644
index a4659bc8712..00000000000
--- a/tests/ui/static/static-mut-foreign-requires-unsafe.mir.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/static-mut-foreign-requires-unsafe.rs:9:5
-   |
-LL |     a += 3;
-   |     ^^^^^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/static-mut-foreign-requires-unsafe.rs:10:5
-   |
-LL |     a = 4;
-   |     ^^^^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/static-mut-foreign-requires-unsafe.rs:11:14
-   |
-LL |     let _b = a;
-   |              ^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/static/static-mut-foreign-requires-unsafe.rs b/tests/ui/static/static-mut-foreign-requires-unsafe.rs
index 4f96acb3375..90aa2537a82 100644
--- a/tests/ui/static/static-mut-foreign-requires-unsafe.rs
+++ b/tests/ui/static/static-mut-foreign-requires-unsafe.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 extern "C" {
     static mut a: i32;
 }
diff --git a/tests/ui/static/static-mut-foreign-requires-unsafe.thir.stderr b/tests/ui/static/static-mut-foreign-requires-unsafe.stderr
index 2c62d4d8f3b..022f7e9fb16 100644
--- a/tests/ui/static/static-mut-foreign-requires-unsafe.thir.stderr
+++ b/tests/ui/static/static-mut-foreign-requires-unsafe.stderr
@@ -1,5 +1,5 @@
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/static-mut-foreign-requires-unsafe.rs:9:5
+  --> $DIR/static-mut-foreign-requires-unsafe.rs:6:5
    |
 LL |     a += 3;
    |     ^ use of mutable static
@@ -7,7 +7,7 @@ LL |     a += 3;
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/static-mut-foreign-requires-unsafe.rs:10:5
+  --> $DIR/static-mut-foreign-requires-unsafe.rs:7:5
    |
 LL |     a = 4;
    |     ^ use of mutable static
@@ -15,7 +15,7 @@ LL |     a = 4;
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/static-mut-foreign-requires-unsafe.rs:11:14
+  --> $DIR/static-mut-foreign-requires-unsafe.rs:8:14
    |
 LL |     let _b = a;
    |              ^ use of mutable static
diff --git a/tests/ui/static/static-mut-requires-unsafe.mir.stderr b/tests/ui/static/static-mut-requires-unsafe.mir.stderr
deleted file mode 100644
index 0d4ce056fc2..00000000000
--- a/tests/ui/static/static-mut-requires-unsafe.mir.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/static-mut-requires-unsafe.rs:7:5
-   |
-LL |     a += 3;
-   |     ^^^^^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/static-mut-requires-unsafe.rs:8:5
-   |
-LL |     a = 4;
-   |     ^^^^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/static-mut-requires-unsafe.rs:9:14
-   |
-LL |     let _b = a;
-   |              ^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/static/static-mut-requires-unsafe.rs b/tests/ui/static/static-mut-requires-unsafe.rs
index ea3ba095007..413b97e431d 100644
--- a/tests/ui/static/static-mut-requires-unsafe.rs
+++ b/tests/ui/static/static-mut-requires-unsafe.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 static mut a: isize = 3;
 
 fn main() {
diff --git a/tests/ui/static/static-mut-requires-unsafe.thir.stderr b/tests/ui/static/static-mut-requires-unsafe.stderr
index 1a1cf14271a..30be0220cf6 100644
--- a/tests/ui/static/static-mut-requires-unsafe.thir.stderr
+++ b/tests/ui/static/static-mut-requires-unsafe.stderr
@@ -1,5 +1,5 @@
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/static-mut-requires-unsafe.rs:7:5
+  --> $DIR/static-mut-requires-unsafe.rs:4:5
    |
 LL |     a += 3;
    |     ^ use of mutable static
@@ -7,7 +7,7 @@ LL |     a += 3;
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/static-mut-requires-unsafe.rs:8:5
+  --> $DIR/static-mut-requires-unsafe.rs:5:5
    |
 LL |     a = 4;
    |     ^ use of mutable static
@@ -15,7 +15,7 @@ LL |     a = 4;
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/static-mut-requires-unsafe.rs:9:14
+  --> $DIR/static-mut-requires-unsafe.rs:6:14
    |
 LL |     let _b = a;
    |              ^ use of mutable static
diff --git a/tests/ui/statics/issue-14227.rs b/tests/ui/statics/issue-14227.rs
index 5f866ec9061..a1fde14600a 100644
--- a/tests/ui/statics/issue-14227.rs
+++ b/tests/ui/statics/issue-14227.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 extern "C" {
     pub static symbol: u32;
 }
diff --git a/tests/ui/statics/issue-14227.mir.stderr b/tests/ui/statics/issue-14227.stderr
index ab50b97d63f..085d6df9c41 100644
--- a/tests/ui/statics/issue-14227.mir.stderr
+++ b/tests/ui/statics/issue-14227.stderr
@@ -1,5 +1,5 @@
 error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/issue-14227.rs:7:21
+  --> $DIR/issue-14227.rs:4:21
    |
 LL | static CRASH: u32 = symbol;
    |                     ^^^^^^ use of extern static
diff --git a/tests/ui/statics/issue-14227.thir.stderr b/tests/ui/statics/issue-14227.thir.stderr
deleted file mode 100644
index ab50b97d63f..00000000000
--- a/tests/ui/statics/issue-14227.thir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: use of extern static is unsafe and requires unsafe function or block
-  --> $DIR/issue-14227.rs:7:21
-   |
-LL | static CRASH: u32 = symbol;
-   |                     ^^^^^^ use of extern static
-   |
-   = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/statics/issue-15261.rs b/tests/ui/statics/issue-15261.rs
index ec413f6d1d2..14422329b7d 100644
--- a/tests/ui/statics/issue-15261.rs
+++ b/tests/ui/statics/issue-15261.rs
@@ -6,6 +6,7 @@
 
 static mut n_mut: usize = 0;
 
-static n: &'static usize = unsafe{ &n_mut };
+static n: &'static usize = unsafe { &n_mut };
+//~^ WARN shared reference of mutable static is discouraged [static_mut_ref]
 
 fn main() {}
diff --git a/tests/ui/statics/issue-15261.stderr b/tests/ui/statics/issue-15261.stderr
new file mode 100644
index 00000000000..72d88ce1b38
--- /dev/null
+++ b/tests/ui/statics/issue-15261.stderr
@@ -0,0 +1,17 @@
+warning: shared reference of mutable static is discouraged
+  --> $DIR/issue-15261.rs:9:37
+   |
+LL | static n: &'static usize = unsafe { &n_mut };
+   |                                     ^^^^^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL | static n: &'static usize = unsafe { addr_of!(n_mut) };
+   |                                     ~~~~~~~~~~~~~~~
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/statics/static-mut-xc.rs b/tests/ui/statics/static-mut-xc.rs
index 1d172d26a59..2fc265e02ea 100644
--- a/tests/ui/statics/static-mut-xc.rs
+++ b/tests/ui/statics/static-mut-xc.rs
@@ -7,7 +7,6 @@
 
 // aux-build:static_mut_xc.rs
 
-
 extern crate static_mut_xc;
 
 unsafe fn static_bound(_: &'static isize) {}
@@ -27,7 +26,9 @@ unsafe fn run() {
     static_mut_xc::a = -3;
     assert_eq!(static_mut_xc::a, -3);
     static_bound(&static_mut_xc::a);
+    //~^ WARN shared reference of mutable static is discouraged [static_mut_ref]
     static_bound_set(&mut static_mut_xc::a);
+    //~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
 }
 
 pub fn main() {
diff --git a/tests/ui/statics/static-mut-xc.stderr b/tests/ui/statics/static-mut-xc.stderr
new file mode 100644
index 00000000000..37aa336bc50
--- /dev/null
+++ b/tests/ui/statics/static-mut-xc.stderr
@@ -0,0 +1,31 @@
+warning: shared reference of mutable static is discouraged
+  --> $DIR/static-mut-xc.rs:28:18
+   |
+LL |     static_bound(&static_mut_xc::a);
+   |                  ^^^^^^^^^^^^^^^^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL |     static_bound(addr_of!(static_mut_xc::a));
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/static-mut-xc.rs:30:22
+   |
+LL |     static_bound_set(&mut static_mut_xc::a);
+   |                      ^^^^^^^^^^^^^^^^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |     static_bound_set(addr_of_mut!(static_mut_xc::a));
+   |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/statics/static-recursive.rs b/tests/ui/statics/static-recursive.rs
index 95dadc81f81..216beb0206d 100644
--- a/tests/ui/statics/static-recursive.rs
+++ b/tests/ui/statics/static-recursive.rs
@@ -1,36 +1,43 @@
 // run-pass
+
 static mut S: *const u8 = unsafe { &S as *const *const u8 as *const u8 };
+//~^ WARN shared reference of mutable static is discouraged [static_mut_ref]
 
 struct StaticDoubleLinked {
     prev: &'static StaticDoubleLinked,
     next: &'static StaticDoubleLinked,
     data: i32,
-    head: bool
+    head: bool,
 }
 
-static L1: StaticDoubleLinked = StaticDoubleLinked{prev: &L3, next: &L2, data: 1, head: true};
-static L2: StaticDoubleLinked = StaticDoubleLinked{prev: &L1, next: &L3, data: 2, head: false};
-static L3: StaticDoubleLinked = StaticDoubleLinked{prev: &L2, next: &L1, data: 3, head: false};
-
+static L1: StaticDoubleLinked = StaticDoubleLinked { prev: &L3, next: &L2, data: 1, head: true };
+static L2: StaticDoubleLinked = StaticDoubleLinked { prev: &L1, next: &L3, data: 2, head: false };
+static L3: StaticDoubleLinked = StaticDoubleLinked { prev: &L2, next: &L1, data: 3, head: false };
 
 pub fn main() {
-    unsafe { assert_eq!(S, *(S as *const *const u8)); }
+    unsafe {
+        assert_eq!(S, *(S as *const *const u8));
+    }
 
     let mut test_vec = Vec::new();
     let mut cur = &L1;
     loop {
         test_vec.push(cur.data);
         cur = cur.next;
-        if cur.head { break }
+        if cur.head {
+            break;
+        }
     }
-    assert_eq!(&test_vec, &[1,2,3]);
+    assert_eq!(&test_vec, &[1, 2, 3]);
 
     let mut test_vec = Vec::new();
     let mut cur = &L1;
     loop {
         cur = cur.prev;
         test_vec.push(cur.data);
-        if cur.head { break }
+        if cur.head {
+            break;
+        }
     }
-    assert_eq!(&test_vec, &[3,2,1]);
+    assert_eq!(&test_vec, &[3, 2, 1]);
 }
diff --git a/tests/ui/statics/static-recursive.stderr b/tests/ui/statics/static-recursive.stderr
new file mode 100644
index 00000000000..15888e5c68d
--- /dev/null
+++ b/tests/ui/statics/static-recursive.stderr
@@ -0,0 +1,17 @@
+warning: shared reference of mutable static is discouraged
+  --> $DIR/static-recursive.rs:3:36
+   |
+LL | static mut S: *const u8 = unsafe { &S as *const *const u8 as *const u8 };
+   |                                    ^^ shared reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
+   |
+LL | static mut S: *const u8 = unsafe { addr_of!(S) as *const *const u8 as *const u8 };
+   |                                    ~~~~~~~~~~~
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/stats/hir-stats.stderr b/tests/ui/stats/hir-stats.stderr
index 5296475c94a..8b9ec30db63 100644
--- a/tests/ui/stats/hir-stats.stderr
+++ b/tests/ui/stats/hir-stats.stderr
@@ -128,8 +128,8 @@ hir-stats Param                     64 ( 0.7%)             2            32
 hir-stats Body                      72 ( 0.8%)             3            24
 hir-stats InlineAsm                 72 ( 0.8%)             1            72
 hir-stats ImplItemRef               72 ( 0.8%)             2            36
+hir-stats Arm                       80 ( 0.9%)             2            40
 hir-stats FieldDef                  96 ( 1.1%)             2            48
-hir-stats Arm                       96 ( 1.1%)             2            48
 hir-stats Stmt                      96 ( 1.1%)             3            32
 hir-stats - Local                     32 ( 0.4%)             1
 hir-stats - Semi                      32 ( 0.4%)             1
@@ -151,11 +151,11 @@ hir-stats - Wild                      72 ( 0.8%)             1
 hir-stats - Struct                    72 ( 0.8%)             1
 hir-stats - Binding                  216 ( 2.4%)             3
 hir-stats GenericParam             400 ( 4.4%)             5            80
-hir-stats Generics                 560 ( 6.1%)            10            56
+hir-stats Generics                 560 ( 6.2%)            10            56
 hir-stats Ty                       720 ( 7.9%)            15            48
 hir-stats - Ptr                       48 ( 0.5%)             1
 hir-stats - Ref                       48 ( 0.5%)             1
-hir-stats - Path                     624 ( 6.8%)            13
+hir-stats - Path                     624 ( 6.9%)            13
 hir-stats Expr                     768 ( 8.4%)            12            64
 hir-stats - Path                      64 ( 0.7%)             1
 hir-stats - Struct                    64 ( 0.7%)             1
@@ -174,5 +174,5 @@ hir-stats - Use                      352 ( 3.9%)             4
 hir-stats Path                   1_240 (13.6%)            31            40
 hir-stats PathSegment            1_920 (21.1%)            40            48
 hir-stats ----------------------------------------------------------------
-hir-stats Total                  9_112
+hir-stats Total                  9_096
 hir-stats
diff --git a/tests/ui/stdlib-unit-tests/raw-fat-ptr.rs b/tests/ui/stdlib-unit-tests/raw-fat-ptr.rs
index 6b0b09c9894..0f535523dcc 100644
--- a/tests/ui/stdlib-unit-tests/raw-fat-ptr.rs
+++ b/tests/ui/stdlib-unit-tests/raw-fat-ptr.rs
@@ -39,7 +39,7 @@ impl<T> Foo for T {
     }
 }
 
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 struct S<T:?Sized>(u32, T);
 
 fn main() {
diff --git a/tests/ui/struct-ctor-mangling.rs b/tests/ui/struct-ctor-mangling.rs
index ba6abbf03a5..159e21d2863 100644
--- a/tests/ui/struct-ctor-mangling.rs
+++ b/tests/ui/struct-ctor-mangling.rs
@@ -4,7 +4,7 @@ fn size_of_val<T>(_: &T) -> usize {
     std::mem::size_of::<T>()
 }
 
-struct Foo(#[allow(unused_tuple_struct_fields)] i64);
+struct Foo(#[allow(dead_code)] i64);
 
 // Test that the (symbol) mangling of `Foo` (the `struct` type) and that of
 // `typeof Foo` (the function type of the `struct` constructor) don't collide.
diff --git a/tests/ui/structs-enums/enum-null-pointer-opt.rs b/tests/ui/structs-enums/enum-null-pointer-opt.rs
index 85fa1eac2e2..356f8a6dd36 100644
--- a/tests/ui/structs-enums/enum-null-pointer-opt.rs
+++ b/tests/ui/structs-enums/enum-null-pointer-opt.rs
@@ -10,8 +10,8 @@ use std::sync::Arc;
 trait Trait { fn dummy(&self) { } }
 trait Mirror { type Image; }
 impl<T> Mirror for T { type Image = T; }
-struct ParamTypeStruct<T>(#[allow(unused_tuple_struct_fields)] T);
-struct AssocTypeStruct<T>(#[allow(unused_tuple_struct_fields)] <T as Mirror>::Image);
+struct ParamTypeStruct<T>(#[allow(dead_code)] T);
+struct AssocTypeStruct<T>(#[allow(dead_code)] <T as Mirror>::Image);
 #[repr(transparent)]
 union MaybeUninitUnion<T: Copy> {
     _value: T,
@@ -46,7 +46,7 @@ fn main() {
     struct Foo {
         _a: Box<isize>
     }
-    struct Bar(#[allow(unused_tuple_struct_fields)] Box<isize>);
+    struct Bar(#[allow(dead_code)] Box<isize>);
 
     // Should apply through structs
     assert_eq!(size_of::<Foo>(), size_of::<Option<Foo>>());
diff --git a/tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs b/tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs
index a05cf8b93d5..4bd7ee45dfe 100644
--- a/tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs
+++ b/tests/ui/structs-enums/enum-nullable-simplifycfg-misopt.rs
@@ -6,7 +6,7 @@
  * represented with nullable pointers could be misoptimized in some cases.
  */
 
-enum List<X> { Nil, Cons(X, #[allow(unused_tuple_struct_fields)] Box<List<X>>) }
+enum List<X> { Nil, Cons(X, #[allow(dead_code)] Box<List<X>>) }
 pub fn main() {
     match List::Cons(10, Box::new(List::Nil)) {
         List::Cons(10, _) => {}
diff --git a/tests/ui/structs-enums/resource-in-struct.rs b/tests/ui/structs-enums/resource-in-struct.rs
index 9613ca62a49..267ad6b4a86 100644
--- a/tests/ui/structs-enums/resource-in-struct.rs
+++ b/tests/ui/structs-enums/resource-in-struct.rs
@@ -25,7 +25,7 @@ fn close_res(i: closable) -> close_res {
     }
 }
 
-enum option<T> { none, some(#[allow(unused_tuple_struct_fields)] T), }
+enum option<T> { none, some(#[allow(dead_code)] T), }
 
 fn sink(_res: option<close_res>) { }
 
diff --git a/tests/ui/structs-enums/tuple-struct-construct.rs b/tests/ui/structs-enums/tuple-struct-construct.rs
index fbf97e6b225..dc7cbaffddb 100644
--- a/tests/ui/structs-enums/tuple-struct-construct.rs
+++ b/tests/ui/structs-enums/tuple-struct-construct.rs
@@ -1,5 +1,5 @@
 // run-pass
-#[allow(unused_tuple_struct_fields)]
+#[allow(dead_code)]
 #[derive(Debug)]
 struct Foo(isize, isize);
 
diff --git a/tests/ui/structs-enums/uninstantiable-struct.rs b/tests/ui/structs-enums/uninstantiable-struct.rs
index b24effe5a9c..15f2fc424bb 100644
--- a/tests/ui/structs-enums/uninstantiable-struct.rs
+++ b/tests/ui/structs-enums/uninstantiable-struct.rs
@@ -1,4 +1,4 @@
 // run-pass
-pub struct Z(#[allow(unused_tuple_struct_fields)] &'static Z);
+pub struct Z(#[allow(dead_code)] &'static Z);
 
 pub fn main() {}
diff --git a/tests/ui/suggestions/auxiliary/hidden-struct.rs b/tests/ui/suggestions/auxiliary/hidden-struct.rs
new file mode 100644
index 00000000000..30d69acac20
--- /dev/null
+++ b/tests/ui/suggestions/auxiliary/hidden-struct.rs
@@ -0,0 +1,17 @@
+#[doc(hidden)]
+pub mod hidden {
+    pub struct Foo;
+}
+
+pub mod hidden1 {
+    #[doc(hidden)]
+    pub struct Foo;
+}
+
+
+#[doc(hidden)]
+pub(crate) mod hidden2 {
+    pub struct Bar;
+}
+
+pub use hidden2::Bar;
diff --git a/tests/ui/suggestions/bad-infer-in-trait-impl.rs b/tests/ui/suggestions/bad-infer-in-trait-impl.rs
index 87db2636fb2..f38b168037b 100644
--- a/tests/ui/suggestions/bad-infer-in-trait-impl.rs
+++ b/tests/ui/suggestions/bad-infer-in-trait-impl.rs
@@ -5,6 +5,7 @@ trait Foo {
 impl Foo for () {
     fn bar(s: _) {}
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
+    //~| ERROR has 1 parameter but the declaration in trait `Foo::bar` has 0
 }
 
 fn main() {}
diff --git a/tests/ui/suggestions/bad-infer-in-trait-impl.stderr b/tests/ui/suggestions/bad-infer-in-trait-impl.stderr
index d96ee33a914..50c398de2b0 100644
--- a/tests/ui/suggestions/bad-infer-in-trait-impl.stderr
+++ b/tests/ui/suggestions/bad-infer-in-trait-impl.stderr
@@ -9,6 +9,16 @@ help: use type parameters instead
 LL |     fn bar<T>(s: T) {}
    |           +++    ~
 
-error: aborting due to 1 previous error
+error[E0050]: method `bar` has 1 parameter but the declaration in trait `Foo::bar` has 0
+  --> $DIR/bad-infer-in-trait-impl.rs:6:15
+   |
+LL |     fn bar();
+   |     --------- trait requires 0 parameters
+...
+LL |     fn bar(s: _) {}
+   |               ^ expected 0 parameters, found 1
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0121`.
+Some errors have detailed explanations: E0050, E0121.
+For more information about an error, try `rustc --explain E0050`.
diff --git a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs
new file mode 100644
index 00000000000..779a0c43c02
--- /dev/null
+++ b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs
@@ -0,0 +1,15 @@
+// aux-build:hidden-struct.rs
+// compile-flags: --crate-type lib
+
+extern crate hidden_struct;
+
+#[doc(hidden)]
+mod local {
+    pub struct Foo;
+}
+
+pub fn test(_: Foo) {}
+//~^ ERROR cannot find type `Foo` in this scope
+
+pub fn test2(_: Bar) {}
+//~^ ERROR cannot find type `Bar` in this scope
diff --git a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr
new file mode 100644
index 00000000000..7fb4d95ff9b
--- /dev/null
+++ b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr
@@ -0,0 +1,25 @@
+error[E0412]: cannot find type `Foo` in this scope
+  --> $DIR/dont-suggest-foreign-doc-hidden.rs:11:16
+   |
+LL | pub fn test(_: Foo) {}
+   |                ^^^ not found in this scope
+   |
+help: consider importing this struct
+   |
+LL + use local::Foo;
+   |
+
+error[E0412]: cannot find type `Bar` in this scope
+  --> $DIR/dont-suggest-foreign-doc-hidden.rs:14:17
+   |
+LL | pub fn test2(_: Bar) {}
+   |                 ^^^ not found in this scope
+   |
+help: consider importing this struct
+   |
+LL + use hidden_struct::Bar;
+   |
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr b/tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr
index 7c81825e576..60ab392f55d 100644
--- a/tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr
+++ b/tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr
@@ -52,7 +52,7 @@ LL |     Pin::new(x)
    |
    = note: consider using the `pin!` macro
            consider using `Box::pin` if you need to access the pinned value outside of the current scope
-note: required by a bound in `Pin::<P>::new`
+note: required by a bound in `Pin::<Ptr>::new`
   --> $SRC_DIR/core/src/pin.rs:LL:COL
 
 error[E0277]: `dyn Future<Output = i32> + Send` cannot be unpinned
@@ -65,7 +65,7 @@ LL |     Pin::new(Box::new(x))
    |
    = note: consider using the `pin!` macro
            consider using `Box::pin` if you need to access the pinned value outside of the current scope
-note: required by a bound in `Pin::<P>::new`
+note: required by a bound in `Pin::<Ptr>::new`
   --> $SRC_DIR/core/src/pin.rs:LL:COL
 
 error[E0308]: mismatched types
diff --git a/tests/ui/suggestions/fn-trait-notation.fixed b/tests/ui/suggestions/fn-trait-notation.fixed
index cf940f4e926..6cb97df4a85 100644
--- a/tests/ui/suggestions/fn-trait-notation.fixed
+++ b/tests/ui/suggestions/fn-trait-notation.fixed
@@ -2,6 +2,7 @@
 fn e0658<F, G, H>(f: F, g: G, h: H) -> i32
 where
     F: Fn(i32) -> i32, //~ ERROR E0658
+    //~^ ERROR E0059
     G: Fn(i32, i32) -> (i32, i32), //~ ERROR E0658
     H: Fn(i32) -> i32, //~ ERROR E0658
 {
diff --git a/tests/ui/suggestions/fn-trait-notation.rs b/tests/ui/suggestions/fn-trait-notation.rs
index f0bb03315d9..91251614930 100644
--- a/tests/ui/suggestions/fn-trait-notation.rs
+++ b/tests/ui/suggestions/fn-trait-notation.rs
@@ -2,6 +2,7 @@
 fn e0658<F, G, H>(f: F, g: G, h: H) -> i32
 where
     F: Fn<i32, Output = i32>, //~ ERROR E0658
+    //~^ ERROR E0059
     G: Fn<(i32, i32, ), Output = (i32, i32)>, //~ ERROR E0658
     H: Fn<(i32,), Output = i32>, //~ ERROR E0658
 {
diff --git a/tests/ui/suggestions/fn-trait-notation.stderr b/tests/ui/suggestions/fn-trait-notation.stderr
index 3e3b5417440..ed79b3d512c 100644
--- a/tests/ui/suggestions/fn-trait-notation.stderr
+++ b/tests/ui/suggestions/fn-trait-notation.stderr
@@ -8,7 +8,7 @@ LL |     F: Fn<i32, Output = i32>,
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
 error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
-  --> $DIR/fn-trait-notation.rs:5:8
+  --> $DIR/fn-trait-notation.rs:6:8
    |
 LL |     G: Fn<(i32, i32, ), Output = (i32, i32)>,
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(i32, i32) -> (i32, i32)`
@@ -17,7 +17,7 @@ LL |     G: Fn<(i32, i32, ), Output = (i32, i32)>,
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
 error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
-  --> $DIR/fn-trait-notation.rs:6:8
+  --> $DIR/fn-trait-notation.rs:7:8
    |
 LL |     H: Fn<(i32,), Output = i32>,
    |        ^^^^^^^^^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(i32) -> i32`
@@ -25,6 +25,16 @@ LL |     H: Fn<(i32,), Output = i32>,
    = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
-error: aborting due to 3 previous errors
+error[E0059]: type parameter to bare `Fn` trait must be a tuple
+  --> $DIR/fn-trait-notation.rs:4:8
+   |
+LL |     F: Fn<i32, Output = i32>,
+   |        ^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `i32`
+   |
+note: required by a bound in `Fn`
+  --> $SRC_DIR/core/src/ops/function.rs:LL:COL
+
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0658`.
+Some errors have detailed explanations: E0059, E0658.
+For more information about an error, try `rustc --explain E0059`.
diff --git a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs
index a1a51c4814e..afde5ee97d7 100644
--- a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs
+++ b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.rs
@@ -18,6 +18,7 @@ mod elided {
     // But that lifetime does not participate in resolution.
     async fn i(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
     //~^ ERROR missing lifetime specifier
+    //~| ERROR lifetime may not live long enough
 }
 
 mod underscore {
@@ -36,6 +37,7 @@ mod underscore {
     // But that lifetime does not participate in resolution.
     async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
     //~^ ERROR missing lifetime specifier
+    //~| ERROR lifetime may not live long enough
 }
 
 mod alone_in_path {
@@ -61,8 +63,8 @@ mod in_path {
 }
 
 // This must not err, as the `&` actually resolves to `'a`.
-fn resolved_anonymous<'a, T>(f: impl Fn(&'a str) -> &T) {
-    f("f")
+fn resolved_anonymous<'a, T: 'a>(f: impl Fn(&'a str) -> &T) {
+    f("f");
 }
 
 fn main() {}
diff --git a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr
index 2dfaa731194..fee4c7268fa 100644
--- a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr
+++ b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr
@@ -41,7 +41,7 @@ LL +     async fn i(mut x: impl Iterator<Item = &()>) -> Option<()> { x.next() }
    |
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/impl-trait-missing-lifetime-gated.rs:27:58
+  --> $DIR/impl-trait-missing-lifetime-gated.rs:28:58
    |
 LL |     fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
    |                                                          ^^ expected named lifetime parameter
@@ -62,7 +62,7 @@ LL +     fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<()> { x.next() }
    |
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/impl-trait-missing-lifetime-gated.rs:37:64
+  --> $DIR/impl-trait-missing-lifetime-gated.rs:38:64
    |
 LL |     async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
    |                                                                ^^ expected named lifetime parameter
@@ -83,7 +83,7 @@ LL +     async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<()> { x.next(
    |
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/impl-trait-missing-lifetime-gated.rs:47:37
+  --> $DIR/impl-trait-missing-lifetime-gated.rs:49:37
    |
 LL |     fn g(mut x: impl Foo) -> Option<&()> { x.next() }
    |                                     ^ expected named lifetime parameter
@@ -104,7 +104,7 @@ LL +     fn g(mut x: impl Foo) -> Option<()> { x.next() }
    |
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/impl-trait-missing-lifetime-gated.rs:58:41
+  --> $DIR/impl-trait-missing-lifetime-gated.rs:60:41
    |
 LL |     fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() }
    |                                         ^ expected named lifetime parameter
@@ -149,7 +149,7 @@ LL |     fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&()> { x.next()
    |         ++++                              ++
 
 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
-  --> $DIR/impl-trait-missing-lifetime-gated.rs:24:35
+  --> $DIR/impl-trait-missing-lifetime-gated.rs:25:35
    |
 LL |     fn f(_: impl Iterator<Item = &'_ ()>) {}
    |                                   ^^ expected named lifetime parameter
@@ -161,7 +161,7 @@ LL |     fn f<'a>(_: impl Iterator<Item = &'a ()>) {}
    |         ++++                          ~~
 
 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
-  --> $DIR/impl-trait-missing-lifetime-gated.rs:27:39
+  --> $DIR/impl-trait-missing-lifetime-gated.rs:28:39
    |
 LL |     fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
    |                                       ^^ expected named lifetime parameter
@@ -173,7 +173,7 @@ LL |     fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'_ ()> { x.nex
    |         ++++                              ~~
 
 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
-  --> $DIR/impl-trait-missing-lifetime-gated.rs:44:18
+  --> $DIR/impl-trait-missing-lifetime-gated.rs:46:18
    |
 LL |     fn f(_: impl Foo) {}
    |                  ^^^ expected named lifetime parameter
@@ -185,7 +185,7 @@ LL |     fn f<'a>(_: impl Foo<'a>) {}
    |         ++++            ++++
 
 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
-  --> $DIR/impl-trait-missing-lifetime-gated.rs:47:22
+  --> $DIR/impl-trait-missing-lifetime-gated.rs:49:22
    |
 LL |     fn g(mut x: impl Foo) -> Option<&()> { x.next() }
    |                      ^^^ expected named lifetime parameter
@@ -197,7 +197,7 @@ LL |     fn g<'a>(mut x: impl Foo<'a>) -> Option<&()> { x.next() }
    |         ++++                ++++
 
 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
-  --> $DIR/impl-trait-missing-lifetime-gated.rs:55:22
+  --> $DIR/impl-trait-missing-lifetime-gated.rs:57:22
    |
 LL |     fn f(_: impl Foo<()>) {}
    |                      ^ expected named lifetime parameter
@@ -209,7 +209,7 @@ LL |     fn f<'a>(_: impl Foo<'a, ()>) {}
    |         ++++             +++
 
 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
-  --> $DIR/impl-trait-missing-lifetime-gated.rs:58:26
+  --> $DIR/impl-trait-missing-lifetime-gated.rs:60:26
    |
 LL |     fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() }
    |                          ^ expected named lifetime parameter
@@ -220,7 +220,23 @@ help: consider introducing a named lifetime parameter
 LL |     fn g<'a>(mut x: impl Foo<'a, ()>) -> Option<&()> { x.next() }
    |         ++++                 +++
 
-error: aborting due to 14 previous errors
+error: lifetime may not live long enough
+  --> $DIR/impl-trait-missing-lifetime-gated.rs:19:67
+   |
+LL |     async fn i(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
+   |     -----------------------------------------------------------   ^^^^^^^^ returning this value requires that `'1` must outlive `'static`
+   |     |
+   |     return type `impl Future<Output = Option<&'static ()>>` contains a lifetime `'1`
+
+error: lifetime may not live long enough
+  --> $DIR/impl-trait-missing-lifetime-gated.rs:38:73
+   |
+LL |     async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
+   |     -----------------------------------------------------------------   ^^^^^^^^ returning this value requires that `'1` must outlive `'static`
+   |     |
+   |     return type `impl Future<Output = Option<&'static ()>>` contains a lifetime `'1`
+
+error: aborting due to 16 previous errors
 
 Some errors have detailed explanations: E0106, E0658.
 For more information about an error, try `rustc --explain E0106`.
diff --git a/tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed b/tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed
index 470cc67b973..3257ea04c69 100644
--- a/tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed
+++ b/tests/ui/suggestions/lifetimes/type-param-bound-scope.fixed
@@ -2,7 +2,7 @@
 // trait, impl or associated fn.
 // run-rustfix
 
-struct Inv<'a>(Option<*mut &'a u8>);
+struct Inv<'a>(#[allow(dead_code)] Option<*mut &'a u8>);
 
 fn check_bound<'a, A: 'a>(_: A, _: Inv<'a>) {}
 
diff --git a/tests/ui/suggestions/lifetimes/type-param-bound-scope.rs b/tests/ui/suggestions/lifetimes/type-param-bound-scope.rs
index 874788e13ef..fcc13aad996 100644
--- a/tests/ui/suggestions/lifetimes/type-param-bound-scope.rs
+++ b/tests/ui/suggestions/lifetimes/type-param-bound-scope.rs
@@ -2,7 +2,7 @@
 // trait, impl or associated fn.
 // run-rustfix
 
-struct Inv<'a>(Option<*mut &'a u8>);
+struct Inv<'a>(#[allow(dead_code)] Option<*mut &'a u8>);
 
 fn check_bound<'a, A: 'a>(_: A, _: Inv<'a>) {}
 
diff --git a/tests/ui/suggestions/missing-lifetime-specifier.rs b/tests/ui/suggestions/missing-lifetime-specifier.rs
index cb734e8ba85..01dcc94f747 100644
--- a/tests/ui/suggestions/missing-lifetime-specifier.rs
+++ b/tests/ui/suggestions/missing-lifetime-specifier.rs
@@ -1,6 +1,9 @@
+// different number of duplicated diagnostics on different targets
+// compile-flags: -Zdeduplicate-diagnostics=yes
+
 #![allow(bare_trait_objects)]
-use std::collections::HashMap;
 use std::cell::RefCell;
+use std::collections::HashMap;
 
 pub union Foo<'t, 'k> {
     i: &'t i64,
@@ -38,18 +41,10 @@ thread_local! {
 thread_local! {
     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
     //~^ ERROR union takes 2 lifetime arguments but 1 lifetime argument
-    //~| ERROR union takes 2 lifetime arguments but 1 lifetime argument was supplied
-    //~| ERROR union takes 2 lifetime arguments but 1 lifetime argument was supplied
-    //~| ERROR union takes 2 lifetime arguments but 1 lifetime argument was supplied
-    //~| ERROR union takes 2 lifetime arguments but 1 lifetime argument was supplied
 }
 thread_local! {
     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
     //~^ ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
-    //~| ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
-    //~| ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
-    //~| ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
-    //~| ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
     //~| ERROR missing lifetime
     //~| ERROR missing lifetime
 }
diff --git a/tests/ui/suggestions/missing-lifetime-specifier.stderr b/tests/ui/suggestions/missing-lifetime-specifier.stderr
index e41f547ce9b..7a7ef47c35b 100644
--- a/tests/ui/suggestions/missing-lifetime-specifier.stderr
+++ b/tests/ui/suggestions/missing-lifetime-specifier.stderr
@@ -1,5 +1,5 @@
 error[E0106]: missing lifetime specifiers
-  --> $DIR/missing-lifetime-specifier.rs:18:44
+  --> $DIR/missing-lifetime-specifier.rs:21:44
    |
 LL |     static a: RefCell<HashMap<i32, Vec<Vec<Foo>>>> = RefCell::new(HashMap::new());
    |                                            ^^^ expected 2 lifetime parameters
@@ -11,7 +11,7 @@ LL |     static a: RefCell<HashMap<i32, Vec<Vec<Foo<'static, 'static>>>>> = RefC
    |                                               ++++++++++++++++++
 
 error[E0106]: missing lifetime specifiers
-  --> $DIR/missing-lifetime-specifier.rs:18:44
+  --> $DIR/missing-lifetime-specifier.rs:21:44
    |
 LL | / thread_local! {
 LL | |     static a: RefCell<HashMap<i32, Vec<Vec<Foo>>>> = RefCell::new(HashMap::new());
@@ -24,7 +24,7 @@ LL | | }
    = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 3 lifetimes it is borrowed from
 
 error[E0106]: missing lifetime specifiers
-  --> $DIR/missing-lifetime-specifier.rs:23:44
+  --> $DIR/missing-lifetime-specifier.rs:26:44
    |
 LL |     static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap::new());
    |                                            ^^^^ expected 2 lifetime parameters
@@ -38,7 +38,7 @@ LL |     static b: RefCell<HashMap<i32, Vec<Vec<&'static Bar<'static, 'static>>>
    |                                             +++++++    ++++++++++++++++++
 
 error[E0106]: missing lifetime specifiers
-  --> $DIR/missing-lifetime-specifier.rs:23:44
+  --> $DIR/missing-lifetime-specifier.rs:26:44
    |
 LL | / thread_local! {
 LL | |     static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap::new());
@@ -53,7 +53,7 @@ LL | | }
    = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 4 lifetimes it is borrowed from
 
 error[E0106]: missing lifetime specifiers
-  --> $DIR/missing-lifetime-specifier.rs:28:47
+  --> $DIR/missing-lifetime-specifier.rs:31:47
    |
 LL |     static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(HashMap::new());
    |                                               ^ expected 2 lifetime parameters
@@ -65,7 +65,7 @@ LL |     static c: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> =
    |                                                +++++++++++++++++
 
 error[E0106]: missing lifetime specifiers
-  --> $DIR/missing-lifetime-specifier.rs:28:47
+  --> $DIR/missing-lifetime-specifier.rs:31:47
    |
 LL | / thread_local! {
 LL | |     static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(HashMap::new());
@@ -78,7 +78,7 @@ LL | | }
    = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 3 lifetimes it is borrowed from
 
 error[E0106]: missing lifetime specifiers
-  --> $DIR/missing-lifetime-specifier.rs:33:44
+  --> $DIR/missing-lifetime-specifier.rs:36:44
    |
 LL |     static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(HashMap::new());
    |                                            ^   ^ expected 2 lifetime parameters
@@ -92,7 +92,7 @@ LL |     static d: RefCell<HashMap<i32, Vec<Vec<&'static Tar<'static, 'static, i
    |                                             +++++++     +++++++++++++++++
 
 error[E0106]: missing lifetime specifiers
-  --> $DIR/missing-lifetime-specifier.rs:33:44
+  --> $DIR/missing-lifetime-specifier.rs:36:44
    |
 LL | / thread_local! {
 LL | |     static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(HashMap::new());
@@ -107,7 +107,7 @@ LL | | }
    = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 4 lifetimes it is borrowed from
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/missing-lifetime-specifier.rs:47:44
+  --> $DIR/missing-lifetime-specifier.rs:46:44
    |
 LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
    |                                            ^ expected named lifetime parameter
@@ -119,14 +119,13 @@ LL |     static f: RefCell<HashMap<i32, Vec<Vec<&'static Tar<'static, i32>>>>> =
    |                                             +++++++
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/missing-lifetime-specifier.rs:47:44
+  --> $DIR/missing-lifetime-specifier.rs:46:44
    |
 LL | / thread_local! {
 LL | |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
    | |                                            ^ expected named lifetime parameter
 LL | |
 LL | |
-...  |
 LL | |
 LL | | }
    | |_-
@@ -134,7 +133,7 @@ LL | | }
    = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 3 lifetimes it is borrowed from
 
 error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/missing-lifetime-specifier.rs:39:44
+  --> $DIR/missing-lifetime-specifier.rs:42:44
    |
 LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
    |                                            ^^^ ------- supplied 1 lifetime argument
@@ -142,7 +141,7 @@ LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell:
    |                                            expected 2 lifetime arguments
    |
 note: union defined here, with 2 lifetime parameters: `'t`, `'k`
-  --> $DIR/missing-lifetime-specifier.rs:11:11
+  --> $DIR/missing-lifetime-specifier.rs:14:11
    |
 LL | pub union Qux<'t, 'k, I> {
    |           ^^^ --  --
@@ -151,159 +150,8 @@ help: add missing lifetime argument
 LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
    |                                                       +++++++++
 
-error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/missing-lifetime-specifier.rs:39:44
-   |
-LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                            ^^^ ------- supplied 1 lifetime argument
-   |                                            |
-   |                                            expected 2 lifetime arguments
-   |
-note: union defined here, with 2 lifetime parameters: `'t`, `'k`
-  --> $DIR/missing-lifetime-specifier.rs:11:11
-   |
-LL | pub union Qux<'t, 'k, I> {
-   |           ^^^ --  --
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: add missing lifetime argument
-   |
-LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                       +++++++++
-
-error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/missing-lifetime-specifier.rs:39:44
-   |
-LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                            ^^^ ------- supplied 1 lifetime argument
-   |                                            |
-   |                                            expected 2 lifetime arguments
-   |
-note: union defined here, with 2 lifetime parameters: `'t`, `'k`
-  --> $DIR/missing-lifetime-specifier.rs:11:11
-   |
-LL | pub union Qux<'t, 'k, I> {
-   |           ^^^ --  --
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: add missing lifetime argument
-   |
-LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                       +++++++++
-
-error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/missing-lifetime-specifier.rs:39:44
-   |
-LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                            ^^^ ------- supplied 1 lifetime argument
-   |                                            |
-   |                                            expected 2 lifetime arguments
-   |
-note: union defined here, with 2 lifetime parameters: `'t`, `'k`
-  --> $DIR/missing-lifetime-specifier.rs:11:11
-   |
-LL | pub union Qux<'t, 'k, I> {
-   |           ^^^ --  --
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: add missing lifetime argument
-   |
-LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                       +++++++++
-
-error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/missing-lifetime-specifier.rs:39:44
-   |
-LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                            ^^^ ------- supplied 1 lifetime argument
-   |                                            |
-   |                                            expected 2 lifetime arguments
-   |
-note: union defined here, with 2 lifetime parameters: `'t`, `'k`
-  --> $DIR/missing-lifetime-specifier.rs:11:11
-   |
-LL | pub union Qux<'t, 'k, I> {
-   |           ^^^ --  --
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: add missing lifetime argument
-   |
-LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                       +++++++++
-
-error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/missing-lifetime-specifier.rs:47:45
-   |
-LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                             ^^^ ------- supplied 1 lifetime argument
-   |                                             |
-   |                                             expected 2 lifetime arguments
-   |
-note: trait defined here, with 2 lifetime parameters: `'t`, `'k`
-  --> $DIR/missing-lifetime-specifier.rs:15:7
-   |
-LL | trait Tar<'t, 'k, I> {}
-   |       ^^^ --  --
-help: add missing lifetime argument
-   |
-LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                        +++++++++
-
-error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/missing-lifetime-specifier.rs:47:45
-   |
-LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                             ^^^ ------- supplied 1 lifetime argument
-   |                                             |
-   |                                             expected 2 lifetime arguments
-   |
-note: trait defined here, with 2 lifetime parameters: `'t`, `'k`
-  --> $DIR/missing-lifetime-specifier.rs:15:7
-   |
-LL | trait Tar<'t, 'k, I> {}
-   |       ^^^ --  --
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: add missing lifetime argument
-   |
-LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                        +++++++++
-
-error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/missing-lifetime-specifier.rs:47:45
-   |
-LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                             ^^^ ------- supplied 1 lifetime argument
-   |                                             |
-   |                                             expected 2 lifetime arguments
-   |
-note: trait defined here, with 2 lifetime parameters: `'t`, `'k`
-  --> $DIR/missing-lifetime-specifier.rs:15:7
-   |
-LL | trait Tar<'t, 'k, I> {}
-   |       ^^^ --  --
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: add missing lifetime argument
-   |
-LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                        +++++++++
-
-error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/missing-lifetime-specifier.rs:47:45
-   |
-LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                             ^^^ ------- supplied 1 lifetime argument
-   |                                             |
-   |                                             expected 2 lifetime arguments
-   |
-note: trait defined here, with 2 lifetime parameters: `'t`, `'k`
-  --> $DIR/missing-lifetime-specifier.rs:15:7
-   |
-LL | trait Tar<'t, 'k, I> {}
-   |       ^^^ --  --
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: add missing lifetime argument
-   |
-LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
-   |                                                        +++++++++
-
 error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/missing-lifetime-specifier.rs:47:45
+  --> $DIR/missing-lifetime-specifier.rs:46:45
    |
 LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
    |                                             ^^^ ------- supplied 1 lifetime argument
@@ -311,17 +159,16 @@ LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell
    |                                             expected 2 lifetime arguments
    |
 note: trait defined here, with 2 lifetime parameters: `'t`, `'k`
-  --> $DIR/missing-lifetime-specifier.rs:15:7
+  --> $DIR/missing-lifetime-specifier.rs:18:7
    |
 LL | trait Tar<'t, 'k, I> {}
    |       ^^^ --  --
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: add missing lifetime argument
    |
 LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
    |                                                        +++++++++
 
-error: aborting due to 20 previous errors
+error: aborting due to 12 previous errors
 
 Some errors have detailed explanations: E0106, E0107.
 For more information about an error, try `rustc --explain E0106`.
diff --git a/tests/ui/tag-type-args.rs b/tests/ui/tag-type-args.rs
index 660d860ba77..75a54927443 100644
--- a/tests/ui/tag-type-args.rs
+++ b/tests/ui/tag-type-args.rs
@@ -1,4 +1,5 @@
 enum Quux<T> { Bar }
+//~^ ERROR: parameter `T` is never used
 
 fn foo(c: Quux) { assert!((false)); } //~ ERROR missing generics for enum `Quux`
 
diff --git a/tests/ui/tag-type-args.stderr b/tests/ui/tag-type-args.stderr
index 49ecf65b7e6..80ffd3a2f05 100644
--- a/tests/ui/tag-type-args.stderr
+++ b/tests/ui/tag-type-args.stderr
@@ -1,5 +1,5 @@
 error[E0107]: missing generics for enum `Quux`
-  --> $DIR/tag-type-args.rs:3:11
+  --> $DIR/tag-type-args.rs:4:11
    |
 LL | fn foo(c: Quux) { assert!((false)); }
    |           ^^^^ expected 1 generic argument
@@ -14,6 +14,16 @@ help: add missing generic argument
 LL | fn foo(c: Quux<T>) { assert!((false)); }
    |               +++
 
-error: aborting due to 1 previous error
+error[E0392]: parameter `T` is never used
+  --> $DIR/tag-type-args.rs:1:11
+   |
+LL | enum Quux<T> { Bar }
+   |           ^ unused parameter
+   |
+   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
+   = help: if you intended `T` to be a const parameter, use `const T: usize` instead
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0107, E0392.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/target-feature/invalid-attribute.rs b/tests/ui/target-feature/invalid-attribute.rs
index d1b3cf71c15..f6357bd9eb0 100644
--- a/tests/ui/target-feature/invalid-attribute.rs
+++ b/tests/ui/target-feature/invalid-attribute.rs
@@ -86,6 +86,8 @@ static A: () = ();
 //~^ ERROR attribute should be applied to a function
 impl Quux for u8 {}
 //~^ NOTE not a function
+//~| NOTE missing `foo` in implementation
+//~| ERROR missing: `foo`
 
 #[target_feature(enable = "sse2")]
 //~^ ERROR attribute should be applied to a function
@@ -93,7 +95,7 @@ impl Foo {}
 //~^ NOTE not a function
 
 trait Quux {
-    fn foo();
+    fn foo(); //~ NOTE `foo` from trait
 }
 
 impl Quux for Foo {
diff --git a/tests/ui/target-feature/invalid-attribute.stderr b/tests/ui/target-feature/invalid-attribute.stderr
index 29c73921c53..8f981d27c53 100644
--- a/tests/ui/target-feature/invalid-attribute.stderr
+++ b/tests/ui/target-feature/invalid-attribute.stderr
@@ -117,7 +117,7 @@ LL | impl Quux for u8 {}
    | ------------------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:90:1
+  --> $DIR/invalid-attribute.rs:92:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -126,7 +126,7 @@ LL | impl Foo {}
    | ----------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:108:5
+  --> $DIR/invalid-attribute.rs:110:5
    |
 LL |       #[target_feature(enable = "sse2")]
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -138,7 +138,7 @@ LL | |     }
    | |_____- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:116:5
+  --> $DIR/invalid-attribute.rs:118:5
    |
 LL |     #[target_feature(enable = "sse2")]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -183,7 +183,7 @@ LL | #[inline(always)]
    | ^^^^^^^^^^^^^^^^^
 
 error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
-  --> $DIR/invalid-attribute.rs:100:5
+  --> $DIR/invalid-attribute.rs:102:5
    |
 LL |     #[target_feature(enable = "sse2")]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -194,6 +194,16 @@ LL |     fn foo() {}
    = note: see issue #69098 <https://github.com/rust-lang/rust/issues/69098> for more information
    = help: add `#![feature(target_feature_11)]` to the crate attributes to enable
 
-error: aborting due to 22 previous errors
+error[E0046]: not all trait items implemented, missing: `foo`
+  --> $DIR/invalid-attribute.rs:87:1
+   |
+LL | impl Quux for u8 {}
+   | ^^^^^^^^^^^^^^^^ missing `foo` in implementation
+...
+LL |     fn foo();
+   |     --------- `foo` from trait
+
+error: aborting due to 23 previous errors
 
-For more information about this error, try `rustc --explain E0658`.
+Some errors have detailed explanations: E0046, E0658.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/thread-local/thread-local-static.rs b/tests/ui/thread-local/thread-local-static.rs
index afaffbb7e9b..f5fb0984897 100644
--- a/tests/ui/thread-local/thread-local-static.rs
+++ b/tests/ui/thread-local/thread-local-static.rs
@@ -1,6 +1,4 @@
 // edition:2018
-// revisions: mir thir
-//thir: -Zthir-unsafeck
 
 #![feature(thread_local)]
 #![feature(const_swap)]
@@ -10,7 +8,8 @@ static mut STATIC_VAR_2: [u32; 8] = [4; 8];
 const fn g(x: &mut [u32; 8]) {
     //~^ ERROR mutable references are not allowed
     std::mem::swap(x, &mut STATIC_VAR_2)
-    //~^ ERROR thread-local statics cannot be accessed
+    //~^ WARN mutable reference of mutable static is discouraged [static_mut_ref]
+    //~^^ ERROR thread-local statics cannot be accessed
     //~| ERROR mutable references are not allowed
     //~| ERROR use of mutable static is unsafe
     //~| constant functions cannot refer to statics
diff --git a/tests/ui/thread-local/thread-local-static.mir.stderr b/tests/ui/thread-local/thread-local-static.stderr
index 607d7ee902c..b03f4580c2c 100644
--- a/tests/ui/thread-local/thread-local-static.mir.stderr
+++ b/tests/ui/thread-local/thread-local-static.stderr
@@ -1,5 +1,28 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/thread-local-static.rs:10:23
+   |
+LL |     std::mem::swap(x, &mut STATIC_VAR_2)
+   |                       ^^^^^^^^^^^^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |     std::mem::swap(x, addr_of_mut!(STATIC_VAR_2))
+   |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+error[E0133]: use of mutable static is unsafe and requires unsafe function or block
+  --> $DIR/thread-local-static.rs:10:28
+   |
+LL |     std::mem::swap(x, &mut STATIC_VAR_2)
+   |                            ^^^^^^^^^^^^ use of mutable static
+   |
+   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
+
 error[E0658]: mutable references are not allowed in constant functions
-  --> $DIR/thread-local-static.rs:10:12
+  --> $DIR/thread-local-static.rs:8:12
    |
 LL | const fn g(x: &mut [u32; 8]) {
    |            ^
@@ -8,13 +31,13 @@ LL | const fn g(x: &mut [u32; 8]) {
    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error[E0625]: thread-local statics cannot be accessed at compile-time
-  --> $DIR/thread-local-static.rs:12:28
+  --> $DIR/thread-local-static.rs:10:28
    |
 LL |     std::mem::swap(x, &mut STATIC_VAR_2)
    |                            ^^^^^^^^^^^^
 
 error[E0013]: constant functions cannot refer to statics
-  --> $DIR/thread-local-static.rs:12:28
+  --> $DIR/thread-local-static.rs:10:28
    |
 LL |     std::mem::swap(x, &mut STATIC_VAR_2)
    |                            ^^^^^^^^^^^^
@@ -22,7 +45,7 @@ LL |     std::mem::swap(x, &mut STATIC_VAR_2)
    = help: consider extracting the value of the `static` to a `const`, and referring to that
 
 error[E0658]: mutable references are not allowed in constant functions
-  --> $DIR/thread-local-static.rs:12:23
+  --> $DIR/thread-local-static.rs:10:23
    |
 LL |     std::mem::swap(x, &mut STATIC_VAR_2)
    |                       ^^^^^^^^^^^^^^^^^
@@ -30,15 +53,7 @@ LL |     std::mem::swap(x, &mut STATIC_VAR_2)
    = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/thread-local-static.rs:12:23
-   |
-LL |     std::mem::swap(x, &mut STATIC_VAR_2)
-   |                       ^^^^^^^^^^^^^^^^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error: aborting due to 5 previous errors
+error: aborting due to 5 previous errors; 1 warning emitted
 
 Some errors have detailed explanations: E0013, E0133, E0625, E0658.
 For more information about an error, try `rustc --explain E0013`.
diff --git a/tests/ui/thread-local/thread-local-static.thir.stderr b/tests/ui/thread-local/thread-local-static.thir.stderr
index 607d7ee902c..2043b268c09 100644
--- a/tests/ui/thread-local/thread-local-static.thir.stderr
+++ b/tests/ui/thread-local/thread-local-static.thir.stderr
@@ -1,3 +1,18 @@
+warning: mutable reference of mutable static is discouraged
+  --> $DIR/thread-local-static.rs:12:23
+   |
+LL |     std::mem::swap(x, &mut STATIC_VAR_2)
+   |                       ^^^^^^^^^^^^^^^^^ mutable reference of mutable static
+   |
+   = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
+   = note: reference of mutable static is a hard error from 2024 edition
+   = note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
+   = note: `#[warn(static_mut_ref)]` on by default
+help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
+   |
+LL |     std::mem::swap(x, addr_of_mut!(STATIC_VAR_2))
+   |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 error[E0658]: mutable references are not allowed in constant functions
   --> $DIR/thread-local-static.rs:10:12
    |
@@ -38,7 +53,7 @@ LL |     std::mem::swap(x, &mut STATIC_VAR_2)
    |
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 
-error: aborting due to 5 previous errors
+error: aborting due to 5 previous errors; 1 warning emitted
 
 Some errors have detailed explanations: E0013, E0133, E0625, E0658.
 For more information about an error, try `rustc --explain E0013`.
diff --git a/tests/ui/threads-sendsync/issue-43733.mir.stderr b/tests/ui/threads-sendsync/issue-43733.mir.stderr
deleted file mode 100644
index ff83e16add9..00000000000
--- a/tests/ui/threads-sendsync/issue-43733.mir.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/issue-43733.rs:19:5
-   |
-LL |     __KEY.get(Default::default)
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/issue-43733.rs:24:42
-   |
-LL | static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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/threads-sendsync/issue-43733.rs b/tests/ui/threads-sendsync/issue-43733.rs
index cac745f1e12..671b45e777f 100644
--- a/tests/ui/threads-sendsync/issue-43733.rs
+++ b/tests/ui/threads-sendsync/issue-43733.rs
@@ -1,6 +1,4 @@
 // ignore-wasm32
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 #![feature(thread_local)]
 #![feature(cfg_target_thread_local, thread_local_internals)]
 
@@ -17,13 +15,11 @@ static __KEY: std::thread::local_impl::Key<Foo> = std::thread::local_impl::Key::
 
 fn __getit(_: Option<&mut Option<RefCell<String>>>) -> std::option::Option<&'static Foo> {
     __KEY.get(Default::default)
-    //[mir]~^ ERROR call to unsafe function is unsafe
-    //[thir]~^^ ERROR call to unsafe function `Key::<T>::get`
+    //~^ ERROR call to unsafe function `Key::<T>::get` is unsafe
 }
 
 static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
-//[mir]~^ ERROR call to unsafe function is unsafe
-//[thir]~^^ ERROR call to unsafe function `LocalKey::<T>::new`
+//~^ ERROR call to unsafe function `LocalKey::<T>::new` is unsafe
 
 fn main() {
     FOO.with(|foo| println!("{}", foo.borrow()));
diff --git a/tests/ui/threads-sendsync/issue-43733.thir.stderr b/tests/ui/threads-sendsync/issue-43733.stderr
index 94ec724044c..9b13646a228 100644
--- a/tests/ui/threads-sendsync/issue-43733.thir.stderr
+++ b/tests/ui/threads-sendsync/issue-43733.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `Key::<T>::get` is unsafe and requires unsafe function or block
-  --> $DIR/issue-43733.rs:19:5
+  --> $DIR/issue-43733.rs:17:5
    |
 LL |     __KEY.get(Default::default)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
@@ -7,7 +7,7 @@ LL |     __KEY.get(Default::default)
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function `LocalKey::<T>::new` is unsafe and requires unsafe function or block
-  --> $DIR/issue-43733.rs:24:42
+  --> $DIR/issue-43733.rs:21:42
    |
 LL | static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
diff --git a/tests/ui/trailing-comma.rs b/tests/ui/trailing-comma.rs
index 90adba99e54..31091398508 100644
--- a/tests/ui/trailing-comma.rs
+++ b/tests/ui/trailing-comma.rs
@@ -3,7 +3,7 @@
 
 fn f<T,>(_: T,) {}
 
-struct Foo<T,>(#[allow(unused_tuple_struct_fields)] T);
+struct Foo<T,>(#[allow(dead_code)] T);
 
 struct Bar;
 
@@ -14,7 +14,7 @@ impl Bar {
 }
 
 enum Baz {
-    Qux(#[allow(unused_tuple_struct_fields)] isize,),
+    Qux(#[allow(dead_code)] isize,),
 }
 
 #[allow(unused,)]
diff --git a/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.rs b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.rs
index e0edd522431..4cbc36f4650 100644
--- a/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.rs
+++ b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.rs
@@ -7,12 +7,14 @@ pub trait Trait<T> {
 }
 
 impl<T, S> Trait<T> for i32 {
+    //~^ ERROR `S` is not constrained
     type Assoc = String;
 }
 
 // Should not not trigger suggestion here...
 impl<T, S> Trait<T, S> for () {}
 //~^ ERROR trait takes 1 generic argument but 2 generic arguments were supplied
+//~| ERROR `S` is not constrained
 
 //... but should do so in all of the below cases except the last one
 fn func<T: Trait<u32, String>>(t: T) -> impl Trait<(), i32> {
@@ -37,6 +39,7 @@ impl<T: Trait<u32, String>> Struct<T> {}
 trait YetAnotherTrait {}
 impl<T: Trait<u32, Assoc=String>, U> YetAnotherTrait for Struct<T, U> {}
 //~^ ERROR struct takes 1 generic argument but 2 generic arguments were supplied
+//~| ERROR `U` is not constrained
 
 
 fn main() {
diff --git a/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr
index 711ccf1b668..3c2b726fcce 100644
--- a/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr
+++ b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr
@@ -1,5 +1,5 @@
 error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
-  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:14:12
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:15:12
    |
 LL | impl<T, S> Trait<T, S> for () {}
    |            ^^^^^ expected 1 generic argument
@@ -11,7 +11,7 @@ LL | pub trait Trait<T> {
    |           ^^^^^ -
 
 error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
-  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:18:12
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:20:12
    |
 LL | fn func<T: Trait<u32, String>>(t: T) -> impl Trait<(), i32> {
    |            ^^^^^ expected 1 generic argument
@@ -27,7 +27,7 @@ LL | fn func<T: Trait<u32, Assoc = String>>(t: T) -> impl Trait<(), i32> {
    |                       +++++++
 
 error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
-  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:18:46
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:20:46
    |
 LL | fn func<T: Trait<u32, String>>(t: T) -> impl Trait<(), i32> {
    |                                              ^^^^^ expected 1 generic argument
@@ -43,7 +43,7 @@ LL | fn func<T: Trait<u32, String>>(t: T) -> impl Trait<(), Assoc = i32> {
    |                                                        +++++++
 
 error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
-  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:24:18
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:26:18
    |
 LL | struct Struct<T: Trait<u32, String>> {
    |                  ^^^^^ expected 1 generic argument
@@ -59,7 +59,7 @@ LL | struct Struct<T: Trait<u32, Assoc = String>> {
    |                             +++++++
 
 error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
-  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:29:23
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:31:23
    |
 LL | trait AnotherTrait<T: Trait<T, i32>> {}
    |                       ^^^^^ expected 1 generic argument
@@ -75,7 +75,7 @@ LL | trait AnotherTrait<T: Trait<T, Assoc = i32>> {}
    |                                +++++++
 
 error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
-  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:32:9
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:34:9
    |
 LL | impl<T: Trait<u32, String>> Struct<T> {}
    |         ^^^^^ expected 1 generic argument
@@ -91,7 +91,7 @@ LL | impl<T: Trait<u32, Assoc = String>> Struct<T> {}
    |                    +++++++
 
 error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied
-  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:38:58
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:40:58
    |
 LL | impl<T: Trait<u32, Assoc=String>, U> YetAnotherTrait for Struct<T, U> {}
    |                                                          ^^^^^^    - help: remove this generic argument
@@ -99,11 +99,30 @@ LL | impl<T: Trait<u32, Assoc=String>, U> YetAnotherTrait for Struct<T, U> {}
    |                                                          expected 1 generic argument
    |
 note: struct defined here, with 1 generic parameter: `T`
-  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:24:8
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:26:8
    |
 LL | struct Struct<T: Trait<u32, String>> {
    |        ^^^^^^ -
 
-error: aborting due to 7 previous errors
+error[E0207]: the type parameter `S` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:9:9
+   |
+LL | impl<T, S> Trait<T> for i32 {
+   |         ^ unconstrained type parameter
+
+error[E0207]: the type parameter `S` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:15:9
+   |
+LL | impl<T, S> Trait<T, S> for () {}
+   |         ^ unconstrained type parameter
+
+error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:40:35
+   |
+LL | impl<T: Trait<u32, Assoc=String>, U> YetAnotherTrait for Struct<T, U> {}
+   |                                   ^ unconstrained type parameter
+
+error: aborting due to 10 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0107, E0207.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/traits/augmented-assignments-trait.rs b/tests/ui/traits/augmented-assignments-trait.rs
index 747a5393f12..75168c4f1e5 100644
--- a/tests/ui/traits/augmented-assignments-trait.rs
+++ b/tests/ui/traits/augmented-assignments-trait.rs
@@ -1,7 +1,7 @@
 // run-pass
 use std::ops::AddAssign;
 
-struct Int(#[allow(unused_tuple_struct_fields)] i32);
+struct Int(#[allow(dead_code)] i32);
 
 impl AddAssign for Int {
     fn add_assign(&mut self, _: Int) {
diff --git a/tests/ui/traits/bound/not-on-bare-trait-2021.rs b/tests/ui/traits/bound/not-on-bare-trait-2021.rs
new file mode 100644
index 00000000000..4c2e6f0852b
--- /dev/null
+++ b/tests/ui/traits/bound/not-on-bare-trait-2021.rs
@@ -0,0 +1,19 @@
+// edition:2021
+trait Foo {
+    fn dummy(&self) {}
+}
+
+// This should emit the less confusing error, not the more confusing one.
+
+fn foo(_x: Foo + Send) {
+    //~^ ERROR trait objects must include the `dyn` keyword
+    //~| ERROR size for values of type
+}
+fn bar(x: Foo) -> Foo {
+    //~^ ERROR trait objects must include the `dyn` keyword
+    //~| ERROR trait objects must include the `dyn` keyword
+    //~| ERROR size for values of type
+    x
+}
+
+fn main() {}
diff --git a/tests/ui/traits/bound/not-on-bare-trait-2021.stderr b/tests/ui/traits/bound/not-on-bare-trait-2021.stderr
new file mode 100644
index 00000000000..57d3bc8f109
--- /dev/null
+++ b/tests/ui/traits/bound/not-on-bare-trait-2021.stderr
@@ -0,0 +1,91 @@
+error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time
+  --> $DIR/not-on-bare-trait-2021.rs:8:8
+   |
+LL | fn foo(_x: Foo + Send) {
+   |        ^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `(dyn Foo + Send + 'static)`
+   = help: unsized fn params are gated as an unstable feature
+help: you can use `impl Trait` as the argument type
+   |
+LL | fn foo(_x: impl Foo + Send) {
+   |            ++++
+help: function arguments must have a statically known size, borrowed types always have a known size
+   |
+LL | fn foo(_x: &(dyn Foo + Send)) {
+   |            +++++           +
+
+error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
+  --> $DIR/not-on-bare-trait-2021.rs:12:8
+   |
+LL | fn bar(x: Foo) -> Foo {
+   |        ^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)`
+   = help: unsized fn params are gated as an unstable feature
+help: you can use `impl Trait` as the argument type
+   |
+LL | fn bar(x: impl Foo) -> Foo {
+   |           ++++
+help: function arguments must have a statically known size, borrowed types always have a known size
+   |
+LL | fn bar(x: &dyn Foo) -> Foo {
+   |           ++++
+
+error[E0782]: trait objects must include the `dyn` keyword
+  --> $DIR/not-on-bare-trait-2021.rs:8:12
+   |
+LL | fn foo(_x: Foo + Send) {
+   |            ^^^^^^^^^^
+   |
+help: use a new generic type parameter, constrained by `Foo + Send`
+   |
+LL | fn foo<T: Foo + Send>(_x: T) {
+   |       +++++++++++++++     ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL | fn foo(_x: impl Foo + Send) {
+   |            ++++
+help: alternatively, use a trait object to accept any type that implements `Foo + Send`, accessing its methods at runtime using dynamic dispatch
+   |
+LL | fn foo(_x: &(dyn Foo + Send)) {
+   |            +++++           +
+
+error[E0782]: trait objects must include the `dyn` keyword
+  --> $DIR/not-on-bare-trait-2021.rs:12:11
+   |
+LL | fn bar(x: Foo) -> Foo {
+   |           ^^^
+   |
+help: use a new generic type parameter, constrained by `Foo`
+   |
+LL | fn bar<T: Foo>(x: T) -> Foo {
+   |       ++++++++    ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL | fn bar(x: impl Foo) -> Foo {
+   |           ++++
+help: alternatively, use a trait object to accept any type that implements `Foo`, accessing its methods at runtime using dynamic dispatch
+   |
+LL | fn bar(x: &dyn Foo) -> Foo {
+   |           ++++
+
+error[E0782]: trait objects must include the `dyn` keyword
+  --> $DIR/not-on-bare-trait-2021.rs:12:19
+   |
+LL | fn bar(x: Foo) -> Foo {
+   |                   ^^^
+   |
+help: use `impl Foo` to return an opaque type, as long as you return a single underlying type
+   |
+LL | fn bar(x: Foo) -> impl Foo {
+   |                   ++++
+help: alternatively, you can return an owned trait object
+   |
+LL | fn bar(x: Foo) -> Box<dyn Foo> {
+   |                   +++++++    +
+
+error: aborting due to 5 previous errors
+
+Some errors have detailed explanations: E0277, E0782.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/bound/not-on-bare-trait.rs b/tests/ui/traits/bound/not-on-bare-trait.rs
index daf18c6702e..9e717f3c045 100644
--- a/tests/ui/traits/bound/not-on-bare-trait.rs
+++ b/tests/ui/traits/bound/not-on-bare-trait.rs
@@ -9,5 +9,8 @@ fn foo(_x: Foo + Send) {
     //~| WARN trait objects without an explicit `dyn` are deprecated
     //~| WARN this is accepted in the current edition
 }
+fn bar(_x: (dyn Foo + Send)) {
+    //~^ ERROR the size for values of type
+}
 
 fn main() {}
diff --git a/tests/ui/traits/bound/not-on-bare-trait.stderr b/tests/ui/traits/bound/not-on-bare-trait.stderr
index 1d97bf3d8f9..8d0e40be788 100644
--- a/tests/ui/traits/bound/not-on-bare-trait.stderr
+++ b/tests/ui/traits/bound/not-on-bare-trait.stderr
@@ -7,10 +7,18 @@ LL | fn foo(_x: Foo + Send) {
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
    = note: `#[warn(bare_trait_objects)]` on by default
-help: use `dyn`
+help: use a new generic type parameter, constrained by `Foo + Send`
    |
-LL | fn foo(_x: dyn Foo + Send) {
-   |            +++
+LL | fn foo<T: Foo + Send>(_x: T) {
+   |       +++++++++++++++     ~
+help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
+   |
+LL | fn foo(_x: impl Foo + Send) {
+   |            ++++
+help: alternatively, use a trait object to accept any type that implements `Foo + Send`, accessing its methods at runtime using dynamic dispatch
+   |
+LL | fn foo(_x: &(dyn Foo + Send)) {
+   |            +++++           +
 
 error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time
   --> $DIR/not-on-bare-trait.rs:7:8
@@ -26,9 +34,26 @@ LL | fn foo(_x: impl Foo + Send) {
    |            ++++
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
-LL | fn foo(_x: &Foo + Send) {
-   |            +
+LL | fn foo(_x: &(dyn Foo + Send)) {
+   |            +++++           +
+
+error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time
+  --> $DIR/not-on-bare-trait.rs:12:8
+   |
+LL | fn bar(_x: (dyn Foo + Send)) {
+   |        ^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `(dyn Foo + Send + 'static)`
+   = help: unsized fn params are gated as an unstable feature
+help: you can use `impl Trait` as the argument type
+   |
+LL | fn bar(_x: (impl Foo + Send)) {
+   |             ~~~~
+help: function arguments must have a statically known size, borrowed types always have a known size
+   |
+LL | fn bar(_x: (&(dyn Foo + Send))) {
+   |             ++              +
 
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 2 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/cycle-cache-err-60010.rs b/tests/ui/traits/cycle-cache-err-60010.rs
index 94e718317e7..94875a5a25a 100644
--- a/tests/ui/traits/cycle-cache-err-60010.rs
+++ b/tests/ui/traits/cycle-cache-err-60010.rs
@@ -29,9 +29,8 @@ struct SalsaStorage {
 }
 
 impl Database for RootDatabase {
-    // This would also be an error if we didn't abort compilation on the error
-    // above.
     type Storage = SalsaStorage;
+    //~^ ERROR overflow
 }
 impl HasQueryGroup for RootDatabase {}
 impl<DB> Query<DB> for ParseQuery
diff --git a/tests/ui/traits/cycle-cache-err-60010.stderr b/tests/ui/traits/cycle-cache-err-60010.stderr
index 4f9615104cb..4f5e3181832 100644
--- a/tests/ui/traits/cycle-cache-err-60010.stderr
+++ b/tests/ui/traits/cycle-cache-err-60010.stderr
@@ -21,7 +21,7 @@ note: required because it appears within the type `RootDatabase`
 LL | struct RootDatabase {
    |        ^^^^^^^^^^^^
 note: required for `RootDatabase` to implement `SourceDatabase`
-  --> $DIR/cycle-cache-err-60010.rs:44:9
+  --> $DIR/cycle-cache-err-60010.rs:43:9
    |
 LL | impl<T> SourceDatabase for T
    |         ^^^^^^^^^^^^^^     ^
@@ -29,7 +29,7 @@ LL | where
 LL |     T: RefUnwindSafe,
    |        ------------- unsatisfied trait bound introduced here
 note: required for `ParseQuery` to implement `Query<RootDatabase>`
-  --> $DIR/cycle-cache-err-60010.rs:37:10
+  --> $DIR/cycle-cache-err-60010.rs:36:10
    |
 LL | impl<DB> Query<DB> for ParseQuery
    |          ^^^^^^^^^     ^^^^^^^^^^
@@ -37,6 +37,59 @@ LL | where
 LL |     DB: SourceDatabase,
    |         -------------- unsatisfied trait bound introduced here
 
-error: aborting due to 1 previous error
+error[E0275]: overflow evaluating the requirement `SalsaStorage: RefUnwindSafe`
+  --> $DIR/cycle-cache-err-60010.rs:32:20
+   |
+LL |     type Storage = SalsaStorage;
+   |                    ^^^^^^^^^^^^
+   |
+note: required because it appears within the type `PhantomData<SalsaStorage>`
+  --> $SRC_DIR/core/src/marker.rs:LL:COL
+note: required because it appears within the type `Unique<SalsaStorage>`
+  --> $SRC_DIR/core/src/ptr/unique.rs:LL:COL
+note: required because it appears within the type `Box<SalsaStorage>`
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+note: required because it appears within the type `Runtime<RootDatabase>`
+  --> $DIR/cycle-cache-err-60010.rs:23:8
+   |
+LL | struct Runtime<DB: Database> {
+   |        ^^^^^^^
+note: required because it appears within the type `RootDatabase`
+  --> $DIR/cycle-cache-err-60010.rs:20:8
+   |
+LL | struct RootDatabase {
+   |        ^^^^^^^^^^^^
+note: required for `RootDatabase` to implement `SourceDatabase`
+  --> $DIR/cycle-cache-err-60010.rs:43:9
+   |
+LL | impl<T> SourceDatabase for T
+   |         ^^^^^^^^^^^^^^     ^
+LL | where
+LL |     T: RefUnwindSafe,
+   |        ------------- unsatisfied trait bound introduced here
+note: required for `ParseQuery` to implement `Query<RootDatabase>`
+  --> $DIR/cycle-cache-err-60010.rs:36:10
+   |
+LL | impl<DB> Query<DB> for ParseQuery
+   |          ^^^^^^^^^     ^^^^^^^^^^
+LL | where
+LL |     DB: SourceDatabase,
+   |         -------------- unsatisfied trait bound introduced here
+note: required because it appears within the type `SalsaStorage`
+  --> $DIR/cycle-cache-err-60010.rs:26:8
+   |
+LL | struct SalsaStorage {
+   |        ^^^^^^^^^^^^
+note: required by a bound in `Database::Storage`
+  --> $DIR/cycle-cache-err-60010.rs:7:5
+   |
+LL |     type Storage;
+   |     ^^^^^^^^^^^^^ required by this bound in `Database::Storage`
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL |     type Storage: ?Sized;
+   |                 ++++++++
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/issue-106072.rs b/tests/ui/traits/issue-106072.rs
index b174669545a..d38d3c3b286 100644
--- a/tests/ui/traits/issue-106072.rs
+++ b/tests/ui/traits/issue-106072.rs
@@ -1,4 +1,5 @@
 #[derive(Clone)] //~  trait objects must include the `dyn` keyword
+//~^ ERROR: the size for values of type `(dyn Foo + 'static)` cannot be known
 struct Foo;
 trait Foo {} //~ the name `Foo` is defined multiple times
 fn main() {}
diff --git a/tests/ui/traits/issue-106072.stderr b/tests/ui/traits/issue-106072.stderr
index 1037603ceb7..aadadc45f21 100644
--- a/tests/ui/traits/issue-106072.stderr
+++ b/tests/ui/traits/issue-106072.stderr
@@ -1,5 +1,5 @@
 error[E0428]: the name `Foo` is defined multiple times
-  --> $DIR/issue-106072.rs:3:1
+  --> $DIR/issue-106072.rs:4:1
    |
 LL | struct Foo;
    | ----------- previous definition of the type `Foo` here
@@ -8,6 +8,17 @@ LL | trait Foo {}
    |
    = note: `Foo` must be defined only once in the type namespace of this module
 
+error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
+  --> $DIR/issue-106072.rs:1:10
+   |
+LL | #[derive(Clone)]
+   |          ^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)`
+note: required by a bound in `Clone`
+  --> $SRC_DIR/core/src/clone.rs:LL:COL
+   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
+
 error[E0782]: trait objects must include the `dyn` keyword
   --> $DIR/issue-106072.rs:1:10
    |
@@ -16,7 +27,7 @@ LL | #[derive(Clone)]
    |
    = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0428, E0782.
-For more information about an error, try `rustc --explain E0428`.
+Some errors have detailed explanations: E0277, E0428, E0782.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/issue-28576.rs b/tests/ui/traits/issue-28576.rs
index 972c839b648..e19bd263581 100644
--- a/tests/ui/traits/issue-28576.rs
+++ b/tests/ui/traits/issue-28576.rs
@@ -3,6 +3,8 @@ pub trait Foo<RHS=Self> {
 }
 
 pub trait Bar: Foo<Assoc=()> {
+    //~^ ERROR: the size for values of type `Self` cannot be known
+    //~| ERROR: the size for values of type `Self` cannot be known
     fn new(&self, b: &
            dyn Bar //~ ERROR the trait `Bar` cannot be made into an object
               <Assoc=()>
diff --git a/tests/ui/traits/issue-28576.stderr b/tests/ui/traits/issue-28576.stderr
index 9fe50864642..96e8aaee23d 100644
--- a/tests/ui/traits/issue-28576.stderr
+++ b/tests/ui/traits/issue-28576.stderr
@@ -1,5 +1,5 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/issue-28576.rs:7:12
+  --> $DIR/issue-28576.rs:9:12
    |
 LL | /            dyn Bar
 LL | |               <Assoc=()>
@@ -14,7 +14,52 @@ LL | pub trait Bar: Foo<Assoc=()> {
    |           |    |   ...because it uses `Self` as a type parameter
    |           |    ...because it uses `Self` as a type parameter
    |           this trait cannot be made into an object...
+help: consider using an opaque type instead
+   |
+LL |            impl Bar
+   |            ~~~~
+
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+  --> $DIR/issue-28576.rs:5:16
+   |
+LL | pub trait Bar: Foo<Assoc=()> {
+   |                ^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `Foo`
+  --> $DIR/issue-28576.rs:1:15
+   |
+LL | pub trait Foo<RHS=Self> {
+   |               ^^^^^^^^ required by this bound in `Foo`
+help: consider further restricting `Self`
+   |
+LL | pub trait Bar: Foo<Assoc=()> + Sized {
+   |                              +++++++
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL | pub trait Foo<RHS=Self: ?Sized> {
+   |                       ++++++++
+
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+  --> $DIR/issue-28576.rs:5:16
+   |
+LL | pub trait Bar: Foo<Assoc=()> {
+   |                ^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `Foo`
+  --> $DIR/issue-28576.rs:1:15
+   |
+LL | pub trait Foo<RHS=Self> {
+   |               ^^^^^^^^ required by this bound in `Foo`
+help: consider further restricting `Self`
+   |
+LL |     ) where Self: Sized;
+   |       +++++++++++++++++
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL | pub trait Foo<RHS=Self: ?Sized> {
+   |                       ++++++++
 
-error: aborting due to 1 previous error
+error: aborting due to 3 previous errors
 
-For more information about this error, try `rustc --explain E0038`.
+Some errors have detailed explanations: E0038, E0277.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/issue-38404.rs b/tests/ui/traits/issue-38404.rs
index 05921b2c36e..9b60116f733 100644
--- a/tests/ui/traits/issue-38404.rs
+++ b/tests/ui/traits/issue-38404.rs
@@ -1,7 +1,8 @@
 trait A<T>: std::ops::Add<Self> + Sized {}
 trait B<T>: A<T> {}
-trait C<T>: A<dyn B<T, Output=usize>> {}
+trait C<T>: A<dyn B<T, Output = usize>> {}
 //~^ ERROR the trait `B` cannot be made into an object
 //~| ERROR the trait `B` cannot be made into an object
+//~| ERROR the trait `B` cannot be made into an object
 
 fn main() {}
diff --git a/tests/ui/traits/issue-38404.stderr b/tests/ui/traits/issue-38404.stderr
index a5c258eb36e..19d4035b54c 100644
--- a/tests/ui/traits/issue-38404.stderr
+++ b/tests/ui/traits/issue-38404.stderr
@@ -1,8 +1,8 @@
 error[E0038]: the trait `B` cannot be made into an object
   --> $DIR/issue-38404.rs:3:15
    |
-LL | trait C<T>: A<dyn B<T, Output=usize>> {}
-   |               ^^^^^^^^^^^^^^^^^^^^^^ `B` cannot be made into an object
+LL | trait C<T>: A<dyn B<T, Output = usize>> {}
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^ `B` cannot be made into an object
    |
 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
   --> $DIR/issue-38404.rs:1:13
@@ -15,8 +15,8 @@ LL | trait B<T>: A<T> {}
 error[E0038]: the trait `B` cannot be made into an object
   --> $DIR/issue-38404.rs:3:15
    |
-LL | trait C<T>: A<dyn B<T, Output=usize>> {}
-   |               ^^^^^^^^^^^^^^^^^^^^^^ `B` cannot be made into an object
+LL | trait C<T>: A<dyn B<T, Output = usize>> {}
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^ `B` cannot be made into an object
    |
 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
   --> $DIR/issue-38404.rs:1:13
@@ -27,6 +27,21 @@ LL | trait B<T>: A<T> {}
    |       - this trait cannot be made into an object...
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 2 previous errors
+error[E0038]: the trait `B` cannot be made into an object
+  --> $DIR/issue-38404.rs:3:15
+   |
+LL | trait C<T>: A<dyn B<T, Output = usize>> {}
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^ `B` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/issue-38404.rs:1:13
+   |
+LL | trait A<T>: std::ops::Add<Self> + Sized {}
+   |             ^^^^^^^^^^^^^^^^^^^ ...because it uses `Self` as a type parameter
+LL | trait B<T>: A<T> {}
+   |       - this trait cannot be made into an object...
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/issue-87558.rs b/tests/ui/traits/issue-87558.rs
index c5d86bd637b..76f0f7453dd 100644
--- a/tests/ui/traits/issue-87558.rs
+++ b/tests/ui/traits/issue-87558.rs
@@ -3,6 +3,8 @@ struct Error(ErrorKind);
 impl Fn(&isize) for Error {
     //~^ ERROR manual implementations of `Fn` are experimental
     //~| ERROR associated type bindings are not allowed here
+    //~| ERROR closure, found `Error`
+    //~| ERROR not all trait items implemented, missing: `call`
     fn from() {} //~ ERROR method `from` is not a member of trait `Fn`
 }
 
diff --git a/tests/ui/traits/issue-87558.stderr b/tests/ui/traits/issue-87558.stderr
index b647f9794bd..1ce273a9f25 100644
--- a/tests/ui/traits/issue-87558.stderr
+++ b/tests/ui/traits/issue-87558.stderr
@@ -1,5 +1,5 @@
 error[E0407]: method `from` is not a member of trait `Fn`
-  --> $DIR/issue-87558.rs:6:5
+  --> $DIR/issue-87558.rs:8:5
    |
 LL |     fn from() {}
    |     ^^^^^^^^^^^^ not a member of trait `Fn`
@@ -24,7 +24,25 @@ help: parenthesized trait syntax expands to `Fn<(&isize,), Output=()>`
 LL | impl Fn(&isize) for Error {
    |      ^^^^^^^^^^
 
-error: aborting due to 3 previous errors
+error[E0277]: expected a `FnMut(&isize)` closure, found `Error`
+  --> $DIR/issue-87558.rs:3:21
+   |
+LL | impl Fn(&isize) for Error {
+   |                     ^^^^^ expected an `FnMut(&isize)` closure, found `Error`
+   |
+   = help: the trait `FnMut<(&isize,)>` is not implemented for `Error`
+note: required by a bound in `Fn`
+  --> $SRC_DIR/core/src/ops/function.rs:LL:COL
+
+error[E0046]: not all trait items implemented, missing: `call`
+  --> $DIR/issue-87558.rs:3:1
+   |
+LL | impl Fn(&isize) for Error {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation
+   |
+   = help: implement the missing item: `fn call(&self, _: (&isize,)) -> <Self as FnOnce<(&isize,)>>::Output { todo!() }`
+
+error: aborting due to 5 previous errors
 
-Some errors have detailed explanations: E0183, E0229, E0407.
-For more information about an error, try `rustc --explain E0183`.
+Some errors have detailed explanations: E0046, E0183, E0229, E0277, E0407.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/traits/negative-bounds/associated-constraints.rs b/tests/ui/traits/negative-bounds/associated-constraints.rs
index bc1a0ef1708..4a7132ccde9 100644
--- a/tests/ui/traits/negative-bounds/associated-constraints.rs
+++ b/tests/ui/traits/negative-bounds/associated-constraints.rs
@@ -1,5 +1,4 @@
 #![feature(negative_bounds, associated_type_bounds)]
-//~^ WARN the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
 
 trait Trait {
     type Assoc;
@@ -17,4 +16,7 @@ fn test3<T: !Trait<Assoc: Send>>() {}
 fn test4<T>() where T: !Trait<Assoc: Send> {}
 //~^ ERROR associated type constraints not allowed on negative bounds
 
+fn test5<T>() where T: !Fn() -> i32 {}
+//~^ ERROR parenthetical notation may not be used for negative bounds
+
 fn main() {}
diff --git a/tests/ui/traits/negative-bounds/associated-constraints.stderr b/tests/ui/traits/negative-bounds/associated-constraints.stderr
index 335ac7e5ad9..c1a6d2ca6a2 100644
--- a/tests/ui/traits/negative-bounds/associated-constraints.stderr
+++ b/tests/ui/traits/negative-bounds/associated-constraints.stderr
@@ -1,34 +1,32 @@
 error: associated type constraints not allowed on negative bounds
-  --> $DIR/associated-constraints.rs:8:19
+  --> $DIR/associated-constraints.rs:7:19
    |
 LL | fn test<T: !Trait<Assoc = i32>>() {}
    |                   ^^^^^^^^^^^
 
 error: associated type constraints not allowed on negative bounds
-  --> $DIR/associated-constraints.rs:11:31
+  --> $DIR/associated-constraints.rs:10:31
    |
 LL | fn test2<T>() where T: !Trait<Assoc = i32> {}
    |                               ^^^^^^^^^^^
 
 error: associated type constraints not allowed on negative bounds
-  --> $DIR/associated-constraints.rs:14:20
+  --> $DIR/associated-constraints.rs:13:20
    |
 LL | fn test3<T: !Trait<Assoc: Send>>() {}
    |                    ^^^^^^^^^^^
 
 error: associated type constraints not allowed on negative bounds
-  --> $DIR/associated-constraints.rs:17:31
+  --> $DIR/associated-constraints.rs:16:31
    |
 LL | fn test4<T>() where T: !Trait<Assoc: Send> {}
    |                               ^^^^^^^^^^^
 
-warning: the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/associated-constraints.rs:1:12
+error: parenthetical notation may not be used for negative bounds
+  --> $DIR/associated-constraints.rs:19:25
    |
-LL | #![feature(negative_bounds, associated_type_bounds)]
-   |            ^^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(incomplete_features)]` on by default
+LL | fn test5<T>() where T: !Fn() -> i32 {}
+   |                         ^^^^^^^^^^^
 
-error: aborting due to 4 previous errors; 1 warning emitted
+error: aborting due to 5 previous errors
 
diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs
new file mode 100644
index 00000000000..e1e93f79920
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs
@@ -0,0 +1,23 @@
+// compile-flags: -Znext-solver
+
+#![feature(negative_bounds, negative_impls)]
+
+trait Trait {}
+impl !Trait for () {}
+
+fn produce() -> impl !Trait {}
+fn consume(_: impl Trait) {}
+
+fn main() {
+    consume(produce()); //~ ERROR the trait bound `impl !Trait: Trait` is not satisfied
+}
+
+fn weird0() -> impl Sized + !Sized {}
+//~^ ERROR mismatched types
+//~| ERROR type mismatch resolving `() == impl !Sized + Sized`
+fn weird1() -> impl !Sized + Sized {}
+//~^ ERROR mismatched types
+//~| ERROR type mismatch resolving `() == impl !Sized + Sized`
+fn weird2() -> impl !Sized {}
+//~^ ERROR mismatched types
+//~| ERROR type mismatch resolving `() == impl !Sized`
diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr
new file mode 100644
index 00000000000..62792761870
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr
@@ -0,0 +1,69 @@
+error[E0308]: mismatched types
+  --> $DIR/opaque-type-unsatisfied-bound.rs:15:36
+   |
+LL | fn weird0() -> impl Sized + !Sized {}
+   |                ------------------- ^^ types differ
+   |                |
+   |                the expected opaque type
+   |
+   = note: expected opaque type `impl !Sized + Sized`
+                found unit type `()`
+
+error[E0271]: type mismatch resolving `() == impl !Sized + Sized`
+  --> $DIR/opaque-type-unsatisfied-bound.rs:15:16
+   |
+LL | fn weird0() -> impl Sized + !Sized {}
+   |                ^^^^^^^^^^^^^^^^^^^ types differ
+
+error[E0308]: mismatched types
+  --> $DIR/opaque-type-unsatisfied-bound.rs:18:36
+   |
+LL | fn weird1() -> impl !Sized + Sized {}
+   |                ------------------- ^^ types differ
+   |                |
+   |                the expected opaque type
+   |
+   = note: expected opaque type `impl !Sized + Sized`
+                found unit type `()`
+
+error[E0271]: type mismatch resolving `() == impl !Sized + Sized`
+  --> $DIR/opaque-type-unsatisfied-bound.rs:18:16
+   |
+LL | fn weird1() -> impl !Sized + Sized {}
+   |                ^^^^^^^^^^^^^^^^^^^ types differ
+
+error[E0308]: mismatched types
+  --> $DIR/opaque-type-unsatisfied-bound.rs:21:28
+   |
+LL | fn weird2() -> impl !Sized {}
+   |                ----------- ^^ types differ
+   |                |
+   |                the expected opaque type
+   |
+   = note: expected opaque type `impl !Sized`
+                found unit type `()`
+
+error[E0271]: type mismatch resolving `() == impl !Sized`
+  --> $DIR/opaque-type-unsatisfied-bound.rs:21:16
+   |
+LL | fn weird2() -> impl !Sized {}
+   |                ^^^^^^^^^^^ types differ
+
+error[E0277]: the trait bound `impl !Trait: Trait` is not satisfied
+  --> $DIR/opaque-type-unsatisfied-bound.rs:12:13
+   |
+LL |     consume(produce());
+   |     ------- ^^^^^^^^^ the trait `Trait` is not implemented for `impl !Trait`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `consume`
+  --> $DIR/opaque-type-unsatisfied-bound.rs:9:20
+   |
+LL | fn consume(_: impl Trait) {}
+   |                    ^^^^^ required by this bound in `consume`
+
+error: aborting due to 7 previous errors
+
+Some errors have detailed explanations: E0271, E0277, E0308.
+For more information about an error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs
new file mode 100644
index 00000000000..72bca1a8910
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.rs
@@ -0,0 +1,9 @@
+// compile-flags: -Znext-solver
+
+#![feature(negative_bounds, unboxed_closures)]
+
+fn produce() -> impl !Fn<(u32,)> {}
+//~^ ERROR mismatched types
+//~| ERROR type mismatch resolving `() == impl !Fn<(u32,)>`
+
+fn main() {}
diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr
new file mode 100644
index 00000000000..a4fb4b2b5c4
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-fn-bound.stderr
@@ -0,0 +1,21 @@
+error[E0308]: mismatched types
+  --> $DIR/opaque-type-unsatisfied-fn-bound.rs:5:34
+   |
+LL | fn produce() -> impl !Fn<(u32,)> {}
+   |                 ---------------- ^^ types differ
+   |                 |
+   |                 the expected opaque type
+   |
+   = note: expected opaque type `impl !Fn<(u32,)>`
+                found unit type `()`
+
+error[E0271]: type mismatch resolving `() == impl !Fn<(u32,)>`
+  --> $DIR/opaque-type-unsatisfied-fn-bound.rs:5:17
+   |
+LL | fn produce() -> impl !Fn<(u32,)> {}
+   |                 ^^^^^^^^^^^^^^^^ types differ
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0271, E0308.
+For more information about an error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/negative-bounds/simple.rs b/tests/ui/traits/negative-bounds/simple.rs
index f6d1d5169c4..a2febf353f6 100644
--- a/tests/ui/traits/negative-bounds/simple.rs
+++ b/tests/ui/traits/negative-bounds/simple.rs
@@ -1,5 +1,4 @@
 #![feature(negative_bounds, negative_impls)]
-//~^ WARN the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
 
 fn not_copy<T: !Copy>() {}
 
diff --git a/tests/ui/traits/negative-bounds/simple.stderr b/tests/ui/traits/negative-bounds/simple.stderr
index a3cab41a2ce..6d750739e19 100644
--- a/tests/ui/traits/negative-bounds/simple.stderr
+++ b/tests/ui/traits/negative-bounds/simple.stderr
@@ -1,44 +1,36 @@
-warning: the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/simple.rs:1:12
-   |
-LL | #![feature(negative_bounds, negative_impls)]
-   |            ^^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(incomplete_features)]` on by default
-
 error[E0277]: the trait bound `T: !Copy` is not satisfied
-  --> $DIR/simple.rs:11:16
+  --> $DIR/simple.rs:10:16
    |
 LL |     not_copy::<T>();
    |                ^ the trait `!Copy` is not implemented for `T`
    |
 note: required by a bound in `not_copy`
-  --> $DIR/simple.rs:4:16
+  --> $DIR/simple.rs:3:16
    |
 LL | fn not_copy<T: !Copy>() {}
    |                ^^^^^ required by this bound in `not_copy`
 
 error[E0277]: the trait bound `T: !Copy` is not satisfied
-  --> $DIR/simple.rs:16:16
+  --> $DIR/simple.rs:15:16
    |
 LL |     not_copy::<T>();
    |                ^ the trait `!Copy` is not implemented for `T`
    |
 note: required by a bound in `not_copy`
-  --> $DIR/simple.rs:4:16
+  --> $DIR/simple.rs:3:16
    |
 LL | fn not_copy<T: !Copy>() {}
    |                ^^^^^ required by this bound in `not_copy`
 
 error[E0277]: the trait bound `Copyable: !Copy` is not satisfied
-  --> $DIR/simple.rs:31:16
+  --> $DIR/simple.rs:30:16
    |
 LL |     not_copy::<Copyable>();
    |                ^^^^^^^^ the trait `!Copy` is not implemented for `Copyable`
    |
    = help: the trait `Copy` is implemented for `Copyable`
 note: required by a bound in `not_copy`
-  --> $DIR/simple.rs:4:16
+  --> $DIR/simple.rs:3:16
    |
 LL | fn not_copy<T: !Copy>() {}
    |                ^^^^^ required by this bound in `not_copy`
@@ -49,13 +41,13 @@ LL | struct Copyable;
    |
 
 error[E0277]: the trait bound `NotNecessarilyCopyable: !Copy` is not satisfied
-  --> $DIR/simple.rs:38:16
+  --> $DIR/simple.rs:37:16
    |
 LL |     not_copy::<NotNecessarilyCopyable>();
    |                ^^^^^^^^^^^^^^^^^^^^^^ the trait `!Copy` is not implemented for `NotNecessarilyCopyable`
    |
 note: required by a bound in `not_copy`
-  --> $DIR/simple.rs:4:16
+  --> $DIR/simple.rs:3:16
    |
 LL | fn not_copy<T: !Copy>() {}
    |                ^^^^^ required by this bound in `not_copy`
@@ -65,6 +57,6 @@ LL + #[derive(Copy)]
 LL | struct NotNecessarilyCopyable;
    |
 
-error: aborting due to 4 previous errors; 1 warning emitted
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/negative-bounds/supertrait.rs b/tests/ui/traits/negative-bounds/supertrait.rs
index df0884b8b9f..a66bc4a60a0 100644
--- a/tests/ui/traits/negative-bounds/supertrait.rs
+++ b/tests/ui/traits/negative-bounds/supertrait.rs
@@ -1,7 +1,6 @@
 // check-pass
 
 #![feature(negative_bounds)]
-//~^ WARN the feature `negative_bounds` is incomplete
 
 trait A: !B {}
 trait B: !A {}
diff --git a/tests/ui/traits/negative-bounds/supertrait.stderr b/tests/ui/traits/negative-bounds/supertrait.stderr
deleted file mode 100644
index f44753b624e..00000000000
--- a/tests/ui/traits/negative-bounds/supertrait.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-warning: the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/supertrait.rs:3:12
-   |
-LL | #![feature(negative_bounds)]
-   |            ^^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs b/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs
index 0bc611c26ca..05345d3432b 100644
--- a/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs
+++ b/tests/ui/traits/negative-impls/negated-auto-traits-rpass.rs
@@ -5,7 +5,7 @@
 pub struct WaitToken;
 impl !Send for WaitToken {}
 
-pub struct Test<T>(#[allow(unused_tuple_struct_fields)] T);
+pub struct Test<T>(#[allow(dead_code)] T);
 unsafe impl<T: 'static> Send for Test<T> {}
 
 pub fn spawn<F>(_: F) -> () where F: FnOnce(), F: Send + 'static {}
diff --git a/tests/ui/traits/next-solver/specialization-transmute.rs b/tests/ui/traits/next-solver/specialization-transmute.rs
index 58b62f52dfd..ff25656a7ff 100644
--- a/tests/ui/traits/next-solver/specialization-transmute.rs
+++ b/tests/ui/traits/next-solver/specialization-transmute.rs
@@ -4,15 +4,15 @@
 //~^ WARN the feature `specialization` is incomplete
 
 trait Default {
-   type Id;
+    type Id;
 
-   fn intu(&self) -> &Self::Id;
+    fn intu(&self) -> &Self::Id;
 }
 
 impl<T> Default for T {
     default type Id = T; //~ ERROR type annotations needed
     // This will be fixed by #111994
-    fn intu(&self) -> &Self::Id { //~ ERROR type annotations needed
+    fn intu(&self) -> &Self::Id {
         self
     }
 }
diff --git a/tests/ui/traits/next-solver/specialization-transmute.stderr b/tests/ui/traits/next-solver/specialization-transmute.stderr
index eaf32a475ac..a5459165587 100644
--- a/tests/ui/traits/next-solver/specialization-transmute.stderr
+++ b/tests/ui/traits/next-solver/specialization-transmute.stderr
@@ -8,19 +8,12 @@ LL | #![feature(specialization)]
    = help: consider using `min_specialization` instead, which is more stable and complete
    = note: `#[warn(incomplete_features)]` on by default
 
-error[E0284]: type annotations needed: cannot satisfy `<T as Default>::Id normalizes-to _`
-  --> $DIR/specialization-transmute.rs:15:23
-   |
-LL |     fn intu(&self) -> &Self::Id {
-   |                       ^^^^^^^^^ cannot satisfy `<T as Default>::Id normalizes-to _`
-
 error[E0282]: type annotations needed
   --> $DIR/specialization-transmute.rs:13:23
    |
 LL |     default type Id = T;
    |                       ^ cannot infer type for associated type `<T as Default>::Id`
 
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
 
-Some errors have detailed explanations: E0282, E0284.
-For more information about an error, try `rustc --explain E0282`.
+For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs b/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs
index 64f09f823fc..94733f88c2d 100644
--- a/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs
+++ b/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs
@@ -6,6 +6,6 @@ fn foo() -> usize
 where
     for<T> [i32; { let _: T = todo!(); 0 }]:,
     //~^ ERROR cannot capture late-bound type parameter in constant
-{}
+{ 42 }
 
 fn main() {}
diff --git a/tests/ui/traits/object/exclusion.rs b/tests/ui/traits/object/exclusion.rs
index 766dceeaffe..3abd3bbfccf 100644
--- a/tests/ui/traits/object/exclusion.rs
+++ b/tests/ui/traits/object/exclusion.rs
@@ -8,7 +8,7 @@ trait Future: 'static {
     }
 }
 
-struct Map<A>(#[allow(unused_tuple_struct_fields)] A);
+struct Map<A>(#[allow(dead_code)] A);
 impl<A: Future> Future for Map<A> {}
 
 pub struct Promise;
diff --git a/tests/ui/traits/object/generics.rs b/tests/ui/traits/object/generics.rs
index 5a4a6aecc6b..e2e70d43ab8 100644
--- a/tests/ui/traits/object/generics.rs
+++ b/tests/ui/traits/object/generics.rs
@@ -25,7 +25,7 @@ impl<A1, A2, A3> Impl<A1, A2, A3> {
 
 // test for #8601
 
-enum Type<T> { Constant(#[allow(unused_tuple_struct_fields)] T) }
+enum Type<T> { Constant(#[allow(dead_code)] T) }
 
 trait Trait<K,V> {
     fn method(&self, _: Type<(K,V)>) -> isize;
diff --git a/tests/ui/traits/object/object-unsafe-missing-assoc-type.rs b/tests/ui/traits/object/object-unsafe-missing-assoc-type.rs
index 21f7fd92e80..c83be544c0a 100644
--- a/tests/ui/traits/object/object-unsafe-missing-assoc-type.rs
+++ b/tests/ui/traits/object/object-unsafe-missing-assoc-type.rs
@@ -3,5 +3,8 @@ trait Foo {
 }
 
 fn bar(x: &dyn Foo) {} //~ ERROR the trait `Foo` cannot be made into an object
+//~^ ERROR the trait `Foo` cannot be made into an object
+//~| ERROR the trait `Foo` cannot be made into an object
+//~| ERROR the trait `Foo` cannot be made into an object
 
 fn main() {}
diff --git a/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr b/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr
index 196e74d3960..4c636c5e922 100644
--- a/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr
+++ b/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr
@@ -13,6 +13,53 @@ LL |     type Bar<T>;
    |          ^^^ ...because it contains the generic associated type `Bar`
    = help: consider moving `Bar` to another trait
 
-error: aborting due to 1 previous error
+error[E0038]: the trait `Foo` cannot be made into an object
+  --> $DIR/object-unsafe-missing-assoc-type.rs:5:16
+   |
+LL | fn bar(x: &dyn Foo) {}
+   |                ^^^ `Foo` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/object-unsafe-missing-assoc-type.rs:2:10
+   |
+LL | trait Foo {
+   |       --- this trait cannot be made into an object...
+LL |     type Bar<T>;
+   |          ^^^ ...because it contains the generic associated type `Bar`
+   = help: consider moving `Bar` to another trait
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0038]: the trait `Foo` cannot be made into an object
+  --> $DIR/object-unsafe-missing-assoc-type.rs:5:16
+   |
+LL | fn bar(x: &dyn Foo) {}
+   |                ^^^ `Foo` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/object-unsafe-missing-assoc-type.rs:2:10
+   |
+LL | trait Foo {
+   |       --- this trait cannot be made into an object...
+LL |     type Bar<T>;
+   |          ^^^ ...because it contains the generic associated type `Bar`
+   = help: consider moving `Bar` to another trait
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0038]: the trait `Foo` cannot be made into an object
+  --> $DIR/object-unsafe-missing-assoc-type.rs:5:12
+   |
+LL | fn bar(x: &dyn Foo) {}
+   |            ^^^^^^^ `Foo` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/object-unsafe-missing-assoc-type.rs:2:10
+   |
+LL | trait Foo {
+   |       --- this trait cannot be made into an object...
+LL |     type Bar<T>;
+   |          ^^^ ...because it contains the generic associated type `Bar`
+   = help: consider moving `Bar` to another trait
+
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/pointee-deduction.rs b/tests/ui/traits/pointee-deduction.rs
index c333b0129c8..82e3aa1ae89 100644
--- a/tests/ui/traits/pointee-deduction.rs
+++ b/tests/ui/traits/pointee-deduction.rs
@@ -13,8 +13,8 @@ impl Foo for () {
     type Bar = ();
 }
 
-struct Wrapper1<T: Foo>(#[allow(unused_tuple_struct_fields)] <T as Foo>::Bar);
-struct Wrapper2<T: Foo>(#[allow(unused_tuple_struct_fields)] <Wrapper1<T> as Pointee>::Metadata);
+struct Wrapper1<T: Foo>(#[allow(dead_code)] <T as Foo>::Bar);
+struct Wrapper2<T: Foo>(#[allow(dead_code)] <Wrapper1<T> as Pointee>::Metadata);
 
 fn main() {
     let _: Wrapper2<()> = Wrapper2(());
diff --git a/tests/ui/traits/principal-less-objects.rs b/tests/ui/traits/principal-less-objects.rs
index 62bad0d7d77..5fe01efa4f8 100644
--- a/tests/ui/traits/principal-less-objects.rs
+++ b/tests/ui/traits/principal-less-objects.rs
@@ -7,7 +7,7 @@ use std::mem;
 // Array is to make sure the size is not exactly pointer-size, so
 // we can be sure we are measuring the right size in the
 // `size_of_val` test.
-struct SetOnDrop<'a>(&'a AtomicUsize, #[allow(unused_tuple_struct_fields)] [u8; 64]);
+struct SetOnDrop<'a>(&'a AtomicUsize, #[allow(dead_code)] [u8; 64]);
 impl<'a> Drop for SetOnDrop<'a> {
     fn drop(&mut self) {
         self.0.store(self.0.load(Ordering::Relaxed) + 1, Ordering::Relaxed);
diff --git a/tests/ui/traits/safety-fn-body.mir.stderr b/tests/ui/traits/safety-fn-body.mir.stderr
deleted file mode 100644
index 9a04f3e7d62..00000000000
--- a/tests/ui/traits/safety-fn-body.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/safety-fn-body.rs:14:9
-   |
-LL |         *self += 1;
-   |         ^^^^^^^^^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/traits/safety-fn-body.rs b/tests/ui/traits/safety-fn-body.rs
index 2cc4fe1b344..df527747305 100644
--- a/tests/ui/traits/safety-fn-body.rs
+++ b/tests/ui/traits/safety-fn-body.rs
@@ -1,9 +1,6 @@
 // Check that an unsafe impl does not imply that unsafe actions are
 // legal in the methods.
 
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 unsafe trait UnsafeTrait : Sized {
     fn foo(self) { }
 }
diff --git a/tests/ui/traits/safety-fn-body.thir.stderr b/tests/ui/traits/safety-fn-body.stderr
index 5d4626c161e..7a8e6c81a22 100644
--- a/tests/ui/traits/safety-fn-body.thir.stderr
+++ b/tests/ui/traits/safety-fn-body.stderr
@@ -1,5 +1,5 @@
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/safety-fn-body.rs:14:9
+  --> $DIR/safety-fn-body.rs:11:9
    |
 LL |         *self += 1;
    |         ^^^^^ dereference of raw pointer
diff --git a/tests/ui/transmutability/issue-101739-2.rs b/tests/ui/transmutability/issue-101739-2.rs
index e5a56ccc9e0..4cde9152032 100644
--- a/tests/ui/transmutability/issue-101739-2.rs
+++ b/tests/ui/transmutability/issue-101739-2.rs
@@ -16,6 +16,7 @@ mod assert {
     >()
     where
         Dst: BikeshedIntrinsicFrom< //~ ERROR trait takes at most 3 generic arguments but 6 generic arguments were supplied
+        //~^ ERROR: the constant `ASSUME_ALIGNMENT` is not of type `Assume`
             Src,
             Context,
             ASSUME_ALIGNMENT,
diff --git a/tests/ui/transmutability/issue-101739-2.stderr b/tests/ui/transmutability/issue-101739-2.stderr
index d5ed205d14b..aed47f33f0d 100644
--- a/tests/ui/transmutability/issue-101739-2.stderr
+++ b/tests/ui/transmutability/issue-101739-2.stderr
@@ -9,6 +9,22 @@ LL | |             ASSUME_VALIDITY,
 LL | |             ASSUME_VISIBILITY,
    | |_____________________________- help: remove these generic arguments
 
-error: aborting due to 1 previous error
+error: the constant `ASSUME_ALIGNMENT` is not of type `Assume`
+  --> $DIR/issue-101739-2.rs:18:14
+   |
+LL |           Dst: BikeshedIntrinsicFrom<
+   |  ______________^
+LL | |
+LL | |             Src,
+LL | |             Context,
+...  |
+LL | |             ASSUME_VISIBILITY,
+LL | |         >,
+   | |_________^ expected `Assume`, found `bool`
+   |
+note: required by a bound in `BikeshedIntrinsicFrom`
+  --> $SRC_DIR/core/src/mem/transmutability.rs:LL:COL
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.rs b/tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.rs
new file mode 100644
index 00000000000..0be5b41c80b
--- /dev/null
+++ b/tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.rs
@@ -0,0 +1,26 @@
+//~ ERROR: cycle detected
+//! Safe transmute did not handle cycle errors that could occur during
+//! layout computation. This test checks that we do not ICE in such
+//! situations (see #117491).
+#![crate_type = "lib"]
+#![feature(transmutability)]
+#![allow(dead_code, incomplete_features, non_camel_case_types)]
+
+mod assert {
+    use std::mem::{Assume, BikeshedIntrinsicFrom};
+    pub struct Context;
+
+    pub fn is_maybe_transmutable<Src, Dst>()
+    where
+        Dst: BikeshedIntrinsicFrom<Src, Context>,
+    {
+    }
+}
+
+fn should_pad_explicitly_packed_field() {
+    #[repr(C)]
+    struct ExplicitlyPadded(ExplicitlyPadded);
+    //~^ ERROR: recursive type
+
+    assert::is_maybe_transmutable::<ExplicitlyPadded, ()>();
+}
diff --git a/tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.stderr b/tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.stderr
new file mode 100644
index 00000000000..0dedd5aaf73
--- /dev/null
+++ b/tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.stderr
@@ -0,0 +1,21 @@
+error[E0072]: recursive type `ExplicitlyPadded` has infinite size
+  --> $DIR/transmute_infinitely_recursive_type.rs:22:5
+   |
+LL |     struct ExplicitlyPadded(ExplicitlyPadded);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ ---------------- recursive without indirection
+   |
+help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
+   |
+LL |     struct ExplicitlyPadded(Box<ExplicitlyPadded>);
+   |                             ++++                +
+
+error[E0391]: cycle detected when computing layout of `should_pad_explicitly_packed_field::ExplicitlyPadded`
+   |
+   = note: ...which immediately requires computing layout of `should_pad_explicitly_packed_field::ExplicitlyPadded` again
+   = note: cycle used when evaluating trait selection obligation `(): core::mem::transmutability::BikeshedIntrinsicFrom<should_pad_explicitly_packed_field::ExplicitlyPadded, assert::Context, core::mem::transmutability::Assume { alignment: false, lifetimes: false, safety: false, validity: false }>`
+   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0072, E0391.
+For more information about an error, try `rustc --explain E0072`.
diff --git a/tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs b/tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs
index 0aa644db052..d869794ec0a 100644
--- a/tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs
+++ b/tests/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs
@@ -9,7 +9,7 @@
 
 #![allow(irrefutable_let_patterns)]
 
-enum Enum<T> { TSVariant(#[allow(unused_tuple_struct_fields)] T), SVariant { _v: T }, UVariant }
+enum Enum<T> { TSVariant(#[allow(dead_code)] T), SVariant { _v: T }, UVariant }
 type Alias<T> = Enum<T>;
 type AliasFixed = Enum<()>;
 
diff --git a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr
index 404e376e364..94113b336c3 100644
--- a/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr
+++ b/tests/ui/type-alias-enum-variants/self-in-enum-definition.stderr
@@ -44,11 +44,6 @@ note: ...which requires preparing `Alpha::V3::{constant#0}` for borrow checking.
    |
 LL |     V3 = Self::V1 {} as u8 + 2,
    |          ^^^^^^^^^^^^^^^^^^^^^
-note: ...which requires unsafety-checking `Alpha::V3::{constant#0}`...
-  --> $DIR/self-in-enum-definition.rs:5:10
-   |
-LL |     V3 = Self::V1 {} as u8 + 2,
-   |          ^^^^^^^^^^^^^^^^^^^^^
 note: ...which requires building MIR for `Alpha::V3::{constant#0}`...
   --> $DIR/self-in-enum-definition.rs:5:10
    |
diff --git a/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr b/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr
index 88529b370f1..be9b07823ae 100644
--- a/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr
@@ -1,8 +1,13 @@
 error[E0277]: the trait bound `T: Trait` is not satisfied
-  --> $DIR/generic_underconstrained.rs:9:31
+  --> $DIR/generic_underconstrained.rs:9:51
    |
-LL | fn underconstrain<T>(_: T) -> Underconstrained<T> {
-   |                               ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T`
+LL |   fn underconstrain<T>(_: T) -> Underconstrained<T> {
+   |  ___________________________________________________^
+LL | |
+LL | |
+LL | |     unimplemented!()
+LL | | }
+   | |_^ the trait `Trait` is not implemented for `T`
    |
 note: required by a bound on the type alias `Underconstrained`
   --> $DIR/generic_underconstrained.rs:6:26
@@ -15,15 +20,10 @@ LL | fn underconstrain<T: Trait>(_: T) -> Underconstrained<T> {
    |                    +++++++
 
 error[E0277]: the trait bound `T: Trait` is not satisfied
-  --> $DIR/generic_underconstrained.rs:9:51
+  --> $DIR/generic_underconstrained.rs:9:31
    |
-LL |   fn underconstrain<T>(_: T) -> Underconstrained<T> {
-   |  ___________________________________________________^
-LL | |
-LL | |
-LL | |     unimplemented!()
-LL | | }
-   | |_^ the trait `Trait` is not implemented for `T`
+LL | fn underconstrain<T>(_: T) -> Underconstrained<T> {
+   |                               ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T`
    |
 note: required by a bound on the type alias `Underconstrained`
   --> $DIR/generic_underconstrained.rs:6:26
diff --git a/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr b/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr
index b3b9cbca968..15d96191ba9 100644
--- a/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr
@@ -1,8 +1,13 @@
 error[E0277]: `U` doesn't implement `Debug`
-  --> $DIR/generic_underconstrained2.rs:8:33
+  --> $DIR/generic_underconstrained2.rs:8:53
    |
-LL | fn underconstrained<U>(_: U) -> Underconstrained<U> {
-   |                                 ^^^^^^^^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+LL |   fn underconstrained<U>(_: U) -> Underconstrained<U> {
+   |  _____________________________________________________^
+LL | |
+LL | |
+LL | |     5u32
+LL | | }
+   | |_^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
    |
 note: required by a bound on the type alias `Underconstrained`
   --> $DIR/generic_underconstrained2.rs:5:26
@@ -15,10 +20,15 @@ LL | fn underconstrained<U: std::fmt::Debug>(_: U) -> Underconstrained<U> {
    |                      +++++++++++++++++
 
 error[E0277]: `V` doesn't implement `Debug`
-  --> $DIR/generic_underconstrained2.rs:17:43
+  --> $DIR/generic_underconstrained2.rs:17:64
    |
-LL | fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
-   |                                           ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+LL |   fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
+   |  ________________________________________________________________^
+LL | |
+LL | |
+LL | |     5u32
+LL | | }
+   | |_^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
    |
 note: required by a bound on the type alias `Underconstrained2`
   --> $DIR/generic_underconstrained2.rs:14:27
@@ -31,15 +41,10 @@ LL | fn underconstrained2<U, V: std::fmt::Debug>(_: U, _: V) -> Underconstrained
    |                          +++++++++++++++++
 
 error[E0277]: `U` doesn't implement `Debug`
-  --> $DIR/generic_underconstrained2.rs:8:53
+  --> $DIR/generic_underconstrained2.rs:8:33
    |
-LL |   fn underconstrained<U>(_: U) -> Underconstrained<U> {
-   |  _____________________________________________________^
-LL | |
-LL | |
-LL | |     5u32
-LL | | }
-   | |_^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+LL | fn underconstrained<U>(_: U) -> Underconstrained<U> {
+   |                                 ^^^^^^^^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
    |
 note: required by a bound on the type alias `Underconstrained`
   --> $DIR/generic_underconstrained2.rs:5:26
@@ -52,15 +57,10 @@ LL | fn underconstrained<U: std::fmt::Debug>(_: U) -> Underconstrained<U> {
    |                      +++++++++++++++++
 
 error[E0277]: `V` doesn't implement `Debug`
-  --> $DIR/generic_underconstrained2.rs:17:64
+  --> $DIR/generic_underconstrained2.rs:17:43
    |
-LL |   fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
-   |  ________________________________________________________________^
-LL | |
-LL | |
-LL | |     5u32
-LL | | }
-   | |_^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+LL | fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
+   |                                           ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
    |
 note: required by a bound on the type alias `Underconstrained2`
   --> $DIR/generic_underconstrained2.rs:14:27
diff --git a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs
index 6a2ee761e19..e7b23d5f8a1 100644
--- a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs
+++ b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs
@@ -20,7 +20,7 @@ impl Recur for () {
 
     fn recur(self) -> Self::Recur {
         async move { recur(self).await; }
-        //~^ ERROR cycle detected when computing layout of
+        //~^ ERROR recursion in an async block requires boxing
     }
 }
 
diff --git a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr
index 11d9cd0af08..b62186103c7 100644
--- a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr
+++ b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr
@@ -1,27 +1,20 @@
-error[E0391]: cycle detected when computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:22:9: 22:42}`
-  --> $DIR/indirect-recursion-issue-112047.rs:22:22
+error[E0733]: recursion in an async block requires boxing
+  --> $DIR/indirect-recursion-issue-112047.rs:22:9
    |
 LL |         async move { recur(self).await; }
-   |                      ^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^-----------------^^^
+   |                      |
+   |                      recursive call here
    |
-   = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async fn body@$DIR/indirect-recursion-issue-112047.rs:14:31: 16:2}>`...
-   = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async fn body@$DIR/indirect-recursion-issue-112047.rs:14:31: 16:2}>`...
-note: ...which requires computing layout of `{async fn body@$DIR/indirect-recursion-issue-112047.rs:14:31: 16:2}`...
-  --> $DIR/indirect-recursion-issue-112047.rs:15:5
+note: which leads to this async fn
+  --> $DIR/indirect-recursion-issue-112047.rs:14:1
    |
+LL | async fn recur(t: impl Recur) {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 LL |     t.recur().await;
-   |     ^^^^^^^^^^^^^^^
-   = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<<() as Recur>::Recur>`...
-   = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async block@$DIR/indirect-recursion-issue-112047.rs:22:9: 22:42}>`...
-   = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async block@$DIR/indirect-recursion-issue-112047.rs:22:9: 22:42}>`...
-   = note: ...which again requires computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:22:9: 22:42}`, completing the cycle
-note: cycle used when elaborating drops for `<impl at $DIR/indirect-recursion-issue-112047.rs:18:1: 18:18>::recur`
-  --> $DIR/indirect-recursion-issue-112047.rs:21:5
-   |
-LL |     fn recur(self) -> Self::Recur {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
+   |     --------------- ...leading to this recursive call
+   = note: a recursive `async fn` call must introduce indirection such as `Box::pin` to avoid an infinitely sized future
 
 error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0391`.
+For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr
index e4054e14abe..e805a71ea6f 100644
--- a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr
@@ -17,17 +17,11 @@ LL | const CONST_BUG: Bug<u8, ()> = unsafe { std::mem::transmute(|_: u8| ()) };
    = note: ...which requires computing layout of `Bug<u8, ()>`...
    = note: ...which requires normalizing `Bug<u8, ()>`...
    = note: ...which again requires computing type of `Bug::{opaque#0}`, completing the cycle
-note: cycle used when checking item types in top-level module
-  --> $DIR/issue-53092-2.rs:1:1
-   |
-LL | / #![feature(type_alias_impl_trait)]
-LL | | #![allow(dead_code)]
-LL | |
-LL | | type Bug<T, U> = impl Fn(T) -> U + Copy;
-...  |
-LL | |     CONST_BUG(0);
-LL | | }
-   | |_^
+note: cycle used when checking that `Bug::{opaque#0}` is well-formed
+  --> $DIR/issue-53092-2.rs:4:18
+   |
+LL | type Bug<T, U> = impl Fn(T) -> U + Copy;
+   |                  ^^^^^^^^^^^^^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
 error[E0277]: the trait bound `U: From<T>` is not satisfied
diff --git a/tests/ui/type-alias-impl-trait/issue-77179.rs b/tests/ui/type-alias-impl-trait/issue-77179.rs
index e7b04a48975..093aeb4b279 100644
--- a/tests/ui/type-alias-impl-trait/issue-77179.rs
+++ b/tests/ui/type-alias-impl-trait/issue-77179.rs
@@ -1,4 +1,4 @@
-// Regression test for #77179.
+// Regression test for the ICE in #77179.
 
 #![feature(type_alias_impl_trait)]
 
diff --git a/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.rs b/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.rs
index fec0fdc46fb..6a74d1dc4ef 100644
--- a/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.rs
+++ b/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.rs
@@ -1,8 +1,8 @@
 #![feature(type_alias_impl_trait)]
 
-pub type Tait = impl Iterator<Item = (&'db Key, impl Iterator)>;
+pub type Tait = impl Iterator<Item = (&'db LocalKey, impl Iterator)>;
 //~^ ERROR use of undeclared lifetime name `'db`
-//~| ERROR cannot find type `Key` in this scope
+//~| ERROR cannot find type `LocalKey` in this scope
 //~| ERROR unconstrained opaque type
 //~| ERROR unconstrained opaque type
 
diff --git a/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.stderr b/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.stderr
index d4aeace4ae7..ca15b134a99 100644
--- a/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.stderr
+++ b/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.stderr
@@ -1,43 +1,43 @@
 error[E0261]: use of undeclared lifetime name `'db`
   --> $DIR/nested-impl-trait-in-tait.rs:3:40
    |
-LL | pub type Tait = impl Iterator<Item = (&'db Key, impl Iterator)>;
+LL | pub type Tait = impl Iterator<Item = (&'db LocalKey, impl Iterator)>;
    |                                        ^^^ undeclared lifetime
    |
    = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
 help: consider making the bound lifetime-generic with a new `'db` lifetime
    |
-LL | pub type Tait = impl for<'db> Iterator<Item = (&'db Key, impl Iterator)>;
+LL | pub type Tait = impl for<'db> Iterator<Item = (&'db LocalKey, impl Iterator)>;
    |                      ++++++++
 help: consider introducing lifetime `'db` here
    |
-LL | pub type Tait<'db> = impl Iterator<Item = (&'db Key, impl Iterator)>;
+LL | pub type Tait<'db> = impl Iterator<Item = (&'db LocalKey, impl Iterator)>;
    |              +++++
 
-error[E0412]: cannot find type `Key` in this scope
+error[E0412]: cannot find type `LocalKey` in this scope
   --> $DIR/nested-impl-trait-in-tait.rs:3:44
    |
-LL | pub type Tait = impl Iterator<Item = (&'db Key, impl Iterator)>;
-   |                                            ^^^ not found in this scope
+LL | pub type Tait = impl Iterator<Item = (&'db LocalKey, impl Iterator)>;
+   |                                            ^^^^^^^^ not found in this scope
    |
 help: consider importing this struct
    |
-LL + use std::thread::local_impl::Key;
+LL + use std::thread::LocalKey;
    |
 
 error: unconstrained opaque type
   --> $DIR/nested-impl-trait-in-tait.rs:3:17
    |
-LL | pub type Tait = impl Iterator<Item = (&'db Key, impl Iterator)>;
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | pub type Tait = impl Iterator<Item = (&'db LocalKey, impl Iterator)>;
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `Tait` must be used in combination with a concrete type within the same module
 
 error: unconstrained opaque type
-  --> $DIR/nested-impl-trait-in-tait.rs:3:49
+  --> $DIR/nested-impl-trait-in-tait.rs:3:54
    |
-LL | pub type Tait = impl Iterator<Item = (&'db Key, impl Iterator)>;
-   |                                                 ^^^^^^^^^^^^^
+LL | pub type Tait = impl Iterator<Item = (&'db LocalKey, impl Iterator)>;
+   |                                                      ^^^^^^^^^^^^^
    |
    = note: `Tait` must be used in combination with a concrete type within the same module
 
diff --git a/tests/ui/type-alias-impl-trait/nested-in-anon-const.rs b/tests/ui/type-alias-impl-trait/nested-in-anon-const.rs
new file mode 100644
index 00000000000..e9d53c99d04
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/nested-in-anon-const.rs
@@ -0,0 +1,21 @@
+// Regression test for issue #119295.
+
+#![feature(type_alias_impl_trait)]
+
+type Bar<T> = T;
+type S<const A: usize> = [i32; A];
+
+extern "C" {
+    pub fn lint_me(
+        x: Bar<
+            S<
+                { //~ ERROR mismatched types
+                    type B<Z> = impl Sized;
+                    //~^ ERROR unconstrained opaque type
+                },
+            >,
+        >,
+    );
+}
+
+fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/nested-in-anon-const.stderr b/tests/ui/type-alias-impl-trait/nested-in-anon-const.stderr
new file mode 100644
index 00000000000..d0fe920b35f
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/nested-in-anon-const.stderr
@@ -0,0 +1,20 @@
+error: unconstrained opaque type
+  --> $DIR/nested-in-anon-const.rs:13:33
+   |
+LL |                     type B<Z> = impl Sized;
+   |                                 ^^^^^^^^^^
+   |
+   = note: `B` must be used in combination with a concrete type within the same item
+
+error[E0308]: mismatched types
+  --> $DIR/nested-in-anon-const.rs:12:17
+   |
+LL | /                 {
+LL | |                     type B<Z> = impl Sized;
+LL | |
+LL | |                 },
+   | |_________________^ expected `usize`, found `()`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.rs
index 9796823a724..46c2c22cac1 100644
--- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.rs
+++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.rs
@@ -4,7 +4,7 @@
 // FIXME: this is ruled out for now but should work
 
 type Foo = fn() -> impl Send;
-//~^ ERROR: `impl Trait` only allowed in function and inherent method argument and return types
+//~^ ERROR: `impl Trait` is not allowed in `fn` pointer return types
 
 fn make_foo() -> Foo {
     || 15
diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.stderr b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.stderr
index 5641ff30164..0f73c142470 100644
--- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.stderr
+++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fn-type.stderr
@@ -1,8 +1,10 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `fn` pointer return types
+error[E0562]: `impl Trait` is not allowed in `fn` pointer return types
   --> $DIR/type-alias-impl-trait-fn-type.rs:6:20
    |
 LL | type Foo = fn() -> impl Send;
    |                    ^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/typeck/escaping_bound_vars.rs b/tests/ui/typeck/escaping_bound_vars.rs
index 1fb063d2c26..f886388bfbd 100644
--- a/tests/ui/typeck/escaping_bound_vars.rs
+++ b/tests/ui/typeck/escaping_bound_vars.rs
@@ -10,6 +10,10 @@ pub fn test()
 where
     (): Test<{ 1 + (<() as Elide(&())>::call) }>,
     //~^ ERROR cannot capture late-bound lifetime in constant
+    //~| ERROR associated type bindings are not allowed here
+    //~| ERROR the trait bound `(): Elide<(&(),)>` is not satisfied
+    //~| ERROR the trait bound `(): Elide<(&(),)>` is not satisfied
+    //~| ERROR cannot add
 {
 }
 
diff --git a/tests/ui/typeck/escaping_bound_vars.stderr b/tests/ui/typeck/escaping_bound_vars.stderr
index 3ea40943577..8c7dcdb7f16 100644
--- a/tests/ui/typeck/escaping_bound_vars.stderr
+++ b/tests/ui/typeck/escaping_bound_vars.stderr
@@ -6,5 +6,55 @@ LL |     (): Test<{ 1 + (<() as Elide(&())>::call) }>,
    |                                  |
    |                                  lifetime defined here
 
-error: aborting due to 1 previous error
+error[E0229]: associated type bindings are not allowed here
+  --> $DIR/escaping_bound_vars.rs:11:28
+   |
+LL |     (): Test<{ 1 + (<() as Elide(&())>::call) }>,
+   |                            ^^^^^^^^^^ associated type not allowed here
+
+error[E0277]: the trait bound `(): Elide<(&(),)>` is not satisfied
+  --> $DIR/escaping_bound_vars.rs:11:22
+   |
+LL |     (): Test<{ 1 + (<() as Elide(&())>::call) }>,
+   |                      ^^ the trait `Elide<(&(),)>` is not implemented for `()`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/escaping_bound_vars.rs:5:1
+   |
+LL | trait Elide<T> {
+   | ^^^^^^^^^^^^^^
+
+error[E0277]: cannot add `fn() {<() as Elide<(&(),)>>::call}` to `{integer}`
+  --> $DIR/escaping_bound_vars.rs:11:18
+   |
+LL |     (): Test<{ 1 + (<() as Elide(&())>::call) }>,
+   |                  ^ no implementation for `{integer} + fn() {<() as Elide<(&(),)>>::call}`
+   |
+   = help: the trait `Add<fn() {<() as Elide<(&(),)>>::call}>` is not implemented for `{integer}`
+   = help: the following other types implement trait `Add<Rhs>`:
+             <isize as Add>
+             <isize as Add<&isize>>
+             <i8 as Add>
+             <i8 as Add<&i8>>
+             <i16 as Add>
+             <i16 as Add<&i16>>
+             <i32 as Add>
+             <i32 as Add<&i32>>
+           and 48 others
+
+error[E0277]: the trait bound `(): Elide<(&(),)>` is not satisfied
+  --> $DIR/escaping_bound_vars.rs:11:18
+   |
+LL |     (): Test<{ 1 + (<() as Elide(&())>::call) }>,
+   |                  ^ the trait `Elide<(&(),)>` is not implemented for `()`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/escaping_bound_vars.rs:5:1
+   |
+LL | trait Elide<T> {
+   | ^^^^^^^^^^^^^^
+
+error: aborting due to 5 previous errors
 
+Some errors have detailed explanations: E0229, E0277.
+For more information about an error, try `rustc --explain E0229`.
diff --git a/tests/ui/typeck/issue-104513-ice.rs b/tests/ui/typeck/issue-104513-ice.rs
index 4968d3f51fe..aaeee9cef48 100644
--- a/tests/ui/typeck/issue-104513-ice.rs
+++ b/tests/ui/typeck/issue-104513-ice.rs
@@ -1,6 +1,6 @@
 struct S;
 fn f() {
     let _: S<impl Oops> = S; //~ ERROR cannot find trait `Oops` in this scope
-    //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
+    //~^ ERROR `impl Trait` is not allowed in the type of variable bindings
 }
 fn main() {}
diff --git a/tests/ui/typeck/issue-104513-ice.stderr b/tests/ui/typeck/issue-104513-ice.stderr
index 56c6b336154..37d38a76a40 100644
--- a/tests/ui/typeck/issue-104513-ice.stderr
+++ b/tests/ui/typeck/issue-104513-ice.stderr
@@ -4,11 +4,13 @@ error[E0405]: cannot find trait `Oops` in this scope
 LL |     let _: S<impl Oops> = S;
    |                   ^^^^ not found in this scope
 
-error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in variable bindings
+error[E0562]: `impl Trait` is not allowed in the type of variable bindings
   --> $DIR/issue-104513-ice.rs:3:14
    |
 LL |     let _: S<impl Oops> = S;
    |              ^^^^^^^^^
+   |
+   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/typeck/issue-110052.rs b/tests/ui/typeck/issue-110052.rs
index f124b58b5b6..acbfac30acb 100644
--- a/tests/ui/typeck/issue-110052.rs
+++ b/tests/ui/typeck/issue-110052.rs
@@ -1,7 +1,7 @@
 // Makes sure we deal with escaping lifetimes *above* INNERMOST when
 // suggesting trait for ambiguous associated type.
 
-impl<I, V> Validator<I> for ()
+impl<I> Validator<I> for ()
 where
     for<'iter> dyn Validator<<&'iter I>::Item>:,
     //~^ ERROR ambiguous associated type
diff --git a/tests/ui/typeck/issue-2063.rs b/tests/ui/typeck/issue-2063.rs
index f08f9d4cfe4..b00bbc082af 100644
--- a/tests/ui/typeck/issue-2063.rs
+++ b/tests/ui/typeck/issue-2063.rs
@@ -3,7 +3,7 @@
 // cause compiler to loop.  Note that no instances
 // of such a type could ever be constructed.
 
-struct T(#[allow(unused_tuple_struct_fields)] Box<T>);
+struct T(#[allow(dead_code)] Box<T>);
 
 trait ToStr2 {
     fn my_to_string(&self) -> String;
diff --git a/tests/ui/typeck/issue-79040.rs b/tests/ui/typeck/issue-79040.rs
index 94161254220..03e00820756 100644
--- a/tests/ui/typeck/issue-79040.rs
+++ b/tests/ui/typeck/issue-79040.rs
@@ -1,5 +1,6 @@
 fn main() {
     const FOO = "hello" + 1; //~ ERROR cannot add `{integer}` to `&str`
     //~^ missing type for `const` item
+    //~| ERROR cannot add `{integer}` to `&str`
     println!("{}", FOO);
 }
diff --git a/tests/ui/typeck/issue-79040.stderr b/tests/ui/typeck/issue-79040.stderr
index c820d1e08c4..ce6a4b36217 100644
--- a/tests/ui/typeck/issue-79040.stderr
+++ b/tests/ui/typeck/issue-79040.stderr
@@ -12,6 +12,16 @@ error: missing type for `const` item
 LL |     const FOO = "hello" + 1;
    |              ^ help: provide a type for the item: `: <type>`
 
-error: aborting due to 2 previous errors
+error[E0369]: cannot add `{integer}` to `&str`
+  --> $DIR/issue-79040.rs:2:25
+   |
+LL |     const FOO = "hello" + 1;
+   |                 ------- ^ - {integer}
+   |                 |
+   |                 &str
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs b/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs
index e7e62c07739..5e5e88c8d0d 100644
--- a/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs
+++ b/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs
@@ -4,11 +4,12 @@ fn foo1<T:Copy<U>, U>(x: T) {}
 trait Trait: Copy<dyn Send> {}
 //~^ ERROR trait takes 0 generic arguments but 1 generic argument was supplied
 //~| ERROR trait takes 0 generic arguments but 1 generic argument was supplied
+//~| ERROR trait takes 0 generic arguments but 1 generic argument was supplied
 
-struct MyStruct1<T: Copy<T>>;
+struct MyStruct1<T: Copy<T>>(T);
 //~^ ERROR trait takes 0 generic arguments but 1 generic argument was supplied
 
-struct MyStruct2<'a, T: Copy<'a>>;
+struct MyStruct2<'a, T: Copy<'a>>(&'a T);
 //~^ ERROR trait takes 0 lifetime arguments but 1 lifetime argument was supplied
 
 fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
diff --git a/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr b/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr
index 67ca2b061f9..1dc1d46aa71 100644
--- a/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr
+++ b/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr
@@ -25,23 +25,23 @@ LL | trait Trait: Copy<dyn Send> {}
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
-  --> $DIR/typeck-builtin-bound-type-parameters.rs:8:21
+  --> $DIR/typeck-builtin-bound-type-parameters.rs:9:21
    |
-LL | struct MyStruct1<T: Copy<T>>;
+LL | struct MyStruct1<T: Copy<T>>(T);
    |                     ^^^^--- help: remove these generics
    |                     |
    |                     expected 0 generic arguments
 
 error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/typeck-builtin-bound-type-parameters.rs:11:25
+  --> $DIR/typeck-builtin-bound-type-parameters.rs:12:25
    |
-LL | struct MyStruct2<'a, T: Copy<'a>>;
+LL | struct MyStruct2<'a, T: Copy<'a>>(&'a T);
    |                         ^^^^---- help: remove these generics
    |                         |
    |                         expected 0 lifetime arguments
 
 error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/typeck-builtin-bound-type-parameters.rs:14:15
+  --> $DIR/typeck-builtin-bound-type-parameters.rs:15:15
    |
 LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
    |               ^^^^ -- help: remove this lifetime argument
@@ -49,13 +49,23 @@ LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
    |               expected 0 lifetime arguments
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
-  --> $DIR/typeck-builtin-bound-type-parameters.rs:14:15
+  --> $DIR/typeck-builtin-bound-type-parameters.rs:15:15
    |
 LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
    |               ^^^^     - help: remove this generic argument
    |               |
    |               expected 0 generic arguments
 
-error: aborting due to 7 previous errors
+error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
+   |
+LL | trait Trait: Copy<dyn Send> {}
+   |              ^^^^---------- help: remove these generics
+   |              |
+   |              expected 0 generic arguments
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 8 previous errors
 
 For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/typeck/typeck_type_placeholder_item.rs b/tests/ui/typeck/typeck_type_placeholder_item.rs
index 4eba14f5a93..f6d1fb6a23d 100644
--- a/tests/ui/typeck/typeck_type_placeholder_item.rs
+++ b/tests/ui/typeck/typeck_type_placeholder_item.rs
@@ -198,6 +198,7 @@ trait Qux {
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
 }
 impl Qux for Struct {
+    //~^ ERROR: not all trait items implemented, missing: `F`
     type A = _;
     //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
     type B = _;
diff --git a/tests/ui/typeck/typeck_type_placeholder_item.stderr b/tests/ui/typeck/typeck_type_placeholder_item.stderr
index a4325b01f02..bfcc76c1dae 100644
--- a/tests/ui/typeck/typeck_type_placeholder_item.stderr
+++ b/tests/ui/typeck/typeck_type_placeholder_item.stderr
@@ -29,7 +29,7 @@ LL | struct BadStruct2<_, T>(_, T);
    |                   ^ expected identifier, found reserved identifier
 
 error: associated constant in `impl` without body
-  --> $DIR/typeck_type_placeholder_item.rs:205:5
+  --> $DIR/typeck_type_placeholder_item.rs:206:5
    |
 LL |     const C: _;
    |     ^^^^^^^^^^-
@@ -411,7 +411,7 @@ LL | type Y = impl Trait<_>;
    |                     ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/typeck_type_placeholder_item.rs:216:31
+  --> $DIR/typeck_type_placeholder_item.rs:217:31
    |
 LL | fn value() -> Option<&'static _> {
    |               ----------------^-
@@ -420,7 +420,7 @@ LL | fn value() -> Option<&'static _> {
    |               help: replace with the correct return type: `Option<&'static u8>`
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
-  --> $DIR/typeck_type_placeholder_item.rs:221:10
+  --> $DIR/typeck_type_placeholder_item.rs:222:10
    |
 LL | const _: Option<_> = map(value);
    |          ^^^^^^^^^
@@ -429,7 +429,7 @@ LL | const _: Option<_> = map(value);
    |          help: replace with the correct type: `Option<u8>`
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/typeck_type_placeholder_item.rs:224:31
+  --> $DIR/typeck_type_placeholder_item.rs:225:31
    |
 LL | fn evens_squared(n: usize) -> _ {
    |                               ^
@@ -438,13 +438,13 @@ LL | fn evens_squared(n: usize) -> _ {
    |                               help: replace with an appropriate return type: `impl Iterator<Item = usize>`
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
-  --> $DIR/typeck_type_placeholder_item.rs:229:10
+  --> $DIR/typeck_type_placeholder_item.rs:230:10
    |
 LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
    |          ^ not allowed in type signatures
    |
-note: however, the inferred type `Map<Filter<Range<i32>, {closure@typeck_type_placeholder_item.rs:229:29}>, {closure@typeck_type_placeholder_item.rs:229:49}>` cannot be named
-  --> $DIR/typeck_type_placeholder_item.rs:229:14
+note: however, the inferred type `Map<Filter<Range<i32>, {closure@typeck_type_placeholder_item.rs:230:29}>, {closure@typeck_type_placeholder_item.rs:230:49}>` cannot be named
+  --> $DIR/typeck_type_placeholder_item.rs:230:14
    |
 LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -631,25 +631,25 @@ LL |         fn clone_from(&mut self, other: &FnTest9) { *self = FnTest9; }
    |                                         ~~~~~~~~
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
-  --> $DIR/typeck_type_placeholder_item.rs:201:14
+  --> $DIR/typeck_type_placeholder_item.rs:202:14
    |
 LL |     type A = _;
    |              ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
-  --> $DIR/typeck_type_placeholder_item.rs:203:14
+  --> $DIR/typeck_type_placeholder_item.rs:204:14
    |
 LL |     type B = _;
    |              ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
-  --> $DIR/typeck_type_placeholder_item.rs:205:14
+  --> $DIR/typeck_type_placeholder_item.rs:206:14
    |
 LL |     const C: _;
    |              ^ not allowed in type signatures
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
-  --> $DIR/typeck_type_placeholder_item.rs:208:14
+  --> $DIR/typeck_type_placeholder_item.rs:209:14
    |
 LL |     const D: _ = 42;
    |              ^
@@ -657,7 +657,16 @@ LL |     const D: _ = 42;
    |              not allowed in type signatures
    |              help: replace with the correct type: `i32`
 
-error: aborting due to 71 previous errors
+error[E0046]: not all trait items implemented, missing: `F`
+  --> $DIR/typeck_type_placeholder_item.rs:200:1
+   |
+LL |     type F: std::ops::Fn(_);
+   |     ----------------------- `F` from trait
+...
+LL | impl Qux for Struct {
+   | ^^^^^^^^^^^^^^^^^^^ missing `F` in implementation
+
+error: aborting due to 72 previous errors
 
-Some errors have detailed explanations: E0121, E0282, E0403.
-For more information about an error, try `rustc --explain E0121`.
+Some errors have detailed explanations: E0046, E0121, E0282, E0403.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/typeck/typeck_type_placeholder_item_help.rs b/tests/ui/typeck/typeck_type_placeholder_item_help.rs
index 914f8a2b28b..ff6182588c7 100644
--- a/tests/ui/typeck/typeck_type_placeholder_item_help.rs
+++ b/tests/ui/typeck/typeck_type_placeholder_item_help.rs
@@ -27,7 +27,7 @@ impl Test6 {
 }
 
 pub fn main() {
-    let _: Option<usize> = test1();
-    let _: f64 = test1();
+    let _: Option<usize> = test1(); //~ ERROR mismatched types
+    let _: f64 = test1(); //~ ERROR mismatched types
     let _: Option<i32> = test1();
 }
diff --git a/tests/ui/typeck/typeck_type_placeholder_item_help.stderr b/tests/ui/typeck/typeck_type_placeholder_item_help.stderr
index ed6f4088019..b0d4ed8272b 100644
--- a/tests/ui/typeck/typeck_type_placeholder_item_help.stderr
+++ b/tests/ui/typeck/typeck_type_placeholder_item_help.stderr
@@ -55,6 +55,29 @@ LL |     const TEST6: _ = 13;
    |                  not allowed in type signatures
    |                  help: replace with the correct type: `i32`
 
-error: aborting due to 7 previous errors
+error[E0308]: mismatched types
+  --> $DIR/typeck_type_placeholder_item_help.rs:30:28
+   |
+LL |     let _: Option<usize> = test1();
+   |            -------------   ^^^^^^^ expected `Option<usize>`, found `Option<i32>`
+   |            |
+   |            expected due to this
+   |
+   = note: expected enum `Option<usize>`
+              found enum `Option<i32>`
+
+error[E0308]: mismatched types
+  --> $DIR/typeck_type_placeholder_item_help.rs:31:18
+   |
+LL |     let _: f64 = test1();
+   |            ---   ^^^^^^^ expected `f64`, found `Option<i32>`
+   |            |
+   |            expected due to this
+   |
+   = note: expected type `f64`
+              found enum `Option<i32>`
+
+error: aborting due to 9 previous errors
 
-For more information about this error, try `rustc --explain E0121`.
+Some errors have detailed explanations: E0121, E0308.
+For more information about an error, try `rustc --explain E0121`.
diff --git a/tests/ui/ufcs/ufcs-explicit-self-bad.stderr b/tests/ui/ufcs/ufcs-explicit-self-bad.stderr
index 4c2cb0eb753..b0e71507a2e 100644
--- a/tests/ui/ufcs/ufcs-explicit-self-bad.stderr
+++ b/tests/ui/ufcs/ufcs-explicit-self-bad.stderr
@@ -1,3 +1,20 @@
+error[E0053]: method `dummy2` has an incompatible type for trait
+  --> $DIR/ufcs-explicit-self-bad.rs:37:21
+   |
+LL |     fn dummy2(self: &Bar<T>) {}
+   |               ------^^^^^^^
+   |               |     |
+   |               |     expected `&'a Bar<T>`, found `Bar<T>`
+   |               help: change the self-receiver type to match the trait: `&self`
+   |
+note: type in trait
+  --> $DIR/ufcs-explicit-self-bad.rs:31:15
+   |
+LL |     fn dummy2(&self);
+   |               ^^^^^
+   = note: expected signature `fn(&&'a Bar<_>)`
+              found signature `fn(&Bar<_>)`
+
 error[E0307]: invalid `self` parameter type: isize
   --> $DIR/ufcs-explicit-self-bad.rs:8:18
    |
@@ -101,23 +118,6 @@ note: ...does not necessarily outlive the anonymous lifetime defined here
 LL |     fn dummy3(self: &&Bar<T>) {}
    |                      ^^^^^^^
 
-error[E0053]: method `dummy2` has an incompatible type for trait
-  --> $DIR/ufcs-explicit-self-bad.rs:37:21
-   |
-LL |     fn dummy2(self: &Bar<T>) {}
-   |               ------^^^^^^^
-   |               |     |
-   |               |     expected `&'a Bar<T>`, found `Bar<T>`
-   |               help: change the self-receiver type to match the trait: `&self`
-   |
-note: type in trait
-  --> $DIR/ufcs-explicit-self-bad.rs:31:15
-   |
-LL |     fn dummy2(&self);
-   |               ^^^^^
-   = note: expected signature `fn(&&'a Bar<_>)`
-              found signature `fn(&Bar<_>)`
-
 error: aborting due to 8 previous errors
 
 Some errors have detailed explanations: E0053, E0307, E0308.
diff --git a/tests/ui/unboxed-closures/type-id-higher-rank.rs b/tests/ui/unboxed-closures/type-id-higher-rank.rs
index 1f8aec205fb..a9db71a0399 100644
--- a/tests/ui/unboxed-closures/type-id-higher-rank.rs
+++ b/tests/ui/unboxed-closures/type-id-higher-rank.rs
@@ -4,7 +4,7 @@
 
 use std::any::{Any, TypeId};
 
-struct Struct<'a>(#[allow(unused_tuple_struct_fields)] &'a ());
+struct Struct<'a>(#[allow(dead_code)] &'a ());
 trait Trait<'a> {}
 
 fn main() {
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs
index c575f507704..ea73b8b3c4a 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs
@@ -21,10 +21,12 @@ fn same_type<A,B:Eq<A>>(a: A, b: B) { }
 fn test<'a,'b>() {
     // Parens are equivalent to omitting default in angle.
     eq::< dyn Foo<(isize,),Output=()>,               dyn Foo(isize)                      >();
+    //~^ ERROR trait takes 1 lifetime argument but 0 lifetime arguments were supplied
 
     // Here we specify 'static explicitly in angle-bracket version.
     // Parenthesized winds up getting inferred.
     eq::< dyn Foo<'static, (isize,),Output=()>,      dyn Foo(isize)                      >();
+    //~^ ERROR trait takes 1 lifetime argument but 0 lifetime arguments were supplied
 }
 
 fn test2(x: &dyn Foo<(isize,),Output=()>, y: &dyn Foo(isize)) {
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr
index 0465c20dffa..d73aef851fd 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr
@@ -1,5 +1,5 @@
 error[E0107]: trait takes 1 lifetime argument but 0 lifetime arguments were supplied
-  --> $DIR/unboxed-closure-sugar-region.rs:30:51
+  --> $DIR/unboxed-closure-sugar-region.rs:32:51
    |
 LL | fn test2(x: &dyn Foo<(isize,),Output=()>, y: &dyn Foo(isize)) {
    |                                                   ^^^ expected 1 lifetime argument
@@ -10,6 +10,30 @@ note: trait defined here, with 1 lifetime parameter: `'a`
 LL | trait Foo<'a,T> {
    |       ^^^ --
 
-error: aborting due to 1 previous error
+error[E0107]: trait takes 1 lifetime argument but 0 lifetime arguments were supplied
+  --> $DIR/unboxed-closure-sugar-region.rs:23:58
+   |
+LL |     eq::< dyn Foo<(isize,),Output=()>,               dyn Foo(isize)                      >();
+   |                                                          ^^^ expected 1 lifetime argument
+   |
+note: trait defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/unboxed-closure-sugar-region.rs:10:7
+   |
+LL | trait Foo<'a,T> {
+   |       ^^^ --
+
+error[E0107]: trait takes 1 lifetime argument but 0 lifetime arguments were supplied
+  --> $DIR/unboxed-closure-sugar-region.rs:28:58
+   |
+LL |     eq::< dyn Foo<'static, (isize,),Output=()>,      dyn Foo(isize)                      >();
+   |                                                          ^^^ expected 1 lifetime argument
+   |
+note: trait defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/unboxed-closure-sugar-region.rs:10:7
+   |
+LL | trait Foo<'a,T> {
+   |       ^^^ --
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs
index 2c7e12f3257..43db7870ada 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs
@@ -2,25 +2,25 @@
 
 trait Zero { fn dummy(&self); }
 
-fn foo1(_: dyn Zero()) {
+fn foo1(_: &dyn Zero()) {
     //~^ ERROR trait takes 0 generic arguments but 1 generic argument
     //~| ERROR associated type `Output` not found for `Zero`
 }
 
-fn foo2(_: dyn Zero<usize>) {
+fn foo2(_: &dyn Zero<usize>) {
     //~^ ERROR trait takes 0 generic arguments but 1 generic argument
 }
 
-fn foo3(_: dyn Zero <   usize   >) {
+fn foo3(_: &dyn Zero <   usize   >) {
     //~^ ERROR trait takes 0 generic arguments but 1 generic argument
 }
 
-fn foo4(_: dyn Zero(usize)) {
+fn foo4(_: &dyn Zero(usize)) {
     //~^ ERROR trait takes 0 generic arguments but 1 generic argument
     //~| ERROR associated type `Output` not found for `Zero`
 }
 
-fn foo5(_: dyn Zero (   usize   )) {
+fn foo5(_: &dyn Zero (   usize   )) {
     //~^ ERROR trait takes 0 generic arguments but 1 generic argument
     //~| ERROR associated type `Output` not found for `Zero`
 }
diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
index 50b90553aa7..5a2de132d70 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
@@ -1,10 +1,10 @@
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:16
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:17
    |
-LL | fn foo1(_: dyn Zero()) {
-   |                ^^^^-- help: remove these parenthetical generics
-   |                |
-   |                expected 0 generic arguments
+LL | fn foo1(_: &dyn Zero()) {
+   |                 ^^^^-- help: remove these parenthetical generics
+   |                 |
+   |                 expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
@@ -13,18 +13,18 @@ LL | trait Zero { fn dummy(&self); }
    |       ^^^^
 
 error[E0220]: associated type `Output` not found for `Zero`
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:16
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:17
    |
-LL | fn foo1(_: dyn Zero()) {
-   |                ^^^^^^ associated type `Output` not found
+LL | fn foo1(_: &dyn Zero()) {
+   |                 ^^^^^^ associated type `Output` not found
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:10:16
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:10:17
    |
-LL | fn foo2(_: dyn Zero<usize>) {
-   |                ^^^^------- help: remove these generics
-   |                |
-   |                expected 0 generic arguments
+LL | fn foo2(_: &dyn Zero<usize>) {
+   |                 ^^^^------- help: remove these generics
+   |                 |
+   |                 expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
@@ -33,12 +33,12 @@ LL | trait Zero { fn dummy(&self); }
    |       ^^^^
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:14:16
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:14:17
    |
-LL | fn foo3(_: dyn Zero <   usize   >) {
-   |                ^^^^-------------- help: remove these generics
-   |                |
-   |                expected 0 generic arguments
+LL | fn foo3(_: &dyn Zero <   usize   >) {
+   |                 ^^^^-------------- help: remove these generics
+   |                 |
+   |                 expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
@@ -47,12 +47,12 @@ LL | trait Zero { fn dummy(&self); }
    |       ^^^^
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:16
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:17
    |
-LL | fn foo4(_: dyn Zero(usize)) {
-   |                ^^^^------- help: remove these parenthetical generics
-   |                |
-   |                expected 0 generic arguments
+LL | fn foo4(_: &dyn Zero(usize)) {
+   |                 ^^^^------- help: remove these parenthetical generics
+   |                 |
+   |                 expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
@@ -61,18 +61,18 @@ LL | trait Zero { fn dummy(&self); }
    |       ^^^^
 
 error[E0220]: associated type `Output` not found for `Zero`
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:16
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:17
    |
-LL | fn foo4(_: dyn Zero(usize)) {
-   |                ^^^^^^^^^^^ associated type `Output` not found
+LL | fn foo4(_: &dyn Zero(usize)) {
+   |                 ^^^^^^^^^^^ associated type `Output` not found
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:16
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:17
    |
-LL | fn foo5(_: dyn Zero (   usize   )) {
-   |                ^^^^-------------- help: remove these parenthetical generics
-   |                |
-   |                expected 0 generic arguments
+LL | fn foo5(_: &dyn Zero (   usize   )) {
+   |                 ^^^^-------------- help: remove these parenthetical generics
+   |                 |
+   |                 expected 0 generic arguments
    |
 note: trait defined here, with 0 generic parameters
   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
@@ -81,10 +81,10 @@ LL | trait Zero { fn dummy(&self); }
    |       ^^^^
 
 error[E0220]: associated type `Output` not found for `Zero`
-  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:16
+  --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:17
    |
-LL | fn foo5(_: dyn Zero (   usize   )) {
-   |                ^^^^^^^^^^^^^^^^^^ associated type `Output` not found
+LL | fn foo5(_: &dyn Zero (   usize   )) {
+   |                 ^^^^^^^^^^^^^^^^^^ associated type `Output` not found
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/union/union-align.rs b/tests/ui/union/union-align.rs
index 6a44f27dbb2..67ab10fef4b 100644
--- a/tests/ui/union/union-align.rs
+++ b/tests/ui/union/union-align.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/union/union-backcomp.rs b/tests/ui/union/union-backcomp.rs
index b19eab9f52b..21b9fc50e1d 100644
--- a/tests/ui/union/union-backcomp.rs
+++ b/tests/ui/union/union-backcomp.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![allow(path_statements)]
 #![allow(dead_code)]
diff --git a/tests/ui/union/union-basic.rs b/tests/ui/union/union-basic.rs
index dcc552ac75c..1009def7d52 100644
--- a/tests/ui/union/union-basic.rs
+++ b/tests/ui/union/union-basic.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![allow(unused_imports)]
 
diff --git a/tests/ui/union/union-borrow-move-parent-sibling.mirunsafeck.stderr b/tests/ui/union/union-borrow-move-parent-sibling.mirunsafeck.stderr
deleted file mode 100644
index 7f931b49a58..00000000000
--- a/tests/ui/union/union-borrow-move-parent-sibling.mirunsafeck.stderr
+++ /dev/null
@@ -1,84 +0,0 @@
-error[E0502]: cannot borrow `u` (via `u.y`) as immutable because it is also borrowed as mutable (via `u.x`)
-  --> $DIR/union-borrow-move-parent-sibling.rs:56:13
-   |
-LL |     let a = &mut (*u.x).0;
-   |                    --- mutable borrow occurs here (via `u.x`)
-LL |     let b = &u.y;
-   |             ^^^^ immutable borrow of `u.y` -- which overlaps with `u.x` -- occurs here
-LL |     use_borrow(a);
-   |                - mutable borrow later used here
-   |
-   = note: `u.y` is a field of the union `U`, so it overlaps the field `u.x`
-
-error[E0507]: cannot move out of dereference of `ManuallyDrop<((MockVec<u8>, MockVec<u8>), MockVec<u8>)>`
-  --> $DIR/union-borrow-move-parent-sibling.rs:62:13
-   |
-LL |     let a = u.x.0;
-   |             ^^^^^ move occurs because value has type `(MockVec<u8>, MockVec<u8>)`, which does not implement the `Copy` trait
-   |
-help: consider borrowing here
-   |
-LL |     let a = &u.x.0;
-   |             +
-
-error[E0382]: use of moved value: `u`
-  --> $DIR/union-borrow-move-parent-sibling.rs:64:13
-   |
-LL |     let u = U { x: ManuallyDrop::new(((MockVec::new(), MockVec::new()), MockVec::new())) };
-   |         - move occurs because `u` has type `U`, which does not implement the `Copy` trait
-LL |     let a = u.x.0;
-LL |     let a = u.x;
-   |             --- value moved here
-LL |     let b = u.y;
-   |             ^^^ value used here after move
-
-error[E0502]: cannot borrow `u` (via `u.y`) as immutable because it is also borrowed as mutable (via `u.x`)
-  --> $DIR/union-borrow-move-parent-sibling.rs:70:13
-   |
-LL |     let a = &mut ((*u.x).0).0;
-   |                     --- mutable borrow occurs here (via `u.x`)
-LL |     let b = &u.y;
-   |             ^^^^ immutable borrow of `u.y` -- which overlaps with `u.x` -- occurs here
-LL |     use_borrow(a);
-   |                - mutable borrow later used here
-   |
-   = note: `u.y` is a field of the union `U`, so it overlaps the field `u.x`
-
-error[E0507]: cannot move out of dereference of `ManuallyDrop<((MockVec<u8>, MockVec<u8>), MockVec<u8>)>`
-  --> $DIR/union-borrow-move-parent-sibling.rs:76:13
-   |
-LL |     let a = (u.x.0).0;
-   |             ^^^^^^^^^ move occurs because value has type `MockVec<u8>`, which does not implement the `Copy` trait
-   |
-help: consider borrowing here
-   |
-LL |     let a = &(u.x.0).0;
-   |             +
-
-error[E0382]: use of moved value: `u`
-  --> $DIR/union-borrow-move-parent-sibling.rs:78:13
-   |
-LL |     let u = U { x: ManuallyDrop::new(((MockVec::new(), MockVec::new()), MockVec::new())) };
-   |         - move occurs because `u` has type `U`, which does not implement the `Copy` trait
-LL |     let a = (u.x.0).0;
-LL |     let a = u.x;
-   |             --- value moved here
-LL |     let b = u.y;
-   |             ^^^ value used here after move
-
-error[E0502]: cannot borrow `u` (via `u.x`) as immutable because it is also borrowed as mutable (via `u.y`)
-  --> $DIR/union-borrow-move-parent-sibling.rs:84:13
-   |
-LL |     let a = &mut *u.y;
-   |                   --- mutable borrow occurs here (via `u.y`)
-LL |     let b = &u.x;
-   |             ^^^^ immutable borrow of `u.x` -- which overlaps with `u.y` -- occurs here
-LL |     use_borrow(a);
-   |                - mutable borrow later used here
-   |
-   = note: `u.x` is a field of the union `U`, so it overlaps the field `u.y`
-
-error: aborting due to 7 previous errors
-
-Some errors have detailed explanations: E0382, E0502, E0507.
-For more information about an error, try `rustc --explain E0382`.
diff --git a/tests/ui/union/union-borrow-move-parent-sibling.rs b/tests/ui/union/union-borrow-move-parent-sibling.rs
index 83781c5e550..5b0b44232e4 100644
--- a/tests/ui/union/union-borrow-move-parent-sibling.rs
+++ b/tests/ui/union/union-borrow-move-parent-sibling.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![allow(unused)]
 
 use std::ops::{Deref, DerefMut};
diff --git a/tests/ui/union/union-borrow-move-parent-sibling.thirunsafeck.stderr b/tests/ui/union/union-borrow-move-parent-sibling.stderr
index 7f931b49a58..c9a440a66cc 100644
--- a/tests/ui/union/union-borrow-move-parent-sibling.thirunsafeck.stderr
+++ b/tests/ui/union/union-borrow-move-parent-sibling.stderr
@@ -1,5 +1,5 @@
 error[E0502]: cannot borrow `u` (via `u.y`) as immutable because it is also borrowed as mutable (via `u.x`)
-  --> $DIR/union-borrow-move-parent-sibling.rs:56:13
+  --> $DIR/union-borrow-move-parent-sibling.rs:53:13
    |
 LL |     let a = &mut (*u.x).0;
    |                    --- mutable borrow occurs here (via `u.x`)
@@ -11,7 +11,7 @@ LL |     use_borrow(a);
    = note: `u.y` is a field of the union `U`, so it overlaps the field `u.x`
 
 error[E0507]: cannot move out of dereference of `ManuallyDrop<((MockVec<u8>, MockVec<u8>), MockVec<u8>)>`
-  --> $DIR/union-borrow-move-parent-sibling.rs:62:13
+  --> $DIR/union-borrow-move-parent-sibling.rs:59:13
    |
 LL |     let a = u.x.0;
    |             ^^^^^ move occurs because value has type `(MockVec<u8>, MockVec<u8>)`, which does not implement the `Copy` trait
@@ -22,7 +22,7 @@ LL |     let a = &u.x.0;
    |             +
 
 error[E0382]: use of moved value: `u`
-  --> $DIR/union-borrow-move-parent-sibling.rs:64:13
+  --> $DIR/union-borrow-move-parent-sibling.rs:61:13
    |
 LL |     let u = U { x: ManuallyDrop::new(((MockVec::new(), MockVec::new()), MockVec::new())) };
    |         - move occurs because `u` has type `U`, which does not implement the `Copy` trait
@@ -33,7 +33,7 @@ LL |     let b = u.y;
    |             ^^^ value used here after move
 
 error[E0502]: cannot borrow `u` (via `u.y`) as immutable because it is also borrowed as mutable (via `u.x`)
-  --> $DIR/union-borrow-move-parent-sibling.rs:70:13
+  --> $DIR/union-borrow-move-parent-sibling.rs:67:13
    |
 LL |     let a = &mut ((*u.x).0).0;
    |                     --- mutable borrow occurs here (via `u.x`)
@@ -45,7 +45,7 @@ LL |     use_borrow(a);
    = note: `u.y` is a field of the union `U`, so it overlaps the field `u.x`
 
 error[E0507]: cannot move out of dereference of `ManuallyDrop<((MockVec<u8>, MockVec<u8>), MockVec<u8>)>`
-  --> $DIR/union-borrow-move-parent-sibling.rs:76:13
+  --> $DIR/union-borrow-move-parent-sibling.rs:73:13
    |
 LL |     let a = (u.x.0).0;
    |             ^^^^^^^^^ move occurs because value has type `MockVec<u8>`, which does not implement the `Copy` trait
@@ -56,7 +56,7 @@ LL |     let a = &(u.x.0).0;
    |             +
 
 error[E0382]: use of moved value: `u`
-  --> $DIR/union-borrow-move-parent-sibling.rs:78:13
+  --> $DIR/union-borrow-move-parent-sibling.rs:75:13
    |
 LL |     let u = U { x: ManuallyDrop::new(((MockVec::new(), MockVec::new()), MockVec::new())) };
    |         - move occurs because `u` has type `U`, which does not implement the `Copy` trait
@@ -67,7 +67,7 @@ LL |     let b = u.y;
    |             ^^^ value used here after move
 
 error[E0502]: cannot borrow `u` (via `u.x`) as immutable because it is also borrowed as mutable (via `u.y`)
-  --> $DIR/union-borrow-move-parent-sibling.rs:84:13
+  --> $DIR/union-borrow-move-parent-sibling.rs:81:13
    |
 LL |     let a = &mut *u.y;
    |                   --- mutable borrow occurs here (via `u.y`)
diff --git a/tests/ui/union/union-const-codegen.rs b/tests/ui/union/union-const-codegen.rs
index 32a546cf35f..d5b30559595 100644
--- a/tests/ui/union/union-const-codegen.rs
+++ b/tests/ui/union/union-const-codegen.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 union U {
     a: u64,
diff --git a/tests/ui/union/union-const-eval-field.rs b/tests/ui/union/union-const-eval-field.rs
index ca48785cd9f..15a20899a78 100644
--- a/tests/ui/union/union-const-eval-field.rs
+++ b/tests/ui/union/union-const-eval-field.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 type Field1 = (i32, u32);
 type Field2 = f32;
diff --git a/tests/ui/union/union-const-eval.rs b/tests/ui/union/union-const-eval.rs
index 32ee4a739ea..70a97795b75 100644
--- a/tests/ui/union/union-const-eval.rs
+++ b/tests/ui/union/union-const-eval.rs
@@ -1,6 +1,4 @@
 // check-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 union U {
     a: usize,
diff --git a/tests/ui/union/union-deref.rs b/tests/ui/union/union-deref.rs
index 5aa28d93f96..02f9bf2c413 100644
--- a/tests/ui/union/union-deref.rs
+++ b/tests/ui/union/union-deref.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 //! Test the part of RFC 2514 that is about not applying `DerefMut` coercions
 //! of union fields.
 
diff --git a/tests/ui/union/union-deref.mirunsafeck.stderr b/tests/ui/union/union-deref.stderr
index be5e60ab88a..38fce568ae7 100644
--- a/tests/ui/union/union-deref.mirunsafeck.stderr
+++ b/tests/ui/union/union-deref.stderr
@@ -1,5 +1,5 @@
 error: not automatically applying `DerefMut` on `ManuallyDrop` union field
-  --> $DIR/union-deref.rs:16:14
+  --> $DIR/union-deref.rs:13:14
    |
 LL |     unsafe { u.f.0 = Vec::new() };
    |              ^^^
@@ -8,7 +8,7 @@ LL |     unsafe { u.f.0 = Vec::new() };
    = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
 
 error: not automatically applying `DerefMut` on `ManuallyDrop` union field
-  --> $DIR/union-deref.rs:18:19
+  --> $DIR/union-deref.rs:15:19
    |
 LL |     unsafe { &mut u.f.0 };
    |                   ^^^
@@ -17,7 +17,7 @@ LL |     unsafe { &mut u.f.0 };
    = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
 
 error: not automatically applying `DerefMut` on `ManuallyDrop` union field
-  --> $DIR/union-deref.rs:20:14
+  --> $DIR/union-deref.rs:17:14
    |
 LL |     unsafe { u.f.0.push(0) };
    |              ^^^
@@ -26,7 +26,7 @@ LL |     unsafe { u.f.0.push(0) };
    = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
 
 error: not automatically applying `DerefMut` on `ManuallyDrop` union field
-  --> $DIR/union-deref.rs:24:14
+  --> $DIR/union-deref.rs:21:14
    |
 LL |     unsafe { u.f.0.0 = Vec::new() };
    |              ^^^^^
@@ -35,7 +35,7 @@ LL |     unsafe { u.f.0.0 = Vec::new() };
    = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
 
 error: not automatically applying `DerefMut` on `ManuallyDrop` union field
-  --> $DIR/union-deref.rs:26:19
+  --> $DIR/union-deref.rs:23:19
    |
 LL |     unsafe { &mut u.f.0.0 };
    |                   ^^^^^
@@ -44,7 +44,7 @@ LL |     unsafe { &mut u.f.0.0 };
    = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
 
 error: not automatically applying `DerefMut` on `ManuallyDrop` union field
-  --> $DIR/union-deref.rs:28:14
+  --> $DIR/union-deref.rs:25:14
    |
 LL |     unsafe { u.f.0.0.push(0) };
    |              ^^^^^
diff --git a/tests/ui/union/union-deref.thirunsafeck.stderr b/tests/ui/union/union-deref.thirunsafeck.stderr
deleted file mode 100644
index be5e60ab88a..00000000000
--- a/tests/ui/union/union-deref.thirunsafeck.stderr
+++ /dev/null
@@ -1,56 +0,0 @@
-error: not automatically applying `DerefMut` on `ManuallyDrop` union field
-  --> $DIR/union-deref.rs:16:14
-   |
-LL |     unsafe { u.f.0 = Vec::new() };
-   |              ^^^
-   |
-   = help: writing to this reference calls the destructor for the old value
-   = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
-
-error: not automatically applying `DerefMut` on `ManuallyDrop` union field
-  --> $DIR/union-deref.rs:18:19
-   |
-LL |     unsafe { &mut u.f.0 };
-   |                   ^^^
-   |
-   = help: writing to this reference calls the destructor for the old value
-   = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
-
-error: not automatically applying `DerefMut` on `ManuallyDrop` union field
-  --> $DIR/union-deref.rs:20:14
-   |
-LL |     unsafe { u.f.0.push(0) };
-   |              ^^^
-   |
-   = help: writing to this reference calls the destructor for the old value
-   = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
-
-error: not automatically applying `DerefMut` on `ManuallyDrop` union field
-  --> $DIR/union-deref.rs:24:14
-   |
-LL |     unsafe { u.f.0.0 = Vec::new() };
-   |              ^^^^^
-   |
-   = help: writing to this reference calls the destructor for the old value
-   = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
-
-error: not automatically applying `DerefMut` on `ManuallyDrop` union field
-  --> $DIR/union-deref.rs:26:19
-   |
-LL |     unsafe { &mut u.f.0.0 };
-   |                   ^^^^^
-   |
-   = help: writing to this reference calls the destructor for the old value
-   = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
-
-error: not automatically applying `DerefMut` on `ManuallyDrop` union field
-  --> $DIR/union-deref.rs:28:14
-   |
-LL |     unsafe { u.f.0.0.push(0) };
-   |              ^^^^^
-   |
-   = help: writing to this reference calls the destructor for the old value
-   = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
-
-error: aborting due to 6 previous errors
-
diff --git a/tests/ui/union/union-derive-clone.rs b/tests/ui/union/union-derive-clone.rs
index 7aa62146e54..7ab19edb471 100644
--- a/tests/ui/union/union-derive-clone.rs
+++ b/tests/ui/union/union-derive-clone.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 use std::mem::ManuallyDrop;
 
 #[derive(Clone)] //~ ERROR the trait bound `U1: Copy` is not satisfied
diff --git a/tests/ui/union/union-derive-clone.mirunsafeck.stderr b/tests/ui/union/union-derive-clone.stderr
index 4d23d230fa3..39f1e32e6eb 100644
--- a/tests/ui/union/union-derive-clone.mirunsafeck.stderr
+++ b/tests/ui/union/union-derive-clone.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `U1: Copy` is not satisfied
-  --> $DIR/union-derive-clone.rs:6:10
+  --> $DIR/union-derive-clone.rs:3:10
    |
 LL | #[derive(Clone)]
    |          ^^^^^ the trait `Copy` is not implemented for `U1`
@@ -14,7 +14,7 @@ LL | union U1 {
    |
 
 error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
-  --> $DIR/union-derive-clone.rs:38:15
+  --> $DIR/union-derive-clone.rs:35:15
    |
 LL | union U5<T> {
    | -----------
@@ -29,7 +29,7 @@ LL |     let w = u.clone();
    |               ^^^^^ method cannot be called on `U5<CloneNoCopy>` due to unsatisfied trait bounds
    |
 note: trait bound `CloneNoCopy: Copy` was not satisfied
-  --> $DIR/union-derive-clone.rs:28:10
+  --> $DIR/union-derive-clone.rs:25:10
    |
 LL | #[derive(Clone, Copy)]
    |          ^^^^^ unsatisfied trait bound introduced in this `derive` macro
diff --git a/tests/ui/union/union-derive-clone.thirunsafeck.stderr b/tests/ui/union/union-derive-clone.thirunsafeck.stderr
deleted file mode 100644
index 4d23d230fa3..00000000000
--- a/tests/ui/union/union-derive-clone.thirunsafeck.stderr
+++ /dev/null
@@ -1,45 +0,0 @@
-error[E0277]: the trait bound `U1: Copy` is not satisfied
-  --> $DIR/union-derive-clone.rs:6:10
-   |
-LL | #[derive(Clone)]
-   |          ^^^^^ the trait `Copy` is not implemented for `U1`
-   |
-note: required by a bound in `AssertParamIsCopy`
-  --> $SRC_DIR/core/src/clone.rs:LL:COL
-   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: consider annotating `U1` with `#[derive(Copy)]`
-   |
-LL + #[derive(Copy)]
-LL | union U1 {
-   |
-
-error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
-  --> $DIR/union-derive-clone.rs:38:15
-   |
-LL | union U5<T> {
-   | -----------
-   | |
-   | method `clone` not found for this union
-   | doesn't satisfy `U5<CloneNoCopy>: Clone`
-...
-LL | struct CloneNoCopy;
-   | ------------------ doesn't satisfy `CloneNoCopy: Copy`
-...
-LL |     let w = u.clone();
-   |               ^^^^^ method cannot be called on `U5<CloneNoCopy>` due to unsatisfied trait bounds
-   |
-note: trait bound `CloneNoCopy: Copy` was not satisfied
-  --> $DIR/union-derive-clone.rs:28:10
-   |
-LL | #[derive(Clone, Copy)]
-   |          ^^^^^ unsatisfied trait bound introduced in this `derive` macro
-help: consider annotating `CloneNoCopy` with `#[derive(Clone, Copy)]`
-   |
-LL + #[derive(Clone, Copy)]
-LL | struct CloneNoCopy;
-   |
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0277, E0599.
-For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/union/union-derive-eq.rs b/tests/ui/union/union-derive-eq.rs
index b7e7f343f8a..e689f8c27d7 100644
--- a/tests/ui/union/union-derive-eq.rs
+++ b/tests/ui/union/union-derive-eq.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #[derive(Eq)] // OK
 union U1 {
     a: u8,
diff --git a/tests/ui/union/union-derive-eq.mirunsafeck.stderr b/tests/ui/union/union-derive-eq.stderr
index 86e7c955d2e..b068edd6d69 100644
--- a/tests/ui/union/union-derive-eq.mirunsafeck.stderr
+++ b/tests/ui/union/union-derive-eq.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `PartialEqNotEq: Eq` is not satisfied
-  --> $DIR/union-derive-eq.rs:16:5
+  --> $DIR/union-derive-eq.rs:13:5
    |
 LL | #[derive(Eq)]
    |          -- in this derive macro expansion
diff --git a/tests/ui/union/union-derive-eq.thirunsafeck.stderr b/tests/ui/union/union-derive-eq.thirunsafeck.stderr
deleted file mode 100644
index 86e7c955d2e..00000000000
--- a/tests/ui/union/union-derive-eq.thirunsafeck.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0277]: the trait bound `PartialEqNotEq: Eq` is not satisfied
-  --> $DIR/union-derive-eq.rs:16:5
-   |
-LL | #[derive(Eq)]
-   |          -- in this derive macro expansion
-LL | union U2 {
-LL |     a: PartialEqNotEq,
-   |     ^^^^^^^^^^^^^^^^^ the trait `Eq` is not implemented for `PartialEqNotEq`
-   |
-note: required by a bound in `AssertParamIsEq`
-  --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: consider annotating `PartialEqNotEq` with `#[derive(Eq)]`
-   |
-LL + #[derive(Eq)]
-LL | struct PartialEqNotEq;
-   |
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/union/union-derive-rpass.rs b/tests/ui/union/union-derive-rpass.rs
index 8276bc635fc..826b9e5a7c6 100644
--- a/tests/ui/union/union-derive-rpass.rs
+++ b/tests/ui/union/union-derive-rpass.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![allow(dead_code)]
 #![allow(unused_variables)]
diff --git a/tests/ui/union/union-drop.rs b/tests/ui/union/union-drop.rs
index c3d7d41ca35..41c1e9243f7 100644
--- a/tests/ui/union/union-drop.rs
+++ b/tests/ui/union/union-drop.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![allow(dead_code)]
 #![allow(unused_variables)]
diff --git a/tests/ui/union/union-fields-1.mirunsafeck.stderr b/tests/ui/union/union-fields-1.mirunsafeck.stderr
deleted file mode 100644
index 0c9981c69fc..00000000000
--- a/tests/ui/union/union-fields-1.mirunsafeck.stderr
+++ /dev/null
@@ -1,42 +0,0 @@
-error: field `c` is never read
-  --> $DIR/union-fields-1.rs:9:5
-   |
-LL | union U1 {
-   |       -- field in this union
-...
-LL |     c: u8,
-   |     ^
-   |
-note: the lint level is defined here
-  --> $DIR/union-fields-1.rs:4:9
-   |
-LL | #![deny(dead_code)]
-   |         ^^^^^^^^^
-
-error: field `a` is never read
-  --> $DIR/union-fields-1.rs:12:5
-   |
-LL | union U2 {
-   |       -- field in this union
-LL |     a: u8,
-   |     ^
-
-error: field `a` is never read
-  --> $DIR/union-fields-1.rs:16:20
-   |
-LL | union NoDropLike { a: u8 }
-   |       ----------   ^
-   |       |
-   |       field in this union
-
-error: field `c` is never read
-  --> $DIR/union-fields-1.rs:21:5
-   |
-LL | union U {
-   |       - field in this union
-...
-LL |     c: u8,
-   |     ^
-
-error: aborting due to 4 previous errors
-
diff --git a/tests/ui/union/union-fields-1.rs b/tests/ui/union/union-fields-1.rs
index cf2ef4c03d6..8ab34b55da2 100644
--- a/tests/ui/union/union-fields-1.rs
+++ b/tests/ui/union/union-fields-1.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![deny(dead_code)]
 
 union U1 {
diff --git a/tests/ui/union/union-fields-1.thirunsafeck.stderr b/tests/ui/union/union-fields-1.stderr
index 0c9981c69fc..bba8aae6024 100644
--- a/tests/ui/union/union-fields-1.thirunsafeck.stderr
+++ b/tests/ui/union/union-fields-1.stderr
@@ -1,5 +1,5 @@
 error: field `c` is never read
-  --> $DIR/union-fields-1.rs:9:5
+  --> $DIR/union-fields-1.rs:6:5
    |
 LL | union U1 {
    |       -- field in this union
@@ -8,13 +8,13 @@ LL |     c: u8,
    |     ^
    |
 note: the lint level is defined here
-  --> $DIR/union-fields-1.rs:4:9
+  --> $DIR/union-fields-1.rs:1:9
    |
 LL | #![deny(dead_code)]
    |         ^^^^^^^^^
 
 error: field `a` is never read
-  --> $DIR/union-fields-1.rs:12:5
+  --> $DIR/union-fields-1.rs:9:5
    |
 LL | union U2 {
    |       -- field in this union
@@ -22,7 +22,7 @@ LL |     a: u8,
    |     ^
 
 error: field `a` is never read
-  --> $DIR/union-fields-1.rs:16:20
+  --> $DIR/union-fields-1.rs:13:20
    |
 LL | union NoDropLike { a: u8 }
    |       ----------   ^
@@ -30,7 +30,7 @@ LL | union NoDropLike { a: u8 }
    |       field in this union
 
 error: field `c` is never read
-  --> $DIR/union-fields-1.rs:21:5
+  --> $DIR/union-fields-1.rs:18:5
    |
 LL | union U {
    |       - field in this union
diff --git a/tests/ui/union/union-fields-2.mirunsafeck.stderr b/tests/ui/union/union-fields-2.mirunsafeck.stderr
deleted file mode 100644
index 1157f0c2ae7..00000000000
--- a/tests/ui/union/union-fields-2.mirunsafeck.stderr
+++ /dev/null
@@ -1,84 +0,0 @@
-error[E0784]: union expressions should have exactly one field
-  --> $DIR/union-fields-2.rs:10:13
-   |
-LL |     let u = U {};
-   |             ^
-
-error[E0784]: union expressions should have exactly one field
-  --> $DIR/union-fields-2.rs:12:13
-   |
-LL |     let u = U { a: 0, b: 1 };
-   |             ^
-
-error[E0560]: union `U` has no field named `c`
-  --> $DIR/union-fields-2.rs:13:29
-   |
-LL |     let u = U { a: 0, b: 1, c: 2 };
-   |                             ^ `U` does not have this field
-   |
-   = note: all struct fields are already assigned
-
-error[E0784]: union expressions should have exactly one field
-  --> $DIR/union-fields-2.rs:13:13
-   |
-LL |     let u = U { a: 0, b: 1, c: 2 };
-   |             ^
-
-error[E0784]: union expressions should have exactly one field
-  --> $DIR/union-fields-2.rs:15:13
-   |
-LL |     let u = U { ..u };
-   |             ^
-
-error[E0436]: functional record update syntax requires a struct
-  --> $DIR/union-fields-2.rs:15:19
-   |
-LL |     let u = U { ..u };
-   |                   ^
-
-error: union patterns should have exactly one field
-  --> $DIR/union-fields-2.rs:18:9
-   |
-LL |     let U {} = u;
-   |         ^^^^
-
-error: union patterns should have exactly one field
-  --> $DIR/union-fields-2.rs:20:9
-   |
-LL |     let U { a, b } = u;
-   |         ^^^^^^^^^^
-
-error: union patterns should have exactly one field
-  --> $DIR/union-fields-2.rs:21:9
-   |
-LL |     let U { a, b, c } = u;
-   |         ^^^^^^^^^^^^^
-
-error[E0026]: union `U` does not have a field named `c`
-  --> $DIR/union-fields-2.rs:21:19
-   |
-LL |     let U { a, b, c } = u;
-   |                   ^ union `U` does not have this field
-
-error: union patterns should have exactly one field
-  --> $DIR/union-fields-2.rs:23:9
-   |
-LL |     let U { .. } = u;
-   |         ^^^^^^^^
-
-error: `..` cannot be used in union patterns
-  --> $DIR/union-fields-2.rs:23:9
-   |
-LL |     let U { .. } = u;
-   |         ^^^^^^^^
-
-error: `..` cannot be used in union patterns
-  --> $DIR/union-fields-2.rs:25:9
-   |
-LL |     let U { a, .. } = u;
-   |         ^^^^^^^^^^^
-
-error: aborting due to 13 previous errors
-
-Some errors have detailed explanations: E0026, E0436, E0560, E0784.
-For more information about an error, try `rustc --explain E0026`.
diff --git a/tests/ui/union/union-fields-2.rs b/tests/ui/union/union-fields-2.rs
index e738b184703..71b204fcdc5 100644
--- a/tests/ui/union/union-fields-2.rs
+++ b/tests/ui/union/union-fields-2.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 union U {
     a: u8,
     b: u16,
diff --git a/tests/ui/union/union-fields-2.thirunsafeck.stderr b/tests/ui/union/union-fields-2.stderr
index 1157f0c2ae7..142186885ca 100644
--- a/tests/ui/union/union-fields-2.thirunsafeck.stderr
+++ b/tests/ui/union/union-fields-2.stderr
@@ -1,17 +1,17 @@
 error[E0784]: union expressions should have exactly one field
-  --> $DIR/union-fields-2.rs:10:13
+  --> $DIR/union-fields-2.rs:7:13
    |
 LL |     let u = U {};
    |             ^
 
 error[E0784]: union expressions should have exactly one field
-  --> $DIR/union-fields-2.rs:12:13
+  --> $DIR/union-fields-2.rs:9:13
    |
 LL |     let u = U { a: 0, b: 1 };
    |             ^
 
 error[E0560]: union `U` has no field named `c`
-  --> $DIR/union-fields-2.rs:13:29
+  --> $DIR/union-fields-2.rs:10:29
    |
 LL |     let u = U { a: 0, b: 1, c: 2 };
    |                             ^ `U` does not have this field
@@ -19,61 +19,61 @@ LL |     let u = U { a: 0, b: 1, c: 2 };
    = note: all struct fields are already assigned
 
 error[E0784]: union expressions should have exactly one field
-  --> $DIR/union-fields-2.rs:13:13
+  --> $DIR/union-fields-2.rs:10:13
    |
 LL |     let u = U { a: 0, b: 1, c: 2 };
    |             ^
 
 error[E0784]: union expressions should have exactly one field
-  --> $DIR/union-fields-2.rs:15:13
+  --> $DIR/union-fields-2.rs:12:13
    |
 LL |     let u = U { ..u };
    |             ^
 
 error[E0436]: functional record update syntax requires a struct
-  --> $DIR/union-fields-2.rs:15:19
+  --> $DIR/union-fields-2.rs:12:19
    |
 LL |     let u = U { ..u };
    |                   ^
 
 error: union patterns should have exactly one field
-  --> $DIR/union-fields-2.rs:18:9
+  --> $DIR/union-fields-2.rs:15:9
    |
 LL |     let U {} = u;
    |         ^^^^
 
 error: union patterns should have exactly one field
-  --> $DIR/union-fields-2.rs:20:9
+  --> $DIR/union-fields-2.rs:17:9
    |
 LL |     let U { a, b } = u;
    |         ^^^^^^^^^^
 
 error: union patterns should have exactly one field
-  --> $DIR/union-fields-2.rs:21:9
+  --> $DIR/union-fields-2.rs:18:9
    |
 LL |     let U { a, b, c } = u;
    |         ^^^^^^^^^^^^^
 
 error[E0026]: union `U` does not have a field named `c`
-  --> $DIR/union-fields-2.rs:21:19
+  --> $DIR/union-fields-2.rs:18:19
    |
 LL |     let U { a, b, c } = u;
    |                   ^ union `U` does not have this field
 
 error: union patterns should have exactly one field
-  --> $DIR/union-fields-2.rs:23:9
+  --> $DIR/union-fields-2.rs:20:9
    |
 LL |     let U { .. } = u;
    |         ^^^^^^^^
 
 error: `..` cannot be used in union patterns
-  --> $DIR/union-fields-2.rs:23:9
+  --> $DIR/union-fields-2.rs:20:9
    |
 LL |     let U { .. } = u;
    |         ^^^^^^^^
 
 error: `..` cannot be used in union patterns
-  --> $DIR/union-fields-2.rs:25:9
+  --> $DIR/union-fields-2.rs:22:9
    |
 LL |     let U { a, .. } = u;
    |         ^^^^^^^^^^^
diff --git a/tests/ui/union/union-generic-rpass.rs b/tests/ui/union/union-generic-rpass.rs
index 25f1f5050f9..69837f31cab 100644
--- a/tests/ui/union/union-generic-rpass.rs
+++ b/tests/ui/union/union-generic-rpass.rs
@@ -1,7 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![allow(dead_code)]
 
 use std::mem::ManuallyDrop;
diff --git a/tests/ui/union/union-generic.rs b/tests/ui/union/union-generic.rs
index 3d68ecb87d8..ff877892579 100644
--- a/tests/ui/union/union-generic.rs
+++ b/tests/ui/union/union-generic.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 use std::rc::Rc;
 
 union U<T: Copy> {
diff --git a/tests/ui/union/union-generic.mirunsafeck.stderr b/tests/ui/union/union-generic.stderr
index 037022a91fc..b9d4aee787e 100644
--- a/tests/ui/union/union-generic.mirunsafeck.stderr
+++ b/tests/ui/union/union-generic.stderr
@@ -1,23 +1,23 @@
 error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
-  --> $DIR/union-generic.rs:11:13
+  --> $DIR/union-generic.rs:8:13
    |
 LL |     let u = U { a: Rc::new(0u32) };
    |             ^ the trait `Copy` is not implemented for `Rc<u32>`
    |
 note: required by a bound in `U`
-  --> $DIR/union-generic.rs:6:12
+  --> $DIR/union-generic.rs:3:12
    |
 LL | union U<T: Copy> {
    |            ^^^^ required by this bound in `U`
 
 error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
-  --> $DIR/union-generic.rs:13:17
+  --> $DIR/union-generic.rs:10:17
    |
 LL |     let u = U::<Rc<u32>> { a: Default::default() };
    |                 ^^^^^^^ the trait `Copy` is not implemented for `Rc<u32>`
    |
 note: required by a bound in `U`
-  --> $DIR/union-generic.rs:6:12
+  --> $DIR/union-generic.rs:3:12
    |
 LL | union U<T: Copy> {
    |            ^^^^ required by this bound in `U`
diff --git a/tests/ui/union/union-generic.thirunsafeck.stderr b/tests/ui/union/union-generic.thirunsafeck.stderr
deleted file mode 100644
index 037022a91fc..00000000000
--- a/tests/ui/union/union-generic.thirunsafeck.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
-  --> $DIR/union-generic.rs:11:13
-   |
-LL |     let u = U { a: Rc::new(0u32) };
-   |             ^ the trait `Copy` is not implemented for `Rc<u32>`
-   |
-note: required by a bound in `U`
-  --> $DIR/union-generic.rs:6:12
-   |
-LL | union U<T: Copy> {
-   |            ^^^^ required by this bound in `U`
-
-error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
-  --> $DIR/union-generic.rs:13:17
-   |
-LL |     let u = U::<Rc<u32>> { a: Default::default() };
-   |                 ^^^^^^^ the trait `Copy` is not implemented for `Rc<u32>`
-   |
-note: required by a bound in `U`
-  --> $DIR/union-generic.rs:6:12
-   |
-LL | union U<T: Copy> {
-   |            ^^^^ required by this bound in `U`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/union/union-inherent-method.rs b/tests/ui/union/union-inherent-method.rs
index b0fd22da73a..2e75cce7b10 100644
--- a/tests/ui/union/union-inherent-method.rs
+++ b/tests/ui/union/union-inherent-method.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 union U {
     a: u8,
diff --git a/tests/ui/union/union-lint-dead-code.mirunsafeck.stderr b/tests/ui/union/union-lint-dead-code.mirunsafeck.stderr
deleted file mode 100644
index 8a3677d525d..00000000000
--- a/tests/ui/union/union-lint-dead-code.mirunsafeck.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error: field `b` is never read
-  --> $DIR/union-lint-dead-code.rs:8:5
-   |
-LL | union Foo {
-   |       --- field in this union
-LL |     x: usize,
-LL |     b: bool,
-   |     ^
-   |
-note: the lint level is defined here
-  --> $DIR/union-lint-dead-code.rs:4:9
-   |
-LL | #![deny(dead_code)]
-   |         ^^^^^^^^^
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/union/union-lint-dead-code.rs b/tests/ui/union/union-lint-dead-code.rs
index 65aaf0a1d35..cb2cdd4dba0 100644
--- a/tests/ui/union/union-lint-dead-code.rs
+++ b/tests/ui/union/union-lint-dead-code.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![deny(dead_code)]
 
 union Foo {
diff --git a/tests/ui/union/union-lint-dead-code.thirunsafeck.stderr b/tests/ui/union/union-lint-dead-code.stderr
index 8a3677d525d..691a5e19ae6 100644
--- a/tests/ui/union/union-lint-dead-code.thirunsafeck.stderr
+++ b/tests/ui/union/union-lint-dead-code.stderr
@@ -1,5 +1,5 @@
 error: field `b` is never read
-  --> $DIR/union-lint-dead-code.rs:8:5
+  --> $DIR/union-lint-dead-code.rs:5:5
    |
 LL | union Foo {
    |       --- field in this union
@@ -8,7 +8,7 @@ LL |     b: bool,
    |     ^
    |
 note: the lint level is defined here
-  --> $DIR/union-lint-dead-code.rs:4:9
+  --> $DIR/union-lint-dead-code.rs:1:9
    |
 LL | #![deny(dead_code)]
    |         ^^^^^^^^^
diff --git a/tests/ui/union/union-macro.rs b/tests/ui/union/union-macro.rs
index 7fd9d8221c6..5ca013a44cd 100644
--- a/tests/ui/union/union-macro.rs
+++ b/tests/ui/union/union-macro.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![allow(unused_variables)]
 
diff --git a/tests/ui/union/union-manuallydrop-rpass.rs b/tests/ui/union/union-manuallydrop-rpass.rs
index 826bdf07cef..ba99e7441e6 100644
--- a/tests/ui/union/union-manuallydrop-rpass.rs
+++ b/tests/ui/union/union-manuallydrop-rpass.rs
@@ -1,7 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![allow(dead_code)]
 
 use std::mem::needs_drop;
@@ -28,9 +25,9 @@ union UnionOk3<T: Copy> {
     value: T,
 }
 
-trait Foo { }
+trait Foo {}
 
-trait ImpliesCopy : Copy { }
+trait ImpliesCopy: Copy {}
 
 #[allow(dead_code)]
 union UnionOk4<T: ImpliesCopy> {
diff --git a/tests/ui/union/union-move.rs b/tests/ui/union/union-move.rs
index b8b1ac8046a..76220a7d40a 100644
--- a/tests/ui/union/union-move.rs
+++ b/tests/ui/union/union-move.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 //! Test the behavior of moving out of non-`Copy` union fields.
 //! Avoid types that `Drop`, we want to focus on moving.
 
diff --git a/tests/ui/union/union-move.mirunsafeck.stderr b/tests/ui/union/union-move.stderr
index 6381ae874ba..47fb801a50e 100644
--- a/tests/ui/union/union-move.mirunsafeck.stderr
+++ b/tests/ui/union/union-move.stderr
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `x`
-  --> $DIR/union-move.rs:29:18
+  --> $DIR/union-move.rs:26:18
    |
 LL | fn test1(x: U1) {
    |          - move occurs because `x` has type `U1`, which does not implement the `Copy` trait
@@ -10,7 +10,7 @@ LL |         move_out(x.f2_nocopy);
    |                  ^^^^^^^^^^^ value used here after move
    |
 note: consider changing this parameter type in function `move_out` to borrow instead if owning the value isn't necessary
-  --> $DIR/union-move.rs:10:19
+  --> $DIR/union-move.rs:7:19
    |
 LL | fn move_out<T>(x: T) {}
    |    --------       ^ this parameter takes ownership of the value
@@ -18,7 +18,7 @@ LL | fn move_out<T>(x: T) {}
    |    in this function
 
 error[E0382]: use of moved value: `x`
-  --> $DIR/union-move.rs:45:18
+  --> $DIR/union-move.rs:42:18
    |
 LL | fn test3(x: U1) {
    |          - move occurs because `x` has type `U1`, which does not implement the `Copy` trait
@@ -29,7 +29,7 @@ LL |         move_out(x.f3_copy);
    |                  ^^^^^^^^^ value used here after move
    |
 note: consider changing this parameter type in function `move_out` to borrow instead if owning the value isn't necessary
-  --> $DIR/union-move.rs:10:19
+  --> $DIR/union-move.rs:7:19
    |
 LL | fn move_out<T>(x: T) {}
    |    --------       ^ this parameter takes ownership of the value
@@ -37,7 +37,7 @@ LL | fn move_out<T>(x: T) {}
    |    in this function
 
 error[E0509]: cannot move out of type `U2`, which implements the `Drop` trait
-  --> $DIR/union-move.rs:52:18
+  --> $DIR/union-move.rs:49:18
    |
 LL |         move_out(x.f1_nocopy);
    |                  ^^^^^^^^^^^
diff --git a/tests/ui/union/union-move.thirunsafeck.stderr b/tests/ui/union/union-move.thirunsafeck.stderr
deleted file mode 100644
index 6381ae874ba..00000000000
--- a/tests/ui/union/union-move.thirunsafeck.stderr
+++ /dev/null
@@ -1,51 +0,0 @@
-error[E0382]: use of moved value: `x`
-  --> $DIR/union-move.rs:29:18
-   |
-LL | fn test1(x: U1) {
-   |          - move occurs because `x` has type `U1`, which does not implement the `Copy` trait
-...
-LL |         move_out(x.f1_nocopy);
-   |                  ----------- value moved here
-LL |         move_out(x.f2_nocopy);
-   |                  ^^^^^^^^^^^ value used here after move
-   |
-note: consider changing this parameter type in function `move_out` to borrow instead if owning the value isn't necessary
-  --> $DIR/union-move.rs:10:19
-   |
-LL | fn move_out<T>(x: T) {}
-   |    --------       ^ this parameter takes ownership of the value
-   |    |
-   |    in this function
-
-error[E0382]: use of moved value: `x`
-  --> $DIR/union-move.rs:45:18
-   |
-LL | fn test3(x: U1) {
-   |          - move occurs because `x` has type `U1`, which does not implement the `Copy` trait
-...
-LL |         move_out(x.f2_nocopy);
-   |                  ----------- value moved here
-LL |         move_out(x.f3_copy);
-   |                  ^^^^^^^^^ value used here after move
-   |
-note: consider changing this parameter type in function `move_out` to borrow instead if owning the value isn't necessary
-  --> $DIR/union-move.rs:10:19
-   |
-LL | fn move_out<T>(x: T) {}
-   |    --------       ^ this parameter takes ownership of the value
-   |    |
-   |    in this function
-
-error[E0509]: cannot move out of type `U2`, which implements the `Drop` trait
-  --> $DIR/union-move.rs:52:18
-   |
-LL |         move_out(x.f1_nocopy);
-   |                  ^^^^^^^^^^^
-   |                  |
-   |                  cannot move out of here
-   |                  move occurs because `x.f1_nocopy` has type `ManuallyDrop<RefCell<i32>>`, which does not implement the `Copy` trait
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0382, E0509.
-For more information about an error, try `rustc --explain E0382`.
diff --git a/tests/ui/union/union-nodrop.rs b/tests/ui/union/union-nodrop.rs
index 6e6b105a73e..7ce17a7c825 100644
--- a/tests/ui/union/union-nodrop.rs
+++ b/tests/ui/union/union-nodrop.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![allow(dead_code)]
 
@@ -19,10 +17,14 @@ static X: () = (NoDrop { inner: ManuallyDrop::new(NeedDrop) }, ()).1;
 
 const Y: () = (NoDrop { inner: ManuallyDrop::new(NeedDrop) }, ()).1;
 
-const fn _f() { (NoDrop { inner: ManuallyDrop::new(NeedDrop) }, ()).1 }
+const fn _f() {
+    (NoDrop { inner: ManuallyDrop::new(NeedDrop) }, ()).1
+}
 
 // A union that scrubs the drop glue from its inner type
-union NoDrop<T> { inner: ManuallyDrop<T> }
+union NoDrop<T> {
+    inner: ManuallyDrop<T>,
+}
 
 // Copy currently can't be implemented on drop-containing unions,
 // this may change later
@@ -35,7 +37,7 @@ union NoDrop<T> { inner: ManuallyDrop<T> }
 // // We should be able to implement Copy for things using NoDrop
 // #[derive(Copy, Clone)]
 struct Foo {
-    x: NoDrop<Box<u8>>
+    x: NoDrop<Box<u8>>,
 }
 
 struct Baz {
@@ -43,7 +45,9 @@ struct Baz {
     y: Box<u8>,
 }
 
-union ActuallyDrop<T> { inner: ManuallyDrop<T> }
+union ActuallyDrop<T> {
+    inner: ManuallyDrop<T>,
+}
 
 impl<T> Drop for ActuallyDrop<T> {
     fn drop(&mut self) {}
diff --git a/tests/ui/union/union-nonzero.rs b/tests/ui/union/union-nonzero.rs
index 3f4f7ea1c10..e7ab4ebe323 100644
--- a/tests/ui/union/union-nonzero.rs
+++ b/tests/ui/union/union-nonzero.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![allow(dead_code)]
 
diff --git a/tests/ui/union/union-overwrite.rs b/tests/ui/union/union-overwrite.rs
index 0eea14d9de0..399ed9ae458 100644
--- a/tests/ui/union/union-overwrite.rs
+++ b/tests/ui/union/union-overwrite.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #[repr(C)]
 #[derive(Copy, Clone)]
diff --git a/tests/ui/union/union-packed.rs b/tests/ui/union/union-packed.rs
index 9c6398bf5aa..538c337a773 100644
--- a/tests/ui/union/union-packed.rs
+++ b/tests/ui/union/union-packed.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![allow(dead_code)]
 #![allow(non_snake_case)]
diff --git a/tests/ui/union/union-pat-refutability.rs b/tests/ui/union/union-pat-refutability.rs
index d628a200a07..17ac6c6dfa9 100644
--- a/tests/ui/union/union-pat-refutability.rs
+++ b/tests/ui/union/union-pat-refutability.rs
@@ -1,12 +1,13 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 #![allow(dead_code)]
 #![allow(illegal_floating_point_literal_pattern)]
 
 #[repr(u32)]
-enum Tag { I, F }
+enum Tag {
+    I,
+    F,
+}
 
 #[repr(C)]
 union U {
diff --git a/tests/ui/union/union-suggest-field.rs b/tests/ui/union/union-suggest-field.rs
index 601a22a0600..71b93e873c2 100644
--- a/tests/ui/union/union-suggest-field.rs
+++ b/tests/ui/union/union-suggest-field.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 union U {
     principal: u8,
 }
diff --git a/tests/ui/union/union-suggest-field.mirunsafeck.stderr b/tests/ui/union/union-suggest-field.stderr
index efe4987bd02..5c428cf6c89 100644
--- a/tests/ui/union/union-suggest-field.mirunsafeck.stderr
+++ b/tests/ui/union/union-suggest-field.stderr
@@ -1,5 +1,5 @@
 error[E0560]: union `U` has no field named `principle`
-  --> $DIR/union-suggest-field.rs:13:17
+  --> $DIR/union-suggest-field.rs:10:17
    |
 LL |     let u = U { principle: 0 };
    |                 ^^^^^^^^^ unknown field
@@ -10,7 +10,7 @@ LL |     let u = U { principal: 0 };
    |                 ~~~~~~~~~
 
 error[E0609]: no field `principial` on type `U`
-  --> $DIR/union-suggest-field.rs:17:15
+  --> $DIR/union-suggest-field.rs:14:15
    |
 LL |     let w = u.principial;
    |               ^^^^^^^^^^ unknown field
@@ -21,7 +21,7 @@ LL |     let w = u.principal;
    |               ~~~~~~~~~
 
 error[E0615]: attempted to take value of method `calculate` on type `U`
-  --> $DIR/union-suggest-field.rs:21:15
+  --> $DIR/union-suggest-field.rs:18:15
    |
 LL |     let y = u.calculate;
    |               ^^^^^^^^^ method, not a field
diff --git a/tests/ui/union/union-suggest-field.thirunsafeck.stderr b/tests/ui/union/union-suggest-field.thirunsafeck.stderr
deleted file mode 100644
index efe4987bd02..00000000000
--- a/tests/ui/union/union-suggest-field.thirunsafeck.stderr
+++ /dev/null
@@ -1,37 +0,0 @@
-error[E0560]: union `U` has no field named `principle`
-  --> $DIR/union-suggest-field.rs:13:17
-   |
-LL |     let u = U { principle: 0 };
-   |                 ^^^^^^^^^ unknown field
-   |
-help: a field with a similar name exists
-   |
-LL |     let u = U { principal: 0 };
-   |                 ~~~~~~~~~
-
-error[E0609]: no field `principial` on type `U`
-  --> $DIR/union-suggest-field.rs:17:15
-   |
-LL |     let w = u.principial;
-   |               ^^^^^^^^^^ unknown field
-   |
-help: a field with a similar name exists
-   |
-LL |     let w = u.principal;
-   |               ~~~~~~~~~
-
-error[E0615]: attempted to take value of method `calculate` on type `U`
-  --> $DIR/union-suggest-field.rs:21:15
-   |
-LL |     let y = u.calculate;
-   |               ^^^^^^^^^ method, not a field
-   |
-help: use parentheses to call the method
-   |
-LL |     let y = u.calculate();
-   |                        ++
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0560, E0609, E0615.
-For more information about an error, try `rustc --explain E0560`.
diff --git a/tests/ui/union/union-trait-impl.rs b/tests/ui/union/union-trait-impl.rs
index 6134e91f31e..8a7ac817240 100644
--- a/tests/ui/union/union-trait-impl.rs
+++ b/tests/ui/union/union-trait-impl.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 use std::fmt;
 
diff --git a/tests/ui/union/union-transmute.rs b/tests/ui/union/union-transmute.rs
index 1a3b32d55f3..be8062f6276 100644
--- a/tests/ui/union/union-transmute.rs
+++ b/tests/ui/union/union-transmute.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 
 union U {
     a: (u8, u8),
diff --git a/tests/ui/union/union-unsafe.mir.stderr b/tests/ui/union/union-unsafe.mir.stderr
deleted file mode 100644
index 15f059ffa48..00000000000
--- a/tests/ui/union/union-unsafe.mir.stderr
+++ /dev/null
@@ -1,83 +0,0 @@
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:34:5
-   |
-LL |     *(u.p) = 13;
-   |     ^^^^^^^^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:47:6
-   |
-LL |     *u3.a = T::default();
-   |      ^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:53:6
-   |
-LL |     *u3.a = T::default();
-   |      ^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:61:13
-   |
-LL |     let a = u1.a;
-   |             ^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:64:14
-   |
-LL |     let U1 { a } = u1;
-   |              ^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:65:12
-   |
-LL |     if let U1 { a: 12 } = u1 {}
-   |            ^^^^^^^^^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:66:12
-   |
-LL |     if let Some(U1 { a: 13 }) = Some(u1) {}
-   |            ^^^^^^^^^^^^^^^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:71:6
-   |
-LL |     *u2.a = String::from("new");
-   |      ^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:75:6
-   |
-LL |     *u3.a = 1;
-   |      ^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:79:6
-   |
-LL |     *u3.a = String::from("new");
-   |      ^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error: aborting due to 10 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/union/union-unsafe.rs b/tests/ui/union/union-unsafe.rs
index d1465486f77..bd3946686be 100644
--- a/tests/ui/union/union-unsafe.rs
+++ b/tests/ui/union/union-unsafe.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 use std::cell::RefCell;
 use std::mem::ManuallyDrop;
 
@@ -35,7 +32,6 @@ fn deref_union_field(mut u: URef) {
 }
 
 fn assign_noncopy_union_field(mut u: URefCell) {
-    // FIXME(thir-unsafeck)
     u.a = (ManuallyDrop::new(RefCell::new(0)), 1); // OK (assignment does not drop)
     u.a.0 = ManuallyDrop::new(RefCell::new(0)); // OK (assignment does not drop)
     u.a.1 = 1; // OK
diff --git a/tests/ui/union/union-unsafe.thir.stderr b/tests/ui/union/union-unsafe.stderr
index 9ce835497c5..82b3f897167 100644
--- a/tests/ui/union/union-unsafe.thir.stderr
+++ b/tests/ui/union/union-unsafe.stderr
@@ -1,5 +1,5 @@
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:34:6
+  --> $DIR/union-unsafe.rs:31:6
    |
 LL |     *(u.p) = 13;
    |      ^^^^^ access to union field
@@ -7,7 +7,7 @@ LL |     *(u.p) = 13;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:47:6
+  --> $DIR/union-unsafe.rs:43:6
    |
 LL |     *u3.a = T::default();
    |      ^^^^ access to union field
@@ -15,7 +15,7 @@ LL |     *u3.a = T::default();
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:53:6
+  --> $DIR/union-unsafe.rs:49:6
    |
 LL |     *u3.a = T::default();
    |      ^^^^ access to union field
@@ -23,7 +23,7 @@ LL |     *u3.a = T::default();
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:61:13
+  --> $DIR/union-unsafe.rs:57:13
    |
 LL |     let a = u1.a;
    |             ^^^^ access to union field
@@ -31,7 +31,7 @@ LL |     let a = u1.a;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:64:14
+  --> $DIR/union-unsafe.rs:60:14
    |
 LL |     let U1 { a } = u1;
    |              ^ access to union field
@@ -39,7 +39,7 @@ LL |     let U1 { a } = u1;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:65:20
+  --> $DIR/union-unsafe.rs:61:20
    |
 LL |     if let U1 { a: 12 } = u1 {}
    |                    ^^ access to union field
@@ -47,7 +47,7 @@ LL |     if let U1 { a: 12 } = u1 {}
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:66:25
+  --> $DIR/union-unsafe.rs:62:25
    |
 LL |     if let Some(U1 { a: 13 }) = Some(u1) {}
    |                         ^^ access to union field
@@ -55,7 +55,7 @@ LL |     if let Some(U1 { a: 13 }) = Some(u1) {}
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:71:6
+  --> $DIR/union-unsafe.rs:67:6
    |
 LL |     *u2.a = String::from("new");
    |      ^^^^ access to union field
@@ -63,7 +63,7 @@ LL |     *u2.a = String::from("new");
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:75:6
+  --> $DIR/union-unsafe.rs:71:6
    |
 LL |     *u3.a = 1;
    |      ^^^^ access to union field
@@ -71,7 +71,7 @@ LL |     *u3.a = 1;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:79:6
+  --> $DIR/union-unsafe.rs:75:6
    |
 LL |     *u3.a = String::from("new");
    |      ^^^^ access to union field
diff --git a/tests/ui/union/union-unsized.rs b/tests/ui/union/union-unsized.rs
index b95b2e414f3..5dd32192ab9 100644
--- a/tests/ui/union/union-unsized.rs
+++ b/tests/ui/union/union-unsized.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 union U {
     a: str,
     //~^ ERROR the size for values of type
diff --git a/tests/ui/union/union-unsized.mirunsafeck.stderr b/tests/ui/union/union-unsized.stderr
index f8da20413b2..851ad8939d4 100644
--- a/tests/ui/union/union-unsized.mirunsafeck.stderr
+++ b/tests/ui/union/union-unsized.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/union-unsized.rs:5:8
+  --> $DIR/union-unsized.rs:2:8
    |
 LL |     a: str,
    |        ^^^ doesn't have a size known at compile-time
@@ -16,8 +16,20 @@ help: the `Box` type always has a statically known size and allocates its conten
 LL |     a: Box<str>,
    |        ++++   +
 
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/union-unsized.rs:2:5
+   |
+LL |     a: str,
+   |     ^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL |     a: std::mem::ManuallyDrop<str>,
+   |        +++++++++++++++++++++++   +
+
 error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/union-unsized.rs:14:8
+  --> $DIR/union-unsized.rs:11:8
    |
 LL |     b: str,
    |        ^^^ doesn't have a size known at compile-time
@@ -35,19 +47,7 @@ LL |     b: Box<str>,
    |        ++++   +
 
 error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/union-unsized.rs:5:5
-   |
-LL |     a: str,
-   |     ^^^^^^
-   |
-   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
-help: wrap the field type in `ManuallyDrop<...>`
-   |
-LL |     a: std::mem::ManuallyDrop<str>,
-   |        +++++++++++++++++++++++   +
-
-error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/union-unsized.rs:14:5
+  --> $DIR/union-unsized.rs:11:5
    |
 LL |     b: str,
    |     ^^^^^^
diff --git a/tests/ui/union/union-unsized.thirunsafeck.stderr b/tests/ui/union/union-unsized.thirunsafeck.stderr
deleted file mode 100644
index f8da20413b2..00000000000
--- a/tests/ui/union/union-unsized.thirunsafeck.stderr
+++ /dev/null
@@ -1,64 +0,0 @@
-error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/union-unsized.rs:5:8
-   |
-LL |     a: str,
-   |        ^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `str`
-   = note: no field of a union may have a dynamically sized type
-   = help: change the field's type to have a statically known size
-help: borrowed types always have a statically known size
-   |
-LL |     a: &str,
-   |        +
-help: the `Box` type always has a statically known size and allocates its contents in the heap
-   |
-LL |     a: Box<str>,
-   |        ++++   +
-
-error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/union-unsized.rs:14:8
-   |
-LL |     b: str,
-   |        ^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `str`
-   = note: no field of a union may have a dynamically sized type
-   = help: change the field's type to have a statically known size
-help: borrowed types always have a statically known size
-   |
-LL |     b: &str,
-   |        +
-help: the `Box` type always has a statically known size and allocates its contents in the heap
-   |
-LL |     b: Box<str>,
-   |        ++++   +
-
-error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/union-unsized.rs:5:5
-   |
-LL |     a: str,
-   |     ^^^^^^
-   |
-   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
-help: wrap the field type in `ManuallyDrop<...>`
-   |
-LL |     a: std::mem::ManuallyDrop<str>,
-   |        +++++++++++++++++++++++   +
-
-error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/union-unsized.rs:14:5
-   |
-LL |     b: str,
-   |     ^^^^^^
-   |
-   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
-help: wrap the field type in `ManuallyDrop<...>`
-   |
-LL |     b: std::mem::ManuallyDrop<str>,
-   |        +++++++++++++++++++++++   +
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0277, E0740.
-For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/union/union-with-drop-fields.rs b/tests/ui/union/union-with-drop-fields.rs
index 9720830fb1f..ae147e9bd2b 100644
--- a/tests/ui/union/union-with-drop-fields.rs
+++ b/tests/ui/union/union-with-drop-fields.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![allow(dead_code)]
 
 union U {
diff --git a/tests/ui/union/union-with-drop-fields.mirunsafeck.stderr b/tests/ui/union/union-with-drop-fields.stderr
index 9861a21cb3d..6328be56540 100644
--- a/tests/ui/union/union-with-drop-fields.mirunsafeck.stderr
+++ b/tests/ui/union/union-with-drop-fields.stderr
@@ -1,5 +1,5 @@
 error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/union-with-drop-fields.rs:11:5
+  --> $DIR/union-with-drop-fields.rs:8:5
    |
 LL |     a: String,
    |     ^^^^^^^^^
@@ -11,7 +11,7 @@ LL |     a: std::mem::ManuallyDrop<String>,
    |        +++++++++++++++++++++++      +
 
 error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/union-with-drop-fields.rs:19:5
+  --> $DIR/union-with-drop-fields.rs:16:5
    |
 LL |     a: S,
    |     ^^^^
@@ -23,7 +23,7 @@ LL |     a: std::mem::ManuallyDrop<S>,
    |        +++++++++++++++++++++++ +
 
 error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/union-with-drop-fields.rs:24:5
+  --> $DIR/union-with-drop-fields.rs:21:5
    |
 LL |     a: T,
    |     ^^^^
diff --git a/tests/ui/union/union-with-drop-fields.thirunsafeck.stderr b/tests/ui/union/union-with-drop-fields.thirunsafeck.stderr
deleted file mode 100644
index 9861a21cb3d..00000000000
--- a/tests/ui/union/union-with-drop-fields.thirunsafeck.stderr
+++ /dev/null
@@ -1,39 +0,0 @@
-error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/union-with-drop-fields.rs:11:5
-   |
-LL |     a: String,
-   |     ^^^^^^^^^
-   |
-   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
-help: wrap the field type in `ManuallyDrop<...>`
-   |
-LL |     a: std::mem::ManuallyDrop<String>,
-   |        +++++++++++++++++++++++      +
-
-error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/union-with-drop-fields.rs:19:5
-   |
-LL |     a: S,
-   |     ^^^^
-   |
-   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
-help: wrap the field type in `ManuallyDrop<...>`
-   |
-LL |     a: std::mem::ManuallyDrop<S>,
-   |        +++++++++++++++++++++++ +
-
-error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/union-with-drop-fields.rs:24:5
-   |
-LL |     a: T,
-   |     ^^^^
-   |
-   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
-help: wrap the field type in `ManuallyDrop<...>`
-   |
-LL |     a: std::mem::ManuallyDrop<T>,
-   |        +++++++++++++++++++++++ +
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0740`.
diff --git a/tests/ui/unsafe/access_union_field.rs b/tests/ui/unsafe/access_union_field.rs
index 5c4e695df58..4183119725e 100644
--- a/tests/ui/unsafe/access_union_field.rs
+++ b/tests/ui/unsafe/access_union_field.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 #![allow(unused_variables)]
 
 union Foo {
diff --git a/tests/ui/unsafe/access_union_field.mir.stderr b/tests/ui/unsafe/access_union_field.stderr
index 98bc4077793..4c46bb44a1d 100644
--- a/tests/ui/unsafe/access_union_field.mir.stderr
+++ b/tests/ui/unsafe/access_union_field.stderr
@@ -1,5 +1,5 @@
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/access_union_field.rs:13:13
+  --> $DIR/access_union_field.rs:10:13
    |
 LL |     let a = foo.bar;
    |             ^^^^^^^ access to union field
@@ -7,7 +7,7 @@ LL |     let a = foo.bar;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/access_union_field.rs:14:13
+  --> $DIR/access_union_field.rs:11:13
    |
 LL |     let b = foo.baz;
    |             ^^^^^^^ access to union field
diff --git a/tests/ui/unsafe/access_union_field.thir.stderr b/tests/ui/unsafe/access_union_field.thir.stderr
deleted file mode 100644
index 98bc4077793..00000000000
--- a/tests/ui/unsafe/access_union_field.thir.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/access_union_field.rs:13:13
-   |
-LL |     let a = foo.bar;
-   |             ^^^^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/access_union_field.rs:14:13
-   |
-LL |     let b = foo.baz;
-   |             ^^^^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/const_pat_in_layout_restricted.rs b/tests/ui/unsafe/const_pat_in_layout_restricted.rs
new file mode 100644
index 00000000000..5bc7a7113e4
--- /dev/null
+++ b/tests/ui/unsafe/const_pat_in_layout_restricted.rs
@@ -0,0 +1,24 @@
+// 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
+
+#![allow(incomplete_features)]
+#![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/unsafe/edition-2024-unsafe_op_in_unsafe_fn.mir.stderr b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.mir.stderr
deleted file mode 100644
index ea53bf59d31..00000000000
--- a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.mir.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-warning: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:13:5
-   |
-LL |     unsf();
-   |     ^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:12:1
-   |
-LL | unsafe fn foo() {
-   | ^^^^^^^^^^^^^^^
-   = note: `#[warn(unsafe_op_in_unsafe_fn)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs
index 1b429955cb0..f84f12c8301 100644
--- a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs
+++ b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs
@@ -1,9 +1,6 @@
 // edition: 2024
 // compile-flags: -Zunstable-options
 // check-pass
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
-
 #![crate_type = "lib"]
 #![deny(unused_unsafe)]
 
@@ -11,8 +8,7 @@ unsafe fn unsf() {}
 
 unsafe fn foo() {
     unsf();
-    //[mir]~^ WARN call to unsafe function is unsafe and requires unsafe block
-    //[thir]~^^ WARN call to unsafe function `unsf` is unsafe and requires unsafe block
+    //~^ WARN call to unsafe function `unsf` is unsafe and requires unsafe block
 
     // no unused_unsafe
     unsafe {
diff --git a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.thir.stderr b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr
index d63843ed2b3..1187c2d80f3 100644
--- a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.thir.stderr
+++ b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr
@@ -1,12 +1,12 @@
 warning: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
-  --> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:13:5
+  --> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:10:5
    |
 LL |     unsf();
    |     ^^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:12:1
+  --> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:9:1
    |
 LL | unsafe fn foo() {
    | ^^^^^^^^^^^^^^^
diff --git a/tests/ui/unsafe/foreign-unsafe-fn-called.mir.stderr b/tests/ui/unsafe/foreign-unsafe-fn-called.mir.stderr
deleted file mode 100644
index 5157dbb514b..00000000000
--- a/tests/ui/unsafe/foreign-unsafe-fn-called.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/foreign-unsafe-fn-called.rs:11:5
-   |
-LL |     test::free();
-   |     ^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/foreign-unsafe-fn-called.rs b/tests/ui/unsafe/foreign-unsafe-fn-called.rs
index 67302ea1bcd..b5065beb5fc 100644
--- a/tests/ui/unsafe/foreign-unsafe-fn-called.rs
+++ b/tests/ui/unsafe/foreign-unsafe-fn-called.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 mod test {
     extern "C" {
         pub fn free();
@@ -9,6 +6,5 @@ mod test {
 
 fn main() {
     test::free();
-    //[mir]~^ ERROR call to unsafe function is unsafe
-    //[thir]~^^ ERROR call to unsafe function `test::free` is unsafe
+    //~^ ERROR call to unsafe function `test::free` is unsafe
 }
diff --git a/tests/ui/unsafe/foreign-unsafe-fn-called.thir.stderr b/tests/ui/unsafe/foreign-unsafe-fn-called.stderr
index 8c221314cd7..cf2d4c493a1 100644
--- a/tests/ui/unsafe/foreign-unsafe-fn-called.thir.stderr
+++ b/tests/ui/unsafe/foreign-unsafe-fn-called.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `test::free` is unsafe and requires unsafe function or block
-  --> $DIR/foreign-unsafe-fn-called.rs:11:5
+  --> $DIR/foreign-unsafe-fn-called.rs:8:5
    |
 LL |     test::free();
    |     ^^^^^^^^^^^^ call to unsafe function
diff --git a/tests/ui/unsafe/inline_asm.mir.stderr b/tests/ui/unsafe/inline_asm.mir.stderr
deleted file mode 100644
index e38a9388a78..00000000000
--- a/tests/ui/unsafe/inline_asm.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: use of inline assembly is unsafe and requires unsafe function or block
-  --> $DIR/inline_asm.rs:8:5
-   |
-LL |     asm!("nop");
-   |     ^^^^^^^^^^^ use of inline assembly
-   |
-   = note: inline assembly is entirely unchecked and can cause undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/inline_asm.rs b/tests/ui/unsafe/inline_asm.rs
index 12c7efe4f50..df45b8640c1 100644
--- a/tests/ui/unsafe/inline_asm.rs
+++ b/tests/ui/unsafe/inline_asm.rs
@@ -1,5 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 // needs-asm-support
 
 use std::arch::asm;
diff --git a/tests/ui/unsafe/inline_asm.thir.stderr b/tests/ui/unsafe/inline_asm.stderr
index e38a9388a78..1e829152a72 100644
--- a/tests/ui/unsafe/inline_asm.thir.stderr
+++ b/tests/ui/unsafe/inline_asm.stderr
@@ -1,5 +1,5 @@
 error[E0133]: use of inline assembly is unsafe and requires unsafe function or block
-  --> $DIR/inline_asm.rs:8:5
+  --> $DIR/inline_asm.rs:6:5
    |
 LL |     asm!("nop");
    |     ^^^^^^^^^^^ use of inline assembly
diff --git a/tests/ui/unsafe/issue-3080.mir.stderr b/tests/ui/unsafe/issue-3080.mir.stderr
deleted file mode 100644
index a1ad98d205e..00000000000
--- a/tests/ui/unsafe/issue-3080.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/issue-3080.rs:10:5
-   |
-LL |     X(()).with();
-   |     ^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/issue-3080.rs b/tests/ui/unsafe/issue-3080.rs
index 2b5269dda8f..883f3bfd24e 100644
--- a/tests/ui/unsafe/issue-3080.rs
+++ b/tests/ui/unsafe/issue-3080.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 struct X(());
 impl X {
     pub unsafe fn with(&self) { }
diff --git a/tests/ui/unsafe/issue-3080.thir.stderr b/tests/ui/unsafe/issue-3080.stderr
index 1018218b1b0..913a601049e 100644
--- a/tests/ui/unsafe/issue-3080.thir.stderr
+++ b/tests/ui/unsafe/issue-3080.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `X::with` is unsafe and requires unsafe function or block
-  --> $DIR/issue-3080.rs:10:5
+  --> $DIR/issue-3080.rs:7:5
    |
 LL |     X(()).with();
    |     ^^^^^^^^^^^^ call to unsafe function
diff --git a/tests/ui/unsafe/issue-45087-unreachable-unsafe.mir.stderr b/tests/ui/unsafe/issue-45087-unreachable-unsafe.mir.stderr
deleted file mode 100644
index e7960960774..00000000000
--- a/tests/ui/unsafe/issue-45087-unreachable-unsafe.mir.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-45087-unreachable-unsafe.rs:7:5
-   |
-LL |     *(1 as *mut u32) = 42;
-   |     ^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-45087-unreachable-unsafe.rs:17:5
-   |
-LL |     *a = 1;
-   |     ^^^^^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-45087-unreachable-unsafe.rs:29:5
-   |
-LL |     *b = 1;
-   |     ^^^^^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/issue-45087-unreachable-unsafe.rs b/tests/ui/unsafe/issue-45087-unreachable-unsafe.rs
index 3e3da667c0b..7c4bde185fb 100644
--- a/tests/ui/unsafe/issue-45087-unreachable-unsafe.rs
+++ b/tests/ui/unsafe/issue-45087-unreachable-unsafe.rs
@@ -1,6 +1,4 @@
 // Verify that unreachable code undergoes unsafety checks.
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 
 fn main() {
     return;
diff --git a/tests/ui/unsafe/issue-45087-unreachable-unsafe.thir.stderr b/tests/ui/unsafe/issue-45087-unreachable-unsafe.stderr
index e81adad4507..d6cc5fd2e08 100644
--- a/tests/ui/unsafe/issue-45087-unreachable-unsafe.thir.stderr
+++ b/tests/ui/unsafe/issue-45087-unreachable-unsafe.stderr
@@ -1,5 +1,5 @@
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-45087-unreachable-unsafe.rs:7:5
+  --> $DIR/issue-45087-unreachable-unsafe.rs:5:5
    |
 LL |     *(1 as *mut u32) = 42;
    |     ^^^^^^^^^^^^^^^^ dereference of raw pointer
@@ -7,7 +7,7 @@ LL |     *(1 as *mut u32) = 42;
    = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-45087-unreachable-unsafe.rs:17:5
+  --> $DIR/issue-45087-unreachable-unsafe.rs:15:5
    |
 LL |     *a = 1;
    |     ^^ dereference of raw pointer
@@ -15,7 +15,7 @@ LL |     *a = 1;
    = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-45087-unreachable-unsafe.rs:29:5
+  --> $DIR/issue-45087-unreachable-unsafe.rs:27:5
    |
 LL |     *b = 1;
    |     ^^ dereference of raw pointer
diff --git a/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.mir.stderr b/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.mir.stderr
deleted file mode 100644
index 9e9cbcf33ae..00000000000
--- a/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.mir.stderr
+++ /dev/null
@@ -1,35 +0,0 @@
-error: unnecessary `unsafe` block
-  --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:10:13
-   |
-LL |     unsafe {
-   |     ------ because it's nested under this `unsafe` block
-LL |         let f = |v: &mut Vec<_>| {
-LL |             unsafe {
-   |             ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:4:8
-   |
-LL | #[deny(unused_unsafe)]
-   |        ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:12:38
-   |
-LL |     unsafe {
-   |     ------ because it's nested under this `unsafe` block
-...
-LL |                 |w: &mut Vec<u32>| { unsafe {
-   |                                      ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:16:34
-   |
-LL |     unsafe {
-   |     ------ because it's nested under this `unsafe` block
-...
-LL |             |x: &mut Vec<u32>| { unsafe {
-   |                                  ^^^^^^ unnecessary `unsafe` block
-
-error: aborting due to 3 previous errors
-
diff --git a/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.rs b/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.rs
index ac1cfd62a05..de275ff701a 100644
--- a/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.rs
+++ b/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
-
 #[deny(unused_unsafe)]
 fn main() {
     let mut v = Vec::<i32>::with_capacity(24);
diff --git a/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.thir.stderr b/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.stderr
index 2267da31512..b23c002dc65 100644
--- a/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.thir.stderr
+++ b/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.stderr
@@ -1,5 +1,5 @@
 error: unnecessary `unsafe` block
-  --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:10:13
+  --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:7:13
    |
 LL |     unsafe {
    |     ------ because it's nested under this `unsafe` block
@@ -8,13 +8,13 @@ LL |             unsafe {
    |             ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:4:8
+  --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:1:8
    |
 LL | #[deny(unused_unsafe)]
    |        ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:12:38
+  --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:9:38
    |
 LL |             unsafe {
    |             ------ because it's nested under this `unsafe` block
@@ -23,7 +23,7 @@ LL |                 |w: &mut Vec<u32>| { unsafe {
    |                                      ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:16:34
+  --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:13:34
    |
 LL |     unsafe {
    |     ------ because it's nested under this `unsafe` block
diff --git a/tests/ui/unsafe/issue-47412.rs b/tests/ui/unsafe/issue-47412.rs
index df6d6e4222e..2d1ea72280b 100644
--- a/tests/ui/unsafe/issue-47412.rs
+++ b/tests/ui/unsafe/issue-47412.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 #[derive(Copy, Clone)]
 enum Void {}
 
diff --git a/tests/ui/unsafe/issue-47412.mir.stderr b/tests/ui/unsafe/issue-47412.stderr
index 305f482e8c2..aebcbf07463 100644
--- a/tests/ui/unsafe/issue-47412.mir.stderr
+++ b/tests/ui/unsafe/issue-47412.stderr
@@ -1,5 +1,5 @@
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/issue-47412.rs:14:11
+  --> $DIR/issue-47412.rs:11:11
    |
 LL |     match u.void {}
    |           ^^^^^^ access to union field
@@ -7,7 +7,7 @@ LL |     match u.void {}
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-47412.rs:20:11
+  --> $DIR/issue-47412.rs:17:11
    |
 LL |     match *ptr {}
    |           ^^^^ dereference of raw pointer
diff --git a/tests/ui/unsafe/issue-47412.thir.stderr b/tests/ui/unsafe/issue-47412.thir.stderr
deleted file mode 100644
index 305f482e8c2..00000000000
--- a/tests/ui/unsafe/issue-47412.thir.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/issue-47412.rs:14:11
-   |
-LL |     match u.void {}
-   |           ^^^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-47412.rs:20:11
-   |
-LL |     match *ptr {}
-   |           ^^^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs b/tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs
index 72f7b674777..b0d738855d7 100644
--- a/tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs
+++ b/tests/ui/unsafe/issue-85435-unsafe-op-in-let-under-unsafe-under-closure.rs
@@ -1,6 +1,4 @@
 // check-pass
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 
 // This is issue #85435. But the real story is reflected in issue #85561, where
 // a bug in the implementation of feature(capture_disjoint_fields) () was
diff --git a/tests/ui/unsafe/issue-87414-query-cycle.rs b/tests/ui/unsafe/issue-87414-query-cycle.rs
index 99e40ba4b4c..a004d739422 100644
--- a/tests/ui/unsafe/issue-87414-query-cycle.rs
+++ b/tests/ui/unsafe/issue-87414-query-cycle.rs
@@ -1,7 +1,6 @@
 // Regression test for #87414.
 
 // check-pass
-// compile-flags: -Zthir-unsafeck
 
 fn bad<T>() -> Box<dyn Iterator<Item = [(); { |x: u32| { x }; 4 }]>> { todo!() }
 
diff --git a/tests/ui/unsafe/ranged_ints.rs b/tests/ui/unsafe/ranged_ints.rs
index 05efe87ba6e..0fa2da917e9 100644
--- a/tests/ui/unsafe/ranged_ints.rs
+++ b/tests/ui/unsafe/ranged_ints.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 #![feature(rustc_attrs)]
 
 #[rustc_layout_scalar_valid_range_start(1)]
diff --git a/tests/ui/unsafe/ranged_ints.mir.stderr b/tests/ui/unsafe/ranged_ints.stderr
index ef00edae05d..b6875e15815 100644
--- a/tests/ui/unsafe/ranged_ints.mir.stderr
+++ b/tests/ui/unsafe/ranged_ints.stderr
@@ -1,5 +1,5 @@
 error[E0133]: initializing type with `rustc_layout_scalar_valid_range` attr is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints.rs:10:14
+  --> $DIR/ranged_ints.rs:7:14
    |
 LL |     let _x = NonZero(0);
    |              ^^^^^^^^^^ initializing type with `rustc_layout_scalar_valid_range` attr
diff --git a/tests/ui/unsafe/ranged_ints.thir.stderr b/tests/ui/unsafe/ranged_ints.thir.stderr
deleted file mode 100644
index ef00edae05d..00000000000
--- a/tests/ui/unsafe/ranged_ints.thir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: initializing type with `rustc_layout_scalar_valid_range` attr is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints.rs:10:14
-   |
-LL |     let _x = NonZero(0);
-   |              ^^^^^^^^^^ initializing type with `rustc_layout_scalar_valid_range` attr
-   |
-   = note: initializing a layout restricted type's field with a value outside the valid range is undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints2.rs b/tests/ui/unsafe/ranged_ints2.rs
index ad9d598aba2..a3d9f54efe2 100644
--- a/tests/ui/unsafe/ranged_ints2.rs
+++ b/tests/ui/unsafe/ranged_ints2.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![feature(rustc_attrs)]
 
 #[rustc_layout_scalar_valid_range_start(1)]
diff --git a/tests/ui/unsafe/ranged_ints2.mirunsafeck.stderr b/tests/ui/unsafe/ranged_ints2.stderr
index dc6bd72f56c..1885e77af7e 100644
--- a/tests/ui/unsafe/ranged_ints2.mirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints2.stderr
@@ -1,5 +1,5 @@
 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints2.rs:11:13
+  --> $DIR/ranged_ints2.rs:8:13
    |
 LL |     let y = &mut x.0;
    |             ^^^^^^^^ mutation of layout constrained field
@@ -7,7 +7,7 @@ LL |     let y = &mut x.0;
    = note: mutating layout constrained fields cannot statically be checked for valid values
 
 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints2.rs:12:25
+  --> $DIR/ranged_ints2.rs:9:25
    |
 LL |     if let Some(NonZero(ref mut y)) = Some(x) {}
    |                         ^^^^^^^^^ mutation of layout constrained field
diff --git a/tests/ui/unsafe/ranged_ints2.thirunsafeck.stderr b/tests/ui/unsafe/ranged_ints2.thirunsafeck.stderr
deleted file mode 100644
index dc6bd72f56c..00000000000
--- a/tests/ui/unsafe/ranged_ints2.thirunsafeck.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints2.rs:11:13
-   |
-LL |     let y = &mut x.0;
-   |             ^^^^^^^^ mutation of layout constrained field
-   |
-   = note: mutating layout constrained fields cannot statically be checked for valid values
-
-error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints2.rs:12:25
-   |
-LL |     if let Some(NonZero(ref mut y)) = Some(x) {}
-   |                         ^^^^^^^^^ mutation of layout constrained field
-   |
-   = note: mutating layout constrained fields cannot statically be checked for valid values
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints2_const.mirunsafeck.stderr b/tests/ui/unsafe/ranged_ints2_const.mirunsafeck.stderr
deleted file mode 100644
index c16550a5800..00000000000
--- a/tests/ui/unsafe/ranged_ints2_const.mirunsafeck.stderr
+++ /dev/null
@@ -1,39 +0,0 @@
-error[E0658]: mutable references are not allowed in constant functions
-  --> $DIR/ranged_ints2_const.rs:14:13
-   |
-LL |     let y = &mut x.0;
-   |             ^^^^^^^^
-   |
-   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
-   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
-
-error[E0658]: mutable references are not allowed in constant functions
-  --> $DIR/ranged_ints2_const.rs:21:22
-   |
-LL |     let y = unsafe { &mut x.0 };
-   |                      ^^^^^^^^
-   |
-   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
-   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
-
-error[E0658]: mutable references are not allowed in constant functions
-  --> $DIR/ranged_ints2_const.rs:27:22
-   |
-LL |     unsafe { let y = &mut x.0; }
-   |                      ^^^^^^^^
-   |
-   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
-   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
-
-error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints2_const.rs:14:13
-   |
-LL |     let y = &mut x.0;
-   |             ^^^^^^^^ mutation of layout constrained field
-   |
-   = note: mutating layout constrained fields cannot statically be checked for valid values
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0133, E0658.
-For more information about an error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints2_const.rs b/tests/ui/unsafe/ranged_ints2_const.rs
index 56f5407bb6e..b7178c2b52b 100644
--- a/tests/ui/unsafe/ranged_ints2_const.rs
+++ b/tests/ui/unsafe/ranged_ints2_const.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![feature(rustc_attrs)]
 
 #[rustc_layout_scalar_valid_range_start(1)]
diff --git a/tests/ui/unsafe/ranged_ints2_const.thirunsafeck.stderr b/tests/ui/unsafe/ranged_ints2_const.stderr
index b3f139f7213..f267dc6e23e 100644
--- a/tests/ui/unsafe/ranged_ints2_const.thirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints2_const.stderr
@@ -1,5 +1,5 @@
 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints2_const.rs:14:13
+  --> $DIR/ranged_ints2_const.rs:11:13
    |
 LL |     let y = &mut x.0;
    |             ^^^^^^^^ mutation of layout constrained field
@@ -7,7 +7,7 @@ LL |     let y = &mut x.0;
    = note: mutating layout constrained fields cannot statically be checked for valid values
 
 error[E0658]: mutable references are not allowed in constant functions
-  --> $DIR/ranged_ints2_const.rs:14:13
+  --> $DIR/ranged_ints2_const.rs:11:13
    |
 LL |     let y = &mut x.0;
    |             ^^^^^^^^
@@ -16,7 +16,7 @@ LL |     let y = &mut x.0;
    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error[E0658]: mutable references are not allowed in constant functions
-  --> $DIR/ranged_ints2_const.rs:21:22
+  --> $DIR/ranged_ints2_const.rs:18:22
    |
 LL |     let y = unsafe { &mut x.0 };
    |                      ^^^^^^^^
@@ -25,7 +25,7 @@ LL |     let y = unsafe { &mut x.0 };
    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error[E0658]: mutable references are not allowed in constant functions
-  --> $DIR/ranged_ints2_const.rs:27:22
+  --> $DIR/ranged_ints2_const.rs:24:22
    |
 LL |     unsafe { let y = &mut x.0; }
    |                      ^^^^^^^^
diff --git a/tests/ui/unsafe/ranged_ints3.rs b/tests/ui/unsafe/ranged_ints3.rs
index 76d4bfe9530..47d67fac678 100644
--- a/tests/ui/unsafe/ranged_ints3.rs
+++ b/tests/ui/unsafe/ranged_ints3.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![feature(rustc_attrs)]
 
 use std::cell::Cell;
diff --git a/tests/ui/unsafe/ranged_ints3.mirunsafeck.stderr b/tests/ui/unsafe/ranged_ints3.stderr
index 72bce5de0ae..8dcb99fc16d 100644
--- a/tests/ui/unsafe/ranged_ints3.mirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints3.stderr
@@ -1,5 +1,5 @@
 error[E0133]: borrow of layout constrained field with interior mutability is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints3.rs:13:13
+  --> $DIR/ranged_ints3.rs:10:13
    |
 LL |     let y = &x.0;
    |             ^^^^ borrow of layout constrained field with interior mutability
diff --git a/tests/ui/unsafe/ranged_ints3.thirunsafeck.stderr b/tests/ui/unsafe/ranged_ints3.thirunsafeck.stderr
deleted file mode 100644
index 72bce5de0ae..00000000000
--- a/tests/ui/unsafe/ranged_ints3.thirunsafeck.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: borrow of layout constrained field with interior mutability is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints3.rs:13:13
-   |
-LL |     let y = &x.0;
-   |             ^^^^ borrow of layout constrained field with interior mutability
-   |
-   = note: references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints3_const.rs b/tests/ui/unsafe/ranged_ints3_const.rs
index 637198d3604..c069ae7da02 100644
--- a/tests/ui/unsafe/ranged_ints3_const.rs
+++ b/tests/ui/unsafe/ranged_ints3_const.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![feature(rustc_attrs)]
 
 use std::cell::Cell;
diff --git a/tests/ui/unsafe/ranged_ints3_const.mirunsafeck.stderr b/tests/ui/unsafe/ranged_ints3_const.stderr
index 62df9333069..75b36cdf94b 100644
--- a/tests/ui/unsafe/ranged_ints3_const.mirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints3_const.stderr
@@ -1,5 +1,13 @@
+error[E0133]: borrow of layout constrained field with interior mutability is unsafe and requires unsafe function or block
+  --> $DIR/ranged_ints3_const.rs:12:13
+   |
+LL |     let y = &x.0;
+   |             ^^^^ borrow of layout constrained field with interior mutability
+   |
+   = note: references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values
+
 error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability
-  --> $DIR/ranged_ints3_const.rs:15:13
+  --> $DIR/ranged_ints3_const.rs:12:13
    |
 LL |     let y = &x.0;
    |             ^^^^
@@ -8,7 +16,7 @@ LL |     let y = &x.0;
    = help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable
 
 error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability
-  --> $DIR/ranged_ints3_const.rs:22:22
+  --> $DIR/ranged_ints3_const.rs:19:22
    |
 LL |     let y = unsafe { &x.0 };
    |                      ^^^^
@@ -16,14 +24,6 @@ LL |     let y = unsafe { &x.0 };
    = note: see issue #80384 <https://github.com/rust-lang/rust/issues/80384> for more information
    = help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable
 
-error[E0133]: borrow of layout constrained field with interior mutability is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints3_const.rs:15:13
-   |
-LL |     let y = &x.0;
-   |             ^^^^ borrow of layout constrained field with interior mutability
-   |
-   = note: references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values
-
 error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0133, E0658.
diff --git a/tests/ui/unsafe/ranged_ints3_const.thirunsafeck.stderr b/tests/ui/unsafe/ranged_ints3_const.thirunsafeck.stderr
deleted file mode 100644
index 5dbc563aad2..00000000000
--- a/tests/ui/unsafe/ranged_ints3_const.thirunsafeck.stderr
+++ /dev/null
@@ -1,30 +0,0 @@
-error[E0133]: borrow of layout constrained field with interior mutability is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints3_const.rs:15:13
-   |
-LL |     let y = &x.0;
-   |             ^^^^ borrow of layout constrained field with interior mutability
-   |
-   = note: references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values
-
-error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability
-  --> $DIR/ranged_ints3_const.rs:15:13
-   |
-LL |     let y = &x.0;
-   |             ^^^^
-   |
-   = note: see issue #80384 <https://github.com/rust-lang/rust/issues/80384> for more information
-   = help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable
-
-error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability
-  --> $DIR/ranged_ints3_const.rs:22:22
-   |
-LL |     let y = unsafe { &x.0 };
-   |                      ^^^^
-   |
-   = note: see issue #80384 <https://github.com/rust-lang/rust/issues/80384> for more information
-   = help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0133, E0658.
-For more information about an error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints3_match.rs b/tests/ui/unsafe/ranged_ints3_match.rs
index d9fcf0bd665..de6be506d56 100644
--- a/tests/ui/unsafe/ranged_ints3_match.rs
+++ b/tests/ui/unsafe/ranged_ints3_match.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![feature(rustc_attrs)]
 
 use std::cell::Cell;
diff --git a/tests/ui/unsafe/ranged_ints3_match.mirunsafeck.stderr b/tests/ui/unsafe/ranged_ints3_match.stderr
index 27c06640928..1bdc29d077c 100644
--- a/tests/ui/unsafe/ranged_ints3_match.mirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints3_match.stderr
@@ -1,5 +1,5 @@
 error[E0133]: borrow of layout constrained field with interior mutability is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints3_match.rs:14:17
+  --> $DIR/ranged_ints3_match.rs:11:17
    |
 LL |         NonZero(ref x) => { x }
    |                 ^^^^^ borrow of layout constrained field with interior mutability
@@ -7,7 +7,7 @@ LL |         NonZero(ref x) => { x }
    = note: references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values
 
 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints3_match.rs:20:23
+  --> $DIR/ranged_ints3_match.rs:17:23
    |
 LL |     match y { NonZero(ref mut y) => { y } };
    |                       ^^^^^^^^^ mutation of layout constrained field
diff --git a/tests/ui/unsafe/ranged_ints3_match.thirunsafeck.stderr b/tests/ui/unsafe/ranged_ints3_match.thirunsafeck.stderr
deleted file mode 100644
index 27c06640928..00000000000
--- a/tests/ui/unsafe/ranged_ints3_match.thirunsafeck.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0133]: borrow of layout constrained field with interior mutability is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints3_match.rs:14:17
-   |
-LL |         NonZero(ref x) => { x }
-   |                 ^^^^^ borrow of layout constrained field with interior mutability
-   |
-   = note: references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values
-
-error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints3_match.rs:20:23
-   |
-LL |     match y { NonZero(ref mut y) => { y } };
-   |                       ^^^^^^^^^ mutation of layout constrained field
-   |
-   = note: mutating layout constrained fields cannot statically be checked for valid values
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints4.mirunsafeck.stderr b/tests/ui/unsafe/ranged_ints4.mirunsafeck.stderr
deleted file mode 100644
index 4f2f1e42e76..00000000000
--- a/tests/ui/unsafe/ranged_ints4.mirunsafeck.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints4.rs:11:5
-   |
-LL |     x.0 = 0;
-   |     ^^^^^^^ mutation of layout constrained field
-   |
-   = note: mutating layout constrained fields cannot statically be checked for valid values
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints4.rs b/tests/ui/unsafe/ranged_ints4.rs
index fe80af454cb..d8632c48434 100644
--- a/tests/ui/unsafe/ranged_ints4.rs
+++ b/tests/ui/unsafe/ranged_ints4.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![feature(rustc_attrs)]
 
 #[rustc_layout_scalar_valid_range_start(1)]
diff --git a/tests/ui/unsafe/ranged_ints4.thirunsafeck.stderr b/tests/ui/unsafe/ranged_ints4.stderr
index 4f2f1e42e76..4a703696b88 100644
--- a/tests/ui/unsafe/ranged_ints4.thirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints4.stderr
@@ -1,5 +1,5 @@
 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints4.rs:11:5
+  --> $DIR/ranged_ints4.rs:8:5
    |
 LL |     x.0 = 0;
    |     ^^^^^^^ mutation of layout constrained field
diff --git a/tests/ui/unsafe/ranged_ints4_const.rs b/tests/ui/unsafe/ranged_ints4_const.rs
index a43c8be71c4..f09168c3d3f 100644
--- a/tests/ui/unsafe/ranged_ints4_const.rs
+++ b/tests/ui/unsafe/ranged_ints4_const.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![feature(rustc_attrs)]
 
 #[rustc_layout_scalar_valid_range_start(1)]
diff --git a/tests/ui/unsafe/ranged_ints4_const.mirunsafeck.stderr b/tests/ui/unsafe/ranged_ints4_const.stderr
index a2a3ae668a2..604ec1167e4 100644
--- a/tests/ui/unsafe/ranged_ints4_const.mirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints4_const.stderr
@@ -1,5 +1,5 @@
 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints4_const.rs:13:5
+  --> $DIR/ranged_ints4_const.rs:10:5
    |
 LL |     x.0 = 0;
    |     ^^^^^^^ mutation of layout constrained field
diff --git a/tests/ui/unsafe/ranged_ints4_const.thirunsafeck.stderr b/tests/ui/unsafe/ranged_ints4_const.thirunsafeck.stderr
deleted file mode 100644
index a2a3ae668a2..00000000000
--- a/tests/ui/unsafe/ranged_ints4_const.thirunsafeck.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints4_const.rs:13:5
-   |
-LL |     x.0 = 0;
-   |     ^^^^^^^ mutation of layout constrained field
-   |
-   = note: mutating layout constrained fields cannot statically be checked for valid values
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints_const.rs b/tests/ui/unsafe/ranged_ints_const.rs
index 472b0968150..8477772867e 100644
--- a/tests/ui/unsafe/ranged_ints_const.rs
+++ b/tests/ui/unsafe/ranged_ints_const.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 #![feature(rustc_attrs)]
 
 #[rustc_layout_scalar_valid_range_start(1)]
diff --git a/tests/ui/unsafe/ranged_ints_const.mir.stderr b/tests/ui/unsafe/ranged_ints_const.stderr
index 563b9be2672..2b8be290d3a 100644
--- a/tests/ui/unsafe/ranged_ints_const.mir.stderr
+++ b/tests/ui/unsafe/ranged_ints_const.stderr
@@ -1,5 +1,5 @@
 error[E0133]: initializing type with `rustc_layout_scalar_valid_range` attr is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints_const.rs:11:34
+  --> $DIR/ranged_ints_const.rs:8:34
    |
 LL | const fn foo() -> NonZero<u32> { NonZero(0) }
    |                                  ^^^^^^^^^^ initializing type with `rustc_layout_scalar_valid_range` attr
diff --git a/tests/ui/unsafe/ranged_ints_const.thir.stderr b/tests/ui/unsafe/ranged_ints_const.thir.stderr
deleted file mode 100644
index 563b9be2672..00000000000
--- a/tests/ui/unsafe/ranged_ints_const.thir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: initializing type with `rustc_layout_scalar_valid_range` attr is unsafe and requires unsafe function or block
-  --> $DIR/ranged_ints_const.rs:11:34
-   |
-LL | const fn foo() -> NonZero<u32> { NonZero(0) }
-   |                                  ^^^^^^^^^^ initializing type with `rustc_layout_scalar_valid_range` attr
-   |
-   = note: initializing a layout restricted type's field with a value outside the valid range is undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints_macro.rs b/tests/ui/unsafe/ranged_ints_macro.rs
index 8293d029951..0acc3e0f6b1 100644
--- a/tests/ui/unsafe/ranged_ints_macro.rs
+++ b/tests/ui/unsafe/ranged_ints_macro.rs
@@ -1,6 +1,4 @@
 // build-pass
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 
 #![feature(rustc_attrs)]
 
diff --git a/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.mir.stderr b/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.mir.stderr
deleted file mode 100644
index 0c0826c1cfb..00000000000
--- a/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.mir.stderr
+++ /dev/null
@@ -1,112 +0,0 @@
-error: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:12:5
-   |
-LL |     unsf();
-   |     ^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:11:1
-   |
-LL | unsafe fn deny_level() {
-   | ^^^^^^^^^^^^^^^^^^^^^^
-note: the lint level is defined here
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:4:9
-   |
-LL | #![deny(unsafe_op_in_unsafe_fn)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^
-
-error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:15:5
-   |
-LL |     *PTR;
-   |     ^^^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error: use of mutable static is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:17:5
-   |
-LL |     VOID = ();
-   |     ^^^^^^^^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error: unnecessary `unsafe` block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:20:5
-   |
-LL |     unsafe {}
-   |     ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:5:9
-   |
-LL | #![deny(unused_unsafe)]
-   |         ^^^^^^^^^^^^^
-
-error: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:28:5
-   |
-LL |     unsf();
-   |     ^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:27:1
-   |
-LL | unsafe fn warning_level() {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
-note: the lint level is defined here
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:26:8
-   |
-LL | #[deny(warnings)]
-   |        ^^^^^^^^
-   = note: `#[deny(unsafe_op_in_unsafe_fn)]` implied by `#[deny(warnings)]`
-
-error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:31:5
-   |
-LL |     *PTR;
-   |     ^^^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error: use of mutable static is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:33:5
-   |
-LL |     VOID = ();
-   |     ^^^^^^^^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error: unnecessary `unsafe` block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:35:5
-   |
-LL |     unsafe {}
-   |     ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:49:5
-   |
-LL |     unsafe { unsafe { unsf() } }
-   |     ^^^^^^ unnecessary `unsafe` block
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:76:5
-   |
-LL |     unsf();
-   |     ^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:81:9
-   |
-LL |         unsf();
-   |         ^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 11 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.rs b/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.rs
index db1e916a36c..658d14da829 100644
--- a/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.rs
+++ b/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
-
 #![deny(unsafe_op_in_unsafe_fn)]
 #![deny(unused_unsafe)]
 
@@ -10,8 +7,7 @@ static mut VOID: () = ();
 
 unsafe fn deny_level() {
     unsf();
-    //[mir]~^ ERROR call to unsafe function is unsafe and requires unsafe block
-    //[thir]~^^ ERROR call to unsafe function `unsf` is unsafe and requires unsafe block
+    //~^ ERROR call to unsafe function `unsf` is unsafe and requires unsafe block
     *PTR;
     //~^ ERROR dereference of raw pointer is unsafe and requires unsafe block
     VOID = ();
@@ -26,8 +22,7 @@ unsafe fn deny_level() {
 #[deny(warnings)]
 unsafe fn warning_level() {
     unsf();
-    //[mir]~^ ERROR call to unsafe function is unsafe and requires unsafe block
-    //[thir]~^^ ERROR call to unsafe function `unsf` is unsafe and requires unsafe block
+    //~^ ERROR call to unsafe function `unsf` is unsafe and requires unsafe block
     *PTR;
     //~^ ERROR dereference of raw pointer is unsafe and requires unsafe block
     VOID = ();
@@ -74,12 +69,10 @@ unsafe fn nested_allow_level() {
 
 fn main() {
     unsf();
-    //[mir]~^ ERROR call to unsafe function is unsafe and requires unsafe block
-    //[thir]~^^ ERROR call to unsafe function `unsf` is unsafe and requires unsafe block
+    //~^ ERROR call to unsafe function `unsf` is unsafe and requires unsafe block
     #[allow(unsafe_op_in_unsafe_fn)]
     {
         unsf();
-        //[mir]~^ ERROR call to unsafe function is unsafe and requires unsafe function or block
-        //[thir]~^^ ERROR call to unsafe function `unsf` is unsafe and requires unsafe function or block
+        //~^ ERROR call to unsafe function `unsf` is unsafe and requires unsafe function or block
     }
 }
diff --git a/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.thir.stderr b/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.stderr
index ad0621a1d04..ea0659b2e10 100644
--- a/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.thir.stderr
+++ b/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.stderr
@@ -1,23 +1,23 @@
 error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:12:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:9:5
    |
 LL |     unsf();
    |     ^^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:11:1
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:8:1
    |
 LL | unsafe fn deny_level() {
    | ^^^^^^^^^^^^^^^^^^^^^^
 note: the lint level is defined here
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:4:9
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:1:9
    |
 LL | #![deny(unsafe_op_in_unsafe_fn)]
    |         ^^^^^^^^^^^^^^^^^^^^^^
 
 error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:15:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:11:5
    |
 LL |     *PTR;
    |     ^^^^ dereference of raw pointer
@@ -25,7 +25,7 @@ LL |     *PTR;
    = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 
 error: use of mutable static is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:17:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:13:5
    |
 LL |     VOID = ();
    |     ^^^^ use of mutable static
@@ -33,38 +33,38 @@ LL |     VOID = ();
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 
 error: unnecessary `unsafe` block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:20:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:16:5
    |
 LL |     unsafe {}
    |     ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:5:9
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:2:9
    |
 LL | #![deny(unused_unsafe)]
    |         ^^^^^^^^^^^^^
 
 error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:28:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:24:5
    |
 LL |     unsf();
    |     ^^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:27:1
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:23:1
    |
 LL | unsafe fn warning_level() {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 note: the lint level is defined here
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:26:8
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:22:8
    |
 LL | #[deny(warnings)]
    |        ^^^^^^^^
    = note: `#[deny(unsafe_op_in_unsafe_fn)]` implied by `#[deny(warnings)]`
 
 error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:31:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:26:5
    |
 LL |     *PTR;
    |     ^^^^ dereference of raw pointer
@@ -72,7 +72,7 @@ LL |     *PTR;
    = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 
 error: use of mutable static is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:33:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:28:5
    |
 LL |     VOID = ();
    |     ^^^^ use of mutable static
@@ -80,19 +80,19 @@ LL |     VOID = ();
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 
 error: unnecessary `unsafe` block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:35:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:30:5
    |
 LL |     unsafe {}
    |     ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:49:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:44:5
    |
 LL |     unsafe { unsafe { unsf() } }
    |     ^^^^^^ unnecessary `unsafe` block
 
 error[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:76:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:71:5
    |
 LL |     unsf();
    |     ^^^^^^ call to unsafe function
@@ -100,7 +100,7 @@ LL |     unsf();
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe function or block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:81:9
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:75:9
    |
 LL |         unsf();
    |         ^^^^^^ call to unsafe function
diff --git a/tests/ui/unsafe/union-assignop.mirunsafeck.stderr b/tests/ui/unsafe/union-assignop.mirunsafeck.stderr
deleted file mode 100644
index 0ecd5203dd9..00000000000
--- a/tests/ui/unsafe/union-assignop.mirunsafeck.stderr
+++ /dev/null
@@ -1,51 +0,0 @@
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-assignop.rs:19:5
-   |
-LL |     foo.a += 5;
-   |     ^^^^^^^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-assignop.rs:20:6
-   |
-LL |     *foo.b += NonCopy;
-   |      ^^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-assignop.rs:21:6
-   |
-LL |     *foo.b = NonCopy;
-   |      ^^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-assignop.rs:23:5
-   |
-LL |     foo.a;
-   |     ^^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-assignop.rs:25:5
-   |
-LL |     foo.b;
-   |     ^^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-assignop.rs:27:13
-   |
-LL |     foo.b = foo.b;
-   |             ^^^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error: aborting due to 6 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/union-assignop.rs b/tests/ui/unsafe/union-assignop.rs
index 5e667cd10d5..6122aef0565 100644
--- a/tests/ui/unsafe/union-assignop.rs
+++ b/tests/ui/unsafe/union-assignop.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 use std::ops::AddAssign;
 use std::mem::ManuallyDrop;
 
diff --git a/tests/ui/unsafe/union-assignop.thirunsafeck.stderr b/tests/ui/unsafe/union-assignop.stderr
index 24b357e762b..6b2ebfb5099 100644
--- a/tests/ui/unsafe/union-assignop.thirunsafeck.stderr
+++ b/tests/ui/unsafe/union-assignop.stderr
@@ -1,5 +1,5 @@
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-assignop.rs:19:5
+  --> $DIR/union-assignop.rs:16:5
    |
 LL |     foo.a += 5;
    |     ^^^^^ access to union field
@@ -7,7 +7,7 @@ LL |     foo.a += 5;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-assignop.rs:20:6
+  --> $DIR/union-assignop.rs:17:6
    |
 LL |     *foo.b += NonCopy;
    |      ^^^^^ access to union field
@@ -15,7 +15,7 @@ LL |     *foo.b += NonCopy;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-assignop.rs:21:6
+  --> $DIR/union-assignop.rs:18:6
    |
 LL |     *foo.b = NonCopy;
    |      ^^^^^ access to union field
@@ -23,7 +23,7 @@ LL |     *foo.b = NonCopy;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-assignop.rs:23:5
+  --> $DIR/union-assignop.rs:20:5
    |
 LL |     foo.a;
    |     ^^^^^ access to union field
@@ -31,7 +31,7 @@ LL |     foo.a;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-assignop.rs:25:5
+  --> $DIR/union-assignop.rs:22:5
    |
 LL |     foo.b;
    |     ^^^^^ access to union field
@@ -39,7 +39,7 @@ LL |     foo.b;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-assignop.rs:27:13
+  --> $DIR/union-assignop.rs:24:13
    |
 LL |     foo.b = foo.b;
    |             ^^^^^ access to union field
diff --git a/tests/ui/unsafe/union-modification.rs b/tests/ui/unsafe/union-modification.rs
index 9a53ef90852..fbcb846be9d 100644
--- a/tests/ui/unsafe/union-modification.rs
+++ b/tests/ui/unsafe/union-modification.rs
@@ -1,7 +1,4 @@
 // run-pass
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 union Foo {
     bar: i8,
     _blah: isize,
diff --git a/tests/ui/unsafe/union.mir.stderr b/tests/ui/unsafe/union.mir.stderr
deleted file mode 100644
index 787714cdd2d..00000000000
--- a/tests/ui/unsafe/union.mir.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union.rs:30:20
-   |
-LL |         Foo { bar: _a } => {},
-   |                    ^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union.rs:32:11
-   |
-LL |     match foo {
-   |           ^^^ access to union field
-   |
-   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/union.rs b/tests/ui/unsafe/union.rs
index 4338d78eabb..ae81708aa19 100644
--- a/tests/ui/unsafe/union.rs
+++ b/tests/ui/unsafe/union.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 union Foo {
     bar: i8,
     zst: (),
@@ -29,20 +26,19 @@ pub fn main() {
     match foo {
         Foo { bar: _a } => {}, //~ ERROR access to union field is unsafe
     }
-    match foo { //[mir]~ ERROR access to union field is unsafe
+    match foo {
         Foo {
-            pizza: Pizza { //[thir]~ ERROR access to union field is unsafe
+            pizza: Pizza { //~ ERROR access to union field is unsafe
                 topping: Some(PizzaTopping::Cheese) | Some(PizzaTopping::Pineapple) | None
             }
         } => {},
     }
 
-    // MIR unsafeck incorrectly thinks that no unsafe block is needed to do these
     match foo {
-        Foo { zst: () } => {}, //[thir]~ ERROR access to union field is unsafe
+        Foo { zst: () } => {} //~ ERROR access to union field is unsafe
     }
     match foo {
-        Foo { pizza: Pizza { .. } } => {}, //[thir]~ ERROR access to union field is unsafe
+        Foo { pizza: Pizza { .. } } => {} //~ ERROR access to union field is unsafe
     }
 
     // binding to wildcard is okay
diff --git a/tests/ui/unsafe/union.thir.stderr b/tests/ui/unsafe/union.stderr
index e1a1bd634de..1506bdb919b 100644
--- a/tests/ui/unsafe/union.thir.stderr
+++ b/tests/ui/unsafe/union.stderr
@@ -1,5 +1,5 @@
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union.rs:30:20
+  --> $DIR/union.rs:27:20
    |
 LL |         Foo { bar: _a } => {},
    |                    ^^ access to union field
@@ -7,7 +7,7 @@ LL |         Foo { bar: _a } => {},
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union.rs:34:20
+  --> $DIR/union.rs:31:20
    |
 LL |               pizza: Pizza {
    |  ____________________^
@@ -18,17 +18,17 @@ LL | |             }
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union.rs:42:20
+  --> $DIR/union.rs:38:20
    |
-LL |         Foo { zst: () } => {},
+LL |         Foo { zst: () } => {}
    |                    ^^ access to union field
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union.rs:45:22
+  --> $DIR/union.rs:41:22
    |
-LL |         Foo { pizza: Pizza { .. } } => {},
+LL |         Foo { pizza: Pizza { .. } } => {}
    |                      ^^^^^^^^^^^^ access to union field
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
diff --git a/tests/ui/unsafe/union_access_through_block.rs b/tests/ui/unsafe/union_access_through_block.rs
index e4c0976b826..8b28c33650e 100644
--- a/tests/ui/unsafe/union_access_through_block.rs
+++ b/tests/ui/unsafe/union_access_through_block.rs
@@ -1,7 +1,4 @@
 // check-pass
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 #[derive(Copy, Clone)]
 pub struct Foo { a: bool }
 
diff --git a/tests/ui/unsafe/union_destructure.mir.stderr b/tests/ui/unsafe/union_destructure.mir.stderr
deleted file mode 100644
index 818f5ce03b5..00000000000
--- a/tests/ui/unsafe/union_destructure.mir.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-warning: unnecessary `unsafe` block
-  --> $DIR/union_destructure.rs:35:5
-   |
-LL |     unsafe {
-   |     ^^^^^^ unnecessary `unsafe` block
-   |
-   = note: `#[warn(unused_unsafe)]` on by default
-
-warning: unnecessary `unsafe` block
-  --> $DIR/union_destructure.rs:41:5
-   |
-LL |     unsafe {
-   |     ^^^^^^ unnecessary `unsafe` block
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/unsafe/union_destructure.rs b/tests/ui/unsafe/union_destructure.rs
index 6c88344b5fd..d0cf8640eaa 100644
--- a/tests/ui/unsafe/union_destructure.rs
+++ b/tests/ui/unsafe/union_destructure.rs
@@ -1,6 +1,4 @@
 // run-pass
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 
 #[derive(Copy, Clone)]
 #[allow(dead_code)]
@@ -12,7 +10,7 @@ struct Pie {
 union Foo {
     #[allow(dead_code)]
     bar: i8,
-    baz: Pie
+    baz: Pie,
 }
 
 fn main() {
@@ -32,20 +30,20 @@ fn main() {
     };
 
     let u = Foo { bar: 9 };
-    unsafe { //[mir]~ WARNING unnecessary `unsafe` block
+    unsafe {
         match u {
-            Foo { baz: Pie { .. } } => {},
+            Foo { baz: Pie { .. } } => {}
         };
     }
     let u = Foo { bar: 10 };
-    unsafe { //[mir]~ WARNING unnecessary `unsafe` block
+    unsafe {
         match u {
-            Foo { baz: Pie { slices: _, size: _ } } => {},
+            Foo { baz: Pie { slices: _, size: _ } } => {}
         };
     }
 
     let u = Foo { bar: 11 };
     match u {
-        Foo { baz: _ } => {},
+        Foo { baz: _ } => {}
     };
 }
diff --git a/tests/ui/unsafe/union_wild_or_wild.rs b/tests/ui/unsafe/union_wild_or_wild.rs
index 52a0a7abf27..935de97f255 100644
--- a/tests/ui/unsafe/union_wild_or_wild.rs
+++ b/tests/ui/unsafe/union_wild_or_wild.rs
@@ -1,7 +1,4 @@
 // check-pass
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 union X { a: i8 }
 
 fn main() {
diff --git a/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.mir.stderr b/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.mir.stderr
deleted file mode 100644
index 62199e5a2ec..00000000000
--- a/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.mir.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: unnecessary `unsafe` block
-  --> $DIR/unsafe-around-compiler-generated-unsafe.rs:9:9
-   |
-LL |         unsafe { async {}.await; }
-   |         ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/unsafe-around-compiler-generated-unsafe.rs:5:9
-   |
-LL | #![deny(unused_unsafe)]
-   |         ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/unsafe-around-compiler-generated-unsafe.rs:13:5
-   |
-LL |     unsafe { println!("foo"); }
-   |     ^^^^^^ unnecessary `unsafe` block
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs b/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs
index c1a32764039..e060c58e408 100644
--- a/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs
+++ b/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.rs
@@ -1,6 +1,4 @@
 // edition:2018
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
 
 #![deny(unused_unsafe)]
 
diff --git a/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.thir.stderr b/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.stderr
index 62199e5a2ec..ffadd90c64b 100644
--- a/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.thir.stderr
+++ b/tests/ui/unsafe/unsafe-around-compiler-generated-unsafe.stderr
@@ -1,17 +1,17 @@
 error: unnecessary `unsafe` block
-  --> $DIR/unsafe-around-compiler-generated-unsafe.rs:9:9
+  --> $DIR/unsafe-around-compiler-generated-unsafe.rs:7:9
    |
 LL |         unsafe { async {}.await; }
    |         ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/unsafe-around-compiler-generated-unsafe.rs:5:9
+  --> $DIR/unsafe-around-compiler-generated-unsafe.rs:3:9
    |
 LL | #![deny(unused_unsafe)]
    |         ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/unsafe-around-compiler-generated-unsafe.rs:13:5
+  --> $DIR/unsafe-around-compiler-generated-unsafe.rs:11:5
    |
 LL |     unsafe { println!("foo"); }
    |     ^^^^^^ unnecessary `unsafe` block
diff --git a/tests/ui/unsafe/unsafe-assign.rs b/tests/ui/unsafe/unsafe-assign.rs
index 15273165b5e..02ce238854d 100644
--- a/tests/ui/unsafe/unsafe-assign.rs
+++ b/tests/ui/unsafe/unsafe-assign.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![feature(rustc_attrs)]
 #![allow(unused,dead_code)]
 
diff --git a/tests/ui/unsafe/unsafe-assign.mirunsafeck.stderr b/tests/ui/unsafe/unsafe-assign.stderr
index f8b55e0668d..1fa5d715c2e 100644
--- a/tests/ui/unsafe/unsafe-assign.mirunsafeck.stderr
+++ b/tests/ui/unsafe/unsafe-assign.stderr
@@ -1,5 +1,5 @@
 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-assign.rs:12:5
+  --> $DIR/unsafe-assign.rs:9:5
    |
 LL |     foo.0.0 = 0;
    |     ^^^^^^^^^^^ mutation of layout constrained field
diff --git a/tests/ui/unsafe/unsafe-assign.thirunsafeck.stderr b/tests/ui/unsafe/unsafe-assign.thirunsafeck.stderr
deleted file mode 100644
index f8b55e0668d..00000000000
--- a/tests/ui/unsafe/unsafe-assign.thirunsafeck.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-assign.rs:12:5
-   |
-LL |     foo.0.0 = 0;
-   |     ^^^^^^^^^^^ mutation of layout constrained field
-   |
-   = note: mutating layout constrained fields cannot statically be checked for valid values
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-borrow.rs b/tests/ui/unsafe/unsafe-borrow.rs
index 8dddc70be45..ab0e59489a9 100644
--- a/tests/ui/unsafe/unsafe-borrow.rs
+++ b/tests/ui/unsafe/unsafe-borrow.rs
@@ -1,6 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
-
 #![feature(rustc_attrs)]
 #![allow(unused,dead_code)]
 
diff --git a/tests/ui/unsafe/unsafe-borrow.mirunsafeck.stderr b/tests/ui/unsafe/unsafe-borrow.stderr
index a206722495a..a53b50583ca 100644
--- a/tests/ui/unsafe/unsafe-borrow.mirunsafeck.stderr
+++ b/tests/ui/unsafe/unsafe-borrow.stderr
@@ -1,5 +1,5 @@
 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-borrow.rs:12:13
+  --> $DIR/unsafe-borrow.rs:9:13
    |
 LL |     let a = &mut foo.0.0;
    |             ^^^^^^^^^^^^ mutation of layout constrained field
@@ -7,7 +7,7 @@ LL |     let a = &mut foo.0.0;
    = note: mutating layout constrained fields cannot statically be checked for valid values
 
 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-borrow.rs:32:13
+  --> $DIR/unsafe-borrow.rs:29:13
    |
 LL |     let a = &mut foo.0[2];
    |             ^^^^^^^^^^^^^ mutation of layout constrained field
@@ -15,7 +15,7 @@ LL |     let a = &mut foo.0[2];
    = note: mutating layout constrained fields cannot statically be checked for valid values
 
 error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-borrow.rs:51:18
+  --> $DIR/unsafe-borrow.rs:48:18
    |
 LL |         NonZero((a,)) => *a = 0,
    |                  ^ mutation of layout constrained field
diff --git a/tests/ui/unsafe/unsafe-borrow.thirunsafeck.stderr b/tests/ui/unsafe/unsafe-borrow.thirunsafeck.stderr
deleted file mode 100644
index a206722495a..00000000000
--- a/tests/ui/unsafe/unsafe-borrow.thirunsafeck.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-borrow.rs:12:13
-   |
-LL |     let a = &mut foo.0.0;
-   |             ^^^^^^^^^^^^ mutation of layout constrained field
-   |
-   = note: mutating layout constrained fields cannot statically be checked for valid values
-
-error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-borrow.rs:32:13
-   |
-LL |     let a = &mut foo.0[2];
-   |             ^^^^^^^^^^^^^ mutation of layout constrained field
-   |
-   = note: mutating layout constrained fields cannot statically be checked for valid values
-
-error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-borrow.rs:51:18
-   |
-LL |         NonZero((a,)) => *a = 0,
-   |                  ^ mutation of layout constrained field
-   |
-   = note: mutating layout constrained fields cannot statically be checked for valid values
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-const-fn.mir.stderr b/tests/ui/unsafe/unsafe-const-fn.mir.stderr
deleted file mode 100644
index 2450f08664c..00000000000
--- a/tests/ui/unsafe/unsafe-const-fn.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-const-fn.rs:10:18
-   |
-LL | const VAL: u32 = dummy(0xFFFF);
-   |                  ^^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-const-fn.rs b/tests/ui/unsafe/unsafe-const-fn.rs
index 65e3acf3063..3b4becf17a7 100644
--- a/tests/ui/unsafe/unsafe-const-fn.rs
+++ b/tests/ui/unsafe/unsafe-const-fn.rs
@@ -1,8 +1,5 @@
 // A quick test of 'unsafe const fn' functionality
 
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 const unsafe fn dummy(v: u32) -> u32 {
     !v
 }
diff --git a/tests/ui/unsafe/unsafe-const-fn.thir.stderr b/tests/ui/unsafe/unsafe-const-fn.stderr
index 199dca9237e..5a6e6b7ce59 100644
--- a/tests/ui/unsafe/unsafe-const-fn.thir.stderr
+++ b/tests/ui/unsafe/unsafe-const-fn.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `dummy` is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-const-fn.rs:10:18
+  --> $DIR/unsafe-const-fn.rs:7:18
    |
 LL | const VAL: u32 = dummy(0xFFFF);
    |                  ^^^^^^^^^^^^^ call to unsafe function
diff --git a/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.mir.stderr b/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.mir.stderr
deleted file mode 100644
index da3d5f3bd29..00000000000
--- a/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-assign-deref-ptr.rs:5:5
-   |
-LL |     *p = 0;
-   |     ^^^^^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.rs b/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.rs
index a94e94375ae..91264e790c8 100644
--- a/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.rs
+++ b/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 fn f(p: *mut u8) {
     *p = 0; //~ ERROR dereference of raw pointer is unsafe
     return;
diff --git a/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr b/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.stderr
index aa5644782a4..3a0874f32c0 100644
--- a/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr
+++ b/tests/ui/unsafe/unsafe-fn-assign-deref-ptr.stderr
@@ -1,5 +1,5 @@
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-assign-deref-ptr.rs:5:5
+  --> $DIR/unsafe-fn-assign-deref-ptr.rs:2:5
    |
 LL |     *p = 0;
    |     ^^ dereference of raw pointer
diff --git a/tests/ui/unsafe/unsafe-fn-called-from-safe.mir.stderr b/tests/ui/unsafe/unsafe-fn-called-from-safe.mir.stderr
deleted file mode 100644
index d3347437075..00000000000
--- a/tests/ui/unsafe/unsafe-fn-called-from-safe.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-called-from-safe.rs:7:5
-   |
-LL |     f();
-   |     ^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-fn-called-from-safe.rs b/tests/ui/unsafe/unsafe-fn-called-from-safe.rs
index 55072dcc6c3..758b80097f7 100644
--- a/tests/ui/unsafe/unsafe-fn-called-from-safe.rs
+++ b/tests/ui/unsafe/unsafe-fn-called-from-safe.rs
@@ -1,10 +1,8 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
-unsafe fn f() { return; }
+unsafe fn f() {
+    return;
+}
 
 fn main() {
     f();
-    //[mir]~^ ERROR call to unsafe function is unsafe
-    //[thir]~^^ ERROR call to unsafe function `f` is unsafe
+    //~^ ERROR call to unsafe function `f` is unsafe
 }
diff --git a/tests/ui/unsafe/unsafe-fn-called-from-safe.thir.stderr b/tests/ui/unsafe/unsafe-fn-called-from-safe.stderr
index 75431666186..1b1c92f0546 100644
--- a/tests/ui/unsafe/unsafe-fn-called-from-safe.thir.stderr
+++ b/tests/ui/unsafe/unsafe-fn-called-from-safe.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `f` is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-called-from-safe.rs:7:5
+  --> $DIR/unsafe-fn-called-from-safe.rs:6:5
    |
 LL |     f();
    |     ^^^ call to unsafe function
diff --git a/tests/ui/unsafe/unsafe-fn-deref-ptr.rs b/tests/ui/unsafe/unsafe-fn-deref-ptr.rs
index 4b7c6bf6985..a3144824323 100644
--- a/tests/ui/unsafe/unsafe-fn-deref-ptr.rs
+++ b/tests/ui/unsafe/unsafe-fn-deref-ptr.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 fn f(p: *const u8) -> u8 {
     let _ = *p; //~ ERROR dereference of raw pointer is unsafe
     let _: u8 = *p; //~ ERROR dereference of raw pointer is unsafe
diff --git a/tests/ui/unsafe/unsafe-fn-deref-ptr.mir.stderr b/tests/ui/unsafe/unsafe-fn-deref-ptr.stderr
index 7f1e7c8902f..2e68963097e 100644
--- a/tests/ui/unsafe/unsafe-fn-deref-ptr.mir.stderr
+++ b/tests/ui/unsafe/unsafe-fn-deref-ptr.stderr
@@ -1,5 +1,5 @@
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-deref-ptr.rs:5:13
+  --> $DIR/unsafe-fn-deref-ptr.rs:2:13
    |
 LL |     let _ = *p;
    |             ^^ dereference of raw pointer
@@ -7,7 +7,7 @@ LL |     let _ = *p;
    = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-deref-ptr.rs:6:17
+  --> $DIR/unsafe-fn-deref-ptr.rs:3:17
    |
 LL |     let _: u8 = *p;
    |                 ^^ dereference of raw pointer
@@ -15,7 +15,7 @@ LL |     let _: u8 = *p;
    = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-deref-ptr.rs:7:9
+  --> $DIR/unsafe-fn-deref-ptr.rs:4:9
    |
 LL |     _ = *p;
    |         ^^ dereference of raw pointer
@@ -23,7 +23,7 @@ LL |     _ = *p;
    = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-deref-ptr.rs:8:12
+  --> $DIR/unsafe-fn-deref-ptr.rs:5:12
    |
 LL |     return *p;
    |            ^^ dereference of raw pointer
diff --git a/tests/ui/unsafe/unsafe-fn-deref-ptr.thir.stderr b/tests/ui/unsafe/unsafe-fn-deref-ptr.thir.stderr
deleted file mode 100644
index 7f1e7c8902f..00000000000
--- a/tests/ui/unsafe/unsafe-fn-deref-ptr.thir.stderr
+++ /dev/null
@@ -1,35 +0,0 @@
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-deref-ptr.rs:5:13
-   |
-LL |     let _ = *p;
-   |             ^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-deref-ptr.rs:6:17
-   |
-LL |     let _: u8 = *p;
-   |                 ^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-deref-ptr.rs:7:9
-   |
-LL |     _ = *p;
-   |         ^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-deref-ptr.rs:8:12
-   |
-LL |     return *p;
-   |            ^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-fn-used-as-value.mir.stderr b/tests/ui/unsafe/unsafe-fn-used-as-value.mir.stderr
deleted file mode 100644
index 01e8e49ecfa..00000000000
--- a/tests/ui/unsafe/unsafe-fn-used-as-value.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-used-as-value.rs:8:5
-   |
-LL |     x();
-   |     ^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/unsafe-fn-used-as-value.rs b/tests/ui/unsafe/unsafe-fn-used-as-value.rs
index 9517598c7ce..99506ea047c 100644
--- a/tests/ui/unsafe/unsafe-fn-used-as-value.rs
+++ b/tests/ui/unsafe/unsafe-fn-used-as-value.rs
@@ -1,11 +1,9 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
-unsafe fn f() { return; }
+unsafe fn f() {
+    return;
+}
 
 fn main() {
     let x = f;
     x();
-    //[mir]~^ ERROR call to unsafe function is unsafe
-    //[thir]~^^ ERROR call to unsafe function `f` is unsafe
+    //~^ ERROR call to unsafe function `f` is unsafe
 }
diff --git a/tests/ui/unsafe/unsafe-fn-used-as-value.thir.stderr b/tests/ui/unsafe/unsafe-fn-used-as-value.stderr
index c38da7226f6..0542b87b5e6 100644
--- a/tests/ui/unsafe/unsafe-fn-used-as-value.thir.stderr
+++ b/tests/ui/unsafe/unsafe-fn-used-as-value.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function `f` is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-fn-used-as-value.rs:8:5
+  --> $DIR/unsafe-fn-used-as-value.rs:7:5
    |
 LL |     x();
    |     ^^^ call to unsafe function
diff --git a/tests/ui/unsafe/unsafe-not-inherited.mirunsafeck.stderr b/tests/ui/unsafe/unsafe-not-inherited.mirunsafeck.stderr
deleted file mode 100644
index 5536efbc6f4..00000000000
--- a/tests/ui/unsafe/unsafe-not-inherited.mirunsafeck.stderr
+++ /dev/null
@@ -1,24 +0,0 @@
-error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-not-inherited.rs:8:31
-   |
-LL |     unsafe {static BAR: u64 = FOO;}
-   |     ------                    ^^^ use of mutable static
-   |     |
-   |     items do not inherit unsafety from separate enclosing items
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-not-inherited.rs:20:13
-   |
-LL |     unsafe {
-   |     ------ items do not inherit unsafety from separate enclosing items
-...
-LL |             unsafe_call();
-   |             ^^^^^^^^^^^^^ 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/unsafe/unsafe-not-inherited.rs b/tests/ui/unsafe/unsafe-not-inherited.rs
index f9d9a595714..6d797caa0f9 100644
--- a/tests/ui/unsafe/unsafe-not-inherited.rs
+++ b/tests/ui/unsafe/unsafe-not-inherited.rs
@@ -1,5 +1,3 @@
-// revisions: mirunsafeck thirunsafeck
-// [thirunsafeck]compile-flags: -Z thir-unsafeck
 #![allow(unused, dead_code)]
 
 static mut FOO: u64 = 0;
diff --git a/tests/ui/unsafe/unsafe-not-inherited.thirunsafeck.stderr b/tests/ui/unsafe/unsafe-not-inherited.stderr
index 88ea2e6d1fe..8b699127312 100644
--- a/tests/ui/unsafe/unsafe-not-inherited.thirunsafeck.stderr
+++ b/tests/ui/unsafe/unsafe-not-inherited.stderr
@@ -1,5 +1,5 @@
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-not-inherited.rs:8:31
+  --> $DIR/unsafe-not-inherited.rs:6:31
    |
 LL |     unsafe {static BAR: u64 = FOO;}
    |     ------                    ^^^ use of mutable static
@@ -9,7 +9,7 @@ LL |     unsafe {static BAR: u64 = FOO;}
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 
 error[E0133]: call to unsafe function `unsafe_call` is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-not-inherited.rs:20:13
+  --> $DIR/unsafe-not-inherited.rs:18:13
    |
 LL |     unsafe {
    |     ------ items do not inherit unsafety from separate enclosing items
diff --git a/tests/ui/unsafe/unsafe-unstable-const-fn.rs b/tests/ui/unsafe/unsafe-unstable-const-fn.rs
index 581b15cdfb0..5398721484a 100644
--- a/tests/ui/unsafe/unsafe-unstable-const-fn.rs
+++ b/tests/ui/unsafe/unsafe-unstable-const-fn.rs
@@ -1,6 +1,3 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
 #![stable(feature = "foo", since = "1.33.0")]
 #![feature(staged_api)]
 
diff --git a/tests/ui/unsafe/unsafe-unstable-const-fn.mir.stderr b/tests/ui/unsafe/unsafe-unstable-const-fn.stderr
index 79133ab39a0..22a2dcbf119 100644
--- a/tests/ui/unsafe/unsafe-unstable-const-fn.mir.stderr
+++ b/tests/ui/unsafe/unsafe-unstable-const-fn.stderr
@@ -1,5 +1,5 @@
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-unstable-const-fn.rs:10:5
+  --> $DIR/unsafe-unstable-const-fn.rs:7:5
    |
 LL |     *a == b
    |     ^^ dereference of raw pointer
diff --git a/tests/ui/unsafe/unsafe-unstable-const-fn.thir.stderr b/tests/ui/unsafe/unsafe-unstable-const-fn.thir.stderr
deleted file mode 100644
index 79133ab39a0..00000000000
--- a/tests/ui/unsafe/unsafe-unstable-const-fn.thir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/unsafe-unstable-const-fn.rs:10:5
-   |
-LL |     *a == b
-   |     ^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.fixed b/tests/ui/unsafe/wrapping-unsafe-block-sugg.fixed
index b59029df642..20f4fe847da 100644
--- a/tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.fixed
+++ b/tests/ui/unsafe/wrapping-unsafe-block-sugg.fixed
@@ -1,7 +1,5 @@
 // run-rustfix
 // aux-build:external_unsafe_macro.rs
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
 
 #![deny(unsafe_op_in_unsafe_fn)] //~ NOTE
 #![crate_name = "wrapping_unsafe_block_sugg"]
@@ -12,13 +10,11 @@ unsafe fn unsf() {}
 
 pub unsafe fn foo() { unsafe {
     //~^ NOTE an unsafe function restricts its caller, but its body is safe by default
-    unsf(); //[mir]~ ERROR call to unsafe function is unsafe
-     //[thir]~^ ERROR call to unsafe function `unsf` is unsafe
-    //~^^ NOTE
+    unsf(); //~ ERROR call to unsafe function `unsf` is unsafe
+    //~^ NOTE
     //~| NOTE
-    unsf(); //[mir]~ ERROR call to unsafe function is unsafe
-    //[thir]~^ ERROR call to unsafe function `unsf` is unsafe
-    //~^^ NOTE
+    unsf(); //~ ERROR call to unsafe function `unsf` is unsafe
+    //~^ NOTE
     //~| NOTE
 }}
 
@@ -44,12 +40,10 @@ pub unsafe fn baz() -> i32 { unsafe {
 }}
 
 macro_rules! unsafe_macro { () => (unsf()) }
-//[mir]~^ ERROR call to unsafe function is unsafe
-//[thir]~^^ ERROR call to unsafe function `unsf` is unsafe
+//~^ ERROR call to unsafe function `unsf` is unsafe
 //~| NOTE
 //~| NOTE
-//[mir]~| ERROR call to unsafe function is unsafe
-//[thir]~| ERROR call to unsafe function `unsf` is unsafe
+//~| ERROR call to unsafe function `unsf` is unsafe
 //~| NOTE
 //~| NOTE
 
diff --git a/tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.fixed b/tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.fixed
deleted file mode 100644
index b59029df642..00000000000
--- a/tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.fixed
+++ /dev/null
@@ -1,73 +0,0 @@
-// run-rustfix
-// aux-build:external_unsafe_macro.rs
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
-
-#![deny(unsafe_op_in_unsafe_fn)] //~ NOTE
-#![crate_name = "wrapping_unsafe_block_sugg"]
-
-extern crate external_unsafe_macro;
-
-unsafe fn unsf() {}
-
-pub unsafe fn foo() { unsafe {
-    //~^ NOTE an unsafe function restricts its caller, but its body is safe by default
-    unsf(); //[mir]~ ERROR call to unsafe function is unsafe
-     //[thir]~^ ERROR call to unsafe function `unsf` is unsafe
-    //~^^ NOTE
-    //~| NOTE
-    unsf(); //[mir]~ ERROR call to unsafe function is unsafe
-    //[thir]~^ ERROR call to unsafe function `unsf` is unsafe
-    //~^^ NOTE
-    //~| NOTE
-}}
-
-pub unsafe fn bar(x: *const i32) -> i32 { unsafe {
-    //~^ NOTE an unsafe function restricts its caller, but its body is safe by default
-    let y = *x; //~ ERROR dereference of raw pointer is unsafe and requires unsafe block
-    //~^ NOTE
-    //~| NOTE
-    y + *x //~ ERROR dereference of raw pointer is unsafe and requires unsafe block
-    //~^ NOTE
-    //~| NOTE
-}}
-
-static mut BAZ: i32 = 0;
-pub unsafe fn baz() -> i32 { unsafe {
-    //~^ NOTE an unsafe function restricts its caller, but its body is safe by default
-    let y = BAZ; //~ ERROR use of mutable static is unsafe and requires unsafe block
-    //~^ NOTE
-    //~| NOTE
-    y + BAZ //~ ERROR use of mutable static is unsafe and requires unsafe block
-    //~^ NOTE
-    //~| NOTE
-}}
-
-macro_rules! unsafe_macro { () => (unsf()) }
-//[mir]~^ ERROR call to unsafe function is unsafe
-//[thir]~^^ ERROR call to unsafe function `unsf` is unsafe
-//~| NOTE
-//~| NOTE
-//[mir]~| ERROR call to unsafe function is unsafe
-//[thir]~| ERROR call to unsafe function `unsf` is unsafe
-//~| NOTE
-//~| NOTE
-
-pub unsafe fn unsafe_in_macro() { unsafe {
-    //~^ NOTE an unsafe function restricts its caller, but its body is safe by default
-    unsafe_macro!();
-    //~^ NOTE
-    //~| NOTE
-    unsafe_macro!();
-    //~^ NOTE
-    //~| NOTE
-}}
-
-pub unsafe fn unsafe_in_external_macro() {
-    // FIXME: https://github.com/rust-lang/rust/issues/112504
-    // FIXME: ~^ NOTE an unsafe function restricts its caller, but its body is safe by default
-    external_unsafe_macro::unsafe_macro!();
-    external_unsafe_macro::unsafe_macro!();
-}
-
-fn main() {}
diff --git a/tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.stderr b/tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.stderr
deleted file mode 100644
index 7a1b83c7367..00000000000
--- a/tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.stderr
+++ /dev/null
@@ -1,99 +0,0 @@
-error: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:15:5
-   |
-LL |     unsf();
-   |     ^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/wrapping-unsafe-block-sugg.rs:13:1
-   |
-LL | pub unsafe fn foo() {
-   | ^^^^^^^^^^^^^^^^^^^
-note: the lint level is defined here
-  --> $DIR/wrapping-unsafe-block-sugg.rs:6:9
-   |
-LL | #![deny(unsafe_op_in_unsafe_fn)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^
-
-error: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:19:5
-   |
-LL |     unsf();
-   |     ^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:27:13
-   |
-LL |     let y = *x;
-   |             ^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/wrapping-unsafe-block-sugg.rs:25:1
-   |
-LL | pub unsafe fn bar(x: *const i32) -> i32 {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:30:9
-   |
-LL |     y + *x
-   |         ^^ dereference of raw pointer
-   |
-   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
-
-error: use of mutable static is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:38:13
-   |
-LL |     let y = BAZ;
-   |             ^^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/wrapping-unsafe-block-sugg.rs:36:1
-   |
-LL | pub unsafe fn baz() -> i32 {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: use of mutable static is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:41:9
-   |
-LL |     y + BAZ
-   |         ^^^ use of mutable static
-   |
-   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
-
-error: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:46:36
-   |
-LL | macro_rules! unsafe_macro { () => (unsf()) }
-   |                                    ^^^^^^ call to unsafe function
-...
-LL |     unsafe_macro!();
-   |     --------------- in this macro invocation
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/wrapping-unsafe-block-sugg.rs:56:1
-   |
-LL | pub unsafe fn unsafe_in_macro() {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: this error originates in the macro `unsafe_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:46:36
-   |
-LL | macro_rules! unsafe_macro { () => (unsf()) }
-   |                                    ^^^^^^ call to unsafe function
-...
-LL |     unsafe_macro!();
-   |     --------------- in this macro invocation
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-   = note: this error originates in the macro `unsafe_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 8 previous errors
-
diff --git a/tests/ui/unsafe/wrapping-unsafe-block-sugg.rs b/tests/ui/unsafe/wrapping-unsafe-block-sugg.rs
index 3629b8a1beb..13a446d2d24 100644
--- a/tests/ui/unsafe/wrapping-unsafe-block-sugg.rs
+++ b/tests/ui/unsafe/wrapping-unsafe-block-sugg.rs
@@ -1,7 +1,5 @@
 // run-rustfix
 // aux-build:external_unsafe_macro.rs
-// revisions: mir thir
-// [thir]compile-flags: -Zthir-unsafeck
 
 #![deny(unsafe_op_in_unsafe_fn)] //~ NOTE
 #![crate_name = "wrapping_unsafe_block_sugg"]
@@ -12,13 +10,11 @@ unsafe fn unsf() {}
 
 pub unsafe fn foo() {
     //~^ NOTE an unsafe function restricts its caller, but its body is safe by default
-    unsf(); //[mir]~ ERROR call to unsafe function is unsafe
-     //[thir]~^ ERROR call to unsafe function `unsf` is unsafe
-    //~^^ NOTE
+    unsf(); //~ ERROR call to unsafe function `unsf` is unsafe
+    //~^ NOTE
     //~| NOTE
-    unsf(); //[mir]~ ERROR call to unsafe function is unsafe
-    //[thir]~^ ERROR call to unsafe function `unsf` is unsafe
-    //~^^ NOTE
+    unsf(); //~ ERROR call to unsafe function `unsf` is unsafe
+    //~^ NOTE
     //~| NOTE
 }
 
@@ -44,12 +40,10 @@ pub unsafe fn baz() -> i32 {
 }
 
 macro_rules! unsafe_macro { () => (unsf()) }
-//[mir]~^ ERROR call to unsafe function is unsafe
-//[thir]~^^ ERROR call to unsafe function `unsf` is unsafe
+//~^ ERROR call to unsafe function `unsf` is unsafe
 //~| NOTE
 //~| NOTE
-//[mir]~| ERROR call to unsafe function is unsafe
-//[thir]~| ERROR call to unsafe function `unsf` is unsafe
+//~| ERROR call to unsafe function `unsf` is unsafe
 //~| NOTE
 //~| NOTE
 
diff --git a/tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.stderr b/tests/ui/unsafe/wrapping-unsafe-block-sugg.stderr
index b1fb35f85a6..84b58bc0288 100644
--- a/tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.stderr
+++ b/tests/ui/unsafe/wrapping-unsafe-block-sugg.stderr
@@ -1,23 +1,23 @@
 error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:15:5
+  --> $DIR/wrapping-unsafe-block-sugg.rs:13:5
    |
 LL |     unsf();
    |     ^^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/wrapping-unsafe-block-sugg.rs:13:1
+  --> $DIR/wrapping-unsafe-block-sugg.rs:11:1
    |
 LL | pub unsafe fn foo() {
    | ^^^^^^^^^^^^^^^^^^^
 note: the lint level is defined here
-  --> $DIR/wrapping-unsafe-block-sugg.rs:6:9
+  --> $DIR/wrapping-unsafe-block-sugg.rs:4:9
    |
 LL | #![deny(unsafe_op_in_unsafe_fn)]
    |         ^^^^^^^^^^^^^^^^^^^^^^
 
 error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:19:5
+  --> $DIR/wrapping-unsafe-block-sugg.rs:16:5
    |
 LL |     unsf();
    |     ^^^^^^ call to unsafe function
@@ -25,20 +25,20 @@ LL |     unsf();
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:27:13
+  --> $DIR/wrapping-unsafe-block-sugg.rs:23:13
    |
 LL |     let y = *x;
    |             ^^ dereference of raw pointer
    |
    = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/wrapping-unsafe-block-sugg.rs:25:1
+  --> $DIR/wrapping-unsafe-block-sugg.rs:21:1
    |
 LL | pub unsafe fn bar(x: *const i32) -> i32 {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:30:9
+  --> $DIR/wrapping-unsafe-block-sugg.rs:26:9
    |
 LL |     y + *x
    |         ^^ dereference of raw pointer
@@ -46,20 +46,20 @@ LL |     y + *x
    = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 
 error: use of mutable static is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:38:13
+  --> $DIR/wrapping-unsafe-block-sugg.rs:34:13
    |
 LL |     let y = BAZ;
    |             ^^^ use of mutable static
    |
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/wrapping-unsafe-block-sugg.rs:36:1
+  --> $DIR/wrapping-unsafe-block-sugg.rs:32:1
    |
 LL | pub unsafe fn baz() -> i32 {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: use of mutable static is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:41:9
+  --> $DIR/wrapping-unsafe-block-sugg.rs:37:9
    |
 LL |     y + BAZ
    |         ^^^ use of mutable static
@@ -67,7 +67,7 @@ LL |     y + BAZ
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 
 error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:46:36
+  --> $DIR/wrapping-unsafe-block-sugg.rs:42:36
    |
 LL | macro_rules! unsafe_macro { () => (unsf()) }
    |                                    ^^^^^^ call to unsafe function
@@ -77,14 +77,14 @@ LL |     unsafe_macro!();
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/wrapping-unsafe-block-sugg.rs:56:1
+  --> $DIR/wrapping-unsafe-block-sugg.rs:50:1
    |
 LL | pub unsafe fn unsafe_in_macro() {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this error originates in the macro `unsafe_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:46:36
+  --> $DIR/wrapping-unsafe-block-sugg.rs:42:36
    |
 LL | macro_rules! unsafe_macro { () => (unsf()) }
    |                                    ^^^^^^ call to unsafe function
diff --git a/tests/ui/unsized-locals/unsized-exprs-rpass.rs b/tests/ui/unsized-locals/unsized-exprs-rpass.rs
index 175b02fcb81..83d3680f72f 100644
--- a/tests/ui/unsized-locals/unsized-exprs-rpass.rs
+++ b/tests/ui/unsized-locals/unsized-exprs-rpass.rs
@@ -2,7 +2,7 @@
 #![allow(incomplete_features, unused_braces, unused_parens)]
 #![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
 
-struct A<X: ?Sized>(#[allow(unused_tuple_struct_fields)] X);
+struct A<X: ?Sized>(#[allow(dead_code)] X);
 
 fn udrop<T: ?Sized>(_x: T) {}
 fn foo() -> Box<[u8]> {
diff --git a/tests/ui/unsized/unchanged-param.rs b/tests/ui/unsized/unchanged-param.rs
index 6bdc89310eb..8aa2ed15344 100644
--- a/tests/ui/unsized/unchanged-param.rs
+++ b/tests/ui/unsized/unchanged-param.rs
@@ -1,8 +1,8 @@
 // run-pass
 // Test that we allow unsizing even if there is an unchanged param in the
 // field getting unsized.
-struct A<T, U: ?Sized + 'static>(#[allow(unused_tuple_struct_fields)] T, B<T, U>);
-struct B<T, U: ?Sized>(#[allow(unused_tuple_struct_fields)] T, U);
+struct A<T, U: ?Sized + 'static>(#[allow(dead_code)] T, B<T, U>);
+struct B<T, U: ?Sized>(#[allow(dead_code)] T, U);
 
 fn main() {
     let x: A<[u32; 1], [u32; 1]> = A([0; 1], B([0; 1], [0; 1]));
diff --git a/tests/ui/unused-crate-deps/test.mk b/tests/ui/unused-crate-deps/test.mk
deleted file mode 100644
index 0b98b4e44fb..00000000000
--- a/tests/ui/unused-crate-deps/test.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-# Everyone uses make for building Rust
-
-foo: bar.rlib
-	$(RUSTC) --crate-type bin --extern bar=bar.rlib
-
-%.rlib: %.rs
-	$(RUSTC) --crate-type lib $<
diff --git a/tests/ui/wf/hir-wf-check-erase-regions.stderr b/tests/ui/wf/hir-wf-check-erase-regions.stderr
index eb0a8f8f69a..4b696dc1d1d 100644
--- a/tests/ui/wf/hir-wf-check-erase-regions.stderr
+++ b/tests/ui/wf/hir-wf-check-erase-regions.stderr
@@ -6,15 +6,15 @@ LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
    |
    = help: the trait `Iterator` is not implemented for `&'a T`
    = help: the trait `Iterator` is implemented for `&mut I`
-   = note: required for `&'a T` to implement `IntoIterator`
-note: required by a bound in `Flatten`
-  --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
+   = note: required for `Flatten<std::slice::Iter<'a, T>>` to implement `Iterator`
+note: required by a bound in `std::iter::IntoIterator::IntoIter`
+  --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
 
 error[E0277]: `&'a T` is not an iterator
-  --> $DIR/hir-wf-check-erase-regions.rs:11:27
+  --> $DIR/hir-wf-check-erase-regions.rs:7:21
    |
-LL |     fn into_iter(self) -> Self::IntoIter {
-   |                           ^^^^^^^^^^^^^^ `&'a T` is not an iterator
+LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'a T` is not an iterator
    |
    = help: the trait `Iterator` is not implemented for `&'a T`
    = help: the trait `Iterator` is implemented for `&mut I`
@@ -23,16 +23,16 @@ note: required by a bound in `Flatten`
   --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
 
 error[E0277]: `&'a T` is not an iterator
-  --> $DIR/hir-wf-check-erase-regions.rs:7:21
+  --> $DIR/hir-wf-check-erase-regions.rs:11:27
    |
-LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'a T` is not an iterator
+LL |     fn into_iter(self) -> Self::IntoIter {
+   |                           ^^^^^^^^^^^^^^ `&'a T` is not an iterator
    |
    = help: the trait `Iterator` is not implemented for `&'a T`
    = help: the trait `Iterator` is implemented for `&mut I`
-   = note: required for `Flatten<std::slice::Iter<'a, T>>` to implement `Iterator`
-note: required by a bound in `std::iter::IntoIterator::IntoIter`
-  --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
+   = note: required for `&'a T` to implement `IntoIterator`
+note: required by a bound in `Flatten`
+  --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
 
 error: aborting due to 3 previous errors