about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-04 02:37:13 +0000
committerMichael Goulet <michael@errs.io>2025-02-24 18:48:40 +0000
commitf3d31f77e4754d5547606d95db97fd6b2335a8ce (patch)
tree3e80529e1c79449fe992421259617915d9d48cc4 /tests/ui
parent617aad8c2e8783f6df8e5d1f8bb1e4bcdc70aa7b (diff)
downloadrust-f3d31f77e4754d5547606d95db97fd6b2335a8ce.tar.gz
rust-f3d31f77e4754d5547606d95db97fd6b2335a8ce.zip
Remove dyn_compatible_for_dispatch
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/coherence/coherence-unsafe-trait-object-impl.rs18
-rw-r--r--tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr22
-rw-r--r--tests/ui/const-generics/issues/cg-in-dyn-issue-128176.rs4
-rw-r--r--tests/ui/const-generics/issues/cg-in-dyn-issue-128176.stderr19
-rw-r--r--tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr20
-rw-r--r--tests/ui/dyn-compatibility/associated-consts.rs6
-rw-r--r--tests/ui/dyn-compatibility/associated-consts.stderr (renamed from tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr)27
-rw-r--r--tests/ui/dyn-compatibility/generics.rs15
-rw-r--r--tests/ui/dyn-compatibility/generics.stderr85
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self.curr.stderr16
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self.rs8
-rw-r--r--tests/ui/dyn-compatibility/mentions-Self.stderr69
-rw-r--r--tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr28
-rw-r--r--tests/ui/dyn-compatibility/no-static.rs8
-rw-r--r--tests/ui/dyn-compatibility/no-static.stderr76
-rw-r--r--tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr19
-rw-r--r--tests/ui/dyn-compatibility/sized-2.rs6
-rw-r--r--tests/ui/dyn-compatibility/sized-2.stderr (renamed from tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr)33
-rw-r--r--tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr19
-rw-r--r--tests/ui/dyn-compatibility/sized.rs6
-rw-r--r--tests/ui/dyn-compatibility/sized.stderr34
-rw-r--r--tests/ui/dyn-compatibility/taint-const-eval.dyn_compatible_for_dispatch.stderr27
-rw-r--r--tests/ui/dyn-compatibility/taint-const-eval.rs8
-rw-r--r--tests/ui/dyn-compatibility/taint-const-eval.stderr74
-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.stderr88
-rw-r--r--tests/ui/kindck/kindck-inherited-copy-bound.rs12
-rw-r--r--tests/ui/kindck/kindck-inherited-copy-bound.stderr (renamed from tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr)29
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/downcast-unsafe-trait-objects.rs23
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr15
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr15
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.rs69
-rw-r--r--tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/static-dispatch-unsafe-object.rs37
-rw-r--r--tests/ui/rust-2021/ice-return-unsized-can-impl-2.rs4
-rw-r--r--tests/ui/rust-2021/ice-return-unsized-can-impl-2.stderr4
-rw-r--r--tests/ui/rust-2021/ice-return-unsized-can-impl.rs1
-rw-r--r--tests/ui/rust-2021/ice-return-unsized-can-impl.stderr4
-rw-r--r--tests/ui/rust-2021/ice-unsized-fn-params-2.rs2
-rw-r--r--tests/ui/rust-2021/ice-unsized-fn-params.rs1
-rw-r--r--tests/ui/rust-2021/ice-unsized-fn-params.stderr8
-rw-r--r--tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr23
-rw-r--r--tests/ui/self/arbitrary-self-types-dyn-incompatible.rs9
-rw-r--r--tests/ui/self/arbitrary-self-types-dyn-incompatible.stderr42
-rw-r--r--tests/ui/suggestions/issue-104328.rs12
-rw-r--r--tests/ui/suggestions/issue-104328.stderr17
-rw-r--r--tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.rs18
-rw-r--r--tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr54
-rw-r--r--tests/ui/wf/wf-convert-dyn-incompat-trait-obj.rs18
-rw-r--r--tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr54
-rw-r--r--tests/ui/wf/wf-dyn-incompat-trait-obj-match.rs29
-rw-r--r--tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr60
51 files changed, 489 insertions, 847 deletions
diff --git a/tests/ui/coherence/coherence-unsafe-trait-object-impl.rs b/tests/ui/coherence/coherence-unsafe-trait-object-impl.rs
deleted file mode 100644
index 16baf0958a6..00000000000
--- a/tests/ui/coherence/coherence-unsafe-trait-object-impl.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Check that unsafe trait object do not implement themselves
-// automatically
-
-#![feature(dyn_compatible_for_dispatch)]
-
-trait Trait: Sized {
-    fn call(&self);
-}
-
-fn takes_t<S: Trait>(s: S) {
-    s.call();
-}
-
-fn takes_t_obj(t: &dyn Trait) {
-    takes_t(t); //~ ERROR E0277
-}
-
-fn main() {}
diff --git a/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr b/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr
deleted file mode 100644
index 4f898ec127b..00000000000
--- a/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-error[E0277]: the trait bound `&dyn Trait: Trait` is not satisfied
-  --> $DIR/coherence-unsafe-trait-object-impl.rs:15:13
-   |
-LL |     takes_t(t);
-   |     ------- ^ the trait `Trait` is not implemented for `&dyn Trait`
-   |     |
-   |     required by a bound introduced by this call
-   |
-help: this trait has no implementations, consider adding one
-  --> $DIR/coherence-unsafe-trait-object-impl.rs:6:1
-   |
-LL | trait Trait: Sized {
-   | ^^^^^^^^^^^^^^^^^^
-note: required by a bound in `takes_t`
-  --> $DIR/coherence-unsafe-trait-object-impl.rs:10:15
-   |
-LL | fn takes_t<S: Trait>(s: S) {
-   |               ^^^^^ required by this bound in `takes_t`
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.rs b/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.rs
index 5a67d34d6e5..dac5429f678 100644
--- a/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.rs
+++ b/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.rs
@@ -1,10 +1,7 @@
-//@ check-pass
-
 // Regression test for #128176. Previously we would call `type_of` on the `1` anon const
 // before the anon const had been lowered and had the `type_of` fed with a result.
 
 #![feature(generic_const_exprs)]
-#![feature(dyn_compatible_for_dispatch)]
 #![allow(incomplete_features)]
 
 trait X {
@@ -13,6 +10,7 @@ trait X {
 
 const _: () = {
     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
+    //~^ ERROR the trait `X` is not dyn compatible
 };
 
 fn main() {}
diff --git a/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.stderr b/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.stderr
new file mode 100644
index 00000000000..7d563e3b605
--- /dev/null
+++ b/tests/ui/const-generics/issues/cg-in-dyn-issue-128176.stderr
@@ -0,0 +1,19 @@
+error[E0038]: the trait `X` is not dyn compatible
+  --> $DIR/cg-in-dyn-issue-128176.rs:12:24
+   |
+LL |     fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
+   |                        ^^^^^^^^^^^^^^^^^^^^ `X` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/cg-in-dyn-issue-128176.rs:8:10
+   |
+LL | trait X {
+   |       - this trait is not dyn compatible...
+LL |     type Y<const N: i16>;
+   |          ^ ...because it contains the generic associated type `Y`
+   = help: consider moving `Y` to another trait
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr
deleted file mode 100644
index 704d833f00b..00000000000
--- a/tests/ui/dyn-compatibility/associated-consts.dyn_compatible_for_dispatch.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/associated-consts.rs:14:5
-   |
-LL |     t
-   |     ^ `Bar` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/associated-consts.rs:9:11
-   |
-LL | trait Bar {
-   |       --- this trait is not dyn compatible...
-LL |     const X: usize;
-   |           ^ ...because it contains this associated `const`
-   = help: consider moving `X` to another trait
-   = note: required for the cast from `&T` to `&dyn Bar`
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/associated-consts.rs b/tests/ui/dyn-compatibility/associated-consts.rs
index fc7b372b782..10d151d9a8b 100644
--- a/tests/ui/dyn-compatibility/associated-consts.rs
+++ b/tests/ui/dyn-compatibility/associated-consts.rs
@@ -1,16 +1,12 @@
 // Check that we correctly prevent users from making trait objects
 // from traits with associated consts.
-//
-//@ revisions: curr dyn_compatible_for_dispatch
-
-#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 trait Bar {
     const X: usize;
 }
 
 fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
-    //[curr]~^ ERROR E0038
+    //~^ ERROR E0038
     t
     //~^ ERROR E0038
 }
diff --git a/tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/associated-consts.stderr
index b3565a766fe..beaf263af07 100644
--- a/tests/ui/dyn-compatibility/generics.dyn_compatible_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/associated-consts.stderr
@@ -1,35 +1,34 @@
 error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/generics.rs:20:5
+  --> $DIR/associated-consts.rs:8:31
    |
-LL |     t
-   |     ^ `Bar` is not dyn compatible
+LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
+   |                               ^^^^^^^ `Bar` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/generics.rs:10:8
+  --> $DIR/associated-consts.rs:5:11
    |
 LL | trait Bar {
    |       --- this trait is not dyn compatible...
-LL |     fn bar<T>(&self, t: T);
-   |        ^^^ ...because method `bar` has generic type parameters
-   = help: consider moving `bar` to another trait
-   = note: required for the cast from `&T` to `&dyn Bar`
+LL |     const X: usize;
+   |           ^ ...because it contains this associated `const`
+   = help: consider moving `X` to another trait
 
 error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/generics.rs:27:5
+  --> $DIR/associated-consts.rs:10:5
    |
-LL |     t as &dyn Bar
+LL |     t
    |     ^ `Bar` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/generics.rs:10:8
+  --> $DIR/associated-consts.rs:5:11
    |
 LL | trait Bar {
    |       --- this trait is not dyn compatible...
-LL |     fn bar<T>(&self, t: T);
-   |        ^^^ ...because method `bar` has generic type parameters
-   = help: consider moving `bar` to another trait
+LL |     const X: usize;
+   |           ^ ...because it contains this associated `const`
+   = help: consider moving `X` to another trait
    = note: required for the cast from `&T` to `&dyn Bar`
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/dyn-compatibility/generics.rs b/tests/ui/dyn-compatibility/generics.rs
index b51555aa500..dcce17f925b 100644
--- a/tests/ui/dyn-compatibility/generics.rs
+++ b/tests/ui/dyn-compatibility/generics.rs
@@ -1,9 +1,6 @@
 // Check that we correctly prevent users from making trait objects
 // from traits with generic methods, unless `where Self : Sized` is
 // present.
-//@ revisions: curr dyn_compatible_for_dispatch
-
-#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 
 trait Bar {
@@ -16,18 +13,16 @@ trait Quux {
 }
 
 fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
-    //[curr]~^ ERROR E0038
+    //~^ ERROR E0038
     t
-    //[dyn_compatible_for_dispatch]~^ ERROR E0038
-    //[curr]~^^ ERROR E0038
+    //~^ ERROR E0038
 }
 
 fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
-    //[curr]~^ ERROR E0038
+    //~^ ERROR E0038
     t as &dyn Bar
-    //[dyn_compatible_for_dispatch]~^ ERROR E0038
-    //[curr]~^^ ERROR E0038
-    //[curr]~| ERROR E0038
+    //~^ ERROR E0038
+    //~| ERROR E0038
 }
 
 fn make_quux<T:Quux>(t: &T) -> &dyn Quux {
diff --git a/tests/ui/dyn-compatibility/generics.stderr b/tests/ui/dyn-compatibility/generics.stderr
new file mode 100644
index 00000000000..c0193010541
--- /dev/null
+++ b/tests/ui/dyn-compatibility/generics.stderr
@@ -0,0 +1,85 @@
+error[E0038]: the trait `Bar` is not dyn compatible
+  --> $DIR/generics.rs:15:31
+   |
+LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
+   |                               ^^^^^^^ `Bar` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/generics.rs:7:8
+   |
+LL | trait Bar {
+   |       --- this trait is not dyn compatible...
+LL |     fn bar<T>(&self, t: T);
+   |        ^^^ ...because method `bar` has generic type parameters
+   = help: consider moving `bar` to another trait
+
+error[E0038]: the trait `Bar` is not dyn compatible
+  --> $DIR/generics.rs:21:40
+   |
+LL | fn make_bar_explicit<T:Bar>(t: &T) -> &dyn Bar {
+   |                                        ^^^^^^^ `Bar` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/generics.rs:7:8
+   |
+LL | trait Bar {
+   |       --- this trait is not dyn compatible...
+LL |     fn bar<T>(&self, t: T);
+   |        ^^^ ...because method `bar` has generic type parameters
+   = help: consider moving `bar` to another trait
+
+error[E0038]: the trait `Bar` is not dyn compatible
+  --> $DIR/generics.rs:17:5
+   |
+LL |     t
+   |     ^ `Bar` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/generics.rs:7:8
+   |
+LL | trait Bar {
+   |       --- this trait is not dyn compatible...
+LL |     fn bar<T>(&self, t: T);
+   |        ^^^ ...because method `bar` has generic type parameters
+   = help: consider moving `bar` to another trait
+   = note: required for the cast from `&T` to `&dyn Bar`
+
+error[E0038]: the trait `Bar` is not dyn compatible
+  --> $DIR/generics.rs:23:10
+   |
+LL |     t as &dyn Bar
+   |          ^^^^^^^^ `Bar` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/generics.rs:7:8
+   |
+LL | trait Bar {
+   |       --- this trait is not dyn compatible...
+LL |     fn bar<T>(&self, t: T);
+   |        ^^^ ...because method `bar` has generic type parameters
+   = help: consider moving `bar` to another trait
+
+error[E0038]: the trait `Bar` is not dyn compatible
+  --> $DIR/generics.rs:23:5
+   |
+LL |     t as &dyn Bar
+   |     ^ `Bar` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/generics.rs:7:8
+   |
+LL | trait Bar {
+   |       --- this trait is not dyn compatible...
+LL |     fn bar<T>(&self, t: T);
+   |        ^^^ ...because method `bar` has generic type parameters
+   = help: consider moving `bar` to another trait
+   = note: required for the cast from `&T` to `&dyn Bar`
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/mentions-Self.curr.stderr b/tests/ui/dyn-compatibility/mentions-Self.curr.stderr
index 2d3fe5ce636..6d1ae90152e 100644
--- a/tests/ui/dyn-compatibility/mentions-Self.curr.stderr
+++ b/tests/ui/dyn-compatibility/mentions-Self.curr.stderr
@@ -1,12 +1,12 @@
 error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/mentions-Self.rs:22:31
+  --> $DIR/mentions-Self.rs:18:31
    |
 LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
    |                               ^^^^^^^ `Bar` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/mentions-Self.rs:11:22
+  --> $DIR/mentions-Self.rs:7:22
    |
 LL | trait Bar {
    |       --- this trait is not dyn compatible...
@@ -15,14 +15,14 @@ LL |     fn bar(&self, x: &Self);
    = help: consider moving `bar` to another trait
 
 error[E0038]: the trait `Baz` is not dyn compatible
-  --> $DIR/mentions-Self.rs:28:31
+  --> $DIR/mentions-Self.rs:24:31
    |
 LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
    |                               ^^^^^^^ `Baz` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/mentions-Self.rs:15:22
+  --> $DIR/mentions-Self.rs:11:22
    |
 LL | trait Baz {
    |       --- this trait is not dyn compatible...
@@ -31,14 +31,14 @@ LL |     fn baz(&self) -> Self;
    = help: consider moving `baz` to another trait
 
 error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/mentions-Self.rs:24:5
+  --> $DIR/mentions-Self.rs:20:5
    |
 LL |     t
    |     ^ `Bar` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/mentions-Self.rs:11:22
+  --> $DIR/mentions-Self.rs:7:22
    |
 LL | trait Bar {
    |       --- this trait is not dyn compatible...
@@ -48,14 +48,14 @@ LL |     fn bar(&self, x: &Self);
    = note: required for the cast from `&T` to `&dyn Bar`
 
 error[E0038]: the trait `Baz` is not dyn compatible
-  --> $DIR/mentions-Self.rs:30:5
+  --> $DIR/mentions-Self.rs:26:5
    |
 LL |     t
    |     ^ `Baz` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/mentions-Self.rs:15:22
+  --> $DIR/mentions-Self.rs:11:22
    |
 LL | trait Baz {
    |       --- this trait is not dyn compatible...
diff --git a/tests/ui/dyn-compatibility/mentions-Self.rs b/tests/ui/dyn-compatibility/mentions-Self.rs
index 84c229e252d..ce210f4776f 100644
--- a/tests/ui/dyn-compatibility/mentions-Self.rs
+++ b/tests/ui/dyn-compatibility/mentions-Self.rs
@@ -1,10 +1,6 @@
 // Check that we correctly prevent users from making trait objects
 // form traits that make use of `Self` in an argument or return
 // position, unless `where Self : Sized` is present..
-//
-//@ revisions: curr dyn_compatible_for_dispatch
-
-#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 
 trait Bar {
@@ -20,13 +16,13 @@ trait Quux {
 }
 
 fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
-    //[curr]~^ ERROR E0038
+    //~^ ERROR E0038
     t
     //~^ ERROR E0038
 }
 
 fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
-    //[curr]~^ ERROR E0038
+    //~^ ERROR E0038
     t
     //~^ ERROR E0038
 }
diff --git a/tests/ui/dyn-compatibility/mentions-Self.stderr b/tests/ui/dyn-compatibility/mentions-Self.stderr
new file mode 100644
index 00000000000..6d1ae90152e
--- /dev/null
+++ b/tests/ui/dyn-compatibility/mentions-Self.stderr
@@ -0,0 +1,69 @@
+error[E0038]: the trait `Bar` is not dyn compatible
+  --> $DIR/mentions-Self.rs:18:31
+   |
+LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
+   |                               ^^^^^^^ `Bar` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/mentions-Self.rs:7:22
+   |
+LL | trait Bar {
+   |       --- this trait is not dyn compatible...
+LL |     fn bar(&self, x: &Self);
+   |                      ^^^^^ ...because method `bar` references the `Self` type in this parameter
+   = help: consider moving `bar` to another trait
+
+error[E0038]: the trait `Baz` is not dyn compatible
+  --> $DIR/mentions-Self.rs:24:31
+   |
+LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz {
+   |                               ^^^^^^^ `Baz` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/mentions-Self.rs:11:22
+   |
+LL | trait Baz {
+   |       --- this trait is not dyn compatible...
+LL |     fn baz(&self) -> Self;
+   |                      ^^^^ ...because method `baz` references the `Self` type in its return type
+   = help: consider moving `baz` to another trait
+
+error[E0038]: the trait `Bar` is not dyn compatible
+  --> $DIR/mentions-Self.rs:20:5
+   |
+LL |     t
+   |     ^ `Bar` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/mentions-Self.rs:7:22
+   |
+LL | trait Bar {
+   |       --- this trait is not dyn compatible...
+LL |     fn bar(&self, x: &Self);
+   |                      ^^^^^ ...because method `bar` references the `Self` type in this parameter
+   = help: consider moving `bar` to another trait
+   = note: required for the cast from `&T` to `&dyn Bar`
+
+error[E0038]: the trait `Baz` is not dyn compatible
+  --> $DIR/mentions-Self.rs:26:5
+   |
+LL |     t
+   |     ^ `Baz` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/mentions-Self.rs:11:22
+   |
+LL | trait Baz {
+   |       --- this trait is not dyn compatible...
+LL |     fn baz(&self) -> Self;
+   |                      ^^^^ ...because method `baz` references the `Self` type in its return type
+   = help: consider moving `baz` to another trait
+   = note: required for the cast from `&T` to `&dyn Baz`
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr
deleted file mode 100644
index d5ad4510334..00000000000
--- a/tests/ui/dyn-compatibility/no-static.dyn_compatible_for_dispatch.stderr
+++ /dev/null
@@ -1,28 +0,0 @@
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/no-static.rs:22:27
-   |
-LL |     let b: Box<dyn Foo> = Box::new(Bar);
-   |                           ^^^^^^^^^^^^^ `Foo` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/no-static.rs:9:8
-   |
-LL | trait Foo {
-   |       --- this trait is not dyn compatible...
-LL |     fn foo() {}
-   |        ^^^ ...because associated function `foo` has no `self` parameter
-   = help: only type `Bar` implements `Foo`; consider using it directly instead.
-   = note: required for the cast from `Box<Bar>` to `Box<dyn Foo>`
-help: consider turning `foo` into a method by giving it a `&self` argument
-   |
-LL |     fn foo(&self) {}
-   |            +++++
-help: alternatively, consider constraining `foo` so it does not apply to trait objects
-   |
-LL |     fn foo() where Self: Sized {}
-   |              +++++++++++++++++
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/no-static.rs b/tests/ui/dyn-compatibility/no-static.rs
index 54af16fe18e..9bd87161972 100644
--- a/tests/ui/dyn-compatibility/no-static.rs
+++ b/tests/ui/dyn-compatibility/no-static.rs
@@ -1,16 +1,12 @@
 // Check that we correctly prevent users from making trait objects
 // from traits with static methods.
-//
-//@ revisions: curr dyn_compatible_for_dispatch
-
-#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 trait Foo {
     fn foo() {}
 }
 
 fn diverges() -> Box<dyn Foo> {
-    //[curr]~^ ERROR E0038
+    //~^ ERROR E0038
     loop { }
 }
 
@@ -21,5 +17,5 @@ impl Foo for Bar {}
 fn main() {
     let b: Box<dyn Foo> = Box::new(Bar);
     //~^ ERROR E0038
-    //[curr]~| ERROR E0038
+    //~| ERROR E0038
 }
diff --git a/tests/ui/dyn-compatibility/no-static.stderr b/tests/ui/dyn-compatibility/no-static.stderr
new file mode 100644
index 00000000000..814ab0d53c3
--- /dev/null
+++ b/tests/ui/dyn-compatibility/no-static.stderr
@@ -0,0 +1,76 @@
+error[E0038]: the trait `Foo` is not dyn compatible
+  --> $DIR/no-static.rs:8:22
+   |
+LL | fn diverges() -> Box<dyn Foo> {
+   |                      ^^^^^^^ `Foo` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/no-static.rs:5:8
+   |
+LL | trait Foo {
+   |       --- this trait is not dyn compatible...
+LL |     fn foo() {}
+   |        ^^^ ...because associated function `foo` has no `self` parameter
+   = help: only type `Bar` implements `Foo`; consider using it directly instead.
+help: consider turning `foo` into a method by giving it a `&self` argument
+   |
+LL |     fn foo(&self) {}
+   |            +++++
+help: alternatively, consider constraining `foo` so it does not apply to trait objects
+   |
+LL |     fn foo() where Self: Sized {}
+   |              +++++++++++++++++
+
+error[E0038]: the trait `Foo` is not dyn compatible
+  --> $DIR/no-static.rs:18:12
+   |
+LL |     let b: Box<dyn Foo> = Box::new(Bar);
+   |            ^^^^^^^^^^^^ `Foo` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/no-static.rs:5:8
+   |
+LL | trait Foo {
+   |       --- this trait is not dyn compatible...
+LL |     fn foo() {}
+   |        ^^^ ...because associated function `foo` has no `self` parameter
+   = help: only type `Bar` implements `Foo`; consider using it directly instead.
+help: consider turning `foo` into a method by giving it a `&self` argument
+   |
+LL |     fn foo(&self) {}
+   |            +++++
+help: alternatively, consider constraining `foo` so it does not apply to trait objects
+   |
+LL |     fn foo() where Self: Sized {}
+   |              +++++++++++++++++
+
+error[E0038]: the trait `Foo` is not dyn compatible
+  --> $DIR/no-static.rs:18:27
+   |
+LL |     let b: Box<dyn Foo> = Box::new(Bar);
+   |                           ^^^^^^^^^^^^^ `Foo` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/no-static.rs:5:8
+   |
+LL | trait Foo {
+   |       --- this trait is not dyn compatible...
+LL |     fn foo() {}
+   |        ^^^ ...because associated function `foo` has no `self` parameter
+   = help: only type `Bar` implements `Foo`; consider using it directly instead.
+   = note: required for the cast from `Box<Bar>` to `Box<dyn Foo>`
+help: consider turning `foo` into a method by giving it a `&self` argument
+   |
+LL |     fn foo(&self) {}
+   |            +++++
+help: alternatively, consider constraining `foo` so it does not apply to trait objects
+   |
+LL |     fn foo() where Self: Sized {}
+   |              +++++++++++++++++
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr
deleted file mode 100644
index 1fbc10c0c3f..00000000000
--- a/tests/ui/dyn-compatibility/sized-2.dyn_compatible_for_dispatch.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/sized-2.rs:16:5
-   |
-LL |     t
-   |     ^ `Bar` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/sized-2.rs:9:18
-   |
-LL | trait Bar
-   |       --- this trait is not dyn compatible...
-LL |     where Self : Sized
-   |                  ^^^^^ ...because it requires `Self: Sized`
-   = note: required for the cast from `&T` to `&dyn Bar`
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/sized-2.rs b/tests/ui/dyn-compatibility/sized-2.rs
index f5edd287f24..f61d49ee8df 100644
--- a/tests/ui/dyn-compatibility/sized-2.rs
+++ b/tests/ui/dyn-compatibility/sized-2.rs
@@ -1,9 +1,5 @@
 // Check that we correctly prevent users from making trait objects
 // from traits where `Self : Sized`.
-//
-//@ revisions: curr dyn_compatible_for_dispatch
-
-#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 trait Bar
     where Self : Sized
@@ -12,7 +8,7 @@ trait Bar
 }
 
 fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
-    //[curr]~^ ERROR E0038
+    //~^ ERROR E0038
     t
     //~^ ERROR E0038
 }
diff --git a/tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/sized-2.stderr
index 91c26a86025..1834d906bb8 100644
--- a/tests/ui/dyn-compatibility/mentions-Self.dyn_compatible_for_dispatch.stderr
+++ b/tests/ui/dyn-compatibility/sized-2.stderr
@@ -1,36 +1,33 @@
 error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/mentions-Self.rs:24:5
+  --> $DIR/sized-2.rs:10:31
    |
-LL |     t
-   |     ^ `Bar` is not dyn compatible
+LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
+   |                               ^^^^^^^ `Bar` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/mentions-Self.rs:11:22
+  --> $DIR/sized-2.rs:5:18
    |
-LL | trait Bar {
+LL | trait Bar
    |       --- this trait is not dyn compatible...
-LL |     fn bar(&self, x: &Self);
-   |                      ^^^^^ ...because method `bar` references the `Self` type in this parameter
-   = help: consider moving `bar` to another trait
-   = note: required for the cast from `&T` to `&dyn Bar`
+LL |     where Self : Sized
+   |                  ^^^^^ ...because it requires `Self: Sized`
 
-error[E0038]: the trait `Baz` is not dyn compatible
-  --> $DIR/mentions-Self.rs:30:5
+error[E0038]: the trait `Bar` is not dyn compatible
+  --> $DIR/sized-2.rs:12:5
    |
 LL |     t
-   |     ^ `Baz` is not dyn compatible
+   |     ^ `Bar` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/mentions-Self.rs:15:22
+  --> $DIR/sized-2.rs:5:18
    |
-LL | trait Baz {
+LL | trait Bar
    |       --- this trait is not dyn compatible...
-LL |     fn baz(&self) -> Self;
-   |                      ^^^^ ...because method `baz` references the `Self` type in its return type
-   = help: consider moving `baz` to another trait
-   = note: required for the cast from `&T` to `&dyn Baz`
+LL |     where Self : Sized
+   |                  ^^^^^ ...because it requires `Self: Sized`
+   = note: required for the cast from `&T` to `&dyn Bar`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr
deleted file mode 100644
index 350c8992c6f..00000000000
--- a/tests/ui/dyn-compatibility/sized.dyn_compatible_for_dispatch.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0038]: the trait `Bar` is not dyn compatible
-  --> $DIR/sized.rs:14:5
-   |
-LL |     t
-   |     ^ `Bar` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/sized.rs:8:12
-   |
-LL | trait Bar: Sized {
-   |       ---  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-   = note: required for the cast from `&T` to `&dyn Bar`
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/sized.rs b/tests/ui/dyn-compatibility/sized.rs
index 4c4fe3f8f25..eb5279c17e6 100644
--- a/tests/ui/dyn-compatibility/sized.rs
+++ b/tests/ui/dyn-compatibility/sized.rs
@@ -1,16 +1,12 @@
 // Check that we correctly prevent users from making trait objects
 // from traits where `Self : Sized`.
-//
-//@ revisions: curr dyn_compatible_for_dispatch
-
-#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 trait Bar: Sized {
     fn bar<T>(&self, t: T);
 }
 
 fn make_bar<T: Bar>(t: &T) -> &dyn Bar {
-    //[curr]~^ ERROR E0038
+    //~^ ERROR E0038
     t
     //~^ ERROR E0038
 }
diff --git a/tests/ui/dyn-compatibility/sized.stderr b/tests/ui/dyn-compatibility/sized.stderr
new file mode 100644
index 00000000000..c66e299cf6f
--- /dev/null
+++ b/tests/ui/dyn-compatibility/sized.stderr
@@ -0,0 +1,34 @@
+error[E0038]: the trait `Bar` is not dyn compatible
+  --> $DIR/sized.rs:8:32
+   |
+LL | fn make_bar<T: Bar>(t: &T) -> &dyn Bar {
+   |                                ^^^^^^^ `Bar` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/sized.rs:4:12
+   |
+LL | trait Bar: Sized {
+   |       ---  ^^^^^ ...because it requires `Self: Sized`
+   |       |
+   |       this trait is not dyn compatible...
+
+error[E0038]: the trait `Bar` is not dyn compatible
+  --> $DIR/sized.rs:10:5
+   |
+LL |     t
+   |     ^ `Bar` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/sized.rs:4:12
+   |
+LL | trait Bar: Sized {
+   |       ---  ^^^^^ ...because it requires `Self: Sized`
+   |       |
+   |       this trait is not dyn compatible...
+   = note: required for the cast from `&T` to `&dyn Bar`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/taint-const-eval.dyn_compatible_for_dispatch.stderr b/tests/ui/dyn-compatibility/taint-const-eval.dyn_compatible_for_dispatch.stderr
deleted file mode 100644
index 0bc7d0b14d3..00000000000
--- a/tests/ui/dyn-compatibility/taint-const-eval.dyn_compatible_for_dispatch.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0038]: the trait `Qux` is not dyn compatible
-  --> $DIR/taint-const-eval.rs:11:33
-   |
-LL | static FOO: &(dyn Qux + Sync) = "desc";
-   |                                 ^^^^^^ `Qux` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/taint-const-eval.rs:8:8
-   |
-LL | trait Qux {
-   |       --- this trait is not dyn compatible...
-LL |     fn bar();
-   |        ^^^ ...because associated function `bar` has no `self` parameter
-   = note: required for the cast from `&'static str` to `&'static (dyn Qux + Sync + 'static)`
-help: consider turning `bar` into a method by giving it a `&self` argument
-   |
-LL |     fn bar(&self);
-   |            +++++
-help: alternatively, consider constraining `bar` so it does not apply to trait objects
-   |
-LL |     fn bar() where Self: Sized;
-   |              +++++++++++++++++
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/dyn-compatibility/taint-const-eval.rs b/tests/ui/dyn-compatibility/taint-const-eval.rs
index 2feae58080b..7ea763e1846 100644
--- a/tests/ui/dyn-compatibility/taint-const-eval.rs
+++ b/tests/ui/dyn-compatibility/taint-const-eval.rs
@@ -1,16 +1,12 @@
 // Test that we do not attempt to create dyn-incompatible trait objects in const eval.
 
-//@ revisions: curr dyn_compatible_for_dispatch
-
-#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
-
 trait Qux {
     fn bar();
 }
 
 static FOO: &(dyn Qux + Sync) = "desc";
 //~^ the trait `Qux` is not dyn compatible
-//[curr]~| the trait `Qux` is not dyn compatible
-//[curr]~| the trait `Qux` is not dyn compatible
+//~| the trait `Qux` is not dyn compatible
+//~| the trait `Qux` is not dyn compatible
 
 fn main() {}
diff --git a/tests/ui/dyn-compatibility/taint-const-eval.stderr b/tests/ui/dyn-compatibility/taint-const-eval.stderr
new file mode 100644
index 00000000000..942c20db6ce
--- /dev/null
+++ b/tests/ui/dyn-compatibility/taint-const-eval.stderr
@@ -0,0 +1,74 @@
+error[E0038]: the trait `Qux` is not dyn compatible
+  --> $DIR/taint-const-eval.rs:7:15
+   |
+LL | static FOO: &(dyn Qux + Sync) = "desc";
+   |               ^^^^^^^^^^^^^^ `Qux` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/taint-const-eval.rs:4:8
+   |
+LL | trait Qux {
+   |       --- this trait is not dyn compatible...
+LL |     fn bar();
+   |        ^^^ ...because associated function `bar` has no `self` parameter
+help: consider turning `bar` into a method by giving it a `&self` argument
+   |
+LL |     fn bar(&self);
+   |            +++++
+help: alternatively, consider constraining `bar` so it does not apply to trait objects
+   |
+LL |     fn bar() where Self: Sized;
+   |              +++++++++++++++++
+
+error[E0038]: the trait `Qux` is not dyn compatible
+  --> $DIR/taint-const-eval.rs:7:33
+   |
+LL | static FOO: &(dyn Qux + Sync) = "desc";
+   |                                 ^^^^^^ `Qux` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/taint-const-eval.rs:4:8
+   |
+LL | trait Qux {
+   |       --- this trait is not dyn compatible...
+LL |     fn bar();
+   |        ^^^ ...because associated function `bar` has no `self` parameter
+   = note: required for the cast from `&'static str` to `&'static (dyn Qux + Sync + 'static)`
+help: consider turning `bar` into a method by giving it a `&self` argument
+   |
+LL |     fn bar(&self);
+   |            +++++
+help: alternatively, consider constraining `bar` so it does not apply to trait objects
+   |
+LL |     fn bar() where Self: Sized;
+   |              +++++++++++++++++
+
+error[E0038]: the trait `Qux` is not dyn compatible
+  --> $DIR/taint-const-eval.rs:7:15
+   |
+LL | static FOO: &(dyn Qux + Sync) = "desc";
+   |               ^^^^^^^^^^^^^^ `Qux` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/taint-const-eval.rs:4:8
+   |
+LL | trait Qux {
+   |       --- this trait is not dyn compatible...
+LL |     fn bar();
+   |        ^^^ ...because associated function `bar` has no `self` parameter
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: consider turning `bar` into a method by giving it a `&self` argument
+   |
+LL |     fn bar(&self);
+   |            +++++
+help: alternatively, consider constraining `bar` so it does not apply to trait objects
+   |
+LL |     fn bar() where Self: Sized;
+   |              +++++++++++++++++
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0038`.
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
deleted file mode 100644
index e38ab66dbe5..00000000000
--- a/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-// 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
deleted file mode 100644
index 2c3edd6e6a5..00000000000
--- a/tests/ui/feature-gates/feature-gate-dyn_compatible_for_dispatch.stderr
+++ /dev/null
@@ -1,88 +0,0 @@
-error[E0038]: the trait `DynIncompatible1` is not dyn compatible
-  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:18:40
-   |
-LL | fn takes_dyn_incompatible_ref<T>(obj: &dyn DynIncompatible1) {
-   |                                        ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible1` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:4:25
-   |
-LL | trait DynIncompatible1: Sized {}
-   |       ----------------  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-
-error[E0038]: the trait `DynIncompatible2` is not dyn compatible
-  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:22:46
-   |
-LL | fn return_dyn_incompatible_ref() -> &'static dyn DynIncompatible2 {
-   |                                              ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible2` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:7:8
-   |
-LL | trait DynIncompatible2 {
-   |       ---------------- this trait is not dyn compatible...
-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` is not dyn compatible
-  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:27:40
-   |
-LL | fn takes_dyn_incompatible_box(obj: Box<dyn DynIncompatible3>) {
-   |                                        ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible3` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:11:8
-   |
-LL | trait DynIncompatible3 {
-   |       ---------------- this trait is not dyn compatible...
-LL |     fn foo<T>(&self);
-   |        ^^^ ...because method `foo` has generic type parameters
-   = help: consider moving `foo` to another trait
-
-error[E0038]: the trait `DynIncompatible4` is not dyn compatible
-  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:31:48
-   |
-LL | fn return_dyn_incompatible_rc() -> std::rc::Rc<dyn DynIncompatible4> {
-   |                                                ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible4` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:15:22
-   |
-LL | trait DynIncompatible4 {
-   |       ---------------- this trait is not dyn compatible...
-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` is not dyn compatible
-  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:38:16
-   |
-LL | impl Trait for dyn DynIncompatible1 {}
-   |                ^^^^^^^^^^^^^^^^^^^^ `DynIncompatible1` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/feature-gate-dyn_compatible_for_dispatch.rs:4:25
-   |
-LL | trait DynIncompatible1: Sized {}
-   |       ----------------  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-
-error: aborting due to 5 previous errors
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.rs b/tests/ui/kindck/kindck-inherited-copy-bound.rs
index dda95229ddf..20d54a3fb10 100644
--- a/tests/ui/kindck/kindck-inherited-copy-bound.rs
+++ b/tests/ui/kindck/kindck-inherited-copy-bound.rs
@@ -1,8 +1,4 @@
 // Test that Copy bounds inherited by trait are checked.
-//
-//@ revisions: curr dyn_compatible_for_dispatch
-
-#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
 
 
 use std::any::Any;
@@ -18,17 +14,15 @@ fn take_param<T:Foo>(foo: &T) { }
 
 fn a() {
     let x: Box<_> = Box::new(3);
-    take_param(&x); //[curr]~ ERROR E0277
-    //[dyn_compatible_for_dispatch]~^ ERROR E0277
+    take_param(&x); //~ ERROR E0277
 }
 
 fn b() {
     let x: Box<_> = Box::new(3);
     let y = &x;
     let z = &x as &dyn Foo;
-    //[curr]~^ ERROR E0038
-    //[curr]~| ERROR E0038
-    //[dyn_compatible_for_dispatch]~^^^ ERROR E0038
+    //~^ ERROR E0038
+    //~| ERROR E0038
 }
 
 fn main() { }
diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr b/tests/ui/kindck/kindck-inherited-copy-bound.stderr
index 296f011193e..edfa7ae7769 100644
--- a/tests/ui/kindck/kindck-inherited-copy-bound.dyn_compatible_for_dispatch.stderr
+++ b/tests/ui/kindck/kindck-inherited-copy-bound.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `Box<{integer}>: Foo` is not satisfied
-  --> $DIR/kindck-inherited-copy-bound.rs:21:16
+  --> $DIR/kindck-inherited-copy-bound.rs:17:16
    |
 LL |     take_param(&x);
    |     ---------- ^^ the trait `Copy` is not implemented for `Box<{integer}>`
@@ -7,35 +7,50 @@ LL |     take_param(&x);
    |     required by a bound introduced by this call
    |
 note: required for `Box<{integer}>` to implement `Foo`
-  --> $DIR/kindck-inherited-copy-bound.rs:14:14
+  --> $DIR/kindck-inherited-copy-bound.rs:10:14
    |
 LL | impl<T:Copy> Foo for T {
    |        ----  ^^^     ^
    |        |
    |        unsatisfied trait bound introduced here
 note: required by a bound in `take_param`
-  --> $DIR/kindck-inherited-copy-bound.rs:17:17
+  --> $DIR/kindck-inherited-copy-bound.rs:13:17
    |
 LL | fn take_param<T:Foo>(foo: &T) { }
    |                 ^^^ required by this bound in `take_param`
 
 error[E0038]: the trait `Foo` is not dyn compatible
-  --> $DIR/kindck-inherited-copy-bound.rs:28:13
+  --> $DIR/kindck-inherited-copy-bound.rs:23:19
+   |
+LL |     let z = &x as &dyn Foo;
+   |                   ^^^^^^^^ `Foo` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/kindck-inherited-copy-bound.rs:6:13
+   |
+LL | trait Foo : Copy {
+   |       ---   ^^^^ ...because it requires `Self: Sized`
+   |       |
+   |       this trait is not dyn compatible...
+
+error[E0038]: the trait `Foo` is not dyn compatible
+  --> $DIR/kindck-inherited-copy-bound.rs:23:13
    |
 LL |     let z = &x as &dyn Foo;
    |             ^^ `Foo` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/kindck-inherited-copy-bound.rs:10:13
+  --> $DIR/kindck-inherited-copy-bound.rs:6:13
    |
 LL | trait Foo : Copy {
    |       ---   ^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait is not dyn compatible...
-   = note: required for the cast from `&Box<i32>` to `&dyn Foo`
+   = note: required for the cast from `&Box<{integer}>` to `&dyn Foo`
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0038, E0277.
 For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/downcast-unsafe-trait-objects.rs b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/downcast-unsafe-trait-objects.rs
deleted file mode 100644
index b1b2dcf3eb9..00000000000
--- a/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/downcast-unsafe-trait-objects.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// 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(dyn_compatible_for_dispatch)]
-
-trait Trait: Sized {}
-
-fn downcast_auto(t: &(dyn Trait + Send)) -> &dyn Trait {
-    t
-}
-
-fn downcast_lifetime<'a, 'b, 't>(t: &'a (dyn Trait + 't))
-                                 -> &'b (dyn Trait + 't)
-where
-    'a: 'b,
-    't: 'a + 'b,
-{
-    t
-}
-
-fn main() {}
diff --git a/tests/ui/rfcs/rfc-2027-dyn-compatible-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
deleted file mode 100644
index 1489791b20d..00000000000
--- a/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.current.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-warning: methods `good_virt` and `good_indirect` are never used
-  --> $DIR/manual-self-impl-for-unsafe-obj.rs:23:8
-   |
-LL | trait Good {
-   |       ---- methods in this trait
-LL |     fn good_virt(&self) -> char {
-   |        ^^^^^^^^^
-...
-LL |     fn good_indirect(&self) -> char {
-   |        ^^^^^^^^^^^^^
-   |
-   = note: `#[warn(dead_code)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/rfcs/rfc-2027-dyn-compatible-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
deleted file mode 100644
index 1489791b20d..00000000000
--- a/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.next.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-warning: methods `good_virt` and `good_indirect` are never used
-  --> $DIR/manual-self-impl-for-unsafe-obj.rs:23:8
-   |
-LL | trait Good {
-   |       ---- methods in this trait
-LL |     fn good_virt(&self) -> char {
-   |        ^^^^^^^^^
-...
-LL |     fn good_indirect(&self) -> char {
-   |        ^^^^^^^^^^^^^
-   |
-   = note: `#[warn(dead_code)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/rfcs/rfc-2027-dyn-compatible-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
deleted file mode 100644
index 425dc130d45..00000000000
--- a/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/manual-self-impl-for-unsafe-obj.rs
+++ /dev/null
@@ -1,69 +0,0 @@
-// 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(dyn_compatible_for_dispatch)]
-
-trait Bad {
-    fn stat() -> char {
-        'A'
-    }
-    fn virt(&self) -> char {
-        'B'
-    }
-    fn indirect(&self) -> char {
-        Self::stat()
-    }
-}
-
-trait Good {
-    fn good_virt(&self) -> char { //~ WARN methods `good_virt` and `good_indirect` are never used
-        panic!()
-    }
-    fn good_indirect(&self) -> char {
-        panic!()
-    }
-}
-
-impl<'a> Bad for dyn Bad + 'a {
-    fn stat() -> char {
-        'C'
-    }
-    fn virt(&self) -> char {
-        'D'
-    }
-}
-
-struct Struct {}
-
-impl Bad for Struct {}
-
-impl Good for Struct {}
-
-fn main() {
-    let s = Struct {};
-
-    let mut res = String::new();
-
-    // Directly call static.
-    res.push(Struct::stat()); // "A"
-    res.push(<dyn Bad>::stat()); // "AC"
-
-    let good: &dyn Good = &s;
-
-    // These look similar enough...
-    let bad = unsafe { std::mem::transmute::<&dyn Good, &dyn Bad>(good) };
-
-    // Call virtual.
-    res.push(s.virt()); // "ACB"
-    res.push(bad.virt()); // "ACBD"
-
-    // Indirectly call static.
-    res.push(s.indirect()); // "ACBDA"
-    res.push(bad.indirect()); // "ACBDAC"
-
-    assert_eq!(&res, "ACBDAC");
-}
diff --git a/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/static-dispatch-unsafe-object.rs b/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/static-dispatch-unsafe-object.rs
deleted file mode 100644
index c38928a9f44..00000000000
--- a/tests/ui/rfcs/rfc-2027-dyn-compatible-for-dispatch/static-dispatch-unsafe-object.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// Check that we can statically dispatch methods for object
-// unsafe trait objects, directly and indirectly
-//
-//@ check-pass
-
-#![feature(dyn_compatible_for_dispatch)]
-
-trait Statics {
-    fn plain() {}
-    fn generic<T>() {}
-}
-
-trait Trait: Sized {}
-
-impl<'a> Statics for dyn Trait + 'a {}
-
-fn static_poly<T: Statics + ?Sized>() {
-    T::plain();
-    T::generic::<usize>();
-}
-
-fn inferred_poly<T: Statics + ?Sized>(t: &T) {
-    static_poly::<T>();
-    T::plain();
-    T::generic::<usize>();
-}
-
-fn call(t: &dyn Trait) {
-    static_poly::<dyn Trait>();
-    inferred_poly(t);
-}
-
-fn main() {
-    static_poly::<dyn Trait>();
-    <dyn Trait>::plain();
-    <dyn Trait>::generic::<usize>()
-}
diff --git a/tests/ui/rust-2021/ice-return-unsized-can-impl-2.rs b/tests/ui/rust-2021/ice-return-unsized-can-impl-2.rs
index e57e9ce4844..567d37e1b82 100644
--- a/tests/ui/rust-2021/ice-return-unsized-can-impl-2.rs
+++ b/tests/ui/rust-2021/ice-return-unsized-can-impl-2.rs
@@ -1,15 +1,17 @@
 // Doesn't trigger ICE when returning unsized trait that can be impl
 // issue https://github.com/rust-lang/rust/issues/125512
 //@ edition:2021
-#![feature(dyn_compatible_for_dispatch)]
+
 trait B {
     fn f(a: A) -> A;
     //~^ ERROR: expected a type, found a trait
     //~| ERROR: expected a type, found a trait
 }
+
 trait A {
     fn concrete(b: B) -> B;
     //~^ ERROR: expected a type, found a trait
     //~| ERROR: expected a type, found a trait
 }
+
 fn main() {}
diff --git a/tests/ui/rust-2021/ice-return-unsized-can-impl-2.stderr b/tests/ui/rust-2021/ice-return-unsized-can-impl-2.stderr
index ac19f91881d..f2942820e28 100644
--- a/tests/ui/rust-2021/ice-return-unsized-can-impl-2.stderr
+++ b/tests/ui/rust-2021/ice-return-unsized-can-impl-2.stderr
@@ -1,5 +1,5 @@
 error[E0782]: expected a type, found a trait
-  --> $DIR/ice-return-unsized-can-impl-2.rs:11:20
+  --> $DIR/ice-return-unsized-can-impl-2.rs:12:20
    |
 LL |     fn concrete(b: B) -> B;
    |                    ^
@@ -16,7 +16,7 @@ LL |     fn concrete(b: impl B) -> B;
    |                    ++++
 
 error[E0782]: expected a type, found a trait
-  --> $DIR/ice-return-unsized-can-impl-2.rs:11:26
+  --> $DIR/ice-return-unsized-can-impl-2.rs:12:26
    |
 LL |     fn concrete(b: B) -> B;
    |                          ^
diff --git a/tests/ui/rust-2021/ice-return-unsized-can-impl.rs b/tests/ui/rust-2021/ice-return-unsized-can-impl.rs
index 055b11b4424..8b83b7b537a 100644
--- a/tests/ui/rust-2021/ice-return-unsized-can-impl.rs
+++ b/tests/ui/rust-2021/ice-return-unsized-can-impl.rs
@@ -1,7 +1,6 @@
 // Doesn't trigger ICE when returning unsized trait that can be impl
 // issue https://github.com/rust-lang/rust/issues/120482
 //@ edition:2021
-#![feature(dyn_compatible_for_dispatch)]
 
 trait B {
     fn bar(&self, x: &Self);
diff --git a/tests/ui/rust-2021/ice-return-unsized-can-impl.stderr b/tests/ui/rust-2021/ice-return-unsized-can-impl.stderr
index 463c6892ca2..cfee506e29b 100644
--- a/tests/ui/rust-2021/ice-return-unsized-can-impl.stderr
+++ b/tests/ui/rust-2021/ice-return-unsized-can-impl.stderr
@@ -1,5 +1,5 @@
 error[E0782]: expected a type, found a trait
-  --> $DIR/ice-return-unsized-can-impl.rs:11:15
+  --> $DIR/ice-return-unsized-can-impl.rs:10:15
    |
 LL |     fn g(new: B) -> B;
    |               ^
@@ -16,7 +16,7 @@ LL |     fn g(new: impl B) -> B;
    |               ++++
 
 error[E0782]: expected a type, found a trait
-  --> $DIR/ice-return-unsized-can-impl.rs:11:21
+  --> $DIR/ice-return-unsized-can-impl.rs:10:21
    |
 LL |     fn g(new: B) -> B;
    |                     ^
diff --git a/tests/ui/rust-2021/ice-unsized-fn-params-2.rs b/tests/ui/rust-2021/ice-unsized-fn-params-2.rs
index 2b4f7bd088f..8af56ffe80d 100644
--- a/tests/ui/rust-2021/ice-unsized-fn-params-2.rs
+++ b/tests/ui/rust-2021/ice-unsized-fn-params-2.rs
@@ -1,7 +1,7 @@
 //@ edition:2021
 // Test that it doesn't trigger an ICE when using an unsized fn params.
 // https://github.com/rust-lang/rust/issues/120241
-#![feature(dyn_compatible_for_dispatch)]
+
 #![feature(unsized_fn_params)]
 
 fn guard(_s: Copy) -> bool {
diff --git a/tests/ui/rust-2021/ice-unsized-fn-params.rs b/tests/ui/rust-2021/ice-unsized-fn-params.rs
index 6d8c1c3f152..6ed67698e96 100644
--- a/tests/ui/rust-2021/ice-unsized-fn-params.rs
+++ b/tests/ui/rust-2021/ice-unsized-fn-params.rs
@@ -1,7 +1,6 @@
 //@ edition:2021
 // Test that it doesn't trigger an ICE when using an unsized fn params.
 // https://github.com/rust-lang/rust/issues/120241
-#![feature(dyn_compatible_for_dispatch)]
 
 trait B {
     fn f(a: A) -> A;
diff --git a/tests/ui/rust-2021/ice-unsized-fn-params.stderr b/tests/ui/rust-2021/ice-unsized-fn-params.stderr
index c31500ba800..4d900711ed6 100644
--- a/tests/ui/rust-2021/ice-unsized-fn-params.stderr
+++ b/tests/ui/rust-2021/ice-unsized-fn-params.stderr
@@ -1,5 +1,5 @@
 error[E0782]: expected a type, found a trait
-  --> $DIR/ice-unsized-fn-params.rs:13:13
+  --> $DIR/ice-unsized-fn-params.rs:12:13
    |
 LL |     fn g(b: B) -> B;
    |             ^
@@ -16,7 +16,7 @@ LL |     fn g(b: impl B) -> B;
    |             ++++
 
 error[E0782]: expected a type, found a trait
-  --> $DIR/ice-unsized-fn-params.rs:13:19
+  --> $DIR/ice-unsized-fn-params.rs:12:19
    |
 LL |     fn g(b: B) -> B;
    |                   ^
@@ -27,7 +27,7 @@ LL |     fn g(b: B) -> impl B;
    |                   ++++
 
 error[E0782]: expected a type, found a trait
-  --> $DIR/ice-unsized-fn-params.rs:7:13
+  --> $DIR/ice-unsized-fn-params.rs:6:13
    |
 LL |     fn f(a: A) -> A;
    |             ^
@@ -44,7 +44,7 @@ LL |     fn f(a: impl A) -> A;
    |             ++++
 
 error[E0782]: expected a type, found a trait
-  --> $DIR/ice-unsized-fn-params.rs:7:19
+  --> $DIR/ice-unsized-fn-params.rs:6:19
    |
 LL |     fn f(a: A) -> A;
    |                   ^
diff --git a/tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr b/tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr
deleted file mode 100644
index d324f4641cf..00000000000
--- a/tests/ui/self/arbitrary-self-types-dyn-incompatible.dyn_compatible_for_dispatch.stderr
+++ /dev/null
@@ -1,23 +0,0 @@
-error[E0038]: the trait `Foo` is not dyn compatible
-  --> $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`
-...
-LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
-   |             ^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:8:18
-   |
-LL | trait Foo {
-   |       --- this trait is not dyn compatible...
-LL |     fn foo(self: &Rc<Self>) -> usize;
-   |                  ^^^^^^^^^ ...because method `foo`'s `self` parameter cannot be dispatched on
-   = help: only type `usize` implements `Foo`; consider using it directly instead.
-   = note: required for the cast from `Rc<usize>` to `Rc<dyn Foo>`
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/self/arbitrary-self-types-dyn-incompatible.rs b/tests/ui/self/arbitrary-self-types-dyn-incompatible.rs
index 940b2f1e8e2..0477d9d79c7 100644
--- a/tests/ui/self/arbitrary-self-types-dyn-incompatible.rs
+++ b/tests/ui/self/arbitrary-self-types-dyn-incompatible.rs
@@ -1,7 +1,3 @@
-//@ revisions: curr dyn_compatible_for_dispatch
-
-#![cfg_attr(dyn_compatible_for_dispatch, feature(dyn_compatible_for_dispatch))]
-
 use std::rc::Rc;
 
 trait Foo {
@@ -31,9 +27,8 @@ impl Bar for usize {
 
 fn make_foo() {
     let x = Rc::new(5usize) as Rc<dyn Foo>;
-    //[curr]~^ ERROR E0038
-    //[curr]~| ERROR E0038
-    //[dyn_compatible_for_dispatch]~^^^ ERROR E0038
+    //~^ ERROR E0038
+    //~| ERROR E0038
 }
 
 fn make_bar() {
diff --git a/tests/ui/self/arbitrary-self-types-dyn-incompatible.stderr b/tests/ui/self/arbitrary-self-types-dyn-incompatible.stderr
new file mode 100644
index 00000000000..9fb4c80329d
--- /dev/null
+++ b/tests/ui/self/arbitrary-self-types-dyn-incompatible.stderr
@@ -0,0 +1,42 @@
+error[E0038]: the trait `Foo` is not dyn compatible
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:29:32
+   |
+LL |     fn foo(self: &Rc<Self>) -> usize;
+   |                  --------- help: consider changing method `foo`'s `self` parameter to be `&self`: `&Self`
+...
+LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
+   |                                ^^^^^^^^^^^ `Foo` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:4:18
+   |
+LL | trait Foo {
+   |       --- this trait is not dyn compatible...
+LL |     fn foo(self: &Rc<Self>) -> usize;
+   |                  ^^^^^^^^^ ...because method `foo`'s `self` parameter cannot be dispatched on
+   = help: only type `usize` implements `Foo`; consider using it directly instead.
+
+error[E0038]: the trait `Foo` is not dyn compatible
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:29:13
+   |
+LL |     fn foo(self: &Rc<Self>) -> usize;
+   |                  --------- help: consider changing method `foo`'s `self` parameter to be `&self`: `&Self`
+...
+LL |     let x = Rc::new(5usize) as Rc<dyn Foo>;
+   |             ^^^^^^^^^^^^^^^ `Foo` is not dyn compatible
+   |
+note: for a trait to be dyn compatible it needs to allow building a vtable
+      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
+  --> $DIR/arbitrary-self-types-dyn-incompatible.rs:4:18
+   |
+LL | trait Foo {
+   |       --- this trait is not dyn compatible...
+LL |     fn foo(self: &Rc<Self>) -> usize;
+   |                  ^^^^^^^^^ ...because method `foo`'s `self` parameter cannot be dispatched on
+   = help: only type `usize` implements `Foo`; consider using it directly instead.
+   = note: required for the cast from `Rc<usize>` to `Rc<dyn Foo>`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/suggestions/issue-104328.rs b/tests/ui/suggestions/issue-104328.rs
deleted file mode 100644
index 2b0fbdb8d35..00000000000
--- a/tests/ui/suggestions/issue-104328.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-#![feature(dyn_compatible_for_dispatch)]
-
-trait Foo {
-    fn f() {}
-}
-
-impl Foo for dyn Sized {}
-
-fn main() {
-    Foo::f();
-    //~^ ERROR cannot call associated function on trait without specifying the corresponding `impl` type
-}
diff --git a/tests/ui/suggestions/issue-104328.stderr b/tests/ui/suggestions/issue-104328.stderr
deleted file mode 100644
index 3c5e6f16289..00000000000
--- a/tests/ui/suggestions/issue-104328.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
-  --> $DIR/issue-104328.rs:10:5
-   |
-LL |     fn f() {}
-   |     --------- `Foo::f` defined here
-...
-LL |     Foo::f();
-   |     ^^^^^^^^ cannot call associated function of trait
-   |
-help: use the fully-qualified path to the only available implementation
-   |
-LL |     <(dyn Sized + 'static) as Foo>::f();
-   |     +++++++++++++++++++++++++    +
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0790`.
diff --git a/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.rs b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.rs
deleted file mode 100644
index 26292a1d218..00000000000
--- a/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Check that we do not allow casts or coercions
-// to dyn-incompatible trait objects inside a Box
-
-#![feature(dyn_compatible_for_dispatch)]
-
-trait Trait: Sized {}
-
-struct S;
-
-impl Trait for S {}
-
-fn takes_box(t: Box<dyn Trait>) {}
-
-fn main() {
-    Box::new(S) as Box<dyn Trait>; //~ ERROR E0038
-    let t_box: Box<dyn Trait> = Box::new(S); //~ ERROR E0038
-    takes_box(Box::new(S)); //~ ERROR E0038
-}
diff --git a/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr
deleted file mode 100644
index f3e4f2a63e9..00000000000
--- a/tests/ui/wf/wf-convert-dyn-incompat-trait-obj-box.stderr
+++ /dev/null
@@ -1,54 +0,0 @@
-error[E0038]: the trait `Trait` is not dyn compatible
-  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:16:33
-   |
-LL |     let t_box: Box<dyn Trait> = Box::new(S);
-   |                                 ^^^^^^^^^^^ `Trait` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:6:14
-   |
-LL | trait Trait: Sized {}
-   |       -----  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-   = help: only type `S` implements `Trait`; consider using it directly instead.
-   = note: required for the cast from `Box<S>` to `Box<dyn Trait>`
-
-error[E0038]: the trait `Trait` is not dyn compatible
-  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:17:15
-   |
-LL |     takes_box(Box::new(S));
-   |               ^^^^^^^^^^^ `Trait` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:6:14
-   |
-LL | trait Trait: Sized {}
-   |       -----  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-   = help: only type `S` implements `Trait`; consider using it directly instead.
-   = note: required for the cast from `Box<S>` to `Box<(dyn Trait + 'static)>`
-
-error[E0038]: the trait `Trait` is not dyn compatible
-  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:15:5
-   |
-LL |     Box::new(S) as Box<dyn Trait>;
-   |     ^^^^^^^^^^^ `Trait` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/wf-convert-dyn-incompat-trait-obj-box.rs:6:14
-   |
-LL | trait Trait: Sized {}
-   |       -----  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-   = help: only type `S` implements `Trait`; consider using it directly instead.
-   = note: required for the cast from `Box<S>` to `Box<dyn Trait>`
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.rs b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.rs
deleted file mode 100644
index ec4bb2897f9..00000000000
--- a/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Check that we do not allow casts or coercions
-// to dyn-incompatible trait objects by ref
-
-#![feature(dyn_compatible_for_dispatch)]
-
-trait Trait: Sized {}
-
-struct S;
-
-impl Trait for S {}
-
-fn takes_trait(t: &dyn Trait) {}
-
-fn main() {
-    &S as &dyn Trait; //~ ERROR E0038
-    let t: &dyn Trait = &S; //~ ERROR E0038
-    takes_trait(&S); //~ ERROR E0038
-}
diff --git a/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr b/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr
deleted file mode 100644
index 716d0e78ff1..00000000000
--- a/tests/ui/wf/wf-convert-dyn-incompat-trait-obj.stderr
+++ /dev/null
@@ -1,54 +0,0 @@
-error[E0038]: the trait `Trait` is not dyn compatible
-  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:16:25
-   |
-LL |     let t: &dyn Trait = &S;
-   |                         ^^ `Trait` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:6:14
-   |
-LL | trait Trait: Sized {}
-   |       -----  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-   = help: only type `S` implements `Trait`; consider using it directly instead.
-   = note: required for the cast from `&S` to `&dyn Trait`
-
-error[E0038]: the trait `Trait` is not dyn compatible
-  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:17:17
-   |
-LL |     takes_trait(&S);
-   |                 ^^ `Trait` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:6:14
-   |
-LL | trait Trait: Sized {}
-   |       -----  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-   = help: only type `S` implements `Trait`; consider using it directly instead.
-   = note: required for the cast from `&S` to `&dyn Trait`
-
-error[E0038]: the trait `Trait` is not dyn compatible
-  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:15:5
-   |
-LL |     &S as &dyn Trait;
-   |     ^^ `Trait` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/wf-convert-dyn-incompat-trait-obj.rs:6:14
-   |
-LL | trait Trait: Sized {}
-   |       -----  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-   = help: only type `S` implements `Trait`; consider using it directly instead.
-   = note: required for the cast from `&S` to `&dyn Trait`
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/wf/wf-dyn-incompat-trait-obj-match.rs b/tests/ui/wf/wf-dyn-incompat-trait-obj-match.rs
deleted file mode 100644
index 6eba6b7abec..00000000000
--- a/tests/ui/wf/wf-dyn-incompat-trait-obj-match.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Check that we do not allow coercions to object
-// unsafe trait objects in match arms
-
-#![feature(dyn_compatible_for_dispatch)]
-
-trait Trait: Sized {}
-
-struct S;
-
-impl Trait for S {}
-
-struct R;
-
-impl Trait for R {}
-
-fn opt() -> Option<()> {
-    Some(())
-}
-
-fn main() {
-    match opt() {
-        Some(()) => &S,
-        None => &R,  //~ ERROR E0308
-    }
-    let t: &dyn Trait = match opt() {
-        Some(()) => &S, //~ ERROR E0038
-        None => &R, //~ ERROR E0038
-    };
-}
diff --git a/tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr b/tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr
deleted file mode 100644
index a7405ce4caa..00000000000
--- a/tests/ui/wf/wf-dyn-incompat-trait-obj-match.stderr
+++ /dev/null
@@ -1,60 +0,0 @@
-error[E0308]: `match` arms have incompatible types
-  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:23:17
-   |
-LL | /     match opt() {
-LL | |         Some(()) => &S,
-   | |                     -- this is found to be of type `&S`
-LL | |         None => &R,
-   | |                 ^^ expected `&S`, found `&R`
-LL | |     }
-   | |_____- `match` arms have incompatible types
-   |
-   = note: expected reference `&S`
-              found reference `&R`
-
-error[E0038]: the trait `Trait` is not dyn compatible
-  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:26:21
-   |
-LL |         Some(()) => &S,
-   |                     ^^ `Trait` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:6:14
-   |
-LL | trait Trait: Sized {}
-   |       -----  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-   = help: the following types implement `Trait`:
-             S
-             R
-           consider defining an enum where each variant holds one of these types,
-           implementing `Trait` for this new enum and using it instead
-   = note: required for the cast from `&S` to `&dyn Trait`
-
-error[E0038]: the trait `Trait` is not dyn compatible
-  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:27:17
-   |
-LL |         None => &R,
-   |                 ^^ `Trait` is not dyn compatible
-   |
-note: for a trait to be dyn compatible it needs to allow building a vtable
-      for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/wf-dyn-incompat-trait-obj-match.rs:6:14
-   |
-LL | trait Trait: Sized {}
-   |       -----  ^^^^^ ...because it requires `Self: Sized`
-   |       |
-   |       this trait is not dyn compatible...
-   = help: the following types implement `Trait`:
-             S
-             R
-           consider defining an enum where each variant holds one of these types,
-           implementing `Trait` for this new enum and using it instead
-   = note: required for the cast from `&R` to `&dyn Trait`
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0038, E0308.
-For more information about an error, try `rustc --explain E0038`.