about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-10-10 20:25:54 +0000
committerbors <bors@rust-lang.org>2024-10-10 20:25:54 +0000
commit52fd9983996d9fcfb719749838336be66dee68f9 (patch)
tree5287ac282e7dad8800887cdf918e26dbf6b84ebf
parentd0141af514abb03ee7bcf36d5419dcf5f2ce9812 (diff)
parent8ddd3279c18d7ced79d623ec08ef6b4c125e4cc8 (diff)
downloadrust-52fd9983996d9fcfb719749838336be66dee68f9.tar.gz
rust-52fd9983996d9fcfb719749838336be66dee68f9.zip
Auto merge of #131511 - matthiaskrgr:rollup-56qr0e5, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #130308 (codegen_ssa: consolidate tied target checks)
 - #130538 (Stabilize const `{slice,array}::from_mut`)
 - #130741 (rustc_target: Add sme-b16b16 as an explicit aarch64 target feature)
 - #131033 (Precise capturing in traits)
 - #131442 (Match std `RUSTFLAGS` for host and target for `mir-opt` test suite to fix double std build/rebuilds)
 - #131470 (add test infra to explicitely test rustc with autodiff/enzyme disabled)
 - #131475 (Compiler & its UI tests: Rename remaining occurrences of "object safe" to "dyn compatible" )
 - #131493 (Avoid redundant sysroot additions to `PATH` when linking)
 - #131509 (Update .mailmap)

