about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-10-09 18:37:30 +0200
committerLeón Orell Valerian Liehr <me@fmease.dev>2024-10-10 00:57:59 +0200
commit2e7a52b22fe222316a48093547f6312252c20f0f (patch)
treec1aab442574ea993272f51283a925a48651f3540 /tests/ui
parent62b24ea7c53aec6f8176fed05d0acee926b76bdb (diff)
downloadrust-2e7a52b22fe222316a48093547f6312252c20f0f.tar.gz
rust-2e7a52b22fe222316a48093547f6312252c20f0f.zip
Rename feature object_safe_for_dispatch to dyn_compatible_for_dispatch
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/coherence/coherence-unsafe-trait-object-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.stderr (renamed from tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr)70
-rw-r--r--tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.rs41
-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/object-safety/object-safety-associated-consts.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr)0
-rw-r--r--tests/ui/object-safety/object-safety-associated-consts.rs4
-rw-r--r--tests/ui/object-safety/object-safety-generics.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-generics.object_safe_for_dispatch.stderr)0
-rw-r--r--tests/ui/object-safety/object-safety-generics.rs8
-rw-r--r--tests/ui/object-safety/object-safety-mentions-Self.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr)0
-rw-r--r--tests/ui/object-safety/object-safety-mentions-Self.rs4
-rw-r--r--tests/ui/object-safety/object-safety-no-static.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr)0
-rw-r--r--tests/ui/object-safety/object-safety-no-static.rs4
-rw-r--r--tests/ui/object-safety/object-safety-sized-2.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr)0
-rw-r--r--tests/ui/object-safety/object-safety-sized-2.rs4
-rw-r--r--tests/ui/object-safety/object-safety-sized.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr)0
-rw-r--r--tests/ui/object-safety/object-safety-sized.rs4
-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)2
-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)2
-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/self/arbitrary-self-types-not-object-safe.dyn_compatible_for_dispatch.stderr (renamed from tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr)0
-rw-r--r--tests/ui/self/arbitrary-self-types-not-object-safe.rs6
-rw-r--r--tests/ui/suggestions/issue-104328.rs2
-rw-r--r--tests/ui/wf/wf-convert-unsafe-trait-obj-box.rs2
-rw-r--r--tests/ui/wf/wf-convert-unsafe-trait-obj.rs2
-rw-r--r--tests/ui/wf/wf-unsafe-trait-obj-match.rs2
29 files changed, 105 insertions, 105 deletions
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/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..2dbba370a51
--- /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_non_object_safe_ref<T>(obj: &dyn DynIncompatible1) {
+    //~^ ERROR E0038
+}
+
+fn return_non_object_safe_ref() -> &'static dyn DynIncompatible2 {
+    //~^ ERROR E0038
+    loop {}
+}
+
+fn takes_non_object_safe_box(obj: Box<dyn DynIncompatible3>) {
+    //~^ ERROR E0038
+}
+
+fn return_non_object_safe_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-object_safe_for_dispatch.stderr b/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr
index fd5ed9c40f7..3cb73dfd52c 100644
--- a/tests/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr
+++ b/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr
@@ -1,28 +1,28 @@
-error[E0038]: the trait `NonObjectSafe1` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:18:39
+error[E0038]: the trait `DynIncompatible1` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:18:39
    |
-LL | fn takes_non_object_safe_ref<T>(obj: &dyn NonObjectSafe1) {
-   |                                       ^^^^^^^^^^^^^^^^^^ `NonObjectSafe1` cannot be made into an object
+LL | fn takes_non_object_safe_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-object_safe_for_dispatch.rs:4:23
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:4:25
    |
-LL | trait NonObjectSafe1: Sized {}
-   |       --------------  ^^^^^ ...because it requires `Self: Sized`
+LL | trait DynIncompatible1: 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
+error[E0038]: the trait `DynIncompatible2` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:22:45
    |
-LL | fn return_non_object_safe_ref() -> &'static dyn NonObjectSafe2 {
-   |                                             ^^^^^^^^^^^^^^^^^^ `NonObjectSafe2` cannot be made into an object
+LL | fn return_non_object_safe_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-object_safe_for_dispatch.rs:7:8
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:7:8
    |
-LL | trait NonObjectSafe2 {
-   |       -------------- this trait cannot be made into an object...
+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
@@ -34,47 +34,47 @@ help: alternatively, consider constraining `static_fn` so it does not apply to t
 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
+error[E0038]: the trait `DynIncompatible3` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:27:39
    |
-LL | fn takes_non_object_safe_box(obj: Box<dyn NonObjectSafe3>) {
-   |                                       ^^^^^^^^^^^^^^^^^^ `NonObjectSafe3` cannot be made into an object
+LL | fn takes_non_object_safe_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-object_safe_for_dispatch.rs:11:8
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:11:8
    |
-LL | trait NonObjectSafe3 {
-   |       -------------- this trait cannot be made into an object...
+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 `NonObjectSafe4` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:31:47
+error[E0038]: the trait `DynIncompatible4` cannot be made into an object
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:31:47
    |
-LL | fn return_non_object_safe_rc() -> std::rc::Rc<dyn NonObjectSafe4> {
-   |                                               ^^^^^^^^^^^^^^^^^^ `NonObjectSafe4` cannot be made into an object
+LL | fn return_non_object_safe_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-object_safe_for_dispatch.rs:15:22
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:15:22
    |
-LL | trait NonObjectSafe4 {
-   |       -------------- this trait cannot be made into an object...
+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 `NonObjectSafe1` cannot be made into an object
-  --> $DIR/feature-gate-object_safe_for_dispatch.rs:38:16
+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 NonObjectSafe1 {}
-   |                ^^^^^^^^^^^^^^^^^^ `NonObjectSafe1` cannot be made into an object
+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-object_safe_for_dispatch.rs:4:23
+  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:4:25
    |
-LL | trait NonObjectSafe1: Sized {}
-   |       --------------  ^^^^^ ...because it requires `Self: Sized`
+LL | trait DynIncompatible1: Sized {}
+   |       ----------------  ^^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait cannot be made into an object...
 
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/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/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr b/tests/ui/object-safety/object-safety-associated-consts.dyn_compatible_for_dispatch.stderr
index 5b98cc35505..5b98cc35505 100644
--- a/tests/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr
+++ b/tests/ui/object-safety/object-safety-associated-consts.dyn_compatible_for_dispatch.stderr
diff --git a/tests/ui/object-safety/object-safety-associated-consts.rs b/tests/ui/object-safety/object-safety-associated-consts.rs
index a090214bbb4..fc7b372b782 100644
--- a/tests/ui/object-safety/object-safety-associated-consts.rs
+++ b/tests/ui/object-safety/object-safety-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/object-safety-generics.object_safe_for_dispatch.stderr b/tests/ui/object-safety/object-safety-generics.dyn_compatible_for_dispatch.stderr
index 4686b994b33..4686b994b33 100644
--- a/tests/ui/object-safety/object-safety-generics.object_safe_for_dispatch.stderr
+++ b/tests/ui/object-safety/object-safety-generics.dyn_compatible_for_dispatch.stderr
diff --git a/tests/ui/object-safety/object-safety-generics.rs b/tests/ui/object-safety/object-safety-generics.rs
index f005a689ac4..b51555aa500 100644
--- a/tests/ui/object-safety/object-safety-generics.rs
+++ b/tests/ui/object-safety/object-safety-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/object-safety-mentions-Self.object_safe_for_dispatch.stderr b/tests/ui/object-safety/object-safety-mentions-Self.dyn_compatible_for_dispatch.stderr
index d0efb9c587e..d0efb9c587e 100644
--- a/tests/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr
+++ b/tests/ui/object-safety/object-safety-mentions-Self.dyn_compatible_for_dispatch.stderr
diff --git a/tests/ui/object-safety/object-safety-mentions-Self.rs b/tests/ui/object-safety/object-safety-mentions-Self.rs
index 1311faf97bc..84c229e252d 100644
--- a/tests/ui/object-safety/object-safety-mentions-Self.rs
+++ b/tests/ui/object-safety/object-safety-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/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr b/tests/ui/object-safety/object-safety-no-static.dyn_compatible_for_dispatch.stderr
index 52f6865b6f3..52f6865b6f3 100644
--- a/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr
+++ b/tests/ui/object-safety/object-safety-no-static.dyn_compatible_for_dispatch.stderr
diff --git a/tests/ui/object-safety/object-safety-no-static.rs b/tests/ui/object-safety/object-safety-no-static.rs
index 4f4e03d734e..54af16fe18e 100644
--- a/tests/ui/object-safety/object-safety-no-static.rs
+++ b/tests/ui/object-safety/object-safety-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-sized-2.object_safe_for_dispatch.stderr b/tests/ui/object-safety/object-safety-sized-2.dyn_compatible_for_dispatch.stderr
index 99066c104b7..99066c104b7 100644
--- a/tests/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr
+++ b/tests/ui/object-safety/object-safety-sized-2.dyn_compatible_for_dispatch.stderr
diff --git a/tests/ui/object-safety/object-safety-sized-2.rs b/tests/ui/object-safety/object-safety-sized-2.rs
index cfb5d588d70..f5edd287f24 100644
--- a/tests/ui/object-safety/object-safety-sized-2.rs
+++ b/tests/ui/object-safety/object-safety-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.object_safe_for_dispatch.stderr b/tests/ui/object-safety/object-safety-sized.dyn_compatible_for_dispatch.stderr
index 5ce713375a4..5ce713375a4 100644
--- a/tests/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr
+++ b/tests/ui/object-safety/object-safety-sized.dyn_compatible_for_dispatch.stderr
diff --git a/tests/ui/object-safety/object-safety-sized.rs b/tests/ui/object-safety/object-safety-sized.rs
index f4d6c945b33..4c4fe3f8f25 100644
--- a/tests/ui/object-safety/object-safety-sized.rs
+++ b/tests/ui/object-safety/object-safety-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/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..e9206789756 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
@@ -3,7 +3,7 @@
 //
 //@ 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..37e6f948ad1 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
@@ -5,7 +5,7 @@
 //@[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/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr b/tests/ui/self/arbitrary-self-types-not-object-safe.dyn_compatible_for_dispatch.stderr
index fda07765c66..fda07765c66 100644
--- a/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr
+++ b/tests/ui/self/arbitrary-self-types-not-object-safe.dyn_compatible_for_dispatch.stderr
diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.rs b/tests/ui/self/arbitrary-self-types-not-object-safe.rs
index 0053eb5f739..940b2f1e8e2 100644
--- a/tests/ui/self/arbitrary-self-types-not-object-safe.rs
+++ b/tests/ui/self/arbitrary-self-types-not-object-safe.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/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/wf/wf-convert-unsafe-trait-obj-box.rs b/tests/ui/wf/wf-convert-unsafe-trait-obj-box.rs
index ffdb49a3be5..e32b04c4715 100644
--- a/tests/ui/wf/wf-convert-unsafe-trait-obj-box.rs
+++ b/tests/ui/wf/wf-convert-unsafe-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
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Trait: Sized {}
 
diff --git a/tests/ui/wf/wf-convert-unsafe-trait-obj.rs b/tests/ui/wf/wf-convert-unsafe-trait-obj.rs
index 143b854ed6b..6f386352819 100644
--- a/tests/ui/wf/wf-convert-unsafe-trait-obj.rs
+++ b/tests/ui/wf/wf-convert-unsafe-trait-obj.rs
@@ -1,7 +1,7 @@
 // Check that we do not allow casts or coercions
 // to object unsafe trait objects by ref
 
-#![feature(object_safe_for_dispatch)]
+#![feature(dyn_compatible_for_dispatch)]
 
 trait Trait: Sized {}
 
diff --git a/tests/ui/wf/wf-unsafe-trait-obj-match.rs b/tests/ui/wf/wf-unsafe-trait-obj-match.rs
index c8731a8ecaf..07e90538b85 100644
--- a/tests/ui/wf/wf-unsafe-trait-obj-match.rs
+++ b/tests/ui/wf/wf-unsafe-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 {}