r? `@ghost`
`@rustbot` modify labels: rollup
-rw-r--r--.mailmap1
-rw-r--r--compiler/rustc_ast_lowering/src/lib.rs19
-rw-r--r--compiler/rustc_codegen_gcc/messages.ftl3
-rw-r--r--compiler/rustc_codegen_gcc/src/attributes.rs22
-rw-r--r--compiler/rustc_codegen_gcc/src/errors.rs36
-rw-r--r--compiler/rustc_codegen_gcc/src/gcc_util.rs24
-rw-r--r--compiler/rustc_codegen_llvm/messages.ftl6
-rw-r--r--compiler/rustc_codegen_llvm/src/attributes.rs23
-rw-r--r--compiler/rustc_codegen_llvm/src/errors.rs24
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm_util.rs30
-rw-r--r--compiler/rustc_codegen_ssa/messages.ftl5
-rw-r--r--compiler/rustc_codegen_ssa/src/codegen_attrs.rs45
-rw-r--r--compiler/rustc_codegen_ssa/src/errors.rs26
-rw-r--r--compiler/rustc_feature/src/removed.rs4
-rw-r--r--compiler/rustc_feature/src/unstable.rs17
-rw-r--r--compiler/rustc_hir_analysis/messages.ftl3
-rw-r--r--compiler/rustc_hir_analysis/src/check/check.rs25
-rw-r--r--compiler/rustc_hir_analysis/src/check/compare_impl_item/refine.rs4
-rw-r--r--compiler/rustc_hir_analysis/src/coherence/mod.rs2
-rw-r--r--compiler/rustc_hir_analysis/src/errors/precise_captures.rs9
-rw-r--r--compiler/rustc_hir_analysis/src/variance/mod.rs49
-rw-r--r--compiler/rustc_metadata/src/rmeta/encoder.rs5
-rw-r--r--compiler/rustc_middle/src/ty/context.rs4
-rw-r--r--compiler/rustc_session/src/session.rs2
-rw-r--r--compiler/rustc_span/src/symbol.rs2
-rw-r--r--compiler/rustc_target/src/target_features.rs4
-rw-r--r--compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs24
-rw-r--r--compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs2
-rw-r--r--compiler/rustc_trait_selection/src/traits/wf.rs2
-rw-r--r--compiler/rustc_type_ir/src/interner.rs2
-rw-r--r--compiler/rustc_type_ir/src/relate.rs10
-rw-r--r--library/core/src/array/mod.rs3
-rw-r--r--library/core/src/lib.rs2
-rw-r--r--library/core/src/slice/raw.rs3
-rw-r--r--library/core/tests/lib.rs2
-rw-r--r--library/std/tests/run-time-detect.rs1
m---------library/stdarch0
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs6
-rw-r--r--src/tools/compiletest/src/command-list.rs1
-rw-r--r--src/tools/compiletest/src/header/cfg.rs6
-rw-r--r--src/tools/tidy/src/issues.txt4
-rw-r--r--tests/crashes/120241-2.rs2
-rw-r--r--tests/crashes/120241.rs2
-rw-r--r--tests/crashes/120482.rs2
-rw-r--r--tests/crashes/125512.rs2
-rw-r--r--tests/crashes/128176.rs2
-rw-r--r--tests/crashes/130521.rs2
-rw-r--r--tests/ui/allocator/dyn-compatible.rs13
-rw-r--r--tests/ui/allocator/object-safe.rs13
-rw-r--r--tests/ui/associated-type-bounds/entails-sized-dyn-compatibility.rs (renamed from tests/ui/associated-type-bounds/entails-sized-object-safety.rs)12
-rw-r--r--tests/ui/async-await/in-trait/dyn-compatibility.rs (renamed from tests/ui/async-await/in-trait/object-safety.rs)0
-rw-r--r--tests/ui/async-await/in-trait/dyn-compatibility.stderr (renamed from tests/ui/async-await/in-trait/object-safety.stderr)4
-rw-r--r--tests/ui/check-cfg/mix.stderr2
-rw-r--r--tests/ui/check-cfg/well-known-values.stderr2
-rw-r--r--tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.rs (renamed from tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs)6
-rw-r--r--tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr27
-rw-r--r--tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr27
-rw-r--r--tests/ui/coherence/coherence-unsafe-trait-object-impl.rs2
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.rs (renamed from tests/ui/const-generics/adt_const_params/const_param_ty_object_safety.rs)0
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.stderr (renamed from tests/ui/const-generics/adt_const_params/const_param_ty_object_safety.stderr)4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.rs (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.rs)0
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr)8
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.rs (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.rs)0
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.stderr)8
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.rs)0
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr)8
-rw-r--r--tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok.rs (renamed from tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs)0
-rw-r--r--tests/ui/dyn-compatibility/almost-supertrait-associated-type.rs (renamed from tests/ui/object-safety/almost-supertrait-associated-type.rs)2
-rw-r--r--tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr (renamed from tests/ui/object-safety/almost-supertrait-associated-type.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_const_bounds.rs (renamed from tests/ui/object-safety/assoc_const_bounds.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_const_bounds_sized.rs (renamed from tests/ui/object-safety/assoc_const_bounds_sized.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds.rs (renamed from tests/ui/object-safety/assoc_type_bounds.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds.stderr (renamed from tests/ui/object-safety/assoc_type_bounds.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds2.rs (renamed from tests/ui/object-safety/assoc_type_bounds2.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds2.stderr (renamed from tests/ui/object-safety/assoc_type_bounds2.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.fixed (renamed from tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.rs (renamed from tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.stderr (renamed from tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized.rs (renamed from tests/ui/object-safety/assoc_type_bounds_sized.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized_others.rs (renamed from tests/ui/object-safety/assoc_type_bounds_sized_others.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized_others.stderr (renamed from tests/ui/object-safety/assoc_type_bounds_sized_others.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized_unnecessary.rs (renamed from tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized_unnecessary.stderr (renamed from tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs (renamed from tests/ui/object-safety/assoc_type_bounds_sized_used.rs)0
-rw-r--r--tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.stderr (renamed from tests/ui/object-safety/assoc_type_bounds_sized_used.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/associated-consts.curr.stderr (renamed from tests/ui/object-safety/object-safety-associated-consts.curr.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr)4
-rw-r--r--tests/ui/dyn-compatibility/associated-consts.rs (renamed from tests/ui/object-safety/object-safety-associated-consts.rs)4
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-2.new.stderr (renamed from tests/ui/object-safety/avoid-ice-on-warning-2.new.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr (renamed from tests/ui/object-safety/avoid-ice-on-warning-2.old.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-2.rs (renamed from tests/ui/object-safety/avoid-ice-on-warning-2.rs)0
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-3.new.stderr (renamed from tests/ui/object-safety/avoid-ice-on-warning-3.new.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr (renamed from tests/ui/object-safety/avoid-ice-on-warning-3.old.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning-3.rs (renamed from tests/ui/object-safety/avoid-ice-on-warning-3.rs)0
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning.new.stderr (renamed from tests/ui/object-safety/avoid-ice-on-warning.new.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr (renamed from tests/ui/object-safety/avoid-ice-on-warning.old.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/avoid-ice-on-warning.rs (renamed from tests/ui/object-safety/avoid-ice-on-warning.rs)0
-rw-r--r--tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.fixed (renamed from tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed)0
-rw-r--r--tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.stderr (renamed from tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.old.stderr (renamed from tests/ui/object-safety/bare-trait-dont-suggest-dyn.old.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.rs (renamed from tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs)0
-rw-r--r--tests/ui/dyn-compatibility/bounds.rs (renamed from tests/ui/object-safety/object-safety-bounds.rs)2
-rw-r--r--tests/ui/dyn-compatibility/bounds.stderr (renamed from tests/ui/object-safety/object-safety-bounds.stderr)4
-rw-r--r--tests/ui/dyn-compatibility/by-value-self-use.rs (renamed from tests/ui/object-safety/object-safety-by-value-self-use.rs)2
-rw-r--r--tests/ui/dyn-compatibility/by-value-self-use.stderr (renamed from tests/ui/object-safety/object-safety-by-value-self-use.stderr)2
-rw-r--r--tests/ui/dyn-compatibility/by-value-self.rs (renamed from tests/ui/object-safety/object-safety-by-value-self.rs)2
-rw-r--r--tests/ui/dyn-compatibility/call-when-assoc-ty-is-sized.rs (renamed from tests/ui/object-safety/call-when-assoc-ty-is-sized.rs)0
-rw-r--r--tests/ui/dyn-compatibility/elaborated-predicates-ordering.rs (renamed from tests/ui/object-safety/issue-102933.rs)1
-rw-r--r--tests/ui/dyn-compatibility/erroneous_signature.rs (renamed from tests/ui/object-safety/erroneous_signature.rs)0
-rw-r--r--tests/ui/dyn-compatibility/erroneous_signature.stderr (renamed from tests/ui/object-safety/erroneous_signature.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/generics.curr.stderr (renamed from tests/ui/object-safety/object-safety-generics.curr.stderr)20
-rw-r--r--tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-generics.object_safe_for_dispatch.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/generics.rs (renamed from tests/ui/object-safety/object-safety-generics.rs)8
-rw-r--r--tests/ui/dyn-compatibility/impossible-predicates-multiple_supertrait_upcastable-check.rs (renamed from tests/ui/object-safety/issue-106247.rs)1
-rw-r--r--tests/ui/dyn-compatibility/item-bounds-can-reference-self.rs (renamed from tests/ui/object-safety/item-bounds-can-reference-self.rs)0
-rw-r--r--tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.rs (renamed from tests/ui/object-safety/issue-19538.rs)2
-rw-r--r--tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr (renamed from tests/ui/object-safety/issue-19538.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.rs (renamed from tests/ui/object-safety/object-safety-issue-22040.rs)0
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.stderr (renamed from tests/ui/object-safety/object-safety-issue-22040.stderr)12
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self.curr.stderr (renamed from tests/ui/object-safety/object-safety-mentions-Self.curr.stderr)16
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self.rs (renamed from tests/ui/object-safety/object-safety-mentions-Self.rs)4
-rw-r--r--tests/ui/dyn-compatibility/missing-assoc-type.rs (renamed from tests/ui/traits/object/object-unsafe-missing-assoc-type.rs)0
-rw-r--r--tests/ui/dyn-compatibility/missing-assoc-type.stderr (renamed from tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr)16
-rw-r--r--tests/ui/dyn-compatibility/no-static.curr.stderr (renamed from tests/ui/object-safety/object-safety-no-static.curr.stderr)12
-rw-r--r--tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr)4
-rw-r--r--tests/ui/dyn-compatibility/no-static.rs (renamed from tests/ui/object-safety/object-safety-no-static.rs)4
-rw-r--r--tests/ui/dyn-compatibility/phantom-fn.rs (renamed from tests/ui/object-safety/object-safety-phantom-fn.rs)2
-rw-r--r--tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs (renamed from tests/ui/object-safety/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs)0
-rw-r--r--tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr (renamed from tests/ui/object-safety/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr)0
-rw-r--r--tests/ui/dyn-compatibility/sized-2.curr.stderr (renamed from tests/ui/object-safety/object-safety-sized-2.curr.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr)4
-rw-r--r--tests/ui/dyn-compatibility/sized-2.rs (renamed from tests/ui/object-safety/object-safety-sized-2.rs)4
-rw-r--r--tests/ui/dyn-compatibility/sized.curr.stderr (renamed from tests/ui/object-safety/object-safety-sized.curr.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr)4
-rw-r--r--tests/ui/dyn-compatibility/sized.rs (renamed from tests/ui/object-safety/object-safety-sized.rs)4
-rw-r--r--tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs (renamed from tests/ui/object-safety/object-safety-supertrait-mentions-GAT.rs)0
-rw-r--r--tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr (renamed from tests/ui/object-safety/object-safety-supertrait-mentions-GAT.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/supertrait-mentions-Self.rs (renamed from tests/ui/object-safety/object-safety-supertrait-mentions-Self.rs)0
-rw-r--r--tests/ui/dyn-compatibility/supertrait-mentions-Self.stderr (renamed from tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr)8
-rw-r--r--tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs (renamed from tests/ui/object-safety/issue-102762.rs)5
-rw-r--r--tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr (renamed from tests/ui/object-safety/issue-102762.stderr)12
-rw-r--r--tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.rs41
-rw-r--r--tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr83
-rw-r--r--tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.rs41
-rw-r--r--tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr83
-rw-r--r--tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.rs6
-rw-r--r--tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.stderr13
-rw-r--r--tests/ui/generic-associated-types/trait-objects.rs2
-rw-r--r--tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.rs (renamed from tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.rs)11
-rw-r--r--tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr (renamed from tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr)72
-rw-r--r--tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-impl-trait.rs (renamed from tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.rs)16
-rw-r--r--tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-impl-trait.stderr (renamed from tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr)12
-rw-r--r--tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-dyn-compatibility-check.rs (renamed from tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs)0
-rw-r--r--tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-dyn-compatibility-check.stderr (renamed from tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.stderr)16
-rw-r--r--tests/ui/impl-trait/in-trait/dyn-compatibility-sized.rs (renamed from tests/ui/impl-trait/in-trait/object-safety-sized.rs)0
-rw-r--r--tests/ui/impl-trait/in-trait/dyn-compatibility.rs (renamed from tests/ui/impl-trait/in-trait/object-safety.rs)0
-rw-r--r--tests/ui/impl-trait/in-trait/dyn-compatibility.stderr (renamed from tests/ui/impl-trait/in-trait/object-safety.stderr)16
-rw-r--r--tests/ui/impl-trait/in-trait/variance.rs23
-rw-r--r--tests/ui/impl-trait/in-trait/variance.stderr34
-rw-r--r--tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs3
-rw-r--r--tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr14
-rw-r--r--tests/ui/impl-trait/precise-capturing/redundant.normal.stderr20
-rw-r--r--tests/ui/impl-trait/precise-capturing/redundant.rpitit.stderr18
-rw-r--r--tests/ui/impl-trait/precise-capturing/redundant.rs15
-rw-r--r--tests/ui/impl-trait/precise-capturing/redundant.stderr36
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs5
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr20
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.rs14
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr17
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit.rs31
-rw-r--r--tests/ui/impl-trait/precise-capturing/rpitit.stderr56
-rw-r--r--tests/ui/impl-trait/precise-capturing/self-capture.rs5
-rw-r--r--tests/ui/impl-trait/precise-capturing/self-capture.stderr10
-rw-r--r--tests/ui/issues/issue-58734.rs8
-rw-r--r--tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr)0
-rw-r--r--tests/ui/kindck/kindck-inherited-copy-bound.rs8
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/downcast-unsafe-trait-objects.rs (renamed from tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs)4
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr (renamed from tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr)0
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr (renamed from tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr)0
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.rs (renamed from tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs)4
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/static-dispatch-unsafe-object.rs (renamed from tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs)2
-rw-r--r--tests/ui/sanitizer/cfi/async-closures.rs2
-rw-r--r--tests/ui/self/arbitrary-self-types-dyn-incompatible.curr.stderr (renamed from tests/ui/self/arbitrary-self-types-not-object-safe.curr.stderr)8
-rw-r--r--tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr)4
-rw-r--r--tests/ui/self/arbitrary-self-types-dyn-incompatible.rs (renamed from tests/ui/self/arbitrary-self-types-not-object-safe.rs)6
-rw-r--r--tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs6
-rw-r--r--tests/ui/self/dyn-compatibility-sized-self-by-value-self.rs (renamed from tests/ui/self/object-safety-sized-self-by-value-self.rs)2
-rw-r--r--tests/ui/self/dyn-compatibility-sized-self-generic-method.rs (renamed from tests/ui/self/object-safety-sized-self-generic-method.rs)2
-rw-r--r--tests/ui/self/dyn-compatibility-sized-self-return-Self.rs (renamed from tests/ui/self/object-safety-sized-self-return-Self.rs)2
-rw-r--r--tests/ui/specialization/issue-44861.rs8
-rw-r--r--tests/ui/suggestions/auxiliary/dyn-incompatible.rs (renamed from tests/ui/suggestions/auxiliary/not-object-safe.rs)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-references-self.rs (renamed from tests/ui/suggestions/object-unsafe-trait-references-self.rs)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-references-self.stderr (renamed from tests/ui/suggestions/object-unsafe-trait-references-self.stderr)14
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.stderr (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.stderr)30
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.rs (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.stderr)12
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self.rs (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-self.rs)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-self.stderr)12
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.fixed (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.rs (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs)0
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr (renamed from tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.stderr)6
-rw-r--r--tests/ui/suggestions/issue-104328.rs2
-rw-r--r--tests/ui/suggestions/issue-98500.rs6
-rw-r--r--tests/ui/suggestions/issue-98500.stderr2
-rw-r--r--tests/ui/target-feature/tied-features-no-implication-1.paca.stderr4
-rw-r--r--tests/ui/target-feature/tied-features-no-implication-1.pacg.stderr4
-rw-r--r--tests/ui/target-feature/tied-features-no-implication-1.rs20
-rw-r--r--tests/ui/target-feature/tied-features-no-implication.paca.stderr4
-rw-r--r--tests/ui/target-feature/tied-features-no-implication.pacg.stderr14
-rw-r--r--tests/ui/target-feature/tied-features-no-implication.rs29
-rw-r--r--tests/ui/target-feature/tied-features.rs9
-rw-r--r--tests/ui/target-feature/tied-features.stderr14
-rw-r--r--tests/ui/traits/alias/no-duplicates.rs4
-rw-r--r--tests/ui/traits/alias/no-extra-traits.rs2
-rw-r--r--tests/ui/traits/alias/object-wf.rs4
-rw-r--r--tests/ui/traits/next-solver/dyn-incompatibility.rs (renamed from tests/ui/traits/next-solver/object-unsafety.rs)0
-rw-r--r--tests/ui/traits/next-solver/dyn-incompatibility.stderr (renamed from tests/ui/traits/next-solver/object-unsafety.stderr)10
-rw-r--r--tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.rs (renamed from tests/ui/traits/non_lifetime_binders/supertrait-object-safety.rs)0
-rw-r--r--tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr (renamed from tests/ui/traits/non_lifetime_binders/supertrait-object-safety.stderr)14
-rw-r--r--tests/ui/traits/object/print_vtable_sizes.rs2
-rw-r--r--tests/ui/traits/object/safety.rs2
-rw-r--r--tests/ui/traits/vtable/vtable-dyn-incompatible.rs (renamed from tests/ui/traits/vtable/vtable-non-object-safe.rs)2
-rw-r--r--tests/ui/traits/vtable/vtable-dyn-incompatible.stderr (renamed from tests/ui/traits/vtable/vtable-non-object-safe.stderr)2
-rw-r--r--tests/ui/traits/wf-object/no-duplicates.rs4
-rw-r--r--tests/ui/traits/wf-object/reverse-order.rs2
-rw-r--r--tests/ui/unsized-locals/by-value-trait-dyn-compatibility-rpass.rs (renamed from tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs)0
-rw-r--r--tests/ui/unsized-locals/by-value-trait-dyn-compatibility-with-default.rs (renamed from tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs)0
-rw-r--r--tests/ui/unsized-locals/by-value-trait-dyn-compatibility.rs (renamed from tests/ui/unsized-locals/by-value-trait-object-safety.rs)0
-rw-r--r--tests/ui/unsized-locals/by-value-trait-dyn-compatibility.stderr (renamed from tests/ui/unsized-locals/by-value-trait-object-safety.stderr)4
-rw-r--r--tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.rs (renamed from tests/ui/wf/wf-convert-unsafe-trait-obj-box.rs)4
-rw-r--r--tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr (renamed from tests/ui/wf/wf-convert-unsafe-trait-obj-box.stderr)12
-rw-r--r--tests/ui/wf/wf-convert-dyn-incompat-trait-obj.rs (renamed from tests/ui/wf/wf-convert-unsafe-trait-obj.rs)4
-rw-r--r--tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr (renamed from tests/ui/wf/wf-convert-unsafe-trait-obj.stderr)12
-rw-r--r--tests/ui/wf/wf-dyn-incompat-trait-obj-match.rs (renamed from tests/ui/wf/wf-unsafe-trait-obj-match.rs)2
-rw-r--r--tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr (renamed from tests/ui/wf/wf-unsafe-trait-obj-match.stderr)10
-rw-r--r--tests/ui/wf/wf-dyn-incompatible.rs (renamed from tests/ui/wf/wf-object-safe.rs)2
-rw-r--r--tests/ui/wf/wf-dyn-incompatible.stderr (renamed from tests/ui/wf/wf-object-safe.stderr)4
240 files changed, 1047 insertions, 869 deletions
diff --git a/.mailmap b/.mailmap
index 0f58762e023..dc5bfe6d5fc 100644
--- a/.mailmap
+++ b/.mailmap
@@ -312,6 +312,7 @@ Josh Driver <keeperofdakeys@gmail.com>
 Josh Holmer <jholmer.in@gmail.com>
 Josh Stone <cuviper@gmail.com> <jistone@redhat.com>
 Josh Stone <cuviper@gmail.com> <jistone@fedoraproject.org>
+Julia Ryan <juliaryan3.14@gmail.com> <josephryan3.14@gmail.com>
 Julian Knodt <julianknodt@gmail.com>
 jumbatm <jumbatm@gmail.com> <30644300+jumbatm@users.noreply.github.com>
 Junyoung Cho <june0.cho@samsung.com>
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index b26797f4203..35af4d63cc7 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -1573,11 +1573,20 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
         // Feature gate for RPITIT + use<..>
         match origin {
             rustc_hir::OpaqueTyOrigin::FnReturn { in_trait_or_impl: Some(_), .. } => {
-                if let Some(span) = bounds.iter().find_map(|bound| match *bound {
-                    ast::GenericBound::Use(_, span) => Some(span),
-                    _ => None,
-                }) {
-                    self.tcx.dcx().emit_err(errors::NoPreciseCapturesOnRpitit { span });
+                if !self.tcx.features().precise_capturing_in_traits
+                    && let Some(span) = bounds.iter().find_map(|bound| match *bound {
+                        ast::GenericBound::Use(_, span) => Some(span),
+                        _ => None,
+                    })
+                {
+                    let mut diag =
+                        self.tcx.dcx().create_err(errors::NoPreciseCapturesOnRpitit { span });
+                    add_feature_diagnostics(
+                        &mut diag,
+                        self.tcx.sess,
+                        sym::precise_capturing_in_traits,
+                    );
+                    diag.emit();
                 }
             }
             _ => {}
diff --git a/compiler/rustc_codegen_gcc/messages.ftl b/compiler/rustc_codegen_gcc/messages.ftl
index 0235384445e..bbae59ea7a5 100644
--- a/compiler/rustc_codegen_gcc/messages.ftl
+++ b/compiler/rustc_codegen_gcc/messages.ftl
@@ -8,9 +8,6 @@ codegen_gcc_invalid_minimum_alignment =
 codegen_gcc_lto_not_supported =
     LTO is not supported. You may get a linker error.
 
-codegen_gcc_tied_target_features = the target features {$features} must all be either enabled or disabled together
-    .help = add the missing features in a `target_feature` attribute
-
 codegen_gcc_unwinding_inline_asm =
     GCC backend does not support unwinding from inline asm
 
diff --git a/compiler/rustc_codegen_gcc/src/attributes.rs b/compiler/rustc_codegen_gcc/src/attributes.rs
index 5fdf2680aac..d20e13e15b9 100644
--- a/compiler/rustc_codegen_gcc/src/attributes.rs
+++ b/compiler/rustc_codegen_gcc/src/attributes.rs
@@ -7,11 +7,9 @@ use rustc_attr::InstructionSetAttr;
 #[cfg(feature = "master")]
 use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
 use rustc_middle::ty;
-use rustc_span::symbol::sym;
 
 use crate::context::CodegenCx;
-use crate::errors::TiedTargetFeatures;
-use crate::gcc_util::{check_tied_features, to_gcc_features};
+use crate::gcc_util::to_gcc_features;
 
 /// Get GCC attribute for the provided inline heuristic.
 #[cfg(feature = "master")]
@@ -72,26 +70,10 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
         }
     }
 
-    let function_features = codegen_fn_attrs
+    let mut function_features = codegen_fn_attrs
         .target_features
         .iter()
         .map(|features| features.name.as_str())
-        .collect::<Vec<&str>>();
-
-    if let Some(features) = check_tied_features(
-        cx.tcx.sess,
-        &function_features.iter().map(|features| (*features, true)).collect(),
-    ) {
-        let span = cx
-            .tcx
-            .get_attr(instance.def_id(), sym::target_feature)
-            .map_or_else(|| cx.tcx.def_span(instance.def_id()), |a| a.span);
-        cx.tcx.dcx().create_err(TiedTargetFeatures { features: features.join(", "), span }).emit();
-        return;
-    }
-
-    let mut function_features = function_features
-        .iter()
         .flat_map(|feat| to_gcc_features(cx.tcx.sess, feat).into_iter())
         .chain(codegen_fn_attrs.instruction_set.iter().map(|x| match *x {
             InstructionSetAttr::ArmA32 => "-thumb-mode", // TODO(antoyo): support removing feature.
diff --git a/compiler/rustc_codegen_gcc/src/errors.rs b/compiler/rustc_codegen_gcc/src/errors.rs
index 6bada3d334c..dc1895f437b 100644
--- a/compiler/rustc_codegen_gcc/src/errors.rs
+++ b/compiler/rustc_codegen_gcc/src/errors.rs
@@ -1,9 +1,6 @@
-use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level};
 use rustc_macros::{Diagnostic, Subdiagnostic};
 use rustc_span::Span;
 
-use crate::fluent_generated as fluent;
-
 #[derive(Diagnostic)]
 #[diag(codegen_gcc_unknown_ctarget_feature_prefix)]
 #[note]
@@ -46,15 +43,6 @@ pub(crate) struct InvalidMinimumAlignment {
 }
 
 #[derive(Diagnostic)]
-#[diag(codegen_gcc_tied_target_features)]
-#[help]
-pub(crate) struct TiedTargetFeatures {
-    #[primary_span]
-    pub span: Span,
-    pub features: String,
-}
-
-#[derive(Diagnostic)]
 #[diag(codegen_gcc_copy_bitcode)]
 pub(crate) struct CopyBitcode {
     pub err: std::io::Error,
@@ -78,27 +66,3 @@ pub(crate) struct LtoDylib;
 pub(crate) struct LtoBitcodeFromRlib {
     pub gcc_err: String,
 }
-
-pub(crate) struct TargetFeatureDisableOrEnable<'a> {
-    pub features: &'a [&'a str],
-    pub span: Option<Span>,
-    pub missing_features: Option<MissingFeatures>,
-}
-
-#[derive(Subdiagnostic)]
-#[help(codegen_gcc_missing_features)]
-pub(crate) struct MissingFeatures;
-
-impl<G: EmissionGuarantee> Diagnostic<'_, G> for TargetFeatureDisableOrEnable<'_> {
-    fn into_diag(self, dcx: DiagCtxtHandle<'_>, level: Level) -> Diag<'_, G> {
-        let mut diag = Diag::new(dcx, level, fluent::codegen_gcc_target_feature_disable_or_enable);
-        if let Some(span) = self.span {
-            diag.span(span);
-        };
-        if let Some(missing_features) = self.missing_features {
-            diag.subdiagnostic(missing_features);
-        }
-        diag.arg("features", self.features.join(", "));
-        diag
-    }
-}
diff --git a/compiler/rustc_codegen_gcc/src/gcc_util.rs b/compiler/rustc_codegen_gcc/src/gcc_util.rs
index 01dd1a8856a..3104088e0d5 100644
--- a/compiler/rustc_codegen_gcc/src/gcc_util.rs
+++ b/compiler/rustc_codegen_gcc/src/gcc_util.rs
@@ -1,15 +1,14 @@
 #[cfg(feature = "master")]
 use gccjit::Context;
+use rustc_codegen_ssa::codegen_attrs::check_tied_features;
+use rustc_codegen_ssa::errors::TargetFeatureDisableOrEnable;
 use rustc_data_structures::fx::FxHashMap;
 use rustc_middle::bug;
 use rustc_session::Session;
 use rustc_target::target_features::RUSTC_SPECIFIC_FEATURES;
 use smallvec::{SmallVec, smallvec};
 
-use crate::errors::{
-    PossibleFeature, TargetFeatureDisableOrEnable, UnknownCTargetFeature,
-    UnknownCTargetFeaturePrefix,
-};
+use crate::errors::{PossibleFeature, UnknownCTargetFeature, UnknownCTargetFeaturePrefix};
 
 /// The list of GCC features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,
 /// `--target` and similar).
@@ -185,23 +184,6 @@ pub fn to_gcc_features<'a>(sess: &Session, s: &'a str) -> SmallVec<[&'a str; 2]>
     }
 }
 
-// Given a map from target_features to whether they are enabled or disabled,
-// ensure only valid combinations are allowed.
-pub fn check_tied_features(
-    sess: &Session,
-    features: &FxHashMap<&str, bool>,
-) -> Option<&'static [&'static str]> {
-    for tied in sess.target.tied_target_features() {
-        // Tied features must be set to the same value, or not set at all
-        let mut tied_iter = tied.iter();
-        let enabled = features.get(tied_iter.next().unwrap());
-        if tied_iter.any(|feature| enabled != features.get(feature)) {
-            return Some(tied);
-        }
-    }
-    None
-}
-
 fn arch_to_gcc(name: &str) -> &str {
     match name {
         "M68020" => "68020",
diff --git a/compiler/rustc_codegen_llvm/messages.ftl b/compiler/rustc_codegen_llvm/messages.ftl
index df2198df14b..0950e4bb26b 100644
--- a/compiler/rustc_codegen_llvm/messages.ftl
+++ b/compiler/rustc_codegen_llvm/messages.ftl
@@ -33,9 +33,6 @@ codegen_llvm_lto_proc_macro = lto cannot be used for `proc-macro` crate type wit
 codegen_llvm_mismatch_data_layout =
     data-layout for target `{$rustc_target}`, `{$rustc_layout}`, differs from LLVM target's `{$llvm_target}` default layout, `{$llvm_layout}`
 
-codegen_llvm_missing_features =
-    add the missing features in a `target_feature` attribute
-
 codegen_llvm_multiple_source_dicompileunit = multiple source DICompileUnits found
 codegen_llvm_multiple_source_dicompileunit_with_llvm_err = multiple source DICompileUnits found: {$llvm_err}
 
@@ -63,9 +60,6 @@ codegen_llvm_serialize_module_with_llvm_err = failed to serialize module {$name}
 codegen_llvm_symbol_already_defined =
     symbol `{$symbol_name}` is already defined
 
-codegen_llvm_target_feature_disable_or_enable =
-    the target features {$features} must all be either enabled or disabled together
-
 codegen_llvm_target_machine = could not create LLVM TargetMachine for triple: {$triple}
 codegen_llvm_target_machine_with_llvm_err = could not create LLVM TargetMachine for triple: {$triple}: {$llvm_err}
 
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs
index 489259da856..2c5ec9dad59 100644
--- a/compiler/rustc_codegen_llvm/src/attributes.rs
+++ b/compiler/rustc_codegen_llvm/src/attributes.rs
@@ -6,12 +6,11 @@ use rustc_hir::def_id::DefId;
 use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, PatchableFunctionEntry};
 use rustc_middle::ty::{self, TyCtxt};
 use rustc_session::config::{BranchProtection, FunctionReturn, OptLevel, PAuthKey, PacRet};
-use rustc_span::symbol::sym;
 use rustc_target::spec::{FramePointer, SanitizerSet, StackProbeType, StackProtector};
 use smallvec::SmallVec;
 
 use crate::context::CodegenCx;
-use crate::errors::{MissingFeatures, SanitizerMemtagRequiresMte, TargetFeatureDisableOrEnable};
+use crate::errors::SanitizerMemtagRequiresMte;
 use crate::llvm::AttributePlace::Function;
 use crate::llvm::{self, AllocKindFlags, Attribute, AttributeKind, AttributePlace, MemoryEffects};
 use crate::value::Value;
@@ -502,26 +501,6 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
     let function_features =
         codegen_fn_attrs.target_features.iter().map(|f| f.name.as_str()).collect::<Vec<&str>>();
 
-    if let Some(f) = llvm_util::check_tied_features(
-        cx.tcx.sess,
-        &function_features.iter().map(|f| (*f, true)).collect(),
-    ) {
-        let span = cx
-            .tcx
-            .get_attrs(instance.def_id(), sym::target_feature)
-            .next()
-            .map_or_else(|| cx.tcx.def_span(instance.def_id()), |a| a.span);
-        cx.tcx
-            .dcx()
-            .create_err(TargetFeatureDisableOrEnable {
-                features: f,
-                span: Some(span),
-                missing_features: Some(MissingFeatures),
-            })
-            .emit();
-        return;
-    }
-
     let function_features = function_features
         .iter()
         // Convert to LLVMFeatures and filter out unavailable ones
diff --git a/compiler/rustc_codegen_llvm/src/errors.rs b/compiler/rustc_codegen_llvm/src/errors.rs
index bb481d2a308..0d436e1891e 100644
--- a/compiler/rustc_codegen_llvm/src/errors.rs
+++ b/compiler/rustc_codegen_llvm/src/errors.rs
@@ -80,30 +80,6 @@ impl<G: EmissionGuarantee> Diagnostic<'_, G> for ParseTargetMachineConfig<'_> {
     }
 }
 
-pub(crate) struct TargetFeatureDisableOrEnable<'a> {
-    pub features: &'a [&'a str],
-    pub span: Option<Span>,
-    pub missing_features: Option<MissingFeatures>,
-}
-
-#[derive(Subdiagnostic)]
-#[help(codegen_llvm_missing_features)]
-pub(crate) struct MissingFeatures;
-
-impl<G: EmissionGuarantee> Diagnostic<'_, G> for TargetFeatureDisableOrEnable<'_> {
-    fn into_diag(self, dcx: DiagCtxtHandle<'_>, level: Level) -> Diag<'_, G> {
-        let mut diag = Diag::new(dcx, level, fluent::codegen_llvm_target_feature_disable_or_enable);
-        if let Some(span) = self.span {
-            diag.span(span);
-        };
-        if let Some(missing_features) = self.missing_features {
-            diag.subdiagnostic(missing_features);
-        }
-        diag.arg("features", self.features.join(", "));
-        diag
-    }
-}
-
 #[derive(Diagnostic)]
 #[diag(codegen_llvm_lto_disallowed)]
 pub(crate) struct LtoDisallowed;
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
index bd847cd0068..57936215ff1 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -6,6 +6,7 @@ use std::{ptr, slice, str};
 
 use libc::c_int;
 use rustc_codegen_ssa::base::wants_wasm_eh;
+use rustc_codegen_ssa::codegen_attrs::check_tied_features;
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
 use rustc_data_structures::small_c_str::SmallCStr;
 use rustc_data_structures::unord::UnordSet;
@@ -19,8 +20,8 @@ use rustc_target::target_features::{RUSTC_SPECIAL_FEATURES, RUSTC_SPECIFIC_FEATU
 
 use crate::back::write::create_informational_target_machine;
 use crate::errors::{
-    FixedX18InvalidArch, InvalidTargetFeaturePrefix, PossibleFeature, TargetFeatureDisableOrEnable,
-    UnknownCTargetFeature, UnknownCTargetFeaturePrefix, UnstableCTargetFeature,
+    FixedX18InvalidArch, InvalidTargetFeaturePrefix, PossibleFeature, UnknownCTargetFeature,
+    UnknownCTargetFeaturePrefix, UnstableCTargetFeature,
 };
 use crate::llvm;
 
@@ -247,7 +248,9 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
         ("aarch64", "pmuv3") => Some(LLVMFeature::new("perfmon")),
         ("aarch64", "paca") => Some(LLVMFeature::new("pauth")),
         ("aarch64", "pacg") => Some(LLVMFeature::new("pauth")),
-        ("aarch64", "sve-b16b16") => Some(LLVMFeature::new("b16b16")),
+        // Before LLVM 20 those two features were packaged together as b16b16
+        ("aarch64", "sve-b16b16") if get_version().0 < 20 => Some(LLVMFeature::new("b16b16")),
+        ("aarch64", "sme-b16b16") if get_version().0 < 20 => Some(LLVMFeature::new("b16b16")),
         ("aarch64", "flagm2") => Some(LLVMFeature::new("altnzcv")),
         // Rust ties fp and neon together.
         ("aarch64", "neon") => {
@@ -276,25 +279,6 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
     }
 }
 
-/// Given a map from target_features to whether they are enabled or disabled,
-/// ensure only valid combinations are allowed.
-pub(crate) fn check_tied_features(
-    sess: &Session,
-    features: &FxHashMap<&str, bool>,
-) -> Option<&'static [&'static str]> {
-    if !features.is_empty() {
-        for tied in sess.target.tied_target_features() {
-            // Tied features must be set to the same value, or not set at all
-            let mut tied_iter = tied.iter();
-            let enabled = features.get(tied_iter.next().unwrap());
-            if tied_iter.any(|f| enabled != features.get(f)) {
-                return Some(tied);
-            }
-        }
-    }
-    None
-}
-
 /// Used to generate cfg variables and apply features
 /// Must express features in the way Rust understands them
 pub fn target_features(sess: &Session, allow_unstable: bool) -> Vec<Symbol> {
@@ -685,7 +669,7 @@ pub(crate) fn global_llvm_features(
         features.extend(feats);
 
         if diagnostics && let Some(f) = check_tied_features(sess, &featsmap) {
-            sess.dcx().emit_err(TargetFeatureDisableOrEnable {
+            sess.dcx().emit_err(rustc_codegen_ssa::errors::TargetFeatureDisableOrEnable {
                 features: f,
                 span: None,
                 missing_features: None,
diff --git a/compiler/rustc_codegen_ssa/messages.ftl b/compiler/rustc_codegen_ssa/messages.ftl
index f02b0f72674..d07274920fe 100644
--- a/compiler/rustc_codegen_ssa/messages.ftl
+++ b/compiler/rustc_codegen_ssa/messages.ftl
@@ -183,6 +183,8 @@ codegen_ssa_metadata_object_file_write = error writing metadata object file: {$e
 
 codegen_ssa_missing_cpp_build_tool_component = or a necessary component may be missing from the "C++ build tools" workload
 
+codegen_ssa_missing_features = add the missing features in a `target_feature` attribute
+
 codegen_ssa_missing_memory_ordering = Atomic intrinsic missing memory ordering
 
 codegen_ssa_missing_query_depgraph =
@@ -238,6 +240,9 @@ codegen_ssa_stripping_debug_info_failed = stripping debug info with `{$util}` fa
 
 codegen_ssa_symbol_file_write_failure = failed to write symbols file: {$error}
 
+codegen_ssa_target_feature_disable_or_enable =
+    the target features {$features} must all be either enabled or disabled together
+
 codegen_ssa_target_feature_safe_trait = `#[target_feature(..)]` cannot be applied to safe trait method
     .label = cannot be applied to safe trait method
     .label_def = not an `unsafe` function
diff --git a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs
index 8d634ca4655..d536419ab3c 100644
--- a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs
+++ b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs
@@ -1,5 +1,6 @@
 use rustc_ast::{MetaItemInner, MetaItemKind, ast, attr};
 use rustc_attr::{InlineAttr, InstructionSetAttr, OptimizeAttr, list_contains_name};
+use rustc_data_structures::fx::FxHashMap;
 use rustc_errors::codes::*;
 use rustc_errors::{DiagMessage, SubdiagMessage, struct_span_code_err};
 use rustc_hir as hir;
@@ -13,13 +14,13 @@ use rustc_middle::middle::codegen_fn_attrs::{
 use rustc_middle::mir::mono::Linkage;
 use rustc_middle::query::Providers;
 use rustc_middle::ty::{self as ty, TyCtxt};
-use rustc_session::lint;
 use rustc_session::parse::feature_err;
+use rustc_session::{Session, lint};
 use rustc_span::symbol::Ident;
 use rustc_span::{Span, sym};
 use rustc_target::spec::{SanitizerSet, abi};
 
-use crate::errors;
+use crate::errors::{self, MissingFeatures, TargetFeatureDisableOrEnable};
 use crate::target_features::{check_target_feature_trait_unsafe, from_target_feature};
 
 fn linkage_by_name(tcx: TyCtxt<'_>, def_id: LocalDefId, name: &str) -> Linkage {
@@ -662,9 +663,49 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
         }
     }
 
+    if let Some(features) = check_tied_features(
+        tcx.sess,
+        &codegen_fn_attrs
+            .target_features
+            .iter()
+            .map(|features| (features.name.as_str(), true))
+            .collect(),
+    ) {
+        let span = tcx
+            .get_attrs(did, sym::target_feature)
+            .next()
+            .map_or_else(|| tcx.def_span(did), |a| a.span);
+        tcx.dcx()
+            .create_err(TargetFeatureDisableOrEnable {
+                features,
+                span: Some(span),
+                missing_features: Some(MissingFeatures),
+            })
+            .emit();
+    }
+
     codegen_fn_attrs
 }
 
+/// Given a map from target_features to whether they are enabled or disabled, ensure only valid
+/// combinations are allowed.
+pub fn check_tied_features(
+    sess: &Session,
+    features: &FxHashMap<&str, bool>,
+) -> Option<&'static [&'static str]> {
+    if !features.is_empty() {
+        for tied in sess.target.tied_target_features() {
+            // Tied features must be set to the same value, or not set at all
+            let mut tied_iter = tied.iter();
+            let enabled = features.get(tied_iter.next().unwrap());
+            if tied_iter.any(|f| enabled != features.get(f)) {
+                return Some(tied);
+            }
+        }
+    }
+    None
+}
+
 /// Checks if the provided DefId is a method in a trait impl for a trait which has track_caller
 /// applied to the method prototype.
 fn should_inherit_track_caller(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
diff --git a/compiler/rustc_codegen_ssa/src/errors.rs b/compiler/rustc_codegen_ssa/src/errors.rs
index ab909abcead..d67cf0e3a6d 100644
--- a/compiler/rustc_codegen_ssa/src/errors.rs
+++ b/compiler/rustc_codegen_ssa/src/errors.rs
@@ -9,7 +9,7 @@ use rustc_errors::codes::*;
 use rustc_errors::{
     Diag, DiagArgValue, DiagCtxtHandle, Diagnostic, EmissionGuarantee, IntoDiagArg, Level,
 };
-use rustc_macros::Diagnostic;
+use rustc_macros::{Diagnostic, Subdiagnostic};
 use rustc_middle::ty::Ty;
 use rustc_middle::ty::layout::LayoutError;
 use rustc_span::{Span, Symbol};
@@ -1068,3 +1068,27 @@ pub(crate) struct ErrorCreatingImportLibrary<'a> {
     pub lib_name: &'a str,
     pub error: String,
 }
+
+pub struct TargetFeatureDisableOrEnable<'a> {
+    pub features: &'a [&'a str],
+    pub span: Option<Span>,
+    pub missing_features: Option<MissingFeatures>,
+}
+
+#[derive(Subdiagnostic)]
+#[help(codegen_ssa_missing_features)]
+pub struct MissingFeatures;
+
+impl<G: EmissionGuarantee> Diagnostic<'_, G> for TargetFeatureDisableOrEnable<'_> {
+    fn into_diag(self, dcx: DiagCtxtHandle<'_>, level: Level) -> Diag<'_, G> {
+        let mut diag = Diag::new(dcx, level, fluent::codegen_ssa_target_feature_disable_or_enable);
+        if let Some(span) = self.span {
+            diag.span(span);
+        };
+        if let Some(missing_features) = self.missing_features {
+            diag.subdiagnostic(missing_features);
+        }
+        diag.arg("features", self.features.join(", "));
+        diag
+    }
+}
diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs
index 0cd0963d4e3..c275ad31b87 100644
--- a/compiler/rustc_feature/src/removed.rs
+++ b/compiler/rustc_feature/src/removed.rs
@@ -154,6 +154,10 @@ declare_features! (
     /// then removed. But there was no utility storing it separately, so now
     /// it's in this list.
     (removed, no_stack_check, "1.0.0", None, None),
+    /// Allows making `dyn Trait` well-formed even if `Trait` is not dyn-compatible (object safe).
+    /// Renamed to `dyn_compatible_for_dispatch`.
+    (removed, object_safe_for_dispatch, "CURRENT_RUSTC_VERSION", Some(43561),
+     Some("renamed to `dyn_compatible_for_dispatch`")),
     /// Allows using `#[on_unimplemented(..)]` on traits.
     /// (Moved to `rustc_attrs`.)
     (removed, on_unimplemented, "1.40.0", None, None),
diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs
index 380e36fe405..1331be53035 100644
--- a/compiler/rustc_feature/src/unstable.rs
+++ b/compiler/rustc_feature/src/unstable.rs
@@ -259,6 +259,14 @@ declare_features! (
     (unstable, doc_notable_trait, "1.52.0", Some(45040)),
     /// Allows using the `may_dangle` attribute (RFC 1327).
     (unstable, dropck_eyepatch, "1.10.0", Some(34761)),
+    /// Allows making `dyn Trait` well-formed even if `Trait` is not dyn-compatible[^1].
+    /// In that case, `dyn Trait: Trait` does not hold. Moreover, coercions and
+    /// casts in safe Rust to `dyn Trait` for such a `Trait` is also forbidden.
+    ///
+    /// Renamed from `object_safe_for_dispatch`.
+    ///
+    /// [^1]: Formerly known as "object safe".
+    (unstable, dyn_compatible_for_dispatch, "CURRENT_RUSTC_VERSION", Some(43561)),
     /// Allows using the `#[fundamental]` attribute.
     (unstable, fundamental, "1.0.0", Some(29635)),
     /// Allows using `#[link_name="llvm.*"]`.
@@ -546,13 +554,6 @@ declare_features! (
     (unstable, non_exhaustive_omitted_patterns_lint, "1.57.0", Some(89554)),
     /// Allows `for<T>` binders in where-clauses
     (incomplete, non_lifetime_binders, "1.69.0", Some(108185)),
-    /// Allows making `dyn Trait` well-formed even if `Trait` is not dyn-compatible[^1].
-    /// In that case, `dyn Trait: Trait` does not hold. Moreover, coercions and
-    /// casts in safe Rust to `dyn Trait` for such a `Trait` is also forbidden.
-    ///
-    /// [^1]: Formerly known as "object safe".
-    // FIXME(dyn_compat_renaming): Rename feature.
-    (unstable, object_safe_for_dispatch, "1.40.0", Some(43561)),
     /// Allows using enums in offset_of!
     (unstable, offset_of_enum, "1.75.0", Some(120141)),
     /// Allows using fields with slice type in offset_of!
@@ -565,6 +566,8 @@ declare_features! (
     (incomplete, pin_ergonomics, "CURRENT_RUSTC_VERSION", Some(130494)),
     /// Allows postfix match `expr.match { ... }`
     (unstable, postfix_match, "1.79.0", Some(121618)),
+    /// Allows `use<..>` precise capturign on impl Trait in traits.
+    (unstable, precise_capturing_in_traits, "CURRENT_RUSTC_VERSION", Some(130044)),
     /// Allows macro attributes on expressions, statements and non-inline modules.
     (unstable, proc_macro_hygiene, "1.30.0", Some(54727)),
     /// Makes `&` and `&mut` patterns eat only one layer of references in Rust 2024.
diff --git a/compiler/rustc_hir_analysis/messages.ftl b/compiler/rustc_hir_analysis/messages.ftl
index c73826c489f..a80dc87c622 100644
--- a/compiler/rustc_hir_analysis/messages.ftl
+++ b/compiler/rustc_hir_analysis/messages.ftl
@@ -259,6 +259,9 @@ hir_analysis_late_bound_lifetime_in_apit = `impl Trait` can only mention lifetim
 hir_analysis_late_bound_type_in_apit = `impl Trait` can only mention type parameters from an fn or impl
     .label = type parameter declared here
 
+hir_analysis_lifetime_implicitly_captured = `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list
+    .param_label = all lifetime parameters originating from a trait are captured implicitly
+
 hir_analysis_lifetime_must_be_first = lifetime parameter `{$name}` must be listed before non-lifetime parameters
     .label = move the lifetime before this parameter
 
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs
index eb62ff86c71..d0063b449f8 100644
--- a/compiler/rustc_hir_analysis/src/check/check.rs
+++ b/compiler/rustc_hir_analysis/src/check/check.rs
@@ -589,15 +589,22 @@ fn check_opaque_precise_captures<'tcx>(tcx: TyCtxt<'tcx>, opaque_def_id: LocalDe
                                 param_span: tcx.def_span(def_id),
                             });
                         } else {
-                            // If the `use_span` is actually just the param itself, then we must
-                            // have not duplicated the lifetime but captured the original.
-                            // The "effective" `use_span` will be the span of the opaque itself,
-                            // and the param span will be the def span of the param.
-                            tcx.dcx().emit_err(errors::LifetimeNotCaptured {
-                                opaque_span,
-                                use_span: opaque_span,
-                                param_span: use_span,
-                            });
+                            if tcx.def_kind(tcx.parent(param.def_id)) == DefKind::Trait {
+                                tcx.dcx().emit_err(errors::LifetimeImplicitlyCaptured {
+                                    opaque_span,
+                                    param_span: tcx.def_span(param.def_id),
+                                });
+                            } else {
+                                // If the `use_span` is actually just the param itself, then we must
+                                // have not duplicated the lifetime but captured the original.
+                                // The "effective" `use_span` will be the span of the opaque itself,
+                                // and the param span will be the def span of the param.
+                                tcx.dcx().emit_err(errors::LifetimeNotCaptured {
+                                    opaque_span,
+                                    use_span: opaque_span,
+                                    param_span: use_span,
+                                });
+                            }
                         }
                         continue;
                     }
diff --git a/compiler/rustc_hir_analysis/src/check/compare_impl_item/refine.rs b/compiler/rustc_hir_analysis/src/check/compare_impl_item/refine.rs
index 80334c6efe7..2d6b9813271 100644
--- a/compiler/rustc_hir_analysis/src/check/compare_impl_item/refine.rs
+++ b/compiler/rustc_hir_analysis/src/check/compare_impl_item/refine.rs
@@ -64,6 +64,10 @@ pub(super) fn check_refining_return_position_impl_trait_in_trait<'tcx>(
         return;
     };
 
+    if hidden_tys.items().any(|(_, &ty)| ty.skip_binder().references_error()) {
+        return;
+    }
+
     let mut collector = ImplTraitInTraitCollector { tcx, types: FxIndexSet::default() };
     trait_m_sig.visit_with(&mut collector);
 
diff --git a/compiler/rustc_hir_analysis/src/coherence/mod.rs b/compiler/rustc_hir_analysis/src/coherence/mod.rs
index 69d36426447..eea5a16ac6f 100644
--- a/compiler/rustc_hir_analysis/src/coherence/mod.rs
+++ b/compiler/rustc_hir_analysis/src/coherence/mod.rs
@@ -199,7 +199,7 @@ fn check_object_overlap<'tcx>(
         for component_def_id in component_def_ids {
             if !tcx.is_dyn_compatible(component_def_id) {
                 // FIXME(dyn_compat_renaming): Rename test and update comment.
-                // Without the 'object_safe_for_dispatch' feature this is an error
+                // Without the 'dyn_compatible_for_dispatch' feature this is an error
                 // which will be reported by wfcheck. Ignore it here.
                 // This is tested by `coherence-impl-trait-for-trait-object-safe.rs`.
                 // With the feature enabled, the trait is not implemented automatically,
diff --git a/compiler/rustc_hir_analysis/src/errors/precise_captures.rs b/compiler/rustc_hir_analysis/src/errors/precise_captures.rs
index b6cffb90805..8a83866b7fa 100644
--- a/compiler/rustc_hir_analysis/src/errors/precise_captures.rs
+++ b/compiler/rustc_hir_analysis/src/errors/precise_captures.rs
@@ -35,6 +35,15 @@ pub(crate) struct LifetimeNotCaptured {
 }
 
 #[derive(Diagnostic)]
+#[diag(hir_analysis_lifetime_implicitly_captured)]
+pub(crate) struct LifetimeImplicitlyCaptured {
+    #[primary_span]
+    pub opaque_span: Span,
+    #[label(hir_analysis_param_label)]
+    pub param_span: Span,
+}
+
+#[derive(Diagnostic)]
 #[diag(hir_analysis_bad_precise_capture)]
 pub(crate) struct BadPreciseCapture {
     #[primary_span]
diff --git a/compiler/rustc_hir_analysis/src/variance/mod.rs b/compiler/rustc_hir_analysis/src/variance/mod.rs
index 12bb9a3f9e0..02cfb57b836 100644
--- a/compiler/rustc_hir_analysis/src/variance/mod.rs
+++ b/compiler/rustc_hir_analysis/src/variance/mod.rs
@@ -5,6 +5,7 @@
 
 use itertools::Itertools;
 use rustc_arena::DroplessArena;
+use rustc_hir as hir;
 use rustc_hir::def::DefKind;
 use rustc_hir::def_id::{DefId, LocalDefId};
 use rustc_middle::query::Providers;
@@ -63,8 +64,29 @@ fn variances_of(tcx: TyCtxt<'_>, item_def_id: LocalDefId) -> &[ty::Variance] {
             let crate_map = tcx.crate_variances(());
             return crate_map.variances.get(&item_def_id.to_def_id()).copied().unwrap_or(&[]);
         }
+        DefKind::AssocTy => match tcx.opt_rpitit_info(item_def_id.to_def_id()) {
+            Some(ty::ImplTraitInTraitData::Trait { opaque_def_id, .. }) => {
+                return variance_of_opaque(
+                    tcx,
+                    opaque_def_id.expect_local(),
+                    ForceCaptureTraitArgs::Yes,
+                );
+            }
+            None | Some(ty::ImplTraitInTraitData::Impl { .. }) => {}
+        },
         DefKind::OpaqueTy => {
-            return variance_of_opaque(tcx, item_def_id);
+            let force_capture_trait_args = if let hir::OpaqueTyOrigin::FnReturn {
+                parent: _,
+                in_trait_or_impl: Some(hir::RpitContext::Trait),
+            } =
+                tcx.hir_node_by_def_id(item_def_id).expect_opaque_ty().origin
+            {
+                ForceCaptureTraitArgs::Yes
+            } else {
+                ForceCaptureTraitArgs::No
+            };
+
+            return variance_of_opaque(tcx, item_def_id, force_capture_trait_args);
         }
         _ => {}
     }
@@ -73,8 +95,18 @@ fn variances_of(tcx: TyCtxt<'_>, item_def_id: LocalDefId) -> &[ty::Variance] {
     span_bug!(tcx.def_span(item_def_id), "asked to compute variance for wrong kind of item");
 }
 
+#[derive(Debug, Copy, Clone)]
+enum ForceCaptureTraitArgs {
+    Yes,
+    No,
+}
+
 #[instrument(level = "trace", skip(tcx), ret)]
-fn variance_of_opaque(tcx: TyCtxt<'_>, item_def_id: LocalDefId) -> &[ty::Variance] {
+fn variance_of_opaque(
+    tcx: TyCtxt<'_>,
+    item_def_id: LocalDefId,
+    force_capture_trait_args: ForceCaptureTraitArgs,
+) -> &[ty::Variance] {
     let generics = tcx.generics_of(item_def_id);
 
     // Opaque types may only use regions that are bound. So for
@@ -115,9 +147,7 @@ fn variance_of_opaque(tcx: TyCtxt<'_>, item_def_id: LocalDefId) -> &[ty::Varianc
         #[instrument(level = "trace", skip(self), ret)]
         fn visit_ty(&mut self, t: Ty<'tcx>) {
             match t.kind() {
-                ty::Alias(_, ty::AliasTy { def_id, args, .. })
-                    if matches!(self.tcx.def_kind(*def_id), DefKind::OpaqueTy) =>
-                {
+                ty::Alias(ty::Opaque, ty::AliasTy { def_id, args, .. }) => {
                     self.visit_opaque(*def_id, args);
                 }
                 _ => t.super_visit_with(self),
@@ -135,6 +165,15 @@ fn variance_of_opaque(tcx: TyCtxt<'_>, item_def_id: LocalDefId) -> &[ty::Varianc
         let mut generics = generics;
         while let Some(def_id) = generics.parent {
             generics = tcx.generics_of(def_id);
+
+            // Don't mark trait params generic if we're in an RPITIT.
+            if matches!(force_capture_trait_args, ForceCaptureTraitArgs::Yes)
+                && generics.parent.is_none()
+            {
+                debug_assert_eq!(tcx.def_kind(def_id), DefKind::Trait);
+                break;
+            }
+
             for param in &generics.own_params {
                 match param.kind {
                     ty::GenericParamDefKind::Lifetime => {
diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs
index 610c682d3a4..afe03531861 100644
--- a/compiler/rustc_metadata/src/rmeta/encoder.rs
+++ b/compiler/rustc_metadata/src/rmeta/encoder.rs
@@ -1100,9 +1100,12 @@ fn should_encode_variances<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, def_kind: Def
         | DefKind::Fn
         | DefKind::Ctor(..)
         | DefKind::AssocFn => true,
+        DefKind::AssocTy => {
+            // Only encode variances for RPITITs (for traits)
+            matches!(tcx.opt_rpitit_info(def_id), Some(ty::ImplTraitInTraitData::Trait { .. }))
+        }
         DefKind::Mod
         | DefKind::Field
-        | DefKind::AssocTy
         | DefKind::AssocConst
         | DefKind::TyParam
         | DefKind::ConstParam
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index 90265f67bc1..590e1d336f3 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -539,6 +539,10 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
         self.trait_def(trait_def_id).implement_via_object
     }
 
+    fn is_impl_trait_in_trait(self, def_id: DefId) -> bool {
+        self.is_impl_trait_in_trait(def_id)
+    }
+
     fn delay_bug(self, msg: impl ToString) -> ErrorGuaranteed {
         self.dcx().span_delayed_bug(DUMMY_SP, msg.to_string())
     }
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index d67e69fe0fb..27879d817b2 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -454,6 +454,8 @@ impl Session {
         let bin_path = filesearch::make_target_bin_path(&self.sysroot, config::host_triple());
         let fallback_sysroot_paths = filesearch::sysroot_candidates()
             .into_iter()
+            // Ignore sysroot candidate if it was the same as the sysroot path we just used.
+            .filter(|sysroot| *sysroot != self.sysroot)
             .map(|sysroot| filesearch::make_target_bin_path(&sysroot, config::host_triple()));
         let search_paths = std::iter::once(bin_path).chain(fallback_sysroot_paths);
 
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 1527600e764..8e0009695db 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -777,6 +777,7 @@ symbols! {
         dropck_eyepatch,
         dropck_parametricity,
         dylib,
+        dyn_compatible_for_dispatch,
         dyn_metadata,
         dyn_star,
         dyn_trait,
@@ -1479,6 +1480,7 @@ symbols! {
         powif64,
         pre_dash_lto: "pre-lto",
         precise_capturing,
+        precise_capturing_in_traits,
         precise_pointer_size_matching,
         pref_align_of,
         prefetch_read_data,
diff --git a/compiler/rustc_target/src/target_features.rs b/compiler/rustc_target/src/target_features.rs
index 0a98b363b1a..e92366d5c5c 100644
--- a/compiler/rustc_target/src/target_features.rs
+++ b/compiler/rustc_target/src/target_features.rs
@@ -191,6 +191,8 @@ const AARCH64_ALLOWED_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
     ("sm4", Stable, &["neon"]),
     // FEAT_SME
     ("sme", Unstable(sym::aarch64_unstable_target_feature), &["bf16"]),
+    // FEAT_SME_B16B16
+    ("sme-b16b16", Unstable(sym::aarch64_unstable_target_feature), &["bf16", "sme2", "sve-b16b16"]),
     // FEAT_SME_F16F16
     ("sme-f16f16", Unstable(sym::aarch64_unstable_target_feature), &["sme2"]),
     // FEAT_SME_F64F64
@@ -227,7 +229,7 @@ const AARCH64_ALLOWED_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
     //
     // "For backwards compatibility, Neon and VFP are required in the latest architectures."
     ("sve", Stable, &["neon"]),
-    // FEAT_SVE_B16B16 (SVE or SME Instructions)
+    // FEAT_SVE_B16B16 (SVE or SME Z-targeting instructions)
     ("sve-b16b16", Unstable(sym::aarch64_unstable_target_feature), &["bf16"]),
     // FEAT_SVE2
     ("sve2", Stable, &["sve"]),
diff --git a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs
index d5d7681a8d6..45e7de942fb 100644
--- a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs
+++ b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs
@@ -1,12 +1,8 @@
-//! "Object safety" refers to the ability for a trait to be converted
-//! to an object. In general, traits may only be converted to an
-//! object if all of their methods meet certain criteria. In particular,
-//! they must:
+//! "Dyn-compatibility"[^1] refers to the ability for a trait to be converted
+//! to a trait object. In general, traits may only be converted to a trait
+//! object if certain criteria are met.
 //!
-//!   - have a suitable receiver from which we can extract a vtable and coerce to a "thin" version
-//!     that doesn't contain the vtable;
-//!   - not reference the erased type `Self` except for in this receiver;
-//!   - not have generic type parameters.
+//! [^1]: Formerly known as "object safety".
 
 use std::iter;
 use std::ops::ControlFlow;
@@ -506,8 +502,8 @@ fn virtual_call_violations_for_method<'tcx>(
 
 /// This code checks that `receiver_is_dispatchable` is correctly implemented.
 ///
-/// This check is outlined from the object safety check to avoid cycles with
-/// layout computation, which relies on knowing whether methods are object safe.
+/// This check is outlined from the dyn-compatibility check to avoid cycles with
+/// layout computation, which relies on knowing whether methods are dyn-compatible.
 fn check_receiver_correct<'tcx>(tcx: TyCtxt<'tcx>, trait_def_id: DefId, method: ty::AssocItem) {
     if !is_vtable_safe_method(tcx, trait_def_id, method) {
         return;
@@ -643,8 +639,8 @@ fn object_ty_for_trait<'tcx>(
 /// contained by the trait object, because the object that needs to be coerced is behind
 /// a pointer.
 ///
-/// In practice, we cannot use `dyn Trait` explicitly in the obligation because it would result
-/// in a new check that `Trait` is object safe, creating a cycle (until object_safe_for_dispatch
+/// In practice, we cannot use `dyn Trait` explicitly in the obligation because it would result in
+/// a new check that `Trait` is dyn-compatible, creating a cycle (until dyn_compatible_for_dispatch
 /// is stabilized, see tracking issue <https://github.com/rust-lang/rust/issues/43561>).
 /// Instead, we fudge a little by introducing a new type parameter `U` such that
 /// `Self: Unsize<U>` and `U: Trait + ?Sized`, and use `U` in place of `dyn Trait`.
@@ -678,7 +674,7 @@ fn receiver_is_dispatchable<'tcx>(
 
     // the type `U` in the query
     // use a bogus type parameter to mimic a forall(U) query using u32::MAX for now.
-    // FIXME(mikeyhew) this is a total hack. Once object_safe_for_dispatch is stabilized, we can
+    // FIXME(mikeyhew) this is a total hack. Once dyn_compatible_for_dispatch is stabilized, we can
     // replace this with `dyn Trait`
     let unsized_self_ty: Ty<'tcx> =
         Ty::new_param(tcx, u32::MAX, Symbol::intern("RustaceansAreAwesome"));
@@ -865,7 +861,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for IllegalSelfTypeVisitor<'tcx> {
     }
 
     fn visit_const(&mut self, ct: ty::Const<'tcx>) -> Self::Result {
-        // Constants can only influence object safety if they are generic and reference `Self`.
+        // Constants can only influence dyn-compatibility if they are generic and reference `Self`.
         // This is only possible for unevaluated constants, so we walk these here.
         self.tcx.expand_abstract_consts(ct).super_visit_with(self)
     }
diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
index 084b61115db..20adda6f0de 100644
--- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
+++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
@@ -881,7 +881,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
                         }
 
                         if let Some(principal) = data.principal() {
-                            if !self.infcx.tcx.features().object_safe_for_dispatch {
+                            if !self.infcx.tcx.features().dyn_compatible_for_dispatch {
                                 principal.with_self_ty(self.tcx(), self_ty)
                             } else if self.tcx().is_dyn_compatible(principal.def_id()) {
                                 principal.with_self_ty(self.tcx(), self_ty)
diff --git a/compiler/rustc_trait_selection/src/traits/wf.rs b/compiler/rustc_trait_selection/src/traits/wf.rs
index 7e140ecfee0..a849cdfe125 100644
--- a/compiler/rustc_trait_selection/src/traits/wf.rs
+++ b/compiler/rustc_trait_selection/src/traits/wf.rs
@@ -829,7 +829,7 @@ impl<'a, 'tcx> TypeVisitor<TyCtxt<'tcx>> for WfPredicates<'a, 'tcx> {
                 // obligations that don't refer to Self and
                 // checking those
 
-                let defer_to_coercion = tcx.features().object_safe_for_dispatch;
+                let defer_to_coercion = tcx.features().dyn_compatible_for_dispatch;
 
                 if !defer_to_coercion {
                     if let Some(principal) = data.principal_def_id() {
diff --git a/compiler/rustc_type_ir/src/interner.rs b/compiler/rustc_type_ir/src/interner.rs
index a72e7b482a6..f06017d7e5c 100644
--- a/compiler/rustc_type_ir/src/interner.rs
+++ b/compiler/rustc_type_ir/src/interner.rs
@@ -261,6 +261,8 @@ pub trait Interner:
 
     fn trait_may_be_implemented_via_object(self, trait_def_id: Self::DefId) -> bool;
 
+    fn is_impl_trait_in_trait(self, def_id: Self::DefId) -> bool;
+
     fn delay_bug(self, msg: impl ToString) -> Self::ErrorGuaranteed;
 
     fn is_general_coroutine(self, coroutine_def_id: Self::DefId) -> bool;
diff --git a/compiler/rustc_type_ir/src/relate.rs b/compiler/rustc_type_ir/src/relate.rs
index 1302906adab..e1f3e493e36 100644
--- a/compiler/rustc_type_ir/src/relate.rs
+++ b/compiler/rustc_type_ir/src/relate.rs
@@ -254,6 +254,16 @@ impl<I: Interner> Relate<I> for ty::AliasTy<I> {
                     b.args,
                     false, // do not fetch `type_of(a_def_id)`, as it will cause a cycle
                 )?,
+                ty::Projection if relation.cx().is_impl_trait_in_trait(a.def_id) => {
+                    relate_args_with_variances(
+                        relation,
+                        a.def_id,
+                        relation.cx().variances_of(a.def_id),
+                        a.args,
+                        b.args,
+                        false, // do not fetch `type_of(a_def_id)`, as it will cause a cycle
+                    )?
+                }
                 ty::Projection | ty::Weak | ty::Inherent => {
                     relate_args_invariantly(relation, a.args, b.args)?
                 }
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index 24c42bc85dd..a95046162d2 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -146,7 +146,8 @@ pub const fn from_ref<T>(s: &T) -> &[T; 1] {
 
 /// Converts a mutable reference to `T` into a mutable reference to an array of length 1 (without copying).
 #[stable(feature = "array_from_ref", since = "1.53.0")]
-#[rustc_const_unstable(feature = "const_array_from_ref", issue = "90206")]
+#[rustc_const_stable(feature = "const_array_from_ref", since = "CURRENT_RUSTC_VERSION")]
+#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
 pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1] {
     // SAFETY: Converting `&mut T` to `&mut [T; 1]` is sound.
     unsafe { &mut *(s as *mut T).cast::<[T; 1]>() }
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index e323e88f261..96ab5755328 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -114,7 +114,6 @@
 #![feature(const_align_offset)]
 #![feature(const_alloc_layout)]
 #![feature(const_arguments_as_str)]
-#![feature(const_array_from_ref)]
 #![feature(const_array_into_iter_constructors)]
 #![feature(const_bigint_helper_methods)]
 #![feature(const_black_box)]
@@ -145,7 +144,6 @@
 #![feature(const_replace)]
 #![feature(const_size_of_val)]
 #![feature(const_size_of_val_raw)]
-#![feature(const_slice_from_ref)]
 #![feature(const_strict_overflow_ops)]
 #![feature(const_swap)]
 #![feature(const_try)]
diff --git a/library/core/src/slice/raw.rs b/library/core/src/slice/raw.rs
index 84e916b9a84..998f9360332 100644
--- a/library/core/src/slice/raw.rs
+++ b/library/core/src/slice/raw.rs
@@ -204,7 +204,8 @@ pub const fn from_ref<T>(s: &T) -> &[T] {
 
 /// Converts a reference to T into a slice of length 1 (without copying).
 #[stable(feature = "from_ref", since = "1.28.0")]
-#[rustc_const_unstable(feature = "const_slice_from_ref", issue = "90206")]
+#[rustc_const_stable(feature = "const_slice_from_ref", since = "CURRENT_RUSTC_VERSION")]
+#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
 #[must_use]
 pub const fn from_mut<T>(s: &mut T) -> &mut [T] {
     array::from_mut(s)
diff --git a/library/core/tests/lib.rs b/library/core/tests/lib.rs
index 196e91ee3e9..0d4ec96f842 100644
--- a/library/core/tests/lib.rs
+++ b/library/core/tests/lib.rs
@@ -16,7 +16,6 @@
 #![feature(clone_to_uninit)]
 #![feature(const_align_of_val_raw)]
 #![feature(const_align_offset)]
-#![feature(const_array_from_ref)]
 #![feature(const_black_box)]
 #![feature(const_hash)]
 #![feature(const_heap)]
@@ -31,7 +30,6 @@
 #![feature(const_pointer_is_aligned)]
 #![feature(const_ptr_write)]
 #![feature(const_result)]
-#![feature(const_slice_from_ref)]
 #![feature(const_three_way_compare)]
 #![feature(const_trait_impl)]
 #![feature(core_intrinsics)]
diff --git a/library/std/tests/run-time-detect.rs b/library/std/tests/run-time-detect.rs
index dcd5cd7f6b9..dd14c0266aa 100644
--- a/library/std/tests/run-time-detect.rs
+++ b/library/std/tests/run-time-detect.rs
@@ -82,6 +82,7 @@ fn aarch64_linux() {
     println!("sha2: {}", is_aarch64_feature_detected!("sha2"));
     println!("sha3: {}", is_aarch64_feature_detected!("sha3"));
     println!("sm4: {}", is_aarch64_feature_detected!("sm4"));
+    println!("sme-b16b16: {}", is_aarch64_feature_detected!("sme-b16b16"));
     println!("sme-f16f16: {}", is_aarch64_feature_detected!("sme-f16f16"));
     println!("sme-f64f64: {}", is_aarch64_feature_detected!("sme-f64f64"));
     println!("sme-f8f16: {}", is_aarch64_feature_detected!("sme-f8f16"));
diff --git a/library/stdarch b/library/stdarch
-Subproject ace72223a0e321c1b0a37b5862aa756fe8ab511
+Subproject c881fe3231b3947a4766aa15a26a93022fbb872
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index 0dd3d0b3bd1..e25b571acba 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -1697,7 +1697,11 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
         builder.ensure(TestHelpers { target: compiler.host });
 
         // ensure that `libproc_macro` is available on the host.
-        builder.ensure(compile::Std::new(compiler, compiler.host));
+        if suite == "mir-opt" {
+            builder.ensure(compile::Std::new_for_mir_opt_tests(compiler, compiler.host));
+        } else {
+            builder.ensure(compile::Std::new(compiler, compiler.host));
+        }
 
         // As well as the target
         if suite != "mir-opt" {
diff --git a/src/tools/compiletest/src/command-list.rs b/src/tools/compiletest/src/command-list.rs
index 88e1bb56fe9..4d57907f26f 100644
--- a/src/tools/compiletest/src/command-list.rs
+++ b/src/tools/compiletest/src/command-list.rs
@@ -49,6 +49,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
     "ignore-eabi",
     "ignore-emscripten",
     "ignore-endian-big",
+    "ignore-enzyme",
     "ignore-freebsd",
     "ignore-fuchsia",
     "ignore-gdb",
diff --git a/src/tools/compiletest/src/header/cfg.rs b/src/tools/compiletest/src/header/cfg.rs
index 6e351aa27b9..b9314f0abbb 100644
--- a/src/tools/compiletest/src/header/cfg.rs
+++ b/src/tools/compiletest/src/header/cfg.rs
@@ -166,6 +166,12 @@ pub(super) fn parse_cfg_name_directive<'a>(
         message: "when the target vendor is Apple"
     }
 
+    condition! {
+        name: "enzyme",
+        condition: config.has_enzyme,
+        message: "when rustc is built with LLVM Enzyme"
+    }
+
     // Technically the locally built compiler uses the "dev" channel rather than the "nightly"
     // channel, even though most people don't know or won't care about it. To avoid confusion, we
     // treat the "dev" channel as the "nightly" channel when processing the directive.
diff --git a/src/tools/tidy/src/issues.txt b/src/tools/tidy/src/issues.txt
index 8dc1ee38ffd..66c176c6f44 100644
--- a/src/tools/tidy/src/issues.txt
+++ b/src/tools/tidy/src/issues.txt
@@ -3172,10 +3172,6 @@ ui/nll/user-annotations/issue-55241.rs
 ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.rs
 ui/nll/user-annotations/issue-57731-ascibed-coupled-types.rs
 ui/numbers-arithmetic/issue-8460.rs
-ui/object-safety/issue-102762.rs
-ui/object-safety/issue-102933.rs
-ui/object-safety/issue-106247.rs
-ui/object-safety/issue-19538.rs
 ui/on-unimplemented/issue-104140.rs
 ui/or-patterns/issue-64879-trailing-before-guard.rs
 ui/or-patterns/issue-67514-irrefutable-param.rs
diff --git a/tests/crashes/120241-2.rs b/tests/crashes/120241-2.rs
index 9c4a3a50293..91ec3362090 100644
--- a/tests/crashes/120241-2.rs
+++ b/tests/crashes/120241-2.rs
@@ -1,6 +1,6 @@
 //@ known-bug: #120241
 //@ edition:2021
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 #![feature(unsized_fn_params)]
 
 fn guard(_s: Copy) -> bool {
diff --git a/tests/crashes/120241.rs b/tests/crashes/120241.rs
index f18347a006c..b4fcb903714 100644
--- a/tests/crashes/120241.rs
+++ b/tests/crashes/120241.rs
@@ -1,6 +1,6 @@
 //@ known-bug: #120241
 //@ edition:2021
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait B {
     fn f(a: A) -> A;
diff --git a/tests/crashes/120482.rs b/tests/crashes/120482.rs
index 6cbc2009c5f..a395855d796 100644
--- a/tests/crashes/120482.rs
+++ b/tests/crashes/120482.rs
@@ -1,6 +1,6 @@
 //@ known-bug: #120482
 //@ edition:2021
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait B {
     fn bar(&self, x: &Self);
diff --git a/tests/crashes/125512.rs b/tests/crashes/125512.rs
index 1672b24a114..37dbdf2f32f 100644
--- a/tests/crashes/125512.rs
+++ b/tests/crashes/125512.rs
@@ -1,6 +1,6 @@
 //@ known-bug: rust-lang/rust#125512
 //@ edition:2021
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 trait B {
     fn f(a: A) -> A;
 }
diff --git a/tests/crashes/128176.rs b/tests/crashes/128176.rs
index 70fada4f0fe..970ad9ff2cd 100644
--- a/tests/crashes/128176.rs
+++ b/tests/crashes/128176.rs
@@ -1,7 +1,7 @@
 //@ known-bug: rust-lang/rust#128176
 
 #![feature(generic_const_exprs)]
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 trait X {
     type Y<const N: i16>;
 }
diff --git a/tests/crashes/130521.rs b/tests/crashes/130521.rs
index 2d30b658024..7c078ab5790 100644
--- a/tests/crashes/130521.rs
+++ b/tests/crashes/130521.rs
@@ -1,6 +1,6 @@
 //@ known-bug: #130521
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 struct Vtable(dyn Cap);
 
 trait Cap<'a> {}
diff --git a/tests/ui/allocator/dyn-compatible.rs b/tests/ui/allocator/dyn-compatible.rs
new file mode 100644
index 00000000000..9d8235e58d9
--- /dev/null
+++ b/tests/ui/allocator/dyn-compatible.rs
@@ -0,0 +1,13 @@
+//@ run-pass
+
+// Check that `Allocator` is dyn-compatible, this allows for polymorphic allocators
+
+#![feature(allocator_api)]
+
+use std::alloc::{Allocator, System};
+
+fn ensure_dyn_compatible(_: &dyn Allocator) {}
+
+fn main() {
+    ensure_dyn_compatible(&System);
+}
diff --git a/tests/ui/allocator/object-safe.rs b/tests/ui/allocator/object-safe.rs
deleted file mode 100644
index 1c1f4fe0bf6..00000000000
--- a/tests/ui/allocator/object-safe.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-//@ run-pass
-
-// Check that `Allocator` is object safe, this allows for polymorphic allocators
-
-#![feature(allocator_api)]
-
-use std::alloc::{Allocator, System};
-
-fn ensure_object_safe(_: &dyn Allocator) {}
-
-fn main() {
-    ensure_object_safe(&System);
-}
diff --git a/tests/ui/associated-type-bounds/entails-sized-object-safety.rs b/tests/ui/associated-type-bounds/entails-sized-dyn-compatibility.rs
index ad2cbe48209..943df68493f 100644
--- a/tests/ui/associated-type-bounds/entails-sized-object-safety.rs
+++ b/tests/ui/associated-type-bounds/entails-sized-dyn-compatibility.rs
@@ -4,21 +4,21 @@ trait Tr1: Sized { type As1; }
 trait Tr2<'a>: Sized { type As2; }
 
 trait ObjTr1 { fn foo() -> Self where Self: Tr1<As1: Copy>; }
-fn _assert_obj_safe_1(_: Box<dyn ObjTr1>) {}
+fn _assert_dyn_compat_1(_: Box<dyn ObjTr1>) {}
 
 trait ObjTr2 { fn foo() -> Self where Self: Tr1<As1: 'static>; }
-fn _assert_obj_safe_2(_: Box<dyn ObjTr2>) {}
+fn _assert_dyn_compat_2(_: Box<dyn ObjTr2>) {}
 
 trait ObjTr3 { fn foo() -> Self where Self: Tr1<As1: Into<u8> + 'static + Copy>; }
-fn _assert_obj_safe_3(_: Box<dyn ObjTr3>) {}
+fn _assert_dyn_compat_3(_: Box<dyn ObjTr3>) {}
 
 trait ObjTr4 { fn foo() -> Self where Self: Tr1<As1: for<'a> Tr2<'a>>; }
-fn _assert_obj_safe_4(_: Box<dyn ObjTr4>) {}
+fn _assert_dyn_compat_4(_: Box<dyn ObjTr4>) {}
 
 trait ObjTr5 { fn foo() -> Self where for<'a> Self: Tr1<As1: Tr2<'a>>; }
-fn _assert_obj_safe_5(_: Box<dyn ObjTr5>) {}
+fn _assert_dyn_compat_5(_: Box<dyn ObjTr5>) {}
 
 trait ObjTr6 { fn foo() -> Self where Self: for<'a> Tr1<As1: Tr2<'a, As2: for<'b> Tr2<'b>>>; }
-fn _assert_obj_safe_6(_: Box<dyn ObjTr6>) {}
+fn _assert_dyn_compat_6(_: Box<dyn ObjTr6>) {}
 
 fn main() {}
diff --git a/tests/ui/async-await/in-trait/object-safety.rs b/tests/ui/async-await/in-trait/dyn-compatibility.rs
index 8174a803e79..8174a803e79 100644
--- a/tests/ui/async-await/in-trait/object-safety.rs
+++ b/tests/ui/async-await/in-trait/dyn-compatibility.rs
diff --git a/tests/ui/async-await/in-trait/object-safety.stderr b/tests/ui/async-await/in-trait/dyn-compatibility.stderr
index 8e73abab933..5cc3b6800dd 100644
--- a/tests/ui/async-await/in-trait/object-safety.stderr
+++ b/tests/ui/async-await/in-trait/dyn-compatibility.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:9:12
+  --> $DIR/dyn-compatibility.rs:9:12
    |
 LL |     let x: &dyn Foo = todo!();
    |            ^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:5:14
+  --> $DIR/dyn-compatibility.rs:5:14
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/check-cfg/mix.stderr b/tests/ui/check-cfg/mix.stderr
index 7726c2d52f5..c21016e9290 100644
--- a/tests/ui/check-cfg/mix.stderr
+++ b/tests/ui/check-cfg/mix.stderr
@@ -251,7 +251,7 @@ warning: unexpected `cfg` condition value: `zebra`
 LL |     cfg!(target_feature = "zebra");
    |          ^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `amx-bf16`, `amx-complex`, `amx-fp16`, `amx-int8`, `amx-tile`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, and `avx512vpopcntdq` and 244 more
+   = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `amx-bf16`, `amx-complex`, `amx-fp16`, `amx-int8`, `amx-tile`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, and `avx512vpopcntdq` and 245 more
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 
 warning: 27 warnings emitted
diff --git a/tests/ui/check-cfg/well-known-values.stderr b/tests/ui/check-cfg/well-known-values.stderr
index c6d403104ea..da790bbd528 100644
--- a/tests/ui/check-cfg/well-known-values.stderr
+++ b/tests/ui/check-cfg/well-known-values.stderr
@@ -174,7 +174,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
 LL |     target_feature = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `amx-bf16`, `amx-complex`, `amx-fp16`, `amx-int8`, `amx-tile`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `avxifma`, `avxneconvert`, `avxvnni`, `avxvnniint16`, `avxvnniint8`, `backchain`, `bf16`, `bmi1`, `bmi2`, `bti`, `bulk-memory`, `c`, `cache`, `cmpxchg16b`, `crc`, `crt-static`, `cssc`, `d`, `d32`, `dit`, `doloop`, `dotprod`, `dpb`, `dpb2`, `dsp`, `dsp1e2`, `dspe60`, `e`, `e1`, `e2`, `ecv`, `edsp`, `elrw`, `ermsb`, `exception-handling`, `extended-const`, `f`, `f16c`, `f32mm`, `f64mm`, `faminmax`, `fcma`, `fdivdu`, `fhm`, `flagm`, `flagm2`, `float1e2`, `float1e3`, `float3e4`, `float7e60`, `floate1`, `fma`, `fp-armv8`, `fp16`, `fp64`, `fp8`, `fp8dot2`, `fp8dot4`, `fp8fma`, `fpuv2_df`, `fpuv2_sf`, `fpuv3_df`, `fpuv3_hf`, `fpuv3_hi`, `fpuv3_sf`, `frecipe`, `frintts`, `fxsr`, `gfni`, `hard-float`, `hard-float-abi`, `hard-tp`, `hbc`, `high-registers`, `hvx`, `hvx-length128b`, `hwdiv`, `i8mm`, `jsconv`, `lahfsahf`, `lasx`, `lbt`, `lor`, `lse`, `lse128`, `lse2`, `lsx`, `lut`, `lvz`, `lzcnt`, `m`, `mclass`, `mops`, `movbe`, `mp`, `mp1e2`, `msa`, `mte`, `multivalue`, `mutable-globals`, `neon`, `nontrapping-fptoint`, `nvic`, `paca`, `pacg`, `pan`, `partword-atomics`, `pclmulqdq`, `pmuv3`, `popcnt`, `power10-vector`, `power8-altivec`, `power8-vector`, `power9-altivec`, `power9-vector`, `prfchw`, `quadword-atomics`, `rand`, `ras`, `rclass`, `rcpc`, `rcpc2`, `rcpc3`, `rdm`, `rdrand`, `rdseed`, `reference-types`, `relax`, `relaxed-simd`, `rtm`, `sb`, `sha`, `sha2`, `sha3`, `sha512`, `sign-ext`, `simd128`, `sm3`, `sm4`, `sme`, `sme-f16f16`, `sme-f64f64`, `sme-f8f16`, `sme-f8f32`, `sme-fa64`, `sme-i16i64`, `sme-lutv2`, `sme2`, `sme2p1`, `spe`, `ssbs`, `sse`, `sse2`, `sse3`, `sse4.1`, `sse4.2`, `sse4a`, `ssse3`, `ssve-fp8dot2`, `ssve-fp8dot4`, `ssve-fp8fma`, `sve`, `sve-b16b16`, `sve2`, `sve2-aes`, `sve2-bitperm`, `sve2-sha3`, `sve2-sm4`, `sve2p1`, `tbm`, `thumb-mode`, `thumb2`, `tme`, `trust`, `trustzone`, `ual`, `unaligned-scalar-mem`, `v`, `v5te`, `v6`, `v6k`, `v6t2`, `v7`, `v8`, `v8.1a`, `v8.2a`, `v8.3a`, `v8.4a`, `v8.5a`, `v8.6a`, `v8.7a`, `v8.8a`, `v8.9a`, `v9.1a`, `v9.2a`, `v9.3a`, `v9.4a`, `v9.5a`, `v9a`, `vaes`, `vdsp2e60f`, `vdspv1`, `vdspv2`, `vector`, `vfp2`, `vfp3`, `vfp4`, `vh`, `virt`, `virtualization`, `vpclmulqdq`, `vsx`, `wfxt`, `xop`, `xsave`, `xsavec`, `xsaveopt`, `xsaves`, `zaamo`, `zabha`, `zalrsc`, `zba`, `zbb`, `zbc`, `zbkb`, `zbkc`, `zbkx`, `zbs`, `zdinx`, `zfh`, `zfhmin`, `zfinx`, `zhinx`, `zhinxmin`, `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, and `zkt`
+   = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `amx-bf16`, `amx-complex`, `amx-fp16`, `amx-int8`, `amx-tile`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `avxifma`, `avxneconvert`, `avxvnni`, `avxvnniint16`, `avxvnniint8`, `backchain`, `bf16`, `bmi1`, `bmi2`, `bti`, `bulk-memory`, `c`, `cache`, `cmpxchg16b`, `crc`, `crt-static`, `cssc`, `d`, `d32`, `dit`, `doloop`, `dotprod`, `dpb`, `dpb2`, `dsp`, `dsp1e2`, `dspe60`, `e`, `e1`, `e2`, `ecv`, `edsp`, `elrw`, `ermsb`, `exception-handling`, `extended-const`, `f`, `f16c`, `f32mm`, `f64mm`, `faminmax`, `fcma`, `fdivdu`, `fhm`, `flagm`, `flagm2`, `float1e2`, `float1e3`, `float3e4`, `float7e60`, `floate1`, `fma`, `fp-armv8`, `fp16`, `fp64`, `fp8`, `fp8dot2`, `fp8dot4`, `fp8fma`, `fpuv2_df`, `fpuv2_sf`, `fpuv3_df`, `fpuv3_hf`, `fpuv3_hi`, `fpuv3_sf`, `frecipe`, `frintts`, `fxsr`, `gfni`, `hard-float`, `hard-float-abi`, `hard-tp`, `hbc`, `high-registers`, `hvx`, `hvx-length128b`, `hwdiv`, `i8mm`, `jsconv`, `lahfsahf`, `lasx`, `lbt`, `lor`, `lse`, `lse128`, `lse2`, `lsx`, `lut`, `lvz`, `lzcnt`, `m`, `mclass`, `mops`, `movbe`, `mp`, `mp1e2`, `msa`, `mte`, `multivalue`, `mutable-globals`, `neon`, `nontrapping-fptoint`, `nvic`, `paca`, `pacg`, `pan`, `partword-atomics`, `pclmulqdq`, `pmuv3`, `popcnt`, `power10-vector`, `power8-altivec`, `power8-vector`, `power9-altivec`, `power9-vector`, `prfchw`, `quadword-atomics`, `rand`, `ras`, `rclass`, `rcpc`, `rcpc2`, `rcpc3`, `rdm`, `rdrand`, `rdseed`, `reference-types`, `relax`, `relaxed-simd`, `rtm`, `sb`, `sha`, `sha2`, `sha3`, `sha512`, `sign-ext`, `simd128`, `sm3`, `sm4`, `sme`, `sme-b16b16`, `sme-f16f16`, `sme-f64f64`, `sme-f8f16`, `sme-f8f32`, `sme-fa64`, `sme-i16i64`, `sme-lutv2`, `sme2`, `sme2p1`, `spe`, `ssbs`, `sse`, `sse2`, `sse3`, `sse4.1`, `sse4.2`, `sse4a`, `ssse3`, `ssve-fp8dot2`, `ssve-fp8dot4`, `ssve-fp8fma`, `sve`, `sve-b16b16`, `sve2`, `sve2-aes`, `sve2-bitperm`, `sve2-sha3`, `sve2-sm4`, `sve2p1`, `tbm`, `thumb-mode`, `thumb2`, `tme`, `trust`, `trustzone`, `ual`, `unaligned-scalar-mem`, `v`, `v5te`, `v6`, `v6k`, `v6t2`, `v7`, `v8`, `v8.1a`, `v8.2a`, `v8.3a`, `v8.4a`, `v8.5a`, `v8.6a`, `v8.7a`, `v8.8a`, `v8.9a`, `v9.1a`, `v9.2a`, `v9.3a`, `v9.4a`, `v9.5a`, `v9a`, `vaes`, `vdsp2e60f`, `vdspv1`, `vdspv2`, `vector`, `vfp2`, `vfp3`, `vfp4`, `vh`, `virt`, `virtualization`, `vpclmulqdq`, `vsx`, `wfxt`, `xop`, `xsave`, `xsavec`, `xsaveopt`, `xsaves`, `zaamo`, `zabha`, `zalrsc`, `zba`, `zbb`, `zbc`, `zbkb`, `zbkc`, `zbkx`, `zbs`, `zdinx`, `zfh`, `zfhmin`, `zfinx`, `zhinx`, `zhinxmin`, `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, and `zkt`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
diff --git a/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs b/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.rs
index bce3b0fd729..f41d3a783ab 100644
--- a/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs
+++ b/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.rs
@@ -1,10 +1,10 @@
 // Test that we give suitable error messages when the user attempts to
 // impl a trait `Trait` for its own object type.
 
-// If the trait is not object-safe, we give a more tailored message
+// If the trait is dyn-incompatible, we give a more tailored message
 // because we're such schnuckels:
-trait NotObjectSafe { fn eq(&self, other: Self); }
-impl NotObjectSafe for dyn NotObjectSafe { }
+trait DynIncompatible { fn eq(&self, other: Self); }
+impl DynIncompatible for dyn DynIncompatible { }
 //~^ ERROR E0038
 //~| ERROR E0046
 
diff --git a/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr b/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr
new file mode 100644
index 00000000000..542be2dbc30
--- /dev/null
+++ b/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr
@@ -0,0 +1,27 @@
+error[E0038]: the trait `DynIncompatible` cannot be made into an object
+  --> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:7:26
+   |
+LL | impl DynIncompatible for dyn DynIncompatible { }
+   |                          ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` cannot be made into an object
+   |
+note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:6:45
+   |
+LL | trait DynIncompatible { fn eq(&self, other: Self); }
+   |       ---------------                       ^^^^ ...because method `eq` references the `Self` type in this parameter
+   |       |
+   |       this trait cannot be made into an object...
+   = help: consider moving `eq` to another trait
+
+error[E0046]: not all trait items implemented, missing: `eq`
+  --> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:7:1
+   |
+LL | trait DynIncompatible { fn eq(&self, other: Self); }
+   |                         -------------------------- `eq` from trait
+LL | impl DynIncompatible for dyn DynIncompatible { }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `eq` in implementation
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0038, E0046.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr b/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr
deleted file mode 100644
index ce65e079ab4..00000000000
--- a/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0038]: the trait `NotObjectSafe` cannot be made into an object
-  --> $DIR/coherence-impl-trait-for-trait-object-safe.rs:7:24
-   |
-LL | impl NotObjectSafe for dyn NotObjectSafe { }
-   |                        ^^^^^^^^^^^^^^^^^ `NotObjectSafe` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/coherence-impl-trait-for-trait-object-safe.rs:6:43
-   |
-LL | trait NotObjectSafe { fn eq(&self, other: Self); }
-   |       -------------                       ^^^^ ...because method `eq` references the `Self` type in this parameter
-   |       |
-   |       this trait cannot be made into an object...
-   = help: consider moving `eq` to another trait
-
-error[E0046]: not all trait items implemented, missing: `eq`
-  --> $DIR/coherence-impl-trait-for-trait-object-safe.rs:7:1
-   |
-LL | trait NotObjectSafe { fn eq(&self, other: Self); }
-   |                       -------------------------- `eq` from trait
-LL | impl NotObjectSafe for dyn NotObjectSafe { }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `eq` in implementation
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0038, E0046.
-For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/coherence/coherence-unsafe-trait-object-impl.rs b/tests/ui/coherence/coherence-unsafe-trait-object-impl.rs
index 9859a226efd..16baf0958a6 100644
--- a/tests/ui/coherence/coherence-unsafe-trait-object-impl.rs
+++ b/tests/ui/coherence/coherence-unsafe-trait-object-impl.rs
@@ -1,7 +1,7 @@
 // Check that unsafe trait object do not implement themselves
 // automatically
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Trait: Sized {
     fn call(&self);
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_object_safety.rs b/tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.rs
index 6a553c2e085..6a553c2e085 100644
--- a/tests/ui/const-generics/adt_const_params/const_param_ty_object_safety.rs
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.rs
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_object_safety.stderr b/tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.stderr
index 831b40887ac..84281eb53c9 100644
--- a/tests/ui/const-generics/adt_const_params/const_param_ty_object_safety.stderr
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_dyn_compatibility.stderr
@@ -1,5 +1,5 @@
 error[E0038]: the trait `ConstParamTy_` cannot be made into an object
-  --> $DIR/const_param_ty_object_safety.rs:6:12
+  --> $DIR/const_param_ty_dyn_compatibility.rs:6:12
    |
 LL | fn foo(a: &dyn ConstParamTy_) {}
    |            ^^^^^^^^^^^^^^^^^ `ConstParamTy_` cannot be made into an object
@@ -14,7 +14,7 @@ LL | fn foo(a: &impl ConstParamTy_) {}
    |            ~~~~
 
 error[E0038]: the trait `UnsizedConstParamTy` cannot be made into an object
-  --> $DIR/const_param_ty_object_safety.rs:9:12
+  --> $DIR/const_param_ty_dyn_compatibility.rs:9:12
    |
 LL | fn bar(a: &dyn UnsizedConstParamTy) {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^ `UnsizedConstParamTy` cannot be made into an object
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.rs b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.rs
index 1620e257667..1620e257667 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.rs
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.rs
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr
index fb57da42bb2..d2017615e67 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-ret.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-err-ret.rs:17:16
+  --> $DIR/dyn-compatibility-err-ret.rs:17:16
    |
 LL | fn use_dyn(v: &dyn Foo) {
    |                ^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-err-ret.rs:8:8
+  --> $DIR/dyn-compatibility-err-ret.rs:8:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -17,13 +17,13 @@ LL |     fn test(&self) -> [u8; bar::<Self>()];
    = help: only type `()` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-err-ret.rs:18:5
+  --> $DIR/dyn-compatibility-err-ret.rs:18:5
    |
 LL |     v.test();
    |     ^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-err-ret.rs:8:8
+  --> $DIR/dyn-compatibility-err-ret.rs:8:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.rs b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.rs
index b3bbb842638..b3bbb842638 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.rs
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.rs
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.stderr b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr
index 831bda71295..26ca2d4df5f 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-err-where-bounds.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-err-where-bounds.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-err-where-bounds.rs:15:16
+  --> $DIR/dyn-compatibility-err-where-bounds.rs:15:16
    |
 LL | fn use_dyn(v: &dyn Foo) {
    |                ^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-err-where-bounds.rs:8:8
+  --> $DIR/dyn-compatibility-err-where-bounds.rs:8:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -15,13 +15,13 @@ LL |     fn test(&self) where [u8; bar::<Self>()]: Sized;
    = help: only type `()` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-err-where-bounds.rs:17:5
+  --> $DIR/dyn-compatibility-err-where-bounds.rs:17:5
    |
 LL |     v.test();
    |     ^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-err-where-bounds.rs:8:8
+  --> $DIR/dyn-compatibility-err-where-bounds.rs:8:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.rs b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs
index 298cfb512e4..298cfb512e4 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.rs
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.rs
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr
index d1e1c976da6..a124fbc6092 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok-infer-err.stderr
@@ -1,11 +1,11 @@
 error[E0284]: type annotations needed
-  --> $DIR/object-safety-ok-infer-err.rs:19:5
+  --> $DIR/dyn-compatibility-ok-infer-err.rs:19:5
    |
 LL |     use_dyn(&());
    |     ^^^^^^^ cannot infer the value of the const parameter `N` declared on the function `use_dyn`
    |
 note: required by a const generic parameter in `use_dyn`
-  --> $DIR/object-safety-ok-infer-err.rs:14:12
+  --> $DIR/dyn-compatibility-ok-infer-err.rs:14:12
    |
 LL | fn use_dyn<const N: usize>(v: &dyn Foo<N>) where [u8; N + 1]: Sized {
    |            ^^^^^^^^^^^^^^ required by this const generic parameter in `use_dyn`
@@ -15,7 +15,7 @@ LL |     use_dyn::<N>(&());
    |            +++++
 
 error[E0284]: type annotations needed
-  --> $DIR/object-safety-ok-infer-err.rs:19:5
+  --> $DIR/dyn-compatibility-ok-infer-err.rs:19:5
    |
 LL |     use_dyn(&());
    |     ^^^^^^^ --- type must be known at this point
@@ -23,7 +23,7 @@ LL |     use_dyn(&());
    |     cannot infer the value of the const parameter `N` declared on the function `use_dyn`
    |
 note: required for `()` to implement `Foo<_>`
-  --> $DIR/object-safety-ok-infer-err.rs:8:22
+  --> $DIR/dyn-compatibility-ok-infer-err.rs:8:22
    |
 LL | impl<const N: usize> Foo<N> for () {
    |      --------------  ^^^^^^     ^^
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok.rs
index 6220d681fe1..6220d681fe1 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-ok.rs
+++ b/tests/ui/const-generics/generic_const_exprs/dyn-compatibility-ok.rs
diff --git a/tests/ui/object-safety/almost-supertrait-associated-type.rs b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.rs
index 963cdff526e..83076f7d5fc 100644
--- a/tests/ui/object-safety/almost-supertrait-associated-type.rs
+++ b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.rs
@@ -1,5 +1,5 @@
 // Test for fixed unsoundness in #126079.
-// Enforces that the associated types that are object safe
+// Enforces that the associated types that are dyn-compatible.
 
 use std::marker::PhantomData;
 
diff --git a/tests/ui/object-safety/almost-supertrait-associated-type.stderr b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr
index 99bcccc20c0..99bcccc20c0 100644
--- a/tests/ui/object-safety/almost-supertrait-associated-type.stderr
+++ b/tests/ui/dyn-compatibility/almost-supertrait-associated-type.stderr
diff --git a/tests/ui/object-safety/assoc_const_bounds.rs b/tests/ui/dyn-compatibility/assoc_const_bounds.rs
index 32c4de1981b..32c4de1981b 100644
--- a/tests/ui/object-safety/assoc_const_bounds.rs
+++ b/tests/ui/dyn-compatibility/assoc_const_bounds.rs
diff --git a/tests/ui/object-safety/assoc_const_bounds_sized.rs b/tests/ui/dyn-compatibility/assoc_const_bounds_sized.rs
index 1272a735e83..1272a735e83 100644
--- a/tests/ui/object-safety/assoc_const_bounds_sized.rs
+++ b/tests/ui/dyn-compatibility/assoc_const_bounds_sized.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds.rs b/tests/ui/dyn-compatibility/assoc_type_bounds.rs
index 8634ba626a1..8634ba626a1 100644
--- a/tests/ui/object-safety/assoc_type_bounds.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds.stderr b/tests/ui/dyn-compatibility/assoc_type_bounds.stderr
index 3d5482625af..3d5482625af 100644
--- a/tests/ui/object-safety/assoc_type_bounds.stderr
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds.stderr
diff --git a/tests/ui/object-safety/assoc_type_bounds2.rs b/tests/ui/dyn-compatibility/assoc_type_bounds2.rs
index f7dc2fb8839..f7dc2fb8839 100644
--- a/tests/ui/object-safety/assoc_type_bounds2.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds2.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds2.stderr b/tests/ui/dyn-compatibility/assoc_type_bounds2.stderr
index 815747436bf..815747436bf 100644
--- a/tests/ui/object-safety/assoc_type_bounds2.stderr
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds2.stderr
diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed b/tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.fixed
index 88697bad4d7..88697bad4d7 100644
--- a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.fixed
diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs b/tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.rs
index 944b296aa4d..944b296aa4d 100644
--- a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr b/tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.stderr
index 9bb770ce431..9bb770ce431 100644
--- a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_implicit_sized.stderr
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized.rs b/tests/ui/dyn-compatibility/assoc_type_bounds_sized.rs
index 7535871afe5..7535871afe5 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_others.rs b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_others.rs
index 5b07bc92f32..5b07bc92f32 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_others.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_others.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_others.stderr b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_others.stderr
index 5438faaaf05..5438faaaf05 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_others.stderr
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_others.stderr
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_unnecessary.rs
index e9216da5927..e9216da5927 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_unnecessary.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.stderr b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_unnecessary.stderr
index aaadc4ed7b1..aaadc4ed7b1 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.stderr
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_unnecessary.stderr
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_used.rs b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs
index d59fc1712ea..d59fc1712ea 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_used.rs
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.rs
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_used.stderr b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.stderr
index b67a1244ece..b67a1244ece 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_used.stderr
+++ b/tests/ui/dyn-compatibility/assoc_type_bounds_sized_used.stderr
diff --git a/tests/ui/object-safety/object-safety-associated-consts.curr.stderr b/tests/ui/dyn-compatibility/associated-consts.curr.stderr
index 3c070f17c82..17d184942c7 100644
--- a/tests/ui/object-safety/object-safety-associated-consts.curr.stderr
+++ b/tests/ui/dyn-compatibility/associated-consts.curr.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-associated-consts.rs:12:31
+  --> $DIR/associated-consts.rs:12:31
    |
 LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
    |                               ^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-associated-consts.rs:9:11
+  --> $DIR/associated-consts.rs:9:11
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -14,13 +14,13 @@ LL |     const X: usize;
    = help: consider moving `X` to another trait
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-associated-consts.rs:14:5
+  --> $DIR/associated-consts.rs:14:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-associated-consts.rs:9:11
+  --> $DIR/associated-consts.rs:9:11
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr b/tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr
index 5b98cc35505..cc5120232c2 100644
--- a/tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-associated-consts.rs:14:5
+  --> $DIR/associated-consts.rs:14:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-associated-consts.rs:9:11
+  --> $DIR/associated-consts.rs:9:11
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-associated-consts.rs b/tests/ui/dyn-compatibility/associated-consts.rs
index a090214bbb4..fc7b372b782 100644
--- a/tests/ui/object-safety/object-safety-associated-consts.rs
+++ b/tests/ui/dyn-compatibility/associated-consts.rs
@@ -1,9 +1,9 @@
 // Check that we correctly prevent users from making trait objects
 // from traits with associated consts.
 //
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 trait Bar {
     const X: usize;
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-2.new.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.new.stderr
index 4e3d2ebebad..4e3d2ebebad 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning-2.new.stderr
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.new.stderr
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-2.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr
index 180cd679dea..180cd679dea 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning-2.old.stderr
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-2.rs b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.rs
index db2f4aea05b..db2f4aea05b 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning-2.rs
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.rs
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-3.new.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.new.stderr
index fdd3e8ab507..fdd3e8ab507 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning-3.new.stderr
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.new.stderr
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-3.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr
index bd362abb355..bd362abb355 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning-3.old.stderr
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-3.rs b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.rs
index 38bee8142bb..38bee8142bb 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning-3.rs
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.rs
diff --git a/tests/ui/object-safety/avoid-ice-on-warning.new.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning.new.stderr
index 4ff45d7a848..4ff45d7a848 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning.new.stderr
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning.new.stderr
diff --git a/tests/ui/object-safety/avoid-ice-on-warning.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr
index 646fb57af9e..646fb57af9e 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning.old.stderr
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr
diff --git a/tests/ui/object-safety/avoid-ice-on-warning.rs b/tests/ui/dyn-compatibility/avoid-ice-on-warning.rs
index b90d8911d50..b90d8911d50 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning.rs
+++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning.rs
diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.fixed
index 4f5310082e1..4f5310082e1 100644
--- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.fixed
+++ b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.fixed
diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.stderr b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.stderr
index bb2bf6ddcda..bb2bf6ddcda 100644
--- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.new.stderr
+++ b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.new.stderr
diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.old.stderr b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.old.stderr
index 45c9b0ce5d9..45c9b0ce5d9 100644
--- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.old.stderr
+++ b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.old.stderr
diff --git a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.rs
index cb5a305eab0..cb5a305eab0 100644
--- a/tests/ui/object-safety/bare-trait-dont-suggest-dyn.rs
+++ b/tests/ui/dyn-compatibility/bare-trait-dont-suggest-dyn.rs
diff --git a/tests/ui/object-safety/object-safety-bounds.rs b/tests/ui/dyn-compatibility/bounds.rs
index 44bd369324a..1e04d11c516 100644
--- a/tests/ui/object-safety/object-safety-bounds.rs
+++ b/tests/ui/dyn-compatibility/bounds.rs
@@ -1,4 +1,4 @@
-// Traits with bounds mentioning `Self` are not object safe
+// Traits with bounds mentioning `Self` are dyn-incompatible.
 
 trait X {
     type U: PartialEq<Self>;
diff --git a/tests/ui/object-safety/object-safety-bounds.stderr b/tests/ui/dyn-compatibility/bounds.stderr
index 96a81a69639..9231d524fd1 100644
--- a/tests/ui/object-safety/object-safety-bounds.stderr
+++ b/tests/ui/dyn-compatibility/bounds.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `X` cannot be made into an object
-  --> $DIR/object-safety-bounds.rs:7:15
+  --> $DIR/bounds.rs:7:15
    |
 LL | fn f() -> Box<dyn X<U = u32>> {
    |               ^^^^^^^^^^^^^^ `X` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-bounds.rs:4:13
+  --> $DIR/bounds.rs:4:13
    |
 LL | trait X {
    |       - this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-by-value-self-use.rs b/tests/ui/dyn-compatibility/by-value-self-use.rs
index 8e93c538217..3c04ec0cd88 100644
--- a/tests/ui/object-safety/object-safety-by-value-self-use.rs
+++ b/tests/ui/dyn-compatibility/by-value-self-use.rs
@@ -1,4 +1,4 @@
-// Check that while a trait with by-value self is object-safe, we
+// Check that while a trait with by-value self is dyn-compatible, we
 // can't actually invoke it from an object (yet...?).
 
 #![feature(rustc_attrs)]
diff --git a/tests/ui/object-safety/object-safety-by-value-self-use.stderr b/tests/ui/dyn-compatibility/by-value-self-use.stderr
index 1701f6059a8..14785b982a3 100644
--- a/tests/ui/object-safety/object-safety-by-value-self-use.stderr
+++ b/tests/ui/dyn-compatibility/by-value-self-use.stderr
@@ -1,5 +1,5 @@
 error[E0161]: cannot move a value of type `dyn Bar`
-  --> $DIR/object-safety-by-value-self-use.rs:15:5
+  --> $DIR/by-value-self-use.rs:15:5
    |
 LL |     t.bar()
    |     ^ the size of `dyn Bar` cannot be statically determined
diff --git a/tests/ui/object-safety/object-safety-by-value-self.rs b/tests/ui/dyn-compatibility/by-value-self.rs
index 0d20032327c..a057a7ff0b5 100644
--- a/tests/ui/object-safety/object-safety-by-value-self.rs
+++ b/tests/ui/dyn-compatibility/by-value-self.rs
@@ -1,4 +1,4 @@
-// Check that a trait with by-value self is considered object-safe.
+// Check that a trait with by-value self is considered dyn-compatible.
 
 //@ build-pass (FIXME(62277): could be check-pass?)
 #![allow(dead_code)]
diff --git a/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs b/tests/ui/dyn-compatibility/call-when-assoc-ty-is-sized.rs
index 7a3a7f3ca2f..7a3a7f3ca2f 100644
--- a/tests/ui/object-safety/call-when-assoc-ty-is-sized.rs
+++ b/tests/ui/dyn-compatibility/call-when-assoc-ty-is-sized.rs
diff --git a/tests/ui/object-safety/issue-102933.rs b/tests/ui/dyn-compatibility/elaborated-predicates-ordering.rs
index aa678fea176..d3c3963a673 100644
--- a/tests/ui/object-safety/issue-102933.rs
+++ b/tests/ui/dyn-compatibility/elaborated-predicates-ordering.rs
@@ -1,4 +1,5 @@
 //@ check-pass
+// issue: rust-lang/rust#102933
 
 use std::future::Future;
 
diff --git a/tests/ui/object-safety/erroneous_signature.rs b/tests/ui/dyn-compatibility/erroneous_signature.rs
index cc1841cc4b2..cc1841cc4b2 100644
--- a/tests/ui/object-safety/erroneous_signature.rs
+++ b/tests/ui/dyn-compatibility/erroneous_signature.rs
diff --git a/tests/ui/object-safety/erroneous_signature.stderr b/tests/ui/dyn-compatibility/erroneous_signature.stderr
index f3b14ffe34c..f3b14ffe34c 100644
--- a/tests/ui/object-safety/erroneous_signature.stderr
+++ b/tests/ui/dyn-compatibility/erroneous_signature.stderr
diff --git a/tests/ui/object-safety/object-safety-generics.curr.stderr b/tests/ui/dyn-compatibility/generics.curr.stderr
index 7528785d90b..c63db38a080 100644
--- a/tests/ui/object-safety/object-safety-generics.curr.stderr
+++ b/tests/ui/dyn-compatibility/generics.curr.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:18:31
+  --> $DIR/generics.rs:18:31
    |
 LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
    |                               ^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -14,13 +14,13 @@ LL |     fn bar<T>(&self, t: T);
    = help: consider moving `bar` to another trait
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:25:40
+  --> $DIR/generics.rs:25:40
    |
 LL | fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
    |                                        ^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -29,13 +29,13 @@ LL |     fn bar<T>(&self, t: T);
    = help: consider moving `bar` to another trait
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:20:5
+  --> $DIR/generics.rs:20:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -45,13 +45,13 @@ LL |     fn bar<T>(&self, t: T);
    = note: required for the cast from `&T` to `&dyn Bar`
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:27:10
+  --> $DIR/generics.rs:27:10
    |
 LL |     t as &dyn Bar
    |          ^^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -60,13 +60,13 @@ LL |     fn bar<T>(&self, t: T);
    = help: consider moving `bar` to another trait
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:27:5
+  --> $DIR/generics.rs:27:5
    |
 LL |     t as &dyn Bar
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-generics.object_safe_for_dispatch.stderr b/tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr
index 4686b994b33..ba2546ef2dc 100644
--- a/tests/ui/object-safety/object-safety-generics.object_safe_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:20:5
+  --> $DIR/generics.rs:20:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -15,13 +15,13 @@ LL |     fn bar<T>(&self, t: T);
    = note: required for the cast from `&T` to `&dyn Bar`
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-generics.rs:27:5
+  --> $DIR/generics.rs:27:5
    |
 LL |     t as &dyn Bar
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-generics.rs:10:8
+  --> $DIR/generics.rs:10:8
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-generics.rs b/tests/ui/dyn-compatibility/generics.rs
index f005a689ac4..b51555aa500 100644
--- a/tests/ui/object-safety/object-safety-generics.rs
+++ b/tests/ui/dyn-compatibility/generics.rs
@@ -1,9 +1,9 @@
 // Check that we correctly prevent users from making trait objects
 // from traits with generic methods, unless `where Self : Sized` is
 // present.
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 
 trait Bar {
@@ -18,14 +18,14 @@ trait Quux {
 fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
     //[curr]~^ ERROR E0038
     t
-    //[object_safe_for_dispatch]~^ ERROR E0038
+    //[dyn_compatible_for_dispatch]~^ ERROR E0038
     //[curr]~^^ ERROR E0038
 }
 
 fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
     //[curr]~^ ERROR E0038
     t as &dyn Bar
-    //[object_safe_for_dispatch]~^ ERROR E0038
+    //[dyn_compatible_for_dispatch]~^ ERROR E0038
     //[curr]~^^ ERROR E0038
     //[curr]~| ERROR E0038
 }
diff --git a/tests/ui/object-safety/issue-106247.rs b/tests/ui/dyn-compatibility/impossible-predicates-multiple_supertrait_upcastable-check.rs
index 20a451a59a1..c2b8ecc141d 100644
--- a/tests/ui/object-safety/issue-106247.rs
+++ b/tests/ui/dyn-compatibility/impossible-predicates-multiple_supertrait_upcastable-check.rs
@@ -1,4 +1,5 @@
 //@ check-pass
+// issue: rust-lang/rust#106247
 
 pub trait Trait {
     fn method(&self) where Self: Sync;
diff --git a/tests/ui/object-safety/item-bounds-can-reference-self.rs b/tests/ui/dyn-compatibility/item-bounds-can-reference-self.rs
index 4ae982e8f95..4ae982e8f95 100644
--- a/tests/ui/object-safety/item-bounds-can-reference-self.rs
+++ b/tests/ui/dyn-compatibility/item-bounds-can-reference-self.rs
diff --git a/tests/ui/object-safety/issue-19538.rs b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.rs
index 7054ef41b1c..1289d2d7874 100644
--- a/tests/ui/object-safety/issue-19538.rs
+++ b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.rs
@@ -1,3 +1,5 @@
+// issue: rust-lang/rust#19538
+
 trait Foo {
     fn foo<T>(&self, val: T);
 }
diff --git a/tests/ui/object-safety/issue-19538.stderr b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr
index 3dbe389686a..7378ec023c9 100644
--- a/tests/ui/object-safety/issue-19538.stderr
+++ b/tests/ui/dyn-compatibility/mention-correct-dyn-incompatible-trait.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/issue-19538.rs:17:15
+  --> $DIR/mention-correct-dyn-incompatible-trait.rs:19:15
    |
 LL |     let test: &mut dyn Bar = &mut thing;
    |               ^^^^^^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-19538.rs:2:8
+  --> $DIR/mention-correct-dyn-incompatible-trait.rs:4:8
    |
 LL |     fn foo<T>(&self, val: T);
    |        ^^^ ...because method `foo` has generic type parameters
@@ -16,13 +16,13 @@ LL | trait Bar: Foo { }
    = help: only type `Thing` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/issue-19538.rs:17:30
+  --> $DIR/mention-correct-dyn-incompatible-trait.rs:19:30
    |
 LL |     let test: &mut dyn Bar = &mut thing;
    |                              ^^^^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-19538.rs:2:8
+  --> $DIR/mention-correct-dyn-incompatible-trait.rs:4:8
    |
 LL |     fn foo<T>(&self, val: T);
    |        ^^^ ...because method `foo` has generic type parameters
diff --git a/tests/ui/object-safety/object-safety-issue-22040.rs b/tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.rs
index c9ec44cc0b8..c9ec44cc0b8 100644
--- a/tests/ui/object-safety/object-safety-issue-22040.rs
+++ b/tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.rs
diff --git a/tests/ui/object-safety/object-safety-issue-22040.stderr b/tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.stderr
index e5723f12258..7578edce7d1 100644
--- a/tests/ui/object-safety/object-safety-issue-22040.stderr
+++ b/tests/ui/dyn-compatibility/mentions-Self-in-super-predicates.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Expr` cannot be made into an object
-  --> $DIR/object-safety-issue-22040.rs:12:23
+  --> $DIR/mentions-Self-in-super-predicates.rs:12:23
    |
 LL |     elements: Vec<Box<dyn Expr + 'x>>,
    |                       ^^^^^^^^^^^^^ `Expr` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-issue-22040.rs:5:21
+  --> $DIR/mentions-Self-in-super-predicates.rs:5:21
    |
 LL | trait Expr: Debug + PartialEq {
    |       ----          ^^^^^^^^^ ...because it uses `Self` as a type parameter
@@ -14,13 +14,13 @@ LL | trait Expr: Debug + PartialEq {
    = help: only type `SExpr<'x>` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Expr` cannot be made into an object
-  --> $DIR/object-safety-issue-22040.rs:38:16
+  --> $DIR/mentions-Self-in-super-predicates.rs:38:16
    |
 LL |     let a: Box<dyn Expr> = Box::new(SExpr::new());
    |                ^^^^^^^^ `Expr` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-issue-22040.rs:5:21
+  --> $DIR/mentions-Self-in-super-predicates.rs:5:21
    |
 LL | trait Expr: Debug + PartialEq {
    |       ----          ^^^^^^^^^ ...because it uses `Self` as a type parameter
@@ -29,13 +29,13 @@ LL | trait Expr: Debug + PartialEq {
    = help: only type `SExpr<'x>` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Expr` cannot be made into an object
-  --> $DIR/object-safety-issue-22040.rs:40:16
+  --> $DIR/mentions-Self-in-super-predicates.rs:40:16
    |
 LL |     let b: Box<dyn Expr> = Box::new(SExpr::new());
    |                ^^^^^^^^ `Expr` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-issue-22040.rs:5:21
+  --> $DIR/mentions-Self-in-super-predicates.rs:5:21
    |
 LL | trait Expr: Debug + PartialEq {
    |       ----          ^^^^^^^^^ ...because it uses `Self` as a type parameter
diff --git a/tests/ui/object-safety/object-safety-mentions-Self.curr.stderr b/tests/ui/dyn-compatibility/mentions-Self.curr.stderr
index 7efb6ec3542..434e41cf218 100644
--- a/tests/ui/object-safety/object-safety-mentions-Self.curr.stderr
+++ b/tests/ui/dyn-compatibility/mentions-Self.curr.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-mentions-Self.rs:22:31
+  --> $DIR/mentions-Self.rs:22:31
    |
 LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
    |                               ^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-mentions-Self.rs:11:22
+  --> $DIR/mentions-Self.rs:11:22
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -14,13 +14,13 @@ LL |     fn bar(&self, x: &Self);
    = help: consider moving `bar` to another trait
 
 error[E0038]: the trait `Baz` cannot be made into an object
-  --> $DIR/object-safety-mentions-Self.rs:28:31
+  --> $DIR/mentions-Self.rs:28:31
    |
 LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
    |                               ^^^^^^^ `Baz` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-mentions-Self.rs:15:22
+  --> $DIR/mentions-Self.rs:15:22
    |
 LL | trait Baz {
    |       --- this trait cannot be made into an object...
@@ -29,13 +29,13 @@ LL |     fn baz(&self) -> Self;
    = help: consider moving `baz` to another trait
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-mentions-Self.rs:24:5
+  --> $DIR/mentions-Self.rs:24:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-mentions-Self.rs:11:22
+  --> $DIR/mentions-Self.rs:11:22
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -45,13 +45,13 @@ LL |     fn bar(&self, x: &Self);
    = note: required for the cast from `&T` to `&dyn Bar`
 
 error[E0038]: the trait `Baz` cannot be made into an object
-  --> $DIR/object-safety-mentions-Self.rs:30:5
+  --> $DIR/mentions-Self.rs:30:5
    |
 LL |     t
    |     ^ `Baz` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-mentions-Self.rs:15:22
+  --> $DIR/mentions-Self.rs:15:22
    |
 LL | trait Baz {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr b/tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr
index d0efb9c587e..dc2d1f87eb7 100644
--- a/tests/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-mentions-Self.rs:24:5
+  --> $DIR/mentions-Self.rs:24:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-mentions-Self.rs:11:22
+  --> $DIR/mentions-Self.rs:11:22
    |
 LL | trait Bar {
    |       --- this trait cannot be made into an object...
@@ -15,13 +15,13 @@ LL |     fn bar(&self, x: &Self);
    = note: required for the cast from `&T` to `&dyn Bar`
 
 error[E0038]: the trait `Baz` cannot be made into an object
-  --> $DIR/object-safety-mentions-Self.rs:30:5
+  --> $DIR/mentions-Self.rs:30:5
    |
 LL |     t
    |     ^ `Baz` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-mentions-Self.rs:15:22
+  --> $DIR/mentions-Self.rs:15:22
    |
 LL | trait Baz {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-mentions-Self.rs b/tests/ui/dyn-compatibility/mentions-Self.rs
index 1311faf97bc..84c229e252d 100644
--- a/tests/ui/object-safety/object-safety-mentions-Self.rs
+++ b/tests/ui/dyn-compatibility/mentions-Self.rs
@@ -2,9 +2,9 @@
 // form traits that make use of `Self` in an argument or return
 // position, unless `where Self : Sized` is present..
 //
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 
 trait Bar {
diff --git a/tests/ui/traits/object/object-unsafe-missing-assoc-type.rs b/tests/ui/dyn-compatibility/missing-assoc-type.rs
index c83be544c0a..c83be544c0a 100644
--- a/tests/ui/traits/object/object-unsafe-missing-assoc-type.rs
+++ b/tests/ui/dyn-compatibility/missing-assoc-type.rs
diff --git a/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr b/tests/ui/dyn-compatibility/missing-assoc-type.stderr
index 9258b38f26c..f8450ba212d 100644
--- a/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr
+++ b/tests/ui/dyn-compatibility/missing-assoc-type.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-unsafe-missing-assoc-type.rs:5:16
+  --> $DIR/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 "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-missing-assoc-type.rs:2:10
+  --> $DIR/missing-assoc-type.rs:2:10
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -14,13 +14,13 @@ LL |     type Bar<T>;
    = help: consider moving `Bar` to another trait
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-unsafe-missing-assoc-type.rs:5:16
+  --> $DIR/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 "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-missing-assoc-type.rs:2:10
+  --> $DIR/missing-assoc-type.rs:2:10
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -30,13 +30,13 @@ LL |     type Bar<T>;
    = 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
+  --> $DIR/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 "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-missing-assoc-type.rs:2:10
+  --> $DIR/missing-assoc-type.rs:2:10
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -46,13 +46,13 @@ LL |     type Bar<T>;
    = 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
+  --> $DIR/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 "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-missing-assoc-type.rs:2:10
+  --> $DIR/missing-assoc-type.rs:2:10
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-no-static.curr.stderr b/tests/ui/dyn-compatibility/no-static.curr.stderr
index 91c3d89602e..584db779855 100644
--- a/tests/ui/object-safety/object-safety-no-static.curr.stderr
+++ b/tests/ui/dyn-compatibility/no-static.curr.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-no-static.rs:12:22
+  --> $DIR/no-static.rs:12:22
    |
 LL | fn diverges() -> Box<dyn Foo> {
    |                      ^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-no-static.rs:9:8
+  --> $DIR/no-static.rs:9:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -22,13 +22,13 @@ LL |     fn foo() where Self: Sized {}
    |              +++++++++++++++++
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-no-static.rs:22:12
+  --> $DIR/no-static.rs:22:12
    |
 LL |     let b: Box<dyn Foo> = Box::new(Bar);
    |            ^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-no-static.rs:9:8
+  --> $DIR/no-static.rs:9:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -45,13 +45,13 @@ LL |     fn foo() where Self: Sized {}
    |              +++++++++++++++++
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-no-static.rs:22:27
+  --> $DIR/no-static.rs:22:27
    |
 LL |     let b: Box<dyn Foo> = Box::new(Bar);
    |                           ^^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-no-static.rs:9:8
+  --> $DIR/no-static.rs:9:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr b/tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr
index 52f6865b6f3..f2deb3b8d84 100644
--- a/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety-no-static.rs:22:27
+  --> $DIR/no-static.rs:22:27
    |
 LL |     let b: Box<dyn Foo> = Box::new(Bar);
    |                           ^^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-no-static.rs:9:8
+  --> $DIR/no-static.rs:9:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-no-static.rs b/tests/ui/dyn-compatibility/no-static.rs
index 4f4e03d734e..54af16fe18e 100644
--- a/tests/ui/object-safety/object-safety-no-static.rs
+++ b/tests/ui/dyn-compatibility/no-static.rs
@@ -1,9 +1,9 @@
 // Check that we correctly prevent users from making trait objects
 // from traits with static methods.
 //
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 trait Foo {
     fn foo() {}
diff --git a/tests/ui/object-safety/object-safety-phantom-fn.rs b/tests/ui/dyn-compatibility/phantom-fn.rs
index 1019c24859f..9e410da82ee 100644
--- a/tests/ui/object-safety/object-safety-phantom-fn.rs
+++ b/tests/ui/dyn-compatibility/phantom-fn.rs
@@ -1,4 +1,4 @@
-// Check that `Self` appearing in a phantom fn does not make a trait not object safe.
+// Check that `Self` appearing in a phantom fn does not make a trait dyn-incompatible.
 
 //@ build-pass (FIXME(62277): could be check-pass?)
 #![allow(dead_code)]
diff --git a/tests/ui/object-safety/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs b/tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs
index dabaa309c16..dabaa309c16 100644
--- a/tests/ui/object-safety/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs
+++ b/tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.rs
diff --git a/tests/ui/object-safety/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr b/tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr
index 8bdfea7766e..8bdfea7766e 100644
--- a/tests/ui/object-safety/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr
+++ b/tests/ui/dyn-compatibility/reference-to-bare-trait-in-fn-inputs-and-outputs-issue-125139.stderr
diff --git a/tests/ui/object-safety/object-safety-sized-2.curr.stderr b/tests/ui/dyn-compatibility/sized-2.curr.stderr
index 4ce7ac5704e..1017fde53d3 100644
--- a/tests/ui/object-safety/object-safety-sized-2.curr.stderr
+++ b/tests/ui/dyn-compatibility/sized-2.curr.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-sized-2.rs:14:31
+  --> $DIR/sized-2.rs:14:31
    |
 LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
    |                               ^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-sized-2.rs:9:18
+  --> $DIR/sized-2.rs:9:18
    |
 LL | trait Bar
    |       --- this trait cannot be made into an object...
@@ -13,13 +13,13 @@ LL |     where Self : Sized
    |                  ^^^^^ ...because it requires `Self: Sized`
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-sized-2.rs:16:5
+  --> $DIR/sized-2.rs:16:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-sized-2.rs:9:18
+  --> $DIR/sized-2.rs:9:18
    |
 LL | trait Bar
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr b/tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr
index 99066c104b7..534cf0f1b03 100644
--- a/tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-sized-2.rs:16:5
+  --> $DIR/sized-2.rs:16:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-sized-2.rs:9:18
+  --> $DIR/sized-2.rs:9:18
    |
 LL | trait Bar
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/object-safety/object-safety-sized-2.rs b/tests/ui/dyn-compatibility/sized-2.rs
index cfb5d588d70..f5edd287f24 100644
--- a/tests/ui/object-safety/object-safety-sized-2.rs
+++ b/tests/ui/dyn-compatibility/sized-2.rs
@@ -1,9 +1,9 @@
 // Check that we correctly prevent users from making trait objects
 // from traits where `Self : Sized`.
 //
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 trait Bar
     where Self : Sized
diff --git a/tests/ui/object-safety/object-safety-sized.curr.stderr b/tests/ui/dyn-compatibility/sized.curr.stderr
index b61f968d902..613833aad12 100644
--- a/tests/ui/object-safety/object-safety-sized.curr.stderr
+++ b/tests/ui/dyn-compatibility/sized.curr.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-sized.rs:12:32
+  --> $DIR/sized.rs:12:32
    |
 LL | fn make_bar<T: Bar>(t: &T) -> &dyn Bar {
    |                                ^^^^^^^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-sized.rs:8:12
+  --> $DIR/sized.rs:8:12
    |
 LL | trait Bar: Sized {
    |       ---  ^^^^^ ...because it requires `Self: Sized`
@@ -13,13 +13,13 @@ LL | trait Bar: Sized {
    |       this trait cannot be made into an object...
 
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-sized.rs:14:5
+  --> $DIR/sized.rs:14:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-sized.rs:8:12
+  --> $DIR/sized.rs:8:12
    |
 LL | trait Bar: Sized {
    |       ---  ^^^^^ ...because it requires `Self: Sized`
diff --git a/tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr b/tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr
index 5ce713375a4..cf847bc1577 100644
--- a/tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Bar` cannot be made into an object
-  --> $DIR/object-safety-sized.rs:14:5
+  --> $DIR/sized.rs:14:5
    |
 LL |     t
    |     ^ `Bar` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-sized.rs:8:12
+  --> $DIR/sized.rs:8:12
    |
 LL | trait Bar: Sized {
    |       ---  ^^^^^ ...because it requires `Self: Sized`
diff --git a/tests/ui/object-safety/object-safety-sized.rs b/tests/ui/dyn-compatibility/sized.rs
index f4d6c945b33..4c4fe3f8f25 100644
--- a/tests/ui/object-safety/object-safety-sized.rs
+++ b/tests/ui/dyn-compatibility/sized.rs
@@ -1,9 +1,9 @@
 // Check that we correctly prevent users from making trait objects
 // from traits where `Self : Sized`.
 //
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 trait Bar: Sized {
     fn bar<T>(&self, t: T);
diff --git a/tests/ui/object-safety/object-safety-supertrait-mentions-GAT.rs b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs
index 14e00d2ef32..14e00d2ef32 100644
--- a/tests/ui/object-safety/object-safety-supertrait-mentions-GAT.rs
+++ b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.rs
diff --git a/tests/ui/object-safety/object-safety-supertrait-mentions-GAT.stderr b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr
index 4d44627e779..ac5a5b28d94 100644
--- a/tests/ui/object-safety/object-safety-supertrait-mentions-GAT.stderr
+++ b/tests/ui/dyn-compatibility/supertrait-mentions-GAT.stderr
@@ -1,14 +1,14 @@
 error[E0311]: the parameter type `Self` may not live long enough
    |
 note: ...that is required by this bound
-  --> $DIR/object-safety-supertrait-mentions-GAT.rs:6:15
+  --> $DIR/supertrait-mentions-GAT.rs:6:15
    |
 LL |         Self: 'a;
    |               ^^
    = help: consider adding an explicit lifetime bound `Self: 'a`...
 
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-safety-supertrait-mentions-GAT.rs:10:20
+  --> $DIR/supertrait-mentions-GAT.rs:10:20
    |
 LL | trait SuperTrait<T>: for<'a> GatTrait<Gat<'a> = T> {
    |       ---------- in this trait
@@ -21,13 +21,13 @@ LL |     fn c(&self) -> Self;
    |                    ~~~~
 
 error[E0038]: the trait `SuperTrait` cannot be made into an object
-  --> $DIR/object-safety-supertrait-mentions-GAT.rs:10:20
+  --> $DIR/supertrait-mentions-GAT.rs:10:20
    |
 LL |     fn c(&self) -> dyn SuperTrait<T>;
    |                    ^^^^^^^^^^^^^^^^^ `SuperTrait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-supertrait-mentions-GAT.rs:4:10
+  --> $DIR/supertrait-mentions-GAT.rs:4:10
    |
 LL |     type Gat<'a>
    |          ^^^ ...because it contains the generic associated type `Gat`
diff --git a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.rs b/tests/ui/dyn-compatibility/supertrait-mentions-Self.rs
index d96c7ba72a3..d96c7ba72a3 100644
--- a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.rs
+++ b/tests/ui/dyn-compatibility/supertrait-mentions-Self.rs
diff --git a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr b/tests/ui/dyn-compatibility/supertrait-mentions-Self.stderr
index b1a70fb859d..6474b115c46 100644
--- a/tests/ui/object-safety/object-safety-supertrait-mentions-Self.stderr
+++ b/tests/ui/dyn-compatibility/supertrait-mentions-Self.stderr
@@ -1,11 +1,11 @@
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
-  --> $DIR/object-safety-supertrait-mentions-Self.rs:8:13
+  --> $DIR/supertrait-mentions-Self.rs:8:13
    |
 LL | trait Baz : Bar<Self> {
    |             ^^^^^^^^^ doesn't have a size known at compile-time
    |
 note: required by an implicit `Sized` bound in `Bar`
-  --> $DIR/object-safety-supertrait-mentions-Self.rs:4:11
+  --> $DIR/supertrait-mentions-Self.rs:4:11
    |
 LL | trait Bar<T> {
    |           ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
@@ -19,13 +19,13 @@ LL | trait Bar<T: ?Sized> {
    |            ++++++++
 
 error[E0038]: the trait `Baz` cannot be made into an object
-  --> $DIR/object-safety-supertrait-mentions-Self.rs:16:31
+  --> $DIR/supertrait-mentions-Self.rs:16:31
    |
 LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
    |                               ^^^^^^^ `Baz` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety-supertrait-mentions-Self.rs:8:13
+  --> $DIR/supertrait-mentions-Self.rs:8:13
    |
 LL | trait Baz : Bar<Self> {
    |       ---   ^^^^^^^^^ ...because it uses `Self` as a type parameter
diff --git a/tests/ui/object-safety/issue-102762.rs b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs
index 576f73e08bc..5c71bd7769c 100644
--- a/tests/ui/object-safety/issue-102762.rs
+++ b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs
@@ -1,7 +1,8 @@
 //@ compile-flags: --crate-type=lib
 // This test checks that the `where_clauses_object_safety` lint does not cause
-// other object safety *hard errors* to be suppressed, because we currently
-// only emit one object safety error per trait...
+// other dyn-compatibility *hard errors* to be suppressed, because we currently
+// only emit one dyn-compatibility error per trait...
+// issue: rust-lang/rust#102762
 
 use std::future::Future;
 use std::pin::Pin;
diff --git a/tests/ui/object-safety/issue-102762.stderr b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr
index 05451eb8399..8d62ac9d923 100644
--- a/tests/ui/object-safety/issue-102762.stderr
+++ b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr
@@ -1,5 +1,5 @@
 error[E0038]: the trait `Fetcher` cannot be made into an object
-  --> $DIR/issue-102762.rs:18:21
+  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:19:21
    |
 LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
    |                      ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self`
@@ -8,7 +8,7 @@ LL | fn fetcher() -> Box<dyn Fetcher> {
    |                     ^^^^^^^^^^^ `Fetcher` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-102762.rs:10:22
+  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22
    |
 LL | pub trait Fetcher: Send + Sync {
    |           ------- this trait cannot be made into an object...
@@ -16,7 +16,7 @@ LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>>
    |                      ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on
 
 error[E0038]: the trait `Fetcher` cannot be made into an object
-  --> $DIR/issue-102762.rs:24:19
+  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:25:19
    |
 LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
    |                      ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self`
@@ -25,7 +25,7 @@ LL |     let fetcher = fetcher();
    |                   ^^^^^^^^^ `Fetcher` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-102762.rs:10:22
+  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22
    |
 LL | pub trait Fetcher: Send + Sync {
    |           ------- this trait cannot be made into an object...
@@ -33,7 +33,7 @@ LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>>
    |                      ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on
 
 error[E0038]: the trait `Fetcher` cannot be made into an object
-  --> $DIR/issue-102762.rs:26:13
+  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:27:13
    |
 LL |     fn get<'a>(self: &'a Box<Self>) -> Pin<Box<dyn Future<Output = Vec<u8>> + 'a>>
    |                      ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self`
@@ -42,7 +42,7 @@ LL |     let _ = fetcher.get();
    |             ^^^^^^^^^^^^^ `Fetcher` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/issue-102762.rs:10:22
+  --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22
    |
 LL | pub trait Fetcher: Send + Sync {
    |           ------- this trait cannot be made into an object...
diff --git a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs
index 23857cbaca8..3c9e903d4ba 100644
--- a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs
+++ b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs
@@ -1,4 +1,4 @@
-// Check that a self parameter type requires a DispatchFromDyn impl to be object safe
+// Check that a self parameter type requires a DispatchFromDyn impl to be dyn-compatible.
 
 #![feature(arbitrary_self_types, unsize, coerce_unsized)]
 
diff --git a/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.rs b/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.rs
new file mode 100644
index 00000000000..e38ab66dbe5
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.rs
@@ -0,0 +1,41 @@
+// Test that the use of the dyn-incompatible trait objects
+// are gated by the `dyn_compatible_for_dispatch` feature gate.
+
+trait DynIncompatible1: Sized {}
+
+trait DynIncompatible2 {
+    fn static_fn() {}
+}
+
+trait DynIncompatible3 {
+    fn foo<T>(&self);
+}
+
+trait DynIncompatible4 {
+    fn foo(&self, s: &Self);
+}
+
+fn takes_dyn_incompatible_ref<T>(obj: &dyn DynIncompatible1) {
+    //~^ ERROR E0038
+}
+
+fn return_dyn_incompatible_ref() -> &'static dyn DynIncompatible2 {
+    //~^ ERROR E0038
+    loop {}
+}
+
+fn takes_dyn_incompatible_box(obj: Box<dyn DynIncompatible3>) {
+    //~^ ERROR E0038
+}
+
+fn return_dyn_incompatible_rc() -> std::rc::Rc<dyn DynIncompatible4> {
+    //~^ ERROR E0038
+    loop {}
+}
+
+trait Trait {}
+
+impl Trait for dyn DynIncompatible1 {}
+//~^ ERROR E0038
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr b/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr
new file mode 100644
index 00000000000..ed021c154a5
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr
@@ -0,0 +1,83 @@
+error[E0038]: the trait `DynIncompatible1` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:18:40
+   |
+LL | fn takes_dyn_incompatible_ref<T>(obj: &dyn DynIncompatible1) {
+   |                                        ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible1` cannot be made into an object
+   |
+note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:4:25
+   |
+LL | trait DynIncompatible1: Sized {}
+   |       ----------------  ^^^^^ ...because it requires `Self: Sized`
+   |       |
+   |       this trait cannot be made into an object...
+
+error[E0038]: the trait `DynIncompatible2` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:22:46
+   |
+LL | fn return_dyn_incompatible_ref() -> &'static dyn DynIncompatible2 {
+   |                                              ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible2` cannot be made into an object
+   |
+note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:7:8
+   |
+LL | trait DynIncompatible2 {
+   |       ---------------- this trait cannot be made into an object...
+LL |     fn static_fn() {}
+   |        ^^^^^^^^^ ...because associated function `static_fn` has no `self` parameter
+help: consider turning `static_fn` into a method by giving it a `&self` argument
+   |
+LL |     fn static_fn(&self) {}
+   |                  +++++
+help: alternatively, consider constraining `static_fn` so it does not apply to trait objects
+   |
+LL |     fn static_fn() where Self: Sized {}
+   |                    +++++++++++++++++
+
+error[E0038]: the trait `DynIncompatible3` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:27:40
+   |
+LL | fn takes_dyn_incompatible_box(obj: Box<dyn DynIncompatible3>) {
+   |                                        ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible3` cannot be made into an object
+   |
+note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:11:8
+   |
+LL | trait DynIncompatible3 {
+   |       ---------------- this trait cannot be made into an object...
+LL |     fn foo<T>(&self);
+   |        ^^^ ...because method `foo` has generic type parameters
+   = help: consider moving `foo` to another trait
+
+error[E0038]: the trait `DynIncompatible4` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:31:48
+   |
+LL | fn return_dyn_incompatible_rc() -> std::rc::Rc<dyn DynIncompatible4> {
+   |                                                ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible4` cannot be made into an object
+   |
+note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:15:22
+   |
+LL | trait DynIncompatible4 {
+   |       ---------------- this trait cannot be made into an object...
+LL |     fn foo(&self, s: &Self);
+   |                      ^^^^^ ...because method `foo` references the `Self` type in this parameter
+   = help: consider moving `foo` to another trait
+
+error[E0038]: the trait `DynIncompatible1` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:38:16
+   |
+LL | impl Trait for dyn DynIncompatible1 {}
+   |                ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible1` cannot be made into an object
+   |
+note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:4:25
+   |
+LL | trait DynIncompatible1: Sized {}
+   |       ----------------  ^^^^^ ...because it requires `Self: Sized`
+   |       |
+   |       this trait cannot be made into an object...
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.rs b/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.rs
deleted file mode 100644
index 37348e476d4..00000000000
--- a/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-// Test that the use of the non object-safe trait objects
-// are gated by `object_safe_for_dispatch` feature gate.
-
-trait NonObjectSafe1: Sized {}
-
-trait NonObjectSafe2 {
-    fn static_fn() {}
-}
-
-trait NonObjectSafe3 {
-    fn foo<T>(&self);
-}
-
-trait NonObjectSafe4 {
-    fn foo(&self, s: &Self);
-}
-
-fn takes_non_object_safe_ref<T>(obj: &dyn NonObjectSafe1) {
-    //~^ ERROR E0038
-}
-
-fn return_non_object_safe_ref() -> &'static dyn NonObjectSafe2 {
-    //~^ ERROR E0038
-    loop {}
-}
-
-fn takes_non_object_safe_box(obj: Box<dyn NonObjectSafe3>) {
-    //~^ ERROR E0038
-}
-
-fn return_non_object_safe_rc() -> std::rc::Rc<dyn NonObjectSafe4> {
-    //~^ ERROR E0038
-    loop {}
-}
-
-trait Trait {}
-
-impl Trait for dyn NonObjectSafe1 {}
-//~^ ERROR E0038
-
-fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr b/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr
deleted file mode 100644
index fd5ed9c40f7..00000000000
--- a/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr
+++ /dev/null
@@ -1,83 +0,0 @@
-error[E0038]: the trait `NonObjectSafe1` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:18:39
-   |
-LL | fn takes_non_object_safe_ref<T>(obj: &dyn NonObjectSafe1) {
-   |                                       ^^^^^^^^^^^^^^^^^^ `NonObjectSafe1` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:4:23
-   |
-LL | trait NonObjectSafe1: Sized {}
-   |       --------------  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait cannot be made into an object...
-
-error[E0038]: the trait `NonObjectSafe2` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:22:45
-   |
-LL | fn return_non_object_safe_ref() -> &'static dyn NonObjectSafe2 {
-   |                                             ^^^^^^^^^^^^^^^^^^ `NonObjectSafe2` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:7:8
-   |
-LL | trait NonObjectSafe2 {
-   |       -------------- this trait cannot be made into an object...
-LL |     fn static_fn() {}
-   |        ^^^^^^^^^ ...because associated function `static_fn` has no `self` parameter
-help: consider turning `static_fn` into a method by giving it a `&self` argument
-   |
-LL |     fn static_fn(&self) {}
-   |                  +++++
-help: alternatively, consider constraining `static_fn` so it does not apply to trait objects
-   |
-LL |     fn static_fn() where Self: Sized {}
-   |                    +++++++++++++++++
-
-error[E0038]: the trait `NonObjectSafe3` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:27:39
-   |
-LL | fn takes_non_object_safe_box(obj: Box<dyn NonObjectSafe3>) {
-   |                                       ^^^^^^^^^^^^^^^^^^ `NonObjectSafe3` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:11:8
-   |
-LL | trait NonObjectSafe3 {
-   |       -------------- this trait cannot be made into an object...
-LL |     fn foo<T>(&self);
-   |        ^^^ ...because method `foo` has generic type parameters
-   = help: consider moving `foo` to another trait
-
-error[E0038]: the trait `NonObjectSafe4` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:31:47
-   |
-LL | fn return_non_object_safe_rc() -> std::rc::Rc<dyn NonObjectSafe4> {
-   |                                               ^^^^^^^^^^^^^^^^^^ `NonObjectSafe4` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:15:22
-   |
-LL | trait NonObjectSafe4 {
-   |       -------------- this trait cannot be made into an object...
-LL |     fn foo(&self, s: &Self);
-   |                      ^^^^^ ...because method `foo` references the `Self` type in this parameter
-   = help: consider moving `foo` to another trait
-
-error[E0038]: the trait `NonObjectSafe1` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:38:16
-   |
-LL | impl Trait for dyn NonObjectSafe1 {}
-   |                ^^^^^^^^^^^^^^^^^^ `NonObjectSafe1` cannot be made into an object
-   |
-note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:4:23
-   |
-LL | trait NonObjectSafe1: Sized {}
-   |       --------------  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait cannot be made into an object...
-
-error: aborting due to 5 previous errors
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.rs b/tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.rs
new file mode 100644
index 00000000000..308b41dfc68
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.rs
@@ -0,0 +1,6 @@
+trait Foo {
+    fn test() -> impl Sized + use<Self>;
+    //~^ ERROR `use<...>` precise capturing syntax is currently not allowed in return-position
+}
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.stderr b/tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.stderr
new file mode 100644
index 00000000000..b2c6bf61124
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-precise_capturing_in_traits.stderr
@@ -0,0 +1,13 @@
+error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
+  --> $DIR/feature-gate-precise_capturing_in_traits.rs:2:31
+   |
+LL |     fn test() -> impl Sized + use<Self>;
+   |                               ^^^^^^^^^
+   |
+   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
+   = note: see issue #130044 <https://github.com/rust-lang/rust/issues/130044> for more information
+   = help: add `#![feature(precise_capturing_in_traits)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/generic-associated-types/trait-objects.rs b/tests/ui/generic-associated-types/trait-objects.rs
index 277ffcc1f0d..743a3df0acc 100644
--- a/tests/ui/generic-associated-types/trait-objects.rs
+++ b/tests/ui/generic-associated-types/trait-objects.rs
@@ -6,7 +6,7 @@
 trait StreamingIterator {
     type Item<'a> where Self: 'a;
     fn size_hint(&self) -> (usize, Option<usize>);
-    // Uncommenting makes `StreamingIterator` not object safe
+    // Uncommenting makes `StreamingIterator` dyn-incompatible.
 //    fn next(&mut self) -> Self::Item<'_>;
 }
 
diff --git a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.rs b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.rs
index 068f7d3eea6..76dbb05f53d 100644
--- a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.rs
+++ b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.rs
@@ -1,24 +1,25 @@
 #![allow(bare_trait_objects)]
-trait NotObjectSafe {
+
+trait DynIncompatible {
     fn foo() -> Self;
 }
 
 struct A;
 struct B;
 
-impl NotObjectSafe for A {
+impl DynIncompatible for A {
     fn foo() -> Self {
         A
     }
 }
 
-impl NotObjectSafe for B {
+impl DynIncompatible for B {
     fn foo() -> Self {
         B
     }
 }
 
-fn car() -> dyn NotObjectSafe { //~ ERROR the trait `NotObjectSafe` cannot be made into an object
+fn car() -> dyn DynIncompatible { //~ ERROR the trait `DynIncompatible` cannot be made into an object
 //~^ ERROR return type cannot have an unboxed trait object
     if true {
         return A;
@@ -26,7 +27,7 @@ fn car() -> dyn NotObjectSafe { //~ ERROR the trait `NotObjectSafe` cannot be ma
     B
 }
 
-fn cat() -> Box<dyn NotObjectSafe> { //~ ERROR the trait `NotObjectSafe` cannot be made into an
+fn cat() -> Box<dyn DynIncompatible> { //~ ERROR the trait `DynIncompatible` cannot be made into an
     if true {
         return Box::new(A); //~ ERROR cannot be made into an object
     }
diff --git a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr
index 2a36824e292..576bd909cbc 100644
--- a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr
+++ b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-dyn-trait.stderr
@@ -1,17 +1,17 @@
-error[E0038]: the trait `NotObjectSafe` cannot be made into an object
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:21:13
+error[E0038]: the trait `DynIncompatible` cannot be made into an object
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:22:13
    |
-LL | fn car() -> dyn NotObjectSafe {
-   |             ^^^^^^^^^^^^^^^^^ `NotObjectSafe` cannot be made into an object
+LL | fn car() -> dyn DynIncompatible {
+   |             ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:3:8
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8
    |
-LL | trait NotObjectSafe {
-   |       ------------- this trait cannot be made into an object...
+LL | trait DynIncompatible {
+   |       --------------- this trait cannot be made into an object...
 LL |     fn foo() -> Self;
    |        ^^^ ...because associated function `foo` has no `self` parameter
-   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `NotObjectSafe` for this new enum and using it instead:
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `DynIncompatible` for this new enum and using it instead:
              A
              B
 help: consider turning `foo` into a method by giving it a `&self` argument
@@ -23,20 +23,20 @@ help: alternatively, consider constraining `foo` so it does not apply to trait o
 LL |     fn foo() -> Self where Self: Sized;
    |                      +++++++++++++++++
 
-error[E0038]: the trait `NotObjectSafe` cannot be made into an object
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:29:17
+error[E0038]: the trait `DynIncompatible` cannot be made into an object
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:30:17
    |
-LL | fn cat() -> Box<dyn NotObjectSafe> {
-   |                 ^^^^^^^^^^^^^^^^^ `NotObjectSafe` cannot be made into an object
+LL | fn cat() -> Box<dyn DynIncompatible> {
+   |                 ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:3:8
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8
    |
-LL | trait NotObjectSafe {
-   |       ------------- this trait cannot be made into an object...
+LL | trait DynIncompatible {
+   |       --------------- this trait cannot be made into an object...
 LL |     fn foo() -> Self;
    |        ^^^ ...because associated function `foo` has no `self` parameter
-   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `NotObjectSafe` for this new enum and using it instead:
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `DynIncompatible` for this new enum and using it instead:
              A
              B
 help: consider turning `foo` into a method by giving it a `&self` argument
@@ -49,15 +49,15 @@ LL |     fn foo() -> Self where Self: Sized;
    |                      +++++++++++++++++
 
 error[E0746]: return type cannot have an unboxed trait object
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:21:13
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:22:13
    |
-LL | fn car() -> dyn NotObjectSafe {
-   |             ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+LL | fn car() -> dyn DynIncompatible {
+   |             ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: if there were a single returned type, you could use `impl Trait` instead
 help: box the return type, and wrap all of the returned values in `Box::new`
    |
-LL ~ fn car() -> Box<dyn NotObjectSafe> {
+LL ~ fn car() -> Box<dyn DynIncompatible> {
 LL |
 LL |     if true {
 LL ~         return Box::new(A);
@@ -65,23 +65,23 @@ LL |     }
 LL ~     Box::new(B)
    |
 
-error[E0038]: the trait `NotObjectSafe` cannot be made into an object
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:31:16
+error[E0038]: the trait `DynIncompatible` cannot be made into an object
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:32:16
    |
 LL |         return Box::new(A);
-   |                ^^^^^^^^^^^ `NotObjectSafe` cannot be made into an object
+   |                ^^^^^^^^^^^ `DynIncompatible` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:3:8
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8
    |
-LL | trait NotObjectSafe {
-   |       ------------- this trait cannot be made into an object...
+LL | trait DynIncompatible {
+   |       --------------- this trait cannot be made into an object...
 LL |     fn foo() -> Self;
    |        ^^^ ...because associated function `foo` has no `self` parameter
-   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `NotObjectSafe` for this new enum and using it instead:
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `DynIncompatible` for this new enum and using it instead:
              A
              B
-   = note: required for the cast from `Box<A>` to `Box<(dyn NotObjectSafe + 'static)>`
+   = note: required for the cast from `Box<A>` to `Box<(dyn DynIncompatible + 'static)>`
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) -> Self;
@@ -91,23 +91,23 @@ help: alternatively, consider constraining `foo` so it does not apply to trait o
 LL |     fn foo() -> Self where Self: Sized;
    |                      +++++++++++++++++
 
-error[E0038]: the trait `NotObjectSafe` cannot be made into an object
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:33:5
+error[E0038]: the trait `DynIncompatible` cannot be made into an object
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:34:5
    |
 LL |     Box::new(B)
-   |     ^^^^^^^^^^^ `NotObjectSafe` cannot be made into an object
+   |     ^^^^^^^^^^^ `DynIncompatible` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:3:8
+  --> $DIR/dyn-incompatible-trait-in-return-position-dyn-trait.rs:4:8
    |
-LL | trait NotObjectSafe {
-   |       ------------- this trait cannot be made into an object...
+LL | trait DynIncompatible {
+   |       --------------- this trait cannot be made into an object...
 LL |     fn foo() -> Self;
    |        ^^^ ...because associated function `foo` has no `self` parameter
-   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `NotObjectSafe` for this new enum and using it instead:
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `DynIncompatible` for this new enum and using it instead:
              A
              B
-   = note: required for the cast from `Box<B>` to `Box<(dyn NotObjectSafe + 'static)>`
+   = note: required for the cast from `Box<B>` to `Box<(dyn DynIncompatible + 'static)>`
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) -> Self;
diff --git a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.rs b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-impl-trait.rs
index 503515013b9..25a901e4ff3 100644
--- a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.rs
+++ b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-impl-trait.rs
@@ -1,42 +1,42 @@
-trait NotObjectSafe {
+trait DynIncompatible {
     fn foo() -> Self;
 }
 
-trait ObjectSafe {
+trait DynCompatible {
     fn bar(&self);
 }
 
 struct A;
 struct B;
 
-impl NotObjectSafe for A {
+impl DynIncompatible for A {
     fn foo() -> Self {
         A
     }
 }
 
-impl NotObjectSafe for B {
+impl DynIncompatible for B {
     fn foo() -> Self {
         B
     }
 }
 
-impl ObjectSafe for A {
+impl DynCompatible for A {
     fn bar(&self) {}
 }
 
-impl ObjectSafe for B {
+impl DynCompatible for B {
     fn bar(&self) {}
 }
 
-fn can() -> impl NotObjectSafe {
+fn can() -> impl DynIncompatible {
     if true {
         return A;
     }
     B //~ ERROR mismatched types
 }
 
-fn cat() -> impl ObjectSafe {
+fn cat() -> impl DynCompatible {
     if true {
         return A;
     }
diff --git a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-impl-trait.stderr
index e5147bcea16..6a485881bfc 100644
--- a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr
+++ b/tests/ui/impl-trait/dyn-incompatible-trait-in-return-position-impl-trait.stderr
@@ -1,17 +1,17 @@
 error[E0308]: mismatched types
-  --> $DIR/object-unsafe-trait-in-return-position-impl-trait.rs:36:5
+  --> $DIR/dyn-incompatible-trait-in-return-position-impl-trait.rs:36:5
    |
-LL | fn can() -> impl NotObjectSafe {
-   |             ------------------ expected `A` because of return type
+LL | fn can() -> impl DynIncompatible {
+   |             -------------------- expected `A` because of return type
 ...
 LL |     B
    |     ^ expected `A`, found `B`
 
 error[E0308]: mismatched types
-  --> $DIR/object-unsafe-trait-in-return-position-impl-trait.rs:43:5
+  --> $DIR/dyn-incompatible-trait-in-return-position-impl-trait.rs:43:5
    |
-LL | fn cat() -> impl ObjectSafe {
-   |             --------------- expected `A` because of return type
+LL | fn cat() -> impl DynCompatible {
+   |             ------------------ expected `A` because of return type
 ...
 LL |     B
    |     ^ expected `A`, found `B`
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-dyn-compatibility-check.rs
index daf29a0005d..daf29a0005d 100644
--- 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-dyn-compatibility-check.rs
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-dyn-compatibility-check.stderr
index af624e2a758..a975b6204aa 100644
--- 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-dyn-compatibility-check.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
-  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:20:22
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:20:22
    |
 LL |         MyTrait::foo(&self)
    |         ------------ ^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
@@ -9,13 +9,13 @@ LL |         MyTrait::foo(&self)
    = 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
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:20:9
    |
 LL |         MyTrait::foo(&self)
    |         ^^^^^^^^^^^^ `MyTrait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:5:22
    |
 LL | trait MyTrait {
    |       ------- this trait cannot be made into an object...
@@ -25,7 +25,7 @@ LL |     fn foo(&self) -> impl Marker;
    = 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
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:20:9
    |
 LL |         MyTrait::foo(&self)
    |         ^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
@@ -33,13 +33,13 @@ LL |         MyTrait::foo(&self)
    = 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
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:16:6
    |
 LL | impl dyn MyTrait {
    |      ^^^^^^^^^^^ `MyTrait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:5:22
    |
 LL | trait MyTrait {
    |       ------- this trait cannot be made into an object...
@@ -49,13 +49,13 @@ LL |     fn foo(&self) -> impl Marker;
    = 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
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:18:15
    |
 LL |     fn other(&self) -> impl Marker {
    |               ^^^^ `MyTrait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
+  --> $DIR/cycle-effective-visibilities-during-dyn-compatibility-check.rs:5:22
    |
 LL | trait MyTrait {
    |       ------- this trait cannot be made into an object...
diff --git a/tests/ui/impl-trait/in-trait/object-safety-sized.rs b/tests/ui/impl-trait/in-trait/dyn-compatibility-sized.rs
index b5b7a6ed9bf..b5b7a6ed9bf 100644
--- a/tests/ui/impl-trait/in-trait/object-safety-sized.rs
+++ b/tests/ui/impl-trait/in-trait/dyn-compatibility-sized.rs
diff --git a/tests/ui/impl-trait/in-trait/object-safety.rs b/tests/ui/impl-trait/in-trait/dyn-compatibility.rs
index 5cca4ad839c..5cca4ad839c 100644
--- a/tests/ui/impl-trait/in-trait/object-safety.rs
+++ b/tests/ui/impl-trait/in-trait/dyn-compatibility.rs
diff --git a/tests/ui/impl-trait/in-trait/object-safety.stderr b/tests/ui/impl-trait/in-trait/dyn-compatibility.stderr
index e2f23bca621..115cb014b8c 100644
--- a/tests/ui/impl-trait/in-trait/object-safety.stderr
+++ b/tests/ui/impl-trait/in-trait/dyn-compatibility.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:14:33
+  --> $DIR/dyn-compatibility.rs:14:33
    |
 LL |     let i = Box::new(42_u32) as Box<dyn Foo>;
    |                                 ^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:4:22
+  --> $DIR/dyn-compatibility.rs:4:22
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -15,13 +15,13 @@ LL |     fn baz(&self) -> impl Debug;
    = help: only type `u32` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:17:15
+  --> $DIR/dyn-compatibility.rs:17:15
    |
 LL |     let s = i.baz();
    |               ^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:4:22
+  --> $DIR/dyn-compatibility.rs:4:22
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -31,13 +31,13 @@ LL |     fn baz(&self) -> impl Debug;
    = help: only type `u32` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:17:13
+  --> $DIR/dyn-compatibility.rs:17:13
    |
 LL |     let s = i.baz();
    |             ^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:4:22
+  --> $DIR/dyn-compatibility.rs:4:22
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -47,13 +47,13 @@ LL |     fn baz(&self) -> impl Debug;
    = help: only type `u32` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:14:13
+  --> $DIR/dyn-compatibility.rs:14:13
    |
 LL |     let i = Box::new(42_u32) as Box<dyn Foo>;
    |             ^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:4:22
+  --> $DIR/dyn-compatibility.rs:4:22
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/impl-trait/in-trait/variance.rs b/tests/ui/impl-trait/in-trait/variance.rs
index 0ac44bf7546..19905c608e3 100644
--- a/tests/ui/impl-trait/in-trait/variance.rs
+++ b/tests/ui/impl-trait/in-trait/variance.rs
@@ -1,22 +1,25 @@
-#![feature(rustc_attrs)]
+#![feature(rustc_attrs, precise_capturing_in_traits)]
 #![allow(internal_features)]
 #![rustc_variance_of_opaques]
 
-trait Captures<'a> {}
-impl<T> Captures<'_> for T {}
-
 trait Foo<'i> {
     fn implicit_capture_early<'a: 'a>() -> impl Sized {}
-    //~^ [Self: o, 'i: *, 'a: *, 'a: o, 'i: o]
+    //~^ [Self: o, 'i: o, 'a: *, 'a: o, 'i: o]
+
+    fn explicit_capture_early<'a: 'a>() -> impl Sized + use<'i, 'a, Self> {}
+    //~^ [Self: o, 'i: o, 'a: *, 'i: o, 'a: o]
 
-    fn explicit_capture_early<'a: 'a>() -> impl Sized + Captures<'a> {}
-    //~^ [Self: o, 'i: *, 'a: *, 'a: o, 'i: o]
+    fn not_captured_early<'a: 'a>() -> impl Sized + use<'i, Self> {}
+    //~^ [Self: o, 'i: o, 'a: *, 'i: o]
 
     fn implicit_capture_late<'a>(_: &'a ()) -> impl Sized {}
-    //~^ [Self: o, 'i: *, 'a: o, 'i: o]
+    //~^ [Self: o, 'i: o, 'a: o, 'i: o]
+
+    fn explicit_capture_late<'a>(_: &'a ()) -> impl Sized + use<'i, 'a, Self> {}
+    //~^ [Self: o, 'i: o, 'i: o, 'a: o]
 
-    fn explicit_capture_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {}
-    //~^ [Self: o, 'i: *, 'a: o, 'i: o]
+    fn not_cpatured_late<'a>(_: &'a ()) -> impl Sized + use<'i, Self> {}
+    //~^ [Self: o, 'i: o, 'i: o]
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/in-trait/variance.stderr b/tests/ui/impl-trait/in-trait/variance.stderr
index 54e0afbaa95..f65174e1c35 100644
--- a/tests/ui/impl-trait/in-trait/variance.stderr
+++ b/tests/ui/impl-trait/in-trait/variance.stderr
@@ -1,26 +1,38 @@
-error: [Self: o, 'i: *, 'a: *, 'a: o, 'i: o]
-  --> $DIR/variance.rs:9:44
+error: [Self: o, 'i: o, 'a: *, 'a: o, 'i: o]
+  --> $DIR/variance.rs:6:44
    |
 LL |     fn implicit_capture_early<'a: 'a>() -> impl Sized {}
    |                                            ^^^^^^^^^^
 
-error: [Self: o, 'i: *, 'a: *, 'a: o, 'i: o]
-  --> $DIR/variance.rs:12:44
+error: [Self: o, 'i: o, 'a: *, 'i: o, 'a: o]
+  --> $DIR/variance.rs:9:44
+   |
+LL |     fn explicit_capture_early<'a: 'a>() -> impl Sized + use<'i, 'a, Self> {}
+   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: [Self: o, 'i: o, 'a: *, 'i: o]
+  --> $DIR/variance.rs:12:40
    |
-LL |     fn explicit_capture_early<'a: 'a>() -> impl Sized + Captures<'a> {}
-   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     fn not_captured_early<'a: 'a>() -> impl Sized + use<'i, Self> {}
+   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: [Self: o, 'i: *, 'a: o, 'i: o]
+error: [Self: o, 'i: o, 'a: o, 'i: o]
   --> $DIR/variance.rs:15:48
    |
 LL |     fn implicit_capture_late<'a>(_: &'a ()) -> impl Sized {}
    |                                                ^^^^^^^^^^
 
-error: [Self: o, 'i: *, 'a: o, 'i: o]
+error: [Self: o, 'i: o, 'i: o, 'a: o]
   --> $DIR/variance.rs:18:48
    |
-LL |     fn explicit_capture_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {}
-   |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     fn explicit_capture_late<'a>(_: &'a ()) -> impl Sized + use<'i, 'a, Self> {}
+   |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: [Self: o, 'i: o, 'i: o]
+  --> $DIR/variance.rs:21:44
+   |
+LL |     fn not_cpatured_late<'a>(_: &'a ()) -> impl Sized + use<'i, Self> {}
+   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 4 previous errors
+error: aborting due to 6 previous errors
 
diff --git a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs
index 9d68819f657..6c2477c9744 100644
--- a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs
+++ b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs
@@ -1,10 +1,11 @@
+#![feature(precise_capturing_in_traits)]
+
 fn type_param<T>() -> impl Sized + use<> {}
 //~^ ERROR `impl Trait` must mention all type parameters in scope
 
 trait Foo {
     fn bar() -> impl Sized + use<>;
     //~^ ERROR `impl Trait` must mention the `Self` type of the trait
-    //~| ERROR `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr
index d9be9d543e4..93b44a0c18c 100644
--- a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr
+++ b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr
@@ -1,13 +1,5 @@
-error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
-  --> $DIR/forgot-to-capture-type.rs:5:30
-   |
-LL |     fn bar() -> impl Sized + use<>;
-   |                              ^^^^^
-   |
-   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
-
 error: `impl Trait` must mention all type parameters in scope in `use<...>`
-  --> $DIR/forgot-to-capture-type.rs:1:23
+  --> $DIR/forgot-to-capture-type.rs:3:23
    |
 LL | fn type_param<T>() -> impl Sized + use<> {}
    |               -       ^^^^^^^^^^^^^^^^^^
@@ -17,7 +9,7 @@ LL | fn type_param<T>() -> impl Sized + use<> {}
    = note: currently, all type parameters are required to be mentioned in the precise captures list
 
 error: `impl Trait` must mention the `Self` type of the trait in `use<...>`
-  --> $DIR/forgot-to-capture-type.rs:5:17
+  --> $DIR/forgot-to-capture-type.rs:7:17
    |
 LL | trait Foo {
    | --------- `Self` type parameter is implicitly captured by this `impl Trait`
@@ -26,5 +18,5 @@ LL |     fn bar() -> impl Sized + use<>;
    |
    = note: currently, all type parameters are required to be mentioned in the precise captures list
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/impl-trait/precise-capturing/redundant.normal.stderr b/tests/ui/impl-trait/precise-capturing/redundant.normal.stderr
deleted file mode 100644
index d1bcbaa33ae..00000000000
--- a/tests/ui/impl-trait/precise-capturing/redundant.normal.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant
-  --> $DIR/redundant.rs:5:19
-   |
-LL | fn hello<'a>() -> impl Sized + use<'a> {}
-   |                   ^^^^^^^^^^^^^-------
-   |                                |
-   |                                help: remove the `use<...>` syntax
-   |
-   = note: `#[warn(impl_trait_redundant_captures)]` on by default
-
-warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant
-  --> $DIR/redundant.rs:10:27
-   |
-LL |     fn inherent(&self) -> impl Sized + use<'_> {}
-   |                           ^^^^^^^^^^^^^-------
-   |                                        |
-   |                                        help: remove the `use<...>` syntax
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/impl-trait/precise-capturing/redundant.rpitit.stderr b/tests/ui/impl-trait/precise-capturing/redundant.rpitit.stderr
deleted file mode 100644
index 213888356e5..00000000000
--- a/tests/ui/impl-trait/precise-capturing/redundant.rpitit.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
-  --> $DIR/redundant.rs:16:35
-   |
-LL |     fn in_trait() -> impl Sized + use<'a, Self>;
-   |                                   ^^^^^^^^^^^^^
-   |
-   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
-
-error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
-  --> $DIR/redundant.rs:21:35
-   |
-LL |     fn in_trait() -> impl Sized + use<'a> {}
-   |                                   ^^^^^^^
-   |
-   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/impl-trait/precise-capturing/redundant.rs b/tests/ui/impl-trait/precise-capturing/redundant.rs
index 4a08ffb61be..e19d935f5b0 100644
--- a/tests/ui/impl-trait/precise-capturing/redundant.rs
+++ b/tests/ui/impl-trait/precise-capturing/redundant.rs
@@ -1,25 +1,24 @@
 //@ compile-flags: -Zunstable-options --edition=2024
-//@ revisions: normal rpitit
-//@[normal] check-pass
+//@ check-pass
+
+#![feature(precise_capturing_in_traits)]
 
 fn hello<'a>() -> impl Sized + use<'a> {}
-//[normal]~^ WARN all possible in-scope parameters are already captured
+//~^ WARN all possible in-scope parameters are already captured
 
 struct Inherent;
 impl Inherent {
     fn inherent(&self) -> impl Sized + use<'_> {}
-    //[normal]~^ WARN all possible in-scope parameters are already captured
+    //~^ WARN all possible in-scope parameters are already captured
 }
 
-#[cfg(rpitit)]
 trait Test<'a> {
     fn in_trait() -> impl Sized + use<'a, Self>;
-    //[rpitit]~^ ERROR `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
+    //~^ WARN all possible in-scope parameters are already captured
 }
-#[cfg(rpitit)]
 impl<'a> Test<'a> for () {
     fn in_trait() -> impl Sized + use<'a> {}
-    //[rpitit]~^ ERROR `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
+    //~^ WARN all possible in-scope parameters are already captured
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/redundant.stderr b/tests/ui/impl-trait/precise-capturing/redundant.stderr
new file mode 100644
index 00000000000..274d9d2375f
--- /dev/null
+++ b/tests/ui/impl-trait/precise-capturing/redundant.stderr
@@ -0,0 +1,36 @@
+warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant
+  --> $DIR/redundant.rs:6:19
+   |
+LL | fn hello<'a>() -> impl Sized + use<'a> {}
+   |                   ^^^^^^^^^^^^^-------
+   |                                |
+   |                                help: remove the `use<...>` syntax
+   |
+   = note: `#[warn(impl_trait_redundant_captures)]` on by default
+
+warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant
+  --> $DIR/redundant.rs:11:27
+   |
+LL |     fn inherent(&self) -> impl Sized + use<'_> {}
+   |                           ^^^^^^^^^^^^^-------
+   |                                        |
+   |                                        help: remove the `use<...>` syntax
+
+warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant
+  --> $DIR/redundant.rs:16:22
+   |
+LL |     fn in_trait() -> impl Sized + use<'a, Self>;
+   |                      ^^^^^^^^^^^^^-------------
+   |                                   |
+   |                                   help: remove the `use<...>` syntax
+
+warning: all possible in-scope parameters are already captured, so `use<...>` syntax is redundant
+  --> $DIR/redundant.rs:20:22
+   |
+LL |     fn in_trait() -> impl Sized + use<'a> {}
+   |                      ^^^^^^^^^^^^^-------
+   |                                   |
+   |                                   help: remove the `use<...>` syntax
+
+warning: 4 warnings emitted
+
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs b/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs
index 062351afecb..b39c1408c05 100644
--- a/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs
+++ b/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.rs
@@ -2,13 +2,14 @@
 // trait definition, which is not allowed. Due to the default lifetime capture
 // rules of RPITITs, this is only doable if we use precise capturing.
 
+#![feature(precise_capturing_in_traits)]
+
 pub trait Foo {
     fn bar<'tr: 'tr>(&'tr mut self) -> impl Sized + use<Self>;
-    //~^ ERROR `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
 }
 
 impl Foo for () {
-    fn bar<'im: 'im>(&'im mut self) -> impl Sized + 'im {}
+    fn bar<'im: 'im>(&'im mut self) -> impl Sized + use<'im> {}
     //~^ ERROR return type captures more lifetimes than trait definition
 }
 
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr b/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr
index b390a23eef4..45f755d3cc1 100644
--- a/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr
+++ b/tests/ui/impl-trait/precise-capturing/rpitit-captures-more-method-lifetimes.stderr
@@ -1,25 +1,17 @@
-error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
-  --> $DIR/rpitit-captures-more-method-lifetimes.rs:6:53
-   |
-LL |     fn bar<'tr: 'tr>(&'tr mut self) -> impl Sized + use<Self>;
-   |                                                     ^^^^^^^^^
-   |
-   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
-
 error: return type captures more lifetimes than trait definition
-  --> $DIR/rpitit-captures-more-method-lifetimes.rs:11:40
+  --> $DIR/rpitit-captures-more-method-lifetimes.rs:12:40
    |
-LL |     fn bar<'im: 'im>(&'im mut self) -> impl Sized + 'im {}
-   |            ---                         ^^^^^^^^^^^^^^^^
+LL |     fn bar<'im: 'im>(&'im mut self) -> impl Sized + use<'im> {}
+   |            ---                         ^^^^^^^^^^^^^^^^^^^^^
    |            |
    |            this lifetime was captured
    |
 note: hidden type must only reference lifetimes captured by this impl trait
-  --> $DIR/rpitit-captures-more-method-lifetimes.rs:6:40
+  --> $DIR/rpitit-captures-more-method-lifetimes.rs:8:40
    |
 LL |     fn bar<'tr: 'tr>(&'tr mut self) -> impl Sized + use<Self>;
    |                                        ^^^^^^^^^^^^^^^^^^^^^^
-   = note: hidden type inferred to be `impl Sized + 'im`
+   = note: hidden type inferred to be `impl Sized`
 
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.rs b/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.rs
new file mode 100644
index 00000000000..b16b0522d6e
--- /dev/null
+++ b/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.rs
@@ -0,0 +1,14 @@
+#![feature(precise_capturing_in_traits)]
+
+struct Invariant<'a>(&'a mut &'a mut ());
+
+trait Trait {
+    fn hello(self_: Invariant<'_>) -> impl Sized + use<Self>;
+}
+
+impl Trait for () {
+    fn hello(self_: Invariant<'_>) -> impl Sized + use<'_> {}
+    //~^ ERROR return type captures more lifetimes than trait definition
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr b/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr
new file mode 100644
index 00000000000..e1856b92910
--- /dev/null
+++ b/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.stderr
@@ -0,0 +1,17 @@
+error: return type captures more lifetimes than trait definition
+  --> $DIR/rpitit-impl-captures-too-much.rs:10:39
+   |
+LL |     fn hello(self_: Invariant<'_>) -> impl Sized + use<'_> {}
+   |                               --      ^^^^^^^^^^^^^^^^^^^^
+   |                               |
+   |                               this lifetime was captured
+   |
+note: hidden type must only reference lifetimes captured by this impl trait
+  --> $DIR/rpitit-impl-captures-too-much.rs:6:39
+   |
+LL |     fn hello(self_: Invariant<'_>) -> impl Sized + use<Self>;
+   |                                       ^^^^^^^^^^^^^^^^^^^^^^
+   = note: hidden type inferred to be `impl Sized`
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit.rs b/tests/ui/impl-trait/precise-capturing/rpitit.rs
index feeeb1461e8..3f887e8e47f 100644
--- a/tests/ui/impl-trait/precise-capturing/rpitit.rs
+++ b/tests/ui/impl-trait/precise-capturing/rpitit.rs
@@ -1,19 +1,34 @@
-//@ known-bug: unknown
-
 // RPITITs don't have variances in their GATs, so they always relate invariantly
 // and act as if they capture all their args.
 // To fix this soundly, we need to make sure that all the trait header args
 // remain captured, since they affect trait selection.
 
-trait Foo<'a> {
-    fn hello() -> impl PartialEq + use<Self>;
+#![feature(precise_capturing_in_traits)]
+
+fn eq_types<T>(_: T, _: T) {}
+
+trait TraitLt<'a: 'a> {
+    fn hello() -> impl Sized + use<Self>;
+    //~^ ERROR `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list
+}
+fn trait_lt<'a, 'b, T: for<'r> TraitLt<'r>> () {
+    eq_types(
+        //~^ ERROR lifetime may not live long enough
+        //~| ERROR lifetime may not live long enough
+        <T as TraitLt<'a>>::hello(),
+        <T as TraitLt<'b>>::hello(),
+    );
 }
 
-fn test<'a, 'b, T: for<'r> Foo<'r>>() {
-    PartialEq::eq(
-        &<T as Foo<'a>>::hello(),
-        &<T as Foo<'b>>::hello(),
+trait MethodLt {
+    fn hello<'a: 'a>() -> impl Sized + use<Self>;
+}
+fn method_lt<'a, 'b, T: MethodLt> () {
+    eq_types(
+        T::hello::<'a>(),
+        T::hello::<'b>(),
     );
+    // Good!
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/rpitit.stderr b/tests/ui/impl-trait/precise-capturing/rpitit.stderr
index 5a120df9f04..498eae54a1c 100644
--- a/tests/ui/impl-trait/precise-capturing/rpitit.stderr
+++ b/tests/ui/impl-trait/precise-capturing/rpitit.stderr
@@ -1,44 +1,40 @@
-error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
-  --> $DIR/rpitit.rs:9:36
-   |
-LL |     fn hello() -> impl PartialEq + use<Self>;
-   |                                    ^^^^^^^^^
-   |
-   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
-
 error: `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list
-  --> $DIR/rpitit.rs:9:19
+  --> $DIR/rpitit.rs:11:19
    |
-LL | trait Foo<'a> {
-   |           -- this lifetime parameter is captured
-LL |     fn hello() -> impl PartialEq + use<Self>;
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime captured due to being mentioned in the bounds of the `impl Trait`
+LL | trait TraitLt<'a: 'a> {
+   |               -- all lifetime parameters originating from a trait are captured implicitly
+LL |     fn hello() -> impl Sized + use<Self>;
+   |                   ^^^^^^^^^^^^^^^^^^^^^^
 
 error: lifetime may not live long enough
-  --> $DIR/rpitit.rs:13:5
+  --> $DIR/rpitit.rs:15:5
    |
-LL |   fn test<'a, 'b, T: for<'r> Foo<'r>>() {
-   |           --  -- lifetime `'b` defined here
-   |           |
-   |           lifetime `'a` defined here
-LL | /     PartialEq::eq(
-LL | |         &<T as Foo<'a>>::hello(),
-LL | |         &<T as Foo<'b>>::hello(),
+LL |   fn trait_lt<'a, 'b, T: for<'r> TraitLt<'r>> () {
+   |               --  -- lifetime `'b` defined here
+   |               |
+   |               lifetime `'a` defined here
+LL | /     eq_types(
+LL | |
+LL | |
+LL | |         <T as TraitLt<'a>>::hello(),
+LL | |         <T as TraitLt<'b>>::hello(),
 LL | |     );
    | |_____^ argument requires that `'a` must outlive `'b`
    |
    = help: consider adding the following bound: `'a: 'b`
 
 error: lifetime may not live long enough
-  --> $DIR/rpitit.rs:13:5
+  --> $DIR/rpitit.rs:15:5
    |
-LL |   fn test<'a, 'b, T: for<'r> Foo<'r>>() {
-   |           --  -- lifetime `'b` defined here
-   |           |
-   |           lifetime `'a` defined here
-LL | /     PartialEq::eq(
-LL | |         &<T as Foo<'a>>::hello(),
-LL | |         &<T as Foo<'b>>::hello(),
+LL |   fn trait_lt<'a, 'b, T: for<'r> TraitLt<'r>> () {
+   |               --  -- lifetime `'b` defined here
+   |               |
+   |               lifetime `'a` defined here
+LL | /     eq_types(
+LL | |
+LL | |
+LL | |         <T as TraitLt<'a>>::hello(),
+LL | |         <T as TraitLt<'b>>::hello(),
 LL | |     );
    | |_____^ argument requires that `'b` must outlive `'a`
    |
@@ -46,5 +42,5 @@ LL | |     );
 
 help: `'a` and `'b` must be the same: replace one with the other
 
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/impl-trait/precise-capturing/self-capture.rs b/tests/ui/impl-trait/precise-capturing/self-capture.rs
index a61a7f06edc..15985da50b5 100644
--- a/tests/ui/impl-trait/precise-capturing/self-capture.rs
+++ b/tests/ui/impl-trait/precise-capturing/self-capture.rs
@@ -1,6 +1,9 @@
+//@ check-pass
+
+#![feature(precise_capturing_in_traits)]
+
 trait Foo {
     fn bar<'a>() -> impl Sized + use<Self>;
-    //~^ ERROR `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
 }
 
 fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/self-capture.stderr b/tests/ui/impl-trait/precise-capturing/self-capture.stderr
deleted file mode 100644
index c1974600f30..00000000000
--- a/tests/ui/impl-trait/precise-capturing/self-capture.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
-  --> $DIR/self-capture.rs:2:34
-   |
-LL |     fn bar<'a>() -> impl Sized + use<Self>;
-   |                                  ^^^^^^^^^
-   |
-   = note: currently, return-position `impl Trait` in traits and trait implementations capture all lifetimes in scope
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/issues/issue-58734.rs b/tests/ui/issues/issue-58734.rs
index c838fde5d73..9b630666baf 100644
--- a/tests/ui/issues/issue-58734.rs
+++ b/tests/ui/issues/issue-58734.rs
@@ -1,22 +1,22 @@
 trait Trait {
     fn exists(self) -> ();
 
-    fn not_object_safe() -> Self;
+    fn dyn_incompatible() -> Self;
 }
 
 impl Trait for () {
     fn exists(self) -> () {
     }
 
-    fn not_object_safe() -> Self {
+    fn dyn_incompatible() -> Self {
         ()
     }
 }
 
 fn main() {
-    // object-safe or not, this call is OK
+    // dyn-compatible or not, this call is OK
     Trait::exists(());
-    // no object safety error
+    // no dyn-compatibility error
     Trait::nonexistent(());
     //~^ ERROR no function or associated item named `nonexistent` found
     //~| WARN trait objects without an explicit `dyn` are deprecated
diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr b/tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr
index b4424f4750e..b4424f4750e 100644
--- a/tests/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr
+++ b/tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr
diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.rs b/tests/ui/kindck/kindck-inherited-copy-bound.rs
index c785736f42e..dda95229ddf 100644
--- a/tests/ui/kindck/kindck-inherited-copy-bound.rs
+++ b/tests/ui/kindck/kindck-inherited-copy-bound.rs
@@ -1,8 +1,8 @@
 // Test that Copy bounds inherited by trait are checked.
 //
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 
 use std::any::Any;
@@ -19,7 +19,7 @@ fn take_param<T:Foo>(foo: &T) { }
 fn a() {
     let x: Box<_> = Box::new(3);
     take_param(&x); //[curr]~ ERROR E0277
-    //[object_safe_for_dispatch]~^ ERROR E0277
+    //[dyn_compatible_for_dispatch]~^ ERROR E0277
 }
 
 fn b() {
@@ -28,7 +28,7 @@ fn b() {
     let z = &x as &dyn Foo;
     //[curr]~^ ERROR E0038
     //[curr]~| ERROR E0038
-    //[object_safe_for_dispatch]~^^^ ERROR E0038
+    //[dyn_compatible_for_dispatch]~^^^ ERROR E0038
 }
 
 fn main() { }
diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/downcast-unsafe-trait-objects.rs
index d4337dcb165..b1b2dcf3eb9 100644
--- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/downcast-unsafe-trait-objects.rs
+++ b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/downcast-unsafe-trait-objects.rs
@@ -1,9 +1,9 @@
-// Check that we if we get ahold of an object unsafe trait
+// Check that we if we get ahold of a dyn-incompatible trait
 // object with auto traits and lifetimes, we can downcast it
 //
 //@ check-pass
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Trait: Sized {}
 
diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr
index 1489791b20d..1489791b20d 100644
--- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr
+++ b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr
diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr
index 1489791b20d..1489791b20d 100644
--- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr
+++ b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr
diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.rs
index a020d91fb14..425dc130d45 100644
--- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/manual-self-impl-for-unsafe-obj.rs
+++ b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.rs
@@ -1,11 +1,11 @@
-// Check that we can manually implement an object-unsafe trait for its trait object.
+// Check that we can manually implement a dyn-incompatible trait for its trait object.
 
 //@ revisions: current next
 //@ ignore-compare-mode-next-solver (explicit revisions)
 //@[next] compile-flags: -Znext-solver
 //@ run-pass
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Bad {
     fn stat() -> char {
diff --git a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/static-dispatch-unsafe-object.rs
index cbf76a6830b..c38928a9f44 100644
--- a/tests/ui/rfcs/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs
+++ b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/static-dispatch-unsafe-object.rs
@@ -3,7 +3,7 @@
 //
 //@ check-pass
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Statics {
     fn plain() {}
diff --git a/tests/ui/sanitizer/cfi/async-closures.rs b/tests/ui/sanitizer/cfi/async-closures.rs
index d94f2992d84..4eaa44cfa3f 100644
--- a/tests/ui/sanitizer/cfi/async-closures.rs
+++ b/tests/ui/sanitizer/cfi/async-closures.rs
@@ -21,7 +21,7 @@ use std::ops::AsyncFn;
 #[inline(never)]
 fn identity<T>(x: T) -> T { x }
 
-// We can't actually create a `dyn AsyncFn()`, because it's not object-safe, but we should check
+// We can't actually create a `dyn AsyncFn()`, because it's dyn-incompatible, but we should check
 // that we don't bug out when we encounter one.
 
 fn main() {
diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.curr.stderr b/tests/ui/self/arbitrary-self-types-dyn-incompatible.curr.stderr
index e2d73fc08f6..2eb7597d5c1 100644
--- a/tests/ui/self/arbitrary-self-types-not-object-safe.curr.stderr
+++ b/tests/ui/self/arbitrary-self-types-dyn-incompatible.curr.stderr
@@ -1,5 +1,5 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/arbitrary-self-types-not-object-safe.rs:33:32
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:33:32
    |
 LL |     fn foo(self: &Rc<Self>) -> usize;
    |                  --------- help: consider changing method `foo`'s `self` parameter to be `&self`: `&Self`
@@ -8,7 +8,7 @@ LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
    |                                ^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/arbitrary-self-types-not-object-safe.rs:8:18
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -17,7 +17,7 @@ LL |     fn foo(self: &Rc<Self>) -> usize;
    = help: only type `usize` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/arbitrary-self-types-not-object-safe.rs:33:13
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:33:13
    |
 LL |     fn foo(self: &Rc<Self>) -> usize;
    |                  --------- help: consider changing method `foo`'s `self` parameter to be `&self`: `&Self`
@@ -26,7 +26,7 @@ LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
    |             ^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/arbitrary-self-types-not-object-safe.rs:8:18
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr b/tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr
index fda07765c66..02af692c4a3 100644
--- a/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr
+++ b/tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr
@@ -1,5 +1,5 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/arbitrary-self-types-not-object-safe.rs:33:13
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:33:13
    |
 LL |     fn foo(self: &Rc<Self>) -> usize;
    |                  --------- help: consider changing method `foo`'s `self` parameter to be `&self`: `&Self`
@@ -8,7 +8,7 @@ LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
    |             ^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/arbitrary-self-types-not-object-safe.rs:8:18
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.rs b/tests/ui/self/arbitrary-self-types-dyn-incompatible.rs
index 0053eb5f739..940b2f1e8e2 100644
--- a/tests/ui/self/arbitrary-self-types-not-object-safe.rs
+++ b/tests/ui/self/arbitrary-self-types-dyn-incompatible.rs
@@ -1,6 +1,6 @@
-//@ revisions: curr object_safe_for_dispatch
+//@ revisions: curr dyn_compatible_for_dispatch
 
-#![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
+#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 use std::rc::Rc;
 
@@ -33,7 +33,7 @@ fn make_foo() {
     let x = Rc::new(5usize) as Rc<dyn Foo>;
     //[curr]~^ ERROR E0038
     //[curr]~| ERROR E0038
-    //[object_safe_for_dispatch]~^^^ ERROR E0038
+    //[dyn_compatible_for_dispatch]~^^^ ERROR E0038
 }
 
 fn make_bar() {
diff --git a/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs b/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs
index d7149002e7b..76d7754384e 100644
--- a/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs
+++ b/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs
@@ -50,9 +50,9 @@ impl<T: DispatchFromDyn<U>, U> DispatchFromDyn<Wrapper<U>> for Wrapper<T> {}
 
 
 trait Trait {
-    // This method isn't object-safe yet. Unsized by-value `self` is object-safe (but not callable
-    // without unsized_locals), but wrappers arond `Self` currently are not.
-    // FIXME (mikeyhew) uncomment this when unsized rvalues object-safety is implemented
+    // This method isn't dyn-compatible yet. Unsized by-value `self` is dyn-compatible (but not
+    // callable without unsized_locals), but wrappers arond `Self` currently are not.
+    // FIXME (mikeyhew) uncomment this when unsized rvalues dyn-compatibility is implemented
     // fn wrapper(self: Wrapper<Self>) -> i32;
     fn ptr_wrapper(self: Ptr<Wrapper<Self>>) -> i32;
     fn wrapper_ptr(self: Wrapper<Ptr<Self>>) -> i32;
diff --git a/tests/ui/self/object-safety-sized-self-by-value-self.rs b/tests/ui/self/dyn-compatibility-sized-self-by-value-self.rs
index d902812eb9a..658371c95e2 100644
--- a/tests/ui/self/object-safety-sized-self-by-value-self.rs
+++ b/tests/ui/self/dyn-compatibility-sized-self-by-value-self.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 #![allow(unused_mut)]
-// Check that a trait is still object-safe (and usable) if it has
+// Check that a trait is still dyn-compatible (and usable) if it has
 // methods with by-value self so long as they require `Self : Sized`.
 
 
diff --git a/tests/ui/self/object-safety-sized-self-generic-method.rs b/tests/ui/self/dyn-compatibility-sized-self-generic-method.rs
index 7a2ebd2cb79..a7b5013694f 100644
--- a/tests/ui/self/object-safety-sized-self-generic-method.rs
+++ b/tests/ui/self/dyn-compatibility-sized-self-generic-method.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 #![allow(unused_variables)]
-// Check that a trait is still object-safe (and usable) if it has
+// Check that a trait is still dyn-compatible (and usable) if it has
 // generic methods so long as they require `Self : Sized`.
 
 
diff --git a/tests/ui/self/object-safety-sized-self-return-Self.rs b/tests/ui/self/dyn-compatibility-sized-self-return-Self.rs
index 9fc3f856772..a15f4fd7813 100644
--- a/tests/ui/self/object-safety-sized-self-return-Self.rs
+++ b/tests/ui/self/dyn-compatibility-sized-self-return-Self.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-// Check that a trait is still object-safe (and usable) if it has
+// Check that a trait is still dyn-compatible (and usable) if it has
 // methods that return `Self` so long as they require `Self : Sized`.
 
 
diff --git a/tests/ui/specialization/issue-44861.rs b/tests/ui/specialization/issue-44861.rs
index 79d9b9490d0..9d6517e613a 100644
--- a/tests/ui/specialization/issue-44861.rs
+++ b/tests/ui/specialization/issue-44861.rs
@@ -12,9 +12,9 @@ pub trait Smartass {
     type Data2: CoerceUnsized<*const [u8]>;
 }
 
-pub trait MaybeObjectSafe {}
+pub trait MaybeDynCompatible {}
 
-impl MaybeObjectSafe for () {}
+impl MaybeDynCompatible for () {}
 
 impl<T> Smartass for T {
     type Data = <Self as Smartass>::Data2;
@@ -26,7 +26,7 @@ impl Smartass for () {
     type Data2 = *const [u8; 1];
 }
 
-impl Smartass for dyn MaybeObjectSafe {
+impl Smartass for dyn MaybeDynCompatible {
     type Data = *const [u8];
     type Data2 = *const [u8; 0];
 }
@@ -35,6 +35,6 @@ impl<U: Smartass+?Sized, T: Smartass+?Sized> CoerceUnsized<SmartassPtr<T>> for S
     where <U as Smartass>::Data: std::ops::CoerceUnsized<<T as Smartass>::Data>
 {}
 
-pub fn conv(s: SmartassPtr<()>) -> SmartassPtr<dyn MaybeObjectSafe> {
+pub fn conv(s: SmartassPtr<()>) -> SmartassPtr<dyn MaybeDynCompatible> {
     s
 }
diff --git a/tests/ui/suggestions/auxiliary/not-object-safe.rs b/tests/ui/suggestions/auxiliary/dyn-incompatible.rs
index 7c9829b823e..7c9829b823e 100644
--- a/tests/ui/suggestions/auxiliary/not-object-safe.rs
+++ b/tests/ui/suggestions/auxiliary/dyn-incompatible.rs
diff --git a/tests/ui/suggestions/object-unsafe-trait-references-self.rs b/tests/ui/suggestions/dyn-incompatible-trait-references-self.rs
index 4b3d5faba46..4b3d5faba46 100644
--- a/tests/ui/suggestions/object-unsafe-trait-references-self.rs
+++ b/tests/ui/suggestions/dyn-incompatible-trait-references-self.rs
diff --git a/tests/ui/suggestions/object-unsafe-trait-references-self.stderr b/tests/ui/suggestions/dyn-incompatible-trait-references-self.stderr
index c00bb3efbf6..242c44abd9d 100644
--- a/tests/ui/suggestions/object-unsafe-trait-references-self.stderr
+++ b/tests/ui/suggestions/dyn-incompatible-trait-references-self.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/object-unsafe-trait-references-self.rs:9:12
+  --> $DIR/dyn-incompatible-trait-references-self.rs:9:12
    |
 LL | fn bar(x: &dyn Trait) {}
    |            ^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-references-self.rs:2:22
+  --> $DIR/dyn-incompatible-trait-references-self.rs:2:22
    |
 LL | trait Trait {
    |       ----- this trait cannot be made into an object...
@@ -18,13 +18,13 @@ LL |     fn bat(&self) -> Self {}
    = help: consider moving `bat` to another trait
 
 error[E0038]: the trait `Other` cannot be made into an object
-  --> $DIR/object-unsafe-trait-references-self.rs:13:12
+  --> $DIR/dyn-incompatible-trait-references-self.rs:13:12
    |
 LL | fn foo(x: &dyn Other) {}
    |            ^^^^^^^^^ `Other` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-references-self.rs:11:14
+  --> $DIR/dyn-incompatible-trait-references-self.rs:11:14
    |
 LL | trait Other: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
@@ -32,7 +32,7 @@ LL | trait Other: Sized {}
    |       this trait cannot be made into an object...
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
-  --> $DIR/object-unsafe-trait-references-self.rs:2:22
+  --> $DIR/dyn-incompatible-trait-references-self.rs:2:22
    |
 LL |     fn baz(&self, _: Self) {}
    |                      ^^^^ doesn't have a size known at compile-time
@@ -48,7 +48,7 @@ LL |     fn baz(&self, _: &Self) {}
    |                      +
 
 error[E0308]: mismatched types
-  --> $DIR/object-unsafe-trait-references-self.rs:4:27
+  --> $DIR/dyn-incompatible-trait-references-self.rs:4:27
    |
 LL | trait Trait {
    | ----------- expected this type parameter
@@ -60,7 +60,7 @@ LL |     fn bat(&self) -> Self {}
                    found unit type `()`
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
-  --> $DIR/object-unsafe-trait-references-self.rs:4:22
+  --> $DIR/dyn-incompatible-trait-references-self.rs:4:22
    |
 LL |     fn bat(&self) -> Self {}
    |                      ^^^^ doesn't have a size known at compile-time
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs
index 37afab6b643..37afab6b643 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.rs
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.stderr
index a17f821ebec..53304382584 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021-without-dyn.stderr
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.stderr
@@ -1,5 +1,5 @@
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:4:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:4:13
    |
 LL | trait A: Sized {
    |       - in this trait
@@ -12,13 +12,13 @@ LL |     fn f(a: Self) -> Self;
    |             ~~~~     ~~~~
 
 error[E0038]: the trait `A` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:4:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:4:13
    |
 LL |     fn f(a: A) -> A;
    |             ^ `A` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:3:10
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:3:10
    |
 LL | trait A: Sized {
    |       -  ^^^^^ ...because it requires `Self: Sized`
@@ -26,7 +26,7 @@ LL | trait A: Sized {
    |       this trait cannot be made into an object...
 
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:11:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:11:13
    |
 LL | trait B {
    |       - in this trait
@@ -39,13 +39,13 @@ LL |     fn f(b: Self) -> Self;
    |             ~~~~     ~~~~
 
 error[E0038]: the trait `B` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:11:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:11:13
    |
 LL |     fn f(b: B) -> B;
    |             ^ `B` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:11:8
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:11:8
    |
 LL | trait B {
    |       - this trait cannot be made into an object...
@@ -61,7 +61,7 @@ LL |     fn f(b: B) -> B where Self: Sized;
    |                     +++++++++++++++++
 
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:18:20
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:18:20
    |
 LL | trait C {
    |       - in this trait
@@ -74,7 +74,7 @@ LL |     fn f(&self, c: Self) -> Self;
    |                    ~~~~     ~~~~
 
 error[E0038]: the trait `C` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:18:20
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:18:20
    |
 LL |     fn f(&self, c: C) -> C;
    |          -----     ^ `C` cannot be made into an object
@@ -82,7 +82,7 @@ LL |     fn f(&self, c: C) -> C;
    |          help: consider changing method `f`'s `self` parameter to be `&self` (notice the capitalization): `&Self`
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:18:10
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:18:10
    |
 LL | trait C {
    |       - this trait cannot be made into an object...
@@ -90,7 +90,7 @@ LL |     fn f(&self, c: C) -> C;
    |          ^^^^^ ...because method `f`'s `self` parameter cannot be dispatched on
 
 error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:4:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:4:13
    |
 LL |     fn f(a: A) -> A;
    |             ^
@@ -106,7 +106,7 @@ LL |     fn f(a: impl A) -> A;
    |             ++++
 
 error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:4:19
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:4:19
    |
 LL |     fn f(a: A) -> A;
    |                   ^
@@ -117,7 +117,7 @@ LL |     fn f(a: A) -> impl A;
    |                   ++++
 
 error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:11:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:11:13
    |
 LL |     fn f(b: B) -> B;
    |             ^
@@ -133,7 +133,7 @@ LL |     fn f(b: impl B) -> B;
    |             ++++
 
 error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:11:19
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:11:19
    |
 LL |     fn f(b: B) -> B;
    |                   ^
@@ -144,7 +144,7 @@ LL |     fn f(b: B) -> impl B;
    |                   ++++
 
 error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:18:20
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:18:20
    |
 LL |     fn f(&self, c: C) -> C;
    |                    ^
@@ -160,7 +160,7 @@ LL |     fn f(&self, c: impl C) -> C;
    |                    ++++
 
 error[E0782]: trait objects must include the `dyn` keyword
-  --> $DIR/object-unsafe-trait-should-use-self-2021-without-dyn.rs:18:26
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs:18:26
    |
 LL |     fn f(&self, c: C) -> C;
    |                          ^
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.rs
index 4ab10f40eb6..4ab10f40eb6 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.rs
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.rs
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr
index a7d36d9ebee..5e0d1a14452 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-self-2021.stderr
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021.stderr
@@ -1,5 +1,5 @@
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self-2021.rs:4:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:4:13
    |
 LL | trait A: Sized {
    |       - in this trait
@@ -12,13 +12,13 @@ LL |     fn f(a: Self) -> Self;
    |             ~~~~     ~~~~
 
 error[E0038]: the trait `A` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self-2021.rs:4:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:4:13
    |
 LL |     fn f(a: dyn A) -> dyn A;
    |             ^^^^^ `A` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self-2021.rs:3:10
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:3:10
    |
 LL | trait A: Sized {
    |       -  ^^^^^ ...because it requires `Self: Sized`
@@ -26,7 +26,7 @@ LL | trait A: Sized {
    |       this trait cannot be made into an object...
 
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self-2021.rs:9:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:9:13
    |
 LL | trait B {
    |       - in this trait
@@ -39,13 +39,13 @@ LL |     fn f(a: Self) -> Self;
    |             ~~~~     ~~~~
 
 error[E0038]: the trait `B` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self-2021.rs:9:13
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:9:13
    |
 LL |     fn f(a: dyn B) -> dyn B;
    |             ^^^^^ `B` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self-2021.rs:9:8
+  --> $DIR/dyn-incompatible-trait-should-use-self-2021.rs:9:8
    |
 LL | trait B {
    |       - this trait cannot be made into an object...
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self.rs b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.rs
index 75f99075eb1..75f99075eb1 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-self.rs
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.rs
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-self.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr
index 28952933c64..93f6ea2b12e 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-self.stderr
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self.stderr
@@ -1,5 +1,5 @@
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self.rs:3:13
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:3:13
    |
 LL | trait A: Sized {
    |       - in this trait
@@ -12,13 +12,13 @@ LL |     fn f(a: Self) -> Self;
    |             ~~~~     ~~~~
 
 error[E0038]: the trait `A` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self.rs:3:13
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:3:13
    |
 LL |     fn f(a: A) -> A;
    |             ^ `A` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self.rs:2:10
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:2:10
    |
 LL | trait A: Sized {
    |       -  ^^^^^ ...because it requires `Self: Sized`
@@ -26,7 +26,7 @@ LL | trait A: Sized {
    |       this trait cannot be made into an object...
 
 error: associated item referring to unboxed trait object for its own trait
-  --> $DIR/object-unsafe-trait-should-use-self.rs:8:13
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:8:13
    |
 LL | trait B {
    |       - in this trait
@@ -39,13 +39,13 @@ LL |     fn f(a: Self) -> Self;
    |             ~~~~     ~~~~
 
 error[E0038]: the trait `B` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-self.rs:8:13
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:8:13
    |
 LL |     fn f(a: B) -> B;
    |             ^ `B` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-self.rs:8:8
+  --> $DIR/dyn-incompatible-trait-should-use-self.rs:8:8
    |
 LL | trait B {
    |       - this trait cannot be made into an object...
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.fixed
index fd9b78934c7..fd9b78934c7 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.fixed
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.rs
index e4aa0d89239..e4aa0d89239 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.rs
diff --git a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.stderr b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr
index 5e3a0290d42..beafd7c2ab0 100644
--- a/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.stderr
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/object-unsafe-trait-should-use-where-sized.rs:9:12
+  --> $DIR/dyn-incompatible-trait-should-use-where-sized.rs:9:12
    |
 LL | fn bar(x: &dyn Trait) {}
    |            ^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-unsafe-trait-should-use-where-sized.rs:5:8
+  --> $DIR/dyn-incompatible-trait-should-use-where-sized.rs:5:8
    |
 LL | trait Trait {
    |       ----- this trait cannot be made into an object...
@@ -27,7 +27,7 @@ LL |     fn bar(self: &Self) {}
    |                  ~~~~~
 
 error[E0307]: invalid `self` parameter type: `()`
-  --> $DIR/object-unsafe-trait-should-use-where-sized.rs:6:18
+  --> $DIR/dyn-incompatible-trait-should-use-where-sized.rs:6:18
    |
 LL |     fn bar(self: ()) {}
    |                  ^^
diff --git a/tests/ui/suggestions/issue-104328.rs b/tests/ui/suggestions/issue-104328.rs
index c3707baf79f..2b0fbdb8d35 100644
--- a/tests/ui/suggestions/issue-104328.rs
+++ b/tests/ui/suggestions/issue-104328.rs
@@ -1,4 +1,4 @@
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Foo {
     fn f() {}
diff --git a/tests/ui/suggestions/issue-98500.rs b/tests/ui/suggestions/issue-98500.rs
index b6fd9e7c23f..289b16abf4b 100644
--- a/tests/ui/suggestions/issue-98500.rs
+++ b/tests/ui/suggestions/issue-98500.rs
@@ -1,9 +1,9 @@
-//@ aux-build:not-object-safe.rs
+//@ aux-build:dyn-incompatible.rs
 
-extern crate not_object_safe;
+extern crate dyn_incompatible;
 
 pub trait B where
-    Self: not_object_safe::A,
+    Self: dyn_incompatible::A,
 {
     fn f2(&self);
 }
diff --git a/tests/ui/suggestions/issue-98500.stderr b/tests/ui/suggestions/issue-98500.stderr
index c4b446763af..d7136ec1a64 100644
--- a/tests/ui/suggestions/issue-98500.stderr
+++ b/tests/ui/suggestions/issue-98500.stderr
@@ -5,7 +5,7 @@ LL | struct S(Box<dyn B>);
    |              ^^^^^ `B` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/auxiliary/not-object-safe.rs:4:8
+  --> $DIR/auxiliary/dyn-incompatible.rs:4:8
    |
 LL |     fn f();
    |        ^ ...because associated function `f` has no `self` parameter
diff --git a/tests/ui/target-feature/tied-features-no-implication-1.paca.stderr b/tests/ui/target-feature/tied-features-no-implication-1.paca.stderr
new file mode 100644
index 00000000000..bf211fbee2f
--- /dev/null
+++ b/tests/ui/target-feature/tied-features-no-implication-1.paca.stderr
@@ -0,0 +1,4 @@
+error: the target features paca, pacg must all be either enabled or disabled together
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/target-feature/tied-features-no-implication-1.pacg.stderr b/tests/ui/target-feature/tied-features-no-implication-1.pacg.stderr
new file mode 100644
index 00000000000..bf211fbee2f
--- /dev/null
+++ b/tests/ui/target-feature/tied-features-no-implication-1.pacg.stderr
@@ -0,0 +1,4 @@
+error: the target features paca, pacg must all be either enabled or disabled together
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/target-feature/tied-features-no-implication-1.rs b/tests/ui/target-feature/tied-features-no-implication-1.rs
new file mode 100644
index 00000000000..0473ca319b8
--- /dev/null
+++ b/tests/ui/target-feature/tied-features-no-implication-1.rs
@@ -0,0 +1,20 @@
+//@ revisions: paca pacg
+//@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
+//@ needs-llvm-components: aarch64
+//@[paca] compile-flags: -Ctarget-feature=+paca
+//@[paca] error-pattern: the target features paca, pacg must all be either enabled or disabled together
+//@[pacg] compile-flags: -Ctarget-feature=+pacg
+//@[paca] error-pattern: the target features paca, pacg must all be either enabled or disabled together
+#![feature(no_core, lang_items)]
+#![no_core]
+
+#[lang="sized"]
+trait Sized {}
+
+// In this test, demonstrate that +paca and +pacg both result in the tied feature error if there
+// isn't something causing an error.
+// See tied-features-no-implication.rs
+
+#[cfg(target_feature = "pacg")]
+pub unsafe fn foo() {
+}
diff --git a/tests/ui/target-feature/tied-features-no-implication.paca.stderr b/tests/ui/target-feature/tied-features-no-implication.paca.stderr
new file mode 100644
index 00000000000..bf211fbee2f
--- /dev/null
+++ b/tests/ui/target-feature/tied-features-no-implication.paca.stderr
@@ -0,0 +1,4 @@
+error: the target features paca, pacg must all be either enabled or disabled together
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/target-feature/tied-features-no-implication.pacg.stderr b/tests/ui/target-feature/tied-features-no-implication.pacg.stderr
new file mode 100644
index 00000000000..0e31dea24ea
--- /dev/null
+++ b/tests/ui/target-feature/tied-features-no-implication.pacg.stderr
@@ -0,0 +1,14 @@
+error[E0428]: the name `foo` is defined multiple times
+  --> $DIR/tied-features-no-implication.rs:28:1
+   |
+LL | fn foo() {}
+   | -------- previous definition of the value `foo` here
+...
+LL | pub unsafe fn foo() {
+   | ^^^^^^^^^^^^^^^^^^^ `foo` redefined here
+   |
+   = note: `foo` must be defined only once in the value namespace of this module
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0428`.
diff --git a/tests/ui/target-feature/tied-features-no-implication.rs b/tests/ui/target-feature/tied-features-no-implication.rs
new file mode 100644
index 00000000000..157b50bb0d3
--- /dev/null
+++ b/tests/ui/target-feature/tied-features-no-implication.rs
@@ -0,0 +1,29 @@
+//@ revisions: paca pacg
+//@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
+//@ needs-llvm-components: aarch64
+//@[paca] compile-flags: -Ctarget-feature=+paca
+//@[paca] error-pattern: the target features paca, pacg must all be either enabled or disabled together
+//@[pacg] compile-flags: -Ctarget-feature=+pacg
+//@[pacg] error-pattern: the name `foo` is defined multiple times
+#![feature(no_core, lang_items)]
+#![no_core]
+
+#[lang="sized"]
+trait Sized {}
+
+// Can't use `compile_error!` here without `core`/`std` but requiring these makes this test only
+// work if you have libcore built in the sysroot for `aarch64-unknown-linux-gnu`. Can't run this
+// test on any aarch64 platform because they all have different default available features - as
+// written, this test depends on `aarch64-unknown-linux-gnu` having -paca,-pacg by default.
+// Cause a multiple definition error instead.
+fn foo() {}
+
+// Enabling one of the tied features does not imply the other is enabled.
+//
+// With +paca, this multiple definition doesn't cause an error because +paca hasn't implied
+// +pacg. With +pacg, the multiple definition error is emitted (and the tied feature error would
+// be).
+
+#[cfg(target_feature = "pacg")]
+pub unsafe fn foo() {
+}
diff --git a/tests/ui/target-feature/tied-features.rs b/tests/ui/target-feature/tied-features.rs
index e36649d8eb1..c6cdf21a3e3 100644
--- a/tests/ui/target-feature/tied-features.rs
+++ b/tests/ui/target-feature/tied-features.rs
@@ -1,4 +1,3 @@
-//@ build-fail
 //@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
 //@ needs-llvm-components: aarch64
 #![feature(no_core, lang_items)]
@@ -7,7 +6,6 @@
 #[lang="sized"]
 trait Sized {}
 
-// FIXME: this should not need to be public.
 pub fn main() {
     #[target_feature(enable = "pacg")]
     //~^ ERROR must all be either enabled or disabled together
@@ -25,10 +23,15 @@ pub fn main() {
 //~^ ERROR must all be either enabled or disabled together
 unsafe fn foo() {}
 
-
 #[target_feature(enable = "paca,pacg")]
 unsafe fn bar() {}
 
 #[target_feature(enable = "paca")]
 #[target_feature(enable = "pacg")]
 unsafe fn baz() {}
+
+// Confirm that functions which do not end up collected for monomorphisation will still error.
+
+#[target_feature(enable = "paca")]
+//~^ ERROR must all be either enabled or disabled together
+unsafe fn unused() {}
diff --git a/tests/ui/target-feature/tied-features.stderr b/tests/ui/target-feature/tied-features.stderr
index 525c9084330..8d677735e84 100644
--- a/tests/ui/target-feature/tied-features.stderr
+++ b/tests/ui/target-feature/tied-features.stderr
@@ -1,5 +1,5 @@
 error: the target features paca, pacg must all be either enabled or disabled together
-  --> $DIR/tied-features.rs:12:5
+  --> $DIR/tied-features.rs:10:5
    |
 LL |     #[target_feature(enable = "pacg")]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -7,12 +7,20 @@ LL |     #[target_feature(enable = "pacg")]
    = help: add the missing features in a `target_feature` attribute
 
 error: the target features paca, pacg must all be either enabled or disabled together
-  --> $DIR/tied-features.rs:24:1
+  --> $DIR/tied-features.rs:22:1
    |
 LL | #[target_feature(enable = "paca")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add the missing features in a `target_feature` attribute
 
-error: aborting due to 2 previous errors
+error: the target features paca, pacg must all be either enabled or disabled together
+  --> $DIR/tied-features.rs:35:1
+   |
+LL | #[target_feature(enable = "paca")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add the missing features in a `target_feature` attribute
+
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/traits/alias/no-duplicates.rs b/tests/ui/traits/alias/no-duplicates.rs
index 88feb89170d..d0829ab4cec 100644
--- a/tests/ui/traits/alias/no-duplicates.rs
+++ b/tests/ui/traits/alias/no-duplicates.rs
@@ -1,4 +1,4 @@
-// The purpose of this test is to demonstrate that duplicating object safe traits
+// The purpose of this test is to demonstrate that duplicating dyn-compatible traits
 // that are not auto traits is rejected with trait aliases even though one could
 // reasonably accept this.
 
@@ -6,7 +6,7 @@
 
 use std::marker::Unpin;
 
-// Some arbitrary object-safe trait:
+// Some arbitrary dyn-compatible trait:
 trait Obj {}
 
 // Nest a few levels deep:
diff --git a/tests/ui/traits/alias/no-extra-traits.rs b/tests/ui/traits/alias/no-extra-traits.rs
index 4dad8c0f873..f3d35a8cd03 100644
--- a/tests/ui/traits/alias/no-extra-traits.rs
+++ b/tests/ui/traits/alias/no-extra-traits.rs
@@ -5,7 +5,7 @@
 
 use std::marker::Unpin;
 
-// Some arbitrary object-safe traits:
+// Some arbitrary dyn-compatible traits:
 trait ObjA {}
 trait ObjB {}
 
diff --git a/tests/ui/traits/alias/object-wf.rs b/tests/ui/traits/alias/object-wf.rs
index 3abffd22d14..a14cfea3bd7 100644
--- a/tests/ui/traits/alias/object-wf.rs
+++ b/tests/ui/traits/alias/object-wf.rs
@@ -20,7 +20,7 @@ fn _f0() {
     let _: Box<dyn Unpin + _1 + Send + Sync>;
 }
 
-// Include object safe traits:
+// Include dyn-compatible traits:
 
 fn _f1() {
     let _: Box<dyn Obj + _0>;
@@ -28,7 +28,7 @@ fn _f1() {
     let _: Box<dyn Obj + _1 + _0>;
 }
 
-// And when the object safe trait is in a trait alias:
+// And when the dyn-compatible trait is in a trait alias:
 
 trait _2 = Obj;
 
diff --git a/tests/ui/traits/next-solver/object-unsafety.rs b/tests/ui/traits/next-solver/dyn-incompatibility.rs
index a347984daf6..a347984daf6 100644
--- a/tests/ui/traits/next-solver/object-unsafety.rs
+++ b/tests/ui/traits/next-solver/dyn-incompatibility.rs
diff --git a/tests/ui/traits/next-solver/object-unsafety.stderr b/tests/ui/traits/next-solver/dyn-incompatibility.stderr
index 75d0ce24413..7f2c0646ef5 100644
--- a/tests/ui/traits/next-solver/object-unsafety.stderr
+++ b/tests/ui/traits/next-solver/dyn-incompatibility.stderr
@@ -1,12 +1,12 @@
 error[E0277]: the trait bound `T: Copy` is not satisfied in `dyn Setup<From = T>`
-  --> $DIR/object-unsafety.rs:12:12
+  --> $DIR/dyn-incompatibility.rs:12:12
    |
 LL |     copy::<dyn Setup<From=T>>(t)
    |            ^^^^^^^^^^^^^^^^^ within `dyn Setup<From = T>`, the trait `Copy` is not implemented for `T`, which is required by `dyn Setup<From = T>: Setup`
    |
    = note: required because it appears within the type `dyn Setup<From = T>`
 note: required by a bound in `copy`
-  --> $DIR/object-unsafety.rs:7:12
+  --> $DIR/dyn-incompatibility.rs:7:12
    |
 LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
    |            ^^^^^ required by this bound in `copy`
@@ -16,7 +16,7 @@ LL | pub fn copy_any<T: std::marker::Copy>(t: &T) -> T {
    |                  +++++++++++++++++++
 
 error[E0308]: mismatched types
-  --> $DIR/object-unsafety.rs:12:31
+  --> $DIR/dyn-incompatibility.rs:12:31
    |
 LL |     copy::<dyn Setup<From=T>>(t)
    |     ------------------------- ^ types differ
@@ -26,13 +26,13 @@ LL |     copy::<dyn Setup<From=T>>(t)
    = note: expected reference `&<dyn Setup<From = T> as Setup>::From`
               found reference `&T`
 note: function defined here
-  --> $DIR/object-unsafety.rs:7:4
+  --> $DIR/dyn-incompatibility.rs:7:4
    |
 LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
    |    ^^^^                    --------------
 
 error[E0277]: the trait bound `T: Copy` is not satisfied in `dyn Setup<From = T>`
-  --> $DIR/object-unsafety.rs:12:5
+  --> $DIR/dyn-incompatibility.rs:12:5
    |
 LL |     copy::<dyn Setup<From=T>>(t)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `dyn Setup<From = T>`, the trait `Copy` is not implemented for `T`, which is required by `dyn Setup<From = T>: Setup`
diff --git a/tests/ui/traits/non_lifetime_binders/supertrait-object-safety.rs b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.rs
index a635edb4485..a635edb4485 100644
--- a/tests/ui/traits/non_lifetime_binders/supertrait-object-safety.rs
+++ b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.rs
diff --git a/tests/ui/traits/non_lifetime_binders/supertrait-object-safety.stderr b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr
index 0854ea28150..dd2dca74f90 100644
--- a/tests/ui/traits/non_lifetime_binders/supertrait-object-safety.stderr
+++ b/tests/ui/traits/non_lifetime_binders/supertrait-dyn-compatibility.stderr
@@ -1,5 +1,5 @@
 warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/supertrait-object-safety.rs:1:12
+  --> $DIR/supertrait-dyn-compatibility.rs:1:12
    |
 LL | #![feature(non_lifetime_binders)]
    |            ^^^^^^^^^^^^^^^^^^^^
@@ -8,13 +8,13 @@ LL | #![feature(non_lifetime_binders)]
    = note: `#[warn(incomplete_features)]` on by default
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/supertrait-object-safety.rs:19:23
+  --> $DIR/supertrait-dyn-compatibility.rs:19:23
    |
 LL |     let x: &dyn Foo = &();
    |                       ^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/supertrait-object-safety.rs:4:12
+  --> $DIR/supertrait-dyn-compatibility.rs:4:12
    |
 LL | trait Foo: for<T> Bar<T> {}
    |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
@@ -24,13 +24,13 @@ LL | trait Foo: for<T> Bar<T> {}
    = note: required for the cast from `&()` to `&dyn Foo`
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/supertrait-object-safety.rs:19:12
+  --> $DIR/supertrait-dyn-compatibility.rs:19:12
    |
 LL |     let x: &dyn Foo = &();
    |            ^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/supertrait-object-safety.rs:4:12
+  --> $DIR/supertrait-dyn-compatibility.rs:4:12
    |
 LL | trait Foo: for<T> Bar<T> {}
    |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
@@ -39,13 +39,13 @@ LL | trait Foo: for<T> Bar<T> {}
    = help: only type `()` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/supertrait-object-safety.rs:22:5
+  --> $DIR/supertrait-dyn-compatibility.rs:22:5
    |
 LL |     needs_bar(x);
    |     ^^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/supertrait-object-safety.rs:4:12
+  --> $DIR/supertrait-dyn-compatibility.rs:4:12
    |
 LL | trait Foo: for<T> Bar<T> {}
    |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
diff --git a/tests/ui/traits/object/print_vtable_sizes.rs b/tests/ui/traits/object/print_vtable_sizes.rs
index 684458d079e..2b1745da5f3 100644
--- a/tests/ui/traits/object/print_vtable_sizes.rs
+++ b/tests/ui/traits/object/print_vtable_sizes.rs
@@ -7,7 +7,7 @@ trait A<T: help::V>: AsRef<[T::V]> + AsMut<[T::V]> {}
 trait B<T>: AsRef<T> + AsRef<T> + AsRef<T> + AsRef<T> {}
 
 trait C {
-    fn x() {} // not object safe, shouldn't be reported
+    fn x() {} // not dyn-compatible, shouldn't be reported
 }
 
 // This does not have any upcasting cost,
diff --git a/tests/ui/traits/object/safety.rs b/tests/ui/traits/object/safety.rs
index f43d332d696..f4abcf8542e 100644
--- a/tests/ui/traits/object/safety.rs
+++ b/tests/ui/traits/object/safety.rs
@@ -1,4 +1,4 @@
-// Check that static methods are not object-safe.
+// Check that static methods render the trait dyn-incompatible.
 
 trait Tr {
     fn foo();
diff --git a/tests/ui/traits/vtable/vtable-non-object-safe.rs b/tests/ui/traits/vtable/vtable-dyn-incompatible.rs
index f98af0f23b7..64a8138bdcf 100644
--- a/tests/ui/traits/vtable/vtable-non-object-safe.rs
+++ b/tests/ui/traits/vtable/vtable-dyn-incompatible.rs
@@ -1,7 +1,7 @@
 //@ build-fail
 #![feature(rustc_attrs)]
 
-// Ensure that non-object-safe methods in Iterator does not generate
+// Ensure that dyn-incompatible methods in Iterator does not generate
 // vtable entries.
 
 #[rustc_dump_vtable]
diff --git a/tests/ui/traits/vtable/vtable-non-object-safe.stderr b/tests/ui/traits/vtable/vtable-dyn-incompatible.stderr
index 53eef5d0b13..e442c3eac00 100644
--- a/tests/ui/traits/vtable/vtable-non-object-safe.stderr
+++ b/tests/ui/traits/vtable/vtable-dyn-incompatible.stderr
@@ -7,7 +7,7 @@ error: vtable entries for `<std::vec::IntoIter<u8> as A>`: [
            Method(<std::vec::IntoIter<u8> as Iterator>::advance_by),
            Method(<std::vec::IntoIter<u8> as Iterator>::nth),
        ]
-  --> $DIR/vtable-non-object-safe.rs:8:1
+  --> $DIR/vtable-dyn-incompatible.rs:8:1
    |
 LL | trait A: Iterator {}
    | ^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/traits/wf-object/no-duplicates.rs b/tests/ui/traits/wf-object/no-duplicates.rs
index 678ede58296..83544064ce2 100644
--- a/tests/ui/traits/wf-object/no-duplicates.rs
+++ b/tests/ui/traits/wf-object/no-duplicates.rs
@@ -1,7 +1,7 @@
-// The purpose of this test is to demonstrate that duplicating object safe traits
+// The purpose of this test is to demonstrate that duplicating dyn-compatible traits
 // that are not auto-traits is rejected even though one could reasonably accept this.
 
-// Some arbitrary object-safe trait:
+// Some arbitrary dyn-compatible trait:
 trait Obj {}
 
 // Demonstrate that recursive expansion of trait aliases doesn't affect stable behavior:
diff --git a/tests/ui/traits/wf-object/reverse-order.rs b/tests/ui/traits/wf-object/reverse-order.rs
index b8f2aae8966..99c727cc332 100644
--- a/tests/ui/traits/wf-object/reverse-order.rs
+++ b/tests/ui/traits/wf-object/reverse-order.rs
@@ -2,7 +2,7 @@
 
 // Ensure that `dyn $($AutoTrait)+ ObjSafe` is well-formed.
 
-// Some arbitrary object-safe trait:
+// Some arbitrary dyn-compatible trait:
 trait Obj {}
 
 type _0 = dyn Unpin;
diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility-rpass.rs
index 7ccea43d182..7ccea43d182 100644
--- a/tests/ui/unsized-locals/by-value-trait-object-safety-rpass.rs
+++ b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility-rpass.rs
diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility-with-default.rs
index 1f9b5f11fb5..1f9b5f11fb5 100644
--- a/tests/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs
+++ b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility-with-default.rs
diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety.rs b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility.rs
index d0ba6944a1e..d0ba6944a1e 100644
--- a/tests/ui/unsized-locals/by-value-trait-object-safety.rs
+++ b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility.rs
diff --git a/tests/ui/unsized-locals/by-value-trait-object-safety.stderr b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility.stderr
index 6a93464febb..223624cfca4 100644
--- a/tests/ui/unsized-locals/by-value-trait-object-safety.stderr
+++ b/tests/ui/unsized-locals/by-value-trait-dyn-compatibility.stderr
@@ -1,5 +1,5 @@
 warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/by-value-trait-object-safety.rs:1:12
+  --> $DIR/by-value-trait-dyn-compatibility.rs:1:12
    |
 LL | #![feature(unsized_locals)]
    |            ^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | #![feature(unsized_locals)]
    = note: `#[warn(incomplete_features)]` on by default
 
 error: the `foo` method cannot be invoked on a trait object
-  --> $DIR/by-value-trait-object-safety.rs:20:7
+  --> $DIR/by-value-trait-dyn-compatibility.rs:20:7
    |
 LL |         Self: Sized;
    |               ----- this has a `Sized` requirement
diff --git a/tests/ui/wf/wf-convert-unsafe-trait-obj-box.rs b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.rs
index ffdb49a3be5..26292a1d218 100644
--- a/tests/ui/wf/wf-convert-unsafe-trait-obj-box.rs
+++ b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.rs
@@ -1,7 +1,7 @@
 // Check that we do not allow casts or coercions
-// to object unsafe trait objects inside a Box
+// to dyn-incompatible trait objects inside a Box
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Trait: Sized {}
 
diff --git a/tests/ui/wf/wf-convert-unsafe-trait-obj-box.stderr b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr
index 2565e25a242..38426545bc8 100644
--- a/tests/ui/wf/wf-convert-unsafe-trait-obj-box.stderr
+++ b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-convert-unsafe-trait-obj-box.rs:16:33
+  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:16:33
    |
 LL |     let t_box: Box<dyn Trait> = Box::new(S);
    |                                 ^^^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-convert-unsafe-trait-obj-box.rs:6:14
+  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
@@ -15,13 +15,13 @@ LL | trait Trait: Sized {}
    = note: required for the cast from `Box<S>` to `Box<dyn Trait>`
 
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-convert-unsafe-trait-obj-box.rs:17:15
+  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:17:15
    |
 LL |     takes_box(Box::new(S));
    |               ^^^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-convert-unsafe-trait-obj-box.rs:6:14
+  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
@@ -31,13 +31,13 @@ LL | trait Trait: Sized {}
    = note: required for the cast from `Box<S>` to `Box<(dyn Trait + 'static)>`
 
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-convert-unsafe-trait-obj-box.rs:15:5
+  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:15:5
    |
 LL |     Box::new(S) as Box<dyn Trait>;
    |     ^^^^^^^^^^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-convert-unsafe-trait-obj-box.rs:6:14
+  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
diff --git a/tests/ui/wf/wf-convert-unsafe-trait-obj.rs b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.rs
index 143b854ed6b..ec4bb2897f9 100644
--- a/tests/ui/wf/wf-convert-unsafe-trait-obj.rs
+++ b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.rs
@@ -1,7 +1,7 @@
 // Check that we do not allow casts or coercions
-// to object unsafe trait objects by ref
+// to dyn-incompatible trait objects by ref
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Trait: Sized {}
 
diff --git a/tests/ui/wf/wf-convert-unsafe-trait-obj.stderr b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr
index 97f6bcd0428..94259aa5b0a 100644
--- a/tests/ui/wf/wf-convert-unsafe-trait-obj.stderr
+++ b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-convert-unsafe-trait-obj.rs:16:25
+  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:16:25
    |
 LL |     let t: &dyn Trait = &S;
    |                         ^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-convert-unsafe-trait-obj.rs:6:14
+  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
@@ -15,13 +15,13 @@ LL | trait Trait: Sized {}
    = note: required for the cast from `&S` to `&dyn Trait`
 
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-convert-unsafe-trait-obj.rs:17:17
+  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:17:17
    |
 LL |     takes_trait(&S);
    |                 ^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-convert-unsafe-trait-obj.rs:6:14
+  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
@@ -31,13 +31,13 @@ LL | trait Trait: Sized {}
    = note: required for the cast from `&S` to `&dyn Trait`
 
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-convert-unsafe-trait-obj.rs:15:5
+  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:15:5
    |
 LL |     &S as &dyn Trait;
    |     ^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-convert-unsafe-trait-obj.rs:6:14
+  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
diff --git a/tests/ui/wf/wf-unsafe-trait-obj-match.rs b/tests/ui/wf/wf-dyn-incompat-trait-obj-match.rs
index c8731a8ecaf..07e90538b85 100644
--- a/tests/ui/wf/wf-unsafe-trait-obj-match.rs
+++ b/tests/ui/wf/wf-dyn-incompat-trait-obj-match.rs
@@ -1,7 +1,7 @@
 // Check that we do not allow coercions to object
 // unsafe trait objects in match arms
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Trait: Sized {}
 
diff --git a/tests/ui/wf/wf-unsafe-trait-obj-match.stderr b/tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr
index edbdec6a5ef..d7366e12256 100644
--- a/tests/ui/wf/wf-unsafe-trait-obj-match.stderr
+++ b/tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr
@@ -1,5 +1,5 @@
 error[E0308]: `match` arms have incompatible types
-  --> $DIR/wf-unsafe-trait-obj-match.rs:23:17
+  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:23:17
    |
 LL | /     match opt() {
 LL | |         Some(()) => &S,
@@ -13,13 +13,13 @@ LL | |     }
               found reference `&R`
 
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-unsafe-trait-obj-match.rs:26:21
+  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:26:21
    |
 LL |         Some(()) => &S,
    |                     ^^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-unsafe-trait-obj-match.rs:6:14
+  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
@@ -31,7 +31,7 @@ LL | trait Trait: Sized {}
    = note: required for the cast from `&S` to `&dyn Trait`
 
 error[E0038]: the trait `Trait` cannot be made into an object
-  --> $DIR/wf-unsafe-trait-obj-match.rs:25:25
+  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:25:25
    |
 LL |       let t: &dyn Trait = match opt() {
    |  _________________________^
@@ -41,7 +41,7 @@ LL | |     };
    | |_____^ `Trait` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-unsafe-trait-obj-match.rs:6:14
+  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:6:14
    |
 LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
diff --git a/tests/ui/wf/wf-object-safe.rs b/tests/ui/wf/wf-dyn-incompatible.rs
index 42e6917551f..16e7ca1cbc6 100644
--- a/tests/ui/wf/wf-object-safe.rs
+++ b/tests/ui/wf/wf-dyn-incompatible.rs
@@ -1,4 +1,4 @@
-// Check that object-safe traits are not WF when used as object types.
+// Check that dyn-incompatible traits are not WF when used as trait object types.
 // Issue #21953.
 
 trait A {
diff --git a/tests/ui/wf/wf-object-safe.stderr b/tests/ui/wf/wf-dyn-incompatible.stderr
index 7c14f3d2f8b..cf016b63c74 100644
--- a/tests/ui/wf/wf-object-safe.stderr
+++ b/tests/ui/wf/wf-dyn-incompatible.stderr
@@ -1,11 +1,11 @@
 error[E0038]: the trait `A` cannot be made into an object
-  --> $DIR/wf-object-safe.rs:9:13
+  --> $DIR/wf-dyn-incompatible.rs:9:13
    |
 LL |     let _x: &dyn A;
    |             ^^^^^^ `A` cannot be made into an object
    |
 note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/wf-object-safe.rs:5:23
+  --> $DIR/wf-dyn-incompatible.rs:5:23
    |
 LL | trait A {
    |       - this trait cannot be made into an object...